Instructions to use tencent/Hunyuan-A13B-Instruct-FP8 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use tencent/Hunyuan-A13B-Instruct-FP8 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="tencent/Hunyuan-A13B-Instruct-FP8", trust_remote_code=True) messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("tencent/Hunyuan-A13B-Instruct-FP8", trust_remote_code=True, dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use tencent/Hunyuan-A13B-Instruct-FP8 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "tencent/Hunyuan-A13B-Instruct-FP8" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "tencent/Hunyuan-A13B-Instruct-FP8", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/tencent/Hunyuan-A13B-Instruct-FP8
- SGLang
How to use tencent/Hunyuan-A13B-Instruct-FP8 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 "tencent/Hunyuan-A13B-Instruct-FP8" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "tencent/Hunyuan-A13B-Instruct-FP8", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'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 "tencent/Hunyuan-A13B-Instruct-FP8" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "tencent/Hunyuan-A13B-Instruct-FP8", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use tencent/Hunyuan-A13B-Instruct-FP8 with Docker Model Runner:
docker model run hf.co/tencent/Hunyuan-A13B-Instruct-FP8
VLLM docker deployment
rank_0_0 for vLLM's torch.compile
(VllmWorker rank=0 pid=280) INFO 06-27 15:55:57 [backends.py:430] Dynamo bytecode transform time: 11.07 s
(VllmWorker rank=1 pid=281) INFO 06-27 15:56:00 [backends.py:136] Cache the graph of shape None for later use
(VllmWorker rank=2 pid=282) INFO 06-27 15:56:00 [backends.py:136] Cache the graph of shape None for later use
(VllmWorker rank=3 pid=283) INFO 06-27 15:56:00 [backends.py:136] Cache the graph of shape None for later use
(VllmWorker rank=0 pid=280) INFO 06-27 15:56:01 [backends.py:136] Cache the graph of shape None for later use
(VllmWorker rank=3 pid=283) INFO 06-27 15:56:33 [backends.py:148] Compiling a graph for general shape takes 36.04 s
(VllmWorker rank=1 pid=281) INFO 06-27 15:56:34 [backends.py:148] Compiling a graph for general shape takes 36.27 s
(VllmWorker rank=2 pid=282) INFO 06-27 15:56:34 [backends.py:148] Compiling a graph for general shape takes 36.31 s
(VllmWorker rank=0 pid=280) INFO 06-27 15:56:35 [backends.py:148] Compiling a graph for general shape takes 37.21 s
(VllmWorker rank=0 pid=280) WARNING 06-27 15:56:39 [fused_moe.py:668] Using default MoE config. Performance might be sub-optimal! Config file not found at /usr/local/lib/python3.12/dist-packages/vllm/model_executor/layers/fused_moe/configs/E=64,N=768,device_name=NVIDIA_RTX_6000_Ada_Generation,dtype=fp8_w8a8.json
(VllmWorker rank=2 pid=282) WARNING 06-27 15:56:39 [fused_moe.py:668] Using default MoE config. Performance might be sub-optimal! Config file not found at /usr/local/lib/python3.12/dist-packages/vllm/model_executor/layers/fused_moe/configs/E=64,N=768,device_name=NVIDIA_RTX_6000_Ada_Generation,dtype=fp8_w8a8.json
(VllmWorker rank=1 pid=281) WARNING 06-27 15:56:39 [fused_moe.py:668] Using default MoE config. Performance might be sub-optimal! Config file not found at /usr/local/lib/python3.12/dist-packages/vllm/model_executor/layers/fused_moe/configs/E=64,N=768,device_name=NVIDIA_RTX_6000_Ada_Generation,dtype=fp8_w8a8.json
(VllmWorker rank=3 pid=283) WARNING 06-27 15:56:39 [fused_moe.py:668] Using default MoE config. Performance might be sub-optimal! Config file not found at /usr/local/lib/python3.12/dist-packages/vllm/model_executor/layers/fused_moe/configs/E=64,N=768,device_name=NVIDIA_RTX_6000_Ada_Generation,dtype=fp8_w8a8.json
raise RuntimeError(
ERROR 06-27 15:57:02 [core.py:396] RuntimeError: Worker failed with error 'Unknown CUDA arch (12.0+PTX) or GPU not supported', please check the stack trace above for the root cause
ERROR 06-27 15:57:04 [multiproc_executor.py:123] Worker proc VllmWorker-0 died unexpectedly, shutting down executor.
It does have cuda 12.8, not sure why this fails.
Hi @getfit ,
We found the this issue too, the package build on this docker image have some issue.
you can work around this issue with:export VLLM_USE_V1=0
or you can uninstall the and rebuild the flashinfer python package inside of image.
We're going to release a new docker image to improve compatibility.