Image-Text-to-Text
Transformers
Safetensors
Korean
English
llava_onevision
gui-agent
web-agent
computer-use
browser
korean
conversational
Instructions to use KORMo-VL/KORMo-Web-11B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use KORMo-VL/KORMo-Web-11B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="KORMo-VL/KORMo-Web-11B") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] pipe(text=messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("KORMo-VL/KORMo-Web-11B") model = AutoModelForMultimodalLM.from_pretrained("KORMo-VL/KORMo-Web-11B", device_map="auto") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] inputs = processor.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=256) print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use KORMo-VL/KORMo-Web-11B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "KORMo-VL/KORMo-Web-11B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "KORMo-VL/KORMo-Web-11B", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker
docker model run hf.co/KORMo-VL/KORMo-Web-11B
- SGLang
How to use KORMo-VL/KORMo-Web-11B with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "KORMo-VL/KORMo-Web-11B" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "KORMo-VL/KORMo-Web-11B", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "KORMo-VL/KORMo-Web-11B" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "KORMo-VL/KORMo-Web-11B", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }' - Docker Model Runner
How to use KORMo-VL/KORMo-Web-11B with Docker Model Runner:
docker model run hf.co/KORMo-VL/KORMo-Web-11B
Add model weights and configs
Browse files- chat_template.jinja +162 -0
- config.json +222 -0
- generation_config.json +10 -0
- model.safetensors +3 -0
- processor_config.json +206 -0
- tokenizer.json +0 -0
- tokenizer_config.json +21 -0
chat_template.jinja
ADDED
|
@@ -0,0 +1,162 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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B chat_template.jinja 를 그대로 옮기고 KORMo 토큰만 바꿈:
|
| 3 |
+
<|im_start|> → <|BOT|> · <|im_end|> → <|EOT|> · 이미지/영상 <|vision_start|><|image_pad|><|vision_end|> → <|image|> / <|video|>
|
| 4 |
+
KORMo 에서 가져온 것: 이미지 바로 뒤 글 앞에 줄바꿈 하나 (KORMo-VL 원래 방식 · 1.5m 까지 학습한 JSON 판 render 와 같음)
|
| 5 |
+
그대로인 것(Qwen3.5): tools 를 system 맨 앞에 · XML 인자 tool_call (<function=…><parameter=…>) · 생각 규칙 · <tool_response> · 생성 시작부(기본 생각 켬)
|
| 6 |
+
<tool_call>·<tool_response>·<think> 는 KORMo 단어장에도 한 토큰. <function= · <parameter= 는 두 모델 모두 일반 글. -#}
|
| 7 |
+
{%- set image_count = namespace(value=0) %}
|
| 8 |
+
{%- set video_count = namespace(value=0) %}
|
| 9 |
+
{%- set media_prev = namespace(value=false) %}
|
| 10 |
+
{%- macro render_content(content, do_vision_count, is_system_content=false) %}
|
| 11 |
+
{%- set media_prev.value = false %}
|
| 12 |
+
{%- if content is string %}
|
| 13 |
+
{{- content }}
|
| 14 |
+
{%- elif content is iterable and content is not mapping %}
|
| 15 |
+
{%- for item in content %}
|
| 16 |
+
{%- if 'image' in item or 'image_url' in item or item.type == 'image' %}
|
| 17 |
+
{%- if is_system_content %}
|
| 18 |
+
{{- raise_exception('System message cannot contain images.') }}
|
| 19 |
+
{%- endif %}
|
| 20 |
+
{%- if do_vision_count %}
|
| 21 |
+
{%- set image_count.value = image_count.value + 1 %}
|
| 22 |
+
{%- endif %}
|
| 23 |
+
{%- if add_vision_id %}
|
| 24 |
+
{{- 'Picture ' ~ image_count.value ~ ': ' }}
|
| 25 |
+
{%- endif %}
|
| 26 |
+
{{- '<|image|>' }}{%- set media_prev.value = true %}
|
| 27 |
+
{%- elif 'video' in item or item.type == 'video' %}
|
| 28 |
+
{%- if is_system_content %}
|
| 29 |
+
{{- raise_exception('System message cannot contain videos.') }}
|
| 30 |
+
{%- endif %}
|
| 31 |
+
{%- if do_vision_count %}
|
| 32 |
+
{%- set video_count.value = video_count.value + 1 %}
|
| 33 |
+
{%- endif %}
|
| 34 |
+
{%- if add_vision_id %}
|
| 35 |
+
{{- 'Video ' ~ video_count.value ~ ': ' }}
|
| 36 |
+
{%- endif %}
|
| 37 |
+
{{- '<|video|>' }}{%- set media_prev.value = true %}
|
| 38 |
+
{%- elif 'text' in item %}
|
| 39 |
+
{{- ('\n' if media_prev.value else '') + item.text }}{%- set media_prev.value = false %}
|
| 40 |
+
{%- else %}
|
| 41 |
+
{{- raise_exception('Unexpected item type in content.') }}
|
| 42 |
+
{%- endif %}
|
| 43 |
+
{%- endfor %}
|
| 44 |
+
{%- elif content is none or content is undefined %}
|
| 45 |
+
{{- '' }}
|
| 46 |
+
{%- else %}
|
| 47 |
+
{{- raise_exception('Unexpected content type.') }}
|
| 48 |
+
{%- endif %}
|
| 49 |
+
{%- endmacro %}
|
| 50 |
+
{%- if not messages %}
|
| 51 |
+
{{- raise_exception('No messages provided.') }}
|
| 52 |
+
{%- endif %}
|
| 53 |
+
{%- if tools and tools is iterable and tools is not mapping %}
|
| 54 |
+
{{- '<|BOT|>system\n' }}
|
| 55 |
+
{{- "# Tools\n\nYou have access to the following functions:\n\n<tools>" }}
|
| 56 |
+
{%- for tool in tools %}
|
| 57 |
+
{{- "\n" }}
|
| 58 |
+
{{- tool | tojson }}
|
| 59 |
+
{%- endfor %}
|
| 60 |
+
{{- "\n</tools>" }}
|
| 61 |
+
{{- '\n\nIf you choose to call a function ONLY reply in the following format with NO suffix:\n\n<tool_call>\n<function=example_function_name>\n<parameter=example_parameter_1>\nvalue_1\n</parameter>\n<parameter=example_parameter_2>\nThis is the value for the second parameter\nthat can span\nmultiple lines\n</parameter>\n</function>\n</tool_call>\n\n<IMPORTANT>\nReminder:\n- Function calls MUST follow the specified format: an inner <function=...></function> block must be nested within <tool_call></tool_call> XML tags\n- Required parameters MUST be specified\n- You may provide optional reasoning for your function call in natural language BEFORE the function call, but NOT after\n- If there is no function call available, answer the question like normal with your current knowledge and do not tell the user about function calls\n</IMPORTANT>' }}
|
| 62 |
+
{%- if messages[0].role == 'system' %}
|
| 63 |
+
{%- set content = render_content(messages[0].content, false, true)|trim %}
|
| 64 |
+
{%- if content %}
|
| 65 |
+
{{- '\n\n' + content }}
|
| 66 |
+
{%- endif %}
|
| 67 |
+
{%- endif %}
|
| 68 |
+
{{- '<|EOT|>\n' }}
|
| 69 |
+
{%- else %}
|
| 70 |
+
{%- if messages[0].role == 'system' %}
|
| 71 |
+
{%- set content = render_content(messages[0].content, false, true)|trim %}
|
| 72 |
+
{{- '<|BOT|>system\n' + content + '<|EOT|>\n' }}
|
| 73 |
+
{%- endif %}
|
| 74 |
+
{%- endif %}
|
| 75 |
+
{%- set ns = namespace(multi_step_tool=true, last_query_index=messages|length - 1) %}
|
| 76 |
+
{%- for message in messages[::-1] %}
|
| 77 |
+
{%- set index = (messages|length - 1) - loop.index0 %}
|
| 78 |
+
{%- if ns.multi_step_tool and message.role == "user" %}
|
| 79 |
+
{%- set content = render_content(message.content, false)|trim %}
|
| 80 |
+
{%- if not(content.startswith('<tool_response>') and content.endswith('</tool_response>')) %}
|
| 81 |
+
{%- set ns.multi_step_tool = false %}
|
| 82 |
+
{%- set ns.last_query_index = index %}
|
| 83 |
+
{%- endif %}
|
| 84 |
+
{%- endif %}
|
| 85 |
+
{%- endfor %}
|
| 86 |
+
{%- if ns.multi_step_tool %}
|
| 87 |
+
{{- raise_exception('No user query found in messages.') }}
|
| 88 |
+
{%- endif %}
|
| 89 |
+
{%- for message in messages %}
|
| 90 |
+
{%- set content = render_content(message.content, true)|trim %}
|
| 91 |
+
{%- if message.role == "system" %}
|
| 92 |
+
{%- if not loop.first %}
|
| 93 |
+
{{- raise_exception('System message must be at the beginning.') }}
|
| 94 |
+
{%- endif %}
|
| 95 |
+
{%- elif message.role == "user" %}
|
| 96 |
+
{{- '<|BOT|>' + message.role + '\n' + content + '<|EOT|>' + '\n' }}
|
| 97 |
+
{%- elif message.role == "assistant" %}
|
| 98 |
+
{%- set reasoning_content = '' %}
|
| 99 |
+
{%- if message.reasoning_content is string %}
|
| 100 |
+
{%- set reasoning_content = message.reasoning_content %}
|
| 101 |
+
{%- else %}
|
| 102 |
+
{%- if '</think>' in content %}
|
| 103 |
+
{%- set reasoning_content = content.split('</think>')[0].rstrip('\n').split('<think>')[-1].lstrip('\n') %}
|
| 104 |
+
{%- set content = content.split('</think>')[-1].lstrip('\n') %}
|
| 105 |
+
{%- endif %}
|
| 106 |
+
{%- endif %}
|
| 107 |
+
{%- set reasoning_content = reasoning_content|trim %}
|
| 108 |
+
{%- if loop.index0 > ns.last_query_index %}
|
| 109 |
+
{{- '<|BOT|>' + message.role + '\n<think>\n' + reasoning_content + '\n</think>\n\n' + content }}
|
| 110 |
+
{%- else %}
|
| 111 |
+
{{- '<|BOT|>' + message.role + '\n' + content }}
|
| 112 |
+
{%- endif %}
|
| 113 |
+
{%- if message.tool_calls and message.tool_calls is iterable and message.tool_calls is not mapping %}
|
| 114 |
+
{%- for tool_call in message.tool_calls %}
|
| 115 |
+
{%- if tool_call.function is defined %}
|
| 116 |
+
{%- set tool_call = tool_call.function %}
|
| 117 |
+
{%- endif %}
|
| 118 |
+
{%- if loop.first %}
|
| 119 |
+
{%- if content|trim %}
|
| 120 |
+
{{- '\n\n<tool_call>\n<function=' + tool_call.name + '>\n' }}
|
| 121 |
+
{%- else %}
|
| 122 |
+
{{- '<tool_call>\n<function=' + tool_call.name + '>\n' }}
|
| 123 |
+
{%- endif %}
|
| 124 |
+
{%- else %}
|
| 125 |
+
{{- '\n<tool_call>\n<function=' + tool_call.name + '>\n' }}
|
| 126 |
+
{%- endif %}
|
| 127 |
+
{%- if tool_call.arguments is defined %}
|
| 128 |
+
{%- for args_name, args_value in tool_call.arguments|items %}
|
| 129 |
+
{{- '<parameter=' + args_name + '>\n' }}
|
| 130 |
+
{%- set args_value = args_value | tojson | safe if args_value is mapping or (args_value is sequence and args_value is not string) else args_value | string %}
|
| 131 |
+
{{- args_value }}
|
| 132 |
+
{{- '\n</parameter>\n' }}
|
| 133 |
+
{%- endfor %}
|
| 134 |
+
{%- endif %}
|
| 135 |
+
{{- '</function>\n</tool_call>' }}
|
| 136 |
+
{%- endfor %}
|
| 137 |
+
{%- endif %}
|
| 138 |
+
{{- '<|EOT|>\n' }}
|
| 139 |
+
{%- elif message.role == "tool" %}
|
| 140 |
+
{%- if loop.previtem and loop.previtem.role != "tool" %}
|
| 141 |
+
{{- '<|BOT|>user' }}
|
| 142 |
+
{%- endif %}
|
| 143 |
+
{{- '\n<tool_response>\n' }}
|
| 144 |
+
{{- content }}
|
| 145 |
+
{{- '\n</tool_response>' }}
|
| 146 |
+
{%- if not loop.last and loop.nextitem.role != "tool" %}
|
| 147 |
+
{{- '<|EOT|>\n' }}
|
| 148 |
+
{%- elif loop.last %}
|
| 149 |
+
{{- '<|EOT|>\n' }}
|
| 150 |
+
{%- endif %}
|
| 151 |
+
{%- else %}
|
| 152 |
+
{{- raise_exception('Unexpected message role.') }}
|
| 153 |
+
{%- endif %}
|
| 154 |
+
{%- endfor %}
|
| 155 |
+
{%- if add_generation_prompt %}
|
| 156 |
+
{{- '<|BOT|>assistant\n' }}
|
| 157 |
+
{%- if enable_thinking is defined and enable_thinking is false %}
|
| 158 |
+
{{- '<think>\n\n</think>\n\n' }}
|
| 159 |
+
{%- else %}
|
| 160 |
+
{{- '<think>\n' }}
|
| 161 |
+
{%- endif %}
|
| 162 |
+
{%- endif %}
|
config.json
ADDED
|
@@ -0,0 +1,222 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"architectures": [
|
| 3 |
+
"LlavaOnevisionForConditionalGeneration"
|
| 4 |
+
],
|
| 5 |
+
"bos_token_id": 125030,
|
| 6 |
+
"dtype": "bfloat16",
|
| 7 |
+
"eos_token_id": 125040,
|
| 8 |
+
"image_grid_pinpoints": [
|
| 9 |
+
[
|
| 10 |
+
384,
|
| 11 |
+
384
|
| 12 |
+
],
|
| 13 |
+
[
|
| 14 |
+
384,
|
| 15 |
+
768
|
| 16 |
+
],
|
| 17 |
+
[
|
| 18 |
+
384,
|
| 19 |
+
1152
|
| 20 |
+
],
|
| 21 |
+
[
|
| 22 |
+
384,
|
| 23 |
+
1536
|
| 24 |
+
],
|
| 25 |
+
[
|
| 26 |
+
384,
|
| 27 |
+
1920
|
| 28 |
+
],
|
| 29 |
+
[
|
| 30 |
+
384,
|
| 31 |
+
2304
|
| 32 |
+
],
|
| 33 |
+
[
|
| 34 |
+
768,
|
| 35 |
+
384
|
| 36 |
+
],
|
| 37 |
+
[
|
| 38 |
+
768,
|
| 39 |
+
768
|
| 40 |
+
],
|
| 41 |
+
[
|
| 42 |
+
768,
|
| 43 |
+
1152
|
| 44 |
+
],
|
| 45 |
+
[
|
| 46 |
+
768,
|
| 47 |
+
1536
|
| 48 |
+
],
|
| 49 |
+
[
|
| 50 |
+
768,
|
| 51 |
+
1920
|
| 52 |
+
],
|
| 53 |
+
[
|
| 54 |
+
768,
|
| 55 |
+
2304
|
| 56 |
+
],
|
| 57 |
+
[
|
| 58 |
+
1152,
|
| 59 |
+
384
|
| 60 |
+
],
|
| 61 |
+
[
|
| 62 |
+
1152,
|
| 63 |
+
768
|
| 64 |
+
],
|
| 65 |
+
[
|
| 66 |
+
1152,
|
| 67 |
+
1152
|
| 68 |
+
],
|
| 69 |
+
[
|
| 70 |
+
1152,
|
| 71 |
+
1536
|
| 72 |
+
],
|
| 73 |
+
[
|
| 74 |
+
1152,
|
| 75 |
+
1920
|
| 76 |
+
],
|
| 77 |
+
[
|
| 78 |
+
1152,
|
| 79 |
+
2304
|
| 80 |
+
],
|
| 81 |
+
[
|
| 82 |
+
1536,
|
| 83 |
+
384
|
| 84 |
+
],
|
| 85 |
+
[
|
| 86 |
+
1536,
|
| 87 |
+
768
|
| 88 |
+
],
|
| 89 |
+
[
|
| 90 |
+
1536,
|
| 91 |
+
1152
|
| 92 |
+
],
|
| 93 |
+
[
|
| 94 |
+
1536,
|
| 95 |
+
1536
|
| 96 |
+
],
|
| 97 |
+
[
|
| 98 |
+
1536,
|
| 99 |
+
1920
|
| 100 |
+
],
|
| 101 |
+
[
|
| 102 |
+
1536,
|
| 103 |
+
2304
|
| 104 |
+
],
|
| 105 |
+
[
|
| 106 |
+
1920,
|
| 107 |
+
384
|
| 108 |
+
],
|
| 109 |
+
[
|
| 110 |
+
1920,
|
| 111 |
+
768
|
| 112 |
+
],
|
| 113 |
+
[
|
| 114 |
+
1920,
|
| 115 |
+
1152
|
| 116 |
+
],
|
| 117 |
+
[
|
| 118 |
+
1920,
|
| 119 |
+
1536
|
| 120 |
+
],
|
| 121 |
+
[
|
| 122 |
+
1920,
|
| 123 |
+
1920
|
| 124 |
+
],
|
| 125 |
+
[
|
| 126 |
+
1920,
|
| 127 |
+
2304
|
| 128 |
+
],
|
| 129 |
+
[
|
| 130 |
+
2304,
|
| 131 |
+
384
|
| 132 |
+
],
|
| 133 |
+
[
|
| 134 |
+
2304,
|
| 135 |
+
768
|
| 136 |
+
],
|
| 137 |
+
[
|
| 138 |
+
2304,
|
| 139 |
+
1152
|
| 140 |
+
],
|
| 141 |
+
[
|
| 142 |
+
2304,
|
| 143 |
+
1536
|
| 144 |
+
],
|
| 145 |
+
[
|
| 146 |
+
2304,
|
| 147 |
+
1920
|
| 148 |
+
],
|
| 149 |
+
[
|
| 150 |
+
2304,
|
| 151 |
+
2304
|
| 152 |
+
]
|
| 153 |
+
],
|
| 154 |
+
"image_token_index": 125041,
|
| 155 |
+
"model_type": "llava_onevision",
|
| 156 |
+
"multimodal_projector_bias": true,
|
| 157 |
+
"pad_token_id": 125032,
|
| 158 |
+
"projector_hidden_act": "gelu",
|
| 159 |
+
"text_config": {
|
| 160 |
+
"_name_or_path": "KORMo-Team/KORMo-10B-sft",
|
| 161 |
+
"architectures": [
|
| 162 |
+
"KORMoForCausalLM"
|
| 163 |
+
],
|
| 164 |
+
"attention_bias": false,
|
| 165 |
+
"attention_dropout": 0.0,
|
| 166 |
+
"auto_map": {
|
| 167 |
+
"AutoConfig": "_configuration_kormo.KORMoConfig",
|
| 168 |
+
"AutoModel": "_modeling_kormo.KORMoModel",
|
| 169 |
+
"AutoModelForCausalLM": "_modeling_kormo.KORMoForCausalLM"
|
| 170 |
+
},
|
| 171 |
+
"bos_token_id": 125030,
|
| 172 |
+
"dtype": "bfloat16",
|
| 173 |
+
"eos_token_id": 125040,
|
| 174 |
+
"head_dim": 128,
|
| 175 |
+
"hidden_act": "silu",
|
| 176 |
+
"hidden_size": 4096,
|
| 177 |
+
"initializer_range": 0.02,
|
| 178 |
+
"intermediate_size": 16384,
|
| 179 |
+
"mask_type": null,
|
| 180 |
+
"max_position_embeddings": 131072,
|
| 181 |
+
"mlp_bias": false,
|
| 182 |
+
"model_type": "kormo",
|
| 183 |
+
"num_attention_heads": 32,
|
| 184 |
+
"num_hidden_layers": 40,
|
| 185 |
+
"num_key_value_heads": 8,
|
| 186 |
+
"pad_token_id": 125032,
|
| 187 |
+
"pretrain_tp": 1,
|
| 188 |
+
"pretraining_tp": 1,
|
| 189 |
+
"rms_norm_eps": 1e-05,
|
| 190 |
+
"rope_parameters": {
|
| 191 |
+
"rope_theta": 8000000.0,
|
| 192 |
+
"rope_type": "default"
|
| 193 |
+
},
|
| 194 |
+
"rope_theta": 8000000.0,
|
| 195 |
+
"tie_word_embeddings": false,
|
| 196 |
+
"tie_word_embeddins": false,
|
| 197 |
+
"use_cache": true,
|
| 198 |
+
"vocab_size": 125184
|
| 199 |
+
},
|
| 200 |
+
"tie_word_embeddings": false,
|
| 201 |
+
"transformers_version": "5.12.1",
|
| 202 |
+
"use_cache": false,
|
| 203 |
+
"video_token_index": 125042,
|
| 204 |
+
"vision_aspect_ratio": "anyres_max_9",
|
| 205 |
+
"vision_config": {
|
| 206 |
+
"attention_dropout": 0.0,
|
| 207 |
+
"dtype": "bfloat16",
|
| 208 |
+
"hidden_act": "gelu_pytorch_tanh",
|
| 209 |
+
"hidden_size": 1152,
|
| 210 |
+
"image_size": 384,
|
| 211 |
+
"intermediate_size": 4304,
|
| 212 |
+
"layer_norm_eps": 1e-06,
|
| 213 |
+
"model_type": "siglip_vision_model",
|
| 214 |
+
"num_attention_heads": 16,
|
| 215 |
+
"num_channels": 3,
|
| 216 |
+
"num_hidden_layers": 27,
|
| 217 |
+
"patch_size": 14,
|
| 218 |
+
"vision_use_head": false
|
| 219 |
+
},
|
| 220 |
+
"vision_feature_layer": -1,
|
| 221 |
+
"vision_feature_select_strategy": "full"
|
| 222 |
+
}
|
generation_config.json
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_from_model_config": true,
|
| 3 |
+
"bos_token_id": 125030,
|
| 4 |
+
"eos_token_id": [
|
| 5 |
+
125040,
|
| 6 |
+
125040
|
| 7 |
+
],
|
| 8 |
+
"pad_token_id": 125032,
|
| 9 |
+
"transformers_version": "5.12.1"
|
| 10 |
+
}
|
model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:30f5b4027bb16ce26a74bf531da7a962bbc01a086853300671b9c914ec10de92
|
| 3 |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"image_processor": {
|
| 3 |
+
"do_convert_rgb": true,
|
| 4 |
+
"do_normalize": true,
|
| 5 |
+
"do_pad": true,
|
| 6 |
+
"do_rescale": true,
|
| 7 |
+
"do_resize": true,
|
| 8 |
+
"image_grid_pinpoints": [
|
| 9 |
+
[
|
| 10 |
+
384,
|
| 11 |
+
384
|
| 12 |
+
],
|
| 13 |
+
[
|
| 14 |
+
384,
|
| 15 |
+
768
|
| 16 |
+
],
|
| 17 |
+
[
|
| 18 |
+
384,
|
| 19 |
+
1152
|
| 20 |
+
],
|
| 21 |
+
[
|
| 22 |
+
384,
|
| 23 |
+
1536
|
| 24 |
+
],
|
| 25 |
+
[
|
| 26 |
+
384,
|
| 27 |
+
1920
|
| 28 |
+
],
|
| 29 |
+
[
|
| 30 |
+
384,
|
| 31 |
+
2304
|
| 32 |
+
],
|
| 33 |
+
[
|
| 34 |
+
768,
|
| 35 |
+
384
|
| 36 |
+
],
|
| 37 |
+
[
|
| 38 |
+
768,
|
| 39 |
+
768
|
| 40 |
+
],
|
| 41 |
+
[
|
| 42 |
+
768,
|
| 43 |
+
1152
|
| 44 |
+
],
|
| 45 |
+
[
|
| 46 |
+
768,
|
| 47 |
+
1536
|
| 48 |
+
],
|
| 49 |
+
[
|
| 50 |
+
768,
|
| 51 |
+
1920
|
| 52 |
+
],
|
| 53 |
+
[
|
| 54 |
+
768,
|
| 55 |
+
2304
|
| 56 |
+
],
|
| 57 |
+
[
|
| 58 |
+
1152,
|
| 59 |
+
384
|
| 60 |
+
],
|
| 61 |
+
[
|
| 62 |
+
1152,
|
| 63 |
+
768
|
| 64 |
+
],
|
| 65 |
+
[
|
| 66 |
+
1152,
|
| 67 |
+
1152
|
| 68 |
+
],
|
| 69 |
+
[
|
| 70 |
+
1152,
|
| 71 |
+
1536
|
| 72 |
+
],
|
| 73 |
+
[
|
| 74 |
+
1152,
|
| 75 |
+
1920
|
| 76 |
+
],
|
| 77 |
+
[
|
| 78 |
+
1152,
|
| 79 |
+
2304
|
| 80 |
+
],
|
| 81 |
+
[
|
| 82 |
+
1536,
|
| 83 |
+
384
|
| 84 |
+
],
|
| 85 |
+
[
|
| 86 |
+
1536,
|
| 87 |
+
768
|
| 88 |
+
],
|
| 89 |
+
[
|
| 90 |
+
1536,
|
| 91 |
+
1152
|
| 92 |
+
],
|
| 93 |
+
[
|
| 94 |
+
1536,
|
| 95 |
+
1536
|
| 96 |
+
],
|
| 97 |
+
[
|
| 98 |
+
1536,
|
| 99 |
+
1920
|
| 100 |
+
],
|
| 101 |
+
[
|
| 102 |
+
1536,
|
| 103 |
+
2304
|
| 104 |
+
],
|
| 105 |
+
[
|
| 106 |
+
1920,
|
| 107 |
+
384
|
| 108 |
+
],
|
| 109 |
+
[
|
| 110 |
+
1920,
|
| 111 |
+
768
|
| 112 |
+
],
|
| 113 |
+
[
|
| 114 |
+
1920,
|
| 115 |
+
1152
|
| 116 |
+
],
|
| 117 |
+
[
|
| 118 |
+
1920,
|
| 119 |
+
1536
|
| 120 |
+
],
|
| 121 |
+
[
|
| 122 |
+
1920,
|
| 123 |
+
1920
|
| 124 |
+
],
|
| 125 |
+
[
|
| 126 |
+
1920,
|
| 127 |
+
2304
|
| 128 |
+
],
|
| 129 |
+
[
|
| 130 |
+
2304,
|
| 131 |
+
384
|
| 132 |
+
],
|
| 133 |
+
[
|
| 134 |
+
2304,
|
| 135 |
+
768
|
| 136 |
+
],
|
| 137 |
+
[
|
| 138 |
+
2304,
|
| 139 |
+
1152
|
| 140 |
+
],
|
| 141 |
+
[
|
| 142 |
+
2304,
|
| 143 |
+
1536
|
| 144 |
+
],
|
| 145 |
+
[
|
| 146 |
+
2304,
|
| 147 |
+
1920
|
| 148 |
+
],
|
| 149 |
+
[
|
| 150 |
+
2304,
|
| 151 |
+
2304
|
| 152 |
+
]
|
| 153 |
+
],
|
| 154 |
+
"image_mean": [
|
| 155 |
+
0.5,
|
| 156 |
+
0.5,
|
| 157 |
+
0.5
|
| 158 |
+
],
|
| 159 |
+
"image_processor_type": "LlavaOnevisionImageProcessor",
|
| 160 |
+
"image_std": [
|
| 161 |
+
0.5,
|
| 162 |
+
0.5,
|
| 163 |
+
0.5
|
| 164 |
+
],
|
| 165 |
+
"resample": 3,
|
| 166 |
+
"rescale_factor": 0.00392156862745098,
|
| 167 |
+
"size": {
|
| 168 |
+
"height": 384,
|
| 169 |
+
"width": 384
|
| 170 |
+
}
|
| 171 |
+
},
|
| 172 |
+
"image_token": "<|image|>",
|
| 173 |
+
"num_image_tokens": 729,
|
| 174 |
+
"processor_class": "LlavaOnevisionProcessor",
|
| 175 |
+
"video_processor": {
|
| 176 |
+
"data_format": "channels_first",
|
| 177 |
+
"default_to_square": false,
|
| 178 |
+
"do_convert_rgb": true,
|
| 179 |
+
"do_normalize": true,
|
| 180 |
+
"do_pad": true,
|
| 181 |
+
"do_rescale": true,
|
| 182 |
+
"do_resize": true,
|
| 183 |
+
"do_sample_frames": false,
|
| 184 |
+
"image_mean": [
|
| 185 |
+
0.5,
|
| 186 |
+
0.5,
|
| 187 |
+
0.5
|
| 188 |
+
],
|
| 189 |
+
"image_std": [
|
| 190 |
+
0.5,
|
| 191 |
+
0.5,
|
| 192 |
+
0.5
|
| 193 |
+
],
|
| 194 |
+
"resample": 3,
|
| 195 |
+
"rescale_factor": 0.00392156862745098,
|
| 196 |
+
"return_metadata": false,
|
| 197 |
+
"size": {
|
| 198 |
+
"height": 384,
|
| 199 |
+
"width": 384
|
| 200 |
+
},
|
| 201 |
+
"video_processor_type": "LlavaOnevisionVideoProcessor"
|
| 202 |
+
},
|
| 203 |
+
"video_token": "<|video|>",
|
| 204 |
+
"vision_aspect_ratio": "anyres_max_9",
|
| 205 |
+
"vision_feature_select_strategy": "full"
|
| 206 |
+
}
|
tokenizer.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
tokenizer_config.json
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"backend": "tokenizers",
|
| 3 |
+
"bos_token": "<|BOS|>",
|
| 4 |
+
"clean_up_tokenization_spaces": false,
|
| 5 |
+
"eos_token": "<|EOT|>",
|
| 6 |
+
"is_local": true,
|
| 7 |
+
"local_files_only": true,
|
| 8 |
+
"max_length": null,
|
| 9 |
+
"model_input_names": [
|
| 10 |
+
"input_ids",
|
| 11 |
+
"attention_mask"
|
| 12 |
+
],
|
| 13 |
+
"model_max_length": 1000000000000000019884624838656,
|
| 14 |
+
"pad_to_multiple_of": null,
|
| 15 |
+
"pad_token": "<|PAD|>",
|
| 16 |
+
"pad_token_type_id": 0,
|
| 17 |
+
"padding_side": "right",
|
| 18 |
+
"processor_class": "LlavaOnevisionProcessor",
|
| 19 |
+
"tokenizer_class": "TokenizersBackend",
|
| 20 |
+
"torch_dtype": "auto"
|
| 21 |
+
}
|