Instructions to use Tele-AI/TeleChat-12B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Tele-AI/TeleChat-12B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Tele-AI/TeleChat-12B", trust_remote_code=True)# Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("Tele-AI/TeleChat-12B", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Tele-AI/TeleChat-12B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Tele-AI/TeleChat-12B" # 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-12B", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Tele-AI/TeleChat-12B
- SGLang
How to use Tele-AI/TeleChat-12B 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-12B" \ --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-12B", "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-12B" \ --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-12B", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use Tele-AI/TeleChat-12B with Docker Model Runner:
docker model run hf.co/Tele-AI/TeleChat-12B
Upload 11 files
Browse files- pytorch_model_00020-of-00041.bin +3 -0
- pytorch_model_00021-of-00041.bin +3 -0
- pytorch_model_00022-of-00041.bin +3 -0
- pytorch_model_00023-of-00041.bin +3 -0
- pytorch_model_00024-of-00041.bin +3 -0
- pytorch_model_00025-of-00041.bin +3 -0
- pytorch_model_00026-of-00041.bin +3 -0
- pytorch_model_00027-of-00041.bin +3 -0
- pytorch_model_00028-of-00041.bin +3 -0
- pytorch_model_00029-of-00041.bin +3 -0
- pytorch_model_00030-of-00041.bin +3 -0
pytorch_model_00020-of-00041.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:65081781daec65eea6d78ff2fee30a91bb9e2388d3e2524f555856ce03777d04
|
| 3 |
+
size 587247299
|
pytorch_model_00021-of-00041.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:238ff0ab8f2f538a24aaef18126820a144eda540098c4ba433676060ea469613
|
| 3 |
+
size 587247299
|
pytorch_model_00022-of-00041.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:de2b35ffaef1f5769e05033d99a34c3bcfc99b638fd2de4298f57e7079b539f3
|
| 3 |
+
size 587247299
|
pytorch_model_00023-of-00041.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:975dd2197646ccd192113f857f6cd7b5bb4d9fbb40fcb8025265b729509210cf
|
| 3 |
+
size 587247299
|
pytorch_model_00024-of-00041.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:99fd43071a9f60e37dd565d2da70a37c7e3eae98a844147ccb1bed5b3c6bd7b9
|
| 3 |
+
size 587247299
|
pytorch_model_00025-of-00041.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:1555fd192af296553310a5b5ce6fafac5a2859f677af32cf370e7673e9c9f447
|
| 3 |
+
size 587247299
|
pytorch_model_00026-of-00041.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a2c55e1c467183435c91495e1cf791150456bd52ba805844f28bb52f43682a3b
|
| 3 |
+
size 587247299
|
pytorch_model_00027-of-00041.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:e64b58b1cc77b63fc0965f7d10e974c87ae3b3a51246588160dd6671f244e6a2
|
| 3 |
+
size 587247299
|
pytorch_model_00028-of-00041.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b9eeb5883d81a21c95ec513f1da23e016e368f57aa620bdf5dbba09489282df5
|
| 3 |
+
size 587247299
|
pytorch_model_00029-of-00041.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ae68d072c572ce91025070b24fe1d3475d45f50de94fe85775fae4de641c4a86
|
| 3 |
+
size 587247299
|
pytorch_model_00030-of-00041.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:444784f2626bf09f6de6c0e6948900ccd453145287379a69623e59d25e031e53
|
| 3 |
+
size 587247299
|