Instructions to use teaguesterling/qwen3.5-0.8b-astcss with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use teaguesterling/qwen3.5-0.8b-astcss with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="teaguesterling/qwen3.5-0.8b-astcss") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("teaguesterling/qwen3.5-0.8b-astcss") model = AutoModelForCausalLM.from_pretrained("teaguesterling/qwen3.5-0.8b-astcss", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use teaguesterling/qwen3.5-0.8b-astcss with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "teaguesterling/qwen3.5-0.8b-astcss" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "teaguesterling/qwen3.5-0.8b-astcss", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/teaguesterling/qwen3.5-0.8b-astcss
- SGLang
How to use teaguesterling/qwen3.5-0.8b-astcss with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "teaguesterling/qwen3.5-0.8b-astcss" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "teaguesterling/qwen3.5-0.8b-astcss", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "teaguesterling/qwen3.5-0.8b-astcss" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "teaguesterling/qwen3.5-0.8b-astcss", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use teaguesterling/qwen3.5-0.8b-astcss with Docker Model Runner:
docker model run hf.co/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_statement
It 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.
| match | T1 | T2 | T3 | T4 | |
|---|---|---|---|---|---|
| this model | 82.4 % | 19/21 | 17/25 | 25/31 | 28/31 |
| Qwen3.5-0.8B untuned, same card | 26.9 % | 10/21 | 12/25 | 5/31 | 2/31 |
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.
- Downloads last month
- 114