gudo7208/CAD-Coder is a 7.6 billion parameter language model, fine-tuned from Qwen2.5-7B-Instruct, specifically designed for text-to-CAD generation. It reformulates this task into generating CadQuery Python scripts, utilizing a two-stage training pipeline involving Supervised Fine-Tuning and Reinforcement Learning with geometric rewards. This model excels at creating accurate 3D models from natural language descriptions, supporting complex CAD structures through Chain-of-Thought reasoning.
Loading preview...
CAD-Coder: Text-to-CAD Generation
CAD-Coder is a specialized 7.6 billion parameter model, based on Qwen2.5-7B-Instruct, engineered for generating CadQuery Python code from natural language descriptions. It addresses the challenge of text-to-CAD by focusing on parametric CAD language generation, enabling the creation of precise 3D models.
Key Capabilities
- CadQuery Script Generation: Translates natural language into executable CadQuery Python code.
- Two-Stage Training: Employs Supervised Fine-Tuning (SFT) for syntax learning and Reinforcement Learning (GRPO) for optimizing geometric accuracy.
- Geometric Reward Optimization: Utilizes CAD-specific rewards, including Chamfer Distance and Format Reward, to enhance 3D model precision.
- Chain-of-Thought (CoT) Reasoning: Facilitates the generation of complex CAD structures by breaking down intricate designs.
- Diverse CAD Operations: Supports a wide range of CAD functionalities beyond basic sketch-extrusion.
Performance Highlights
CAD-Coder demonstrates superior performance in geometric accuracy compared to other methods like Text2CAD, achieving a significantly lower Mean Chamfer Distance (6.54 vs 29.29, where lower is better) and Median Chamfer Distance (0.17 vs 0.37).
Good For
- Developers and engineers requiring automated generation of parametric CAD models from text.
- Applications involving complex 3D design and prototyping where precise geometric output is critical.
- Research into text-to-code generation, particularly within the CAD domain.