Update README.md
Browse files
README.md
CHANGED
|
@@ -85,18 +85,18 @@ CodeBERT、GraphCodeBERT、既存の ModernBERT-base を上回る性能を示し
|
|
| 85 |
| GraphCodeBERT-base | 0.9422 | 0.8009 | **0.7466** | 0.8434 | 0.8852 | **0.8095** | 0.8379 |
|
| 86 |
| UniXCoder-base | 0.8810 | 0.8369 | 0.7137 | 0.8185 | 0.8733 | 0.7496 | 0.8122 |
|
| 87 |
| ModernBERT-base | 0.9364 | 0.7749 | 0.7475 | 0.8347 | 0.8922 | 0.7866 | 0.8287 |
|
| 88 |
-
| Owl-
|
| 89 |
-
| Owl-
|
| 90 |
-
| **Owl-
|
| 91 |
-
| Owl-
|
| 92 |
|
| 93 |
-
また各学習率の最良のモデルは以下のようになりました。各学習率全てのパターンにおいても低い学習率で学習したOwl-
|
| 94 |
| 学習率 | 最良モデル | 平均MRR | 備考 |
|
| 95 |
| :------: | :-------------------- | :--------: | :----------------------------- |
|
| 96 |
| 5e-5 | GraphCodeBERT | 0.8429 | 高学習率条件での最良結果 |
|
| 97 |
| 3e-5 | ModernBERT-base | 0.8404 | GraphCodeBERTとほぼ同等 |
|
| 98 |
-
| **1e-5** | **Owl-
|
| 99 |
-
| 1e-5 | Owl-
|
| 100 |
|
| 101 |
|
| 102 |
---
|
|
@@ -135,15 +135,15 @@ CodeBERT、GraphCodeBERT、既存の ModernBERT-base を上回る性能を示し
|
|
| 135 |
```python
|
| 136 |
from transformers import AutoTokenizer, AutoModelForMaskedLM
|
| 137 |
#MLMモデルとして読み込む場合
|
| 138 |
-
tokenizer = AutoTokenizer.from_pretrained("Shuu12121/
|
| 139 |
-
model = AutoModelForMaskedLM.from_pretrained("Shuu12121/
|
| 140 |
```
|
| 141 |
Sentence-Transformersを用いてファインチューニングを行う場合の読み込み方
|
| 142 |
```python
|
| 143 |
from sentence_transformers import SentenceTransformer,models
|
| 144 |
|
| 145 |
-
word_embedding_model = models.Transformer("Shuu12121/
|
| 146 |
-
word_embedding_model.max_seq_length =
|
| 147 |
#CLSトークンを用いる場合pooling_mode_cls_tokenのみTrue
|
| 148 |
#平均プーリングを用いる場合 pooling_mode_mean_tokensのみTrue
|
| 149 |
pooling_model = models.Pooling(
|
|
@@ -158,6 +158,6 @@ model = SentenceTransformer(modules=[word_embedding_model, pooling_model])
|
|
| 158 |
```
|
| 159 |
|
| 160 |
そのほかのモデル
|
| 161 |
-
- [Owl-ph1-base (512)](https://huggingface.co/Shuu12121/
|
| 162 |
-
- [Owl-ph2-base (512)](https://huggingface.co/Shuu12121/
|
| 163 |
-
- [Owl-ph1-base (2048)](https://huggingface.co/Shuu12121/
|
|
|
|
| 85 |
| GraphCodeBERT-base | 0.9422 | 0.8009 | **0.7466** | 0.8434 | 0.8852 | **0.8095** | 0.8379 |
|
| 86 |
| UniXCoder-base | 0.8810 | 0.8369 | 0.7137 | 0.8185 | 0.8733 | 0.7496 | 0.8122 |
|
| 87 |
| ModernBERT-base | 0.9364 | 0.7749 | 0.7475 | 0.8347 | 0.8922 | 0.7866 | 0.8287 |
|
| 88 |
+
| Owl-ph1-base-len512 | 0.9383 | 0.8062 | 0.7307 | 0.8369 | 0.8845 | 0.7725 | 0.8282 |
|
| 89 |
+
| Owl-ph1-base-len2048 | 0.9323 | 0.8093 | 0.7231 | 0.8373 | 0.8891 | 0.7669 | 0.8263 |
|
| 90 |
+
| **Owl-ph2-base-len512** | **0.9447** | **0.8399** | 0.7426 | 0.8400 | 0.9044 | 0.7998 | **0.8452** |
|
| 91 |
+
| Owl-ph2-base-len2048 | 0.9370 | 0.8368 | 0.7435 | **0.8435** | **0.9076** | 0.7964 | 0.8441 |
|
| 92 |
|
| 93 |
+
また各学習率の最良のモデルは以下のようになりました。各学習率全てのパターンにおいても低い学習率で学習したOwl-ph2-base群が最も性能が高いことが確認されました。
|
| 94 |
| 学習率 | 最良モデル | 平均MRR | 備考 |
|
| 95 |
| :------: | :-------------------- | :--------: | :----------------------------- |
|
| 96 |
| 5e-5 | GraphCodeBERT | 0.8429 | 高学習率条件での最良結果 |
|
| 97 |
| 3e-5 | ModernBERT-base | 0.8404 | GraphCodeBERTとほぼ同等 |
|
| 98 |
+
| **1e-5** | **Owl-ph2-base-len512** | **0.8452** | **全条件中で最良** |
|
| 99 |
+
| 1e-5 | Owl-ph2-base-len2048 | 0.8441 | 5e-5 / 3e-5 の最良値を上回る |
|
| 100 |
|
| 101 |
|
| 102 |
---
|
|
|
|
| 135 |
```python
|
| 136 |
from transformers import AutoTokenizer, AutoModelForMaskedLM
|
| 137 |
#MLMモデルとして読み込む場合
|
| 138 |
+
tokenizer = AutoTokenizer.from_pretrained("Shuu12121/Owl-ph2-base-len2048")
|
| 139 |
+
model = AutoModelForMaskedLM.from_pretrained("Shuu12121/Owl-ph2-base-len2048")
|
| 140 |
```
|
| 141 |
Sentence-Transformersを用いてファインチューニングを行う場合の読み込み方
|
| 142 |
```python
|
| 143 |
from sentence_transformers import SentenceTransformer,models
|
| 144 |
|
| 145 |
+
word_embedding_model = models.Transformer("Shuu12121/Owl-ph2-base-len2048")
|
| 146 |
+
word_embedding_model.max_seq_length = 2048
|
| 147 |
#CLSトークンを用いる場合pooling_mode_cls_tokenのみTrue
|
| 148 |
#平均プーリングを用いる場合 pooling_mode_mean_tokensのみTrue
|
| 149 |
pooling_model = models.Pooling(
|
|
|
|
| 158 |
```
|
| 159 |
|
| 160 |
そのほかのモデル
|
| 161 |
+
- [Owl-ph1-base (512)](https://huggingface.co/Shuu12121/Owl-ph1-base-len512)
|
| 162 |
+
- [Owl-ph2-base (512)](https://huggingface.co/Shuu12121/Owl-ph2-base-len512)
|
| 163 |
+
- [Owl-ph1-base (2048)](https://huggingface.co/Shuu12121/Owl-ph1-base-len2048)
|