Instructions to use saidutta69/LFM3-1.7B-Claude-Fable5.1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use saidutta69/LFM3-1.7B-Claude-Fable5.1 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="saidutta69/LFM3-1.7B-Claude-Fable5.1", trust_remote_code=True) messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("saidutta69/LFM3-1.7B-Claude-Fable5.1", trust_remote_code=True) model = AutoModelForCausalLM.from_pretrained("saidutta69/LFM3-1.7B-Claude-Fable5.1", trust_remote_code=True, 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=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - PEFT
How to use saidutta69/LFM3-1.7B-Claude-Fable5.1 with PEFT:
Task type is invalid.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use saidutta69/LFM3-1.7B-Claude-Fable5.1 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 saidutta69/LFM3-1.7B-Claude-Fable5.1:Q4_K_M # Run inference directly in the terminal: llama cli -hf saidutta69/LFM3-1.7B-Claude-Fable5.1:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf saidutta69/LFM3-1.7B-Claude-Fable5.1:Q4_K_M # Run inference directly in the terminal: llama cli -hf saidutta69/LFM3-1.7B-Claude-Fable5.1:Q4_K_M
Build from source code
git clone https://github.com/ggml-org/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-app # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama serve -hf saidutta69/LFM3-1.7B-Claude-Fable5.1:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama cli -hf saidutta69/LFM3-1.7B-Claude-Fable5.1:Q4_K_M
Use Docker
docker model run hf.co/saidutta69/LFM3-1.7B-Claude-Fable5.1:Q4_K_M
- Llama new
- LM Studio
- Jan
- vLLM
How to use saidutta69/LFM3-1.7B-Claude-Fable5.1 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "saidutta69/LFM3-1.7B-Claude-Fable5.1" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "saidutta69/LFM3-1.7B-Claude-Fable5.1", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/saidutta69/LFM3-1.7B-Claude-Fable5.1:Q4_K_M
- SGLang
How to use saidutta69/LFM3-1.7B-Claude-Fable5.1 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 "saidutta69/LFM3-1.7B-Claude-Fable5.1" \ --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": "saidutta69/LFM3-1.7B-Claude-Fable5.1", "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 "saidutta69/LFM3-1.7B-Claude-Fable5.1" \ --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": "saidutta69/LFM3-1.7B-Claude-Fable5.1", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Ollama
How to use saidutta69/LFM3-1.7B-Claude-Fable5.1 with Ollama:
ollama run hf.co/saidutta69/LFM3-1.7B-Claude-Fable5.1:Q4_K_M
- Unsloth Desktop
- Pi
How to use saidutta69/LFM3-1.7B-Claude-Fable5.1 with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf saidutta69/LFM3-1.7B-Claude-Fable5.1:Q4_K_M
Configure the model in Pi
# Install Pi: npm install -g @earendil-works/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "saidutta69/LFM3-1.7B-Claude-Fable5.1:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use saidutta69/LFM3-1.7B-Claude-Fable5.1 with Docker Model Runner:
docker model run hf.co/saidutta69/LFM3-1.7B-Claude-Fable5.1:Q4_K_M
- Lemonade
How to use saidutta69/LFM3-1.7B-Claude-Fable5.1 with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull saidutta69/LFM3-1.7B-Claude-Fable5.1:Q4_K_M
Run and chat with the model
lemonade run user.LFM3-1.7B-Claude-Fable5.1-Q4_K_M
List all available models
lemonade list
- Hermes Agent
How to use saidutta69/LFM3-1.7B-Claude-Fable5.1 with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf saidutta69/LFM3-1.7B-Claude-Fable5.1: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 saidutta69/LFM3-1.7B-Claude-Fable5.1:Q4_K_M
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use saidutta69/LFM3-1.7B-Claude-Fable5.1 with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf saidutta69/LFM3-1.7B-Claude-Fable5.1: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 "saidutta69/LFM3-1.7B-Claude-Fable5.1: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"
LFM3-1.7B-Claude-Fable5.1
A tool-calling fine-tune of LiquidAI/LFM3-1.7B on the claude_code split of saidutta69/fable-5.1-premium-v2.
It teaches the 1.7B LFM3 hybrid to emit Claude Code tool calls - Bash, Read, Write, Edit, Glob, Grep, WebFetch, WebSearch, TodoWrite, TaskCreate, TaskUpdate, TaskOutput, ToolSearch - with valid tool names and typed arguments. The base model is already agentic; this checkpoint is tuned for schema fidelity inside a Claude-Code-style harness.
Who this is for
- Running a Claude-Code-style tool protocol on a local 1.7B model -
Q4_K_Mis 1.10 GB. - Harnesses where an invalid tool name breaks the loop. The base model invents a tool on ~23% of parsed calls; this checkpoint does not.
- Not a general-purpose LFM3 upgrade. Free-form text modelling shifted; use the base for general writing.
Why this fine-tune
The dataset's fable_code split is unusable for argument fidelity: 203,750 of 203,794 tool calls carry whole-value placeholders such as <file_path> and <bash_command> (44 clean calls total). The claude_code split carries real values (tasks/SEED_SPEC.md, real shell commands), so training used that split.
The schemas in this dataset are reconstructed, not original Claude Code schemas. They are close enough for the protocol, but do not assume byte-identical parity with a live Claude Code install.
Training
| Method | bf16 LoRA, no quantization |
| LoRA | r=32, alpha=64, dropout 0.05 |
| Targets | q/k/v/o_proj, conv in_proj/out_proj, MLP w1/w2/w3 |
| Data | 48,467 segments from 4,132 traces, 4,096-token windows |
| Masking | assistant turn only; tool outputs and user/system tokens are -100 |
| Schedule | 3,030 steps, effective batch 16, LR 1e-4 cosine, 3% warmup |
| Hardware | 1x RTX PRO 6000 Blackwell (102 GB), 6 h 39 m, peak 31 GB |
| Final loss | 0.200 |
Samples are one assistant action each, with the conversation window trimmed to 4,096 tokens. The tool schemas are injected through LFM3's own chat template, with enable_thinking=False.
Performance
Same harness for both models: 100 held-out claude_code test samples, greedy decoding, 2,048-token budget.
| Metric | Base LFM3-1.7B | This model |
|---|---|---|
| Held-out supervised loss | 1.731 | 0.233 |
| Starts a tool call | 97% | 100% |
| Parseable call | 97% | 95% |
| Tool name valid (per sample) | 75% | 95% |
| Tool name valid (of parsed) | 77.3% | 100% |
| Required args present (of parsed) | 96.9% | 100% |
| Argument types correct (of parsed) | 100% | 100% |
| Chat/math sample | 11/11 factual | 11/11 factual |
| Wikitext perplexity | 17.35 | 23.32 |
The 5% parse gap is truncated output at the 2,048-token cap: this model writes fuller Write and Bash bodies, so some calls do not close inside the budget. Every parsed call has a valid name, required arguments, and correct types. Raise the budget or stream the call and the gap closes.
The perplexity rise is real: this is a specialist, not a general upgrade. The chat/math gate is unchanged (11/11 factual, 20/20 answered).
Files
| File | Size | Notes |
|---|---|---|
model.safetensors |
3.46 GB | bf16 reference, use with trust_remote_code=True |
LFM3-1.7B-Claude-Fable5.1-f16.gguf |
3.47 GB | GGUF reference |
LFM3-1.7B-Claude-Fable5.1-Q8_0.gguf |
1.85 GB | near-lossless |
LFM3-1.7B-Claude-Fable5.1-Q6_K.gguf |
1.43 GB | high quality |
LFM3-1.7B-Claude-Fable5.1-Q5_K_M.gguf |
1.26 GB | balanced |
LFM3-1.7B-Claude-Fable5.1-Q4_K_M.gguf |
1.10 GB | default for local use |
All five GGUFs report arch=lfm3, 287 tensors, and context_length=262144, and were load-tested with llama.cpp built from master (LFM3 support is recent - update llama.cpp before using these files).
Quickstart
llama.cpp
llama serve -hf saidutta69/LFM3-1.7B-Claude-Fable5.1:Q4_K_M --jinja \
--chat-template-kwargs '{"enable_thinking":false}'
Transformers
import torch
from transformers import AutoTokenizer, AutoModelForCausalLM
repo = "saidutta69/LFM3-1.7B-Claude-Fable5.1"
tok = AutoTokenizer.from_pretrained(repo, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(
repo, dtype=torch.bfloat16, device_map="auto", trust_remote_code=True
)
messages = [{"role": "user", "content": "List the files in tasks/"}]
tools = [{
"type": "function",
"function": {
"name": "Bash",
"description": "Run a shell command.",
"parameters": {
"type": "object",
"properties": {"command": {"type": "string"}},
"required": ["command"],
},
},
}]
prompt = tok.apply_chat_template(
messages, tools=tools, tokenize=False,
add_generation_prompt=True, enable_thinking=False,
)
inputs = tok(prompt, return_tensors="pt").to(model.device)
out = model.generate(**inputs, max_new_tokens=512, do_sample=False)
print(tok.decode(out[0][inputs["input_ids"].shape[1]:], skip_special_tokens=False))
Tool calls render as:
<tool_call>
<function=Bash>
<parameter=command>
ls tasks/
</parameter>
</function>
</tool_call>
FAQ
What is LFM3-1.7B-Claude-Fable5.1?
It is a bf16 LoRA fine-tune of LiquidAI/LFM3-1.7B, merged into the base and trained on the claude_code configuration of saidutta69/fable-5.1-premium-v2. The goal is strict Claude-Code-style tool calling on a 1.7B model, not a new general model.
How does it compare to the base LFM3-1.7B?
On 100 held-out samples, tool-name validity rises from 77.3% to 100% of parsed calls, required arguments from 96.9% to 100%, and held-out loss falls from 1.731 to 0.233. It starts a call on 100% of samples vs 97% for the base. Raw parse is 95% vs 97% because this model writes longer tool bodies that truncate at the 2,048-token evaluation cap. Chat/math accuracy is unchanged at 11/11.
How do I run LFM3-1.7B-Claude-Fable5.1 locally?
Use llama.cpp from master (LFM3 support is recent):
llama serve -hf saidutta69/LFM3-1.7B-Claude-Fable5.1:Q4_K_M --jinja \
--chat-template-kwargs '{"enable_thinking":false}'
Q4_K_M is 1.10 GB. For the reference weights use :F16 or the bf16 safetensors with trust_remote_code=True.
Responsible use
Tool calls execute real commands and write real files. Run this model in a sandbox, review Bash commands before execution, and never expose it to untrusted input without a permission layer.
Limitations, stated plainly:
- Evaluation is in-distribution: 100 held-out samples from the same dataset, greedy decoding, 2,048-token budget. No independent agent benchmark or multi-turn end-to-end task suite was run.
- The tool schemas are reconstructed from the dataset, not copied from Claude Code.
- 4,096-token training window.
- General free-form text modelling regressed (wikitext perplexity 17.35 -> 23.32).
Made with ❤️ by RACER IS OP (saidutta69)
License
LFM Open License v1.0 - license: other, license_name: lfm1.0.
This is not Apache-2.0. The full text is in LICENSE and the terms are Liquid AI's; review them before commercial use. The base model is LiquidAI/LFM3-1.7B, and this derivative keeps its license.
Related
LiquidAI/LFM3-1.7B- the base model this checkpoint derives fromsaidutta69/fable-5.1-premium-v2- the training data (claude_codeconfiguration)
- Downloads last month
- 2,240
Model tree for saidutta69/LFM3-1.7B-Claude-Fable5.1
Base model
LiquidAI/LFM3-1.7B-Base