πŸ“‹ Model Description

Quantization made by Richard Erkhov.

Github

Discord

Request more models

Mistral-7B-Instruct-v0.2 - GGUF

  • Model creator: https://huggingface.co/model-hub/
  • Original model: https://huggingface.co/model-hub/Mistral-7B-Instruct-v0.2/

NameQuant methodSize
Mistral-7B-Instruct-v0.2.Q2K.ggufQ2K2.53GB
Mistral-7B-Instruct-v0.2.IQ3XS.ggufIQ3XS2.81GB
Mistral-7B-Instruct-v0.2.IQ3S.ggufIQ3S2.96GB
Mistral-7B-Instruct-v0.2.Q3KS.ggufQ3K_S2.95GB
Mistral-7B-Instruct-v0.2.IQ3M.ggufIQ3M3.06GB
Mistral-7B-Instruct-v0.2.Q3K.ggufQ3K3.28GB
Mistral-7B-Instruct-v0.2.Q3KM.ggufQ3K_M3.28GB
Mistral-7B-Instruct-v0.2.Q3KL.ggufQ3K_L3.56GB
Mistral-7B-Instruct-v0.2.IQ4XS.ggufIQ4XS3.67GB
Mistral-7B-Instruct-v0.2.Q40.ggufQ403.83GB
Mistral-7B-Instruct-v0.2.IQ4NL.ggufIQ4NL3.87GB
Mistral-7B-Instruct-v0.2.Q4KS.ggufQ4K_S3.86GB
Mistral-7B-Instruct-v0.2.Q4K.ggufQ4K4.07GB
Mistral-7B-Instruct-v0.2.Q4KM.ggufQ4K_M4.07GB
Mistral-7B-Instruct-v0.2.Q41.ggufQ414.24GB
Mistral-7B-Instruct-v0.2.Q50.ggufQ504.65GB
Mistral-7B-Instruct-v0.2.Q5KS.ggufQ5K_S4.65GB
Mistral-7B-Instruct-v0.2.Q5K.ggufQ5K4.78GB
Mistral-7B-Instruct-v0.2.Q5KM.ggufQ5K_M4.78GB
Mistral-7B-Instruct-v0.2.Q51.ggufQ515.07GB
Mistral-7B-Instruct-v0.2.Q6K.ggufQ6K5.53GB
Mistral-7B-Instruct-v0.2.Q80.ggufQ807.17GB

Original model description:



license: apache-2.0
pipeline_tag: text-generation
tags:
  • finetuned

inference:
parameters:
temperature: 0.7
widget:
- text: "[INST] You are a pirate chatbot who always responds with Arr and pirate speak!\nThere's a llama on my lawn, how can I get rid of him? [/INST]"
output:
text: "Arr matey, a llama on yer lawn be a curious sight! Arr. First, ye might try to scare him off with a loud noise, like a cannon blast, Arr! If that don't work, ye could try to lure him away with some tasty treats, like carrots or apples, Arr. But beware, arr, if the llama be stubborn, ye might have to call in the help of a local animal control, or just live with him till he moves on, Arr!"
- text: "[INST] What is your favourite condiment? [/INST]"
output:
text: "I don't have a personal preference or the ability to taste or enjoy condiments, as I'm an artificial intelligence and don't have a physical body or senses. However, I can tell you that some common favourite condiments include ketchup, mustard, mayonnaise, hot sauce, soy sauce, and BBQ sauce. People's preferences can vary greatly depending on their cultural background, dietary restrictions, and personal taste preferences."

Model Card for Mistral-7B-Instruct-v0.2

The Mistral-7B-Instruct-v0.2 Large Language Model (LLM) is an improved instruct fine-tuned version of Mistral-7B-Instruct-v0.1.

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.

text = "<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]"

This format is available as a chat template via the applychattemplate() method:

from transformers import AutoModelForCausalLM, AutoTokenizer

device = "cuda" # the device to load the model onto

