@tuned-tensor/cli 0.23.0 → 0.25.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 +90 -5
- package/dist/{chunk-RPWOCVIL.js → chunk-7RJGLRMO.js} +750 -3131
- package/dist/chunk-7RJGLRMO.js.map +1 -0
- package/dist/chunk-UCJCWJ6F.js +2809 -0
- package/dist/chunk-UCJCWJ6F.js.map +1 -0
- package/dist/index.js +1158 -403
- package/dist/index.js.map +1 -1
- package/dist/local-runtime.js +183 -71
- package/dist/local-runtime.js.map +1 -1
- package/dist/prefetch-GP3OPUUL.js +18 -0
- package/dist/prefetch-GP3OPUUL.js.map +1 -0
- package/docs/local-runtime/architecture.md +1 -1
- package/docs/spec-workflow.md +17 -3
- package/package.json +7 -4
- package/training/adapter/src/prefetch.py +11 -5
- package/dist/chunk-RPWOCVIL.js.map +0 -1
package/README.md
CHANGED
|
@@ -205,7 +205,31 @@ search public Hugging Face model or dataset metadata for foundation and
|
|
|
205
205
|
fine-tuning discovery. A Hub search sends only the search query to
|
|
206
206
|
`huggingface.co`; it uses no Hugging Face token, downloads nothing, and omits
|
|
207
207
|
model-card and dataset-card text. Search results are discovery metadata, not a
|
|
208
|
-
guarantee that a model or dataset is compatible with a TT workflow.
|
|
208
|
+
guarantee that a model or dataset is compatible with a TT workflow. The agent
|
|
209
|
+
can inspect a public dataset's exact JSONL/Parquet filenames, sizes, revision,
|
|
210
|
+
and declared columns/splits before proposing a download. Declared schema comes
|
|
211
|
+
from dataset-card metadata; it is not validation of the file contents.
|
|
212
|
+
|
|
213
|
+
To reuse a download, ask “Which datasets have we downloaded?” followed by
|
|
214
|
+
“Use CodeAlpaca in this spec for fine-tuning.” The agent can list TT-recorded
|
|
215
|
+
local datasets and inspect actual Parquet columns/row counts or sampled JSONL
|
|
216
|
+
fields, plus two bounded sample rows. It proposes a `dataset_prebuilt` pointer
|
|
217
|
+
with the cached revision, training file, separate validation/test file and
|
|
218
|
+
column mapping. Approval saves the edit; listing and inspection need no
|
|
219
|
+
download or approval. Existing examples and model settings stay in the spec,
|
|
220
|
+
but prebuilt data supplies the training rows instead of automatically mixing
|
|
221
|
+
in the inline examples. Samples do not establish full dataset quality, and a
|
|
222
|
+
download with only a training split still needs distinct held-out data.
|
|
223
|
+
|
|
224
|
+
When a conversation approaches the model's context budget, TT automatically
|
|
225
|
+
summarizes earlier turns using Pi and the selected model, and shows progress.
|
|
226
|
+
The summary preserves goals, decisions and action outcomes and is saved for
|
|
227
|
+
`/resume`; recent exchanges remain in context. Summarization uses an additional
|
|
228
|
+
model request (or several for unusually long histories). The transcript stays
|
|
229
|
+
in local history subject to the existing storage limits, and pending approvals
|
|
230
|
+
remain intact. If the current request is still too large, summarization fails,
|
|
231
|
+
or the model stops at its token limit, TT reports the problem instead of silently
|
|
232
|
+
returning to the prompt. A failed summary does not replace the saved one.
|
|
209
233
|
|
|
210
234
|
For educational questions about how or why training works, the agent can read
|
|
211
235
|
the exact Python implementation shipped with the running TT build. The source
|
|
@@ -545,12 +569,73 @@ tt datasets verify tunedtensor.json # offline checksum check of the cached f
|
|
|
545
569
|
tt pipeline run --spec tunedtensor.json # downloads automatically if still missing
|
|
546
570
|
```
|
|
547
571
|
|
|
548
|
-
|
|
549
|
-
|
|
572
|
+
In `tt agent`, ask it to download a dataset or model. It proposes the same
|
|
573
|
+
`tt datasets prefetch` or `tt models prefetch` command and runs it after you
|
|
574
|
+
approve. The source does not have to be in the spec yet: download first, look at
|
|
575
|
+
it, then ask the agent to adopt it, and it proposes a spec edit pinned to the
|
|
576
|
+
commit the download resolved. A download alone needs a training filename, not
|
|
577
|
+
a validation split or column mapping; those are required when configuring training.
|
|
578
|
+
Approval checks the workspace, spec and adjacent legacy runner configuration,
|
|
579
|
+
then runs a private snapshot of the reviewed settings. Later edits cannot redirect
|
|
580
|
+
the running download. After a failure or cancellation, ask for a new download
|
|
581
|
+
proposal to resume from the cache.
|
|
582
|
+
|
|
583
|
+
### Downloads and the lock file
|
|
584
|
+
|
|
585
|
+
Any Hugging Face dataset files or model can be downloaded without editing a spec:
|
|
586
|
+
|
|
587
|
+
```bash
|
|
588
|
+
tt datasets prefetch --repo HuggingFaceH4/ultrachat_200k \
|
|
589
|
+
--training data/train_sft-00000-of-00003.parquet --test data/test_sft-00000-of-00001.parquet
|
|
590
|
+
tt models prefetch --repo Qwen/Qwen3-4B-Instruct-2507 # add --revision <sha> to pin
|
|
591
|
+
```
|
|
592
|
+
|
|
593
|
+
Direct downloads also work before a spec exists or while it is invalid; those
|
|
594
|
+
workspaces use the default cache. An approved agent download reports the commit
|
|
595
|
+
from that command's result for a later spec edit.
|
|
596
|
+
|
|
597
|
+
Files stay in the Hugging Face cache (`HF_HOME`, or `runtime.paths.modelCache`).
|
|
598
|
+
Each download also writes a manifest with the repo, commit, file digests and
|
|
599
|
+
location under `~/.tuned-tensor/assets/`, so downloads are easy to find later:
|
|
600
|
+
|
|
601
|
+
```bash
|
|
602
|
+
tt assets list # everything downloaded, newest first
|
|
603
|
+
tt assets path org/name # where it is on disk (org/name@<sha> for one revision)
|
|
604
|
+
tt assets verify [org/name] # re-hash the files against their manifests
|
|
605
|
+
```
|
|
606
|
+
|
|
607
|
+
`tunedtensor.lock.json` beside the spec pins what a project trains on, the way
|
|
608
|
+
`.terraform.lock.hcl` pins providers: the dataset and base-model repo, commit,
|
|
609
|
+
and each file's Hugging Face content digest (`sha256:` for LFS files,
|
|
610
|
+
`git-sha1:` for small git files). `tt datasets prefetch` and `tt models prefetch`
|
|
611
|
+
for the spec write it, and the first real run records any entry it is missing.
|
|
612
|
+
After that, `tt pipeline run`:
|
|
613
|
+
|
|
614
|
+
- uses the locked commit when the spec's dataset does not pin `revision`;
|
|
615
|
+
- re-hashes the cached bytes and stops if the spec names another repo or revision,
|
|
616
|
+
a cached file's digest differs, or a locked model file is missing. If the change is intended, rerun the matching
|
|
617
|
+
`prefetch` command for the spec to update the lock.
|
|
618
|
+
|
|
619
|
+
A first local run with an empty model cache downloads and locks the model before
|
|
620
|
+
training starts. Dry runs never download assets or write the lock.
|
|
621
|
+
|
|
622
|
+
An unpinned dataset stays on its locked commit, including for `tt datasets prefetch`.
|
|
623
|
+
To move it to a newer commit, pin that `revision` in the spec and prefetch again.
|
|
624
|
+
|
|
625
|
+
Commit the lock file with the spec. Runs that load the base model from
|
|
626
|
+
`runtime.paths.baseModel` or on an AWS GPU host check only the dataset.
|
|
627
|
+
|
|
628
|
+
- Split paths are files inside the repo: one `.jsonl` or `.parquet` file per
|
|
629
|
+
split (pick one shard of a sharded split). CSV is not supported yet.
|
|
630
|
+
- Parquet supports Snappy, gzip, zstd, Brotli and LZ4 compression, as well as
|
|
631
|
+
uncompressed files.
|
|
550
632
|
- Without `columns`, files must already be TT chat JSONL whose system message
|
|
551
633
|
matches the spec. With `columns`, each record's `input` and `output` fields
|
|
552
|
-
become chat rows that use the spec's instruction.
|
|
553
|
-
|
|
634
|
+
become chat rows that use the spec's instruction. Parquet files require
|
|
635
|
+
`columns`. For chat datasets such as `HuggingFaceH4/ultrachat_200k`, use
|
|
636
|
+
`"columns": { "messages": "messages" }`: each conversation's first user turn
|
|
637
|
+
and the assistant reply that follows become one example; later turns are not
|
|
638
|
+
used. Records missing a mapped field are skipped. Evaluation splits keep the first of any duplicate input,
|
|
554
639
|
and training drops inputs that also appear in an evaluation split. The run
|
|
555
640
|
report lists every skipped or dropped count.
|
|
556
641
|
- Without `revision`, TT uses the cached `main` snapshot and records the commit
|