CoolFace
Modelpublic

Shuu12121/CodeModernBERT-Finch

sourceHugging Faceapache-2.0updated 1y agoView on Hugging Face
0likes17downloads
Model Card

CodeModernBERT-Finch

This model is a code-specific pretrained model created solely using the CodeSearchNet dataset. It supports six languages included in CodeSearchNet.\ For a version fine-tuned specifically for code search tasks, please refer to Shuu12121/CodeSearch-ModernBERT-Finch.

Architecture

  • Base: ModernBERT-style encoder
  • Hidden size: 512
  • Layers: 6
  • Attention heads: 6
  • Parameters: \~50M
  • Pretraining: Masked Language Modeling (MLM)
  • Fine-tuning: Domain-specific code tasks

The results below were obtained by randomly sampling 10,000 examples per language from the CodeSearchNet dataset, training them in a Sentence-BERT fashion, and evaluating on the MTEB CodeSearchNetRetrieval benchmark. All models listed in the table below were fine-tuned using the same approach. Those marked with 200 and the Finch models were trained with a Multiple Negatives Ranking Loss batch size of 200. Others were trained with a batch size of 40 (because larger batches could not fit into memory).\ Finch-SmallBatch was trained with a smaller batch size of 40 to create a comparison model against the standard Finch models trained with batch size 200.

Modelgojavajavascriptphppythonruby
Finch(40M)0.9340.7840.7280.8350.8650.756
Finch-Pre(40M)0.9370.7050.6850.8280.8430.725
Finch-SmallBatch(40M)0.9300.7650.7070.8250.8590.748
ModernBERT-base-Finetuned(149M)0.9330.7790.7480.8390.8850.794
Owl-4.1-Small-Fine-tuned(151M)0.9420.7800.7290.8430.8930.772
Owl-4.1-Small-Fine-tuned-200(151M)0.9430.8500.7470.8580.8940.802
CodeBERT-Fine-tuned(125M)0.9320.7080.7090.8280.8700.772