Create README.md
Browse files
README.md
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: cc-by-sa-4.0
|
| 3 |
+
metrics:
|
| 4 |
+
- accuracy
|
| 5 |
+
pipeline_tag: text-generation
|
| 6 |
+
tags:
|
| 7 |
+
- code
|
| 8 |
+
base_model: defog/llama-3-sqlcoder-8b
|
| 9 |
+
---
|
| 10 |
+
|
| 11 |
+
# QuantFactory/llama-3-sqlcoder-8b-GGUF
|
| 12 |
+
This is quantized version of [defog/llama-3-sqlcoder-8b](https://huggingface.co/defog/llama-3-sqlcoder-8b) created using llama.cpp
|
| 13 |
+
|
| 14 |
+
## Model Description
|
| 15 |
+
|
| 16 |
+
A capable language model for text to SQL generation for Postgres, Redshift and Snowflake that is on-par with the most capable generalist frontier models.
|
| 17 |
+
|
| 18 |
+

|
| 19 |
+
|
| 20 |
+
|
| 21 |
+
Developed by: Defog, Inc
|
| 22 |
+
Model type: [Text to SQL]
|
| 23 |
+
License: [CC-by-SA-4.0]
|
| 24 |
+
Finetuned from model: [Meta-Llama-3-8B-Instruct]
|
| 25 |
+
|
| 26 |
+
## Demo Page
|
| 27 |
+
[https://defog.ai/sqlcoder-demo/](https://defog.ai/sqlcoder-demo/)
|
| 28 |
+
|
| 29 |
+
## Ideal prompt and inference parameters
|
| 30 |
+
Set temperature to 0, and do not do sampling.
|
| 31 |
+
|
| 32 |
+
### Prompt
|
| 33 |
+
```
|
| 34 |
+
<|begin_of_text|><|start_header_id|>user<|end_header_id|>
|
| 35 |
+
|
| 36 |
+
Generate a SQL query to answer this question: `{user_question}`
|
| 37 |
+
{instructions}
|
| 38 |
+
|
| 39 |
+
DDL statements:
|
| 40 |
+
{create_table_statements}<|eot_id|><|start_header_id|>assistant<|end_header_id|>
|
| 41 |
+
|
| 42 |
+
The following SQL query best answers the question `{user_question}`:
|
| 43 |
+
```sql
|
| 44 |
+
|
| 45 |
+
```
|
| 46 |
+
|
| 47 |
+
## Evaluation
|
| 48 |
+
This model was evaluated on SQL-Eval, a PostgreSQL based evaluation framework developed by Defog for testing and alignment of model capabilities.
|
| 49 |
+
|
| 50 |
+
You can read more about the methodology behind SQLEval [here](https://defog.ai/blog/open-sourcing-sqleval/).
|
| 51 |
+
|
| 52 |
+
## Contact defog
|
| 53 |
+
Contact defog on X at [@defogdata](https://twitter.com/defogdata), or on email at founders@defog.ai
|