Views
No views yet
1targets: Linear
2scheme: NVFP4
3ignore:
4 - lm_head
5 - model.embed_tokens
6 - re:.*input_layernorm$
7 - re:.*post_attention_layernorm$
8 - model.norm
9 - re:.*mlp.gate$reasoning: on)1from transformers import AutoModelForCausalLM, AutoTokenizer
2import torch
3
4model_id = "your-username/Qwen3-30B-A3B-Thinking-2507-NVFP4"
5
6# Load the quantized model
7model = AutoModelForCausalLM.from_pretrained(
8 model_id,
9 torch_dtype=torch.float16,
10 device_map="auto"
11)
12
13tokenizer = AutoTokenizer.from_pretrained(model_id)
14
15# Use the model
16messages = [
17 {"role": "user", "content": "Solve this step by step: What is 25 * 48?"}
18]
19
20text = tokenizer.apply_chat_template(messages, tokenize=False)
21inputs = tokenizer(text, return_tensors="pt").to(model.device)
22
23outputs = model.generate(
24 **inputs,
25 max_new_tokens=512,
26 temperature=0.7,
27 do_sample=True
28)
29
30response = tokenizer.decode(outputs[0], skip_special_tokens=True)
31print(response)1from vllm import LLM, SamplingParams
2
3model_id = "your-username/Qwen3-30B-A3B-Thinking-2507-NVFP4"
4
5llm = LLM(model=model_id)
6sampling_params = SamplingParams(temperature=0.7, max_tokens=512)
7
8prompts = ["Solve step by step: What is 25 * 48?"]
9outputs = llm.generate(prompts, sampling_params)
10
11for output in outputs:
12 print(output.outputs[0].text)1@misc{qwen3-thinking-2507,
2 title={Qwen3-30B-A3B-Thinking-2507},
3 author={Qwen Team},
4 year={2025},
5 publisher={Hugging Face}
6}
7
8@software{llmcompressor,
9 title={LLM Compressor},
10 author={vLLM Team},
11 url={https://github.com/vllm-project/llm-compressor},
12 year={2024}
13}