Instructions to use Luigi/lfm2.5-350m-cursor-en with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Luigi/lfm2.5-350m-cursor-en with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Luigi/lfm2.5-350m-cursor-en") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Luigi/lfm2.5-350m-cursor-en") model = AutoModelForCausalLM.from_pretrained("Luigi/lfm2.5-350m-cursor-en", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use Luigi/lfm2.5-350m-cursor-en with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf Luigi/lfm2.5-350m-cursor-en:Q4_K_M # Run inference directly in the terminal: llama cli -hf Luigi/lfm2.5-350m-cursor-en:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf Luigi/lfm2.5-350m-cursor-en:Q4_K_M # Run inference directly in the terminal: llama cli -hf Luigi/lfm2.5-350m-cursor-en:Q4_K_M
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf Luigi/lfm2.5-350m-cursor-en:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf Luigi/lfm2.5-350m-cursor-en:Q4_K_M
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf Luigi/lfm2.5-350m-cursor-en:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf Luigi/lfm2.5-350m-cursor-en:Q4_K_M
Use Docker
docker model run hf.co/Luigi/lfm2.5-350m-cursor-en:Q4_K_M
- LM Studio
- Jan
- vLLM
How to use Luigi/lfm2.5-350m-cursor-en with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Luigi/lfm2.5-350m-cursor-en" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Luigi/lfm2.5-350m-cursor-en", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Luigi/lfm2.5-350m-cursor-en:Q4_K_M
- SGLang
How to use Luigi/lfm2.5-350m-cursor-en with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "Luigi/lfm2.5-350m-cursor-en" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Luigi/lfm2.5-350m-cursor-en", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "Luigi/lfm2.5-350m-cursor-en" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Luigi/lfm2.5-350m-cursor-en", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Ollama
How to use Luigi/lfm2.5-350m-cursor-en with Ollama:
ollama run hf.co/Luigi/lfm2.5-350m-cursor-en:Q4_K_M
- Unsloth Studio
How to use Luigi/lfm2.5-350m-cursor-en with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for Luigi/lfm2.5-350m-cursor-en to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for Luigi/lfm2.5-350m-cursor-en to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for Luigi/lfm2.5-350m-cursor-en to start chatting
- Pi
How to use Luigi/lfm2.5-350m-cursor-en with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf Luigi/lfm2.5-350m-cursor-en:Q4_K_M
Configure the model in Pi
# Install Pi: npm install -g @mariozechner/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "Luigi/lfm2.5-350m-cursor-en:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- OpenClaw new
How to use Luigi/lfm2.5-350m-cursor-en with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf Luigi/lfm2.5-350m-cursor-en:Q4_K_M
Configure OpenClaw
# Install OpenClaw: npm install -g openclaw@latest # Register the local server and set it as the default model: openclaw onboard --non-interactive --mode local \ --auth-choice custom-api-key \ --custom-base-url http://127.0.0.1:8080/v1 \ --custom-model-id "Luigi/lfm2.5-350m-cursor-en:Q4_K_M" \ --custom-provider-id llama-cpp \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
- Docker Model Runner
How to use Luigi/lfm2.5-350m-cursor-en with Docker Model Runner:
docker model run hf.co/Luigi/lfm2.5-350m-cursor-en:Q4_K_M
- Lemonade
How to use Luigi/lfm2.5-350m-cursor-en with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull Luigi/lfm2.5-350m-cursor-en:Q4_K_M
Run and chat with the model
lemonade run user.lfm2.5-350m-cursor-en-Q4_K_M
List all available models
lemonade list
- Hermes Agent
How to use Luigi/lfm2.5-350m-cursor-en with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf Luigi/lfm2.5-350m-cursor-en:Q4_K_M
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:8080/v1 hermes config set model.default Luigi/lfm2.5-350m-cursor-en:Q4_K_M
Run Hermes
hermes
- Atomic Chat
LFM2.5-350M CURSOR Agent — English meeting-notes editor
A fine-tuned Liquid LFM2.5-350M (linear-attention, 350M params, ~215 MB at Q4_K_M) that runs an agentic meeting-summarization protocol (CURSOR): it streams a meeting transcript chunk-by-chunk and emits edit operations that curate one evolving set of structured, timestamp-anchored meeting notes — instead of passively summarizing a window.
This is the English model of a per-language pair; the Chinese-Traditional model is at
Luigi/lfm2.5-350m-cursor-zh.
The task: CURSOR, not map-reduce
Classic map-reduce summarization (independent per-window digests → merge → shrink) produces locally-correct but globally-disconnected notes: it cannot say how a decision evolved. CURSOR streams the transcript and gives the model exactly one job per step: look at the current notes (STATE) and the next transcript block (CHUNK), and revise:
per step i:
input: SYS + STATE (current notes) + CHUNK_i (transcript block)
output: edit ops — ADD / UPD / DEL / NOP / TITLE
harness: validates, applies, caps, advances
end: optional VERIFY/ANCHOR sweep (judge-backed faithfulness backstop) → render
Because STATE is the only memory (no conversation history crosses steps), temporal integration becomes revising a visible earlier bullet (UPD) — the property that makes the protocol learnable at sub-1B scale. The deterministic harness owns the final word.
Output format (NOTES v2)
TITLE: Office move decision
SUMMARY:
- Move to Building B agreed after discussion [5:10]
DECISIONS:
- Relocate the office to Building B [5:10]
ACTIONS:
- S2: circulate the move checklist (due: Friday) [6:02]
OPEN:
- Parking allocation for Building B [7:40]
TOPICS:
- Office move [0:00]
Every bullet ends with the [m:ss] of the transcript line that supports it.
Training
| stage | data | purpose |
|---|---|---|
| SFT | teacher traces (Gemma-4-31B replaying the real harness, judge-filtered), screen-structured synthetic meetings (revision chains, deadlines, trap topics), real transcripts (QMSum, MeetingBank) at 2048 and 128-token chunks | learn the protocol: op grammar, state-gated UPD/DEL, anchor copying, content selection |
| phase-2 | real-transcript traces upsampled ×3 (the evaluation distribution), low LR (2e-5), 2 epochs, continuing from the G1-passing checkpoint | fix fabrication on real meetings (the synthetic/real distribution gap) |
Full fine-tune, bf16, completion-only loss, 4096 context. The per-language split exists because a 350M model holds one language's full protocol at a time (measured seesaw); the composite (en + zh, ~430 MB total) stays inside the on-device envelope.
Evaluation (T1 tier, n=20, paired vs a 9B map-reduce baseline)
| metric | result |
|---|---|
| G1 capability screen (decision chain, deadlines, anchors, trap) | PASS (valid-op 100%) |
| FAITH-claim | +1.05 (14/2/2, p=0.004) |
| INVERT (notes stating the opposite of the transcript) | 0 / 20 (baseline: 3) |
| FAITH-anchor | +0.40 |
| SYNTH (meeting-level insight) | +0.50 (at the +0.5 gate) |
| prefill vs baseline | 0.51x |
Judges: local gpt-oss-20b (FAITH/INVERT, 3× majority), qwen3.6-35B (COVER/SYNTH) — judge family ∉ {student, teacher}. The VERIFY/ANCHOR sweep (harness-side, judge-backed) is part of the deployed pipeline and is what turns 12/20 raw inversions into 0/20.
Quick start (with the project harness)
The model is a component of the CURSOR pipeline in
agentic-summarizer; it speaks the harness's
op grammar. Minimal use:
# via the project's eval/screen.py (text grammar, greedy)
python eval/screen.py --base-url http://127.0.0.1:8080 --lang en
Served via llama.cpp:
llama-server -m lfm2.5-350m-cursor-en.Q4_K_M.gguf \
--n-gpu-layers 999 --ctx-size 4096 --temp 0 --jinja
The GGUF (Q4_K_M) and the HF safetensors are both in this repo.
Intended use
- Meeting/transcript → structured, timestamp-anchored notes (decisions, actions, open questions, topics)
- On-device: 350M params, ~215 MB Q4_K_M, 4k context — fits a 785 MB envelope with room for a bigger sweep budget
Limitations
- English only (see the zh model for Chinese-Traditional); each language model holds one language's protocol
- 4k context per step: ~2048-token chunks with a ≤600-token state
- Trained with synthesized clocks (150 wpm): anchors are internally consistent but the wall-clock values are not real; FAITH-anchor on real audio is unmeasured
- zh training data is synthetic-only (VCSum unobtainable); contested zh is unmeasured
- The base model's license is the LFM Open License v1.0 — redistribution requires the license text and attribution (included in this repo)
Model
- Base:
LiquidAI/LFM2.5-350M - Architecture: LFM2.5 (linear attention), 16 layers, hidden 1024
- Parameters: 350M (268M trainable in SFT)
- Context: 4096 (trained) / 128k (architecture)
- Quantization: Q4_K_M GGUF included (~215 MB)
License
This model is a derivative of LFM2.5-350M under the LFM Open License v1.0 (included in this repo). Training data is synthetic and public-corpus derived (QMSum, MeetingBank); no personal data. Distributed under the same license with attribution to Liquid AI, Inc.
- Downloads last month
- -