Instructions to use sonnyhuang/qwen2.5-coder-3b-nflsql-lora with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use sonnyhuang/qwen2.5-coder-3b-nflsql-lora with MLX:
# Download the model from the Hub pip install huggingface_hub[hf_xet] hf download sonnyhuang/qwen2.5-coder-3b-nflsql-lora --local-dir qwen2.5-coder-3b-nflsql-lora
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
- Atomic Chat
Qwen2.5-Coder-3B NFL Text-to-SQL LoRA
Built with Qwen. This is a LoRA adapter for
mlx-community/Qwen2.5-Coder-3B-Instruct-8bit
that writes PostgreSQL for natural-language NFL questions against the nfl schema of the
NFL Text-to-SQL Agent project.
- Training: MLX-LM LoRA, rank 16 on all attention and MLP projections of the top 16 blocks. One epoch over 3.4k synthetic examples, each executed against the database; loss on the SQL completion only.
- Results: execution accuracy of 94.5% on held-out templated questions (98.2% with RAG) and 63.4% on hand-written questions (67.0% with RAG). The project README covers the full comparison against RAG.
Usage
uv run nflsql fetch-adapter # from the project repository
or directly:
from mlx_lm import load
model, tokenizer = load("mlx-community/Qwen2.5-Coder-3B-Instruct-8bit", adapter_path="<downloaded dir>")
Prompts must follow the project's format (system prompt + compact schema); see src/nflsql/agent/prompts.py.
License
Qwen is licensed under the Qwen RESEARCH LICENSE AGREEMENT, Copyright (c) Alibaba Cloud. All Rights Reserved. This adapter is a derivative of Qwen2.5-Coder-3B-Instruct and may be used for non-commercial (research or evaluation) purposes only; see LICENSE. The training data is derived from nflverse (CC BY 4.0).
Hardware compatibility
Log In to add your hardware
Quantized
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐ Ask for provider support