Views
No views yet
(Category, Conversation Transcript, Retrieved Document) triplet,
the model emits<think>
[Query-Document Alignment] …
[Response-Document Consistency] …
[Response Completeness] …
</think>
{"label": "correct" | "incorrect", "reason": "…"}(question, answer)
pairs built from LG feedback + general-inquiry data. LoRA r=16 α=32,
Muon @ lr=2e-3, seed=1337, 8 epochs.save_pretrained.max_new_tokens=1200)| Metric | Stage-1 only | This model (full merged) |
|---|---|---|
| Parse-fail rate | 95.98 % | 0.00 % |
| Accuracy | 1.01 % | 68.84 % |
| Macro-F1 | 0.033 | 0.615 |
| chrF | 6.55 | 40.92 |
| ROUGE-L | 0.062 | 0.885 |
| BLEU-4 | 0.37 | 22.41 |
| BERTScore-F1 | 0.826 | 0.901 |
| SBERT-cos (multi-mpnet) | 0.437 | 0.830 |
| Class | Precision | Recall | F1 | Support |
|---|---|---|---|---|
| correct | 0.417 | 0.481 | 0.446 | 52 |
| incorrect | 0.806 | 0.762 | 0.783 | 147 |
1from transformers import AutoTokenizer, AutoModelForCausalLM
2import torch
3
4REPO = "shareit/cycleinstruct-phi4-supervisor"
5
6tok = AutoTokenizer.from_pretrained(REPO)
7model = AutoModelForCausalLM.from_pretrained(
8 REPO, torch_dtype=torch.bfloat16,
9 attn_implementation="sdpa", device_map="auto").eval()
10
11SYSTEM = "당신은 전자제품 CS 챗봇의 품질을 평가하는 수퍼바이저입니다."
12USER = "[Category] W/M\n[Conversation Transcript] …\n[Retrieved Document] …"
13
14# Phi-4-reasoning ChatML with our clean system prompt (skip default Thought scaffold)
15prompt = (
16 f"<|im_start|>system<|im_sep|>{SYSTEM}<|im_end|>"
17 f"<|im_start|>user<|im_sep|>{USER}<|im_end|>"
18 f"<|im_start|>assistant<|im_sep|>"
19)
20out = model.generate(
21 **tok(prompt, return_tensors="pt", add_special_tokens=False).to(model.device),
22 do_sample=False, max_new_tokens=1200,
23 pad_token_id=tok.pad_token_id,
24)
25print(tok.decode(out[0], skip_special_tokens=False))max_new_tokens=1200 matters — the <think> block usually consumes
500-900 tokens before the final JSON verdict.target_modules=all-linear, bias='none'(q, a) pairs from data/processed/train_pairs.jsonl
(multilingual, mostly English, ~50 % English, ~15 % German, then FR/ES/IT/JA/ZH…){"conversations": [{"from":"system", …}, {"from":"user", …}, {"from":"assistant", …}]}
with the assistant response being a <think>…</think>{"label":…,"reason":…} judgement.correct class has substantially lower F1 (0.446) than incorrect
(0.783), reflecting the 39/61 % class imbalance in the training data.
Class-weighted loss or balanced sampling would likely help.<think> reasoning is Korean; input transcripts may be any language.microsoft/Phi-4-reasoning base model).