Downloads · 30 days
63
5% of all-time downloads
hauser458b/lfm2.5-230m-code-math
lfm2.5-230m-code-math is a text generation model from hauser458b. Use it when you need the model to write or continue text. The card lists the license as other.
A fine-tune of LiquidAI/LFM2.5-230M (the instruct-tuned model, not the base checkpoint) focused on strengthening code generation and math word-problem solving, while retaining the general chat and instruction-followin…
Downloads · 30 days
63
5% of all-time downloads
All-time downloads
1.4K
Public
Parameters
230M
1.4 GB on disk
Likes
3
Public
Click a slice to open those files.
.pt919 MB · 66%
From the Hugging Face model README
A fine-tune of LiquidAI/LFM2.5-230M (the instruct-tuned model, not the base checkpoint) focused on strengthening code generation and math word-problem solving, while retaining the general chat and instruction-following ability of the original instruct model.
LiquidAI's own model card for LFM2.5-230M states it is not recommended for reasoning-heavy workloads such as advanced math, code generation, or creative writing — the model is tuned primarily for data extraction, structured outputs, and lightweight agentic/tool-use tasks. This fine-tune is an attempt to push a small, efficient instruct model further into code and math competence without sacrificing its existing conversational ability.
Fine-tuning started from the instruct checkpoint rather than the base pretrain checkpoint, specifically to preserve chat and instruction-following behavior that the base model doesn't have. An earlier fine-tune attempt starting from LFM2.5-230M-Base produced a model that was strong at code/math but broke down on basic conversation (e.g. echoing "Hello, who are you?" back verbatim). Starting from instruct avoided this.
LiquidAI/LFM2.5-230M (instruct)iamtarun/code_instructions_120k_alpacaopenai/gsm8k (main split)Based on manual testing across ~20+ prompts spanning algebra, geometry, general code tasks, and open-ended chat:
from transformers import AutoModelForCausalLM, AutoTokenizer
model_id = "hauser458original/lfm2.5-230m-code-math"
model = AutoModelForCausalLM.from_pretrained(model_id, dtype="bfloat16", device_map="auto")
tokenizer = AutoTokenizer.from_pretrained(model_id)
messages = [{"role": "user", "content": "Write a Python function to check if a number is prime."}]
inputs = tokenizer.apply_chat_template(
messages, add_generation_prompt=True, return_tensors="pt", return_dict=True
).to(model.device)
output = model.generate(**inputs, max_new_tokens=300, do_sample=True, temperature=0.3, top_p=0.9)
print(tokenizer.decode(output[0][inputs["input_ids"].shape[-1]:], skip_special_tokens=True))
GGUF quantized versions (Q4_K_M, Q5_K_S, Q5_K_M, Q8_0, F16) for llama.cpp/Ollama/LM Studio are available at: hauser458original/lfm2.5-230m-code-math-GGUF
Inherits the LFM Open License v1.0 from the base model.
Built on LiquidAI/LFM2.5-230M. See the LFM2 Technical Report for details on the base architecture.