{"_id":"6a9f3e70fd9a2af841aab1f0","id":"OrionLLM/OxCoder-9B","private":false,"pipeline_tag":"text-generation","library_name":"transformers","tags":["transformers","safetensors","qwen3_5","image-text-to-text","text-generation","conversational","base_model:Qwen/Qwen3.5-9B","base_model:finetune:Qwen/Qwen3.5-9B","license:apache-2.0","eval-results","endpoints_compatible","region:us"],"downloads":3105,"likes":79,"modelId":"OrionLLM/OxCoder-9B","author":"OrionLLM","sha":"07ba04e2149bace1b43c66448471a70378a7a708","lastModified":"2026-09-14T19:38:51.000Z","gated":false,"disabled":false,"widgetData":[{"text":"Hi, what can you help me with?"},{"text":"What is 84 * 3 / 2?"},{"text":"Tell me an interesting fact about the universe!"},{"text":"Explain quantum computing in simple terms."}],"model-index":null,"config":{"architectures":["Qwen3_5ForConditionalGeneration"],"model_type":"qwen3_5","tokenizer_config":{"bos_token":null,"eos_token":"<|im_end|>","pad_token":"<|endoftext|>","unk_token":null},"chat_template_jinja":"{%- set template_version = \"qwen3.6-froggeric-v21.3\" %}\n{%- set _tool_format = tool_call_format if tool_call_format is defined else 'xml' %}\n{%- set image_count = namespace(value=0) %}\n{%- set video_count = namespace(value=0) %}\n{%- set add_vision_id = add_vision_id if add_vision_id is defined else false %}\n{%- set enable_thinking = enable_thinking if enable_thinking is defined else true %}\n{%- set auto_disable_thinking_with_tools = auto_disable_thinking_with_tools if auto_disable_thinking_with_tools is defined else false %}\n{%- set _preserve_thinking = preserve_thinking if preserve_thinking is defined else true %}\n{%- set max_tool_arg_chars = max_tool_arg_chars if max_tool_arg_chars is defined else 0 %}\n{%- set max_tool_response_chars = max_tool_response_chars if max_tool_response_chars is defined else 0 %}\n{%- set _has_tools = (tools is defined and tools and tools is iterable and tools is not mapping) %}\n{%- set ns_state = namespace(thinking=enable_thinking) %}\n{%- if auto_disable_thinking_with_tools and _has_tools %}\n    {%- set ns_state.thinking = false %}\n{%- endif %}\n{%- macro render_content(content, do_vision_count, is_system_content=false) %}\n    {%- if content is string %}\n        {{- content }}\n    {%- elif content is iterable and content is not mapping %}\n        {%- for item in content %}\n            {%- if item is mapping %}\n                {%- if item.type == 'image' or 'image' in item or 'image_url' in item %}\n                    {%- if is_system_content %}\n                        {{- raise_exception('System message cannot contain images.') }}\n                    {%- endif %}\n                    {%- if do_vision_count %}\n                        {%- set image_count.value = image_count.value + 1 %}\n                    {%- endif %}\n                    {%- if add_vision_id %}\n                        {{- 'Picture ' ~ image_count.value ~ ': ' }}\n                    {%- endif %}\n                    {{- '<|vision_start|><|image_pad|><|vision_end|>' }}\n                {%- elif item.type == 'video' or 'video' in item %}\n                    {%- if is_system_content %}\n                        {{- raise_exception('System message cannot contain videos.') }}\n                    {%- endif %}\n                    {%- if do_vision_count %}\n                        {%- set video_count.value = video_count.value + 1 %}\n                    {%- endif %}\n                    {%- if add_vision_id %}\n                        {{- 'Video ' ~ video_count.value ~ ': ' }}\n                    {%- endif %}\n                    {{- '<|vision_start|><|video_pad|><|vision_end|>' }}\n                {%- elif 'text' in item %}\n                    {{- item.text }}\n                {%- else %}\n                    {{- raise_exception('Unexpected item type in content.') }}\n                {%- endif %}\n            {%- else %}\n                {{- item | string }}\n            {%- endif %}\n        {%- endfor %}\n    {%- elif content is none or content is undefined %}\n        {{- '' }}\n    {%- else %}\n        {{- raise_exception('Unexpected content type.') }}\n    {%- endif %}\n{%- endmacro %}\n{%- if not messages %}\n    {{- raise_exception('No messages provided.') }}\n{%- endif %}\n{%- set _first_role = messages[0].role %}\n{%- if _first_role == 'system' or _first_role == 'developer' %}\n    {%- set _sys_msg = messages[0] %}\n    {%- set _msgs = messages[1:] %}\n{%- else %}\n    {%- set _sys_msg = none %}\n    {%- set _msgs = messages %}\n{%- endif %}\n{%- set _sc = '' %}\n{%- if _sys_msg is not none %}\n    {%- set _sc = render_content(_sys_msg.content, false, true) | trim %}\n    {%- if '<|think_off|>' in _sc %}\n        {%- set ns_state.thinking = false %}\n        {%- set _sc = _sc.split('<|think_off|>') | join('') | trim %}\n    {%- elif '<|think_on|>' in _sc %}\n        {%- set ns_state.thinking = true %}\n        {%- set _sc = _sc.split('<|think_on|>') | join('') | trim %}\n    {%- endif %}\n{%- endif %}\n{%- if _has_tools %}\n    {{- '<|im_start|>system\\n' }}\n    {{- '# Tools\\n\\nYou have access to the following functions:\\n\\n<tools>' }}\n    {%- for tool in tools %}\n        {{- '\\n' }}\n        {{- tool | tojson }}\n    {%- endfor %}\n    {{- '\\n</tools>' }}\n    {%- set tool_instructions %}\nIf you choose to call a function ONLY reply in the following format with NO suffix:\n\n{%- if _tool_format == 'json' %}\n<think>\nBrief explanation of tool call\n</think>\n<tool_call>\n{\"name\": \"example_function_name\", \"arguments\": {\"example_parameter_1\": \"value_1\", \"example_parameter_2\": \"This is the value for the second parameter\"}}\n</tool_call>\n{%- else %}\n<think>\nBrief explanation of tool call\n</think>\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{%- endif %}\n\n<IMPORTANT>\nReminder:\n- You can use the <think></think> block to plan your next tool call OR to synthesize data and formulate your final response to the user.\n- ALL explanation and reasoning MUST be placed strictly inside the <think></think> block.\n{%- if _tool_format == 'json' %}\n- Function calls MUST follow the specified format: a single JSON object with \"name\" and \"arguments\" keys inside <tool_call></tool_call> XML tags.\n{%- else %}\n- Function calls MUST follow the specified format: an inner <function=...></function> block must be nested within <tool_call></tool_call> XML tags.\n{%- endif %}\n- If you choose to call a tool, you MUST output the <tool_call> block IMMEDIATELY after thinking, with NO conversational text before it.\n{%- if _tool_format == 'json' %}\n- The <tool_call> tag MUST be at the very beginning of a new line, with NO spaces or indentation before it.\n{%- else %}\n- The <tool_call> and <function> tags MUST be at the very beginning of a new line, with NO spaces or indentation before them.\n{%- endif %}\n- To call multiple functions, output a separate, completely closed <tool_call></tool_call> block for EACH function. Do NOT nest <tool_call> blocks.\n- If you have all necessary data, provide your final answer directly to the user without any tool call.\n</IMPORTANT>\n    {%- endset %}\n    {{- '\\n\\n' ~ tool_instructions | trim }}\n    {%- if _sc %}\n        {{- '\\n\\n' + _sc }}\n    {%- endif %}\n    {{- '<|im_end|>\\n' }}\n{%- else %}\n    {%- if _sc %}\n        {{- '<|im_start|>system\\n' + _sc + '<|im_end|>\\n' }}\n    {%- endif %}\n{%- endif %}\n{%- set _last_idx = _msgs | length - 1 %}\n{%- set ns = namespace(multi_step_tool=true, last_query_index=_last_idx) %}\n{%- for message in _msgs[::-1] %}\n    {%- set index = (_msgs | length - 1) - loop.index0 %}\n    {%- if ns.multi_step_tool and message.role == 'user' %}\n        {%- set _rc = render_content(message.content, false) | trim %}\n        {%- if not (_rc.startswith('<tool_response>') and _rc.endswith('</tool_response>')) %}\n            {%- set ns.multi_step_tool = false %}\n            {%- set ns.last_query_index = index %}\n        {%- endif %}\n    {%- endif %}\n{%- endfor %}\n{%- if ns.multi_step_tool %}\n    {%- if _last_idx > 50 %}\n        {%- set ns.last_query_index = _last_idx %}\n    {%- else %}\n        {%- set ns.last_query_index = 0 %}\n    {%- endif %}\n{%- endif %}\n{%- set ns2 = namespace(prev_role='', consecutive_failures=0) %}\n{%- for message in _msgs %}\n    {%- set is_system = (message.role == \"system\" or message.role == \"developer\") %}\n    {%- set content = render_content(message.content, true, is_system) | trim %}\n    {%- if is_system or message.role == 'user' %}\n        {%- if '<|think_off|>' in content %}\n            {%- set ns_state.thinking = false %}\n            {%- set content = content.split('<|think_off|>') | join('') | trim %}\n        {%- elif '<|think_on|>' in content %}\n            {%- set ns_state.thinking = true %}\n            {%- set content = content.split('<|think_on|>') | join('') | trim %}\n        {%- endif %}\n    {%- endif %}\n    {%- if is_system %}\n        {{- '<|im_start|>system\\n' + content + '<|im_end|>\\n' }}\n    {%- elif message.role == 'user' %}\n        {%- set ns2.consecutive_failures = 0 %}\n        {{- '<|im_start|>user\\n' + content + '<|im_end|>\\n' }}\n    {%- elif message.role == 'assistant' %}\n        {%- set reasoning_content = '' %}\n        {%- if message.reasoning_content is defined and message.reasoning_content is not none %}\n            {%- if message.reasoning_content is string %}\n                {%- set reasoning_content = message.reasoning_content %}\n            {%- else %}\n                {%- set reasoning_content = message.reasoning_content | string %}\n            {%- endif %}\n        {%- elif message.thinking is defined and message.thinking is not none %}\n            {%- if message.thinking is string %}\n                {%- set reasoning_content = message.thinking %}\n            {%- else %}\n                {%- set reasoning_content = message.thinking | string %}\n            {%- endif %}\n        {%- else %}\n            {%- set _think_end = '' %}\n            {%- if content.startswith('</think>') %}\n                {%- set _think_end = '</think>' %}\n            {%- elif content.startswith('</thinking>') %}\n                {%- set _think_end = '</thinking>' %}\n            {%- elif '\\n</think>' in content %}\n                {%- set _think_end = '\\n</think>' %}\n            {%- elif '\\n</thinking>' in content %}\n                {%- set _think_end = '\\n</thinking>' %}\n            {%- elif '\\n</ think>' in content %}\n                {%- set _think_end = '\\n</ think>' %}\n            {%- elif '\\n</think >' in content %}\n                {%- set _think_end = '\\n</think >' %}\n            {%- endif %}\n            {%- if _think_end %}\n                {%- if 'thinking' in _think_end %}\n                    {%- set _think_start = '<thinking>' %}\n                {%- else %}\n                    {%- set _think_start = '<think>' %}\n                {%- endif %}\n                {%- set reasoning_content = content.split(_think_end)[0].rstrip('\\n') %}\n                {%- if _think_start in reasoning_content %}\n                    {%- set reasoning_content = reasoning_content.split(_think_start)[-1].lstrip('\\n') %}\n                {%- endif %}\n                {%- set content = content.split(_think_end)[-1].lstrip('\\n') %}\n            {%- endif %}\n        {%- endif %}\n        {%- set reasoning_content = reasoning_content | trim %}\n        {%- if (_preserve_thinking or loop.index0 > ns.last_query_index) and reasoning_content %}\n            {{- '<|im_start|>assistant\\n<think>\\n' + reasoning_content + '\\n</think>\\n\\n' + content }}\n        {%- else %}\n            {{- '<|im_start|>assistant\\n' + content }}\n        {%- endif %}\n        {%- if message.tool_calls is defined and message.tool_calls and message.tool_calls is iterable and message.tool_calls is not mapping %}\n            {%- for tool_call in message.tool_calls %}\n                {%- if tool_call.function is defined and tool_call.function is not none %}\n                    {%- set tc = tool_call.function %}\n                {%- else %}\n                    {%- set tc = tool_call %}\n                {%- endif %}\n                {%- if _tool_format == 'json' %}\n                    {%- if not loop.first or content | trim %}\n                        {{- '\\n\\n' }}\n                    {%- endif %}\n                    {%- set _args = '{}' %}\n                    {%- if tc.arguments is defined and tc.arguments is not none %}\n                        {%- if tc.arguments is mapping %}\n                            {%- set _args = tc.arguments | tojson %}\n                        {%- elif tc.arguments is string and tc.arguments %}\n                            {%- set _args = tc.arguments %}\n                        {%- endif %}\n                    {%- endif %}\n                    {{- '<tool_call>\\n{\"name\": ' }}{{- tc.name | tojson }}{{- ', \"arguments\": ' }}{{- _args }}{{- '}\\n</tool_call>' }}\n                {%- else %}\n                    {%- if loop.first %}\n                        {%- if content | trim %}\n                            {{- '\\n\\n<tool_call>\\n<function=' + tc.name + '>\\n' }}\n                        {%- else %}\n                            {{- '<tool_call>\\n<function=' + tc.name + '>\\n' }}\n                        {%- endif %}\n                    {%- else %}\n                        {{- '\\n\\n<tool_call>\\n<function=' + tc.name + '>\\n' }}\n                    {%- endif %}\n                    {%- if tc.arguments is defined and tc.arguments is not none %}\n                        {%- if tc.arguments is mapping %}\n                            {%- for args_name, args_value in tc.arguments.items() %}\n                                {{- '<parameter=' + args_name + '>\\n' }}\n                                {%- if args_value is mapping or (args_value is sequence and args_value is not string) %}\n                                    {%- set _av = args_value | tojson %}\n                                {%- else %}\n                                    {%- set _av = args_value | string %}\n                                {%- endif %}\n                                {%- if max_tool_arg_chars > 0 and _av | length > max_tool_arg_chars %}\n                                    {{- _av[:max_tool_arg_chars] + '\\n[TRUNCATED — original length ' ~ (_av | length | string) ~ ' chars]' }}\n                                {%- else %}\n                                    {{- _av }}\n                                {%- endif %}\n                                {{- '\\n</parameter>\\n' }}\n                            {%- endfor %}\n                        {%- elif tc.arguments is string and tc.arguments %}\n                            {{- tc.arguments }}\n                        {%- endif %}\n                    {%- endif %}\n                    {{- '</function>\\n</tool_call>' }}\n                {%- endif %}\n            {%- endfor %}\n        {%- endif %}\n        {{- '<|im_end|>\\n' }}\n    {%- elif message.role == 'tool' %}\n        {%- set _content_lower = content | lower %}\n        {%- set _content_head = _content_lower[:80] %}\n        {%- if content | length < 500 and '$ ' not in content and 'took ' not in _content_lower and ('\"error\":' in _content_head or 'error:' in _content_head or 'err!' in _content_head or 'fatal:' in _content_head or 'exception:' in _content_head or 'traceback' in _content_head or 'command not found' in _content_head or 'invalid syntax' in _content_head or 'failed to' in _content_head) %}\n            {%- set ns2.consecutive_failures = ns2.consecutive_failures + 1 %}\n        {%- else %}\n            {%- set ns2.consecutive_failures = 0 %}\n        {%- endif %}\n        {%- if ns2.prev_role != 'tool' %}\n            {{- '<|im_start|>user' }}\n        {%- endif %}\n        {%- if max_tool_response_chars > 0 and content | length > max_tool_response_chars %}\n            {%- set content = content[:max_tool_response_chars] + '\\n[TRUNCATED — original length ' ~ (content | length | string) ~ ' chars]' %}\n        {%- endif %}\n        {{- '\\n<tool_response>\\n' + content }}\n        {%- if ns2.consecutive_failures >= 2 %}\n            {{- '\\n\\n⚠️ SYSTEM WARNING: ' ~ ns2.consecutive_failures ~ ' consecutive tool errors detected. Your previous approach is incorrect. You MUST use a fundamentally different approach or corrected arguments.' }}\n        {%- elif ns2.consecutive_failures == 1 %}\n            {{- '\\n\\n⚠️ SYSTEM WARNING: The previous tool call returned an error. Diagnose the failure and retry with completely corrected arguments.' }}\n        {%- endif %}\n        {{- '\\n</tool_response>' }}\n        {%- if loop.last %}\n            {{- '<|im_end|>\\n' }}\n        {%- else %}\n            {%- set _next_role = _msgs[loop.index0 + 1].role %}\n            {%- if _next_role != 'tool' %}\n                {{- '<|im_end|>\\n' }}\n            {%- endif %}\n        {%- endif %}\n    {%- else %}\n        {{- '<|im_start|>user\\n[' + message.role + ']: ' + content + '<|im_end|>\\n' }}\n    {%- endif %}\n    {%- set ns2.prev_role = message.role %}\n{%- endfor %}\n{%- if add_generation_prompt %}\n    {{- '<|im_start|>assistant\\n' }}\n    {%- if not ns_state.thinking %}\n        {{- '<think>\\n\\n</think>\\n\\n' }}\n    {%- elif ns2.consecutive_failures >= 2 %}\n        {{- '<think>\\n\\n</think>\\n\\n' }}\n    {%- else %}\n        {{- '<think>\\n' }}\n    {%- endif %}\n{%- endif %}"},"cardData":{"library_name":"transformers","license":"apache-2.0","pipeline_tag":"text-generation","base_model":["Qwen/Qwen3.5-9B"]},"transformersInfo":{"auto_model":"AutoModelForMultimodalLM","pipeline_tag":"image-text-to-text","processor":"AutoProcessor"},"siblings":[{"rfilename":".eval_results/gpqa_diamond.yaml"},{"rfilename":".eval_results/hle-with-tools.yaml"},{"rfilename":".eval_results/hle.-no-tools.yaml"},{"rfilename":".eval_results/swe_bench_pro.yaml"},{"rfilename":".eval_results/swe_bench_verified.yaml"},{"rfilename":".eval_results/terminal-bench-2.1-claude-code.yaml"},{"rfilename":".eval_results/terminal-bench-2.1-terminus-2.yaml"},{"rfilename":".gitattributes"},{"rfilename":"README.md"},{"rfilename":"assets/coding-performance-evaluation.png"},{"rfilename":"chat_template.jinja"},{"rfilename":"config.json"},{"rfilename":"generation_config.json"},{"rfilename":"model.safetensors"},{"rfilename":"preprocessor_config.json"},{"rfilename":"processor_config.json"},{"rfilename":"tokenizer.json"},{"rfilename":"tokenizer_config.json"}],"spaces":["localellm/WebGPU-oxcoder-9b-i1-gguf"],"createdAt":"2026-09-07T22:45:04.000Z","safetensors":{"parameters":{"BF16":9409813744},"total":9409813744},"usedStorage":18839938139}