---
title: TeleChat-12B-V2-GPTQ-Int4
canonical_url: "https://www.modelscope.cn/models/swift/TeleChat-12B-V2-GPTQ-Int4"
md_url: "https://www.modelscope.cn/models/swift/TeleChat-12B-V2-GPTQ-Int4.md"
repository: swift/TeleChat-12B-V2-GPTQ-Int4
last_updated: 2024-05-21
pipeline_tag: text-generation
tasks:
  - text-generation
model_type:
  - telechat
architectures:
  - TelechatForCausalLM
parameters: 2.7B
tensor_type:
  - I32
  - F16
library_name:
  - safetensors
  - pytorch
frameworks:
  - Pytorch
downloads: 163
stars: 0
---

# TeleChat-12B-V2-GPTQ-Int4

> TeleChat-12B-V2-GPTQ-Int4 - swift 在 ModelScope 开源的模型。About Quantization 我们使用modelscope swift仓库进行GPTQ 4bit量化. 量化文档可以查看这里. 量化命令如下:

- **Repository**: swift/TeleChat-12B-V2-GPTQ-Int4
- **Tasks**: text-generation
- **Parameters**: 2.7B
- **Downloads**: 163
- **Stars**: 0
- **Last updated**: 2024-05-21

Source: https://www.modelscope.cn/models/swift/TeleChat-12B-V2-GPTQ-Int4

---

## About Quantization
我们使用modelscope [swift](https://github.com/modelscope/swift/)仓库进行GPTQ 4bit量化. 量化文档可以查看[这里](https://github.com/modelscope/swift/blob/main/docs/source/LLM/LLM%E9%87%8F%E5%8C%96%E6%96%87%E6%A1%A3.md). 量化命令如下:

We use the modelscope [swift](https://github.com/modelscope/swift/) repository to perform GPTQ 4bit quantization. Quantization documentation can be found [here](https://github.com/modelscope/swift/blob/main/docs/source_en/LLM/LLM-quantization.md). The quantization command is as follows:

```bash
# Experimental Environment: A100
OMP_NUM_THREADS=14 \
	swift export \
	--quant_bits 4 \
	--model_type telechat-12b-v2 \
	--quant_method gptq \
	--dataset alpaca-zh alpaca-en sharegpt-gpt4-mini \
	--quant_seqlen 4096
```

Inference:
```bash
CUDA_VISIBLE_DEVICES=0 swift infer --model_type telechat-12b-v2-gptq-int4
```

SFT:
```bash
CUDA_VISIBLE_DEVICES=0 swift sft --model_type telechat-12b-v2-gptq-int4 --dataset leetcode-python-en
```

Original Model:

[telechat-12b-v2](https://www.modelscope.cn/models/TeleAI/TeleChat-12B-v2/summary)
