Views
No views yet
| Parameter | Value |
|---|---|
| Learning Rate | 0.0005 |
| Training Batch Size | 8 (gradient accumulation) |
| Epochs | 10 |
| Optimizer | AdamW (fused) |
| LR Scheduler | Cosine with 0.1 warmup ratio |
| Seed | 42 |
| Training Precision | Native AMP (Mixed Precision) |
| Epoch | Step | Training Loss |
|---|---|---|
| 1.1 | 100 | 0.6345 |
| 2.3 | 200 | 0.4720 |
| 3.4 | 300 | 0.3499 |
| 4.5 | 400 | 0.2457 |
| 5.7 | 500 | 0.1229 |
| 6.8 | 600 | 0.0728 |
| 8.0 | 700 | 0.0398 |
| 9.1 | 800 | 0.0213 |
1from peft import AutoPeftModelForCausalLM
2from transformers import AutoTokenizer
3
4model_id = "tokhey/question_generation_1.5B_model_v2"
5model = AutoPeftModelForCausalLM.from_pretrained(model_id)
6tokenizer = AutoTokenizer.from_pretrained(model_id)
7
8# Generate questions from a passage
9prompt = "Generate 3 comprehension questions about: [your text passage]"
10inputs = tokenizer(prompt, return_tensors="pt")
11outputs = model.generate(**inputs, max_length=512)
12print(tokenizer.decode(outputs[0]))