Text Classification
Transformers
Safetensors
bert
research-library
repository-library
metadata-category-classifier
m2
t1_metadata
v2
text-embeddings-inference
Run this model with HF Jobs
Run PeytonT/metadata-category-classifier on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs to fine-tune https://huggingface.co/PeytonT/metadata-category-classifier. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/PeytonT/metadata-category-classifier on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
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")# pip install -U transformers accelerate # 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
Update full Metadata Category Classifier v2 model card
Browse files2 unmodified lines34567891011121314151617181920212223242526272829303132333435363738394041422 unmodified linesbase_model: allenai/scibert_scivocab_uncasedtags:- research-library- v2- m2---# Metadata Category Classifier v2Research Library model `M2` uploaded from `/data/repository_library`.## Version`v2`## Experiment- Model ID: `M2`- Experiment: `m2_metadata_category_classifier_draft`- Base model: `allenai/scibert_scivocab_uncased`- Training objective: `cross_entropy`## Evaluation- `eval_loss`: `0.003253802889958024`- `eval_accuracy`: `1.0`- `eval_macro_f1`: `1.0`- `eval_balanced_accuracy`: `1.0`- `eval_label_count`: `31`## NotesHardened metadata classifier v2 with known-label eval filtering and a denser 32-label target. Metrics are high and should receive a leakage audit before use as a final benchmark.## Included Files- Trained model/tokenizer artifacts- `experiment_config.json`- `trainer_state.json` when available- `research_library_v2_metadata.json`2 unmodified lines34567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241252 unmodified linesbase_model: allenai/scibert_scivocab_uncasedtags:- research-library- repository-library- metadata-category-classifier- m2- t1_metadata- text-classification- v2---# Metadata Category ClassifierClassifies paper metadata from title and abstract text into arXiv-style category labels.## Model Details- Artifact type: full fine-tuned Transformers model- Base model: `allenai/scibert_scivocab_uncased`- Backbone type: encoder- Model ID: `M2`- Tier: `T1_metadata`- Role in stack: metadata and global science-graph component- Version: `v2`This model is part of the Repository Library stack, a research system for indexing, retrieving, aligning, and reasoning over scientific papers, structured paper content, repositories, and cross-domain links between them.## Model Sources- Hugging Face repo: https://huggingface.co/PeytonT/metadata-category-classifier- Hugging Face collection: https://huggingface.co/collections/PeytonT/research-library-6a49c589ef4d763f7539b50d- GitHub repository: https://github.com/peytontolbert/research_library- Experiment config: https://github.com/peytontolbert/research_library/blob/main/models/experiments/m2_metadata_category_classifier.json- Models directory: https://github.com/peytontolbert/research_library/tree/main/models## Intended Use- Primary use: Classifies paper title and abstract metadata into category labels for metadata indexing and filtering.- Downstream use: retrieval, ranking, routing, clustering, paper understanding, and global science-graph construction inside the broader Repository Library system.- Out of scope: production safety claims, benchmark claims beyond the tracked experiment config, or deployment without task-specific validation.## Training DataThe training inputs for this package were assembled from the following Repository Library data sources:- Source `arxiv_metadata`: arXiv metadata records containing titles, abstracts, authors, categories, and update metadata.The v2 hardening pass restricts the classifier target space to a denser category set:- `max_labels`: 32- `min_per_label`: 16- `max_per_label`: 128## Training Procedure- Sources: `arxiv_metadata`- Input fields: `title`, `abstract`- Target fields: `categories`- Filters: years `[2000, 2025]`- Train/val/test split: `[0.9, 0.1, 0.0]`- Max samples: 4000- Batch size: 8- Precision: `bf16`- Objective: `cross_entropy`- Learning rate: `5e-05`- Max source tokens: 512- Max target tokens: 128- Fine-tune strategy: `full_finetune`- Number of labels: 32- Max steps: 1000## Compute- Hardware: 2x RTX_3090 (24 GB)- Distributed strategy: `ddp`- Estimated GPU hours in config: 0## EvaluationDeclared metrics: `accuracy`, `macro_f1`Tracked v2 eval metrics on the current held-out split:- `eval_loss`: `0.003253802889958024`- `eval_accuracy`: `1.0`- `eval_macro_f1`: `1.0`- `eval_balanced_accuracy`: `1.0`- `eval_label_count`: `31`Status: this card reflects the current tracked experiment configuration and packaged weights in the Repository Library model stack. The v2 scores are very high and should receive a leakage audit before being treated as a final benchmark.## Usage```pythonfrom transformers import AutoModelForSequenceClassification, AutoTokenizerrepo_id = "PeytonT/metadata-category-classifier"tokenizer = AutoTokenizer.from_pretrained(repo_id)model = AutoModelForSequenceClassification.from_pretrained(repo_id)text = "TITLE: Example paper titleABSTRACT: This paper studies representation learning for scientific documents."inputs = tokenizer(text, return_tensors="pt", truncation=True, max_length=512)outputs = model(**inputs)predicted_id = outputs.logits.argmax(dim=-1).item()label = model.config.id2label.get(predicted_id, str(predicted_id))print(label)```## Limitations- These cards are generated from tracked experiment metadata and packaged artifacts, not from a separate benchmark report or external audit.- Several training sources are pipeline outputs from the Repository Library codebase rather than standalone public datasets.- The v2 classifier uses a hardened 32-label target space rather than the full arXiv category universe.- The current v2 eval result is perfect on the tracked split, which is useful as a pipeline check but should be audited for label leakage, split leakage, and class-distribution artifacts.- These models are components of a larger research system and should be validated in their target workflow before deployment.## Project Context- GitHub repository: https://github.com/peytontolbert/research_library- Model collection: https://huggingface.co/collections/PeytonT/research-library-6a49c589ef4d763f7539b50d- Publisher: PeytonT
README.md+100-17