---
title: Qwen3.5-2B-GPTQ-W4A16-G128-LLMCompressor
canonical_url: "https://www.modelscope.cn/models/kfcVme50/Qwen3.5-2B-GPTQ-W4A16-G128-LLMCompressor"
md_url: "https://www.modelscope.cn/models/kfcVme50/Qwen3.5-2B-GPTQ-W4A16-G128-LLMCompressor.md"
repository: kfcVme50/Qwen3.5-2B-GPTQ-W4A16-G128-LLMCompressor
chinese_name: Qwen3.5-2B-GPTQ-W4A16-G128-LLMCompressor
last_updated: 2026-11-04
license: apache-2.0
pipeline_tag: image-text-to-text
tasks:
  - image-text-to-text
model_type:
  - qwen3_5
architectures:
  - Qwen3_5ForConditionalGeneration
base_model:
  - Qwen/Qwen3.5-2B
base_model_relation: quantized
parameters: 2.2B
tensor_type:
  - F16
  - I32
  - BF16
  - I64
library_name:
  - transformer
  - safetensors
downloads: 19
stars: 0
tags:
  - qwen3_5
  - quantized
  - gptq
  - llm-compressor
  - compressed-tensors
  - int4
---

# Qwen3.5-2B-GPTQ-W4A16-G128-LLMCompressor

> Qwen3.5-2B-GPTQ-W4A16-G128-LLMCompressor - kfcVme50 在 ModelScope 开源的模型。Qwen3.5-2B-GPTQ-W4A16-G128-LLMCompressor

kfcVme50/Qwen3.5-2B-GPTQ-W4A16-G128-LLMCompressor 是 ModelScope 魔搭社区上的 2.2B 参数image-text-to-text模型，采用 apache-2.0 许可，基于 Qwen/Qwen3.5-2B 构建。

- **Repository**: kfcVme50/Qwen3.5-2B-GPTQ-W4A16-G128-LLMCompressor
- **License**: apache-2.0
- **Tasks**: image-text-to-text
- **Parameters**: 2.2B
- **Base model**: Qwen/Qwen3.5-2B
- **Tags**: qwen3_5, quantized, gptq, llm-compressor, compressed-tensors, int4
- **Downloads**: 19
- **Stars**: 0
- **Last updated**: 2026-11-04

Source: https://www.modelscope.cn/models/kfcVme50/Qwen3.5-2B-GPTQ-W4A16-G128-LLMCompressor

---

# Qwen3.5-2B-GPTQ-W4A16-G128-LLMCompressor

基于 Qwen3.5-2B 制作的 GPTQ W4A16 量化模型，使用 llm-compressor 0.14.0 制作，以 compressed-tensors 0.19.0 格式保存。

## 量化配置

使用 GPTQ 将 96 个语言线性层的权重量化为 INT4，组大小为 128，采用对称量化和静态 actorder，激活使用 FP16。校准样本来自 GSM8K 训练集，共 256 条问题，seed 42，序列上限 512 token。 `visual`、`linear_attn`、`lm_head` 及其他非目标层保留浮点精度，KV cache 沿用推理引擎的默认设置。

制作所用的上游提交号未记录。

## 文本推理

完整下载仓库后，在支持 compressed-tensors 的 vLLM 0.32.0 环境运行。模型目录应包含权重、索引、配置和 tokenizer。示例使用文本输入。

```python
from transformers import AutoTokenizer
from vllm import LLM, SamplingParams

model_dir = "."
tokenizer = AutoTokenizer.from_pretrained(model_dir, local_files_only=True)
prompt = tokenizer.apply_chat_template(
    [{"role": "user", "content": "What is 2 + 3? Give a short answer."}],
    tokenize=False,
    add_generation_prompt=True,
)

llm = LLM(
    model=model_dir,
    tokenizer=model_dir,
    dtype="float16",
    max_model_len=4096,
    gpu_memory_utilization=0.75,
    max_num_seqs=1,
    limit_mm_per_prompt={"image": 0, "video": 0},
    enforce_eager=True,
    enable_prefix_caching=False,
)
outputs = llm.generate([prompt], SamplingParams(temperature=0, max_tokens=256))
print(outputs[0].outputs[0].text)
```

## 验证结果

在 RTX 4090 D 上使用 vLLM 0.32.0，加载日志记录的内核为 Marlin W4A16。下表为 GSM8K 测试集前 100 题，贪心生成，每题最多 1024 个新 token，单请求顺序执行。

| 指标 | FP16 对照 | 本量化模型 |
|---|---:|---:|
| 准确率 | 71.0% | 71.0% |
| 最终答案可解析率 | 92.0% | 94.0% |
| 触及生成上限率 | 7.0% | 6.0% |
| 串行生成 token/s | 55.823 | 50.380 |

## 复现与许可

以下命令在配套量化代码项目中运行。

```bash
python run.py quantize --tool llmcompressor --method gptq --stage full --samples 256 --max-seq-length 512
```

量化参数见 [config.json](config.json) 和 [recipe.yaml](recipe.yaml)，文件校验值见 [SHA256SUMS](SHA256SUMS)。模型沿用基座的 [Apache-2.0 许可](LICENSE)。
