{"id":30224,"date":"2025-04-09T23:19:24","date_gmt":"2025-04-09T15:19:24","guid":{"rendered":"https:\/\/www.aisharenet.com\/?p=30224"},"modified":"2025-07-14T00:26:19","modified_gmt":"2025-07-13T16:26:19","slug":"tabby","status":"publish","type":"post","link":"https:\/\/www.kdjingpai.com\/pt\/tabby\/","title":{"rendered":"Tabby\uff1a\u53ef\u96c6\u6210\u5230 VSCode \u7684\u672c\u5730\u81ea\u6258\u7ba1AI\u7f16\u7a0b\u52a9\u624b"},"content":{"rendered":"<p>Tabby \u662f\u4e00\u4e2a\u5f00\u6e90\u7684 AI \u7f16\u7a0b\u52a9\u624b\uff0c\u7531 TabbyML \u56e2\u961f\u5f00\u53d1\uff0c\u7528\u6237\u53ef\u4ee5\u81ea\u5df1\u90e8\u7f72\u5728\u672c\u5730\u6216\u670d\u52a1\u5668\u4e0a\u3002\u5b83\u63d0\u4f9b\u7c7b\u4f3c <a href=\"https:\/\/www.kdjingpai.com\/pt\/github-copilotji\/\">GitHub Copilot<\/a> \u7684\u529f\u80fd\uff0c\u6bd4\u5982\u4ee3\u7801\u81ea\u52a8\u8865\u5168\u548c\u667a\u80fd\u95ee\u7b54\uff0c\u4f46\u6700\u5927\u7684\u7279\u70b9\u662f\u81ea\u6258\u7ba1\uff0c\u4e0d\u4f9d\u8d56\u4e91\u670d\u52a1\u6216\u6570\u636e\u5e93\uff0c\u6570\u636e\u5b8c\u5168\u7531\u7528\u6237\u63a7\u5236\u3002Tabby \u652f\u6301\u591a\u79cd\u7f16\u7a0b\u8bed\u8a00\uff0c\u80fd\u96c6\u6210\u5230 VSCode\u3001Vim \u7b49\u5f00\u53d1\u5de5\u5177\u4e2d\u3002\u5b98\u65b9\u6570\u636e\u663e\u793a\uff0c\u622a\u81f3 2025 \u5e74 4 \u6708\uff0c\u6700\u65b0\u7248\u672c v0.24.0 \u5df2\u652f\u6301 LDAP \u8ba4\u8bc1\u548c\u540e\u53f0\u4efb\u52a1\u901a\u77e5\uff0c\u529f\u80fd\u6301\u7eed\u4f18\u5316\u3002\u5b83\u9002\u5408\u6ce8\u91cd\u9690\u79c1\u7684\u5f00\u53d1\u8005\u6216\u56e2\u961f\u4f7f\u7528\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-30225\" title=\"Tabby\uff1a\u53ef\u96c6\u6210\u5230 VSCode \u7684\u672c\u5730\u81ea\u6258\u7ba1AI\u7f16\u7a0b\u52a9\u624b-1\" src=\"https:\/\/www.kdjingpai.com\/wp-content\/uploads\/2025\/04\/70193a4409c2740.png\" alt=\"Tabby\uff1a\u53ef\u96c6\u6210\u5230 VSCode \u7684\u672c\u5730\u81ea\u6258\u7ba1AI\u7f16\u7a0b\u52a9\u624b-1\" width=\"1872\" height=\"882\" srcset=\"https:\/\/www.kdjingpai.com\/wp-content\/uploads\/2025\/04\/70193a4409c2740.png 1872w, https:\/\/www.kdjingpai.com\/wp-content\/uploads\/2025\/04\/70193a4409c2740-768x362.png 768w, https:\/\/www.kdjingpai.com\/wp-content\/uploads\/2025\/04\/70193a4409c2740-1536x724.png 1536w, https:\/\/www.kdjingpai.com\/wp-content\/uploads\/2025\/04\/70193a4409c2740-18x8.png 18w\" sizes=\"auto, (max-width: 1872px) 100vw, 1872px\" \/><\/p>\n<p>&nbsp;<\/p>\n<h2>\u529f\u80fd\u5217\u8868<\/h2>\n<ul>\n<li><strong>\u4ee3\u7801\u81ea\u52a8\u8865\u5168<\/strong>: \u8f93\u5165\u4ee3\u7801\u65f6\uff0c\u5b9e\u65f6\u5efa\u8bae\u5355\u884c\u6216\u591a\u884c\u4ee3\u7801\uff0c\u63d0\u5347\u6548\u7387\u3002<\/li>\n<li><strong>\u667a\u80fd\u804a\u5929\u52a9\u624b<\/strong>: \u901a\u8fc7\u5bf9\u8bdd\u89e3\u7b54\u7f16\u7a0b\u95ee\u9898\uff0c\u6216\u751f\u6210\u4ee3\u7801\u7247\u6bb5\u3002<\/li>\n<li><strong>\u81ea\u6258\u7ba1\u90e8\u7f72<\/strong>: \u5728\u672c\u5730\u6216\u4e91\u7aef\u8fd0\u884c\uff0c\u4fdd\u62a4\u6570\u636e\u9690\u79c1\uff0c\u652f\u6301\u81ea\u5b9a\u4e49\u3002<\/li>\n<li><strong>\u591a\u6a21\u578b\u652f\u6301<\/strong>: \u53ef\u4f7f\u7528 StarCoder-1B\u3001Qwen2-1.5B \u7b49\u5f00\u6e90\u6a21\u578b\u3002<\/li>\n<li><strong>\u4e0a\u4e0b\u6587\u611f\u77e5<\/strong>: \u7406\u89e3\u4ee3\u7801\u4e0a\u4e0b\u6587\uff0c\u63d0\u4f9b\u7cbe\u51c6\u5efa\u8bae\u3002<\/li>\n<li><strong>IDE \u96c6\u6210<\/strong>: \u652f\u6301 VSCode\u3001Vim\u3001IntelliJ \u7b49\u4e3b\u6d41\u7f16\u8f91\u5668\u3002<\/li>\n<li><strong>\u4ee3\u7801\u6d4f\u89c8\u5668<\/strong>: \u6d4f\u89c8\u9879\u76ee\u4ee3\u7801\uff0c\u652f\u6301\u641c\u7d22\u548c\u5bfc\u822a\u529f\u80fd\u3002<\/li>\n<li><strong>\u4f7f\u7528\u7edf\u8ba1<\/strong>: \u67e5\u770b\u4ee3\u7801\u8865\u5168\u548c\u804a\u5929\u7684\u4f7f\u7528\u6570\u636e\u3002<\/li>\n<li><strong>LDAP \u8ba4\u8bc1<\/strong>: \u4f01\u4e1a\u7528\u6237\u53ef\u901a\u8fc7 LDAP \u7ba1\u7406\u6743\u9650\uff08v0.24.0 \u65b0\u589e\uff09\u3002<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<h2>\u4f7f\u7528\u5e2e\u52a9<\/h2>\n<h3>\u5b89\u88c5\u6d41\u7a0b<\/h3>\n<p>Tabby \u9700\u8981\u7528\u6237\u81ea\u5df1\u642d\u5efa\uff0c\u4ee5\u4e0b\u662f\u57fa\u4e8e Docker \u7684\u8be6\u7ec6\u6b65\u9aa4\u3002<\/p>\n<ol>\n<li><strong>\u51c6\u5907\u73af\u5883<\/strong>\n<ul>\n<li>\u786e\u4fdd\u5df2\u5b89\u88c5 Docker\uff08\u7248\u672c 20.10 \u6216\u4ee5\u4e0a\uff09\u3002<\/li>\n<li>\u5982\u679c\u4f7f\u7528 GPU\uff0c\u9700\u5b89\u88c5 NVIDIA \u9a71\u52a8\u548c CUDA Toolkit\uff08\u63a8\u8350 11.8 \u6216 12.x\uff09\u3002<\/li>\n<li>\u9884\u7559\u81f3\u5c11 10GB \u5b58\u50a8\u7a7a\u95f4\uff0c\u7528\u4e8e\u6a21\u578b\u548c\u6570\u636e\u3002<\/li>\n<\/ul>\n<\/li>\n<li><strong>\u62c9\u53d6\u955c\u50cf<\/strong><br \/>\n\u5728\u7ec8\u7aef\u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\u83b7\u53d6\u6700\u65b0 Tabby\uff1a<\/li>\n<\/ol>\n<pre><code>docker pull tabbyml\/tabby\r\n<\/code><\/pre>\n<ol start=\"3\">\n<li><strong>\u542f\u52a8\u670d\u52a1\u5668<\/strong><br \/>\n\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u542f\u52a8\uff0c\u9ed8\u8ba4\u76d1\u542c 8080 \u7aef\u53e3\uff1a<\/li>\n<\/ol>\n<pre><code>docker run -it --gpus all -p 8080:8080 -v $HOME\/.tabby:\/data tabbyml\/tabby serve --model TabbyML\/StarCoder-1B --device cuda --chat-model Qwen2-1.5B-Instruct\r\n<\/code><\/pre>\n<ul>\n<li><code>--gpus all<\/code>: \u542f\u7528 GPU \u52a0\u901f\uff08\u65e0 GPU \u53ef\u5220\u9664\uff09\u3002<\/li>\n<li><code>-p 8080:8080<\/code>: \u5c06\u5bb9\u5668\u7aef\u53e3\u6620\u5c04\u5230\u672c\u5730\u3002<\/li>\n<li><code>-v $HOME\/.tabby:\/data<\/code>: \u6570\u636e\u5b58\u50a8\u5728\u672c\u5730\u00a0<code>.tabby<\/code>\u00a0\u6587\u4ef6\u5939\u3002<\/li>\n<li><code>--model<\/code>: \u6307\u5b9a\u4ee3\u7801\u8865\u5168\u6a21\u578b\uff0c\u9ed8\u8ba4 StarCoder-1B\u3002<\/li>\n<li><code>--chat-model<\/code>: \u6307\u5b9a\u804a\u5929\u6a21\u578b\uff0c\u9ed8\u8ba4 Qwen2-1.5B-Instruct\u3002<\/li>\n<li><code>--device cuda<\/code>: \u4f7f\u7528 GPU\uff0c\u82e5\u65e0 GPU \u6539\u4e3a\u00a0<code>cpu<\/code>\u3002<\/li>\n<\/ul>\n<ol start=\"4\">\n<li><strong>\u9a8c\u8bc1\u8fd0\u884c<\/strong><br \/>\n\u542f\u52a8\u540e\uff0c\u8bbf\u95ee\u00a0<code>http:\/\/localhost:8080<\/code>\u3002\u82e5\u663e\u793a\u6b22\u8fce\u9875\u9762\u6216\u65e5\u5fd7\u63d0\u793a \u201cListening at 0.0.0.0:8080\u201d\uff0c\u5219\u6210\u529f\u3002<\/li>\n<li><strong>\u5b89\u88c5 IDE \u6269\u5c55<\/strong><\/li>\n<\/ol>\n<ul>\n<li><strong>VSCode<\/strong>: \u5728\u6269\u5c55\u5e02\u573a\u641c\u7d22 \u201cTabby\u201d\uff0c\u5b89\u88c5\u540e\u8bbe\u7f6e\u670d\u52a1\u5668\u5730\u5740\u4e3a\u00a0<code>http:\/\/localhost:8080<\/code>\u3002<\/li>\n<li><strong>Vim<\/strong>: \u901a\u8fc7\u63d2\u4ef6\u7ba1\u7406\u5668\u5b89\u88c5\u00a0<code>TabbyML\/vim-tabby<\/code>\uff0c\u8fd0\u884c\u00a0<code>npx tabby-agent --stdio<\/code>\u00a0\u8fde\u63a5\u3002<\/li>\n<li><strong>IntelliJ<\/strong>: \u5728 JetBrains Marketplace \u641c\u7d22 \u201cTabby\u201d\uff0c\u5b89\u88c5\u5e76\u914d\u7f6e\u5730\u5740\u3002<\/li>\n<\/ul>\n<h3>\u4e3b\u8981\u529f\u80fd\u64cd\u4f5c<\/h3>\n<h4>\u4ee3\u7801\u81ea\u52a8\u8865\u5168<\/h4>\n<ul>\n<li><strong>\u64cd\u4f5c\u6b65\u9aa4<\/strong>: \u5728 IDE \u4e2d\u8f93\u5165\u4ee3\u7801\uff0cTabby \u4f1a\u5f39\u51fa\u5efa\u8bae\u6846\u3002\u6309\u00a0<code>Tab<\/code>\u00a0\u63a5\u53d7\uff0c<code>Esc<\/code>\u00a0\u62d2\u7edd\u3002<\/li>\n<li><strong>\u7279\u8272\u529f\u80fd<\/strong>: \u652f\u6301\u4e0a\u4e0b\u6587\u611f\u77e5\u3002\u6bd4\u5982\u8f93\u5165\u00a0<code>def sort_list<\/code>\uff0c\u53ef\u80fd\u5efa\u8bae\uff1a<\/li>\n<\/ul>\n<pre><code>def sort_list(lst):\r\nreturn sorted(lst)\r\n<\/code><\/pre>\n<ul>\n<li><strong>\u8c03\u6574\u53c2\u6570<\/strong>: \u5728\u00a0<code>config.toml<\/code>\u00a0\u4e2d\u4fee\u6539\u00a0<code>max_input_length<\/code>\uff08\u9ed8\u8ba4 1024\uff09\u548c\u00a0<code>max_output_tokens<\/code>\uff08\u9ed8\u8ba4 512\uff09\u3002<\/li>\n<\/ul>\n<h4>\u667a\u80fd\u804a\u5929\u52a9\u624b<\/h4>\n<ul>\n<li><strong>\u6253\u5f00\u65b9\u5f0f<\/strong>: \u5728 VSCode \u4e2d\uff0c\u70b9\u51fb\u4fa7\u8fb9\u680f\u7684 Tabby \u56fe\u6807\u6253\u5f00\u804a\u5929\u9762\u677f\u3002<\/li>\n<li><strong>\u4f7f\u7528\u65b9\u6cd5<\/strong>: \u8f93\u5165\u95ee\u9898\uff0c\u5982\u201c\u7528 JavaScript \u5199\u4e00\u4e2a\u6570\u7ec4\u53bb\u91cd\u51fd\u6570\u201d\u3002Tabby \u4f1a\u8fd4\u56de\uff1a<\/li>\n<\/ul>\n<pre><code>function uniqueArray(arr) {\r\nreturn [...new Set(arr)];\r\n}\r\n<\/code><\/pre>\n<p>\u8fd8\u80fd\u901a\u8fc7\u00a0<code>@<\/code>\u00a0\u63d0\u53ca\u6587\u4ef6\uff0c\u6dfb\u52a0\u4e0a\u4e0b\u6587\u3002<\/p>\n<ul>\n<li><strong>\u8fd0\u884c\u547d\u4ee4<\/strong>: \u8f93\u5165\u7c7b\u4f3c\u00a0<code>dir<\/code>\u00a0\u7684\u547d\u4ee4\uff0c\u67e5\u770b\u6a21\u62df\u7ed3\u679c\uff08v0.23.0 \u589e\u5f3a\uff09\u3002<\/li>\n<\/ul>\n<h4>\u4ee3\u7801\u6d4f\u89c8\u5668<\/h4>\n<ul>\n<li><strong>\u8bbf\u95ee\u8def\u5f84<\/strong>: \u5728 Web \u754c\u9762\u70b9\u51fb \u201cCode Browser\u201d\u3002<\/li>\n<li><strong>\u64cd\u4f5c\u6d41\u7a0b<\/strong>: \u8f93\u5165\u5173\u952e\u8bcd\uff08\u5982\u00a0<code>class<\/code>\uff09\uff0c\u641c\u7d22\u4ee3\u7801\u3002\u652f\u6301\u6309\u6587\u4ef6\u7c7b\u578b\u7b5b\u9009\uff0c\u70b9\u51fb\u7ed3\u679c\u8df3\u8f6c\u5230\u5177\u4f53\u4f4d\u7f6e\u3002<\/li>\n<li><strong>\u66f4\u65b0\u7279\u6027<\/strong>: v0.23.0 \u4f18\u5316\u4e86\u6d4f\u89c8\u4f53\u9a8c\uff0c\u652f\u6301\u66f4\u591a\u5bfc\u822a\u9009\u9879\u3002<\/li>\n<\/ul>\n<h3>\u8865\u5145\u8bf4\u660e<\/h3>\n<ul>\n<li><strong>\u9996\u6b21\u542f\u52a8<\/strong>: \u4e0b\u8f7d\u6a21\u578b\u53ef\u80fd\u9700\u8981 5-10 \u5206\u949f\uff0c\u89c6\u7f51\u7edc\u60c5\u51b5\u800c\u5b9a\u3002<\/li>\n<li><strong>\u6027\u80fd\u4f18\u5316<\/strong>: \u4f7f\u7528\u00a0<code>--parallelism 4<\/code>\u00a0\u63d0\u9ad8\u5e76\u53d1\u5904\u7406\u80fd\u529b\uff08\u9700\u9ad8\u914d\u786c\u4ef6\uff09\u3002<\/li>\n<li><strong>\u793e\u533a\u652f\u6301<\/strong>: \u53ef\u901a\u8fc7 Slack\uff08<code>links.tabbyml.com\/join-slack<\/code>\uff09\u83b7\u53d6\u5e2e\u52a9\u3002<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<h2>\u5e94\u7528\u573a\u666f<\/h2>\n<ol>\n<li><strong>\u4e2a\u4eba\u5f00\u53d1<\/strong><br \/>\n\u4e00\u4e2a\u524d\u7aef\u5f00\u53d1\u8005\u5728\u672c\u5730\u90e8\u7f72 Tabby\uff0c\u7528\u5b83\u8865\u5168 <a href=\"https:\/\/www.kdjingpai.com\/pt\/react\/\">React<\/a> \u7ec4\u4ef6\u4ee3\u7801\uff0c\u8282\u7701\u91cd\u590d\u8f93\u5165\u65f6\u95f4\u3002<\/li>\n<li><strong>\u4f01\u4e1a\u534f\u4f5c<\/strong><br \/>\n\u516c\u53f8\u5c06 Tabby \u90e8\u7f72\u5728\u5185\u90e8\u670d\u52a1\u5668\uff0c\u7ed3\u5408 LDAP \u8ba4\u8bc1\uff0c\u56e2\u961f\u6210\u5458\u901a\u8fc7\u804a\u5929\u529f\u80fd\u5feb\u901f\u89e3\u51b3 bug\u3002<\/li>\n<li><strong>\u6559\u80b2\u57f9\u8bad<\/strong><br \/>\n\u5b66\u751f\u7528 Tabby \u5b66\u4e60 C++\uff0c\u901a\u8fc7\u804a\u5929\u63d0\u95ee\u201c\u6307\u9488\u662f\u4ec0\u4e48\u201d\uff0c\u83b7\u5f97\u4ee3\u7801\u793a\u4f8b\u548c\u89e3\u91ca\u3002<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<h2>QA<\/h2>\n<ol>\n<li><strong>Tabby \u652f\u6301\u54ea\u4e9b\u6a21\u578b\uff1f<\/strong><br \/>\n\u9ed8\u8ba4\u652f\u6301 StarCoder-1B\uff08\u4ee3\u7801\u8865\u5168\uff09\u548c Qwen2-1.5B-Instruct\uff08\u804a\u5929\uff09\uff0c\u7528\u6237\u53ef\u66f4\u6362\u5176\u4ed6\u5f00\u6e90\u6a21\u578b\u3002<\/li>\n<li><strong>\u81ea\u6258\u7ba1\u6709\u4ec0\u4e48\u4f18\u52bf\uff1f<\/strong><br \/>\n\u6570\u636e\u4e0d\u4e0a\u4f20\u4e91\u7aef\uff0c\u5b8c\u5168\u672c\u5730\u5316\uff0c\u9002\u5408\u9690\u79c1\u654f\u611f\u573a\u666f\uff0c\u4e14\u53ef\u81ea\u7531\u8c03\u6574\u914d\u7f6e\u3002<\/li>\n<li><strong>\u6700\u4f4e\u786c\u4ef6\u8981\u6c42\u662f\u4ec0\u4e48\uff1f<\/strong><br \/>\nCPU \u8fd0\u884c\u9700 8GB \u5185\u5b58\uff0cGPU \u8fd0\u884c\u9700 16GB \u5185\u5b58\u548c 4GB \u663e\u5b58\u3002<\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"<p>Tabby \u662f\u4e00\u4e2a\u5f00\u6e90\u7684 AI \u7f16\u7a0b\u52a9\u624b\uff0c\u7531 TabbyML \u56e2\u961f\u5f00\u53d1\uff0c\u7528\u6237\u53ef\u4ee5\u81ea\u5df1\u90e8\u7f72\u5728\u672c\u5730\u6216\u670d\u52a1\u5668\u4e0a\u3002\u5b83\u63d0\u4f9b\u7c7b\u4f3c GitHub Copilot \u7684\u529f\u80fd\uff0c\u6bd4\u5982\u4ee3\u7801\u81ea\u52a8\u8865\u5168\u548c\u667a\u80fd\u95ee\u7b54\uff0c\u4f46\u6700\u5927\u7684\u7279\u70b9\u662f\u81ea\u6258\u7ba1\uff0c\u4e0d\u4f9d\u8d56\u4e91\u670d\u52a1\u6216\u6570\u636e\u5e93\uff0c\u6570\u636e\u5b8c\u5168\u7531\u7528&#8230;<\/p>\n","protected":false},"author":1,"featured_media":62222,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[417,20,493],"tags":[230,221],"class_list":["post-30224","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-ai-productivity","category-tool","category-ai-programming","tag-aikaiyuanxiangmu","tag-aibiancheng"],"_links":{"self":[{"href":"https:\/\/www.kdjingpai.com\/pt\/wp-json\/wp\/v2\/posts\/30224","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.kdjingpai.com\/pt\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.kdjingpai.com\/pt\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.kdjingpai.com\/pt\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.kdjingpai.com\/pt\/wp-json\/wp\/v2\/comments?post=30224"}],"version-history":[{"count":0,"href":"https:\/\/www.kdjingpai.com\/pt\/wp-json\/wp\/v2\/posts\/30224\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.kdjingpai.com\/pt\/wp-json\/wp\/v2\/media\/62222"}],"wp:attachment":[{"href":"https:\/\/www.kdjingpai.com\/pt\/wp-json\/wp\/v2\/media?parent=30224"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.kdjingpai.com\/pt\/wp-json\/wp\/v2\/categories?post=30224"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.kdjingpai.com\/pt\/wp-json\/wp\/v2\/tags?post=30224"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}