Downloads · 30 days
52
21% of all-time downloads
atsmt/rect2sheet-qwen-7b
rect2sheet-qwen-7b is a text generation model from atsmt. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as apache-2.0.
<img width="3805" height="1383" alt="Rect2Sheet dataset overview" src="https://github.com/user-attachments/assets/0162d15f-6358-478a-a0aa-285fa3c4343b" /
Downloads · 30 days
52
21% of all-time downloads
All-time downloads
248
Public
Parameters
7.6B
23.7 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors15.2 GB · 64%
From the Hugging Face model README
Rect2Sheet Qwen 7B is a fine-tuned version of
unsloth/qwen2.5-coder-7b-instruct
for generating sheet-metal solutions from rectangle layouts. Given a JSON description of connected rectangular tabs,
the model produces a candidate solution containing the fold sequence, bends, bend directions, and resulting tab
geometry.
The model was trained on the manually verified release of the Rect2Sheet dataset, which contains 19,231 synthetic sheet-metal designs. The dataset was generated with SheetGen and is archived on Zenodo.
| Property | Value |
|---|---|
| Base model | Qwen2.5-Coder-7B-Instruct |
| Parameters | 7.6B |
| Architecture | Qwen2ForCausalLM |
| Context length | 32,768 tokens |
| Training data | 19,231 manually verified Rect2Sheet designs |
| Training framework | Unsloth and Hugging Face TRL |
| Output | Rect2Sheet solution JSON |
The prompt should contain one complete Rect2Sheet rectangle JSON object. Explicitly request only the solution JSON so the response can be parsed directly.
import json
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
model_id = "atsmt/rect2sheet-qwen-7b"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(
model_id,
torch_dtype="auto",
device_map="auto",
)
with open("001_rectangle.json", encoding="utf-8") as file:
rectangle = json.load(file)
messages = [
{
"role": "user",
"content": (
"Generate a Rect2Sheet sheet-metal solution for the following rectangle layout. "
"Return only valid solution JSON.\n\n"
+ json.dumps(rectangle)
),
}
]
prompt = tokenizer.apply_chat_template(
messages,
tokenize=False,
add_generation_prompt=True,
)
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
with torch.inference_mode():
output = model.generate(**inputs, max_new_tokens=4096, do_sample=False)
generated = output[0, inputs.input_ids.shape[1]:]
print(tokenizer.decode(generated, skip_special_tokens=True))
Example rectangle and solution files are available in the repository's
dataset_test_1/dataset_json
directory.
Quantized GGUF files are included in the model repository and can be run directly:
llama-cli -hf atsmt/rect2sheet-qwen-7b --jinja
This model is intended for research into data-driven sheet-metal design generation and for producing candidate Rect2Sheet solutions from inputs that follow the dataset schema. It may also be useful as a baseline for constrained CAD generation and geometry-generation research.
Validate every generated design with geometry and manufacturability tooling, such as the SheetGen pipeline, before using it in downstream engineering or fabrication workflows.
Rect2Sheet pairs rectangle layouts with sheet-metal solutions. Inputs describe tabs through corner points A, B,
and C, with optional mounts. Targets describe the fold sequence, bends with tab and point references, bend
direction, and the resulting tab geometry. The accepted solutions were filtered for manufacturability and manually
inspected. See the dataset repository for the schema, test subsets, and generation
details.
Please cite the Rect2Sheet dataset and SheetGen when using this model:
@dataset{tender2026rect2sheet,
author = {Tender, A. M. and Wittig Adão, C. and Matthiesen, S.},
title = {Rect2Sheet: A Dataset of Sheet Metal Connection Designs},
year = {2026},
publisher = {Karlsruhe Institute of Technology},
doi = {10.5281/zenodo.20834240},
url = {https://doi.org/10.5281/zenodo.20834240}
}
This model is released under the Apache License 2.0. The Rect2Sheet dataset and upstream model may have their own terms; review them before use.