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
| { | |
| "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" | |
| } | |
| } | |