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
| { | |
| "metadata": { | |
| "total_size": 2593656832 | |
| }, | |
| "weight_map": { | |
| "lm_head.weight": "pytorch_model_00001-of-00001.bin", | |
| "transformer.h.0.input_layernorm.weight": "pytorch_model_00001-of-00001.bin", | |
| "transformer.h.0.mlp.down_proj.bias": "pytorch_model_00001-of-00001.bin", | |
| "transformer.h.0.mlp.down_proj.weight": "pytorch_model_00001-of-00001.bin", | |
| "transformer.h.0.mlp.gate_proj.weight": "pytorch_model_00001-of-00001.bin", | |
| "transformer.h.0.mlp.up_proj.weight": "pytorch_model_00001-of-00001.bin", | |
| "transformer.h.0.post_attention_layernorm.weight": "pytorch_model_00001-of-00001.bin", | |
| "transformer.h.0.self_attention.dense.bias": "pytorch_model_00001-of-00001.bin", | |
| "transformer.h.0.self_attention.dense.weight": "pytorch_model_00001-of-00001.bin", | |
| "transformer.h.0.self_attention.key_value.weight": "pytorch_model_00001-of-00001.bin", | |
| "transformer.h.0.self_attention.query.weight": "pytorch_model_00001-of-00001.bin", | |
| "transformer.h.1.input_layernorm.weight": "pytorch_model_00001-of-00001.bin", | |
| "transformer.h.1.mlp.down_proj.bias": "pytorch_model_00001-of-00001.bin", | |
| "transformer.h.1.mlp.down_proj.weight": "pytorch_model_00001-of-00001.bin", | |
| "transformer.h.1.mlp.gate_proj.weight": "pytorch_model_00001-of-00001.bin", | |
| "transformer.h.1.mlp.up_proj.weight": "pytorch_model_00001-of-00001.bin", | |
| "transformer.h.1.post_attention_layernorm.weight": "pytorch_model_00001-of-00001.bin", | |
| "transformer.h.1.self_attention.dense.bias": "pytorch_model_00001-of-00001.bin", | |
| "transformer.h.1.self_attention.dense.weight": "pytorch_model_00001-of-00001.bin", | |
| "transformer.h.1.self_attention.key_value.weight": "pytorch_model_00001-of-00001.bin", | |
| "transformer.h.1.self_attention.query.weight": "pytorch_model_00001-of-00001.bin", | |
| "transformer.h.10.input_layernorm.weight": "pytorch_model_00001-of-00001.bin", | |
| "transformer.h.10.mlp.down_proj.bias": "pytorch_model_00001-of-00001.bin", | |
| "transformer.h.10.mlp.down_proj.weight": "pytorch_model_00001-of-00001.bin", | |
| "transformer.h.10.mlp.gate_proj.weight": "pytorch_model_00001-of-00001.bin", | |
| "transformer.h.10.mlp.up_proj.weight": "pytorch_model_00001-of-00001.bin", | |
| "transformer.h.10.post_attention_layernorm.weight": "pytorch_model_00001-of-00001.bin", | |
| "transformer.h.10.self_attention.dense.bias": "pytorch_model_00001-of-00001.bin", | |
| "transformer.h.10.self_attention.dense.weight": "pytorch_model_00001-of-00001.bin", | |
| "transformer.h.10.self_attention.key_value.weight": "pytorch_model_00001-of-00001.bin", | |
| "transformer.h.10.self_attention.query.weight": "pytorch_model_00001-of-00001.bin", | |
| "transformer.h.11.input_layernorm.weight": "pytorch_model_00001-of-00001.bin", | |
| "transformer.h.11.mlp.down_proj.bias": "pytorch_model_00001-of-00001.bin", | |
| "transformer.h.11.mlp.down_proj.weight": "pytorch_model_00001-of-00001.bin", | |
| "transformer.h.11.mlp.gate_proj.weight": "pytorch_model_00001-of-00001.bin", | |
| "transformer.h.11.mlp.up_proj.weight": "pytorch_model_00001-of-00001.bin", | |
| "transformer.h.11.post_attention_layernorm.weight": "pytorch_model_00001-of-00001.bin", | |
| "transformer.h.11.self_attention.dense.bias": "pytorch_model_00001-of-00001.bin", | |
| "transformer.h.11.self_attention.dense.weight": "pytorch_model_00001-of-00001.bin", | |
| "transformer.h.11.self_attention.key_value.weight": "pytorch_model_00001-of-00001.bin", | |
| "transformer.h.11.self_attention.query.weight": "pytorch_model_00001-of-00001.bin", | |
| "transformer.h.12.input_layernorm.weight": "pytorch_model_00001-of-00001.bin", | |
| "transformer.h.12.mlp.down_proj.bias": "pytorch_model_00001-of-00001.bin", | |
| "transformer.h.12.mlp.down_proj.weight": "pytorch_model_00001-of-00001.bin", | |
| "transformer.h.12.mlp.gate_proj.weight": "pytorch_model_00001-of-00001.bin", | |
| "transformer.h.12.mlp.up_proj.weight": "pytorch_model_00001-of-00001.bin", | |
| "transformer.h.12.post_attention_layernorm.weight": "pytorch_model_00001-of-00001.bin", | |
| "transformer.h.12.self_attention.dense.bias": "pytorch_model_00001-of-00001.bin", | |
| "transformer.h.12.self_attention.dense.weight": "pytorch_model_00001-of-00001.bin", | |
| "transformer.h.12.self_attention.key_value.weight": "pytorch_model_00001-of-00001.bin", | |
| "transformer.h.12.self_attention.query.weight": "pytorch_model_00001-of-00001.bin", | |
| "transformer.h.13.input_layernorm.weight": "pytorch_model_00001-of-00001.bin", | |
| "transformer.h.13.mlp.down_proj.bias": "pytorch_model_00001-of-00001.bin", | |
| "transformer.h.13.mlp.down_proj.weight": "pytorch_model_00001-of-00001.bin", | |
| "transformer.h.13.mlp.gate_proj.weight": "pytorch_model_00001-of-00001.bin", | |
| "transformer.h.13.mlp.up_proj.weight": "pytorch_model_00001-of-00001.bin", | |
| "transformer.h.13.post_attention_layernorm.weight": "pytorch_model_00001-of-00001.bin", | |
| "transformer.h.13.self_attention.dense.bias": "pytorch_model_00001-of-00001.bin", | |
| "transformer.h.13.self_attention.dense.weight": "pytorch_model_00001-of-00001.bin", | |
| "transformer.h.13.self_attention.key_value.weight": "pytorch_model_00001-of-00001.bin", | |
| "transformer.h.13.self_attention.query.weight": "pytorch_model_00001-of-00001.bin", | |
| "transformer.h.14.input_layernorm.weight": "pytorch_model_00001-of-00001.bin", | |
| "transformer.h.14.mlp.down_proj.bias": "pytorch_model_00001-of-00001.bin", | |
| "transformer.h.14.mlp.down_proj.weight": "pytorch_model_00001-of-00001.bin", | |
| "transformer.h.14.mlp.gate_proj.weight": "pytorch_model_00001-of-00001.bin", | |
| "transformer.h.14.mlp.up_proj.weight": "pytorch_model_00001-of-00001.bin", | |
| "transformer.h.14.post_attention_layernorm.weight": "pytorch_model_00001-of-00001.bin", | |
| "transformer.h.14.self_attention.dense.bias": "pytorch_model_00001-of-00001.bin", | |
| "transformer.h.14.self_attention.dense.weight": "pytorch_model_00001-of-00001.bin", | |
| "transformer.h.14.self_attention.key_value.weight": "pytorch_model_00001-of-00001.bin", | |
| "transformer.h.14.self_attention.query.weight": "pytorch_model_00001-of-00001.bin", | |
| "transformer.h.15.input_layernorm.weight": "pytorch_model_00001-of-00001.bin", | |
| "transformer.h.15.mlp.down_proj.bias": "pytorch_model_00001-of-00001.bin", | |
| "transformer.h.15.mlp.down_proj.weight": "pytorch_model_00001-of-00001.bin", | |
| "transformer.h.15.mlp.gate_proj.weight": "pytorch_model_00001-of-00001.bin", | |
| "transformer.h.15.mlp.up_proj.weight": "pytorch_model_00001-of-00001.bin", | |
| "transformer.h.15.post_attention_layernorm.weight": "pytorch_model_00001-of-00001.bin", | |
| "transformer.h.15.self_attention.dense.bias": "pytorch_model_00001-of-00001.bin", | |
| "transformer.h.15.self_attention.dense.weight": "pytorch_model_00001-of-00001.bin", | |
| "transformer.h.15.self_attention.key_value.weight": "pytorch_model_00001-of-00001.bin", | |
| "transformer.h.15.self_attention.query.weight": "pytorch_model_00001-of-00001.bin", | |
| "transformer.h.2.input_layernorm.weight": "pytorch_model_00001-of-00001.bin", | |
| "transformer.h.2.mlp.down_proj.bias": "pytorch_model_00001-of-00001.bin", | |
| "transformer.h.2.mlp.down_proj.weight": "pytorch_model_00001-of-00001.bin", | |
| "transformer.h.2.mlp.gate_proj.weight": "pytorch_model_00001-of-00001.bin", | |
| "transformer.h.2.mlp.up_proj.weight": "pytorch_model_00001-of-00001.bin", | |
| "transformer.h.2.post_attention_layernorm.weight": "pytorch_model_00001-of-00001.bin", | |
| "transformer.h.2.self_attention.dense.bias": "pytorch_model_00001-of-00001.bin", | |
| "transformer.h.2.self_attention.dense.weight": "pytorch_model_00001-of-00001.bin", | |
| "transformer.h.2.self_attention.key_value.weight": "pytorch_model_00001-of-00001.bin", | |
| "transformer.h.2.self_attention.query.weight": "pytorch_model_00001-of-00001.bin", | |
| "transformer.h.3.input_layernorm.weight": "pytorch_model_00001-of-00001.bin", | |
| "transformer.h.3.mlp.down_proj.bias": "pytorch_model_00001-of-00001.bin", | |
| "transformer.h.3.mlp.down_proj.weight": "pytorch_model_00001-of-00001.bin", | |
| "transformer.h.3.mlp.gate_proj.weight": "pytorch_model_00001-of-00001.bin", | |
| "transformer.h.3.mlp.up_proj.weight": "pytorch_model_00001-of-00001.bin", | |
| "transformer.h.3.post_attention_layernorm.weight": "pytorch_model_00001-of-00001.bin", | |
| "transformer.h.3.self_attention.dense.bias": "pytorch_model_00001-of-00001.bin", | |
| "transformer.h.3.self_attention.dense.weight": "pytorch_model_00001-of-00001.bin", | |
| "transformer.h.3.self_attention.key_value.weight": "pytorch_model_00001-of-00001.bin", | |
| "transformer.h.3.self_attention.query.weight": "pytorch_model_00001-of-00001.bin", | |
| "transformer.h.4.input_layernorm.weight": "pytorch_model_00001-of-00001.bin", | |
| "transformer.h.4.mlp.down_proj.bias": "pytorch_model_00001-of-00001.bin", | |
| "transformer.h.4.mlp.down_proj.weight": "pytorch_model_00001-of-00001.bin", | |
| "transformer.h.4.mlp.gate_proj.weight": "pytorch_model_00001-of-00001.bin", | |
| "transformer.h.4.mlp.up_proj.weight": "pytorch_model_00001-of-00001.bin", | |
| "transformer.h.4.post_attention_layernorm.weight": "pytorch_model_00001-of-00001.bin", | |
| "transformer.h.4.self_attention.dense.bias": "pytorch_model_00001-of-00001.bin", | |
| "transformer.h.4.self_attention.dense.weight": "pytorch_model_00001-of-00001.bin", | |
| "transformer.h.4.self_attention.key_value.weight": "pytorch_model_00001-of-00001.bin", | |
| "transformer.h.4.self_attention.query.weight": "pytorch_model_00001-of-00001.bin", | |
| "transformer.h.5.input_layernorm.weight": "pytorch_model_00001-of-00001.bin", | |
| "transformer.h.5.mlp.down_proj.bias": "pytorch_model_00001-of-00001.bin", | |
| "transformer.h.5.mlp.down_proj.weight": "pytorch_model_00001-of-00001.bin", | |
| "transformer.h.5.mlp.gate_proj.weight": "pytorch_model_00001-of-00001.bin", | |
| "transformer.h.5.mlp.up_proj.weight": "pytorch_model_00001-of-00001.bin", | |
| "transformer.h.5.post_attention_layernorm.weight": "pytorch_model_00001-of-00001.bin", | |
| "transformer.h.5.self_attention.dense.bias": "pytorch_model_00001-of-00001.bin", | |
| "transformer.h.5.self_attention.dense.weight": "pytorch_model_00001-of-00001.bin", | |
| "transformer.h.5.self_attention.key_value.weight": "pytorch_model_00001-of-00001.bin", | |
| "transformer.h.5.self_attention.query.weight": "pytorch_model_00001-of-00001.bin", | |
| "transformer.h.6.input_layernorm.weight": "pytorch_model_00001-of-00001.bin", | |
| "transformer.h.6.mlp.down_proj.bias": "pytorch_model_00001-of-00001.bin", | |
| "transformer.h.6.mlp.down_proj.weight": "pytorch_model_00001-of-00001.bin", | |
| "transformer.h.6.mlp.gate_proj.weight": "pytorch_model_00001-of-00001.bin", | |
| "transformer.h.6.mlp.up_proj.weight": "pytorch_model_00001-of-00001.bin", | |
| "transformer.h.6.post_attention_layernorm.weight": "pytorch_model_00001-of-00001.bin", | |
| "transformer.h.6.self_attention.dense.bias": "pytorch_model_00001-of-00001.bin", | |
| "transformer.h.6.self_attention.dense.weight": "pytorch_model_00001-of-00001.bin", | |
| "transformer.h.6.self_attention.key_value.weight": "pytorch_model_00001-of-00001.bin", | |
| "transformer.h.6.self_attention.query.weight": "pytorch_model_00001-of-00001.bin", | |
| "transformer.h.7.input_layernorm.weight": "pytorch_model_00001-of-00001.bin", | |
| "transformer.h.7.mlp.down_proj.bias": "pytorch_model_00001-of-00001.bin", | |
| "transformer.h.7.mlp.down_proj.weight": "pytorch_model_00001-of-00001.bin", | |
| "transformer.h.7.mlp.gate_proj.weight": "pytorch_model_00001-of-00001.bin", | |
| "transformer.h.7.mlp.up_proj.weight": "pytorch_model_00001-of-00001.bin", | |
| "transformer.h.7.post_attention_layernorm.weight": "pytorch_model_00001-of-00001.bin", | |
| "transformer.h.7.self_attention.dense.bias": "pytorch_model_00001-of-00001.bin", | |
| "transformer.h.7.self_attention.dense.weight": "pytorch_model_00001-of-00001.bin", | |
| "transformer.h.7.self_attention.key_value.weight": "pytorch_model_00001-of-00001.bin", | |
| "transformer.h.7.self_attention.query.weight": "pytorch_model_00001-of-00001.bin", | |
| "transformer.h.8.input_layernorm.weight": "pytorch_model_00001-of-00001.bin", | |
| "transformer.h.8.mlp.down_proj.bias": "pytorch_model_00001-of-00001.bin", | |
| "transformer.h.8.mlp.down_proj.weight": "pytorch_model_00001-of-00001.bin", | |
| "transformer.h.8.mlp.gate_proj.weight": "pytorch_model_00001-of-00001.bin", | |
| "transformer.h.8.mlp.up_proj.weight": "pytorch_model_00001-of-00001.bin", | |
| "transformer.h.8.post_attention_layernorm.weight": "pytorch_model_00001-of-00001.bin", | |
| "transformer.h.8.self_attention.dense.bias": "pytorch_model_00001-of-00001.bin", | |
| "transformer.h.8.self_attention.dense.weight": "pytorch_model_00001-of-00001.bin", | |
| "transformer.h.8.self_attention.key_value.weight": "pytorch_model_00001-of-00001.bin", | |
| "transformer.h.8.self_attention.query.weight": "pytorch_model_00001-of-00001.bin", | |
| "transformer.h.9.input_layernorm.weight": "pytorch_model_00001-of-00001.bin", | |
| "transformer.h.9.mlp.down_proj.bias": "pytorch_model_00001-of-00001.bin", | |
| "transformer.h.9.mlp.down_proj.weight": "pytorch_model_00001-of-00001.bin", | |
| "transformer.h.9.mlp.gate_proj.weight": "pytorch_model_00001-of-00001.bin", | |
| "transformer.h.9.mlp.up_proj.weight": "pytorch_model_00001-of-00001.bin", | |
| "transformer.h.9.post_attention_layernorm.weight": "pytorch_model_00001-of-00001.bin", | |
| "transformer.h.9.self_attention.dense.bias": "pytorch_model_00001-of-00001.bin", | |
| "transformer.h.9.self_attention.dense.weight": "pytorch_model_00001-of-00001.bin", | |
| "transformer.h.9.self_attention.key_value.weight": "pytorch_model_00001-of-00001.bin", | |
| "transformer.h.9.self_attention.query.weight": "pytorch_model_00001-of-00001.bin", | |
| "transformer.ln_f.weight": "pytorch_model_00001-of-00001.bin", | |
| "transformer.word_embeddings.weight": "pytorch_model_00001-of-00001.bin" | |
| } | |
| } | |