Upload README.md with huggingface_hub
Browse files
README.md
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
language: en
|
| 3 |
+
tags:
|
| 4 |
+
- code
|
| 5 |
+
- algorithms
|
| 6 |
+
- competitive-programming
|
| 7 |
+
- multi-label-classification
|
| 8 |
+
- codebert
|
| 9 |
+
datasets:
|
| 10 |
+
- xCodeEval
|
| 11 |
+
metrics:
|
| 12 |
+
- f1
|
| 13 |
+
- precision
|
| 14 |
+
- recall
|
| 15 |
+
library_name: transformers
|
| 16 |
+
pipeline_tag: text-classification
|
| 17 |
+
---
|
| 18 |
+
|
| 19 |
+
# CodeBERT Algorithm Tagger
|
| 20 |
+
|
| 21 |
+
A fine-tuned CodeBERT model for multi-label classification of algorithmic problems from competitive programming platforms like Codeforces.
|
| 22 |
+
|
| 23 |
+
## Model Description
|
| 24 |
+
|
| 25 |
+
This model predicts algorithmic tags/categories for competitive programming problems based on their problem descriptions and solution code. It's fine-tuned from [microsoft/codebert-base](https://huggingface.co/microsoft/codebert-base).
|
| 26 |
+
|
| 27 |
+
**Supported Tags:**
|
| 28 |
+
- math
|
| 29 |
+
- graphs
|
| 30 |
+
- strings
|
| 31 |
+
- number theory
|
| 32 |
+
- trees
|
| 33 |
+
- geometry
|
| 34 |
+
- games
|
| 35 |
+
- probabilities
|
| 36 |
+
|
| 37 |
+
## Training Data
|
| 38 |
+
|
| 39 |
+
- **Dataset**: xCodeEval (Codeforces problems)
|
| 40 |
+
- **Training examples**: 2,147 problems (filtered for focus tags)
|
| 41 |
+
- **Test examples**: 531 problems
|
| 42 |
+
- **Source**: Problems and solutions from Codeforces platform
|
| 43 |
+
|
| 44 |
+
### Model Architecture
|
| 45 |
+
|
| 46 |
+
- **Input**: Concatenated problem description and solution code
|
| 47 |
+
- **Encoder**: CodeBERT (RoBERTa-based architecture)
|
| 48 |
+
- **Output**: 8-dimensional binary classification (one per tag)
|
| 49 |
+
|
| 50 |
+
## Usage
|
| 51 |
+
|
| 52 |
+
### Installation
|
| 53 |
+
|
| 54 |
+
```bash
|
| 55 |
+
pip install transformers torch
|
| 56 |
+
```
|
| 57 |
+
|