---
title: ChatGLM-550A
canonical_url: "https://www.modelscope.cn/models/wangpingyue/ChatGLM-550A"
md_url: "https://www.modelscope.cn/models/wangpingyue/ChatGLM-550A.md"
repository: wangpingyue/ChatGLM-550A
last_updated: 2024-01-19
license: "Apache License 2.0"
pipeline_tag: text-generation
tasks:
  - text-generation
model_type:
  - chatglm
architectures:
  - ChatGLMForConditionalGeneration
parameters: 6.2B
tensor_type:
  - BF16
library_name:
  - safetensors
  - pytorch
frameworks:
  - pytorch
language:
  - zh
  - en
inference_backends:
  - "deploy_task text/emb"
  - "lmdeploy_turbomind 0.9.1"
  - "vllm 0.9.2"
downloads: 720
stars: 6
tags:
  - glm
  - chatglm
  - thudm
---

# ChatGLM-550A

> ChatGLM-550A - wangpingyue 在 ModelScope 开源的模型。ChatGLM-550A是由ChatGLM3-6B微调得来的, 是ChatGLM系列的开源模型

wangpingyue/ChatGLM-550A 是 ModelScope 魔搭社区上的 6.2B 参数text-generation模型，采用 Apache License 2.0 许可，可用 deploy_task text/emb、lmdeploy_turbomind 0.9.1、vllm 0.9.2 部署。

- **Repository**: wangpingyue/ChatGLM-550A
- **License**: Apache License 2.0
- **Tasks**: text-generation
- **Parameters**: 6.2B
- **Inference backends**: deploy_task text/emb, lmdeploy_turbomind 0.9.1, vllm 0.9.2
- **Tags**: glm, chatglm, thudm
- **Downloads**: 720
- **Stars**: 6
- **Last updated**: 2024-01-19

Source: https://www.modelscope.cn/models/wangpingyue/ChatGLM-550A

---

# ChatGLM-550A
## 介绍
ChatGLM-550A由ChatGLM系列微调得来的是新一代的开源模型，在保留了之前模型对话流畅、部署门槛低等众多优秀特性的基础上，ChatGLM3-6B 如下特性：

1. **更强大的基础模型：** ChatGLM3-6B 的基础模型 ChatGLM3-6B-Base 采用了更多样的训练数据、更充分的训练步数和更合理的训练策略。在语义、数学、推理、代码、知识等不同角度的数据集上测评显示，ChatGLM3-6B-Base 具有在 10B 以下的预训练模型中最强的性能。
2. **更完整的功能支持：** ChatGLM3-6B 采用了全新设计的 [Prompt 格式](PROMPT.md)，除正常的多轮对话外。同时原生支持[工具调用](tool_using/README.md)（Function Call）、代码执行（Code Interpreter）和 Agent 任务等复杂场景。
3. **更全面的开源序列：** 除了对话模型 ChatGLM3-6B 外，还开源了基础模型 ChatGLM-6B-Base、长文本对话模型 ChatGLM3-6B-32K。以上所有权重对学术研究**完全开放**，在填写[问卷](https://open.bigmodel.cn/mla/form)进行登记后**亦允许免费商业使用**。


## 软件依赖

```shell
pip install protobuf 'transformers>=4.30.2' cpm_kernels 'torch>=2.0' gradio mdtex2html sentencepiece accelerate
```

## 模型下载
modelscope API下载
```shell
pip install modelscope
```

```python
from modelscope import snapshot_download
model_dir = snapshot_download("wangpingyue/ChatGLM-550A", revision = "v1.0.0")
```

git下载
```shell
git lfs install
git clone https://www.modelscope.cn/wangpingyue/ChatGLM-550A.git
```

## 代码调用 

可以通过如下代码调用 ChatGLM3-6B 模型来生成对话：

```python
from modelscope import AutoTokenizer, AutoModel, snapshot_download
model_dir = snapshot_download("wangpingyue/ChatGLM-550A", revision = "v1.0.0")
tokenizer = AutoTokenizer.from_pretrained(model_dir, trust_remote_code=True)
model = AutoModel.from_pretrained(model_dir, trust_remote_code=True).half().cuda()
model = model.eval()
response, history = model.chat(tokenizer, "你好", history=[])
print(response)
response, history = model.chat(tokenizer, "晚上睡不着应该怎么办", history=history)
print(response)
```

关于更多的使用说明，包括如何运行命令行和网页版本的 DEMO，以及使用模型量化以节省显存，请参考我们的 [Github Repo](https://github.com/THUDM/ChatGLM)。

For more instructions, including how to run CLI and web demos, and model quantization, please refer to our [Github Repo](https://github.com/THUDM/ChatGLM).


## 协议

本仓库的代码依照 [Apache-2.0](LICENSE) 协议开源，ChatGLM3-6B 模型的权重的使用则需要遵循 [Model License](MODEL_LICENSE)。

## 引用

如果你觉得我们的工作有帮助的话，请考虑引用下列论文。

```
@article{zeng2022glm,
  title={Glm-130b: An open bilingual pre-trained model},
  author={Zeng, Aohan and Liu, Xiao and Du, Zhengxiao and Wang, Zihan and Lai, Hanyu and Ding, Ming and Yang, Zhuoyi and Xu, Yifan and Zheng, Wendi and Xia, Xiao and others},
  journal={arXiv preprint arXiv:2210.02414},
  year={2022}
}
```
```
@inproceedings{du2022glm,
  title={GLM: General Language Model Pretraining with Autoregressive Blank Infilling},
  author={Du, Zhengxiao and Qian, Yujie and Liu, Xiao and Ding, Ming and Qiu, Jiezhong and Yang, Zhilin and Tang, Jie},
  booktitle={Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers)},
  pages={320--335},
  year={2022}
}
```
