Instructions to use Tele-AI/TeleChat-52B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Tele-AI/TeleChat-52B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Tele-AI/TeleChat-52B", trust_remote_code=True)# Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("Tele-AI/TeleChat-52B", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Tele-AI/TeleChat-52B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Tele-AI/TeleChat-52B" # 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-52B", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Tele-AI/TeleChat-52B
- SGLang
How to use Tele-AI/TeleChat-52B 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-52B" \ --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-52B", "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-52B" \ --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-52B", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use Tele-AI/TeleChat-52B with Docker Model Runner:
docker model run hf.co/Tele-AI/TeleChat-52B
File size: 1,361 Bytes
a50a5cd b810fbd a50a5cd a6ffa79 a50a5cd | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 | {
"activation_function": "silu",
"add_bias_linear": false,
"attn_pdrop": 0.0,
"architectures":[
"TeleChatForCausalLM"
],
"auto_map": {
"AutoConfig": "configuration_telechat.TELECHATConfig",
"AutoModel": "modeling_telechat.TELECHAT",
"AutoModelForCausalLM": "modeling_telechat.TELECHAT"
},
"bos_token_id": 1,
"embd_pdrop": 0.0,
"enable_flash_attn": true,
"eos_token_id": 2,
"initializer_range": 0.02,
"input_mult": 1.0,
"layer_norm_epsilon": 1e-05,
"model_type": "telechat",
"mup_base_width": 256,
"mup_scale_factor": 32.0,
"n_embd": 8192,
"n_head": 64,
"n_inner": 21824,
"n_layer": 64,
"n_positions": 4096,
"output_mult": 1.0,
"pad_token_id": 3,
"relative_encoding": "rotary",
"reorder_and_upcast_attn": true,
"resid_pdrop": 0.0,
"rotary_theta": 10000,
"rotary_use_xpos": false,
"rotary_xpos_scale_base": 512,
"scale_attn_by_inverse_layer_idx": true,
"scale_attn_weights": true,
"summary_activation": null,
"summary_first_dropout": 0.1,
"summary_proj_to_labels": true,
"summary_type": "cls_index",
"summary_use_proj": true,
"tie_word_embeddings": false,
"tokenizer_class": "TELECHATTokenizer",
"torch_dtype": "bfloat16",
"transformers_version": "4.34.1",
"unk_token_id": 0,
"use_RMSNorm": true,
"use_cache": true,
"use_mup": true,
"vocab_size": 80896
}
|