Skip to content
鱿鱼哥·AI观察· @reel_vecina · X·· 1 d agoFeaturedAI score85

Baidu Unlimited SVG Model Practical Test: 3.3B MoE Small Model Hierarchical Vector Generation and Deployment Troubleshooting Guide

Editorial summary

Baidu open-sourced the 3.3B-parameter Unlimited SVG Model (MIT License) on December 1. The author tested 7 complex images on Colab L4: vLLM 0.33.0 is required to successfully run long sequences (115-162 tokens/s).

Why it matters

The author tested 7 types of complex images on L4, providing a vLLM deployment troubleshooting guide, temperature parameter sensitivity analysis, and per-image quality verification, offering high reference value for engineering implementation.

Read original text
English translation

AI is really starting to replace artists!!! Baidu AI team's latest image generation model allows AI to have a drawing process. And it's only 3.3B in size, yet it can layer and redraw complex vector graphics of tens of thousands of tokens like an artist!

View the original video on X

Yesterday (December 1st), the Baidu Wenxin Multimodal Team open-sourced Wenxin Unlimited SVG(baidu/Unlimited-SVG, MIT License). The project's full name is very anime-style—Unlimited SVG Works: Trace On, focusing on usingtotal parameters ~3.33B, single Token activates only ~0.5B 's small MoE model, redraws 2048×2048 large images "stroke by stroke like a human artist" into clean SVG code with layer grouping and secondary editability.

Just looking at the press release is boring. I directly pulled a Colab L4 (24GB), using native transformers and the officially recommended vLLM 0.33.0 respectively, took 7 hard-core images with completely different styles that ordinary large models simply cannot produce("The Great Wave off Kanagawa", architectural floor plan CAD drawing, XKCD hand-drawn comic, Transformer original paper architecture diagram, GitHub Robotocat, city night scene photo, Firefox artistic gradient Logo) ran a full round of comprehensive testing, and also recorded the model's stroke-by-step drawing process into a time-lapse video.

Conclusion first:It truly has some skills; the finished products from city photo-to-vector, CAD floor plans, technical architecture diagrams, and flat illustrations are absurdly impressive; but the engineering deployment pitfalls and hallucination boundaries are equally very real.

1. Prying open config.json: Why do 0.5B activated parameters dare to go head-to-head with 30,000 Tokens?

Ordinary large models (such as Claude / GPT) or traditional tracing tools (VTracer) doing 'Image to SVG' each have fatal flaws:

  • VTracer: Pixels are accurate, but it spits out thousands of fragmented paths with no semantics, impossible to edit in Figma;
  • General closed-source large models: Text-to-SVG creativity is strong, but once encountering complex HD image-to-vector, either input-end high-res details get blurred, or output-end easily writes 10,000~30,000 Tokens, which is slow, high cost, and prone to truncation.

Baidu this time goes with DeepSeek-OCR architecture route(DeepseekOCRForCausalLM / deepseek_vl_v2), making reductions on both the input and output ends:

  1. Input end (DeepEncoder extreme compression): Actual test logs personally verified, the model compressed a 2048×2048 global large image (no chunking, NO PATCHES) directly into torch.Size([1, 1024, 1280])——Only 1,024 visual Tokens, while preserving fine lines, small text, and precise coordinates.
  2. Output End (Ultra-Sparse MoE Decoding): 12-layer network, 64 routing experts + 2 shared experts, only 6 experts activated per Token (~0.5B activated parameters), context window extended to 32,768(32K)。

2. First Pitfall in Deployment Testing: Never use native transformers to run long images, must use vLLM!

This is the biggest engineering takeaway from running this round of tests:

  • Native transformers (attn_implementation="eager") test: After loading the model on L4, VRAM occupied 13,740 MiB(~13.4 GB). When running "The Great Wave off Kanagawa", because the scheduling overhead of 64 MoE experts in Python eager mode is extremely high,CPU directly surged to 104%, but GPU utilization was only 48%–51%, ran for 7 minutes and still hadn't finished outputting the first image.
  • Switching to vLLM 0.33.0 (CUDA Graph FULL_DECODE_ONLY) real-world test: Model loading only 5.11 seconds(weights occupy 6.24 GiB, plus 32K KV Cache pre-allocation total VRAM stable at 17,850 ~ 18,588 MiB / 23,034 MiB), inference throughput directly soars to 114 ~ 162 tokens/s, 14 seconds to finish drawing an artistic gradient Logo!

Also attaching a Colab / minimal Linux container pitfall-avoidance switch: After installing vllm==0.33.0 + torch==2.14.0 + cu13 per official README, if ninja is not installed on the machine, vLLM will trigger flashinfer.jit compilation error and exit when initializing sampler. Adding environment variable VLLM_USE_FLASHINFER_SAMPLER=0 allows instant startup bypass.

3. Real benchmark data for 7 hardcore test images on L4 (vLLM)

4. Per-image verification: which parts are god-tier, which parts actually crash?