model = AutoModelForCausalLM.from_pretrained("mistralai/Mistral-7B-Instruct-v0.1")
tokenizer = AutoTokenizer.from_pretrained("mistralai/Mistral-7B-Instruct-v0.1")

messages = [
{"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?"}
]

encodeds = tokenizer.applychattemplate(messages, return_tensors="pt")

model_inputs = encodeds.to(device)
model.to(device)

generatedids = model.generate(modelinputs, maxnewtokens=1000, do_sample=True)
decoded = tokenizer.batchdecode(generatedids)
print(decoded[0])

Model Architecture

This instruction model is based on Mistral-7B-v0.1, a transformer model with the following architecture choices:
  • Grouped-Query Attention
  • Sliding-Window Attention
  • Byte-fallback BPE tokenizer

Troubleshooting

  • If you see the following error:
Traceback (most recent call last):
File "", line 1, in
File "/transformers/models/auto/autofactory.py", line 482, in frompretrained
config, kwargs = AutoConfig.from_pretrained(
File "/transformers/models/auto/configurationauto.py", line 1022, in frompretrained
configclass = CONFIGMAPPING[configdict["modeltype"]]
File "/transformers/models/auto/configuration_auto.py", line 723, in getitem
raise KeyError(key)
KeyError: 'mistral'

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.

πŸ“‚ GGUF File List

πŸ“ Filename πŸ“¦ Size ⚑ Download
Mistral-7B-Instruct-v0.2.IQ3_M.gguf
LFS Q3
3.06 GB Download
Mistral-7B-Instruct-v0.2.IQ3_S.gguf
LFS Q3
2.96 GB Download
Mistral-7B-Instruct-v0.2.IQ3_XS.gguf
LFS Q3
2.81 GB Download
Mistral-7B-Instruct-v0.2.IQ4_NL.gguf
LFS Q4
3.87 GB Download
Mistral-7B-Instruct-v0.2.IQ4_XS.gguf
LFS Q4
3.67 GB Download
Mistral-7B-Instruct-v0.2.Q2_K.gguf
LFS Q2
2.53 GB Download
Mistral-7B-Instruct-v0.2.Q3_K.gguf
LFS Q3
3.28 GB Download
Mistral-7B-Instruct-v0.2.Q3_K_L.gguf
LFS Q3
3.56 GB Download
Mistral-7B-Instruct-v0.2.Q3_K_M.gguf
LFS Q3
3.28 GB Download
Mistral-7B-Instruct-v0.2.Q3_K_S.gguf
LFS Q3
2.95 GB Download
Mistral-7B-Instruct-v0.2.Q4_0.gguf
Recommended LFS Q4
3.83 GB Download
Mistral-7B-Instruct-v0.2.Q4_1.gguf
LFS Q4
4.24 GB Download
Mistral-7B-Instruct-v0.2.Q4_K.gguf
LFS Q4
4.07 GB Download
Mistral-7B-Instruct-v0.2.Q4_K_M.gguf
LFS Q4
4.07 GB Download
Mistral-7B-Instruct-v0.2.Q4_K_S.gguf
LFS Q4
3.86 GB Download
Mistral-7B-Instruct-v0.2.Q5_0.gguf
LFS Q5
4.65 GB Download
Mistral-7B-Instruct-v0.2.Q5_1.gguf
LFS Q5
5.07 GB Download
Mistral-7B-Instruct-v0.2.Q5_K.gguf
LFS Q5
4.78 GB Download
Mistral-7B-Instruct-v0.2.Q5_K_M.gguf
LFS Q5
4.78 GB Download
Mistral-7B-Instruct-v0.2.Q5_K_S.gguf
LFS Q5
4.65 GB Download
Mistral-7B-Instruct-v0.2.Q6_K.gguf
LFS Q6
5.53 GB Download
Mistral-7B-Instruct-v0.2.Q8_0.gguf
LFS Q8
7.17 GB Download