@tuned-tensor/cli 0.25.0 → 0.26.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 CHANGED
@@ -72,6 +72,8 @@ npm install -g --ignore-scripts @tuned-tensor/cli
72
72
  tt --version
73
73
  ```
74
74
 
75
+ `TT` also works on case-insensitive filesystems, including standard macOS installs.
76
+ On case-sensitive systems, use `tt` or add a shell alias (`alias TT=tt`).
75
77
  Upgrade later with `tt upgrade`. Uninstall with `npm uninstall -g @tuned-tensor/cli` (add
76
78
  `--prefix ~/.local` if the curl installer used that prefix).
77
79
 
@@ -95,7 +97,7 @@ npm link
95
97
 
96
98
  `tunedtensor.json` is the source of truth for behavior and training settings.
97
99
  In the shell, `/spec` shows a readable overview grouped into behavior,
98
- examples, training, evaluation and runtime sections; `/spec <section>` (for
100
+ dataset, examples, training, evaluation and runtime sections; `/spec <section>` (for
99
101
  example `/spec examples`) shows one section in full and `/spec show` prints the
100
102
  highlighted JSON. `/spec diff`, `/spec validate`, and `/spec history` complete
101
103
  the review, all without a model call. Outside the shell, `tt spec view` and
@@ -176,21 +178,22 @@ the agent:
176
178
  ```text
177
179
  tt v0.15.0
178
180
  agent tunedtensor/managed · workflow model base
179
- ctrl+c stop/clear · ctrl+d exit · /help commands · tab complete
181
+ tt › What would you like to work on?
182
+ /help commands · ctrl+c stop · ctrl+d exit
180
183
 
181
- Ask TT anything. Known commands run directly.
182
184
  › What happened in my latest training run?
183
185
  › runs list
