Downloads · 30 days
24
25% of all-time downloads
zahraase1im/mistral-7b-awq-4bit-rag
mistral-7b-awq-4bit-rag is a machine learning model from zahraase1im. Use it for the machine learning task on the model card, and read the license before you ship it in a product. The card lists the license as apache-2.0.
Research-grade quantization of Mistral 7B using AWQ with RAG-specific calibration dataset.
Downloads · 30 days
24
25% of all-time downloads
All-time downloads
96
Public
Parameters
7.2B
4.2 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors4.2 GB · 100%
How the weights are stored.
I327B · 96%
From the Hugging Face model README
Research-grade quantization of Mistral 7B using AWQ with RAG-specific calibration dataset.
The model was quantized using a custom RAG-specific calibration dataset with the following distribution:
Data sources: SQuAD v2, HotpotQA, Wikipedia
from awq import AutoAWQForCausalLM
from transformers import AutoTokenizer
model = AutoAWQForCausalLM.from_quantized("zahraase1im/mistral-7b-awq-4bit-rag", fuse_layers=True)
tokenizer = AutoTokenizer.from_pretrained("zahraase1im/mistral-7b-awq-4bit-rag")
# RAG-formatted prompt
prompt = """[QUERY]: What is the capital of France?
[RETRIEVED DOCUMENTS]:
Document 1: France is a country in Western Europe. Its capital is Paris...
[ANSWER]:"""
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
outputs = model.generate(**inputs, max_new_tokens=50)
print(tokenizer.decode(outputs[0]))
This model is part of a comprehensive study on quantization methods for RAG systems. The calibration dataset is specifically designed to represent realistic RAG workloads with varying context lengths and complexity.
For more details, see the thesis: "Optimizing Large Language Model Quantization for Retrieval-Augmented Generation"
If you use this model in your research, please cite:
@misc{mistral7b-awq-rag,
author = {zahraase1im},
title = {Mistral 7B AWQ 4-bit RAG-Optimized},
year = {2025},
publisher = {HuggingFace},
howpublished = {\url{https://huggingface.co/zahraase1im/mistral-7b-awq-4bit-rag}}
}