dan-text2sql's picture
Initial commit: Create v2 model card (Gemma-3)
d8bdce3 verified
---
license: apache-2.0
base_model: unsloth/gemma-3-27b-it-bnb-4bit
tags:
- text-to-sql
- gemma-3
- unsloth
- trl
- finance
- real-estate
- nlp
datasets:
- dan-text2sql/seoul-realestate-sql-v1
library_name: transformers
---
# seoul-realestate-sql-agent-v2
**Developed by:** dan-text2sql
**License:** apache-2.0
**Finetuned from model:** [unsloth/gemma-3-27b-it-bnb-4bit](https://huggingface.co/unsloth/gemma-3-27b-it-bnb-4bit)
This model is a **Text-to-SQL agent** specialized in **Korean Real Estate (Seoul)** data.
It was trained 2x faster with [Unsloth](https://github.com/unslothai/unsloth) and Huggingface's TRL library.
## Model Description (v2)
This is the **v2** version of the Seoul Real Estate SQL Agent.
* **Base Model:** Gemma-3 27B (IT)
* **Improvement:** Unlike v1 (Mistral-7B), this model leverages the massive 27B parameter size of Gemma-3.
* **Objective:** Translate natural language queries about Seoul apartment real estate data into executable SQL queries.
## Usage Example
```python
from unsloth import FastLanguageModel
# Load the model
model, tokenizer = FastLanguageModel.from_pretrained(
model_name = "dan-text2sql/seoul-realestate-sql-agent-v2",
max_seq_length = 2048,
dtype = None,
load_in_4bit = True,
)
FastLanguageModel.for_inference(model)
# Test Prompt
prompt = """์•„๋ž˜ ์งˆ๋ฌธ์— ๋Œ€ํ•œ ์˜ฌ๋ฐ”๋ฅธ SQL ์ฟผ๋ฆฌ๋ฅผ ์ž‘์„ฑํ•ด์ฃผ์„ธ์š”.
### ์งˆ๋ฌธ:
์„œ์šธ์‹œ ๊ฐ•๋‚จ๊ตฌ ์‚ผ์„ฑ๋™์˜ 20์–ต ์ดํ•˜ ์•„ํŒŒํŠธ ๋งค๋ฌผ์„ ์ฐพ์•„์ค˜.
### SQL:
"""
inputs = tokenizer([prompt], return_tensors = "pt").to("cuda")
outputs = model.generate(**inputs, max_new_tokens = 128, use_cache = True)
print(tokenizer.batch_decode(outputs)[0])