phi3-text2sql-lora / README.md
mrcmilo's picture
Update README.md
4936ab3 verified
|
raw
history blame
1.12 kB
metadata
license: mit
base_model: unsloth/Phi-3-mini-4k-instruct-bnb-4bit
tags:
  - text-to-sql
  - sql
  - phi-3
  - unsloth
  - gguf
  - ollama
datasets:
  - b-mc2/sql-create-context
language:
  - en

Phi-3-SQL-Expert (GGUF)

This model is a fine-tuned version of Microsoft Phi-3-mini-4k-instruct, specialized for Text-to-SQL conversion. It was trained using the b-mc2/sql-create-context dataset and is optimized for local inference on consumer hardware.

Model Details

  • Architecture: Phi-3-mini (3.8B parameters)
  • Quantization: Q4_K_M GGUF (Optimised for balance of speed/accuracy)
  • Fine-tuning Technique: LoRA (Low-Rank Adaptation) via Unsloth
  • Primary Task: Natural Language to SQL Query generation

Usage (Ollama)

To run this model locally, create a Modelfile with the following content:

FROM ./phi3-sql-expert.Q4_K_M.gguf

TEMPLATE """<|system|>
You are a helpful assistant that writes SQL queries. Given a user question and a table schema, output only the SQL code.<|end|>
<|user|>
{{ .Prompt }}<|end|>
<|assistant|>
"""

PARAMETER stop "<|end|>"
PARAMETER temperature 0.1