CodeBERT: A Pre-Trained Model for Programming and Natural Languages
Paper β’ 2002.08155 β’ Published β’ 2
Run microsoft/codebert-base on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Use HF Jobs to fine-tune https://huggingface.co/microsoft/codebert-base. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Use HF Jobs to run batch inference with https://huggingface.co/microsoft/codebert-base on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
How to use microsoft/codebert-base with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("feature-extraction", model="microsoft/codebert-base") # pip install -U transformers accelerate
# Load model directly
from transformers import AutoTokenizer, AutoModel
tokenizer = AutoTokenizer.from_pretrained("microsoft/codebert-base")
model = AutoModel.from_pretrained("microsoft/codebert-base", device_map="auto")YAML Metadata Warning:empty or missing yaml metadata in repo card
Check out the documentation for more information.
Pretrained weights for CodeBERT: A Pre-Trained Model for Programming and Natural Languages.
The model is trained on bi-modal data (documents & code) of CodeSearchNet
This model is initialized with Roberta-base and trained with MLM+RTD objective (cf. the paper).
Please see the official repository for scripts that support "code search" and "code-to-document generation".
@misc{feng2020codebert,
title={CodeBERT: A Pre-Trained Model for Programming and Natural Languages},
author={Zhangyin Feng and Daya Guo and Duyu Tang and Nan Duan and Xiaocheng Feng and Ming Gong and Linjun Shou and Bing Qin and Ting Liu and Daxin Jiang and Ming Zhou},
year={2020},
eprint={2002.08155},
archivePrefix={arXiv},
primaryClass={cs.CL}
}