Model reference · open weights

AesCode

LLMs microsoft Vision + text 2 builds Open weights 8 dl/mo

AesCode is an open-weight language model from microsoft. AesCode-8B (BF16) weighs 17.5 GB; the smallest configuration that runs it is 2× RTX 3060 12 GB.

For self-hosting, compare this build's requirements below with the GPU you plan to rent.

  • AesCode-32B is a 33.4B parameter image-text-to-text model by Microsoft that generates editable HTML and CSS artifacts like slides and dashboards.
  • It supports a 262144 token context and operates in English under the Apache 2.0 license.

Summary of the microsoft/AesCode-32B model card, 2026-10-12. The estimate below is for another build of the family.

What it is

Released bymicrosoft
Released2026-09-29
Parameters33.4B
VRAM17.5 GB for the weights

What it runs on

Memory and cards for AesCode-8B (BF16)

17.5 GBweights, file size
147 MBcache per 1K tokens
2.0 GBruntime overhead, at least
262,144 tokenscontext max
CardRequests at onceContext maxMemory
8K each32K each
RTX 3060 12 GB … RTX 4060 Ti 16 GB
2 smaller cards
RTX 3090 24 GB325K23.4 GB
RTX 4090 24 GB325K23.4 GB
RTX 5090 32 GB9275K31.0 GB
L40S 48 GB205161K44.0 GB
A100 80 GB4812all 256K78.2 GB
H100 80 GB4411all 256K78.1 GB
RTX PRO 6000 Blackwell 96 GB5714all 256K93.8 GB
DGX Spark (GB10) 128 GB unified6917all 256K107 GB
H200 141 GB9423all 256K138 GB
B200 180 GB12531all 256K176 GB
2× RTX 3060 12 GB
tensor parallel
110K11.6 GB a card
2× RTX 4060 Ti 16 GB
tensor parallel
7160K15.4 GB a card
2× RTX 4090 24 GB
tensor parallel
205166K23.4 GB a card
2× RTX 3090 24 GB
tensor parallel
205166K23.4 GB a card
Memory needed at each load
Requests at once8K tokens each32K tokens each
120.8 GB24.4 GB
525.6 GB43.7 GB
829.2 GB58.2 GB
1638.9 GB96.9 GB
3258.2 GB174 GB
6496.9 GB329 GB

One card, with vLLM's small-card settings.

Builds

Sizes, precisions & builds

BuildParamsPrecisionWeightsSmallest setup
AesCode-32B ↗ 33.4BBF16 66.7 GBH100 80 GB
AesCode-8B (above) ↗ 8.8BBF16 17.5 GB2× RTX 3060 12 GB

From the model card

What microsoft says about AesCode

Read 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.

  • 📄 Paper: AesCode: Aesthetic Code Generation with Decoupled Cross-Modal Rewards
  • 💻 Code: https://github.com/microsoft/AesCode
  • 🤗 Companion model: microsoft/AesCode-8B

Intended Use

AesCode 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.

Results

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.

ModelRef.TextBoundChartRuleContentLayoutStyleVisualOverall
GPT-5.5No88.6786.1882.8585.9079.2768.0952.8066.7276.31
GPT-5.5Yes89.2286.8581.3585.8082.4489.9357.9176.7681.28
Claude Opus 4.8No91.4085.0387.6988.0484.9864.8846.7265.5376.78
Claude Opus 4.8Yes92.4584.4373.7583.5586.4289.7655.5177.2380.39
Qwen3-VL-8BNo58.3277.2343.3059.6138.3323.9713.2225.1742.39
Qwen3-VL-8BYes64.0770.9942.3559.1452.9051.3329.9244.7251.93
Qwen3-VL-32BNo66.0080.3141.3662.5549.8134.8519.3434.6748.61
Qwen3-VL-32BYes71.1979.6150.7767.1962.0464.5938.4355.0261.10
AesCode-8BYes94.0688.3687.7990.0786.4187.8053.2175.8082.94
AesCode-32BYes95.3497.2790.3794.3385.7690.5855.9977.4485.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.

Usage

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.

© 2026 AxForge · EU-hosted AI infrastructure Pricing Docs Trust Privacy Terms