Text Generation
Transformers
Safetensors
mistral3
image-text-to-text
decision-model
typed-decisions
jev
jevbench
calibration
decode-free
multilingual
vision-language
conversational
Instructions to use StandardThinking/StandardOne-8B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use StandardThinking/StandardOne-8B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="StandardThinking/StandardOne-8B") 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("StandardThinking/StandardOne-8B") model = AutoModelForMultimodalLM.from_pretrained("StandardThinking/StandardOne-8B", 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 StandardThinking/StandardOne-8B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "StandardThinking/StandardOne-8B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "StandardThinking/StandardOne-8B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/StandardThinking/StandardOne-8B
- SGLang
How to use StandardThinking/StandardOne-8B 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 "StandardThinking/StandardOne-8B" \ --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": "StandardThinking/StandardOne-8B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'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 "StandardThinking/StandardOne-8B" \ --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": "StandardThinking/StandardOne-8B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use StandardThinking/StandardOne-8B with Docker Model Runner:
docker model run hf.co/StandardThinking/StandardOne-8B
Download chat_template.jinja from StandardThinking/StandardOne-8B: direct link, hf CLI and curl.
- Browser
- Download file 11.9 kB
-
https://huggingface.co/StandardThinking/StandardOne-8B/resolve/main/chat_template.jinja
- Command line
-
hf download hf://StandardThinking/StandardOne-8B/chat_template.jinja
-
curl -L -o chat_template.jinja https://huggingface.co/StandardThinking/StandardOne-8B/resolve/main/chat_template.jinja
11.9 kB
| {#- Default system message if no system prompt is passed. #} | |
| {%- set default_system_message = 'You are Ministral-3-8B-Instruct-2512, a Large Language Model (LLM) created by Mistral AI, a French startup headquartered in Paris. | |
| You power an AI assistant called Le Chat. | |
| Your knowledge base was last updated on 2023-10-01. | |
| The current date is {today}. | |
| When you\'re not sure about some information or when the user\'s request requires up-to-date or specific data, you must use the available tools to fetch the information. Do not hesitate to use tools whenever they can provide a more accurate or complete response. If no relevant tools are available, then clearly state that you don\'t have the information and avoid making up anything. | |
| If the user\'s question is not clear, ambiguous, or does not provide enough context for you to accurately answer the question, you do not try to answer it right away and you rather ask the user to clarify their request (e.g. "What are some good restaurants around me?" => "Where are you?" or "When is the next flight to Tokyo" => "Where do you travel from?"). | |
| You are always very attentive to dates, in particular you try to resolve dates (e.g. "yesterday" is {yesterday}) and when asked about information at specific dates, you discard information that is at another date. | |
| You follow these instructions in all languages, and always respond to the user in the language they use or request. | |
| Next sections describe the capabilities that you have. | |
| # WEB BROWSING INSTRUCTIONS | |
| You cannot perform any web search or access internet to open URLs, links etc. If it seems like the user is expecting you to do so, you clarify the situation and ask the user to copy paste the text directly in the chat. | |
| # MULTI-MODAL INSTRUCTIONS | |
| You have the ability to read images, but you cannot generate images. You also cannot read nor transcribe audio files or videos. | |
| # TOOL CALLING INSTRUCTIONS | |
| You may have access to tools that you can use to fetch information or perform actions. You must use these tools in the following situations: | |
| 1. When the request requires up-to-date information. | |
| 2. When the request requires specific data that you do not have in your knowledge base. | |
| 3. When the request involves actions that you cannot perform without tools. | |
| Always prioritize using tools to provide the most accurate and helpful response. If tools are not available, inform the user that you cannot perform the requested action at the moment.' %} | |
| {#- Begin of sequence token. #} | |
| {{- bos_token }} | |
| {#- Handle system prompt if it exists. #} | |
| {%- set loop_messages = messages %} | |
| {%- if messages[0]['role'] != 'system' and default_system_message != '' %} | |
| {{- '[SYSTEM_PROMPT]' + default_system_message + '[/SYSTEM_PROMPT]' }} | |
| {%- endif %} | |
| {#- Tools definition #} | |
| {%- set available_tools = '' %} | |
| {%- set has_tools = false %} | |
| {%- if tools is defined and tools is not none and tools|length > 0 %} | |
| {%- set has_tools = true %} | |
| {%- set available_tools = '[AVAILABLE_TOOLS]' + (tools| tojson) + '[/AVAILABLE_TOOLS]' %} | |
| {%- endif %} | |
| {#- Macros #} | |
| {%- macro render_content(content, context_name, supported_types_desc, support_images) -%} | |
| {%- if content is string -%} | |
| {{- content -}} | |
| {%- elif content -%} | |
| {%- for block in content -%} | |
| {%- if block['type'] == 'text' -%} | |
| {{- block['text'] -}} | |
| {%- elif support_images and block['type'] in ['image', 'image_url'] -%} | |
| {{- '[IMG]' -}} | |
| {%- else -%} | |
| {{- raise_exception('Only ' + supported_types_desc + ' chunks are supported in ' + context_name + '.') -}} | |
| {%- endif -%} | |
| {%- endfor -%} | |
| {%- else -%} | |
| {{- raise_exception(context_name + ' must have non-empty content.') -}} | |
| {%- endif -%} | |
| {%- endmacro -%} | |
| {#- Aggregate consecutive messages with the same role except system and tool. #} | |
| {#- A sentinel message is appended so the last group gets flushed inside the loop. #} | |
| {%- set ns_agg = namespace(messages=[], current_group=[], current_role=none) %} | |
| {%- for message in loop_messages + [{'role': '__sentinel__'}] %} | |
| {%- if message['role'] != ns_agg.current_role or message['role'] == 'system' or message['role'] == 'tool' %} | |
| {%- if ns_agg.current_role == 'tool' %} | |
| {%- set ns_agg.messages = ns_agg.messages + ns_agg.current_group %} | |
| {%- elif ns_agg.current_role is not none %} | |
| {%- set ns_c = namespace(text_parts=[], chunks=[], has_non_text=false, tool_calls=[]) %} | |
| {%- for msg in ns_agg.current_group %} | |
| {%- if msg['content'] is string %} | |
| {%- set ns_c.text_parts = ns_c.text_parts + [msg['content']] %} | |
| {%- elif msg['content'] is not none %} | |
| {%- for block in msg['content'] %} | |
| {%- if block['type'] == 'text' %} | |
| {%- set ns_c.text_parts = ns_c.text_parts + [block['text']] %} | |
| {%- else %} | |
| {%- if ns_c.text_parts | length > 0 %} | |
| {%- set ns_c.chunks = ns_c.chunks + [{'type': 'text', 'text': ns_c.text_parts | join('\n\n')}] %} | |
| {%- set ns_c.text_parts = [] %} | |
| {%- endif %} | |
| {%- set ns_c.chunks = ns_c.chunks + [block] %} | |
| {%- set ns_c.has_non_text = true %} | |
| {%- endif %} | |
| {%- endfor %} | |
| {%- endif %} | |
| {%- if msg['tool_calls'] is defined and msg['tool_calls'] is not none %} | |
| {%- set ns_c.tool_calls = ns_c.tool_calls + msg['tool_calls'] | list %} | |
| {%- endif %} | |
| {%- endfor %} | |
| {%- if ns_c.has_non_text %} | |
| {%- if ns_c.text_parts | length > 0 %} | |
| {%- set ns_c.chunks = ns_c.chunks + [{'type': 'text', 'text': ns_c.text_parts | join('\n\n')}] %} | |
| {%- endif %} | |
| {%- set merged_content = ns_c.chunks %} | |
| {%- else %} | |
| {%- set merged_content = ns_c.text_parts | join('\n\n') %} | |
| {%- endif %} | |
| {%- if ns_c.tool_calls | length > 0 %} | |
| {%- set ns_agg.messages = ns_agg.messages + [{'role': ns_agg.current_role, 'content': merged_content, 'tool_calls': ns_c.tool_calls}] %} | |
| {%- else %} | |
| {%- set ns_agg.messages = ns_agg.messages + [{'role': ns_agg.current_role, 'content': merged_content}] %} | |
| {%- endif %} | |
| {%- endif %} | |
| {%- if message['role'] != '__sentinel__' %} | |
| {%- set ns_agg.current_group = [message] %} | |
| {%- set ns_agg.current_role = message['role'] %} | |
| {%- endif %} | |
| {%- else %} | |
| {%- set ns_agg.current_group = ns_agg.current_group + [message] %} | |
| {%- endif %} | |
| {%- endfor %} | |
| {%- set loop_messages = ns_agg.messages %} | |
| {#- Validates message ordering. #} | |
| {%- set ns = namespace(available_tools_emitted=false) %} | |
| {%- if loop_messages | length > 0 and loop_messages[0]['role'] not in ['user', 'system'] %} | |
| {{- raise_exception('Conversation must start with a user or system message, got ' + loop_messages[0]['role'] + '.') }} | |
| {%- endif %} | |
| {%- set ns_order = namespace(previous_role=none) %} | |
| {%- for message in loop_messages %} | |
| {%- set current_role = message['role'] %} | |
| {%- if ns_order.previous_role is not none %} | |
| {%- if ns_order.previous_role == 'system' %} | |
| {%- if current_role not in ['user', 'assistant', 'system'] %} | |
| {{- raise_exception('Unexpected role \'' + current_role + '\' after role \'' + ns_order.previous_role + '\'') }} | |
| {%- endif %} | |
| {%- elif ns_order.previous_role == 'user' %} | |
| {%- if current_role not in ['assistant', 'system', 'user'] %} | |
| {{- raise_exception('Unexpected role \'' + current_role + '\' after role \'' + ns_order.previous_role + '\'') }} | |
| {%- endif %} | |
| {%- elif ns_order.previous_role == 'assistant' %} | |
| {%- if current_role not in ['assistant', 'user', 'tool'] %} | |
| {{- raise_exception('Unexpected role \'' + current_role + '\' after role \'' + ns_order.previous_role + '\'') }} | |
| {%- endif %} | |
| {%- elif ns_order.previous_role == 'tool' %} | |
| {%- if current_role not in ['assistant', 'tool', 'user'] %} | |
| {{- raise_exception('Unexpected role \'' + current_role + '\' after role \'' + ns_order.previous_role + '\'') }} | |
| {%- endif %} | |
| {%- endif %} | |
| {%- endif %} | |
| {%- set ns_order.previous_role = current_role %} | |
| {%- endfor %} | |
| {#- Handle conversation messages. #} | |
| {%- for message in loop_messages %} | |
| {#- User messages supports text, image and image_url content. #} | |
| {%- if message['role'] == 'user' %} | |
| {%- if not ns.available_tools_emitted %} | |
| {{- available_tools }} | |
| {%- set ns.available_tools_emitted = true %} | |
| {%- endif %} | |
| {%- if message['content'] is not string and message['content'] %} | |
| {#- When content has exactly one image and one text block, put image first. #} | |
| {%- if message['content'] | length == 2 and message['content'][0]['type'] == 'text' and message['content'][1]['type'] in ['image', 'image_url'] %} | |
| {%- set blocks = [message['content'][1], message['content'][0]] %} | |
| {%- else %} | |
| {%- set blocks = message['content'] %} | |
| {%- endif %} | |
| {%- set user_content = blocks %} | |
| {%- else %} | |
| {%- set user_content = message['content'] %} | |
| {%- endif %} | |
| {{- '[INST]' -}} | |
| {{- render_content(user_content, 'user message content', supported_types_desc='text, image and image_url', support_images=true) -}} | |
| {{- '[/INST]' }} | |
| {#- Assistant messages supports text content. #} | |
| {%- elif message['role'] == 'assistant' %} | |
| {%- if (message['content'] is none or message['content'] == '' or message['content']|length == 0) and (message['tool_calls'] is not defined or message['tool_calls'] is none or message['tool_calls']|length == 0) %} | |
| {{- raise_exception('Assistant message must have a string or a list of chunks in content or a list of tool calls.') }} | |
| {%- endif %} | |
| {%- if message['content'] %} | |
| {{- render_content(message['content'], 'assistant message contents', supported_types_desc='text', support_images=false) -}} | |
| {%- endif %} | |
| {%- if message['tool_calls'] is defined and message['tool_calls'] is not none and message['tool_calls']|length > 0 %} | |
| {%- for tool in message['tool_calls'] %} | |
| {{- '[TOOL_CALLS]' }} | |
| {%- set name = tool['function']['name'] %} | |
| {%- set arguments = tool['function']['arguments'] %} | |
| {%- if arguments is not string %} | |
| {%- set arguments = arguments|tojson|safe %} | |
| {%- elif arguments == '' %} | |
| {%- set arguments = '{}' %} | |
| {%- endif %} | |
| {{- name + '[ARGS]' + arguments }} | |
| {%- endfor %} | |
| {%- endif %} | |
| {{- eos_token }} | |
| {#- Tool messages only supports text content. #} | |
| {%- elif message['role'] == 'tool' %} | |
| {{- '[TOOL_RESULTS]' + message['content']|string + '[/TOOL_RESULTS]' }} | |
| {#- System messages. #} | |
| {%- elif message['role'] == 'system' %} | |
| {{- '[SYSTEM_PROMPT]' -}} | |
| {{- render_content(message['content'], 'system message contents', supported_types_desc='text', support_images=false) -}} | |
| {{- '[/SYSTEM_PROMPT]' -}} | |
| {#- Raise exception for unsupported roles. #} | |
| {%- else %} | |
| {{- raise_exception('Only user, assistant, system and tool roles are supported, got ' + message['role'] + '.') }} | |
| {%- endif %} | |
| {%- endfor %} | |