from peft import PeftModelfrom transformers import AutoModelForCausalLM, AutoTokenizer tok = AutoTokenizer.from_pretrained("Qwen/Qwen3-1.7B")base = AutoModelForCausalLM.from_pretrained("Qwen/Qwen3-1.7B", torch_dtype="auto", device_map="auto")model = PeftModel.from_pretrained(base, "breakingchad/vaudeville-qwen3-1.7b-sft-grpo") messages = [ # build these with archive.tasks.prompt.build_messages(case, villager_id, question) {"role": "system", "content": "You are Mara, the miller of Vaudeville. ... YOUR DOCUMENTS:\n[D1.S1] Day 2, night. I was at the mill.\nHEARD:\n(none)"}, {"role": "user", "content": "Player: Where were you on the night of the murder?"},]ids = tok.apply_chat_template(messages, add_generation_prompt=True, enable_thinking=False, return_tensors="pt").to(model.device)out = model.generate(ids, max_new_tokens=200, do_sample=False)print(tok.decode(out[0, ids.shape[1]:], skip_special_tokens=True))