Instructions to use JackyJoh/Qwen2.5-Coder-3B-SQL with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use JackyJoh/Qwen2.5-Coder-3B-SQL with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf JackyJoh/Qwen2.5-Coder-3B-SQL:BF16 # Run inference directly in the terminal: llama cli -hf JackyJoh/Qwen2.5-Coder-3B-SQL:BF16
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf JackyJoh/Qwen2.5-Coder-3B-SQL:BF16 # Run inference directly in the terminal: llama cli -hf JackyJoh/Qwen2.5-Coder-3B-SQL:BF16
Build from source code
git clone https://github.com/ggml-org/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-app # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama serve -hf JackyJoh/Qwen2.5-Coder-3B-SQL:BF16 # Run inference directly in the terminal: ./build/bin/llama cli -hf JackyJoh/Qwen2.5-Coder-3B-SQL:BF16
Use Docker
docker model run hf.co/JackyJoh/Qwen2.5-Coder-3B-SQL:BF16
- Llama new
- LM Studio
- Jan
- vLLM
How to use JackyJoh/Qwen2.5-Coder-3B-SQL with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "JackyJoh/Qwen2.5-Coder-3B-SQL" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "JackyJoh/Qwen2.5-Coder-3B-SQL", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/JackyJoh/Qwen2.5-Coder-3B-SQL:BF16
- Ollama
How to use JackyJoh/Qwen2.5-Coder-3B-SQL with Ollama:
ollama run hf.co/JackyJoh/Qwen2.5-Coder-3B-SQL:BF16
- Unsloth Desktop
- Pi
How to use JackyJoh/Qwen2.5-Coder-3B-SQL with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf JackyJoh/Qwen2.5-Coder-3B-SQL:BF16
Configure the model in Pi
# Install Pi: npm install -g @earendil-works/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:9931/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "JackyJoh/Qwen2.5-Coder-3B-SQL:BF16" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use JackyJoh/Qwen2.5-Coder-3B-SQL with Docker Model Runner:
docker model run hf.co/JackyJoh/Qwen2.5-Coder-3B-SQL:BF16
- Lemonade
How to use JackyJoh/Qwen2.5-Coder-3B-SQL with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull JackyJoh/Qwen2.5-Coder-3B-SQL:BF16
Run and chat with the model
lemonade run user.Qwen2.5-Coder-3B-SQL-BF16
List all available models
lemonade list
- Hermes Agent
How to use JackyJoh/Qwen2.5-Coder-3B-SQL with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf JackyJoh/Qwen2.5-Coder-3B-SQL:BF16
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:9931/v1 hermes config set model.default JackyJoh/Qwen2.5-Coder-3B-SQL:BF16
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use JackyJoh/Qwen2.5-Coder-3B-SQL with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf JackyJoh/Qwen2.5-Coder-3B-SQL:BF16
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:9931/v1 \ --custom-model-id "JackyJoh/Qwen2.5-Coder-3B-SQL:BF16" \ --custom-provider-id llama-cpp \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
Qwen2.5-Coder-3B-SQL
Qwen2.5-Coder-3B fine-tuned with LoRA for Postgres and SQLite SQL: autocomplete inside a query, filling a gap in the middle of a query, English to SQL, and explaining a query in English. It is the default model for the text2sql tool and is meant to be downloaded and run locally by that tool.
Built with Qwen.
Files
| File | Precision | Size | Notes |
|---|---|---|---|
Qwen2.5-Coder-3B-SQL-Q8_0.gguf |
Q8_0 | 3.3 GB | Recommended. Same scores as BF16 |
Qwen2.5-Coder-3B-SQL-BF16.gguf |
BF16 | 6.2 GB | Full precision, for making your own quants |
Both run in llama.cpp and anything built on it. Q8_0 fits on a 6 GB GPU with room for context.
Training
LoRA (rank 32) on 300,000 examples sampled from a set of about 600,000, built from public text-to-SQL datasets and synthetic pairs on app-style schemas, with about half of each task in Postgres and half in SQLite. Postgres versions of SQLite pairs were kept only when both returned the same results. Trained for one epoch on a single RTX 5070 Ti. The adapter was merged into the base weights before converting to GGUF.
Prompt format
Every task is written as a small repo with a gap to fill in the last file, using Qwen's own repo and FIM tokens.
<|repo_name|>my_db
<|file_sep|>schema.sql
-- dialect: postgres
CREATE TABLE users (id int, name text, age int);
<|file_sep|>query.sql
<|fim_prefix|>-- users over 30
SELECT name FROM users <|fim_suffix|><|fim_middle|>
The text2sql tool builds these prompts for you.
Evaluation
BIRD Mini-Dev (SQLite), scored by running the generated SQL and comparing its results to the reference query. Scores are for the Q8_0 file, next to the base model at Q8_0 with the same prompts.
| Task | Base model | Fine-tuned |
|---|---|---|
| English to SQL (no hints) | 14.9% | 33.7% |
| Continue a query | 39.0% | 49.9% |
| Fill the middle of a query | 35.5% | 45.8% |
When the query has a comment saying what it is for, the fine-tuned model scores 75.7% on continue and 72.1% on fill-middle.
License
This model is a derivative of Qwen2.5-Coder-3B and is released under the Qwen Research License, which does not allow commercial use.
- Downloads last month
- -
8-bit
16-bit