| 85 | '854b703e44ca06bdb196cc471c728d15dbab61e744fe6cdce980086b61646ed1': | 85 | '854b703e44ca06bdb196cc471c728d15dbab61e744fe6cdce980086b61646ed1': |
| 86 | 'GLM-4' | 86 | 'GLM-4' |
| 87 | , | 87 | , |
| 88 | }; | | |
| 89 | | 88 | |
| 90 | const substr_derivations = { | 89 | // Kimi K2, ... |
| 91 | '<|im_start|>': 'ChatML', // qwen2.5, ... | 90 | 'aab20feb9bc6881f941ea649356130ffbc4943b3c2577c0991e1fba90de5a0fc': |
| | 91 | 'Moonshot AI' |
| | 92 | , |
| 92 | }; | 93 | }; |
| 93 | | 94 | |
| | 95 | const substr_derivations = [ |
| | 96 | ['Moonshot AI', ['<|im_user|>user<|im_middle|>', '<|im_assistant|>assistant<|im_middle|>', '<|im_end|>']], |
| | 97 | |
| | 98 | // Generic cases |
| | 99 | ['ChatML', ['<|im_start|>user', '<|im_start|>assistant', '<|im_end|>']], |
| | 100 | ]; |
| | 101 | |
| 94 | const parse_derivation = derivation => (typeof derivation === 'string') ? { | 102 | const parse_derivation = derivation => (typeof derivation === 'string') ? { |
| 95 | 'context': derivation, | 103 | 'context': derivation, |
| 96 | 'instruct': derivation, | 104 | 'instruct': derivation, |