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 / fourier-spectral-norm-classifier /checkpoint-1500 /config_hyperparams.json
| { | |
| "train_config": { | |
| "TEST": false, | |
| "model_name": "/kaggle/input/models/dzung271828/microsoft-graphcodebert-base/transformers/default/1", | |
| "output_dir": "training/fourier-spectral-norm-classifier/", | |
| "num_epochs": 5, | |
| "max_steps": -1, | |
| "batch_size": 512, | |
| "learning_rate": 1e-06, | |
| "max_length": 512, | |
| "num_labels": 2, | |
| "use_wandb": false, | |
| "freeze_base": true, | |
| "loss_type": "ce", | |
| "focal_alpha": 1.0, | |
| "focal_gamma": 2.0, | |
| "r_drop_alpha": 6.0, | |
| "infonce_temperature": 0.07, | |
| "infonce_weight": 0.5, | |
| "seed": 42, | |
| "resume_from_checkpoint": null, | |
| "save_steps": 500, | |
| "eval_steps": 500, | |
| "logging_steps": 5, | |
| "label_smoothing": 0.5, | |
| "adversarial_epsilon": 0.5, | |
| "use_swa": true, | |
| "swa_start_epoch": 0, | |
| "swa_lr": 1e-06, | |
| "data_augmentation": true, | |
| "aug_rename_prob": 0.7, | |
| "aug_format_prob": 0.7, | |
| "weight_decay": 0.1, | |
| "mixup_alpha": 1.0, | |
| "low_pass_keep_ratio": 0.5, | |
| "freq_consistency_weight": 0.2, | |
| "use_mixcode": true, | |
| "use_fgm": true, | |
| "fgm_freq": 5, | |
| "use_r_drop": true, | |
| "use_freq_consistency_loss": true, | |
| "use_attn_spectral": false, | |
| "attn_spectral_weight": 0.1, | |
| "attn_spectral_cutoff_ratio": 0.25, | |
| "hidden_dropout_prob": 0.3, | |
| "attention_probs_dropout_prob": 0.3, | |
| "classifier_dropout": 0.4, | |
| "device": "cuda", | |
| "torch_compile": true, | |
| "cache_dir": "./tokenized_cache", | |
| "use_swa_actual": true, | |
| "use_fgm_actual": true, | |
| "use_r_drop_actual": true, | |
| "use_mixcode_actual": true, | |
| "use_attn_spectral_actual": false, | |
| "use_freq_consistency_loss_actual": true, | |
| "use_spectral_norm": true | |
| }, | |
| "training_arguments": { | |
| "output_dir": "training/fourier-spectral-norm-classifier/", | |
| "num_train_epochs": 5, | |
| "per_device_train_batch_size": 512, | |
| "per_device_eval_batch_size": 1024, | |
| "learning_rate": 1e-06, | |
| "warmup_steps": 488, | |
| "weight_decay": 0.1, | |
| "logging_steps": 5, | |
| "eval_steps": 500, | |
| "save_steps": 500, | |
| "metric_for_best_model": "macro_f1", | |
| "greater_is_better": true, | |
| "save_total_limit": 5, | |
| "fp16": false, | |
| "seed": 42 | |
| }, | |
| "training_state": { | |
| "global_step": 1500, | |
| "epoch": 1.5353121801432958, | |
| "best_metric": 0.6724504812400831, | |
| "best_model_checkpoint": "training/fourier-spectral-norm-classifier/checkpoint-1000" | |
| } | |
| } |