CodeMorph-ModernBERT
is a cutting-edge model specialized in code search and code understanding tasks.
It supports a
maximum sequence length of 2048 tokens
(compared to Microsoft's 512 tokens), and it delivers exceptional performance, especially for Python code search.
Key Features
Long Sequence Support
Capable of processing sequences up to 2048 tokens. This allows it to handle long code snippets and complex functions.
High Code Search Accuracy
Utilizes a SentencePiece-based tokenizer, developed for six languages including Python, achieving significantly better search precision than previous models.
Purpose-Built Training
Trained from scratch on the CodeSearchNet dataset, enabling deep understanding of code syntax and the relationship with comments.
CodeMorph-ModernBERT
is a pre-trained model specifically designed for code search and code understanding tasks. This model has been trained from scratch using the
code-search-net/code_search_net
dataset to enhance semantic comprehension of code.
This model has been trained using the
code-search-net/code_search_net
dataset, which contains code snippets from multiple programming languages (Python, Java, JavaScript, etc.), making it highly suitable for code search tasks.
Evaluation Results
The model was evaluated using the Python subset of the
code_x_glue_ct_code_to_text
dataset. Below are the key evaluation metrics:
For more details on the experiment, refer to
this link
.
Metric
Score
MRR
(Mean Reciprocal Rank)
0.8172
MAP
(Mean Average Precision)
0.8172
R-Precision
0.7501
Recall@10
0.9389
Precision@10
0.8143
NDCG@10
0.8445
F1@10
0.8423
Comparison with Other Models
The table below compares CodeMorph-ModernBERT with other leading code search models:
Model
MRR
MAP
R-Precision
CodeMorph-ModernBERT
0.8172
0.8172
0.7501
microsoft/graphcodebert-base
0.5482
0.5482
0.4458
microsoft/codebert-base-mlm
0.5243
0.5243
0.4378
Salesforce/codet5p-220m-py
0.7512
0.7512
0.6617
Salesforce/codet5-large-ntp-py
0.7846
0.7846
0.7067
Shuu12121/CodeMorph-BERT
0.6851
0.6851
0.5934
Shuu12121/CodeMorph-BERTv2
0.6535
0.6535
0.5543
CodeMorph-ModernBERT achieves significantly higher search accuracy compared to other CodeBERT and CodeT5 models.
License
This model is released under the
Apache-2.0
license.
CodeMorph-ModernBERT huggingface.co is an AI model on huggingface.co that provides CodeMorph-ModernBERT's model effect (), which can be used instantly with this Shuu12121 CodeMorph-ModernBERT model. huggingface.co supports a free trial of the CodeMorph-ModernBERT model, and also provides paid use of the CodeMorph-ModernBERT. Support call CodeMorph-ModernBERT model through api, including Node.js, Python, http.
CodeMorph-ModernBERT huggingface.co is an online trial and call api platform, which integrates CodeMorph-ModernBERT's modeling effects, including api services, and provides a free online trial of CodeMorph-ModernBERT, you can try CodeMorph-ModernBERT online for free by clicking the link below.
Shuu12121 CodeMorph-ModernBERT online free url in huggingface.co:
CodeMorph-ModernBERT is an open source model from GitHub that offers a free installation service, and any user can find CodeMorph-ModernBERT on GitHub to install. At the same time, huggingface.co provides the effect of CodeMorph-ModernBERT install, users can directly use CodeMorph-ModernBERT installed effect in huggingface.co for debugging and trial. It also supports api for free installation.
CodeMorph-ModernBERT install url in huggingface.co: