[Frontend] structured decisions: noul and score question types (#60696)
Signed-off-by: Matt Mastracci <matthew@mastracci.com> Co-authored-by: DeepSeek <noreply@deepseek.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: Misha Goin <mgoin64@gmail.com>
This commit is contained in:
co-authored by
DeepSeek
Claude Opus 5.5
Misha Goin
parent
88a419649e
commit
8cbd5d0300
@@ -87,6 +87,9 @@ def test_labels_start_the_reply(qwen):
|
||||
tail, ids = reply_label_ids(tokenizer, prompt_ids)
|
||||
assert tokenizer.decode(tail) == "\n\n"
|
||||
assert [tokenizer.decode([i]) for i in ids] == list(LABELS)
|
||||
# A noul's and a score's labels are one token here too.
|
||||
_, ids = reply_label_ids(tokenizer, prompt_ids, ("yes", "no", *"0123456789"))
|
||||
assert len(set(ids)) == 12
|
||||
# After a colon, Qwen writes ":A" as one token, so "A" is not one token.
|
||||
with pytest.raises(ValueError, match="not one distinct token"):
|
||||
reply_label_ids(tokenizer, tokenizer.encode("team:"))
|
||||
|
||||
Reference in New Issue
Block a user