MLX
lora
text-to-sql
nfl

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).

Downloads last month

-

Downloads are not tracked for this model. How to track
MLX
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

Model tree for sonnyhuang/qwen2.5-coder-3b-nflsql-lora