@tuned-tensor/cli 0.20.0 → 0.21.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 +40 -7
- package/dist/{chunk-4Q54NHKR.js → chunk-PVLX7LJI.js} +381 -148
- package/dist/chunk-PVLX7LJI.js.map +1 -0
- package/dist/index.js +1679 -325
- package/dist/index.js.map +1 -1
- package/dist/local-runtime.js +41 -6
- package/dist/local-runtime.js.map +1 -1
- package/docs/local-runtime/architecture.md +6 -1
- package/docs/local-runtime/decision.md +142 -0
- package/docs/spec-architecture.html +2 -2
- package/docs/spec-workflow.md +11 -3
- package/examples/single-spec/decision/tunedtensor.json +630 -0
- package/package.json +5 -2
- package/training/adapter/src/evaluate.py +14 -7
- package/training/adapter/src/model_contract.py +38 -5
- package/training/adapter/src/prefetch.py +6 -1
- package/training/adapter/src/serve.py +37 -11
- package/training/adapter/src/train.py +8 -0
- package/training/decision/pyproject.toml +25 -0
- package/training/decision/src/common.py +127 -0
- package/training/decision/src/evaluate.py +70 -0
- package/training/decision/src/train.py +181 -0
- package/training/decision/uv.lock +1175 -0
- package/dist/chunk-4Q54NHKR.js.map +0 -1
package/README.md
CHANGED
|
@@ -94,8 +94,12 @@ npm link
|
|
|
94
94
|
## Behavior spec workflow
|
|
95
95
|
|
|
96
96
|
`tunedtensor.json` is the source of truth for behavior and training settings.
|
|
97
|
-
|
|
98
|
-
|
|
97
|
+
In the shell, `/spec` shows a readable overview grouped into behavior,
|
|
98
|
+
examples, training, evaluation and runtime sections; `/spec <section>` (for
|
|
99
|
+
example `/spec examples`) shows one section in full and `/spec show` prints the
|
|
100
|
+
highlighted JSON. `/spec diff`, `/spec validate`, and `/spec history` complete
|
|
101
|
+
the review, all without a model call. Outside the shell, `tt spec view` and
|
|
102
|
+
`tt spec <section>` print the same readable view. Ask the agent for changes, inspect its proposed
|
|
99
103
|
diff, then press `y` when tt asks (or `/approve` later) to save a validated edit
|
|
100
104
|
with revision history. Pipeline
|
|
101
105
|
runs use the saved spec. See [the spec workflow](docs/spec-workflow.md).
|
|
@@ -226,8 +230,15 @@ that request real execution fail before the child command is dispatched. Real
|
|
|
226
230
|
training remains available through the explicit direct `tt pipeline run` command.
|
|
227
231
|
A changed workspace or spec requires a new review.
|
|
228
232
|
|
|
229
|
-
Useful shell controls include `/help`, `/status`, `/context`, `/
|
|
230
|
-
`/login`, `/cd`, `/clear`, and `/exit`.
|
|
233
|
+
Useful shell controls include `/help`, `/status`, `/context`, `/system`,
|
|
234
|
+
`/model`, `/login`, `/cd`, `/clear`, and `/exit`.
|
|
235
|
+
When the shell opens, the TT logo mark (drawn in the terminal) greets you with the current spec, a
|
|
236
|
+
live machine panel (GPU utilization, VRAM and temperature from `nvidia-smi`,
|
|
237
|
+
CPU, RAM, and free space in the model cache) and whether this machine can
|
|
238
|
+
fine-tune the spec's base model, plus a suggested next step. `/system` refreshes
|
|
239
|
+
that panel and lists every certified base model's verdict. Fit verdicts come
|
|
240
|
+
from the same certified memory profiles as `tt hardware`; a fresh
|
|
241
|
+
`tt hardware` snapshot takes precedence over the quick live check.
|
|
231
242
|
The shell banner and `/context` show the inference selection (`agent
|
|
232
243
|
provider/model`) separately from the workflow model. The managed alias identifies
|
|
233
244
|
inference through the server-selected model. Run `/model` with no arguments to
|
|
@@ -260,18 +271,40 @@ optional `gpu` configuration moves its GPU processes to your AWS instance.
|
|
|
260
271
|
The portable document contract lives in `@tuned-tensor/pipeline-contract`. The
|
|
261
272
|
CLI adds execution planning (step selection) on top of it.
|
|
262
273
|
|
|
263
|
-
|
|
274
|
+
Three local engines share that document version:
|
|
264
275
|
|
|
265
276
|
- **Adapter** (default): LoRA SFT on a certified Hugging Face checkpoint.
|
|
266
277
|
Runs through `tt pipeline run`. Uses `train` / `evaluate` / `compare` with
|
|
267
278
|
`evaluate.with.evaluator: "behavior"`.
|
|
279
|
+
Certified models (`Qwen/Qwen3.5-2B`, Nemotron 3.5 Lightning, Muse Glimmer)
|
|
280
|
+
have a reviewed revision, architecture, and memory profile. Any other
|
|
281
|
+
Hugging Face text model can be trained as **uncertified** by pinning its
|
|
282
|
+
commit; it loads as a causal LM with safetensors weights, no remote code,
|
|
283
|
+
and generic LoRA defaults (override them in `hyperparameters`):
|
|
284
|
+
|
|
285
|
+
```json
|
|
286
|
+
{
|
|
287
|
+
"base_model": "mistralai/Mistral-7B-Instruct-v0.3",
|
|
288
|
+
"hyperparameters": { "base_model_revision": "<40-char commit SHA>" }
|
|
289
|
+
}
|
|
290
|
+
```
|
|
291
|
+
|
|
292
|
+
Pick an instruct/chat variant (the trainer needs a chat template) and check
|
|
293
|
+
hardware fit with `tt doctor`, since TT has no memory profile for it.
|
|
268
294
|
- **Foundation**: from-scratch tokenizer + GPT. Also runs through
|
|
269
295
|
`tt pipeline run`. Uses
|
|
270
296
|
`tokenize` / `pretrain` / `finetune` / optional `rl` plus `bpb`, `chat`, and
|
|
271
297
|
`inference` evaluators. Requires a foundation `tunedtensor.json`
|
|
272
298
|
(`engine: "foundation"`, at least two examples, no `base_model`).
|
|
273
|
-
|
|
274
|
-
|
|
299
|
+
- **Decision**: fine-tunes a small typed decision model
|
|
300
|
+
(`convaiinnovations/laya`, 421M) that answers one choice, yes/no or score
|
|
301
|
+
question per input with a probability per label, instead of generating text.
|
|
302
|
+
Uses the adapter vocabulary (`train` / `evaluate` / `compare`) and runs on
|
|
303
|
+
CPU, Apple MPS or CUDA. Requires `engine: "decision"` and a `decision`
|
|
304
|
+
question; example outputs are labels. See
|
|
305
|
+
[Decision models](docs/local-runtime/decision.md).
|
|
306
|
+
|
|
307
|
+
All engines are spec-driven. `system_prompt`, `guidelines`, and `constraints`
|
|
275
308
|
are compiled into one canonical system instruction, and `examples` supply the
|
|
276
309
|
demonstrated behavior. Adapter training, foundation tokenizer/pretraining,
|
|
277
310
|
chat SFT, optional RL, and evaluation all receive that same compiled
|