Create README.md
Browse files
README.md
ADDED
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Gemma Model Fine-Tuned on Custom Data
|
2 |
+
|
3 |
+
## Model Description
|
4 |
+
This model is a fine-tuned version of Gemma Model on custom data. It was trained using the SFTTrainer and incorporates LoRA configurations to enhance performance.
|
5 |
+
|
6 |
+
|
7 |
+
|
8 |
+
## Training Procedure
|
9 |
+
- **Batch size**: 1
|
10 |
+
- **Gradient accumulation steps**: 4
|
11 |
+
- **Learning rate**: 2e-4
|
12 |
+
- **Warmup steps**: 2
|
13 |
+
- **Max steps**: 100
|
14 |
+
- **Optimizer**: Paged AdamW 8-bit
|
15 |
+
- **FP16**: Enabled
|
16 |
+
|
17 |
+
|
18 |
+
## Usage
|
19 |
+
You can use this model, Below is an example of how to load and use the model:
|
20 |
+
|
21 |
+
```python
|
22 |
+
from transformers import AutoModelForCausalLM, AutoTokenizer
|
23 |
+
|
24 |
+
tokenizer = AutoTokenizer.from_pretrained("username/Gemma_model_fine_tune_custom_Data")
|
25 |
+
model = AutoModelForCausalLM.from_pretrained("username/Gemma_model_fine_tune_custom_Data")
|
26 |
+
|
27 |
+
input_text = "Your input text here"
|
28 |
+
inputs = tokenizer(input_text, return_tensors="pt")
|
29 |
+
outputs = model.generate(**inputs)
|
30 |
+
|
31 |
+
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
|