@tuned-tensor/cli 0.15.1 → 0.16.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/README.md +103 -42
- package/dist/{chunk-VVKC563R.js → chunk-6RLNBTM6.js} +368 -98
- package/dist/chunk-6RLNBTM6.js.map +1 -0
- package/dist/index.js +52 -140
- package/dist/index.js.map +1 -1
- package/dist/local-runtime.js +143 -32
- package/dist/local-runtime.js.map +1 -1
- package/docs/local-runtime/architecture.md +17 -6
- package/docs/local-runtime/aws-gpu.md +131 -0
- package/docs/local-runtime/foundation-long-runs.md +21 -5
- package/docs/local-runtime/serving.md +11 -1
- package/examples/local-runtime/aws-runner.json +13 -0
- package/package.json +4 -4
- package/training/adapter/src/foundation_export.py +81 -0
- package/training/adapter/src/serve.py +12 -5
- package/training/adapter/src/train.py +4 -0
- package/training/foundation/pyproject.toml +4 -0
- package/training/foundation/src/model.py +2 -0
- package/training/foundation/uv.lock +225 -0
- package/dist/chunk-VVKC563R.js.map +0 -1
package/README.md
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
# tt - Tuned Tensor CLI
|
|
2
2
|
|
|
3
|
-
`tt` is the local agent and CLI for Tuned Tensor.
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
`tt` is the local agent and CLI for Tuned Tensor. Develop and orchestrate one
|
|
4
|
+
training workflow locally, using a local NVIDIA GPU or an existing GPU instance
|
|
5
|
+
in your AWS account. Inspect the resulting artifacts and metrics locally, and
|
|
6
|
+
optionally publish run evidence to the web dashboard.
|
|
7
7
|
|
|
8
8
|
Local training, evaluation, inspection, and serving need no TT access token.
|
|
9
9
|
Agent inference is a separate choice:
|
|
@@ -17,16 +17,22 @@ Agent inference is a separate choice:
|
|
|
17
17
|
|
|
18
18
|
A saved BYO selection stays selected after TT login. Switch back with
|
|
19
19
|
`tt agent configure --provider tunedtensor` or `/model tunedtensor/managed`.
|
|
20
|
-
Inference choice is independent of
|
|
21
|
-
|
|
20
|
+
Inference choice is independent of where training uses a GPU. Your AWS GPU
|
|
21
|
+
needs AWS credentials and SSH access; TT account operations under `tt cloud`
|
|
22
|
+
require a TT access token.
|
|
22
23
|
|
|
23
24
|
## Unified commands
|
|
24
25
|
|
|
25
26
|
Local workflows remain the default: `tt pipeline run`, `tt runs list`,
|
|
26
|
-
`tt models list`, and `tt serve`.
|
|
27
|
-
|
|
27
|
+
`tt models list`, and `tt serve`. GPU processes can use an existing instance in
|
|
28
|
+
your AWS account through [`gpu` configuration](docs/local-runtime/aws-gpu.md).
|
|
29
|
+
`tt cloud runs list` and
|
|
30
|
+
`tt cloud models list` access existing account records.
|
|
28
31
|
`tt usage` reports managed agent allowance and usage; `tt balance` reports
|
|
29
|
-
|
|
32
|
+
TT credits for hosted labeling and historical training charges, which do not
|
|
33
|
+
pay for your AWS instance.
|
|
34
|
+
`tt publish` uploads local run evidence to the dashboard. Hosted training
|
|
35
|
+
submission (`tt cloud runs start` and `estimate`) is retired.
|
|
30
36
|
|
|
31
37
|
TT includes the former TT Local runtime. `tt local …` and `tt run` remain
|
|
32
38
|
hidden compatibility aliases; new scripts should use root commands and
|
|
@@ -64,9 +70,11 @@ tt --version
|
|
|
64
70
|
Uninstall with `npm uninstall -g @tuned-tensor/cli` (add
|
|
65
71
|
`--prefix ~/.local` if the curl installer used that prefix).
|
|
66
72
|
|
|
67
|
-
Node.js 22.19.0 or newer is required.
|
|
68
|
-
[`uv`](https://docs.astral.sh/uv/) and a supported NVIDIA CUDA host
|
|
69
|
-
|
|
73
|
+
Node.js 22.19.0 or newer is required. Training additionally needs
|
|
74
|
+
[`uv`](https://docs.astral.sh/uv/) locally and a supported NVIDIA CUDA host,
|
|
75
|
+
either local or [in your AWS account](docs/local-runtime/aws-gpu.md). The laptop
|
|
76
|
+
does not need a GPU when `gpu` is configured. The locked Python runner ships
|
|
77
|
+
with the npm package and is prepared on first use.
|
|
70
78
|
|
|
71
79
|
Run from source:
|
|
72
80
|
|
|
@@ -231,9 +239,10 @@ explicitly.
|
|
|
231
239
|
|
|
232
240
|
## Composable pipelines (v1)
|
|
233
241
|
|
|
234
|
-
A pipeline is an ordered JSON recipe.
|
|
235
|
-
|
|
236
|
-
|
|
242
|
+
A pipeline is an ordered JSON recipe. The CLI orchestrates every plan locally;
|
|
243
|
+
optional `gpu` configuration moves its GPU processes to your AWS instance.
|
|
244
|
+
The portable document contract lives in `@tuned-tensor/pipeline-contract`. The
|
|
245
|
+
CLI adds execution planning (step selection) on top of it.
|
|
237
246
|
|
|
238
247
|
Two local engines share that document version:
|
|
239
248
|
|
|
@@ -283,8 +292,9 @@ When `--config` is omitted, `pipeline run` uses `local-runner.json` beside the
|
|
|
283
292
|
selected spec when that file exists.
|
|
284
293
|
|
|
285
294
|
`--only` and `--skip` preserve dependency safety: a selected step cannot refer
|
|
286
|
-
to an omitted predecessor.
|
|
287
|
-
|
|
295
|
+
to an omitted predecessor. Keep step targets local and configure `gpu` in
|
|
296
|
+
`local-runner.json` to execute GPU work on your AWS instance. Adapter and
|
|
297
|
+
foundation workflows use the same local pipeline. The TT agent may describe,
|
|
288
298
|
validate, and prepare a sealed pipeline action; only deterministic `/approve`
|
|
289
299
|
handling can execute it.
|
|
290
300
|
|
|
@@ -304,8 +314,6 @@ selection continues to work while you operate cloud runs with that token.
|
|
|
304
314
|
```bash
|
|
305
315
|
tt auth login
|
|
306
316
|
tt cloud push --file tunedtensor.json
|
|
307
|
-
tt cloud runs estimate <spec-id>
|
|
308
|
-
tt cloud runs start <spec-id>
|
|
309
317
|
tt cloud runs watch <run-id>
|
|
310
318
|
tt cloud runs report <run-id>
|
|
311
319
|
tt cloud runs list
|
|
@@ -314,19 +322,18 @@ tt usage
|
|
|
314
322
|
tt balance
|
|
315
323
|
```
|
|
316
324
|
|
|
317
|
-
|
|
325
|
+
`tt cloud specs`, `tt cloud datasets`,
|
|
318
326
|
`tt cloud label`, and `tt cloud models` expose the corresponding account
|
|
319
|
-
operations; each command's `--help` documents its arguments.
|
|
320
|
-
|
|
321
|
-
`tt
|
|
327
|
+
operations; each command's `--help` documents its arguments. Hosted training
|
|
328
|
+
submission is retired. Use [your AWS GPU](docs/local-runtime/aws-gpu.md) with
|
|
329
|
+
`tt pipeline run`; historical cloud reports remain accessible.
|
|
322
330
|
|
|
323
331
|
With a TT token, the local agent can inspect cloud resources, run reports,
|
|
324
332
|
balances, transactions, and managed usage. It can prepare cloud spec edits for
|
|
325
333
|
`/approve`. Those proposals show the API origin and remain bound to the token
|
|
326
334
|
and origin used during preparation. After changing either, return to the
|
|
327
|
-
original account and origin or prepare a new proposal.
|
|
328
|
-
|
|
329
|
-
CLI command. Without a TT token these account tools are unavailable, while
|
|
335
|
+
original account and origin or prepare a new proposal. Cancelling older
|
|
336
|
+
hosted runs remains an explicit CLI command. Without a TT token these account tools are unavailable, while
|
|
330
337
|
local workflow commands and BYO inference continue to work.
|
|
331
338
|
|
|
332
339
|
`tt usage` reports the server-configured daily managed inference allowance.
|
|
@@ -334,8 +341,9 @@ Each provider completion, including a tool follow-up, consumes one request;
|
|
|
334
341
|
failed and cancelled requests also count. Token/cost coverage shows which
|
|
335
342
|
requests have provider usage reports, so incomplete reporting is not mistaken
|
|
336
343
|
for zero consumption. The displayed provider cost is informational, not a
|
|
337
|
-
charge to
|
|
338
|
-
|
|
344
|
+
charge to TT credits. BYO provider usage is separate. `tt balance` shows TT
|
|
345
|
+
credits for hosted labeling and historical training charges, plus recent
|
|
346
|
+
transactions; `tt topup` opens checkout.
|
|
339
347
|
|
|
340
348
|
Publish a local report for review in the dashboard:
|
|
341
349
|
|
|
@@ -353,35 +361,60 @@ Use `--json` with reporting commands for scripts. `TUNED_TENSOR_URL` or
|
|
|
353
361
|
|
|
354
362
|
## Quick start
|
|
355
363
|
|
|
356
|
-
Create a
|
|
364
|
+
Create a project on your development machine:
|
|
357
365
|
|
|
358
366
|
```bash
|
|
359
367
|
mkdir support-adapter && cd support-adapter
|
|
360
|
-
tt hardware
|
|
361
368
|
tt init \
|
|
362
369
|
--name "Support Adapter" \
|
|
363
|
-
--model Qwen/Qwen3.5-2B
|
|
364
|
-
--profile spark
|
|
370
|
+
--model Qwen/Qwen3.5-2B
|
|
365
371
|
```
|
|
366
372
|
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
373
|
+
Edit the generated `tunedtensor.json`, replacing both placeholder examples.
|
|
374
|
+
For a local GPU, `tt hardware` reports this machine's training and serving
|
|
375
|
+
capacity. For an AWS GPU, save the following as `local-runner.json` beside the
|
|
376
|
+
spec, replacing the instance, region, profile and SSH settings with your own:
|
|
377
|
+
|
|
378
|
+
```json
|
|
379
|
+
{
|
|
380
|
+
"gpu": {
|
|
381
|
+
"provider": "aws",
|
|
382
|
+
"profile": "research",
|
|
383
|
+
"region": "eu-west-1",
|
|
384
|
+
"instanceId": "i-0123456789abcdef0",
|
|
385
|
+
"user": "ubuntu",
|
|
386
|
+
"identityFile": "~/.ssh/research-gpu.pem"
|
|
387
|
+
}
|
|
388
|
+
}
|
|
389
|
+
```
|
|
390
|
+
|
|
391
|
+
The instance must already be running and reachable over SSH. See
|
|
392
|
+
[AWS GPU setup](docs/local-runtime/aws-gpu.md) for prerequisites, authentication,
|
|
393
|
+
transfer behavior and recovery. `tt hardware` always inspects the machine
|
|
394
|
+
running the CLI; `tt doctor` uses `gpu` to check the remote runtime.
|
|
395
|
+
Then validate, prefetch the base model locally, preview, and run:
|
|
371
396
|
|
|
372
397
|
```bash
|
|
373
|
-
tt doctor tunedtensor.json
|
|
374
398
|
tt validate tunedtensor.json
|
|
375
399
|
tt models prefetch tunedtensor.json
|
|
400
|
+
tt doctor tunedtensor.json
|
|
401
|
+
tt pipeline run --spec tunedtensor.json --dry-run
|
|
376
402
|
tt pipeline run --spec tunedtensor.json
|
|
377
403
|
```
|
|
378
404
|
|
|
379
|
-
|
|
405
|
+
These commands discover the adjacent `local-runner.json`. The preview needs
|
|
406
|
+
no GPU or AWS connection. Results return to the local run and model stores:
|
|
380
407
|
|
|
381
408
|
```bash
|
|
382
409
|
tt runs report <run-id>
|
|
383
410
|
tt models verify local-<run-id>
|
|
384
|
-
|
|
411
|
+
```
|
|
412
|
+
|
|
413
|
+
Serving still runs on the machine executing `tt serve` and requires a local
|
|
414
|
+
Linux/CUDA GPU, even when training used AWS:
|
|
415
|
+
|
|
416
|
+
```bash
|
|
417
|
+
tt serve local-<run-id>
|
|
385
418
|
```
|
|
386
419
|
|
|
387
420
|
Local currently certifies text SFT with `Qwen/Qwen3.5-2B` (pinned to snapshot
|
|
@@ -393,8 +426,9 @@ checkpointing, and adapts bounded shared attention/Mamba projections rather
|
|
|
393
426
|
than every routed expert matrix. Muse Glimmer is a vision-language checkpoint
|
|
394
427
|
whose text tower is fine-tuned through the image-text-to-text loader with the
|
|
395
428
|
vision tower frozen and unused. Evaluation may use CPU; packaged local
|
|
396
|
-
serving requires Linux and NVIDIA CUDA.
|
|
397
|
-
|
|
429
|
+
serving requires Linux and NVIDIA CUDA. AWS execution transfers the required
|
|
430
|
+
datasets and model files to your instance and returns outputs locally; normal
|
|
431
|
+
cleanup removes the remote staging directory.
|
|
398
432
|
|
|
399
433
|
Activation is optional and requires the run to pass a configured
|
|
400
434
|
`generalRegression` gate. Without that suite, `tt models activate` fails
|
|
@@ -411,6 +445,33 @@ exports isolated Pi configuration; tools no longer need to be disabled. See
|
|
|
411
445
|
[Local serving and coding harnesses](docs/local-runtime/serving.md) for Pi/OpenCode
|
|
412
446
|
setup, resource budgets, hardware limits, and the verified integration scope.
|
|
413
447
|
|
|
448
|
+
### Serve a foundation checkpoint
|
|
449
|
+
|
|
450
|
+
Serve a completed pretrain, fine-tune, or RL model directory with its training tokenizer:
|
|
451
|
+
|
|
452
|
+
```sh
|
|
453
|
+
tt serve foundation --checkpoint /path/to/run/pretrain/output --tokenizer /path/to/run/tokenize/output/tokenizer.json
|
|
454
|
+
```
|
|
455
|
+
|
|
456
|
+
Use the model artifact directory containing `config.json` and `model.safetensors`,
|
|
457
|
+
not a resumable optimizer checkpoint. The API model name is `foundation`.
|
|
458
|
+
`--spec tunedtensor.json` applies a foundation spec's system prompt. Existing
|
|
459
|
+
port, authentication, sampling, streaming, and client configuration options apply.
|
|
460
|
+
The context limit defaults to the checkpoint's `sequence_length`; a smaller
|
|
461
|
+
`--context-length` is allowed. Foundation serving supports text completions and
|
|
462
|
+
chat with system/user/assistant messages, without tool-call parsing.
|
|
463
|
+
|
|
464
|
+
TT exports the weights and tokenizer to a temporary GPT-2 snapshot and uses the
|
|
465
|
+
existing pinned vLLM server on Linux/CUDA. Training artifacts are unchanged; the
|
|
466
|
+
temporary export is removed when the server exits. Export requires temporary
|
|
467
|
+
disk space for a copy of the model weights.
|
|
468
|
+
|
|
469
|
+
Export parity tests run on CPU as part of `npm test`. To run them directly:
|
|
470
|
+
|
|
471
|
+
```sh
|
|
472
|
+
uv run --frozen --project training/foundation --group test python -m unittest discover -s training/foundation/tests -p test_foundation_export.py
|
|
473
|
+
```
|
|
474
|
+
|
|
414
475
|
Useful discovery commands:
|
|
415
476
|
|
|
416
477
|
```bash
|
|
@@ -436,7 +497,7 @@ npm run test:workflows # Focused product workflow regressions; no model key or
|
|
|
436
497
|
npm run check # Typecheck, all tests, and build (the release gate)
|
|
437
498
|
```
|
|
438
499
|
|
|
439
|
-
See [
|
|
500
|
+
See [testing and workflow contracts](docs/testing.md) for what the
|
|
440
501
|
suite guarantees, how to evaluate a real agent with `npm run eval:agent`, and
|
|
441
502
|
the remaining steps toward the full conversational product promise.
|
|
442
503
|
|