Text Generation
Transformers
Safetensors
Chinese
English
mixtral
Mixture of Experts
text-generation-inference
Instructions to use hfl/chinese-mixtral with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use hfl/chinese-mixtral with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="hfl/chinese-mixtral")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("hfl/chinese-mixtral") model = AutoModelForCausalLM.from_pretrained("hfl/chinese-mixtral", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use hfl/chinese-mixtral with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "hfl/chinese-mixtral" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "hfl/chinese-mixtral", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/hfl/chinese-mixtral
- SGLang
How to use hfl/chinese-mixtral 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 "hfl/chinese-mixtral" \ --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": "hfl/chinese-mixtral", "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 "hfl/chinese-mixtral" \ --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": "hfl/chinese-mixtral", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use hfl/chinese-mixtral with Docker Model Runner:
docker model run hf.co/hfl/chinese-mixtral
Commit History
-
Update README.md
Verified signature13addc1
-
Update README.md
Verified signature7b37775
-
Update README.md
Verified signaturea57bec8
-
Update README.md
Verified signature48502fc -
Update README.md
Verified signature03c4e84
-
Update README.md
Verified signaturea702460
-
Upload model-00019-of-00019.safetensors with huggingface_hub
Verified signaturead8591c -
Upload model-00018-of-00019.safetensors with huggingface_hub
Verified signature4aa3c68 -
Upload model-00017-of-00019.safetensors with huggingface_hub
Verified signature849e864 -
Upload model-00016-of-00019.safetensors with huggingface_hub
Verified signatured4ae4be -
Upload model-00015-of-00019.safetensors with huggingface_hub
Verified signature67b788d -
Upload model-00014-of-00019.safetensors with huggingface_hub
Verified signatureb3151af -
Upload model-00013-of-00019.safetensors with huggingface_hub
Verified signature3ed1256 -
Upload model-00012-of-00019.safetensors with huggingface_hub
Verified signature8f2f610 -
Upload model-00011-of-00019.safetensors with huggingface_hub
Verified signature339c100 -
Upload model-00010-of-00019.safetensors with huggingface_hub
Verified signaturef148a7c -
Upload model-00009-of-00019.safetensors with huggingface_hub
Verified signature6e5457f -
Upload model-00008-of-00019.safetensors with huggingface_hub
Verified signature3a59479 -
Upload model-00007-of-00019.safetensors with huggingface_hub
Verified signature1ffd029 -
Upload model-00006-of-00019.safetensors with huggingface_hub
Verified signature777a14c -
Upload model-00005-of-00019.safetensors with huggingface_hub
Verified signatureefd174e -
Upload model-00004-of-00019.safetensors with huggingface_hub
Verified signature0e9ca3d -
Upload model-00003-of-00019.safetensors with huggingface_hub
Verified signature7cd8f62 -
Upload model-00002-of-00019.safetensors with huggingface_hub
Verified signaturebf5d1ef -
Upload model-00001-of-00019.safetensors with huggingface_hub
Verified signature282021a -
Upload 6 files
Verified signature234735c
-
Update README.md
Verified signature54646e4 -
Update README.md
Verified signaturef8eea35 -
initial commit
Verified signatureb56eeea