Instructions to use AllanK24/tbs17-MathBERT-Math-Classifier with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use AllanK24/tbs17-MathBERT-Math-Classifier with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="AllanK24/tbs17-MathBERT-Math-Classifier")# Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("AllanK24/tbs17-MathBERT-Math-Classifier") model = AutoModelForSequenceClassification.from_pretrained("AllanK24/tbs17-MathBERT-Math-Classifier") - Notebooks
- Google Colab
- Kaggle
| library_name: transformers | |
| base_model: tbs17/MathBERT | |
| tags: | |
| - generated_from_trainer | |
| model-index: | |
| - name: tbs17-MathBERT-Math-Classifier | |
| results: [] | |
| <!-- This model card has been generated automatically according to the information the Trainer had access to. You | |
| should probably proofread and complete it, then remove this comment. --> | |
| # tbs17-MathBERT-Math-Classifier | |
| This model is a fine-tuned version of [tbs17/MathBERT](https://huggingface.co/tbs17/MathBERT) on the None dataset. | |
| It achieves the following results on the evaluation set: | |
| - Loss: 0.9505 | |
| - Micro F1: 0.8437 | |
| ## 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: 1e-05 | |
| - train_batch_size: 4 | |
| - eval_batch_size: 4 | |
| - seed: 42 | |
| - distributed_type: multi-GPU | |
| - num_devices: 2 | |
| - total_train_batch_size: 8 | |
| - total_eval_batch_size: 8 | |
| - optimizer: Use OptimizerNames.ADAMW_TORCH_FUSED with betas=(0.9,0.999) and epsilon=1e-08 and optimizer_args=No additional optimizer arguments | |
| - lr_scheduler_type: linear | |
| - lr_scheduler_warmup_ratio: 0.1 | |
| - num_epochs: 8 | |
| - mixed_precision_training: Native AMP | |
| - label_smoothing_factor: 0.1 | |
| ### Training results | |
| | Training Loss | Epoch | Step | Validation Loss | Micro F1 | | |
| |:-------------:|:-----:|:----:|:---------------:|:--------:| | |
| | 1.2886 | 1.0 | 1083 | 0.8944 | 0.8051 | | |
| | 0.8314 | 2.0 | 2166 | 0.8812 | 0.8182 | | |
| | 0.6888 | 3.0 | 3249 | 0.8701 | 0.8411 | | |
| | 0.598 | 4.0 | 4332 | 0.9151 | 0.8352 | | |
| | 0.5407 | 5.0 | 5415 | 0.9424 | 0.8339 | | |
| | 0.5081 | 6.0 | 6498 | 0.9387 | 0.8457 | | |
| | 0.4908 | 7.0 | 7581 | 0.9565 | 0.8424 | | |
| | 0.4857 | 8.0 | 8664 | 0.9505 | 0.8437 | | |
| ### Framework versions | |
| - Transformers 4.51.1 | |
| - Pytorch 2.5.1+cu124 | |
| - Datasets 3.5.0 | |
| - Tokenizers 0.21.0 | |