Views
No views yet
1from transformers import AutoModelForCausalLM, AutoTokenizer
2
3model_name = "nota-ai/Qwen3-30B-A3B-NotaMoEQuant-Int4"
4
5# load the tokenizer and the model
6tokenizer = AutoTokenizer.from_pretrained(model_name)
7model = AutoModelForCausalLM.from_pretrained(
8 model_name,
9 torch_dtype="auto",
10 device_map="auto"
11)
12
13# prepare the model input
14prompt = "What is large language model?"
15messages = [
16 {"role": "user", "content": prompt}
17]
18text = tokenizer.apply_chat_template(
19 messages,
20 tokenize=False,
21 add_generation_prompt=True,
22 enable_thinking=True
23)
24model_inputs = tokenizer([text], return_tensors="pt").to(model.device)
25
26# conduct text completion
27generated_ids = model.generate(
28 **model_inputs,
29 max_new_tokens=100
30)
31
32print(tokenizer.decode(generated_ids[0], skip_special_tokens=True))| PPL (WikiText2) | MMLU-Pro | AIME25 | LiveCodeBench v6 | Total TPS (Tokens/Sec.) | Memory (GB) | |
|---|---|---|---|---|---|---|
| Qwen3-30B-A3B (BF16) | 10.8955 | 75.47 | 70.00 | 55.70 | 1136.56 | 58.23 |
| Nota MoEQuant (INT4) | 11.3046 | 74.84 | 70.00 | 60.18 | 1262.21 | 16.01 |