CoolFace
Modelpublic

onekq-ai/OneSQL-v0.1-Qwen-1.5B-GGUF

sourceHugging Faceapache-2.0updated 1y agoView on Hugging Face
0likes302downloads
Model Card

Introduction

This model is the GGUF version of OneSQL-v0.1-Qwen-1.5B. You can also find it on Ollama.

Performances

The self-evaluation EX score of the original model is 31.55 (compared to 63.33 by the 32B model on the BIRD leaderboard. Below is the self-evaluation results for each quantization.

QuantizationEX score
Q2_K2.50
Q3KS9.85
Q3KM11.80
Q3KL11.80
Q4_013.77
Q4_112.74
Q4KS13.32
Q4KM12.39
Q5_013.95
Q5_113.05
Q5_K_S14.36
Q5KM14.10
Q6_K13.95
Q8_013.24

Quick start

To use this model, craft your prompt to start with your database schema in the form of CREATE TABLE, followed by your natural language query preceded by --. Make sure your prompt ends with SELECT in order for the model to finish the query for you. There is no need to set other parameters like temperature or max token limit.

sh
PROMPT="CREATE TABLE students (
    id INTEGER PRIMARY KEY,
    name TEXT,
    age INTEGER,
    grade TEXT
);

-- Find the three youngest students
SELECT "

ollama run onekq-ai/OneSQL-v0.1-Qwen:1.5B-Q5_K_S "$PROMPT"

The model response is the finished SQL query without SELECT

sql
* FROM students ORDER BY age ASC LIMIT 3

Caveats

The performance drop from the original model is due to quantization itself, and the lack of beam search support in llama.cpp framework. Use at your own discretion.