184
186
  ```
185
187
 
186
- Ordinary sentences go through the locally orchestrated model session. The
188
+ Known commands such as `runs list` run directly; tab completes them. Ordinary
189
+ sentences go through the locally orchestrated model session. The
187
190
  model has no shell or general filesystem tool. It can read and propose reviewed
188
- edits to an existing spec, or prepare one new folder directly beneath the shell's current working directory with a validated
189
- `tunedtensor.json`, or prepare a local pipeline dry-run sealed to the reviewed
191
+ edits to an existing spec, or prepare a validated `tunedtensor.json` in the shell's current working directory
192
+ when none exists, or prepare a local pipeline dry-run sealed to the reviewed
190
193
  workspace and spec contents. Writes and pipeline previews wait for your approval: after the
191
194
  answer, tt shows the proposal and asks inline, where `y` approves, `n` rejects and `Esc`
192
195
  leaves it pending for a later `/approve` or `/reject`. Any other key is ignored. The tools refuse path
193
- traversal, symlinked workspace roots, overwriting a new-project target, unsupported spec
196
+ traversal, symlinked workspace roots, overwriting an existing spec, unsupported spec
194
197
  fields, cloud pipeline targets, and spec changes after review. Known CLI
195
198
  commands such as `runs list`, `doctor`, and `models list` still execute directly.
196
199
  Prefix a command with `:` when you want to make that intent explicit.
@@ -223,6 +226,10 @@ download with only a training split still needs distinct held-out data.
223
226
 
224
227
  When a conversation approaches the model's context budget, TT automatically
225
228
  summarizes earlier turns using Pi and the selected model, and shows progress.
229
+ The trigger reserves the full reply allowance plus 4,096 tokens for protocol
230
+ headroom; it does not apply an additional percentage reserve. Usage measured
231
+ before a summary is ignored, while new provider usage calibrates the next
232
+ trigger, including after resume.
226
233
  The summary preserves goals, decisions and action outcomes and is saved for
227
234
  `/resume`; recent exchanges remain in context. Summarization uses an additional
228
235
  model request (or several for unusually long histories). The transcript stays
@@ -258,20 +265,63 @@ sealed as `outcome_unknown` for manual inspection. `/reject` never mutates.
258
265
  Pipeline dry-runs also wait for `/approve`. Preparation fingerprints the
259
266
  workspace directory identity, spec, and adjacent config, revalidates them,
260
267
  copies the resolved spec, config, and pipeline into private temporary inputs,
261
- and invokes `tt pipeline run --dry-run` deterministically. Persisted proposals
262
- that request real execution fail before the child command is dispatched. Real
263
- training remains available through the explicit direct `tt pipeline run` command.
268
+ and invokes `tt pipeline run --dry-run` deterministically. A dry-run proposal
269
+ edited to request real execution fails before the child command is dispatched.
270
+ After a dry-run of the same spec bytes completes, the agent can propose a real
271
+ background run with a reason; approval starts it in a detached process and the
272
+ conversation continues. The agent reports progress with read-only tools and can
273
+ cancel a run only through another approval. Each run keeps an audit record
274
+ (reason, requester, choices, resources, outcome and metrics), a hash-chained event
275
+ log and its full log; `TT_MAX_PARALLEL_RUNS` limits concurrent runs. See
276
+ [background runs](docs/local-runtime/background-runs.md). The direct
277
+ `tt pipeline run` and `tt pipeline start` commands remain available.
264
278
  A changed workspace or spec requires a new review.
265
279
 
280
+ The startup **What you can do** panel covers specs/datasets, decision training,
281
+ LLM fine-tuning, training from scratch, and serving even before a spec exists.
282
+ Decision training can use CPU or Apple MPS; the other training paths currently
283
+ require CUDA locally or a configured AWS GPU. A missing NVIDIA GPU does not
284
+ prevent spec creation or dataset preparation. The banner lists ready workflows on
285
+ one line and shows only the status of the rest; `/system` adds reasons and next steps.
286
+
287
+ Guidance distinguishes **Ready**, **Needs setup**, **Limited resources**,
288
+ **Remote GPU**, **Needs verification**, and **Unsupported runtime**. Quick
289
+ startup sampling does not install Python dependencies. `tt hardware` explicitly
290
+ checks the locked adapter and decision runtimes separately, including MPS
291
+ availability; it may install those runtimes on first use. It does not download
292
+ models or certify their fit. Old snapshots without a decision probe show
293
+ "Needs verification" until refreshed.
294
+
295
+ | Platform | Decision training | LLM / foundation training | Packaged LLM serving |
296
+ | --- | --- | --- | --- |
297
+ | Linux x64 / ARM64 | CPU; CUDA when available | NVIDIA CUDA, subject to memory and runtime checks | Linux + NVIDIA CUDA; separate runtime |
298
+ | Apple Silicon macOS | CPU / MPS after runtime checks | Remote AWS GPU | Remote Linux/CUDA host |
299
+ | Native Windows x64 | CPU path; end-to-end training not yet certified | Not certified natively; check a Linux/WSL2 environment or use AWS | Linux/CUDA host |
300
+ | Intel macOS / Windows ARM64 | No compatible wheels in the current lockfiles | Remote AWS GPU | Remote Linux/CUDA host |
301
+
302
+ The native Windows CI job verifies hardware discovery and displayed guidance,
303
+ not model training. WSL is assessed as its own Linux environment. AMD/Intel GPU
304
+ acceleration is not enabled by the packaged CUDA runtime. Decision resource
305
+ warnings use conservative advisory thresholds (8 GiB available working memory,
306
+ 6 GiB free model-cache disk, 4 CPU cores); they are not measured model minima.
307
+ Batch size, sequence length, training mode and other running applications matter.
308
+ CPU evaluation does not imply that `tt serve` can run on CPU. Agent chat still
309
+ needs managed access or your own model provider; local data commands need neither.
310
+
266
311
  Useful shell controls include `/help`, `/status`, `/context`, `/system`,
267
- `/model`, `/login`, `/cd`, `/clear`, and `/exit`.
312
+ `/usage` (managed agent allowance and token usage), `/model`, `/login`, `/cd`, `/clear`, and `/exit`.
268
313
  When the shell opens, the TT logo mark (drawn in the terminal) greets you with the current spec, a
269
314
  live machine panel (GPU utilization, VRAM and temperature from `nvidia-smi`,
270
- CPU, RAM, and free space in the model cache) and whether this machine can
315
+ CPU, RAM, and free space on the model-cache filesystem) and whether this machine can
271
316
  fine-tune the spec's base model, plus a suggested next step. `/system` refreshes
272
317
  that panel and lists every certified base model's verdict. Fit verdicts come
273
318
  from the same certified memory profiles as `tt hardware`; a fresh
274
319
  `tt hardware` snapshot takes precedence over the quick live check.
320
+ On macOS, RAM marked `in use (est.)` excludes estimated reclaimable file cache;
321
+ decision-training warnings use the same available-RAM estimate. This is not a
322
+ memory-pressure measurement or a guarantee that a workload fits. CPU load is a
323
+ one-minute average, separate from the sampled utilization percentage. Disk usage
324
+ describes the filesystem containing the cache, not the size of downloaded models.
275
325
  The shell banner and `/context` show the inference selection (`agent
