Views
No views yet
W4A16 (4-bit weights, 16-bit activations)Trueauto-round library to run this model in its native format.pip install auto-round transformers torch1from transformers import AutoModelForCausalLM, AutoTokenizer
2from auto_round import AutoRoundConfig
3
4model_id = "Vishva007/Qwen3-4B-Instruct-2507-W4A16-AutoRound"
5
6# Load the model with AutoRound configuration
7model = AutoModelForCausalLM.from_pretrained(
8 model_id,
9 device_map="auto"
10)
11tokenizer = AutoTokenizer.from_pretrained(model_id)
12
13prompt = "Explain quantum computing in one sentence."
14messages = [{"role": "user", "content": prompt}]
15
16text = tokenizer.apply_chat_template(
17 messages,
18 tokenize=False,
19 add_generation_prompt=True
20)
21inputs = tokenizer(text, return_tensors="pt").to(model.device)
22
23outputs = model.generate(**inputs, max_new_tokens=128)
24print(tokenizer.decode(outputs, skip_special_tokens=True))🎁 Need GPU compute? Sign up via RunPod and get $5–$500 in free credits when you add your first $10.
| Template | CUDA Version | Docker Image | Template ID | Deploy |
|---|---|---|---|---|
| PyTorch 2.13 (CUDA 12.6) | 12.6 | vishva123/cuda-12.6-pytorch-2.13-runpod | gmlupxnxfk | |
| PyTorch 2.13 (CUDA 13.0) | 13.0 | vishva123/cuda-13.0-pytorch-2.13-runpod | y3j8xvk4f4 | |
| PyTorch 2.13 (CUDA 13.2) | 13.2 | vishva123/cuda-13.2-pytorch-2.13-runpod | vigpissn5w |
| Template | CUDA Version | Docker Image | Template ID | Deploy |
|---|---|---|---|---|
| PyTorch 2.12 (CUDA 12.6) | 12.6 | vishva123/cuda-12.6-pytorch-2.12-runpod | ctmz86zmf0 | |
| PyTorch 2.12 (CUDA 13.0) | 13.0 | vishva123/cuda-13.0-pytorch-2.12-runpod | qjko5yiwzi | |
| PyTorch 2.12 (CUDA 13.2) | 13.2 | vishva123/cuda-13.2-pytorch-2.12-runpod | ifg6xmye0f |
1@article{cheng2023optimize,
2 title={Optimize Weight Rounding via Signed Gradient Descent for the Quantization of LLMs},
3 author={Cheng, Wenhua and Zhang, Weiwei and Shen, Haihao and Cai, Yiyang and He, Xin and Lv, Kaokao},
4 journal={arXiv preprint arXiv:2309.05516},
5 year={2023}
6}