Text Classification
Transformers
Safetensors
bert
research-library
repository-library
metadata-category-classifier
m2
t1_metadata
v2
text-embeddings-inference
Instructions to use PeytonT/metadata-category-classifier with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use PeytonT/metadata-category-classifier with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="PeytonT/metadata-category-classifier")# Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("PeytonT/metadata-category-classifier") model = AutoModelForSequenceClassification.from_pretrained("PeytonT/metadata-category-classifier", device_map="auto") - Notebooks
- Google Colab
- Kaggle
File size: 2,513 Bytes
95da37d | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 | {
"experiment_name": "m2_metadata_category_classifier_draft",
"display_name": "Metadata Category Classifier",
"model_id": "M2",
"tier": "T1_metadata",
"backbone": {
"type": "encoder",
"base_model": "allenai/scibert_scivocab_uncased",
"adapter_type": "none",
"parameters_millions": 110,
"cache_dir": "/data/checkpoints",
"load_in_8bit": false,
"load_in_4bit": false
},
"dataset": {
"sources": [
"arxiv_metadata"
],
"filters": {
"years": [
2000,
2025
]
},
"construction": {
"input_fields": [
"title",
"abstract"
],
"target_fields": [
"categories"
],
"max_samples": 4000,
"train_val_test_split": [
0.9,
0.1,
0.0
],
"shuffling_seed": 42
},
"tokenization": {
"tokenizer_name": "allenai/scibert_scivocab_uncased",
"max_source_tokens": 512,
"max_target_tokens": 128,
"truncate_strategy": "longest_first"
},
"cache_dir": "/data/checkpoints",
"hardening": {
"max_per_label": 128,
"max_labels": 32,
"min_per_label": 16
}
},
"training": {
"batch_size": 8,
"gradient_accumulation_steps": 1,
"num_epochs": 3,
"learning_rate": 5e-05,
"optimizer": "adamw",
"weight_decay": 0.01,
"warmup_steps": 100,
"precision": "bf16",
"gradient_checkpointing": false,
"objective": "cross_entropy",
"checkpoint_dir": "models/checkpoints/M2",
"cache_dir": "/data/checkpoints",
"finetune_strategy": "full_finetune",
"use_hf_trainer": true,
"max_steps": 1000,
"allow_cpu_trainer": true,
"force_cpu": false,
"save_steps": 200,
"logging_steps": 50,
"eval_strategy": "no",
"eval_steps": 200,
"evaluation_strategy": "no",
"metric_for_best_model": "eval_loss",
"load_best_model_at_end": false,
"model_type": "classifier",
"resume_from_checkpoint": false,
"num_labels": 32
},
"evaluation": {
"metrics": [
"accuracy",
"macro_f1"
],
"eval_interval_steps": 200,
"early_stopping": {
"metric": "validation_loss",
"patience": 2
}
},
"inference": {
"max_new_tokens": 256,
"temperature": 0.7,
"top_p": 0.95,
"beam_size": 1
},
"compute": {
"gpus": [
{
"type": "RTX_3090",
"count": 2,
"memory_gb": 24
}
],
"estimated_gpu_hours": 0,
"distributed_strategy": "ddp"
}
}
|