Downloads · 30 days
3
7% of all-time downloads
kshitij-hf/brickgpt-dpo-2048
brickgpt-dpo-2048 is a text generation model from kshitij-hf. Use it when you need the model to write or continue text. It is set up for peft. The card lists the license as llama3.2.
Downloads · 30 days
3
7% of all-time downloads
All-time downloads
43
Public
Repo size
2.5 GB
Likes
0
Public
Click a slice to open those files.
.safetensors2.5 GB · 98%
From the Hugging Face model README
BrickGPT-DPO is a specialized language model fine-tuned from AvaLovelace/BrickGPT (which is based on Llama-3.2-1B-Instruct).
This model has been aligned using Direct Preference Optimization (DPO) to explicitly prioritize physical stability in generated LEGO®-style brick structures.
Key Feature: Unlike the base model, which relies on rejection sampling and external physics solvers during inference, BrickGPT-DPO incorporates stability constraints directly into its weights.
Training Method: Trained on a preference dataset where physically stable continuations were "chosen" and unstable collapses were "rejected," using a novel Prompt Extension strategy to handle partial valid structures.
Developed by: Kshitij, Sreeharsha, Yitian, Carnegie Mellon University (CMU)
Model Type: Causal Language Model (LLM) using LoRA (Low-Rank Adaptation)
Language(s): English (Instructions), Custom Brick Syntax
License: Llama 3.2 Community License
Finetuned from: AvaLovelace/BrickGPT
The model's primary function is to generate sequences of brick commands (<dimensions> <coordinates>) from natural language descriptions.
The output text is intended to be parsed within the BrickGPT ecosystem for rendering in 3D voxel grids or for robotic assembly.
Trained on a Prompt-Extended DPO Dataset derived from the StableText2Brick dataset.
Trained using the TRL library's DPOTrainer with PEFT (LoRA).
| Hyperparameter | Value |
|---|---|
| Method | Direct Preference Optimization (DPO) |
| Precision | bfloat16 with 4-bit Quantization (QLoRA/NF4) |
| Optimizer | paged_adamw_8bit |
| Learning Rate | 5e-5 with Cosine Scheduler |
| Warmup Ratio | 0.1 |
| Batch Size | 1 per device (Effective batch size 16 via 16 Gradient Accumulation Steps) |
| Beta | 0.1 |
| Max Sequence Length | 2048 |
| Max Prompt Length | 256 |
| Epochs | 3 |
| LoRA Config | $r=32$, $\alpha=16$, Dropout=0.05, Targets: q_proj, v_proj |
| Component | Detail |
|---|---|
| Base Model | AvaLovelace/BrickGPT |
| Library Name | peft |
| License | llama3.2 |
| Datasets | dpo_dataset.parquet |
| Language | en |
| Pipeline Tag | text-generation |
| Hardware | RTX 4080 |
| Software | PyTorch 2.4.0, Transformers 4.45.0, TRL 0.11.0, PEFT 0.15.2, BitsAndBytes |