@tuned-tensor/cli 0.13.1 → 0.15.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 +153 -69
- package/dist/{chunk-CAEBS5HH.js → chunk-YGN26POJ.js} +4 -3
- package/dist/chunk-YGN26POJ.js.map +1 -0
- package/dist/index.js +4405 -201
- package/dist/index.js.map +1 -1
- package/dist/local-runtime.js +124 -33
- package/dist/local-runtime.js.map +1 -1
- package/docs/local-runtime/architecture.md +11 -7
- package/docs/local-runtime/serving.md +171 -0
- package/docs/local-runtime/spark.md +4 -2
- package/package.json +3 -1
- package/training/adapter/src/model_contract.py +1 -1
- package/training/adapter/src/prefetch.py +1 -1
- package/training/adapter/src/serve.py +133 -267
- package/training/adapter/src/train.py +2 -2
- package/training/serving/pyproject.toml +9 -0
- package/training/serving/uv.lock +2785 -0
- package/dist/chunk-CAEBS5HH.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,53 @@ 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
|
-
|
|
92
|
-
|
|
93
|
-
|
|
92
|
+
For managed inference, save your TT access token with hidden input:
|
|
93
|
+
|
|
94
|
+
```bash
|
|
95
|
+
tt auth login
|
|
96
|
+
tt
|
|
97
|
+
```
|
|
98
|
+
|
|
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. Managed inference requires no OpenRouter key
|
|
103
|
+
or additional login. The server controls the model and request limits.
|
|
104
|
+
`tt usage` shows the configured daily allowance and reported usage.
|
|
94
105
|
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
› /
|
|
99
|
-
› /model
|
|
106
|
+
For BYO OpenRouter inference:
|
|
107
|
+
|
|
108
|
+
```text
|
|
109
|
+
› /login openrouter
|
|
110
|
+
› /model openrouter/<model-id>
|
|
100
111
|
```
|
|
101
112
|
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
113
|
+
`/login` asks which provider, then prompts for the TT access token or BYO
|
|
114
|
+
provider key with hidden input. `/login <provider>` skips the provider prompt.
|
|
115
|
+
`/model openrouter` lists the bundled catalog, but you can select any OpenRouter model ID, including one
|
|
116
|
+
newer than that catalog. OpenRouter validates the selected ID. New IDs use
|
|
117
|
+
conservative context/output defaults; custom metadata can be supplied in
|
|
118
|
+
`~/.tuned-tensor/agent/models.json`. For a model without reasoning support,
|
|
119
|
+
configure it with
|
|
120
|
+
`tt agent configure --provider openrouter --model <model-id> --thinking off`.
|
|
121
|
+
BYO inference is billed by your provider.
|
|
122
|
+
|
|
123
|
+
Provider keys are stored under TT's local agent config, separately from the
|
|
124
|
+
account token. The managed provider never stores your TT token in provider
|
|
125
|
+
files and does not accept endpoint/model overrides in `models.json`; use a
|
|
126
|
+
separate BYO provider for custom endpoints. `tt` does not read `~/.pi/agent/`.
|
|
127
|
+
`/model` and `/login` feature Tuned Tensor, OpenAI, and OpenRouter. Other
|
|
128
|
+
catalog providers remain available by ID. Unauthenticated entries are marked
|
|
129
|
+
`auth required`. Local endpoints such as Ollama use a placeholder `apiKey` in
|
|
130
|
+
`models.json` and need no TT account.
|
|
110
131
|
|
|
111
132
|
Before the shell opens, `tt` performs a short, non-blocking npm version check.
|
|
112
133
|
If a newer stable release is available it recommends
|
|
@@ -117,8 +138,8 @@ After a model is selected, the banner shows it and ordinary sentences go to
|
|
|
117
138
|
the agent:
|
|
118
139
|
|
|
119
140
|
```text
|
|
120
|
-
tt v0.
|
|
121
|
-
agent
|
|
141
|
+
tt v0.15.0
|
|
142
|
+
agent tunedtensor/managed · workflow model base
|
|
122
143
|
ctrl+c stop/clear · ctrl+d exit · /help commands · tab complete
|
|
123
144
|
|
|
124
145
|
Ask TT anything. Known commands run directly.
|
|
@@ -182,20 +203,21 @@ A changed workspace or spec requires a new review.
|
|
|
182
203
|
|
|
183
204
|
Useful shell controls include `/help`, `/status`, `/context`, `/model`,
|
|
184
205
|
`/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.
|
|
206
|
+
The shell banner and `/context` show the inference selection (`agent
|
|
207
|
+
provider/model`) separately from the workflow model. The managed alias identifies
|
|
208
|
+
inference through the server-selected model. Run `/model` with no arguments to
|
|
209
|
+
list the managed option and suggested BYO models, `/model <provider>` to list
|
|
210
|
+
that provider's models, or `/model <query>` to search. Switch with
|
|
211
|
+
`/model <provider>/<model>`, including `/model tunedtensor/managed` to return
|
|
212
|
+
to managed inference.
|
|
213
|
+
For managed inference, `tt agent configure --provider tunedtensor` needs no
|
|
214
|
+
model argument. For BYO inference, both provider and model are required.
|
|
195
215
|
The equivalent non-interactive commands are `tt agent models`,
|
|
196
216
|
`tt agent configure`, and `tt agent status`.
|
|
197
|
-
`tt agent configure --thinking` accepts `off`, `minimal`, `low`, `medium`,
|
|
198
|
-
`high`, `xhigh`, or `max
|
|
217
|
+
For BYO models, `tt agent configure --thinking` accepts `off`, `minimal`, `low`, `medium`,
|
|
218
|
+
`high`, `xhigh`, or `max`; managed inference uses the server's reasoning policy
|
|
219
|
+
and leaves the CLI thinking option off. Selection metadata can be overridden
|
|
220
|
+
per process with
|
|
199
221
|
`TUNED_TENSOR_AGENT_PROVIDER`, `TUNED_TENSOR_AGENT_MODEL`, and
|
|
200
222
|
`TUNED_TENSOR_AGENT_THINKING`. These values are not credentials.
|
|
201
223
|
The shell keeps normal terminal scrollback and command history only for the
|
|
@@ -260,8 +282,8 @@ When `--config` is omitted, `pipeline run` uses `local-runner.json` beside the
|
|
|
260
282
|
selected spec when that file exists.
|
|
261
283
|
|
|
262
284
|
`--only` and `--skip` preserve dependency safety: a selected step cannot refer
|
|
263
|
-
to an omitted predecessor. Cloud-targeted steps
|
|
264
|
-
|
|
285
|
+
to an omitted predecessor. Cloud-targeted pipeline steps can be inspected with `--dry-run`; actual
|
|
286
|
+
cloud execution uses `tt cloud runs`, described below. Foundation documents are local-only. The TT agent may describe,
|
|
265
287
|
validate, and prepare a sealed pipeline action; only deterministic `/approve`
|
|
266
288
|
handling can execute it.
|
|
267
289
|
|
|
@@ -273,6 +295,61 @@ scheduler, RNG, counters, and token cursor. See
|
|
|
273
295
|
[Long foundation runs](docs/local-runtime/foundation-long-runs.md) before an
|
|
274
296
|
unattended job.
|
|
275
297
|
|
|
298
|
+
## Cloud runs and account reporting
|
|
299
|
+
|
|
300
|
+
Use the same TT token for cloud operations and managed inference. A BYO model
|
|
301
|
+
selection continues to work while you operate cloud runs with that token.
|
|
302
|
+
|
|
303
|
+
```bash
|
|
304
|
+
tt auth login
|
|
305
|
+
tt cloud push --file tunedtensor.json
|
|
306
|
+
tt cloud runs estimate <spec-id>
|
|
307
|
+
tt cloud runs start <spec-id>
|
|
308
|
+
tt cloud runs watch <run-id>
|
|
309
|
+
tt cloud runs report <run-id>
|
|
310
|
+
tt cloud runs list
|
|
311
|
+
tt cloud models list
|
|
312
|
+
tt usage
|
|
313
|
+
tt balance
|
|
314
|
+
```
|
|
315
|
+
|
|
316
|
+
Use the spec ID returned by `push`. `tt cloud specs`, `tt cloud datasets`,
|
|
317
|
+
`tt cloud label`, and `tt cloud models` expose the corresponding account
|
|
318
|
+
operations; each command's `--help` documents its arguments. Cloud foundation
|
|
319
|
+
training and dispatching cloud-targeted pipeline JSON are not supported;
|
|
320
|
+
`tt cloud runs` uses the hosted adapter workflow.
|
|
321
|
+
|
|
322
|
+
With a TT token, the local agent can inspect cloud resources, run reports,
|
|
323
|
+
balances, transactions, and managed usage. It can prepare cloud spec edits for
|
|
324
|
+
`/approve`. Those proposals show the API origin and remain bound to the token
|
|
325
|
+
and origin used during preparation. After changing either, return to the
|
|
326
|
+
original account and origin or prepare a new proposal. Starting or cancelling
|
|
327
|
+
cloud training remains an explicit direct
|
|
328
|
+
CLI command. Without a TT token these account tools are unavailable, while
|
|
329
|
+
local workflow commands and BYO inference continue to work.
|
|
330
|
+
|
|
331
|
+
`tt usage` reports the server-configured daily managed inference allowance.
|
|
332
|
+
Each provider completion, including a tool follow-up, consumes one request;
|
|
333
|
+
failed and cancelled requests also count. Token/cost coverage shows which
|
|
334
|
+
requests have provider usage reports, so incomplete reporting is not mistaken
|
|
335
|
+
for zero consumption. The displayed provider cost is informational, not a
|
|
336
|
+
charge to cloud training credits. BYO provider usage is separate. `tt balance`
|
|
337
|
+
shows cloud training credits and recent transactions; `tt topup` opens checkout.
|
|
338
|
+
|
|
339
|
+
Publish a local report for review in the dashboard:
|
|
340
|
+
|
|
341
|
+
```bash
|
|
342
|
+
tt publish <local-run-id> --dry-run
|
|
343
|
+
tt publish <local-run-id>
|
|
344
|
+
tt cloud runs archive <published-run-id>
|
|
345
|
+
```
|
|
346
|
+
|
|
347
|
+
Publishing shows the upload before confirmation and includes the spec, metrics,
|
|
348
|
+
prompts, and example model outputs. Archiving is supported for inactive local
|
|
349
|
+
reports published to the dashboard. Local model weights stay on your machine.
|
|
350
|
+
Use `--json` with reporting commands for scripts. `TUNED_TENSOR_URL` or
|
|
351
|
+
`--base-url` selects an alternate Tuned Tensor API deployment.
|
|
352
|
+
|
|
276
353
|
## Quick start
|
|
277
354
|
|
|
278
355
|
Create a local project on an NVIDIA host:
|
|
@@ -314,7 +391,8 @@ Nemotron path is intended for DGX Spark-class unified memory, uses activation
|
|
|
314
391
|
checkpointing, and adapts bounded shared attention/Mamba projections rather
|
|
315
392
|
than every routed expert matrix. Muse Glimmer is a vision-language checkpoint
|
|
316
393
|
whose text tower is fine-tuned through the image-text-to-text loader with the
|
|
317
|
-
vision tower frozen and unused. Evaluation
|
|
394
|
+
vision tower frozen and unused. Evaluation may use CPU; packaged local
|
|
395
|
+
serving requires Linux and NVIDIA CUDA. Training
|
|
318
396
|
artifacts, datasets, and model weights remain on the execution host.
|
|
319
397
|
|
|
320
398
|
Activation is optional and requires the run to pass a configured
|
|
@@ -325,6 +403,12 @@ not silently serve the protected base model. Once activated, use
|
|
|
325
403
|
|
|
326
404
|
`tt serve base` does not automatically inject the adjacent project spec.
|
|
327
405
|
Pass `--spec tunedtensor.json` when the server should enforce its instructions.
|
|
406
|
+
Serving uses a separate locked **vLLM** runtime on Linux/CUDA. A tuned launch
|
|
407
|
+
exposes both the adapter and its base model, sharing weights, with upstream
|
|
408
|
+
streaming and native tool-call parsing. `tt serve <target> --print-client-config pi`
|
|
409
|
+
exports isolated Pi configuration; tools no longer need to be disabled. See
|
|
410
|
+
[Local serving and coding harnesses](docs/local-runtime/serving.md) for Pi/OpenCode
|
|
411
|
+
setup, resource budgets, hardware limits, and the verified integration scope.
|
|
328
412
|
|
|
329
413
|
Useful discovery commands:
|
|
330
414
|
|
|
@@ -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) {
|
|
@@ -5767,6 +5767,7 @@ export {
|
|
|
5767
5767
|
getConfigDir,
|
|
5768
5768
|
getAgentConfigDir,
|
|
5769
5769
|
defaultStoreRoot,
|
|
5770
|
+
pythonEnvironmentPath,
|
|
5770
5771
|
datasetFormatSchema,
|
|
5771
5772
|
baseModelRevisionSchema,
|
|
5772
5773
|
behaviorSpecExampleSchema,
|
|
@@ -5847,4 +5848,4 @@ export {
|
|
|
5847
5848
|
formatAgentHostBlock,
|
|
5848
5849
|
assessHardware
|
|
5849
5850
|
};
|
|
5850
|
-
//# sourceMappingURL=chunk-
|
|
5851
|
+
//# sourceMappingURL=chunk-YGN26POJ.js.map
|