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
graphcodebert-code-classification / graphcodebert-base-lowLR-highBatchSize /checkpoint-350 /config_hyperparams.json
| { | |
| "train_config": { | |
| "model_name": "microsoft/graphcodebert-base", | |
| "num_epochs": 1, | |
| "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": 10.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-base-lowLR-highBatchSize/", | |
| "num_train_epochs": 1, | |
| "per_device_train_batch_size": 256, | |
| "per_device_eval_batch_size": 512, | |
| "learning_rate": 1e-06, | |
| "warmup_steps": 204, | |
| "weight_decay": 0.1, | |
| "logging_steps": 10, | |
| "eval_steps": 1000, | |
| "save_steps": 50, | |
| "metric_for_best_model": "macro_f1", | |
| "greater_is_better": true, | |
| "save_total_limit": 4, | |
| "fp16": true, | |
| "seed": 42 | |
| }, | |
| "training_state": { | |
| "global_step": 350, | |
| "epoch": 0.3424657534246575, | |
| "best_metric": null, | |
| "best_model_checkpoint": null | |
| } | |
| } |