Team Ai
Modelpublic

Shuu12121/CodeSearch-ModernBERT-Owl-Plus

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

๐Ÿฆ‰ CodeSearch-ModernBERT-Owl-Plus: High-Performance Sentence-BERT for Code Search

CodeSearch-ModernBERT-Owl-Plus is a high-performance code search model fine-tuned in a Sentence-BERT architecture, based on the pretrained CodeModernBERT-Owl v1.0.

This model is optimized for function-level search within codebases and natural language queries, achieving state-of-the-art results on the MTEB benchmark.


๐Ÿ›  Features

  • โ€”โœ… Fine-tuned in Sentence-BERT format from CodeModernBERT-Owl
  • โ€”โœ… Supports multiple languages (Python, Java, JavaScript, etc.)
  • โ€”โœ… Specialized encoder for high-accuracy code search
  • โ€”โœ… Ideal for multi-stage (dual encoder) retrieval setups
  • โ€”โœ… Generates rich semantic embeddings for code and queries

๐Ÿ“Š Evaluation on MTEB Benchmark

๐Ÿ† Main Scores in MTEB

This model achieved the following main scores (based on NDCG\@10):

  • โ€”CodeSearchNetRetrieval: main_score = 0.8918
  • โ€”COIR-CodeSearchNetRetrieval: main_score = 0.8013

๐Ÿงช CodeSearchNetRetrieval (MTEB)

MetricScore
MRR\@100.8704
NDCG\@100.8918
MAP\@100.8704
Recall\@100.9563
Precision\@100.0956

This model achieves strong performance across all ranking metrics and demonstrates balanced retrieval capability.


๐Ÿงช COIR-CodeSearchNetRetrieval (MTEB)

MetricScore
MRR\@100.7751
NDCG\@100.8013
MAP\@100.7751
Recall\@100.8826
Precision\@100.0883

Robust and consistent performance is also maintained on the COIR dataset, demonstrating strong generalization.


๐Ÿ“ฅ Usage Example

python
from sentence_transformers import SentenceTransformer

model = SentenceTransformer("Shuu12121/CodeSearch-ModernBERT-Owl-Plus")
embeddings = model.encode(["binary search function", "def binary_search(arr, target): ..."])

๐Ÿ“ Conclusion

  • โ€”โœ… An optimized Sentence-BERT model based on CodeModernBERT-Owl
  • โ€”โœ… Achieves MRR\@10 > 0.87 on MTEB CodeSearchNetRetrieval
  • โ€”โœ… Ready for integration in production-level code search systems

๐Ÿ“œ License

๐Ÿ“„ Apache-2.0

๐Ÿ“ง Contact

For questions or inquiries, feel free to reach out: ๐Ÿ“ง [shun0212114@outlook.jp](mailto:shun0212114@outlook.jp)