@tuned-tensor/cli 0.16.0 → 0.17.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 +22 -5
- package/dist/{chunk-6RLNBTM6.js → chunk-KRKISPHG.js} +53 -1
- package/dist/chunk-KRKISPHG.js.map +1 -0
- package/dist/index.js +1001 -549
- package/dist/index.js.map +1 -1
- package/dist/local-runtime.js +5 -1
- package/dist/local-runtime.js.map +1 -1
- package/docs/local-runtime/aws-gpu.md +121 -4
- package/docs/spec-architecture.html +573 -0
- package/docs/spec-workflow.md +110 -0
- package/package.json +3 -1
- package/dist/chunk-6RLNBTM6.js.map +0 -1
|
@@ -7,7 +7,52 @@ tokenization, dataset preparation, adapter scoring/comparisons, run history,
|
|
|
7
7
|
and artifact validation stay local. Results return to the usual local
|
|
8
8
|
directories. The laptop does not need an NVIDIA GPU.
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
## 1. Install TT and create a project
|
|
11
|
+
|
|
12
|
+
Use CLI 0.16.0 or newer with Node.js 22.19+ on Linux or macOS:
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
npm install -g --ignore-scripts @tuned-tensor/cli
|
|
16
|
+
tt --version
|
|
17
|
+
mkdir my-aws-training && cd my-aws-training
|
|
18
|
+
tt init --name "My AWS Adapter" --model Qwen/Qwen3.5-2B
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
Edit the generated `tunedtensor.json`: replace the placeholder system prompt and both placeholder examples with
|
|
22
|
+
your desired instructions and real input/output pairs. For a small functional
|
|
23
|
+
trial, use the [four-example smoke spec](../../examples/local-runtime/smoke-spec.json)
|
|
24
|
+
instead. It checks the workflow, not model quality. An existing project can keep
|
|
25
|
+
its spec and pipeline unchanged.
|
|
26
|
+
|
|
27
|
+
## 2. Prepare your AWS instance
|
|
28
|
+
|
|
29
|
+
You need two separate kinds of access: an **AWS profile** to find the instance,
|
|
30
|
+
and an **SSH key or agent** to execute commands on it. A TT login is unnecessary.
|
|
31
|
+
If you do not already have an instance, launch one in your AWS account or ask
|
|
32
|
+
your administrator to provide one with the prerequisites below.
|
|
33
|
+
|
|
34
|
+
Our CLI 0.16.0 smoke test used a `g5.xlarge` (A10G), an AWS Deep Learning Base
|
|
35
|
+
GPU AMI with Ubuntu 24.04, and a 120 GiB root disk in `eu-west-1`. This is a
|
|
36
|
+
tested small-workload configuration, not a sizing guarantee for other models.
|
|
37
|
+
Use a driver compatible with the bundled CUDA runtime; `tt doctor` checks it.
|
|
38
|
+
|
|
39
|
+
Before launching, check the EC2 GPU quota in your chosen region. For the tested
|
|
40
|
+
G-family On-Demand instance, the quota is **Running On-Demand G and VT instances**
|
|
41
|
+
(`L-DB2E81BA`), measured in vCPUs; one `g5.xlarge` needs 4 available vCPUs.
|
|
42
|
+
If it is too low, follow [AWS's quota increase procedure](https://docs.aws.amazon.com/servicequotas/latest/userguide/request-quota-increase.html).
|
|
43
|
+
Approval does not guarantee instance availability. TT does not request capacity
|
|
44
|
+
or choose a different region for you.
|
|
45
|
+
|
|
46
|
+
During launch, select your [EC2 SSH key pair](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-key-pairs.html),
|
|
47
|
+
allow inbound TCP 22 from your laptop's IP (or use your private network), and
|
|
48
|
+
record the instance ID, region, SSH username and IP. Follow
|
|
49
|
+
[AWS's SSH connection prerequisites](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/connect-to-linux-instance.html).
|
|
50
|
+
Instance creation and quota management need separate AWS permissions; TT itself
|
|
51
|
+
only needs `ec2:DescribeInstances` for lookup.
|
|
52
|
+
|
|
53
|
+
## 3. Configure the connection
|
|
54
|
+
|
|
55
|
+
Save this as `local-runner.json` beside `tunedtensor.json`,
|
|
11
56
|
replacing the example values with your own. You can also copy
|
|
12
57
|
[`examples/local-runtime/aws-runner.json`](../../examples/local-runtime/aws-runner.json).
|
|
13
58
|
All runner paths refer to the laptop; TT translates the paths needed remotely.
|
|
@@ -57,18 +102,55 @@ TT addresses the instance by IP, so any `Host` rules in your SSH configuration
|
|
|
57
102
|
must match that IP. Remote Python commands run through `bash -lc`, which loads
|
|
58
103
|
the login profile so a normal uv installation can be found.
|
|
59
104
|
|
|
105
|
+
After configuring your AWS profile (for SSO, use `aws configure sso` once),
|
|
106
|
+
check access from the same terminal that will run TT:
|
|
107
|
+
|
|
108
|
+
```bash
|
|
109
|
+
# SSO profiles only; skip this line for other credential methods.
|
|
110
|
+
aws sso login --profile research
|
|
111
|
+
aws sts get-caller-identity --profile research
|
|
112
|
+
aws ec2 describe-instances --profile research --region eu-west-1 \
|
|
113
|
+
--instance-ids i-0123456789abcdef0 \
|
|
114
|
+
--query 'Reservations[0].Instances[0].[State.Name,PublicIpAddress]' --output text
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
Use the returned IP below. First verify its host fingerprint through your AWS
|
|
118
|
+
console or administrator and connect interactively to record the verified key.
|
|
119
|
+
Then confirm that unattended SSH works:
|
|
120
|
+
|
|
121
|
+
```bash
|
|
122
|
+
chmod 400 ~/.ssh/research-gpu.pem
|
|
123
|
+
ssh -o BatchMode=yes -o StrictHostKeyChecking=yes \
|
|
124
|
+
-i ~/.ssh/research-gpu.pem ubuntu@YOUR_INSTANCE_IP \
|
|
125
|
+
'bash -lc "command -v uv rsync setsid timeout; nvidia-smi"'
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
If `uv` is missing, install it on that machine using the
|
|
129
|
+
[uv installation instructions](https://docs.astral.sh/uv/getting-started/installation/)
|
|
130
|
+
and make it available in the login shell. Install the other listed prerequisites
|
|
131
|
+
with that machine's package manager. Run the SSH check again before training.
|
|
132
|
+
|
|
133
|
+
## 4. Preview and run
|
|
134
|
+
|
|
135
|
+
Run these commands on your laptop in the project directory. Adapter workflow:
|
|
136
|
+
|
|
60
137
|
```bash
|
|
61
|
-
#
|
|
138
|
+
# Fetch the base model locally first.
|
|
62
139
|
tt validate tunedtensor.json
|
|
63
140
|
tt models prefetch tunedtensor.json --config local-runner.json
|
|
64
141
|
tt doctor tunedtensor.json --config local-runner.json
|
|
65
142
|
tt pipeline run --spec tunedtensor.json --config local-runner.json --dry-run
|
|
66
143
|
tt pipeline run --spec tunedtensor.json --config local-runner.json
|
|
144
|
+
```
|
|
67
145
|
|
|
68
|
-
|
|
146
|
+
For a foundation spec, no base-model prefetch is needed. Start a new run with:
|
|
147
|
+
|
|
148
|
+
```bash
|
|
149
|
+
tt validate tunedtensor.json
|
|
69
150
|
tt doctor tunedtensor.json --config local-runner.json
|
|
70
151
|
tt pipeline run --spec tunedtensor.json --config local-runner.json \
|
|
71
|
-
--
|
|
152
|
+
--dry-run
|
|
153
|
+
tt pipeline run --spec tunedtensor.json --config local-runner.json
|
|
72
154
|
```
|
|
73
155
|
|
|
74
156
|
Choose the command block for your spec's engine. `tt doctor` connects to the
|
|
@@ -84,6 +166,28 @@ evaluation (`evaluation.inference.device: "cpu"`) stays on the laptop.
|
|
|
84
166
|
Remove `gpu` to execute everything locally. `--dry-run` or `dryRun: true`
|
|
85
167
|
does not connect to AWS or copy files.
|
|
86
168
|
|
|
169
|
+
## 5. Inspect results and finish
|
|
170
|
+
|
|
171
|
+
Wait for a successful completion message. Adapter runs return a run ID and a
|
|
172
|
+
local model ID; use the actual IDs from the output:
|
|
173
|
+
|
|
174
|
+
```bash
|
|
175
|
+
tt runs list --config local-runner.json
|
|
176
|
+
tt runs report RUN_ID --config local-runner.json
|
|
177
|
+
tt models list --config local-runner.json
|
|
178
|
+
tt models verify MODEL_ID --config local-runner.json
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
For foundation runs, inspect `report.json` in the run directory printed by the
|
|
182
|
+
command. To resume it, pass `--resume /absolute/path/to/foundation-run` to the
|
|
183
|
+
same `tt pipeline run` command. Keep the laptop awake and connected until the
|
|
184
|
+
command finishes and outputs have returned. Review the report before another run.
|
|
185
|
+
|
|
186
|
+
Stop or terminate your instance in AWS when finished, according to your own
|
|
187
|
+
retention needs. TT does not do this for you, even after cancellation or timeout.
|
|
188
|
+
|
|
189
|
+
## Transfers and recovery
|
|
190
|
+
|
|
87
191
|
TT copies only each process's declared data, model snapshot, and runtime files,
|
|
88
192
|
not the workspace or laptop credentials. Adapter runs use an immutable local
|
|
89
193
|
model snapshot; the Hugging Face credential/cache root is never uploaded.
|
|
@@ -129,3 +233,16 @@ The instance remains running after the job; its lifecycle is yours to manage.
|
|
|
129
233
|
Hosted training submission (`tt cloud runs start` and `estimate`) is retired.
|
|
130
234
|
Existing cloud reports and cancellation of older hosted jobs remain available.
|
|
131
235
|
This CLI change does not delete deployed AWS infrastructure or historical data.
|
|
236
|
+
|
|
237
|
+
## Troubleshooting a first run
|
|
238
|
+
|
|
239
|
+
| Symptom | What to check |
|
|
240
|
+
| --- | --- |
|
|
241
|
+
| AWS credentials expired or access denied | Renew your SSO login, check the selected profile/account, and ask for `ec2:DescribeInstances` permission. |
|
|
242
|
+
| Instance not found or not running | Confirm the instance ID and region, and start the instance through AWS. |
|
|
243
|
+
| GPU quota or capacity error during launch | Check the regional quota and AWS capacity; a TT token or credit top-up will not fix it. |
|
|
244
|
+
| SSH timeout or permission denied | Check IP routing, security group TCP 22 access, SSH username, key and agent using the manual SSH command above. |
|
|
245
|
+
| Host key verification failed | Verify the host fingerprint through AWS or your administrator; do not disable strict host checking. |
|
|
246
|
+
| `uv` missing or CUDA probe fails | Check the remote login-shell PATH and GPU driver; rerun `tt doctor` after correcting the host. |
|
|
247
|
+
| Long pause before the GPU process starts | Model inputs are uploaded for every process. Check network speed and free space on both machines, especially remote `/tmp`. |
|
|
248
|
+
| Download fails or staging directory already exists | Preserve the remote directory shown in the error and recover its outputs before retrying. Do not remove the only checkpoint copy. |
|