Shuu12121 / CodeMorph-BERT

huggingface.co
Total runs: 188
24-hour runs: 0
7-day runs: 0
30-day runs: 0
Model's Last Updated: February 12 2025
fill-mask

Introduction of CodeMorph-BERT

Model Details of CodeMorph-BERT

CodeMorph-BERT

CodeMorph-BERT は、CodeSearchNet の Python コードデータを用いて ゼロから 訓練した CodeBERT モデルです。
コード補完、関数名予測、マスクされたトークンの予測に最適化されています。


🔗 Colab で試す

Use on Colab
📌 このモデルの詳細な使い方や実行手順は、こちらの Jupyter Notebook で確認できます。


モデルの詳細
  • ベースモデル : なし(ゼロから CodeBERT を学習)
  • データセット : CodeSearchNet (Python サブセット)
  • トレーニング目的 : Masked Language Modeling (MLM)
  • トークナイザー : WordPiece トークナイザー(Python コード向けに訓練)

💡 使用方法
Hugging Face Transformers を用いた推論

CodeMorph-BERT は transformers ライブラリで簡単に使用できます。

from transformers import AutoModelForMaskedLM, AutoTokenizer
import torch

# モデルとトークナイザーのロード
model_name = "Shuu12121/CodeMorph-BERT"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForMaskedLM.from_pretrained(model_name)

# 入力コード([MASK] を含む)
text = "def add(a, b): return a [MASK] b"

# トークナイズ
inputs = tokenizer(text, return_tensors="pt")

# 推論実行
with torch.no_grad():
    outputs = model(**inputs)
    logits = outputs.logits

# マスク位置のトークンを予測
mask_token_index = torch.where(inputs.input_ids == tokenizer.mask_token_id)[1]
predicted_token_id = logits[0, mask_token_index, :].argmax(axis=-1)
predicted_token = tokenizer.decode(predicted_token_id)

print("予測されたトークン:", predicted_token)

Runs of Shuu12121 CodeMorph-BERT on huggingface.co

188
Total runs
0
24-hour runs
0
3-day runs
0
7-day runs
0
30-day runs

More Information About CodeMorph-BERT huggingface.co Model

More CodeMorph-BERT license Visit here:

https://choosealicense.com/licenses/mit

CodeMorph-BERT huggingface.co

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

CodeMorph-BERT huggingface.co Url

https://huggingface.co/Shuu12121/CodeMorph-BERT

Shuu12121 CodeMorph-BERT online free

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

Shuu12121 CodeMorph-BERT online free url in huggingface.co:

https://huggingface.co/Shuu12121/CodeMorph-BERT

CodeMorph-BERT install

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

CodeMorph-BERT install url in huggingface.co:

https://huggingface.co/Shuu12121/CodeMorph-BERT

Url of CodeMorph-BERT

CodeMorph-BERT huggingface.co Url

Provider of CodeMorph-BERT huggingface.co

Shuu12121
ORGANIZATIONS

Other API from Shuu12121