@tuned-tensor/cli 0.14.0 → 0.15.1

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.
@@ -1,8 +1,12 @@
1
1
  # Architecture
2
2
 
3
- This repository is the local CUDA runtime behind the unified `tt`
4
- workflow. The standalone `tt-local` product surface is deprecated.
5
- Its supported runtime boundary is text SFT of a registry-certified
3
+ This document describes the local CUDA runtime bundled with the unified `tt`
4
+ agent and CLI. The standalone `tt-local` product surface is deprecated. Local
5
+ workflow commands need no TT token. Managed agent inference reuses a TT access
6
+ token; BYO inference uses the selected provider's credentials. Cloud operations
7
+ are explicit through `tt cloud` and use the TT account token.
8
+
9
+ The local adapter runtime boundary is text SFT of a registry-certified
6
10
  Transformers causal LM into a LoRA adapter on CUDA. Certified checkpoints
7
11
  are `Qwen/Qwen3.5-2B` (pinned to Hugging Face snapshot
8
12
  `15852e8c16360a2fea060d615a32b45270f8a8fc`),
@@ -28,7 +32,7 @@ implementation details, not a public plugin framework.
28
32
 
29
33
  ## Boundaries
30
34
 
31
- The first version intentionally excludes:
35
+ The local adapter runtime excludes:
32
36
 
33
37
  - arbitrary training or evaluation commands;
34
38
  - DPO, continued pretraining, and multimodal training;
@@ -40,7 +44,7 @@ The first version intentionally excludes:
40
44
  The next model or method should arrive with its own locked dependencies,
41
45
  resource defaults, data contract, and real CUDA acceptance test.
42
46
 
43
- TT Local currently ships two such methods:
47
+ TT bundles two local training methods:
44
48
 
45
49
  - **Adapter** (`training/adapter`): certified Transformers checkpoints and
46
50
  PEFT LoRA SFT. Driven by `tt pipeline run`.
@@ -90,7 +94,7 @@ The bundled Python project owns four small operations:
90
94
  - `prefetch.py`: download and verify the pinned Hugging Face snapshot;
91
95
  - `evaluate.py`: generate predictions without receiving reference answers;
92
96
  - `train.py`: perform CUDA-only, model-specific LoRA SFT;
93
- - `serve.py`: load the base model and verified adapter for inference.
97
+ - `serve.py`: prepare the verified base model and adapter for the vLLM serving runtime.
94
98
 
95
99
  Training uses assistant-only loss. Prompt tokens have label `-100`, and
96
100
  truncation removes older prompt tokens before it removes any answer token.
@@ -126,7 +130,7 @@ hide a valid artifact. Serving verifies the manifest again.
126
130
  The runner config controls only:
127
131
 
128
132
  - state, artifact, and Hugging Face cache paths;
129
- - CUDA or CPU inference for evaluation and serving;
133
+ - CUDA or CPU evaluation, with local serving through the CUDA vLLM runtime;
130
134
  - deterministic generation and scoring limits.
131
135
 
132
136
  The training project, Python entrypoints, working directory, and child
@@ -2,9 +2,10 @@
2
2
 
3
3
  `tt serve` verifies TT artifacts and launches **vLLM 0.28.0**. vLLM owns model
4
4
  execution, batching, KV/prefix caching, streaming, and native tool-call parsing.
5
- There is no TT inference loop, HTTP server, or proxy between the harness and
6
- vLLM. The serving dependencies are locked separately from training, in an
7
- external cache environment; an npm upgrade does not mutate the training runtime.
5
+ This local serving path connects the harness directly to vLLM; TT's managed
6
+ agent proxy is a separate inference option. The serving dependencies are locked
7
+ separately from training, in an external cache environment; an npm upgrade does
8
+ not mutate the training runtime.
8
9
 
9
10
  ## Requirements and scope
10
11
 
@@ -77,7 +78,9 @@ tt serve local-<run-id> --config local-runner.json \
77
78
 
78
79
  Use the same launch options as the running server. Exporting config verifies the
79
80
  TT target but does not start a server. Adapter exports include both model IDs.
80
- For example, in a disposable coding-fixture directory:
81
+ The exported `tt-local` provider ID names this local endpoint; it is not a
82
+ separate CLI or package and uses no TT account token. For example, in a
83
+ disposable coding-fixture directory:
81
84
 
