teaguesterling/qwen3.5-0.8b-astcss
Qwen3.5-0.8B astcss
Translates a developer's plain-English request into one astcss selector — a CSS-style query over an abstract syntax tree, executed by sitting_duck's ast_select.
methods of the Parser class -> .class#Parser .fn
functions that never raise -> .fn:not(:has(.throw))
calls to sleep -> .call#sleep
every with block -> with_statementIt needs the card
This model scores 0.0 % without its system prompt. It was trained with a per-language vocabulary card in the system position, and without one it answers as a chat model ("Here are the most effective ways to find…") rather than emitting a selector. Send the card for the language you are asking about; the cards are in the astcss-eval repo (train/cards/card_<lang>.md). Greedy decoding, thinking off, ~6 completion tokens per answer.
Scores
Execution match on 108 held-out pairs: a prediction counts only if running it returns exactly the same node set as the reference, on a real fixture, via the engine.
For scale: at 1.6 GB it outscores several 9B–35B models prompted with the same card, and sits ~7 points below a LoRA-tuned 4B. It has not been trained on tier-5 selectors (call graph, scope, receivers) and scores ~31 % there.
Training
LoRA r=16, α=32, all-linear targets, 2 epochs, lr 2e-4, seed 18, float16 on one RTX 2080 Ti, then merged into the base. 820 execution-verified pairs across nine languages (Python, C, C++, Rust, Go, Java, JavaScript, SQL, Bash), capped at 8 per (request template, selector shape). Every training pair was executed against real code and kept only if its selector returned 1–50 nodes, every modifier changed the node set, its distractors returned different node sets, and no eval answer leaked in.
Build notes
- Merged from the adapter with
tune/merge_adapter.py, which verifies numerically that the LoRA deltas landed (186 targeted tensors at max|Δ| 4.6e-3) rather than trusting a silent merge, and the merged weights were re-scored at 82.4 % before upload. - Text-only build. Saved as
Qwen3_5ForCausalLM; the base's vision tower (model.visual.*) and multi-token-prediction head (mtp.*) are not included. Use the base model if you need those. - Inherits the licence and terms of
Qwen/Qwen3.5-0.8B.
