Team Ai
Modelpublic

agentlans/GIST-small-weborganizer-topic

sourceHugging Facemitupdated 1mo agoView on Hugging Face
0likes18downloads
Model Card

GIST-small-weborganizer-topic

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

  • —Model type: bert
  • —Problem Type: singlelabelclassification
  • —Number of Labels: 24
  • —Vocabulary Size: 30522
  • —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/GIST-small-weborganizer-topic"
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
0Adult Content
1Art & Design
2Crime & Law
3Education & Jobs
4Electronics & Hardare
5Entertainment
6Fashion & Beauty
7Finance & Business
8Food & Dining
9Games
10Health
11History & Geography
12Home & Hobbies
13Industrial
14Literature
15Politics
16Religion
17Science, Math & Technology
18Social Life
19Software
20Software Development
21Sports & Fitness
22Transportation
23Travel & Tourism

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.6471
Validation Loss0.7848
Validation F1 Score0.7646
Total FLOPs3.9539e+15

For performance on the test set, click here.

Speed Performance

  • —Training Runtime: 513.1373 seconds
  • —Train Samples per Second: 467.711
  • —Evaluation Runtime: 5.5697 seconds
  • —Eval Samples per Second: 1795.418

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

Training Logs History

StepEpochLearning RateTraining LossValidation LossValidation F1
5000.054.9168e-052.377N/AN/A
10000.14.8335e-051.5234N/AN/A
15000.154.7502e-051.2233N/AN/A
20000.24.6668e-051.0762N/AN/A
25000.254.5835e-051.0471N/AN/A
30000.34.5002e-050.9702N/AN/A
35000.354.4168e-050.9347N/AN/A
40000.44.3335e-050.935N/AN/A
45000.454.2502e-050.8752N/AN/A
50000.54.1668e-050.9333N/AN/A
55000.554.0835e-050.8817N/AN/A
60000.64.0002e-050.8634N/AN/A
65000.653.9168e-050.8654N/AN/A
70000.73.8335e-050.8731N/AN/A
75000.753.7502e-050.8417N/AN/A
80000.83.6668e-050.8155N/AN/A
85000.853.5835e-050.8126N/AN/A
90000.93.5002e-050.8291N/AN/A
95000.953.4168e-050.8215N/AN/A
100001.03.3335e-050.8030.79960.7456
105001.053.2502e-050.5678N/AN/A
110001.13.1668e-050.587N/AN/A
115001.153.0835e-050.5868N/AN/A
120001.23.0002e-050.5535N/AN/A
125001.252.9168e-050.5698N/AN/A
130001.32.8335e-050.6105N/AN/A
135001.352.7502e-050.5476N/AN/A
140001.42.6668e-050.5714N/AN/A
145001.452.5835e-050.581N/AN/A
150001.52.5002e-050.5743N/AN/A
155001.552.4168e-050.572N/AN/A
160001.62.3335e-050.553N/AN/A
165001.652.2502e-050.5777N/AN/A
170001.72.1668e-050.5599N/AN/A
175001.752.0835e-050.5823N/AN/A
180001.82.0002e-050.5614N/AN/A
185001.851.9168e-050.5345N/AN/A
190001.91.8335e-050.5846N/AN/A
195001.951.7502e-050.5599N/AN/A
200002.01.6668e-050.54750.78480.7646
205002.051.5835e-050.3585N/AN/A
210002.11.5002e-050.372N/AN/A
215002.151.4168e-050.3328N/AN/A
220002.21.3335e-050.3766N/AN/A
225002.251.2502e-050.3755N/AN/A
230002.31.1668e-050.3482N/AN/A
235002.351.0835e-050.3897N/AN/A
240002.41.0002e-050.3567N/AN/A
245002.459.1683e-060.353N/AN/A
250002.58.3350e-060.3734N/AN/A
255002.557.5017e-060.3444N/AN/A
260002.66.6683e-060.3438N/AN/A
265002.655.8350e-060.3411N/AN/A
270002.75.0017e-060.371N/AN/A
275002.754.1683e-060.341N/AN/A
280002.83.3350e-060.3606N/AN/A
285002.852.5017e-060.3429N/AN/A
290002.91.6683e-060.3581N/AN/A
295002.958.3500e-070.3653N/AN/A
300003.01.6667e-090.33670.95860.7633

</details>

Framework Versions

  • —Transformers: 5.14.0.dev0
  • —PyTorch: 2.13.0+cu130