[Model] Add native IFM K2 Horizon serving support (#37654)
Co-authored-by: Xiaoyu Zhang <1182563586@qq.com> Co-authored-by: Xinyuan Tong <xinyuantong.cs@gmail.com>
This commit is contained in:
co-authored by
Xiaoyu Zhang
Xinyuan Tong
parent
02d9b3060a
commit
3bac084d4e
@@ -581,6 +581,11 @@ class TestAttachAdditionalStopTokenIds(unittest.TestCase):
|
||||
attach_additional_stop_token_ids(tok)
|
||||
self.assertEqual(tok.additional_stop_token_ids, {128008})
|
||||
|
||||
def test_k2_horizon_im_end_registers_as_stop(self):
|
||||
tok = self._tokenizer({"<|ifm|im_end|>": 64019})
|
||||
attach_additional_stop_token_ids(tok)
|
||||
self.assertEqual(tok.additional_stop_token_ids, {64019})
|
||||
|
||||
def test_no_known_marker_yields_none(self):
|
||||
tok = self._tokenizer({"<|other|>": 7})
|
||||
attach_additional_stop_token_ids(tok)
|
||||
|
||||
Reference in New Issue
Block a user