AesCode-32B-4bit / README.md
cuttie1979's picture
Add MLX 4-bit conversion of microsoft/AesCode-32B (affine, group 64, text quantized, vision bf16)
ae146f7 verified
|
Raw History Blame Contribute Delete
1.99 kB
metadata
license: apache-2.0
base_model: microsoft/AesCode-32B
tags:
  - mlx
  - mlx-vlm
  - qwen3_vl
  - 4-bit
  - image-text-to-text
  - code-generation
  - html
  - design
library_name: mlx-vlm
pipeline_tag: image-text-to-text
language:
  - en

AesCode-32B-4bit (MLX)

MLX 4-bit quantization of microsoft/AesCode-32B for Apple Silicon.

AesCode generates information-rich visual artifacts (slides, posters, dashboards) as structured, editable HTML/CSS, using an image generated from the same prompt as an aesthetic reference. It starts from Qwen3-VL-32B-Instruct and is trained with cold-start SFT + GDPO across seven reward channels.

Conversion

  • Tool: mlx-vlm (convert), affine quantization
  • Text model: uniform 4-bit, group size 64 (~4.7 GB/s avg bits 4.705 incl. bf16 vision tower)
  • Vision tower: unquantized (bf16)
  • Context: 262,144 tokens
  • Size: ~19.7 GB (4 shards)
  • Note: the original 0.7.1-era conversion omitted the quantization dict in config.json; it was reconstructed and verified. Recommended loaders: mlx-vlm >= 0.7.6 or oMLX >= 0.7.0.

Usage

pip install mlx-vlm
python -m mlx_vlm generate --model cuttie1979/AesCode-32B-4bit \
  --prompt "Describe this layout" --image reference.png --max-tokens 4096

Serving with oMLX: place the checkpoint in your model directory and restart, then call the OpenAI-compatible /v1/chat/completions.

Reference images

AesCode was trained with an optional reference image for layout/style guidance. Quality is highest with a reference, but the model degrades gracefully without one (−1.0 Visual point measured on AesCode-8B vs −19.6 for the backbone).

License

Apache 2.0, following microsoft/AesCode-32B. See the upstream model card for the training details and citation (AesCode: Aesthetic Code Generation with Decoupled Cross-Modal Rewards, under review 2027).