Downloads · 30 days
51
7% of all-time downloads
omeryentur/llama-3-sqlcoder-8b-GGUF
llama-3-sqlcoder-8b-GGUF is a text generation model from omeryentur. Use it when you need the model to write or continue text. It is set up for gguf. The card lists the license as cc-by-sa-4.0.
GGUF (llama.cpp) build of defog/llama-3-sqlcoder-8b, a Llama-3 8B model fine-tuned for text-to-SQL generation. This repo packages a Q4KM quantization so the model runs efficiently on CPU/GPU through llama.cpp, Ollama,…
Downloads · 30 days
51
7% of all-time downloads
All-time downloads
748
Public
Repo size
4.9 GB
Likes
3
Public
Click a slice to open those files.
.gguf4.9 GB · 100%
From the Hugging Face model README
GGUF (llama.cpp) build of defog/llama-3-sqlcoder-8b,
a Llama-3 8B model fine-tuned for text-to-SQL generation. This repo packages a
Q4_K_M quantization so the model runs efficiently on CPU/GPU through
llama.cpp, Ollama, LM Studio, and other
GGUF-compatible runtimes.
| File | Quant | Approx. size | Notes |
|---|---|---|---|
llama-3-sqlcoder-8b.Q4_K_M.gguf | Q4_K_M | ~4.9 GB | 4-bit, good quality/size trade-off |
llama.cpp
./llama-cli -m llama-3-sqlcoder-8b.Q4_K_M.gguf -p "Generate a SQL query to answer the question."
Ollama (Modelfile)
FROM ./llama-3-sqlcoder-8b.Q4_K_M.gguf
Python (llama-cpp-python)
from llama_cpp import Llama
llm = Llama.from_pretrained(
repo_id="omeryentur/llama-3-sqlcoder-8b-GGUF",
filename="llama-3-sqlcoder-8b.Q4_K_M.gguf",
)
out = llm("### Task\nGenerate a SQL query to answer the question.\n### Question\nHow many users signed up in 2024?\n### SQL\n")
print(out["choices"][0]["text"])
Use the prompt format expected by the base defog/llama-3-sqlcoder-8b model for best results.
See more text-to-SQL work on this profile, including the Text-to-PostgreSQL dataset.