Text Generation
Transformers
Safetensors
aion_instruct
custom_code
summarization
rewriting
chat
conversational
Eval Results
Run this model with HF Jobs
Run microsoft/Aion-1.0-Instruct-2.3B on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs and TRL to fine-tune https://huggingface.co/microsoft/Aion-1.0-Instruct-2.3B. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/microsoft/Aion-1.0-Instruct-2.3B on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Evaluate on a benchmark
Use HF Jobs to evaluate https://huggingface.co/microsoft/Aion-1.0-Instruct-2.3B. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.
Quantize for lower memory use
Use HF Jobs to create a 4-bit version of https://huggingface.co/microsoft/Aion-1.0-Instruct-2.3B. Push it to a new model repo, then reload it from there and report its memory footprint. Run `hf jobs --help` first to learn the CLI.
Instructions to use microsoft/Aion-1.0-Instruct-2.3B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use microsoft/Aion-1.0-Instruct-2.3B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="microsoft/Aion-1.0-Instruct-2.3B", trust_remote_code=True) messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("microsoft/Aion-1.0-Instruct-2.3B", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use microsoft/Aion-1.0-Instruct-2.3B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "microsoft/Aion-1.0-Instruct-2.3B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "microsoft/Aion-1.0-Instruct-2.3B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/microsoft/Aion-1.0-Instruct-2.3B
- SGLang
How to use microsoft/Aion-1.0-Instruct-2.3B 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 "microsoft/Aion-1.0-Instruct-2.3B" \ --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": "microsoft/Aion-1.0-Instruct-2.3B", "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 "microsoft/Aion-1.0-Instruct-2.3B" \ --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": "microsoft/Aion-1.0-Instruct-2.3B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use microsoft/Aion-1.0-Instruct-2.3B with Docker Model Runner:
docker model run hf.co/microsoft/Aion-1.0-Instruct-2.3B
Download chat_template.jinja from microsoft/Aion-1.0-Instruct-2.3B: direct link, hf CLI and curl.
- Browser
- Download file 4.29 kB
-
https://huggingface.co/microsoft/Aion-1.0-Instruct-2.3B/resolve/main/chat_template.jinja
- Command line
-
hf download hf://microsoft/Aion-1.0-Instruct-2.3B/chat_template.jinja
-
curl -L -o chat_template.jinja https://huggingface.co/microsoft/Aion-1.0-Instruct-2.3B/resolve/main/chat_template.jinja
4.29 kB
| {%- set _reserved_control_tokens = ['<|system|>', '<|user|>', '<|assistant|>', '<|end|>', '<|endofprompt|>', '<|tool|>', '<|/tool|>', '<|tool_call|>', '<|/tool_call|>', '<|tool_response|>'] %} | |
| {%- if model_identity is not defined %} | |
| {%- set model_identity = "You are Aion Instruct, a large language model trained by Microsoft." %} | |
| {%- endif %} | |
| {%- if knowledge_cutoff is not defined or not knowledge_cutoff %} | |
| {%- set knowledge_cutoff = "2025-12" %} | |
| {%- endif %} | |
| {%- if messages and messages[0].role == 'system' %} | |
| {%- set start_index = 1 %} | |
| {%- else %} | |
| {%- set start_index = 0 %} | |
| {%- endif %} | |
| {{- '<|system|>' + model_identity }} | |
| {{- '\nKnowledge cutoff: ' + knowledge_cutoff }} | |
| {%- if current_date is defined and current_date %} | |
| {{- '\nCurrent date: ' + current_date }} | |
| {%- else %} | |
| {{- '\nCurrent date: ' + strftime_now('%Y-%m-%d') }} | |
| {%- endif %} | |
| {%- if messages and messages[0].role == 'system' %} | |
| {%- if messages[0].content is string %} | |
| {%- set _sys_content = messages[0].content %} | |
| {%- else %} | |
| {%- set _sys_content = '' %} | |
| {%- endif %} | |
| {%- for _t in _reserved_control_tokens %} | |
| {%- if _sys_content and _t in _sys_content %} | |
| {{- raise_exception("aion chat template: content of the leading 'system' message contains reserved control token " ~ _t ~ "; strip chat control tokens from the data.") }} | |
| {%- endif %} | |
| {%- endfor %} | |
| {{- '\n\n' + _sys_content }} | |
| {%- endif %} | |
| {%- if tools %} | |
| {{- '\n\n# Tools\n\nYou may call one or more functions to assist with the user query.\n\nThe available tools are provided as JSON between <|tool|> and <|/tool|> tokens:\n' }} | |
| {{- '<|tool|>' }} | |
| {{- tools | tojson }} | |
| {{- '<|/tool|>\n\nFor each function call, respond with a single <|tool_call|>{\"name\": \"<function-name>\", \"arguments\": <json-args>}<|/tool_call|> block.\n' }} | |
| {%- endif %} | |
| {{- '<|end|>' }} | |
| {%- set _ns = namespace(pending_tool_call=false) %} | |
| {%- for message in messages[start_index:] %} | |
| {%- if message.content is string %} | |
| {%- set content = message.content %} | |
| {%- else %} | |
| {%- set content = '' %} | |
| {%- endif %} | |
| {%- for _t in _reserved_control_tokens %} | |
| {%- if content and _t in content %} | |
| {{- raise_exception("aion chat template: content of a '" ~ message.role ~ "' message contains reserved control token " ~ _t ~ "; strip chat control tokens from the data.") }} | |
| {%- endif %} | |
| {%- endfor %} | |
| {%- if message.role == 'user' %} | |
| {{- '<|user|>' + content + '<|end|>' }} | |
| {%- set _ns.pending_tool_call = false %} | |
| {%- elif message.role == 'assistant' %} | |
| {{- '<|assistant|>' }} | |
| {%- generation %} | |
| {{- content }} | |
| {%- if message.tool_calls %} | |
| {%- for tool_call in message.tool_calls %} | |
| {%- if tool_call.function %} | |
| {%- set tc = tool_call.function %} | |
| {%- else %} | |
| {%- set tc = tool_call %} | |
| {%- endif %} | |
| {{- '<|tool_call|>' }} | |
| {{- '{\"name\": \"' ~ tc.name ~ '\", \"arguments\": ' }} | |
| {%- if tc.arguments is string %} | |
| {{- tc.arguments }} | |
| {%- else %} | |
| {{- tc.arguments | tojson }} | |
| {%- endif %} | |
| {{- '}' }} | |
| {{- '<|/tool_call|>' }} | |
| {%- endfor %} | |
| {%- endif %} | |
| {#- EVERY assistant turn -- including the conversation-final one -- closes on | |
| <|end|> (200020), which IS the model's emitted eos (Phi-4 / Phi-4-reasoning | |
| single-terminator scheme: <|im_end|> ends every turn AND is the eos, with NO | |
| separate document terminator). Training on it teaches the model to STOP. The IFT | |
| assistant-only loss trains this closing token. Packing isolates | |
| conversations via reset position_ids (no distinct terminal token needed). #} | |
| {{- '<|end|>' }} | |
| {%- endgeneration %} | |
| {%- if message.tool_calls %} | |
| {%- set _ns.pending_tool_call = true %} | |
| {%- else %} | |
| {%- set _ns.pending_tool_call = false %} | |
| {%- endif %} | |
| {%- elif message.role == 'tool' %} | |
| {%- if not _ns.pending_tool_call %} | |
| {{- raise_exception("aion chat template: a 'tool' message has no preceding assistant tool_call.") }} | |
| {%- endif %} | |
| {%- if loop.first or (messages[loop.index0 + start_index - 1].role != 'tool') %} | |
| {{- '<|user|>' }} | |
| {%- endif %} | |
| {{- '<|tool_response|>' }} | |
| {{- content }} | |
| {%- if loop.last or (messages[loop.index0 + start_index + 1].role != 'tool') %} | |
| <|end|> | |
| {%- endif %} | |
| {%- elif message.role == 'system' and (start_index + loop.index0) != 0 %} | |
| {%- if content | trim %} | |
| {{- '<|system|>' + content + '<|end|>' }} | |
| {%- endif %} | |
| {%- endif %} | |
| {%- endfor %} | |
| {%- if add_generation_prompt %} | |
| {{- '<|assistant|>' }} | |
| {%- else %} | |
| {%- endif %} |