{"id":65,"date":"2026-08-24T16:52:05","date_gmt":"2026-08-24T16:52:05","guid":{"rendered":"https:\/\/jyy7998.tk\/?p=65"},"modified":"2026-09-18T00:57:21","modified_gmt":"2026-09-18T00:57:21","slug":"linux-ai-%e8%ae%be%e7%bd%ae%e6%8c%87%e5%8d%97%ef%bc%9artx-5090-qwen3-8-27b","status":"publish","type":"post","link":"https:\/\/wp.jyy7998.tk\/?p=65","title":{"rendered":"\ud83d\ude80 Ubuntu 26.04 LTS\u8bbe\u7f6e\u6307\u5357\uff1aRTX 5090 + Qwen3.8-27B"},"content":{"rendered":"<div class=\"doc\" style=\"--doc-accent:#76b900;--doc-accent-soft:#f4f9eb\">\n<div class=\"doc-meta\">\n    \ud83d\udcc5 \u6700\u540e\u66f4\u65b0\uff1a2026\u5e748\u670827\u65e5 &nbsp;|&nbsp; \ud83c\udff7\ufe0f \u786c\u4ef6\uff1aRTX 5090 24GB \/ 32GB \u5185\u5b58 \/ 270K+ CPU &nbsp;|&nbsp; \ud83d\udc64 \u7528\u6237\uff1aai\n<\/div>\n<p>\u672c\u6559\u7a0b\u4e13\u4e3a <strong>RTX 5090 24GB<\/strong> \u663e\u5361\u4f18\u5316\uff0c\u4f7f\u7528 <strong>Qwen3.8-27B Q4_K_M<\/strong> \u91cf\u5316\u6a21\u578b\uff0c\u5728 <strong>Ubuntu 26.04 LTS<\/strong> \u4e0a\u4ece\u6e90\u7801\u7f16\u8bd1 <code>llama.cpp<\/code> \u5e76\u914d\u7f6e\u4e00\u952e\u542f\u52a8\uff0c\u63d0\u4f9b\u7c7b\u4f3c Windows \u7684\u672c\u5730 AI \u804a\u5929\u4f53\u9a8c\u3002<\/p>\n<nav class=\"doc-toc\">\n    <strong>\ud83d\udcd6 \u76ee\u5f55<\/strong><\/p>\n<ul>\n<li><a href=\"#prep\">1. \u524d\u63d0\u6761\u4ef6<\/a><\/li>\n<li><a href=\"#deps\">2. \u5b89\u88c5\u7f16\u8bd1\u4f9d\u8d56<\/a><\/li>\n<li><a href=\"#clone\">3. \u514b\u9686 llama.cpp \u5e76\u62c9\u53d6\u6700\u65b0\u7248\u672c<\/a><\/li>\n<li><a href=\"#cmake\">4. CMake \u914d\u7f6e<\/a><\/li>\n<li><a href=\"#build\">5. \u7f16\u8bd1<\/a><\/li>\n<li><a href=\"#install\">6. \u5b89\u88c5\u5230\u7cfb\u7edf\u8def\u5f84\uff08\u53ef\u9009\uff09<\/a><\/li>\n<li><a href=\"#download\">7. \u4e0b\u8f7d Qwen3.8-27B Q4_K_M \u6a21\u578b<\/a><\/li>\n<li><a href=\"#test\">8. \u6d4b\u8bd5\u63a8\u7406<\/a><\/li>\n<li><a href=\"#script\">9. \u521b\u5efa\u542f\u52a8\u811a\u672c<\/a><\/li>\n<li><a href=\"#shortcut\">10. \u521b\u5efa\u684c\u9762\u5feb\u6377\u65b9\u5f0f<\/a><\/li>\n<li><a href=\"#verify\">11. \u9a8c\u8bc1\u670d\u52a1\uff08\u542b Web UI\uff09<\/a><\/li>\n<li><a href=\"#faq\">12. \u5e38\u89c1\u62a5\u9519\u53ca\u5e94\u5bf9<\/a><\/li>\n<li><a href=\"#tune\">13. \u6027\u80fd\u8c03\u4f18\u5efa\u8bae<\/a><\/li>\n<\/ul>\n<\/nav>\n<hr>\n<h2 id=\"prep\">1. \u524d\u63d0\u6761\u4ef6<\/h2>\n<p>\u4f60\u5df2\u7ecf\u6309\u7167\u672c\u7ad9\u4e4b\u524d\u7684\u6559\u7a0b\u6210\u529f\u5b89\u88c5\u4e86 <strong>NVIDIA \u5b98\u65b9\u5f00\u6e90\u9a71\u52a8\uff08<code>nvidia-open<\/code>\uff09<\/strong> \u548c <strong>CUDA \u5de5\u5177\u5305\uff08<code>cuda-toolkit<\/code>\uff09<\/strong>\uff0c\u9a8c\u8bc1\u547d\u4ee4\uff1a<\/p>\n<pre class=\"prettyprint linenums\" ><code>nvidia-smi        # \u5e94\u663e\u793a RTX 5090 \u53ca\u9a71\u52a8\u7248\u672c \u2265 595\r\nnvcc --version    # \u5e94\u663e\u793a CUDA \u7248\u672c \u2265 13.2<\/code><\/pre>\n<div class=\"doc-note doc-note--warn\">\n    \u26a0\ufe0f <strong>\u91cd\u8981<\/strong>\uff1a<strong>\u4e0d\u8981<\/strong> \u5b89\u88c5 Ubuntu \u8f6f\u4ef6\u6e90\u4e2d\u7684 <code>nvidia-cuda-toolkit<\/code>\uff0c\u5b83\u4f1a\u8986\u76d6\u4f60\u5df2\u6709\u7684\u65b0\u7248 CUDA\u3002\n<\/div>\n<hr>\n<h2 id=\"deps\">2. \u5b89\u88c5\u7f16\u8bd1\u4f9d\u8d56<\/h2>\n<p>\u6253\u5f00\u7ec8\u7aef\uff08<kbd>Ctrl<\/kbd>+<kbd>Alt<\/kbd>+<kbd>T<\/kbd>\uff09\uff0c\u6267\u884c\uff1a<\/p>\n<pre class=\"prettyprint linenums\" ><code>sudo apt update\r\nsudo apt install -y build-essential cmake git curl wget<\/code><\/pre>\n<hr>\n<h2 id=\"clone\">3. \u514b\u9686 llama.cpp \u5e76\u62c9\u53d6\u6700\u65b0\u7248\u672c<\/h2>\n<p>\u5bf9\u4e8e RTX 5090 \u8fd9\u6837\u7684\u65b0\u786c\u4ef6\uff0c\u5efa\u8bae\u4f7f\u7528\u6700\u65b0\u7684\u4e3b\u5206\u652f\u4ee3\u7801\uff0c\u4ee5\u83b7\u53d6\u6700\u4f73\u4f18\u5316\u548c\u6700\u65b0\u7684 GPU \u652f\u6301\u3002\u76f4\u63a5\u514b\u9686\u5e76\u62c9\u53d6\u6700\u65b0\u63d0\u4ea4\uff1a<\/p>\n<pre class=\"prettyprint linenums\" ><code>git clone https:\/\/github.com\/ggml-org\/llama.cpp.git\r\ncd llama.cpp\r\ngit pull origin master   # \u786e\u4fdd\u662f\u6700\u65b0\u4ee3\u7801\uff08\u53ef\u9009\uff0c\u514b\u9686\u540e\u5373\u6700\u65b0\uff09<\/code><\/pre>\n<p>\u5982\u679c\u4f60\u5e0c\u671b\u540e\u7eed\u624b\u52a8\u66f4\u65b0\uff0c\u53ef\u5728 <code>llama.cpp<\/code> \u76ee\u5f55\u4e0b\u6267\u884c <code>git pull<\/code> \u5373\u53ef\u3002<\/p>\n<hr>\n<h2 id=\"cmake\">4. CMake \u914d\u7f6e\uff08\u5355\u5361 + CUDA\uff09<\/h2>\n<p>\u9488\u5bf9\u4f60\u7684\u5355\u5361 RTX 5090\uff0c\u663e\u5f0f\u6307\u5b9a CUDA \u8def\u5f84\uff0c\u5e76\u8bbe\u7f6e\u5355\u5361\u6a21\u5f0f\u3002<\/p>\n<pre class=\"prettyprint linenums\" ><code>rm -rf build\r\ncmake -B build \\\r\n  -DGGML_CUDA=ON \\\r\n  -DCMAKE_BUILD_TYPE=Release \\\r\n  -DLLAMA_MAX_DEVICES=1 \\\r\n  -DCUDAToolkit_ROOT=\/usr\/local\/cuda \\\r\n  -DCMAKE_CUDA_COMPILER=\/usr\/local\/cuda\/bin\/nvcc<\/code><\/pre>\n<hr>\n<h2 id=\"build\">5. \u7f16\u8bd1<\/h2>\n<p>\u5229\u7528 CPU \u5e76\u884c\u7f16\u8bd1\uff08\u5efa\u8bae\u9650\u5236\u5e76\u884c\u6570\u4ee5\u63a7\u5236\u5185\u5b58\u4f7f\u7528\uff0c\u4f8b\u5982 <code>-j16<\/code>\uff09\uff1a<\/p>\n<pre class=\"prettyprint linenums\" ><code>cmake --build build --config Release -j16<\/code><\/pre>\n<p>\u4f60\u7684 32GB \u5185\u5b58\u5bf9\u4e8e 16 \u4e2a\u5e76\u884c\u4efb\u52a1\u8db3\u591f\u3002\u5982\u679c\u5361\u987f\u53ef\u964d\u4e3a <code>-j8<\/code>\u3002<\/p>\n<p>\u7f16\u8bd1\u5b8c\u6210\u540e\uff0c\u53ef\u6267\u884c\u6587\u4ef6\u4f4d\u4e8e <code>\/home\/ai\/llama.cpp\/build\/bin\/<\/code> \u76ee\u5f55\uff0c\u5305\u62ec <code>llama-cli<\/code> \u548c <code>llama-server<\/code>\u3002<\/p>\n<hr>\n<h2 id=\"install\">6. \u5b89\u88c5\u5230\u7cfb\u7edf\u8def\u5f84\uff08\u53ef\u9009\uff09<\/h2>\n<p>\u82e5\u5e0c\u671b\u5728\u4efb\u4f55\u76ee\u5f55\u4e0b\u76f4\u63a5\u8c03\u7528 <code>llama-server<\/code>\uff0c\u53ef\u6267\u884c\uff1a<\/p>\n<pre class=\"prettyprint linenums\" ><code>sudo cmake --install build<\/code><\/pre>\n<hr>\n<h2 id=\"download\">7. \u4e0b\u8f7d Qwen3.8-27B Q4_K_M \u6a21\u578b<\/h2>\n<p>\u9009\u62e9 4-bit \u91cf\u5316\u7248\u672c\uff08Q4_K_M\uff09\uff0c\u6587\u4ef6\u5927\u5c0f\u7ea6 17-18 GB\uff0c\u5b8c\u7f8e\u9002\u914d 24GB \u663e\u5b58\u3002\u6211\u4eec\u5c06\u6a21\u578b\u653e\u5728 <code>\/home\/ai\/llama.cpp\/models\/Qwen3.8-27B\/<\/code> \u4e0b\u3002<\/p>\n<pre class=\"prettyprint linenums\" ><code>mkdir -p \/home\/ai\/llama.cpp\/models\/Qwen3.8-27B\r\ncd \/home\/ai\/llama.cpp\/models\/Qwen3.8-27B\r\nwget https:\/\/huggingface.co\/Qwen\/Qwen3.8-27B-GGUF\/resolve\/main\/qwen3.8-27b-q4_k_m.gguf<\/code><\/pre>\n<div class=\"doc-note doc-note--info\">\n    \ud83d\udca1 \u5982\u679c\u94fe\u63a5\u5931\u6548\uff0c\u8bf7\u8bbf\u95ee <a href=\"https:\/\/huggingface.co\/Qwen\/Qwen3.8-27B-GGUF\" target=\"_blank\">Qwen3.8-27B-GGUF \u9875\u9762<\/a> \u83b7\u53d6\u6700\u65b0\u4e0b\u8f7d\u5730\u5740\u3002\n<\/div>\n<hr>\n<h2 id=\"test\">8. \u6d4b\u8bd5\u63a8\u7406<\/h2>\n<pre class=\"prettyprint linenums\" ><code>cd \/home\/ai\/llama.cpp\r\n\/home\/ai\/llama.cpp\/build\/bin\/llama-cli -m \/home\/ai\/llama.cpp\/models\/Qwen3.8-27B\/qwen3.8-27b-q4_k_m.gguf -ngl 999 -p \"\u4f60\u597d\" -n 32<\/code><\/pre>\n<p>\u82e5\u80fd\u8f93\u51fa\u4e2d\u6587\u56de\u590d\uff0c\u5219\u7f16\u8bd1\u548c\u6a21\u578b\u52a0\u8f7d\u6210\u529f\u3002<\/p>\n<hr>\n<h2 id=\"script\">9. \u521b\u5efa\u542f\u52a8\u811a\u672c<\/h2>\n<p>\u5728\u684c\u9762\u7a7a\u767d\u5904\u53f3\u952e\uff0c\u9009\u62e9 <strong>\u201c\u5728\u7ec8\u7aef\u4e2d\u6253\u5f00\u201d<\/strong>\uff08Open in Terminal\uff09\uff0c\u6b64\u65f6\u7ec8\u7aef\u76f4\u63a5\u4f4d\u4e8e\u684c\u9762\u76ee\u5f55\u3002\u7136\u540e\u76f4\u63a5\u7f16\u8f91\u542f\u52a8\u811a\u672c <code>run-qwen.sh<\/code>\uff1a<\/p>\n<pre class=\"prettyprint linenums\" ><code>nano run-qwen.sh<\/code><\/pre>\n<p>\u5728 <code>nano<\/code> \u7f16\u8f91\u5668\u4e2d\uff0c\u7c98\u8d34\u4ee5\u4e0b\u5185\u5bb9\uff08\u6240\u6709\u8def\u5f84\u5747\u4e3a\u7edd\u5bf9\u8def\u5f84\uff09\uff1a<\/p>\n<pre class=\"prettyprint linenums\" ><code>#!\/bin\/bash\r\ncd \/home\/ai\/llama.cpp\r\n\r\n\/home\/ai\/llama.cpp\/build\/bin\/llama-server \\\r\n  -m \"\/home\/ai\/llama.cpp\/models\/Qwen3.8-27B\/qwen3.8-27b-q4_k_m.gguf\" \\\r\n  --no-mmap \\\r\n  --ctx-size 32768 \\\r\n  --flash-attn \\\r\n  --batch-size 4096 \\\r\n  --ubatch-size 1024 \\\r\n  --parallel 1 \\\r\n  --host 0.0.0.0 \\\r\n  --port 8080 \\\r\n  -ngl 999 \\\r\n  --threads 16 \\\r\n  --threads-batch 16 \\\r\n  --cache-type-k q8_0 \\\r\n  --cache-type-v q8_0 \\\r\n  --temp 0.6 \\\r\n  --top-p 0.95 \\\r\n  --top-k 20 \\\r\n  --min-p 0.00 \\\r\n  --repeat-penalty 1.1 \\\r\n  --jinja \\\r\n  --props \\\r\n  --metrics \\\r\n  --perf\r\n\r\necho \"\"\r\nread -p \"Server stopped. Press Enter to exit...\" temp<\/code><\/pre>\n<p><strong>\u4fdd\u5b58\u5e76\u9000\u51fa<\/strong>\uff1a\u5728 <code>nano<\/code> \u4e2d\uff0c\u6309 <kbd>Ctrl<\/kbd>+<kbd>O<\/kbd>\uff08\u5b57\u6bcd O\uff09\u4fdd\u5b58\u6587\u4ef6\uff0c\u6309 <kbd>Enter<\/kbd> \u786e\u8ba4\u6587\u4ef6\u540d\uff0c\u7136\u540e\u6309 <kbd>Ctrl<\/kbd>+<kbd>X<\/kbd> \u9000\u51fa\u7f16\u8f91\u5668\u3002<\/p>\n<p><strong>\u53c2\u6570\u8bf4\u660e\uff1a<\/strong><\/p>\n<ul>\n<li><code>--ctx-size 32768<\/code>\uff1a\u4e0a\u4e0b\u6587 32K\uff0c\u5b89\u5168\u8d77\u70b9\uff0c\u53ef\u6839\u636e\u663e\u5b58\u4f59\u91cf\u8c03\u9ad8\u81f3 64K\u3002<\/li>\n<li><code>--threads 16<\/code>\uff1a\u6839\u636e\u4f60 270K+ CPU \u8bbe\u7f6e\uff0c\u53ef\u9002\u5f53\u8c03\u6574\u3002<\/li>\n<li><code>--no-mmap<\/code>\uff1a\u5b8c\u5168\u52a0\u8f7d\u5230\u5185\u5b58\/\u663e\u5b58\uff0c\u907f\u514d\u78c1\u76d8 I\/O\u3002<\/li>\n<li><code>-ngl 999<\/code>\uff1a\u6240\u6709\u5c42\u5378\u8f7d\u5230 GPU\u3002<\/li>\n<li><code>--host 0.0.0.0<\/code>\uff1a\u5141\u8bb8\u672c\u673a\u548c\u5c40\u57df\u7f51\u8bbf\u95ee\u3002<\/li>\n<li><code>--flash-attn<\/code>\uff1a\u542f\u7528 Flash Attention \u52a0\u901f\uff08\u65b0\u7248\u53c2\u6570\uff09\u3002<\/li>\n<\/ul>\n<p>\u4fdd\u5b58\u540e\u8d4b\u4e88\u6267\u884c\u6743\u9650\uff1a<\/p>\n<pre class=\"prettyprint linenums\" ><code>chmod +x run-qwen.sh<\/code><\/pre>\n<hr>\n<h2 id=\"shortcut\">10. \u521b\u5efa\u684c\u9762\u5feb\u6377\u65b9\u5f0f<\/h2>\n<p>\u5728\u540c\u4e00\u4e2a\u7ec8\u7aef\uff08\u4ecd\u5728\u684c\u9762\u76ee\u5f55\uff09\u4e2d\uff0c\u6267\u884c\uff1a<\/p>\n<pre class=\"prettyprint linenums\" ><code>nano QwenServer.desktop<\/code><\/pre>\n<p>\u7c98\u8d34\u4ee5\u4e0b\u5185\u5bb9\uff1a<\/p>\n<pre class=\"prettyprint linenums\" ><code>[Desktop Entry]\r\nVersion=1.0\r\nType=Application\r\nName=Qwen3.8-27B (Q4_K_M)\r\nComment=Launch Local Qwen LLM Server\r\nExec=\/home\/ai\/Desktop\/run-qwen.sh\r\nIcon=utilities-terminal\r\nTerminal=true\r\nCategories=Development;<\/code><\/pre>\n<p>\u4fdd\u5b58\uff08<kbd>Ctrl<\/kbd>+<kbd>O<\/kbd>\uff0c\u56de\u8f66\uff09\u5e76\u9000\u51fa\uff08<kbd>Ctrl<\/kbd>+<kbd>X<\/kbd>\uff09\u3002<\/p>\n<p>\u4e4b\u540e\uff0c\u53f3\u952e\u70b9\u51fb\u684c\u9762\u4e0a\u7684 <code>QwenServer.desktop<\/code> \u6587\u4ef6\uff0c\u9009\u62e9 <strong>\u201c\u5141\u8bb8\u542f\u52a8\u201d<\/strong>\uff08Allow Launching\uff09\u3002\u4e4b\u540e\u53cc\u51fb\u5373\u53ef\u542f\u52a8\u670d\u52a1\u3002<\/p>\n<hr>\n<h2 id=\"verify\">11. \u9a8c\u8bc1\u670d\u52a1\uff08\u542b Web UI\uff09<\/h2>\n<p>\u542f\u52a8\u811a\u672c\u540e\uff08\u53cc\u51fb\u684c\u9762\u56fe\u6807\u6216\u7ec8\u7aef\u8fd0\u884c <code>\/home\/ai\/Desktop\/run-qwen.sh<\/code>\uff09\uff0c\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u65b9\u5f0f\u9a8c\u8bc1\uff1a<\/p>\n<h3>\u65b9\u5f0f\u4e00\uff1a\u6d4f\u89c8\u5668 Web UI\uff08\u63a8\u8350\uff09<\/h3>\n<div class=\"doc-note doc-note--info\">\n    \ud83c\udf10 \u6253\u5f00\u6d4f\u89c8\u5668\uff0c\u8bbf\u95ee <code>http:\/\/127.0.0.1:8080<\/code>\uff0c\u5373\u53ef\u770b\u5230\u804a\u5929\u754c\u9762\uff0c\u76f4\u63a5\u8f93\u5165\u5bf9\u8bdd\u3002\n<\/div>\n<p>\u8fd9\u548c\u4f7f\u7528 Windows \u4e0b\u7684 AI \u5de5\u5177\u4f53\u9a8c\u5b8c\u5168\u4e00\u81f4\u3002<\/p>\n<h3>\u65b9\u5f0f\u4e8c\uff1a\u547d\u4ee4\u884c API \u6d4b\u8bd5<\/h3>\n<pre class=\"prettyprint linenums\" ><code># \u67e5\u770b\u6a21\u578b\u5217\u8868\r\ncurl http:\/\/127.0.0.1:8080\/v1\/models | python3 -m json.tool\r\n\r\n# \u53d1\u9001\u804a\u5929\u8bf7\u6c42\r\ncurl http:\/\/127.0.0.1:8080\/v1\/chat\/completions \\\r\n  -H \"Content-Type: application\/json\" \\\r\n  -d '{\"model\":\"qwen3.8-27b-q4_k_m\",\"messages\":[{\"role\":\"user\",\"content\":\"\u4f60\u597d\uff0c\u8bf7\u4ecb\u7ecd\u4e00\u4e0b\u4f60\u81ea\u5df1\"}]}' | python3 -m json.tool<\/code><\/pre>\n<h3>\u68c0\u67e5 GPU \u4f7f\u7528<\/h3>\n<pre class=\"prettyprint linenums\" ><code>nvidia-smi<\/code><\/pre>\n<p>\u663e\u5b58\u5360\u7528\u5e94\u5728 <strong>18-20GB<\/strong> \u4e4b\u95f4\uff08\u542b KV Cache\uff09\u3002<\/p>\n<hr>\n<h2 id=\"faq\">12. \u5e38\u89c1\u62a5\u9519\u53ca\u5e94\u5bf9<\/h2>\n<table class=\"doc-table\">\n<thead>\n<tr>\n<th>\u62a5\u9519\u73b0\u8c61<\/th>\n<th>\u53ef\u80fd\u539f\u56e0<\/th>\n<th>\u89e3\u51b3\u65b9\u6848<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><code>nvcc fatal: Unsupported gpu architecture 'compute_120'<\/code><\/td>\n<td>CUDA \u7248\u672c &lt; 12.4<\/td>\n<td>\u4f60\u5df2\u5b89\u88c5 13.x\uff0c\u4e0d\u4f1a\u51fa\u73b0\u3002\u82e5\u51fa\u73b0\u5219\u5347\u7ea7 CUDA\u3002<\/td>\n<\/tr>\n<tr>\n<td><code>CMake Error: CUDA not found<\/code><\/td>\n<td>CMake \u672a\u627e\u5230 CUDA<\/td>\n<td>\u5728 cmake \u547d\u4ee4\u4e2d\u663e\u5f0f\u6307\u5b9a <code>-DCUDAToolkit_ROOT=\/usr\/local\/cuda<\/code>\u3002<\/td>\n<\/tr>\n<tr>\n<td>\u7f16\u8bd1\u65f6 <code>noexcept<\/code> \u76f8\u5173\u9519\u8bef<\/td>\n<td>CUDA 13.0\/13.1 \u5df2\u77e5 bug<\/td>\n<td>CUDA 13.2+ \u5df2\u4fee\u590d\uff0c\u65e0\u9700\u624b\u52a8\u4fee\u6539\u3002<\/td>\n<\/tr>\n<tr>\n<td><code>CUDA error: out of memory<\/code><\/td>\n<td>\u6a21\u578b + KV Cache \u8d85\u51fa 24GB<\/td>\n<td>\u964d\u4f4e <code>--ctx-size<\/code>\uff08\u5982 16384\uff09\u6216 <code>--batch-size<\/code>\uff08\u5982 2048\uff09\u3002<\/td>\n<\/tr>\n<tr>\n<td>\u7aef\u53e3 8080 \u88ab\u5360\u7528<\/td>\n<td>\u5176\u4ed6\u8fdb\u7a0b\u4f7f\u7528\u8be5\u7aef\u53e3<\/td>\n<td>\u66f4\u6539 <code>--port<\/code> \u4e3a\u5176\u4ed6\u7aef\u53e3\u3002<\/td>\n<\/tr>\n<tr>\n<td>\u684c\u9762\u5feb\u6377\u65b9\u5f0f\u65e0\u53cd\u5e94<\/td>\n<td><code>.desktop<\/code> \u672a\u6807\u8bb0\u53ef\u6267\u884c\u6216\u8def\u5f84\u9519\u8bef<\/td>\n<td>\u786e\u4fdd <code>Exec=<\/code> \u8def\u5f84\u6b63\u786e\uff0c\u811a\u672c\u6709\u6267\u884c\u6743\u9650\u3002<\/td>\n<\/tr>\n<tr>\n<td>\u6a21\u578b\u4e0b\u8f7d\u94fe\u63a5\u5931\u6548<\/td>\n<td>Hugging Face \u6587\u4ef6\u8def\u5f84\u66f4\u65b0<\/td>\n<td>\u8bbf\u95ee\u9875\u9762\u83b7\u53d6\u6700\u65b0\u94fe\u63a5\u3002<\/td>\n<\/tr>\n<tr>\n<td>\u751f\u6210\u901f\u5ea6\u6162<\/td>\n<td>\u4e0a\u4e0b\u6587\u592a\u5927\u6216\u7ebf\u7a0b\u6570\u4e0d\u8db3<\/td>\n<td>\u964d\u4f4e <code>--ctx-size<\/code> \u6216\u589e\u52a0 <code>--threads<\/code>\uff08\u4e0d\u8d85\u8fc7\u7269\u7406\u6838\u5fc3\u6570\uff09\u3002<\/td>\n<\/tr>\n<tr>\n<td>\u6d4f\u89c8\u5668\u65e0\u6cd5\u6253\u5f00 <code>http:\/\/127.0.0.1:8080<\/code><\/td>\n<td>\u670d\u52a1\u672a\u542f\u52a8\u6216 <code>--host<\/code> \u9519\u8bef<\/td>\n<td>\u68c0\u67e5\u7ec8\u7aef\u65e5\u5fd7\uff0c\u786e\u8ba4 <code>--host 0.0.0.0<\/code> \u548c <code>--port 8080<\/code> \u6b63\u786e\u3002<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<hr>\n<h2 id=\"tune\">13. \u6027\u80fd\u8c03\u4f18\u5efa\u8bae<\/h2>\n<ul>\n<li><strong>\u4e0a\u4e0b\u6587\u957f\u5ea6<\/strong>\uff1a\u4ece 32K \u5f00\u59cb\uff0c\u82e5\u663e\u5b58 &lt; 20GB \u4f7f\u7528\u91cf\uff0c\u53ef\u9010\u6b65\u63d0\u5347\u81f3 64K\u3002<\/li>\n<li><strong>\u6279\u91cf\u5927\u5c0f<\/strong>\uff1a<code>--batch-size 4096<\/code> \u5df2\u4f18\u5316\uff0c\u9047 OOM \u53ef\u51cf\u534a\u3002<\/li>\n<li><strong>KV Cache \u91cf\u5316<\/strong>\uff1a<code>q8_0<\/code> \u5e73\u8861\u8d28\u91cf\u4e0e\u663e\u5b58\uff0c\u82e5\u9700\u8282\u7701\u663e\u5b58\u53ef\u6539\u7528 <code>q4_0<\/code>\u3002<\/li>\n<li><strong>CPU \u7ebf\u7a0b<\/strong>\uff1a<code>--threads 16<\/code> \u8db3\u591f\uff0c\u53ef\u8c03\u6574\u81f3 24 \u6216 32\uff0c\u4f46 GPU \u662f\u74f6\u9888\u3002<\/li>\n<\/ul>\n<hr>\n<div class=\"doc-foot\">\n    \ud83c\udf89 \u606d\u559c\uff01\u4f60\u7684 RTX 5090 + Qwen3.8-27B \u73af\u5883\u5df2\u914d\u7f6e\u5b8c\u6210\u3002<br \/>\n    \u53cc\u51fb\u684c\u9762\u56fe\u6807\uff0c\u6253\u5f00\u6d4f\u89c8\u5668\u8bbf\u95ee <code>http:\/\/127.0.0.1:8080<\/code>\uff0c\u5f00\u59cb\u672c\u5730 AI \u5bf9\u8bdd\u5427\uff01\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>\ud83d\udcc5 \u6700\u540e\u66f4\u65b0\uff1a2026\u5e748\u670827\u65e5 &nbsp;|&nbsp; \ud83c\udff7\ufe0f \u786c\u4ef6\uff1aRTX 5090 24GB \/ 32GB \u5185\u5b58 \/ 270K+ CPU &nbsp;|&nbsp; \ud83d\udc64 \u7528\u6237\uff1aai \u672c\u6559\u7a0b\u4e13\u4e3a RTX 5090 24GB \u663e\u5361\u4f18\u5316\uff0c\u4f7f\u7528 Qwen3.8-27B Q4_K_M \u91cf\u5316\u6a21\u578b\uff0c\u5728 Ubuntu 26.04 LTS \u4e0a\u4ece\u6e90\u7801\u7f16\u8bd1 llama.cpp \u5e76\u914d\u7f6e\u4e00\u952e\u542f\u52a8\uff0c\u63d0\u4f9b\u7c7b\u4f3c Win [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[17,12],"tags":[27,28,30,22,26],"class_list":["post-65","post","type-post","status-publish","format-standard","hentry","category-local-ai-linux","category-local-ai","tag-llama-cpp","tag-qwen","tag-rtx-5090","tag-ubuntu","tag-local-llm"],"_links":{"self":[{"href":"https:\/\/wp.jyy7998.tk\/index.php?rest_route=\/wp\/v2\/posts\/65","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wp.jyy7998.tk\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wp.jyy7998.tk\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wp.jyy7998.tk\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/wp.jyy7998.tk\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=65"}],"version-history":[{"count":1,"href":"https:\/\/wp.jyy7998.tk\/index.php?rest_route=\/wp\/v2\/posts\/65\/revisions"}],"predecessor-version":[{"id":116,"href":"https:\/\/wp.jyy7998.tk\/index.php?rest_route=\/wp\/v2\/posts\/65\/revisions\/116"}],"wp:attachment":[{"href":"https:\/\/wp.jyy7998.tk\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=65"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wp.jyy7998.tk\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=65"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wp.jyy7998.tk\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=65"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}