Downloads · 30 days
203
39% of all-time downloads
mlx-community/LFM2.5-1.2B-JP-202606-OptiQ-4bit
LFM2.5-1.2B-JP-202606-OptiQ-4bit is a text generation model from mlx-community. Use it when you need the model to write or continue text. It is set up for mlx. The card lists the license as other.
Built with mlx-optiq, an MLX-native toolkit for quantizing, fine-tuning, and serving language models on Apple Silicon. Documentation: https://mlx-optiq.com/docs Model collection: https://mlx-optiq.com/models
Downloads · 30 days
203
39% of all-time downloads
All-time downloads
514
Public
Parameters
1.2B
879 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors879 MB · 99%
How the weights are stored.
U321.2B · 100%
From the Hugging Face model README
Built with mlx-optiq, an MLX-native toolkit for quantizing, fine-tuning, and serving language models on Apple Silicon.
Documentation: https://mlx-optiq.com/docs
Model collection: https://mlx-optiq.com/models
mlx-community/LFM2.5-1.2B-JP-202606-OptiQ-4bit is a mixed-precision MLX quantization of LiquidAI/LFM2.5-1.2B-JP-202606.
The model occupies 838 MB on disk compared to 2.34 GB for the original bf16 release. According to the included evaluation, it achieves 58.5% pass@1 on HumanEval.
LFM2.5 uses a hybrid architecture consisting of convolutional layers interleaved with full-attention layers. Only the attention layers maintain a KV cache. OptiQ performs mixed-precision quantization by assigning different bit widths to individual layers based on measured sensitivity.
| Property | Value |
|---|---|
| Base model | LiquidAI/LFM2.5-1.2B-JP-202606 |
| Architecture | Hybrid convolution + full attention (lfm2) |
| Framework | MLX |
| Quantization | OptiQ mixed-precision |
| Storage size | 838 MB |
| Original size | 2.34 GB (bf16) |
| Context length | 128k tokens |
| KV cache | Mixed precision (kv_config.json) |
The following metrics are included with this release.
| Benchmark | Result |
|---|---|
| MMLU (5-shot, 969 samples) | 51.0% |
| GSM8K (1000 samples) | 61.4% |
| IFEval (strict) | 71.5% |
| BFCL-V3 Simple (200 calls) | 85.5% |
| HumanEval (164 problems, pass@1) | 58.5% |
| HashHop | 0.0% |
| Capability Score | 54.66 |
The Capability Score is the arithmetic mean of the six benchmark scores reported above.
Install the required package:
pip install mlx-optiq
Load the model:
from mlx_lm import load, generate
model, tokenizer = load(
"mlx-community/LFM2.5-1.2B-JP-202606-OptiQ-4bit"
)
prompt = tokenizer.apply_chat_template(
[
{
"role": "user",
"content": "日本の首都はどこですか?"
}
],
tokenize=False,
add_generation_prompt=True,
)
print(
generate(
model,
tokenizer,
prompt=prompt,
max_tokens=300,
)
)
To serve the model with the bundled mixed-precision KV cache:
optiq serve \
--model mlx-community/LFM2.5-1.2B-JP-202606-OptiQ-4bit \
--kv-config kv_config.json
The model emits tool calls using the following format:
<|tool_call_start|>[get_weather(city="Tokyo")]<|tool_call_end|>
When using apply_chat_template, tool definitions can be supplied through the tools= argument.
kv_config.json contains the KV-cache precision configuration used by this release.