Shuu12121 / CodeModernBERT-Crow

huggingface.co
Total runs: 4
24-hour runs: 0
7-day runs: 0
30-day runs: -1
Model's Last Updated: May 04 2025

Introduction of CodeModernBERT-Crow

Model Details of CodeModernBERT-Crow

CodeModernBERT-Crow 🐦‍⬛

High-performance encoder for multilingual code search and understanding
開発者: Shuu12121
License: Apache-2.0


🔍 概要 / Overview

CodeModernBERT-Crow は、関数レベルのコード理解およびコード検索に特化したエンコーダモデルです。
ベースには ModernBERT を採用し、長文コードへの高いスケーラビリティを持ちます。

This model is designed for efficient and accurate function-level code retrieval across multiple programming languages, extending ModernBERT for code intelligence tasks.


🌟 特徴 / Key Features
  • 対応言語:Python, Java, JavaScript, PHP, Ruby, Go, Rust
  • 重複除去済みの高品質データセットを使用(CodeSearchNet の test split 除外済)
  • CodeModernBERT-Crow-Pre から継続学習により高性能を実現
  • 最大 8192 トークンの入力長に対応(学習時は 2048 トークンで調整)

📐 モデル仕様 / Model Architecture
パラメータ / Parameter 値 / Value
vocab_size 50,004
hidden_size 768
num_hidden_layers 12
num_attention_heads 12
intermediate_size 3,072
max_position_embeddings 8,192
rotary_embedding (RoPE) 160,000
local_attention_rope_theta 10,000
dropout 0.0

🧪 評価結果 / Evaluation

CodeSearchNet Test Split(MRR@100)に基づいた比較評価:

モデル / Model Python Java JavaScript PHP Ruby Go
CodeModernBERT-Crow 0.9372 0.8642 0.8118 0.8388 0.8392 0.8522
CodeModernBERT-Crow-Pre 0.5279 0.4718 0.3282 0.4236 0.3014 0.6390
CodeBERT-base (Microsoft) 0.1513 0.1016 0.0908 0.0921 0.0850 0.0943
GraphCodeBERT-base (Microsoft) 0.5686 0.5450 0.4485 0.5261 0.5571 0.4226
CodeBERTa-small-v1 (Hugging Face) 0.7383 0.5875 0.4476 0.5748 0.5252 0.5995
CodeT5p-220M-bimodal (Salesforce) 0.8013 0.7853 0.7101 0.7895 0.7130 0.7547

評価方法:100件の候補からランク付け(固定評価スクリプト使用)


🚀 使用方法 / How to Use
from transformers import AutoTokenizer, AutoModel

tokenizer = AutoTokenizer.from_pretrained("Shuu12121/CodeModernBERT-Crow")
model = AutoModel.from_pretrained("Shuu12121/CodeModernBERT-Crow")
コード埋め込みを取得する関数:
import torch

def get_embedding(text, model, tokenizer, device="cuda"):
    inputs = tokenizer(text, return_tensors="pt", truncation=True, max_length=256)
    if "token_type_ids" in inputs:
        inputs.pop("token_type_ids")
    inputs = {k: v.to(device) for k, v in inputs.items()}
    with torch.no_grad():
        outputs = model(**inputs)
        return outputs.last_hidden_state[:, 0, :]

🤝 関連モデル / Related Models

📬 お問い合わせ / Contact

質問・提案などは以下のメールアドレスへお気軽にご連絡ください:
📧 [email protected]

Runs of Shuu12121 CodeModernBERT-Crow on huggingface.co

4
Total runs
0
24-hour runs
0
3-day runs
0
7-day runs
-1
30-day runs

More Information About CodeModernBERT-Crow huggingface.co Model

More CodeModernBERT-Crow license Visit here:

https://choosealicense.com/licenses/apache-2.0

CodeModernBERT-Crow huggingface.co

CodeModernBERT-Crow huggingface.co is an AI model on huggingface.co that provides CodeModernBERT-Crow's model effect (), which can be used instantly with this Shuu12121 CodeModernBERT-Crow model. huggingface.co supports a free trial of the CodeModernBERT-Crow model, and also provides paid use of the CodeModernBERT-Crow. Support call CodeModernBERT-Crow model through api, including Node.js, Python, http.

CodeModernBERT-Crow huggingface.co Url

https://huggingface.co/Shuu12121/CodeModernBERT-Crow

Shuu12121 CodeModernBERT-Crow online free

CodeModernBERT-Crow huggingface.co is an online trial and call api platform, which integrates CodeModernBERT-Crow's modeling effects, including api services, and provides a free online trial of CodeModernBERT-Crow, you can try CodeModernBERT-Crow online for free by clicking the link below.

Shuu12121 CodeModernBERT-Crow online free url in huggingface.co:

https://huggingface.co/Shuu12121/CodeModernBERT-Crow

CodeModernBERT-Crow install

CodeModernBERT-Crow is an open source model from GitHub that offers a free installation service, and any user can find CodeModernBERT-Crow on GitHub to install. At the same time, huggingface.co provides the effect of CodeModernBERT-Crow install, users can directly use CodeModernBERT-Crow installed effect in huggingface.co for debugging and trial. It also supports api for free installation.

CodeModernBERT-Crow install url in huggingface.co:

https://huggingface.co/Shuu12121/CodeModernBERT-Crow

Url of CodeModernBERT-Crow

CodeModernBERT-Crow huggingface.co Url

Provider of CodeModernBERT-Crow huggingface.co

Shuu12121
ORGANIZATIONS

Other API from Shuu12121