Instructions to use dzungpham/graphcodebert-code-classification with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use dzungpham/graphcodebert-code-classification with Transformers:
# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("dzungpham/graphcodebert-code-classification", dtype="auto") - Notebooks
- Google Colab
- Kaggle
File size: 1,409 Bytes
221c903 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 | {
"train_config": {
"model_name": "microsoft/graphcodebert-base",
"num_epochs": 2,
"batch_size": 256,
"learning_rate": 1e-06,
"max_length": 512,
"num_labels": 2,
"loss_type": "r-drop",
"focal_alpha": 1.0,
"focal_gamma": 2.0,
"r_drop_alpha": 6.0,
"infonce_temperature": 0.07,
"infonce_weight": 0.5,
"label_smoothing": 0.5,
"adversarial_epsilon": 0.5,
"use_swa": false,
"swa_start_epoch": 0,
"swa_lr": 1e-05,
"data_augmentation": true,
"aug_rename_prob": 0.8,
"aug_format_prob": 0.8,
"freeze_base": true,
"seed": 42,
"use_wandb": true,
"mixup_alpha": 1.0,
"low_pass_keep_ratio": 0.5,
"freq_consistency_weight": 0.5
},
"training_arguments": {
"output_dir": "output_checkpoints/graphcodebert-best/",
"num_train_epochs": 2,
"per_device_train_batch_size": 256,
"per_device_eval_batch_size": 512,
"learning_rate": 1e-06,
"warmup_steps": 408,
"weight_decay": 0.1,
"logging_steps": 2,
"eval_steps": 20,
"save_steps": 100,
"metric_for_best_model": "macro_f1",
"greater_is_better": true,
"save_total_limit": 5,
"fp16": true,
"seed": 42
},
"training_state": {
"global_step": 1650,
"epoch": 1.6144814090019568,
"best_metric": 0.6134094606232656,
"best_model_checkpoint": "output_checkpoints/graphcodebert-best/checkpoint-1550"
}
} |