Instructions to use Tele-AI/TeleChat-1B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Tele-AI/TeleChat-1B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Tele-AI/TeleChat-1B", trust_remote_code=True)# Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("Tele-AI/TeleChat-1B", trust_remote_code=True, dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use Tele-AI/TeleChat-1B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Tele-AI/TeleChat-1B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Tele-AI/TeleChat-1B", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Tele-AI/TeleChat-1B
- SGLang
How to use Tele-AI/TeleChat-1B with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "Tele-AI/TeleChat-1B" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Tele-AI/TeleChat-1B", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "Tele-AI/TeleChat-1B" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Tele-AI/TeleChat-1B", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use Tele-AI/TeleChat-1B with Docker Model Runner:
docker model run hf.co/Tele-AI/TeleChat-1B
Update README.md
Browse files
README.md
CHANGED
|
@@ -12,7 +12,7 @@ license: apache-2.0
|
|
| 12 |
</div>
|
| 13 |
|
| 14 |
<p align="center">
|
| 15 |
-
🤗 <a href="https://huggingface.co/Tele-AI" target="_blank">Hugging Face</a> • 🏔 <a href="" target="_blank">MindSpore</a>️ • 🦉 <a href="https://github.com/Tele-AI/Telechat" target="_blank">github</a>️ • 🐾 <a href="https://gitee.com/Tele-AI/tele-chat" target="_blank">gitee</a>️ • 💬 <a href="https://github.com/Tele-AI/Telechat/blob/master/images/wechat.jpg" target="_blank">WeChat</a>
|
| 16 |
</p>
|
| 17 |
|
| 18 |
<p align="center">
|
|
@@ -30,9 +30,9 @@ license: apache-2.0
|
|
| 30 |
# 模型介绍
|
| 31 |
### 星辰语义大模型-TeleChat
|
| 32 |
- 星辰语义大模型TeleChat是由中电信人工智能科技有限公司研发训练的大语言模型,其中7B模型基座采用1.5万亿 Tokens中英文高质量语料进行训练,12B模型基座采用3万亿 Tokens中英文高质量语料进行训练。
|
| 33 |
-
- 我们开源了对话模型**TeleChat-
|
| 34 |
-
- **TeleChat-12B
|
| 35 |
-
- 在模型结构方面,我们使用小规模的模型尝试多种模型结构的组合,选择最优结构。相比**TeleChat-7B
|
| 36 |
- 在训练数据方面,我们收集了覆盖书籍、百科、新闻、政务、法律、医药、专利、论文、数学、代码等诸多方面的大量中英文数据;通过优化数据清洗策略大幅提升数据的文本干净度、观点无偏性、内容有效性、格式规范性。
|
| 37 |
- 在训练方法方面,我们使用科学数据配比学习与课程学习的方法,使用小参数模型在多种数据配比的数据上拟合,得到对各个数据集难度的先验估计;训练过程中每隔一段时间自动化评估当前模型在所有数据集上的loss,以及在评测集上的生成效果,动态提升较难学习的数据集权重,保证模型在各个数据集上都有较佳的拟合效果。
|
| 38 |
|
|
@@ -67,6 +67,7 @@ license: apache-2.0
|
|
| 67 |
|
| 68 |
| 模型版本 | 下载链接 |
|
| 69 |
|----------|-----------------------------------------------------------------------|
|
|
|
|
| 70 |
| 7B-FP16 | [TeleChat-7B-FP16](https://huggingface.co/Tele-AI/Telechat-7B) |
|
| 71 |
| 7B-int8 | [TeleChat-7B-int8](https://huggingface.co/Tele-AI/Telechat-7B-int8) |
|
| 72 |
| 7B-int4 | [TeleChat-7B-int4](https://huggingface.co/Tele-AI/Telechat-7B-int4) |
|
|
|
|
| 12 |
</div>
|
| 13 |
|
| 14 |
<p align="center">
|
| 15 |
+
🤗 <a href="https://huggingface.co/Tele-AI" target="_blank">Hugging Face</a> • 🏔 <a href="https://modelscope.cn/organization/TeleAI" target="_blank">MindSpore</a>️ • 🦉 <a href="https://github.com/Tele-AI/Telechat" target="_blank">github</a>️ • 🐾 <a href="https://gitee.com/Tele-AI/tele-chat" target="_blank">gitee</a>️ • 💬 <a href="https://github.com/Tele-AI/Telechat/blob/master/images/wechat.jpg" target="_blank">WeChat</a>
|
| 16 |
</p>
|
| 17 |
|
| 18 |
<p align="center">
|
|
|
|
| 30 |
# 模型介绍
|
| 31 |
### 星辰语义大模型-TeleChat
|
| 32 |
- 星辰语义大模型TeleChat是由中电信人工智能科技有限公司研发训练的大语言模型,其中7B模型基座采用1.5万亿 Tokens中英文高质量语料进行训练,12B模型基座采用3万亿 Tokens中英文高质量语料进行训练。
|
| 33 |
+
- 我们开源了对话模型**TeleChat-1B**、**TeleChat-7B**与**TeleChat-12B**,以及其`huggingface`格式的权重文件。此外,我们还开源了7B、12B模型的int8和int4量化版本。
|
| 34 |
+
- **TeleChat-12B**在模型结构、训练数据、训练方法等方面进行了改进,在通用问答和知识类、代码类、数学类榜单上相比**TeleChat-7B**均有大幅提升。
|
| 35 |
+
- 在模型结构方面,我们使用小规模的模型尝试多种模型结构的组合,选择最优结构。相比**TeleChat-7B**模型,**TeleChat-12B**模型采用了词嵌入层与输出层解耦的结构,将词嵌入层和输出lm head层参数分开,有助于增强训练稳定性和收敛性。
|
| 36 |
- 在训练数据方面,我们收集了覆盖书籍、百科、新闻、政务、法律、医药、专利、论文、数学、代码等诸多方面的大量中英文数据;通过优化数据清洗策略大幅提升数据的文本干净度、观点无偏性、内容有效性、格式规范性。
|
| 37 |
- 在训练方法方面,我们使用科学数据配比学习与课程学习的方法,使用小参数模型在多种数据配比的数据上拟合,得到对各个数据集难度的先验估计;训练过程中每隔一段时间自动化评估当前模型在所有数据集上的loss,以及在评测集上的生成效果,动态提升较难学习的数据集权重,保证模型在各个数据集上都有较佳的拟合效果。
|
| 38 |
|
|
|
|
| 67 |
|
| 68 |
| 模型版本 | 下载链接 |
|
| 69 |
|----------|-----------------------------------------------------------------------|
|
| 70 |
+
| 1B-FP16 | [TeleChat-1B-FP16](https://huggingface.co/Tele-AI/Telechat-1B) |
|
| 71 |
| 7B-FP16 | [TeleChat-7B-FP16](https://huggingface.co/Tele-AI/Telechat-7B) |
|
| 72 |
| 7B-int8 | [TeleChat-7B-int8](https://huggingface.co/Tele-AI/Telechat-7B-int8) |
|
| 73 |
| 7B-int4 | [TeleChat-7B-int4](https://huggingface.co/Tele-AI/Telechat-7B-int4) |
|