Views
No views yet
unsloth.1### Instruction:
2Write a SQL query to find all users who signed up in 2023.
3
4### Response:
5<leave this blank for the model to generate the SQL>
6
7💻 Example Usage
8
9# pip install unsloth
10from unsloth import FastLanguageModel
11
12model, tokenizer = FastLanguageModel.from_pretrained(
13 model_name = "Noor201/gemma-sql-copilot-lora",
14 max_seq_length = 2048,
15 dtype = None,
16 load_in_4bit = True,
17)
18FastLanguageModel.for_inference(model)
19
20prompt = """### Instruction:
21Write a SQL query to find the names of all employees in the 'Sales' department who earn more than 50000.
22
23### Response:
24"""
25
26inputs = tokenizer([prompt], return_tensors="pt").to("cuda")
27outputs = model.generate(**inputs, max_new_tokens=128)
28
29print(tokenizer.batch_decode(outputs, skip_special_tokens=True)[0])
30
31⚙️ Training Details
32
33Base Model: google/gemma-2b-it
34Training Framework: Unsloth (PEFT/LoRA)
35Precision: 4-bit (QLoRA)
36Hardware: Trained on a single NVIDIA T4 GPU via Google Colab.
37
38## 📊 Training Results
39During the fine-tuning process, the model achieved the following performance metrics on the dataset:
40- **Final Training Loss:** 0.0006
41- **Final Validation Loss:** 9.3803
42- **Epochs:** 2