Instructions to use AuroraAI-Research/Aurora2-400M-A20M-SFT with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use AuroraAI-Research/Aurora2-400M-A20M-SFT with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="AuroraAI-Research/Aurora2-400M-A20M-SFT", 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("AuroraAI-Research/Aurora2-400M-A20M-SFT", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use AuroraAI-Research/Aurora2-400M-A20M-SFT with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "AuroraAI-Research/Aurora2-400M-A20M-SFT" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "AuroraAI-Research/Aurora2-400M-A20M-SFT", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/AuroraAI-Research/Aurora2-400M-A20M-SFT
- SGLang
How to use AuroraAI-Research/Aurora2-400M-A20M-SFT 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 "AuroraAI-Research/Aurora2-400M-A20M-SFT" \ --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": "AuroraAI-Research/Aurora2-400M-A20M-SFT", "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 "AuroraAI-Research/Aurora2-400M-A20M-SFT" \ --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": "AuroraAI-Research/Aurora2-400M-A20M-SFT", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use AuroraAI-Research/Aurora2-400M-A20M-SFT with Docker Model Runner:
docker model run hf.co/AuroraAI-Research/Aurora2-400M-A20M-SFT
Aurora2-400M-A20M-SFT
This is the chat-tuned version of Aurora2-400M-A20M, our pretrained base model.
It was fine-tuned for 5B tokens to follow a simple User: / Assistant: format and to stop cleanly after its reply,
while a large share of replayed pretraining-style data keeps the base model's abilities intact.
| Architecture | Sparse MoE, 12 layers, 32 experts (top-1) + shared expert, GQA, n-gram hash embeddings |
| Parameters | 399.6M total / 19.1M active |
| Context | 2048 tokens |
| Vocabulary | 16,384 (byte-level BPE, digits split) |
| SFT budget | 5B tokens |
| Weights | FP32 (repo root), FP16 (fp16/), BF16 (bf16/) |
| License | Apache-2.0 |
Results
Held-out loss after SFT, measured on the same validation sets as for the base model (lower is better):
| Validation set | Base loss (ppl) | SFT loss (ppl) | Change |
|---|---|---|---|
| Conversations (assistant tokens only) | 1.505 (4.50) | 1.254 (3.51) | -0.251 |
| Math QA | 0.781 (2.18) | 0.738 (2.09) | -0.044 |
| ClimbMix (general web text) | 2.566 (13.02) | 2.612 (13.63) | +0.046 |
- Conversational loss drops sharply, as intended.
- Math improves slightly, helped by math replay data in the SFT mixture.
- General web-text loss rises only marginally (+0.046 nats), and we saw no degradation on the base model's completion benchmarks, the chat ability was added without losing the base capabilities.
- All 32 experts stayed in use in every layer (0 dead experts).
Prompt format
[System: <system prompt>\n\n]User: <message>\n\nAssistant:
Each assistant turn ends with the EOS token (<|eos|>, id 1). For multi-turn chats, append the previous assistant reply
plus EOS, then \n\nUser: ...\n\nAssistant:. Generation stops at EOS (or BOS). The tokenizer ships a chat template that
renders exactly this format and already includes BOS, so call apply_chat_template(..., tokenize=True) directly.
Usage
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
repo = "AuroraAI-Research/Aurora2-400M-A20M-SFT"
tok = AutoTokenizer.from_pretrained(repo)
model = AutoModelForCausalLM.from_pretrained(repo, trust_remote_code=True, device_map="auto")
# half-precision variants: subfolder="bf16" or subfolder="fp16"
messages = [{"role": "user", "content": "Can you explain what photosynthesis is in simple terms?"}]
enc = tok.apply_chat_template(messages, tokenize=True, return_dict=True, return_tensors="pt")
ids = enc["input_ids"].to(model.device)
out = model.generate(input_ids=ids, do_sample=True, temperature=0.7, top_k=40, repetition_penalty=1.1, max_new_tokens=160)
print(tok.decode(out[0, ids.shape[1]:], skip_special_tokens=True))
Training
- Start: AuroraAI-Research/Aurora2-400M-A20M (100B-token pretraining, Muon + AdamW).
- Data mix: about half conversations (SmolTalk, UltraChat; loss on assistant tokens only, EOS after every reply), half replay of pretraining-style data (ClimbMix, FineMath, Wikipedia, math QA).
- Packing: conversations are never split across sequences; web text fills the gaps.
- Optimization: Muon for hidden matrices and AdamW for the rest, peak LR 3e-4 with warmup and cosine decay, 262k tokens per step.
Limitations
With 19M active parameters the model is fluent and often helpful on simple requests, but it makes factual and arithmetic mistakes, can ramble, and has no safety tuning. It is a research model, not for production use.
- Downloads last month
- 225
Model tree for AuroraAI-Research/Aurora2-400M-A20M-SFT
Base model
AuroraAI-Research/Aurora2-400M-A20M