You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- True (default): Count all the images. Recommended for multi-image.
4682
4681
- False: Doesn't count the images. Can save tokens with single-image.
4683
-
- image_min_tokens (int):
4684
-
It only takes effect when the value is greater than zero. the default value is -1 (i.e., using the default parameters in the model's preprocessor_config.json).
4685
-
Note: Qwen-VL models require at minimum 1024 image tokens to function correctly on bbox grounding tasks
"{%- if tools and tools is iterable and tools is not mapping -%}"
4758
+
" {{- '<|im_start|>system\n' -}}"
4759
+
" {{- '# Tools\n\nYou have access to the following functions:\n\n<tools>' -}}"
4760
+
" {%- for tool in tools -%}"
4761
+
" {{- '\n' -}}"
4762
+
" {{- tool | tojson -}}"
4763
+
" {%- endfor -%}"
4764
+
" {{- '\n</tools>' -}}"
4765
+
" {{- '\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>' -}}"
4766
+
" {%- if messages[0].role == 'system' -%}"
4767
+
" {%- set content = render_content(messages[0].content, false, true) | trim -%}"
4768
+
" {%- if content -%}"
4769
+
" {{- '\n\n' + content -}}"
4770
+
" {%- endif -%}"
4771
+
" {%- endif -%}"
4772
+
" {{- '<|im_end|>\n' -}}"
4773
+
"{%- elif messages[0].role == 'system' -%}"
4774
+
" {%- set content = render_content(messages[0].content, false, true) -%}"
" {%- for (args_name, args_value) in tool_calls.arguments | items -%}"
4829
+
" {{- '<parameter=' + args.name + '>\n' -}}"
4830
+
" {%- 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 -%}"
4831
+
" {{- args_value -}}"
4832
+
" {{- '\n</parameter>' -}}"
4833
+
" {%- endfor -%}"
4834
+
" {%- endif -%}"
4835
+
" {{- '</function>\n</tool_call>' -}}"
4836
+
" {%- endfor -%}"
4837
+
" {%- endif -%}"
4838
+
" {{- '<|im_end|>\n' -}}"
4839
+
" {%- elif message.role == 'tool' -%}"
4840
+
" {%- if loop.previtem and loop.previtem.role != 'tool' -%}"
4841
+
" {{- '<|im_start|>user' -}}"
4842
+
" {%- endif -%}"
4843
+
" {{- '\n<tool_response>\n' -}}"
4844
+
" {{- content -}}"
4845
+
" {{- '\n</tool_response>' -}}"
4846
+
" {%- if not loop.last and loop.nextitem.role != 'tool' -%}"
0 commit comments