Run this model with HF Jobs
Run QuixiAI/DeepMixtral-8x7b-Instruct on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs and TRL to fine-tune https://huggingface.co/QuixiAI/DeepMixtral-8x7b-Instruct. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/QuixiAI/DeepMixtral-8x7b-Instruct on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Evaluate on a benchmark
Use HF Jobs to evaluate https://huggingface.co/QuixiAI/DeepMixtral-8x7b-Instruct. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.
Quantize for lower memory use
Use HF Jobs to create a 4-bit version of https://huggingface.co/QuixiAI/DeepMixtral-8x7b-Instruct. Push it to a new model repo, then reload it from there and report its memory footprint. Run `hf jobs --help` first to learn the CLI.
Instructions to use QuixiAI/DeepMixtral-8x7b-Instruct with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use QuixiAI/DeepMixtral-8x7b-Instruct with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="QuixiAI/DeepMixtral-8x7b-Instruct", trust_remote_code=True) messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("QuixiAI/DeepMixtral-8x7b-Instruct", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use QuixiAI/DeepMixtral-8x7b-Instruct with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "QuixiAI/DeepMixtral-8x7b-Instruct" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "QuixiAI/DeepMixtral-8x7b-Instruct", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/QuixiAI/DeepMixtral-8x7b-Instruct
- SGLang
How to use QuixiAI/DeepMixtral-8x7b-Instruct 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 "QuixiAI/DeepMixtral-8x7b-Instruct" \ --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": "QuixiAI/DeepMixtral-8x7b-Instruct", "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 "QuixiAI/DeepMixtral-8x7b-Instruct" \ --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": "QuixiAI/DeepMixtral-8x7b-Instruct", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use QuixiAI/DeepMixtral-8x7b-Instruct with Docker Model Runner:
docker model run hf.co/QuixiAI/DeepMixtral-8x7b-Instruct
Update README.md
Browse files6 unmodified lines789101112136 unmodified linesThis is a direct extraction of the 8 experts from [Mixtral-8x7b-Instruct-v0.1](https://huggingface.co/mistralai/Mixtral-8x7B-Instruct-v0.1), and placing them into the Deepseek-MoE Architecture.It is 2 experts per token. Performance is good, and is likely more malleable to training. This is our first experiment with expert extraction and modification, more to come. Enjoy.Special Thanks: Eric Hartford, and Fernando Neto.6 unmodified lines789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354556 unmodified linesThis is a direct extraction of the 8 experts from [Mixtral-8x7b-Instruct-v0.1](https://huggingface.co/mistralai/Mixtral-8x7B-Instruct-v0.1), and placing them into the Deepseek-MoE Architecture.It is 2 experts per token. Performance is identical to instruct, if not a little better. Evals will come, It is more malleable to training. This is our first experiment with expert extraction and modification, more to come. Enjoy.```markdown## Instruction FormatTo leverage instruction fine-tuning, your prompts should be enclosed with `[INST]` and `[/INST]` tokens. The very first instruction should begin with a begin-of-sentence id, while subsequent instructions should not. Assistant generation will conclude with an end-of-sentence token id.### Example```plaintexttext = "<s>[INST] What is your favourite condiment? [/INST]""Well, I'm quite partial to a good squeeze of fresh lemon juice. It adds just the right amount of zesty flavour to whatever I'm cooking up in the kitchen!</s>""[INST] Do you have mayonnaise recipes? [/INST]"```### Applying the Chat TemplateThis format can be implemented using the `apply_chat_template()` method from the `transformers` library:```pythonfrom transformers import AutoModelForCausalLM, AutoTokenizerdevice = "cuda" # the device to load the model onto# Load the model and tokenizermodel = AutoModelForCausalLM.from_pretrained("mistralai/Mistral-7B-Instruct-v0.2")tokenizer = AutoTokenizer.from_pretrained("mistralai/Mistral-7B-Instruct-v0.2")# Define the conversation messagesmessages = [{"role": "user", "content": "What is your favourite condiment?"},{"role": "assistant", "content": "Well, I'm quite partial to a good squeeze of fresh lemon juice. It adds just the right amount of zesty flavour to whatever I'm cooking up in the kitchen!"},{"role": "user", "content": "Do you have mayonnaise recipes?"}]# Apply chat templateencodeds = tokenizer.apply_chat_template(messages, return_tensors="pt")model_inputs = encodeds.to(device)model.to(device)# Generate responsegenerated_ids = model.generate(model_inputs, max_new_tokens=1000, do_sample=True)decoded = tokenizer.batch_decode(generated_ids)print(decoded[0])```Special Thanks: Eric Hartford, and Fernando Neto.
README.md+43-1