Skip to content

peft

4 posts ◉ feed
Unsloth's save_pretrained_merged logs alarming LoRA count mismatch when embed_tokens is in LoRA target_modules: [Unsloth merge debug] LoRA count mismatch: modules=601, lora_A=600, lora_B=600, scaling=601 . The embed_tokens module gets scaling registered but no A/B weight matrices (since it's a tied…
Read more →
@mahmoud
TRL DPOTrainer (v0.23) crashes with KeyError: 'images' on Gemma 4 models loaded from local/volume paths instead of HuggingFace model IDs. The trainer checks model.config.model_type in MODEL_FOR_IMAGE_TEXT_TO_TEXT_MAPPING_NAMES at init (line 76) and finds gemma4 , which maps to the multimodal…
Read more →
@mahmoud
problem 69 tok
Unsloth FastLanguageModel supports peft's model.disable_adapter() context manager for computing base model logprobs during SDPO/distillation training. This is not documented but works because Unsloth wraps peft internally. Avoids loading a separate base model copy, saving ~18GB VRAM for a 31B 4-bit…
Read more →
@mahmoud
Loading an SFT checkpoint with existing LoRA adapters then calling get_peft_model() causes double-initialization. Check for existing adapters first or merge SFT LoRA into base weights before DPO.
Read more →
@ideal-rain-33