@tuned-tensor/cli 0.26.2 → 0.28.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 +28 -2
- package/dist/{chunk-VQWJ2XKR.js → chunk-7CO5DBCY.js} +448 -123
- package/dist/chunk-7CO5DBCY.js.map +1 -0
- package/dist/{chunk-2AIP63QO.js → chunk-FSVTMX4L.js} +13 -7
- package/dist/chunk-FSVTMX4L.js.map +1 -0
- package/dist/index.js +482 -248
- package/dist/index.js.map +1 -1
- package/dist/local-runtime.js +22 -9
- package/dist/local-runtime.js.map +1 -1
- package/dist/{prefetch-B6I7B4LR.js → prefetch-LBIOO7ZO.js} +2 -2
- package/docs/local-runtime/decision.md +2 -1
- package/docs/local-runtime/hosting.md +121 -0
- package/docs/windows.md +151 -0
- package/package.json +3 -1
- package/training/serving/uv.lock +3 -3
- package/dist/chunk-2AIP63QO.js.map +0 -1
- package/dist/chunk-VQWJ2XKR.js.map +0 -1
- /package/dist/{prefetch-B6I7B4LR.js.map → prefetch-LBIOO7ZO.js.map} +0 -0
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
safeName,
|
|
7
7
|
verifyLocalBaseModel,
|
|
8
8
|
verifyModelPrefetchCacheReport
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-FSVTMX4L.js";
|
|
10
10
|
export {
|
|
11
11
|
buildModelPrefetchPayload,
|
|
12
12
|
buildModelSourcePrefetchPayload,
|
|
@@ -15,4 +15,4 @@ export {
|
|
|
15
15
|
verifyLocalBaseModel,
|
|
16
16
|
verifyModelPrefetchCacheReport
|
|
17
17
|
};
|
|
18
|
-
//# sourceMappingURL=prefetch-
|
|
18
|
+
//# sourceMappingURL=prefetch-LBIOO7ZO.js.map
|
|
@@ -135,7 +135,8 @@ print(answer["choice"], answer["probabilities"])
|
|
|
135
135
|
Pass the same instructions and criteria the model was trained with: they are
|
|
136
136
|
part of its input. `resolved-workflow.json` records them under `question`.
|
|
137
137
|
The tuned model is not registered with `tt models` and is not served through
|
|
138
|
-
vLLM.
|
|
138
|
+
vLLM. To move inference off your machine, use [serverless hosting](hosting.md)
|
|
139
|
+
with `tt cloud endpoints create`.
|
|
139
140
|
|
|
140
141
|
## Limits
|
|
141
142
|
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
# Host a decision model
|
|
2
|
+
|
|
3
|
+
Use a serverless endpoint when a small decision model receives occasional
|
|
4
|
+
requests and you want to keep it off your own machine. Hosting currently supports
|
|
5
|
+
the pinned English Laya base checkpoint and complete TT decision fine-tunes.
|
|
6
|
+
GPU models, adapters, custom tokenizers and custom calibration are not supported.
|
|
7
|
+
The endpoint uses 6 GB of CPU memory and scales to zero when idle; the first
|
|
8
|
+
request after an idle period may be slow or fail while it starts.
|
|
9
|
+
|
|
10
|
+
You need a TT account token and prepaid credits. Your application does not need
|
|
11
|
+
AWS credentials. The hosted API must be enabled by the service operator before
|
|
12
|
+
these commands work.
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
tt auth login
|
|
16
|
+
tt balance
|
|
17
|
+
# Use a completed decision run's checkpoint.
|
|
18
|
+
tt cloud endpoints create \
|
|
19
|
+
--model .tuned-tensor/decision-runs/<run-id>/train/model \
|
|
20
|
+
--name support-triage
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
The command uploads only `model.safetensors` (at most 2 GB), without loading it
|
|
24
|
+
into a model runtime. The serving image supplies the trusted Laya architecture
|
|
25
|
+
and tokenizer. You do not need to upload the base model as well. To host the base
|
|
26
|
+
model instead, point `--model` at its local checkpoint directory. There is no
|
|
27
|
+
question or other inference configuration attached to a deployment. Send the
|
|
28
|
+
complete model request each time you invoke it.
|
|
29
|
+
|
|
30
|
+
Save the endpoint ID, HTTPS inference URL and inference key returned by create.
|
|
31
|
+
The key is shown only once. It can invoke only this endpoint; your account token
|
|
32
|
+
continues to manage it. Check status until it reports `ready`:
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
tt cloud endpoints get <endpoint-id>
|
|
36
|
+
tt cloud endpoints list
|
|
37
|
+
tt cloud endpoints invoke <endpoint-id> --payload request.json
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
For the current Laya runtime, `request.json` contains both the input and question:
|
|
41
|
+
|
|
42
|
+
```json
|
|
43
|
+
{
|
|
44
|
+
"input": "My card payment was declined",
|
|
45
|
+
"question": {
|
|
46
|
+
"type": "choice",
|
|
47
|
+
"instructions": "Which support queue should handle this message?",
|
|
48
|
+
"criteria": {
|
|
49
|
+
"lost_card": "A lost or stolen bank card",
|
|
50
|
+
"payment_declined": "A refused card payment"
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
You may send a different question on the next request. The CLI sends this JSON
|
|
57
|
+
object as-is; model-specific fields belong in the request, not deployment options.
|
|
58
|
+
The hosting API bounds requests to 128 KiB; Laya validates its own fields.
|
|
59
|
+
|
|
60
|
+
Each successful request costs the fixed number of US cents displayed at creation.
|
|
61
|
+
The price stays fixed for that endpoint. Failed requests are refunded. This
|
|
62
|
+
feature does not debit an idle compute or deployment fee; the operator still
|
|
63
|
+
incurs AWS storage and related costs. Use `tt balance` and `tt balance --help`
|
|
64
|
+
for your account balance and billing commands. Each account may have five
|
|
65
|
+
non-deleted endpoints and create at most ten endpoints in 24 hours.
|
|
66
|
+
|
|
67
|
+
A request has an idempotency UUID, printed by `invoke`. If a connection drops or
|
|
68
|
+
the API says the request is still running, retry the **same complete payload** with that ID:
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
tt cloud endpoints invoke <endpoint-id> --payload request.json \
|
|
72
|
+
--request-id <original-request-uuid>
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
Replays return the recorded answer without a second charge. Reusing the ID with
|
|
76
|
+
a different payload (including question or options) is rejected. A failed/refunded request remains failed; use a new
|
|
77
|
+
ID for a fresh attempt. Interrupted requests are refunded by periodic recovery
|
|
78
|
+
within roughly 15 minutes. For Laya, input text is limited to 8192 characters; each request
|
|
79
|
+
includes the question it should answer. After three failures in five
|
|
80
|
+
minutes, wait five minutes before a new attempt. After 100 failures across the
|
|
81
|
+
account in 24 hours, new requests pause until earlier failures age out; cached
|
|
82
|
+
replays remain available.
|
|
83
|
+
|
|
84
|
+
For another application, call the URL from its backend:
|
|
85
|
+
|
|
86
|
+
```bash
|
|
87
|
+
curl "$TT_INFERENCE_URL" \
|
|
88
|
+
-H "Authorization: Bearer $TT_INFERENCE_KEY" \
|
|
89
|
+
-H "Idempotency-Key: $(uuidgen)" \
|
|
90
|
+
-H "Content-Type: application/json" \
|
|
91
|
+
--data-binary @request.json
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
The response's `data.result` is Laya's typed answer with probabilities. Store keys
|
|
95
|
+
in your backend's secret storage; do not put them in public browser code. The
|
|
96
|
+
service stores results for idempotent replay and request hashes rather than the request
|
|
97
|
+
body. You can also open **Dashboard → Endpoints**, choose your endpoint, and click
|
|
98
|
+
**Generate new inference key**. Confirm replacement, then copy the new key shown
|
|
99
|
+
once. The old key stops working immediately; update your backend's secret.
|
|
100
|
+
This page also lets you copy the inference URL and refresh deployment status.
|
|
101
|
+
Settings continues to manage account access tokens, which have broader access.
|
|
102
|
+
|
|
103
|
+
Endpoint keys can also be rotated from the CLI:
|
|
104
|
+
|
|
105
|
+
```bash
|
|
106
|
+
tt cloud endpoints rotate-key <endpoint-id>
|
|
107
|
+
tt cloud endpoints delete <endpoint-id>
|
|
108
|
+
tt cloud endpoints get <endpoint-id>
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
Deletion immediately blocks new requests. Cleanup removes the model, weights
|
|
112
|
+
and SageMaker resources asynchronously; an endpoint still provisioning must finish
|
|
113
|
+
that transition before AWS permits deletion. Late uploads go to temporary storage
|
|
114
|
+
with automatic expiry and cannot recreate the serving artifact. Poll until
|
|
115
|
+
`deleted`. Uploads abandoned for an hour, deployments that cannot become ready
|
|
116
|
+
within an hour, and failed endpoints older than a day are cleaned automatically.
|
|
117
|
+
Account deletion requires endpoint cleanup and accepted requests to finish.
|
|
118
|
+
|
|
119
|
+
If creation fails after returning an endpoint ID, inspect that ID or delete it.
|
|
120
|
+
If a deployment exists but the one-time key was lost, rotate it. Do not repeat
|
|
121
|
+
`create` simply to retrieve the key: that allocates another endpoint.
|
package/docs/windows.md
ADDED
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
# Windows and PowerShell
|
|
2
|
+
|
|
3
|
+
The CLI runs natively in Windows PowerShell 5.1 and PowerShell 7. Windows x64
|
|
4
|
+
setup includes a private Node.js runtime, installs for the current user without
|
|
5
|
+
administrator access, and adds `tt` to the user PATH. It does not change your
|
|
6
|
+
PowerShell execution policy or your system Node.js installation.
|
|
7
|
+
|
|
8
|
+
## Install
|
|
9
|
+
|
|
10
|
+
Until the first Windows release and WinGet catalog submission are published,
|
|
11
|
+
use the npm route below. Merging CLI changes alone does not publish a package.
|
|
12
|
+
|
|
13
|
+
For a release with Windows assets, download and run
|
|
14
|
+
`tuned-tensor-cli-<version>-windows-x64.exe` from the
|
|
15
|
+
[GitHub releases](https://github.com/tunedtensor/tuned-tensor-cli/releases).
|
|
16
|
+
Open a new terminal and run:
|
|
17
|
+
|
|
18
|
+
```powershell
|
|
19
|
+
tt --version
|
|
20
|
+
tt
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
An inspectable PowerShell installer is available in
|
|
24
|
+
[`scripts/install.ps1`](../scripts/install.ps1). Download it, inspect it, and
|
|
25
|
+
execute it with a policy permitted by your organization. It downloads the
|
|
26
|
+
release installer, checks its SHA-256 against the release checksum, and runs
|
|
27
|
+
setup. `-Version 0.27.0` (example) or `$env:TT_VERSION` pins an exact release;
|
|
28
|
+
the default is the latest stable release. It fails if that release has no
|
|
29
|
+
Windows asset. The standalone installer currently supports x64 only.
|
|
30
|
+
|
|
31
|
+
After `TunedTensor.CLI` is accepted into the public WinGet catalog:
|
|
32
|
+
|
|
33
|
+
```powershell
|
|
34
|
+
winget install --id TunedTensor.CLI --exact --source winget
|
|
35
|
+
# Open a new PowerShell window after installation.
|
|
36
|
+
tt --version
|
|
37
|
+
winget upgrade --id TunedTensor.CLI --exact --source winget
|
|
38
|
+
winget uninstall --id TunedTensor.CLI --exact
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
The first catalog submission requires a published stable installer; these
|
|
42
|
+
commands are not available just because this repository contains manifests.
|
|
43
|
+
Setup can also be updated by running a newer installer, and removed through
|
|
44
|
+
Windows **Installed apps**. Close running TT sessions before updating.
|
|
45
|
+
`tt upgrade` detects setup-managed installs and shows the appropriate instructions.
|
|
46
|
+
Uninstall removes the application's PATH entry and managed files, preserving
|
|
47
|
+
`~/.tuned-tensor` and project data.
|
|
48
|
+
|
|
49
|
+
## npm installation, including Windows ARM64
|
|
50
|
+
|
|
51
|
+
With Node.js 22.19.0 or newer already installed:
|
|
52
|
+
|
|
53
|
+
```powershell
|
|
54
|
+
npm.cmd install -g --ignore-scripts @tuned-tensor/cli
|
|
55
|
+
tt.cmd --version
|
|
56
|
+
tt.cmd
|
|
57
|
+
tt.cmd upgrade
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
You can install Node.js through WinGet first:
|
|
61
|
+
|
|
62
|
+
```powershell
|
|
63
|
+
winget install --id OpenJS.NodeJS.LTS --exact --source winget
|
|
64
|
+
# Open a new terminal so Node and npm are on PATH, then run the npm commands above.
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
Use `npm.cmd` and `tt.cmd` explicitly when PowerShell blocks npm's generated
|
|
68
|
+
`.ps1` launchers. No execution-policy change is needed. The standalone setup
|
|
69
|
+
ships only `tt.cmd`, so plain `tt` works there even with Restricted policy.
|
|
70
|
+
`TT` also works because Windows command lookup is case-insensitive.
|
|
71
|
+
|
|
72
|
+
For npm installs, uninstall with `npm.cmd uninstall -g @tuned-tensor/cli`.
|
|
73
|
+
If you selected a custom npm `--prefix`, supply the same prefix on uninstall
|
|
74
|
+
and add that directory itself (not a `bin` subdirectory) to your user PATH.
|
|
75
|
+
Use an install prefix without `&`: npm's generated `tt.cmd` launcher can fail
|
|
76
|
+
when that character appears in its directory, including in a Windows username.
|
|
77
|
+
If affected, select an accessible prefix such as `C:\TunedTensor` and add it
|
|
78
|
+
to your user PATH. Quoted paths containing spaces work.
|
|
79
|
+
`tt upgrade` finds the prefix of the running installation automatically.
|
|
80
|
+
Use `Get-Command tt -All` to find older installations if the wrong version runs.
|
|
81
|
+
|
|
82
|
+
## Native CLI scope
|
|
83
|
+
|
|
84
|
+
Account commands, the conversational interface, hardware discovery, spec
|
|
85
|
+
inspection, data commands, and pipeline previews run from PowerShell. Environment
|
|
86
|
+
variables use PowerShell syntax, for example `$env:TT_NO_UPDATE_CHECK = '1'`.
|
|
87
|
+
Use Windows paths and quotes around paths containing spaces.
|
|
88
|
+
Inside TT's conversational terminal, backslashes stay literal on Windows:
|
|
89
|
+
`/cd "C:\work files"` and `spec view .\tunedtensor.json` work as expected.
|
|
90
|
+
|
|
91
|
+
Agent-approved spec creation, editing and revision history also work on Windows.
|
|
92
|
+
TT pins real workspace directories while applying the reviewed changes. These
|
|
93
|
+
operations require the built-in Windows PowerShell host with .NET interop allowed;
|
|
94
|
+
an organizational policy that blocks it causes TT to refuse the write. No global
|
|
95
|
+
execution-policy change is made. `tt init`, your editor, `tt spec view` and
|
|
96
|
+
`tt pipeline run --dry-run` remain available for manual workflows.
|
|
97
|
+
|
|
98
|
+
Some runtime features have narrower platform requirements:
|
|
99
|
+
|
|
100
|
+
- Native Windows x64 decision training is not yet end-to-end certified; Windows
|
|
101
|
+
ARM64 lacks compatible wheels in the current Python lockfiles. The packaged
|
|
102
|
+
LLM training/serving stack still requires a supported Linux/CUDA environment.
|
|
103
|
+
- AWS GPU transport uses local rsync and POSIX path conventions. Run that
|
|
104
|
+
workflow, including background training and cancellation, inside WSL2/Linux.
|
|
105
|
+
A native Windows install does not provide those tools or certify that workflow.
|
|
106
|
+
|
|
107
|
+
See the platform table in the [README](../README.md) and the
|
|
108
|
+
[AWS guide](local-runtime/aws-gpu.md) for training prerequisites.
|
|
109
|
+
|
|
110
|
+
## Release and WinGet maintenance
|
|
111
|
+
|
|
112
|
+
`scripts/build-windows.ps1` builds the CLI, packs and installs the npm artifact
|
|
113
|
+
with `--ignore-scripts`, includes the build's Node 22 x64 runtime and its license,
|
|
114
|
+
and compiles an Inno Setup 7 installer. Run it on Windows with Node/npm and
|
|
115
|
+
Inno Setup 7 installed (or supply `-CompilerPath`). Version 7 is required for
|
|
116
|
+
[extended-length dependency paths](https://jrsoftware.org/files/is7-whatsnew.htm).
|
|
117
|
+
CI downloads a pinned compiler and verifies its SHA-256. Outputs are under
|
|
118
|
+
`windows-dist/`.
|
|
119
|
+
|
|
120
|
+
The Windows CI job runs on PRs and gates npm releases. It tests the built
|
|
121
|
+
installer in PowerShell 5.1 and 7: repeated install, private runtime without
|
|
122
|
+
system Node on PATH, CLI inspection and dry-run, upgrade ownership, and uninstall
|
|
123
|
+
with unrelated PATH entries and user data preserved. It also exercises npm
|
|
124
|
+
global installation, including actual status, spec inspection, hardware discovery
|
|
125
|
+
and pipeline previews in both shells. A native Windows ARM64 job checks the npm
|
|
126
|
+
route, architecture rejection in the x64 downloader, and the same CLI regressions.
|
|
127
|
+
The complete CLI suite runs on both Windows architectures, including the real
|
|
128
|
+
agent loop with scripted provider responses, approved spec writes, resume,
|
|
129
|
+
dataset splitting, CLI handoff and cancellation. POSIX rsync transport fixtures
|
|
130
|
+
run in Linux/WSL; file-symlink fixtures require Developer Mode or the relevant
|
|
131
|
+
Windows privilege. Directory junction refusal is tested without that privilege.
|
|
132
|
+
This is CLI/distribution coverage, not a real model-training
|
|
133
|
+
certification.
|
|
134
|
+
|
|
135
|
+
The release workflow attaches the tested `.exe`, `.exe.sha256`, and, for stable
|
|
136
|
+
versions, `winget-manifests.zip` to the same GitHub release after npm publication.
|
|
137
|
+
The manifests contain the actual installer hash and versioned release URL.
|
|
138
|
+
Prereleases never generate stable WinGet manifests.
|
|
139
|
+
|
|
140
|
+
For each stable release:
|
|
141
|
+
|
|
142
|
+
1. Download and extract `winget-manifests.zip` from the release.
|
|
143
|
+
2. Run `winget validate --manifest .\manifests\t\TunedTensor\CLI\<version>`.
|
|
144
|
+
3. Follow Microsoft's [sandbox test and submission procedure](https://learn.microsoft.com/en-us/windows/package-manager/package/repository)
|
|
145
|
+
to test the published installer and submit that directory to `microsoft/winget-pkgs`.
|
|
146
|
+
4. Wait for the catalog PR to be accepted before announcing WinGet availability.
|
|
147
|
+
|
|
148
|
+
No catalog PR is opened by the release workflow. Keep the installer AppId and
|
|
149
|
+
manifest ProductCode stable so upgrades and uninstall identify the same app.
|
|
150
|
+
Release assets must remain immutable; regenerate checksums/manifests after any
|
|
151
|
+
signing step if signing is added to the release process.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tuned-tensor/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.28.0",
|
|
4
4
|
"description": "Local TT agent and CUDA fine-tuning CLI for Tuned Tensor workflows",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -16,6 +16,7 @@
|
|
|
16
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:windows": "npm run test:cli && npm run test:local-runtime",
|
|
19
20
|
"test:workflows": "vitest run src/__tests__/workflows",
|
|
20
21
|
"eval:agent": "tsx scripts/eval-agent.ts",
|
|
21
22
|
"test:local-runtime": "node --import tsx --test \"test/local-runtime/**/*.test.ts\"",
|
|
@@ -38,6 +39,7 @@
|
|
|
38
39
|
"training/decision/src/*.py",
|
|
39
40
|
"docs/local-runtime",
|
|
40
41
|
"docs/spec-workflow.md",
|
|
42
|
+
"docs/windows.md",
|
|
41
43
|
"docs/spec-architecture.html",
|
|
42
44
|
"examples/local-runtime/*.json",
|
|
43
45
|
"examples/local-runtime/*.jsonl",
|
package/training/serving/uv.lock
CHANGED
|
@@ -457,11 +457,11 @@ wheels = [
|
|
|
457
457
|
|
|
458
458
|
[[package]]
|
|
459
459
|
name = "dnspython"
|
|
460
|
-
version = "2.
|
|
460
|
+
version = "2.9.0"
|
|
461
461
|
source = { registry = "https://pypi.org/simple" }
|
|
462
|
-
sdist = { url = "https://files.pythonhosted.org/packages/
|
|
462
|
+
sdist = { url = "https://files.pythonhosted.org/packages/ef/4a/50822184bd67cc6493f0fb6a880749158fcd31ab3fa07409acfd91f9fc85/dnspython-2.9.0.tar.gz", hash = "sha256:b44dc6b18f07a8b1c56676a19fbfdb5209415b046a9cece286baafa87ff3f7f1", size = 423560, upload-time = "2026-10-09T00:07:24.352Z" }
|
|
463
463
|
wheels = [
|
|
464
|
-
{ url = "https://files.pythonhosted.org/packages/
|
|
464
|
+
{ url = "https://files.pythonhosted.org/packages/10/02/cdcc9b7c051786a103c3b09e1003a82fa0c66bcb91ffbdabcfbf7b4163b9/dnspython-2.9.0-py3-none-any.whl", hash = "sha256:9a4aedb833c3c1b49214d04d44d3032ab7a9135f7c1d29a549b4ff78fd82fda9", size = 354822, upload-time = "2026-10-09T00:07:22.622Z" },
|
|
465
465
|
]
|
|
466
466
|
|
|
467
467
|
[[package]]
|