pszemraj/OCR-quality-classification
Viewer • Updated • 62.6k • 24
How to use pszemraj/MiniLMv2-L6-H384_R-OCR-quality with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-classification", model="pszemraj/MiniLMv2-L6-H384_R-OCR-quality") # Load model directly
from transformers import AutoTokenizer, AutoModelForSequenceClassification
tokenizer = AutoTokenizer.from_pretrained("pszemraj/MiniLMv2-L6-H384_R-OCR-quality")
model = AutoModelForSequenceClassification.from_pretrained("pszemraj/MiniLMv2-L6-H384_R-OCR-quality", device_map="auto")This model is a fine-tuned version of pszemraj/MiniLMv2-L6-H384_R-fineweb-100k on pszemraj/OCR-quality-classification
It achieves the following results on the evaluation set:
predict whether a document is clean or noisy
The following hyperparameters were used during training:
| Training Loss | Epoch | Step | Validation Loss | Accuracy | Input Tokens Seen |
|---|---|---|---|---|---|
| 0.0298 | 0.2660 | 250 | 0.0448 | 0.99 | 8192000 |
| 0.0141 | 0.5321 | 500 | 0.0330 | 0.99 | 16384000 |
| 0.02 | 0.7981 | 750 | 0.0298 | 0.99 | 24576000 |
| 0.0085 | 1.0641 | 1000 | 0.0222 | 0.994 | 32765952 |
| 0.0174 | 1.3301 | 1250 | 0.0207 | 0.994 | 40957952 |
| 0.0104 | 1.5962 | 1500 | 0.0202 | 0.996 | 49149952 |
| 0.0237 | 1.8622 | 1750 | 0.0185 | 0.996 | 57341952 |
Base model
pszemraj/MiniLMv2-L6-H384_R-fineweb-100k