Qwen2.5-Coder-3B-Vitest (GGUF)
A domain-specialized version of Qwen2.5-Coder-3B fine-tuned to generate Vitest + React Testing Library unit tests for React components.
The model focuses on behavior-faithful testing, avoiding hallucinated UI/state and preferring modern RTL best practices.
π What this model does
Generates Vitest tests using React Testing Library.
Prefers:
getByRole,getByLabelText,getByPlaceholderTextuserEventfor interactionsvi.fn()for callback assertions
Avoids:
- Hallucinated UI or state
- Testing behavior not present in the component
- Legacy
fireEvent
Tries to produce behavior-faithful, minimal tests.
π§ Training details
| Detail | Value |
|---|---|
| Base model | Qwen2.5-Coder-3B |
| Method | LoRA fine-tuning using MLX (Apple Silicon) |
| LoRA rank | 16 |
| Trainable parameters | |
| Dataset | ~800 curated React component β Vitest test pairs |
| Sequence length | 2048 |
| Training | |
| Hardware | Apple Silicon (Mac mini M4 Pro, 64 GB RAM) |
The dataset was curated and scored to:
- Prefer robust RTL queries
- Penalize async misuse,
fireEvent, focused/skipped tests - Enforce correct callback testing for callback-only components
- Encourage clean, production-style tests
π¦ Files in this repo
qwen2.5-coder-3b-vitest.Q4_K_M.ggufβ Quantized GGUF build (recommended for Ollama / llama.cpp)
π Usage with Ollama
Create a Modelfile:
FROM qwen2.5-coder-3b-vitest.Q4_K_M.gguf
TEMPLATE """
You are an expert frontend test engineer.
{{ .Prompt }}
"""
PARAMETER temperature 0.2
PARAMETER top_p 0.9
PARAMETER num_ctx 4096
Then run:
ollama create vitest-coder -f Modelfile
ollama run vitest-coder "Write Vitest tests for this React component: ..."
β οΈ Limitations
- May overuse
async/awaitin simple sync cases - May generate redundant tests for trivial components
- Best results when provided with clear component context
- For large repos, using RAG (retrieval of similar tests/components) improves quality
π License
Same license as the base model: Qwen2.5-Coder-3B.
- Downloads last month
- 40
Hardware compatibility
Log In
to add your hardware
4-bit