Views
No views yet
tasks/priority_order/scores/refusal_reason)1import torch
2from transformers import AutoModelForCausalLM, AutoTokenizer, BitsAndBytesConfig
3from peft import PeftModel
4
5bnb = BitsAndBytesConfig(load_in_4bit=True, bnb_4bit_quant_type="nf4",
6 bnb_4bit_compute_dtype=torch.bfloat16)
7tok = AutoTokenizer.from_pretrained("pieroot/timesorter-qwen3.5-4b-sft-v4")
8base = AutoModelForCausalLM.from_pretrained("Qwen/Qwen3.5-4B", quantization_config=bnb,
9 device_map="auto", dtype=torch.bfloat16)
10model = PeftModel.from_pretrained(base, "pieroot/timesorter-qwen3.5-4b-sft-v4").eval()Qwen3.5는 추론 시enable_thinking=False(chat template) 권장 — 깨끗한 JSON 출력.