Sayansantra/LFM3-2.0B-WSP-V5 — 29-Layer Equation-Seeded Tool-Calling Model (2.02B)
Sayansantra/LFM3-2.0B-WSP-V5 is a 29-layer, 2.02B-parameter function-calling model built on LiquidAI/LFM3-1.7B via:
- Equation-Seeded Block Expansion (
24 -> 29layers,1.73B -> 2.02B): 5 identity-residual blocks inserted at depths[13, 16, 19, 22, 25](4short-conv +1full-attention) and seeded via harmonic/cosine interpolation of neighboring layers. - Frozen-Backbone Expanded-Layer SFT + Surgical
w2Irrelevance-Guard DPO (lambda = 0.22): Zero-contamination tool-calling and irrelevance-abstention SFT/DPO trained exclusively on the 5 newly expanded layers (all 24 original backbone layers frozen), blended along the Pareto frontier (lambda = 0.22).
Official UC Berkeley Gorilla BFCL V4 leaderboard submission PR: ShishirPatil/gorilla#1402.
Quickstart (transformers — BF16)
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
model_id = "Sayansantra/LFM3-2.0B-WSP-V5"
tok = AutoTokenizer.from_pretrained(model_id, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(
model_id, torch_dtype=torch.bfloat16, device_map="auto", trust_remote_code=True
)
tools = [{"name": "get_weather", "description": "Get weather for a city",
"parameters": {"type": "object", "properties": {"city": {"type": "string"}}, "required": ["city"]}}]
prompt = tok.apply_chat_template([{"role": "user", "content": "Weather in Kolkata?"}],
tools=tools, tokenize=False, add_generation_prompt=True)
out = model.generate(**tok(prompt, return_tensors="pt").to(model.device), max_new_tokens=512, do_sample=False)
print(tok.decode(out[0][tok(prompt, return_tensors="pt").input_ids.shape[1]:], skip_special_tokens=False))
Quickstart (GGUF — llama.cpp / Ollama / LM Studio)
Pre-quantized GGUF files (llama.cpp b12774, compatible with llama.cpp b11960 / v0.8.0 and newer) are included directly in this repository:
| File | Quant | Size | Recommended Use |
|---|---|---|---|
LFM3-2.0B-WSP-V5-Q4_K_M.gguf | Q4_K_M | 1.18 GB | Fast local/edge tool calling (laptops, phones, Ollama, LM Studio) |
LFM3-2.0B-WSP-V5-Q8_0.gguf | Q8_0 | 2.01 GB | Near-lossless precision for function-calling accuracy |
Run directly with llama.cpp:
# CLI (Q4_K_M)
llama-cli -hf Sayansantra/LFM3-2.0B-WSP-V5:Q4_K_M --temp 0.1 --top-k 50 --repeat-penalty 1.1
# OpenAI-compatible tool-calling server (Q8_0)
llama-server -hf Sayansantra/LFM3-2.0B-WSP-V5:Q8_0 --jinja --port 8080
Run with Ollama:
ollama run hf.co/Sayansantra/LFM3-2.0B-WSP-V5:Q4_K_M
Same-Harness Stock LiquidAI/LFM3-1.7B vs. Hydrogen-WSP (24L -> 29L) Progression
Evaluated on the exact same UC Berkeley Gorilla BFCL V4 AST harness (6 parallel workers on 2x T4 for Single-Turn; 4 bit-exact stateful simulator workers on 2x T4 for 800-Episode Multi-Turn):
| Model / Variant | Layers / Params | max_new_tokens | Avg Output Tokens (Truncation %) | simple_python | multiple | parallel | parallel_multiple | Non-Live AST Avg | irrelevance | live_simple | 6-Split Core | Stateful Multi-Turn (800 eps) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
Stock LiquidAI/LFM3-1.7B (Same-Budget 420-Task Gate) | 24L / 1.73B | 768 | 363.6 tok (13.81% trunc) | 95.00% | 88.33% | 81.67% | 75.00% | 85.00% | 89.17% | 70.00% | 83.19% | — |
Stock LiquidAI/LFM3-1.7B (Full 1,498-Task Extended Budget) | 24L / 1.73B | 1536 | 392.1 tok (2.80% trunc) | 92.50% | 93.00% | 85.50% | 84.00% | 88.75% | 83.33% | 75.58% | 85.65% | — |
Sayansantra/LFM3-2.0B-WSP-V4 | 29L / 2.02B | 768 | ~185 tok (0.13% trunc) | 93.25% | 93.00% | 85.00% | 77.42% | 87.17% | 75.00% | 78.68% | 82.06% | 17.00% |
Sayansantra/LFM3-2.0B-WSP-V5 (lambda=0.22, Surgical w2 IrrGuard) | 29L / 2.02B | 768 | ~180 tok (0.13% trunc) | 93.25% | 93.00% | 85.00% | 77.50% | 87.19% | 80.83% | 79.46% | 83.16% | 17.25% |
LFM3-2.0B-WSP-V6-MultiStep (lambda=0.30 / 0.45, 420-Task Gate + 800-Ep MT) | 29L / 2.02B | 768 | 61.8 tok (0.00% trunc) | 96.67% | 90.00% | 86.67% | 88.33% | 90.00% | 39.17% | 70.00% | 78.19% | 17.75%–18.00% |
LFM3-2.0B-WSP-V7-ActionForce (lambda=0.35, 180-Task Gate + 800-Ep MT) | 29L / 2.02B | 768 | ~60 tok (0.00% trunc) | — | — | 80.00% | 87.50%–92.50% | — | 65.00%–66.67% | 67.50% | — | 17.88% (143/800) |
- Key Mechanism Discovery: Stock
LiquidAI/LFM3-1.7Bemits verbose<think>...</think>traces averaging 363.6–392.1 tokens/call, causing 13.81% truncation under standard768-token tool-calling budgets (85.00%Non-Live AST,75.00%parallel_multiple,70.00%live_simple). Hydrogen-WSP block expansion (24L -> 29L) compresses reasoning length (~180tokens inWSP-V5and61.8tokens /0.00%truncation inWSP-V6/WSP-V7), lifting768-token Non-Live AST from 85.00% (Stock 1.7B) -> 87.19% (WSP-V5) -> 90.00% (WSP-V6),live_simpleto 79.46% (+9.46 ptsover Stock 1.7B at768tokens and+3.88 ptseven at1536tokens), and 800-episode True Stateful Multi-Turn from 17.00% (WSP-V4) -> 17.25% (WSP-V5) -> 17.88% (WSP-V7).
Complete 4,091-Task Official UC Berkeley Gorilla BFCL Scorecard
All scores below were evaluated with zero subsampling and zero benchmark contamination on gorilla-llm/Berkeley-Function-Calling-Leaderboard. Raw per-task prediction logs are included in eval_results/. Frontier reference columns are taken directly from the official ShishirPatil/gorilla data_overall.csv.
| Official BFCL Compartment / Split | Official Dataset File | Tasks / Episodes | Stock LiquidAI/LFM3-1.7B (768 / 1536 tok) | LFM3-2.0B-WSP-V4 (768 tok) | LFM3-2.0B-WSP-V5 (lambda=0.22, 768 tok) | Official BFCL V4 Frontier Reference (data_overall.csv) |
|---|---|---|---|---|---|---|
Non-Live: simple_python | BFCL_v3_simple.json | 400 | 95.00% (gate) / 92.50% | 93.25% | 93.25% | Claude Opus 4.5 (FC): 76.83% (All Simple) |
Non-Live: multiple | BFCL_v3_multiple.json | 200 | 88.33% (gate) / 93.00% | 93.00% | 93.00% | GPT-5.2 (FC): 88.00% / Claude Opus 4.5 (FC): 95.50% |
Non-Live: parallel | BFCL_v3_parallel.json | 200 | 81.67% (gate) / 85.50% | 85.00% | 85.00% | GPT-5-mini (FC): 80.00% / GPT-5.2 (FC): 89.00% |
Non-Live: parallel_multiple | BFCL_v3_parallel_multiple.json | 200 | 75.00% (gate) / 84.00% | 77.42% | 77.50% (88.33% in V6) | GPT-5.2 (FC): 77.50% / Claude Opus 4.5 (FC): 88.50% |
| Non-Live Python AST Avg | 4 Non-Live Python Splits | 1,000 | 85.00% (gate) / 88.75% | 87.17% | 87.19% (90.00% in V6) | GPT-5.2 (FC): 81.85% / Gemini 3 Pro (FC): 85.75% / #1 Claude Opus 4.5 (FC): 88.58% |
Hallucination: irrelevance | BFCL_v3_irrelevance.json | 240 | 89.17% (gate) / 83.33% | 75.00% | 80.83% (+5.83 vs V4) | GPT-5.2 (FC): 79.42% / Claude Opus 4.5 (FC): 84.72% |
Live: live_simple | BFCL_v3_live_simple.json | 258 | 70.00% (gate) / 75.58% | 78.68% | 79.46% (+3.88 vs Stock) | GPT-5-mini (FC): 62.02% / GPT-5.2 (FC): 71.71% |
| 6-Split Core Single-Turn Avg | 1,498 Core Single-Turn Tasks | 1,498 | 83.19% (gate) / 85.65% | 82.06% | 83.16% (0.13% trunc) | Stock 1.7B has 13.81% trunc at 768 tok (363.6 avg tok) |
Live: live_multiple | BFCL_v3_live_multiple.json | 1,053 | - | 74.17% | 73.79% | GPT-5-mini (FC): 58.02% / GPT-5.2 (FC): 70.37% |
Live: live_parallel | BFCL_v3_live_parallel.json | 16 | - | 68.75% | 68.75% | Claude Opus 4.5 (FC): 87.50% |
Live: live_parallel_multiple | BFCL_v3_live_parallel_multiple.json | 24 | - | 62.50% | 62.50% | GPT-5.2 (FC): 58.33% |
Live: live_irrelevance | BFCL_v3_live_irrelevance.json | 882 | - | 53.75% | 55.22% | Live irrelevance abstention |
Live: live_relevance | BFCL_v3_live_relevance.json | 18 | - | 78.72% | 74.47% | Claude Opus 4.5 (FC): 62.50% |
| Full Official Live Suite | All 6 Official Live Splits | 1,993 | - | 69.54% | 69.03% | GPT-5-mini (FC): 58.62% / GPT-5.2 (FC): 70.39% / #1 Claude Opus 4.5 (FC): 79.79% |
Stateful Multi-Turn: base | BFCL_v3_multi_turn_base.json | 200 | - | 17.50% | 18.00% (19.00% in V6/V7) | Real Gorilla simulator state match |
Stateful Multi-Turn: miss_func | BFCL_v3_multi_turn_miss_func.json | 200 | - | 15.50% | 15.00% (16.50% in V6) | Real Gorilla simulator state match |
Stateful Multi-Turn: miss_param | BFCL_v3_multi_turn_miss_param.json | 200 | - | 17.00% | 17.50% (17.50% in V6/V7) | Real Gorilla simulator state match |
Stateful Multi-Turn: long_context | BFCL_v3_multi_turn_long_context.json | 200 | - | 18.00% | 18.50% (19.00% in V6/V7) | Real Gorilla simulator state match |
| Full Official Stateful Multi-Turn | All 4 Multi-Turn Splits | 800 | - | 17.00% | 17.25% (17.88% in V7) | GPT-5.2 (FC): 28.12% / #1 Claude Opus 4.5 (FC): 68.38% |
License
This model is a derivative of LiquidAI/LFM3-1.7B and is governed by the LFM Open License v1.0 (lfm1.0). See LICENSE for full terms.