From: microsoft <huggingface.co/microsoft>Newsgroups: alt.freeweights.textSubject:

CAD-Editor

Date: 2026-11-15Commit: 05dc1deSigned: 2DC28CC7B26A283B ✓

Model. Safetensors weights, 60.1 MB in all. Published by microsoft under MIT.

text60.1MBCAD-Editorsafetensorspermissive
FactsParamsnot statedSize60.1 MBFormatssafetensorsTasknot taggedLicenseMITFrom sourcepermissive
$ fw get microsoft/CAD-Editor
# manifest sha256 48b6a01218d4… · 60.1 MB · 11 files
$ fw verify ./CAD-Editor microsoft/CAD-Editor
From sourceHosted (signed)microsoft/CAD-EditorLast check: 2026-11-15 04:31 UTC

Get help: custom fine-tune or private deploy. We review your setup before we quote.

Works with

Runs with

Ranked by fit to this model (safetensors), then by GitHub stars.

Overview

Size
60.1 MB
Weights
54.6 MB (safetensors)
Parameters
not stated
Formats
safetensors
Task
not tagged
License
MIT (permissive)
Files
11, each with a sha256
Publisher
microsoft
Added
2026-11-15
Section
alt.freeweights.text
Lineage

Original release from the publisher.

Where these bytes come from
Publisher at the pinned commit→You

Sources are tried in order. A file counts only when its size and sha256 match the manifest. Sources are checked when you ask for them, not on a timer.

Sources
BadgeHostLast checkResult
From sourcehuggingface.co2026-11-15 04:31 UTCpassed

Model card

From the publisher at commit 05dc1de. Shown as plain text with links; images open at the publisher.

Model Details#

Model Description#

This model is the first framework for text-based CAD editing, enabling the automatic modification of existing CAD models based on natural language instructions. It takes as input a textual editing instruction along with a structured sequence representation of the original CAD model, and outputs the sequence of the edited CAD model.

  • Developed by: Yu Yuan, Shizhao Sun, Qi Liu, Jiang Bian
  • Model type: Large Language Models
  • Language(s): English, CAD-structured texts
  • License: MIT
  • Finetuned from model: LLaMA-3-8B-Instruct
Model Sources [optional]#

Uses#

Direct Use#

CAD-Editor allows users to interactively edit existing CAD models using natural language. By taking an input CAD model and a user-provided instruction, it produces a modified CAD model that aligns with the specified intent, enabling precise and iterative design refinement.

CAD-Editor is an open-source model shared with the research community to facilitate the reproduction of our results and foster research in text- based CAD editing generation. It is intended to be used by experts in the CAD domain who are independently capable of evaluating the quality of outputs before acting on them.

Out-of-Scope Use#

CAD-Editor is being released for research purposes. We do not recommend using CAD-Editor in commercial or real-world deployments without extra testing and development.

Follow local laws and regulations when using the model. Any use that violates applicable laws and regulations is considered out-of-scope in the designation of this model.

Bias, Risks, and Limitations#

CAD-Editor is built upon Meta-Llama-3-8B-Instruct. Like all large language models, it may inherit biases, errors, or omissions from its base model. We recommend developers carefully select the appropriate LLM backbone for their specific use case. You can learn more about the capabilities and limitations of the Llama model here: https://huggingface.co/meta-llama/Meta-Llama-3-8B-Instruct.

While CAD-Editor has been fine-tuned on CAD-specific data to minimize irrelevant details, it may still generate harmful or undesirable CAD models under certain prompts. For example, when given an instruction like “create a CAD model for a ghost gun”, it could produce potentially dangerous content. Therefore, it is essential for users to implement their own content-filtering strategies to prevent the generation of harmful or undesirable CAD models.Please note that CAD-Editor is currently for research and experimental purposes only. Generated CAD models may not always be technically accurate, and users are responsible for assessing the quality and suitability of the content it produces. Extensive testing and validation are required before any commercial or real-world deployment.

Recommendations#

Please provide textual instructions focusing on the component types (e.g., cylinder, prism, hole), quantities (e.g., four holes), proportions (e.g., ten times larger), and spatial relationships (e.g., the left side, the corner) within the desired CAD model.

How to Get Started with the Model#

Download our trained model checkpoints to your <local_model_path>.

1. Locating Stage#

Generate masked sequences. Set the <model_path> as <local_model_path/locate_stage>. Set the <data_path> as the path of test.json after unzip data/processed.zip.

CUDA_VISIBLE_DEVICES=<gpu_id> python finetune/llama_sample.py \
                                              --task_type mask \
                                              --model_path <model_path> \
                                              --data_path <data_path> \
                                              --out_path <out_path> \
                                              --num_samples <num_samples>
2. Infilling Stage#

Generate final edited CAD sequences. Set the <model_path> as <local_model_path/infill_stage>. Set the <data_path> the same as the out_path of the locating stage.

