Text Classification
Transformers
Safetensors
code
roberta
clone-detection
graphcodebert
code-similarity
Eval Results (legacy)
text-embeddings-inference
Instructions to use thealper2/graphcodebert-code-clone-detection with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use thealper2/graphcodebert-code-clone-detection with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="thealper2/graphcodebert-code-clone-detection")# Load model directly from transformers import AutoTokenizer, GraphCodeBERTForCloneDetection tokenizer = AutoTokenizer.from_pretrained("thealper2/graphcodebert-code-clone-detection") model = GraphCodeBERTForCloneDetection.from_pretrained("thealper2/graphcodebert-code-clone-detection", device_map="auto") - Notebooks
- Google Colab
- Kaggle
File size: 1,474 Bytes
2ef4ea4 | 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 | {
"dataset_name": "PoolC/1-fold-clone-detection-600k-5fold",
"train_split": "train",
"heldout_split": "val",
"test_group_fraction": 0.5,
"max_train_samples": 50000,
"max_eval_samples": 20000,
"max_test_samples": 20000,
"balance_subsamples": true,
"model_name_or_path": "microsoft/graphcodebert-base",
"code_length": 512,
"data_flow_length": 128,
"attn_implementation": "sdpa",
"learning_rate": 2e-05,
"num_train_epochs": 3.0,
"per_device_train_batch_size": 16,
"per_device_eval_batch_size": 32,
"gradient_accumulation_steps": 1,
"weight_decay": 0.01,
"warmup_ratio": 0.1,
"max_grad_norm": 1.0,
"fp16": true,
"bf16": false,
"gradient_checkpointing": false,
"optim": "adamw_torch",
"lr_scheduler_type": "linear",
"class_weighting": "auto",
"class_weight_threshold": 0.6,
"eval_strategy": "steps",
"eval_steps": 1000,
"save_strategy": "steps",
"save_steps": 1000,
"save_total_limit": 2,
"logging_steps": 100,
"metric_for_best_model": "f1",
"greater_is_better": true,
"load_best_model_at_end": true,
"seed": 42,
"full_determinism": false,
"dataloader_num_workers": 4,
"preprocessing_num_workers": 8,
"output_dir": "./outputs",
"model_dir": "./models/graphcodebert-clone-detection",
"logging_dir": "./logs",
"cache_dir": "./outputs/feature_cache",
"report_to": "none",
"run_sanity_check": true,
"sanity_check_samples": 64,
"total_sequence_length": 640,
"effective_batch_size": 16
} |