276
326
  provider/model`) separately from the workflow model. The managed alias identifies
277
327
  inference through the server-selected model. Run `/model` with no arguments to
@@ -652,6 +702,13 @@ Commit the lock file with the spec. Runs that load the base model from
652
702
  `--verbose` adds training and evaluation process output, and `--quiet` hides
653
703
  both. Full logs stay in the run directory either way.
654
704
 
705
+ Adapter evaluation batches four prompts by default, reports
706
+ completed examples and ETA, and saves completed batches for recovery. Set
707
+ `evaluation.inference.batchSize` to tune memory use; `evaluation.maxExamples`
708
+ and `sampleSeed` select an explicit smoke sample. Matching interrupted
709
+ baselines automatically continue on retry with the default baseline cache.
710
+ See [evaluation settings and recovery](docs/local-runtime/architecture.md#evaluation).
711
+
655
712
  Every run report has a `provenance` block recording what produced it:
656
713
 
657
714
  - TT, Node and platform versions, and the digest of the locked Python runtime;
@@ -756,6 +813,26 @@ For the full command reference, including long-example policies, eval token
756
813
  budgets, evaluation caps, and local model serving, see the
757
814
  [CLI docs](https://tunedtensor.com/docs/cli).
758
815
 
816
+ ### Split a master dataset
817
+
818
+ Keep converted datasets as unsplit chat JSONL. Downloaded chat JSONL can be
819
+ split directly from its verified cache: ask the agent to inspect the download
820
+ and use its pinned `split_source`, with no manual copy. Ask it to split a named
821
+ file with your ratios and seed, then attach the approved paths to your spec.
822
+ For example: “Split data.jsonl 80/20 for training and validation with seed 123,
823
+ stratify by metadata.category, and save to split-123.”
824
+
825
+ ```sh
826
+ tt datasets inspect data.jsonl
827
+ tt datasets split data.jsonl --output split-123 --train .8 --validation .2 --test 0 --seed 123
828
+ ```
829
+
830
+ The source stays unchanged. Groups containing repeated prompts stay in training
831
+ so held-out prompts remain unique;
832
+ optional `--group-by` and `--stratify-by` support family and label boundaries.
833
+ See [splitting local data](docs/spec-workflow.md#splitting-an-unsplit-dataset)
834
+ for defaults, metadata preservation, and benchmark holdout limitations.
835
+
759
836
  ## Development
760
837
 
761
838
  ```bash
@@ -250,6 +250,7 @@ async function listArtifactFiles(root, current = root) {
250
250
  throw new Error(`Artifact tree must not contain symbolic links: ${absolute}`);
251
251
  }
252
252
  if (entry.isDirectory()) {
253
+ if (portableRelative(root, absolute) === "inference-checkpoints") continue;
253
254
  files.push(...await listArtifactFiles(root, absolute));
254
255
  continue;
255
256
  }
@@ -1341,6 +1342,7 @@ var runReportSchema = z.object({
1341
1342
  created_at: z.string()
1342
1343
  }).strict();
