defog / sqlcoder-34b-alpha

huggingface.co
Total runs: 84
24-hour runs: 0
7-day runs: 0
30-day runs: -23
Model's Last Updated: November 15 2023
text-generation

Introduction of sqlcoder-34b-alpha

Model Details of sqlcoder-34b-alpha

Defog SQLCoder

Updated on Nov 14 to reflect benchmarks for SQLCoder-34B

Defog's SQLCoder is a state-of-the-art LLM for converting natural language questions to SQL queries.

Interactive Demo | 🤗 HF Repo | ♾️ Colab | 🐦 Twitter

TL;DR

SQLCoder-34B is a 34B parameter model that outperforms gpt-4 and gpt-4-turbo for natural language to SQL generation tasks on our sql-eval framework, and significantly outperforms all popular open-source models.

SQLCoder-34B is fine-tuned on a base CodeLlama model.

Results on novel datasets not seen in training
model perc_correct
defog-sqlcoder-34b 84.0
gpt4-turbo-2023-11-09 82.5
gpt4-2023-11-09 82.5
defog-sqlcoder2 77.5
gpt4-2023-08-28 74.0
defog-sqlcoder-7b 71.0
gpt-3.5-2023-10-04 66.0
claude-2 64.5
gpt-3.5-2023-08-28 61.0
claude_instant_1 61.0
text-davinci-003 52.5

image

License

The code in this repo (what little there is of it) is Apache-2 licensed. The model weights have a CC BY-SA 4.0 license. The TL;DR is that you can use and modify the model for any purpose – including commercial use. However, if you modify the weights (for example, by fine-tuning), you must open-source your modified weights under the same license terms.

Training

Defog was trained on more than 20,000 human-curated questions. These questions were based on 10 different schemas. None of the schemas in the training data were included in our evaluation framework.

You can read more about our training approach and evaluation framework .

Results by question category

We classified each generated question into one of 5 categories. The table displays the percentage of questions answered correctly by each model, broken down by category.

date group_by order_by ratio join where
sqlcoder-34b 80 94.3 88.6 74.3 82.9 82.9
gpt-4 68 94.3 85.7 77.1 85.7 80
sqlcoder2-15b 76 80 77.1 60 77.1 77.1
sqlcoder-7b 64 82.9 74.3 54.3 74.3 74.3
gpt-3.5 68 77.1 68.6 37.1 71.4 74.3
claude-2 52 71.4 74.3 57.1 65.7 62.9
claude-instant 48 71.4 74.3 45.7 62.9 60
gpt-3 32 71.4 68.6 25.7 57.1 54.3
image
Using SQLCoder

You can use SQLCoder via the transformers library by downloading our model weights from the Hugging Face repo. We have added sample code for inference on a sample database schema .

python inference.py -q "Question about the sample database goes here"

# Sample question:
# Do we get more revenue from customers in New York compared to customers in San Francisco? Give me the total revenue for each city, and the difference between the two.

You can also use a demo on our website here

Hardware Requirements

SQLCoder-34B has been tested on a 4xA10 GPU with float16 weights. You can also load an 8-bit and 4-bit quantized version of the model on consumer GPUs with 20GB or more of memory – like RTX 4090, RTX 3090, and Apple M2 Pro, M2 Max, or M2 Ultra Chips with 20GB or more of memory.

Todo
  • Open-source the v1 model weights
  • Train the model on more data, with higher data variance
  • Tune the model further with Reward Modelling and RLHF
  • Pretrain a model from scratch that specializes in SQL analysis

Runs of defog sqlcoder-34b-alpha on huggingface.co

84
Total runs
0
24-hour runs
-1
3-day runs
0
7-day runs
-23
30-day runs

More Information About sqlcoder-34b-alpha huggingface.co Model

More sqlcoder-34b-alpha license Visit here:

https://choosealicense.com/licenses/cc-by-4.0

sqlcoder-34b-alpha huggingface.co

sqlcoder-34b-alpha huggingface.co is an AI model on huggingface.co that provides sqlcoder-34b-alpha's model effect (), which can be used instantly with this defog sqlcoder-34b-alpha model. huggingface.co supports a free trial of the sqlcoder-34b-alpha model, and also provides paid use of the sqlcoder-34b-alpha. Support call sqlcoder-34b-alpha model through api, including Node.js, Python, http.

sqlcoder-34b-alpha huggingface.co Url

https://huggingface.co/defog/sqlcoder-34b-alpha

defog sqlcoder-34b-alpha online free

sqlcoder-34b-alpha huggingface.co is an online trial and call api platform, which integrates sqlcoder-34b-alpha's modeling effects, including api services, and provides a free online trial of sqlcoder-34b-alpha, you can try sqlcoder-34b-alpha online for free by clicking the link below.

defog sqlcoder-34b-alpha online free url in huggingface.co:

https://huggingface.co/defog/sqlcoder-34b-alpha

sqlcoder-34b-alpha install

sqlcoder-34b-alpha is an open source model from GitHub that offers a free installation service, and any user can find sqlcoder-34b-alpha on GitHub to install. At the same time, huggingface.co provides the effect of sqlcoder-34b-alpha install, users can directly use sqlcoder-34b-alpha installed effect in huggingface.co for debugging and trial. It also supports api for free installation.

sqlcoder-34b-alpha install url in huggingface.co:

https://huggingface.co/defog/sqlcoder-34b-alpha

Url of sqlcoder-34b-alpha

sqlcoder-34b-alpha huggingface.co Url

Provider of sqlcoder-34b-alpha huggingface.co

defog
ORGANIZATIONS

Other API from defog

huggingface.co

Total runs: 11.2K
Run Growth: -10.3K
Growth Rate: -92.57%
Updated:February 12 2024
huggingface.co

Total runs: 4.2K
Run Growth: -1.4K
Growth Rate: -34.69%
Updated:October 14 2023
huggingface.co

Total runs: 263
Run Growth: 46
Growth Rate: 17.49%
Updated:March 01 2024
huggingface.co

Total runs: 155
Run Growth: 37
Growth Rate: 23.87%
Updated:February 06 2024