@tuned-tensor/cli 0.12.0-beta.1 → 0.13.0-beta.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 +60 -176
- package/dist/index.js +361 -4318
- package/dist/index.js.map +1 -1
- package/dist/local-runtime.js +25 -25
- package/dist/local-runtime.js.map +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,16 +1,18 @@
|
|
|
1
1
|
# tt - Tuned Tensor CLI
|
|
2
2
|
|
|
3
|
-
`tt` is one terminal for
|
|
3
|
+
`tt` is one terminal for local Tuned Tensor workflows:
|
|
4
4
|
|
|
5
|
-
-
|
|
6
|
-
-
|
|
7
|
-
activation, and OpenAI-compatible serving.
|
|
5
|
+
- a laptop-local conversational agent;
|
|
6
|
+
- CUDA fine-tuning, held-out evaluation, artifact verification, model
|
|
7
|
+
activation, and OpenAI-compatible serving on hardware you control.
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
9
|
+
## Cloud sunset
|
|
10
|
+
|
|
11
|
+
This release unregisters the hosted API commands (`tt auth`, `tt push`,
|
|
12
|
+
`tt balance`, `tt topup`, `tt cloud`, and the rest of the managed tree). The
|
|
13
|
+
modules remain in the repository so they can be restored later. `tt local …`
|
|
14
|
+
is kept as a hidden alias; new scripts should call `tt run`, `tt doctor`,
|
|
15
|
+
`tt runs list`, and so on directly.
|
|
14
16
|
|
|
15
17
|
## Install
|
|
16
18
|
|
|
@@ -19,10 +21,9 @@ npm install -g @tuned-tensor/cli
|
|
|
19
21
|
tt --version
|
|
20
22
|
```
|
|
21
23
|
|
|
22
|
-
Node.js 22.19.0 or newer is required.
|
|
23
|
-
Local training additionally needs
|
|
24
|
+
Node.js 22.19.0 or newer is required. Local training additionally needs
|
|
24
25
|
[`uv`](https://docs.astral.sh/uv/) and a supported NVIDIA CUDA host; the locked
|
|
25
|
-
Python runner ships with the npm
|
|
26
|
+
Python runner ships with the npm package and is prepared on first use.
|
|
26
27
|
|
|
27
28
|
Run from source:
|
|
28
29
|
|
|
@@ -38,11 +39,7 @@ npm link
|
|
|
38
39
|
|
|
39
40
|
The interactive agent harness and conversation state run on your laptop.
|
|
40
41
|
Inference runs through the provider/model you select, which may be a
|
|
41
|
-
local endpoint or a remote provider.
|
|
42
|
-
typed tool provider: `tt auth login` is used only for Tuned Tensor REST calls
|
|
43
|
-
and is never sent to the selected model.
|
|
44
|
-
Tool results needed to answer a request are sent to the model you selected, so
|
|
45
|
-
choose a local or remote provider whose data policy fits your workload.
|
|
42
|
+
local endpoint or a remote provider.
|
|
46
43
|
|
|
47
44
|
`tt` reuses provider authentication and custom model definitions from
|
|
48
45
|
`~/.pi/agent/auth.json` and `~/.pi/agent/models.json`. Authenticate a provider
|
|
@@ -70,24 +67,22 @@ If a newer stable release is available it recommends
|
|
|
70
67
|
checks are ignored.
|
|
71
68
|
|
|
72
69
|
```text
|
|
73
|
-
tt
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
70
|
+
tt v0.13.0-beta.0
|
|
71
|
+
agent anthropic/claude-sonnet-4-5 · workflow model base
|
|
72
|
+
ctrl+c stop/clear · ctrl+d exit · /help commands · tab complete
|
|
73
|
+
|
|
74
|
+
Ask TT anything. Known commands run directly.
|
|
75
|
+
› What happened in my latest training run?
|
|
76
|
+
› runs list
|
|
77
77
|
```
|
|
78
78
|
|
|
79
79
|
Ordinary sentences go through the locally orchestrated model session. The
|
|
80
|
-
model can
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
symlinked workspace roots, existing targets, and unsupported spec fields. Known
|
|
87
|
-
CLI commands such as `runs list`, `doctor`, and `models list` still execute
|
|
88
|
-
directly. Prefix a command with `:` when you want to make that intent
|
|
89
|
-
explicit. Commands run in the local workflow by default; prefix one with
|
|
90
|
-
`cloud` (or `local`) to override the target for that one command.
|
|
80
|
+
model has no shell or general filesystem tool. It can prepare one new folder
|
|
81
|
+
directly beneath the shell's current working directory with a validated
|
|
82
|
+
`tunedtensor.json`. The tool refuses path traversal, symlinked workspace
|
|
83
|
+
roots, existing targets, and unsupported spec fields. Known CLI commands such
|
|
84
|
+
as `runs list`, `doctor`, and `models list` still execute directly. Prefix a
|
|
85
|
+
command with `:` when you want to make that intent explicit.
|
|
91
86
|
|
|
92
87
|
Agent conversations are durable and local under
|
|
93
88
|
`~/.config/tuned-tensor/agent/threads` (or the XDG config equivalent), with
|
|
@@ -95,35 +90,18 @@ user-only directory/file permissions. Persistence normally retains up to 100
|
|
|
95
90
|
recent threads; unsettled safety records are never pruned even when that exceeds
|
|
96
91
|
the cap. Each thread is limited to 1 MB, 200 messages, and 200 actions; one-way
|
|
97
92
|
action claims are capped at 1,000. Use `/new` to start one, `/threads` to
|
|
98
|
-
list recent conversations, and `/resume <id>` to continue one.
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
creation, and never overwrites an existing path. Secure filesystem mutation is
|
|
108
|
-
currently supported on Linux, where writes are anchored to open workspace and
|
|
109
|
-
destination-directory handles. The proposal is bound to the current workspace
|
|
110
|
-
so changing directories before approval fails safely instead of writing
|
|
111
|
-
somewhere else. Ambiguous write failures remain sealed as `outcome_unknown` for
|
|
112
|
-
manual inspection rather than deleting a path that could belong to a racing
|
|
113
|
-
writer.
|
|
114
|
-
`/approve` executes deterministic local code with an at-most-once mutation
|
|
115
|
-
attempt. For hosted mutations, before dispatch the CLI requires the API to
|
|
116
|
-
advertise mutation-guard support; older or incompatible servers are refused.
|
|
117
|
-
The server conditionally
|
|
118
|
-
checks approved spec versions and assigns the action ID as an idempotent create
|
|
119
|
-
ID. If a response or final state write is lost after dispatch, the action is
|
|
120
|
-
retained as `outcome_unknown`, cannot be retried automatically, and directs the
|
|
121
|
-
user to inspect the remote resource. `/reject` never calls a mutation endpoint.
|
|
93
|
+
list recent conversations, and `/resume <id>` to continue one.
|
|
94
|
+
|
|
95
|
+
Local spec creation waits for `/approve`, requires at least two examples,
|
|
96
|
+
uses exclusive private folder/file creation, and never overwrites an existing
|
|
97
|
+
path. Secure filesystem mutation is currently supported on Linux, where writes
|
|
98
|
+
are anchored to open workspace and destination-directory handles. The proposal
|
|
99
|
+
is bound to the current workspace so changing directories before approval fails
|
|
100
|
+
safely instead of writing somewhere else. Ambiguous write failures remain
|
|
101
|
+
sealed as `outcome_unknown` for manual inspection. `/reject` never mutates.
|
|
122
102
|
|
|
123
103
|
Useful shell controls include `/help`, `/status`, `/context`, `/model`, `/cd`,
|
|
124
|
-
`/clear`, and `/exit`.
|
|
125
|
-
command with `cloud` (for example `cloud runs list`) to run one hosted command
|
|
126
|
-
without changing the default.
|
|
104
|
+
`/clear`, and `/exit`.
|
|
127
105
|
The shell banner and `/context` surface the assistant's configured provider and
|
|
128
106
|
model (`agent provider/model`) separately from the workflow model, so the
|
|
129
107
|
model answering your prompts is always visible. `/model` shows and changes the
|
|
@@ -136,77 +114,42 @@ The shell keeps normal terminal scrollback and command history only for the
|
|
|
136
114
|
current process.
|
|
137
115
|
|
|
138
116
|
Explicit commands remain non-interactive, including in CI. `tt --help` shows
|
|
139
|
-
the
|
|
117
|
+
the command surface, `tt status` inspects local project context without a
|
|
140
118
|
network or GPU probe, and `tt shell` opens the conversational terminal
|
|
141
119
|
explicitly.
|
|
142
120
|
|
|
143
121
|
## Composable pipelines (v1)
|
|
144
122
|
|
|
145
123
|
A pipeline is an ordered JSON recipe. Version 1 supports `train`, `evaluate`,
|
|
146
|
-
and `compare` steps
|
|
124
|
+
and `compare` steps. This CLI executes local plans only. The v1 evaluator is
|
|
147
125
|
`evaluate.with.evaluator: "behavior"`. `evaluate.with.model` is `"base"` or
|
|
148
126
|
`{ "from": "step.model" }`; `compare.with.before` and
|
|
149
127
|
`after` are `{ "from": "step.report" }`. References must point to an earlier
|
|
150
128
|
step and to an output the producer actually exposes. The document contract
|
|
151
129
|
itself is defined by the published `@tuned-tensor/pipeline-contract` package;
|
|
152
|
-
the CLI adds only execution planning (step selection
|
|
153
|
-
transfers) on top of it.
|
|
130
|
+
the CLI adds only execution planning (step selection) on top of it.
|
|
154
131
|
|
|
155
132
|
```bash
|
|
156
|
-
|
|
157
|
-
tt pipeline init --target local --file pipeline.json
|
|
158
|
-
tt pipeline init --target cloud --file cloud-pipeline.json
|
|
159
|
-
|
|
160
|
-
# Validate and show resolved targets plus explicit cross-target transfers.
|
|
133
|
+
tt pipeline init --file pipeline.json
|
|
161
134
|
tt pipeline validate --file pipeline.json
|
|
162
135
|
tt --json pipeline plan --file pipeline.json
|
|
163
|
-
|
|
164
|
-
# Preview any plan without execution, transfer, network calls, or billing.
|
|
165
136
|
tt --json pipeline run --dry-run --file pipeline.json --only baseline
|
|
166
|
-
|
|
167
|
-
# Execute an ordered local plan using the unified CLI's bundled runtime.
|
|
168
137
|
tt --json pipeline run --file pipeline.json \
|
|
169
138
|
--spec tunedtensor.json --config local-runner.json
|
|
170
139
|
```
|
|
171
140
|
|
|
172
141
|
`--only` and `--skip` preserve dependency safety: a selected step cannot refer
|
|
173
|
-
to an omitted predecessor.
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
fails closed rather than silently running the fixed cloud workflow. The TT agent
|
|
177
|
-
may describe, validate, and prepare a plan, but has no direct pipeline-execute
|
|
178
|
-
tool.
|
|
142
|
+
to an omitted predecessor. Cloud-targeted steps fail closed unless you pass
|
|
143
|
+
`--dry-run`. The TT agent may describe, validate, and prepare a plan, but has
|
|
144
|
+
no direct pipeline-execute tool.
|
|
179
145
|
|
|
180
|
-
##
|
|
181
|
-
|
|
182
|
-
```bash
|
|
183
|
-
tt auth login
|
|
184
|
-
tt init --name "Customer Support Bot" --model Qwen/Qwen3.5-2B
|
|
185
|
-
|
|
186
|
-
# Edit tunedtensor.json, then:
|
|
187
|
-
tt eval
|
|
188
|
-
tt push
|
|
189
|
-
tt runs estimate <spec-id>
|
|
190
|
-
tt runs start <spec-id>
|
|
191
|
-
tt runs watch <run-id>
|
|
192
|
-
tt runs report <run-id>
|
|
193
|
-
```
|
|
194
|
-
|
|
195
|
-
The hosted service remains optional. Before a paid run, inspect the estimate:
|
|
196
|
-
|
|
197
|
-
```bash
|
|
198
|
-
tt balance
|
|
199
|
-
tt runs estimate <spec-id>
|
|
200
|
-
tt runs start <spec-id>
|
|
201
|
-
```
|
|
202
|
-
|
|
203
|
-
## Local quick start
|
|
146
|
+
## Quick start
|
|
204
147
|
|
|
205
148
|
Create a local project on an NVIDIA host:
|
|
206
149
|
|
|
207
150
|
```bash
|
|
208
151
|
mkdir support-adapter && cd support-adapter
|
|
209
|
-
tt
|
|
152
|
+
tt init \
|
|
210
153
|
--name "Support Adapter" \
|
|
211
154
|
--model Qwen/Qwen3.5-2B \
|
|
212
155
|
--profile spark
|
|
@@ -216,18 +159,18 @@ Edit the generated `tunedtensor.json`, replacing both placeholder examples,
|
|
|
216
159
|
then preflight and run:
|
|
217
160
|
|
|
218
161
|
```bash
|
|
219
|
-
tt
|
|
220
|
-
tt
|
|
221
|
-
tt
|
|
222
|
-
tt
|
|
162
|
+
tt doctor tunedtensor.json
|
|
163
|
+
tt validate tunedtensor.json
|
|
164
|
+
tt models prefetch tunedtensor.json
|
|
165
|
+
tt run tunedtensor.json
|
|
223
166
|
```
|
|
224
167
|
|
|
225
168
|
Inspect, verify, and serve a completed adapter:
|
|
226
169
|
|
|
227
170
|
```bash
|
|
228
|
-
tt
|
|
229
|
-
tt
|
|
230
|
-
tt
|
|
171
|
+
tt runs report <run-id>
|
|
172
|
+
tt models verify local-<run-id>
|
|
173
|
+
tt models serve local-<run-id> --config local-runner.json
|
|
231
174
|
```
|
|
232
175
|
|
|
233
176
|
Local currently certifies text SFT with `Qwen/Qwen3.5-2B`,
|
|
@@ -242,81 +185,22 @@ artifacts, datasets, and model weights remain on the execution host.
|
|
|
242
185
|
|
|
243
186
|
Activation is optional and requires the run to pass a configured
|
|
244
187
|
`generalRegression` gate. Once activated, use
|
|
245
|
-
`tt
|
|
246
|
-
|
|
247
|
-
### One project file, target-specific payloads
|
|
188
|
+
`tt serve active --config local-runner.json`.
|
|
248
189
|
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
by the selected target:
|
|
252
|
-
|
|
253
|
-
- hosted pushes omit local-only `hyperparameters` and `dataset_prebuilt`;
|
|
254
|
-
- local run, validation, prefetch, and explicit `--spec` serving commands omit
|
|
255
|
-
cloud-only executable `eval_cases`;
|
|
256
|
-
- the default hosted scaffold contains two distinct examples and is valid as
|
|
257
|
-
a starting point for local held-out evaluation.
|
|
258
|
-
|
|
259
|
-
Target validation is still authoritative. In particular, choosing a hosted
|
|
260
|
-
base model does not make that model supported by the local CUDA runner.
|
|
261
|
-
`tt local serve base` does not automatically inject the adjacent project spec.
|
|
262
|
-
Pass `--spec tunedtensor.json` when the server should enforce its instructions;
|
|
263
|
-
that explicit spec is projected for the local runtime.
|
|
264
|
-
|
|
265
|
-
To continue training from a completed fine-tuned model artifact:
|
|
266
|
-
|
|
267
|
-
```bash
|
|
268
|
-
tt runs start <spec-id> --parent-model <model-id>
|
|
269
|
-
```
|
|
190
|
+
`tt serve base` does not automatically inject the adjacent project spec.
|
|
191
|
+
Pass `--spec tunedtensor.json` when the server should enforce its instructions.
|
|
270
192
|
|
|
271
193
|
Useful discovery commands:
|
|
272
194
|
|
|
273
195
|
```bash
|
|
274
|
-
tt specs list
|
|
275
|
-
tt datasets list
|
|
276
196
|
tt runs list
|
|
277
|
-
tt runs list --summary --json
|
|
278
197
|
tt models list
|
|
279
|
-
tt models
|
|
280
|
-
tt
|
|
198
|
+
tt models active
|
|
199
|
+
tt status
|
|
281
200
|
```
|
|
282
201
|
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
payloads; combine it with `--json` for compact structured output.
|
|
286
|
-
|
|
287
|
-
Label real, unlabeled data with a teacher model (JSONL with `{"input": ...}`
|
|
288
|
-
rows, or CSV with `--input-column`; up to 50,000 rows / 50 MB). Labeling runs
|
|
289
|
-
as a managed cloud workflow — upload and disconnect; the teacher drafts
|
|
290
|
-
outputs under your spec's system prompt and you review before anything trains:
|
|
291
|
-
|
|
292
|
-
```bash
|
|
293
|
-
tt label upload tickets.csv --spec <spec-id> --input-column body --watch
|
|
294
|
-
tt label watch <job-id> # re-attach to progress any time
|
|
295
|
-
tt label rows <job-id> --status labeled # review the teacher's drafts
|
|
296
|
-
tt label accept <job-id> --all # or accept/reject/edit by row
|
|
297
|
-
tt label promote <job-id> --name tickets-v1 # becomes a validated dataset
|
|
298
|
-
tt runs start <spec-id> --dataset <dataset-id>
|
|
299
|
-
```
|
|
300
|
-
|
|
301
|
-
Export a model to GGUF and package it for Ollama (so it's pluggable like any
|
|
302
|
-
other local model, e.g. in OpenClaw via Ollama's native `/api/chat`):
|
|
303
|
-
|
|
304
|
-
```bash
|
|
305
|
-
# Convert + quantize to GGUF, write a Modelfile, and run `ollama create`
|
|
306
|
-
tt models export <model-id> --format gguf --quant q4_k_m --ollama
|
|
307
|
-
|
|
308
|
-
# Inspect the planned llama.cpp / ollama commands without running them
|
|
309
|
-
tt models export <model-id> --quant q8_0 --ollama --print-command
|
|
310
|
-
```
|
|
311
|
-
|
|
312
|
-
This wraps llama.cpp's `convert_hf_to_gguf.py` + `llama-quantize` and Ollama's
|
|
313
|
-
`ollama create`. Point `tt` at your llama.cpp checkout with `--llama-cpp <dir>`
|
|
314
|
-
(or `--convert-script` / `--quantize-bin`); with `--ollama` the behaviour spec's
|
|
315
|
-
system prompt is embedded as the Modelfile `SYSTEM` block.
|
|
316
|
-
|
|
317
|
-
For the full command reference, including dataset-backed runs, long-example
|
|
318
|
-
policies, eval token budgets, preflight run estimates, continued fine-tuning,
|
|
319
|
-
evaluation caps, local model serving, configuration, and billing, see the
|
|
202
|
+
For the full command reference, including long-example policies, eval token
|
|
203
|
+
budgets, evaluation caps, and local model serving, see the
|
|
320
204
|
[CLI docs](https://tunedtensor.com/docs/cli).
|
|
321
205
|
|
|
322
206
|
## Development
|