mirror of
https://github.com/zenlm/engine.git
synced 2026-10-30 15:00:05 +00:00
* first commit * continue construction * continue working * finish models * keep working * keep working * keep working * meet serious problem * debugging * debugging * debugging * restore inrelate codes * restore change * finish llama-llavanext * modify num_image_tokens and num_image_patches * modify code structure * update llava1.5 * add some examples and docs * Update main.rs. remove a redundant comment * update some deps * fmt * modify llavallm. not support anymoe yet * add moe support * rust fmt * update image tag * typo * add anymoe for llava * delete redundant image * Update docs and fromstr for llava and llavanext * Add fromstr impl * Fix examples * fix device proble related to isq * typo(which not generated by me?) * Update LLaVA documentation and chat template options --------- Co-authored-by: EricLBuehler <[email protected]>
36 lines
1.7 KiB
JSON
36 lines
1.7 KiB
JSON
{
|
|
"add_bos_token": true,
|
|
"add_eos_token": false,
|
|
"bos_token": {
|
|
"__type": "AddedToken",
|
|
"content": "<s>",
|
|
"lstrip": false,
|
|
"normalized": false,
|
|
"rstrip": false,
|
|
"single_word": false
|
|
},
|
|
"chat_template": "{% if messages[0]['role'] == 'system' %}{% set loop_messages = messages[1:] %}{% set system_message = messages[0]['content'] %}{% else %}{% set loop_messages = messages %}{% set system_message = 'A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user\\'s questions.' %}{% endif %}{% for message in loop_messages %}{% if (message['role'] == 'user') != (loop.index0 % 2 == 0) %}{{ raise_exception('Conversation roles must alternate user/assistant/user/assistant/...') }}{% endif %}{% if loop.index0 == 0 %}{{ system_message }}{% endif %}{% if message['role'] == 'user' %}{{ ' USER: ' + message['content'].strip() }}{% elif message['role'] == 'assistant' %}{{ ' ASSISTANT: ' + message['content'].strip() + eos_token }}{% endif %}{% endfor %}{% if add_generation_prompt %}{{ ' ASSISTANT:' }}{% endif %}",
|
|
"clean_up_tokenization_spaces": false,
|
|
"eos_token": {
|
|
"__type": "AddedToken",
|
|
"content": "</s>",
|
|
"lstrip": false,
|
|
"normalized": false,
|
|
"rstrip": false,
|
|
"single_word": false
|
|
},
|
|
"legacy": false,
|
|
"model_max_length": 4096,
|
|
"pad_token": null,
|
|
"padding_side": "right",
|
|
"sp_model_kwargs": {},
|
|
"tokenizer_class": "LlamaTokenizer",
|
|
"unk_token": {
|
|
"__type": "AddedToken",
|
|
"content": "<unk>",
|
|
"lstrip": false,
|
|
"normalized": false,
|
|
"rstrip": false,
|
|
"single_word": false
|
|
}
|
|
} |