@tuned-tensor/local
v0.2.7
Published
TT Local: tuning tensors locally on hardware you control.
Readme
TT Local
TT Local runs Tuned Tensor-style fine-tuning jobs on your own machine. It keeps specs, datasets, model artifacts, events, reports, and dashboard state on local disk.
Usage docs:
https://tunedtensor.com/docs/local-training
Install
npm install -g @tuned-tensor/local
tt-local infoThe bundled SFT, DPO, and Transformers evaluator path also needs uv:
uv --versionCustom training or evaluation workflows can use command entrypoints instead of
uv.
The default uv project is included in the npm package at
training/local-runner; using bundled training does not require cloning this
repository.
Before the first real run, you can download the configured Hugging Face base
model into paths.modelCache explicitly:
tt-local models prefetch tunedtensor.json --config local-runner.jsonWithout this step, the first non-dry tt-local run downloads the base model
when baseline evaluation or training first loads it.
DPO
TT Local supports first-class offline DPO for text causal-LM models. Set
training_method to dpo and provide a prebuilt preference JSONL training
dataset:
{
"training_method": "dpo",
"dataset_prebuilt": {
"training": "file://examples/dpo-preferences.jsonl",
"format": "preference_jsonl"
}
}Each preference JSONL row must use explicit prompt, chosen, and rejected
string fields:
{"prompt":"Summarize status: build passed.","chosen":"Build passed.","rejected":"The build failed."}DPO v1 is text-only for the bundled uv trainer. Validation and reporting still
use the existing baseline-vs-candidate evaluation loop, so provide
dataset_prebuilt.test, dataset_prebuilt.validation, or normal
spec_snapshot.examples with reference outputs for evaluation.
Command-backed workflows may use external model ids by setting
spec_snapshot.base_model to an external:<id> or command:<id> value, for
example external:karpathy/nanochat. The bundled uv trainer still requires a
supported Hugging Face base model, but command trainers receive adapter-focused
hyperparameters without injected LoRA/model-loader defaults. Custom
hyperparameter keys are passed through to TT_HYPERPARAMETERS_PATH.
Continuing From a Fine-Tuned Model
Start another loop from an existing TT Local model by passing the stored local model id:
tt-local run tunedtensor.json --parent-model local-<previous-run-id>You can also set the parent adapter artifact explicitly:
tt-local run tunedtensor.json --parent-model-artifact file:///path/to/model.tar.gzFor config-only workflows, put the same value in
hyperparameters.parent_model_artifact. The parent adapter becomes the
baseline for the new run, and the bundled SFT/DPO trainers load it before
continuing LoRA training.
Non-Hugging Face artifacts can describe their layout in training.artifact:
{
"training": {
"backend": "command",
"command": ["python", "train_adapter.py"],
"artifact": {
"framework": "nanochat",
"format": "custom-directory",
"entrypoint": "batch_command",
"servable": false
}
}
}Local Development
npm install
npm run typecheck
npm test
npm run buildRelease notes are in CHANGELOG.md.
License
Apache-2.0
