Text Classification
Transformers
Safetensors
roberta
Generated from Trainer
text-embeddings-inference
Instructions to use Sab286/ai-code-detector-finetuned with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Sab286/ai-code-detector-finetuned with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="Sab286/ai-code-detector-finetuned")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("Sab286/ai-code-detector-finetuned") model = AutoModelForSequenceClassification.from_pretrained("Sab286/ai-code-detector-finetuned", device_map="auto") - Notebooks
- Google Colab
- Kaggle
|
Download README.md from Sab286/ai-code-detector-finetuned: direct link, hf CLI and curl.
- Browser
- Download file 1.96 kB
-
https://huggingface.co/Sab286/ai-code-detector-finetuned/resolve/main/README.md
- Command line
-
hf download hf://Sab286/ai-code-detector-finetuned/README.md
-
curl -L -o README.md https://huggingface.co/Sab286/ai-code-detector-finetuned/resolve/main/README.md
1.96 kB
| library_name: transformers | |
| base_model: microsoft/codebert-base | |
| tags: | |
| - generated_from_trainer | |
| metrics: | |
| - accuracy | |
| - f1 | |
| model-index: | |
| - name: ai-code-detector-finetuned | |
| 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. --> | |
| # ai-code-detector-finetuned | |
| 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: 0.0001 | |
| - Accuracy: 1.0 | |
| - F1: 1.0 | |
| - Tpr: 1.0 | |
| - Tnr: 1.0 | |
| ## 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: 4 | |
| - eval_batch_size: 8 | |
| - 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: 200 | |
| - num_epochs: 5 | |
| ### Training results | |
| | Training Loss | Epoch | Step | Validation Loss | Accuracy | F1 | Tpr | Tnr | | |
| |:-------------:|:-----:|:----:|:---------------:|:--------:|:------:|:------:|:---:| | |
| | 0.0004 | 1.0 | 479 | 0.0136 | 0.9941 | 0.9942 | 0.9884 | 1.0 | | |
| | 0.0001 | 2.0 | 958 | 0.0001 | 1.0 | 1.0 | 1.0 | 1.0 | | |
| | 0.0001 | 3.0 | 1437 | 0.0000 | 1.0 | 1.0 | 1.0 | 1.0 | | |
| | 0.0000 | 4.0 | 1916 | 0.0000 | 1.0 | 1.0 | 1.0 | 1.0 | | |
| | 0.0000 | 5.0 | 2395 | 0.0000 | 1.0 | 1.0 | 1.0 | 1.0 | | |
| ### Framework versions | |
| - Transformers 5.9.0 | |
| - Pytorch 2.12.0+cu130 | |
| - Datasets 4.8.5 | |
| - Tokenizers 0.22.2 | |