{"id":122,"date":"2026-07-12T02:22:16","date_gmt":"2026-07-12T02:22:16","guid":{"rendered":"https:\/\/blog.top-api.cc\/?p=122"},"modified":"2026-07-12T02:22:16","modified_gmt":"2026-07-12T02:22:16","slug":"self-hosted-llm-inference-api-vllm-review-20260712","status":"publish","type":"post","link":"https:\/\/blog.top-api.cc\/?p=122","title":{"rendered":"\u81ea\u6258\u7ba1\u5927\u6a21\u578b API \u600e\u4e48\u6d4b\uff1avLLM \u7684\u541e\u5410\u3001\u663e\u5b58\u3001\u6279\u5904\u7406\u548c\u9694\u79bb\u522b\u53ea\u770b QPS"},"content":{"rendered":"<p>\u81ea\u6258\u7ba1\u6a21\u578b\u5e38\u88ab\u5ba3\u4f20\u4e3a\u201c\u66f4\u4fbf\u5b9c\u3001\u66f4\u53ef\u63a7\u201d\uff0c\u4f46\u751f\u4ea7\u4e0a\u6e38\u5e76\u4e0d\u662f\u628a\u6743\u91cd\u52a0\u8f7d\u6210\u529f\u5c31\u7ed3\u675f\u3002\u4e0d\u540c\u957f\u5ea6\u7684\u8bf7\u6c42\u5982\u4f55\u6392\u961f\u3001\u8fde\u7eed\u6279\u5904\u7406\u662f\u5426\u62d6\u6162\u4ea4\u4e92\u8bf7\u6c42\u3001\u663e\u5b58\u63a5\u8fd1\u4e0a\u9650\u65f6\u4f1a\u53d1\u751f\u4ec0\u4e48\u3001\u6a21\u578b\u91cd\u542f\u540e\u5982\u4f55\u6062\u590d\uff0c\u90fd\u9700\u8981\u5728 API \u5c42\u9a8c\u8bc1\u3002<\/p>\n<h2>\u5355\u8bf7\u6c42\u8dd1\u5206\u5feb\u4e0d\u7b49\u4e8e\u670d\u52a1\u7a33\u5b9a<\/h2>\n<p>\u81f3\u5c11\u540c\u65f6\u6d4b\u8bd5\u77ed\u95ee\u7b54\u3001\u957f\u4e0a\u4e0b\u6587\u3001\u6d41\u5f0f\u8f93\u51fa\u3001\u5de5\u5177\u8c03\u7528\u683c\u5f0f\u548c\u6279\u91cf\u4efb\u52a1\u3002\u8bb0\u5f55\u9996 token \u65f6\u95f4\u3001\u6bcf\u79d2 token\u3001\u603b\u5b8c\u6210\u65f6\u95f4\u3001P95\/P99\u3001\u663e\u5b58\u5360\u7528\u548c\u62d2\u7edd\u7387\u3002\u628a\u8bf7\u6c42\u6df7\u5408\u5728\u4e00\u8d77\u538b\u6d4b\uff0c\u624d\u80fd\u770b\u51fa\u957f\u4efb\u52a1\u662f\u5426\u541e\u6389\u4e86\u77ed\u8bf7\u6c42\u7684\u5ef6\u8fdf\u9884\u7b97\u3002<\/p>\n<p>vLLM \u8fd9\u7c7b\u9ad8\u541e\u5410\u63a8\u7406\u670d\u52a1\u5f3a\u8c03\u5185\u5b58\u6548\u7387\u548c\u6279\u5904\u7406\uff0c\u4f46\u53c2\u6570\u914d\u7f6e\u3001\u6a21\u578b\u91cf\u5316\u3001GPU \u7c7b\u578b\u548c\u4e0a\u4e0b\u6587\u957f\u5ea6\u90fd\u4f1a\u6539\u53d8\u7ed3\u679c\u3002\u4e0d\u8981\u628a\u522b\u4eba\u7684 benchmark \u76f4\u63a5\u5957\u5230\u81ea\u5df1\u7684\u4e1a\u52a1\uff1b\u540c\u4e00\u4e2a\u6a21\u578b\u5728\u4e0d\u540c\u63d0\u793a\u957f\u5ea6\u3001\u5e76\u53d1\u548c\u8f93\u51fa\u4e0a\u9650\u4e0b\u53ef\u80fd\u8868\u73b0\u5dee\u5f02\u5f88\u5927\u3002<\/p>\n<h2>\u8ba4\u8bc1\u4e0e\u79df\u6237\u8fb9\u754c\u4e0d\u80fd\u7701\u7565<\/h2>\n<p>\u81ea\u6258\u7ba1\u7aef\u70b9\u4ecd\u9700\u8981 API Key\u3001\u8bf7\u6c42\u9650\u989d\u3001\u6a21\u578b\u767d\u540d\u5355\u3001\u5ba1\u8ba1\u548c\u7f51\u7edc\u9694\u79bb\u3002\u6ca1\u6709\u8fd9\u4e9b\u8fb9\u754c\uff0c\u5185\u90e8\u63a8\u7406\u670d\u52a1\u5f88\u5bb9\u6613\u6210\u4e3a\u5171\u4eab GPU \u7684\u533f\u540d\u5165\u53e3\u3002\u5bf9\u591a\u79df\u6237\u4e1a\u52a1\uff0c\u8fd8\u8981\u9a8c\u8bc1\u7f13\u5b58\u3001\u961f\u5217\u3001\u9519\u8bef\u4fe1\u606f\u548c metrics \u662f\u5426\u6cc4\u9732\u5176\u4ed6\u9879\u76ee\u7684\u6a21\u578b\u540d\u79f0\u6216\u4f7f\u7528\u91cf\u3002<\/p>\n<p>\u53ef\u7528\u6027\u6d4b\u8bd5\u5e94\u5305\u62ec GPU \u9a71\u52a8\u5f02\u5e38\u3001\u6a21\u578b\u52a0\u8f7d\u5931\u8d25\u3001\u5b9e\u4f8b\u6eda\u52a8\u91cd\u542f\u3001\u8bf7\u6c42\u53d6\u6d88\u548c\u5bb9\u91cf\u8017\u5c3d\u3002\u5bf9\u4e8e\u65e0\u6cd5\u7acb\u5373\u6062\u590d\u7684\u6a21\u578b\uff0c\u5e94\u8ba9\u7f51\u5173\u8fd4\u56de\u6e05\u6670\u7684\u53ef\u91cd\u8bd5\u72b6\u6001\u6216\u5207\u6362\u5230\u7ecf\u8fc7\u6279\u51c6\u7684\u66ff\u4ee3\u4e0a\u6e38\u3002<\/p>\n<p><a href=\"https:\/\/top-api.cc\">top-api.cc<\/a> \u53ef\u4ee5\u5c06\u81ea\u6258\u7ba1\u548c\u6258\u7ba1\u6a21\u578b\u653e\u5728\u7edf\u4e00\u8c03\u7528\u9762\uff0c\u4fbf\u4e8e\u8bb0\u5f55\u8def\u7531\u3001\u6210\u672c\u548c\u56de\u9000\uff1b\u4f46\u662f\u5426\u542f\u7528\u56de\u9000\u3001\u54ea\u4e9b\u6570\u636e\u53ef\u79bb\u5f00\u81ea\u6258\u7ba1\u73af\u5883\uff0c\u5e94\u7531\u4e1a\u52a1\u7b56\u7565\u660e\u786e\u51b3\u5b9a\u3002<\/p>\n<h2>\u6d4b\u8bd5\u6307\u6807<\/h2>\n<ul>\n<li>\u9996 token\u3001\u541e\u5410\u548c P95\/P99 \u5ef6\u8fdf\uff1b<\/li>\n<li>\u4e0d\u540c\u4e0a\u4e0b\u6587\u957f\u5ea6\u548c\u5e76\u53d1\u4e0b\u7684\u663e\u5b58\u66f2\u7ebf\uff1b<\/li>\n<li>\u6392\u961f\u3001\u62d2\u7edd\u548c\u53d6\u6d88\u7684\u9519\u8bef\u8bed\u4e49\uff1b<\/li>\n<li>\u6a21\u578b\u91cd\u542f\u3001\u6269\u7f29\u5bb9\u548c\u914d\u7f6e\u53d8\u66f4\u6062\u590d\u65f6\u95f4\uff1b<\/li>\n<li>API \u8ba4\u8bc1\u3001\u79df\u6237\u9694\u79bb\u548c\u6307\u6807\u8131\u654f\uff1b<\/li>\n<li>\u6bcf\u4e2a\u53ef\u7528 token \u7684\u57fa\u7840\u8bbe\u65bd\u6210\u672c\u3002<\/li>\n<\/ul>\n<p>\u53c2\u8003\u8d44\u6599\uff1avLLM \u9879\u76ee\u4e0e GPU \u63a8\u7406\u670d\u52a1\u6587\u6863\u3002\u6027\u80fd\u7ed3\u8bba\u9700\u8981\u6807\u6ce8 GPU\u3001\u91cf\u5316\u3001\u6a21\u578b\u5feb\u7167\u3001\u4e0a\u4e0b\u6587\u4e0a\u9650\u548c\u538b\u6d4b\u8d1f\u8f7d\u3002<\/p>\n<p>\u628a\u81ea\u6258\u7ba1\u670d\u52a1\u63a5\u5230 <a href=\"https:\/\/top-api.cc\">top-api.cc<\/a> \u540e\uff0c\u5efa\u8bae\u6301\u7eed\u6bd4\u8f83\u771f\u5b9e\u4e1a\u52a1\u5ef6\u8fdf\u4e0e\u57fa\u51c6\u7ed3\u679c\uff0c\u9632\u6b62\u53ea\u5728\u5b9e\u9a8c\u73af\u5883\u4e2d\u8868\u73b0\u826f\u597d\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u81ea\u6258\u7ba1\u6a21\u578b\u670d\u52a1\u7684\u6027\u80fd\u4e0d\u53ea\u7531\u5355\u8bf7\u6c42\u901f\u5ea6\u51b3\u5b9a\u3002\u5e76\u53d1\u3001\u8fde\u7eed\u6279\u5904\u7406\u3001\u9996 token\u3001\u663e\u5b58\u788e\u7247\u3001\u957f\u4e0a\u4e0b\u6587\u3001\u79df\u6237\u9694\u79bb\u548c\u6545\u969c\u6062\u590d\u51b3\u5b9a\u5b83\u80fd\u5426\u6210\u4e3a\u7a33\u5b9a\u7684 API \u4e0a\u6e38\u3002<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-122","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/blog.top-api.cc\/index.php?rest_route=\/wp\/v2\/posts\/122","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.top-api.cc\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.top-api.cc\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.top-api.cc\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.top-api.cc\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=122"}],"version-history":[{"count":0,"href":"https:\/\/blog.top-api.cc\/index.php?rest_route=\/wp\/v2\/posts\/122\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.top-api.cc\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=122"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.top-api.cc\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=122"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.top-api.cc\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=122"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}