@tuned-tensor/cli 0.15.0 → 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 +110 -42
- package/dist/{chunk-YGN26POJ.js → chunk-6RLNBTM6.js} +377 -99
- package/dist/chunk-6RLNBTM6.js.map +1 -0
- package/dist/index.js +58 -142
- 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 +9 -6
- 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-YGN26POJ.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
|
|
|
@@ -99,7 +107,8 @@ tt
|
|
|
99
107
|
Get a token from the dashboard's **Settings → API Keys** page. You can also
|
|
100
108
|
set `TUNED_TENSOR_API_KEY` in CI. When there is no saved BYO selection, TT
|
|
101
109
|
selects `tunedtensor/managed` automatically. In the shell, `/login tunedtensor`
|
|
102
|
-
saves the same account token
|
|
110
|
+
saves the same account token and switches the saved agent selection to
|
|
111
|
+
`tunedtensor/managed`, including after restart. Managed inference requires no OpenRouter key
|
|
103
112
|
or additional login. The server controls the model and request limits.
|
|
104
113
|
`tt usage` shows the configured daily allowance and reported usage.
|
|
105
114
|
|
|
@@ -230,9 +239,10 @@ explicitly.
|
|
|
230
239
|
|
|
231
240
|
## Composable pipelines (v1)
|
|
232
241
|
|
|
233
|
-
A pipeline is an ordered JSON recipe.
|
|
234
|
-
|
|
235
|
-
|
|
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.
|
|
236
246
|
|
|
237
247
|
Two local engines share that document version:
|
|
238
248
|
|
|
@@ -282,8 +292,9 @@ When `--config` is omitted, `pipeline run` uses `local-runner.json` beside the
|
|
|
282
292
|
selected spec when that file exists.
|
|
283
293
|
|
|
284
294
|
`--only` and `--skip` preserve dependency safety: a selected step cannot refer
|
|
285
|
-
to an omitted predecessor.
|
|
286
|
-
|
|
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,
|
|
287
298
|
validate, and prepare a sealed pipeline action; only deterministic `/approve`
|
|
288
299
|
handling can execute it.
|
|
289
300
|
|
|
@@ -303,8 +314,6 @@ selection continues to work while you operate cloud runs with that token.
|
|
|
303
314
|
```bash
|
|
304
315
|
tt auth login
|
|
305
316
|
tt cloud push --file tunedtensor.json
|
|
306
|
-
tt cloud runs estimate <spec-id>
|
|
307
|
-
tt cloud runs start <spec-id>
|
|
308
317
|
tt cloud runs watch <run-id>
|
|
309
318
|
tt cloud runs report <run-id>
|
|
310
319
|
tt cloud runs list
|
|
@@ -313,19 +322,18 @@ tt usage
|
|
|
313
322
|
tt balance
|
|
314
323
|
```
|
|
315
324
|
|
|
316
|
-
|
|
325
|
+
`tt cloud specs`, `tt cloud datasets`,
|
|
317
326
|
`tt cloud label`, and `tt cloud models` expose the corresponding account
|
|
318
|
-
operations; each command's `--help` documents its arguments.
|
|
319
|
-
|
|
320
|
-
`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.
|
|
321
330
|
|
|
322
331
|
With a TT token, the local agent can inspect cloud resources, run reports,
|
|
323
332
|
balances, transactions, and managed usage. It can prepare cloud spec edits for
|
|
324
333
|
`/approve`. Those proposals show the API origin and remain bound to the token
|
|
325
334
|
and origin used during preparation. After changing either, return to the
|
|
326
|
-
original account and origin or prepare a new proposal.
|
|
327
|
-
|
|
328
|
-
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
|
|
329
337
|
local workflow commands and BYO inference continue to work.
|
|
330
338
|
|
|
331
339
|
`tt usage` reports the server-configured daily managed inference allowance.
|
|
@@ -333,8 +341,9 @@ Each provider completion, including a tool follow-up, consumes one request;
|
|
|
333
341
|
failed and cancelled requests also count. Token/cost coverage shows which
|
|
334
342
|
requests have provider usage reports, so incomplete reporting is not mistaken
|
|
335
343
|
for zero consumption. The displayed provider cost is informational, not a
|
|
336
|
-
charge to
|
|
337
|
-
|
|
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.
|
|
338
347
|
|
|
339
348
|
Publish a local report for review in the dashboard:
|
|
340
349
|
|
|
@@ -352,35 +361,60 @@ Use `--json` with reporting commands for scripts. `TUNED_TENSOR_URL` or
|
|
|
352
361
|
|
|
353
362
|
## Quick start
|
|
354
363
|
|
|
355
|
-
Create a
|
|
364
|
+
Create a project on your development machine:
|
|
356
365
|
|
|
357
366
|
```bash
|
|
358
367
|
mkdir support-adapter && cd support-adapter
|
|
359
|
-
tt hardware
|
|
360
368
|
tt init \
|
|
361
369
|
--name "Support Adapter" \
|
|
362
|
-
--model Qwen/Qwen3.5-2B
|
|
363
|
-
--profile spark
|
|
370
|
+
--model Qwen/Qwen3.5-2B
|
|
364
371
|
```
|
|
365
372
|
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
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:
|
|
370
396
|
|
|
371
397
|
```bash
|
|
372
|
-
tt doctor tunedtensor.json
|
|
373
398
|
tt validate tunedtensor.json
|
|
374
399
|
tt models prefetch tunedtensor.json
|
|
400
|
+
tt doctor tunedtensor.json
|
|
401
|
+
tt pipeline run --spec tunedtensor.json --dry-run
|
|
375
402
|
tt pipeline run --spec tunedtensor.json
|
|
376
403
|
```
|
|
377
404
|
|
|
378
|
-
|
|
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:
|
|
379
407
|
|
|
380
408
|
```bash
|
|
381
409
|
tt runs report <run-id>
|
|
382
410
|
tt models verify local-<run-id>
|
|
383
|
-
|
|
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>
|
|
384
418
|
```
|
|
385
419
|
|
|
386
420
|
Local currently certifies text SFT with `Qwen/Qwen3.5-2B` (pinned to snapshot
|
|
@@ -392,8 +426,9 @@ checkpointing, and adapts bounded shared attention/Mamba projections rather
|
|
|
392
426
|
than every routed expert matrix. Muse Glimmer is a vision-language checkpoint
|
|
393
427
|
whose text tower is fine-tuned through the image-text-to-text loader with the
|
|
394
428
|
vision tower frozen and unused. Evaluation may use CPU; packaged local
|
|
395
|
-
serving requires Linux and NVIDIA CUDA.
|
|
396
|
-
|
|
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.
|
|
397
432
|
|
|
398
433
|
Activation is optional and requires the run to pass a configured
|
|
399
434
|
`generalRegression` gate. Without that suite, `tt models activate` fails
|
|
@@ -410,6 +445,33 @@ exports isolated Pi configuration; tools no longer need to be disabled. See
|
|
|
410
445
|
[Local serving and coding harnesses](docs/local-runtime/serving.md) for Pi/OpenCode
|
|
411
446
|
setup, resource budgets, hardware limits, and the verified integration scope.
|
|
412
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
|
+
|
|
413
475
|
Useful discovery commands:
|
|
414
476
|
|
|
415
477
|
```bash
|
|
@@ -431,8 +493,14 @@ npm run build
|
|
|
431
493
|
npm run dev
|
|
432
494
|
npm run typecheck
|
|
433
495
|
npm test
|
|
496
|
+
npm run test:workflows # Focused product workflow regressions; no model key or GPU
|
|
497
|
+
npm run check # Typecheck, all tests, and build (the release gate)
|
|
434
498
|
```
|
|
435
499
|
|
|
500
|
+
See [testing and workflow contracts](docs/testing.md) for what the
|
|
501
|
+
suite guarantees, how to evaluate a real agent with `npm run eval:agent`, and
|
|
502
|
+
the remaining steps toward the full conversational product promise.
|
|
503
|
+
|
|
436
504
|
## License
|
|
437
505
|
|
|
438
506
|
Apache-2.0
|