--- license: apache-2.0 base_model: mistralai/Mistral-7B-Instruct-v0.2 inference: false model_link: https://huggingface.co/mistralai/Mistral-7B-Instruct-v0.2 model_name: Mistral-7B-Instruct-v0.2 pipeline_tag: text-generation quantized_by: FriendliAI tags: - pretrained ---
# Mistral-7B-Instruct-v0.2 - FP8 - Model creator: [Mistral AI](https://huggingface.co/mistralai) - Original model: [Mistral-7B-Instruct-v0.2](https://huggingface.co/mistralai/Mistral-7B-Instruct-v0.2) ## Description This repo contains the Mistral-7B-Instruct-v0.2 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](https://docs.friendli.ai/) for more details. ## License Refer to the license of the original model card. ## Compatibility This model is compatible with **[Friendli Container](https://friendli.ai/products/container/)**. ## Prerequisites - Before you begin, make sure you have signed up for [Friendli Suite](https://suite.friendli.ai/). **You can use Friendli Containers free of charge for four weeks.** - Prepare a Personal Access Token following [this guide](#preparing-personal-access-token). - Prepare a Friendli Container Secret following [this guide](#preparing-container-secret). ### Preparing Personal Access Token PAT (Personal Access Token) is the user credential for for logging into our container registry. 1. Sign in [Friendli Suite](https://suite.friendli.ai/). 2. Go to **[User Settings > Tokens](https://suite.friendli.ai/user-settings/tokens)** and click **'Create new token'**. 3. Save your created token value. ### Preparing Container Secret Container secret is a credential to launch our Friendli Container images. You should pass the container secret as an environment variable to run the container image. 1. Sign in [Friendli Suite](https://suite.friendli.ai/). 2. Go to **Container > Container Secrets** and click **'Create secret'**. 3. Save your created secret value. ### Pulling Friendli Container Image 1. Log in to the Docker client using the personal access token created as outlined in [this guide](#preparing-personal-access-token). ```sh export FRIENDLI_PAT="YOUR PAT" docker login registry.friendli.ai -u $YOUR_EMAIL -p $FRIENDLI_PAT ``` 2. Pull image ```sh docker pull registry.friendli.ai/trial ``` ## Running Friendli Container Once you've prepared the image of Friendli Container, you can launch it to create a serving endpoint. ```sh docker run \ --gpus '"device=0"' \ -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/Mistral-7B-Instruct-v0.2-fp8 ``` --- # Original model card: Mistral AI's Mistral-7B-Instruct-v0.2 # Model Card for Mistral-7B-Instruct-v0.2 The Mistral-7B-Instruct-v0.2 Large Language Model (LLM) is an instruct fine-tuned version of the Mistral-7B-v0.2. Mistral-7B-v0.2 has the following changes compared to Mistral-7B-v0.1 - 32k context window (vs 8k context in v0.1) - Rope-theta = 1e6 - No Sliding-Window Attention For full details of this model please read our [paper](https://arxiv.org/abs/2310.06825) and [release blog post](https://mistral.ai/news/la-plateforme/). ## Instruction format In order to leverage instruction fine-tuning, your prompt should be surrounded by `[INST]` and `[/INST]` tokens. The very first instruction should begin with a begin of sentence id. The next instructions should not. The assistant generation will be ended by the end-of-sentence token id. E.g. ``` text = "