@tuned-tensor/cli 0.28.1 → 0.30.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 +76 -180
- package/dist/chunk-6CETSU2H.js +260 -0
- package/dist/chunk-6CETSU2H.js.map +1 -0
- package/dist/chunk-B2O6P7EX.js +1623 -0
- package/dist/chunk-B2O6P7EX.js.map +1 -0
- package/dist/{chunk-7CO5DBCY.js → chunk-GMBZ2FE6.js} +5046 -5014
- package/dist/chunk-GMBZ2FE6.js.map +1 -0
- package/dist/chunk-MM75IAY3.js +138 -0
- package/dist/chunk-MM75IAY3.js.map +1 -0
- package/dist/chunk-ST6ZSEUH.js +1272 -0
- package/dist/chunk-ST6ZSEUH.js.map +1 -0
- package/dist/contracts-SHBUXEOQ.js +72 -0
- package/dist/dataset-Y5NEUKI5.js +22 -0
- package/dist/dataset-Y5NEUKI5.js.map +1 -0
- package/dist/index.js +4530 -9349
- package/dist/index.js.map +1 -1
- package/dist/local-runtime.js +84 -467
- package/dist/local-runtime.js.map +1 -1
- package/dist/model-server-IWCRFAOO.js +18 -0
- package/dist/model-server-IWCRFAOO.js.map +1 -0
- package/dist/{prefetch-LBIOO7ZO.js → prefetch-Q2ZA3SJ7.js} +3 -2
- package/dist/prefetch-Q2ZA3SJ7.js.map +1 -0
- package/docs/local-runtime/architecture.md +4 -4
- package/docs/local-runtime/aws-gpu.md +4 -5
- package/docs/local-runtime/decision.md +2 -2
- package/docs/local-runtime/hosting.md +103 -92
- package/docs/local-runtime/model-quality.md +103 -0
- package/docs/local-runtime/serving.md +1 -6
- package/docs/local-runtime/spark.md +2 -3
- package/docs/spec-architecture.html +2 -26
- package/docs/spec-workflow.md +9 -0
- package/node_modules/@isaacs/nonrecursive-glob-match/LICENSE.md +55 -0
- package/node_modules/@isaacs/nonrecursive-glob-match/README.md +364 -0
- package/node_modules/@isaacs/nonrecursive-glob-match/dist/commonjs/index.d.ts +123 -0
- package/node_modules/@isaacs/nonrecursive-glob-match/dist/commonjs/index.d.ts.map +1 -0
- package/node_modules/@isaacs/nonrecursive-glob-match/dist/commonjs/index.js +778 -0
- package/node_modules/@isaacs/nonrecursive-glob-match/dist/commonjs/index.js.map +1 -0
- package/node_modules/@isaacs/nonrecursive-glob-match/dist/commonjs/index.min.js +3 -0
- package/node_modules/@isaacs/nonrecursive-glob-match/dist/commonjs/index.min.js.map +7 -0
- package/node_modules/@isaacs/nonrecursive-glob-match/dist/commonjs/numeric-range.d.ts +15 -0
- package/node_modules/@isaacs/nonrecursive-glob-match/dist/commonjs/numeric-range.d.ts.map +1 -0
- package/node_modules/@isaacs/nonrecursive-glob-match/dist/commonjs/numeric-range.js +76 -0
- package/node_modules/@isaacs/nonrecursive-glob-match/dist/commonjs/numeric-range.js.map +1 -0
- package/node_modules/@isaacs/nonrecursive-glob-match/dist/commonjs/package.json +3 -0
- package/node_modules/@isaacs/nonrecursive-glob-match/dist/commonjs/parse-class.d.ts +4 -0
- package/node_modules/@isaacs/nonrecursive-glob-match/dist/commonjs/parse-class.d.ts.map +1 -0
- package/node_modules/@isaacs/nonrecursive-glob-match/dist/commonjs/parse-class.js +142 -0
- package/node_modules/@isaacs/nonrecursive-glob-match/dist/commonjs/parse-class.js.map +1 -0
- package/node_modules/@isaacs/nonrecursive-glob-match/dist/esm/index.d.ts +123 -0
- package/node_modules/@isaacs/nonrecursive-glob-match/dist/esm/index.d.ts.map +1 -0
- package/node_modules/@isaacs/nonrecursive-glob-match/dist/esm/index.js +774 -0
- package/node_modules/@isaacs/nonrecursive-glob-match/dist/esm/index.js.map +1 -0
- package/node_modules/@isaacs/nonrecursive-glob-match/dist/esm/index.min.js +3 -0
- package/node_modules/@isaacs/nonrecursive-glob-match/dist/esm/index.min.js.map +7 -0
- package/node_modules/@isaacs/nonrecursive-glob-match/dist/esm/numeric-range.d.ts +15 -0
- package/node_modules/@isaacs/nonrecursive-glob-match/dist/esm/numeric-range.d.ts.map +1 -0
- package/node_modules/@isaacs/nonrecursive-glob-match/dist/esm/numeric-range.js +72 -0
- package/node_modules/@isaacs/nonrecursive-glob-match/dist/esm/numeric-range.js.map +1 -0
- package/node_modules/@isaacs/nonrecursive-glob-match/dist/esm/package.json +3 -0
- package/node_modules/@isaacs/nonrecursive-glob-match/dist/esm/parse-class.d.ts +4 -0
- package/node_modules/@isaacs/nonrecursive-glob-match/dist/esm/parse-class.d.ts.map +1 -0
- package/node_modules/@isaacs/nonrecursive-glob-match/dist/esm/parse-class.js +138 -0
- package/node_modules/@isaacs/nonrecursive-glob-match/dist/esm/parse-class.js.map +1 -0
- package/node_modules/@isaacs/nonrecursive-glob-match/package.json +56 -0
- package/node_modules/@isaacs/nonrecursive-glob-match/src/index.ts +932 -0
- package/node_modules/@isaacs/nonrecursive-glob-match/src/numeric-range.ts +79 -0
- package/node_modules/@isaacs/nonrecursive-glob-match/src/parse-class.ts +158 -0
- package/node_modules/minimatch/README.md +125 -107
- package/node_modules/minimatch/dist/commonjs/index.d.ts +49 -38
- package/node_modules/minimatch/dist/commonjs/index.d.ts.map +1 -1
- package/node_modules/minimatch/dist/commonjs/index.js +782 -359
- package/node_modules/minimatch/dist/commonjs/index.js.map +1 -1
- package/node_modules/minimatch/dist/esm/index.d.ts +49 -38
- package/node_modules/minimatch/dist/esm/index.d.ts.map +1 -1
- package/node_modules/minimatch/dist/esm/index.js +781 -356
- package/node_modules/minimatch/dist/esm/index.js.map +1 -1
- package/node_modules/minimatch/package.json +5 -4
- package/package.json +4 -5
- package/training/adapter/src/train.py +16 -1
- package/dist/chunk-7CO5DBCY.js.map +0 -1
- package/dist/chunk-FSVTMX4L.js +0 -2820
- package/dist/chunk-FSVTMX4L.js.map +0 -1
- package/node_modules/minimatch/dist/commonjs/ast.d.ts +0 -22
- package/node_modules/minimatch/dist/commonjs/ast.d.ts.map +0 -1
- package/node_modules/minimatch/dist/commonjs/ast.js +0 -845
- package/node_modules/minimatch/dist/commonjs/ast.js.map +0 -1
- package/node_modules/minimatch/dist/commonjs/brace-expressions.d.ts +0 -8
- package/node_modules/minimatch/dist/commonjs/brace-expressions.d.ts.map +0 -1
- package/node_modules/minimatch/dist/commonjs/brace-expressions.js +0 -150
- package/node_modules/minimatch/dist/commonjs/brace-expressions.js.map +0 -1
- package/node_modules/minimatch/dist/esm/ast.d.ts +0 -22
- package/node_modules/minimatch/dist/esm/ast.d.ts.map +0 -1
- package/node_modules/minimatch/dist/esm/ast.js +0 -841
- package/node_modules/minimatch/dist/esm/ast.js.map +0 -1
- package/node_modules/minimatch/dist/esm/brace-expressions.d.ts +0 -8
- package/node_modules/minimatch/dist/esm/brace-expressions.d.ts.map +0 -1
- package/node_modules/minimatch/dist/esm/brace-expressions.js +0 -146
- package/node_modules/minimatch/dist/esm/brace-expressions.js.map +0 -1
- /package/dist/{prefetch-LBIOO7ZO.js.map → contracts-SHBUXEOQ.js.map} +0 -0
package/README.md
CHANGED
|
@@ -1,49 +1,46 @@
|
|
|
1
1
|
# tt - Tuned Tensor CLI
|
|
2
2
|
|
|
3
|
-
`tt` is the
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
`tt
|
|
3
|
+
`tt` is the open-source agent and CLI for fine-tuning open models on hardware
|
|
4
|
+
you control. Write the behavior you want in `tunedtensor.json`, then prepare
|
|
5
|
+
data, train, evaluate the tuned model against its base, and serve it, all from
|
|
6
|
+
your own terminal. Training runs on a local NVIDIA GPU or on an existing GPU
|
|
7
|
+
instance in your own AWS account; decision models also train on CPU or Apple MPS.
|
|
8
|
+
|
|
9
|
+
Tuned Tensor is free and community-driven. There is no account, sign-in,
|
|
10
|
+
hosted service or usage fee: specs, data, runs, reports and model weights stay
|
|
11
|
+
on your machines. Network calls include Hugging Face downloads, SSH to your own GPU instance,
|
|
12
|
+
and the model provider you configure for the optional conversational agent.
|
|
13
|
+
The CLI also checks the public npm registry for updates at most every 12 hours;
|
|
14
|
+
set `TT_NO_UPDATE_CHECK=1` to disable these checks.
|
|
15
|
+
|
|
16
|
+
Agent inference uses your own provider: OpenRouter, OpenAI, Anthropic or any
|
|
17
|
+
other provider in the catalog, including a local OpenAI-compatible endpoint
|
|
18
|
+
such as Ollama. Your requests go directly to that provider. Workflow commands
|
|
19
|
+
such as `tt pipeline run`, `tt runs list` and `tt serve` need no provider at all.
|
|
20
20
|
Inference choice is independent of where training uses a GPU. Your AWS GPU
|
|
21
|
-
needs AWS credentials and SSH access
|
|
22
|
-
require a TT access token.
|
|
21
|
+
needs only your AWS credentials and SSH access.
|
|
23
22
|
|
|
24
23
|
New to cloud GPU training? Follow [your first AWS run](docs/local-runtime/aws-gpu.md)
|
|
25
24
|
for project creation, AWS quota and SSH setup, a preview, training, result
|
|
26
|
-
verification, and shutdown. You still run `tt pipeline run` on your laptop
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
`
|
|
33
|
-
|
|
34
|
-
`tt cloud runs list` and
|
|
35
|
-
`tt cloud models list` access existing account records.
|
|
36
|
-
`tt usage` reports managed agent allowance and usage; `tt balance` reports
|
|
37
|
-
TT credits for hosted labeling and historical training charges, which do not
|
|
38
|
-
pay for your AWS instance.
|
|
39
|
-
`tt publish` uploads local run evidence to the dashboard. Hosted training
|
|
40
|
-
submission (`tt cloud runs start` and `estimate`) is retired.
|
|
25
|
+
verification, and shutdown. You still run `tt pipeline run` on your laptop.
|
|
26
|
+
|
|
27
|
+
## Commands
|
|
28
|
+
|
|
29
|
+
The everyday commands are `tt pipeline run`, `tt runs list`, `tt models list`,
|
|
30
|
+
and `tt serve`. GPU processes can use an existing instance in your AWS account
|
|
31
|
+
through [`gpu` configuration](docs/local-runtime/aws-gpu.md). `tt --help` lists
|
|
32
|
+
the full command surface.
|
|
41
33
|
|
|
42
34
|
TT includes the former TT Local runtime. `tt local …` and `tt run` remain
|
|
43
35
|
hidden compatibility aliases; new scripts should use root commands and
|
|
44
|
-
`tt pipeline run --spec tunedtensor.json`.
|
|
45
|
-
|
|
46
|
-
|
|
36
|
+
`tt pipeline run --spec tunedtensor.json`.
|
|
37
|
+
|
|
38
|
+
Earlier releases offered an optional hosted service (`tt cloud`, `tt auth`,
|
|
39
|
+
`tt usage`, `tt balance`, `tt topup`, `tt publish`, and managed agent inference
|
|
40
|
+
as `tunedtensor/managed`). That service is retired and those commands are
|
|
41
|
+
removed. Local projects, run stores and saved provider settings keep working
|
|
42
|
+
unchanged; a saved `tunedtensor/managed` selection counts as unconfigured, so
|
|
43
|
+
choose your own provider with `/login` and `/model`.
|
|
47
44
|
|
|
48
45
|
## Install
|
|
49
46
|
|
|
@@ -76,7 +73,7 @@ dist-tag or version on `sh`, not `curl`:
|
|
|
76
73
|
|
|
77
74
|
```bash
|
|
78
75
|
curl -fsSL https://tunedtensor.com/install.sh | TT_VERSION=beta sh
|
|
79
|
-
curl -fsSL https://tunedtensor.com/install.sh | TT_VERSION=0.
|
|
76
|
+
curl -fsSL https://tunedtensor.com/install.sh | TT_VERSION=0.30.0 sh
|
|
80
77
|
```
|
|
81
78
|
|
|
82
79
|
Or install the package directly:
|
|
@@ -123,54 +120,38 @@ runs use the saved spec. See [the spec workflow](docs/spec-workflow.md).
|
|
|
123
120
|
## Conversational terminal
|
|
124
121
|
|
|
125
122
|
The interactive agent harness and conversation state run on your laptop.
|
|
126
|
-
Inference uses the
|
|
127
|
-
|
|
123
|
+
Inference uses the provider and model you select, which may be a local endpoint
|
|
124
|
+
or a remote service.
|
|
128
125
|
|
|
129
126
|
Run `tt` to open the primary conversational workflow. The agent can inspect the
|
|
130
127
|
project, derive the canonical pipeline from `tunedtensor.json`, present the
|
|
131
128
|
resolved plan, and prepare a sealed dry-run for `/approve`. Workflow commands
|
|
132
129
|
such as `runs list` and `doctor` work immediately without any credentials.
|
|
133
130
|
|
|
134
|
-
For
|
|
135
|
-
|
|
136
|
-
```bash
|
|
137
|
-
tt auth login
|
|
138
|
-
tt
|
|
139
|
-
```
|
|
140
|
-
|
|
141
|
-
Get a token from the dashboard's **Settings → API Keys** page. You can also
|
|
142
|
-
set `TUNED_TENSOR_API_KEY` in CI. When there is no saved BYO selection, TT
|
|
143
|
-
selects `tunedtensor/managed` automatically. In the shell, `/login tunedtensor`
|
|
144
|
-
saves the same account token and switches the saved agent selection to
|
|
145
|
-
`tunedtensor/managed`, including after restart. Managed inference requires no OpenRouter key
|
|
146
|
-
or additional login. The server controls the model and request limits.
|
|
147
|
-
`tt usage` shows the weekly limit remaining, the daily allowance, and reported usage.
|
|
148
|
-
|
|
149
|
-
For BYO OpenRouter inference:
|
|
131
|
+
For example, with OpenRouter:
|
|
150
132
|
|
|
151
133
|
```text
|
|
152
134
|
› /login openrouter
|
|
153
135
|
› /model openrouter/<model-id>
|
|
154
136
|
```
|
|
155
137
|
|
|
156
|
-
`/login` asks which provider, then prompts for
|
|
157
|
-
|
|
138
|
+
`/login` asks which provider, then prompts for that provider's API key with
|
|
139
|
+
hidden input. `/login <provider>` skips the provider prompt.
|
|
158
140
|
`/model openrouter` lists the bundled catalog, but you can select any OpenRouter model ID, including one
|
|
159
141
|
newer than that catalog. OpenRouter validates the selected ID. New IDs use
|
|
160
142
|
conservative context/output defaults; custom metadata can be supplied in
|
|
161
143
|
`~/.tuned-tensor/agent/models.json`. For a model without reasoning support,
|
|
162
144
|
configure it with
|
|
163
145
|
`tt agent configure --provider openrouter --model <model-id> --thinking off`.
|
|
164
|
-
|
|
146
|
+
Inference is billed by your provider, if at all.
|
|
165
147
|
|
|
166
|
-
Provider keys are stored under TT's local agent config
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
`/model` and `/login` feature Tuned Tensor, OpenAI, and OpenRouter. Other
|
|
148
|
+
Provider keys are stored under TT's local agent config
|
|
149
|
+
(`~/.tuned-tensor/agent/auth.json`, readable only by you). Custom endpoints and
|
|
150
|
+
models go in `~/.tuned-tensor/agent/models.json`. `tt` does not read
|
|
151
|
+
`~/.pi/agent/`. `/model` and `/login` feature OpenAI and OpenRouter. Other
|
|
171
152
|
catalog providers remain available by ID. Unauthenticated entries are marked
|
|
172
153
|
`auth required`. Local endpoints such as Ollama use a placeholder `apiKey` in
|
|
173
|
-
`models.json
|
|
154
|
+
`models.json`.
|
|
174
155
|
|
|
175
156
|
`tt` checks npm for a newer stable release at most every 12 hours and
|
|
176
157
|
remembers the answer in `~/.tuned-tensor/update-check.json`. The notice appears
|
|
@@ -191,7 +172,7 @@ the agent:
|
|
|
191
172
|
|
|
192
173
|
```text
|
|
193
174
|
tt v0.15.0
|
|
194
|
-
agent
|
|
175
|
+
agent openrouter/anthropic/claude-sonnet-5 · workflow model base
|
|
195
176
|
tt › What would you like to work on?
|
|
196
177
|
/help commands · ctrl+c stop · ctrl+d exit
|
|
197
178
|
|
|
@@ -328,10 +309,10 @@ warnings use conservative advisory thresholds (8 GiB available working memory,
|
|
|
328
309
|
6 GiB free model-cache disk, 4 CPU cores); they are not measured model minima.
|
|
329
310
|
Batch size, sequence length, training mode and other running applications matter.
|
|
330
311
|
CPU evaluation does not imply that `tt serve` can run on CPU. Agent chat still
|
|
331
|
-
needs
|
|
312
|
+
needs a model provider; local data commands do not.
|
|
332
313
|
|
|
333
314
|
Useful shell controls include `/help`, `/status`, `/context`, `/system`,
|
|
334
|
-
`/
|
|
315
|
+
`/model`, `/login`, `/cd`, `/clear`, and `/exit`.
|
|
335
316
|
When the shell opens, the TT logo mark (drawn in the terminal) greets you with the current spec, a
|
|
336
317
|
live machine panel (GPU utilization, VRAM and temperature from `nvidia-smi`,
|
|
337
318
|
CPU, RAM, and free space on the model-cache filesystem) and whether this machine can
|
|
@@ -345,19 +326,13 @@ memory-pressure measurement or a guarantee that a workload fits. CPU load is a
|
|
|
345
326
|
one-minute average, separate from the sampled utilization percentage. Disk usage
|
|
346
327
|
describes the filesystem containing the cache, not the size of downloaded models.
|
|
347
328
|
The shell banner and `/context` show the inference selection (`agent
|
|
348
|
-
provider/model`) separately from the workflow model.
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
that provider's models, or `/model <query>` to search. Switch with
|
|
352
|
-
`/model <provider>/<model>`, including `/model tunedtensor/managed` to return
|
|
353
|
-
to managed inference.
|
|
354
|
-
For managed inference, `tt agent configure --provider tunedtensor` needs no
|
|
355
|
-
model argument. For BYO inference, both provider and model are required.
|
|
329
|
+
provider/model`) separately from the workflow model. Run `/model` with no
|
|
330
|
+
arguments to list suggested models, `/model <provider>` to list that provider's
|
|
331
|
+
models, or `/model <query>` to search. Switch with `/model <provider>/<model>`.
|
|
356
332
|
The equivalent non-interactive commands are `tt agent models`,
|
|
357
|
-
`tt agent configure
|
|
358
|
-
|
|
359
|
-
`high`, `xhigh`, or `max
|
|
360
|
-
and leaves the CLI thinking option off. Selection metadata can be overridden
|
|
333
|
+
`tt agent configure --provider <provider> --model <model>`, and `tt agent status`.
|
|
334
|
+
`tt agent configure --thinking` accepts `off`, `minimal`, `low`, `medium`,
|
|
335
|
+
`high`, `xhigh`, or `max`. Selection metadata can be overridden
|
|
361
336
|
per process with
|
|
362
337
|
`TUNED_TENSOR_AGENT_PROVIDER`, `TUNED_TENSOR_AGENT_MODEL`, and
|
|
363
338
|
`TUNED_TENSOR_AGENT_THINKING`. These values are not credentials.
|
|
@@ -467,95 +442,6 @@ scheduler, RNG, counters, and token cursor. See
|
|
|
467
442
|
[Long foundation runs](docs/local-runtime/foundation-long-runs.md) before an
|
|
468
443
|
unattended job.
|
|
469
444
|
|
|
470
|
-
## Cloud runs and account reporting
|
|
471
|
-
|
|
472
|
-
Use the same TT token for cloud operations and managed inference. A BYO model
|
|
473
|
-
selection continues to work while you operate cloud runs with that token.
|
|
474
|
-
|
|
475
|
-
```bash
|
|
476
|
-
tt auth login
|
|
477
|
-
tt cloud push --file tunedtensor.json
|
|
478
|
-
tt cloud runs watch <run-id>
|
|
479
|
-
tt cloud runs report <run-id>
|
|
480
|
-
tt cloud runs list
|
|
481
|
-
tt cloud models list
|
|
482
|
-
tt usage
|
|
483
|
-
tt balance
|
|
484
|
-
```
|
|
485
|
-
|
|
486
|
-
### Teacher-label raw data
|
|
487
|
-
|
|
488
|
-
Label unlabeled inputs with a stronger teacher model, review them, and train
|
|
489
|
-
an adapter on the result. Labeling uses TT credits. Add a few high-quality
|
|
490
|
-
examples to the spec first: the teacher follows them as the output format.
|
|
491
|
-
|
|
492
|
-
In the agent, say what you want, for example "label emails.jsonl with the
|
|
493
|
-
teacher". It checks the spec and proposes the job. Approving it pushes the spec,
|
|
494
|
-
uploads the file and starts labeling in the cloud. Ask for the status at any
|
|
495
|
-
time. When labeling finishes, the agent asks whether to use only rows you
|
|
496
|
-
reviewed or also the teacher's drafts, proposes the download, and then proposes
|
|
497
|
-
the `dataset_prebuilt` edit.
|
|
498
|
-
|
|
499
|
-
The same steps as commands:
|
|
500
|
-
|
|
501
|
-
```bash
|
|
502
|
-
tt cloud push --file tunedtensor.json # prints the cloud spec ID
|
|
503
|
-
tt cloud label upload emails.jsonl --spec <spec-id> --watch # {"input": "..."} per line
|
|
504
|
-
tt cloud label status <job-id>
|
|
505
|
-
tt cloud label rows <job-id> --status labeled
|
|
506
|
-
tt cloud label accept <job-id> --rows 0,3,12 # or --all after spot checks
|
|
507
|
-
tt cloud label edit <job-id> --row 5 --output "..."
|
|
508
|
-
tt cloud label download <job-id> # writes datasets/<job-name>/
|
|
509
|
-
```
|
|
510
|
-
|
|
511
|
-
`download` keeps accepted and edited rows (add `--include-unreviewed` for
|
|
512
|
-
teacher drafts), drops rows blocked for secrets, removes duplicate inputs,
|
|
513
|
-
drops inputs that received conflicting labels, and holds out a deterministic
|
|
514
|
-
validation split (`--validation-ratio`, default 0.1). It prints the
|
|
515
|
-
`dataset_prebuilt` paths to add to `tunedtensor.json`.
|
|
516
|
-
|
|
517
|
-
`tt cloud specs`, `tt cloud datasets`,
|
|
518
|
-
`tt cloud label`, and `tt cloud models` expose the corresponding account
|
|
519
|
-
operations; each command's `--help` documents its arguments. Hosted training
|
|
520
|
-
submission is retired. Use [your AWS GPU](docs/local-runtime/aws-gpu.md) with
|
|
521
|
-
`tt pipeline run`; historical cloud reports remain accessible.
|
|
522
|
-
|
|
523
|
-
With a TT token, the local agent can inspect cloud resources, run reports,
|
|
524
|
-
balances, transactions, and managed usage. It can prepare cloud spec edits for
|
|
525
|
-
`/approve`. Those proposals show the API origin and remain bound to the token
|
|
526
|
-
and origin used during preparation. After changing either, return to the
|
|
527
|
-
original account and origin or prepare a new proposal. Cancelling older
|
|
528
|
-
hosted runs remains an explicit CLI command. Without a TT token these account tools are unavailable, while
|
|
529
|
-
local workflow commands and BYO inference continue to work.
|
|
530
|
-
|
|
531
|
-
`tt usage` reports how much of the weekly managed inference limit remains,
|
|
532
|
-
when it resets (Monday 00:00 UTC), and the server-configured daily request
|
|
533
|
-
allowance. When the weekly limit is used up, managed requests are refused
|
|
534
|
-
until the reset; BYO provider keys are unaffected. Check `tt usage` before a
|
|
535
|
-
long session to avoid hitting the limit mid-task. Each provider completion, including a tool follow-up, consumes one request;
|
|
536
|
-
failed and cancelled requests also count. Weekly cost includes reservations for
|
|
537
|
-
running requests and estimates for interrupted requests or missing final costs.
|
|
538
|
-
Token/cost coverage shows which
|
|
539
|
-
requests have provider usage reports, so incomplete reporting is not mistaken
|
|
540
|
-
for zero consumption. The displayed provider cost is informational, not a
|
|
541
|
-
charge to TT credits. BYO provider usage is separate. `tt balance` shows TT
|
|
542
|
-
credits for hosted labeling and historical training charges, plus recent
|
|
543
|
-
transactions; `tt topup` opens checkout.
|
|
544
|
-
|
|
545
|
-
Publish a local report for review in the dashboard:
|
|
546
|
-
|
|
547
|
-
```bash
|
|
548
|
-
tt publish <local-run-id> --dry-run
|
|
549
|
-
tt publish <local-run-id>
|
|
550
|
-
tt cloud runs archive <published-run-id>
|
|
551
|
-
```
|
|
552
|
-
|
|
553
|
-
Publishing shows the upload before confirmation and includes the spec, metrics,
|
|
554
|
-
prompts, and example model outputs. Archiving is supported for inactive local
|
|
555
|
-
reports published to the dashboard. Local model weights stay on your machine.
|
|
556
|
-
Use `--json` with reporting commands for scripts. `TUNED_TENSOR_URL` or
|
|
557
|
-
`--base-url` selects an alternate Tuned Tensor API deployment.
|
|
558
|
-
|
|
559
445
|
## Quick start
|
|
560
446
|
|
|
561
447
|
Create a project on your development machine:
|
|
@@ -754,11 +640,9 @@ the stage timeline with durations and the provenance. Its verdict is
|
|
|
754
640
|
`tampered` exits with code 2 and names the edited event or file; removing the
|
|
755
641
|
completion event or emptying the log also counts as tampering.
|
|
756
642
|
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
`--allow-unverified`. The chain makes edits evident; it is not a signature, so
|
|
761
|
-
anyone with write access to the store can rewrite the whole log.
|
|
643
|
+
Run the audit before you share a report with anyone else. The chain makes edits
|
|
644
|
+
evident; it is not a signature, so anyone with write access to the store can
|
|
645
|
+
rewrite the whole log.
|
|
762
646
|
|
|
763
647
|
Serving still runs on the machine executing `tt serve` and requires a local
|
|
764
648
|
Linux/CUDA GPU, even when training used AWS:
|
|
@@ -876,14 +760,26 @@ See [testing and workflow contracts](docs/testing.md) for what the
|
|
|
876
760
|
suite guarantees, how to evaluate a real agent with `npm run eval:agent`, and
|
|
877
761
|
the remaining steps toward the full conversational product promise.
|
|
878
762
|
|
|
763
|
+
## Contributing
|
|
764
|
+
|
|
765
|
+
Tuned Tensor is community-driven. Bug reports, model and hardware compatibility
|
|
766
|
+
results, documentation fixes and pull requests are welcome at
|
|
767
|
+
[github.com/tunedtensor/tuned-tensor-cli](https://github.com/tunedtensor/tuned-tensor-cli).
|
|
768
|
+
Run `npm run check` before opening a pull request.
|
|
769
|
+
|
|
879
770
|
## License
|
|
880
771
|
|
|
881
772
|
Apache-2.0
|
|
882
773
|
|
|
883
|
-
##
|
|
774
|
+
## Host a decision model yourself
|
|
775
|
+
|
|
776
|
+
A tuned decision model is a directory you own. Load it with Laya in Python, or
|
|
777
|
+
wrap it in a small HTTP service on infrastructure you control. See the
|
|
778
|
+
[self-hosting guide](docs/local-runtime/hosting.md).
|
|
779
|
+
|
|
780
|
+
### Review and use a customized model
|
|
884
781
|
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
GPU and adapter checkpoints remain outside this serverless flow.
|
|
782
|
+
The local agent can inspect adapter datasets for conflicts/overlap, read actual
|
|
783
|
+
run reports, and prepare activation, local serving, stopping and rollback.
|
|
784
|
+
Agree `evaluation.taskQuality` before training; task and general-regression
|
|
785
|
+
checks protect the reviewed selection. See [model quality and agent workflow](docs/local-runtime/model-quality.md).
|
|
@@ -0,0 +1,260 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import {
|
|
3
|
+
localRuntimePackageRoot,
|
|
4
|
+
minimalMachineLearningEnvironment,
|
|
5
|
+
verifyLocalBaseModel,
|
|
6
|
+
withOfflineHuggingFaceCacheEnvironment
|
|
7
|
+
} from "./chunk-ST6ZSEUH.js";
|
|
8
|
+
import {
|
|
9
|
+
defaultBaseModelRevision,
|
|
10
|
+
localModelArtifactPath,
|
|
11
|
+
pythonEnvironmentPath,
|
|
12
|
+
resolveModelLoader,
|
|
13
|
+
resolveRequestedBaseModelRevision
|
|
14
|
+
} from "./chunk-B2O6P7EX.js";
|
|
15
|
+
|
|
16
|
+
// src/local-runtime/model-server.ts
|
|
17
|
+
import { readFileSync as readFileSync2, statSync } from "fs";
|
|
18
|
+
import { spawn } from "child_process";
|
|
19
|
+
import { isAbsolute, resolve, join as join2 } from "path";
|
|
20
|
+
|
|
21
|
+
// src/local-runtime/serving-runtime.ts
|
|
22
|
+
import { createHash } from "crypto";
|
|
23
|
+
import { readFileSync } from "fs";
|
|
24
|
+
import { join } from "path";
|
|
25
|
+
var root = localRuntimePackageRoot(import.meta.url);
|
|
26
|
+
var project = join(root, "training/serving");
|
|
27
|
+
var hash = createHash("sha256");
|
|
28
|
+
for (const name of ["pyproject.toml", "uv.lock"]) hash.update(readFileSync(join(project, name)));
|
|
29
|
+
var SERVING_PYTHON_ENVIRONMENT = pythonEnvironmentPath("uv-serving", hash.digest("hex").slice(0, 20));
|
|
30
|
+
function buildServingPythonCommand() {
|
|
31
|
+
const commandArgs = [
|
|
32
|
+
"run",
|
|
33
|
+
"--frozen",
|
|
34
|
+
"--quiet",
|
|
35
|
+
"--project",
|
|
36
|
+
project,
|
|
37
|
+
"python",
|
|
38
|
+
join(root, "training/adapter/src/serve.py")
|
|
39
|
+
];
|
|
40
|
+
return { command: "uv", commandArgs, displayCommand: ["uv", ...commandArgs] };
|
|
41
|
+
}
|
|
42
|
+
function withServingPythonEnvironment(env) {
|
|
43
|
+
return {
|
|
44
|
+
...env,
|
|
45
|
+
UV_PROJECT_ENVIRONMENT: SERVING_PYTHON_ENVIRONMENT,
|
|
46
|
+
VLLM_NO_USAGE_STATS: "1",
|
|
47
|
+
DO_NOT_TRACK: "1",
|
|
48
|
+
VLLM_ALLOW_RUNTIME_LORA_UPDATING: "0"
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
// src/local-runtime/model-server.ts
|
|
53
|
+
function localArtifactPath(uri) {
|
|
54
|
+
if (!uri.startsWith("file://") && !isAbsolute(uri) && /^[a-z][a-z0-9+.-]*:/i.test(uri)) {
|
|
55
|
+
throw new Error(`Local TT serving requires a local file artifact, got: ${uri}`);
|
|
56
|
+
}
|
|
57
|
+
return localModelArtifactPath(uri);
|
|
58
|
+
}
|
|
59
|
+
function boundedNumber(name, value, minimum, maximum, integer = false) {
|
|
60
|
+
if (!Number.isFinite(value) || value < minimum || value > maximum || integer && !Number.isInteger(value)) {
|
|
61
|
+
throw new Error(`${name} must be between ${minimum} and ${maximum}`);
|
|
62
|
+
}
|
|
63
|
+
return value;
|
|
64
|
+
}
|
|
65
|
+
function isLoopbackHost(host) {
|
|
66
|
+
return host === "127.0.0.1" || host === "localhost" || host === "::1" || host === "[::1]";
|
|
67
|
+
}
|
|
68
|
+
function httpHost(host) {
|
|
69
|
+
return host.includes(":") && !host.startsWith("[") ? `[${host}]` : host;
|
|
70
|
+
}
|
|
71
|
+
function buildModelServerLaunch(args) {
|
|
72
|
+
const options = args.options ?? {};
|
|
73
|
+
const device = options.device ?? args.config.evaluation.inference.device;
|
|
74
|
+
if (device !== "cuda") throw new Error("The pinned vLLM serving runtime requires CUDA; CPU serving is not supported.");
|
|
75
|
+
const contextLength = boundedNumber(
|
|
76
|
+
"contextLength",
|
|
77
|
+
options.contextLength ?? args.foundation?.contextLength ?? 16384,
|
|
78
|
+
args.foundation ? 1 : 512,
|
|
79
|
+
131072,
|
|
80
|
+
true
|
|
81
|
+
);
|
|
82
|
+
if (args.foundation && contextLength > args.foundation.contextLength) {
|
|
83
|
+
throw new Error("Context length exceeds the foundation checkpoint sequence_length.");
|
|
84
|
+
}
|
|
85
|
+
const gpuMemoryUtilization = boundedNumber("gpuMemoryUtilization", options.gpuMemoryUtilization ?? 0.8, 0.05, 0.95);
|
|
86
|
+
const host = options.host ?? "127.0.0.1";
|
|
87
|
+
const remote = !isLoopbackHost(host);
|
|
88
|
+
if (remote && !options.allowRemote) {
|
|
89
|
+
throw new Error("Refusing a non-loopback model server bind without --allow-remote.");
|
|
90
|
+
}
|
|
91
|
+
const apiKey = options.apiKeyEnv ? process.env[options.apiKeyEnv]?.trim() : void 0;
|
|
92
|
+
if (options.apiKeyEnv && !apiKey) throw new Error(`${options.apiKeyEnv} is not set.`);
|
|
93
|
+
if (remote && !apiKey) {
|
|
94
|
+
throw new Error("Non-loopback serving requires --api-key-env with a populated environment variable.");
|
|
95
|
+
}
|
|
96
|
+
const port = boundedNumber("port", options.port ?? 8e3, 1, 65535, true);
|
|
97
|
+
const maxTokens = boundedNumber("maxTokens", options.maxTokens ?? Math.min(512, contextLength), 1, 8192, true);
|
|
98
|
+
const temperature = boundedNumber("temperature", options.temperature ?? 0, 0, 5);
|
|
99
|
+
const topP = boundedNumber("topP", options.topP ?? 1, 0, 1);
|
|
100
|
+
const maxConcurrentRequests = boundedNumber(
|
|
101
|
+
"maxConcurrentRequests",
|
|
102
|
+
options.maxConcurrentRequests ?? 1,
|
|
103
|
+
1,
|
|
104
|
+
8,
|
|
105
|
+
true
|
|
106
|
+
);
|
|
107
|
+
const artifactPath = args.artifactUri ? localArtifactPath(args.artifactUri) : void 0;
|
|
108
|
+
const recordedBaseModelPath = options.baseModelArtifactUri ? localArtifactPath(options.baseModelArtifactUri) : void 0;
|
|
109
|
+
const configuredBaseModelPath = !args.foundation && args.config.paths.baseModel ? resolve(args.config.paths.baseModel) : void 0;
|
|
110
|
+
if (recordedBaseModelPath && configuredBaseModelPath && resolve(recordedBaseModelPath) !== configuredBaseModelPath) {
|
|
111
|
+
throw new Error(
|
|
112
|
+
`Configured paths.baseModel ${configuredBaseModelPath} does not match the base model recorded for this artifact: ` + recordedBaseModelPath
|
|
113
|
+
);
|
|
114
|
+
}
|
|
115
|
+
const localBaseModelPath = recordedBaseModelPath ?? configuredBaseModelPath;
|
|
116
|
+
const requestedBaseModelRevision = args.foundation ? void 0 : resolveRequestedBaseModelRevision(
|
|
117
|
+
args.baseModel,
|
|
118
|
+
options.baseModelRevision
|
|
119
|
+
);
|
|
120
|
+
const baseModelRevision = localBaseModelPath ? defaultBaseModelRevision(args.baseModel) : requestedBaseModelRevision;
|
|
121
|
+
const entrypoint = buildServingPythonCommand();
|
|
122
|
+
const env = withServingPythonEnvironment(
|
|
123
|
+
withOfflineHuggingFaceCacheEnvironment({
|
|
124
|
+
...minimalMachineLearningEnvironment(process.env),
|
|
125
|
+
...artifactPath ? { TT_MODEL_ARTIFACT: artifactPath } : {},
|
|
126
|
+
TT_BASE_MODEL: args.baseModel,
|
|
127
|
+
...localBaseModelPath ? { TT_MODEL_SOURCE: localBaseModelPath } : {},
|
|
128
|
+
...baseModelRevision ? { TT_BASE_MODEL_REVISION: baseModelRevision } : {},
|
|
129
|
+
TT_MODEL_NAME: args.modelName,
|
|
130
|
+
TT_CONTEXT_LENGTH: String(contextLength),
|
|
131
|
+
TT_GPU_MEMORY_UTILIZATION: String(gpuMemoryUtilization),
|
|
132
|
+
TT_MODEL_LOADER: args.foundation ? "foundation" : resolveModelLoader(args.baseModel),
|
|
133
|
+
...args.foundation ? {
|
|
134
|
+
TT_FOUNDATION_CHECKPOINT: args.foundation.checkpoint,
|
|
135
|
+
TT_FOUNDATION_TOKENIZER: args.foundation.tokenizer
|
|
136
|
+
} : {},
|
|
137
|
+
TT_HOST: host,
|
|
138
|
+
TT_PORT: String(port),
|
|
139
|
+
TT_DEVICE: device,
|
|
140
|
+
TT_MAX_TOKENS: String(maxTokens),
|
|
141
|
+
TT_TEMPERATURE: String(temperature),
|
|
142
|
+
TT_TOP_P: String(topP),
|
|
143
|
+
TT_TRUST_REMOTE_CODE: "false",
|
|
144
|
+
TT_MAX_CONCURRENT_REQUESTS: String(maxConcurrentRequests),
|
|
145
|
+
...options.systemPrompt ? { TT_SYSTEM_PROMPT: options.systemPrompt } : {},
|
|
146
|
+
...apiKey ? { TT_API_KEY: apiKey } : {}
|
|
147
|
+
}, args.config.paths.modelCache)
|
|
148
|
+
);
|
|
149
|
+
return {
|
|
150
|
+
command: entrypoint.command,
|
|
151
|
+
commandArgs: entrypoint.commandArgs,
|
|
152
|
+
displayCommand: entrypoint.displayCommand,
|
|
153
|
+
env,
|
|
154
|
+
url: `http://${httpHost(host)}:${port}`,
|
|
155
|
+
modelName: args.modelName,
|
|
156
|
+
artifactPath
|
|
157
|
+
};
|
|
158
|
+
}
|
|
159
|
+
function buildLocalModelServerLaunch(args) {
|
|
160
|
+
return buildModelServerLaunch({
|
|
161
|
+
modelName: args.model.id,
|
|
162
|
+
baseModel: args.model.base_model,
|
|
163
|
+
artifactUri: args.model.artifact_uri,
|
|
164
|
+
config: args.config,
|
|
165
|
+
options: args.options
|
|
166
|
+
});
|
|
167
|
+
}
|
|
168
|
+
function buildLocalBaseModelServerLaunch(args) {
|
|
169
|
+
return buildModelServerLaunch({
|
|
170
|
+
modelName: `base:${args.baseModel}`,
|
|
171
|
+
baseModel: args.baseModel,
|
|
172
|
+
config: args.config,
|
|
173
|
+
options: args.options
|
|
174
|
+
});
|
|
175
|
+
}
|
|
176
|
+
async function verifyLocalModelServerLaunch(launch) {
|
|
177
|
+
const modelSource = launch.env.TT_MODEL_SOURCE;
|
|
178
|
+
const expectedModelId = launch.env.TT_BASE_MODEL;
|
|
179
|
+
if (modelSource && expectedModelId) {
|
|
180
|
+
await verifyLocalBaseModel(modelSource, expectedModelId, launch.env.HF_HOME);
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
async function serveLocalModel(launch) {
|
|
184
|
+
if (process.platform !== "linux") throw new Error("Local vLLM serving requires Linux and an NVIDIA CUDA GPU.");
|
|
185
|
+
await verifyLocalModelServerLaunch(launch);
|
|
186
|
+
await new Promise((resolveServer, reject) => {
|
|
187
|
+
const child = spawn(launch.command, launch.commandArgs, {
|
|
188
|
+
env: launch.env,
|
|
189
|
+
stdio: "inherit",
|
|
190
|
+
detached: process.platform !== "win32"
|
|
191
|
+
});
|
|
192
|
+
let stopping = false;
|
|
193
|
+
let forceKillTimer;
|
|
194
|
+
const killProcessGroup = (signal) => {
|
|
195
|
+
if (child.pid && process.platform !== "win32") {
|
|
196
|
+
try {
|
|
197
|
+
process.kill(-child.pid, signal);
|
|
198
|
+
return;
|
|
199
|
+
} catch {
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
child.kill(signal);
|
|
203
|
+
};
|
|
204
|
+
const stop = (signal) => {
|
|
205
|
+
if (stopping) return;
|
|
206
|
+
stopping = true;
|
|
207
|
+
killProcessGroup(signal);
|
|
208
|
+
forceKillTimer = setTimeout(() => killProcessGroup("SIGKILL"), 5e3);
|
|
209
|
+
forceKillTimer.unref();
|
|
210
|
+
};
|
|
211
|
+
const onSigint = () => stop("SIGINT");
|
|
212
|
+
const onSigterm = () => stop("SIGTERM");
|
|
213
|
+
const cleanup = () => {
|
|
214
|
+
process.off("SIGINT", onSigint);
|
|
215
|
+
process.off("SIGTERM", onSigterm);
|
|
216
|
+
if (forceKillTimer) clearTimeout(forceKillTimer);
|
|
217
|
+
};
|
|
218
|
+
process.once("SIGINT", onSigint);
|
|
219
|
+
process.once("SIGTERM", onSigterm);
|
|
220
|
+
child.once("error", (error) => {
|
|
221
|
+
cleanup();
|
|
222
|
+
reject(error);
|
|
223
|
+
});
|
|
224
|
+
child.once("close", (code, signal) => {
|
|
225
|
+
cleanup();
|
|
226
|
+
if (stopping || signal === "SIGINT" || signal === "SIGTERM") {
|
|
227
|
+
resolveServer();
|
|
228
|
+
} else if (code === 0) {
|
|
229
|
+
resolveServer();
|
|
230
|
+
} else {
|
|
231
|
+
reject(new Error(`Local model server exited with code ${code ?? "unknown"}.`));
|
|
232
|
+
}
|
|
233
|
+
});
|
|
234
|
+
});
|
|
235
|
+
}
|
|
236
|
+
function buildFoundationModelServerLaunch(args) {
|
|
237
|
+
const checkpoint = resolve(args.checkpoint);
|
|
238
|
+
const tokenizer = resolve(args.tokenizer);
|
|
239
|
+
for (const path of [join2(checkpoint, "model.safetensors"), tokenizer]) {
|
|
240
|
+
if (!statSync(path).isFile()) throw new Error(`Expected foundation artifact file: ${path}`);
|
|
241
|
+
}
|
|
242
|
+
const metadata = JSON.parse(readFileSync2(join2(checkpoint, "config.json"), "utf8"));
|
|
243
|
+
const contextLength = boundedNumber("sequence_length", metadata.sequence_length, 1, 131072, true);
|
|
244
|
+
return buildModelServerLaunch({
|
|
245
|
+
modelName: "foundation",
|
|
246
|
+
baseModel: "foundation",
|
|
247
|
+
config: args.config,
|
|
248
|
+
options: args.options,
|
|
249
|
+
foundation: { checkpoint, tokenizer, contextLength }
|
|
250
|
+
});
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
export {
|
|
254
|
+
buildLocalModelServerLaunch,
|
|
255
|
+
buildLocalBaseModelServerLaunch,
|
|
256
|
+
verifyLocalModelServerLaunch,
|
|
257
|
+
serveLocalModel,
|
|
258
|
+
buildFoundationModelServerLaunch
|
|
259
|
+
};
|
|
260
|
+
//# sourceMappingURL=chunk-6CETSU2H.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/local-runtime/model-server.ts","../src/local-runtime/serving-runtime.ts"],"sourcesContent":["import { readFileSync, statSync } from \"node:fs\";\nimport { spawn } from \"node:child_process\";\nimport { isAbsolute, resolve, join } from \"node:path\";\nimport type { LocalRunnerConfig } from \"./contracts.js\";\nimport {\n minimalMachineLearningEnvironment,\n withOfflineHuggingFaceCacheEnvironment,\n} from \"./huggingface-cache.js\";\nimport {\n defaultBaseModelRevision,\n localModelArtifactPath,\n resolveModelLoader,\n resolveRequestedBaseModelRevision,\n} from \"./model-registry.js\";\nimport {\n buildServingPythonCommand,\n withServingPythonEnvironment,\n} from \"./serving-runtime.js\";\nimport type { LocalModelRecord } from \"./store.js\";\nimport { verifyLocalBaseModel } from \"./prefetch.js\";\n\nexport interface LocalModelServeOptions {\n host?: string;\n port?: number;\n device?: \"cpu\" | \"cuda\";\n maxTokens?: number;\n temperature?: number;\n topP?: number;\n systemPrompt?: string;\n allowRemote?: boolean;\n apiKeyEnv?: string;\n maxConcurrentRequests?: number;\n contextLength?: number;\n gpuMemoryUtilization?: number;\n baseModelRevision?: string;\n baseModelArtifactUri?: string;\n}\n\nexport interface LocalModelServerLaunch {\n command: string;\n commandArgs: string[];\n displayCommand: string[];\n env: NodeJS.ProcessEnv;\n url: string;\n modelName: string;\n artifactPath?: string;\n}\n\nfunction localArtifactPath(uri: string): string {\n if (!uri.startsWith(\"file://\") && !isAbsolute(uri) && /^[a-z][a-z0-9+.-]*:/i.test(uri)) {\n throw new Error(`Local TT serving requires a local file artifact, got: ${uri}`);\n }\n return localModelArtifactPath(uri);\n}\n\nfunction boundedNumber(name: string, value: number, minimum: number, maximum: number, integer = false): number {\n if (!Number.isFinite(value) || value < minimum || value > maximum || (integer && !Number.isInteger(value))) {\n throw new Error(`${name} must be between ${minimum} and ${maximum}`);\n }\n return value;\n}\n\nfunction isLoopbackHost(host: string): boolean {\n return host === \"127.0.0.1\" || host === \"localhost\" || host === \"::1\" || host === \"[::1]\";\n}\n\nfunction httpHost(host: string): string {\n return host.includes(\":\") && !host.startsWith(\"[\") ? `[${host}]` : host;\n}\n\nfunction buildModelServerLaunch(args: {\n modelName: string;\n baseModel: string;\n artifactUri?: string;\n config: LocalRunnerConfig;\n foundation?: { checkpoint: string; tokenizer: string; contextLength: number };\n options?: LocalModelServeOptions;\n}): LocalModelServerLaunch {\n const options = args.options ?? {};\n const device = options.device ?? args.config.evaluation.inference.device;\n if (device !== \"cuda\") throw new Error(\"The pinned vLLM serving runtime requires CUDA; CPU serving is not supported.\");\n const contextLength = boundedNumber(\n \"contextLength\", options.contextLength ?? args.foundation?.contextLength ?? 16384,\n args.foundation ? 1 : 512, 131072, true,\n );\n if (args.foundation && contextLength > args.foundation.contextLength) {\n throw new Error(\"Context length exceeds the foundation checkpoint sequence_length.\");\n }\n const gpuMemoryUtilization = boundedNumber(\"gpuMemoryUtilization\", options.gpuMemoryUtilization ?? 0.8, 0.05, 0.95);\n const host = options.host ?? \"127.0.0.1\";\n const remote = !isLoopbackHost(host);\n if (remote && !options.allowRemote) {\n throw new Error(\"Refusing a non-loopback model server bind without --allow-remote.\");\n }\n const apiKey = options.apiKeyEnv ? process.env[options.apiKeyEnv]?.trim() : undefined;\n if (options.apiKeyEnv && !apiKey) throw new Error(`${options.apiKeyEnv} is not set.`);\n if (remote && !apiKey) {\n throw new Error(\"Non-loopback serving requires --api-key-env with a populated environment variable.\");\n }\n const port = boundedNumber(\"port\", options.port ?? 8000, 1, 65_535, true);\n const maxTokens = boundedNumber(\"maxTokens\", options.maxTokens ?? Math.min(512, contextLength), 1, 8192, true);\n const temperature = boundedNumber(\"temperature\", options.temperature ?? 0, 0, 5);\n const topP = boundedNumber(\"topP\", options.topP ?? 1, 0, 1);\n const maxConcurrentRequests = boundedNumber(\n \"maxConcurrentRequests\",\n options.maxConcurrentRequests ?? 1,\n 1,\n 8,\n true,\n );\n const artifactPath = args.artifactUri\n ? localArtifactPath(args.artifactUri)\n : undefined;\n const recordedBaseModelPath = options.baseModelArtifactUri\n ? localArtifactPath(options.baseModelArtifactUri)\n : undefined;\n const configuredBaseModelPath = !args.foundation && args.config.paths.baseModel\n ? resolve(args.config.paths.baseModel)\n : undefined;\n if (\n recordedBaseModelPath\n && configuredBaseModelPath\n && resolve(recordedBaseModelPath) !== configuredBaseModelPath\n ) {\n throw new Error(\n `Configured paths.baseModel ${configuredBaseModelPath} does not match the base model recorded for this artifact: `\n + recordedBaseModelPath,\n );\n }\n const localBaseModelPath = recordedBaseModelPath ?? configuredBaseModelPath;\n const requestedBaseModelRevision = args.foundation ? undefined : resolveRequestedBaseModelRevision(\n args.baseModel,\n options.baseModelRevision,\n );\n const baseModelRevision = localBaseModelPath\n ? defaultBaseModelRevision(args.baseModel)\n : requestedBaseModelRevision;\n const entrypoint = buildServingPythonCommand();\n const env = withServingPythonEnvironment(\n withOfflineHuggingFaceCacheEnvironment({\n ...minimalMachineLearningEnvironment(process.env),\n ...(artifactPath ? { TT_MODEL_ARTIFACT: artifactPath } : {}),\n TT_BASE_MODEL: args.baseModel,\n ...(localBaseModelPath ? { TT_MODEL_SOURCE: localBaseModelPath } : {}),\n ...(baseModelRevision\n ? { TT_BASE_MODEL_REVISION: baseModelRevision }\n : {}),\n TT_MODEL_NAME: args.modelName,\n TT_CONTEXT_LENGTH: String(contextLength),\n TT_GPU_MEMORY_UTILIZATION: String(gpuMemoryUtilization),\n TT_MODEL_LOADER: args.foundation ? \"foundation\" : resolveModelLoader(args.baseModel),\n ...(args.foundation ? {\n TT_FOUNDATION_CHECKPOINT: args.foundation.checkpoint,\n TT_FOUNDATION_TOKENIZER: args.foundation.tokenizer,\n } : {}),\n TT_HOST: host,\n TT_PORT: String(port),\n TT_DEVICE: device,\n TT_MAX_TOKENS: String(maxTokens),\n TT_TEMPERATURE: String(temperature),\n TT_TOP_P: String(topP),\n TT_TRUST_REMOTE_CODE: \"false\",\n TT_MAX_CONCURRENT_REQUESTS: String(maxConcurrentRequests),\n ...(options.systemPrompt ? { TT_SYSTEM_PROMPT: options.systemPrompt } : {}),\n ...(apiKey ? { TT_API_KEY: apiKey } : {}),\n }, args.config.paths.modelCache),\n );\n return {\n command: entrypoint.command,\n commandArgs: entrypoint.commandArgs,\n displayCommand: entrypoint.displayCommand,\n env,\n url: `http://${httpHost(host)}:${port}`,\n modelName: args.modelName,\n artifactPath,\n };\n}\n\nexport function buildLocalModelServerLaunch(args: {\n model: LocalModelRecord;\n config: LocalRunnerConfig;\n options?: LocalModelServeOptions;\n}): LocalModelServerLaunch {\n return buildModelServerLaunch({\n modelName: args.model.id,\n baseModel: args.model.base_model,\n artifactUri: args.model.artifact_uri,\n config: args.config,\n options: args.options,\n });\n}\n\nexport function buildLocalBaseModelServerLaunch(args: {\n baseModel: string;\n config: LocalRunnerConfig;\n options?: LocalModelServeOptions;\n}): LocalModelServerLaunch {\n return buildModelServerLaunch({\n modelName: `base:${args.baseModel}`,\n baseModel: args.baseModel,\n config: args.config,\n options: args.options,\n });\n}\n\nexport async function verifyLocalModelServerLaunch(\n launch: LocalModelServerLaunch,\n): Promise<void> {\n const modelSource = launch.env.TT_MODEL_SOURCE;\n const expectedModelId = launch.env.TT_BASE_MODEL;\n if (modelSource && expectedModelId) {\n await verifyLocalBaseModel(modelSource, expectedModelId, launch.env.HF_HOME);\n }\n}\n\nexport async function serveLocalModel(launch: LocalModelServerLaunch): Promise<void> {\n if (process.platform !== \"linux\") throw new Error(\"Local vLLM serving requires Linux and an NVIDIA CUDA GPU.\");\n await verifyLocalModelServerLaunch(launch);\n await new Promise<void>((resolveServer, reject) => {\n const child = spawn(launch.command, launch.commandArgs, {\n env: launch.env,\n stdio: \"inherit\",\n detached: process.platform !== \"win32\",\n });\n let stopping = false;\n let forceKillTimer: NodeJS.Timeout | undefined;\n const killProcessGroup = (signal: NodeJS.Signals) => {\n if (child.pid && process.platform !== \"win32\") {\n try {\n process.kill(-child.pid, signal);\n return;\n } catch {\n // Fall through when the process group has already exited.\n }\n }\n child.kill(signal);\n };\n const stop = (signal: NodeJS.Signals) => {\n if (stopping) return;\n stopping = true;\n killProcessGroup(signal);\n forceKillTimer = setTimeout(() => killProcessGroup(\"SIGKILL\"), 5_000);\n forceKillTimer.unref();\n };\n const onSigint = () => stop(\"SIGINT\");\n const onSigterm = () => stop(\"SIGTERM\");\n const cleanup = () => {\n process.off(\"SIGINT\", onSigint);\n process.off(\"SIGTERM\", onSigterm);\n if (forceKillTimer) clearTimeout(forceKillTimer);\n };\n process.once(\"SIGINT\", onSigint);\n process.once(\"SIGTERM\", onSigterm);\n child.once(\"error\", (error) => {\n cleanup();\n reject(error);\n });\n child.once(\"close\", (code, signal) => {\n cleanup();\n if (stopping || signal === \"SIGINT\" || signal === \"SIGTERM\") {\n resolveServer();\n } else if (code === 0) {\n resolveServer();\n } else {\n reject(new Error(`Local model server exited with code ${code ?? \"unknown\"}.`));\n }\n });\n });\n}\n\nexport function buildFoundationModelServerLaunch(args: {\n checkpoint: string;\n tokenizer: string;\n config: LocalRunnerConfig;\n options?: LocalModelServeOptions;\n}): LocalModelServerLaunch {\n const checkpoint = resolve(args.checkpoint);\n const tokenizer = resolve(args.tokenizer);\n for (const path of [join(checkpoint, \"model.safetensors\"), tokenizer]) {\n if (!statSync(path).isFile()) throw new Error(`Expected foundation artifact file: ${path}`);\n }\n const metadata = JSON.parse(readFileSync(join(checkpoint, \"config.json\"), \"utf8\"));\n const contextLength = boundedNumber(\"sequence_length\", metadata.sequence_length, 1, 131072, true);\n return buildModelServerLaunch({\n modelName: \"foundation\", baseModel: \"foundation\", config: args.config, options: args.options,\n foundation: { checkpoint, tokenizer, contextLength },\n });\n}\n","import { createHash } from \"node:crypto\";\nimport { readFileSync } from \"node:fs\";\nimport { join } from \"node:path\";\nimport { pythonEnvironmentPath } from \"../paths.js\";\nimport { localRuntimePackageRoot } from \"./package-root.js\";\n\nconst root = localRuntimePackageRoot(import.meta.url);\nconst project = join(root, \"training/serving\");\nconst hash = createHash(\"sha256\");\nfor (const name of [\"pyproject.toml\", \"uv.lock\"]) hash.update(readFileSync(join(project, name)));\nexport const SERVING_PYTHON_ENVIRONMENT = pythonEnvironmentPath(\"uv-serving\", hash.digest(\"hex\").slice(0, 20));\n\nexport function buildServingPythonCommand() {\n const commandArgs = [\"run\", \"--frozen\", \"--quiet\", \"--project\", project,\n \"python\", join(root, \"training/adapter/src/serve.py\")];\n return { command: \"uv\", commandArgs, displayCommand: [\"uv\", ...commandArgs] };\n}\n\nexport function withServingPythonEnvironment(env: NodeJS.ProcessEnv): NodeJS.ProcessEnv {\n return {\n ...env,\n UV_PROJECT_ENVIRONMENT: SERVING_PYTHON_ENVIRONMENT,\n VLLM_NO_USAGE_STATS: \"1\",\n DO_NOT_TRACK: \"1\",\n VLLM_ALLOW_RUNTIME_LORA_UPDATING: \"0\",\n };\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAAA,SAAS,gBAAAA,eAAc,gBAAgB;AACvC,SAAS,aAAa;AACtB,SAAS,YAAY,SAAS,QAAAC,aAAY;;;ACF1C,SAAS,kBAAkB;AAC3B,SAAS,oBAAoB;AAC7B,SAAS,YAAY;AAIrB,IAAM,OAAO,wBAAwB,YAAY,GAAG;AACpD,IAAM,UAAU,KAAK,MAAM,kBAAkB;AAC7C,IAAM,OAAO,WAAW,QAAQ;AAChC,WAAW,QAAQ,CAAC,kBAAkB,SAAS,EAAG,MAAK,OAAO,aAAa,KAAK,SAAS,IAAI,CAAC,CAAC;AACxF,IAAM,6BAA6B,sBAAsB,cAAc,KAAK,OAAO,KAAK,EAAE,MAAM,GAAG,EAAE,CAAC;AAEtG,SAAS,4BAA4B;AAC1C,QAAM,cAAc;AAAA,IAAC;AAAA,IAAO;AAAA,IAAY;AAAA,IAAW;AAAA,IAAa;AAAA,IAC9D;AAAA,IAAU,KAAK,MAAM,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