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
| 2026-04-15 10:25:16,900 - INFO - train_pipeline - Logging to ./taskA-codebert-base/training.log | |
| 2026-04-15 10:25:16,911 - INFO - train_pipeline - Loading model & tokenizer for 'microsoft/codebert-base' | |
| 2026-04-15 10:25:18,028 - INFO - train_pipeline - Model placed on cuda | |
| 2026-04-15 10:25:18,039 - INFO - train_pipeline - ===== Model Architecture ===== | |
| 2026-04-15 10:25:18,050 - INFO - train_pipeline - | |
| RobertaForSequenceClassification( | |
| (roberta): RobertaModel( | |
| (embeddings): RobertaEmbeddings( | |
| (word_embeddings): Embedding(50265, 768, padding_idx=1) | |
| (position_embeddings): Embedding(514, 768, padding_idx=1) | |
| (token_type_embeddings): Embedding(1, 768) | |
| (LayerNorm): LayerNorm((768,), eps=1e-05, elementwise_affine=True) | |
| (dropout): Dropout(p=0.1, inplace=False) | |
| ) | |
| (encoder): RobertaEncoder( | |
| (layer): ModuleList( | |
| (0-11): 12 x RobertaLayer( | |
| (attention): RobertaAttention( | |
| (self): RobertaSdpaSelfAttention( | |
| (query): Linear(in_features=768, out_features=768, bias=True) | |
| (key): Linear(in_features=768, out_features=768, bias=True) | |
| (value): Linear(in_features=768, out_features=768, bias=True) | |
| (dropout): Dropout(p=0.1, inplace=False) | |
| ) | |
| (output): RobertaSelfOutput( | |
| (dense): Linear(in_features=768, out_features=768, bias=True) | |
| (LayerNorm): LayerNorm((768,), eps=1e-05, elementwise_affine=True) | |
| (dropout): Dropout(p=0.1, inplace=False) | |
| ) | |
| ) | |
| (intermediate): RobertaIntermediate( | |
| (dense): Linear(in_features=768, out_features=3072, bias=True) | |
| (intermediate_act_fn): GELUActivation() | |
| ) | |
| (output): RobertaOutput( | |
| (dense): Linear(in_features=3072, out_features=768, bias=True) | |
| (LayerNorm): LayerNorm((768,), eps=1e-05, elementwise_affine=True) | |
| (dropout): Dropout(p=0.1, inplace=False) | |
| ) | |
| ) | |
| ) | |
| ) | |
| ) | |
| (classifier): RobertaClassificationHead( | |
| (dense): Linear(in_features=768, out_features=768, bias=True) | |
| (dropout): Dropout(p=0.1, inplace=False) | |
| (out_proj): Linear(in_features=768, out_features=2, bias=True) | |
| ) | |
| ) | |
| 2026-04-15 10:25:18,063 - INFO - train_pipeline - ===== Tokenizer Summary ===== | |
| 2026-04-15 10:25:18,087 - INFO - train_pipeline - Vocab size: 50265 | Special tokens: ['<s>', '</s>', '<unk>', '<pad>', '<mask>'] | |
| 2026-04-15 10:25:18,097 - INFO - train_pipeline - ===== End of Architecture Log ===== | |
| 2026-04-15 10:25:18,108 - INFO - train_pipeline - Base model weights frozen – only classifier head will be trained. | |
| 2026-04-15 10:25:19,118 - INFO - train_pipeline - === Starting training === | |
| 2026-04-15 10:25:16,900 - INFO - train_pipeline - Logging to ./taskA-codebert-base/training.log | |
| 2026-04-15 10:25:16,911 - INFO - train_pipeline - Loading model & tokenizer for 'microsoft/codebert-base' | |
| 2026-04-15 10:25:18,028 - INFO - train_pipeline - Model placed on cuda | |
| 2026-04-15 10:25:18,039 - INFO - train_pipeline - ===== Model Architecture ===== | |
| 2026-04-15 10:25:18,050 - INFO - train_pipeline - | |
| RobertaForSequenceClassification( | |
| (roberta): RobertaModel( | |
| (embeddings): RobertaEmbeddings( | |
| (word_embeddings): Embedding(50265, 768, padding_idx=1) | |
| (position_embeddings): Embedding(514, 768, padding_idx=1) | |
| (token_type_embeddings): Embedding(1, 768) | |
| (LayerNorm): LayerNorm((768,), eps=1e-05, elementwise_affine=True) | |
| (dropout): Dropout(p=0.1, inplace=False) | |
| ) | |
| (encoder): RobertaEncoder( | |
| (layer): ModuleList( | |
| (0-11): 12 x RobertaLayer( | |
| (attention): RobertaAttention( | |
| (self): RobertaSdpaSelfAttention( | |
| (query): Linear(in_features=768, out_features=768, bias=True) | |
| (key): Linear(in_features=768, out_features=768, bias=True) | |
| (value): Linear(in_features=768, out_features=768, bias=True) | |
| (dropout): Dropout(p=0.1, inplace=False) | |
| ) | |
| (output): RobertaSelfOutput( | |
| (dense): Linear(in_features=768, out_features=768, bias=True) | |
| (LayerNorm): LayerNorm((768,), eps=1e-05, elementwise_affine=True) | |
| (dropout): Dropout(p=0.1, inplace=False) | |
| ) | |
| ) | |
| (intermediate): RobertaIntermediate( | |
| (dense): Linear(in_features=768, out_features=3072, bias=True) | |
| (intermediate_act_fn): GELUActivation() | |
| ) | |
| (output): RobertaOutput( | |
| (dense): Linear(in_features=3072, out_f2026-04-15 10:25:18,121 - INFO - __main__ - Loading datasets from Hugging Face Hub... | |
| 2026-04-15 10:25:18,988 - INFO - __main__ - Train samples: 500000, Val samples: 100000 | |
| 2026-04-15 10:25:18,992 - INFO - __main__ - Tokenizing datasets... | |
| (dense): Linear(in_features=768, out_features=768, bias=True) | |
| (dropout): Dropout(p=0.1, inplace=False) | |
| (out_proj): Linear(in_features=768, out_features=2, bias=True) | |
| ) | |
| ) | |
| 2026-04-15 10:25:18,063 - INFO - train_pipeline - ===== Tokenizer Summary ===== | |
| 2026-04-15 10:25:18,087 - INFO - train_pipeline - Vocab size: 50265 | Special tokens: ['<s>', '</s>', '<unk>', '<pad>', '<mask>'] | |
| 2026-04-15 10:25:18,097 - INFO - train_pipeline - ===== End of Architecture Log ===== | |
| 2026-04-15 10:25:18,108 - INFO - train_pipeline - Base model weights frozen – only classifier head will be trained. | |
| 2026-04-15 10:25:19,118 - INFO - train_pipeline - === Starting training === | |
| 2026-04-15 10:25:16,900 - INFO - train_pipeline - Logging to ./taskA-codebert-base/training.log | |
| 2026-04-15 10:25:16,911 - INFO - train_pipeline - Loading model & tokenizer for 'microsoft/codebert-base' | |
| 2026-04-15 10:25:18,028 - INFO - train_pipeline - Model placed on cuda | |
| 2026-04-15 10:25:18,039 - INFO - train_pipeline - ===== Model Architecture ===== | |
| 2026-04-15 10:25:18,050 - INFO - train_pipeline - | |
| RobertaForSequenceClassification( | |
| (roberta): RobertaModel( | |
| (embeddings): RobertaEmbeddings( | |
| (word_embeddings): Embedding(50265, 768, padding_idx=1) | |
| (position_embeddings): Embedding(514, 768, padding_idx=1) | |
| (token_type_embeddings): Embedding(1, 768) | |
| (LayerNorm): LayerNorm((768,), eps=1e-05, elementwise_affine=True) | |
| (dropout): Dropout(p=0.1, inplace=False) | |
| ) | |
| (encoder): RobertaEncoder( | |
| (layer): ModuleList( | |
| (0-11): 12 x RobertaLayer( | |
| (attention): RobertaAttention( | |
| (self): RobertaSdpaSelfAttention( | |
| (query): Linear(in_features=768, out_features=768, bias=True) | |
| (key): Linear(in_features=768, out_features=768, bias=True) | |
| (value): Linear(in_features=768, out_features=768, bias=True) | |
| (dropout): Dropout(p=0.1, inplace=False) | |
| ) | |
| (output): RobertaSelfOutput( | |
| (dense): Linear(in_features=768, out_features=768, bias=True) | |
| (LayerNorm): LayerNorm((768,), eps=1e-05, elementwise_affine=True) | |
| (dropout): Dropout(p=0.1, inplace=False) | |
| ) | |
| ) | |
| (intermediate): RobertaIntermediate( | |
| (dense): Linear(in_features=768, out_features=3072, bias=True) | |
| (intermediate_act_fn): GELUActivation() | |
| ) | |
| (output): RobertaOutput( | |
| (dense): Linear(in_features=3072, out_features=768, bias=True) | |
| (LayerNorm): LayerNorm((768,), eps=1e-05, elementwise_affine=True) | |
| (dropout): Dropout(p=0.1, inplace=False) | |
| ) | |
| ) | |
| ) | |
| ) | |
| ) | |
| (classifier): RobertaClassificationHead( | |
| (dense): Linear(in_features=768, out_features=768, bias=True) | |
| (dropout): Dropout(p=0.1, inplace=False) | |
| (out_proj): Linear(in_features=768, out_features=2, bias=True) | |
| ) | |
| ) | |
| 2026-04-15 10:25:18,063 - INFO - train_pipeline - ===== Tokenizer Summary ===== | |
| 2026-04-15 10:25:18,087 - INFO - train_pipeline - Vocab size: 50265 | Special tokens: ['<s>', '</s>', '<unk>', '<pad>', '<mask>'] | |
| 2026-04-15 10:25:18,097 - INFO - train_pipeline - ===== End of Architecture Log ===== | |
| 2026-04-15 10:25:18,108 - INFO - train_pipeline - Base model weights frozen – only classifier head will be trained. | |
| 2026-04-15 10:25:19,118 - INFO - train_pipeline - === Starting training === | |
| 2026-04-15 10:25:16,900 - INFO - train_pipeline - Logging to ./taskA-codebert-base/training.log | |
| 2026-04-15 10:25:16,911 - INFO - train_pipeline - Loading model & tokenizer for 'microsoft/codebert-base' | |
| 2026-04-15 10:25:18,028 - INFO - train_pipeline - Model placed on cuda | |
| 2026-04-15 10:25:18,039 - INFO - train_pipeline - ===== Model Architecture ===== | |
| 2026-04-15 10:25:18,050 - INFO - train_pipeline - | |
| RobertaForSequenceClassification( | |
| (roberta): RobertaModel( | |
| (embeddings): RobertaEmbeddings( | |
| (word_embeddings): Embedding(50265, 768, padding_idx=1) | |
| (position_embeddings): Embedding(514, 768, padding_idx=1) | |
| (token_type_embeddings): Embedding(1, 768) | |
| (LayerNorm): LayerNorm((768,), eps=1e-05, elementwise_affine=True) | |
| (dropout): Dropout(p=0.1, inplace=False) | |
| ) | |
| (encoder): RobertaEncoder( | |
| (layer): ModuleList( | |
| (0-11): 12 x RobertaLayer( | |
| (attention): RobertaAttention( | |
| (self): RobertaSdpaSelfAttention( | |
| (query): Linear(in_features=768, out_features=768, bias=True) | |
| (key): Linear(in_features=768, out_features=768, bias=True) | |
| (value): Linear(in_features=768, out_features=768, bias=True) | |
| (dropout): Dropout(p=0.1, inplace=False) | |
| ) | |
| (output): RobertaSelfOutput( | |
| (dense): Linear(in_features=768, out_features=768, bias=True) | |
| (LayerNorm): LayerNorm((768,), eps=1e-05, elementwise_affine=True) | |
| (dropout): Dropout(p=0.1, inplace=False) | |
| ) | |
| ) | |
| (intermediate): RobertaIntermediate( | |
| (dense): Linear(in_features=768, out_features=3072, bias=True) | |
| (intermediate_act_fn): GELUActivation() | |
| ) | |
| (output): RobertaOutput( | |
| (dense): Linear(in_features=3072, out_features=768, bias=True) | |
| (LayerNorm): LayerNorm((768,), eps=1e-05, elementwise_affine=True) | |
| (dropout): Dropout(p=0.1, inplace=False) | |
| ) | |
| ) | |
| ) | |
| ) | |
| ) | |
| (classifier): RobertaClassificationHead( | |
| (dense): Linear(in_features=768, out_features=768, bias=True) | |
| (dropout): Dropout(p=0.1, inplace=False) | |
| (out_proj): Linear(in_features=768, out_features=2, bias=True) | |
| ) | |
| ) | |
| 2026-04-15 10:25:18,063 - INFO - train_pipeline - ===== Tokenizer Summary ===== | |
| 2026-04-15 10:25:18,087 - INFO - train_pipeline - Vocab size: 50265 | Special tokens: ['<s>', '</s>', '<unk>', '<pad>', '<mask>'] | |
| 2026-04-15 10:25:18,097 - INFO - train_pipeline - ===== End of Architecture Log ===== | |
| 2026-04-15 10:25:18,108 - INFO - train_pipeline - Base model weights frozen – only classifier head will be trained. | |
| 2026-04-15 10:25:19,118 - INFO - train_pipeline - === Starting training === | |
| 2026-04-15 10:25:16,900 - INFO - train_pipeline - Logging to ./taskA-codebert-base/training.log | |
| 2026-04-15 10:25:16,911 - INFO - train_pipeline - Loading model & tokenizer for 'microsoft/codebert-base' | |
| 2026-04-15 10:25:18,028 - INFO - train_pipeline - Model placed on cuda | |
| 2026-04-15 10:25:18,039 - INFO - train_pipeline - ===== Model Architecture ===== | |
| 2026-04-15 10:25:18,050 - INFO - train_pipeline - | |
| RobertaForSequenceClassification( | |
| (roberta): RobertaModel( | |
| (embeddings): RobertaEmbeddings( | |
| (word_embeddings): Embedding(50265, 768, padding_idx=1) | |
| (position_embeddings): Embedding(514, 768, padding_idx=1) | |
| (token_type_embeddings): Embedding(1, 768) | |
| (LayerNorm): LayerNorm((768,), eps=1e-05, elementwise_affine=True) | |
| (dropout): Dropout(p=0.1, inplace=False) | |
| ) | |
| (encoder): RobertaEncoder( | |
| (layer): ModuleList( | |
| (0-11): 12 x RobertaLayer( | |
| (attention): RobertaAttention( | |
| (self): RobertaSdpaSelfAttention( | |
| (query): Linear(in_features=768, out_features=768, bias=True) | |
| (key): Linear(in_features=768, out_features=768, bias=True) | |
| (value): Linear(in_features=768, out_features=768, bias=True) | |
| (dropout): Dropout(p=0.1, inplace=False) | |
| ) | |
| (output): RobertaSelfOutput( | |
| (dense): Linear(in_features=768, out_features=768, bias=True) | |
| (LayerNorm): LayerNorm((768,), eps=1e-05, elementwise_affine=True) | |
| (dropout): Dropout(p=0.1, inplace=False) | |
| ) | |
| ) | |
| (intermediate): RobertaIntermediate( | |
| (dense): Linear(in_features=768, out_features=3072, bias=True) | |
| (intermediate_act_fn): GELUActivation() | |
| ) | |
| (output): RobertaOutput( | |
| (dense): Linear(in_features=3072, out_features=768, bias=True) | |
| (LayerNorm): LayerNorm((768,), eps=1e-05, elementwise_affine=True) | |
| (dropout): Dropout(p=0.1, inplace=False) | |
| ) | |
| ) | |
| ) | |
| ) | |
| ) | |
| (classifier): RobertaClassificationHead( | |
| (dense): Linear(in_features=768, out_features=768, bias=True) | |
| (dropout): Dropout(p=0.1, inplace=False) | |
| (out_proj): Linear(in_features=768, out_features=2, bias=True) | |
| ) | |
| ) | |
| 2026-04-15 10:25:18,063 - INFO - train_pipeline - ===== Tokenizer Summary ===== | |
| 2026-04-15 10:25:18,087 - INFO - train_pipeline - Vocab size: 50265 | Special tokens: ['<s>', '</s>', '<unk>', '<pad>', '<mask>'] | |
| 2026-04-15 10:25:18,097 - INFO - train_pipeline - ===== End of Architecture Log ===== | |
| 2026-04-15 10:25:18,108 - INFO - train_pipeline - Base model weights frozen – only classifier head will be trained. | |
| 2026-04-15 10:25:19,118 - INFO - train_pipeline - === Starting training === | |