How to use from the
Use from the
Transformers library
# Use a pipeline as a high-level helper
from transformers import pipeline

pipe = pipeline("text-generation", model="ISTA-DASLab/Mistral-7B-Instruct-v0.2-AQLM-2Bit-2x8")
messages = [
    {"role": "user", "content": "Who are you?"},
]
pipe(messages)
# Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM

tokenizer = AutoTokenizer.from_pretrained("ISTA-DASLab/Mistral-7B-Instruct-v0.2-AQLM-2Bit-2x8")
model = AutoModelForCausalLM.from_pretrained("ISTA-DASLab/Mistral-7B-Instruct-v0.2-AQLM-2Bit-2x8")
messages = [
    {"role": "user", "content": "Who are you?"},
]
inputs = tokenizer.apply_chat_template(
	messages,
	add_generation_prompt=True,
	tokenize=True,
	return_dict=True,
	return_tensors="pt",
).to(model.device)

outputs = model.generate(**inputs, max_new_tokens=40)
print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:]))
Quick Links

Official AQLM quantization of mistralai/Mistral-7B-Instruct-v0.2 .

For this quantization, we used 2 codebooks of 8 bits.

Results:

Model Quantization MMLU (5-shot) Model size, Gb
mistralai/Mistral-7B-Instruct-v0.2 None 0.5912 14.5
2x8 0.4384 2.3
Downloads last month
126
Safetensors
Model size
2B params
Tensor type
F16
·
I8
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for ISTA-DASLab/Mistral-7B-Instruct-v0.2-AQLM-2Bit-2x8

Adapters
1 model

Collection including ISTA-DASLab/Mistral-7B-Instruct-v0.2-AQLM-2Bit-2x8

Paper for ISTA-DASLab/Mistral-7B-Instruct-v0.2-AQLM-2Bit-2x8