Downloads · 30 days
25
22% of all-time downloads
aphoticshaman/qwen-72b-math-nf4
qwen-72b-math-nf4 is a text generation model from aphoticshaman. 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.
NF4 quantized Qwen2.5-Math-72B-Instruct for mathematical reasoning.
Downloads · 30 days
25
22% of all-time downloads
All-time downloads
115
Public
Parameters
72.7B
82.4 GB on disk
Likes
1
Public
Click a slice to open those files.
.safetensors41.2 GB · 100%
How the weights are stored.
U872.4B · 97%
From the Hugging Face model README
NF4 quantized Qwen2.5-Math-72B-Instruct for mathematical reasoning.
| Setup | VRAM |
|---|---|
| Single GPU | ~40GB |
| 2x GPU | ~20GB each |
from transformers import AutoModelForCausalLM, AutoTokenizer, BitsAndBytesConfig
import torch
bnb_config = BitsAndBytesConfig(
load_in_4bit=True,
bnb_4bit_quant_type="nf4",
bnb_4bit_compute_dtype=torch.bfloat16,
)
model = AutoModelForCausalLM.from_pretrained(
"aphoticshaman/qwen-72b-math-nf4",
quantization_config=bnb_config,
device_map="auto",
trust_remote_code=True,
)
tokenizer = AutoTokenizer.from_pretrained("aphoticshaman/qwen-72b-math-nf4")
prompt = "Prove that the sum of first n integers is n(n+1)/2."
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
outputs = model.generate(**inputs, max_new_tokens=512, temperature=0.7)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
Ryan J Cardwell X @Benthic_Shadow Zenodo.org aphoticshaman huggingface aphoticshaman