Upload tokenizer
Browse files- chat_template.jinja +26 -1
- tokenizer_config.json +6 -6
chat_template.jinja
CHANGED
@@ -10,7 +10,7 @@ You are a helpful assistant.<|im_end|>
|
|
10 |
{% if message['content'] is string %}
|
11 |
<|im_start|>{{ role }}
|
12 |
{{ message['content'] }}<|im_end|>
|
13 |
-
{%
|
14 |
{% if content['type'] == 'image' %}
|
15 |
<|im_start|>{{ role }} (mime)
|
16 |
{"type": "image/jpeg", "filename": "{{ content['filename'] }}"}<|im_end|>
|
@@ -22,8 +22,32 @@ You are a helpful assistant.<|im_end|>
|
|
22 |
<|im_start|>{{ role }} (mime)
|
23 |
{"type": "video/mp4", "filename": "{{ content['filename'] }}"}<|im_end|>
|
24 |
<|im_start|>{{ role }} (vector)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
25 |
<|dummy3|><|im_end|>
|
26 |
<|im_start|>image/aux
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
27 |
{% if content.get('is_final_grid') %}
|
28 |
다음 중 lens_keyword는 사진에서 추출된 keyword와 bbox 위치입니다. bbox는 0~1 사이로 정규화된 [x1, y1, x2, y2]의 형태입니다. video_time_stamp는 비디오에서 해당 구간의 시간 정보입니다. speech_to_text는 비디오 속에서의 대화, 음성, 소리, 대사, 그리고 말을 전부 글로 받아 적은 것 입니다. 참고하여 답변하세요. {"video_time_stamp": "{{ content['video_time_stamp'] }}", "lens_keywords": "{{ content.get('lens_keywords', '') }}", "lens_local_keywords": "{{ content.get('lens_local_keywords', '') }}", "speech_to_text": "{{ content.get('speech_to_text', '') }}"}
|
29 |
{% else %}
|
@@ -33,6 +57,7 @@ You are a helpful assistant.<|im_end|>
|
|
33 |
<|im_start|>{{ role }}
|
34 |
{{ content['text'] }}<|im_end|>
|
35 |
{% endif %}
|
|
|
36 |
{% endif %}
|
37 |
{% endfor %}
|
38 |
{% if add_generation_prompt %}
|
|
|
10 |
{% if message['content'] is string %}
|
11 |
<|im_start|>{{ role }}
|
12 |
{{ message['content'] }}<|im_end|>
|
13 |
+
{% elif message['content'] is mapping %}
|
14 |
{% if content['type'] == 'image' %}
|
15 |
<|im_start|>{{ role }} (mime)
|
16 |
{"type": "image/jpeg", "filename": "{{ content['filename'] }}"}<|im_end|>
|
|
|
22 |
<|im_start|>{{ role }} (mime)
|
23 |
{"type": "video/mp4", "filename": "{{ content['filename'] }}"}<|im_end|>
|
24 |
<|im_start|>{{ role }} (vector)
|
25 |
+
<|_unuse_missing_100270|><|im_end|>
|
26 |
+
<|im_start|>image/aux
|
27 |
+
{% if content.get('is_final_grid') %}
|
28 |
+
다음 중 lens_keyword는 사진에서 추출된 keyword와 bbox 위치입니다. bbox는 0~1 사이로 정규화된 [x1, y1, x2, y2]의 형태입니다. video_time_stamp는 비디오에서 해당 구간의 시간 정보입니다. speech_to_text는 비디오 속에서의 대화, 음성, 소리, 대사, 그리고 말을 전부 글로 받아 적은 것 입니다. 참고하여 답변하세요. {"video_time_stamp": "{{ content['video_time_stamp'] }}", "lens_keywords": "{{ content.get('lens_keywords', '') }}", "lens_local_keywords": "{{ content.get('lens_local_keywords', '') }}", "speech_to_text": "{{ content.get('speech_to_text', '') }}"}
|
29 |
+
{% else %}
|
30 |
+
다음 중 video_time_stamp는 비디오에서 해당 구간의 시간 정보입니다. 참고하여 답변하세요. {"video_time_stamp": "{{ content['video_time_stamp'] }}"}
|
31 |
+
{% endif %}<|im_end|>
|
32 |
+
{% elif content['type'] == 'text' %}
|
33 |
+
<|im_start|>{{ role }}
|
34 |
+
{{ content['text'] }}<|im_end|>
|
35 |
+
{% endif %}
|
36 |
+
{% elif message['content'] is sequence %}
|
37 |
+
{% for content in message['content'] %}
|
38 |
+
{% if content['type'] == 'image' %}
|
39 |
+
<|im_start|>{{ role }} (mime)
|
40 |
+
{"type": "image/jpeg", "filename": "{{ content['filename'] }}"}<|im_end|>
|
41 |
+
<|im_start|>{{ role }} (vector)
|
42 |
<|dummy3|><|im_end|>
|
43 |
<|im_start|>image/aux
|
44 |
+
다음 중 ocr은 사진에서 검출된 글자이고, lens_keyword는 사진에서 추출된 keyword와 bbox 위치입니다. bbox는 0~1 사이로 정규화된 [x1, y1, x2, y2]의 형태입니다. 참고하여 답변하세요. {"ocr": "{{ content['ocr'] or '' }}", "lens_keywords": "{{ content['lens_keywords'] or '' }}", "lens_local_keywords": "{{ content['lens_local_keywords'] or '' }}"}<|im_end|>
|
45 |
+
{% elif content['type'] == 'video' %}
|
46 |
+
<|im_start|>{{ role }} (mime)
|
47 |
+
{"type": "video/mp4", "filename": "{{ content['filename'] }}"}<|im_end|>
|
48 |
+
<|im_start|>{{ role }} (vector)
|
49 |
+
<|_unuse_missing_100270|><|im_end|>
|
50 |
+
<|im_start|>image/aux
|
51 |
{% if content.get('is_final_grid') %}
|
52 |
다음 중 lens_keyword는 사진에서 추출된 keyword와 bbox 위치입니다. bbox는 0~1 사이로 정규화된 [x1, y1, x2, y2]의 형태입니다. video_time_stamp는 비디오에서 해당 구간의 시간 정보입니다. speech_to_text는 비디오 속에서의 대화, 음성, 소리, 대사, 그리고 말을 전부 글로 받아 적은 것 입니다. 참고하여 답변하세요. {"video_time_stamp": "{{ content['video_time_stamp'] }}", "lens_keywords": "{{ content.get('lens_keywords', '') }}", "lens_local_keywords": "{{ content.get('lens_local_keywords', '') }}", "speech_to_text": "{{ content.get('speech_to_text', '') }}"}
|
53 |
{% else %}
|
|
|
57 |
<|im_start|>{{ role }}
|
58 |
{{ content['text'] }}<|im_end|>
|
59 |
{% endif %}
|
60 |
+
{% endfor %}
|
61 |
{% endif %}
|
62 |
{% endfor %}
|
63 |
{% if add_generation_prompt %}
|
tokenizer_config.json
CHANGED
@@ -1,4 +1,5 @@
|
|
1 |
{
|
|
|
2 |
"add_prefix_space": false,
|
3 |
"added_tokens_decoder": {
|
4 |
"100256": {
|
@@ -490,18 +491,17 @@
|
|
490 |
"<KEY>",
|
491 |
"<PASSWORD>"
|
492 |
],
|
|
|
|
|
|
|
493 |
"bos_token": "<|endoftext|>",
|
494 |
-
"chat_template": [
|
495 |
-
{
|
496 |
-
"name": "default",
|
497 |
-
"template": "<|im_start|>tool_list\n<|im_end|>\n{% for message in messages %}\n{% set content = message['content'] %}\n{% set role = message['role'] %}\n{% if loop.first and role != 'system' %}\n<|im_start|>system\nYou are a helpful assistant.<|im_end|>\n{% endif %}\n{% if message['content'] is string %}\n<|im_start|>{{ role }}\n{{ message['content'] }}<|im_end|>\n{% else %}\n{% if content['type'] == 'image' %}\n<|im_start|>{{ role }} (mime)\n{\"type\": \"image/jpeg\", \"filename\": \"{{ content['filename'] }}\"}<|im_end|>\n<|im_start|>{{ role }} (vector)\n<|dummy3|><|im_end|>\n<|im_start|>image/aux\n다음 중 ocr은 사진에서 검출된 글자이고, lens_keyword는 사진에서 추출된 keyword와 bbox 위치입니다. bbox는 0~1 사이로 정규화된 [x1, y1, x2, y2]의 형태입니다. 참고하여 답변하세요. {\"ocr\": \"{{ content['ocr'] or '' }}\", \"lens_keywords\": \"{{ content['lens_keywords'] or '' }}\", \"lens_local_keywords\": \"{{ content['lens_local_keywords'] or '' }}\"}<|im_end|>\n{% elif content['type'] == 'video' %}\n<|im_start|>{{ role }} (mime)\n{\"type\": \"video/mp4\", \"filename\": \"{{ content['filename'] }}\"}<|im_end|>\n<|im_start|>{{ role }} (vector)\n<|dummy3|><|im_end|>\n<|im_start|>image/aux\n{% if content.get('is_final_grid') %}\n다음 중 lens_keyword는 사진에서 추출된 keyword와 bbox 위치입니다. bbox는 0~1 사이로 정규화된 [x1, y1, x2, y2]의 형태입니다. video_time_stamp는 비디오에서 해당 구간의 시간 정보입니다. speech_to_text는 비디오 속에서의 대화, 음성, 소리, 대사, 그리고 말을 전부 글로 받아 적은 것 입니다. 참고하여 답변하세요. {\"video_time_stamp\": \"{{ content['video_time_stamp'] }}\", \"lens_keywords\": \"{{ content.get('lens_keywords', '') }}\", \"lens_local_keywords\": \"{{ content.get('lens_local_keywords', '') }}\", \"speech_to_text\": \"{{ content.get('speech_to_text', '') }}\"}\n{% else %}\n다음 중 video_time_stamp는 비디오에서 해당 구간의 시간 정보입니다. 참고하여 답변하세요. {\"video_time_stamp\": \"{{ content['video_time_stamp'] }}\"}\n{% endif %}<|im_end|>\n{% elif content['type'] == 'text' %}\n<|im_start|>{{ role }}\n{{ content['text'] }}<|im_end|>\n{% endif %}\n{% endif %}\n{% endfor %}\n{% if add_generation_prompt %}\n<|im_start|>assistant\n{% endif %}\n"
|
498 |
-
}
|
499 |
-
],
|
500 |
"clean_up_tokenization_spaces": true,
|
501 |
"eos_token": "<|endofturn|>",
|
|
|
502 |
"extra_special_tokens": {},
|
503 |
"model_max_length": 1000000000000000019884624838656,
|
504 |
"pad_token": "<|endoftext|>",
|
|
|
505 |
"tokenizer_class": "GPT2Tokenizer",
|
506 |
"unk_token": "<|endoftext|>"
|
507 |
}
|
|
|
1 |
{
|
2 |
+
"add_bos_token": false,
|
3 |
"add_prefix_space": false,
|
4 |
"added_tokens_decoder": {
|
5 |
"100256": {
|
|
|
491 |
"<KEY>",
|
492 |
"<PASSWORD>"
|
493 |
],
|
494 |
+
"auto_map": {
|
495 |
+
"AutoProcessor": "naver-hyperclovax/HyperCLOVAX-SEED-Vision-Instruct-3B--processing_hyperclovax.HCXProcessor"
|
496 |
+
},
|
497 |
"bos_token": "<|endoftext|>",
|
|
|
|
|
|
|
|
|
|
|
|
|
498 |
"clean_up_tokenization_spaces": true,
|
499 |
"eos_token": "<|endofturn|>",
|
500 |
+
"errors": "replace",
|
501 |
"extra_special_tokens": {},
|
502 |
"model_max_length": 1000000000000000019884624838656,
|
503 |
"pad_token": "<|endoftext|>",
|
504 |
+
"processor_class": "HCXProcessor",
|
505 |
"tokenizer_class": "GPT2Tokenizer",
|
506 |
"unk_token": "<|endoftext|>"
|
507 |
}
|