amv-train 2.1.0 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/NOTICE +4 -4
- package/README.md +14 -14
- package/README.pypi.md +14 -14
- package/bin/cli.js +8 -8
- package/index.d.ts +2 -2
- package/index.js +1 -1
- package/lib/benchmark.js +6 -6
- package/lib/doctor.js +3 -3
- package/lib/errors.js +2 -2
- package/lib/multimodal.js +2 -2
- package/lib/trainer.js +2 -2
- package/package.json +4 -4
package/NOTICE
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
Copyright 2026
|
|
1
|
+
amv-train
|
|
2
|
+
Copyright 2026 amv-train contributors
|
|
3
3
|
|
|
4
|
-
This product includes software developed by the
|
|
5
|
-
(https://github.com/uno-km/
|
|
4
|
+
This product includes software developed by the amv-train project
|
|
5
|
+
(https://github.com/uno-km/amv-train) and AMEVA Open-Source Foundation.
|
|
6
6
|
|
|
7
7
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
8
8
|
you may not use this file except in compliance with the License.
|
package/README.md
CHANGED
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
|
|
25
25
|
## Executive Summary & Architecture Overview
|
|
26
26
|
|
|
27
|
-
**
|
|
27
|
+
**AMV-Train v2.0.0** is an industrial-grade, zero-dependency deep learning framework engineered specifically for constrained ARM64 Bionic environments (Android Termux, mobile Linux, embedded edge devices). By combining a C-vectorized Directed Acyclic Graph (DAG) Autograd runtime with mobile hardware acceleration (Vulkan Compute, OpenCL, ARM64 NEON), AMV-Train enables full backward gradient propagation, parameter-efficient fine-tuning (LoRA / DoRA), and reinforcement learning directly on mobile devices.
|
|
28
28
|
|
|
29
29
|
```
|
|
30
30
|
+---------------------------------------------------------------------------------------------------+
|
|
@@ -50,17 +50,17 @@
|
|
|
50
50
|
v
|
|
51
51
|
+---------------------------------------------------------------------------------------------------+
|
|
52
52
|
| Target-Aware Runtime Export & Compatibility |
|
|
53
|
-
| ComfyUI / Diffusers | llama.cpp / GGUF |
|
|
53
|
+
| ComfyUI / Diffusers | llama.cpp / GGUF | amv-vision | amv-stt | BitNet |
|
|
54
54
|
+---------------------------------------------------------------------------------------------------+
|
|
55
55
|
```
|
|
56
56
|
|
|
57
57
|
### Core Architectural Pillars
|
|
58
58
|
|
|
59
|
-
1. **Zero External Heavy Dependencies**: Executes autonomously without PyTorch, LibTorch, CMake, or heavy BLAS runtimes. Pure Python DAG autograd paired with optional C-accelerator ABI (`
|
|
59
|
+
1. **Zero External Heavy Dependencies**: Executes autonomously without PyTorch, LibTorch, CMake, or heavy BLAS runtimes. Pure Python DAG autograd paired with optional C-accelerator ABI (`libamv_train_accel.so`) or Vulkan compute shaders.
|
|
60
60
|
2. **6-Modality Target-Aware Adapters**: Generates standard SafeTensors weights and companion `_config.json` manifests natively recognized by major desktop and mobile inference runtimes without conversion tooling.
|
|
61
61
|
3. **Single-Device GPU Slicing**: Bypasses mobile Unified Memory Architecture (UMA) spikes and watchdog timeouts on ARM Mali and Qualcomm Adreno GPUs through granular vocabulary chunking and layer streaming.
|
|
62
62
|
4. **44GB Disaggregated Cluster Virtual RAM Pooling**: Binds physical memory across heterogeneous mobile nodes (e.g., Galaxy S25, S21, S20, A53, A35) into an aggregated pipeline training session protected by a 300MB memory Guard-Band against the Android Low Memory Killer (LMK).
|
|
63
|
-
5. **100% Dual-Engine Parity**: Complete feature and interface symmetry across Python CLI (`amv-train`), Node.js Global CLI (`amv-train`), Python Library (`import
|
|
63
|
+
5. **100% Dual-Engine Parity**: Complete feature and interface symmetry across Python CLI (`amv-train`), Node.js Global CLI (`amv-train`), Python Library (`import amv_train`), and Node.js SDK (`import { ... } from 'amv-train'`).
|
|
64
64
|
|
|
65
65
|
---
|
|
66
66
|
|
|
@@ -104,7 +104,7 @@ amv-train diffusion-train \
|
|
|
104
104
|
```
|
|
105
105
|
|
|
106
106
|
### 2. Vision Multimodal VLM LoRA Training (`vision-train`)
|
|
107
|
-
Trains multimodal projection adapters and visual cross-attention layers. Operates on image-text pairs formatted in LLaVA or Qwen2-VL visual question answering schemas. Directly bridges into the `
|
|
107
|
+
Trains multimodal projection adapters and visual cross-attention layers. Operates on image-text pairs formatted in LLaVA or Qwen2-VL visual question answering schemas. Directly bridges into the `amv-vision` mobile inference runtime.
|
|
108
108
|
|
|
109
109
|
```bash
|
|
110
110
|
amv-train vision-train \
|
|
@@ -119,7 +119,7 @@ amv-train vision-train \
|
|
|
119
119
|
```
|
|
120
120
|
|
|
121
121
|
### 3. Speech-to-Text Whisper LoRA Training (`stt-train`)
|
|
122
|
-
Performs acoustic adaptation on Whisper encoder-decoder attention blocks. Features automated Mel filterbank spectrogram extraction and persistent caching. Natively consumable by `
|
|
122
|
+
Performs acoustic adaptation on Whisper encoder-decoder attention blocks. Features automated Mel filterbank spectrogram extraction and persistent caching. Natively consumable by `amv-stt`.
|
|
123
123
|
|
|
124
124
|
```bash
|
|
125
125
|
amv-train stt-train \
|
|
@@ -133,7 +133,7 @@ amv-train stt-train \
|
|
|
133
133
|
```
|
|
134
134
|
|
|
135
135
|
### 4. Text-to-Speech Style Adaptation LoRA Training (`tts-train`)
|
|
136
|
-
Fine-tunes speaker embedding and acoustic style parameters for neural speech synthesis. Generates low-rank voice profile adapters directly compatible with `
|
|
136
|
+
Fine-tunes speaker embedding and acoustic style parameters for neural speech synthesis. Generates low-rank voice profile adapters directly compatible with `amv-tts`.
|
|
137
137
|
|
|
138
138
|
```bash
|
|
139
139
|
amv-train tts-train \
|
|
@@ -165,7 +165,7 @@ amv-train train \
|
|
|
165
165
|
```
|
|
166
166
|
|
|
167
167
|
### 6. BitNet 1.58-bit Ternary Quantization-Aware Training
|
|
168
|
-
Applies dynamic activation scaling and ternary weight quantization $\{-1, 0, +1\}$ during forward and backward passes. Directly exports quantized kernels compatible with `bitnet.cpp` and `
|
|
168
|
+
Applies dynamic activation scaling and ternary weight quantization $\{-1, 0, +1\}$ during forward and backward passes. Directly exports quantized kernels compatible with `bitnet.cpp` and `amv-bitnet`.
|
|
169
169
|
|
|
170
170
|
```bash
|
|
171
171
|
amv-train train \
|
|
@@ -242,7 +242,7 @@ To neutralize these constraints:
|
|
|
242
242
|
> npm install -g @ameva/cluster amv-train
|
|
243
243
|
> ```
|
|
244
244
|
|
|
245
|
-
When training deep learning models that exceed physical mobile device memory (e.g. 7B+ parameter models, high-resolution diffusion unets, or multimodal projectors),
|
|
245
|
+
When training deep learning models that exceed physical mobile device memory (e.g. 7B+ parameter models, high-resolution diffusion unets, or multimodal projectors), AMV-Train binds heterogeneous smartphone clusters into a unified virtual memory pool. Idle mobile devices contribute unallocated LPDDR RAM via lightweight worker daemons managed by AMEVA Cluster.
|
|
246
246
|
|
|
247
247
|
```
|
|
248
248
|
+-------------------------------------------------------------------------+
|
|
@@ -322,7 +322,7 @@ When passing sensitive weights and intermediate activations across untrusted Wi-
|
|
|
322
322
|
|
|
323
323
|
### Python SDK
|
|
324
324
|
```python
|
|
325
|
-
import
|
|
325
|
+
import amv_train as tt
|
|
326
326
|
|
|
327
327
|
# High-level training interface
|
|
328
328
|
trainer = tt.TermuxTrainer(
|
|
@@ -363,15 +363,15 @@ console.log(`Diffusion training completed with status: ${result.status}`);
|
|
|
363
363
|
|
|
364
364
|
## Target Runtime Compatibility & Adapter Hub
|
|
365
365
|
|
|
366
|
-
All adapters generated by
|
|
366
|
+
All adapters generated by AMV-Train are zero-conversion artifacts accompanied by a standardized `_config.json` sidecar.
|
|
367
367
|
|
|
368
368
|
| Target Runtime | Adapter Format | Companion Sidecar | Validation Status |
|
|
369
369
|
| :--- | :--- | :--- | :--- |
|
|
370
370
|
| **ComfyUI / Diffusers** | `.safetensors` (UNet CrossAttention) | `adapter_diffusion_config.json` | Validated by automated checks |
|
|
371
371
|
| **llama.cpp / GGUF** | `.safetensors` / GGUF LoRA | `adapter_llm_config.json` | Validated by automated checks |
|
|
372
|
-
| **
|
|
373
|
-
| **
|
|
374
|
-
| **
|
|
372
|
+
| **amv-vision** | `.safetensors` (Multimodal Projector) | `adapter_vision_config.json` | Validated by automated checks |
|
|
373
|
+
| **amv-stt** | `.safetensors` (Whisper Attention) | `adapter_stt_config.json` | Validated by automated checks |
|
|
374
|
+
| **amv-tts** | `.safetensors` (Speaker Style) | `adapter_tts_config.json` | Validated by automated checks |
|
|
375
375
|
| **bitnet.cpp** | `.safetensors` (Ternary 1.58-bit) | `bitnet_config.json` | Validated by automated checks |
|
|
376
376
|
|
|
377
377
|
---
|
package/README.pypi.md
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
#
|
|
1
|
+
# AMV-Train (Python)
|
|
2
2
|
|
|
3
|
-
[](https://github.com/uno-km/
|
|
3
|
+
[](https://pypi.org/project/amv-train/)
|
|
4
|
+
[](https://pypi.org/project/amv-train/)
|
|
5
|
+
[](https://github.com/uno-km/amv-train)
|
|
6
6
|
|
|
7
7
|
> Unified Multimodal On-Device Deep Learning & LoRA Training Framework for Android Termux with 6-Modality Adapters (LLM, Diffusion, VLM, STT, TTS, BitNet), GPU Slicing, and 44GB Disaggregated Cluster Virtual RAM Pooling.
|
|
8
8
|
|
|
9
9
|
## Installation
|
|
10
10
|
|
|
11
11
|
```bash
|
|
12
|
-
pip install
|
|
12
|
+
pip install amv-train
|
|
13
13
|
|
|
14
14
|
# For multi-device distributed 44GB Virtual RAM Pooling (Required):
|
|
15
15
|
pip install ameva-cluster
|
|
@@ -18,7 +18,7 @@ pip install ameva-cluster
|
|
|
18
18
|
## Python Quickstart
|
|
19
19
|
|
|
20
20
|
```python
|
|
21
|
-
import
|
|
21
|
+
import amv_train as tt
|
|
22
22
|
|
|
23
23
|
# 1. Diffusion LoRA Training
|
|
24
24
|
tt.diffusion.train_diffusion_lora(
|
|
@@ -48,10 +48,10 @@ To train models exceeding single-device physical memory across multiple Android
|
|
|
48
48
|
ameva-cluster worker --port 50052 --guard-band 300
|
|
49
49
|
|
|
50
50
|
# Step 2: Probe fleet from coordinator phone (e.g. S25)
|
|
51
|
-
|
|
51
|
+
amv-train cluster-probe --fleet 192.168.1.101:50052,192.168.1.102:50052
|
|
52
52
|
|
|
53
53
|
# Step 3: Run distributed pipeline training on aggregated 44GB virtual RAM pool
|
|
54
|
-
|
|
54
|
+
amv-train train --model tiny-transformer --data ./corpus.txt \
|
|
55
55
|
--virtual-ram-pool 192.168.1.101:50052,192.168.1.102:50052 \
|
|
56
56
|
--vocab-slice 4096 --chunk-layers 2 --backend vulkan
|
|
57
57
|
```
|
|
@@ -60,24 +60,24 @@ termux-train train --model tiny-transformer --data ./corpus.txt \
|
|
|
60
60
|
|
|
61
61
|
```bash
|
|
62
62
|
# Diffusion LoRA
|
|
63
|
-
|
|
63
|
+
amv-train diffusion-train --image-dir ./images --output ./adapter.safetensors --epochs 5
|
|
64
64
|
|
|
65
65
|
# Vision VLM LoRA
|
|
66
|
-
|
|
66
|
+
amv-train vision-train --data ./vlm.jsonl --output ./vlm_adapter.safetensors --epochs 3
|
|
67
67
|
|
|
68
68
|
# Whisper STT LoRA
|
|
69
|
-
|
|
69
|
+
amv-train stt-train --data ./audio.jsonl --output ./stt_adapter.safetensors --epochs 4
|
|
70
70
|
|
|
71
71
|
# TTS Style LoRA
|
|
72
|
-
|
|
72
|
+
amv-train tts-train --data ./speech.jsonl --output ./tts_adapter.safetensors --epochs 5
|
|
73
73
|
|
|
74
74
|
# LLM LoRA with GPU Slicing
|
|
75
|
-
|
|
75
|
+
amv-train train --model tiny-transformer --data ./corpus.txt --vocab-slice 4096 --chunk-layers 2
|
|
76
76
|
```
|
|
77
77
|
|
|
78
78
|
## Documentation & Repository
|
|
79
79
|
- Official Documentation: https://uno-km.vercel.app/lib/train/
|
|
80
|
-
- GitHub Repository: https://github.com/uno-km/
|
|
80
|
+
- GitHub Repository: https://github.com/uno-km/amv-train
|
|
81
81
|
|
|
82
82
|
## License
|
|
83
83
|
Apache-2.0 License. Copyright (c) 2026 Eunho Kim (@uno-km).
|
package/bin/cli.js
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
|
-
*
|
|
8
|
+
* amv-train: Node.js Global CLI Binary.
|
|
9
9
|
* High-performance on-device Deep Learning & LoRA Training Framework.
|
|
10
10
|
* Open-Source under Apache License 2.0.
|
|
11
11
|
*/
|
|
@@ -51,8 +51,8 @@ function hasFlag(flag, alias = null) {
|
|
|
51
51
|
}
|
|
52
52
|
|
|
53
53
|
function printHelp() {
|
|
54
|
-
console.log(`
|
|
55
|
-
console.log('Usage:
|
|
54
|
+
console.log(`amv-train CLI v${version} (Unified Node.js & Python Dual Engine)`);
|
|
55
|
+
console.log('Usage: amv-train <command> [options]\n');
|
|
56
56
|
console.log('Core Commands:');
|
|
57
57
|
console.log(' doctor Inspect device hardware, RAM tier, and Vulkan GPU');
|
|
58
58
|
console.log(' check Run self-diagnostic mathematical checks across backends');
|
|
@@ -87,7 +87,7 @@ function printHelp() {
|
|
|
87
87
|
|
|
88
88
|
async function main() {
|
|
89
89
|
if (hasFlag('-v') || hasFlag('--version')) {
|
|
90
|
-
console.log(`
|
|
90
|
+
console.log(`amv-train ${version}`);
|
|
91
91
|
process.exit(0);
|
|
92
92
|
}
|
|
93
93
|
|
|
@@ -103,10 +103,10 @@ async function main() {
|
|
|
103
103
|
if (isJson) {
|
|
104
104
|
console.log(JSON.stringify(rep, null, 2));
|
|
105
105
|
} else {
|
|
106
|
-
console.log('===
|
|
106
|
+
console.log('=== amv-train Diagnostic Doctor (Node.js Engine) ===');
|
|
107
107
|
console.log(` Platform : ${rep.platform.system} (${rep.platform.arch}) | Android/Termux: ${rep.platform.isAndroid || rep.platform.isTermux}`);
|
|
108
108
|
console.log(` Hardware Tier : ${rep.hardware.tier} (RAM: ${rep.hardware.totalRamMb}MB | Cores: ${rep.hardware.cpuCores})`);
|
|
109
|
-
console.log(` Python Runtime : ${rep.python.available ? rep.python.version : 'NOT FOUND'} (${rep.python.moduleInstalled ? '
|
|
109
|
+
console.log(` Python Runtime : ${rep.python.available ? rep.python.version : 'NOT FOUND'} (${rep.python.moduleInstalled ? 'amv_train installed' : 'module missing'})`);
|
|
110
110
|
console.log(` Vulkan GPU : ${rep.vulkan.status}`);
|
|
111
111
|
console.log(` Preset Config : Max LoRA Rank r=${rep.recommendedTrainingConfig.loraRank} | Batch Size=${rep.recommendedTrainingConfig.batchSize}`);
|
|
112
112
|
console.log(` Overall Status : ${rep.status}`);
|
|
@@ -122,7 +122,7 @@ async function main() {
|
|
|
122
122
|
if (isJson) {
|
|
123
123
|
console.log(JSON.stringify(res, null, 2));
|
|
124
124
|
} else {
|
|
125
|
-
console.log(`===
|
|
125
|
+
console.log(`=== amv-train Benchmark (Dimension: ${res.dimension}) ===`);
|
|
126
126
|
console.log(` Backend : ${res.backend}`);
|
|
127
127
|
console.log(` Forward GEMM Latency : ${res.gemmLatencyMs} ms`);
|
|
128
128
|
console.log(` Full Autograd Step (F+B) : ${res.autogradStepLatencyMs} ms`);
|
|
@@ -208,7 +208,7 @@ async function main() {
|
|
|
208
208
|
console.error('[ERROR] Python runtime is required to execute native training pipelines.');
|
|
209
209
|
process.exit(1);
|
|
210
210
|
}
|
|
211
|
-
const pyArgs = ['-m', '
|
|
211
|
+
const pyArgs = ['-m', 'amv_train.cli', ...args];
|
|
212
212
|
const res = spawnSync(pyCmd, pyArgs, { stdio: 'inherit' });
|
|
213
213
|
process.exit(res.status || 0);
|
|
214
214
|
}
|
package/index.d.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* SPDX-License-Identifier: Apache-2.0 OR Commercial-License
|
|
4
4
|
*/
|
|
5
5
|
/**
|
|
6
|
-
* Type declarations for
|
|
6
|
+
* Type declarations for amv-train Node.js SDK
|
|
7
7
|
* Open-Source under Apache License 2.0.
|
|
8
8
|
*/
|
|
9
9
|
|
|
@@ -46,7 +46,7 @@ export interface RecommendedTrainingConfig {
|
|
|
46
46
|
}
|
|
47
47
|
|
|
48
48
|
export interface DoctorReport {
|
|
49
|
-
framework: '
|
|
49
|
+
framework: 'amv-train';
|
|
50
50
|
version: string;
|
|
51
51
|
platform: DoctorPlatformInfo;
|
|
52
52
|
hardware: DoctorHardwareInfo;
|
package/index.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* SPDX-License-Identifier: Apache-2.0 OR Commercial-License
|
|
4
4
|
*/
|
|
5
5
|
/**
|
|
6
|
-
*
|
|
6
|
+
* amv-train: Native On-Device Deep Learning & LoRA Training Framework
|
|
7
7
|
* Dual-Engine (Python & Node.js/TypeScript) Native Module for Android Termux & ARM64.
|
|
8
8
|
* Open-Source under Apache License 2.0.
|
|
9
9
|
*/
|
package/lib/benchmark.js
CHANGED
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
* SPDX-License-Identifier: Apache-2.0 OR Commercial-License
|
|
4
4
|
*/
|
|
5
5
|
/**
|
|
6
|
-
*
|
|
6
|
+
* amv-train: Benchmark Suite
|
|
7
7
|
* High-performance GEMM & DAG Autograd Latency & Throughput Benchmark.
|
|
8
|
-
* All benchmark execution uses stdin JSON IPC via
|
|
8
|
+
* All benchmark execution uses stdin JSON IPC via amv_train.runtime.benchmarker
|
|
9
9
|
* — zero python -c inline script injection.
|
|
10
10
|
* Open-Source under Apache License 2.0.
|
|
11
11
|
*/
|
|
@@ -45,7 +45,7 @@ async function runBenchmarkAsync(options = {}) {
|
|
|
45
45
|
const cfg = JSON.stringify({ dim, iters });
|
|
46
46
|
|
|
47
47
|
return new Promise((resolve, reject) => {
|
|
48
|
-
const proc = spawn(pyCmd, ['-m', '
|
|
48
|
+
const proc = spawn(pyCmd, ['-m', 'amv_train.runtime.benchmarker', '--stdin-json'], {
|
|
49
49
|
stdio: ['pipe', 'pipe', 'pipe']
|
|
50
50
|
});
|
|
51
51
|
|
|
@@ -60,7 +60,7 @@ async function runBenchmarkAsync(options = {}) {
|
|
|
60
60
|
|
|
61
61
|
proc.on('close', (code) => {
|
|
62
62
|
if (code !== 0) {
|
|
63
|
-
if (stderrAcc.includes('No module named
|
|
63
|
+
if (stderrAcc.includes('No module named amv_train')) {
|
|
64
64
|
return reject(new TermuxTrainModuleNotFoundError());
|
|
65
65
|
}
|
|
66
66
|
return reject(new Error(`Benchmark process failed (exit code ${code}): ${stderrAcc}`));
|
|
@@ -90,7 +90,7 @@ function runBenchmark(options = {}) {
|
|
|
90
90
|
|
|
91
91
|
const cfg = JSON.stringify({ dim, iters });
|
|
92
92
|
|
|
93
|
-
const res = spawnSync(pyCmd, ['-m', '
|
|
93
|
+
const res = spawnSync(pyCmd, ['-m', 'amv_train.runtime.benchmarker', '--stdin-json'], {
|
|
94
94
|
input: cfg,
|
|
95
95
|
stdio: ['pipe', 'pipe', 'pipe'],
|
|
96
96
|
encoding: 'utf-8'
|
|
@@ -98,7 +98,7 @@ function runBenchmark(options = {}) {
|
|
|
98
98
|
|
|
99
99
|
if (res.status !== 0) {
|
|
100
100
|
const err = res.stderr || res.stdout || '';
|
|
101
|
-
if (err.includes('No module named
|
|
101
|
+
if (err.includes('No module named amv_train')) {
|
|
102
102
|
throw new TermuxTrainModuleNotFoundError();
|
|
103
103
|
}
|
|
104
104
|
throw new Error(`Benchmark failed: ${err}`);
|
package/lib/doctor.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* SPDX-License-Identifier: Apache-2.0 OR Commercial-License
|
|
4
4
|
*/
|
|
5
5
|
/**
|
|
6
|
-
*
|
|
6
|
+
* amv-train: Hardware & Training Capacity Diagnostic Doctor
|
|
7
7
|
* Production-grade heuristics with free RAM safety margin calculation.
|
|
8
8
|
* Open-Source under Apache License 2.0.
|
|
9
9
|
*/
|
|
@@ -96,7 +96,7 @@ function runDoctor(options = {}) {
|
|
|
96
96
|
|
|
97
97
|
const checkMod = spawnSync(
|
|
98
98
|
pyCmd,
|
|
99
|
-
['-c', 'import
|
|
99
|
+
['-c', 'import amv_train as tt; b = tt.get_backend("vulkan") if "vulkan" in tt.available_backends() else None; print(getattr(b, "is_vulkan_active", False))'],
|
|
100
100
|
{ stdio: 'pipe', encoding: 'utf-8' }
|
|
101
101
|
);
|
|
102
102
|
if (!checkMod.error && checkMod.status === 0) {
|
|
@@ -107,7 +107,7 @@ function runDoctor(options = {}) {
|
|
|
107
107
|
}
|
|
108
108
|
|
|
109
109
|
return {
|
|
110
|
-
framework: '
|
|
110
|
+
framework: 'amv-train',
|
|
111
111
|
version: require('../package.json').version,
|
|
112
112
|
platform: {
|
|
113
113
|
system: process.platform,
|
package/lib/errors.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* SPDX-License-Identifier: Apache-2.0 OR Commercial-License
|
|
4
4
|
*/
|
|
5
5
|
/**
|
|
6
|
-
*
|
|
6
|
+
* amv-train: Standard Error Definitions
|
|
7
7
|
* Open-Source under Apache License 2.0.
|
|
8
8
|
*/
|
|
9
9
|
|
|
@@ -24,7 +24,7 @@ class PythonRuntimeNotFoundError extends TermuxTrainError {
|
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
class TermuxTrainModuleNotFoundError extends TermuxTrainError {
|
|
27
|
-
constructor(msg = '
|
|
27
|
+
constructor(msg = 'amv_train Python module is not installed or importable. Run "pip install amv-train".') {
|
|
28
28
|
super(msg);
|
|
29
29
|
}
|
|
30
30
|
}
|
package/lib/multimodal.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* SPDX-License-Identifier: Apache-2.0 OR Commercial-License
|
|
4
4
|
*/
|
|
5
5
|
/**
|
|
6
|
-
*
|
|
6
|
+
* amv-train: Multimodal & Distributed Training Node.js Bridge
|
|
7
7
|
* Provides asynchronous JavaScript SDK bindings for Diffusion, Vision VLM,
|
|
8
8
|
* Whisper STT, TTS Speaker Adaptation, and Cluster Orchestration.
|
|
9
9
|
* Open-Source under Apache License 2.0.
|
|
@@ -22,7 +22,7 @@ function _executePythonCli(subcommand, optArgs = {}) {
|
|
|
22
22
|
return reject(new PythonRuntimeNotFoundError('Python runtime required for multimodal training execution.'));
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
-
const cliArgs = ['-m', '
|
|
25
|
+
const cliArgs = ['-m', 'amv_train.cli', subcommand];
|
|
26
26
|
for (const [k, v] of Object.entries(optArgs)) {
|
|
27
27
|
if (v === null || v === undefined) continue;
|
|
28
28
|
const flagName = k.replace(/([A-Z])/g, '-$1').toLowerCase();
|
package/lib/trainer.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* SPDX-License-Identifier: Apache-2.0 OR Commercial-License
|
|
4
4
|
*/
|
|
5
5
|
/**
|
|
6
|
-
*
|
|
6
|
+
* amv-train: Production-Grade On-Device Training Orchestrator
|
|
7
7
|
* True Dual-Engine LoRA, Transformer & MLP Training Pipeline with SafeTensors I/O.
|
|
8
8
|
* Open-Source under Apache License 2.0.
|
|
9
9
|
*/
|
|
@@ -192,7 +192,7 @@ class TermuxTrainer extends EventEmitter {
|
|
|
192
192
|
this._lineBuffer = '';
|
|
193
193
|
this._stoppedEmitted = false;
|
|
194
194
|
|
|
195
|
-
this.process = spawn(pyCmd, ['-m', '
|
|
195
|
+
this.process = spawn(pyCmd, ['-m', 'amv_train.runtime.runner', '--stdin-json'], {
|
|
196
196
|
stdio: ['pipe', 'pipe', 'pipe']
|
|
197
197
|
});
|
|
198
198
|
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "amv-train",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0",
|
|
4
4
|
"description": "On-device deep learning & LoRA training framework utilizing device resources for Android Termux & ARM64",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"types": "index.d.ts",
|
|
7
7
|
"bin": {
|
|
8
|
-
"
|
|
8
|
+
"amv-train": "bin/cli.js",
|
|
9
9
|
"tt": "bin/cli.js"
|
|
10
10
|
},
|
|
11
11
|
"files": [
|
|
@@ -42,10 +42,10 @@
|
|
|
42
42
|
"homepage": "https://uno-km.vercel.app/lib/train/",
|
|
43
43
|
"repository": {
|
|
44
44
|
"type": "git",
|
|
45
|
-
"url": "git+https://github.com/uno-km/
|
|
45
|
+
"url": "git+https://github.com/uno-km/amv-train.git"
|
|
46
46
|
},
|
|
47
47
|
"bugs": {
|
|
48
|
-
"url": "https://github.com/uno-km/
|
|
48
|
+
"url": "https://github.com/uno-km/amv-train/issues"
|
|
49
49
|
},
|
|
50
50
|
"dependencies": {},
|
|
51
51
|
"optionalDependencies": {
|