onekq commited on
Commit
5a69b2c
·
verified ·
1 Parent(s): 2325457

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +69 -3
README.md CHANGED
@@ -1,3 +1,69 @@
1
- ---
2
- license: apache-2.0
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ base_model: onekq-ai/OneSQL-v0.2-Qwen-7B
3
+ tags:
4
+ - text-generation-inference
5
+ - transformers
6
+ - qwen2
7
+ - gguf
8
+ license: apache-2.0
9
+ language:
10
+ - en
11
+ ---
12
+
13
+ # Disclaimer
14
+ Your email will be used for anonymous survey. It will NOT be shared with anyone.
15
+
16
+ # Introduction
17
+
18
+ This model is the GGUF version of [OneSQL-v0.2-Qwen-7B](https://huggingface.co/onekq-ai/OneSQL-v0.2-Qwen-7B).
19
+
20
+ # Performances
21
+
22
+ Below is the self-evaluation results for each quantization and its improvement over [OneSQL-v0.1-Qwen-7B-GGUF](https://huggingface.co/onekq-ai/OneSQL-v0.1-Qwen-7B-GGUF).
23
+
24
+ | Quantization |EX score|v0.1 EX score
25
+ |------------|-------|------|
26
+ | Q2_K | 39.60 | 29.79 |
27
+ | Q3_K_S | 38.79 | 36.31 |
28
+ | Q3_K_M | 41.93 | 39.24 |
29
+ | Q3_K_L | 45.49 | 40.14 |
30
+ | Q4_1 | 39.06 |
31
+ | Q4_K_S | 42.69 |
32
+ | **Q4_K_M** | 44.19 | **43.95** |
33
+ | Q5_0 | 43.63 | 43.84 |
34
+ | Q5_1 | 41.00 |
35
+ | Q5_K_S | 42.20 |
36
+ | Q5_K_M | 42.07 |
37
+ | Q6_K | 41.68 |
38
+ | Q8_0 | 41.09 |
39
+
40
+ # Quick start
41
+
42
+ 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 **--**.
43
+ 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.
44
+
45
+ ```sh
46
+ PROMPT="CREATE TABLE students (
47
+ id INTEGER PRIMARY KEY,
48
+ name TEXT,
49
+ age INTEGER,
50
+ grade TEXT
51
+ );
52
+
53
+ -- Find the three youngest students
54
+ SELECT "
55
+
56
+ PROMPT=$(printf "<|im_start|>system\nYou are a SQL expert. Return code only.<|im_end|>\n<|im_start|>user\n%s<|im_end|>\n<|im_start|>assistant\n" "$PROMPT")
57
+
58
+ llama.cpp/build/bin/llama-run file://OneSQL-v0.2-Qwen-7B-Q4_K_M.gguf "$PROMPT"
59
+ ```
60
+
61
+ The model response is the finished SQL query without **SELECT**
62
+ ```sql
63
+ * FROM students ORDER BY age ASC LIMIT 3
64
+ ```
65
+
66
+ # Caveats
67
+
68
+ * 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.
69
+ * The 2-bit and 3-bit quantizations suffer from repetitive and unrelevant output token, hence are not recommended for usage.