0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

ruri-v3-130mをJMTEBで測る

Last updated at Posted at 2025-04-23

日本語modernbert-ja-130mベースのruri-v3-130mがリリースされたので、JMTEBで評価してみた。python3.9のlinux環境だと、こんな感じ。

#! /bin/sh
model="cl-nagoya/ruri-v3-130m"
pip3.9 install sentence-transformers accelerate datasets jsonnet jsonargparse smart-open openai loguru tiktoken triton
test -d JMTEB || git clone --depth=1 https://github.com/sbintuitions/JMTEB
NAWK=nawk
if [ -x /usr/bin/gawk ]
then NAWK=/usr/bin/gawk
elif [ -x /usr/bin/mawk ]
then NAWK=/usr/bin/mawk
fi
find JMTEB/src -type f -print |
( while read F
  do T=`echo $F | sed 's?/src/?/src9/?'`
     mkdir -p `dirname $T`
     case $T in
     *.py) $NAWK '
{
  if(f!=1){
    if($0!~/__future__/){
      printf("from typing import Union\n");
      f=1;
    }
  }
  s=$0;
  while(match(s,/[A-Za-z]+(\[[A-Za-z ",]+\])?( \| [A-Za-z]+(\[[A-Za-z ",]+\])?)+/)>0){
    u=substr(s,RSTART,RLENGTH)
    gsub(/\|/,",",u);
    s=substr(s,1,RSTART-1)"Union["u"]"substr(s,RSTART+RLENGTH);
  }
  print s;
}' $F > $T ;;
     *) cp $F $T ;;
     esac
  done
)
( cd JMTEB/src9 && python3.9 -m jmteb --embedder SentenceBertEmbedder --embedder.model_name_or_path $model --save_dir ../../result/$model )
echo '***' $model
cat result/$model/summary.json
echo ''

NVIDIA A100-SXM4-40Bだと、約3時間半で以下の結果が出力された。

*** cl-nagoya/ruri-v3-130m
{
    "Classification": {
        "amazon_counterfactual_classification": {
            "macro_f1": 0.7790776469384886
        },
        "amazon_review_classification": {
            "macro_f1": 0.5959270853113815
        },
        "massive_intent_classification": {
            "macro_f1": 0.7968711078994167
        },
        "massive_scenario_classification": {
            "macro_f1": 0.8922123493432567
        }
    },
    "Reranking": {
        "esci": {
            "ndcg@10": 0.9321309125354799
        }
    },
    "Retrieval": {
        "jagovfaqs_22k": {
            "ndcg@10": 0.7095083666548581
        },
        "jaqket": {
            "ndcg@10": 0.6679233579709684
        },
        "mrtydi": {
            "ndcg@10": 0.40838348460420837
        },
        "nlp_journal_abs_intro": {
            "ndcg@10": 0.992308884308699
        },
        "nlp_journal_title_abs": {
            "ndcg@10": 0.9706622533924095
        },
        "nlp_journal_title_intro": {
            "ndcg@10": 0.9417008771497123
        }
    },
    "STS": {
        "jsick": {
            "spearman": 0.7465128160181561
        },
        "jsts": {
            "spearman": 0.8385564198643788
        }
    },
    "Clustering": {
        "livedoor_news": {
            "v_measure_score": 0.5688221984461402
        },
        "mewsc16": {
            "v_measure_score": 0.48905298349349013
        }
    },
    "PairClassification": {
        "paws_x_ja": {
            "binary_f1": 0.6225736879942487
        }
    }
}

2月19日の記事に較べると、Retrievalが非常に強化されている。他も良くなっており、RuriとModernBERTは、かなり相性がいいと言えるだろう。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?