Model reference · open weights
Mistral is an open-weight language model from mistralai, listed in the AxForge catalogue. AxForge can bring it up on EU-owned hardware for you on request — with the licence handled where one is required.
About
Model Card for Mistral-7B-Instruct-v0.2 Encode and Decode with mistralcommon Inference with mistralinference Inference with hugging face transformers [!TIP] PRs to correct the transformers tokenizer so that it gives 1-to-1 the same results as the mistralcommon reference implementation are very welcome! 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 and release blog post. 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. This format is available as a chat template via the applychattemplate() method: Troubleshooting - If you see the following error: Installing transformers from source should solve the issue pip install git+https://github.com/huggingface/transformers This should not be required after transformers-v4.33.4. Limitations The Mistral 7B Instruct model is a quick demonstration that the base model can be easily fine-tuned to achieve compelling performance. It does not have any moderation mechanisms. We're looking forward to engaging with the community on ways to make the model finely respect guardrails, allowing for deployment in environments requiring moderated outputs. The Mistral AI Team Albert Jiang, Alexandre Sablayrolles, Arthur Mensch, Blanche Savary, Chris Bamford, Devendra Singh Chaplot, Diego de las Casas, Emma Bou Hanna, Florian Bressand, Gianna Lengyel, Guillaume Bour, Guillaume Lample, Lélio Renard Lavaud, Louis Ternon, Lucile Saulnier, Marie-Anne Lachaux, Pierre Stock, Teven Le Scao, Théophile Gervet, Thibaut Lavril, Thomas Wang, Timothée Lacroix, William El Sayed.
Summarised from the published model card. Read the full card on the HuggingFace links below.
Specifications
| Maker | mistralai |
|---|---|
| Type | Language models |
| Parameters (lead) | 7.2B |
| Context | 32k tokens |
| Variants | 1 |
| Runs with | transformers |
| Released | 2023-12-11 |
| Popularity | 1.2M downloads / month |
| Likes | 4,149 |
| Licence | Open weights |
How it works
Variants
Open weights ship in several sizes and precisions. One page, all the variants — pick the one that fits your GPU. VRAM figures are estimates from model size.
| Variant | Params | Precision | VRAM | Fits 16 GB | Weights |
|---|---|---|---|---|---|
| Mistral-7B-Instruct-v0.2 | 7.2B | BF16 | ~16.7 GB | ✓ | Weights ↗ |
Using it via the API
Once AxForge deploys mistral for you, it answers on the OpenAI-compatible API — the same base URL and keys as every other model. (mistral below is illustrative; you get the exact model name on deployment.)
$ curl -sS https://api.axforge.ai/v1/chat/completions \
-H "Authorization: Bearer $AXFORGE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"mistral","messages":[{"role":"user","content":"Hello"}]}'
Licence
Open weights under apache-2.0 — commercial use is permitted. Deploy it on AxForge EU hardware on request. Read the licence ↗