{"id":53810,"date":"2025-02-16T16:39:27","date_gmt":"2025-02-16T08:39:27","guid":{"rendered":"https:\/\/fwq.ai\/blog\/53810\/"},"modified":"2025-02-16T16:39:27","modified_gmt":"2025-02-16T08:39:27","slug":"exo%ef%bc%9a%e7%94%a8%e6%b6%88%e8%b4%b9%e7%ba%a7%e7%a1%ac%e4%bb%b6%e8%bf%90%e8%a1%8cai%e9%9b%86%e7%be%a4","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/53810\/","title":{"rendered":"EXO\uff1a\u7528\u6d88\u8d39\u7ea7\u786c\u4ef6\u8fd0\u884cAI\u96c6\u7fa4"},"content":{"rendered":"<p>\u5728\u8fd9\u7bc7\u535a\u6587\u4e2d\uff0c\u6211\u4eec\u5c06\u6df1\u5165\u63a2\u8ba8 EXO Labs \u5982\u4f55\u4f7f\u7528\u5bb6\u7528\u8bbe\u5907\u5b9e\u73b0 AI \u63a8\u7406\u4efb\u52a1\u7684\u5212\u5206\u548c\u5206\u914d\u3002\u6211\u4eec\u5c06\u63a2\u7d22\u6838\u5fc3\u7ec4\u4ef6\u53ca\u5176\u529f\u80fd\u3002\u6700\u540e\uff0c\u6211\u4eec\u5c06\u4ecb\u7ecd\u4f7f\u7528\u4f60\u62e5\u6709\u7684\u8bbe\u5907\u8bbe\u7f6e\u81ea\u5df1\u7684 AI \u96c6\u7fa4\u7684\u6b65\u9aa4\u3002<\/p>\n<p>\u4ece\u672c\u8d28\u4e0a\u8bb2\uff0cEXO \u5c06\u5927\u578b AI \u6a21\u578b\u62c6\u5206\u6210\u8f83\u5c0f\u7684\u90e8\u5206\uff08\u201c\u788e\u7247\u201d\uff09\u5e76\u5c06\u5b83\u4eec\u5206\u5e03\u5728\u591a\u4e2a\u8bbe\u5907\u4e0a\u3002\u53ef\u4ee5\u628a\u5b83\u60f3\u8c61\u6210\u4e00\u573a\u63a5\u529b\u8d5b\uff0c\u6bcf\u4e2a\u8dd1\u6b65\u8005\uff08\u8bbe\u5907\uff09\u5904\u7406\u65c5\u7a0b\u7684\u4e00\u90e8\u5206\uff08\u6a21\u578b\u5904\u7406\uff09\u3002<\/p>\n<h2>1\u3001EXO\u7684\u5de5\u4f5c\u539f\u7406<\/h2>\n<p>\u5173\u952e\u7ec4\u4ef6\uff1a<\/p>\n<ul>\n<li>\u788e\u7247\u7ba1\u7406\uff1aEXO \u5c06 AI \u6a21\u578b\u5206\u6210\u53ef\u7ba1\u7406\u7684\u5757\u3002<\/li>\n<li>\u667a\u80fd\u5206\u533a\uff1a\u7cfb\u7edf\u6839\u636e\u6bcf\u53f0\u8bbe\u5907\u7684\u529f\u80fd\u627e\u51fa\u6700\u4f73\u7684\u4efb\u52a1\u5206\u5272\u65b9\u5f0f\u3002<\/li>\n<li>gRPC \u901a\u4fe1\uff1a\u8bbe\u5907\u4f7f\u7528\u8fd9\u79cd\u9ad8\u901f\u534f\u8bae\u76f8\u4e92\u901a\u4fe1\u3002<\/li>\n<li>\u73af\u5f62\u62d3\u6251\uff1a\u6570\u636e\u4ee5\u73af\u5f62\u6d41\u52a8\uff0c\u6bcf\u53f0\u8bbe\u5907\u5148\u5904\u7406\u81ea\u5df1\u7684\u90e8\u5206\uff0c\u7136\u540e\u518d\u4f20\u9012\u3002<\/li>\n<\/ul>\n<p>\u4efb\u52a1\u5982\u4f55\u5728\u7f51\u7edc\u4e2d\u6d41\u52a8\uff1a<\/p>\n<ul>\n<li>\u4f60\u63d0\u51fa\u95ee\u9898\uff1a\u5411 EXO \u7f51\u7edc\u53d1\u9001\u63d0\u793a\u3002<\/li>\n<li>\u4efb\u52a1\u5206\u914d\uff1a\u7cfb\u7edf\u5c06\u4f60\u7684\u8bf7\u6c42\u5206\u5272\u5230\u53ef\u7528\u8bbe\u5907\u4e2d\u3002<\/li>\n<li>\u5904\u7406\uff1a\u6bcf\u53f0\u8bbe\u5907\u90fd\u5728\u5176\u6a21\u578b\u90e8\u5206\u4e0a\u5de5\u4f5c\u3002<br \/>\u7ed3\u679c\u7f16\u8bd1\uff1a\u4e00\u53f0\u8bbe\u5907\u6536\u96c6\u6240\u6709\u90e8\u5206\u5e76\u7ec4\u88c5\u6700\u7ec8\u7b54\u6848\u3002<\/li>\n<\/ul>\n<p>\u7f51\u7edc\u62d3\u6251\uff1a<\/p>\n<p>\u62d3\u6251\u6a21\u5757\u5145\u5f53\u7ba1\u7406\u548c\u4e0e\u8bbe\u5907\u7f51\u7edc\u4ea4\u4e92\u7684\u6846\u67b6\uff0c\u6bcf\u4e2a\u8bbe\u5907\u90fd\u5177\u6709\u7279\u5b9a\u7684\u529f\u80fd\u4ee5\u53ca\u5b83\u4eec\u4e4b\u95f4\u7684\u8fde\u63a5\u3002\u5176\u4e2d\u8282\u70b9\u4ee3\u8868\u7f51\u7edc\u4e2d\u7684\u8bbe\u5907\uff08\u4f8b\u5982 MacBook\u3001iPhone \u7b49\uff09\uff0c\u8fb9\u7f18\u4ee3\u8868\u8bbe\u5907\u4e4b\u95f4\u7684\u8fde\u63a5\u3002<\/p>\n<h2>2\u3001\u5feb\u901f\u4e0a\u624b\uff1a\u8bbe\u7f6e\u4f60\u7684 AI \u96c6\u7fa4<\/h2>\n<p>\u73b0\u5728\u6211\u4eec\u4e86\u89e3\u4e86\u7a0b\u5e8f\u7684\u5de5\u4f5c\u539f\u7406\uff0c\u8ba9\u6211\u4eec\u5c1d\u8bd5\u5728\u672c\u5730\u8bbe\u5907\u4e0a\u8fd0\u884c\u5b83\u3002<\/p>\n<p>\u5148\u51b3\u6761\u4ef6\uff1a<\/p>\n<ul>\n<li>Python 3.12+\uff1a\u786e\u4fdd\u5df2\u5b89\u88c5 Python\u3002<\/li>\n<li>Git\uff1a\u786e\u4fdd\u5df2\u5b89\u88c5 Git \u4ee5\u514b\u9686\u5b58\u50a8\u5e93\u3002<\/li>\n<\/ul>\n<p>\u6b65\u9aa4 1\uff1a\u514b\u9686 EXO \u5b58\u50a8\u5e93\uff1a\u4ece GitHub \u514b\u9686 EXO \u5b58\u50a8\u5e93\uff1a<\/p>\n<pre><code>git clone https:\/\/github.com\/exo-explore\/exo.git\ncd exo<\/code><\/pre>\n<p>\u6b65\u9aa4 2\uff1a\u5b89\u88c5\u4f9d\u8d56\u9879\uff1a\u4f7f\u7528 pip \u5b89\u88c5\u6240\u9700\u7684\u4f9d\u8d56\u9879\uff1a<\/p>\n<pre><code>pip install .\nsource install.sh<\/code><\/pre>\n<p>\u6b65\u9aa4 3\uff1a\u8fd0\u884c EXO \u6846\u67b6\uff1a<\/p>\n<p>\u5728\u8bbe\u5907\u4e0a\u542f\u52a8 API\uff1a<\/p>\n<pre><code>python3 main.py<\/code><\/pre>\n<p>EXO \u5c06\u81ea\u52a8\u53d1\u73b0\u7f51\u7edc\u4e0a\u7684\u5176\u4ed6\u8bbe\u5907\uff0c\u65e0\u9700\u4efb\u4f55\u624b\u52a8\u914d\u7f6e\u3002<\/p>\n<p>\u9884\u671f\u8f93\u51fa\uff1a<\/p>\n<pre><code>INFO: Starting server on port 8000\nINFO: Discovering peers...\nINFO: Peer discovered: node2 at localhost:8081<\/code><\/pre>\n<p>\u6b65\u9aa4 4\uff1a\u8bbf\u95ee API\uff1a\u670d\u52a1\u5668\u8fd0\u884c\u540e\uff0c\u4f60\u53ef\u4ee5\u901a\u8fc7 <code>http:\/\/localhost:8000<\/code> \u8bbf\u95ee API\u3002\u4f7f\u7528 curl \u6216 Postman \u7b49\u5de5\u5177\u6d4b\u8bd5\u7aef\u70b9\u3002\u4f7f\u7528 curl \u7684\u793a\u4f8b\uff1a<\/p>\n<pre><code>curl http:\/\/localhost:8000\/v1\/chat\/completions \\\n     -H \"Content-Type: application\/json\" \\\n     -d '{\n           \"model\": \"llama-3-8b\",\n           \"messages\": [{\"role\": \"user\", \"content\": \"Hello, how are you?\"}],\n           \"temperature\": 0.7\n         }'<\/code><\/pre>\n<p>\u9884\u671f\u8f93\u51fa\uff1a<\/p>\n<pre><code>{\n  \"id\": \"chatcmpl-...\",\n  \"object\": \"chat.completion\",\n  \"created\": 1626702890,\n  \"model\": \"llama-3-8b\",\n  \"choices\": [\n    {\n      \"index\": 0,\n      \"message\": {\n        \"role\": \"assistant\",\n        \"content\": \"Hello! I am doing well. How can I assist you today?\"\n      },\n      \"finish_reason\": \"length\"\n    }\n  ]\n}<\/code><\/pre>\n<p>\u6b65\u9aa4 5\uff1a\u8c03\u8bd5\uff1a\u5728\u8fd0\u884c\u5e94\u7528\u7a0b\u5e8f\u4e4b\u524d\uff0c\u901a\u8fc7\u8bbe\u7f6e DEBUG \u73af\u5883\u53d8\u91cf\u6765\u542f\u7528\u8c03\u8bd5\u65e5\u5fd7\uff1a<\/p>\n<pre><code>DEBUG=9 python3 main.py<\/code><\/pre>\n<p>\u9884\u671f\u8f93\u51fa\uff1a<\/p>\n<pre><code>DEBUG: Loading model llama-3-8b\nDEBUG: Tokenizer loaded successfully\nDEBUG: Server started on port 8000\nDEBUG: Received request: {\"model\": \"llama-3-8b\", \"messages\": [{\"role\": \"user\", \"content\": \"Hello, how are you?\"}], \"temperature\": 0.7}\nDEBUG: Processing prompt...\nDEBUG: Sending response..<\/code><\/pre>\n<h2>3\u3001\u7ed3\u675f\u8bed<\/h2>\n<p>\u901a\u8fc7\u9075\u5faa\u8fd9\u4e9b\u6b65\u9aa4\uff0c\u4f60\u53ef\u4ee5\u5728 MacBook \u4e0a\u6210\u529f\u8bbe\u7f6e\u548c\u8fd0\u884c EXO \u6846\u67b6\u3002\u672c\u6307\u200b\u200b\u5357\u63d0\u4f9b\u4e86\u4ece\u73af\u5883\u8bbe\u7f6e\u5230\u8fd0\u884c\u548c\u6d4b\u8bd5 API \u670d\u52a1\u5668\u7684\u6e05\u6670\u8def\u5f84\uff0c\u786e\u4fdd\u6d41\u7a0b\u987a\u5229\u9ad8\u6548\u3002\u6709\u5173\u66f4\u591a\u8be6\u7ec6\u4fe1\u606f\uff0c\u8bf7\u53c2\u9605\u548c\u793a\u4f8b\u4f7f\u7528\u6587\u6863\u3002<\/p>\n<hr>\n","protected":false},"excerpt":{"rendered":"<p>\u5728\u8fd9\u7bc7\u535a\u6587\u4e2d\uff0c\u6211\u4eec\u5c06\u6df1\u5165\u63a2\u8ba8 EXO Labs \u5982\u4f55\u4f7f\u7528\u5bb6\u7528\u8bbe\u5907\u5b9e\u73b0 AI \u63a8\u7406\u4efb\u52a1\u7684\u5212\u5206\u548c\u5206\u914d\u3002\u6211\u4eec\u5c06\u63a2\u7d22\u6838\u5fc3\u7ec4\u4ef6\u53ca\u5176\u529f\u80fd\u3002\u6700\u540e\uff0c\u6211\u4eec\u5c06\u4ecb\u7ecd\u4f7f\u7528\u4f60\u62e5\u6709\u7684\u8bbe\u5907\u8bbe\u7f6e\u81ea\u5df1\u7684 AI \u96c6\u7fa4\u7684\u6b65\u9aa4\u3002 \u4ece\u672c\u8d28\u4e0a\u8bb2\uff0cEXO \u5c06\u5927\u578b AI \u6a21\u578b\u62c6\u5206\u6210\u8f83\u5c0f\u7684\u90e8\u5206\uff08\u201c\u788e\u7247\u201d\uff09\u5e76\u5c06\u5b83\u4eec\u5206\u5e03\u5728\u591a\u4e2a\u8bbe\u5907\u4e0a\u3002\u53ef\u4ee5\u628a\u5b83\u60f3\u8c61\u6210\u4e00\u573a\u63a5\u529b\u8d5b\uff0c\u6bcf\u4e2a\u8dd1\u6b65\u8005\uff08\u8bbe\u5907\uff09\u5904\u7406\u65c5\u7a0b\u7684\u4e00\u90e8\u5206\uff08\u6a21\u578b\u5904\u7406\uff09\u3002 1\u3001EXO\u7684\u5de5\u4f5c\u539f\u7406 \u5173\u952e\u7ec4\u4ef6\uff1a \u788e\u7247\u7ba1\u7406\uff1aEXO \u5c06 AI \u6a21\u578b\u5206\u6210\u53ef\u7ba1\u7406\u7684\u5757\u3002 \u667a\u80fd\u5206\u533a\uff1a\u7cfb\u7edf\u6839\u636e\u6bcf\u53f0\u8bbe\u5907\u7684\u529f\u80fd\u627e\u51fa\u6700\u4f73\u7684\u4efb\u52a1\u5206\u5272\u65b9\u5f0f\u3002 gRPC \u901a\u4fe1\uff1a\u8bbe\u5907\u4f7f\u7528\u8fd9\u79cd\u9ad8\u901f\u534f\u8bae\u76f8\u4e92\u901a\u4fe1\u3002 \u73af\u5f62\u62d3\u6251\uff1a\u6570\u636e\u4ee5\u73af\u5f62\u6d41\u52a8\uff0c\u6bcf\u53f0\u8bbe\u5907\u5148\u5904\u7406\u81ea\u5df1\u7684\u90e8\u5206\uff0c\u7136\u540e\u518d\u4f20\u9012\u3002 \u4efb\u52a1\u5982\u4f55\u5728\u7f51\u7edc\u4e2d\u6d41\u52a8\uff1a \u4f60\u63d0\u51fa\u95ee\u9898\uff1a\u5411 EXO \u7f51\u7edc\u53d1\u9001\u63d0\u793a\u3002 \u4efb\u52a1\u5206\u914d\uff1a\u7cfb\u7edf\u5c06\u4f60\u7684\u8bf7\u6c42\u5206\u5272\u5230\u53ef\u7528\u8bbe\u5907\u4e2d\u3002 \u5904\u7406\uff1a\u6bcf\u53f0\u8bbe\u5907\u90fd\u5728\u5176\u6a21\u578b\u90e8\u5206\u4e0a\u5de5\u4f5c\u3002\u7ed3\u679c\u7f16\u8bd1\uff1a\u4e00\u53f0\u8bbe\u5907\u6536\u96c6\u6240\u6709\u90e8\u5206\u5e76\u7ec4\u88c5\u6700\u7ec8\u7b54\u6848\u3002 \u7f51\u7edc\u62d3\u6251\uff1a \u62d3\u6251\u6a21\u5757\u5145\u5f53\u7ba1\u7406\u548c\u4e0e\u8bbe\u5907\u7f51\u7edc\u4ea4\u4e92\u7684\u6846\u67b6\uff0c\u6bcf\u4e2a\u8bbe\u5907\u90fd\u5177\u6709\u7279\u5b9a\u7684\u529f\u80fd\u4ee5\u53ca\u5b83\u4eec\u4e4b\u95f4\u7684\u8fde\u63a5\u3002\u5176\u4e2d\u8282\u70b9\u4ee3\u8868\u7f51\u7edc\u4e2d\u7684\u8bbe\u5907\uff08\u4f8b\u5982 MacBook\u3001iPhone \u7b49\uff09\uff0c\u8fb9\u7f18\u4ee3\u8868\u8bbe\u5907\u4e4b\u95f4\u7684\u8fde\u63a5\u3002 2\u3001\u5feb\u901f\u4e0a\u624b\uff1a\u8bbe\u7f6e\u4f60\u7684 AI \u96c6\u7fa4 \u73b0\u5728\u6211\u4eec\u4e86\u89e3\u4e86\u7a0b\u5e8f\u7684\u5de5\u4f5c\u539f\u7406\uff0c\u8ba9\u6211\u4eec\u5c1d\u8bd5\u5728\u672c\u5730\u8bbe\u5907\u4e0a\u8fd0\u884c\u5b83\u3002 \u5148\u51b3\u6761\u4ef6\uff1a Python 3.12+\uff1a\u786e\u4fdd\u5df2\u5b89\u88c5 Python\u3002 Git\uff1a\u786e\u4fdd\u5df2\u5b89\u88c5 Git \u4ee5\u514b\u9686\u5b58\u50a8\u5e93\u3002 \u6b65\u9aa4 1\uff1a\u514b\u9686 EXO \u5b58\u50a8\u5e93\uff1a\u4ece GitHub \u514b\u9686 EXO \u5b58\u50a8\u5e93\uff1a git clone https:\/\/github.com\/exo-explore\/exo.git cd [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[13],"tags":[],"class_list":["post-53810","post","type-post","status-publish","format-standard","hentry","category-ai"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/53810","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/comments?post=53810"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/53810\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=53810"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=53810"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=53810"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}