CoolFace
Modelpublic

agentlans/multilingual-e5-small-doc-type-v2-classifier

sourceHugging Facemitupdated 5mo agoView on Hugging Face
0likes17downloads
Model Card

multilingual-e5-small Document Type V2 Classifier

A fine-tuned version of the bert architecture (BertForSequenceClassification) optimized for the text-classification task.

  • Model type: bert
  • Problem Type: singlelabelclassification
  • Number of Labels: 25
  • Vocabulary Size: 250037
  • License: MIT

Use

To get started with this model in Python using the Hugging Face Transformers library, run the following code:

python
from transformers import AutoTokenizer, AutoModelForSequenceClassification
import torch

model_id = "agentlans/multilingual-e5-small-doc-type-v2-classifier"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForSequenceClassification.from_pretrained(model_id)

text = "Replace this with your input text."
inputs = tokenizer(text, return_tensors="pt")

with torch.no_grad():
    logits = model(**inputs).logits

predicted_class_id = logits.argmax().item()
predicted_class_name = model.config.id2label[predicted_class_id]

print(f"Predicted Class ID: {predicted_class_id}")
print(f"Predicted Class Name: {predicted_class_name}")

Intended Uses & Limitations

Intended Use

This model is designed for sequence classification tasks. Below are the specific class labels mapped to their corresponding IDs:

Label IDLabel Name
0About (Org.)
1About (Personal)
2Academic Writing
3Audio Transcript
4Comment Section
5Content Listing
6Creative Writing
7Customer Support
8Documentation
9FAQ
10Knowledge Article
11Legal Notices
12Listicle
13News (Org.)
14News Article
15Nonfiction Writing
16Other/Unclassified
17Personal Blog
18Product Page
19Q&A Forum
20Spam / Ads
21Structured Data
22Truncated
23Tutorial
24User Review

Training Details

Hyperparameters

The following hyperparameters were used during fine-tuning:

  • Learning Rate: 5e-05
  • Train Batch Size: 8
  • Eval Batch Size: 8
  • Optimizer: OptimizerNames.ADAMWTORCHFUSED
  • Number of Epochs: 3.0
  • Mixed Precision: BF16

<details> <summary><b>Show Advanced Training Configuration</b></summary>

Optimization & Regularization
  • Gradient Accumulation Steps: 1
  • Learning Rate Scheduler: SchedulerType.LINEAR
  • Warmup Steps: 0
  • Warmup Ratio: None
  • Weight Decay: 0.0
  • Max Gradient Norm: 1.0
Hardware & Reproducibility
  • Number of GPUs: 1
  • Seed: 42

</details>

Training Results & Evaluation

During fine-tuning, the model achieved the following results on the evaluation set:

MetricValue
Train Loss0.5709
Validation Loss0.8624
Validation F1 Score0.809
Total FLOPs7.9082e+15

Speed Performance

  • Training Runtime: 1693.148 seconds
  • Train Samples per Second: 283.503
  • Evaluation Runtime: 11.4879 seconds
  • Eval Samples per Second: 1741.655

<details> <summary><b>Show Detailed Training Logs</b></summary>

Training Logs History

