Update README.md
Browse files
README.md
CHANGED
|
@@ -1,3 +1,67 @@
|
|
| 1 |
-
---
|
| 2 |
-
license: apache-2.0
|
| 3 |
-
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
---
|
| 4 |
+
|
| 5 |
+
# GEM_Testing_Arsenal
|
| 6 |
+
|
| 7 |
+
Welcome to ***GEM_Testing_Arsenal***, where groundbreaking research meets practical power! This repository unveils a novel architecture for On-Device Language Models (ODLMs), straight from our paper, ["Fragile Mastery: are domain-specific trade-offs undermining On-Device Language Models?"](./link_to_be_insterted). With just a few lines of code, our custom `gem_trainer.py` script lets you train ODLMs that are more accurate than ever, tracking accuracy and loss as you go.
|
| 8 |
+
|
| 9 |
+
---
|
| 10 |
+
|
| 11 |
+
### Highlights:
|
| 12 |
+
- **Next-Level ODLMs**: Boosts accuracy with a new architecture from our research.
|
| 13 |
+
- **Easy Training**: Call run_gem_pipeline to train on your dataset in minutes.
|
| 14 |
+
- **Live Metrics**: Get accuracy and loss results as training unfolds.
|
| 15 |
+
- **Flexible Design**: Works with any compatible dataset—plug and play!
|
| 16 |
+
|
| 17 |
+
---
|
| 18 |
+
### Prerequisites:
|
| 19 |
+
To dive in, you’ll need:
|
| 20 |
+
- **Python** `3.8+`
|
| 21 |
+
|
| 22 |
+
- Required libraries (go through [quick start](#quick-start) below 👇)
|
| 23 |
+
|
| 24 |
+
- **Git** *(to clone the repo)*
|
| 25 |
+
|
| 26 |
+
---
|
| 27 |
+
### Quick Start:
|
| 28 |
+
|
| 29 |
+
1. **Clone the repository:**
|
| 30 |
+
```bash
|
| 31 |
+
git clone https://huggingface.co/GEM025/GEM_banking77
|
| 32 |
+
```
|
| 33 |
+
|
| 34 |
+
2. **Install Dependencies:**
|
| 35 |
+
```pwsh
|
| 36 |
+
pip install -r requirements.txt
|
| 37 |
+
```
|
| 38 |
+
|
| 39 |
+
3. **Train Your Model:**
|
| 40 |
+
Create a new python file and execute the code like:
|
| 41 |
+
```python
|
| 42 |
+
from datasets import load_dataset
|
| 43 |
+
from gem_trainer import run_gem_pipeline
|
| 44 |
+
|
| 45 |
+
# Load a dataset (e.g., Banking77) {just replace the dataset here.}
|
| 46 |
+
dataset = load_dataset("banking77")
|
| 47 |
+
|
| 48 |
+
# Train the ODLM
|
| 49 |
+
results = run_gem_pipeline(dataset, num_classes=77)
|
| 50 |
+
|
| 51 |
+
print(results) # See accuracy and loss
|
| 52 |
+
```
|
| 53 |
+
|
| 54 |
+
> ***Boom—your ODLM is training with boosted accuracy!***
|
| 55 |
+
|
| 56 |
+
---
|
| 57 |
+
### Customizing Training:
|
| 58 |
+
`run_gem_pipeline` keeps it simple, but you can tweak it! Dive into [`gem_trainer.py`](./gem_trainer.py) to adjust epochs, batch size, or other settings to fit your needs.
|
| 59 |
+
|
| 60 |
+
---
|
| 61 |
+
### Contributing 💓
|
| 62 |
+
Got ideas to make this even better? We’re all ears!
|
| 63 |
+
- Fork the repo.
|
| 64 |
+
- Branch off (`git checkout -b your-feature`).
|
| 65 |
+
- Submit a pull request with your magic.
|
| 66 |
+
|
| 67 |
+
---
|