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

FlexCAD

Date: 2026-11-15Commit: 7f7b27fSigned: 2DC28CC7B26A283B ✓

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

text26.2MBFlexCADsafetensorspermissive
FactsParamsnot statedSize26.2 MBFormatssafetensorsTasknot taggedLicenseMITFrom sourcepermissive
$ fw get microsoft/FlexCAD
# manifest sha256 77e0e55d2d2b… · 26.2 MB · 12 files
$ fw verify ./FlexCAD microsoft/FlexCAD
From sourceHosted (signed)microsoft/FlexCADLast 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
26.2 MB
Weights
6.83 MB (safetensors)
Parameters
not stated
Formats
safetensors
Task
not tagged
License
MIT (permissive)
Files
12, 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 7f7b27f. Shown as plain text with links; images open at the publisher.

Model Details#

Model Description#

This model aims to achieve controllable Computer-Aided Design (CAD) generation across all CAD construction hierarchies, such as sketch-extrusion, extrusion, sketch, face, loop and curve. It takes an original CAD model along with the part the user intends to modify as input and generates multiple new CAD models with only the chosen part changed, where CAD models are represented as structured texts.

  • Developed by: Zhanwei Zhang, Shizhao Sun, Wenxiao Wang, Deng Cai and Jiang Bian
  • Model type: Large Language Models
  • Language(s): Python
  • License: MIT
  • Finetuned from model: Llama-3-8B
Model Sources#

Uses#

Direct Intended Uses#

Take an original CAD model along with the part the user intends to modify as input and generate multiple new CAD models with only the chosen part changed, where CAD models are represented as structured texts.

FlexCAD is being shared with the research community to facilitate reproduction of our results and foster further research in CAD generation.

FlexCAD is intended to be used by domain experts who are independently capable of evaluating the quality of outputs before acting on them.

Out-of-Scope Use#

We do not recommend using FlexCAD in commercial or real-world applications without further testing and development. It is being released for research purposes.

Use in any manner that violates applicable laws and regulations.

Risks and Limitations#

FlexCAD inherits any biases, errors or omissions produced by its base model. Develops are advised to choose an appropriate base LLM carefully, depending on the intended use case.

FlexCAD uses the Llama model. See https://huggingface.co/meta-llama/Meta-Llama-3-8B to understand the capabilities and limitations of this model.

As the model is fine-tuned on very specific data about CAD models, it is unlikely to generate information other than CAD models. However, if a user submits harmful content—e.g., a firearm CAD model—the model may inadvertently enhance that design. Users must therefore implement their own content-filtering and harm-mitigation safeguards to prevent such outputs.

CAD models generated by FlexCAD may not be technically accurate in all cases. Users are responsible for assessing the quality of generated content for each intended use case.

FlexCAD was developed for research and experimental purposes. It does not yet include Responsible AI (RAI) content-filtering or safety mechanisms, and it requires extensive testing and validation before any commercial or real-world deployment.

Recommendations#

Please only provide a CAD model that you want to modify to the model.

Users are responsible for sourcing their content legally and ethically. This could include securing appropriate copyrights and the anonymization of data prior to use in research.

How to Get Started with the Model#

python sample.py --model_path <model_path> --num_samples <num_samples> --data_path <data_path> --mask_type <mask_type>

Here, mask_type can be one of unconditional, cad, sketch-extrusion(es), extrusion, sketch, face, loop, curve.

For more information, please visit our GitHug repo: https://github.com/microsoft/FlexCAD.

Training Details#

Training Data#

The training data is from an open-source dataset, DeepCAD: https://github.com/ChrisWu1997/DeepCAD?tab=readme-ov-file. We use its pre-processed version: https://github.com/samxuxiang/SkexGen.

Training Procedure#
Preprocessing#

CAD models are converted to structured text, where all the categorical and numerical information are represented as textual tokens.

