---
title: LongCat-Flash-Chat-mlx-DQ6_K_M
canonical_url: "https://www.modelscope.cn/models/mlx-community/LongCat-Flash-Chat-mlx-DQ6_K_M"
md_url: "https://www.modelscope.cn/models/mlx-community/LongCat-Flash-Chat-mlx-DQ6_K_M.md"
repository: mlx-community/LongCat-Flash-Chat-mlx-DQ6_K_M
last_updated: 2025-11-09
pipeline_tag: text-generation
tasks:
  - text-generation
model_type:
  - longcat_flash
architectures:
  - LongcatFlashForCausalLM
base_model:
  - meituan-longcat/LongCat-Flash-Chat
base_model_relation: quantized
parameters: 127.9B
tensor_type:
  - F32
  - BF16
  - U32
library_name:
  - mlx
  - safetensors
  - pytorch
frameworks:
  - pytorch
inference_backends:
  - "deploy_task text"
  - "sglang 0.5.2"
downloads: 37
stars: 0
tags:
  - mlx
---

# LongCat-Flash-Chat-mlx-DQ6_K_M

> LongCat-Flash-Chat-mlx-DQ6_K_M - mlx-community 在 ModelScope 开源的模型。mlx-community/LongCat-Flash-Chat-mlx-DQ6KM

mlx-community/LongCat-Flash-Chat-mlx-DQ6_K_M 是 ModelScope 魔搭社区上的 127.9B 参数text-generation模型，基于 meituan-longcat/LongCat-Flash-Chat 构建，可用 deploy_task text、sglang 0.5.2 部署。

- **Repository**: mlx-community/LongCat-Flash-Chat-mlx-DQ6_K_M
- **Tasks**: text-generation
- **Parameters**: 127.9B
- **Base model**: meituan-longcat/LongCat-Flash-Chat
- **Inference backends**: deploy_task text, sglang 0.5.2
- **Tags**: mlx
- **Downloads**: 37
- **Stars**: 0
- **Last updated**: 2025-11-09

Source: https://www.modelscope.cn/models/mlx-community/LongCat-Flash-Chat-mlx-DQ6_K_M

---

# mlx-community/LongCat-Flash-Chat-mlx-DQ6_K_M

This model [mlx-community/LongCat-Flash-Chat-mlx-DQ6_K_M](https://huggingface.co/mlx-community/LongCat-Flash-Chat-mlx-DQ6_K_M) was
converted to MLX format from [meituan-longcat/LongCat-Flash-Chat](https://huggingface.co/meituan-longcat/LongCat-Flash-Chat)
using mlx-lm version **0.28.1**.

This is created for people using a single Apple Mac Studio M3 Ultra with 512 GB. The 8-bit version of LongCat-Flash-Chat does not fit. Using research results, we aim to get almost-8bit performance from a slightly smaller and smarter quantization. It should also not be so large that it leaves no memory for a useful context window.

You can find more similar MLX model quants for a single Apple Mac Studio M3 Ultra with 512 GB at https://huggingface.co/bibproj

```bash
pip install mlx-lm

mlx_lm.generate --model mlx-community/LongCat-Flash-Chat-mlx-DQ6_K_M --temp 0.7 --max-tokens 4096 --prompt "Hallo"
```

---

## What is the DQ6_K_M quant about? It comes from a paper on DQ3_K_M

In the Arxiv paper [Quantitative Analysis of Performance Drop in DeepSeek Model Quantization](https://arxiv.org/abs/2505.02390) the authors write,

> We further propose `DQ3_K_M`, a dynamic 3-bit quantization method that significantly outperforms traditional `Q3_K_M` variant on various benchmarks, which is also comparable with 4-bit quantization (`Q4_K_M`) approach in most tasks.

and

> dynamic 3-bit quantization method (`DQ3_K_M`) that outperforms the 3-bit quantization implementation in `llama.cpp` and achieves performance comparable to 4-bit quantization across multiple benchmarks.

The resulting multi-bitwidth quantization has been well tested and documented.

---

## How can you create your own DQ6_K_M quants?

In the `convert.py` file of mlx-lm on your system ( [you can see the original code here](https://github.com/ml-explore/mlx-lm/blob/main/mlx_lm/convert.py) ), replace the code inside `def mixed_quant_predicate()` with something like

```python
        index = (
            int(path.split(".")[layer_location])
            if len(path.split(".")) > layer_location
            else 0
        )
        # Build a mixed quant similar to the "DQ3" of Arxiv paper https://arxiv.org/abs/2505.02390
        #    Quantitative Analysis of Performance Drop in DeepSeek Model Quantization
        q_bits = 8
        # For "switch experts"
        if "switch_mlp" in path:
           q_bits = 6
        if "switch_mlp.down_proj" in path:
           # Blocks up to 5 are higher quality
           if index < 5:
              q_bits = 8
           # Every 5th block is "medium" quality
           if (index % 5) == 0:
              q_bits = 8
        print("path:", path, "index:", index, "q_bits:", q_bits)
        return {"group_size": group_size, "bits": q_bits}
```

Then create your DQ6_K_M quant with

```bash
mlx_lm.convert --hf-path meituan-longcat/LongCat-Flash-Chat --mlx-path your-model-DQ6_K_M -q --quant-predicate mixed_3_4
```

---

Enjoy!
