Instructions to use chargoddard/mixtralnt-4x7b-test with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use chargoddard/mixtralnt-4x7b-test with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="chargoddard/mixtralnt-4x7b-test")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("chargoddard/mixtralnt-4x7b-test") model = AutoModelForCausalLM.from_pretrained("chargoddard/mixtralnt-4x7b-test", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use chargoddard/mixtralnt-4x7b-test with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "chargoddard/mixtralnt-4x7b-test" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "chargoddard/mixtralnt-4x7b-test", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/chargoddard/mixtralnt-4x7b-test
- SGLang
How to use chargoddard/mixtralnt-4x7b-test 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 "chargoddard/mixtralnt-4x7b-test" \ --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": "chargoddard/mixtralnt-4x7b-test", "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 "chargoddard/mixtralnt-4x7b-test" \ --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": "chargoddard/mixtralnt-4x7b-test", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use chargoddard/mixtralnt-4x7b-test with Docker Model Runner:
docker model run hf.co/chargoddard/mixtralnt-4x7b-test
Nice work!
As soon as I heard about the open source MOE release, I was hoping somebody would do this. Thank you so much for your contribution!
Can you explain what tools and processes you used to create your own custom MOE under the new mixtral architecture?
would be cool to see MOE with other models like tinyllama, if possible
would be cool to see MOE with other models like tinyllama, if possible
Agreed! I've made the merge script for this work with Llama models as well now and I'm excited to see what comes out of it. You can see it here if you want.
thanks π€, any plans to support other archs like stablelm if possible?
support like t5 if possible?
