parse_peft_adapter_config

Function parse_peft_adapter_config 

Source
pub fn parse_peft_adapter_config(json: &str) -> Result<PeftAdapterConfig>
Expand description

2026-09-26: Parse a PEFT adapter_config.json payload.

Errors with a REJECT(<field>) message for each unsupported setting: a non-LoRA peft_type, DoRA, a bias other than none, non-empty rank_pattern / alpha_pattern / target_parameters, a modules_to_save leaf other than embed_tokens / lm_head, an absent use_rslora, r == 0, a non-positive lora_alpha, a malformed layers_to_transform or trainable_token_indices, a rejected target module, and an adapter that targets nothing. The caller adds the file path to the error.