Text Classification
Transformers
PyTorch
distilbert
Generated from Trainer
Eval Results (legacy)
text-embeddings-inference
Run this model with HF Jobs
Run alexgshaw/hyperpartisan-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/alexgshaw/hyperpartisan-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/alexgshaw/hyperpartisan-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 alexgshaw/hyperpartisan-classifier with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use alexgshaw/hyperpartisan-classifier with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="alexgshaw/hyperpartisan-classifier")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("alexgshaw/hyperpartisan-classifier") model = AutoModelForSequenceClassification.from_pretrained("alexgshaw/hyperpartisan-classifier", device_map="auto") - Notebooks
- Google Colab
- Kaggle
update model card README.md
Browse files123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119---license: apache-2.0tags:- generated_from_trainerdatasets:- hyperpartisan_news_detectionmetrics:- accuracymodel-index:- name: hyperpartisan-classifier results: - task: name: Text Classification type: text-classification dataset: name: hyperpartisan_news_detection type: hyperpartisan_news_detection config: bypublisher split: validation args: bypublisher metrics: - name: Accuracy type: accuracy value: 0.9988466666666667---
<!-- This model card has been generated automatically according to the information the Trainer had access to. Youshould probably proofread and complete it, then remove this comment. -->
# hyperpartisan-classifier
This model is a fine-tuned version of [distilbert-base-uncased](https://huggingface.co/distilbert-base-uncased) on the hyperpartisan_news_detection dataset.It achieves the following results on the evaluation set:- Loss: 0.0036- Accuracy: 0.9988
## Model description
More information needed
## Intended uses & limitations
More information needed
## Training and evaluation data
More information needed
## Training procedure
### Training hyperparameters
The following hyperparameters were used during training:- learning_rate: 2e-05- train_batch_size: 64- eval_batch_size: 64- seed: 42- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08- lr_scheduler_type: linear- num_epochs: 5
### Training results
| Training Loss | Epoch | Step | Validation Loss | Accuracy ||:-------------:|:-----:|:-----:|:---------------:|:--------:|| 0.1441 | 0.11 | 1000 | 0.1391 | 0.9453 || 0.1248 | 0.21 | 2000 | 0.1042 | 0.9595 || 0.1027 | 0.32 | 3000 | 0.0913 | 0.9647 || 0.0928 | 0.43 | 4000 | 0.0827 | 0.9688 || 0.0992 | 0.53 | 5000 | 0.0799 | 0.9698 || 0.0881 | 0.64 | 6000 | 0.0710 | 0.9741 || 0.078 | 0.75 | 7000 | 0.0640 | 0.9762 || 0.0708 | 0.85 | 8000 | 0.0626 | 0.9764 || 0.0696 | 0.96 | 9000 | 0.0564 | 0.9792 || 0.0586 | 1.07 | 10000 | 0.0516 | 0.9813 || 0.0558 | 1.17 | 11000 | 0.0507 | 0.9815 || 0.0531 | 1.28 | 12000 | 0.0463 | 0.9829 || 0.0585 | 1.39 | 13000 | 0.0468 | 0.9831 || 0.0488 | 1.49 | 14000 | 0.0403 | 0.9854 || 0.057 | 1.6 | 15000 | 0.0393 | 0.9865 || 0.0514 | 1.71 | 16000 | 0.0349 | 0.9879 || 0.052 | 1.81 | 17000 | 0.0366 | 0.9868 || 0.0572 | 1.92 | 18000 | 0.0300 | 0.9895 || 0.0311 | 2.03 | 19000 | 0.0309 | 0.9893 || 0.0332 | 2.13 | 20000 | 0.0262 | 0.9908 || 0.0396 | 2.24 | 21000 | 0.0250 | 0.9914 || 0.0314 | 2.35 | 22000 | 0.0223 | 0.9924 || 0.0361 | 2.45 | 23000 | 0.0236 | 0.9919 || 0.0289 | 2.56 | 24000 | 0.0197 | 0.9933 || 0.0322 | 2.67 | 25000 | 0.0182 | 0.9939 || 0.0416 | 2.77 | 26000 | 0.0183 | 0.9937 || 0.0273 | 2.88 | 27000 | 0.0159 | 0.9946 || 0.0317 | 2.99 | 28000 | 0.0152 | 0.9949 || 0.0203 | 3.09 | 29000 | 0.0132 | 0.9957 || 0.0182 | 3.2 | 30000 | 0.0146 | 0.9953 || 0.0165 | 3.31 | 31000 | 0.0123 | 0.9961 || 0.0184 | 3.41 | 32000 | 0.0105 | 0.9968 || 0.0208 | 3.52 | 33000 | 0.0103 | 0.9967 || 0.0187 | 3.63 | 34000 | 0.0083 | 0.9973 || 0.0183 | 3.73 | 35000 | 0.0076 | 0.9977 || 0.0258 | 3.84 | 36000 | 0.0073 | 0.9977 || 0.0114 | 3.95 | 37000 | 0.0066 | 0.9979 || 0.007 | 4.05 | 38000 | 0.0052 | 0.9983 || 0.0094 | 4.16 | 39000 | 0.0061 | 0.9981 || 0.0106 | 4.27 | 40000 | 0.0053 | 0.9983 || 0.0134 | 4.37 | 41000 | 0.0052 | 0.9984 || 0.0087 | 4.48 | 42000 | 0.0040 | 0.9987 || 0.018 | 4.59 | 43000 | 0.0047 | 0.9985 || 0.0118 | 4.69 | 44000 | 0.0041 | 0.9987 || 0.012 | 4.8 | 45000 | 0.0038 | 0.9988 || 0.0165 | 4.91 | 46000 | 0.0036 | 0.9988 |
### Framework versions
- Transformers 4.27.0.dev0- Pytorch 1.13.1+cu116- Datasets 2.9.0- Tokenizers 0.13.2README.mdAdded+119