Instructions to use divinetribe/AesCode-8B-MLX-8bit with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use divinetribe/AesCode-8B-MLX-8bit with MLX:
# Make sure mlx-vlm is installed # pip install --upgrade mlx-vlm from mlx_vlm import load, generate from mlx_vlm.prompt_utils import apply_chat_template from mlx_vlm.utils import load_config # Load the model model, processor = load("divinetribe/AesCode-8B-MLX-8bit") config = load_config("divinetribe/AesCode-8B-MLX-8bit") # Prepare input image = ["http://images.cocodataset.org/val2017/000000039769.jpg"] prompt = "Describe this image." # Apply chat template formatted_prompt = apply_chat_template( processor, config, prompt, num_images=1 ) # Generate output output = generate(model, processor, formatted_prompt, image) print(output) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
- Pi
How to use divinetribe/AesCode-8B-MLX-8bit with Pi:
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-8bit"
Configure the model in Pi
# Install Pi: npm install -g @earendil-works/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "mlx-lm": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "divinetribe/AesCode-8B-MLX-8bit" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent
How to use divinetribe/AesCode-8B-MLX-8bit with Hermes Agent:
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-8bit"
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:8080/v1 hermes config set model.default divinetribe/AesCode-8B-MLX-8bit
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use divinetribe/AesCode-8B-MLX-8bit with 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-8bit"
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-8bit" \ --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"
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-8bit" \
--custom-provider-id mlx-lm \
--custom-compatibility openai \
--custom-text-input \
--accept-risk \
--skip-healthRun OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"AesCode-8B — Vision + Code (8-bit, MLX)
8-bit MLX quantization 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. 8.993 bits per weight, 9.2 GB, two shards, group size 64.
8-bit is about half the size, for 16 GB machines; the bf16 version is the full-quality one. This 8-bit build was put through the same pose-reading vision check as the bf16 before publishing and read the figure just as well, so the shrink held its sight.
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— aqwen3_vlvision tower feeding theqwen3_vl_textdecoder. 8.8B parameters. - This repo: 8-bit MLX weights (group size 64), vision kept, for
mlx-vlm. - Other sizes: bf16 (full quality) · 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-8bit")
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 8-bit 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, hands near the waist, and legs are straight with knees slightly bent. The torso is upright, and the head is centered. No extra limbs are visible, and joints appear anatomically placed. The pose is balanced and stable, matching a correct human standing position.
This matches the bf16 build's read: it catches the overlay's translucency, the single standing figure, the bent knees, and correctly answers the core QC question — no extra limbs and joints anatomically placed. It placed the hands at the waist rather than up in a full guard, same as bf16, so the quantization did not change its read. 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. 8-bit trades a little accuracy for size, so expect the exact scores to
move slightly. 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 quantization to 8-bit 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
- 12
8-bit
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-8bit"