Instructions to use azherali/CodeGenDetect-Bert-T1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use azherali/CodeGenDetect-Bert-T1 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="azherali/CodeGenDetect-Bert-T1")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("azherali/CodeGenDetect-Bert-T1") model = AutoModelForSequenceClassification.from_pretrained("azherali/CodeGenDetect-Bert-T1", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Model save
Browse files- README.md +73 -0
- model.safetensors +1 -1
README.md
ADDED
|
@@ -0,0 +1,73 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
library_name: transformers
|
| 3 |
+
license: apache-2.0
|
| 4 |
+
base_model: bert-base-uncased
|
| 5 |
+
tags:
|
| 6 |
+
- generated_from_trainer
|
| 7 |
+
metrics:
|
| 8 |
+
- accuracy
|
| 9 |
+
- f1
|
| 10 |
+
- precision
|
| 11 |
+
- recall
|
| 12 |
+
model-index:
|
| 13 |
+
- name: CodeGenDetect-Bert-T1
|
| 14 |
+
results: []
|
| 15 |
+
---
|
| 16 |
+
|
| 17 |
+
<!-- This model card has been generated automatically according to the information the Trainer had access to. You
|
| 18 |
+
should probably proofread and complete it, then remove this comment. -->
|
| 19 |
+
|
| 20 |
+
# CodeGenDetect-Bert-T1
|
| 21 |
+
|
| 22 |
+
This model is a fine-tuned version of [bert-base-uncased](https://huggingface.co/bert-base-uncased) on the None dataset.
|
| 23 |
+
It achieves the following results on the evaluation set:
|
| 24 |
+
- Loss: 0.1971
|
| 25 |
+
- Accuracy: 0.9431
|
| 26 |
+
- F1: 0.9430
|
| 27 |
+
- Precision: 0.9434
|
| 28 |
+
- Recall: 0.9427
|
| 29 |
+
|
| 30 |
+
## Model description
|
| 31 |
+
|
| 32 |
+
More information needed
|
| 33 |
+
|
| 34 |
+
## Intended uses & limitations
|
| 35 |
+
|
| 36 |
+
More information needed
|
| 37 |
+
|
| 38 |
+
## Training and evaluation data
|
| 39 |
+
|
| 40 |
+
More information needed
|
| 41 |
+
|
| 42 |
+
## Training procedure
|
| 43 |
+
|
| 44 |
+
### Training hyperparameters
|
| 45 |
+
|
| 46 |
+
The following hyperparameters were used during training:
|
| 47 |
+
- learning_rate: 2e-05
|
| 48 |
+
- train_batch_size: 64
|
| 49 |
+
- eval_batch_size: 64
|
| 50 |
+
- seed: 42
|
| 51 |
+
- optimizer: Use OptimizerNames.ADAMW_TORCH_FUSED with betas=(0.9,0.999) and epsilon=1e-08 and optimizer_args=No additional optimizer arguments
|
| 52 |
+
- lr_scheduler_type: linear
|
| 53 |
+
- lr_scheduler_warmup_steps: 0.1
|
| 54 |
+
- num_epochs: 5
|
| 55 |
+
- mixed_precision_training: Native AMP
|
| 56 |
+
|
| 57 |
+
### Training results
|
| 58 |
+
|
| 59 |
+
| Training Loss | Epoch | Step | Validation Loss | Accuracy | F1 | Precision | Recall |
|
| 60 |
+
|:-------------:|:-----:|:-----:|:---------------:|:--------:|:------:|:---------:|:------:|
|
| 61 |
+
| 0.1703 | 1.0 | 16897 | 0.1624 | 0.9366 | 0.9365 | 0.9364 | 0.9368 |
|
| 62 |
+
| 0.1393 | 2.0 | 33794 | 0.1490 | 0.9433 | 0.9432 | 0.9432 | 0.9432 |
|
| 63 |
+
| 0.1116 | 3.0 | 50691 | 0.1565 | 0.9448 | 0.9447 | 0.9448 | 0.9446 |
|
| 64 |
+
| 0.0910 | 4.0 | 67588 | 0.1745 | 0.9434 | 0.9433 | 0.9435 | 0.9432 |
|
| 65 |
+
| 0.0704 | 5.0 | 84485 | 0.1971 | 0.9431 | 0.9430 | 0.9434 | 0.9427 |
|
| 66 |
+
|
| 67 |
+
|
| 68 |
+
### Framework versions
|
| 69 |
+
|
| 70 |
+
- Transformers 5.13.1
|
| 71 |
+
- Pytorch 2.11.0+cu130
|
| 72 |
+
- Datasets 4.0.0
|
| 73 |
+
- Tokenizers 0.22.2
|
model.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 437958624
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:f3f39ac81dcb7d8685716ab39597bb694da3d475c50611cb5945ab148a3008f5
|
| 3 |
size 437958624
|