Model reference · open weights
AesCode is an open-weight language model from microsoft. AesCode-32B (BF16) weighs 66.7 GB; the smallest configuration that runs it is H100 80 GB.
For self-hosting, compare this build's requirements below with the GPU you plan to rent.
Summary of the microsoft/AesCode-32B model card, 2026-10-12
What it is
| Released by | microsoft |
|---|---|
| Released | 2026-09-29 |
| Parameters | 33.4B |
| VRAM | 66.7 GB for the weights |
What it runs on
| Card | Requests at once | Context max | Memory | |
|---|---|---|---|---|
| 8K each | 32K each | |||
| RTX 3060 12 GB … L40S 48 GB 6 smaller cards | ||||
| A100 80 GB | 4 | 1 | 34K | 78.2 GB |
| H100 80 GB | 2 | 16K | 78.1 GB | |
| RTX PRO 6000 Blackwell 96 GB | 9 | 2 | 75K | 93.8 GB |
| DGX Spark (GB10) 128 GB unified | 15 | 3 | 125K | 107 GB |
| H200 141 GB | 29 | 7 | 239K | 138 GB |
| B200 180 GB | 47 | 11 | all 256K | 176 GB |
| 4× RTX 4090 24 GB tensor parallel | 8 | 2 | 67K | 23.4 GB a card |
| 4× RTX 3090 24 GB tensor parallel | 8 | 2 | 67K | 23.4 GB a card |
| 4× RTX 5090 32 GB tensor parallel | 22 | 5 | 181K | 31.0 GB a card |
| 2× H100 80 GB tensor parallel | 35 | 8 | all 256K | 78.1 GB a card |
| 2× A100 80 GB tensor parallel | 39 | 9 | all 256K | 78.2 GB a card |
| 4× L40S 48 GB tensor parallel | 46 | 11 | all 256K | 44.0 GB a card |
| Requests at once | 8K tokens each | 32K tokens each |
|---|---|---|
| 1 | 71.0 GB | 77.5 GB |
| 5 | 79.6 GB | 112 GB |
| 8 | 86.1 GB | 138 GB |
| 16 | 103 GB | 206 GB |
| 32 | 138 GB | 344 GB |
| 64 | 206 GB | 619 GB |
One card, with vLLM's small-card settings.
Builds
| Build | Params | Precision | Weights | Smallest setup |
|---|---|---|---|---|
| AesCode-32B (above) ↗ | 33.4B | BF16 | 66.7 GB | H100 80 GB |
| AesCode-8B ↗ | 8.8B | BF16 | 17.5 GB | 2× RTX 3060 12 GB |
From the model card
AesCode generates information-rich visual artifacts such as slides, posters, and dashboards as HTML/CSS. The output remains structured, editable, and verifiable, but the task poses a distinct challenge: code models cannot see how layout, hierarchy, and color come together on the canvas.
Image generators offer the opposite strength. They compose visually compelling pages but often misrender text, numbers, and logical relationships. AesCode uses an image generated from the same prompt as an aesthetic reference while following the prompt for the required content.
Reference input alone does not solve the problem. Off-the-shelf vision-language models may copy hallucinated content or ignore the reference layout. AesCode separates semantic requirements from visual cues through graph-structured supervision and decoupled cross-modal rewards.
AesCode-32B starts from Qwen3-VL-32B-Instruct and is trained with cold-start SFT followed by GDPO across seven reward channels. It is the larger released checkpoint and leads the aggregate benchmark results.
microsoft/AesCode-8BAesCode is designed to generate information-rich visual artifacts as structured HTML/CSS. It is suited for creating editable slides, posters, dashboards, and reports, as well as for research on multimodal code generation and verifiable visual design.
We evaluate on 300 infographic samples. Rule averages the programmatic Text, Bound, and Chart checks. Visual averages the Content, Layout, and Style checklist dimensions. Overall is the mean of Rule and Visual. Scores are percentages averaged over three generations per prompt with no selection.
Ref. indicates whether the model receives an image-generated reference together with the prompt. Bold marks the best score in each column and underline the second best.
| Model | Ref. | Text | Bound | Chart | Rule | Content | Layout | Style | Visual | Overall |
|---|---|---|---|---|---|---|---|---|---|---|
| GPT-5.5 | No | 88.67 | 86.18 | 82.85 | 85.90 | 79.27 | 68.09 | 52.80 | 66.72 | 76.31 |
| GPT-5.5 | Yes | 89.22 | 86.85 | 81.35 | 85.80 | 82.44 | 89.93 | 57.91 | 76.76 | 81.28 |
| Claude Opus 4.8 | No | 91.40 | 85.03 | 87.69 | 88.04 | 84.98 | 64.88 | 46.72 | 65.53 | 76.78 |
| Claude Opus 4.8 | Yes | 92.45 | 84.43 | 73.75 | 83.55 | 86.42 | 89.76 | 55.51 | 77.23 | 80.39 |
| Qwen3-VL-8B | No | 58.32 | 77.23 | 43.30 | 59.61 | 38.33 | 23.97 | 13.22 | 25.17 | 42.39 |
| Qwen3-VL-8B | Yes | 64.07 | 70.99 | 42.35 | 59.14 | 52.90 | 51.33 | 29.92 | 44.72 | 51.93 |
| Qwen3-VL-32B | No | 66.00 | 80.31 | 41.36 | 62.55 | 49.81 | 34.85 | 19.34 | 34.67 | 48.61 |
| Qwen3-VL-32B | Yes | 71.19 | 79.61 | 50.77 | 67.19 | 62.04 | 64.59 | 38.43 | 55.02 | 61.10 |
| AesCode-8B | Yes | 94.06 | 88.36 | 87.79 | 90.07 | 86.41 | 87.80 | 53.21 | 75.80 | 82.94 |
| AesCode-32B | Yes | 95.34 | 97.27 | 90.37 | 94.33 | 85.76 | 90.58 | 55.99 | 77.44 | 85.89 |
AesCode-32B improves Visual over its reference-conditioned Qwen3-VL-32B backbone by 22.4 points and Overall by 24.8. It leads the comparison on Overall at 85.89 and reaches Rule 94.33, compared with 85.90 for GPT-5.5 and 88.04 for Claude Opus 4.8.
Two results stand out. Table/Chart at 90.37 leads all models: requiring tables to use HTML table structures and charts to use ECharts constrains the solution space to executable, directly verifiable implementations. Boundary at 97.27 reflects a sharp reduction in canvas overflow: a severe boundary failure recurs on 4.3% of the 300 samples, against 34.7% for GPT-5.5.
Style is the shared ceiling for every system. It awards credit only when a design needs no further visual revision before delivery, and no model clears 60.
The model follows the Qwen3-VL chat interface and requires transformers>=4.57. Supply a
detailed content prompt and, when available, a reference image for layout and style
guidance. The weights are bf16; plan for roughly 65 GB of accelerator memory for the
parameters alone.
from transformers import AutoProcessor, AutoModelForImageTextToText
model_id = "microsoft/AesCode-32B"
processor = AutoProcessor.from_pretrained(model_id)
model = AutoModelForImageTextToText.from_pretrained(
model_id, dtype="auto", device_map="auto"
)
messages = [{
"role": "user",
"content": [
{"type": "image", "image": "reference.png"},
{"type": "text", "text": ""},
],
}]
inputs = processor.apply_chat_template(
messages, add_generation_prompt=True, tokenize=True,
return_dict=True, return_tensors="pt",
).to(model.device)
out = model.generate(
**inputs, do_sample=True, temperature=0.8, top_p=0.95, max_new_tokens=12000
)
print(processor.decode(out[0][inputs["input_ids"].shape[1]:], skip_special_tokens=True))
For batched generation, serve with vLLM and allow two images per prompt:
vllm serve microsoft/AesCode-32B --tensor-parallel-size 4 \
--limit-mm-per-prompt image=2 --max-model-len 24576
Reported scores use three rollouts per prompt at temperature 0.8, top-p 0.95, up to 12,000 output tokens and a 24,576-token context.
The model emits a complete HTML document. Tables use HTML table structures and charts use ECharts specifications, keeping both directly inspectable and verifiable.
The reference image is optional. Reference-conditioned training internalizes visual planning into the policy. Measured on AesCode-8B, withholding the reference at inference costs only 1.00 Visual point, against 19.55 for the Qwen3-VL-8B-Instruct backbone and 10.04 for GPT-5.5. Quality is still highest when a reference is supplied.
The repository provides the training prompt template and a pipeline that turns a short idea into the
Quoted from the model card on Hugging Face. The full card is behind the Hugging Face link above.