{"id":1096,"date":"2024-06-30T17:15:00","date_gmt":"2024-06-30T08:15:00","guid":{"rendered":"https:\/\/staka.jp\/wordpress\/?p=1096"},"modified":"2024-06-30T17:15:00","modified_gmt":"2024-06-30T08:15:00","slug":"gemma-2-9b%e3%81%ae%e6%a9%9f%e6%a2%b0%e7%bf%bb%e8%a8%b3%e6%80%a7%e8%83%bd","status":"publish","type":"post","link":"https:\/\/staka.jp\/wordpress\/?p=1096","title":{"rendered":"Gemma 2 9B\u306e\u6a5f\u68b0\u7ffb\u8a33\u6027\u80fd"},"content":{"rendered":"\n<p>Google\u304b\u3089Gemma2\u304c\u30ea\u30ea\u30fc\u30b9\u3055\u308c\u305f[1]\u30029B[2]\u306827B\u304c\u516c\u958b\u3055\u308c\u3066\u3044\u308b\u3002Llama3\u3092\u8d85\u3048\u308b\u6027\u80fd\u3068\u306e\u3053\u3068\u3067\u691c\u8a3c\u3057\u3066\u307f\u305f\u3002\u6027\u80fd\u8a55\u4fa1\u306b\u4f7f\u7528\u3057\u305f\u30c7\u30fc\u30bf\u306f\u4ee5\u524d\uff08<a href=\"https:\/\/staka.jp\/wordpress\/?p=959\">DAMO PolyLM-13B\u306e\u6a5f\u68b0\u7ffb\u8a33\u6027\u80fd | \u3077\u308b\u30fc\u3075\u304a\u3076\u3053\u3093\u305b\u3077\u3068 (staka.jp)<\/a>\uff09\u3068\u540c\u3058\u3002\u691c\u8a3c\u74b0\u5883\u306f\u74b0\u5883\u306fColab Pro+\u3092\u7528\u3044\u305f\u3002 \u91cf\u5b50\u5316\u306b\u3088\u3063\u3066\u6027\u80fd\u304c\u5909\u308f\u308b\u3068\u3044\u3046\u8a71\u3082\u3042\u308a\u3001\u91cf\u5b50\u5316\u65b9\u91dd\u3092\u5909\u3048\u3066\u5b9f\u9a13\u3057\u3066\u3044\u308b\u3002<\/p>\n\n\n\n<p>Gemma2\u306f\u56de\u7b54\u306b\u4f59\u8a08\u306a\u30c8\u30fc\u30af\u30f3\u304c\u5165\u308b\u3053\u3068\u304c\u5c11\u306a\u304f[3]\u3001\u672c\u4ef6\u306e\u691c\u8a3c\u3067\u306fGPT-4o\u3092\u7528\u3044\u305f\u56de\u7b54\u62bd\u51fa\u306f\u884c\u3063\u3066\u3044\u306a\u3044\u3002\u8a55\u4fa1\u6307\u6a19\u306fBLEU\u3001\u4f7f\u7528\u3057\u305f\u30c4\u30fc\u30eb\u3084tokenizer\u306f\u4ee5\u524d\u3068\u540c\u3058\uff08sacrebleu \u2013tokenize ja-mecab\uff09\u3067\u3042\u308b\u3002\u300c0 shot\u300d\u3068\u300c1 shot\u300d\u306e\u6bd4\u8f03\u3067ICL\u3084RAG\u306a\u3069\u30d7\u30ed\u30f3\u30d7\u30c8\u5185\u306b\u30c7\u30fc\u30bf\u3092\u4e0e\u3048\u305f\u6642\u306e\u6027\u80fd\u3092\u30b6\u30c3\u30af\u30ea\u3068\u307f\u308b\u4e8b\u304c\u3067\u304d\u308b\u3002\u3044\u3064\u3082\u306e\u901a\u308a\u975e\u5e38\u306b\u9650\u5b9a\u3055\u308c\u305f\u6a5f\u68b0\u7ffb\u8a33\u30d9\u30f3\u30c1\u30de\u30fc\u30af\u3067\u3042\u308b\u3053\u3068\u306b\u6ce8\u610f\u304c\u5fc5\u8981\u3067\u3042\u308b\u3002<\/p>\n\n\n\n<figure class=\"wp-block-table is-style-stripes\"><table><tbody><tr><td>\u30e2\u30c7\u30eb\u3068\u91cf\u5b50\u5316<\/td><td>0 shot<\/td><td>1 shot<\/td><\/tr><tr><td><a href=\"https:\/\/huggingface.co\/google\/gemma-2-9b-it\">google\/gemma-2-9b-it \u00b7 Hugging Face<\/a> \/ 16bit [4]<\/td><td>29.1<\/td><td>43.5<\/td><\/tr><tr><td><a href=\"https:\/\/huggingface.co\/google\/gemma-2-9b-it\">google\/gemma-2-9b-it \u00b7 Hugging Face<\/a> \/ 8bit [5]<\/td><td>29.3<\/td><td>42.5<\/td><\/tr><tr><td><a href=\"https:\/\/huggingface.co\/google\/gemma-2-9b-it\">google\/gemma-2-9b-it \u00b7 Hugging Face<\/a> \/ 4bit [6]<\/td><td>25.4<\/td><td>40.2<\/td><\/tr><\/tbody><\/table><figcaption class=\"wp-element-caption\">Gemma 2 9B\u306eBLEU<\/figcaption><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">\u7d50\u679c\u3068\u6240\u611f<\/h2>\n\n\n\n<p>Gemma2 9B\u306e\u6a5f\u68b0\u7ffb\u8a33\u306f\u975e\u5e38\u306b\u9ad8\u304f\u5546\u7528\u30e2\u30c7\u30eb\u306b\u5339\u6575\u3057\u3066\u3044\u308b[7]\u3002\u8a33\u629c\u3051\u306a\u3069\u82e5\u5e72\u306e\u554f\u984c\u306f\u3042\u308b\u3068\u306f\u3044\u30481 shot\u3067\u3042\u308c\u3070\u6a5f\u68b0\u7ffb\u8a33\u30e2\u30c7\u30eb\u3068\u3057\u3066\u3082\u5b9f\u7528\u306b\u9054\u3057\u3066\u3044\u305d\u3046\u306a\u6027\u80fd\u3002\u3053\u306e\u54c1\u8cea\u304c\u516c\u958b\u30e2\u30c7\u30eb\u3067\u9054\u6210\u3067\u304d\u308b\u3053\u3068\u306b\u6b63\u76f4\u9a5a\u3044\u305f[8]\u3002<\/p>\n\n\n\n<p>\u91cf\u5b50\u5316\u306b\u3088\u308b\u6027\u80fd\u52a3\u5316\u306f8bit\u307e\u3067\u306f\u5927\u304d\u304f\u306a\u3055\u305d\u3046\u306b\u898b\u3048\u308b\u304c\u30014bit\u307e\u3067\u843d\u3068\u3059\u3068\u3055\u3059\u304c\u306b\u5f71\u97ff\u304c\u51fa\u3066\u3044\u308b\u3002<\/p>\n\n\n\n<p>\u84b8\u7559\u3092\u4ecb\u3057\u3066\u3044\u308b\u69cb\u7bc9\u65b9\u91dd\u3082\u8208\u5473\u6df1\u304f<a href=\"https:\/\/devneko.jp\/wordpress\/?p=4983\">Nemotron-4 340B \u2013 arXiv\u6700\u65b0\u8ad6\u6587\u306e\u7d39\u4ecb (devneko.jp)<\/a>\u306e\u3088\u3046\u306a\u5408\u6210\u30c7\u30fc\u30bf\u69cb\u7bc9\u306b\u30d5\u30a9\u30fc\u30ab\u30b9\u3057\u305fLLM\u3082\u4f75\u305b\u3066\u7279\u5316\u578b\u30fb\u72ec\u81eaLLM\u306e\u53ef\u80fd\u6027\u3092\u611f\u3058\u308b\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">\u811a\u6ce8<\/h4>\n\n\n\n<p>[1] <a href=\"https:\/\/blog.google\/technology\/developers\/google-gemma-2\/\">Google launches Gemma 2, its next generation of open models (blog.google)<\/a><br>[2] 9B\u30e2\u30c7\u30eb\u306f\u3088\u308a\u5927\u898f\u6a21\u306a\u30e2\u30c7\u30eb\u304b\u3089\u84b8\u7559\u306b\u3088\u3063\u3066\u69cb\u7bc9\u3055\u308c\u3066\u3044\u308b\u3068\u306e\u3053\u3068\uff08\u300cWe also train the 2B and 9B models with knowledge distillation (Hinton et al , 2015) instead of next token prediction. The resulting models deliver the best performance for their size, and even offer competitive alternatives to models that are 2-3\u00d7 bigger.\u300d\uff08<a href=\"https:\/\/storage.googleapis.com\/deepmind-media\/gemma\/gemma-2-report.pdf\">gemma-2-report.pdf (storage.googleapis.com)<\/a>\u3088\u308a\u5f15\u7528\uff09\u3002<br>[3] &lt;bos&gt;&lt;eos&gt;&lt;end_of_turn&gt;\u306f\u6a5f\u68b0\u7684\u306b\u9664\u53bb\u3057\u3066\u3044\u308b\u3002<br>[4] torch.bfloat16<br>[5] BitsAndBytesConfig(load_in_8bit=True)<br>[6] BitsAndBytesConfig(load_in_4bit=True)<br>[7] leakage\u306e\u7591\u3044\u306f\u3042\u308b\u304c\u2026<br>[8] \u30d9\u30f3\u30c1\u30de\u30fc\u30af\u304c\u30d9\u30f3\u30c1\u30de\u30fc\u30af\u3068\u3057\u3066\u6210\u7acb\u3057\u3066\u3044\u308b\u304b\u82e5\u5e72\u7591\u554f\u304c\u51fa\u3066\u304d\u305f\u305f\u3081\u3001\u3088\u308a\u5b9f\u7528\u7684\u306a\u30c7\u30fc\u30bf\u30bb\u30c3\u30c8\u3092\u69cb\u7bc9\u3057\u3088\u3046\u304b\u3068\u8003\u3048\u3066\u3044\u308b\u6700\u8fd1\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Google\u304b\u3089Gemma2\u304c\u30ea\u30ea\u30fc\u30b9\u3055\u308c\u305f[1]\u30029B[2]\u306827B\u304c\u516c\u958b\u3055\u308c\u3066\u3044\u308b\u3002Llama3\u3092\u8d85\u3048\u308b\u6027\u80fd\u3068\u306e\u3053\u3068\u3067\u691c\u8a3c\u3057\u3066\u307f\u305f\u3002\u6027\u80fd\u8a55\u4fa1\u306b\u4f7f\u7528\u3057\u305f\u30c7\u30fc\u30bf\u306f\u4ee5\u524d\uff08DAMO PolyLM-13B\u306e\u6a5f\u68b0\u7ffb\u8a33\u6027\u80fd | \u3077 &hellip; <a href=\"https:\/\/staka.jp\/wordpress\/?p=1096\" class=\"more-link\"><span class=\"screen-reader-text\">&#8220;Gemma 2 9B\u306e\u6a5f\u68b0\u7ffb\u8a33\u6027\u80fd&#8221; \u306e<\/span>\u7d9a\u304d\u3092\u8aad\u3080<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2,13],"tags":[35],"class_list":["post-1096","post","type-post","status-publish","format-standard","hentry","category-ai","category-13","tag-gemma"],"_links":{"self":[{"href":"https:\/\/staka.jp\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/1096","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/staka.jp\/wordpress\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/staka.jp\/wordpress\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/staka.jp\/wordpress\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/staka.jp\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1096"}],"version-history":[{"count":0,"href":"https:\/\/staka.jp\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/1096\/revisions"}],"wp:attachment":[{"href":"https:\/\/staka.jp\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1096"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/staka.jp\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1096"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/staka.jp\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1096"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}