Downloads · 30 days
26
7% of all-time downloads
FriendliAI/Mixtral-8x22B-v0.1-fp8
Mixtral-8x22B-v0.1-fp8 is a text generation model from FriendliAI. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as apache-2.0.
<p align="center" <img src="https://i.imgur.com/mNM6Cai.png" width="100%" alt="Friendli Logo" </p
Downloads · 30 days
26
7% of all-time downloads
All-time downloads
396
Public
Parameters
141B
141 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors141 GB · 100%
How the weights are stored.
I8140B · 100%
From the Hugging Face model README
This repo contains the Mixtral-8x22B-v0.1 model quantized to FP8 by FriendliAI, significantly enhancing its inference efficiency while maintaining high accuracy. Note that FP8 is only supported by NVIDIA Ada, Hopper, and Blackwell GPU architectures. Check out FriendliAI documentation for more details.
This model is compatible with Friendli Container.
PAT (Personal Access Token) is the user credential for for logging into our container registry.
export FRIENDLI_PAT="YOUR PAT"
docker login registry.friendli.ai -u $YOUR_EMAIL -p $FRIENDLI_PAT
docker pull registry.friendli.ai/trial
Once you've prepared the image of Friendli Container, you can launch it to create a serving endpoint.
docker run \
--gpus '"device=0,1,2,3"' \
-p 8000:8000 \
-v ~/.cache/huggingface:/root/.cache/huggingface \
-e FRIENDLI_CONTAINER_SECRET="YOUR CONTAINER SECRET" \
registry.friendli.ai/trial \
--web-server-port 8000 \
--hf-model-name FriendliAI/Mixtral-8x22B-v0.1-fp8 \
--num-devices 4 # Use tensor parallelism degree 4
To serve MoE models efficiently, it is required to run a policy search to explore the optimal execution policy:
export POLICY_DIR=$PWD/policy
mkdir -p $POLICY_DIR
docker run \
--gpus '"device=0,1,2,3"' \
-p 8000:8000 \
-v ~/.cache/huggingface:/root/.cache/huggingface \
-v $POLICY_DIR:/policy \
-e FRIENDLI_CONTAINER_SECRET="YOUR CONTAINER SECRET" \
registry.friendli.ai/trial \
--web-server-port 8000 \
--hf-model-name FriendliAI/Mixtral-8x22B-v0.1-fp8 \
--num-devices 4 # Use tensor parallelism degree 4 \
--algo-policy-dir /policy \
--search-policy true
When the optimal policy is successfully searched, the policy is compiled into a policy file and saved at $POLICY_DIR.
Now you can create an inference endpoint with this optimal policy as follows:
docker run \
--gpus '"device=0,1,2,3"' \
-p 8000:8000 \
-v ~/.cache/huggingface:/root/.cache/huggingface \
-v $POLICY_DIR:/policy \
-e FRIENDLI_CONTAINER_SECRET="YOUR CONTAINER SECRET" \
registry.friendli.ai/trial \
--web-server-port 8000 \
--hf-model-name FriendliAI/Mixtral-8x22B-v0.1-fp8 \
--num-devices 4 # Use tensor parallelism degree 4 \
--algo-policy-dir /policy
The Mixtral-8x22B Large Language Model (LLM) is a pretrained generative Sparse Mixture of Experts.
For full details of this model please read our release blog post.
This repo contains weights that are compatible with vLLM serving of the model as well as Hugging Face transformers library. It is based on the original Mixtral torrent release, but the file format and parameter names are different.
from transformers import AutoModelForCausalLM, AutoTokenizer
model_id = "mistralai/Mixtral-8x22B-v0.1"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(model_id)
text = "Hello my name is"
inputs = tokenizer(text, return_tensors="pt")
outputs = model.generate(**inputs, max_new_tokens=20)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
By default, transformers will load the model in full precision. Therefore you might be interested to further reduce down the memory requirements to run the model through the optimizations we offer in HF ecosystem:
Mixtral-8x22B is a pretrained base model and therefore does not have any moderation mechanisms.
Albert Jiang, Alexandre Sablayrolles, Alexis Tacnet, Antoine Roux, Arthur Mensch, Audrey Herblin-Stoop, Baptiste Bout, Baudouin de Monicault, Blanche Savary, Bam4d, Caroline Feldman, Devendra Singh Chaplot, Diego de las Casas, Eleonore Arcelin, Emma Bou Hanna, Etienne Metzger, Gianna Lengyel, Guillaume Bour, Guillaume Lample, Harizo Rajaona, Jean-Malo Delignon, Jia Li, Justus Murke, Louis Martin, Louis Ternon, Lucile Saulnier, Lélio Renard Lavaud, Margaret Jennings, Marie Pellat, Marie Torelli, Marie-Anne Lachaux, Nicolas Schuhl, Patrick von Platen, Pierre Stock, Sandeep Subramanian, Sophia Yang, Szymon Antoniak, Teven Le Scao, Thibaut Lavril, Timothée Lacroix, Théophile Gervet, Thomas Wang, Valera Nemychnikova, William El Sayed, William Marshall