Update README.md
Browse files
README.md
CHANGED
@@ -10,10 +10,8 @@ pipeline_tag: reinforcement-learning
|
|
10 |
tags:
|
11 |
- text-to-sql
|
12 |
---
|
13 |
-
|
14 |
-
|
15 |
-
library: gemma3-text-to-sql
|
16 |
-
---
|
17 |
# Gemma 3 Text-to-SQL
|
18 |
|
19 |
A powerful LoRA-fine-tuned adapter for Gemma 3 that converts natural language questions into SQL queries with high accuracy and contextual understanding.
|
@@ -58,7 +56,7 @@ tokenizer = AutoTokenizer.from_pretrained(model_id)
|
|
58 |
model = AutoModelForCausalLM.from_pretrained(model_id)
|
59 |
|
60 |
# Load adapter
|
61 |
-
adapter_path = "
|
62 |
model = PeftModel.from_pretrained(model, adapter_path)
|
63 |
|
64 |
# Format prompt
|
@@ -87,7 +85,7 @@ from mlx_lm.utils import get_model_path
|
|
87 |
|
88 |
# Setup paths
|
89 |
model_path = "lmstudio-community/gemma-3-27b-it-GGUF"
|
90 |
-
adapter_path = "
|
91 |
|
92 |
# Run generation
|
93 |
prompt = "Convert the following natural language query to SQL: Find all customers in New York"
|
@@ -108,7 +106,7 @@ You can also use the Hugging Face Inference API:
|
|
108 |
```python
|
109 |
import requests
|
110 |
|
111 |
-
API_URL = "https://api-inference.huggingface.co/models/
|
112 |
headers = {"Authorization": f"Bearer {API_TOKEN}"}
|
113 |
|
114 |
def query(payload):
|
@@ -214,11 +212,11 @@ If you use this model in your research or applications, please cite:
|
|
214 |
|
215 |
```bibtex
|
216 |
@misc{gemma3-text-to-sql,
|
217 |
-
author = {
|
218 |
title = {Gemma 3 Text-to-SQL: A LoRA-fine-tuned adapter for natural language to SQL conversion},
|
219 |
year = {2025},
|
220 |
publisher = {HuggingFace},
|
221 |
-
howpublished = {\url{https://huggingface.co/
|
222 |
}
|
223 |
```
|
224 |
|
@@ -235,4 +233,4 @@ We thank Google for releasing the Gemma 3 models and the Hugging Face team for t
|
|
235 |
If you find any issues or have suggestions for improvement, please open an issue on the GitHub repository or reach out on the Hugging Face community forums.
|
236 |
|
237 |
|
238 |
-
|
|
|
10 |
tags:
|
11 |
- text-to-sql
|
12 |
---
|
13 |
+
library: gemma3-text-to-sql
|
14 |
+
---
|
|
|
|
|
15 |
# Gemma 3 Text-to-SQL
|
16 |
|
17 |
A powerful LoRA-fine-tuned adapter for Gemma 3 that converts natural language questions into SQL queries with high accuracy and contextual understanding.
|
|
|
56 |
model = AutoModelForCausalLM.from_pretrained(model_id)
|
57 |
|
58 |
# Load adapter
|
59 |
+
adapter_path = "parole-study-viper/gemma-3-text-to-sql" # Replace with your HF model path
|
60 |
model = PeftModel.from_pretrained(model, adapter_path)
|
61 |
|
62 |
# Format prompt
|
|
|
85 |
|
86 |
# Setup paths
|
87 |
model_path = "lmstudio-community/gemma-3-27b-it-GGUF"
|
88 |
+
adapter_path = "parole-study-viper/gemma-3-text-to-sql/adapter_model.safetensors"
|
89 |
|
90 |
# Run generation
|
91 |
prompt = "Convert the following natural language query to SQL: Find all customers in New York"
|
|
|
106 |
```python
|
107 |
import requests
|
108 |
|
109 |
+
API_URL = "https://api-inference.huggingface.co/models/parole-study-viper/gemma-3-text-to-sql"
|
110 |
headers = {"Authorization": f"Bearer {API_TOKEN}"}
|
111 |
|
112 |
def query(payload):
|
|
|
212 |
|
213 |
```bibtex
|
214 |
@misc{gemma3-text-to-sql,
|
215 |
+
author = {parole-study-viper},
|
216 |
title = {Gemma 3 Text-to-SQL: A LoRA-fine-tuned adapter for natural language to SQL conversion},
|
217 |
year = {2025},
|
218 |
publisher = {HuggingFace},
|
219 |
+
howpublished = {\url{https://huggingface.co/parole-study-viper/gemma-3-text-to-sql}}
|
220 |
}
|
221 |
```
|
222 |
|
|
|
233 |
If you find any issues or have suggestions for improvement, please open an issue on the GitHub repository or reach out on the Hugging Face community forums.
|
234 |
|
235 |
|
236 |
+
This model created by [@parole-study-viper]
|