{"id":23976,"date":"2025-01-08T10:13:24","date_gmt":"2025-01-08T02:13:24","guid":{"rendered":"https:\/\/aif.amtbbs.org\/?p=23976"},"modified":"2025-01-08T10:13:24","modified_gmt":"2025-01-08T02:13:24","slug":"%e5%a6%82%e4%bd%95%e4%bd%bf%e7%94%a8ollama%e5%9c%a8%e4%b8%aa%e4%ba%ba%e8%ae%a1%e7%ae%97%e6%9c%ba%e4%b8%8a%e8%bf%90%e8%a1%8c%e5%bc%80%e6%ba%90llm","status":"publish","type":"post","link":"https:\/\/aif.amtbbs.org\/index.php\/2025\/01\/08\/23976\/","title":{"rendered":"\u5982\u4f55\u4f7f\u7528Ollama\u5728\u4e2a\u4eba\u8ba1\u7b97\u673a\u4e0a\u8fd0\u884c\u5f00\u6e90LLM"},"content":{"rendered":"<div class=\"article-desc\">\u5982\u4eca\uff0cAI\u5de5\u5177\u5df2\u53d8\u5f97\u53f8\u7a7a\u89c1\u60ef\uff0c\u4f60\u53ef\u80fd\u6bcf\u5929\u90fd\u5728\u4f7f\u7528\u5b83\u4eec\u3002\u4fdd\u62a4\u4f60\u7684\u4e2a\u4eba\u548c\u5546\u4e1a\u673a\u5bc6\u6570\u636e\u7684\u5173\u952e\u9014\u5f84\u4e4b\u4e00\uff0c\u5c31\u662f\u5728\u81ea\u5df1\u7684\u57fa\u7840\u914d\u7f6e\u4e0a\u8fd0\u884c\u81ea\u5df1\u7684AI\u3002<\/div>\n<div id=\"postspictures\" class=\"article-content\">\n<div id=\"container\" class=\"container am-engine\" data-v-1d7a5742=\"\" data-element=\"root\">\n<p>&nbsp;<\/p>\n<p>\u5982\u4eca\uff0cAI\u5de5\u5177\u5df2\u53d8\u5f97\u53f8\u7a7a\u89c1\u60ef\uff0c\u4f60\u53ef\u80fd\u6bcf\u5929\u90fd\u5728\u4f7f\u7528\u5b83\u4eec\u3002\u4fdd\u62a4\u4f60\u7684\u4e2a\u4eba\u548c\u5546\u4e1a\u673a\u5bc6\u6570\u636e\u7684\u5173\u952e\u9014\u5f84\u4e4b\u4e00\uff0c\u5c31\u662f\u5728\u81ea\u5df1\u7684\u57fa\u7840\u914d\u7f6e\u4e0a\u8fd0\u884c\u81ea\u5df1\u7684AI\u3002<\/p>\n<p><img data-dominant-color=\"3484b8\" data-has-transparency=\"false\" style=\"--dominant-color: #3484b8;\" loading=\"lazy\" decoding=\"async\" class=\"not-transparent alignnone size-full wp-image-23978\" src=\"https:\/\/aiforumimage.oss-cn-shanghai.aliyuncs.com\/wp-content\/uploads\/2025\/01\/41cfd72753f55ea978c17296aea57bc10210ef-300x200-1.jpg\" width=\"300\" height=\"200\" alt=\"\" srcset=\"https:\/\/aiforumimage.oss-cn-shanghai.aliyuncs.com\/wp-content\/uploads\/2025\/01\/41cfd72753f55ea978c17296aea57bc10210ef-300x200-1.jpg 300w, https:\/\/aiforumimage.oss-cn-shanghai.aliyuncs.com\/wp-content\/uploads\/2025\/01\/41cfd72753f55ea978c17296aea57bc10210ef-300x200-1-150x100.jpg 150w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/p>\n<p>\u672c\u6307\u5357\u5c06\u5411\u4f60\u4ecb\u7ecd\u5982\u4f55\u5728\u81ea\u5df1\u7684\u8ba1\u7b97\u673a\u4e0a\u6258\u7ba1\u4e00\u4e2a\u5f00\u6e90\u5927\u8bed\u8a00\u6a21\u578b\uff08LLM\uff09\u3002\u8fd9\u6837\u505a\u6709\u52a9\u4e8e\u786e\u4fdd\u4f60\u4e0d\u4f1a\u901a\u8fc7\u57fa\u4e8e\u4e91\u7684AI\u89e3\u51b3\u65b9\u6848\u5c06\u6570\u636e\u6cc4\u9732\u7ed9\u7b2c\u4e09\u65b9\u516c\u53f8\u3002<\/p>\n<h3>\u524d\u63d0\u6761\u4ef6<\/h3>\n<ul data-id=\"u738a58b-KjZkhDVF\">\n<li data-id=\"ld70c578-T5hf2A7L\"><strong>\u4e00\u5b9a\u7684AI\u77e5\u8bc6<\/strong>\uff1a\u6211\u5c06\u5728\u6587\u7ae0\u4e2d\u4ecb\u7ecd\u4e0e\u6211\u4eec\u64cd\u4f5c\u76f8\u5173\u7684\u4e3b\u8981\u6982\u5ff5\uff0c\u5177\u5907\u4e00\u4e9b\u5173\u4e8e\u5927\u8bed\u8a00\u6a21\u578b\uff08LLMs\uff09\u7684\u57fa\u7840\u77e5\u8bc6\u5c06\u6709\u52a9\u4e8e\u4f60\u66f4\u597d\u5730\u7406\u89e3\u8fd9\u4e9b\u5185\u5bb9\u3002\u4e0d\u8fc7\uff0c\u5373\u4f7f\u4f60\u4e00\u65e0\u6240\u77e5\uff0c\u4e5f\u4e0d\u7528\u62c5\u5fc3\u2014\u2014\u4f60\u4ecd\u7136\u4f1a\u53d1\u73b0\u8fd9\u5f88\u6709\u8da3\u3002<\/li>\n<li data-id=\"ld70c578-TWjId245\"><strong>\u4e00\u53f0\u6027\u80fd\u4e0d\u9519\u7684\u7535\u8111\uff1a<\/strong>\u7cfb\u7edf\u81f3\u5c11\u9700\u8981\u914d\u590716GB\u7684\u5185\u5b58\u3001\u591a\u6838CPU\uff0c\u4ee5\u53ca\u4e3a\u83b7\u5f97\u6700\u4f73\u6027\u80fd\u800c\u914d\u5907\u7684GPU\u3002\uff08\u5982\u679c\u4f60\u7684\u7535\u8111\u914d\u7f6e\u8f83\u4f4e\uff0c\u64cd\u4f5c\u53ef\u80fd\u4f1a\u76f8\u5f53\u7f13\u6162\uff09<\/li>\n<li data-id=\"ld70c578-2lYFKIOX\"><strong>\u7f51\u7edc\u8fde\u63a5\uff1a<\/strong>\u9700\u8981\u7f51\u7edc\u8fde\u63a5\u6765\u4e0b\u8f7d\u548c\u5b89\u88c5\u6a21\u578b\u3002<\/li>\n<li data-id=\"ld70c578-RhlKJnUi\"><strong>\u65f6\u95f4\u548c\u8010\u5fc3\uff1a<\/strong>\u7531\u4e8e\u4e0b\u8f7d\u3001\u5b89\u88c5\u548c\u914d\u7f6e\u8fc7\u7a0b\u53ef\u80fd\u8f83\u4e3a\u590d\u6742\u4e14\u8017\u65f6\uff0c\u56e0\u6b64\u4f60\u9700\u8981\u5177\u5907\u8db3\u591f\u7684\u65f6\u95f4\u548c\u8010\u5fc3\u6765\u5b8c\u6210\u8fd9\u4e9b\u6b65\u9aa4\u3002<\/li>\n<\/ul>\n<h3>\u4ec0\u4e48\u662fLLM\uff1f<\/h3>\n<p>\u5927\u8bed\u8a00\u6a21\u578b\uff08LLMs\uff09\uff0c\u5373Large Language Models\uff0c\u662f\u5148\u8fdb\u7684\u4eba\u5de5\u667a\u80fd\u7cfb\u7edf\uff0c\u7ecf\u8fc7\u8bad\u7ec3\u80fd\u591f\u7406\u89e3\u5e76\u751f\u6210\u81ea\u7136\u7684\u4eba\u7c7b\u53ef\u8bfb\u8bed\u8a00\u3002\u5b83\u4eec\u5229\u7528\u7b97\u6cd5\u6765\u5904\u7406\u548c\u7406\u89e3\u81ea\u7136\u8bed\u8a00\uff0c\u5e76\u901a\u8fc7\u5927\u91cf\u4fe1\u606f\u7684\u8bad\u7ec3\u6765\u638c\u63e1\u6570\u636e\u4e2d\u7684\u6a21\u5f0f\u548c\u5173\u7cfb\u3002<\/p>\n<p>\u50cfOpenAI\u3001Anthropic\u548cMeta\u8fd9\u6837\u7684\u516c\u53f8\u5df2\u7ecf\u5f00\u53d1\u51fa\u4e86LLMs\uff0c\u4f60\u53ef\u4ee5\u5229\u7528\u5b83\u4eec\u6765\u6267\u884c\u8bf8\u5982\u5185\u5bb9\u751f\u6210\u3001\u4ee3\u7801\u5206\u6790\u3001\u65c5\u884c\u89c4\u5212\u7b49\u4efb\u52a1\u3002<\/p>\n<h3>\u4e91\u7aefAI\u4e0e\u81ea\u6258\u7ba1AI\u7684\u6bd4\u8f83<\/h3>\n<p>\u5728\u51b3\u5b9a\u662f\u5426\u5728\u672c\u5730\u6258\u7ba1AI\u6a21\u578b\u4e4b\u524d\uff0c\u4e86\u89e3\u8fd9\u79cd\u6a21\u5f0f\u4e0e\u4e91\u7aefAI\u89e3\u51b3\u65b9\u6848\u7684\u5dee\u5f02\u81f3\u5173\u91cd\u8981\u3002\u8fd9\u4e24\u79cd\u9009\u9879\u5404\u6709\u4f18\u52bf\uff0c\u9002\u7528\u4e8e\u4e0d\u540c\u7684\u5e94\u7528\u573a\u666f\u3002<\/p>\n<h4>\u4e91\u7aefAI\u89e3\u51b3\u65b9\u6848<\/h4>\n<p>\u8fd9\u4e9b\u670d\u52a1\u7531OpenAI\u3001Google\u6216AWS\u7b49\u63d0\u4f9b\u5546\u6258\u7ba1\u548c\u7ef4\u62a4\u3002\u4f8b\u5982\uff0cOpenAI\u7684GPT\u6a21\u578b\u3001Google Bard\u548cAWS SageMaker\u7b49\u3002\u4f60\u53ef\u4ee5\u901a\u8fc7\u4e92\u8054\u7f51\u4f7f\u7528API\u6216\u5176\u7aef\u70b9\u8bbf\u95ee\u8fd9\u4e9b\u6a21\u578b\u3002<\/p>\n<h4>\u5173\u952e\u7279\u6027\uff1a<\/h4>\n<ul data-id=\"u738a58b-ILF6D6YM\">\n<li data-id=\"l04a78aa-GS8EaiPJ\"><strong>\u6613\u7528\u6027\uff1a<\/strong>\u8bbe\u7f6e\u7b80\u4fbf\uff0c\u4f60\u53ea\u9700\u901a\u8fc7API\u96c6\u6210\u6216\u901a\u8fc7\u7f51\u9875\u8bbf\u95ee\u5373\u53ef\u3002<\/li>\n<li data-id=\"l04a78aa-S0CVe1cj\"><strong>\u53ef\u6269\u5c55\u6027<\/strong>\uff1a\u7531\u4e8e\u7531\u516c\u53f8\u7ba1\u7406\uff0c\u56e0\u6b64\u80fd\u66f4\u597d\u5730\u5904\u7406\u5927\u91cf\u5de5\u4f5c\u8d1f\u8f7d\u548c\u5e76\u53d1\u8bf7\u6c42\u3002<\/li>\n<li data-id=\"l04a78aa-F9b14NgG\"><strong>\u524d\u6cbf\u6a21\u578b\uff1a<\/strong>\u4e91\u7aef\u901a\u5e38\u63d0\u4f9b\u6700\u65b0\u4e14\u529f\u80fd\u6700\u5f3a\u5927\u7684\u6a21\u578b\u3002<\/li>\n<li data-id=\"l04a78aa-N139noPD\"><strong>\u6570\u636e\u4f9d\u8d56\u6027\uff1a<\/strong>\u4f60\u7684\u6570\u636e\u4f1a\u88ab\u53d1\u9001\u5230\u4e91\u7aef\u8fdb\u884c\u5904\u7406\uff0c\u8fd9\u53ef\u80fd\u4f1a\u5f15\u53d1\u9690\u79c1\u62c5\u5fe7\u3002<\/li>\n<li data-id=\"ld70c578-XImi15aU\"><strong>\u6301\u7eed\u6210\u672c\uff1a<\/strong>\u5c3d\u7ba1\u4e00\u4e9b\u6a21\u578b\u662f\u514d\u8d39\u7684\uff0c\u4f46\u5176\u4ed6\u5927\u90e8\u5206\u6a21\u578b\u901a\u5e38\u4f1a\u6839\u636e\u8bf7\u6c42\u6216\u4f7f\u7528\u60c5\u51b5\uff08\u5982\u66f4\u5f3a\u5927\u6216\u6700\u65b0\u7684\u6a21\u578b\uff09\u8fdb\u884c\u6536\u8d39\uff0c\u4ece\u800c\u6210\u4e3a\u4e00\u9879\u8fd0\u8425\u6210\u672c\u3002<\/li>\n<\/ul>\n<h4>\u81ea\u6258\u7ba1AI<\/h4>\n<p>\u91c7\u7528\u8fd9\u79cd\u6a21\u5f0f\uff0c\u4f60\u53ef\u4ee5\u5728\u81ea\u5df1\u7684\u786c\u4ef6\u4e0a\u8fd0\u884c\u6a21\u578b\u3002\u53ef\u4ee5\u4f7f\u7528Ollama\u7b49\u5de5\u5177\u4e0b\u8f7d\u5e76\u6258\u7ba1Llama 2\u3001GPT-J\u6216Mistral\u7b49\u5f00\u6e90LLM\u3002<\/p>\n<h4>\u5173\u952e\u7279\u6027\uff1a<\/h4>\n<ul data-id=\"u738a58b-L9GmAjLd\">\n<li data-id=\"l04a78aa-FE0JAIHC\"><strong>\u6570\u636e\u9690\u79c1\uff1a<\/strong>\u4f60\u7684\u6570\u636e\u4fdd\u7559\u5728\u4f60\u7684\u57fa\u7840\u914d\u7f6e\u4e0a\uff0c\u4f7f\u4f60\u80fd\u591f\u5bf9\u5176\u8fdb\u884c\u5b8c\u5168\u63a7\u5236\u3002<\/li>\n<li data-id=\"l04a78aa-HEEhV894\"><strong>\u957f\u671f\u6210\u672c\u6548\u76ca\uff1a<\/strong>\u867d\u7136\u9700\u8981\u524d\u671f\u6295\u8d44\u786c\u4ef6\uff0c\u4f46\u53ef\u4ee5\u907f\u514d\u91cd\u590d\u7684API\u8d39\u7528\u3002<\/li>\n<li data-id=\"l04a78aa-ripsmjiE\"><strong>\u53ef\u5b9a\u5236\u6027\uff1a<\/strong>\u4f60\u53ef\u4ee5\u5bf9\u6a21\u578b\u8fdb\u884c\u5fae\u8c03\uff0c\u4f7f\u5176\u9002\u5e94\u7279\u5b9a\u9700\u6c42\u3002<\/li>\n<li data-id=\"l04a78aa-meKnZMYZ\"><strong>\u6280\u672f\u8981\u6c42\uff1a<\/strong>\u9700\u8981\u529f\u80fd\u5f3a\u5927\u7684\u786c\u4ef6\u3001\u8bbe\u7f6e\u5de5\u4f5c\u548c\u6280\u672f\u77e5\u8bc6\u3002<\/li>\n<li data-id=\"ld70c578-l6LjfjKR\"><strong>\u53ef\u6269\u5c55\u6027\u6709\u9650\uff1a<\/strong>\u6700\u9002\u5408\u7684\u5e94\u7528\u573a\u666f\u662f\u4e2a\u4eba\u6216\u5c0f\u89c4\u6a21\u4f7f\u7528\u3002<\/li>\n<\/ul>\n<h4>\u4f60\u5e94\u8be5\u9009\u62e9\u54ea\u79cd\u65b9\u6848\uff1f<\/h4>\n<p>\u5982\u679c\u4f60\u9700\u8981\u5feb\u901f\u4e14\u53ef\u6269\u5c55\u5730\u8bbf\u95ee\u9ad8\u7ea7\u6a21\u578b\uff0c\u5e76\u4e14\u4e0d\u4ecb\u610f\u5c06\u6570\u636e\u4e0e\u7b2c\u4e09\u65b9\u5171\u4eab\uff0c\u90a3\u4e48\u4e91\u7aefAI\u89e3\u51b3\u65b9\u6848\u53ef\u80fd\u662f\u66f4\u597d\u7684\u9009\u62e9\u3002\u53e6\u4e00\u65b9\u9762\uff0c\u5982\u679c\u6570\u636e\u5b89\u5168\u3001\u5b9a\u5236\u9700\u6c42\u6216\u6210\u672c\u8282\u7ea6\u662f\u4f60\u7684\u9996\u8981\u8003\u8651\u56e0\u7d20\uff0c\u90a3\u4e48\u5728\u672c\u5730\u6258\u7ba1LLM\uff08\u5927\u8bed\u8a00\u6a21\u578b\uff09\u53ef\u80fd\u662f\u66f4\u597d\u7684\u9009\u62e9\u3002<\/p>\n<h3>\u5982\u4f55\u5728\u4f60\u7684\u673a\u5668\u4e0a\u672c\u5730\u8fd0\u884cLLM\uff08\u5927\u8bed\u8a00\u6a21\u578b\uff09\uff1f<\/h3>\n<p>\u6709\u591a\u79cd\u89e3\u51b3\u65b9\u6848\u53ef\u4ee5\u8ba9\u4f60\u5728\u81ea\u6709\u7684\u57fa\u7840\u914d\u7f6e\u4e0a\u8fd0\u884c\u7279\u5b9a\u7684\u5f00\u6e90LLM\u3002<\/p>\n<p>\u5c3d\u7ba1\u5927\u591a\u6570\u672c\u5730\u6258\u7ba1\u89e3\u51b3\u65b9\u6848\u90fd\u805a\u7126\u4e8e\u5f00\u6e90LLM\uff0c\u5982Llama 2\u3001GPT-J\u6216Mistral\uff0c\u4f46\u6839\u636e\u4f7f\u7528\u6761\u6b3e\uff0c\u67d0\u4e9b\u4e13\u6709\u6216\u6388\u6743\u6a21\u578b\u4e5f\u53ef\u4ee5\u5728\u672c\u5730\u8fd0\u884c\u3002<\/p>\n<ul data-id=\"u738a58b-HS3gT8j5\">\n<li data-id=\"ld70c578-c71A4io6\"><strong>\u5f00\u6e90\u6a21\u578b\uff1a<\/strong>\u8fd9\u4e9b\u6a21\u578b\u53ef\u514d\u8d39\u83b7\u53d6\uff0c\u65e0\u9700\u8bb8\u53ef\u9650\u5236\u5373\u53ef\u4e0b\u8f7d\u3001\u4fee\u6539\u548c\u6258\u7ba1\u3002\u4f8b\u5982\uff0cLlama 2\uff08\u7531Meta\u5f00\u53d1\uff09\u3001GPT-J\u548cMistral\u7b49\u3002<\/li>\n<li data-id=\"ld70c578-f5ppC7TP\"><strong>\u63d0\u4f9b\u672c\u5730\u9009\u9879\u7684\u4e13\u6709\u6a21\u578b\uff1a<\/strong>\u6709\u4e9b\u516c\u53f8\u53ef\u80fd\u4f1a\u63d0\u4f9b\u5176\u6a21\u578b\u7684\u53ef\u4e0b\u8f7d\u7248\u672c\u4ee5\u4f9b\u79bb\u7ebf\u4f7f\u7528\uff0c\u4f46\u8fd9\u901a\u5e38\u9700\u8981\u7279\u5b9a\u7684\u8bb8\u53ef\u6216\u786c\u4ef6\u3002\u4f8b\u5982\uff0c\u82f1\u4f1f\u8fbe\uff08NVIDIA\uff09\u7684NeMo\u6846\u67b6\u63d0\u4f9b\u4e86\u5728\u5176\u57fa\u7840\u914d\u7f6e\u4e0a\u6258\u7ba1\u6a21\u578b\u7684\u5de5\u5177\uff0c\u800c\u4e00\u4e9b\u8f83\u5c0f\u7684\u516c\u53f8\u53ef\u80fd\u4f1a\u4e3a\u4f01\u4e1a\u5ba2\u6237\u63d0\u4f9b\u5176\u4e13\u6709LLM\u7684\u53ef\u4e0b\u8f7d\u7248\u672c\u3002<\/li>\n<\/ul>\n<p>\u8bf7\u8bb0\u4f4f\uff0c\u5982\u679c\u4f60\u8981\u8fd0\u884c\u81ea\u5df1\u7684LLM\uff0c\u4f60\u5c06\u9700\u8981\u4e00\u53f0\u529f\u80fd\u5f3a\u5927\u7684\u8ba1\u7b97\u673a\uff08\u914d\u5907\u826f\u597d\u7684GPU\u548cCPU\uff09\u3002\u5982\u679c\u4f60\u7684\u8ba1\u7b97\u673a\u6027\u80fd\u4e0d\u591f\u5f3a\u5927\uff0c\u4f60\u53ef\u4ee5\u5c1d\u8bd5\u8fd0\u884c\u66f4\u5c0f\u3001\u66f4\u8f7b\u91cf\u7ea7\u7684\u6a21\u578b\uff0c\u5c3d\u7ba1\u8fd9\u53ef\u80fd\u4f1a\u964d\u4f4e\u7cfb\u7edf\u7684\u8fd0\u884c\u901f\u5ea6\u3002<\/p>\n<p>\u4ee5\u4e0b\u662f\u6211\u4e3a\u672c\u6307\u5357\u4f7f\u7528\u7684\u4e00\u4e2a\u5408\u9002\u7cfb\u7edf\u914d\u7f6e\u7684\u793a\u4f8b\uff1a<\/p>\n<ul data-id=\"u738a58b-jkkkeWXR\">\n<li data-id=\"ld70c578-co6hFNJ5\">CPU\uff1aIntel Core i7 13700HX<\/li>\n<li data-id=\"ld70c578-1jB10oYk\">\u5185\u5b58\uff1a16GB DDR5<\/li>\n<li data-id=\"ld70c578-dXgR6nD9\">\u5b58\u50a8\uff1a512GB SSD<\/li>\n<li data-id=\"ld70c578-9gsU8BTI\">\u663e\u5361\uff1aNvidia RTX 3050\uff086GB\u663e\u5b58\uff09\u5728\u672c\u6307\u5357\u4e2d\uff0c\u4f60\u5c06\u4f7f\u7528Ollama\u6765\u4e0b\u8f7d\u5e76\u5728\u4f60\u7684\u7535\u8111\u4e0a\u8fd0\u884cAI\u6a21\u578b\u3002<\/li>\n<\/ul>\n<h4>\u4ec0\u4e48\u662fOllama\uff1f<\/h4>\n<p>Ollama\u662f\u4e00\u6b3e\u65e8\u5728\u7b80\u5316\u76f4\u63a5\u5728\u8ba1\u7b97\u673a\u4e0a\u8fd0\u884c\u5f00\u6e90\u5927\u578b\u8bed\u8a00\u6a21\u578b\uff08LLMs\uff09\u8fc7\u7a0b\u7684\u5de5\u5177\u3002\u5b83\u5145\u5f53\u672c\u5730\u6a21\u578b\u7ba1\u7406\u5668\u548c\u8fd0\u884c\u65f6\u73af\u5883\uff0c\u8d1f\u8d23\u4ece\u4e0b\u8f7d\u6a21\u578b\u6587\u4ef6\u5230\u8bbe\u7f6e\u53ef\u4e0e\u6a21\u578b\u4ea4\u4e92\u7684\u672c\u5730\u73af\u5883\u7b49\u4e00\u5207\u4e8b\u52a1\u3002<\/p>\n<p>Ollama\u53ef\u5e2e\u52a9\u4f60\u5b8c\u6210\u4ee5\u4e0b\u4efb\u52a1\uff1a<\/p>\n<ul data-id=\"u738a58b-Zg4cQWkM\">\n<li data-id=\"ld70c578-71EUi6XE\"><strong>\u7ba1\u7406\u6a21\u578b\uff1a<\/strong>Ollama\u63d0\u4f9b\u4e86\u4e00\u79cd\u7b80\u5355\u7684\u65b9\u6cd5\u6765\u6d4f\u89c8\u3001\u4e0b\u8f7d\u548c\u7ba1\u7406\u4e0d\u540c\u7684\u5f00\u6e90\u6a21\u578b\u3002\u4f60\u53ef\u4ee5\u5728\u5176\u5b98\u65b9\u7f51\u7ad9\u4e0a\u67e5\u770b\u652f\u6301\u7684\u6a21\u578b\u5217\u8868\u3002<\/li>\n<li data-id=\"ld70c578-ebXGREhu\"><strong>\u8f7b\u677e\u90e8\u7f72\uff1a<\/strong>\u53ea\u9700\u51e0\u6761\u547d\u4ee4\uff0c\u4f60\u5c31\u53ef\u4ee5\u8bbe\u7f6e\u4e00\u4e2a\u529f\u80fd\u9f50\u5168\u7684\u73af\u5883\u6765\u8fd0\u884c\u548c\u4e0eLLMs\u8fdb\u884c\u4ea4\u4e92\u3002<\/li>\n<li data-id=\"ld70c578-chfeKFUs\"><strong>\u672c\u5730\u6258\u7ba1\uff1a<\/strong>\u6a21\u578b\u5b8c\u5168\u5728\u4f60\u7684\u57fa\u7840\u914d\u7f6e\u4e0a\u8fd0\u884c\uff0c\u786e\u4fdd\u4f60\u7684\u6570\u636e\u4fdd\u6301\u79c1\u5bc6\u548c\u5b89\u5168\u3002<\/li>\n<li data-id=\"ld70c578-sq7R3OFI\"><strong>\u96c6\u6210\u4e0d\u540c\u6a21\u578b\uff1a<\/strong>\u5b83\u652f\u6301\u4f7f\u7528Python\u6216JavaScript\u7b49\u7f16\u7a0b\u8bed\u8a00\u5c06\u6a21\u578b\u96c6\u6210\u5230\u4f60\u81ea\u5df1\u7684\u9879\u76ee\u4e2d\u3002<\/li>\n<\/ul>\n<p>\u901a\u8fc7\u4f7f\u7528Ollama\uff0c\u4f60\u65e0\u9700\u6df1\u5165\u4e86\u89e3\u8bbe\u7f6e\u673a\u5668\u5b66\u4e60\u6846\u67b6\u6216\u7ba1\u7406\u4f9d\u8d56\u9879\u7684\u590d\u6742\u6027\u3002\u5b83\u7b80\u5316\u4e86\u8be5\u8fc7\u7a0b\uff0c\u7279\u522b\u662f\u5bf9\u4e8e\u90a3\u4e9b\u5e0c\u671b\u5c1d\u8bd5LLMs\u800c\u65e0\u9700\u6df1\u539a\u6280\u672f\u80cc\u666f\u7684\u4eba\u6765\u8bf4\u3002<\/p>\n<p>\u4f60\u53ef\u4ee5\u901a\u8fc7\u5176<u>\u7f51\u7ad9<\/u>\u4e0a\u7684\u201c\u4e0b\u8f7d\u201d\u6309\u94ae\u975e\u5e38\u65b9\u4fbf\u5730\u5b89\u88c5Ollama\u3002<\/p>\n<p><img data-dominant-color=\"eeeeee\" data-has-transparency=\"true\" style=\"--dominant-color: #eeeeee;\" loading=\"lazy\" decoding=\"async\" class=\"has-transparency alignnone size-full wp-image-23979\" src=\"https:\/\/aiforumimage.oss-cn-shanghai.aliyuncs.com\/wp-content\/uploads\/2025\/01\/a9e0b153942cf95fc4967607388659bc96a64b.png\" width=\"774\" height=\"654\" srcset=\"https:\/\/aiforumimage.oss-cn-shanghai.aliyuncs.com\/wp-content\/uploads\/2025\/01\/a9e0b153942cf95fc4967607388659bc96a64b.png 774w, https:\/\/aiforumimage.oss-cn-shanghai.aliyuncs.com\/wp-content\/uploads\/2025\/01\/a9e0b153942cf95fc4967607388659bc96a64b-300x253.png 300w, https:\/\/aiforumimage.oss-cn-shanghai.aliyuncs.com\/wp-content\/uploads\/2025\/01\/a9e0b153942cf95fc4967607388659bc96a64b-150x127.png 150w, https:\/\/aiforumimage.oss-cn-shanghai.aliyuncs.com\/wp-content\/uploads\/2025\/01\/a9e0b153942cf95fc4967607388659bc96a64b-768x649.png 768w\" sizes=\"auto, (max-width: 774px) 100vw, 774px\" \/><\/p>\n<h4>\u5982\u4f55\u4f7f\u7528Ollama\u5b89\u88c5\/\u8fd0\u884c\u4f60\u7684\u6a21\u578b<\/h4>\n<p>\u5728\u5b89\u88c5\u5b8cOllama\u4e4b\u540e\uff0c\u8bf7\u9075\u5faa\u4ee5\u4e0b\u6b65\u9aa4\u6765\u5b89\u88c5\u5e76\u4f7f\u7528\u4f60\u7684\u6a21\u578b\uff1a<\/p>\n<p>1.\u5f00\u4f60\u7684\u6d4f\u89c8\u5668\uff0c\u5e76\u8bbf\u95eelocalhost:11434\u4ee5\u786e\u4fddOllama\u6b63\u5728\u8fd0\u884c\u3002<\/p>\n<p>2.\u63a5\u4e0b\u6765\uff0c\u6253\u5f00\u547d\u4ee4\u63d0\u793a\u7b26\uff0c\u5e76\u8f93\u5165ollama run &lt;model_name&gt;\u3002\u5728\u8fd9\u91cc\uff0c\u5c06&lt;model_name&gt;\u66ff\u6362\u4e3aOllama\u6240\u652f\u6301\u7684\u4f60\u60f3\u8981\u8fd0\u884c\u7684\u6a21\u578b\u540d\u79f0\uff0c\u4f8b\u5982Meta\u7684Llama2\u6216Mistral\u3002<\/p>\n<p><img data-dominant-color=\"121212\" data-has-transparency=\"false\" style=\"--dominant-color: #121212;\" loading=\"lazy\" decoding=\"async\" class=\"not-transparent alignnone size-full wp-image-23980\" src=\"https:\/\/aiforumimage.oss-cn-shanghai.aliyuncs.com\/wp-content\/uploads\/2025\/01\/560277500ee5118b1ec079566c4873958b9c61.png\" width=\"812\" height=\"85\" srcset=\"https:\/\/aiforumimage.oss-cn-shanghai.aliyuncs.com\/wp-content\/uploads\/2025\/01\/560277500ee5118b1ec079566c4873958b9c61.png 812w, https:\/\/aiforumimage.oss-cn-shanghai.aliyuncs.com\/wp-content\/uploads\/2025\/01\/560277500ee5118b1ec079566c4873958b9c61-300x31.png 300w, https:\/\/aiforumimage.oss-cn-shanghai.aliyuncs.com\/wp-content\/uploads\/2025\/01\/560277500ee5118b1ec079566c4873958b9c61-150x16.png 150w, https:\/\/aiforumimage.oss-cn-shanghai.aliyuncs.com\/wp-content\/uploads\/2025\/01\/560277500ee5118b1ec079566c4873958b9c61-768x80.png 768w\" sizes=\"auto, (max-width: 812px) 100vw, 812px\" \/><\/p>\n<p>3.\u7b49\u5f85\u5b89\u88c5\u8fc7\u7a0b\u5b8c\u6210\u3002<\/p>\n<p>4.\u5728\u51fa\u73b0&gt;&gt;&gt; Send a message (\/? for help)\u7684\u63d0\u793a\u7b26\u65f6\uff0c\u5411AI\u8f93\u5165\u4e00\u6761\u6d88\u606f\uff0c\u5e76\u6309\u4e0bEnter\u952e\u3002<\/p>\n<p>\u4f60\u5df2\u7ecf\u6210\u529f\u5b89\u88c5\u4e86\u6a21\u578b\uff0c\u73b0\u5728\u53ef\u4ee5\u4e0e\u5b83\u8fdb\u884c\u804a\u5929\u4e86\uff01<\/p>\n<h3>\u7528\u65b0\u5b89\u88c5\u7684\u6a21\u578b\u521b\u5efa\u804a\u5929\u673a\u5668\u4eba<\/h3>\n<p>\u5728\u4f60\u4e2a\u4eba\u7684\u57fa\u7840\u67b6\u6784\u4e2d\u8fd0\u884c\u5f00\u6e90\u6a21\u578b\uff0c\u4f60\u53ef\u4ee5\u968f\u610f\u66f4\u6539\u548c\u4f7f\u7528\u5b83\u3002\u751a\u81f3\u53ef\u4ee5\u5229\u7528Python\u3001JavaScript\u548c\u5176\u4ed6\u8bed\u8a00\u4e2d\u7684ollama\u6a21\u5757\uff0c\u4e3a\u4e2a\u4eba\u5e94\u7528\u800c\u521b\u5efa\u672c\u5730\u804a\u5929\u673a\u5668\u4eba\u6216\u5e94\u7528\u7a0b\u5e8f\u3002<\/p>\n<p>\u73b0\u5728\uff0c\u8ba9\u6211\u4eec\u6765\u4e86\u89e3\u4e00\u4e0b\u5982\u4f55\u5728\u51e0\u5206\u949f\u5185\u4f7f\u7528\u5b83\u5728Python\u4e2d\u6784\u5efa\u4e00\u4e2a\u804a\u5929\u673a\u5668\u4eba\u3002<\/p>\n<h4>\u6b65\u9aa41\uff1a\u5b89\u88c5Python<\/h4>\n<p>\u5982\u679c\u5c1a\u672a\u5b89\u88c5Python\uff0c\u8bf7\u4ecePython\u5b98\u65b9\u7f51\u7ad9\u4e0b\u8f7d\u5e76\u5b89\u88c5\u3002\u4e3a\u786e\u4fdd\u6700\u4f73\u517c\u5bb9\u6027\uff0c\u8bf7\u907f\u514d\u4f7f\u7528\u6700\u65b0\u7684Python\u7248\u672c\uff0c\u56e0\u4e3a\u67d0\u4e9b\u6a21\u5757\u53ef\u80fd\u5c1a\u672a\u5b8c\u5168\u652f\u6301\u5b83\u3002\u76f8\u53cd\uff0c\u8bf7\u9009\u62e9\u6700\u65b0\u7684\u7a33\u5b9a\u7248\u672c\uff08\u901a\u5e38\u662f\u6700\u65b0\u53d1\u5e03\u7248\u672c\u4e4b\u524d\u7684\u7248\u672c\uff09\uff0c\u4ee5\u786e\u4fdd\u6240\u6709\u5fc5\u9700\u6a21\u5757\u90fd\u80fd\u987a\u7545\u8fd0\u884c\u3002<\/p>\n<p>\u5728\u5b89\u88c5Python\u65f6\uff0c\u8bf7\u786e\u4fdd\u4e3a\u5b89\u88c5\u7a0b\u5e8f\u63d0\u4f9b\u7ba1\u7406\u5458\u6743\u9650\uff0c\u5e76\u52fe\u9009\u201c\u6dfb\u52a0\u5230PATH\u201d\u590d\u9009\u6846\u3002<\/p>\n<h4>\u6b65\u9aa42\uff1a\u5b89\u88c5Ollama<\/h4>\n<p>\u63a5\u4e0b\u6765\uff0c\u4f60\u9700\u8981\u5728\u4fdd\u5b58\u6587\u4ef6\u7684\u76ee\u5f55\u4e2d\u6253\u5f00\u4e00\u4e2a\u65b0\u7684\u7ec8\u7aef\u7a97\u53e3\uff0c\u5728\u6587\u4ef6\u8d44\u6e90\u7ba1\u7406\u5668\u4e2d\u6253\u5f00\u8be5\u76ee\u5f55\uff0c\u53f3\u952e\u5355\u51fb\u540e\u9009\u62e9\u201c\u5728\u7ec8\u7aef\u4e2d\u6253\u5f00\u201d\uff08\u5982\u679c\u4f60\u4f7f\u7528\u7684\u662fWindows 10\u6216\u66f4\u65e9\u7248\u672c\uff0c\u5219\u70b9\u51fb\u201c\u4f7f\u7528\u547d\u4ee4\u63d0\u793a\u7b26\u6216PowerShell\u6253\u5f00\u201d\uff09\u3002<\/p>\n<p>\u8f93\u5165pip install ollama\u5e76\u6309Enter\u952e\u3002\u8fd9\u5c06\u4e3aPython\u5b89\u88c5ollama\u6a21\u5757\uff0c\u4ee5\u4fbf\u4f60\u53ef\u4ee5\u4ecePython\u8bbf\u95ee\u6a21\u578b\u4ee5\u53ca\u8be5\u5de5\u5177\u63d0\u4f9b\u7684\u51fd\u6570\u3002\u8bf7\u7b49\u5f85\u8be5\u8fc7\u7a0b\u5b8c\u6210\u3002<\/p>\n<h4>\u6b65\u9aa43\uff1a\u6dfb\u52a0Python\u4ee3\u7801<\/h4>\n<p>\u5728\u4f60\u7684\u6587\u4ef6\u7cfb\u7edf\u4e2d\u5bb9\u6613\u8bbf\u95ee\u7684\u4f4d\u7f6e\u521b\u5efa\u4e00\u4e2a\u5e26\u6709.py\u6269\u5c55\u540d\u7684Python\u6587\u4ef6\u3002\u4f7f\u7528\u4f60\u559c\u6b22\u7684\u4ee3\u7801\u7f16\u8f91\u5668\u6253\u5f00\u8be5\u6587\u4ef6\uff0c\u5982\u679c\u6ca1\u6709\u5b89\u88c5\u4ee3\u7801\u7f16\u8f91\u5668\uff0c\u53ef\u4ee5\u4f7f\u7528\u6d4f\u89c8\u5668\u4e2d\u7684VS Code\u5728\u7ebf\u7248\u672c\u3002<\/p>\n<p>\u73b0\u5728\uff0c\u5728\u4f60\u7684Python\u6587\u4ef6\u4e2d\u6dfb\u52a0\u4ee5\u4e0b\u4ee3\u7801\uff1a<\/p>\n<div>\n<div class=\"hljs-cto\">\n<div class=\"hljs-cto\"><button class=\"copy_btn disable\" data-clipboard-target=\"#code_id_0\">\u590d\u5236<\/button><\/p>\n<div class=\"code-toolbar\">\n<pre class=\"has-pre-numbering language-plain\" tabindex=\"0\"><code class=\"language-plain\">from ollama import chat\r\n\r\ndef stream_response(user_input):\r\n \"\"\"Stream the response from the chat model and display it in the CLI.\"\"\"\r\n try:\r\n print(\"\\nAI: \", end=\"\", flush=True)\r\n stream = chat(model='llama2', messages=[{'role': 'user', 'content': user_input}], stream=True)\r\n for chunk in stream:\r\n content = chunk['message']['content']\r\n print(content, end='', flush=True)\r\n print() \r\n except Exception as e:\r\n print(f\"\\nError: {str(e)}\")\r\n\r\ndef main():\r\n print(\"Welcome to your CLI AI Chatbot! Type 'exit' to quit.\\n\")\r\n while True:\r\n user_input = input(\"You: \")\r\n if user_input.lower() in {\"exit\", \"quit\"}:\r\n print(\"Goodbye!\")\r\n break\r\n stream_response(user_input)\r\nif __name__ == \"__main__\":\r\nmain()<\/code><\/pre>\n<ul id=\"code_id_0\" class=\"pre-numbering\">\n<li>1.<\/li>\n<li>2.<\/li>\n<li>3.<\/li>\n<li>4.<\/li>\n<li>5.<\/li>\n<li>6.<\/li>\n<li>7.<\/li>\n<li>8.<\/li>\n<li>9.<\/li>\n<li>10.<\/li>\n<li>11.<\/li>\n<li>12.<\/li>\n<li>13.<\/li>\n<li>14.<\/li>\n<li>15.<\/li>\n<li>16.<\/li>\n<li>17.<\/li>\n<li>18.<\/li>\n<li>19.<\/li>\n<li>20.<\/li>\n<li>21.<\/li>\n<li>22.<\/li>\n<li>23.<\/li>\n<li>24.<\/li>\n<\/ul>\n<div class=\"toolbar\"><\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<p>\u5982\u679c\u4f60\u4e0d\u7406\u89e3Python\u4ee3\u7801\uff0c\u8fd9\u91cc\u57fa\u672c\u4e0a\u89e3\u91ca\u4e86\u5b83\u7684\u529f\u80fd\uff1a<\/p>\n<ul data-id=\"u738a58b-dpQUkb4O\">\n<li data-id=\"ld70c578-IPpRAdZN\">\u9996\u5148\uff0c\u4eceollama\u5e93\u4e2d\u5bfc\u5165\u804a\u5929\u6a21\u5757\uff0c\u8be5\u6a21\u5757\u5305\u542b\u4e0e\u8ba1\u7b97\u673a\u4e0a\u7684Ollama\u5e94\u7528\u7a0b\u5e8f\u96c6\u6210\u7684\u9884\u5199\u4ee3\u7801\u3002<\/li>\n<li data-id=\"ld70c578-qCh9eonH\">\u7136\u540e\u58f0\u660e\u4e00\u4e2astream_response\u51fd\u6570\uff0c\u8be5\u51fd\u6570\u5c06\u4f60\u7684\u63d0\u793a\u4f20\u9012\u7ed9\u6307\u5b9a\u7684\u6a21\u578b\uff0c\u5e76\u4ee5\u6d41\u5f0f\u4f20\u8f93\uff08\u5373\u751f\u6210\u65f6\u9010\u5757\u63d0\u4f9b\u54cd\u5e94\uff09\u7684\u65b9\u5f0f\u5c06\u5b9e\u65f6\u54cd\u5e94\u8fd4\u56de\u7ed9\u4f60\u3002<\/li>\n<li data-id=\"ld70c578-kL9St1JD\">\u63a5\u7740\u5728\u4e3b\u51fd\u6570\u4e2d\uff0c\u5411\u7ec8\u7aef\u6253\u5370\u6b22\u8fce\u6587\u672c\u3002\u5b83\u83b7\u53d6\u7528\u6237\u8f93\u5165\uff0c\u5e76\u5c06\u5176\u4f20\u9012\u7ed9stream_response\u51fd\u6570\uff0c\u6240\u6709\u8fd9\u4e9b\u90fd\u88ab\u5305\u88f9\u5728\u4e00\u4e2awhile True\u6216\u65e0\u9650\u5faa\u73af\u4e2d\u3002\u8fd9\u5141\u8bb8\u6211\u4eec\u5411AI\u63d0\u95ee\uff0c\u800c\u4e0d\u4f1a\u4e2d\u65ad\u6267\u884c\u8fc7\u7a0b\u3002\u6211\u4eec\u8fd8\u6307\u5b9a\uff0c\u5982\u679c\u7528\u6237\u8f93\u5165\u5305\u542b\u201cexit\u201d\u6216\u201cquit\u201d\uff0c\u4ee3\u7801\u5c06\u505c\u6b62\u6267\u884c\u3002<\/li>\n<\/ul>\n<h4>\u7b2c4\u6b65\uff1a\u7f16\u5199\u63d0\u793a<\/h4>\n<p>\u73b0\u5728\u56de\u5230\u7ec8\u7aef\u7a97\u53e3\uff0c\u8f93\u5165python filename.py\uff0c\u5c06filename\u66ff\u6362\u4e3a\u4f60\u8bbe\u7f6e\u7684\u5b9e\u9645\u6587\u4ef6\u540d\uff0c\u7136\u540e\u6309Enter\u952e\u3002<\/p>\n<p>\u4f60\u5e94\u8be5\u4f1a\u770b\u5230\u4e00\u4e2a\u63d0\u793a\u8bf4\u201cYou:\u201d\uff0c\u5c31\u50cf\u6211\u4eec\u5728\u4ee3\u7801\u4e2d\u63d0\u5230\u7684\u90a3\u6837\u3002\u8f93\u5165\u4f60\u7684\u63d0\u793a\u5e76\u6309Enter\u952e\u3002\u4f60\u5e94\u8be5\u80fd\u770b\u5230AI\u54cd\u5e94\u6b63\u5728\u88ab\u6d41\u5f0f\u4f20\u8f93\u3002\u8981\u505c\u6b62\u6267\u884c\uff0c\u8bf7\u8f93\u5165\u63d0\u793a\u201cexit\u201d\uff0c\u6216\u5173\u95ed\u7ec8\u7aef\u7a97\u53e3\u3002<\/p>\n<p>\u4f60\u751a\u81f3\u53ef\u4ee5\u5b89\u88c5JavaScript\u6216\u5176\u4ed6\u652f\u6301\u8bed\u8a00\u7684\u6a21\u5757\uff0c\u5e76\u5728\u4f60\u7684\u4ee3\u7801\u4e2d\u96c6\u6210AI\u3002\u8bf7\u968f\u610f\u67e5\u9605Ollama\u5b98\u65b9\u6587\u6863\uff0c\u4e86\u89e3\u4f60\u53ef\u4ee5\u4f7f\u7528AI\u6a21\u578b\u7f16\u5199\u4ec0\u4e48\u4ee3\u7801\u3002<\/p>\n<h3>\u5982\u4f55\u901a\u8fc7\u5fae\u8c03\u81ea\u5b9a\u4e49\u6a21\u578b<\/h3>\n<h4>\u4ec0\u4e48\u662f\u5fae\u8c03\uff1f<\/h4>\n<p>\u5fae\u8c03\u662f\u6307\u5c06\u4e00\u4e2a\u9884\u8bad\u7ec3\u7684\u8bed\u8a00\u6a21\u578b\u5728\u7279\u5b9a\u4e14\u81ea\u5b9a\u4e49\u7684\u6570\u636e\u96c6\u4e0a\u8fdb\u884c\u8fdb\u4e00\u6b65\u8bad\u7ec3\uff0c\u4ee5\u6ee1\u8db3\u7279\u5b9a\u9700\u6c42\u7684\u8fc7\u7a0b\u3002\u867d\u7136\u5927\u578b\u8bed\u8a00\u6a21\u578b\uff08LLMs\uff09\u5df2\u7ecf\u5728\u5927\u89c4\u6a21\u6570\u636e\u96c6\u4e0a\u8fdb\u884c\u4e86\u8bad\u7ec3\uff0c\u4f46\u5b83\u4eec\u53ef\u80fd\u5e76\u4e0d\u603b\u662f\u5b8c\u5168\u7b26\u5408\u4f60\u7684\u9700\u6c42\uff0c\u8fd9\u65f6\u53ef\u4ee5\u901a\u8fc7\u5fae\u8c03\u8ba9\u6a21\u578b\u66f4\u9002\u5408\u4f60\u7684\u7279\u5b9a\u7528\u4f8b\u3002<\/p>\n<h4>\u5982\u4f55\u5fae\u8c03\u6a21\u578b<\/h4>\n<p>\u5fae\u8c03\u6a21\u578b\u9700\u8981\u4ee5\u4e0b\u8981\u7d20\uff1a<\/p>\n<ul data-id=\"u738a58b-TnEckVE6\">\n<li data-id=\"ld70c578-6j8apcv2\"><strong>\u9884\u8bad\u7ec3\u6a21\u578b\uff1a<\/strong>\u5efa\u8bae\u4ece\u5f3a\u5927\u7684\u5f00\u6e90LLM\u5f00\u59cb\uff0c\u5982LLaMA\u3001Mistral\u6216Falcon\u3002<\/li>\n<li data-id=\"ld70c578-P8CNheB3\"><strong>\u4f18\u8d28\u6570\u636e\u96c6\uff1a<\/strong>\u6570\u636e\u96c6\u662f\u7528\u4e8e\u8bad\u7ec3\u3001\u6d4b\u8bd5\u6216\u8bc4\u4f30\u673a\u5668\u5b66\u4e60\u6a21\u578b\uff08\u5305\u62ecLLMs\uff09\u7684\u6570\u636e\u96c6\u5408\u3002\u6570\u636e\u96c6\u7684\u8d28\u91cf\u548c\u76f8\u5173\u6027\u76f4\u63a5\u5f71\u54cd\u6a21\u578b\u5728\u7ed9\u5b9a\u4efb\u52a1\u4e0a\u7684\u8868\u73b0\u3002\u8bf7\u4f7f\u7528\u4e0e\u4f60\u9886\u57df\u6216\u4efb\u52a1\u76f8\u5173\u7684\u6570\u636e\u96c6\u3002\u4f8b\u5982\uff0c\u5982\u679c\u4f60\u5e0c\u671b\u7528AI\u64b0\u5199\u535a\u5ba2\u6587\u7ae0\uff0c\u90a3\u4e48\u5c31\u7528\u5b83\u8bad\u7ec3\u9ad8\u8d28\u91cf\u535a\u5ba2\u5185\u5bb9\u3002<\/li>\n<li data-id=\"ld70c578-lIOeRWCL\"><strong>\u5145\u8db3\u7684\u8d44\u6e90\uff1a<\/strong>\u5fae\u8c03\u6d89\u53ca\u91cd\u65b0\u8bad\u7ec3\u6a21\u578b\uff0c\u8fd9\u9700\u8981\u5927\u91cf\u7684\u8ba1\u7b97\u8d44\u6e90\uff08\u6700\u597d\u662f\u914d\u6709\u5f3a\u5927GPU\u7684\u8ba1\u7b97\u673a\uff09\u3002<br \/>\n\u4f60\u53ef\u4ee5\u4f7f\u7528\u591a\u79cd\u5de5\u5177\u6765\u5fae\u8c03\u4f60\u7684\u6a21\u578b\u3002Unsloth\u5c31\u662f\u8fd9\u6837\u4e00\u4e2a\u5feb\u901f\u9009\u9879\uff0c\u5b83\u53ef\u7528\u4e8e\u4f7f\u7528\u4efb\u4f55\u6570\u636e\u96c6\u6765\u5fae\u8c03\u6a21\u578b\u3002<\/li>\n<\/ul>\n<h3>\u81ea\u6258\u7ba1LLMs\u7684\u597d\u5904\u662f\u4ec0\u4e48\uff1f<\/h3>\n<p>\u5982\u4e0a\u6240\u8ff0\uff0c\u81ea\u6258\u7ba1LLMs\u6709\u591a\u79cd\u539f\u56e0\u3002\u7b80\u800c\u8a00\u4e4b\uff0c\u4ee5\u4e0b\u662f\u5176\u4e2d\u4e00\u4e9b\u4e3b\u8981\u597d\u5904\uff1a<\/p>\n<ul data-id=\"u738a58b-IfrqYuAR\">\n<li data-id=\"ld70c578-Wom90uoL\"><strong>\u589e\u5f3a\u7684\u6570\u636e\u9690\u79c1\u548c\u5b89\u5168\uff1a<\/strong>\u56e0\u4e3a\u4f60\u7684\u6570\u636e\u4e0d\u4f1a\u79bb\u5f00\u4f60\u7684\u8ba1\u7b97\u673a\uff0c\u4f60\u53ef\u4ee5\u5b8c\u5168\u63a7\u5236\u5b83\u3002<\/li>\n<li data-id=\"ld70c578-nyHNhUf5\"><strong>\u8282\u7701\u6210\u672c\uff1a<\/strong>\u4f60\u65e0\u9700\u5b9a\u671f\u652f\u4ed8API\u8ba2\u9605\u8d39\u7528\u3002\u76f8\u53cd\uff0c\u8fd9\u662f\u4e00\u6b21\u6027\u4ed8\u8d39\uff0c\u8db3\u591f\u83b7\u5f97\u5f3a\u5927\u7684\u57fa\u7840\u914d\u7f6e\uff0c\u4ece\u800c\u5728\u957f\u671f\u5185\u5e2e\u52a9\u4f60\u8fd0\u884c\u3002<\/li>\n<li data-id=\"ld70c578-Jzfg2lxx\"><strong>\u9ad8\u5ea6\u53ef\u5b9a\u5236\u6027\uff1a<\/strong>\u4f60\u53ef\u4ee5\u901a\u8fc7\u5fae\u8c03\u6216\u5728\u81ea\u5df1\u7684\u6570\u636e\u96c6\u4e0a\u8bad\u7ec3\u6765\u6839\u636e\u7279\u5b9a\u9700\u6c42\u5b9a\u5236\u6a21\u578b\u3002<\/li>\n<li data-id=\"ld70c578-d6Jiajh8\"><strong>\u66f4\u4f4e\u7684\u5ef6\u8fdf<\/strong><\/li>\n<\/ul>\n<h3>\u4f55\u65f6\u4e0d\u5e94\u4f7f\u7528\u81ea\u6258\u7ba1AI\uff1f<\/h3>\n<p>\u51fa\u4e8e\u591a\u79cd\u539f\u56e0\uff0c\u81ea\u6258\u7ba1AI\u53ef\u80fd\u5e76\u4e0d\u9002\u5408\u4f60\u3002\u9996\u5148\uff0c\u4f60\u6216\u8bb8\u4e0d\u5177\u5907\u8fd0\u884c\u6a21\u578b\u6240\u9700\u7684\u7cfb\u7edf\u8d44\u6e90\uff0c\u6216\u8005\u4f60\u4e0d\u539f\u4e5f\u65e0\u6cd5\u5bf9\u7cfb\u7edf\u8fdb\u884c\u5347\u7ea7\u3002<\/p>\n<p>\u5176\u6b21\uff0c\u4f60\u53ef\u80fd\u7f3a\u4e4f\u8bbe\u7f6e\u81ea\u8eab\u6a21\u578b\u4ee5\u53ca\u5bf9\u5176\u8fdb\u884c\u5fae\u8c03\u6240\u5fc5\u9700\u7684\u6280\u672f\u77e5\u8bc6\uff0c\u4ea6\u6216\u4e5f\u6ca1\u6709\u8db3\u591f\u7684\u65f6\u95f4\u6295\u5165\u5176\u4e2d\u3002\u867d\u7136\u8fd9\u5e76\u975e\u96be\u4ee5\u5b8c\u6210\u4e4b\u4e8b\uff0c\u4f46\u786e\u5b9e\u4e5f\u9700\u8981\u4e00\u4e9b\u80cc\u666f\u77e5\u8bc6\u548c\u7279\u5b9a\u6280\u80fd\u3002\u5982\u679c\u4f60\u4e0d\u4e86\u89e3\u5982\u4f55\u6392\u9664\u53ef\u80fd\u51fa\u73b0\u7684\u9519\u8bef\uff0c\u8fd9\u4e5f\u4f1a\u6210\u4e3a\u4e00\u4e2a\u68d8\u624b\u7684\u95ee\u9898\u3002<\/p>\n<p>\u6b64\u5916\uff0c\u5982\u679c\u4f60\u9700\u8981\u6a21\u578b\u5168\u5929\u5019\u4e0d\u95f4\u65ad\u8fd0\u884c\uff0c\u800c\u4f60\u53ef\u80fd\u7f3a\u4e4f\u5904\u7406\u5176\u57fa\u7840\u914d\u7f6e\u7684\u80fd\u529b\u3002<\/p>\n<p>\u4e0a\u8ff0\u8fd9\u4e9b\u95ee\u9898\u5e76\u975e\u65e0\u6cd5\u89e3\u51b3\uff0c\u4f46\u5b83\u4eec\u5f88\u53ef\u80fd\u4f1a\u5bf9\u4f60\u5728\u9009\u62e9\u4f7f\u7528\u57fa\u4e8e\u4e91\u7684\u89e3\u51b3\u65b9\u6848\u8fd8\u662f\u6258\u7ba1\u81ea\u5df1\u7684\u6a21\u578b\u8fd9\u4e00\u51b3\u7b56\u4e0a\u4ea7\u751f\u5f71\u54cd\u3002<\/p>\n<h3>\u7ed3\u8bba<\/h3>\n<p>\u5982\u679c\u4f60\u9ad8\u5ea6\u91cd\u89c6\u6570\u636e\u9690\u79c1\u3001\u6210\u672c\u6548\u76ca\u4ee5\u53ca\u5b9a\u5236\u5316\uff0c\u90a3\u4e48\u81ea\u884c\u6258\u7ba1\u5927\u578b\u8bed\u8a00\u6a21\u578b\uff08LLMs\uff09\u6216\u8bb8\u4f1a\u5e26\u6765\u98a0\u8986\u6027\u7684\u53d8\u5316\u3002<\/p>\n<p>\u8bf8\u5982Ollama\u4e4b\u7c7b\u7684\u5de5\u5177\uff0c\u4f7f\u5f97\u5c06\u5f3a\u5927\u7684AI\u6a21\u578b\u90e8\u7f72\u5230\u4f60\u7684\u4e2a\u4eba\u57fa\u7840\u914d\u7f6e\u4e0a\u53d8\u5f97\u524d\u6240\u672a\u6709\u7684\u7b80\u5355\u3002\u5c3d\u7ba1\u81ea\u884c\u6258\u7ba1\u4e5f\u9762\u4e34\u4e00\u4e9b\u6311\u6218\uff0c\u4f46\u5b83\u80fd\u8ba9\u4f60\u638c\u63a7\u81ea\u5df1\u7684\u6570\u636e\uff0c\u5e76\u7075\u6d3b\u5730\u6839\u636e\u9700\u6c42\u8c03\u6574\u6a21\u578b\u3002<\/p>\n<p>\u53ea\u662f\u5728\u51b3\u5b9a\u91c7\u7528\u8fd9\u79cd\u65b9\u5f0f\u4e4b\u524d\uff0c\u8bf7\u52a1\u5fc5\u8bc4\u4f30\u4f60\u7684\u6280\u672f\u80fd\u529b\u3001\u786c\u4ef6\u8d44\u6e90\u548c\u9879\u76ee\u9700\u6c42\u3002\u5018\u82e5\u4f60\u9700\u8981\u53ef\u9760\u6027\u3001\u53ef\u6269\u5c55\u6027\u4ee5\u53ca\u5feb\u901f\u8bbf\u95ee\u524d\u6cbf\u529f\u80fd\u7684\u80fd\u529b\uff0c\u90a3\u4e48\u57fa\u4e8e\u4e91\u7684\u5927\u578b\u8bed\u8a00\u6a21\u578b\u6216\u8bb8\u4ecd\u7136\u662f\u66f4\u4f18\u7684\u9009\u62e9\u3002<\/p>\n<p>\u5982\u679c\u4f60\u559c\u6b22\u8fd9\u7bc7\u6587\u7ae0\uff0c\u5343\u4e07\u522b\u5fd8\u4e86\u8868\u8fbe\u4f60\u7684\u652f\u6301\uff0c\u5e76\u5728X\u5e73\u53f0\u548cLinkedIn\u4e0a\u5173\u6ce8\u6211\uff0c\u4ee5\u4fbf\u4e0e\u6211\u4fdd\u6301\u8054\u7cfb\u3002\u6b64\u5916\uff0c\u6211\u8fd8\u4f1a\u5728YouTube\u4e0a\u53d1\u5e03\u7b80\u77ed\u4f46\u4fe1\u606f\u4e30\u5bcc\u7684\u6280\u672f\u5185\u5bb9\uff0c\u522b\u5fd8\u4e86\u67e5\u770b\u6211\u7684\u89c6\u9891\u3002<\/p>\n<h3>\u8bd1\u8005\u4ecb\u7ecd<\/h3>\n<p>\u5218\u6d9b\uff0c51CTO\u793e\u533a\u7f16\u8f91\uff0c\u67d0\u5927\u578b\u592e\u4f01\u7cfb\u7edf\u4e0a\u7ebf\u68c0\u6d4b\u7ba1\u63a7\u8d1f\u8d23\u4eba\u3002<\/p>\n<p>\u6587\u7ae0\u6765\u81ea\uff1a51CTO<\/p>\n<\/div>\n<\/div>\n<div class=\"pvc_clear\"><\/div>\n<p id=\"pvc_stats_23976\" class=\"pvc_stats total_only  \" data-element-id=\"23976\" style=\"\"><i class=\"pvc-stats-icon medium\" aria-hidden=\"true\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" version=\"1.0\" viewBox=\"0 0 502 315\" preserveAspectRatio=\"xMidYMid meet\"><g transform=\"translate(0,332) scale(0.1,-0.1)\" fill=\"\" stroke=\"none\"><path d=\"M2394 3279 l-29 -30 -3 -207 c-2 -182 0 -211 15 -242 39 -76 157 -76 196 0 15 31 17 60 15 243 l-3 209 -33 29 c-26 23 -41 29 -80 29 -41 0 -53 -5 -78 -31z\"\/><path d=\"M3085 3251 c-45 -19 -58 -50 -96 -229 -47 -217 -49 -260 -13 -295 52 -53 146 -42 177 20 16 31 87 366 87 410 0 70 -86 122 -155 94z\"\/><path d=\"M1751 3234 c-13 -9 -29 -31 -37 -50 -12 -29 -10 -49 21 -204 19 -94 39 -189 45 -210 14 -50 54 -80 110 -80 34 0 48 6 76 34 21 21 34 44 34 59 0 14 -18 113 -40 219 -37 178 -43 195 -70 221 -36 32 -101 37 -139 11z\"\/><path d=\"M1163 3073 c-36 -7 -73 -59 -73 -102 0 -56 133 -378 171 -413 34 -32 83 -37 129 -13 70 36 67 87 -16 290 -86 209 -89 214 -129 231 -35 14 -42 15 -82 7z\"\/><path d=\"M3689 3066 c-15 -9 -33 -30 -42 -48 -48 -103 -147 -355 -147 -375 0 -98 131 -148 192 -74 13 15 57 108 97 206 80 196 84 226 37 273 -30 30 -99 39 -137 18z\"\/><path d=\"M583 2784 c-38 -19 -67 -74 -58 -113 9 -42 211 -354 242 -373 16 -10 45 -18 66 -18 51 0 107 52 107 100 0 39 -1 41 -124 234 -80 126 -108 162 -133 173 -41 17 -61 16 -100 -3z\"\/><path d=\"M4250 2784 c-14 -9 -74 -91 -133 -183 -95 -150 -107 -173 -107 -213 0 -55 33 -94 87 -104 67 -13 90 8 211 198 130 202 137 225 78 284 -27 27 -42 34 -72 34 -22 0 -50 -8 -64 -16z\"\/><path d=\"M2275 2693 c-553 -48 -1095 -270 -1585 -649 -135 -104 -459 -423 -483 -476 -23 -49 -22 -139 2 -186 73 -142 361 -457 571 -626 285 -228 642 -407 990 -497 242 -63 336 -73 660 -74 310 0 370 5 595 52 535 111 1045 392 1455 803 122 121 250 273 275 326 19 41 19 137 0 174 -41 79 -309 363 -465 492 -447 370 -946 591 -1479 653 -113 14 -422 18 -536 8z m395 -428 c171 -34 330 -124 456 -258 112 -119 167 -219 211 -378 27 -96 24 -300 -5 -401 -72 -255 -236 -447 -474 -557 -132 -62 -201 -76 -368 -76 -167 0 -236 14 -368 76 -213 98 -373 271 -451 485 -162 444 86 934 547 1084 153 49 292 57 452 25z m909 -232 c222 -123 408 -262 593 -441 76 -74 138 -139 138 -144 0 -16 -233 -242 -330 -319 -155 -123 -309 -223 -461 -299 l-81 -41 32 46 c18 26 49 83 70 128 143 306 141 649 -6 957 -25 52 -61 116 -79 142 l-34 47 45 -20 c26 -10 76 -36 113 -56z m-2057 25 c-40 -58 -105 -190 -130 -263 -110 -324 -59 -707 132 -981 25 -35 42 -64 37 -64 -19 0 -241 119 -326 174 -188 122 -406 314 -532 468 l-58 71 108 103 c185 178 428 349 672 473 66 33 121 60 123 61 2 0 -10 -19 -26 -42z\"\/><path d=\"M2375 1950 c-198 -44 -350 -190 -395 -379 -18 -76 -8 -221 19 -290 114 -284 457 -406 731 -260 98 52 188 154 231 260 27 69 37 214 19 290 -38 163 -166 304 -326 360 -67 23 -215 33 -279 19z\"\/><\/g><\/svg><\/i> <img loading=\"lazy\" decoding=\"async\" width=\"16\" height=\"16\" alt=\"Loading\" src=\"https:\/\/aif.amtbbs.org\/wp-content\/plugins\/page-views-count\/ajax-loader-2x.gif\" border=0 \/><\/p>\n<div class=\"pvc_clear\"><\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u5982\u4eca\uff0cAI\u5de5\u5177\u5df2\u53d8\u5f97\u53f8\u7a7a\u89c1\u60ef\uff0c\u4f60\u53ef\u80fd\u6bcf\u5929\u90fd\u5728\u4f7f\u7528\u5b83\u4eec\u3002\u4fdd\u62a4\u4f60\u7684\u4e2a\u4eba\u548c\u5546\u4e1a\u673a\u5bc6\u6570\u636e\u7684\u5173\u952e\u9014\u5f84\u4e4b\u4e00\uff0c\u5c31\u662f\u5728\u81ea\u5df1\u7684\u57fa [&hellip;]<\/p>\n<div class=\"pvc_clear\"><\/div>\n<p id=\"pvc_stats_23976\" class=\"pvc_stats total_only  \" data-element-id=\"23976\" style=\"\"><i class=\"pvc-stats-icon medium\" aria-hidden=\"true\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" version=\"1.0\" viewBox=\"0 0 502 315\" preserveAspectRatio=\"xMidYMid meet\"><g transform=\"translate(0,332) scale(0.1,-0.1)\" fill=\"\" stroke=\"none\"><path d=\"M2394 3279 l-29 -30 -3 -207 c-2 -182 0 -211 15 -242 39 -76 157 -76 196 0 15 31 17 60 15 243 l-3 209 -33 29 c-26 23 -41 29 -80 29 -41 0 -53 -5 -78 -31z\"\/><path d=\"M3085 3251 c-45 -19 -58 -50 -96 -229 -47 -217 -49 -260 -13 -295 52 -53 146 -42 177 20 16 31 87 366 87 410 0 70 -86 122 -155 94z\"\/><path d=\"M1751 3234 c-13 -9 -29 -31 -37 -50 -12 -29 -10 -49 21 -204 19 -94 39 -189 45 -210 14 -50 54 -80 110 -80 34 0 48 6 76 34 21 21 34 44 34 59 0 14 -18 113 -40 219 -37 178 -43 195 -70 221 -36 32 -101 37 -139 11z\"\/><path d=\"M1163 3073 c-36 -7 -73 -59 -73 -102 0 -56 133 -378 171 -413 34 -32 83 -37 129 -13 70 36 67 87 -16 290 -86 209 -89 214 -129 231 -35 14 -42 15 -82 7z\"\/><path d=\"M3689 3066 c-15 -9 -33 -30 -42 -48 -48 -103 -147 -355 -147 -375 0 -98 131 -148 192 -74 13 15 57 108 97 206 80 196 84 226 37 273 -30 30 -99 39 -137 18z\"\/><path d=\"M583 2784 c-38 -19 -67 -74 -58 -113 9 -42 211 -354 242 -373 16 -10 45 -18 66 -18 51 0 107 52 107 100 0 39 -1 41 -124 234 -80 126 -108 162 -133 173 -41 17 -61 16 -100 -3z\"\/><path d=\"M4250 2784 c-14 -9 -74 -91 -133 -183 -95 -150 -107 -173 -107 -213 0 -55 33 -94 87 -104 67 -13 90 8 211 198 130 202 137 225 78 284 -27 27 -42 34 -72 34 -22 0 -50 -8 -64 -16z\"\/><path d=\"M2275 2693 c-553 -48 -1095 -270 -1585 -649 -135 -104 -459 -423 -483 -476 -23 -49 -22 -139 2 -186 73 -142 361 -457 571 -626 285 -228 642 -407 990 -497 242 -63 336 -73 660 -74 310 0 370 5 595 52 535 111 1045 392 1455 803 122 121 250 273 275 326 19 41 19 137 0 174 -41 79 -309 363 -465 492 -447 370 -946 591 -1479 653 -113 14 -422 18 -536 8z m395 -428 c171 -34 330 -124 456 -258 112 -119 167 -219 211 -378 27 -96 24 -300 -5 -401 -72 -255 -236 -447 -474 -557 -132 -62 -201 -76 -368 -76 -167 0 -236 14 -368 76 -213 98 -373 271 -451 485 -162 444 86 934 547 1084 153 49 292 57 452 25z m909 -232 c222 -123 408 -262 593 -441 76 -74 138 -139 138 -144 0 -16 -233 -242 -330 -319 -155 -123 -309 -223 -461 -299 l-81 -41 32 46 c18 26 49 83 70 128 143 306 141 649 -6 957 -25 52 -61 116 -79 142 l-34 47 45 -20 c26 -10 76 -36 113 -56z m-2057 25 c-40 -58 -105 -190 -130 -263 -110 -324 -59 -707 132 -981 25 -35 42 -64 37 -64 -19 0 -241 119 -326 174 -188 122 -406 314 -532 468 l-58 71 108 103 c185 178 428 349 672 473 66 33 121 60 123 61 2 0 -10 -19 -26 -42z\"\/><path d=\"M2375 1950 c-198 -44 -350 -190 -395 -379 -18 -76 -8 -221 19 -290 114 -284 457 -406 731 -260 98 52 188 154 231 260 27 69 37 214 19 290 -38 163 -166 304 -326 360 -67 23 -215 33 -279 19z\"\/><\/g><\/svg><\/i> <img loading=\"lazy\" decoding=\"async\" width=\"16\" height=\"16\" alt=\"Loading\" src=\"https:\/\/aif.amtbbs.org\/wp-content\/plugins\/page-views-count\/ajax-loader-2x.gif\" border=0 \/><\/p>\n<div class=\"pvc_clear\"><\/div>\n","protected":false},"author":56,"featured_media":23978,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[23,20,80],"tags":[986,1534,113],"class_list":["post-23976","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-23","category-20","category-80","tag-llm","tag-ollama","tag-113"],"_links":{"self":[{"href":"https:\/\/aif.amtbbs.org\/index.php\/wp-json\/wp\/v2\/posts\/23976","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/aif.amtbbs.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/aif.amtbbs.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/aif.amtbbs.org\/index.php\/wp-json\/wp\/v2\/users\/56"}],"replies":[{"embeddable":true,"href":"https:\/\/aif.amtbbs.org\/index.php\/wp-json\/wp\/v2\/comments?post=23976"}],"version-history":[{"count":1,"href":"https:\/\/aif.amtbbs.org\/index.php\/wp-json\/wp\/v2\/posts\/23976\/revisions"}],"predecessor-version":[{"id":23981,"href":"https:\/\/aif.amtbbs.org\/index.php\/wp-json\/wp\/v2\/posts\/23976\/revisions\/23981"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/aif.amtbbs.org\/index.php\/wp-json\/wp\/v2\/media\/23978"}],"wp:attachment":[{"href":"https:\/\/aif.amtbbs.org\/index.php\/wp-json\/wp\/v2\/media?parent=23976"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/aif.amtbbs.org\/index.php\/wp-json\/wp\/v2\/categories?post=23976"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/aif.amtbbs.org\/index.php\/wp-json\/wp\/v2\/tags?post=23976"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}