Qwen3.6-27B Three.js / HyperFrames SFT Adapter

This repository contains a PEFT/QLoRA adapter trained on a small, domain-specific AutoResearch dataset for 3D and browser graphics coding tasks.

The adapter is intended to specialize Qwen/Qwen3.6-27B toward:

  • Three.js examples and APIs
  • React Three Fiber scenes
  • Drei utilities and controls
  • WebGPU/WebGL-oriented browser graphics
  • TSL-style shader/material patterns
  • HTML Canvas and DOM-to-canvas tasks
  • HyperFrames-style deterministic visual composition tasks

This is an adapter repo, not a merged full model. Load it together with the base model.

Checkpoints

The repo root contains the completed first baseline adapter:

  • Source checkpoint: qwen36-baseline/checkpoint-23
  • Base model: Qwen/Qwen3.6-27B
  • LoRA rank: 32
  • LoRA alpha: 64
  • Task type: CAUSAL_LM
  • Training framework: Axolotl + PEFT/QLoRA

An archived initial test adapter is kept at:

  • initial-qlora-test/checkpoint-50

That archived adapter is retained for provenance only. Most users should load the root adapter.

Training Data

The first baseline used a locally generated clean SFT dataset from the three-autoresearch project:

  • Train records: 520
  • Validation records: 30
  • Format: chat-style supervised fine-tuning examples
  • Accepted examples only: yes
  • Raw Codex transcripts included in SFT messages: no
  • Held-out eval task banks included in training: no

The SFT examples were produced from AutoResearch-style task factories with locked evaluators and scalar scorers. Passing runs were converted into clean instruction/solution records.

Training Metrics

Root baseline adapter:

Metric Value
Global step 23
Max steps 23
Epoch 0.983957
Last train loss 0.3516595
Final eval loss 0.3447445
Final eval perplexity 1.41163

Initial QLoRA test adapter:

Metric Value
Global step 50
Max steps 50
Epoch 0.787402
Last train loss 0.3274834
Final eval loss 0.3425751
Final eval perplexity 1.40857

These are internal SFT validation metrics only. They are not held-out browser-task pass rates.

Held-Out Evaluation Status

The next required evaluation is task-level generation against the locked held-out eval banks:

  • Three/R3F/WebGPU eval tasks
  • HyperFrames/Canvas/WebGPU eval tasks

Those evals should run the model-generated editable file through the existing Python, TypeScript, Playwright, canvas, and HyperFrames scorers. Until that is complete, this adapter should be treated as a first SFT baseline rather than a proven production coding model.

Usage

Example PEFT loading pattern:

from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
import torch

base_model = "Qwen/Qwen3.6-27B"
adapter = "drainer/qwen36-threehf-sft-adapter"

tokenizer = AutoTokenizer.from_pretrained(base_model, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(
    base_model,
    torch_dtype=torch.bfloat16,
    device_map="auto",
    trust_remote_code=True,
)
model = PeftModel.from_pretrained(model, adapter)
model.eval()

messages = [
    {
        "role": "user",
        "content": "Return only a complete src/solution.tsx React Three Fiber scene using Drei OrbitControls.",
    }
]
text = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
inputs = tokenizer(text, return_tensors="pt").to(model.device)

with torch.no_grad():
    output = model.generate(
        **inputs,
        max_new_tokens=2048,
        temperature=0.2,
        top_p=0.9,
    )

print(tokenizer.decode(output[0], skip_special_tokens=True))

Serving With vLLM LoRA

Example:

vllm serve Qwen/Qwen3.6-27B   --enable-lora   --lora-modules qwen36-threehf=drainer/qwen36-threehf-sft-adapter   --max-model-len 16384   --dtype bfloat16

Then call the served model name qwen36-threehf.

Intended Use

This adapter is intended for experimentation with specialized code generation for browser graphics and 3D app-building tasks, especially tasks that output complete editable files for locked harnesses.

Good target outputs include:

  • src/solution.tsx for React Three Fiber task harnesses
  • index.html for HyperFrames/Canvas task harnesses
  • Compact, self-contained scene implementations
  • Deterministic visual compositions suitable for automated scoring

Limitations

  • This is a small first-pass SFT run, not a fully validated specialist model.
  • The adapter has not yet been benchmarked against the held-out browser execution evals.
  • It may overfit to the local task harness output style.
  • It may still generate invalid imports, incomplete files, or visually incorrect scenes.
  • It is not a merged model; the base model is required.
  • Use of this adapter is subject to the base model's license and terms.

Provenance

  • Project repo: https://github.com/trevor-ofarrell/three-autoresearch
  • Adapter repo owner: Trevor O'Farrell
  • Final metrics record on training machine: /workspace/data/three-autoresearch-training/first_run_final_metrics.json
  • Baseline reload check: passed; generated a valid-looking React Three Fiber sample from the adapter.
Downloads last month
138
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for drainer/qwen36-threehf-sft-adapter

Base model

Qwen/Qwen3.6-27B
Adapter
(140)
this model