Model reference · open weights

codebert

codebert is an open-weight embedding model from microsoft, listed in the AxForge catalogue. AxForge can bring it up on EU-owned hardware for you on request — with the licence handled where one is required.

Licence fee required Embeddings microsoft 1 variants 202k downloads/mo
Request a licence + hosting quote All served models Not on the shared API today — deployed on request.

About

What codebert is

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

Summarised from the published model card. Read the full card on the HuggingFace links below.

Specifications

What it is

Makermicrosoft
TypeEmbedding models
Variants1
Runs withtransformers
Released2022-03-02
Popularity202k downloads / month
Likes287
LicenceCommercial licence needed

How it works

How embedding models work

Your textsentence / documentEncodermaps meaningVectorlist of numbersAn embedding model turns text into a vector, so similar meanings sit close together — the basis of search and RAG.

Variants

Sizes & precisions

Open weights ship in several sizes and precisions. One page, all the variants — pick the one that fits your GPU. VRAM figures are estimates from model size.

VariantParamsPrecisionVRAMFits 16 GBWeights
codebert-baseBF16Weights ↗

Using it via the API

Call it like any OpenAI endpoint

Once AxForge deploys codebert for you, it answers on the OpenAI-compatible API — the same base URL and keys as every other model. (codebert below is illustrative; you get the exact model name on deployment.)

$ curl -sS https://api.axforge.ai/v1/embeddings \
  -H "Authorization: Bearer $AXFORGE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"codebert","input":"text to embed"}'

Details

Languages, data & research

Tags

transformers pytorch tf jax rust roberta feature-extraction endpoints_compatible deploy:azure

Papers

Licence

Commercial licence needed

The weights are open but its licence needs a commercial agreement for business use. AxForge can arrange that licence and host the model for you — you pay AxForge, we settle with the model’s maker. Ask us for a quote. Read the licence ↗

Sources

Weights & code

Want codebert on EU-owned hardware?

Request a licence + hosting quote See what’s served now

Explore

More embedding models

© 2026 AxForge · EU-hosted AI infrastructure Pricing Docs Trust Privacy Terms