@tuned-tensor/cli 0.4.13 → 0.4.15
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 +17 -139
- package/dist/index.js +808 -18
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
# tt - Tuned Tensor CLI
|
|
2
2
|
|
|
3
|
-
`tt` is the command-line tool for [Tuned Tensor](https://www.tunedtensor.com)
|
|
3
|
+
`tt` is the command-line tool for [Tuned Tensor](https://www.tunedtensor.com).
|
|
4
|
+
Use it to define behaviour specs, validate them, launch fine-tuning runs,
|
|
5
|
+
manage datasets, and download or serve trained models.
|
|
6
|
+
|
|
7
|
+
The main CLI documentation lives at
|
|
8
|
+
[tunedtensor.com/docs/cli](https://tunedtensor.com/docs/cli). This README is a
|
|
9
|
+
short install and development reference.
|
|
4
10
|
|
|
5
11
|
## Install
|
|
6
12
|
|
|
@@ -12,7 +18,7 @@ tt --version
|
|
|
12
18
|
Run from source:
|
|
13
19
|
|
|
14
20
|
```bash
|
|
15
|
-
git clone https://github.com/
|
|
21
|
+
git clone https://github.com/tunedtensor/tuned-tensor-cli.git
|
|
16
22
|
cd tuned-tensor-cli
|
|
17
23
|
npm install
|
|
18
24
|
npm run build
|
|
@@ -21,155 +27,31 @@ npm link
|
|
|
21
27
|
|
|
22
28
|
## Quick Start
|
|
23
29
|
|
|
24
|
-
1) **Authenticate**
|
|
25
|
-
|
|
26
30
|
```bash
|
|
27
31
|
tt auth login
|
|
28
|
-
tt
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
2) **Create a local spec**
|
|
32
|
-
|
|
33
|
-
```bash
|
|
34
|
-
tt init
|
|
35
|
-
# or:
|
|
36
|
-
tt init --name "Customer Support Bot" --model "Qwen/Qwen3.5-2B"
|
|
37
|
-
```
|
|
38
|
-
|
|
39
|
-
Supported spec base models are `Qwen/Qwen3.5-2B`, `Qwen/Qwen3.5-4B`, `google/gemma-4-E2B-it`, `google/gemma-4-E4B-it`, `meta-llama/Llama-3.2-3B-Instruct`, `microsoft/Phi-4-mini-instruct`, `ibm-granite/granite-3.3-2b-instruct`, and `bigcode/starcoder2-3b`.
|
|
32
|
+
tt init --name "Customer Support Bot" --model Qwen/Qwen3.5-2B
|
|
40
33
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
```bash
|
|
44
|
-
tt models base
|
|
45
|
-
tt models base --json
|
|
46
|
-
```
|
|
47
|
-
|
|
48
|
-
3) **Validate your spec**
|
|
49
|
-
|
|
50
|
-
```bash
|
|
34
|
+
# Edit tunedtensor.json, then:
|
|
51
35
|
tt eval
|
|
52
|
-
```
|
|
53
|
-
|
|
54
|
-
4) **Push your spec**
|
|
55
|
-
|
|
56
|
-
```bash
|
|
57
36
|
tt push
|
|
58
|
-
```
|
|
59
|
-
|
|
60
|
-
5) **Start and watch a run**
|
|
61
|
-
|
|
62
|
-
```bash
|
|
63
37
|
tt runs start <spec-id>
|
|
64
|
-
tt runs start <spec-id> --dataset <dataset-id-or-prefix> --train-ratio 0.8 --validation-ratio 0.1 --test-ratio 0.1
|
|
65
|
-
tt runs start <spec-id> --no-llm-judge
|
|
66
38
|
tt runs watch <run-id>
|
|
67
39
|
```
|
|
68
40
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
## Typical Workflows
|
|
41
|
+
Useful discovery commands:
|
|
72
42
|
|
|
73
43
|
```bash
|
|
74
|
-
# Account
|
|
75
|
-
tt auth status
|
|
76
|
-
tt balance
|
|
77
|
-
tt topup --amount 25
|
|
78
|
-
|
|
79
|
-
# Specs
|
|
80
44
|
tt specs list
|
|
81
|
-
tt specs get <spec-id>
|
|
82
|
-
tt specs create --file spec.json
|
|
83
|
-
tt specs update <spec-id> --file updates.json
|
|
84
|
-
|
|
85
|
-
# Runs
|
|
86
|
-
tt runs list --spec <spec-id>
|
|
87
|
-
tt runs get <run-id>
|
|
88
|
-
tt runs start <spec-id> --epochs 5 --lr 0.0001 --batch-size 8
|
|
89
|
-
tt runs start <spec-id> --dataset <dataset-id-or-prefix> --train-ratio 0.8 --validation-ratio 0.1 --test-ratio 0.1
|
|
90
|
-
tt runs start <spec-id> --no-llm-judge
|
|
91
|
-
tt runs cancel <run-id>
|
|
92
|
-
|
|
93
|
-
# Datasets
|
|
94
|
-
tt datasets upload data.jsonl --name "Support Training Set"
|
|
95
45
|
tt datasets list
|
|
96
|
-
tt
|
|
97
|
-
|
|
98
|
-
# Models
|
|
99
|
-
tt models base
|
|
46
|
+
tt runs list
|
|
100
47
|
tt models list
|
|
101
|
-
tt models
|
|
102
|
-
tt
|
|
103
|
-
tt models setup-runtime
|
|
104
|
-
tt models serve <model-id> --spec tunedtensor.json
|
|
105
|
-
tt models serve ./model --port 8000
|
|
106
|
-
```
|
|
107
|
-
|
|
108
|
-
Use `--dataset <dataset-id-or-prefix>` with `tt runs start` to train from an uploaded dataset instead of inline spec examples. Add `--train-ratio`, `--validation-ratio`, and `--test-ratio` to override the default 80/10/10 split.
|
|
109
|
-
|
|
110
|
-
Use `--max-eval-examples <n>` and `--max-test-eval-examples <n>` with `tt runs start` to cap primary and secondary test evaluation passes for larger datasets; the runs backend still clamps values to its configured ceiling.
|
|
111
|
-
|
|
112
|
-
Use `--no-llm-judge` with `tt runs start` to opt out of LLM judging for a new run.
|
|
113
|
-
|
|
114
|
-
`tt models download` downloads models that have a Tuned Tensor-hosted artifact. In interactive terminals it shows download progress, transfer rate, and ETA; `--json` output remains machine-readable. Hosted models can still be used for inference through their model ID, but may not expose downloadable weights.
|
|
115
|
-
|
|
116
|
-
`tt models setup-runtime` installs an isolated local Python runtime for reference serving. It chooses Python 3.10-3.12, creates a managed venv in the Tuned Tensor cache, and installs `torch`, `transformers`, `accelerate`, and `safetensors`. This can take a few minutes the first time.
|
|
117
|
-
|
|
118
|
-
`tt models serve` starts a local OpenAI-compatible reference server for a model ID, an extracted model directory, or a `.tar.gz` artifact. It auto-detects `tunedtensor.json` in the current directory or model directory and applies the compiled behavior spec as the default system prompt, so inference matches the prompt contract used during training. Use `--spec <path>` to point at a specific spec, or `--no-spec-prompt` when you intentionally want raw model behavior. If no compatible Python serving runtime is available, run `tt models setup-runtime` first.
|
|
119
|
-
|
|
120
|
-
```bash
|
|
121
|
-
tt models setup-runtime
|
|
122
|
-
tt models serve <model-id> --spec tunedtensor.json
|
|
123
|
-
tt models serve <model-id> --spec tunedtensor.json --device mps # Apple Silicon
|
|
124
|
-
tt models serve <model-id> --spec tunedtensor.json --device cuda # NVIDIA GPU
|
|
125
|
-
|
|
126
|
-
curl http://127.0.0.1:8000/v1/chat/completions \
|
|
127
|
-
-H 'content-type: application/json' \
|
|
128
|
-
-d '{"messages":[{"role":"user","content":"Hello"}]}'
|
|
129
|
-
```
|
|
130
|
-
|
|
131
|
-
## Billing & Credits
|
|
132
|
-
|
|
133
|
-
Tuned Tensor uses prepaid credits. New accounts start at a zero balance, so top up before starting your first fine-tuning run; you only pay for successful runs.
|
|
134
|
-
|
|
135
|
-
```bash
|
|
136
|
-
tt balance # show credit balance and recent transactions
|
|
137
|
-
tt topup --amount 25 # opens Stripe Checkout in your browser
|
|
138
|
-
tt topup --amount 25 --no-open # print the URL instead
|
|
139
|
-
```
|
|
140
|
-
|
|
141
|
-
`tt balance` shows your current credit balance. If a run is rejected with
|
|
142
|
-
`402 insufficient_credits`, top up and retry.
|
|
143
|
-
|
|
144
|
-
## Spec Validation
|
|
145
|
-
|
|
146
|
-
`tt eval` validates your local `tunedtensor.json`. It checks required fields, confirms examples are present, warns when guidelines are missing, and checks simple constraints against example outputs. It does not call a model or the Playground API.
|
|
147
|
-
|
|
148
|
-
## Global Flags
|
|
149
|
-
|
|
150
|
-
- `-k, --api-key <key>`: override stored API key
|
|
151
|
-
- `-u, --base-url <url>`: override API base URL
|
|
152
|
-
- `--json`: machine-readable output
|
|
153
|
-
- `--no-color`: disable ANSI colors
|
|
154
|
-
- `-h, --help`: command help
|
|
155
|
-
|
|
156
|
-
Examples:
|
|
157
|
-
|
|
158
|
-
```bash
|
|
159
|
-
tt specs list --json
|
|
160
|
-
tt runs get <run-id> --json
|
|
161
|
-
tt runs start --help
|
|
48
|
+
tt models base
|
|
49
|
+
tt balance
|
|
162
50
|
```
|
|
163
51
|
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
API key precedence:
|
|
169
|
-
|
|
170
|
-
1. `--api-key`
|
|
171
|
-
2. `TUNED_TENSOR_API_KEY`
|
|
172
|
-
3. stored config
|
|
52
|
+
For the full command reference, including dataset-backed runs, evaluation caps,
|
|
53
|
+
local model serving, configuration, and billing, see the
|
|
54
|
+
[CLI docs](https://tunedtensor.com/docs/cli).
|
|
173
55
|
|
|
174
56
|
## Development
|
|
175
57
|
|
|
@@ -181,10 +63,6 @@ npm run typecheck
|
|
|
181
63
|
npm test
|
|
182
64
|
```
|
|
183
65
|
|
|
184
|
-
## Troubleshooting
|
|
185
|
-
|
|
186
|
-
If the API rejects a spec with a generic server error, check that `base_model` is one of the supported spec base models listed above.
|
|
187
|
-
|
|
188
66
|
## License
|
|
189
67
|
|
|
190
68
|
MIT
|