Run this model with HF Jobs

Run Miguel0918/qlora-sqlcoder on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.

Paste one of these prompts into your coding agent:

Fine-tune on my dataset

Use HF Jobs and TRL to fine-tune https://huggingface.co/Miguel0918/qlora-sqlcoder. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.

Run batch inference

Use HF Jobs to run batch inference with https://huggingface.co/Miguel0918/qlora-sqlcoder on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.

Evaluate on a benchmark

Use HF Jobs to evaluate https://huggingface.co/Miguel0918/qlora-sqlcoder. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.

Quantize for lower memory use

Use HF Jobs to create a 4-bit version of https://huggingface.co/Miguel0918/qlora-sqlcoder. Push it to a new model repo, then reload it from there and report its memory footprint. Run `hf jobs --help` first to learn the CLI.

🦎 QLoRA SQLCoder — Fine-tuning de defog/sqlcoder-7b-2

Este repositório contém os adapters LoRA (formato PEFT) treinados com a técnica QLoRA sobre o modelo base defog/sqlcoder-7b-2. O objetivo foi adaptar o modelo para melhor compreensão e geração de SQL em contextos específicos definidos pelo dataset fornecido.


📚 Modelo Base


💡 Como Usar

from transformers import AutoTokenizer, AutoModelForCausalLM
from peft import PeftModel

base_model = "defog/sqlcoder-7b-2"
adapter = "Miguel0918/qlora-sqlcoder"

tokenizer = AutoTokenizer.from_pretrained(adapter)
model = AutoModelForCausalLM.from_pretrained(
    base_model,
    device_map="auto",
    load_in_4bit=True,
    torch_dtype="auto"
)
model = PeftModel.from_pretrained(model, adapter)

prompt = "portfolio_transaction_headers(...) JOIN portfolio_transaction_details(...): Find transactions for portfolio 72 involving LTC"
inputs = tokenizer(prompt, return_tensors="pt").to("cuda")
outputs = model.generate(**inputs, max_new_tokens=128)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
Downloads last month
28
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for Miguel0918/qlora-sqlcoder

Adapter
(221)
this model