Instructions to use lewisdog/lfm2.5-350m-cogs-ask-lora with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use lewisdog/lfm2.5-350m-cogs-ask-lora with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("LiquidAI/LFM2.5-350M") model = PeftModel.from_pretrained(base_model, "lewisdog/lfm2.5-350m-cogs-ask-lora") - Notebooks
- Google Colab
- Kaggle
lfm2.5-350m-cogs-ask
A 350M ask student for Cogitarium retrieval-QA. Two tasks:
- decompose: split a question into 1-4 retrieval sub-questions β
{"subquestions":[...]} - synth: answer strictly from provided wiki notes with inline
[note-id]citations β{"answer","citations","abstained"}
Trained on the real cogs serialization β slash note-ids (concepts/planner) and
[[wikilinks]] in note bodies β plus frontier-teacher-distilled grounded Q&A
generated over the real vault. Correct on the deployment distribution; needs
no serving hacks.
Serving pins
- temperature 0, repeat_penalty 1.0.
- Emits exact slash note-ids and handles
[[wikilinks]]in bodies natively β you do NOT need to strip wikilinks or fuzzy-match citations (both were required by the earlier hyphen-id variant). Feed evidence as `### [note-id] Title` exactly as `cogs ask` builds it. - Gate abstention upstream. The
abstainedflag is only moderately reliable; decide "is this answerable?" from retrieval score / the decompose step and don't depend on the field.
Eval (real vault serialization; grounded citation validity)
Distilled from ~600 frontier-teacher-generated grounded Q&A over the real vault (plus the re-serialized base set). Grounded-citation validity:
| set | decompose | grounded exact | grounded lenient | abstain |
|---|---|---|---|---|
| deployment vault (aoa, notes seen in training) | 100% | 89% | 89% | 6/11 |
| out-of-domain (unseen clusters) | 100% | 58% | 65% | 3/5 |
Progression as teacher data scaled (out-of-domain grounded strict): vault-aligned only 38% β +204 teacher 50% β +570 teacher 58%. On the vault it is actually trained over, grounded citation is ~89%. Data quality/quantity β not model size β was the binding constraint. Feed evidence as `### [note-id] Title
; citations come back as exact slash-ids, no serving hacks. Gate abstention upstream (the abstained` flag is only moderately reliable). A
strong fast tier; the Qwen3-1.7B student remains the quality tier.
Recommended quant: Q8_0 (379 MB, 509 tok/s on GB10). decompose is flawless at
any quant incl. Q4_K_M (229 MB).
This repo
LoRA adapter only (r=16, alpha=32, targets = attn + hybrid-conv/MLP proj). Load on top of the base LiquidAI/LFM2.5-350M with PEFT, or use the pre-merged repo lfm2.5-350m-cogs-ask.
Base model & license
Fine-tuned from LiquidAI/LFM2.5-350M. Use is governed by the LFM Open License
v1.0 (lfm1.0) β see the LICENSE in the base repo. This derivative complies with
and inherits those terms; attribution to LiquidAI is retained above.
Provenance
LoRA SFT (TRL) on the Cogitarium distillation datasets, DGX Spark (GB10). Full
methodology, loss curves, eval harnesses and per-quant results: see the project
RESULTS.md. This is the "fast/small tier" of the Cogitarium model picker; the
Qwen3-1.7B students remain the quality tier.
- Downloads last month
- 84