Downloads · 30 days
23
7% of all-time downloads
JongYeop/Qwen2.5-7B-Instruct-MXFP4-W4A4
Qwen2.5-7B-Instruct-MXFP4-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 MXFP4 (Microscaling FP4) quantized version of Qwen/Qwen2.5-7B-Instruct using the compressed-tensors quantization method.
Downloads · 30 days
23
7% of all-time downloads
All-time downloads
323
Public
Parameters
4.6B
5.7 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors5.6 GB · 100%
How the weights are stored.
U83.5B · 76%
From the Hugging Face model README
This is an MXFP4 (Microscaling FP4) quantized version of Qwen/Qwen2.5-7B-Instruct using the compressed-tensors quantization method.
This model uses MXFP4 (Microscaling FP4) quantization with block-scaled quantization (group size 32) for both weights and activations. MXFP4 uses E8M0 (8-bit exponent-only) block scales shared across groups of 32 elements, following the OCP MX specification.
MXFP4 inference requires NVIDIA Blackwell (SM120+) GPUs with CUDA 12.8+ for native CUTLASS MXFP4 GEMM support.
from vllm import LLM, SamplingParams
model_id = "JongYeop/Qwen2.5-7B-Instruct-MXFP4-W4A4"
llm = LLM(model=model_id, max_model_len=4096, enforce_eager=True)
outputs = llm.generate(
["The capital of France is"],
SamplingParams(max_tokens=64, temperature=0)
)
for output in outputs:
print(output.outputs[0].text)
from transformers import AutoModelForCausalLM, AutoTokenizer
model_id = "JongYeop/Qwen2.5-7B-Instruct-MXFP4-W4A4"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(
model_id,
device_map="auto",
torch_dtype="auto"
)
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)
| Feature | MXFP4 | NVFP4 |
|---|---|---|
| Scale Format | E8M0 (uint8 exponent) | E4M3 + FP32 global scale |
| Group Size | 32 | 16 |
| Standard | OCP MX Specification | NVIDIA proprietary |
| Hardware | SM120+ (Blackwell) | SM89+ (Ada/Hopper/Blackwell) |
This quantized model is intended for efficient inference with significantly reduced memory footprint. It is suitable for:
Same as the base model: Apache 2.0