Instructions to use jhlee11/FutureCAD-7B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use jhlee11/FutureCAD-7B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="jhlee11/FutureCAD-7B") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("jhlee11/FutureCAD-7B") model = AutoModelForCausalLM.from_pretrained("jhlee11/FutureCAD-7B", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use jhlee11/FutureCAD-7B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "jhlee11/FutureCAD-7B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "jhlee11/FutureCAD-7B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/jhlee11/FutureCAD-7B
- SGLang
How to use jhlee11/FutureCAD-7B with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "jhlee11/FutureCAD-7B" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "jhlee11/FutureCAD-7B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "jhlee11/FutureCAD-7B" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "jhlee11/FutureCAD-7B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use jhlee11/FutureCAD-7B with Docker Model Runner:
docker model run hf.co/jhlee11/FutureCAD-7B
FutureCAD-7B
FutureCAD-7B generates CadQuery programs from text descriptions. It is based on Qwen2.5-7B-Instruct.
Paper · Code · Dataset · BRepGround
Model revisions
| Model | Revision | Training stage |
|---|---|---|
| FutureCAD-7B | main |
Reinforcement learning with GSPO |
| FutureCAD-7B-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.
Run from that repository's root:
python scripts/download_models.py
bash scripts/serve_grounding.sh
In another terminal using the same environment:
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
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.
Citation
@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},
}
- Downloads last month
- 573