Instructions to use atsmt/rect2sheet-qwen-7b-80k with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use atsmt/rect2sheet-qwen-7b-80k with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="atsmt/rect2sheet-qwen-7b-80k") 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("atsmt/rect2sheet-qwen-7b-80k") model = AutoModelForCausalLM.from_pretrained("atsmt/rect2sheet-qwen-7b-80k", 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
- llama.cpp
How to use atsmt/rect2sheet-qwen-7b-80k with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf atsmt/rect2sheet-qwen-7b-80k:Q4_K_M # Run inference directly in the terminal: llama cli -hf atsmt/rect2sheet-qwen-7b-80k:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf atsmt/rect2sheet-qwen-7b-80k:Q4_K_M # Run inference directly in the terminal: llama cli -hf atsmt/rect2sheet-qwen-7b-80k:Q4_K_M
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf atsmt/rect2sheet-qwen-7b-80k:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf atsmt/rect2sheet-qwen-7b-80k:Q4_K_M
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf atsmt/rect2sheet-qwen-7b-80k:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf atsmt/rect2sheet-qwen-7b-80k:Q4_K_M
Use Docker
docker model run hf.co/atsmt/rect2sheet-qwen-7b-80k:Q4_K_M
- LM Studio
- Jan
- vLLM
How to use atsmt/rect2sheet-qwen-7b-80k with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "atsmt/rect2sheet-qwen-7b-80k" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "atsmt/rect2sheet-qwen-7b-80k", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/atsmt/rect2sheet-qwen-7b-80k:Q4_K_M
- SGLang
How to use atsmt/rect2sheet-qwen-7b-80k 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 "atsmt/rect2sheet-qwen-7b-80k" \ --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": "atsmt/rect2sheet-qwen-7b-80k", "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 "atsmt/rect2sheet-qwen-7b-80k" \ --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": "atsmt/rect2sheet-qwen-7b-80k", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Ollama
How to use atsmt/rect2sheet-qwen-7b-80k with Ollama:
ollama run hf.co/atsmt/rect2sheet-qwen-7b-80k:Q4_K_M
- Unsloth Desktop
- Pi
How to use atsmt/rect2sheet-qwen-7b-80k with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf atsmt/rect2sheet-qwen-7b-80k:Q4_K_M
Configure the model in Pi
# Install Pi: npm install -g @earendil-works/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "atsmt/rect2sheet-qwen-7b-80k:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use atsmt/rect2sheet-qwen-7b-80k with Docker Model Runner:
docker model run hf.co/atsmt/rect2sheet-qwen-7b-80k:Q4_K_M
- Lemonade
How to use atsmt/rect2sheet-qwen-7b-80k with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull atsmt/rect2sheet-qwen-7b-80k:Q4_K_M
Run and chat with the model
lemonade run user.rect2sheet-qwen-7b-80k-Q4_K_M
List all available models
lemonade list
- Hermes Agent
How to use atsmt/rect2sheet-qwen-7b-80k with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf atsmt/rect2sheet-qwen-7b-80k:Q4_K_M
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:8080/v1 hermes config set model.default atsmt/rect2sheet-qwen-7b-80k:Q4_K_M
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use atsmt/rect2sheet-qwen-7b-80k with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf atsmt/rect2sheet-qwen-7b-80k:Q4_K_M
Configure OpenClaw
# Install OpenClaw: npm install -g openclaw@latest # Register the local server and set it as the default model: openclaw onboard --non-interactive --mode local \ --auth-choice custom-api-key \ --custom-base-url http://127.0.0.1:8080/v1 \ --custom-model-id "atsmt/rect2sheet-qwen-7b-80k:Q4_K_M" \ --custom-provider-id llama-cpp \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
Rect2Sheet Qwen 7B 80K
Rect2Sheet Qwen 7B 80K 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.
This variant was trained on 80,028 unvalidated designs generated by the Rect2Sheet/SheetGen pipeline. Unlike
atsmt/rect2sheet-qwen-7b, its training designs were not manually
verified. It is provided to support research into the effect of larger, unvalidated synthetic training sets.
The Rect2Sheet dataset was generated with SheetGen. The dataset release is archived on Zenodo.
Model Details
| Property | Value |
|---|---|
| Base model | Qwen2.5-Coder-7B-Instruct |
| Parameters | 7.6B |
| Architecture | Qwen2ForCausalLM |
| Context length | 32,768 tokens |
| Training data | 80,028 unvalidated Rect2Sheet designs |
| Training framework | Unsloth and Hugging Face TRL |
| Output | Rect2Sheet solution JSON |
Usage
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-80k"
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.
llama.cpp
A quantized GGUF file is included in the model repository and can be run directly:
llama-cli -hf atsmt/rect2sheet-qwen-7b-80k --jinja
Intended Use
This model is intended for research into data-driven sheet-metal design generation, especially comparisons between larger unvalidated synthetic datasets and smaller manually verified datasets. It can produce candidate Rect2Sheet solutions from inputs that follow the dataset schema.
Limitations
- The 80,028 training designs were not manually verified and may contain invalid or low-quality examples.
- Generated JSON may be malformed or may not conform to the Rect2Sheet schema.
- A syntactically valid output is not necessarily geometrically valid or manufacturable.
- The model does not replace collision, unfolding-overlap, thin-segment, or other engineering checks.
- Performance outside the tab counts, geometry, mount types, and topology represented in the training data is unknown.
- No benchmark results are currently reported for this release.
Validate every generated design with geometry and manufacturability tooling, such as the SheetGen pipeline, before
using it in downstream engineering or fabrication workflows. Prefer the manually verified
rect2sheet-qwen-7b variant when training-data quality is more important
than dataset size.
Dataset
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. See the dataset repository for the
schema, test subsets, and generation details.
Citation
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}
}
License
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.
- Downloads last month
- 25