Views
No views yet
<think>...</think>) aligns perfectly with our dataset’s thinking_outline and route_rationale fields.<think> tags added for complex examples/think (or instruct the model to reason) to obtain <think>...</think> blocks before the JSON plan./no_think to skip reasoning and respond quickly with concise JSON.1from peft import PeftModel
2from transformers import AutoTokenizer, AutoModelForCausalLM
3
4base = "Qwen/Qwen3-32B"
5adapter = "CourseGPT-Pro-DSAI-Lab-Group-6/router-qwen3-32b-peft"
6
7tokenizer = AutoTokenizer.from_pretrained(base, trust_remote_code=True)
8model = AutoModelForCausalLM.from_pretrained(
9 base,
10 device_map="auto",
11 torch_dtype="auto",
12 trust_remote_code=True,
13)
14model = PeftModel.from_pretrained(model, adapter)
15
16prompt = """System: Use <think> for deep reasoning, then emit JSON with route_plan, route_rationale, thinking_outline.
17User: /think Plan a workflow that benchmarks four LLM agents, runs ablation code, and writes a literature summary."""
18inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
19output = model.generate(
20 **inputs,
21 max_new_tokens=1500,
22 temperature=0.6,
23 top_p=0.95,
24)
25print(tokenizer.decode(output[0], skip_special_tokens=True))--enable-reasoning and --reasoning-parser deepseek_r1 to honor <think> blocks.<think> content from conversation history before the next user turn to avoid context bloat.@software{CourseGPTRouterQwen3,
title = {Router Qwen3 32B PEFT Adapter},
author = {CourseGPT Pro DSAI Lab Group 6},
year = {2025},
url = {https://huggingface.co/CourseGPT-Pro-DSAI-Lab-Group-6/router-qwen3-32b-peft}
}