After re-rendering the generated .svg and comparing with original image, pros and cons are very intuitive:

  1. Most stunning: 06_City Night Traffic Real Shot & 05_GitHub RobotocatFacing a high-complexity real photo of a city nightscape, the model used 355 paths, 26 layer groups, converting the distant glass skyscraper grids, elevated traffic red and white light trails, streetlight starbursts, traffic signs, and even small cars on the road intoextremely clean flat-style vector architectural illustrations, directly editable in Illustrator with layer-based color changes.
    Robotocat also reproduces metal segments, pixel eyes, mechanical tentacle joints, and bottom shadows at near pixel-level accuracy, with no artifacts.
  1. Most essential: 02_Architectural Floor Plan CAD & 04_Transformer Architecture DiagramIt truly understands graphic semantics—the floor plan didn't turn into a mess of fragmented paths, but honestly used 90 <rect> + 95 <line> + 32 editable <text>, with living room, kitchen, stair area (16.9m²), and compass all clearly separated; the Transformer diagram also reproduced the Multi-Head Attention framework and 31 text labels in just 18 seconds.
    But upon zooming in, there are two minor flawsOn the right side of the Transformer, the top of the Decoder is missing a Feed-Forward Network box, some plus signs, and the Norm text overlaps; the BRH 87.50 annotation on the exterior wall window edge of the floor plan shows text overlapping and sticking on the right side.Conclusion: Complex engineering drawings can save 80% of redrawing man-hours, but cannot be delivered without inspection.
  1. The most hardcore A/B trap: 03_XKCD comic reveals the life-or-death line of the temperature parameterRunning the hand-drawn black-and-white comic with temperature=0 (official default greedy decoding), the model fell into an infinite loop after drawing the normal framework, continuously outputting tens of thousands of '1 1 1 1...' until hitting the 30,000 token limit and erroring out;
    Adjusting the temperature to 0.6 for the same image,The time dropped directly from 316.81 seconds to 32.10 seconds (nearly 10x faster), and it closed successfully! However, the cost was a small amount of text hallucination (writing 'import anti-gravery' instead of 'import antigravity'), and the sky also had a few extra diagonal hatch shadows.
  1. The most unexpected surprise and engineering pitfall: 01_The Great Wave off Kanagawa & 07_Firefox Art LogoIf 'The Great Wave off Kanagawa' is rendered with Python's cairosvg, the bottom half is silently lost and the spray turns into black blocks; but when put into Chromium / browser / Figma native engine After rendering, you'll find that the model actuallydrew the distant Mount Fuji, 3 fishing boats, the giant wave below, and the vertical writing-mode='vertical-rl' seal all out! Even more absurd is how well it understands engineering reuse—it defines 3 wave foam templates (foamA/B/C) in <defs>, then uses 108 <use href="..."> elements with rotation and scaling matrices to cover the wave crests and save tokens! Of course the flaws are obvious too: the 3 reused foam patterns look like "stamped textures", high-frequency brushstroke details aren't as lively as the original; additionally Don't use cairosvg for validation in the Python pipeline; you must use a browser/Headless Chromium engineotherwise you'll be hit by cairosvg's SVG 2 compatibility bugs.
    The Firefox Logo was written in just 14 seconds with only 11 paths 8 <linearGradient> + 1 <radialGradient>but the model arbitrarily added a yellow-blue glow ring at the Earth's center, and the fox tail curves are oversimplified.

5. How large is the model? Can ordinary people deploy it locally on their own computers?

After running the L4 benchmarks, the local deployment costs are crystal clear:

  • Disk space: The weight files are only about 6.67 GB(BF16), MIT license permits commercial use.
  • 8GB VRAM graphics cards (e.g., RTX 4060 Laptop / 3070):Native BF16 essentially cannot handle complex images.. In actual testing, native transformers consumes memory as soon as it loads and runs 13.4 GB VRAM(vLLM even more so 17.85~18.59 GB), 8GB cards must wait for community 4-bit/GGUF quantized versions to run, and can only handle simple graphics.
  • 12GB ~ 16GB VRAM (RTX 3060 12G / 4070 / 4080): Native transformers can barely run, but remember 64-expert MoE in transformers will have severe CPU scheduling bottlenecks, be prepared to wait several minutes for images with 10,000+ tokens.
  • 24GB VRAM (RTX 3090 / 4090 / Colab L4):Best Dessert ConfigJust use vLLM directly, stably handles 32K KV Cache + CUDA Graph, consistently achieves 115 ~ 162 tokens/s real-time speeds.
View the original video on X

Open source portal:

  • GitHub:https://github.com/baidu/Unlimited-SVG
  • Hugging Face:https://huggingface.co/baidu/Unlimited-SVG
  • Online Demo: https://unlimited-svg.github.io/demo/

Today I'm releasing these 7 sets of "stroke-by-stroke timelapse redraw videos" and "original image vs vector rendering" comparison images together. If you're also using a local GPU or need to convert UI/architecture diagrams/CAD into editable SVGs in your workflow, how would you rate this 0.5B activated parameter performance? Discuss in the comments 👇

Source: 鱿鱼哥·AI观察 · x.com

Story updates · 1

View full story