Downloads · 30 days
17
14% of all-time downloads
bgarvey1/real-estate-domain-translator-phi3
real-estate-domain-translator-phi3 is a text generation model from bgarvey1. Use it when you need the model to write or continue text. It is set up for peft. The card lists the license as apache-2.0.
This is a fine-tuned Phi-3-mini model specialized for translating natural language queries into domain-aware Snowflake SQL for real estate investment analysis.
Downloads · 30 days
17
14% of all-time downloads
All-time downloads
122
Public
Repo size
823 MB
Likes
0
Public
Click a slice to open those files.
.safetensors823 MB · 100%
From the Hugging Face model README
This is a fine-tuned Phi-3-mini model specialized for translating natural language queries into domain-aware Snowflake SQL for real estate investment analysis.
The model understands real estate domain terminology including:
from transformers import AutoTokenizer, AutoModelForCausalLM
from peft import PeftModel
# Load model
base_model = AutoModelForCausalLM.from_pretrained("microsoft/Phi-3-mini-4k-instruct", trust_remote_code=True)
model = PeftModel.from_pretrained(base_model, "bgarvey1/real-estate-domain-translator-phi3")
tokenizer = AutoTokenizer.from_pretrained("bgarvey1/real-estate-domain-translator-phi3")
# Generate SQL
prompt = "### Domain: Real Estate Analysis\n### Task: Translate to SQL\n### Input: Show me the top 5 markets by unit count\n### Output:\n"
inputs = tokenizer(prompt, return_tensors="pt")
outputs = model.generate(**inputs, max_new_tokens=256)
result = tokenizer.decode(outputs[0], skip_special_tokens=True)
Input: "Show me the top 5 markets by unit count"
Output: SELECT "Market", SUM("Count") as unit_count FROM FKH_ML_DATA.ML_DATA.STATIC_TABLE_CACHE GROUP BY "Market" ORDER BY unit_count DESC LIMIT 5
Input: "List Project Skyline properties that are listed"
Output: SELECT "DispoCategory", "DispoStatus" FROM FKH_ML_DATA.ML_DATA.DISPO_CACHE WHERE "DispoCategory" = 'Project Skyline' AND "DispoStatus" = 'Listed'
This model serves as an intelligent translator between general language models and real estate domain-specific terminology and business logic.