Full reference

Document-to-LoRA training

Train a supported hypernetwork or internalize one document on selected compute. Keep the document, model family, job and produced artifact linked for evaluation.

Updated

Reviewed against Console v0.2.2. Available actions depend on project access and runtime configuration; check your installed CLI version for command differences.

Distinguish training from internalization

Training builds a Doc-to-LoRA hypernetwork for a supported model family. Internalization uses the relevant path to turn a document into an adapter artifact. Neither operation establishes that the resulting behavior is accurate; evaluate on held-out questions.

Inspect supported families

The platform exposes available training families at GET /api/v1/lab/train/families. Use the family supported by the configured runtime and verify the required base-model artifacts and capacity. Avoid copying an old example model name into a new environment.

Preview a managed training job

bash
stimulir lab train d2l \
  --family <supported-family> \
  --compute-offer <offer-id> --region <offered-region> \
  --preview --json

Review the estimated work, admission and cost before submitting. Preview requires compute offer and region and cannot use a direct --endpoint. Keep training settings and the seed with the job record.

Internalize one reviewed document

bash
stimulir lab d2l internalize document.txt \
  --compute-offer <offer-id> --region <offered-region> \
  --max-duration-hours 1 --max-cost-gbp 10 --json

This command starts work on explicitly selected compute. The limits shown are illustrative; select limits appropriate to your reviewed task. Check that you have permission to use the document and inspect the returned job status.

Track the job and artifact

bash
stimulir lab jobs list
stimulir lab jobs get <job-id> --json

Keep the resulting checkpoint path, model family and source document identity. A remote path refers to the execution environment, not automatically to your local filesystem.

Evaluate before serving

Use stimulir lab eval niah for the supported held-out retrieval comparison and inspect the baseline. Then follow Hot-swap inference only for compatible runtime artifacts. See PEFT tuning for supervised adapter training.

Command catalogue

Expand a command for its arguments. These commands follow the released CLI source; check stimulir --version and the command’s --help for your installation. Required flags are marked; some operations also validate combinations of inputs.

stimulir lab d2l internalize

Internalize one document on explicitly selected managed compute.

document required
Positional argument. See the installed command’s --help for accepted values.
--compute-offer required
Managed GPU offer id.
--region required
Managed GPU region.
--gpus
Managed GPU instance count.
--spot
Use spot pricing when supported.
--compute-provider
See the installed command’s --help for accepted values.
--max-duration-hours
See the installed command’s --help for accepted values.
--max-cost-gbp
See the installed command’s --help for accepted values.
--name
See the installed command’s --help for accepted values.
--endpoint
HybrIE runtime URL (bypasses the console proxy).
--json
Emit raw JSON output.
stimulir lab eval niah

Score a trained adapter checkpoint on held-out NIAH retrieval (vs zero-LoRA baseline).

--family, -f required
Base model family: qwen3-4b, qwen3-0.6b, or mistral-7b.
--checkpoint-dir, -c required
Trained checkpoint directory (metadata.json + model.safetensors).
--examples
Held-out examples to score (default 200).
--seed
Seed for reproducible example generation.
--device
auto, metal, cuda, or cpu.
--model-dir
Optional base-model directory override.
--endpoint
HybrIE runtime URL (bypasses the console proxy).
--json
Emit raw JSON output.
stimulir lab train d2l

Submit a D2L (Doc-to-LoRA) training job — hypernetwork context internalisation.

--family, -f required
See the installed command’s --help for accepted values.
--examples
Number of training examples (sent as num_examples).
--eval-examples
Held-out eval examples scored after training.
--min-blocks
Minimum synthetic context blocks.
--max-blocks
Maximum synthetic context blocks.
--log-every
Progress interval; 0 disables intermediate reports.
--epochs
Training epochs.
--lr
Learning rate.
--seed
Seed for reproducible example generation.
--checkpoint-dir
Directory to write the trained checkpoint into.
--device
Target device (auto, cuda, mps, cpu).
--compute-offer
Managed GPU offer id.
--region
Managed GPU region.
--gpus
Managed GPU instance count.
--spot
Use spot pricing when the offer supports it.
--compute-provider
Managed compute provider.
--max-duration-hours
Hard managed-run time ceiling.
--max-cost-gbp
Optional GPU-spend ceiling.
--preview
Validate and price only; create no job and launch nothing.
--endpoint
HybrIE runtime URL (bypasses the console proxy).
--json
Emit raw JSON output.

SDK method catalogue

Expand a client to inspect public methods and parameter names. Read each operation’s task guide before supplying a payload or starting work. The SDK returns platform responses; handle errors and inspect completion state before using a result.

client.lab_trainLabTrainClient
d2l(family, examples, eval_examples, epochs, lr, seed, checkpoint_dir, device, compute, timeout)
Doc-to-LoRA (hypernetwork context internalisation) training job.
sft(family, lora_rank, init_adapter_dir, examples, epochs, lr, l1_coef, eval_examples, min_blocks, max_blocks, log_every, seed, device, checkpoint_dir, dataset, split_ratio, split_seed, eval_cohort, compute, timeout)
Supervised fine-tuning of a plain PEFT LoRA adapter (sft-peft-lora).
rl(family, environment, prompts, group_size, policy, lora_rank, init_checkpoint_dir, lr, kl_beta, seed, device, checkpoint_dir, compute, timeout)
RL (GRPO-style) training job on an RL environment.
internalize(document_text, compute, name, session_key, ttl_seconds, pin, timeout)
Internalize a document on an explicitly selected managed worker.