Instructions to use bernardw/qwen2.5-coder-1.5b-codereview-taid with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use bernardw/qwen2.5-coder-1.5b-codereview-taid with MLX:
# Make sure mlx-lm is installed # pip install --upgrade mlx-lm # Generate text with mlx-lm from mlx_lm import load, generate model, tokenizer = load("bernardw/qwen2.5-coder-1.5b-codereview-taid") prompt = "Write a story about Einstein" messages = [{"role": "user", "content": prompt}] prompt = tokenizer.apply_chat_template( messages, add_generation_prompt=True ) text = generate(model, tokenizer, prompt=prompt, verbose=True) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
- Pi
How to use bernardw/qwen2.5-coder-1.5b-codereview-taid with Pi:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "bernardw/qwen2.5-coder-1.5b-codereview-taid"
Configure the model in Pi
# Install Pi: npm install -g @mariozechner/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "mlx-lm": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "bernardw/qwen2.5-coder-1.5b-codereview-taid" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
How to use bernardw/qwen2.5-coder-1.5b-codereview-taid with Hermes Agent:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "bernardw/qwen2.5-coder-1.5b-codereview-taid"
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:8080/v1 hermes config set model.default bernardw/qwen2.5-coder-1.5b-codereview-taid
Run Hermes
hermes
- OpenClaw new
How to use bernardw/qwen2.5-coder-1.5b-codereview-taid with OpenClaw:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "bernardw/qwen2.5-coder-1.5b-codereview-taid"
Configure OpenClaw
# Install OpenClaw: npm install -g openclaw@latest # Register the local server and set it as the default model: openclaw onboard --non-interactive --mode local \ --auth-choice custom-api-key \ --custom-base-url http://127.0.0.1:8080/v1 \ --custom-model-id "bernardw/qwen2.5-coder-1.5b-codereview-taid" \ --custom-provider-id mlx-lm \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
- MLX LM
How to use bernardw/qwen2.5-coder-1.5b-codereview-taid with MLX LM:
Generate or start a chat session
# Install MLX LM uv tool install mlx-lm # Interactive chat REPL mlx_lm.chat --model "bernardw/qwen2.5-coder-1.5b-codereview-taid"
Run an OpenAI-compatible server
# Install MLX LM uv tool install mlx-lm # Start the server mlx_lm.server --model "bernardw/qwen2.5-coder-1.5b-codereview-taid" # Calling the OpenAI-compatible server with curl curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "bernardw/qwen2.5-coder-1.5b-codereview-taid", "messages": [ {"role": "user", "content": "Hello"} ] }'
Upload README.md with huggingface_hub
Browse files
README.md
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
base_model: Qwen/Qwen2.5-Coder-1.5B-Instruct
|
| 4 |
+
tags: [code-review, distillation, taid, mlx, qwen2.5-coder]
|
| 5 |
+
language: [en]
|
| 6 |
+
pipeline_tag: text-generation
|
| 7 |
+
---
|
| 8 |
+
|
| 9 |
+
# Qwen2.5-Coder-1.5B Code-Review (TAID, direct from 7B)
|
| 10 |
+
|
| 11 |
+
A **Qwen2.5-Coder-1.5B-Instruct** student distilled (TAID logit-level KD) from **Qwen2.5-Coder-7B-Instruct**
|
| 12 |
+
to emit structured JSON code-review findings.
|
| 13 |
+
|
| 14 |
+
- **Held-out F1:** **0.482** on `eval_set_100` (stock base ≈ 0.22–0.29; Qwen-7B teacher ≈ 0.509).
|
| 15 |
+
- **License:** Apache-2.0 (pure Qwen2.5-Coder lineage — no teacher-license strings).
|
| 16 |
+
- **Note:** distilled *directly* from the 7B (not via the 3B) — best 1.5B; ~half the 3B size, ~same quality.
|
| 17 |
+
|
| 18 |
+
**Method.** Cached-logit knowledge distillation on Apple MLX: run the teacher once, cache top-k=50
|
| 19 |
+
logits over its *response* positions, train a LoRA student (rank 16 / 16 layers, lr 1e-4, seq 768)
|
| 20 |
+
against them, fuse. Held-out eval `eval_set_100` (100 labeled chunks, 73 buggy / 27 clean; py/js/c/go).
|
| 21 |
+
|
| 22 |
+
**Prompt contract.** Given a numbered code chunk, emit one JSON object
|
| 23 |
+
`{"findings":[{category, subtype, severity, confidence, title, body, evidence, line}]}`; `evidence`
|
| 24 |
+
is a verbatim source substring, `line` 1-based. Use repetition_penalty ~1.15 to keep JSON valid.
|
| 25 |
+
|
| 26 |
+
**Project findings (honest).** Teacher *selection* dominated: a 3B distilled from Gemma-2-9B ties the
|
| 27 |
+
Qwen-7B teacher (F1 0.509); per-category teacher *routing* added nothing (-0.003); 1.6x more
|
| 28 |
+
in-distribution data did not raise the ceiling. TAID (logit KD) > SFT with the Qwen-7B teacher
|
| 29 |
+
(0.478 vs 0.410) but both over-train past ~3000 steps on this small corpus.
|
| 30 |
+
|