Downloads · 30 days
0
Bilal326/drz-sql-llama3
drz-sql-llama3 is a machine learning model from Bilal326. Use it for the machine learning task on the model card, and read the license before you ship it in a product. The card lists the license as apache-2.0.
This model is a fine-tuned version of Llama 3 (8B) for generating SQL queries specific to the Daraz e-commerce platform.
Downloads · 30 days
0
Access
Public
Updated Nov 15, 2025
Repo size
185 MB
Likes
0
Public
Click a slice to open those files.
.safetensors168 MB · 91%
From the Hugging Face model README
This model is a fine-tuned version of Llama 3 (8B) for generating SQL queries specific to the Daraz e-commerce platform.
This model understands Daraz-specific:
daraz_cdm.dwd_drz_trd_core_df, daraz_cdm.dwd_drz_prd_sku_extension)from unsloth import FastLanguageModel
# Load model
model, tokenizer = FastLanguageModel.from_pretrained(
model_name = "Bilal326/drz-sql-llama3",
max_seq_length = 2048,
dtype = None,
load_in_4bit = True,
)
FastLanguageModel.for_inference(model)
# Generate SQL
alpaca_prompt = """Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
{}
### Input:
{}
### Response:
{}"""
prompt = alpaca_prompt.format(
"Generate SQL for the following request:",
"Get total GMV for last 30 days in Pakistan",
""
)
inputs = tokenizer([prompt], return_tensors="pt").to("cuda")
outputs = model.generate(**inputs, max_new_tokens=512, temperature=0.5)
print(tokenizer.decode(outputs[0]))
The model can handle:
Custom dataset of 20 SQL query examples covering:
If you use this model, please cite:
@misc{drz-sql-llama3,
author = {Bilal326},
title = {drz-sql-llama3: Daraz SQL Generation Model},
year = {2025},
publisher = {HuggingFace},
url = {https://huggingface.co/Bilal326/drz-sql-llama3}
}