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=17, 7 epochs.save_pretrained.max_new_tokens=1200)| Metric | Stage-1 only | This model (full merged) |
|---|---|---|
| Parse-fail rate | 97.49 % | 0.50 % |
| Accuracy | 1.01 % | 70.35 % |
| Macro-F1 | 0.025 | 0.652 |
| chrF | 6.01 | 41.29 |
| ROUGE-L | 0.044 | 0.881 |
| BLEU-4 | 0.35 | 22.94 |
| BERTScore-F1 | 0.813 | 0.902 |
| SBERT-cos (multi-mpnet) | 0.427 | 0.829 |
| Class | Precision | Recall | F1 | Support |
|---|---|---|---|---|
| correct | 0.456 | 0.596 | 0.517 | 52 |
| incorrect | 0.838 | 0.741 | 0.787 | 147 |
1from transformers import AutoTokenizer, AutoModelForCausalLM
2import torch
3
4REPO = "shareit/cycleinstruct-gemma4-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# Gemma-4's default chat template appends <|channel>thought<channel|> on
15# add_generation_prompt=True — bypass that with a manual <|turn>model\n so
16# training and inference prompts match byte-for-byte.
17msgs = [{"role":"system", "content": SYSTEM},
18 {"role":"user", "content": USER}]
19prompt = tok.apply_chat_template(msgs, tokenize=False,
20 add_generation_prompt=False)
21prompt = prompt + "<|turn>model\n"
22
23out = model.generate(
24 **tok(prompt, return_tensors="pt", add_special_tokens=False).to(model.device),
25 do_sample=False, max_new_tokens=1200,
26 pad_token_id=tok.pad_token_id,
27)
28print(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.517) than incorrect
(0.787), 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.google/gemma-4-12B-it and is distributed
under the Gemma Terms of Use
(https://ai.google.dev/gemma/docs/gemma_4_license). By using this model
you agree to the Gemma Prohibited Use Policy. Powered by Gemma.