ONNX Model Zoo

onnx-community/codebert-base-ONNX

By onnx-community · ↓ 98 · ♥ 0 · Updated 2025-11-21

What's in this repo

This page lists the files in onnx-community/codebert-base-ONNX, including model.onnx, model_bnb4.onnx, model_fp16.onnx and more.

  • 8 ONNX models (.onnx files)
  • 17 files, including 8 .onnx, 6 .json, 1 .md, 1 .txt
  • Last updated 2025-11-21

ONNX files

File Size Download
onnx/model.onnx — Download
onnx/model_bnb4.onnx — Download
onnx/model_fp16.onnx — Download
onnx/model_int8.onnx — Download
onnx/model_q4.onnx — Download
onnx/model_q4f16.onnx — Download
onnx/model_quantized.onnx — Download
onnx/model_uint8.onnx — Download

How to use

These ONNX files can be loaded with ONNX Runtime. To inspect a model graph, upload the file to the Netron viewer. Download links point to the original files on Hugging Face.

README

codebert-base (ONNX)

This is an ONNX version of microsoft/codebert-base. It was automatically converted and uploaded using this Hugging Face Space.

Usage with Transformers.js

See the pipeline documentation for feature-extraction: https://huggingface.co/docs/transformers.js/api/pipelines#module_pipelines.FeatureExtractionPipeline


CodeBERT-base

Pretrained weights for CodeBERT: A Pre-Trained Model for Programming and Natural Languages.

Training Data

The model is trained on bi-modal data (documents & code) of CodeSearchNet

Training Objective

This model is initialized with Roberta-base and trained with MLM+RTD objective (cf. the paper).

Usage

Please see the official repository for scripts that support "code search" and "code-to-document generation".

Reference

  1. CodeBERT trained with Masked LM objective (suitable for code completion)
  2. 🤗 Hugging Face's CodeBERTa (small size, 6 layers)

Citation

@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}
}

Model info

feature-extraction transformers.js
transformers.js onnx roberta feature-extraction arxiv:2002.08155 base_model:microsoft/codebert-base base_model:quantized:microsoft/codebert-base region:us
↓ 98 ♥ 0

Created: 2025-11-21

Updated: 2025-11-21

View on Hugging Face

Files (17)

.gitattributes
README.md
config.json
merges.txt
onnx/model.onnx ONNX
onnx/model_bnb4.onnx ONNX
onnx/model_fp16.onnx ONNX
onnx/model_int8.onnx ONNX
onnx/model_q4.onnx ONNX
onnx/model_q4f16.onnx ONNX
onnx/model_quantized.onnx ONNX
onnx/model_uint8.onnx ONNX
quantize_config.json
special_tokens_map.json
tokenizer.json
tokenizer_config.json
vocab.json

Related models