onekq commited on
Commit
45be1e3
·
verified ·
1 Parent(s): dfd8c30

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +65 -0
README.md ADDED
@@ -0,0 +1,65 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ base_model: onekq-ai/OneSQL-v0.1-Qwen-1.5B
3
+ tags:
4
+ - text-generation-inference
5
+ - transformers
6
+ - qwen2
7
+ - gguf
8
+ license: apache-2.0
9
+ language:
10
+ - en
11
+ ---
12
+
13
+ # Introduction
14
+
15
+ This model is the GGUF version of [OneSQL-v0.1-Qwen-1.5B](https://huggingface.co/onekq-ai/OneSQL-v0.1-Qwen-1.5B). You can also find it on [Ollama](https://ollama.com/onekq/OneSQL-v0.1-Qwen).
16
+
17
+ # Performances
18
+
19
+ The self-evaluation EX score of the original model is **31.55** (compared to **63.33** by the 32B model on the [BIRD leaderboard](https://bird-bench.github.io/).
20
+ Below is the self-evaluation results for each quantization.
21
+
22
+ | Quantization |EX score|
23
+ |------------|------|
24
+ | Q2_K | 2.50 |
25
+ | Q3_K_S | 9.85 |
26
+ | Q3_K_M | 11.80 |
27
+ | Q3_K_L | 11.80 |
28
+ | Q4_0 | 13.77 |
29
+ | Q4_1 | 12.74 |
30
+ | Q4_K_S | 13.32 |
31
+ | Q4_K_M | 12.39 |
32
+ | Q5_0 | 13.95 |
33
+ | Q5_1 | 13.05 |
34
+ | **Q5_K_S** | **14.36** |
35
+ | Q5_K_M | 14.10 |
36
+ | Q6_K | 13.95 |
37
+ | Q8_0 | 13.24 |
38
+
39
+ # Quick start
40
+
41
+ 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 **--**.
42
+ 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.
43
+
44
+ ```sh
45
+ PROMPT="CREATE TABLE students (
46
+ id INTEGER PRIMARY KEY,
47
+ name TEXT,
48
+ age INTEGER,
49
+ grade TEXT
50
+ );
51
+
52
+ -- Find the three youngest students
53
+ SELECT "
54
+
55
+ ollama run onekq-ai/OneSQL-v0.1-Qwen:1.5B-Q5_K_S "$PROMPT"
56
+ ```
57
+
58
+ The model response is the finished SQL query without **SELECT**
59
+ ```sql
60
+ * FROM students ORDER BY age ASC LIMIT 3
61
+ ```
62
+
63
+ # Caveats
64
+
65
+ 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.