Text Classification
Transformers
Safetensors
roberta
code
programming-language-identification
text-embeddings-inference
Instructions to use pecan-anon/codebert-pecan with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use pecan-anon/codebert-pecan with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="pecan-anon/codebert-pecan")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("pecan-anon/codebert-pecan") model = AutoModelForSequenceClassification.from_pretrained("pecan-anon/codebert-pecan", device_map="auto") - Notebooks
- Google Colab
- Kaggle
File size: 430 Bytes
1e2a7d1 | 1 2 3 4 5 6 7 8 9 10 11 12 | ---
library_name: transformers
pipeline_tag: text-classification
base_model: microsoft/codebert-base
license: mit
---
# CodeBERT-PECAN
microsoft/codebert-base fine-tuned on the PECAN benchmark to identify the programming language of a raw
512-byte code fragment (319 languages, no file name or extension).
Test split: accuracy 0.9575, macro-F1 0.9304. Artifact and scoring code: https://anonymous.4open.science/r/pecan-benchmark
|