--- license: apache-2.0 base_model: Qwen/Qwen3.8-27B tags: - designcoder - ui-generation - front-end - sft language: - en --- # DesignCoder v2 - 27B (AdamW, step 400) Supervised fine-tune of **Qwen3.8-27B** for design-to-code generation (landing pages and dashboards) from the DesignCoder v2 agent trajectories. ## Training | Field | Value | |---|---| | Base model | `Qwen/Qwen3.8-27B` | | Dataset | `designcoder_sft_v2_train` — **41,287 samples** (`data41287`) | | Optimizer | AdamW | | Learning rate | 1.0e-5 | | Global batch size | 128 | | Exported step | 400 | | Epoch at export | 1.51 | | Hardware | 8 nodes x 8 H20 | | Source run | `designcoder_v2_27b_qwen38_newdata_8n64g_20260917_0228/checkpoint-400` | > **Dataset note:** this checkpoint is trained on the **41,287-sample** revision > (`ckpt_data41287`). The earlier checkpoints in this repository (`*_step1900`, > `*_step3800`) come from the **37,865-sample** revision (`ckpt_data37865`) and are > *not* directly comparable. ## Benchmark Evaluated on the frozen 200-case DesignCoder bench (`bench_data/test-prompts-200.jsonl` + `test-rubrics-200.jsonl`). Every rubric item is a binary screenshot check, judged by a vision model over full-page screenshots; the score is the unweighted mean of Prompt Fit and the six rubric dimensions. **Score: 91.19** Strongest checkpoint in this release (+10 over 9B on the same subset). ### Why this step and not the last one Checkpoint selection was done by running the benchmark, not by picking the lowest training loss. Across all four runs in this release the best checkpoint sits at roughly 75% of training, and loss kept decreasing while benchmark scores fell. The most extreme case: 4B AdamW loss improved from 0.2696 (step 200) to 0.2682 (step 266) while its score collapsed from 84.22 to 68.35. ## Usage The model is trained as a tool-using agent. Each case runs `design_search` -> (`websearch`, landing only) -> a final answer with exactly three code blocks in this order: `html`, `css`, `js`. Reproduce the system prompts and tool observation format from `examples/designcoder/runtime/infer_designcoder.py`; feeding a bare instruction without the tool turns will not match the training distribution. ```python from transformers import AutoModelForCausalLM, AutoTokenizer repo = "xingxm/DesignCoder" sub = "designcoder_qwen3.8_27b_adamw_bs128_data41287_step400" tok = AutoTokenizer.from_pretrained(repo, subfolder=sub) model = AutoModelForCausalLM.from_pretrained( repo, subfolder=sub, dtype="bfloat16", device_map="auto" ) ```