{"id":180,"date":"2024-07-25T16:26:54","date_gmt":"2024-07-25T08:26:54","guid":{"rendered":"https:\/\/www.onetts.com\/ai\/?p=180"},"modified":"2024-07-25T16:55:56","modified_gmt":"2024-07-25T08:55:56","slug":"glm-4-9b-chat-1m","status":"publish","type":"post","link":"https:\/\/www.onetts.com\/ai\/models\/glm-4-9b-chat-1m\/","title":{"rendered":"GLM-4-9B-Chat-1M"},"content":{"rendered":"<p>GLM-4-9B-Chat-1M \u662f\u7531\u667a\u8c31 AI \u53d1\u5e03\u7684\u4e00\u6b3e\u5f00\u6e90\u9884\u8bad\u7ec3\u8bed\u8a00\u6a21\u578b\uff0c\u5c5e\u4e8e GLM-4 \u7cfb\u5217\u3002\u8be5\u6a21\u578b\u5728\u957f\u6587\u672c\u5904\u7406\u3001\u591a\u8f6e\u5bf9\u8bdd\u3001\u7f51\u9875\u6d4f\u89c8\u3001\u4ee3\u7801\u6267\u884c\u3001\u81ea\u5b9a\u4e49\u5de5\u5177\u8c03\u7528\u7b49\u65b9\u9762\u5177\u6709\u663e\u8457\u4f18\u52bf\u3002\u652f\u6301 1M \u7684\u4e0a\u4e0b\u6587\u957f\u5ea6\uff0c\u80fd\u591f\u5904\u7406\u7ea6 200 \u4e07\u4e2d\u6587\u5b57\u7b26\uff0c\u540c\u65f6\u652f\u6301 26 \u79cd\u8bed\u8a00\uff0c\u5305\u62ec\u65e5\u8bed\u3001\u97e9\u8bed\u3001\u5fb7\u8bed\u7b49\u3002<\/p>\n<h2>\u6a21\u578b\u8bc4\u6d4b<\/h2>\n<p>GLM-4-9B-Chat-1M \u5728\u957f\u6587\u672c\u5904\u7406\u80fd\u529b\u4e0a\u8fdb\u884c\u4e86\u6df1\u5165\u7684\u6d4b\u8bd5\u548c\u8bc4\u4f30\u3002\u5728 1M \u4e0a\u4e0b\u6587\u957f\u5ea6\u7684\u5927\u6d77\u635e\u9488\u5b9e\u9a8c\u4e2d\uff0c\u6a21\u578b\u5c55\u73b0\u51fa\u4e86\u5353\u8d8a\u7684\u6027\u80fd\u3002\u6b64\u5916\uff0c\u5728 LongBench-Chat \u7684\u8bc4\u6d4b\u4e2d\uff0c\u8fdb\u4e00\u6b65\u9a8c\u8bc1\u4e86\u5176\u5728\u957f\u6587\u672c\u5bf9\u8bdd\u573a\u666f\u4e0b\u7684\u4f18\u5f02\u8868\u73b0\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\u7cfb\u7edf\u5b89\u88c5\u4e86 Python \u73af\u5883\u4ee5\u53ca\u5fc5\u8981\u7684\u4f9d\u8d56\u5e93\uff0c\u5982 PyTorch \u548c transformers\u3002<\/li>\n<li><strong>\u5b89\u88c5\u4f9d\u8d56<\/strong>\uff1a\u901a\u8fc7 pip \u5b89\u88c5 transformers \u548c modelscope \u5e93\u3002<\/li>\n<li><strong>\u4e0b\u8f7d\u6a21\u578b<\/strong>\uff1a\u4f7f\u7528 modelscope \u7684 snapshot_download \u51fd\u6570\u4e0b\u8f7d GLM-4-9B-Chat-1M \u6a21\u578b\u3002<\/li>\n<li><strong>\u7f16\u5199\u63a8\u7406\u4ee3\u7801<\/strong>\uff1a\u6839\u636e\u6a21\u578b\u63d0\u4f9b\u7684\u793a\u4f8b\u4ee3\u7801\uff0c\u7f16\u5199\u9002\u5408\u81ea\u5df1\u9700\u6c42\u7684\u63a8\u7406\u811a\u672c\u3002<\/li>\n<li><strong>\u8fd0\u884c\u6a21\u578b<\/strong>\uff1a\u6267\u884c\u7f16\u5199\u7684\u63a8\u7406\u811a\u672c\uff0c\u8fdb\u884c\u6a21\u578b\u7684\u63a8\u7406\u548c\u751f\u6210\u6587\u672c\u3002<\/li>\n<\/ol>\n<h2>\u5e38\u89c1\u95ee\u9898<\/h2>\n<p><strong>Q: \u5982\u4f55\u89e3\u51b3\u6a21\u578b\u8fd0\u884c\u65f6\u7684\u5185\u5b58\u4e0d\u8db3\u95ee\u9898\uff1f<\/strong><\/p>\n<p>A: \u53ef\u4ee5\u5c1d\u8bd5\u4f7f\u7528\u00a0<code class=\"inlineCode___uUrJ9\">torch.bfloat16<\/code>\u00a0\u6570\u636e\u7c7b\u578b\u6765\u51cf\u5c11\u5185\u5b58\u4f7f\u7528\uff0c\u6216\u8005\u901a\u8fc7\u8c03\u6574\u6a21\u578b\u7684 batch size \u6765\u9002\u5e94\u786c\u4ef6\u9650\u5236\u3002<\/p>\n<p><strong>Q: \u5982\u4f55\u63d0\u9ad8\u6a21\u578b\u7684\u751f\u6210\u6587\u672c\u8d28\u91cf\uff1f<\/strong><\/p>\n<p>A: \u53ef\u4ee5\u901a\u8fc7\u8c03\u6574\u751f\u6210\u53c2\u6570\uff0c\u5982\u8bbe\u7f6e\u66f4\u9ad8\u7684\u00a0<code class=\"inlineCode___uUrJ9\">temperature<\/code>\u00a0\u503c\u6765\u589e\u52a0\u6587\u672c\u7684\u591a\u6837\u6027\uff0c\u6216\u8005\u4f7f\u7528\u00a0<code class=\"inlineCode___uUrJ9\">top_k<\/code>\u00a0\u548c\u00a0<code class=\"inlineCode___uUrJ9\">top_p<\/code>\u00a0\u6765\u63a7\u5236\u751f\u6210\u6587\u672c\u7684\u8986\u76d6\u5ea6\u548c\u8fde\u8d2f\u6027\u3002<\/p>\n<h2>\u76f8\u5173\u8d44\u6e90<\/h2>\n<ul>\n<li><strong>\u6a21\u578b\u4ed3\u5e93<\/strong>\uff1a<a target=\"_blank\" rel=\"noopener noreferrer nofollow\" href=\"https:\/\/github.com\/THUDM\/GLM-4\" target=\"_blank\" rel=\"noopener\">GLM-4-9B-Chat-1M GitHub \u4ed3\u5e93<\/a><\/li>\n<li><strong>\u6280\u672f\u62a5\u544a<\/strong>\uff1a<a target=\"_blank\" rel=\"noopener noreferrer nofollow\" href=\"https:\/\/medium.com\/@ChatGLM\/glm-long-scaling-pre-trained-model-contexts-to-millions-caa3c48dea85\" target=\"_blank\" rel=\"noopener\">\u957f\u6587\u672c\u6280\u672f\u62a5\u544a<\/a><\/li>\n<li><strong>ModelScope \u9875\u9762<\/strong>\uff1a<a target=\"_blank\" rel=\"noopener noreferrer nofollow\" href=\"https:\/\/www.modelscope.cn\/models\/ZhipuAI\/glm-4-9b-chat-1m\" target=\"_blank\" rel=\"noopener\">GLM-4-9B-Chat-1M ModelScope \u9875\u9762<\/a><\/li>\n<\/ul>\n<h3>\u7ed3\u8bed<\/h3>\n<p>GLM-4-9B-Chat-1M \u4ee5\u5176\u5f3a\u5927\u7684\u957f\u6587\u672c\u5904\u7406\u80fd\u529b\u548c\u591a\u8bed\u8a00\u652f\u6301\uff0c\u4e3a\u81ea\u7136\u8bed\u8a00\u5904\u7406\u9886\u57df\u5e26\u6765\u4e86\u65b0\u7684\u53ef\u80fd\u3002\u65e0\u8bba\u662f\u5b66\u672f\u7814\u7a76\u8fd8\u662f\u5546\u4e1a\u5e94\u7528\uff0c\u8be5\u6a21\u578b\u90fd\u63d0\u4f9b\u4e86\u4e30\u5bcc\u7684\u529f\u80fd\u548c\u7075\u6d3b\u7684\u90e8\u7f72\u9009\u9879\u3002\u968f\u7740\u6280\u672f\u7684\u4e0d\u65ad\u8fdb\u6b65\uff0c\u671f\u5f85\u770b\u5230\u66f4\u591a\u521b\u65b0\u7684\u5e94\u7528\u573a\u666f\u51fa\u73b0\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>GLM-4-9B-Chat-1M \u662f\u7531\u667a\u8c31 AI \u53d1\u5e03\u7684\u4e00\u6b3e\u5f00\u6e90\u9884\u8bad\u7ec3\u8bed\u8a00\u6a21\u578b\uff0c\u5c5e\u4e8e GLM-4 \u7cfb\u5217\u3002\u8be5\u6a21\u578b\u5728\u957f\u6587\u672c\u5904\u7406\u3001\u591a\u8f6e\u5bf9\u8bdd\u3001\u7f51\u9875\u6d4f\u89c8\u3001\u4ee3\u7801\u6267\u884c\u3001\u81ea\u5b9a\u4e49\u5de5\u5177\u8c03\u7528\u7b49\u65b9\u9762\u5177\u6709\u663e\u8457\u4f18\u52bf\u3002\u652f\u6301 1M \u7684\u4e0a\u4e0b\u6587\u957f\u5ea6\uff0c\u80fd\u591f\u5904\u7406\u7ea6 200 \u4e07\u4e2d\u6587\u5b57\u7b26\uff0c\u540c\u65f6\u652f\u6301 26 \u79cd\u8bed\u8a00\uff0c\u5305\u62ec\u65e5\u8bed\u3001\u97e9\u8bed\u3001\u5fb7\u8bed\u7b49\u3002 \u6a21\u578b\u8bc4\u6d4b GLM-4-9B-Chat-1M \u5728\u957f\u6587\u672c\u5904\u7406\u80fd\u529b\u4e0a\u8fdb\u884c\u4e86\u6df1\u5165\u7684\u6d4b\u8bd5\u548c\u8bc4\u4f30\u3002\u5728 1M \u4e0a\u4e0b\u6587\u957f\u5ea6\u7684\u5927\u6d77\u635e\u9488\u5b9e\u9a8c\u4e2d\uff0c\u6a21\u578b\u5c55\u73b0\u51fa\u4e86\u5353\u8d8a\u7684\u6027\u80fd\u3002\u6b64\u5916\uff0c\u5728 LongBench-Chat \u7684\u8bc4\u6d4b\u4e2d\uff0c\u8fdb\u4e00\u6b65\u9a8c\u8bc1\u4e86\u5176\u5728\u957f\u6587\u672c\u5bf9\u8bdd<\/p>\n","protected":false},"author":1,"featured_media":181,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"collection":[52],"company":[17],"rank":[],"class_list":["post-180","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-llm","collection-glm-4","company-zhipuai"],"_links":{"self":[{"href":"https:\/\/www.onetts.com\/ai\/wp-json\/wp\/v2\/posts\/180","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=180"}],"version-history":[{"count":1,"href":"https:\/\/www.onetts.com\/ai\/wp-json\/wp\/v2\/posts\/180\/revisions"}],"predecessor-version":[{"id":182,"href":"https:\/\/www.onetts.com\/ai\/wp-json\/wp\/v2\/posts\/180\/revisions\/182"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.onetts.com\/ai\/wp-json\/wp\/v2\/media\/181"}],"wp:attachment":[{"href":"https:\/\/www.onetts.com\/ai\/wp-json\/wp\/v2\/media?parent=180"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.onetts.com\/ai\/wp-json\/wp\/v2\/categories?post=180"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.onetts.com\/ai\/wp-json\/wp\/v2\/tags?post=180"},{"taxonomy":"collection","embeddable":true,"href":"https:\/\/www.onetts.com\/ai\/wp-json\/wp\/v2\/collection?post=180"},{"taxonomy":"company","embeddable":true,"href":"https:\/\/www.onetts.com\/ai\/wp-json\/wp\/v2\/company?post=180"},{"taxonomy":"rank","embeddable":true,"href":"https:\/\/www.onetts.com\/ai\/wp-json\/wp\/v2\/rank?post=180"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}