Downloads · 30 days
28
37% of all-time downloads
vindows/qwen2.5-7b-text-to-sql-merged
qwen2.5-7b-text-to-sql-merged is a text generation model from vindows. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as apache-2.0.
This is a fully merged model (base + LoRA) ready for direct use. No need to load adapters separately!
Downloads · 30 days
28
37% of all-time downloads
All-time downloads
75
Public
Parameters
7.6B
15.2 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors15.2 GB · 100%
From the Hugging Face model README
This is a fully merged model (base + LoRA) ready for direct use. No need to load adapters separately!
| Metric | Score |
|---|---|
| Exact Match | 0.00% |
| Normalized Match | 0.50% |
| Component Accuracy | 92.60% |
| Average Similarity | 25.47% |
| Metric | Base | Fine-tuned | Improvement |
|---|---|---|---|
| Loss | 2.1301 | 0.4098 | 80.76% ⬆️ |
| Perplexity | 8.4155 | 1.5064 | 82.10% ⬆️ |
from transformers import AutoModelForCausalLM, AutoTokenizer
import torch
model = AutoModelForCausalLM.from_pretrained(
"vindows/qwen2.5-7b-text-to-sql-merged",
device_map="auto",
torch_dtype=torch.bfloat16,
trust_remote_code=True
)
tokenizer = AutoTokenizer.from_pretrained(
"vindows/qwen2.5-7b-text-to-sql-merged",
trust_remote_code=True
)
# Generate SQL from natural language
prompt = """Convert the following natural language question to SQL:
Database: concert_singer
Question: How many singers do we have?
SQL:"""
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
outputs = model.generate(**inputs, max_new_tokens=128, temperature=0.1, do_sample=False)
result = tokenizer.decode(outputs[0], skip_special_tokens=True)
# Extract SQL (remove prompt and extra text)
sql = result.split("SQL:")[-1].strip().split('\n\n')[0]
print(sql)
See the LoRA adapter model card for detailed limitations and recommendations.
Apache 2.0