{"id":84,"date":"2024-07-21T18:00:50","date_gmt":"2024-07-21T10:00:50","guid":{"rendered":"https:\/\/www.onetts.com\/ai\/?p=84"},"modified":"2024-07-21T20:09:31","modified_gmt":"2024-07-21T12:09:31","slug":"qwen2-7b","status":"publish","type":"post","link":"https:\/\/www.onetts.com\/ai\/models\/qwen2-7b\/","title":{"rendered":"Qwen2-7B"},"content":{"rendered":"<p>Qwen2-7B \u662f Qwen2 \u7cfb\u5217\u4e2d\u7684\u4e00\u6b3e 70 \u4ebf\u53c2\u6570\u7684\u5927\u578b\u8bed\u8a00\u6a21\u578b\u3002\u5b83\u57fa\u4e8e Transformer \u67b6\u6784\uff0c\u91c7\u7528 SwiGLU \u6fc0\u6d3b\u3001\u6ce8\u610f\u529b QKV \u504f\u7f6e\u3001\u7ec4\u67e5\u8be2\u6ce8\u610f\u529b\u7b49\u5148\u8fdb\u6280\u672f\uff0c\u65e8\u5728\u63d0\u4f9b\u5f3a\u5927\u7684\u81ea\u7136\u8bed\u8a00\u5904\u7406\u80fd\u529b\u3002Qwen2-7B \u5728\u591a\u8bed\u8a00\u5904\u7406\u3001\u7f16\u7a0b\u3001\u6570\u5b66\u548c\u903b\u8f91\u63a8\u7406\u7b49\u591a\u4e2a\u9886\u57df\u8868\u73b0\u51fa\u8272\uff0c\u5176\u6027\u80fd\u5728\u591a\u4e2a\u57fa\u51c6\u6d4b\u8bd5\u4e2d\u8d85\u8d8a\u4e86\u73b0\u6709\u7684\u5f00\u6e90\u6a21\u578b\u3002<\/p>\n<h2>\u6a21\u578b\u8bc4\u6d4b<\/h2>\n<p>Qwen2-7B \u7ecf\u8fc7\u4e25\u683c\u7684\u6027\u80fd\u8bc4\u4f30\uff0c\u4e3b\u8981\u5728\u4ee5\u4e0b\u65b9\u9762\u8fdb\u884c\u4e86\u6d4b\u8bd5\uff1a<\/p>\n<ul>\n<li><strong>\u81ea\u7136\u8bed\u8a00\u7406\u89e3<\/strong>\uff1a\u5305\u62ec MMLU\u3001MMLU-Pro\u3001GPQA \u7b49\u6570\u636e\u96c6\u3002<\/li>\n<li><strong>\u7f16\u7a0b\u4efb\u52a1<\/strong>\uff1a\u6d89\u53ca HumanEval\u3001MBPP\u3001MultiPL-E \u7b49\u7f16\u7a0b\u8bed\u8a00\u8bc4\u4f30\u3002<\/li>\n<li><strong>\u6570\u5b66\u95ee\u9898\u89e3\u51b3<\/strong>\uff1aGSM8K\u3001MATH \u6570\u636e\u96c6\u3002<\/li>\n<li><strong>\u4e2d\u6587\u4efb\u52a1<\/strong>\uff1aC-Eval\u3001CMMLU \u6570\u636e\u96c6\u3002<\/li>\n<li><strong>\u591a\u8bed\u8a00\u80fd\u529b<\/strong>\uff1aMulti-Exam\u3001Multi-Understanding \u7b49\u591a\u8bed\u8a00\u8bc4\u4f30\u3002<\/li>\n<\/ul>\n<p>Qwen2-7B \u5728\u591a\u4e2a\u6570\u636e\u96c6\u4e0a\u53d6\u5f97\u4e86\u4f18\u5f02\u7684\u6210\u7ee9\uff0c\u7279\u522b\u662f\u5728\u82f1\u6587\u3001\u7f16\u7a0b\u548c\u6570\u5b66\u9886\u57df\u3002<\/p>\n<h2>\u90e8\u7f72\u4f7f\u7528<\/h2>\n<h3>\u90e8\u7f72\u6b65\u9aa4<\/h3>\n<ol>\n<li><strong>\u73af\u5883\u51c6\u5907<\/strong>\uff1a\u786e\u4fdd\u5b89\u88c5\u4e86 Python \u73af\u5883\u548c\u5fc5\u8981\u7684\u5e93\uff0c\u63a8\u8350\u4f7f\u7528\u00a0<code class=\"inlineCode___uUrJ9\">transformers&gt;=4.37.0<\/code>\u3002<\/li>\n<li><strong>\u6a21\u578b\u4e0b\u8f7d<\/strong>\uff1a\u901a\u8fc7 Hugging Face \u6a21\u578b\u5e93\u4e0b\u8f7d Qwen2-7B \u6a21\u578b\u3002<\/li>\n<li><strong>\u4f9d\u8d56\u5b89\u88c5<\/strong>\uff1a\u4f7f\u7528 pip \u5b89\u88c5\u6240\u9700\u7684\u4f9d\u8d56\uff0c\u4f8b\u5982\u00a0<code class=\"inlineCode___uUrJ9\">pip install transformers<\/code>\u3002<\/li>\n<li><strong>\u6a21\u578b\u52a0\u8f7d<\/strong>\uff1a\u4f7f\u7528 Transformers \u5e93\u52a0\u8f7d Qwen2-7B \u6a21\u578b\u3002<\/li>\n<li><strong>\u5e94\u7528\u96c6\u6210<\/strong>\uff1a\u5c06\u6a21\u578b\u96c6\u6210\u5230\u5e94\u7528\u7a0b\u5e8f\u4e2d\uff0c\u6839\u636e\u9700\u6c42\u8fdb\u884c\u6587\u672c\u751f\u6210\u6216\u95ee\u9898\u56de\u7b54\u7b49\u4efb\u52a1\u3002<\/li>\n<\/ol>\n<h2>\u5e38\u89c1\u95ee\u9898<\/h2>\n<ul>\n<li><strong>Q: \u5982\u4f55\u89e3\u51b3\u5b89\u88c5\u65f6\u7684\u4f9d\u8d56\u95ee\u9898\uff1f<\/strong>\u00a0A: \u786e\u4fdd\u4f7f\u7528\u6b63\u786e\u7248\u672c\u7684 pip \u548c setuptools\uff0c\u53ef\u4ee5\u901a\u8fc7\u00a0<code class=\"inlineCode___uUrJ9\">pip install --upgrade pip setuptools<\/code>\u00a0\u66f4\u65b0\u3002<\/li>\n<li><strong>Q: \u5982\u4f55\u4f18\u5316\u6a21\u578b\u6027\u80fd\uff1f<\/strong>\u00a0A: \u6839\u636e\u5177\u4f53\u5e94\u7528\u573a\u666f\uff0c\u53ef\u4ee5\u5bf9\u6a21\u578b\u8fdb\u884c\u5fae\u8c03\uff08Fine-tuning\uff09\u6216\u4f7f\u7528\u66f4\u5f3a\u5927\u7684\u786c\u4ef6\u52a0\u901f\u3002<\/li>\n<\/ul>\n<h2>\u76f8\u5173\u8d44\u6e90<\/h2>\n<p>\u4ee5\u4e0b\u662f\u4e00\u4e9b\u6709\u7528\u7684\u8d44\u6e90\u94fe\u63a5\uff0c\u4f9b\u8fdb\u4e00\u6b65\u5b66\u4e60\u548c\u4f7f\u7528 Qwen2-7B\uff1a<\/p>\n<ul>\n<li><strong>Qwen2 \u5b98\u65b9\u535a\u5ba2<\/strong>\uff1a<a target=\"_blank\" rel=\"noopener noreferrer nofollow\" href=\"https:\/\/modelscope.cn\/models\/qwen\/Qwen2-7B\" target=\"_blank\" rel=\"noopener\">Qwen2 Blog<\/a><\/li>\n<li><strong>Qwen2 GitHub \u4ed3\u5e93<\/strong>\uff1a<a target=\"_blank\" rel=\"noopener noreferrer nofollow\" href=\"https:\/\/github.com\/qwen2\/Qwen2\" target=\"_blank\" rel=\"noopener\">Qwen2 GitHub<\/a><\/li>\n<li><strong>Hugging Face Transformers \u5e93<\/strong>\uff1a<a target=\"_blank\" rel=\"noopener noreferrer nofollow\" href=\"https:\/\/github.com\/huggingface\/transformers\" target=\"_blank\" rel=\"noopener\">Hugging Face Transformers<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Qwen2-7B \u662f Qwen2 \u7cfb\u5217\u4e2d\u7684\u4e00\u6b3e 70 \u4ebf\u53c2\u6570\u7684\u5927\u578b\u8bed\u8a00\u6a21\u578b\u3002\u5b83\u57fa\u4e8e Transformer \u67b6\u6784\uff0c\u91c7\u7528 SwiGLU \u6fc0\u6d3b\u3001\u6ce8\u610f\u529b QKV \u504f\u7f6e\u3001\u7ec4\u67e5\u8be2\u6ce8\u610f\u529b\u7b49\u5148\u8fdb\u6280\u672f\uff0c\u65e8\u5728\u63d0\u4f9b\u5f3a\u5927\u7684\u81ea\u7136\u8bed\u8a00\u5904\u7406\u80fd\u529b\u3002Qwen2-7B \u5728\u591a\u8bed\u8a00\u5904\u7406\u3001\u7f16\u7a0b\u3001\u6570\u5b66\u548c\u903b\u8f91\u63a8\u7406\u7b49\u591a\u4e2a\u9886\u57df\u8868\u73b0\u51fa\u8272\uff0c\u5176\u6027\u80fd\u5728\u591a\u4e2a\u57fa\u51c6\u6d4b\u8bd5\u4e2d\u8d85\u8d8a\u4e86\u73b0\u6709\u7684\u5f00\u6e90\u6a21\u578b\u3002 \u6a21\u578b\u8bc4\u6d4b Qwen2-7B \u7ecf\u8fc7\u4e25\u683c\u7684\u6027\u80fd\u8bc4\u4f30\uff0c\u4e3b\u8981\u5728\u4ee5\u4e0b\u65b9\u9762\u8fdb\u884c\u4e86\u6d4b\u8bd5\uff1a \u81ea\u7136\u8bed\u8a00\u7406\u89e3\uff1a\u5305\u62ec MMLU\u3001MMLU-Pro\u3001GPQA \u7b49\u6570\u636e\u96c6\u3002 \u7f16\u7a0b\u4efb\u52a1\uff1a\u6d89\u53ca HumanEval\u3001M<\/p>\n","protected":false},"author":1,"featured_media":85,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"collection":[44],"company":[6],"rank":[],"class_list":["post-84","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-llm","collection-qwen2","company-alibaba"],"_links":{"self":[{"href":"https:\/\/www.onetts.com\/ai\/wp-json\/wp\/v2\/posts\/84","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.onetts.com\/ai\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.onetts.com\/ai\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.onetts.com\/ai\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.onetts.com\/ai\/wp-json\/wp\/v2\/comments?post=84"}],"version-history":[{"count":2,"href":"https:\/\/www.onetts.com\/ai\/wp-json\/wp\/v2\/posts\/84\/revisions"}],"predecessor-version":[{"id":87,"href":"https:\/\/www.onetts.com\/ai\/wp-json\/wp\/v2\/posts\/84\/revisions\/87"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.onetts.com\/ai\/wp-json\/wp\/v2\/media\/85"}],"wp:attachment":[{"href":"https:\/\/www.onetts.com\/ai\/wp-json\/wp\/v2\/media?parent=84"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.onetts.com\/ai\/wp-json\/wp\/v2\/categories?post=84"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.onetts.com\/ai\/wp-json\/wp\/v2\/tags?post=84"},{"taxonomy":"collection","embeddable":true,"href":"https:\/\/www.onetts.com\/ai\/wp-json\/wp\/v2\/collection?post=84"},{"taxonomy":"company","embeddable":true,"href":"https:\/\/www.onetts.com\/ai\/wp-json\/wp\/v2\/company?post=84"},{"taxonomy":"rank","embeddable":true,"href":"https:\/\/www.onetts.com\/ai\/wp-json\/wp\/v2\/rank?post=84"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}