Views
No views yet
| Base Model | Qwen3-8B |
| Fine-tuning | Supervised Fine-Tuning (SFT) |
| Size | 16 GB (fp16) |
| Context Window | 8,192 tokens |
prompt — natural-language design requestlayout_thought + grouping + image_generator + generate_text| Batch Size | 1 |
| Gradient Accumulation | 2 |
| Learning Rate | 5e-5 (AdamW) |
| Epochs | 2 |
| Max Sequence Length | 8,192 tokens |
| Precision | bfloat16 |
| Loss | Completion-only (only on generated tokens) |
1from transformers import AutoTokenizer, AutoModelForCausalLM
2import torch
3
4model_path = "Tony1109/DesignAsCode-planner"
5tokenizer = AutoTokenizer.from_pretrained(model_path)
6model = AutoModelForCausalLM.from_pretrained(
7 model_path,
8 torch_dtype=torch.float16,
9 device_map="auto"
10)<layout_thought>...</layout_thought> — detailed layout reasoning<grouping>...</grouping> — JSON array grouping related layers with thematic labels<image_generator>...</image_generator> — JSON array of per-layer image generation prompts<generate_text>...</generate_text> — JSON array of text element specifications (font, size, alignment, etc.)1@article{liu2026designascode,
2 title = {DesignAsCode: Bridging Structural Editability and
3 Visual Fidelity in Graphic Design Generation},
4 author = {Liu, Ziyuan and Sun, Shizhao and Huang, Danqing
5 and Shi, Yingdong and Zhang, Meisheng and Li, Ji
6 and Yu, Jingsong and Bian, Jiang},
7 journal = {arXiv preprint arXiv:2602.17690},
8 year = {2026},
9 url = {https://arxiv.org/abs/2602.17690}
10}