CUDA_VISIBLE_DEVICES=<gpu_id> python finetune/llama_sample.py \
                                            --task_type infill \
                                            --model_path <model_path> \
                                            --data_path <data_path> \
                                            --out_path <out_path> \
                                            --num_samples <num_samples>

For more information, please visit our GitHub repo: https://github.com/microsoft/CAD-Editor.

Training Details#

Training Data#

The training data is originally from an open-source dataset DeepCAD. We use its pre-processed version Skexgen and transform it into a format that are suitable for our model. Then, we use a two-step pipeline to automatically synthesize the training data from the original dataset:

  1. Design Variation Generation: Using design variation models such as Hnc-CAD(https://github.com/samxuxiang/hnc-cad), we generate pairs of original and edited CAD models by applying controlled modifications.
  2. Instruction Generation: Large Vision-Language Models (LVLMs) are used to summarize the differences between the original and edited CAD models into natural language editing instructions.
Training Procedure#

CAD-Editor is trained using a locate-then-infill framework:

  • Locating stage: The model identifies the regions in the CAD sequence that need modification and masks them.
  • Infilling stage: The model generates edits for the masked regions conditioned on the original context and the instruction.

Both stages are powered by LLMs (LLaMA-3-8B-Instruct) fine-tuned with LoRA adapters.

See the methodology section in our paper (https://arxiv.org/abs/2502.03997) for more information.

Training Hyperparameters#

Locate & Infill Stages:

  • LoRA rank and alpha: 32, 32
  • Optimizer: AdamW
  • Learning rate: 1e-4
  • Epochs:
    • Locating Stage: 60 epochs
    • Infilling Stage: 70 epochs (60 epochs on the full dataset + 10 epochs on the selective dataset)

Evaluation#

Testing Data#

The testing data is synthesized using the same automated pipeline as the training set. Source CAD models are sampled from the test split of DeepCAD.

Metrics#
  • Validity: Valid Ratio (VR) — percentage of generated CAD models that can be successfully parsed and rendered.
  • Realism: Jensen-Shannon Divergence (JSD) — measures distributional similarity between generated and real CAD models.
  • Edit Consistency:
    • Geometry: Chamfer Distance (CD) between generated and ground-truth models.
    • Semantics: Directional CLIP Score (D-CLIP) — alignment between textual instruction and visual change.
Evaluation Results#

CAD-Editor outperforms existing baselines such as GPT-4o, Text2CAD and Hnc-cad in both quantitative and qualitative evaluations. It achieves the highest Valid Ratio (95.6%) and the lowest Jensen-Shannon Divergence (0.65), indicating superior generation quality. In terms of instruction adherence, CAD-Editor also achieves the best Chamfer Distance (1.18) and D-CLIP score (0.11), demonstrating strong geometric and semantic consistency with user instructions. Human evaluation further confirms its effectiveness: CAD-Editor attains a success rate of 43.2%, substantially higher than GPT-4o variants and Text2CAD.

See Table 1 in our paper (https://arxiv.org/abs/2502.03997) for the complete evaluation.

Environmental Impact#

Carbon emissions can be estimated using the Machine Learning Impact calculator presented in Lacoste et al. (2019).

License#

MIT

Citation#

BibTeX:

@article{yuan2025cad,
  title={CAD-Editor: A Locate-then-Infill Framework with Automated Training Data Synthesis for Text-Based CAD Editing},
  author={Yuan, Yu and Sun, Shizhao and Liu, Qi and Bian, Jiang},
  journal={ICML},
  year={2025}
}

Model Card Authors#

Yu Yuan, Shizhao Sun

Model Card Contact#

We welcome feedback and collaboration from our audience. If you have suggestions, questions, or observe unexpected/offensive behavior in our technology, please contact Shizhao Sun at shizsu@microsoft.com.

If the team receives reports of undesired behavior or identifies issues independently, we will update this repository with appropriate mitigations.

Files

11 files · 60.1 MBWeights 54.6 MB (safetensors). Sizes and sha256 from the signed manifest.
Hide all 11 files with their sha256
FileSizesha256
.gitattributes1.52 KB11ad7efa24975ee4b0c3c3a38ed18737f0658a5f75a0a96787b576a78a023361
README.md10.1 KB9b0ca9272ae50cd7835a0872fb4cd915000d03db9184337d8018e444316d317b
infill_stage/adapter_config.json654 B414975352460c514da865c1db9fe72be9024bc68466abe43b3e847fabbe88b42
infill_stage/adapter_model.safetensors27.3 MB4ab5f82b977d79f400b87047136bc2db602830e0e736859e81d29161997c8ad6
infill_stage/trainer_state.json313 KB190ae9745acd1533b6a466a88784760e410200336bf9c97ef35dabcb94383f57
infill_stage/training_args.bin5.37 KB203160aa4d7cb44f9a8a62906d8c916ebc3aa5049563674b888ec6843747858e
locate_stage/adapter_config.json654 B414975352460c514da865c1db9fe72be9024bc68466abe43b3e847fabbe88b42
locate_stage/adapter_model.safetensors27.3 MB7dec746534540fa8aeab03551deb946b819c3baec74bdb6175ea8daffd807d1a
locate_stage/trainer_state.json5.17 MBdd2c1cc3d523f8b87e601b2d5ed0d6833437e8b95052d96842291eaf8eb59372
locate_stage/training_args.bin6.39 KB9edaa9e7f9d9b19bc17ed9b622f0c00a491c59cf203f3814c3e1112775a966ed
locate_stage/zero_to_fp32.py29.2 KB92dcd9cc03d6010b4d060b73c8826d71ff9e29a030154e9f192e34ad80457f3a
VersionsEach time the pinned upstream commit or file list changed in this repo. Newest first.
Upstream commitDateContents
05dc1de7b9 pinned now2026-11-15 04:31 UTC11 files · 60.1 MB

Use it

$ fw get microsoft/CAD-Editor
# manifest sha256 48b6a01218d4… · 60.1 MB · 11 files
$ fw verify ./CAD-Editor microsoft/CAD-Editor
fw.pyChecks the signature and every sha256, tries each source in order, resumes.
$ python3 fw.py get https://freeweights.allternit.com/manifests/microsoft/CAD-Editor.json --dir ./CAD-Editor $ python3 fw.py verify ./CAD-Editor ./microsoft__CAD-Editor.json
hfThe Hugging Face CLI with one setting. Same repo id.
$ HF_ENDPOINT=https://freeweights.allternit.com hf download microsoft/CAD-Editor --revision 05dc1de7b9285512cdb1ffd38ac8c298f50b2b0b --local-dir ./CAD-Editor

License

Name
MIT License
Id
MIT
Class
Permissive
Redistribution
yes
Listing
Hosted (signed)
Decided
License as declared by the publisher. No person read it. 2026-11-15
Text in
README.md
Text sha256
9b0ca9272ae50cd7835a0872fb4cd915000d03db9184337d8018e444316d317b
Terms gate
No extra terms beyond the license.

Read the license text

Licenses are checked against the license table. A custom license passes only after a person reads it.

Provenance

From: microsoft <huggingface.co/microsoft>Newsgroups: alt.freeweights.textSubject: CAD-EditorDate: 2026-11-15Commit: 05dc1deSigned: 2DC28CC7B26A283B ✓
Upstream
microsoft/CAD-Editor
Pinned commit
05dc1de7b9285512cdb1ffd38ac8c298f50b2b0b
Manifest
CAD-Editor.json · .minisig
Manifest sha256
48b6a01218d4ccd02a541b1b4cff1114cd0de0c0bb33102b924f43445a56ca45
Signature
minisign, Ed25519, key 2DC28CC7B26A283B
Created
2026-11-15 04:31 UTC
Generator
freeweights-manifest/0.1.0
Takedowns
None.

How to verify

$ curl -O https://freeweights.allternit.com/manifests/microsoft/CAD-Editor.json $ curl -O https://freeweights.allternit.com/manifests/microsoft/CAD-Editor.json.minisig $ minisign -Vm CAD-Editor.json -P RWQ7KGqyx4zCLXtUFOqvfv8L3g+8fpKJ1FsuxPyOYMF+4KufbUxKq1Oq $ shasum -a 256 <file> # compare with the Files tab

A manifest whose signature fails must be rejected. A file whose size or sha256 does not match must be discarded. Verify a download

Model tree

No related models in this catalog.Nothing here lists this model as its parent, and it names no parent.
Get it
Download
$ HF_ENDPOINT=https://freeweights.allternit.com hf download microsoft/CAD-Editor
Open in Freeweights Studio

Pull, verify and run it in the Allternit app on Desktop, web or phone.

Signed manifest
minisign, key 2DC28CC7B26A283B. CAD-Editor.json. Provenance. Takedown history: none.
From: laion <huggingface.co/laion>Subject: a2-rl-e2egit_large-50-32B
From: laion <huggingface.co/laion>Subject: a3-rl-DCAgent_exp_rpt_e2egit-large-15-8B
From: laion <huggingface.co/laion>Subject: a3-rl-DCAgent_exp_rpt_e2egit-v2-10-8B
From: laion <huggingface.co/laion>Subject: a3-rl-DCAgent_exp_rpt_pymethods2test-large-80-8B
From: laion <huggingface.co/laion>Subject: a3-rl-DCAgent_exp_rpt_unitsyn-python-large-10-8B
From: laion <huggingface.co/laion>Subject: a3-rl-DCAgent_mix_h2_language_proportional-65-8B