Downloads · 30 days
8
6% of all-time downloads
Parveshiiii/mistral-small-int8
mistral-small-int8 is a text generation model from Parveshiiii. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as mit.
This is a quantized variant of the Mistral 7B (small) model using LLM.int8() quantization via bitsandbytes. It reduces memory footprint while maintaining high-generation quality—ideal for single-GPU inference, researc…
Downloads · 30 days
8
6% of all-time downloads
All-time downloads
145
Public
Parameters
7.2B
7.5 GB on disk
Likes
1
Public
Click a slice to open those files.
.safetensors7.5 GB · 100%
How the weights are stored.
I87B · 96%
From the Hugging Face model README
This is a quantized variant of the Mistral 7B (small) model using LLM.int8() quantization via bitsandbytes. It reduces memory footprint while maintaining high-generation quality—ideal for single-GPU inference, research benchmarks, and lightweight downstream applications.
from transformers import AutoTokenizer, AutoModelForCausalLM, BitsAndBytesConfig
model_id = "ParveshRawal/mistral-small-int8"
tokenizer = AutoTokenizer.from_pretrained(model_id)
quant_config = BitsAndBytesConfig(
load_in_8bit=True,
llm_int8_threshold=6.0,
llm_int8_enable_fp32_cpu_offload=True
)
model = AutoModelForCausalLM.from_pretrained(
model_id,
device_map="auto",
quantization_config=quant_config
)
inputs = tokenizer("Tell me something about IndiaAI.", return_tensors="pt").to(model.device)
outputs = model.generate(**inputs, max_new_tokens=100)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))