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
initail 3
Browse filesfinish initail
- pytorch_model_00026-of-00032.bin +3 -0
- pytorch_model_00027-of-00032.bin +3 -0
- pytorch_model_00028-of-00032.bin +3 -0
- pytorch_model_00029-of-00032.bin +3 -0
- pytorch_model_00030-of-00032.bin +3 -0
- pytorch_model_00031-of-00032.bin +3 -0
- pytorch_model_00032-of-00032.bin +3 -0
- special_tokens_map.json +1 -0
- tokenizer.json +0 -0
- tokenizer_config.json +10 -0
pytorch_model_00026-of-00032.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b49fb0dd7be30d7473fa4a253f1e9f1b0d8e665567bd30bad975e9ad66615c02
|
| 3 |
+
size 436244035
|
pytorch_model_00027-of-00032.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:4bf2cd87f2efa657b8842f99d5b9581f22eb7a15461695cd2444042de044f5cd
|
| 3 |
+
size 436244035
|
pytorch_model_00028-of-00032.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:99f4ca1e067a1cd86168efc5009f283ed028364887a20f88ab804eb69a561777
|
| 3 |
+
size 436244035
|
pytorch_model_00029-of-00032.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:0ef9d1932e8bb3e0f7e1a5e88f6b2368e0c91761487a569e36d511dbcbc5ac65
|
| 3 |
+
size 436244035
|
pytorch_model_00030-of-00032.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a278dd3d1ab6d5c5208827c0c868c3e42fb52b00dd4d22fcf472a560570bf4c8
|
| 3 |
+
size 436244035
|
pytorch_model_00031-of-00032.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b867023ee158300a6c2edcebee5ca52bd963a35205d77dbaa520a04d2dc81088
|
| 3 |
+
size 436244035
|
pytorch_model_00032-of-00032.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ee999414f07860e999ca131a5268e070f66e20ffb43cfdc63944e88e411cc513
|
| 3 |
+
size 9130
|
special_tokens_map.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"bos_token": "<_start>", "eos_token": "<_end>", "unk_token": "<unk>", "pad_token": "<pad>"}
|
tokenizer.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
tokenizer_config.json
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"unk_token": "<unk>",
|
| 3 |
+
"eos_token": "<_end>",
|
| 4 |
+
"bos_token": "<_start>",
|
| 5 |
+
"pad_token": "<pad>",
|
| 6 |
+
"name_or_path": "tokenizer",
|
| 7 |
+
"special_tokens_map_file": null,
|
| 8 |
+
"tokenizer_class": "BloomTokenizerFast",
|
| 9 |
+
"padding_side": "left"
|
| 10 |
+
}
|