Ster/Docs

ster tune export

Write a LoRA adapter as a PEFT adapter directory that vLLM and peft load beside the base model.

Invocation and purpose#

text
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#

InputRequiredMeaning
--model <MODEL>yesHugging Face model id or local model directory.
--adapter <ADAPTER>yesThe adapter to write. It must have been trained for this exact model and be a generation adapter rather than a reward model.
--format peftyesThe layout to write; peft is the one there is. Any other value is refused before the export starts.
--output <DIR>yesDirectory to write.
--revision <REVISION>noImmutable Hugging Face revision; Hub resolution defaults to main.
--device <DEVICE>nocpu (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.