1343
1344
  var inferenceConfigSchema = z.object({
1345
+ batchSize: z.number().int().min(1).max(128).default(4),
1344
1346
  maxNewTokens: z.number().int().min(1).default(256),
1345
1347
  temperature: z.number().min(0).default(0),
1346
1348
  topP: z.number().min(0).max(1).default(1),
@@ -1352,6 +1354,7 @@ var scoringConfigSchema = z.object({
1352
1354
  }).strict();
1353
1355
  var evaluationConfigSchema = z.object({
1354
1356
  inference: inferenceConfigSchema.default({
1357
+ batchSize: 4,
1355
1358
  maxNewTokens: 256,
1356
1359
  temperature: 0,
1357
1360
  topP: 1,
@@ -1389,6 +1392,7 @@ var localRunnerConfigSchema = z.object({
1389
1392
  }).strict().default({}),
1390
1393
  evaluation: evaluationConfigSchema.default({
1391
1394
  inference: {
1395
+ batchSize: 4,
1392
1396
  maxNewTokens: 256,
1393
1397
  temperature: 0,
1394
1398
  topP: 1,
@@ -1747,7 +1751,7 @@ function buildDecisionPythonCommand(entrypoint, args = []) {
1747
1751
  "--project",
1748
1752
  decisionProject,
1749
1753
  "python",
1750
- join3(decisionProject, "src", entrypoint),
1754
+ entrypoint === "-c" ? entrypoint : join3(decisionProject, "src", entrypoint),
1751
1755
  ...args
1752
1756
  ];
1753
1757
  return { command: "uv", commandArgs, displayCommand: ["uv", ...commandArgs] };
@@ -2241,7 +2245,7 @@ async function enforceSpecLock(args) {
2241
2245
  `Base model ${model.id}@${revision} is not downloaded (${snapshot}). Run \`tt models prefetch\` with this spec first.`
2242
2246
  );
2243
2247
  }
2244
- const { prefetchBaseModel: prefetchBaseModel2 } = await import("./prefetch-GP3OPUUL.js");
2248
+ const { prefetchBaseModel: prefetchBaseModel2 } = await import("./prefetch-DH365HNN.js");
2245
2249
  await prefetchBaseModel2({ request: args.request, config: args.config, reporter: args.reporter });
2246
2250
  }
2247
2251
  const { files } = await snapshotDigests(snapshot);
@@ -2770,6 +2774,9 @@ export {
2770
2774
  localBehaviorSpecFileSchema,
2771
2775
  isFoundationSpecFile,
2772
2776
  isDecisionSpecFile,
2777
+ minimalMachineLearningEnvironment,
2778
+ withHuggingFaceCacheEnvironment,
2779
+ withOfflineHuggingFaceCacheEnvironment,
2773
2780
  reportInBackground,
2774
2781
  withProgressHeartbeat,
2775
2782
  sanitizeLogLine,
@@ -2786,9 +2793,12 @@ export {
2786
2793
  withFoundationPythonEnvironment,
2787
2794
  ProcessCancelledError,
2788
2795
  runLoggedProcess,
2789
- minimalMachineLearningEnvironment,
2790
- withHuggingFaceCacheEnvironment,
2791
- withOfflineHuggingFaceCacheEnvironment,
2796
+ verifyModelPrefetchCacheReport,
2797
+ buildModelPrefetchPayload,
2798
+ buildModelSourcePrefetchPayload,
2799
+ safeName,
2800
+ verifyLocalBaseModel,
2801
+ prefetchBaseModel,
2792
2802
  snapshotDigests,
2793
2803
  recordAssetDownload,
2794
2804
  listAssets,
@@ -2798,12 +2808,6 @@ export {
2798
2808
  readSpecLock,
2799
2809
  writeSpecLockEntry,
2800
2810
  applySpecLock,
2801
- enforceSpecLock,
2802
- verifyModelPrefetchCacheReport,
2803
- buildModelPrefetchPayload,
2804
- buildModelSourcePrefetchPayload,
2805
- safeName,
2806
- verifyLocalBaseModel,
2807
- prefetchBaseModel
2811
+ enforceSpecLock
2808
2812
  };
2809
- //# sourceMappingURL=chunk-UCJCWJ6F.js.map
2813
+ //# sourceMappingURL=chunk-4BHDPRYD.js.map