---
title: Hy4-preview-4bit
canonical_url: "https://www.modelscope.cn/models/mlx-community/Hy4-preview-4bit"
md_url: "https://www.modelscope.cn/models/mlx-community/Hy4-preview-4bit.md"
repository: mlx-community/Hy4-preview-4bit
last_updated: 2026-08-28
license: apache-2.0
pipeline_tag: text-generation
tasks:
  - text-generation
model_type:
  - hy_v4
architectures:
  - HYV4ForCausalLM
base_model:
  - tencent/Hy4-preview
base_model_relation: quantized
parameters: 120.4B
tensor_type:
  - F32
  - BF16
  - U32
library_name:
  - mlx
  - safetensors
  - pytorch
frameworks:
  - pytorch
language:
  - en
downloads: 20
stars: 0
tags:
  - mlx
  - hunyuan
  - hy4
  - moe
  - text-generation
---

# Hy4-preview-4bit

> Hy4-preview-4bit - mlx-community 在 ModelScope 开源的模型。mlx-community/Hy4-preview-4bit

mlx-community/Hy4-preview-4bit 是 ModelScope 魔搭社区上的 120.4B 参数text-generation模型，采用 apache-2.0 许可，基于 tencent/Hy4-preview 构建。

- **Repository**: mlx-community/Hy4-preview-4bit
- **License**: apache-2.0
- **Tasks**: text-generation
- **Parameters**: 120.4B
- **Base model**: tencent/Hy4-preview
- **Tags**: mlx, hunyuan, hy4, moe, text-generation
- **Downloads**: 20
- **Stars**: 0
- **Last updated**: 2026-08-28

Source: https://www.modelscope.cn/models/mlx-community/Hy4-preview-4bit

---

# mlx-community/Hy4-preview-4bit

This model [mlx-community/Hy4-preview-4bit](https://huggingface.co/mlx-community/Hy4-preview-4bit) was
converted to MLX format from [tencent/Hy4-preview](https://huggingface.co/tencent/Hy4-preview)
using mlx-lm version **0.32.0**.

## Use with mlx

This model requires Hy4-preview support from the
[add-hy4-preview](https://github.com/kernelpool/mlx-lm/tree/add-hy4-preview) branch,
which is not yet included in an mlx-lm release. Until it is, install mlx-lm from
the branch:

```bash
pip install git+https://github.com/kernelpool/mlx-lm.git@add-hy4-preview
```

```python
from mlx_lm import load, generate

model, tokenizer = load("mlx-community/Hy4-preview-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)
```
