inkling2-loop-forensics / vendor /inkling-api.json
SkyIsNotGreen's picture
Inkling 2 loop forensics: analysis, long-context results, 23M reproduction
faec4c1 verified
Raw History Blame Contribute Delete
9.58 kB
{"_id":"6afb9f510fb9a883000fc9f5","id":"thinkingmachines/Inkling-2-Mini","private":false,"pipeline_tag":"image-text-to-text","library_name":"transformers","tags":["transformers","safetensors","inkling2_loop","image-text-to-text","conversational","moe","license:apache-2.0","endpoints_compatible","8-bit","modelopt","region:us"],"downloads":23543,"likes":4943,"modelId":"thinkingmachines/Inkling-2-Mini","author":"thinkingmachines","sha":"b85c3cfa615fc413cc9af3379f491b963f3b586a","lastModified":"2026-11-21T22:23:18.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":["Inkling2LoopForConditionalGeneration"],"model_type":"inkling2_loop","quantization_config":{"quant_method":"modelopt"},"tokenizer_config":{"eos_token":"<|content_model_end_sampling|>","pad_token":"<|endoftext|>"},"chat_template_jinja":"{%- set effort_map = {\"none\": 0.0, \"minimal\": 0.1, \"low\": 0.2, \"medium\": 0.7, \"high\": 0.9, \"xhigh\": 0.99, \"max\": 0.99} -%}\n{%- set role_token = {\"user\": \"<|message_user|>\", \"assistant\": \"<|message_model|>\", \"system\": \"<|message_system|>\", \"tool\": \"<|message_tool|>\"} -%}\n\n{%- macro emit_thinking_effort() -%}\n {%- set eff = reasoning_effort if reasoning_effort is defined and reasoning_effort is not none else 0.9 -%}\n {%- if eff is string -%}\n {%- set key = eff | trim -%}\n {%- if key not in effort_map -%}\n {{- raise_exception(\"Unknown reasoning_effort: \" ~ eff) -}}\n {%- endif -%}\n {%- set num = effort_map[key] -%}\n {%- else -%}\n {%- set num = eff | float -%}\n {%- endif -%}\n {%- if num < 0.0 or num > 0.99 -%}\n {{- raise_exception(\"reasoning_effort must be in [0.0, 0.99]\") -}}\n {%- endif -%}\n {{- \"<|message_system|><|content_text|>Thinking effort level: \" -}}\n {%- if num == 0.0 -%}0{%- else -%}{{ num }}{%- endif -%}\n {{- \"<|end_message|>\" -}}\n{%- endmacro -%}\n\n{%- if tools -%}\n {%- set tool_state = namespace(specs=[]) -%}\n {%- for tool in tools -%}\n {%- set fn = tool.function if tool.function is defined else tool -%}\n {%- set spec = {\n \"description\": (fn.description if fn.description is defined and fn.description else \"\"),\n \"name\": fn.name,\n \"parameters\": (fn.parameters if fn.parameters is defined and fn.parameters else {}),\n \"type\": (tool.type if tool.type is defined and tool.type else \"function\"),\n } -%}\n {%- set tool_state.specs = tool_state.specs + [spec] -%}\n {%- endfor -%}\n {{- \"<|message_system|>tool_declare<|content_xml|>\" -}}\n {{- tool_state.specs | tojson(sort_keys=true, separators=(\",\", \":\")) -}}\n {{- \"<|end_message|>\" -}}\n{%- endif -%}\n\n{%- set state = namespace(effort_emitted=false) -%}\n{%- for message in messages -%}\n {%- if message.role not in role_token -%}\n {{- raise_exception(\"Unknown message role: \" ~ message.role) -}}\n {%- endif -%}\n {%- if not state.effort_emitted and message.role != \"system\" -%}\n {{- emit_thinking_effort() -}}\n {%- set state.effort_emitted = true -%}\n {%- endif -%}\n\n {%- set header = namespace(text=role_token[message.role]) -%}\n {%- if message.role == \"tool\" -%}\n {%- if message.name is defined and message.name -%}\n {%- set header.text = header.text ~ message.name -%}\n {%- elif message.tool_call_id is defined and message.tool_call_id -%}\n {%- for prev in messages -%}\n {%- if prev.role == \"assistant\" and prev.tool_calls -%}\n {%- for tc in prev.tool_calls -%}\n {%- if tc.id is defined and tc.id == message.tool_call_id and tc.function.name is defined -%}\n {%- set header.text = header.text ~ tc.function.name -%}\n {%- endif -%}\n {%- endfor -%}\n {%- endif -%}\n {%- endfor -%}\n {%- endif -%}\n {%- elif message.role == \"assistant\" and message.name is defined and message.name -%}\n {%- set header.text = header.text ~ message.name -%}\n {%- endif -%}\n {%- set rtok = header.text -%}\n {%- set rendered -%}\n\n {%- if message.role == \"assistant\" and message.reasoning_content is defined and message.reasoning_content -%}\n {{- rtok ~ \"<|content_thinking|>\" ~ message.reasoning_content ~ \"<|end_message|>\" -}}\n {%- endif -%}\n\n {%- if message.content is string and (message.content or not (message.role == \"assistant\" and (message.tool_calls or message.reasoning_content))) -%}\n {{- rtok ~ \"<|content_text|>\" ~ message.content ~ \"<|end_message|>\" -}}\n {%- elif message.content -%}\n {%- for part in message.content -%}\n {%- if part is string -%}\n {{- rtok ~ \"<|content_text|>\" ~ part ~ \"<|end_message|>\" -}}\n {%- elif part.type is not defined or part.type in (\"text\", \"input_text\") -%}\n {%- set text_part = (part.text if part.text is defined and part.text is string else \"\") -%}\n {{- rtok ~ \"<|content_text|>\" ~ text_part ~ \"<|end_message|>\" -}}\n {%- elif part.type in (\"image\", \"input_image\", \"image_url\") -%}\n {%- if message.role not in (\"user\", \"tool\") -%}\n {{- raise_exception(\"Image content is only supported for user and tool messages\") -}}\n {%- endif -%}\n {{- rtok ~ \"<|content_image|><|unused_200054|><|end_message|>\" -}}\n {%- elif part.type in (\"audio\", \"input_audio\", \"audio_url\") -%}\n {{- raise_exception(\"Inkling 2 does not accept audio input\") -}}\n {%- else -%}\n {{- raise_exception(\"Unsupported content part type: \" ~ part.type) -}}\n {%- endif -%}\n {%- endfor -%}\n {%- endif -%}\n\n {%- if message.role == \"assistant\" and message.tool_calls -%}\n {%- for tc in message.tool_calls -%}\n {%- set fn = tc.function -%}\n {%- if fn.name is not defined or fn.name is not string -%}\n {{- raise_exception(\"tool call function name must be a string\") -}}\n {%- endif -%}\n {%- if message.name is defined and message.name and message.name != fn.name -%}\n {{- raise_exception(\"assistant name \" ~ message.name ~ \" does not match its tool call \" ~ fn.name) -}}\n {%- endif -%}\n {%- set args = fn.arguments if fn.arguments is defined and fn.arguments else {} -%}\n {%- if args is string -%}\n {{- raise_exception(\"tool call arguments must be a parsed object, not a JSON string; canonicalize upstream\") -}}\n {%- endif -%}\n {%- if args is not mapping -%}\n {{- raise_exception(\"tool call arguments must be an object\") -}}\n {%- endif -%}\n {{- \"<|message_model|>\" ~ fn.name ~ \"<|content_invoke_tool_json|>\" -}}\n {{- '{\"name\":' ~ (fn.name | tojson(sort_keys=true, separators=(\",\", \":\"))) ~ ',\"args\":' -}}\n {{- \"{\" -}}\n {%- for key, value in args | dictsort(case_sensitive=true) -%}\n {{- (key | tojson) ~ \":\" ~ (value | tojson(separators=(\",\", \":\"))) -}}\n {%- if not loop.last -%},{%- endif -%}\n {%- endfor -%}\n {{- \"}}<|end_message|>\" -}}\n {%- endfor -%}\n {%- endif -%}\n\n {%- if message.role == \"assistant\" -%}\n {{- \"<|content_model_end_sampling|>\" -}}\n {%- endif -%}\n {%- endset -%}\n {%- if message.role == \"assistant\" -%}\n {%- generation -%}{{- rendered -}}{%- endgeneration -%}\n {%- else -%}\n {{- rendered -}}\n {%- endif -%}\n{%- endfor -%}\n\n{%- if not state.effort_emitted -%}\n {{- emit_thinking_effort() -}}\n{%- endif -%}\n"},"cardData":{"license":"apache-2.0","license_link":"https://www.apache.org/licenses/LICENSE-2.0","pipeline_tag":"image-text-to-text","tags":["conversational","image-text-to-text","moe"],"library_name":"transformers"},"transformersInfo":{"auto_model":"AutoModelForMultimodalLM","pipeline_tag":"image-text-to-text","processor":"AutoProcessor"},"siblings":[{"rfilename":".gitattributes"},{"rfilename":"README.md"},{"rfilename":"chat_template.jinja"},{"rfilename":"config.json"},{"rfilename":"generation_config.json"},{"rfilename":"hf_quant_config.json"},{"rfilename":"model-00001-of-00001.safetensors"},{"rfilename":"model.safetensors.index.json"},{"rfilename":"mtp.safetensors"},{"rfilename":"processor_config.json"},{"rfilename":"special_tokens_map.json"},{"rfilename":"tiktoken/tokenizer.model"},{"rfilename":"tokenizer.json"},{"rfilename":"tokenizer_config.json"}],"spaces":["fastgpu/vram-and-gpu-cost-calculator","akhaliq/inkling-2-mini","apathy-exe/Inkling-2-Mini","ginigen-ai/edge-ai-news","leopardyzzj/ai-signals-daily","MadhavRupala/model","fffiloni/space-review","idoru/inkling-2-mini-harness-adapters","varanraghu/inkling-2-mini-demo","AKGMilo/inkling-2-mini-demo"],"createdAt":"2026-11-17T00:26:57.000Z","safetensors":{"parameters":{"F32":247848,"BF16":1927217664,"F8_E4M3":4076863488,"U8":20384317440},"total":26388646440},"inference":"warm","usedStorage":20191385756}