llama-3-sqlcoder-8b โ€” GGUF

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.

Files

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

Usage

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.

Credits

See more text-to-SQL work on this profile, including the Text-to-PostgreSQL dataset.

Downloads last month
156
GGUF
Model size
8B params
Architecture
llama
Hardware compatibility
Log In to add your hardware

4-bit

Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Model tree for omeryentur/llama-3-sqlcoder-8b-GGUF

Quantized
(42)
this model

Collection including omeryentur/llama-3-sqlcoder-8b-GGUF