StepEpochLearning RateTraining LossValidation LossValidation F1
5000.0254.9584e-051.8537N/AN/A
10000.054.9168e-051.3289N/AN/A
15000.0754.8751e-051.1698N/AN/A
20000.14.8334e-051.0996N/AN/A
25000.1254.7918e-051.0552N/AN/A
30000.154.7501e-051.0462N/AN/A
35000.1754.7084e-051.0004N/AN/A
40000.24.6668e-050.9812N/AN/A
45000.2254.6251e-050.9245N/AN/A
50000.254.5834e-050.9282N/AN/A
55000.2754.5418e-050.9167N/AN/A
60000.34.5001e-050.8886N/AN/A
65000.3254.4584e-050.8826N/AN/A
70000.354.4168e-050.8443N/AN/A
75000.3754.3751e-050.8374N/AN/A
80000.44.3334e-050.8271N/AN/A
85000.4254.2918e-050.8306N/AN/A
90000.454.2501e-050.8561N/AN/A
95000.4754.2085e-050.7851N/AN/A
100000.54.1668e-050.7841N/AN/A
105000.5254.1251e-050.7678N/AN/A
110000.554.0835e-050.7538N/AN/A
115000.5754.0418e-050.735N/AN/A
120000.64.0001e-050.774N/AN/A
125000.6253.9585e-050.7368N/AN/A
130000.653.9168e-050.7435N/AN/A
135000.6753.8751e-050.7035N/AN/A
140000.73.8335e-050.7552N/AN/A
145000.7253.7918e-050.7443N/AN/A
150000.753.7501e-050.7461N/AN/A
155000.7753.7085e-050.7352N/AN/A
160000.83.6668e-050.6946N/AN/A
165000.8253.6252e-050.6939N/AN/A
170000.853.5835e-050.7509N/AN/A
175000.8753.5418e-050.6992N/AN/A
180000.93.5002e-050.7043N/AN/A
185000.9253.4585e-050.6977N/AN/A
190000.953.4168e-050.6952N/AN/A
195000.9753.3752e-050.708N/AN/A
200001.03.3335e-050.6695N/AN/A
200011.0N/AN/A0.69580.7876
205001.0253.2918e-050.5363N/AN/A
210001.053.2502e-050.547N/AN/A
215001.0753.2085e-050.5733N/AN/A
220001.13.1668e-050.5454N/AN/A
225001.1253.1252e-050.5235N/AN/A
230001.153.0835e-050.5291N/AN/A
235001.1753.0418e-050.5537N/AN/A
240001.23.0002e-050.555N/AN/A
245001.2252.9585e-050.5338N/AN/A
250001.252.9169e-050.5615N/AN/A
255001.2752.8752e-050.5155N/AN/A
260001.32.8335e-050.5353N/AN/A
265001.3252.7919e-050.5317N/AN/A
270001.352.7502e-050.5429N/AN/A
275001.3752.7085e-050.5311N/AN/A
280001.42.6669e-050.5345N/AN/A
285001.4252.6252e-050.5287N/AN/A
290001.452.5835e-050.5204N/AN/A
295001.4752.5419e-050.5121N/AN/A
300001.52.5002e-050.52N/AN/A
305001.5252.4585e-050.5094N/AN/A
310001.552.4169e-050.5169N/AN/A
315001.5752.3752e-050.5226N/AN/A
320001.62.3335e-050.5281N/AN/A
325001.6252.2919e-050.5246N/AN/A
330001.652.2502e-050.532N/AN/A
335001.6752.2086e-050.5068N/AN/A
340001.72.1669e-050.4971N/AN/A
345001.7252.1252e-050.5122N/AN/A
350001.752.0836e-050.489N/AN/A
355001.7752.0419e-050.479N/AN/A
360001.82.0002e-050.4919N/AN/A
365001.8251.9586e-050.4974N/AN/A
370001.851.9169e-050.5045N/AN/A
375001.8751.8752e-050.525N/AN/A
380001.91.8336e-050.4748N/AN/A
385001.9251.7919e-050.4831N/AN/A
390001.951.7502e-050.5091N/AN/A
395001.9751.7086e-050.4821N/AN/A
400002.01.6669e-050.4862N/AN/A
400022.0N/AN/A0.74910.797
405002.0251.6253e-050.357N/AN/A
410002.051.5836e-050.333N/AN/A
415002.0751.5419e-050.374N/AN/A
420002.11.5003e-050.3698N/AN/A
425002.1251.4586e-050.3759N/AN/A
430002.151.4169e-050.3543N/AN/A
435002.1751.3753e-050.3695N/AN/A
440002.21.3336e-050.3385N/AN/A
445002.2251.2919e-050.3583N/AN/A
450002.251.2503e-050.3445N/AN/A
455002.2751.2086e-050.3575N/AN/A
460002.31.1669e-050.3382N/AN/A
465002.3251.1253e-050.3732N/AN/A
470002.351.0836e-050.3454N/AN/A
475002.3751.0419e-050.3563N/AN/A
480002.41.0003e-050.3302N/AN/A
485002.4259.5862e-060.3421N/AN/A
490002.459.1695e-060.3119N/AN/A
495002.4758.7529e-060.3578N/AN/A
500002.58.3362e-060.3584N/AN/A
505002.5257.9196e-060.3142N/AN/A
510002.557.5030e-060.3124N/AN/A
515002.5757.0863e-060.3262N/AN/A
520002.66.6697e-060.3072N/AN/A
525002.6256.2530e-060.3274N/AN/A
530002.655.8364e-060.3131N/AN/A
535002.6755.4197e-060.3281N/AN/A
540002.75.0031e-060.3108N/AN/A
545002.7254.5864e-060.3189N/AN/A
550002.754.1698e-060.3367N/AN/A
555002.7753.7531e-060.2969N/AN/A
560002.83.3365e-060.3332N/AN/A
565002.8252.9199e-060.3197N/AN/A
570002.852.5032e-060.312N/AN/A
575002.8752.0866e-060.3275N/AN/A
580002.91.6699e-060.2933N/AN/A
585002.9251.2533e-060.3123N/AN/A
590002.958.3662e-070.3045N/AN/A
595002.9754.1998e-070.2928N/AN/A
600003.03.3332e-090.3199N/AN/A
600033.0N/AN/A0.86240.809

</details>

Framework Versions

  • Transformers: 5.0.0.dev0
  • PyTorch: 2.9.1+cu128