@tuned-tensor/cli 0.14.0 → 0.15.1
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 +154 -69
- package/dist/{chunk-VRDDO2FP.js → chunk-VVKC563R.js} +12 -4
- package/dist/chunk-VVKC563R.js.map +1 -0
- package/dist/index.js +4408 -200
- package/dist/index.js.map +1 -1
- package/dist/local-runtime.js +10 -10
- package/dist/local-runtime.js.map +1 -1
- package/docs/local-runtime/architecture.md +11 -7
- package/docs/local-runtime/serving.md +8 -5
- package/docs/local-runtime/spark.md +4 -2
- package/package.json +6 -3
- package/training/adapter/src/model_contract.py +1 -1
- package/training/adapter/src/prefetch.py +1 -1
- package/training/adapter/src/train.py +2 -2
- package/dist/chunk-VRDDO2FP.js.map +0 -1
package/README.md
CHANGED
|
@@ -1,35 +1,38 @@
|
|
|
1
1
|
# tt - Tuned Tensor CLI
|
|
2
2
|
|
|
3
|
-
`tt` is
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
3
|
+
`tt` is the local agent and CLI for Tuned Tensor. Use it to converse, run
|
|
4
|
+
workflows on your laptop or in the cloud, inspect metrics, and check account
|
|
5
|
+
usage. The web app is the dashboard for reviewing cloud runs and published
|
|
6
|
+
local evidence.
|
|
7
|
+
|
|
8
|
+
Local training, evaluation, inspection, and serving need no TT access token.
|
|
9
|
+
Agent inference is a separate choice:
|
|
10
|
+
|
|
11
|
+
- **Managed:** sign in once with `tt auth login`. TT reuses your access token
|
|
12
|
+
through the Tuned Tensor model proxy. The server selects the model; no
|
|
13
|
+
OpenRouter key or model selection is needed.
|
|
14
|
+
- **Bring your own:** use your own OpenRouter or other provider credentials
|
|
15
|
+
and choose the model. Your requests go directly to that provider. TT does
|
|
16
|
+
not apply its managed model policy to BYO requests.
|
|
17
|
+
|
|
18
|
+
A saved BYO selection stays selected after TT login. Switch back with
|
|
19
|
+
`tt agent configure --provider tunedtensor` or `/model tunedtensor/managed`.
|
|
20
|
+
Inference choice is independent of whether a training workflow runs locally or
|
|
21
|
+
in the cloud. Cloud account operations always require a TT access token.
|
|
22
|
+
|
|
23
|
+
## Unified commands
|
|
24
|
+
|
|
25
|
+
Local workflows remain the default: `tt pipeline run`, `tt runs list`,
|
|
26
|
+
`tt models list`, and `tt serve`. Cloud workflows are explicit:
|
|
27
|
+
`tt cloud runs start`, `tt cloud runs list`, and `tt cloud models list`.
|
|
28
|
+
`tt usage` reports managed agent allowance and usage; `tt balance` reports
|
|
29
|
+
cloud training credits. `tt publish` uploads local run evidence to the dashboard.
|
|
30
|
+
|
|
31
|
+
TT includes the former TT Local runtime. `tt local …` and `tt run` remain
|
|
32
|
+
hidden compatibility aliases; new scripts should use root commands and
|
|
33
|
+
`tt pipeline run --spec tunedtensor.json`. Existing token-free local projects
|
|
34
|
+
and saved BYO provider settings continue to work. Cloud operations previously
|
|
35
|
+
hidden in the local-only release are available under `tt cloud`.
|
|
33
36
|
|
|
34
37
|
## Install
|
|
35
38
|
|
|
@@ -78,35 +81,54 @@ npm link
|
|
|
78
81
|
## Conversational terminal
|
|
79
82
|
|
|
80
83
|
The interactive agent harness and conversation state run on your laptop.
|
|
81
|
-
Inference
|
|
82
|
-
local endpoint or a remote
|
|
84
|
+
Inference uses the TT managed model or a BYO provider you select. A BYO
|
|
85
|
+
provider may be a local endpoint or a remote service.
|
|
83
86
|
|
|
84
87
|
Run `tt` to open the primary conversational workflow. The agent can inspect the
|
|
85
88
|
project, derive the canonical pipeline from `tunedtensor.json`, present the
|
|
86
|
-
resolved plan, and prepare a sealed dry-run for `/approve`. Workflow commands
|
|
87
|
-
as `runs list` and `doctor`
|
|
88
|
-
provider and model from inside the shell:
|
|
89
|
+
resolved plan, and prepare a sealed dry-run for `/approve`. Workflow commands
|
|
90
|
+
such as `runs list` and `doctor` work immediately without any credentials.
|
|
89
91
|
|
|
90
|
-
|
|
91
|
-
tt v0.13.1-beta.2
|
|
92
|
-
agent not configured · workflow model base
|
|
93
|
-
ctrl+c stop/clear · ctrl+d exit · /help commands · tab complete
|
|
92
|
+
For managed inference, save your TT access token with hidden input:
|
|
94
93
|
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
› /model openai
|
|
99
|
-
› /model openai/gpt-5.6-sol
|
|
94
|
+
```bash
|
|
95
|
+
tt auth login
|
|
96
|
+
tt
|
|
100
97
|
```
|
|
101
98
|
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
99
|
+
Get a token from the dashboard's **Settings → API Keys** page. You can also
|
|
100
|
+
set `TUNED_TENSOR_API_KEY` in CI. When there is no saved BYO selection, TT
|
|
101
|
+
selects `tunedtensor/managed` automatically. In the shell, `/login tunedtensor`
|
|
102
|
+
saves the same account token and switches the saved agent selection to
|
|
103
|
+
`tunedtensor/managed`, including after restart. Managed inference requires no OpenRouter key
|
|
104
|
+
or additional login. The server controls the model and request limits.
|
|
105
|
+
`tt usage` shows the configured daily allowance and reported usage.
|
|
106
|
+
|
|
107
|
+
For BYO OpenRouter inference:
|
|
108
|
+
|
|
109
|
+
```text
|
|
110
|
+
› /login openrouter
|
|
111
|
+
› /model openrouter/<model-id>
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
`/login` asks which provider, then prompts for the TT access token or BYO
|
|
115
|
+
provider key with hidden input. `/login <provider>` skips the provider prompt.
|
|
116
|
+
`/model openrouter` lists the bundled catalog, but you can select any OpenRouter model ID, including one
|
|
117
|
+
newer than that catalog. OpenRouter validates the selected ID. New IDs use
|
|
118
|
+
conservative context/output defaults; custom metadata can be supplied in
|
|
119
|
+
`~/.tuned-tensor/agent/models.json`. For a model without reasoning support,
|
|
120
|
+
configure it with
|
|
121
|
+
`tt agent configure --provider openrouter --model <model-id> --thinking off`.
|
|
122
|
+
BYO inference is billed by your provider.
|
|
123
|
+
|
|
124
|
+
Provider keys are stored under TT's local agent config, separately from the
|
|
125
|
+
account token. The managed provider never stores your TT token in provider
|
|
126
|
+
files and does not accept endpoint/model overrides in `models.json`; use a
|
|
127
|
+
separate BYO provider for custom endpoints. `tt` does not read `~/.pi/agent/`.
|
|
128
|
+
`/model` and `/login` feature Tuned Tensor, OpenAI, and OpenRouter. Other
|
|
129
|
+
catalog providers remain available by ID. Unauthenticated entries are marked
|
|
130
|
+
`auth required`. Local endpoints such as Ollama use a placeholder `apiKey` in
|
|
131
|
+
`models.json` and need no TT account.
|
|
110
132
|
|
|
111
133
|
Before the shell opens, `tt` performs a short, non-blocking npm version check.
|
|
112
134
|
If a newer stable release is available it recommends
|
|
@@ -117,8 +139,8 @@ After a model is selected, the banner shows it and ordinary sentences go to
|
|
|
117
139
|
the agent:
|
|
118
140
|
|
|
119
141
|
```text
|
|
120
|
-
tt v0.
|
|
121
|
-
agent
|
|
142
|
+
tt v0.15.0
|
|
143
|
+
agent tunedtensor/managed · workflow model base
|
|
122
144
|
ctrl+c stop/clear · ctrl+d exit · /help commands · tab complete
|
|
123
145
|
|
|
124
146
|
Ask TT anything. Known commands run directly.
|
|
@@ -182,20 +204,21 @@ A changed workspace or spec requires a new review.
|
|
|
182
204
|
|
|
183
205
|
Useful shell controls include `/help`, `/status`, `/context`, `/model`,
|
|
184
206
|
`/login`, `/cd`, `/clear`, and `/exit`.
|
|
185
|
-
The shell banner and `/context`
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
API key with hidden input. `/login <provider>` skips the provider prompt.
|
|
207
|
+
The shell banner and `/context` show the inference selection (`agent
|
|
208
|
+
provider/model`) separately from the workflow model. The managed alias identifies
|
|
209
|
+
inference through the server-selected model. Run `/model` with no arguments to
|
|
210
|
+
list the managed option and suggested BYO models, `/model <provider>` to list
|
|
211
|
+
that provider's models, or `/model <query>` to search. Switch with
|
|
212
|
+
`/model <provider>/<model>`, including `/model tunedtensor/managed` to return
|
|
213
|
+
to managed inference.
|
|
214
|
+
For managed inference, `tt agent configure --provider tunedtensor` needs no
|
|
215
|
+
model argument. For BYO inference, both provider and model are required.
|
|
195
216
|
The equivalent non-interactive commands are `tt agent models`,
|
|
196
217
|
`tt agent configure`, and `tt agent status`.
|
|
197
|
-
`tt agent configure --thinking` accepts `off`, `minimal`, `low`, `medium`,
|
|
198
|
-
`high`, `xhigh`, or `max
|
|
218
|
+
For BYO models, `tt agent configure --thinking` accepts `off`, `minimal`, `low`, `medium`,
|
|
219
|
+
`high`, `xhigh`, or `max`; managed inference uses the server's reasoning policy
|
|
220
|
+
and leaves the CLI thinking option off. Selection metadata can be overridden
|
|
221
|
+
per process with
|
|
199
222
|
`TUNED_TENSOR_AGENT_PROVIDER`, `TUNED_TENSOR_AGENT_MODEL`, and
|
|
200
223
|
`TUNED_TENSOR_AGENT_THINKING`. These values are not credentials.
|
|
201
224
|
The shell keeps normal terminal scrollback and command history only for the
|
|
@@ -260,8 +283,8 @@ When `--config` is omitted, `pipeline run` uses `local-runner.json` beside the
|
|
|
260
283
|
selected spec when that file exists.
|
|
261
284
|
|
|
262
285
|
`--only` and `--skip` preserve dependency safety: a selected step cannot refer
|
|
263
|
-
to an omitted predecessor. Cloud-targeted steps
|
|
264
|
-
|
|
286
|
+
to an omitted predecessor. Cloud-targeted pipeline steps can be inspected with `--dry-run`; actual
|
|
287
|
+
cloud execution uses `tt cloud runs`, described below. Foundation documents are local-only. The TT agent may describe,
|
|
265
288
|
validate, and prepare a sealed pipeline action; only deterministic `/approve`
|
|
266
289
|
handling can execute it.
|
|
267
290
|
|
|
@@ -273,6 +296,61 @@ scheduler, RNG, counters, and token cursor. See
|
|
|
273
296
|
[Long foundation runs](docs/local-runtime/foundation-long-runs.md) before an
|
|
274
297
|
unattended job.
|
|
275
298
|
|
|
299
|
+
## Cloud runs and account reporting
|
|
300
|
+
|
|
301
|
+
Use the same TT token for cloud operations and managed inference. A BYO model
|
|
302
|
+
selection continues to work while you operate cloud runs with that token.
|
|
303
|
+
|
|
304
|
+
```bash
|
|
305
|
+
tt auth login
|
|
306
|
+
tt cloud push --file tunedtensor.json
|
|
307
|
+
tt cloud runs estimate <spec-id>
|
|
308
|
+
tt cloud runs start <spec-id>
|
|
309
|
+
tt cloud runs watch <run-id>
|
|
310
|
+
tt cloud runs report <run-id>
|
|
311
|
+
tt cloud runs list
|
|
312
|
+
tt cloud models list
|
|
313
|
+
tt usage
|
|
314
|
+
tt balance
|
|
315
|
+
```
|
|
316
|
+
|
|
317
|
+
Use the spec ID returned by `push`. `tt cloud specs`, `tt cloud datasets`,
|
|
318
|
+
`tt cloud label`, and `tt cloud models` expose the corresponding account
|
|
319
|
+
operations; each command's `--help` documents its arguments. Cloud foundation
|
|
320
|
+
training and dispatching cloud-targeted pipeline JSON are not supported;
|
|
321
|
+
`tt cloud runs` uses the hosted adapter workflow.
|
|
322
|
+
|
|
323
|
+
With a TT token, the local agent can inspect cloud resources, run reports,
|
|
324
|
+
balances, transactions, and managed usage. It can prepare cloud spec edits for
|
|
325
|
+
`/approve`. Those proposals show the API origin and remain bound to the token
|
|
326
|
+
and origin used during preparation. After changing either, return to the
|
|
327
|
+
original account and origin or prepare a new proposal. Starting or cancelling
|
|
328
|
+
cloud training remains an explicit direct
|
|
329
|
+
CLI command. Without a TT token these account tools are unavailable, while
|
|
330
|
+
local workflow commands and BYO inference continue to work.
|
|
331
|
+
|
|
332
|
+
`tt usage` reports the server-configured daily managed inference allowance.
|
|
333
|
+
Each provider completion, including a tool follow-up, consumes one request;
|
|
334
|
+
failed and cancelled requests also count. Token/cost coverage shows which
|
|
335
|
+
requests have provider usage reports, so incomplete reporting is not mistaken
|
|
336
|
+
for zero consumption. The displayed provider cost is informational, not a
|
|
337
|
+
charge to cloud training credits. BYO provider usage is separate. `tt balance`
|
|
338
|
+
shows cloud training credits and recent transactions; `tt topup` opens checkout.
|
|
339
|
+
|
|
340
|
+
Publish a local report for review in the dashboard:
|
|
341
|
+
|
|
342
|
+
```bash
|
|
343
|
+
tt publish <local-run-id> --dry-run
|
|
344
|
+
tt publish <local-run-id>
|
|
345
|
+
tt cloud runs archive <published-run-id>
|
|
346
|
+
```
|
|
347
|
+
|
|
348
|
+
Publishing shows the upload before confirmation and includes the spec, metrics,
|
|
349
|
+
prompts, and example model outputs. Archiving is supported for inactive local
|
|
350
|
+
reports published to the dashboard. Local model weights stay on your machine.
|
|
351
|
+
Use `--json` with reporting commands for scripts. `TUNED_TENSOR_URL` or
|
|
352
|
+
`--base-url` selects an alternate Tuned Tensor API deployment.
|
|
353
|
+
|
|
276
354
|
## Quick start
|
|
277
355
|
|
|
278
356
|
Create a local project on an NVIDIA host:
|
|
@@ -314,7 +392,8 @@ Nemotron path is intended for DGX Spark-class unified memory, uses activation
|
|
|
314
392
|
checkpointing, and adapts bounded shared attention/Mamba projections rather
|
|
315
393
|
than every routed expert matrix. Muse Glimmer is a vision-language checkpoint
|
|
316
394
|
whose text tower is fine-tuned through the image-text-to-text loader with the
|
|
317
|
-
vision tower frozen and unused. Evaluation
|
|
395
|
+
vision tower frozen and unused. Evaluation may use CPU; packaged local
|
|
396
|
+
serving requires Linux and NVIDIA CUDA. Training
|
|
318
397
|
artifacts, datasets, and model weights remain on the execution host.
|
|
319
398
|
|
|
320
399
|
Activation is optional and requires the run to pass a configured
|
|
@@ -353,8 +432,14 @@ npm run build
|
|
|
353
432
|
npm run dev
|
|
354
433
|
npm run typecheck
|
|
355
434
|
npm test
|
|
435
|
+
npm run test:workflows # Focused product workflow regressions; no model key or GPU
|
|
436
|
+
npm run check # Typecheck, all tests, and build (the release gate)
|
|
356
437
|
```
|
|
357
438
|
|
|
439
|
+
See [the testing proposal and workflow contracts](docs/testing.md) for what the
|
|
440
|
+
suite guarantees, how to evaluate a real agent with `npm run eval:agent`, and
|
|
441
|
+
the remaining steps toward the full conversational product promise.
|
|
442
|
+
|
|
358
443
|
## License
|
|
359
444
|
|
|
360
445
|
Apache-2.0
|
|
@@ -256,7 +256,7 @@ async function writeArtifactManifest(artifacts, options = {}) {
|
|
|
256
256
|
let model;
|
|
257
257
|
if (options.model) {
|
|
258
258
|
if (options.model.framework !== "transformers-peft" || options.model.servable !== true || options.model.artifact_kind === "file" && options.model.format !== "tar.gz" || options.model.artifact_kind === "directory" && options.model.format !== "huggingface-directory") {
|
|
259
|
-
throw new Error("TT
|
|
259
|
+
throw new Error("TT local model artifacts must be verified, servable Transformers PEFT adapters.");
|
|
260
260
|
}
|
|
261
261
|
if (options.model.base_model_artifact_uri === void 0 !== (options.model.base_model_fingerprint === void 0)) {
|
|
262
262
|
throw new Error("Model contracts must record a local base-model URI and fingerprint together.");
|
|
@@ -744,7 +744,7 @@ function assertCertifiedBaseModelConfig(value, label = "base-model config.json",
|
|
|
744
744
|
return;
|
|
745
745
|
}
|
|
746
746
|
throw new Error(
|
|
747
|
-
`${label} is not a certified TT
|
|
747
|
+
`${label} is not a certified TT base-model architecture.`
|
|
748
748
|
);
|
|
749
749
|
}
|
|
750
750
|
function localModelArtifactPath(uri) {
|
|
@@ -4455,9 +4455,17 @@ async function prepareStage(args) {
|
|
|
4455
4455
|
canReuse = await verifyReusableArtifacts(args.artifacts, [
|
|
4456
4456
|
args.artifacts.stageMetadataJson,
|
|
4457
4457
|
args.artifacts.trainingJsonl
|
|
4458
|
-
]);
|
|
4458
|
+
], { verifyModel: true });
|
|
4459
4459
|
}
|
|
4460
4460
|
if (canReuse) {
|
|
4461
|
+
for (const stage of ["baseline", "train", "candidate"]) {
|
|
4462
|
+
await canReuseStageArtifact({
|
|
4463
|
+
stage,
|
|
4464
|
+
prepared,
|
|
4465
|
+
config: args.config,
|
|
4466
|
+
additionalPaths: stage === "train" ? [] : generalRegressionRequiredPaths(prepared, stage)
|
|
4467
|
+
});
|
|
4468
|
+
}
|
|
4461
4469
|
await throwIfCancelled(args.store, args.request);
|
|
4462
4470
|
await updateRun({
|
|
4463
4471
|
...args,
|
|
@@ -5848,4 +5856,4 @@ export {
|
|
|
5848
5856
|
formatAgentHostBlock,
|
|
5849
5857
|
assessHardware
|
|
5850
5858
|
};
|
|
5851
|
-
//# sourceMappingURL=chunk-
|
|
5859
|
+
//# sourceMappingURL=chunk-VVKC563R.js.map
|