How to use from
OpenClaw
Start the MLX server
# Install MLX LM:
uv tool install mlx-lm
# Start a local OpenAI-compatible server:
mlx_lm.server --model "divinetribe/AesCode-8B-MLX-bf16"
Configure OpenClaw
# Install OpenClaw:
npm install -g openclaw@latest
# Register the local server and set it as the default model:
openclaw onboard --non-interactive --mode local \
  --auth-choice custom-api-key \
  --custom-base-url http://127.0.0.1:8080/v1 \
  --custom-model-id "divinetribe/AesCode-8B-MLX-bf16" \
  --custom-provider-id mlx-lm \
  --custom-compatibility openai \
  --custom-text-input \
  --accept-risk \
  --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
Quick Links

AesCode-8B โ€” Vision + Code (bf16, MLX)

Full-precision bf16 MLX conversion of Microsoft's AesCode-8B, with the vision tower kept intact so it reads a design or screenshot and writes the HTML/CSS back on Apple Silicon. No quantization: every weight is the original bf16. 750 tensors, 17.5 GB, four shards.

This is the full-quality build. Smaller sizes that passed the same vision check: 8-bit (about half the size, for 16 GB machines) ยท 4-bit (smallest, for 8 GB machines).

AesCode generates information-rich visual artifacts (slides, posters, dashboards, reports) as structured, editable, verifiable HTML/CSS. It starts from Qwen3-VL-8B-Instruct and is trained with cold-start SFT followed by GDPO across seven reward channels, separating semantic requirements from visual cues through graph-structured supervision and decoupled cross-modal rewards.

What it is

  • Base: Qwen/Qwen3-VL-8B-Instruct (Qwen team).
  • Source checkpoint: microsoft/AesCode-8B (Apache-2.0).
  • Architecture: Qwen3VLForConditionalGeneration โ€” a qwen3_vl vision tower feeding the qwen3_vl_text decoder. 8.8B parameters.
  • This repo: bf16 MLX weights, vision kept, for mlx-vlm.
  • Other sizes: 8-bit ยท 4-bit.

Running it (MLX)

from mlx_vlm import load, generate
from mlx_vlm.prompt_utils import apply_chat_template

model, processor = load("divinetribe/AesCode-8B-MLX-bf16")
prompt = apply_chat_template(processor, model.config,
                             "Rebuild this screenshot as a single HTML file.", num_images=1)
print(generate(model, processor, prompt, image=["design.png"], max_tokens=1024))

Text-only works with num_images=0 and no image= argument.

Worked vision example โ€” pose-match QC

A real frame from a motion game (a translucent target avatar drawn over a live camera scene) was fed to this converted bf16 model, asking whether the drawn figure is a correct human pose and whether any limbs are extra or wrong. The model's unedited on-device answer:

The translucent avatar shows a standing human pose. Arms are bent at the sides, elbows slightly raised, hands near the waist. Legs are straight with knees slightly bent, feet flat on the ground. The torso is upright, and the head is centered. No extra limbs or reversed joints are visible. Overall, the pose is anatomically plausible for a neutral standing position.

This is grounded in the actual pixels: it reads the translucency of the overlay, the single standing figure, the bent elbows and bent knees, feet flat and head centered, and correctly answers the core QC question โ€” no extra limbs and no reversed joints. It placed the hands at the waist rather than up in a full guard, so it is a genuine, imperfect QC read, shown unedited. The same vision path that reads this frame also reads a design or screenshot and writes alt-text and the HTML/CSS back, which is what AesCode is built for.

Benchmarks

The single most reputable benchmark that genuinely applies is AesCode's own evaluation from the paper (AesCode: Aesthetic Code Generation with Decoupled Cross-Modal Rewards, arXiv:2610.18860): 300 infographic prompts scored on a programmatic Rule track (Text, Bound, Chart) and a Visual checklist (Content, Layout, Style), with Overall the mean of the two, averaged over three generations with no selection. AesCode-8B reaches Overall 82.94 and Rule 90.07, improving Visual over its reference-conditioned Qwen3-VL-8B backbone by 31.1 points; the paper reports this 8B result exceeding the reference-conditioned GPT-5.5 (81.28) and Claude Opus 4.8 (80.39) rows in the same table. All numbers are quoted from the AesCode paper and model card, not invented.

Credits

Enormous thanks to the people whose work this conversion simply repackages:

  • The Microsoft AesCode authors โ€” Xin Gao, Yifan Yang, Xin Li, Pan Wang, Yan Li, Muzhao Tian, Mingxi Cheng, Bei Liu, Kai Qiu, Qi Dai, Dong Chen, Yue Dong, Leandros Tassiulas, Rex Ying, Ji Li, and Chong Luo โ€” who built and released AesCode-8B under Apache-2.0: model ยท paper ยท project page ยท code.
  • The Qwen team at Alibaba โ€” for the Qwen3-VL-8B-Instruct base and the Qwen3-VL vision-language architecture.
  • Prince Canuma and the mlx-vlm project, and the Apple MLX team, for the tooling that makes vision-language models run natively on Apple Silicon.

The conversion to bf16 MLX is the only work done here. All model quality is theirs.


Part of Claude Code Local

This model is one of the fighters in Claude Code Local (3.2kโ˜…), which runs Claude Code 100% on-device on Apple Silicon through an MLX-native Anthropic-API server. Not sure which local model to run as an agent? Check the Agent-12 local agent leaderboard: real agent tasks, judged by the filesystem, same hardware for every row.

Built by Matt Macosko in Humboldt, CA. Open to work on local-AI and Apple Silicon inference: matt@ineedhemp.com.

Downloads last month
17
Safetensors
Model size
9B params
Tensor type
BF16
ยท
MLX
Hardware compatibility
Log In to add your hardware

Quantized

Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Model tree for divinetribe/AesCode-8B-MLX-bf16

Finetuned
(1)
this model

Paper for divinetribe/AesCode-8B-MLX-bf16