Text Generation
Transformers
Safetensors
English
diffusion_gemma
image-text-to-text
diffusion-language-model
generative-ui
openui
openui-lang
gemma
conversational
Instructions to use thesysdev/OUI-1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use thesysdev/OUI-1 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="thesysdev/OUI-1") 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("thesysdev/OUI-1") model = AutoModelForMultimodalLM.from_pretrained("thesysdev/OUI-1", 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 thesysdev/OUI-1 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "thesysdev/OUI-1" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "thesysdev/OUI-1", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/thesysdev/OUI-1
- SGLang
How to use thesysdev/OUI-1 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 "thesysdev/OUI-1" \ --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": "thesysdev/OUI-1", "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 "thesysdev/OUI-1" \ --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": "thesysdev/OUI-1", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use thesysdev/OUI-1 with Docker Model Runner:
docker model run hf.co/thesysdev/OUI-1
card: real step sweep, serve line without ignored hf-overrides
Browse files
README.md
CHANGED
|
@@ -42,7 +42,7 @@ oui-1 are committed to the benchmark repo so the number can be rescored offline.
|
|
| 42 |
|
| 43 |
| Model | Active params | Complete runs |
|
| 44 |
|---|---|---|
|
| 45 |
-
| **oui-1** (this model,
|
| 46 |
| Gemma 4 31B | 31B | 86/184 (46.7%) |
|
| 47 |
| Phi-4 14B | 14B | 81/184 (44.0%) |
|
| 48 |
| Gemma 4 26B-A4B (autoregressive twin) | 4B | 55/184 (29.9%) |
|
|
@@ -60,16 +60,17 @@ channel in 167 of 184 outputs and the ones that think complete at the same rate.
|
|
| 60 |
On 100 fresh briefs written after training in the same numbered register (never seen by the
|
| 61 |
model, one generation each, internal scorer): 69/100.
|
| 62 |
|
| 63 |
-
Speed,
|
| 64 |
wall-clock from request to last byte including the ~5k-token prompt), all 46 benchmark briefs,
|
| 65 |
median per band: lightest screens (~9 statements) 1.0 s, light (~15) 1.5 s, medium (~30) 2.8 s,
|
| 66 |
dense (~46) 4.6 s, densest (~64) 5.7 s; across the 46, median 2.6 s, p90 5.7 s, about 206
|
| 67 |
completion tokens per second of wall-clock (250 to 360 tokens per second after the first canvas).
|
| 68 |
The sampler stops early on its own (15 to 23 denoising steps per 256-token canvas on average), so
|
| 69 |
-
|
| 70 |
-
|
| 71 |
-
|
| 72 |
-
|
|
|
|
| 73 |
|
| 74 |
## What it was trained on
|
| 75 |
|
|
@@ -84,13 +85,15 @@ teacher-written answer to them. The training set is not released.
|
|
| 84 |
|
| 85 |
## How to use
|
| 86 |
|
| 87 |
-
Serve with vLLM
|
| 88 |
-
|
|
|
|
|
|
|
|
|
|
| 89 |
|
| 90 |
```bash
|
| 91 |
vllm serve thesysdev/OUI-1 --trust-remote-code --max-model-len 16384 --quantization fp8 \
|
| 92 |
-
--served-model-name oui-1 \
|
| 93 |
-
--hf-overrides '{"diffusion_sampler":"entropy_bound","diffusion_entropy_bound":0.1,"diffusion_max_denoising_steps":64}' \
|
| 94 |
--enable-auto-tool-choice --tool-call-parser gemma4
|
| 95 |
```
|
| 96 |
|
|
|
|
| 42 |
|
| 43 |
| Model | Active params | Complete runs |
|
| 44 |
|---|---|---|
|
| 45 |
+
| **oui-1** (this model, 48 denoising steps) | 4B | **132/184 (71.7%)** |
|
| 46 |
| Gemma 4 31B | 31B | 86/184 (46.7%) |
|
| 47 |
| Phi-4 14B | 14B | 81/184 (44.0%) |
|
| 48 |
| Gemma 4 26B-A4B (autoregressive twin) | 4B | 55/184 (29.9%) |
|
|
|
|
| 60 |
On 100 fresh briefs written after training in the same numbered register (never seen by the
|
| 61 |
model, one generation each, internal scorer): 69/100.
|
| 62 |
|
| 63 |
+
Speed, 48 denoising steps, single request on one A100 80GB (vLLM 0.24 FP8, entropy-bound sampler,
|
| 64 |
wall-clock from request to last byte including the ~5k-token prompt), all 46 benchmark briefs,
|
| 65 |
median per band: lightest screens (~9 statements) 1.0 s, light (~15) 1.5 s, medium (~30) 2.8 s,
|
| 66 |
dense (~46) 4.6 s, densest (~64) 5.7 s; across the 46, median 2.6 s, p90 5.7 s, about 206
|
| 67 |
completion tokens per second of wall-clock (250 to 360 tokens per second after the first canvas).
|
| 68 |
The sampler stops early on its own (15 to 23 denoising steps per 256-token canvas on average), so
|
| 69 |
+
the step cap matters little above 32: on the public protocol 32 steps score 134/184, 48 (the
|
| 70 |
+
checkpoint default, used for every number here) 132/184, 64 steps 126/184; 16 steps collapse to
|
| 71 |
+
59/184 because the forced commit breaks the wiring. Four concurrent requests give about 54 screens
|
| 72 |
+
a minute at 170 aggregate tokens per second; on short screens the prompt prefill dominates and
|
| 73 |
+
does not batch well.
|
| 74 |
|
| 75 |
## What it was trained on
|
| 76 |
|
|
|
|
| 85 |
|
| 86 |
## How to use
|
| 87 |
|
| 88 |
+
Serve with vLLM 0.24 or newer. The sampler settings come from the checkpoint's own
|
| 89 |
+
`generation_config.json` (entropy-bound sampler, entropy bound 0.1, 48 denoising steps, 256-token
|
| 90 |
+
canvas); every number above was measured with them. To change the step cap use
|
| 91 |
+
`--diffusion-config '{"canvas_length":256,"max_denoising_steps":N}'`; note that `--hf-overrides`
|
| 92 |
+
keys such as `diffusion_max_denoising_steps` are not read by vLLM.
|
| 93 |
|
| 94 |
```bash
|
| 95 |
vllm serve thesysdev/OUI-1 --trust-remote-code --max-model-len 16384 --quantization fp8 \
|
| 96 |
+
--served-model-name oui-1 --max-num-seqs 4 \
|
|
|
|
| 97 |
--enable-auto-tool-choice --tool-call-parser gemma4
|
| 98 |
```
|
| 99 |
|