@tuned-tensor/cli 0.29.0 → 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 CHANGED
@@ -1,49 +1,46 @@
1
1
  # tt - Tuned Tensor CLI
2
2
 
3
- `tt` is the local agent and CLI for Tuned Tensor. Develop and orchestrate one
4
- training workflow locally, using a local NVIDIA GPU or an existing GPU instance
5
- in your AWS account. Inspect the resulting artifacts and metrics locally, and
6
- optionally publish run evidence to the web dashboard.
7
-
8
- Local training, evaluation, inspection, and serving need no TT access token.
9
- Agent inference is a separate choice:
10
-
11
- - **Managed:** sign in once with `tt auth login`. TT reuses your access token
12
- through the Tuned Tensor model proxy. The server selects the model; no
13
- OpenRouter key or model selection is needed.
14
- - **Bring your own:** use your own OpenRouter or other provider credentials
15
- and choose the model. Your requests go directly to that provider. TT does
16
- not apply its managed model policy to BYO requests.
17
-
18
- A saved BYO selection stays selected after TT login. Switch back with
19
- `tt agent configure --provider tunedtensor` or `/model tunedtensor/managed`.
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; TT account operations under `tt cloud`
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
- `tt cloud` is for TT account records, not user-owned GPU execution.
28
-
29
- ## Unified commands
30
-
31
- Local workflows remain the default: `tt pipeline run`, `tt runs list`,
32
- `tt models list`, and `tt serve`. GPU processes can use an existing instance in
33
- your AWS account through [`gpu` configuration](docs/local-runtime/aws-gpu.md).
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`. Existing token-free local projects
45
- and saved BYO provider settings continue to work. Cloud operations previously
46
- hidden in the local-only release are available under `tt cloud`.
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.13.0 sh
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 TT managed model or a BYO provider you select. A BYO
127
- provider may be a local endpoint or a remote service.
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 managed inference, save your TT access token with hidden input:
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 the TT access token or BYO
157
- provider key with hidden input. `/login <provider>` skips the provider prompt.
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
- BYO inference is billed by your provider.
146
+ Inference is billed by your provider, if at all.
165
147
 
166
- Provider keys are stored under TT's local agent config, separately from the
167
- account token. The managed provider never stores your TT token in provider
168
- files and does not accept endpoint/model overrides in `models.json`; use a
169
- separate BYO provider for custom endpoints. `tt` does not read `~/.pi/agent/`.
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` and need no TT account.
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 tunedtensor/managed · workflow model base
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 managed access or your own model provider; local data commands need neither.
312
+ needs a model provider; local data commands do not.
332
313
 
333
314
  Useful shell controls include `/help`, `/status`, `/context`, `/system`,
334
- `/usage` (managed agent allowance and token usage), `/model`, `/login`, `/cd`, `/clear`, and `/exit`.
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. The managed alias identifies
349
- inference through the server-selected model. Run `/model` with no arguments to
350
- list the managed option and suggested BYO models, `/model <provider>` to list
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`, and `tt agent status`.
358
- For BYO models, `tt agent configure --thinking` accepts `off`, `minimal`, `low`, `medium`,
359
- `high`, `xhigh`, or `max`; managed inference uses the server's reasoning policy
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
- `tt publish` runs the same audit and uploads the summary with the report. It
758
- refuses tampered evidence. It also stops on unverifiable evidence, such as runs
759
- from older TT versions or logs with unreadable lines, unless you pass
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,17 +760,22 @@ 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
- ## Serverless decision inference
774
+ ## Host a decision model yourself
884
775
 
885
- `tt cloud endpoints` uploads complete local Laya decision checkpoints to an
886
- authenticated CPU endpoint, with per-request prepaid billing. See the
887
- [hosting guide](docs/local-runtime/hosting.md) for creation, inference keys,
888
- retry-safe requests, costs and deletion. Hosting requires the new server API;
889
- GPU and adapter checkpoints remain outside this serverless flow.
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).
890
779
 
891
780
  ### Review and use a customized model
892
781
 
@@ -4,14 +4,14 @@ import {
4
4
  minimalMachineLearningEnvironment,
5
5
  verifyLocalBaseModel,
6
6
  withOfflineHuggingFaceCacheEnvironment
7
- } from "./chunk-CT2RXESA.js";
7
+ } from "./chunk-ST6ZSEUH.js";
8
8
  import {
9
9
  defaultBaseModelRevision,
10
10
  localModelArtifactPath,
11
11
  pythonEnvironmentPath,
12
12
  resolveModelLoader,
13
13
  resolveRequestedBaseModelRevision
14
- } from "./chunk-G3KT4AYL.js";
14
+ } from "./chunk-B2O6P7EX.js";
15
15
 
16
16
  // src/local-runtime/model-server.ts
17
17
  import { readFileSync as readFileSync2, statSync } from "fs";
@@ -257,4 +257,4 @@ export {
257
257
  serveLocalModel,
258
258
  buildFoundationModelServerLaunch
259
259
  };
260
- //# sourceMappingURL=chunk-HKWPQPOJ.js.map
260
+ //# sourceMappingURL=chunk-6CETSU2H.js.map
@@ -1620,4 +1620,4 @@ export {
1620
1620
  isFoundationSpecFile,
1621
1621
  isDecisionSpecFile
1622
1622
  };
1623
- //# sourceMappingURL=chunk-G3KT4AYL.js.map
1623
+ //# sourceMappingURL=chunk-B2O6P7EX.js.map