Image-Text-to-Text
Transformers
Safetensors
gemma4
sglang
multimodal
mixture-of-experts
typed-classification
conversational
text-generation-inference
Instructions to use juspay/xor-omni with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use juspay/xor-omni with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="juspay/xor-omni") 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("juspay/xor-omni") model = AutoModelForMultimodalLM.from_pretrained("juspay/xor-omni", 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 juspay/xor-omni with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "juspay/xor-omni" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "juspay/xor-omni", "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/juspay/xor-omni
- SGLang
How to use juspay/xor-omni 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 "juspay/xor-omni" \ --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": "juspay/xor-omni", "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 "juspay/xor-omni" \ --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": "juspay/xor-omni", "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 juspay/xor-omni with Docker Model Runner:
docker model run hf.co/juspay/xor-omni
Add model card metadata and usage documentation
Browse files
README.md
CHANGED
|
@@ -1,11 +1,78 @@
|
|
| 1 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2 |
|
| 3 |
-
|
| 4 |
|
| 5 |
-
|
| 6 |
-
- Precision: `bfloat16`
|
| 7 |
-
- Context length: `32768`
|
| 8 |
-
- Modalities: text, image, audio, video
|
| 9 |
-
- Inference: SGLang
|
| 10 |
|
| 11 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
base_model: google/gemma-4-26B-A4B-it
|
| 4 |
+
library_name: transformers
|
| 5 |
+
pipeline_tag: image-text-to-text
|
| 6 |
+
inference: false
|
| 7 |
+
tags:
|
| 8 |
+
- sglang
|
| 9 |
+
- gemma4
|
| 10 |
+
- multimodal
|
| 11 |
+
- mixture-of-experts
|
| 12 |
+
- typed-classification
|
| 13 |
+
- conversational
|
| 14 |
+
- text-generation-inference
|
| 15 |
+
- safetensors
|
| 16 |
+
---
|
| 17 |
|
| 18 |
+
# XOR Omni
|
| 19 |
|
| 20 |
+
XOR Omni (`xor-omni`) is a multimodal decision model post-trained from [google/gemma-4-26B-A4B-it](https://huggingface.co/google/gemma-4-26B-A4B-it). It is designed for typed decision tasks and structured one-pass readout.
|
|
|
|
|
|
|
|
|
|
|
|
|
| 21 |
|
| 22 |
+
## Model details
|
| 23 |
+
|
| 24 |
+
| Field | Value |
|
| 25 |
+
|---|---|
|
| 26 |
+
| Base model | `google/gemma-4-26B-A4B-it` |
|
| 27 |
+
| Architecture | Gemma 4 multimodal mixture-of-experts |
|
| 28 |
+
| Parameters | Approximately 26B total, about 4B active per token |
|
| 29 |
+
| Released precision | BF16 |
|
| 30 |
+
| Context length | 32,768 tokens |
|
| 31 |
+
| Input modalities | Text and image |
|
| 32 |
+
| Output | Text |
|
| 33 |
+
| Runtime | SGLang |
|
| 34 |
+
| License | Apache License 2.0 |
|
| 35 |
+
| Packaging | Fully merged weights; no adapter loading is required |
|
| 36 |
+
|
| 37 |
+
## Intended use
|
| 38 |
+
|
| 39 |
+
XOR Omni is intended for typed decision workloads, including:
|
| 40 |
+
|
| 41 |
+
- Binary decisions
|
| 42 |
+
- Categorical choices
|
| 43 |
+
- Ordinal scoring
|
| 44 |
+
- Structured readout from combined text and image context
|
| 45 |
+
|
| 46 |
+
It is optimized for deterministic, one-pass decision output rather than open-ended assistant conversation.
|
| 47 |
+
|
| 48 |
+
## Quick start
|
| 49 |
+
|
| 50 |
+
Download the model:
|
| 51 |
+
|
| 52 |
+
```bash
|
| 53 |
+
hf download juspay/xor-omni --local-dir xor-omni
|
| 54 |
+
```
|
| 55 |
+
|
| 56 |
+
Example SGLang launch:
|
| 57 |
+
|
| 58 |
+
```bash
|
| 59 |
+
python -m sglang.launch_server \
|
| 60 |
+
--model-path ./xor-omni \
|
| 61 |
+
--trust-remote-code \
|
| 62 |
+
--context-length 32768 \
|
| 63 |
+
--host 0.0.0.0 \
|
| 64 |
+
--port 30000
|
| 65 |
+
```
|
| 66 |
+
|
| 67 |
+
Use the included `chat_template.jinja` when serving the model. The exact deployment configuration should be validated for your target hardware and workload.
|
| 68 |
+
|
| 69 |
+
## Limitations
|
| 70 |
+
|
| 71 |
+
- This model is specialized for typed decision tasks and is not intended as a general-purpose assistant.
|
| 72 |
+
- Multimodal behavior should be validated on your own data before production use.
|
| 73 |
+
- Performance may vary with prompt format, context length, hardware, and serving configuration.
|
| 74 |
+
- This repository contains merged model weights only; training scripts, adapters, benchmark artifacts, and logs are intentionally not included.
|
| 75 |
+
|
| 76 |
+
## License
|
| 77 |
+
|
| 78 |
+
This model is released under the Apache License 2.0, inherited from the base Gemma 4 checkpoint.
|