---
title: Qwen2-7B-Instruct-4bit
canonical_url: "https://www.modelscope.cn/models/QwenCollection/Qwen2-7B-Instruct-4bit"
md_url: "https://www.modelscope.cn/models/QwenCollection/Qwen2-7B-Instruct-4bit.md"
repository: QwenCollection/Qwen2-7B-Instruct-4bit
last_updated: 2024-11-21
license: apache-2.0
pipeline_tag: text-generation
tasks:
  - text-generation
model_type:
  - qwen2
architectures:
  - Qwen2ForCausalLM
parameters: 1.2B
tensor_type:
  - U32
  - F16
library_name:
  - mlx
  - safetensors
  - pytorch
frameworks:
  - pytorch
language:
  - en
inference_backends:
  - "deploy_task text/emb"
  - "lmdeploy 0.9.1"
  - "lmdeploy_turbomind 0.9.1"
  - "sglang 0.5.2"
  - "vllm 0.9.2"
downloads: 2232
stars: 0
tags:
  - chat
  - mlx
---

# Qwen2-7B-Instruct-4bit

> Qwen2-7B-Instruct-4bit - QwenCollection 在 ModelScope 开源的模型。mlx-community/Qwen2-7B-Instruct-4bit

QwenCollection/Qwen2-7B-Instruct-4bit 是 ModelScope 魔搭社区上的 1.2B 参数text-generation模型，采用 apache-2.0 许可，可用 deploy_task text/emb、lmdeploy 0.9.1、lmdeploy_turbomind 0.9.1 部署。

- **Repository**: QwenCollection/Qwen2-7B-Instruct-4bit
- **License**: apache-2.0
- **Tasks**: text-generation
- **Parameters**: 1.2B
- **Inference backends**: deploy_task text/emb, lmdeploy 0.9.1, lmdeploy_turbomind 0.9.1, sglang 0.5.2, vllm 0.9.2
- **Tags**: chat, mlx
- **Downloads**: 2232
- **Stars**: 0
- **Last updated**: 2024-11-21

Source: https://www.modelscope.cn/models/QwenCollection/Qwen2-7B-Instruct-4bit

---

# mlx-community/Qwen2-7B-Instruct-4bit

The Model [mlx-community/Qwen2-7B-Instruct-4bit](https://huggingface.co/mlx-community/Qwen2-7B-Instruct-4bit) was converted to MLX format from [Qwen/Qwen2-7B-Instruct](https://huggingface.co/Qwen/Qwen2-7B-Instruct) using mlx-lm version **0.14.0**.

## Use with mlx

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

```python
from mlx_lm import load, generate

model, tokenizer = load("mlx-community/Qwen2-7B-Instruct-4bit")
response = generate(model, tokenizer, prompt="hello", verbose=True)
```
