Views
No views yet
LiquidAI/LFM2-8B-A1B, produced by converting the LiquidAI/LFM2-8B-A1B-smoltalk-LoRA adapter (trained via PEFT 0.18+'s target_parameters on the batched 3D MoE expert tensors) into the classic per-expert layout (...mlp.experts.<N>.gate_proj/up_proj/down_proj.lora_*).experts.gate_up_proj decomposes into per-expert (A, B_gate || B_up) blocks; only the expert tensors are repacked, every other weight is carried over verbatim. See convert_lfm2_moe_lora_to_per_expert.py.q_proj, k_proj, v_proj, out_projin_proj, out_projgate_proj, up_proj, down_proj (renamed from LFM2-native w1/w3/w2)gategate_proj, up_proj, down_projr=8, alpha=16, num_experts=32, hidden=2048, moe_intermediate=1792. Per-expert gate and up share lora_A (PEFT's fused training has a single shared A; splitting B's output axis into gate || up halves and keeping A common is the per-expert equivalent).1sglang serve \
2 --model-path LiquidAI/LFM2-8B-A1B \
3 --port 30000 \
4 --enable-lora --max-lora-rank 8 \
5 --lora-paths "smoltalk=tugot17/lfm2-8b-a1b-smoltalk-lora-classic" \
6 --lora-target-modules q_proj k_proj v_proj out_proj gate_proj up_proj down_proj in_proj gate \
7 --lora-strict-loading1curl -sS http://localhost:30000/generate \
2 -H "Content-Type: application/json" \
3 -d '{
4 "text": "Write a short story set in an unusual location.",
5 "sampling_params": {"temperature": 0.0, "max_new_tokens": 80},
6 "lora_path": "smoltalk"
7 }'merge_and_unload deltas — they match
scale·(B@A) per expert to bf16 rounding (max abs err 5e-4).1huggingface-cli download tugot17/lfm2-8b-a1b-smoltalk-lora-classic convert_lfm2_moe_lora_to_per_expert.py --local-dir .
2huggingface-cli download LiquidAI/LFM2-8B-A1B-smoltalk-LoRA --local-dir ./src
3python convert_lfm2_moe_lora_to_per_expert.py --src ./src --dst ./outtorch and safetensors.HuggingFaceTB/smoltalk. All numbers carry over — the conversion doesn't change the LoRA semantics.