Downloads · 30 days
79
14% of all-time downloads
aruntemme/LFM2.5-350M-M3-Distill
LFM2.5-350M-M3-Distill is a text generation model from aruntemme. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as other.
A 350M-parameter assistant fine-tuned from LiquidAI/LFM2.5-350M on a synthetic instruction dataset distilled from MiniMax-M3 (a frontier teacher model). It targets fast, capable on-device / Raspberry Pi use for everyd…
Downloads · 30 days
79
14% of all-time downloads
All-time downloads
555
Public
Parameters
354M
3.3 GB on disk
Likes
0
Public
Click a slice to open those files.
.gguf941 MB · 57%
From the Hugging Face model README
A 350M-parameter assistant fine-tuned from LiquidAI/LFM2.5-350M on a synthetic instruction dataset distilled from MiniMax-M3 (a frontier teacher model). It targets fast, capable on-device / Raspberry Pi use for everyday assistant tasks — general chat, Q&A, summarization, text rewriting, classification/extraction, and JSON / structured output.
v2 (current). Same recipe as v1 but trained on a verbosity-curated dataset — terse tasks (rewrite, "make concise", tone changes) now give a single clean answer instead of multi-option essays, with no regression on chat / Q&A / summarization / JSON / tool-calling. Read Limitations before using.
Versus the stock LFM2.5-350M base (observed on a fixed 35-prompt eval set), the fine-tune produces:
<|tool_call_start|> format) — and on
math it correctly defers to a calculate tool instead of hallucinating arithmetic.Use sampling (not greedy) — greedy decoding causes repetition loops at this size:
generation_config = dict(
do_sample=True,
temperature=0.7,
top_p=0.9,
repetition_penalty=1.1,
max_new_tokens=512,
)
from transformers import AutoModelForCausalLM, AutoTokenizer
import torch
tok = AutoTokenizer.from_pretrained("aruntemme/LFM2.5-350M-M3-Distill")
model = AutoModelForCausalLM.from_pretrained("aruntemme/LFM2.5-350M-M3-Distill",
dtype=torch.bfloat16).to("cuda")
msgs = [{"role": "user", "content": "Summarize the benefits of regular exercise in 3 bullet points."}]
inputs = tok.apply_chat_template(msgs, add_generation_prompt=True, return_tensors="pt",
return_dict=True).to("cuda")
out = model.generate(**inputs, do_sample=True, temperature=0.7, top_p=0.9,
repetition_penalty=1.1, max_new_tokens=512)
print(tok.decode(out[0][inputs["input_ids"].shape[1]:], skip_special_tokens=True))
Pass tools via the chat template; the model emits calls in LFM2.5's native format
(<|tool_call_start|>[func(arg="val")]<|tool_call_end|>):
tools = [{"type": "function", "function": {
"name": "get_weather", "description": "Get current weather for a city",
"parameters": {"type": "object", "properties": {"city": {"type": "string"}}, "required": ["city"]}}}]
msgs = [{"role": "user", "content": "What's the weather in Paris?"}]
inputs = tok.apply_chat_template(msgs, tools=tools, add_generation_prompt=True,
return_tensors="pt", return_dict=True).to("cuda")
out = model.generate(**inputs, max_new_tokens=100)
# -> <|tool_call_start|>[get_weather(city="Paris")]<|tool_call_end|>
Quantized GGUF files are included for CPU / edge inference:
| file | quant | approx size |
|---|---|---|
lfm2.5-350m-m3distill-Q4_K_M.gguf | Q4_K_M | ~230 MB |
lfm2.5-350m-m3distill-f16.gguf | f16 | ~709 MB |
./llama-cli -m lfm2.5-350m-m3distill-Q4_K_M.gguf \
-p "Explain photosynthesis in 40 words." \
--temp 0.7 --top-p 0.9 --repeat-penalty 1.1
This is a derivative of LiquidAI/LFM2.5-350M, distributed under the LFM Open License v1.0 (commercial use permitted under a $10M annual-revenue threshold). This derivative is provided under the same license; a copy is included. The base model and its license notices are retained per the license terms.