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
GGUF
Model size
2B params
Architecture
lfm3
Hardware compatibility
Log In to add your hardware

8-bit

Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Model tree for LeanProgressIQ/LFM3-1.7B-aura-grounded

Adapter
(9)
this model