External Publication
Visit Post

CPU offloading error scenario

Hugging Face Forums [Unofficial] April 25, 2026
Source

Remembered:

# LoRA config — works for both model types
# Gemma4 wraps projections in Gemma4ClippableLinear; target the inner .linear sublayer
is_gemma4_model = "gemma4" in model_id.lower()
if is_gemma4_model:
    lora_targets_full = [
        "q_proj.linear", "k_proj.linear", "v_proj.linear", "o_proj.linear",
        "gate_proj.linear", "up_proj.linear", "down_proj.linear"
    ]
    lora_targets_minimal = ["q_proj.linear", "v_proj.linear", "gate_proj.linear", "up_proj.linear"]
else:
    lora_targets_full = ["q_proj", "k_proj", "v_proj", "o_proj", "gate_proj", "up_proj", "down_proj"]
    lora_targets_minimal = ["q_proj", "v_proj", "gate_proj", "up_proj"]

Discussion in the ATmosphere

Loading comments...