Text Generation
Transformers
Safetensors
qwen3_5
image-text-to-text
text-to-sql
sql
qwen
demo
vertex-ai
synthetic-data
conversational
# Load model directly
from transformers import AutoProcessor, AutoModelForImageTextToText
processor = AutoProcessor.from_pretrained("Tuana/qwen35-08b-text2sql")
model = AutoModelForImageTextToText.from_pretrained("Tuana/qwen35-08b-text2sql")
messages = [
{
"role": "user",
"content": [
{"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"},
{"type": "text", "text": "What animal is on the candy?"}
]
},
]
inputs = processor.apply_chat_template(
messages,
add_generation_prompt=True,
tokenize=True,
return_dict=True,
return_tensors="pt",
).to(model.device)
outputs = model.generate(**inputs, max_new_tokens=40)
print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:]))Quick Links
qwen35-08b-text2sql
Tuana/qwen35-08b-text2sql is a demo Text-to-SQL model fine-tuned from Qwen/Qwen3.5-0.8B.
It was fine-tuned on a small, specific synthetic SQL dataset for demonstration purposes. It is not intended to be a general Text-to-SQL model for arbitrary schemas or production databases.
Model Details
- Base model:
Qwen/Qwen3.5-0.8B - Task demo: Text-to-SQL style SQL generation
- Fine-tuning method: LoRA SFT, merged into a full checkpoint
- Training platform: Google Cloud Vertex AI
- Training container: Hugging Face PyTorch Training Deep Learning Container
- Dataset:
Tuana/synthetic-sql-dataset - Model format: Merged
transformerscheckpoint
What This Model Demonstrates
This model demonstrates a small fine-tuning workflow:
- Generate a synthetic SQL instruction dataset
- Fine-tune a small Qwen base model on Vertex AI
- Merge the LoRA adapter into the base checkpoint
- Serve or compare the result in a small demo app
The demo dataset uses a small synthetic database domain with tables such as:
departmentmanagementhead
The model should be viewed as a demo artifact for this specific setup, not as a robust SQL assistant.
Example Prompt Format
Given this database schema:
CREATE TABLE department (
department_id VARCHAR,
name VARCHAR,
creation VARCHAR
);
CREATE TABLE management (
department_id VARCHAR,
head_id VARCHAR,
temporary_acting VARCHAR
);
CREATE TABLE head (
head_id VARCHAR,
name VARCHAR,
born_state VARCHAR
);
Write a SQL query for:
List all department names.
SQL:
- Downloads last month
- 138
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Tuana/qwen35-08b-text2sql") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] pipe(text=messages)