Downloads · 30 days
86
18% of all-time downloads
Nichonauta/LFM2.5-230M-ToMoE
LFM2.5-230M-ToMoE is a text generation model from Nichonauta. 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 Mixture-of-Experts (MoE) conversion of LiquidAI/LFM2.5-230M, obtained with the ToMoE method (Dynamic Structural Pruning + Hypernetwork).
Downloads · 30 days
86
18% of all-time downloads
All-time downloads
486
Public
Parameters
201M
804 MB on disk
Likes
1
Public
Click a slice to open those files.
.safetensors804 MB · 99%
How the weights are stored.
F32201M · 100%
From the Hugging Face model README
A Mixture-of-Experts (MoE) conversion of LiquidAI/LFM2.5-230M, obtained with the ToMoE method (Dynamic Structural Pruning + Hypernetwork).
The dense 230M base model is converted into a channel-MoE where:
| Metric | Dense base | ToMoE MoE |
|---|---|---|
| Total params | 229.7M | 200.9M stored |
| Active params per token | 229.7M | ~151M |
| PPL wikitext-2 (2048 tok) | 20.4 | ~815 |
| Embeddings (always active) | 67.1M | 67.1M |
The pruned budget is p = 0.3 with the ToMoE regularization (lam 64→256, Gumbel base annealed 1.0→−0.25, 8 experts). The attention QK is excluded from the budget (kept full) because the small head-dim (64) collapses under aggressive QK pruning.
from transformers import AutoModelForCausalLM, AutoTokenizer
model = AutoModelForCausalLM.from_pretrained(
"Nichonauta/LFM2.5-230M-ToMoE",
trust_remote_code=True,
torch_dtype=torch.bfloat16,
device_map="cuda:0",
attn_implementation="eager",
)
tokenizer = AutoTokenizer.from_pretrained("Nichonauta/LFM2.5-230M-ToMoE")
prompt = "The capital of France is"
inputs = tokenizer(prompt, return_tensors="pt").to("cuda:0")
out = model.generate(**inputs, max_new_tokens=30)
print(tokenizer.decode(out[0], skip_special_tokens=True))
Note: this model requires
trust_remote_code=True— the custommodeling_lfm2_moe_final.pydefines theLfm2MoEForCausalLMclass.
This model is a derivative of LiquidAI/LFM2.5-230M and is released under the LFM Open License v1.0 (see LICENSE).
model.safetensors — the pruned MoE weights (fp32)modeling_lfm2_moe_final.py — the custom model definition (trust_remote_code)config.json — model configuration (with auto_map)tokenizer.json, tokenizer_config.json, chat_template.jinja, generation_config.jsonQuantized GGUF files (Q4_K_M, Q8_0, F16) are available in the companion repository: Nichonauta/LFM2.5-230M-ToMoE-GGUF.