Title: Tiny-CAD-Coder: Leveraging Pre-trained Code Models for Improved CAD Generation
Primary area: generative models
Keywords: Generative AI, Computer-Aided Design, CAD generation, engineering design automation

Abstract: Generative methods for Computer-Aided Design (CAD) are an emerging challenge with broad implications in engineering and manufacturing. Prior work has used direct tokenization or JSON representations and fine-tuned large language models (LLMs), but these approaches are limited to the text and image modalities of the LLM, rely on expensive feedback loops, and struggle with validity. We argue that CAD is inherently code-like: it consists of ordered command sequences with variable parameters, closely resembling programming languages. Building on this insight, we introduce Tiny-CAD-Coder, a framework that fine-tunes pre-trained code models for CAD generation and adapts to diverse input modalities through prefix tuning. By representing construction histories as Python code, our method exploits the syntactic and semantic priors of code models, while prefix embeddings provide a lightweight and extensible interface to condition on B-Rep, text, images, or other structured inputs that are not covered by LLMs used in prior works. Our experiments show that a 1B parameter code model matches or outperforms fine-tuned 7B-parameters LLMs and multi-shot prompting with 450B models. We also contribute a dataset of CAD code samples derived from Omni-CAD. Our results establish code models with prefix tuning as an efficient and general foundation for multi-modal CAD generation tasks.

TL;DR: By representing CAD as code and using prefix tuning, we are able to condition on new modalities compared to other publications while our 1B-parameter model matches or surpasses much larger LLMs, establishing  efficient multi-modal CAD generation.