Views
No views yet
<reasoning>One sentence explaining whether the target is an ACTIVE PARTICIPANT or BYSTANDER, and why they should or should not respond.</reasoning>
<decision>SPEAK</decision>
<confidence>high</confidence>1from transformers import AutoModelForCausalLM, AutoTokenizer
2from peft import PeftModel
3
4base_model = "Qwen/Qwen2.5-7B-Instruct"
5adapter = "kraken07/qwen2.5-7b-ami-reasoning"
6
7model = AutoModelForCausalLM.from_pretrained(base_model, device_map="auto")
8model = PeftModel.from_pretrained(model, adapter)
9tokenizer = AutoTokenizer.from_pretrained(base_model)
10
11# Format: provide conversational context and current turn
12# The model expects a prompt that includes context turns and asks for
13# reasoning + decision for a target speaker
14prompt = """<conversation context>
15<instruction to predict SPEAK/SILENT with reasoning>
16"""
17
18inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
19outputs = model.generate(**inputs, max_new_tokens=128)
20response = tokenizer.decode(outputs[0][inputs["input_ids"].shape[1]:], skip_special_tokens=True)
21# Parse <reasoning>, <decision>, <confidence> from response1@misc{bhagtani2026speakstaysilentcontextaware,
2 title={Speak or Stay Silent: Context-Aware Turn-Taking in Multi-Party Dialogue},
3 author={Bhagtani, Kratika and Anand, Mrinal and Xu, Yu Chen and Yadav, Amit Kumar Singh},
4 year={2026},
5 archivePrefix={arXiv},
6 url={https://arxiv.org/abs/2603.11409}
7}