Instructions to use LeanProgressIQ/LFM3-1.7B-aura-grounded with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use LeanProgressIQ/LFM3-1.7B-aura-grounded with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("LiquidAI/LFM3-1.7B") model = PeftModel.from_pretrained(base_model, "LeanProgressIQ/LFM3-1.7B-aura-grounded") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use LeanProgressIQ/LFM3-1.7B-aura-grounded 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 LeanProgressIQ/LFM3-1.7B-aura-grounded:Q8_0 # Run inference directly in the terminal: llama cli -hf LeanProgressIQ/LFM3-1.7B-aura-grounded:Q8_0
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf LeanProgressIQ/LFM3-1.7B-aura-grounded:Q8_0 # Run inference directly in the terminal: llama cli -hf LeanProgressIQ/LFM3-1.7B-aura-grounded:Q8_0
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 LeanProgressIQ/LFM3-1.7B-aura-grounded:Q8_0 # Run inference directly in the terminal: ./build/bin/llama cli -hf LeanProgressIQ/LFM3-1.7B-aura-grounded:Q8_0
Use Docker
docker model run hf.co/LeanProgressIQ/LFM3-1.7B-aura-grounded:Q8_0
- Llama new
- LM Studio
- Jan
- vLLM
How to use LeanProgressIQ/LFM3-1.7B-aura-grounded with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "LeanProgressIQ/LFM3-1.7B-aura-grounded" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "LeanProgressIQ/LFM3-1.7B-aura-grounded", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/LeanProgressIQ/LFM3-1.7B-aura-grounded:Q8_0
- Ollama
How to use LeanProgressIQ/LFM3-1.7B-aura-grounded with Ollama:
ollama run hf.co/LeanProgressIQ/LFM3-1.7B-aura-grounded:Q8_0
- Unsloth Desktop
- Pi
How to use LeanProgressIQ/LFM3-1.7B-aura-grounded with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf LeanProgressIQ/LFM3-1.7B-aura-grounded:Q8_0
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": "LeanProgressIQ/LFM3-1.7B-aura-grounded:Q8_0" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use LeanProgressIQ/LFM3-1.7B-aura-grounded with Docker Model Runner:
docker model run hf.co/LeanProgressIQ/LFM3-1.7B-aura-grounded:Q8_0
- Lemonade
How to use LeanProgressIQ/LFM3-1.7B-aura-grounded with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull LeanProgressIQ/LFM3-1.7B-aura-grounded:Q8_0
Run and chat with the model
lemonade run user.LFM3-1.7B-aura-grounded-Q8_0
List all available models
lemonade list
- Hermes Agent
How to use LeanProgressIQ/LFM3-1.7B-aura-grounded with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf LeanProgressIQ/LFM3-1.7B-aura-grounded:Q8_0
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 LeanProgressIQ/LFM3-1.7B-aura-grounded:Q8_0
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use LeanProgressIQ/LFM3-1.7B-aura-grounded with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf LeanProgressIQ/LFM3-1.7B-aura-grounded:Q8_0
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 "LeanProgressIQ/LFM3-1.7B-aura-grounded:Q8_0" \ --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-aura-grounded
Fine-tuned version of LiquidAI/LFM3-1.7B aligned with Direct Preference Optimization (DPO) to eliminate hallucinations in Retrieval-Augmented Generation (RAG) pipelines.
Small language models (< 3B) often fail to admit when retrieved documents do not contain the answer. When evaluated on unanswerable retrieval queries, the base LFM3-1.7B model hallucinated answers over 94%โ96% of the time, declining only 3.4% of cases.
LFM3-1.7B-aura-grounded was trained with pure FP32 DPO on dual Tesla T4 GPUs on a balanced dataset of grounded question-answering pairs and verified Aura episode preference data. It strictly adheres to evidence: providing concise, accurate answers when evidence is present, and cleanly declining with the designated fallback sentence when information is absent.
๐ Benchmark Results
Evaluated across training domains, completely unseen transfer domains, and project-specific retrieval tasks:
| Evaluation Slice & Metric | Base LFM3-1.7B | LFM3-1.7B-aura-grounded | Net Gain |
|---|---|---|---|
| Missing Evidence / Unanswerable (Training Domains) | 3.4% | 83.9% | +80.5% |
| Missing Evidence / Unanswerable (Unseen Domains) | 5.8% | 74.4% | +68.6% |
| Answerable Accuracy (Unseen Domains) | 38.6% | 47.4% | +8.8% |
| Aura Retrieval Grounding (Answerable) | 100.0% | 100.0% | 100% Correct |
| Aura Retrieval Grounding (Unanswerable) | 100.0% | 100.0% | 100% Clean Refusal |
๐ ๏ธ Prompt Format & System Contract
The model was aligned with the following system instruction contract:
System: Answer the user's question using only the documents they provide. Answer in the language of the question, in one or two sentences. If the documents don't contain the answer, reply with exactly this sentence and nothing else: I couldn't find the answer in the provided documents.
User:
[1] Document Title
<Document Text>
Question: <User Question>
When the answer cannot be supported by the provided documents, the model emits exactly:
I couldn't find the answer in the provided documents.
๐ Quickstart
1. Using Transformers & PEFT
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
base_model_id = "LiquidAI/LFM3-1.7B"
peft_model_id = "LeanProgressIQ/LFM3-1.7B-aura-grounded"
tokenizer = AutoTokenizer.from_pretrained(peft_model_id, trust_remote_code=True)
base_model = AutoModelForCausalLM.from_pretrained(
base_model_id,
torch_dtype=torch.float32,
device_map="auto",
trust_remote_code=True
)
model = PeftModel.from_pretrained(base_model, peft_model_id)
system_prompt = (
"Answer the user's question using only the documents they provide. Answer in the language of the question, "
"in one or two sentences. If the documents don't contain the answer, reply with exactly this sentence and "
"nothing else: I couldn't find the answer in the provided documents."
)
prompt = f"""<|start_of_role|>system<|end_of_role|>{system_prompt}<|end_of_text|>
<|start_of_role|>user<|end_of_role|>[1] Alpha Centauri
Alpha Centauri is a triple star system located approximately 4.37 light-years from Earth in the constellation Centaurus.
How far is Alpha Centauri from Earth?<|end_of_text|>
<|start_of_role|>assistant<|end_of_role|>"""
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
outputs = model.generate(**inputs, max_new_tokens=100, do_sample=False)
print(tokenizer.decode(outputs[0][inputs.input_ids.shape[1]:], skip_special_tokens=True))
# Output: Alpha Centauri is approximately 4.37 light-years from Earth.
2. Using GGUF in LM Studio / llama.cpp
The pre-quantized 8-bit GGUF model (LFM3-1.7B-aura-Q8_0.gguf, 1.72 GB) is included in this repository.
Download LFM3-1.7B-aura-Q8_0.gguf directly and load into LM Studio or run with llama.cpp:
llama-cli -m LFM3-1.7B-aura-Q8_0.gguf -p "..." -c 2048 --temp 0.1
๐ฌ Training Configuration
- Base Architecture: Liquid AI LFM3-1.7B (Hybrid Linear Feature Model with Short Convolutions)
- Tuning Method: LoRA (rank $r=16$, $\alpha=32$) on 9 projection heads (
q_proj,v_proj,k_proj,in_proj,w1,w2,o_proj,out_proj,w3) - Loss: DPO (Beta = 0.1)
- Precision: Full FP32 (prevented Adam second-moment underflow on Turing T4 architectures)
- Hardware: Dual Nvidia Tesla T4 GPUs (Kaggle environment)
- Developed by: LeanProgressIQ / Aura Research
- Downloads last month
- 39
8-bit