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
CMF files for cortiq (Rust, no Python): 8-bit, 4-bit and a fixed-memory Turbo; CUDA, Vulkan, Metal, CPU
Hi, and thank you for releasing Aion-1.0-Instruct under MIT.
Support for the model is out in cortiq 0.9.9, a Rust inference engine with no Python and no ML framework. The weights are packaged as single CMF files:
- infosave/Aion-1.0-Instruct-2.3B-cmf: an 8-bit file (2.31 GB) and a 4-bit GPTQ file (1.41 GB). WikiText-2 perplexity is 14.25 and 14.61 against 14.24 for Transformers bf16 on the same windows, and the greedy answers of the 8-bit file match Transformers word for word.
- infosave/Aion-1.0-Instruct-2.3B-Turbo-cmf: the 4-bit weights with a fixed-size far field for the 7 full-attention layers, so over Vulkan the card holds 3.5 GB and 80 tok/s from an 8 192-token prompt to a 30 000-token one (the standard 4-bit file: 4.6 GB and 53 tok/s at 30 000).
Measured on an NVIDIA L4 (24 GB) with the 4-bit file: 129 tok/s through CUDA and 110 tok/s over Vulkan, a 2048-token prompt read in 0.33 s. A MacBook Air M4 writes 60 tok/s through Metal. The model's own chat template and its <|tool_call|> tool calls work through the OpenAI-compatible server (cortiq serve).
cargo install cortiq-cli
hf download infosave/Aion-1.0-Instruct-2.3B-cmf Aion-1.0-Instruct-2.3B-q8_2f.cmf --local-dir .
cortiq run Aion-1.0-Instruct-2.3B-q8_2f.cmf --prompt "Summarize in three bullet points: ..."
If anything in the conversion looks off against the reference, I would be glad to hear it.