Text Classification
Transformers
Safetensors
roberta
Generated from Trainer
text-embeddings-inference
Instructions to use azherali/CodeDetect-CodeBERT-T2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use azherali/CodeDetect-CodeBERT-T2 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="azherali/CodeDetect-CodeBERT-T2")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("azherali/CodeDetect-CodeBERT-T2") model = AutoModelForSequenceClassification.from_pretrained("azherali/CodeDetect-CodeBERT-T2", device_map="auto") - Notebooks
- Google Colab
- Kaggle
|
Download README.md from azherali/CodeDetect-CodeBERT-T2: direct link, hf CLI and curl.
- Browser
- Download file 2.09 kB
-
https://huggingface.co/azherali/CodeDetect-CodeBERT-T2/resolve/main/README.md
- Command line
-
hf download hf://azherali/CodeDetect-CodeBERT-T2/README.md
-
curl -L -o README.md https://huggingface.co/azherali/CodeDetect-CodeBERT-T2/resolve/main/README.md
2.09 kB
| library_name: transformers | |
| base_model: microsoft/codebert-base | |
| tags: | |
| - generated_from_trainer | |
| metrics: | |
| - accuracy | |
| - f1 | |
| - precision | |
| - recall | |
| model-index: | |
| - name: CodeDetect-CodeBERT-T2 | |
| 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. --> | |
| # CodeDetect-CodeBERT-T2 | |
| This model is a fine-tuned version of [microsoft/codebert-base](https://huggingface.co/microsoft/codebert-base) on the None dataset. | |
| It achieves the following results on the evaluation set: | |
| - Loss: 1.3390 | |
| - Accuracy: 0.6333 | |
| - F1: 0.5902 | |
| - Precision: 0.5843 | |
| - Recall: 0.6010 | |
| ## 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: 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_steps: 0.1 | |
| - num_epochs: 5 | |
| - mixed_precision_training: Native AMP | |
| ### Training results | |
| | Training Loss | Epoch | Step | Validation Loss | Accuracy | F1 | Precision | Recall | | |
| |:-------------:|:-----:|:-----:|:---------------:|:--------:|:------:|:---------:|:------:| | |
| | 1.0683 | 1.0 | 13235 | 1.1079 | 0.5997 | 0.5594 | 0.5602 | 0.6005 | | |
| | 0.8459 | 2.0 | 26470 | 1.1190 | 0.6200 | 0.5819 | 0.5765 | 0.6089 | | |
| | 0.6554 | 3.0 | 39705 | 1.1410 | 0.6327 | 0.5882 | 0.5834 | 0.6053 | | |
| | 0.5130 | 4.0 | 52940 | 1.2600 | 0.6312 | 0.5878 | 0.5812 | 0.6018 | | |
| | 0.4146 | 5.0 | 66175 | 1.3390 | 0.6333 | 0.5902 | 0.5843 | 0.6010 | | |
| ### Framework versions | |
| - Transformers 5.13.1 | |
| - Pytorch 2.11.0+cu130 | |
| - Datasets 4.0.0 | |
| - Tokenizers 0.22.2 | |