Instructions to use omida-ai/omida-r2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use omida-ai/omida-r2 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="omida-ai/omida-r2") 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("omida-ai/omida-r2") model = AutoModelForMultimodalLM.from_pretrained("omida-ai/omida-r2", 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 omida-ai/omida-r2 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "omida-ai/omida-r2" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "omida-ai/omida-r2", "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/omida-ai/omida-r2
- SGLang
How to use omida-ai/omida-r2 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 "omida-ai/omida-r2" \ --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": "omida-ai/omida-r2", "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 "omida-ai/omida-r2" \ --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": "omida-ai/omida-r2", "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 omida-ai/omida-r2 with Docker Model Runner:
docker model run hf.co/omida-ai/omida-r2
Omida R2 Research Candidate
Omida R2 is a post-trained research artifact built from Qwen/Qwen3.5-9B at commit c202236235762e1c871ad0ccb60c8ee5ba337b9a. It is not trained from scratch. The base checkpoint's Apache-2.0 license is included in this directory; source datasets retain their upstream licenses and attribution in data/r2/provenance.jsonl.
Method
Text-only NF4 QLoRA supervised fine-tuning (r2-sft-001) followed by two TRL GRPO passes (r2-grpo-001, r2-grpo-002) using procedurally generated arithmetic prompts and an exact-integer reward. The merged weights are BF16 safetensors; the tested local runtime loads them with NF4 double quantization and BF16 compute.
Small local evaluation (not broad superiority)
| Suite | Untouched Qwen3.5-9B | Omida R1 merged | Omida R2 merged |
|---|---|---|---|
| Omida Operator Eval, 30 tasks | 29/30 | 29/30 | 27/30 |
| Fixed GSM8K test subset, 30 tasks | 20/30 | 22/30 | 27/30 |
| Held-out xLAM exact JSON calls, 100 tasks | 68/100 | 67/100 | 79/100 |
| Generated exact arithmetic, 64 tasks | 59/64 | not run | 51/64 |
R2 shows promising gains over the base model on the measured GSM8K subset and held-out exact JSON tool-call set. The tool-call evaluation measures serialization and argument correctness, rather than runtime tool execution. These evaluations are small and task-specific: operator completion and generated arithmetic scores are lower than the base model, and broader coding, agentic, and hallucination-rate improvements have not yet been established.
Local use
From the repository root, use the included NF4 inference config:
.venv\Scripts\python.exe inference\run_omida.py --config inference\r2_config.json
Training configs, adapters, checkpoints, evaluation outputs, and reproducibility logs are retained in the repository under configs/, runs/, and eval/omida-r2/. See reports/FINAL_REPORT.md for complete lineage and limitations.
- Downloads last month
- 34