Text-to-Text (LLM Diffusion)

Generate text through iterative refinement with SGLang diffusion language models
以 Markdown 格式查看

Diffusion Language Models generate text through iterative refinement rather than autoregressive token-by-token generation. The model starts with masked tokens and progressively replaces them with predictions, refining low-confidence tokens each step. See the Diffusion Overview for backend setup.

LLM diffusion is auto-detected: when --dllm-algorithm is set, the worker automatically uses DiffusionWorkerHandler without needing a separate flag. For more details on diffusion algorithms, see the SGLang Diffusion Language Models documentation.

Launch

cd $DYNAMO_HOME/examples/backends/sglang
./launch/diffusion_llada.sh

See the launch script for configuration options.

Generate Text

curl -X POST http://localhost:8001/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{
"model": "inclusionAI/LLaDA2.0-mini-preview",
"messages": [{"role": "user", "content": "Explain why Roger Federer is considered one of the greatest tennis players of all time"}],
"temperature": 0.7,
"max_tokens": 512
}'

See Also