@tuned-tensor/cli 0.21.0 → 0.22.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 CHANGED
@@ -460,6 +460,12 @@ tt pipeline run --spec tunedtensor.json --dry-run
460
460
  tt pipeline run --spec tunedtensor.json
461
461
  ```
462
462
 
463
+ `tt models prefetch` shows a progress bar with transfer rate and ETA. Large
464
+ downloads survive flaky networks: TT pins the requested revision to one commit,
465
+ retries interrupted transfers with backoff (`TT_HF_DOWNLOAD_MAX_ATTEMPTS`,
466
+ default 10), and keeps completed files in the Hugging Face cache, so running the
467
+ command again resumes instead of starting over.
468
+
463
469
  These commands read runtime and evaluation settings from the core spec. The preview needs
464
470
  no GPU or AWS connection. Results return to the local run and model stores:
465
471
 
@@ -468,6 +474,83 @@ tt runs report <run-id>
468
474
  tt models verify local-<run-id>
469
475
  ```
470
476
 
477
+ ### Train on a Hugging Face dataset
478
+
479
+ Point `dataset_prebuilt` at files in a Hugging Face dataset repo instead of
480
+ local paths. It works like `base_model`: name the repo, pin a commit, and TT
481
+ downloads it into the same Hugging Face cache.
482
+
483
+ ```json
484
+ {
485
+ "dataset_prebuilt": {
486
+ "huggingface": {
487
+ "repo": "SetFit/tweet_sentiment_extraction",
488
+ "revision": "0d5359cfbb2470332f2b82e62269cf755e0ac5c3",
489
+ "columns": { "input": "text", "output": "label_text" }
490
+ },
491
+ "training": "train.jsonl",
492
+ "test": "test.jsonl"
493
+ }
494
+ }
495
+ ```
496
+
497
+ ```bash
498
+ tt datasets prefetch tunedtensor.json # download with progress; rerun to resume
499
+ tt datasets verify tunedtensor.json # offline checksum check of the cached files
500
+ tt pipeline run --spec tunedtensor.json # downloads automatically if still missing
501
+ ```
502
+
503
+ - Split paths are files inside the repo and must be JSONL. Parquet and CSV are
504
+ not supported yet.
505
+ - Without `columns`, files must already be TT chat JSONL whose system message
506
+ matches the spec. With `columns`, each record's `input` and `output` fields
507
+ become chat rows that use the spec's instruction. Records missing either
508
+ field are skipped. Evaluation splits keep the first of any duplicate input,
509
+ and training drops inputs that also appear in an evaluation split. The run
510
+ report lists every skipped or dropped count.
511
+ - Without `revision`, TT uses the cached `main` snapshot and records the commit
512
+ it resolved. `tt validate` and `tt datasets prefetch` flag the spec as
513
+ unpinned. Pin the commit for reproducible runs.
514
+ - Runs never contact the Hub after the download. Each run checks every file
515
+ against its content-addressed blob and records the repo, commit, file
516
+ SHA-256s and conversion counts in `run_metadata.dataset_source`.
517
+ - Gated datasets use `HF_TOKEN`, as model downloads do.
518
+
519
+ ### Run records and audit
520
+
521
+ `tt pipeline run` prints each stage live with the time since the run started.
522
+ `--verbose` adds training and evaluation process output, and `--quiet` hides
523
+ both. Full logs stay in the run directory either way.
524
+
525
+ Every run report has a `provenance` block recording what produced it:
526
+
527
+ - TT, Node and platform versions, and the digest of the locked Python runtime;
528
+ - where training ran (local, or the AWS instance and region);
529
+ - the spec file and snapshot digests;
530
+ - the base model id, revision and content fingerprint;
531
+ - every dataset file's SHA-256, the compiled training data digest, and the
532
+ evaluation split and seed;
533
+ - the hyperparameters and the training exit code.
534
+
535
+ The run's event log is hash-chained: each event records the previous event's
536
+ hash. When a run completes, TT records the report's SHA-256.
537
+
538
+ ```bash
539
+ tt runs audit <run-id>
540
+ ```
541
+
542
+ `tt runs audit` checks the event chain and re-hashes the report, then prints
543
+ the stage timeline with durations and the provenance. Its verdict is
544
+ `verified`, `incomplete` (older TT versions or unfinished runs) or `tampered`.
545
+ `tampered` exits with code 2 and names the edited event or file; removing the
546
+ completion event or emptying the log also counts as tampering.
547
+
548
+ `tt publish` runs the same audit and uploads the summary with the report. It
549
+ refuses tampered evidence. It also stops on unverifiable evidence, such as runs
550
+ from older TT versions or logs with unreadable lines, unless you pass
551
+ `--allow-unverified`. The chain makes edits evident; it is not a signature, so
552
+ anyone with write access to the store can rewrite the whole log.
553
+
471
554
  Serving still runs on the machine executing `tt serve` and requires a local
472
555
  Linux/CUDA GPU, even when training used AWS:
473
556