Downloads · 30 days
13
4% of all-time downloads
JongYeop/Mistral-7B-Instruct-v0.2-FP4-W4A4
Mistral-7B-Instruct-v0.2-FP4-W4A4 is a text generation model from JongYeop. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as apache-2.0.
This is an NVFP4 (NVIDIA FP4) quantized version of mistralai/Mistral-7B-Instruct-v0.2 using the compressed-tensors quantization method.
Downloads · 30 days
13
4% of all-time downloads
All-time downloads
345
Public
Parameters
4.2B
4.5 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors4.5 GB · 100%
How the weights are stored.
U83.5B · 83%
From the Hugging Face model README
This is an NVFP4 (NVIDIA FP4) quantized version of mistralai/Mistral-7B-Instruct-v0.2 using the compressed-tensors quantization method.
This model uses NVFP4 (NVIDIA FP4) quantization with grouped quantization for both weights and activations:
from transformers import AutoModelForCausalLM, AutoTokenizer
model_id = "JongYeop/Mistral-7B-Instruct-v0.2-FP4-W4A4"
# Load tokenizer
tokenizer = AutoTokenizer.from_pretrained(model_id)
# Load quantized model
model = AutoModelForCausalLM.from_pretrained(
model_id,
device_map="auto",
torch_dtype="auto"
)
# Generate text
messages = [
{"role": "user", "content": "What is machine learning?"}
]
input_ids = tokenizer.apply_chat_template(
messages,
add_generation_prompt=True,
return_tensors="pt"
).to(model.device)
outputs = model.generate(
input_ids,
max_new_tokens=256,
do_sample=True,
temperature=0.7,
top_p=0.9,
)
response = tokenizer.decode(outputs[0][input_ids.shape[-1]:], skip_special_tokens=True)
print(response)
This quantized model is intended for efficient inference with significantly reduced memory footprint while maintaining reasonable performance. It is suitable for:
If you use this model, please cite the original Mistral paper and the compressed-tensors library.
Same as the base model: Apache 2.0