Instructions to use QuantFactory/llama-3-sqlcoder-8b-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use QuantFactory/llama-3-sqlcoder-8b-GGUF with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf QuantFactory/llama-3-sqlcoder-8b-GGUF:Q4_K_M # Run inference directly in the terminal: llama cli -hf QuantFactory/llama-3-sqlcoder-8b-GGUF:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf QuantFactory/llama-3-sqlcoder-8b-GGUF:Q4_K_M # Run inference directly in the terminal: llama cli -hf QuantFactory/llama-3-sqlcoder-8b-GGUF:Q4_K_M
Build from source code
git clone https://github.com/ggml-org/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-app # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama serve -hf QuantFactory/llama-3-sqlcoder-8b-GGUF:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama cli -hf QuantFactory/llama-3-sqlcoder-8b-GGUF:Q4_K_M
Use Docker
docker model run hf.co/QuantFactory/llama-3-sqlcoder-8b-GGUF:Q4_K_M
- Llama new
- LM Studio
- Jan
- vLLM
How to use QuantFactory/llama-3-sqlcoder-8b-GGUF with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "QuantFactory/llama-3-sqlcoder-8b-GGUF" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "QuantFactory/llama-3-sqlcoder-8b-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/QuantFactory/llama-3-sqlcoder-8b-GGUF:Q4_K_M
- Ollama
How to use QuantFactory/llama-3-sqlcoder-8b-GGUF with Ollama:
ollama run hf.co/QuantFactory/llama-3-sqlcoder-8b-GGUF:Q4_K_M
- Unsloth Desktop
- Docker Model Runner
How to use QuantFactory/llama-3-sqlcoder-8b-GGUF with Docker Model Runner:
docker model run hf.co/QuantFactory/llama-3-sqlcoder-8b-GGUF:Q4_K_M
- Lemonade
How to use QuantFactory/llama-3-sqlcoder-8b-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull QuantFactory/llama-3-sqlcoder-8b-GGUF:Q4_K_M
Run and chat with the model
lemonade run user.llama-3-sqlcoder-8b-GGUF-Q4_K_M
List all available models
lemonade list
- Atomic Chat
|
Download README.md from QuantFactory/llama-3-sqlcoder-8b-GGUF: direct link, hf CLI and curl.
- Browser
- Download file 1.62 kB
-
https://huggingface.co/QuantFactory/llama-3-sqlcoder-8b-GGUF/resolve/main/README.md
- Command line
-
hf download hf://QuantFactory/llama-3-sqlcoder-8b-GGUF/README.md
-
curl -L -o README.md https://huggingface.co/QuantFactory/llama-3-sqlcoder-8b-GGUF/resolve/main/README.md
1.62 kB
| license: cc-by-sa-4.0 | |
| metrics: | |
| - accuracy | |
| pipeline_tag: text-generation | |
| tags: | |
| - code | |
| base_model: defog/llama-3-sqlcoder-8b | |
| # QuantFactory/llama-3-sqlcoder-8b-GGUF | |
| This is quantized version of [defog/llama-3-sqlcoder-8b](https://huggingface.co/defog/llama-3-sqlcoder-8b) created using llama.cpp | |
| ## Model Description | |
| 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. | |
|  | |
| Developed by: Defog, Inc | |
| Model type: [Text to SQL] | |
| License: [CC-by-SA-4.0] | |
| Finetuned from model: [Meta-Llama-3-8B-Instruct] | |
| ## Demo Page | |
| [https://defog.ai/sqlcoder-demo/](https://defog.ai/sqlcoder-demo/) | |
| ## Ideal prompt and inference parameters | |
| Set temperature to 0, and do not do sampling. | |
| ### Prompt | |
| ``` | |
| <|begin_of_text|><|start_header_id|>user<|end_header_id|> | |
| Generate a SQL query to answer this question: `{user_question}` | |
| {instructions} | |
| DDL statements: | |
| {create_table_statements}<|eot_id|><|start_header_id|>assistant<|end_header_id|> | |
| The following SQL query best answers the question `{user_question}`: | |
| ```sql | |
| ``` | |
| ## Evaluation | |
| This model was evaluated on SQL-Eval, a PostgreSQL based evaluation framework developed by Defog for testing and alignment of model capabilities. | |
| You can read more about the methodology behind SQLEval [here](https://defog.ai/blog/open-sourcing-sqleval/). | |
| ## Contact defog | |
| Contact defog on X at [@defogdata](https://twitter.com/defogdata), or on email at founders@defog.ai |