Update README.md
Browse files
README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
| 1 |
-
|
| 2 |
license: apache-2.0
|
| 3 |
tags:
|
| 4 |
- peft
|
|
@@ -48,48 +48,53 @@ prompt = "Q: Julie read 12 pages yesterday and twice as many today. If she wants
|
|
| 48 |
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
|
| 49 |
outputs = model.generate(**inputs, max_new_tokens=100)
|
| 50 |
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 51 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 52 |
|
| 53 |
-
|
| 54 |
|
| 55 |
-
|
| 56 |
|
| 57 |
-
|
| 58 |
-
GSM8K Exact Match (strict) 54.6% 500
|
| 59 |
-
ARC-Easy Accuracy 79.0% 500
|
| 60 |
-
HellaSwag Accuracy (Normalized) 61.0% 500
|
| 61 |
|
| 62 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 63 |
|
| 64 |
-
|
| 65 |
|
| 66 |
-
|
| 67 |
-
• Method: LoRA (rank=8, alpha=16, dropout=0.1)
|
| 68 |
-
• Epochs: 1 (proof of concept)
|
| 69 |
-
• Batch size: 4 per device
|
| 70 |
-
• Precision: FP16
|
| 71 |
-
• Platform: Google Colab (T4 GPU)
|
| 72 |
-
• Framework: 🤗 Transformers + PEFT
|
| 73 |
|
| 74 |
-
|
|
|
|
|
|
|
| 75 |
|
| 76 |
-
|
| 77 |
-
• Fine-tuned for math problems only (not general-purpose reasoning)
|
| 78 |
-
• Trained for 1 epoch — additional training may improve performance
|
| 79 |
-
• Adapter-only: base model (microsoft/phi-2) must be loaded alongside
|
| 80 |
|
| 81 |
-
|
| 82 |
|
| 83 |
-
|
| 84 |
-
|
| 85 |
-
|
| 86 |
-
|
| 87 |
-
|
| 88 |
-
|
|
|
|
| 89 |
|
| 90 |
-
|
| 91 |
|
| 92 |
-
|
|
|
|
| 93 |
|
| 94 |
-
This model was fine-tuned and open-sourced by Darsh Joshi (contact@darshjoshi.com).
|
| 95 |
-
Feel free to reach out or contribute.
|
|
|
|
| 1 |
+
---
|
| 2 |
license: apache-2.0
|
| 3 |
tags:
|
| 4 |
- peft
|
|
|
|
| 48 |
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
|
| 49 |
outputs = model.generate(**inputs, max_new_tokens=100)
|
| 50 |
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
|
| 51 |
+
```
|
| 52 |
+
|
| 53 |
+
---
|
| 54 |
+
|
| 55 |
+
## 📊 Evaluation Results
|
| 56 |
|
| 57 |
+
| Task | Metric | Score | Samples |
|
| 58 |
+
|-------------|-----------------------------|--------|---------|
|
| 59 |
+
| GSM8K | Exact Match (strict) | 54.6% | 500 |
|
| 60 |
+
| ARC-Easy | Accuracy | 79.0% | 500 |
|
| 61 |
+
| HellaSwag | Accuracy (Normalized) | 61.0% | 500 |
|
| 62 |
|
| 63 |
+
> Benchmarks were run using [EleutherAI’s lm-eval-harness](https://github.com/EleutherAI/lm-eval-harness)
|
| 64 |
|
| 65 |
+
---
|
| 66 |
|
| 67 |
+
## ⚙️ Training Details
|
|
|
|
|
|
|
|
|
|
| 68 |
|
| 69 |
+
- **Method**: LoRA (rank=8, alpha=16, dropout=0.1)
|
| 70 |
+
- **Epochs**: 1 (proof of concept)
|
| 71 |
+
- **Batch size**: 4 per device
|
| 72 |
+
- **Precision**: FP16
|
| 73 |
+
- **Platform**: Google Colab (T4 GPU)
|
| 74 |
+
- **Framework**: [🤗 Transformers](https://github.com/huggingface/transformers) + [PEFT](https://github.com/huggingface/peft)
|
| 75 |
|
| 76 |
+
---
|
| 77 |
|
| 78 |
+
## 🔍 Limitations
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 79 |
|
| 80 |
+
- Fine-tuned for math problems only (not general-purpose reasoning)
|
| 81 |
+
- Trained for 1 epoch — additional training may improve performance
|
| 82 |
+
- Adapter-only: base model (`microsoft/phi-2`) must be loaded alongside
|
| 83 |
|
| 84 |
+
---
|
|
|
|
|
|
|
|
|
|
| 85 |
|
| 86 |
+
## 📘 Citation & References
|
| 87 |
|
| 88 |
+
- [LoRA: Low-Rank Adaptation](https://arxiv.org/abs/2106.09685)
|
| 89 |
+
- [Phi-2 Model Card](https://www.microsoft.com/en-us/research/blog/phi-2-the-surprising-power-of-small-language-models/)
|
| 90 |
+
- [GSM8K Dataset](https://huggingface.co/datasets/gsm8k)
|
| 91 |
+
- [PEFT Library](https://github.com/huggingface/peft)
|
| 92 |
+
- [Transformers](https://huggingface.co/docs/transformers)
|
| 93 |
+
|
| 94 |
+
---
|
| 95 |
|
| 96 |
+
## 💬 Author
|
| 97 |
|
| 98 |
+
This model was fine-tuned and open-sourced by **[Darsh Joshi](https://huggingface.co/darshjoshi16)**.
|
| 99 |
+
Feel free to [reach out](mailto:contact@darshjoshi.com) or contribute.
|
| 100 |
|
|
|
|
|
|