Setup
Sign in to Baseten with Truss, then install the OpenAI SDK.Sign in to Baseten
Install the OpenAI SDK
Hardware
H100
Engine
vLLM (nightly-2c9c07c8… build)
Context
8K
Concurrency
8
Write the config
Create and move into the project directory:config.yaml and paste the following:
config.yaml
RedHatAI/diffusiongemma-26B-A4B-it-FP8-dynamic checkpoint on a single H100 with vLLM built from the DiffusionGemma pull-request branch, because diffusion support has not yet landed in a vLLM release. Setting max-num-seqs to 8 and gpu-memory-utilization to 0.85 leaves the headroom that diffusion warmup needs for its logits buffers, and the deployment exposes an OpenAI-compatible chat completions endpoint under the served name google/diffusiongemma-26B-A4B-it.
Flags
Thestart_command passes these flags to the engine. Each one controls a runtime or serving behavior:
| Flag | Value | What it does |
|---|---|---|
--tensor-parallel-size | 1 | Number of GPUs to shard the model across. |
--attention-backend | TRITON_ATTN | Attention kernel backend vLLM uses. TRITON_ATTN: Triton-based attention kernels, required by some model architectures not yet supported by the default backend. |
--generation-config | vllm | Source of the default generation (sampling) settings. vllm: Use vLLM’s own defaults instead of the checkpoint’s generation_config.json. |
--hf-overrides.diffusion_sampler | entropy_bound | Sampler the diffusion language model uses to unmask tokens during denoising. |
--hf-overrides.diffusion_entropy_bound | 0.1 | Entropy threshold for the entropy-bound diffusion sampler. |
--diffusion-config.canvas_length | 256 | Number of tokens in the diffusion canvas, the block the model denoises per step. |
--enable-chunked-prefill | (no value) | Process long prompts in chunks so decode requests keep running. |
--enable-prefix-caching | (no value) | Reuse KV cache across requests that share a prefix. |
--max-model-len | 8192 | Maximum context length (tokens) the server accepts per request. |
--max-num-seqs | 8 | Maximum number of concurrent sequences in the batch. |
--gpu-memory-utilization | 0.85 | Fraction of GPU memory vLLM may use for weights and KV cache. |
--trust-remote-code | (no value) | Execute model-specific Python from the checkpoint (required for many Qwen, Phi, and custom architectures). |
Deploy
Push the config to Baseten:truss push output (abcd1234 in the example). Use it wherever you see {model_id} in the next section.
Call the model
Your deployment serves an OpenAI-compatible API. Replace{model_id} with your model ID and make sure BASETEN_API_KEY is set.
Now call your deployment to run inference:
- Python
- cURL
main.py