Instructions to use cloudyu/Mixtral_34Bx2_MoE_60B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use cloudyu/Mixtral_34Bx2_MoE_60B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="cloudyu/Mixtral_34Bx2_MoE_60B")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("cloudyu/Mixtral_34Bx2_MoE_60B") model = AutoModelForCausalLM.from_pretrained("cloudyu/Mixtral_34Bx2_MoE_60B") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use cloudyu/Mixtral_34Bx2_MoE_60B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "cloudyu/Mixtral_34Bx2_MoE_60B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "cloudyu/Mixtral_34Bx2_MoE_60B", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/cloudyu/Mixtral_34Bx2_MoE_60B
- SGLang
How to use cloudyu/Mixtral_34Bx2_MoE_60B 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 "cloudyu/Mixtral_34Bx2_MoE_60B" \ --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": "cloudyu/Mixtral_34Bx2_MoE_60B", "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 "cloudyu/Mixtral_34Bx2_MoE_60B" \ --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": "cloudyu/Mixtral_34Bx2_MoE_60B", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use cloudyu/Mixtral_34Bx2_MoE_60B with Docker Model Runner:
docker model run hf.co/cloudyu/Mixtral_34Bx2_MoE_60B
The function_calling and translation abilities are weaker than Mixtral 8x7b
As per my test, this model surpassed mixtral 8x7b generally, especially in math and inference. However, it's also weaker than Mixtral while dealing with function calling. I used the same request body, and expect the model to generate proper json response represent a function call. This model responses "I am not able to access internet...", while Mixtral 8x7b success every time. Translation from Chinese to English seems slightly weaker than Mixtral 8x7b, this model failed to translate some terms or rare words.
In conclusion, this model is really amazing for most of the scenarios, you really did a great job! I hope the new versions can enhance these two weakness, make it better.
Many thanks for your feedback.