Instructions to use Tele-AI/telechat-7B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Tele-AI/telechat-7B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Tele-AI/telechat-7B", trust_remote_code=True)# Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("Tele-AI/telechat-7B", trust_remote_code=True, dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use Tele-AI/telechat-7B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Tele-AI/telechat-7B" # 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-7B", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Tele-AI/telechat-7B
- SGLang
How to use Tele-AI/telechat-7B 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-7B" \ --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-7B", "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-7B" \ --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-7B", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use Tele-AI/telechat-7B with Docker Model Runner:
docker model run hf.co/Tele-AI/telechat-7B
init
Browse filesinit 3
- pytorch_model_00016-of-00032.bin +3 -0
- pytorch_model_00017-of-00032.bin +3 -0
- pytorch_model_00018-of-00032.bin +3 -0
- pytorch_model_00019-of-00032.bin +3 -0
- pytorch_model_00020-of-00032.bin +3 -0
- pytorch_model_00021-of-00032.bin +3 -0
- pytorch_model_00022-of-00032.bin +3 -0
- pytorch_model_00023-of-00032.bin +3 -0
- pytorch_model_00024-of-00032.bin +3 -0
- pytorch_model_00025-of-00032.bin +3 -0
pytorch_model_00016-of-00032.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:c3f7b97574ac68fbf452f2e501accdaf9acba5fdff6af90a979c1da42450c59f
|
| 3 |
+
size 436244035
|
pytorch_model_00017-of-00032.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:c04619c675b257fc2da1c2f91b9b724e84523295d2c08688ea15554643f695b5
|
| 3 |
+
size 436244035
|
pytorch_model_00018-of-00032.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:fc6e2fab07c207cefb1932153b02417c77359462457a3ad3858fd326b51ab6f4
|
| 3 |
+
size 436244035
|
pytorch_model_00019-of-00032.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a82a3a47b7b05496abab985fa0cc3f3a6dae524745e5b91c9e6549ed22758d81
|
| 3 |
+
size 436244035
|
pytorch_model_00020-of-00032.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:4009713420c4a7476210bde020f937563adb44cbce8a5474702ac416e9478625
|
| 3 |
+
size 436244035
|
pytorch_model_00021-of-00032.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:5cb7ff553e76399e2f5b76a55801bc3227b7077f2aa76e605485b66367f50bc1
|
| 3 |
+
size 436244035
|
pytorch_model_00022-of-00032.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:7f4deb7bf074887075d1c2512c66f30c8c3e953963e1e89e33f10176aa917152
|
| 3 |
+
size 436244035
|
pytorch_model_00023-of-00032.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:fd3d97b27a4b5904acf99390daa33badcbfb0ad317f5fec36eb76932c83b5881
|
| 3 |
+
size 436244035
|
pytorch_model_00024-of-00032.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:92999d70b4347d524a91475aabda41a924d45b7bd0fd9e8926b2357f0c50558b
|
| 3 |
+
size 436244035
|
pytorch_model_00025-of-00032.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:99658d73885fe1c2b88c220728997d7fe230e3667afc017f1bd0dca456ee13bb
|
| 3 |
+
size 436244035
|