LFM3-1.7B-Agent-v0.01.000
LFM3-1.7B-Agent-v0.01.000 is a compact 1.73B (BF16, 3.46 GB) tool-calling agent fine-tune of orcarouter/LFM3-1.7B-abliterated trained on nvidia/Nemotron-SFT-Agentic-v4 as Stage 1 of a local finance and tool-use agent.
Why This Model Is Better (and What Remains Early-Stage)
Compared to the abliterated base (orcarouter/LFM3-1.7B-abliterated), this Stage 1 SFT checkpoint learns to drive multi-turn search and tool loops to completion instead of stalling out:
- Higher task completion rate: On held-out SEC-filing finance tasks (
Nemotron-RL-Agentic-Finance-v1, max 16 turns), the model submits an answer on65.0%(13/20) of tasks vs35.0%(7/20) on Base (+30.0 pts). - 2x faster per-task runtime: Median completion time drops from
417 sto213 s(-48.9%) on the same 20-task finance eval. - Stronger single-turn function calling & math: Simple BFCL function calling rises from
80.0%(32/40) to90.0%(36/40), and GSM8K rises from76.0%(38/50) to82.0%(41/50). - Honest Stage 1 gaps: End-to-end finance answer accuracy remains
5.0%(1/20, unchanged from Base), and malformed tool-call errors rose from8.8%(23/262) to16.5%(44/267). (Forbscodeand DeepSeek Harness PTC coding/security workflows, see the newerballlvin/BS-0.5-Tiny+balllvin/LFM3-1.7B-Abliterated-Arete-NVFP4-MLXstack.)
Benchmark Results
Measured on 2026-11-06 across held-out evaluations against orcarouter/LFM3-1.7B-abliterated (95% Wilson CIs in notes):
| Benchmark | Base (Abliterated) | LFM3-1.7B-Agent-v0.01.000 | Delta |
|---|---|---|---|
Finance Agent Answered (20 tasks) | 35.0% | 65.0% | +30.0 pts |
Finance Agent Fully Correct (20 tasks) | 5.0% | 5.0% | 0.0 pts |
| Median Time per Finance Task | 417 s | 213 s | -48.9% |
| Tool-Call Failure Rate | 8.8% | 16.5% | +7.7 pts |
GSM8K (50 problems) | 76.0% | 82.0% | +6.0 pts |
BFCL Simple (40 calls) | 80.0% | 90.0% | +10.0 pts |
BFCL Live (40 calls) | 70.0% | 67.5% | -2.5 pts |
(Exact counts: Finance answered 7/20 -> 13/20; Finance correct 1/20 -> 1/20; Tool errors 23/262 -> 44/267; GSM8K 38/50 -> 41/50; BFCL Simple 32/40 -> 36/40; BFCL Live 28/40 -> 27/40. Finance tasks are from the validation split of nvidia/Nemotron-RL-Agentic-Finance-v1.)
Which Build to Download
This repository stores full BF16 (3.46 GB) weights runnable directly on both Apple Silicon (mlx-vlm) and Linux/CUDA (transformers / vLLM), plus sample scripts in inference/.
| Hardware / Purpose | Format | Repository | Notes |
|---|---|---|---|
| Apple Silicon & CUDA (this repo) | BF16 (3.46 GB) | balllvin/LFM3-1.7B-Agent-v0.01.000 | Direct mlx-vlm & transformers load |
4-bit Base (Mac MLX) | NVFP4-MLX (1.83 GB) | balllvin/LFM3-1.7B-Abliterated-Arete-NVFP4-MLX | Bundles brainspa_lfm3serve |
4-bit Base (NVIDIA CUDA) | NVFP4 (1.83 GB) | balllvin/LFM3-1.7B-Abliterated-Arete-NVFP4 | vLLM W4A16_NVFP4 |
Newer bscode / PTC adapter | PEFT LoRA | balllvin/BS-0.5-Tiny | Coding & harness PTC milestone |
Agent Setup & Hosting
Accept the repository terms on this page and authenticate (hf auth login or HF_TOKEN). Pass OpenAI-style function schemas to apply_chat_template(..., tools=TOOLS); the model outputs <tool_call><function=...>...</function></tool_call> blocks. Leave max_tokens unset or high so thinking traces complete cleanly.
1. Apple Silicon / MLX (mlx-vlm)
hf download balllvin/LFM3-1.7B-Agent-v0.01.000 --local-dir ~/models/LFM3-1.7B-Agent-v0.01.000
uv venv --python 3.12 && source .venv/bin/activate
uv pip install "mlx-vlm==0.7.12"
python -m mlx_vlm.server --model ~/models/LFM3-1.7B-Agent-v0.01.000 --port 8080 --enable-thinking
Or run the bundled tool-call smoke test (inference/run_mlx.py):
python ~/models/LFM3-1.7B-Agent-v0.01.000/inference/run_mlx.py --model ~/models/LFM3-1.7B-Agent-v0.01.000
2. Linux / NVIDIA GPU (vLLM or transformers)
uv venv --python 3.12 && source .venv/bin/activate
uv pip install "torch>=2.6" "transformers>=5.19" accelerate
python inference/run_transformers.py --model balllvin/LFM3-1.7B-Agent-v0.01.000
Or serve via vLLM (with transformers>=5.19 / LFM3 support, trust_remote_code=True):
vllm serve balllvin/LFM3-1.7B-Agent-v0.01.000 \
--served-model-name lfm3-agent \
--trust-remote-code \
--reasoning-parser qwen3 \
--max-model-len 32768 \
--host 127.0.0.1 --port 8080
Or load directly in Python:
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
repo = "balllvin/LFM3-1.7B-Agent-v0.01.000"
tok = AutoTokenizer.from_pretrained(repo, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(repo, dtype=torch.bfloat16, trust_remote_code=True).to("cuda")
3. Verify Running Endpoint
curl -sS http://127.0.0.1:8080/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{
"model": "lfm3-agent",
"messages": [{"role": "user", "content": "Confirm tool-calling readiness in one short line."}],
"temperature": 0.0
}' | python3 -m json.tool
Memory & Context Budget
- Architecture:
lfm3(1.73Bparams,24layers:13gated short-conv,5sliding-window256,6full attention with4KV heads ×128head dim). - Weight footprint:
3.46 GB(3.22 GiB) on disk in BF16. - Context:
262,144(256K) nativemax_position_embeddings; trained up to32,768(32K) token sequences. - KV cache:
12 KiB(12,288bytes) per token across full-attention layers in BF16, plus2.86 MiBfixed sliding-window/conv state per request (computed fromconfig.json).
| Context per Request | 1 Request KV | 4 Requests KV | 8 Requests KV |
|---|---|---|---|
| 8K | 0.10 GiB | 0.39 GiB | 0.77 GiB |
| 32K | 0.38 GiB | 1.51 GiB | 3.02 GiB |
| 128K | 1.50 GiB | 6.01 GiB | 12.02 GiB |
| 256K | 3.00 GiB | 12.01 GiB | 24.02 GiB |
Training & Limits
- Base checkpoint:
orcarouter/LFM3-1.7B-abliterated(revisionc1ca5b62). - Training pipeline:
3,127conversations (3,079train /48validation,13.3Mtokens, sequences>32,768dropped) from thetool_callingsplit ofnvidia/Nemotron-SFT-Agentic-v4. Assistant-only loss, LoRAr=32,alpha=64on all linear layers, LR1e-4with4%warmup + cosine decay, batch size32,97steps (4.0 hon Apple M5 Pro via MLX; held-out loss0.624at step 20 →0.607at step 97), merged into BF16model.safetensors. - Known limits: Built on an abliterated base with refusals removed (add external safety controls before multi-user deployment). Early Stage 1 accuracy on finance tasks is
1/20(5%), tool-call error rate is16.5%, and long-context/safety/non-English performance was not evaluated.
License & Terms
- License: LFM Open License v1.0 (details;
LICENSEfile in repo; commercial use allowed only below$10Mannual revenue). Independent community build unaffiliated with Liquid AI, OrcaRouter, or NVIDIA. - Terms of use: Access requires agreeing to the gating form on this repository page (full text). Log in with
hf auth loginor setHF_TOKENbefore downloading.