Instructions to use AaronTekle/SQLQwen with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use AaronTekle/SQLQwen with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen2.5-Coder-0.5B-Instruct") model = PeftModel.from_pretrained(base_model, "AaronTekle/SQLQwen") - Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files
README.md
CHANGED
|
@@ -171,7 +171,7 @@ tokenizer = AutoTokenizer.from_pretrained(
|
|
| 171 |
|
| 172 |
# Database table context
|
| 173 |
schema = """
|
| 174 |
-
Database:
|
| 175 |
|
| 176 |
Table: employees
|
| 177 |
Columns:
|
|
@@ -201,7 +201,7 @@ question = "Find the names of employees earning more than 50000."
|
|
| 201 |
|
| 202 |
# Build prompt
|
| 203 |
prompt = f"""
|
| 204 |
-
You are an expert SQL
|
| 205 |
|
| 206 |
Generate a SQL query based on the database schema and user question.
|
| 207 |
|
|
|
|
| 171 |
|
| 172 |
# Database table context
|
| 173 |
schema = """
|
| 174 |
+
Database: example_company_db
|
| 175 |
|
| 176 |
Table: employees
|
| 177 |
Columns:
|
|
|
|
| 201 |
|
| 202 |
# Build prompt
|
| 203 |
prompt = f"""
|
| 204 |
+
You are an expert SQL Developer.
|
| 205 |
|
| 206 |
Generate a SQL query based on the database schema and user question.
|
| 207 |
|