ster tune export
Write a LoRA adapter as a PEFT adapter directory that vLLM and peft load beside the base model.
Invocation and purpose#
ster tune export --model <MODEL> --adapter <ADAPTER> --format peft --output <DIR>
[--revision <REVISION>] [--device <DEVICE>]Keeps the adapter an adapter, where `ster tune merge` folds it into the weights, and writes it in the layout vLLM and peft load: adapter_config.json, adapter_model.safetensors and the base's own tokenizer.json. Nothing is recomputed. Ster's a: [rank, inputs] and b: [outputs, rank], scaled by alpha / rank, are PEFT's lora_A.weight, lora_B.weight and lora_alpha / r; only the names change, each named base_model.model.<the base checkpoint's projection path>.lora_A.weight from the same per-architecture placement a merge uses.
Inputs and options#
| Input | Required | Meaning |
|---|---|---|
--model <MODEL> | yes | Hugging Face model id or local model directory. |
--adapter <ADAPTER> | yes | The adapter to write. It must have been trained for this exact model and be a generation adapter rather than a reward model. |
--format peft | yes | The layout to write; peft is the one there is. Any other value is refused before the export starts. |
--output <DIR> | yes | Directory to write. |
--revision <REVISION> | no | Immutable Hugging Face revision; Hub resolution defaults to main. |
--device <DEVICE> | no | cpu (default), metal, or cuda. |
Output and state#
The config records r, lora_alpha, target_modules (the checkpoint's own projection names, such as q_proj), layers_to_transform, base_model_name_or_path and revision. Stdout is a pretty JSON document with one report key carrying model, model_revision, adapter, output, format, rank, alpha, target_modules, layers, tensors and files. The same operation is ster request tune/export, whose body requires model, adapter, output and format: "peft" and whose result is {"report": {...}}; Ster Desktop offers it as Adapter → Export PEFT.
Refusals#
- An adapter for another checkpoint and a reward artifact are refused as in `ster tune merge`.
- A projection the base stores fused with others or transposed has no PEFT module of its own:
this model stores the <target> projection fused with others, so PEFT has no module of its own for it; merge the adapter (ster tune merge) instead. - A GGUF base is refused, because PEFT names a safetensors release.