--- license: apache-2.0 language: - en library_name: transformers pipeline_tag: text-generation base_model: Qwen/Qwen2.5-7B-Instruct datasets: - jhlee11/FutureCAD tags: - cad - text-to-cad - code --- # FutureCAD-7B FutureCAD-7B generates CadQuery programs from text descriptions. It is based on [Qwen2.5-7B-Instruct](https://huggingface.co/Qwen/Qwen2.5-7B-Instruct). [Paper](https://arxiv.org/abs/2603.11831) · [Code](https://github.com/JohanStackk/FutureCAD) · [Dataset](https://huggingface.co/datasets/jhlee11/FutureCAD) · [BRepGround](https://huggingface.co/jhlee11/BRepGround) ## Model revisions | Model | Revision | Training stage | |---|---|---| | [FutureCAD-7B](https://huggingface.co/jhlee11/FutureCAD-7B) | `main` | Reinforcement learning with GSPO | | [FutureCAD-7B-SFT](https://huggingface.co/jhlee11/FutureCAD-7B/tree/sft) | `sft` | Supervised fine-tuning | Use `revision="sft"` to load the SFT model. Omitting `revision` loads `main`. ## Text-to-CAD Install the `futurecad` environment from the [code repository](https://github.com/JohanStackk/FutureCAD/blob/main/docs/environment.md). Run from that repository's root: ```bash python scripts/download_models.py bash scripts/serve_grounding.sh ``` In another terminal using the same environment: ```bash export VLLM_USE_FLASHINFER_SAMPLER=0 python -m futurecad.text_to_cad \ --text "Create a cylinder with radius 10 mm and height 20 mm." \ --model weights/futurecad-llm \ --output-dir outputs/cylinder ``` The command saves the generated Python program and exports STEP/STL when CAD execution succeeds. The repository supplies the prompt template and CadQuery extensions used by the model. ## Load with Transformers ```python from transformers import AutoModelForCausalLM, AutoTokenizer model_id = "jhlee11/FutureCAD-7B" tokenizer = AutoTokenizer.from_pretrained(model_id) model = AutoModelForCausalLM.from_pretrained(model_id, dtype="auto", device_map="auto") ``` For prompt formatting, generation, execution and evaluation, use the [code repository](https://github.com/JohanStackk/FutureCAD). ## Citation ```bibtex @misc{li2026highfidelitycadgenerationllmdriven, title={Towards High-Fidelity CAD Generation via LLM-Driven Program Generation and Text-Based B-Rep Primitive Grounding}, author={Jiahao Li and Qingwang Zhang and Qiuyu Chen and Guozhan Qiu and Yunzhong Lou and Xiangdong Zhou}, year={2026}, eprint={2603.11831}, archivePrefix={arXiv}, primaryClass={cs.CV}, url={https://arxiv.org/abs/2603.11831}, } ```