Instructions to use iromu/LFM2.5-230M-openjev with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use iromu/LFM2.5-230M-openjev with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="iromu/LFM2.5-230M-openjev") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("iromu/LFM2.5-230M-openjev") model = AutoModelForCausalLM.from_pretrained("iromu/LFM2.5-230M-openjev", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use iromu/LFM2.5-230M-openjev with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "iromu/LFM2.5-230M-openjev" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "iromu/LFM2.5-230M-openjev", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/iromu/LFM2.5-230M-openjev
- SGLang
How to use iromu/LFM2.5-230M-openjev with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "iromu/LFM2.5-230M-openjev" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "iromu/LFM2.5-230M-openjev", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "iromu/LFM2.5-230M-openjev" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "iromu/LFM2.5-230M-openjev", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use iromu/LFM2.5-230M-openjev with Docker Model Runner:
docker model run hf.co/iromu/LFM2.5-230M-openjev
LFM2.5-230M-openjev
Merged BF16 weights of the LoRA decision fine-tune of LiquidAI/LFM2.5-230M-Base,
trained so the model reliably answers a typed-decision prompt with a single
label letter. It is the LFM member of the -openjev decision family, the small
sibling of Qwen3-0.6B-openjev and Qwen2.5-1.5B-openjev.
Base model
This model was fine-tuned from:
LiquidAI/LFM2.5-230M-Base
Training
Supervised fine-tuning with LoRA, run with NeMo-RL, assistant-turn-masked cross-entropy over the typed-decision rows.
- LoRA: rank
32, alpha32, dropout0.05, target modules*.proj,*.w1,*.w2,*.w3β thew1/w2/w3names are LFM's feed-forward matrices, so the adapter reaches the MLP as well as the attention projections (a*.proj-only pattern would leave the MLP at base weights) - Max sequence length:
4096 - Precision:
bfloat16 - Optimizer: AdamW, lr
5e-5, weight decay0.01 - Schedule: 100-step linear warmup, then cosine decay to
1e-6 - Global batch size:
64(micro batch2) - Training: one epoch β
1191steps over76,224rows (validation every125) - Loss masked to the assistant turn via the decision chat template
- SFT only, no GRPO: a decision is graded by the choice reward, and the SFT model is already at the ceiling on the rows GRPO samples, so the within-group advantage is zero and GRPO trains on no gradient here
The decision chat template is the model's contract: it renders the assistant turn as exactly its content (one label letter) with no thinking block, so the answer is the first generated token and the turn ends on EOS.
Dataset
Training used the train split of the ZefanCai/Open-Jev typed-decision
corpus (snapshot c67699e13d0ae25e35b77165a4b6b079bedc8aba). Each row is a
state, a question, a set of options, and a probability distribution over the
options; the target is the argmax option, written as a single label letter. A
row whose target ties (no argmax) is excluded where the loss is counted, not
trained on a guess.
Intended use
- Typed-decision and classification tasks
- Single-label answer selection
- Small-footprint on-device or edge deployment
It is not intended to be a general replacement for larger models.
Sibling artifacts
- GGUF quantizations:
iromu/LFM2.5-230M-openjev-GGUF - NVFP4 (vLLM):
iromu/LFM2.5-230M-openjev-NVFP4
Usage
Load a GGUF quant with llama.cpp:
llama-cli -hf iromu/LFM2.5-230M-openjev-GGUF:Q4_K_M
Load the merged BF16 model with transformers:
from transformers import AutoModelForCausalLM, AutoTokenizer
model = AutoModelForCausalLM.from_pretrained(
"iromu/LFM2.5-230M-openjev", torch_dtype="bfloat16", device_map="auto"
)
tokenizer = AutoTokenizer.from_pretrained("iromu/LFM2.5-230M-openjev")
The chat template is the decision template: the answer is one letter and the turn
ends on EOS, so a small max_new_tokens is more than enough β the model emits one
token and stops.
Coherence
Probability-coherence score from JevBench,
a metamorphic test of 50 laws of probability and choice with no gold labels
(jevbench-mini suite: 240 cases, 50 scored relations, tolerance 0.05,
temperature 1.0). Overall: 38.5 / 100.
- REP β Representation consistency: 60.6
- BAT β Batch independence: 25.8
- MEA β Probability measure coherence: 15.4
- LOG β Logical coherence: 68.3
- CHO β Choice-set coherence: 22.2
The score is dominated by MEA and CHO: the letter-emitter is overconfident and does
not preserve the mean under transformation, so metamorphic coherence trails the
Qwen3-0.6B-openjev sibling (44.5 on the same suite). Coherence and argmax accuracy
measure different things β this model's argmax accuracy is high (77.3%) while its
probability readout is miscalibrated.
Validation
| Model | Quant | Cap | n | Letter emitted | Letter correct | Ξ correct vs BASE |
|---|---|---|---|---|---|---|
| LiquidAI/LFM2.5-230M-Base | BF16 | 384 tok | 3495 | 0/3495 (0.0%) | 0/3495 (0.0%) | (no predecessor) |
| LFM2.5-230M-openjev | BF16 | 384 tok | 3495 | 3495/3495 (100.0%) | 2700/3495 (77.3%) | +77.3pp |
The base model knows nothing of the decision format β it emits a lone label letter on 0% of rows (its reply is prose, never a single token the grader can read). The LoRA fine-tune teaches the format outright: it emits a lone letter on every row and is right on 77.3%.
Measured on the Open-Jev validation split (3,495 rows), greedy decoding.
Throughput is single-stream greedy decode, not serving throughput.
- Downloads last month
- 585