---
title: LFM2-24B-A2B-4bit
canonical_url: "https://www.modelscope.cn/models/mlx-community/LFM2-24B-A2B-4bit"
md_url: "https://www.modelscope.cn/models/mlx-community/LFM2-24B-A2B-4bit.md"
repository: mlx-community/LFM2-24B-A2B-4bit
last_updated: 2026-02-25
license: other
pipeline_tag: text-generation
tasks:
  - text-generation
model_type:
  - lfm2_moe
architectures:
  - Lfm2MoeForCausalLM
base_model:
  - LiquidAI/LFM2-24B-A2B
base_model_relation: quantized
parameters: 3.7B
tensor_type:
  - BF16
  - F32
  - U32
library_name:
  - mlx
  - safetensors
  - pytorch
frameworks:
  - pytorch
language:
  - en
  - ar
  - zh
  - fr
  - de
  - ja
  - ko
  - es
  - pt
downloads: 21
stars: 0
tags:
  - liquid
  - lfm2
  - edge
  - llm
  - mlx
---

# LFM2-24B-A2B-4bit

> LFM2-24B-A2B-4bit - mlx-community 在 ModelScope 开源的模型。mlx-community/LFM2-24B-A2B-4bit

mlx-community/LFM2-24B-A2B-4bit 是 ModelScope 魔搭社区上的 3.7B 参数text-generation模型，采用 other 许可，基于 LiquidAI/LFM2-24B-A2B 构建。

- **Repository**: mlx-community/LFM2-24B-A2B-4bit
- **License**: other
- **Tasks**: text-generation
- **Parameters**: 3.7B
- **Base model**: LiquidAI/LFM2-24B-A2B
- **Tags**: liquid, lfm2, edge, llm, mlx
- **Downloads**: 21
- **Stars**: 0
- **Last updated**: 2026-02-25

Source: https://www.modelscope.cn/models/mlx-community/LFM2-24B-A2B-4bit

---

# mlx-community/LFM2-24B-A2B-4bit

This model [mlx-community/LFM2-24B-A2B-4bit](https://huggingface.co/mlx-community/LFM2-24B-A2B-4bit) was
converted to MLX format from [LiquidAI/LFM2-24B-A2B](https://huggingface.co/LiquidAI/LFM2-24B-A2B)
using mlx-lm version **0.30.8**.

## Use with mlx

```bash
pip install mlx-lm
```

```python
from mlx_lm import load, generate

model, tokenizer = load("mlx-community/LFM2-24B-A2B-4bit")

prompt = "hello"

if tokenizer.chat_template is not None:
    messages = [{"role": "user", "content": prompt}]
    prompt = tokenizer.apply_chat_template(
        messages, add_generation_prompt=True, return_dict=False,
    )

response = generate(model, tokenizer, prompt=prompt, verbose=True)
```
