Views
No views yet
minchaoh2002/Qwen3-8B-PragReST is a Qwen3-8B model trained with PragReST: Pragmatic Reasoning via Self-Training.minchaoh2002/Qwen3-8B-PragReSTQwen/Qwen3-8Btransformers version. Qwen3 models require recent Transformers support.pip install -U transformers accelerate torch1from transformers import AutoModelForCausalLM, AutoTokenizer
2
3model_name = "minchaoh2002/Qwen3-8B-PragReST"
4
5tokenizer = AutoTokenizer.from_pretrained(model_name)
6model = AutoModelForCausalLM.from_pretrained(
7 model_name,
8 torch_dtype="auto",
9 device_map="auto",
10)
11
12prompt = """Ken asks Mary, "Do you want tea with milk or sugar?"
13Mary replies, "In a cup."
14
15What is Mary likely implying? Explain the pragmatic reasoning."""
16
17messages = [
18 {"role": "user", "content": prompt}
19]
20
21text = tokenizer.apply_chat_template(
22 messages,
23 tokenize=False,
24 add_generation_prompt=True,
25 enable_thinking=True,
26)
27
28inputs = tokenizer([text], return_tensors="pt").to(model.device)
29
30outputs = model.generate(
31 **inputs,
32 max_new_tokens=2048,
33 temperature=0.6,
34 top_p=0.95,
35 top_k=20,
36 do_sample=True,
37)
38
39generated = outputs[0][len(inputs.input_ids[0]):]
40print(tokenizer.decode(generated, skip_special_tokens=True))| Model | PragMega | Ludwig | MetoQA | AltPrag |
|---|---|---|---|---|
| Qwen3-8B Instruct | 73.37 | 80.33 | 73.52 | 7.24 |
| PragReST-SFT | 77.51 | 82.17 | 78.56 | 7.46 |
| PragReST-GRPO | 79.29 | 83.33 | 80.72 | 7.62 |
1@article{park2026pragrest,
2 title={PragReST: Self-Reinforcing Counterfactual Reasoning for Pragmatic Language Understanding},
3 author={Park, Jihyung and Huang, Minchao and Liu, Leqi and Stengel-Eskin, Elias},
4 year={2026},
5 journal={arXiv preprint arXiv:2606.18624},
6 url={https://arxiv.org/abs/2606.18624},
7}1@misc{qwen3technicalreport,
2 title={Qwen3 Technical Report},
3 author={Qwen Team},
4 year={2025},
5 eprint={2505.09388},
6 archivePrefix={arXiv},
7 primaryClass={cs.CL},
8 url={https://arxiv.org/abs/2505.09388},
9}Qwen/Qwen3-8B model license.