Downloads · 30 days
46
15% of all-time downloads
vindows/qwen2.5-0.5b-text-to-sql-gguf
qwen2.5-0.5b-text-to-sql-gguf is a machine learning model from vindows. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for gguf. The card lists the license as apache-2.0.
This is a GGUF format version optimized for CPU inference with llama.cpp.
Downloads · 30 days
46
15% of all-time downloads
All-time downloads
307
Public
Repo size
994 MB
Likes
0
Public
Click a slice to open those files.
.gguf994 MB · 100%
From the Hugging Face model README
This is a GGUF format version optimized for CPU inference with llama.cpp.
| Metric | Score |
|---|---|
| Exact Match | 0.00% |
| Normalized Match | 0.00% |
| Component Accuracy | 91.94% |
| Average Similarity | 21.78% |
# Clone llama.cpp
git clone https://github.com/ggerganov/llama.cpp
cd llama.cpp
make
# Download the model
huggingface-cli download vindows/qwen2.5-0.5b-text-to-sql-gguf qwen2.5-0.5b-text-to-sql-f16.gguf
./llama-cli \
-m qwen2.5-0.5b-text-to-sql-f16.gguf \
-p "Convert the following natural language question to SQL:\n\nDatabase: concert_singer\nQuestion: How many singers do we have?\n\nSQL:" \
-n 128 \
--temp 0.1
pip install llama-cpp-python
from llama_cpp import Llama
# Load model
llm = Llama(
model_path="qwen2.5-0.5b-text-to-sql-f16.gguf",
n_ctx=2048,
n_threads=8
)
# Generate SQL
prompt = """Convert the following natural language question to SQL:
Database: concert_singer
Question: How many singers do we have?
SQL:"""
output = llm(prompt, max_tokens=128, temperature=0.1, stop=["\n\n"])
sql = output['choices'][0]['text'].strip()
print(sql)
This model is provided in f16 format. For smaller file sizes with slight quality trade-off, you can quantize further:
# Quantize to Q4_K_M (recommended for most use cases)
./llama-quantize qwen2.5-0.5b-text-to-sql-f16.gguf qwen2.5-0.5b-text-to-sql-Q4_K_M.gguf Q4_K_M
# Quantize to Q8_0 (higher quality, larger size)
./llama-quantize qwen2.5-0.5b-text-to-sql-f16.gguf qwen2.5-0.5b-text-to-sql-Q8_0.gguf Q8_0
qwen2.5-0.5b-text-to-sql-f16.gguf - F16 quantized model (949MB)See main model card for limitations.
Apache 2.0