Text Classification
Transformers
ONNX
Safetensors
llama
safety
content-moderation
multi-label
multilingual
tiny-language-model
from-scratch
distilled
text-embeddings-inference
Instructions to use KucLab/Barist.2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use KucLab/Barist.2 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="KucLab/Barist.2")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("KucLab/Barist.2") model = AutoModelForSequenceClassification.from_pretrained("KucLab/Barist.2", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Add report benchmark.md
Browse files- reports/benchmark.md +41 -0
reports/benchmark.md
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Barist.1 — Benchmark
|
| 2 |
+
|
| 3 |
+
Generated by `scripts/benchmark.py`.
|
| 4 |
+
|
| 5 |
+
## Hardware
|
| 6 |
+
|
| 7 |
+
- Device: `AMD Radeon Graphics` (cuda)
|
| 8 |
+
- torch: `2.13.0+rocm7.1`
|
| 9 |
+
- Python: `3.12.12`
|
| 10 |
+
- OS: `Linux-7.1.7-100.fc43.x86_64-x86_64-with-glibc2.43`
|
| 11 |
+
|
| 12 |
+
## Model
|
| 13 |
+
|
| 14 |
+
| Property | Value |
|
| 15 |
+
| --- | --- |
|
| 16 |
+
| Parameters | 903,552 |
|
| 17 |
+
| Checkpoint size | 3.45 MB |
|
| 18 |
+
| Vocabulary | 2048 |
|
| 19 |
+
| Context | 4096 tokens |
|
| 20 |
+
| Input limit | 4000 characters |
|
| 21 |
+
| Layers / d_model / heads / d_ff | 3 / 128 / 4 / 384 |
|
| 22 |
+
|
| 23 |
+
## Inference
|
| 24 |
+
|
| 25 |
+
| Metric | Value |
|
| 26 |
+
| --- | --- |
|
| 27 |
+
| Single text latency | 1.16 ms |
|
| 28 |
+
| Single text throughput | 863.0 texts/s |
|
| 29 |
+
| Batch of 8 latency | 1.31 ms |
|
| 30 |
+
| Batched throughput | 6109.0 texts/s |
|
| 31 |
+
| Peak VRAM (inference) | 84.7 MB |
|
| 32 |
+
|
| 33 |
+
## Accuracy
|
| 34 |
+
|
| 35 |
+
| Split | Rows | Accuracy | F1 | Precision | Recall |
|
| 36 |
+
| --- | --- | --- | --- | --- | --- |
|
| 37 |
+
| val | 6585 | 0.8547 | 0.8178 | 0.8561 | 0.7828 |
|
| 38 |
+
| test | 6496 | 0.8581 | 0.8221 | 0.8603 | 0.7872 |
|
| 39 |
+
| probe (hand-written) | 97 | 0.9897 | 0.9882 | 0.9767 | 1.0000 |
|
| 40 |
+
|
| 41 |
+
The probe set is hand-written and absent from all training data.
|