See A.1 in our paper (https://arxiv.org/pdf/2411.05823) for a detailed definition for the sequence format.

Training Hyperparameters#
  • LoRA rank and alpha: 8, 32
  • Optimizer: AdamW
  • Batch size: 32
  • Learning rate: 5e-4
  • Epochs: 30
Speeds, Sizes, Times#

Llama-3-8B: 8B parameters

Evaluation#

Testing Data#

The testing data is from an open-source dataset, DeepCAD: https://github.com/ChrisWu1997/DeepCAD?tab=readme-ov-file. We use its pre-processed version: https://github.com/samxuxiang/SkexGen.

Metrics#
  • Generation diversity and quality on the generated CAD models in comparison to the test set, including Coverage (COV), Minimum Matching Distance (MMD) and Jensen-Shannon Divergence (JSD) [\[1\]](https://arxiv.org/abs/2207.04632)[\[2\]](https://arxiv.org/abs/2307.00149).
  • The percentage of predicted CAD sequences that can be successfully rendered into 3D models, denoted as Prediction Validity (PV).
  • The percentage of the generated CAD models that are labeled as realistic ones by human evaluators, denoted as Realism.
Results#

We use prior work, including Skexgen, Hnc-cad, and prompting GPT-4o, as baselines. FlexCAD demonstrates superior performance compared to these baselines across most metrics. Notably, it achieves significant improvements in PV, with the PV values for GPT-4o, Skexgen, Hnc-cad, and FlexCAD being 62.3%, 68.7%, 72.6%, and 93.4% respectively, in the context of sketch-level controllable generation. See Table 1 for the complete evaluation in our paper (https://arxiv.org/pdf/2411.05823).

Environmental Impact#

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

Citation#

@InProceedings{zhang2024flexcad,
  title={FlexCAD: Unified and Versatile Controllable CAD Generation with Fine-tuned Large Language Models},
  author={Zhang, Zhanwei and Sun, Shizhao and Wang, Wenxiao and Cai, Deng and Bian, Jiang},
  booktitle={ICLR},
  year={2025}
}

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 us at Shizhao Sun, shizsu@microsoft.com.

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

Files

12 files · 26.2 MBWeights 6.83 MB (safetensors). Sizes and sha256 from the signed manifest.
Hide all 12 files with their sha256
FileSizesha256
.gitattributes1.52 KB11ad7efa24975ee4b0c3c3a38ed18737f0658a5f75a0a96787b576a78a023361
README.md6.43 KBadf345777ac8c49d2c9662c2ea2149c23c1e60158d88169ca431a1a2c646b2bc
adapter_config.json563 Bd2bce14e732537a7c34725fe253d9d1f9c2405318c704a4fc7eba2c6e166a96c
adapter_model.safetensors6.83 MBe5b8d85904fecc01064f40b078a4beccba7043be1800dde66fa4faf5deb03867
optimizer.pt13.7 MB7fe56805cae1bededb654ac81160b6601fe9694d42c4d2912f2e2bedc721a3b2
rng_state_0.pth15.0 KB3db998f34e488647e6b5997ba71ff8bcbab3a830d1a2fe8b9dab5667117d7db8
rng_state_1.pth15.0 KBa2575b86e0b1a647fcae1d97fa089c9978dd1cabbb9239f7834728ae515cb57f
rng_state_2.pth15.0 KB4a43f58ebcdf68ddd5efa382bca18151e4b89f26282b7095d0a8683e32c97160
rng_state_3.pth15.0 KBcbb3a1893721eb105960a6b4cff748d56c6ed57842bf2bfdad9b64239a3e7f59
scheduler.pt1.06 KB1f58c806ce94ec87a3a8202867a604482d89a470ba81a7ded02c5619dabba86e
trainer_state.json5.51 MB27a956a49809cc5289dd309a96a97044b377d9f213a994096c2ebe742e4417f9
training_args.bin4.86 KB5960cd3c0d44c536c239a7f355d0bd7134214e72b76660fb6f9c752c72a66065
VersionsEach time the pinned upstream commit or file list changed in this repo. Newest first.
Upstream commitDateContents
7f7b27f8be pinned now2026-11-15 04:31 UTC12 files · 26.2 MB

Use it

$ fw get microsoft/FlexCAD
# manifest sha256 77e0e55d2d2b… · 26.2 MB · 12 files
$ fw verify ./FlexCAD microsoft/FlexCAD
fw.pyChecks the signature and every sha256, tries each source in order, resumes.
$ python3 fw.py get https://freeweights.allternit.com/manifests/microsoft/FlexCAD.json --dir ./FlexCAD $ python3 fw.py verify ./FlexCAD ./microsoft__FlexCAD.json
hfThe Hugging Face CLI with one setting. Same repo id.
$ HF_ENDPOINT=https://freeweights.allternit.com hf download microsoft/FlexCAD --revision 7f7b27f8be7ee3e0062e54837839174a0862a33f --local-dir ./FlexCAD

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
adf345777ac8c49d2c9662c2ea2149c23c1e60158d88169ca431a1a2c646b2bc
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: FlexCADDate: 2026-11-15Commit: 7f7b27fSigned: 2DC28CC7B26A283B ✓
Upstream
microsoft/FlexCAD
Pinned commit
7f7b27f8be7ee3e0062e54837839174a0862a33f
Manifest
FlexCAD.json · .minisig
Manifest sha256
77e0e55d2d2b42e832311d7206eb690bb568cf74d2ad20eb4ab1d20767681457
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/FlexCAD.json $ curl -O https://freeweights.allternit.com/manifests/microsoft/FlexCAD.json.minisig $ minisign -Vm FlexCAD.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/FlexCAD
Open in Freeweights Studio

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

Signed manifest
minisign, key 2DC28CC7B26A283B. FlexCAD.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