82
85
  ```bash
83
86
  pi --provider tt-local --model 'base:Qwen/Qwen3.5-2B' \
@@ -107,7 +110,7 @@ OpenCode can connect directly using its existing custom provider support:
107
110
  "provider": {
108
111
  "tt-local": {
109
112
  "npm": "@ai-sdk/openai-compatible",
110
- "name": "TT local",
113
+ "name": "TT local endpoint",
111
114
  "options": { "baseURL": "http://127.0.0.1:8000/v1" },
112
115
  "models": {
113
116
  "base:Qwen/Qwen3.5-2B": {
@@ -26,8 +26,10 @@ this GPU. Spark unified memory should show Nemotron and Muse Glimmer as
26
26
  trainable; consumer cards typically only fit Qwen LoRA. `tt status` and the
27
27
  shell agent reuse the cached report.
28
28
 
29
- TT Local requires Node 22+, `uv`, working CUDA PyTorch, and enough free space
30
- for the Hugging Face cache plus run artifacts.
29
+ Local TT training requires Node 22.19+, `uv`, working CUDA PyTorch, and enough free space
30
+ for the Hugging Face cache plus run artifacts. Local commands need no TT
31
+ access token. Agent inference can use your TT token through the managed proxy,
32
+ or your own provider credentials and model.
31
33
 
32
34
  ## Create a project
33
35
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tuned-tensor/cli",
3
- "version": "0.14.0",
3
+ "version": "0.15.1",
4
4
  "description": "Local TT agent and CUDA fine-tuning CLI for Tuned Tensor workflows",
5
5
  "repository": {
6
6
  "type": "git",
@@ -13,12 +13,15 @@
13
13
  "scripts": {
14
14
  "build": "tsup",
15
15
  "dev": "tsup --watch",
16
- "typecheck": "tsc --noEmit",
16
+ "typecheck": "tsc --noEmit && tsc --noEmit -p tsconfig.scripts.json",
17
17
  "test": "npm run test:cli && npm run test:local-runtime && npm run test:python",
18
18
  "test:cli": "vitest run",
19
+ "test:workflows": "vitest run src/__tests__/workflows",
20
+ "eval:agent": "tsx scripts/eval-agent.ts",
19
21
  "test:local-runtime": "node --import tsx --test \"test/local-runtime/**/*.test.ts\"",
20
22
  "test:python": "python3 -m unittest discover -s training/adapter/tests -p 'test_*.py' && uv run --frozen --project training/foundation python -m unittest discover -s training/foundation/tests -p 'test_*.py'",
21
- "test:watch": "vitest"
23
+ "test:watch": "vitest",
24
+ "check": "npm run typecheck && npm test && npm run build"
22
25
  },
23
26
  "files": [
24
27
  "dist",
@@ -110,7 +110,7 @@ def assert_certified_model_config(
110
110
  )
111
111
  return
112
112
  else:
113
- raise ValueError(f"{label} is not a certified TT Local base-model architecture")
113
+ raise ValueError(f"{label} is not a certified TT base-model architecture")
114
114
 
115
115
  for name, expected in certified.items():
116
116
  actual = _field(text_config, name)
@@ -147,7 +147,7 @@ def verify_snapshot(snapshot: Path, expected_model_id: str | None = None) -> tup
147
147
 
148
148
 
149
149
  def main() -> None:
150
- parser = argparse.ArgumentParser(description="Prefetch a TT Local Hugging Face base model.")
150
+ parser = argparse.ArgumentParser(description="Prefetch a TT Hugging Face base model for local use.")
151
151
  parser.add_argument("--input", required=True)
152
152
  parser.add_argument("--output", required=True)
153
153
  args = parser.parse_args()
@@ -92,8 +92,8 @@ def assert_certified_request() -> None:
92
92
  def require_cuda() -> dict[str, Any]:
93
93
  if not torch.cuda.is_available():
94
94
  raise RuntimeError(
95
- "TT Local bundled training requires an NVIDIA CUDA GPU. "
96
- "Run this workflow on DGX Spark and verify it first with tt-local doctor."
95
+ "TT local training requires an NVIDIA CUDA GPU. "
96
+ "Run this workflow on a supported CUDA host and verify it first with tt doctor."
97
97
  )
98
98
  device_index = torch.cuda.current_device()
99
99
  properties = torch.cuda.get_device_properties(device_index)