Update README.md
Browse files
README.md
CHANGED
|
@@ -5,6 +5,7 @@ tags:
|
|
| 5 |
model-index:
|
| 6 |
- name: mpnet-base-fineweb-edu-llama3-annotations-512-vN
|
| 7 |
results: []
|
|
|
|
| 8 |
---
|
| 9 |
|
| 10 |
<!-- This model card has been generated automatically according to the information the Trainer had access to. You
|
|
@@ -18,17 +19,34 @@ It achieves the following results on the evaluation set:
|
|
| 18 |
- Loss: 0.2105
|
| 19 |
- Mse: 0.2105
|
| 20 |
|
| 21 |
-
##
|
| 22 |
|
| 23 |
-
|
| 24 |
|
| 25 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 26 |
|
| 27 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 28 |
|
| 29 |
-
|
|
|
|
|
|
|
| 30 |
|
| 31 |
-
|
|
|
|
|
|
|
| 32 |
|
| 33 |
## Training procedure
|
| 34 |
|
|
@@ -45,50 +63,3 @@ The following hyperparameters were used during training:
|
|
| 45 |
- lr_scheduler_type: linear
|
| 46 |
- lr_scheduler_warmup_ratio: 0.05
|
| 47 |
- num_epochs: 1.0
|
| 48 |
-
|
| 49 |
-
### Training results
|
| 50 |
-
|
| 51 |
-
| Training Loss | Epoch | Step | Validation Loss | Mse |
|
| 52 |
-
|:-------------:|:------:|:----:|:---------------:|:------:|
|
| 53 |
-
| 0.5887 | 0.0288 | 100 | 0.6419 | 0.6419 |
|
| 54 |
-
| 0.371 | 0.0577 | 200 | 0.3439 | 0.3439 |
|
| 55 |
-
| 0.3607 | 0.0865 | 300 | 0.2844 | 0.2844 |
|
| 56 |
-
| 0.2576 | 0.1153 | 400 | 0.2589 | 0.2589 |
|
| 57 |
-
| 0.2822 | 0.1441 | 500 | 0.2707 | 0.2707 |
|
| 58 |
-
| 0.2908 | 0.1730 | 600 | 0.2382 | 0.2382 |
|
| 59 |
-
| 0.2258 | 0.2018 | 700 | 0.2405 | 0.2405 |
|
| 60 |
-
| 0.2604 | 0.2306 | 800 | 0.2318 | 0.2318 |
|
| 61 |
-
| 0.2961 | 0.2594 | 900 | 0.2186 | 0.2186 |
|
| 62 |
-
| 0.2453 | 0.2883 | 1000 | 0.2168 | 0.2168 |
|
| 63 |
-
| 0.278 | 0.3171 | 1100 | 0.2247 | 0.2247 |
|
| 64 |
-
| 0.2319 | 0.3459 | 1200 | 0.2142 | 0.2142 |
|
| 65 |
-
| 0.1983 | 0.3747 | 1300 | 0.2175 | 0.2175 |
|
| 66 |
-
| 0.2264 | 0.4036 | 1400 | 0.2306 | 0.2306 |
|
| 67 |
-
| 0.2175 | 0.4324 | 1500 | 0.2375 | 0.2375 |
|
| 68 |
-
| 0.2461 | 0.4612 | 1600 | 0.2493 | 0.2493 |
|
| 69 |
-
| 0.2419 | 0.4900 | 1700 | 0.2234 | 0.2234 |
|
| 70 |
-
| 0.2411 | 0.5189 | 1800 | 0.2137 | 0.2137 |
|
| 71 |
-
| 0.2473 | 0.5477 | 1900 | 0.2140 | 0.2140 |
|
| 72 |
-
| 0.237 | 0.5765 | 2000 | 0.2177 | 0.2177 |
|
| 73 |
-
| 0.1972 | 0.6053 | 2100 | 0.2186 | 0.2186 |
|
| 74 |
-
| 0.2556 | 0.6342 | 2200 | 0.2416 | 0.2416 |
|
| 75 |
-
| 0.2273 | 0.6630 | 2300 | 0.2197 | 0.2197 |
|
| 76 |
-
| 0.223 | 0.6918 | 2400 | 0.2253 | 0.2253 |
|
| 77 |
-
| 0.2028 | 0.7206 | 2500 | 0.2239 | 0.2239 |
|
| 78 |
-
| 0.2322 | 0.7495 | 2600 | 0.2180 | 0.2180 |
|
| 79 |
-
| 0.1933 | 0.7783 | 2700 | 0.2158 | 0.2158 |
|
| 80 |
-
| 0.2085 | 0.8071 | 2800 | 0.2298 | 0.2298 |
|
| 81 |
-
| 0.2038 | 0.8359 | 2900 | 0.2166 | 0.2166 |
|
| 82 |
-
| 0.2158 | 0.8648 | 3000 | 0.2084 | 0.2084 |
|
| 83 |
-
| 0.2197 | 0.8936 | 3100 | 0.2145 | 0.2145 |
|
| 84 |
-
| 0.2397 | 0.9224 | 3200 | 0.2163 | 0.2163 |
|
| 85 |
-
| 0.2307 | 0.9512 | 3300 | 0.2160 | 0.2160 |
|
| 86 |
-
| 0.2099 | 0.9801 | 3400 | 0.2101 | 0.2101 |
|
| 87 |
-
|
| 88 |
-
|
| 89 |
-
### Framework versions
|
| 90 |
-
|
| 91 |
-
- Transformers 4.42.3
|
| 92 |
-
- Pytorch 2.3.1+cu121
|
| 93 |
-
- Datasets 2.20.0
|
| 94 |
-
- Tokenizers 0.19.1
|
|
|
|
| 5 |
model-index:
|
| 6 |
- name: mpnet-base-fineweb-edu-llama3-annotations-512-vN
|
| 7 |
results: []
|
| 8 |
+
inference: False
|
| 9 |
---
|
| 10 |
|
| 11 |
<!-- This model card has been generated automatically according to the information the Trainer had access to. You
|
|
|
|
| 19 |
- Loss: 0.2105
|
| 20 |
- Mse: 0.2105
|
| 21 |
|
| 22 |
+
## Usage
|
| 23 |
|
| 24 |
+
Note this is for CPU, for GPU you will need to make some (small) changes.
|
| 25 |
|
| 26 |
+
```py
|
| 27 |
+
from transformers import AutoTokenizer, AutoModelForSequenceClassification
|
| 28 |
+
|
| 29 |
+
tokenizer = AutoTokenizer.from_pretrained("pszemraj/mpnet-base-edu-classifier")
|
| 30 |
+
model = AutoModelForSequenceClassification.from_pretrained("pszemraj/mpnet-base-edu-classifier")
|
| 31 |
|
| 32 |
+
text = "This is a test sentence."
|
| 33 |
+
inputs = tokenizer(text, return_tensors="pt", padding="longest", truncation=True)
|
| 34 |
+
outputs = model(**inputs)
|
| 35 |
+
logits = outputs.logits.squeeze(-1).float().detach().numpy()
|
| 36 |
+
score = logits.item()
|
| 37 |
+
result = {
|
| 38 |
+
"text": text,
|
| 39 |
+
"score": score,
|
| 40 |
+
"int_score": int(round(max(0, min(score, 5)))),
|
| 41 |
+
}
|
| 42 |
|
| 43 |
+
print(result)
|
| 44 |
+
# {'text': 'This is a test sentence.', 'score': 0.3350256383419037, 'int_score': 0}
|
| 45 |
+
```
|
| 46 |
|
| 47 |
+
## Intended uses & limitations
|
| 48 |
+
|
| 49 |
+
Refer to the hf classifier's [model card](https://huggingface.co/HuggingFaceFW/fineweb-edu-classifier#limitations) for more details
|
| 50 |
|
| 51 |
## Training procedure
|
| 52 |
|
|
|
|
| 63 |
- lr_scheduler_type: linear
|
| 64 |
- lr_scheduler_warmup_ratio: 0.05
|
| 65 |
- num_epochs: 1.0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|