---
title: qwen2.5-7b-instruct-1m-gptq-int4
canonical_url: "https://www.modelscope.cn/models/tclf90/qwen2.5-7b-instruct-1m-gptq-int4"
md_url: "https://www.modelscope.cn/models/tclf90/qwen2.5-7b-instruct-1m-gptq-int4.md"
repository: tclf90/qwen2.5-7b-instruct-1m-gptq-int4
chinese_name: Qwen2.5-7B-Instruct-1M-GPTQ-int4
last_updated: 2025-01-26
license: qwen
pipeline_tag: text-generation
tasks:
  - text-generation
model_type:
  - qwen2
architectures:
  - Qwen2ForCausalLM
parameters: 2.0B
tensor_type:
  - I32
  - F16
library_name:
  - safetensors
  - pytorch
frameworks:
  - Pytorch
inference_backends:
  - "deploy_task text/emb"
  - "lmdeploy 0.9.1"
  - "lmdeploy_turbomind 0.9.1"
  - "sglang 0.5.2"
  - "vllm 0.9.2"
downloads: 3246
stars: 1
tags:
  - qwen2.5
  - gptq
  - int4
  - "量化修复"
  - vLLM
  - sglang
---

# qwen2.5-7b-instruct-1m-gptq-int4

> qwen2.5-7b-instruct-1m-gptq-int4 - tclf90 在 ModelScope 开源的模型。Qwen2.5-7B-Instruct-1M-GPTQ-int4 原始模型 Qwen/Qwen2.5-7B-Instruct-1M

tclf90/qwen2.5-7b-instruct-1m-gptq-int4 是 ModelScope 魔搭社区上的 2.0B 参数text-generation模型，采用 qwen 许可，可用 deploy_task text/emb、lmdeploy 0.9.1、lmdeploy_turbomind 0.9.1 部署。

- **Repository**: tclf90/qwen2.5-7b-instruct-1m-gptq-int4
- **License**: qwen
- **Tasks**: text-generation
- **Parameters**: 2.0B
- **Inference backends**: deploy_task text/emb, lmdeploy 0.9.1, lmdeploy_turbomind 0.9.1, sglang 0.5.2, vllm 0.9.2
- **Tags**: qwen2.5, gptq, int4, 量化修复, vLLM, sglang
- **Downloads**: 3246
- **Stars**: 1
- **Last updated**: 2025-01-26

Source: https://www.modelscope.cn/models/tclf90/qwen2.5-7b-instruct-1m-gptq-int4

---

# Qwen2.5-7B-Instruct-1M-GPTQ-int4
原始模型 [Qwen/Qwen2.5-7B-Instruct-1M](https://www.modelscope.cn/models/Qwen/Qwen2.5-7B-Instruct-1M)


### 【模型更新日期】

注：通过`snapshot_download`函数传入`revision=...`来下载指定的`tag`版本

``` 
2025-01-27
1. add group 128 (tag g128)
```

### 【模型列表】

| tag     | 文件大小    | 最近更新时间       |
|---------|---------|--------------|
| `g128`  | `5.3GB` | `2025-01-27` |


### 【模型下载】

```python
from modelscope import snapshot_download
snapshot_download('tclf90/deepseek-r1-distill-qwen-7b-gptq-int4', cache_dir="本地路径", revision='g128')
```

### 【修复内容】

1. 对GPTQ量化的校准做了额外优化；减少模型的 `1.乱吐字`、`2.无限循环`、`3.长文能力丢失`等情况。
2. 根据模型实际情况，可以支持1卡、2卡及4卡的`tensor-parallel-size`启动。


### 【介绍】
Qwen2.5-1M is the long-context version of the Qwen2.5 series models, supporting a context length of up to 1M tokens. Compared to the Qwen2.5 128K version, Qwen2.5-1M demonstrates significantly improved performance in handling long-context tasks while maintaining its capability in short tasks.

The model has the following features:
- Type: Causal Language Models
- Training Stage: Pretraining & Post-training
- Architecture: transformers with RoPE, SwiGLU, RMSNorm, and Attention QKV bias
- Number of Parameters: 7.61B
- Number of Paramaters (Non-Embedding): 6.53B
- Number of Layers: 28
- Number of Attention Heads (GQA): 28 for Q and 4 for KV
- Context Length: Full 1,010,000 tokens and generation 8192 tokens
  - We recommend deploying with our custom vLLM, which introduces sparse attention and length extrapolation methods to ensure efficiency and accuracy for long-context tasks. For specific guidance, refer to [this section](#processing-ultra-long-texts).
  - You can also use the previous framework that supports Qwen2.5 for inference, but accuracy degradation may occur for sequences exceeding 262,144 tokens.

For more details, please refer to our [blog](https://qwenlm.github.io/blog/qwen2.5-1m/), [GitHub](https://github.com/QwenLM/Qwen2.5), and [Documentation](https://qwen.readthedocs.io/en/latest/).


### 【高并发RESTFul API推理】

方式1：[vllm](https://github.com/vllm-project/vllm)

方式2: [sglang](https://github.com/sgl-project/sglang)
