Instructions to use OpenDCAI/Omni-Edu-9B-FP8 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use OpenDCAI/Omni-Edu-9B-FP8 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="OpenDCAI/Omni-Edu-9B-FP8") 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("OpenDCAI/Omni-Edu-9B-FP8") model = AutoModelForMultimodalLM.from_pretrained("OpenDCAI/Omni-Edu-9B-FP8", 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 OpenDCAI/Omni-Edu-9B-FP8 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "OpenDCAI/Omni-Edu-9B-FP8" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "OpenDCAI/Omni-Edu-9B-FP8", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker
docker model run hf.co/OpenDCAI/Omni-Edu-9B-FP8
- SGLang
How to use OpenDCAI/Omni-Edu-9B-FP8 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 "OpenDCAI/Omni-Edu-9B-FP8" \ --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": "OpenDCAI/Omni-Edu-9B-FP8", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'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 "OpenDCAI/Omni-Edu-9B-FP8" \ --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": "OpenDCAI/Omni-Edu-9B-FP8", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }' - Docker Model Runner
How to use OpenDCAI/Omni-Edu-9B-FP8 with Docker Model Runner:
docker model run hf.co/OpenDCAI/Omni-Edu-9B-FP8
OmniEdu-9B-FP8
Open Foundation Models for Learning and Teaching
Paper · Project Page · GitHub · Dataset · Model Family · Citation
OmniEdu-9B-FP8 is the FP8-quantized release of OmniEdu-9B. The architecture, tokenizer, chat template and instruction-tuning data are unchanged: this checkpoint is the same model with its linear layers stored in FP8, which shrinks the weights from 17.53 GiB to 11.09 GiB and is intended for deployment on smaller GPUs and for higher-throughput serving.
This checkpoint accompanies OmniEdu: Open Foundation Models for Learning and Teaching.
Hao Liang · Qihan Lin · Meiyi Qiang · Linzhuang Sun · Hengyi Feng · Mingrui Chen · Sizhe Qiu · Wentao Zhang Peking University · University of the Chinese Academy of Sciences · Zhongguancun Academy
Quantization
Quantized with LLM Compressor into the compressed-tensors FP8_BLOCK scheme (library version 0.19.0), without calibration data:
| Targets | every Linear layer |
| Weights | FP8, symmetric, 128×128 block-wise scales |
| Activations | FP8, dynamic, 128-element group scales |
| Kept in BF16 | the whole vision tower (model.visual.*), the linear_attn.in_proj_a/b projections, and lm_head; every non-Linear module keeps its original dtype |
| Format | compressed-tensors (float-quantized), see recipe.yaml |
The vision tower, the linear-attention gating projections and the output head are deliberately left unquantized, so image encoding and output logits keep full precision.
Capabilities
An educational model needs to connect what is being taught, what the learner understands, and what to do next. OmniEdu organizes supervised fine-tuning around four complementary capabilities:
| Capability | What the model is trained to do |
|---|---|
| Subject competence | Solve K–12 problems across subjects and input formats |
| Curriculum grounding | Link questions, concepts, and solutions to curriculum standards and prerequisites |
| Diagnostic reasoning | Identify misconceptions, missing prerequisites, and gaps in learner understanding |
| Pedagogical action and scaffolding | Give targeted feedback, ask guiding questions, explain, and adapt instructional support |
The training mixture contains 69,999 instruction examples and 15.96M supervised response tokens, drawn from more than 100 sources: 60,951 education-specific examples and 9,048 general-purpose examples, with 20 task-specific system instructions. The models use full-parameter supervised fine-tuning with a 32,768-token training sequence length.
Model family
| Checkpoint | Scale | Weights | Backbone reported in the paper |
|---|---|---|---|
| OmniEdu-4B | 4B | 8.46 GiB (BF16) | Qwen3.5-4B-Base |
| OmniEdu-4B-FP8 | 4B | 5.13 GiB (FP8) | Qwen3.5-4B-Base |
| OmniEdu-9B | 9B | 17.53 GiB (BF16) | Qwen3.5-9B-Base |
| OmniEdu-9B-FP8 | 9B | 11.09 GiB (FP8) | Qwen3.5-9B-Base |
| OmniEdu-27B | 27B | 50.96 GiB (BF16) | Qwen3.8-27B |
| OmniEdu-27B-FP8 | 27B | 28.30 GiB (FP8) | Qwen3.8-27B |
This repository contains OmniEdu-9B-FP8. All published checkpoints use the Qwen3_5ForConditionalGeneration architecture. Use the multimodal model class and processor shown below, including for text-only conversations.
Evaluation
OmniEdu-9B is the BF16 original and OmniEdu-9B-FP8 is this checkpoint. Higher is better; all values are percentages except LongTutor Teaching, which uses the benchmark's original score scale. WR means win rate.
| Metric ↑ | OmniEdu-9B | OmniEdu-9B-FP8 |
|---|---|---|
| K12-Bench EM | 55.46% | 55.62% |
| K12-Bench F1 | 73.68% | 73.45% |
| MathFish Acc. | 83.70% | 81.77% |
| EDUMATH MaC | 74.00% | 73.77% |
| GAOKAO-Bench Full | 93.66% | 91.09% |
| EXAMS-V Overall | 66.40% | 63.83% |
| MDK12-Bench Full | 50.80% | 49.20% |
| MathTutorBench Scaffold WR | 75.26% | 78.11% |
| MathTutorBench Scaffold-hard WR | 81.64% | 82.42% |
| TutorBench Overall | 48.16% | 48.01% |
| LongTutor Evidence | 66.63% | 69.04% |
| LongTutor Teaching | 2.66 | 2.76 |
Quick start
Transformers
Loading a compressed-tensors checkpoint needs the compressed-tensors package in addition to a recent Transformers release with Qwen3.5 support:
pip install -U torch torchvision transformers accelerate safetensors pillow compressed-tensors
import torch
from transformers import AutoProcessor, Qwen3_5ForConditionalGeneration
MODEL_ID = "OpenDCAI/Omni-Edu-9B-FP8"
processor = AutoProcessor.from_pretrained(MODEL_ID)
model = Qwen3_5ForConditionalGeneration.from_pretrained(
MODEL_ID,
dtype=torch.bfloat16,
device_map="auto",
).eval()
messages = [
{
"role": "user",
"content": [
{
"type": "text",
"text": "A Grade 7 student says summer is warmer because Earth is closer to the Sun. Identify the misconception and give a guiding question before explaining.",
}
],
}
]
inputs = processor.apply_chat_template(
messages,
add_generation_prompt=True,
tokenize=True,
return_dict=True,
return_tensors="pt",
enable_thinking=False,
).to(model.device)
with torch.inference_mode():
outputs = model.generate(**inputs, max_new_tokens=512, do_sample=False)
answer = processor.batch_decode(
outputs[:, inputs["input_ids"].shape[-1]:],
skip_special_tokens=True,
)[0]
print(answer)
For image-based questions, include an image item such as {"type": "image", "image": "/path/to/question.png"} alongside the text item in content. The processor prepares both modalities. See the official Qwen3.5 Transformers documentation for supported input formats.
Chat template: Training uses qwen3_5_nothink. Keep enable_thinking=False when formatting prompts to match the training setup. The 32,768-token length reported above is the training sequence length, not a measured guarantee of long-context performance.
vLLM
FP8 is the native deployment path for this format, and vLLM loads compressed-tensors checkpoints directly:
pip install -U vllm
vllm serve OpenDCAI/Omni-Edu-9B-FP8 \
--served-model-name omniedu \
--dtype bfloat16 \
--tensor-parallel-size 1 \
--max-model-len 32768 \
--reasoning-parser qwen3 \
--default-chat-template-kwargs '{"enable_thinking": false}'
Set --tensor-parallel-size to the number of GPUs used for the model, and reduce --max-model-len if memory is tight. See the vLLM example in the project repository for the request format.
Prompting for educational tasks
State the learner's grade, topic, prior attempt, and the kind of support you want. For example:
- Activity planning: “Design a 30-minute Grade 7 technology activity about electrical circuits using batteries, wires, and LEDs. Include learning objectives and questions to check understanding.”
- Learner diagnosis: “A student says 1/8 is greater than 1/6 because 8 is greater than 6. Identify the misconception and suggest a question that helps them reconsider.”
- Guided tutoring: “Help me solve x² − 5x + 6 = 0. Give one hint at a time and wait for my response.”
Training data
The quantization does not change the training data. Load the released instruction mixture from Hugging Face:
pip install -U datasets
from datasets import load_dataset
train = load_dataset(
"OpenDCAI/Omni-Edu",
split="train",
)
print(train)
The dataset covers curriculum grounding, problem solving, diagnosis, tutoring, and general instruction. Please follow the licenses and usage terms of the component datasets and source materials.
Training details
Full-parameter supervised fine-tuning uses LLaMA-Factory, BF16 precision, and the qwen3_5_nothink template, with a maximum training sequence length of 32,768 tokens. See the paper's training configuration for the full setup. The FP8 release was produced by post-training quantization of the resulting checkpoint, as described above.
Checkpoint training hyperparameters and framework versions
The following hyperparameters were used during training:
- learning_rate: 5e-06
- train_batch_size: 1
- eval_batch_size: 8
- seed: 42
- distributed_type: multi-GPU
- num_devices: 8
- gradient_accumulation_steps: 8
- total_train_batch_size: 64
- total_eval_batch_size: 64
- optimizer: Use OptimizerNames.ADAMW_TORCH_FUSED with betas=(0.9,0.999) and epsilon=1e-08 and optimizer_args=No additional optimizer arguments
- lr_scheduler_type: cosine
- lr_scheduler_warmup_steps: 0.1
- num_epochs: 3.0
Framework versions
- Transformers 5.2.0
- Pytorch 2.10.0
- Datasets 4.0.0
- Tokenizers 0.22.2
Intended use and limitations
OmniEdu is intended for educational research, teacher-assistance tools, and learning-support prototypes. Models may produce incorrect solutions, unsupported curriculum mappings, or unsuitable instructional guidance. Educators should review generated material before using it with learners. Benchmark results do not establish improvements in classroom learning outcomes, and performance can vary by subject, curriculum, language, and image quality. Post-training quantization can shift results relative to the BF16 checkpoint; measure on your own workload before relying on the FP8 release in production.
Citation
If you use OmniEdu models or data in your research, please cite:
@misc{liang2026omniedu,
title = {OmniEdu: Open Foundation Models for Learning and Teaching},
author = {Hao Liang and Qihan Lin and Meiyi Qiang and Linzhuang Sun and Hengyi Feng and Mingrui Chen and Sizhe Qiu and Wentao Zhang},
year = {2026},
eprint = {2609.23088},
archivePrefix = {arXiv},
primaryClass = {cs.CL},
url = {https://arxiv.org/abs/2609.23088}
}
Feedback
We welcome classroom use cases, bug reports, and community contributions. Please open a discussion in this model's Community tab or an issue in the project repository.
- Downloads last month
- 48