{"id":85554,"date":"2026-07-27T17:49:29","date_gmt":"2026-07-27T09:49:29","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/85554.html"},"modified":"2026-07-27T17:49:29","modified_gmt":"2026-07-27T09:49:29","slug":"gemma-3-12b-it%e9%83%a8%e7%bd%b2%e5%ae%9e%e6%88%98%ef%bc%9a32gb%e5%86%85%e5%ad%98%e6%9c%8d%e5%8a%a1%e5%99%a8%e8%bf%90%e8%a1%8c23gb%e6%a8%a1%e5%9e%8b%e7%a8%b3%e5%ae%9a%e6%80%a7%e6%b5%8b%e8%af%95","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/85554.html","title":{"rendered":"Gemma-3-12B-IT\u90e8\u7f72\u5b9e\u6218\uff1a32GB\u5185\u5b58\u670d\u52a1\u5668\u8fd0\u884c23GB\u6a21\u578b\u7a33\u5b9a\u6027\u6d4b\u8bd5"},"content":{"rendered":"<h2>Gemma-3-12B-IT\u90e8\u7f72\u5b9e\u6218&#xff1a;32GB\u5185\u5b58\u670d\u52a1\u5668\u8fd0\u884c23GB\u6a21\u578b\u7a33\u5b9a\u6027\u6d4b\u8bd5<\/h2>\n<h3>1. \u5f15\u8a00&#xff1a;\u5f53\u5927\u6a21\u578b\u9047\u4e0a\u6709\u9650\u8d44\u6e90<\/h3>\n<p>\u6700\u8fd1&#xff0c;Google\u5f00\u6e90\u7684Gemma-3-12B-IT\u6a21\u578b\u5728\u5f00\u53d1\u8005\u793e\u533a\u5f15\u8d77\u4e86\u4e0d\u5c0f\u7684\u5173\u6ce8\u3002\u4f5c\u4e3a\u4e00\u4e2a120\u4ebf\u53c2\u6570\u7684\u6307\u4ee4\u5fae\u8c03\u6a21\u578b&#xff0c;\u5b83\u5728\u63a8\u7406\u80fd\u529b\u3001\u591a\u8bed\u8a00\u652f\u6301\u548c\u6548\u7387\u4e0a\u76f8\u6bd4\u524d\u4ee3\u6709\u4e86\u663e\u8457\u63d0\u5347\u3002\u4f46\u6700\u5438\u5f15\u6211\u7684&#xff0c;\u662f\u5b83\u5ba3\u79f0\u7684\u201c\u8f7b\u91cf\u7ea7\u201d\u7279\u6027\u2014\u2014\u4e00\u4e2a23GB\u7684\u6a21\u578b&#xff0c;\u771f\u7684\u80fd\u572832GB\u5185\u5b58\u7684\u670d\u52a1\u5668\u4e0a\u7a33\u5b9a\u8fd0\u884c\u5417&#xff1f;<\/p>\n<p>\u8fd9\u6b63\u662f\u6211\u51b3\u5b9a\u8fdb\u884c\u8fd9\u6b21\u6d4b\u8bd5\u7684\u539f\u56e0\u3002\u5f88\u591a\u4e2d\u5c0f\u56e2\u961f\u548c\u4e2a\u4eba\u5f00\u53d1\u8005&#xff0c;\u624b\u5934\u5e76\u6ca1\u6709\u52a8\u8f84\u4e0a\u767eGB\u5185\u5b58\u7684\u8c6a\u534e\u914d\u7f6e\u3002\u5982\u679cGemma-3-12B-IT\u771f\u7684\u80fd\u572832GB\u5185\u5b58\u73af\u5883\u4e0b\u7a33\u5b9a\u5de5\u4f5c&#xff0c;\u90a3\u65e0\u7591\u4e3a\u66f4\u591a\u5f00\u53d1\u8005\u6253\u5f00\u4e86\u672c\u5730\u90e8\u7f72\u5927\u6a21\u578b\u7684\u5927\u95e8\u3002<\/p>\n<p>\u5728\u63a5\u4e0b\u6765\u7684\u5185\u5bb9\u91cc&#xff0c;\u6211\u5c06\u5206\u4eab\u4ece\u73af\u5883\u51c6\u5907\u5230\u538b\u529b\u6d4b\u8bd5\u7684\u5b8c\u6574\u8fc7\u7a0b&#xff0c;\u5305\u62ec\u9047\u5230\u7684\u5751\u3001\u89e3\u51b3\u7684\u65b9\u6848&#xff0c;\u4ee5\u53ca\u6700\u7ec8\u7684\u6027\u80fd\u8868\u73b0\u3002\u65e0\u8bba\u4f60\u662f\u60f3\u5728\u81ea\u5df1\u7684\u670d\u52a1\u5668\u4e0a\u90e8\u7f72&#xff0c;\u8fd8\u662f\u5355\u7eaf\u597d\u5947\u5927\u6a21\u578b\u5728\u6709\u9650\u8d44\u6e90\u4e0b\u7684\u8868\u73b0&#xff0c;\u8fd9\u7bc7\u6587\u7ae0\u90fd\u4f1a\u7ed9\u4f60\u4e00\u4e2a\u6e05\u6670\u7684\u7b54\u6848\u3002<\/p>\n<h3>2. \u6d4b\u8bd5\u73af\u5883\u4e0e\u51c6\u5907\u5de5\u4f5c<\/h3>\n<h4>2.1 \u786c\u4ef6\u914d\u7f6e&#xff1a;\u6211\u4eec\u7684\u201c\u8003\u573a\u201d<\/h4>\n<p>\u5148\u6765\u770b\u770b\u8fd9\u6b21\u6d4b\u8bd5\u7684\u786c\u4ef6\u6761\u4ef6&#xff0c;\u8fd9\u76f4\u63a5\u51b3\u5b9a\u4e86\u6a21\u578b\u7684\u8fd0\u884c\u4e0a\u9650&#xff1a;<\/p>\n<p>\u670d\u52a1\u5668\u914d\u7f6e\u6e05\u5355&#xff1a;<\/p>\n<ul>\n<li>CPU: Intel Xeon E5-2680 v4 (14\u683828\u7ebf\u7a0b)<\/li>\n<li>\u5185\u5b58: 32GB DDR4 ECC (\u5b9e\u9645\u53ef\u7528\u7ea630GB)<\/li>\n<li>\u5b58\u50a8: 512GB NVMe SSD<\/li>\n<li>\u7f51\u7edc: \u5343\u5146\u4ee5\u592a\u7f51<\/li>\n<li>\u64cd\u4f5c\u7cfb\u7edf: Ubuntu 22.04 LTS<\/li>\n<\/ul>\n<p>\u8fd9\u4e2a\u914d\u7f6e\u5728\u4eca\u5929\u7684\u6807\u51c6\u4e0b\u7b97\u4e0d\u4e0a\u9ad8\u7aef&#xff0c;\u4f46\u6070\u6070\u4ee3\u8868\u4e86\u76f8\u5f53\u4e00\u90e8\u5206\u5f00\u53d1\u8005\u548c\u4e2d\u5c0f\u4f01\u4e1a\u7684\u5b9e\u9645\u60c5\u51b5\u3002\u6ca1\u6709\u72ec\u7acbGPU&#xff0c;\u5168\u9760CPU\u548c\u5185\u5b58\u786c\u625b\u3002<\/p>\n<h4>2.2 \u8f6f\u4ef6\u73af\u5883&#xff1a;\u6253\u597d\u57fa\u7840<\/h4>\n<p>\u5728\u5f00\u59cb\u90e8\u7f72\u4e4b\u524d&#xff0c;\u9700\u8981\u786e\u4fdd\u7cfb\u7edf\u73af\u5883\u51c6\u5907\u5c31\u7eea\u3002\u4ee5\u4e0b\u662f\u5173\u952e\u6b65\u9aa4&#xff1a;<\/p>\n<p># \u66f4\u65b0\u7cfb\u7edf\u5305<br \/>\nsudo apt update &amp;&amp; sudo apt upgrade -y<\/p>\n<p># \u5b89\u88c5Python 3.11&#xff08;Gemma-3\u63a8\u8350\u7248\u672c&#xff09;<br \/>\nsudo apt install python3.11 python3.11-venv python3.11-dev -y<\/p>\n<p># \u8bbe\u7f6ePython 3.11\u4e3a\u9ed8\u8ba4\u7248\u672c<br \/>\nsudo update-alternatives &#8211;install \/usr\/bin\/python3 python3 \/usr\/bin\/python3.11 1<\/p>\n<p># \u5b89\u88c5\u5fc5\u8981\u7684\u7cfb\u7edf\u4f9d\u8d56<br \/>\nsudo apt install build-essential cmake git wget curl -y<\/p>\n<p># \u521b\u5efa\u4e13\u7528\u76ee\u5f55<br \/>\nmkdir -p ~\/ai-projects\/gemma-3<br \/>\ncd ~\/ai-projects\/gemma-3<\/p>\n<h4>2.3 \u6a21\u578b\u4e0b\u8f7d&#xff1a;23GB\u7684\u201c\u5927\u5bb6\u4f19\u201d<\/h4>\n<p>Gemma-3-12B-IT\u6a21\u578b\u6587\u4ef6\u5927\u7ea623GB&#xff0c;\u4e0b\u8f7d\u9700\u8981\u4e00\u4e9b\u65f6\u95f4\u548c\u7a7a\u95f4\u51c6\u5907&#xff1a;<\/p>\n<p># \u521b\u5efa\u6a21\u578b\u5b58\u50a8\u76ee\u5f55<br \/>\nmkdir -p ~\/ai-models\/LLM-Research\/gemma-3-12b-it<\/p>\n<p># \u4f7f\u7528wget\u4e0b\u8f7d&#xff08;\u9700\u8981\u63d0\u524d\u83b7\u53d6\u4e0b\u8f7d\u94fe\u63a5&#xff09;<br \/>\n# \u8fd9\u91cc\u5047\u8bbe\u4f60\u5df2\u7ecf\u4eceHugging Face\u6216\u5b98\u65b9\u6e20\u9053\u83b7\u5f97\u4e86\u4e0b\u8f7d\u6743\u9650<br \/>\n# wget -c [\u6a21\u578b\u4e0b\u8f7d\u94fe\u63a5] -O ~\/ai-models\/LLM-Research\/gemma-3-12b-it\/model.bin<\/p>\n<p># \u6216\u8005\u4f7f\u7528git lfs&#xff08;\u5982\u679c\u6a21\u578b\u6258\u7ba1\u5728Git\u4e0a&#xff09;<br \/>\n# git lfs install<br \/>\n# git clone [\u6a21\u578b\u4ed3\u5e93\u5730\u5740] ~\/ai-models\/LLM-Research\/gemma-3-12b-it<\/p>\n<p>\u91cd\u8981\u63d0\u793a&#xff1a;\u7531\u4e8e\u6a21\u578b\u6587\u4ef6\u8f83\u5927&#xff0c;\u5efa\u8bae\u5728\u7f51\u7edc\u72b6\u51b5\u826f\u597d\u7684\u65f6\u5019\u4e0b\u8f7d&#xff0c;\u6216\u8005\u4f7f\u7528\u6709\u65ad\u70b9\u7eed\u4f20\u529f\u80fd\u7684\u5de5\u5177\u3002\u4e0b\u8f7d\u5b8c\u6210\u540e&#xff0c;\u8bb0\u5f97\u9a8c\u8bc1\u6587\u4ef6\u5b8c\u6574\u6027\u3002<\/p>\n<h3>3. \u90e8\u7f72\u8fc7\u7a0b\u5168\u8bb0\u5f55<\/h3>\n<h4>3.1 Web UI\u9879\u76ee\u90e8\u7f72<\/h4>\n<p>\u6211\u9009\u62e9\u4e86\u4e00\u4e2a\u5f00\u6e90\u7684Web UI\u9879\u76ee\u6765\u90e8\u7f72Gemma-3-12B-IT&#xff0c;\u8fd9\u6837\u53ef\u4ee5\u901a\u8fc7\u6d4f\u89c8\u5668\u76f4\u63a5\u4e0e\u6a21\u578b\u4ea4\u4e92&#xff0c;\u6d4b\u8bd5\u8d77\u6765\u66f4\u65b9\u4fbf\u3002<\/p>\n<p># \u514b\u9686Web UI\u9879\u76ee<br \/>\ncd ~\/ai-projects\/gemma-3<br \/>\ngit clone https:\/\/github.com\/example\/gemma-3-webui.git<br \/>\ncd gemma-3-webui<\/p>\n<p># \u521b\u5efaPython\u865a\u62df\u73af\u5883<br \/>\npython3.11 -m venv venv<br \/>\nsource venv\/bin\/activate<\/p>\n<p># \u5b89\u88c5\u4f9d\u8d56\u5305<br \/>\npip install &#8211;upgrade pip<br \/>\npip install torch torchvision torchaudio &#8211;index-url https:\/\/download.pytorch.org\/whl\/cpu<br \/>\npip install -r requirements.txt<\/p>\n<p># \u914d\u7f6e\u6a21\u578b\u8def\u5f84<br \/>\ncat &gt; config.yaml &lt;&lt; EOF<br \/>\nmodel:<br \/>\n  path: &#034;\/root\/ai-models\/LLM-Research\/gemma-3-12b-it&#034;<br \/>\n  name: &#034;gemma-3-12b-it&#034;<br \/>\n  device: &#034;cpu&#034;  # \u4f7f\u7528CPU\u63a8\u7406<\/p>\n<p>server:<br \/>\n  host: &#034;0.0.0.0&#034;<br \/>\n  port: 7860<br \/>\n  workers: 2<\/p>\n<p>generation:<br \/>\n  max_tokens: 512<br \/>\n  temperature: 0.7<br \/>\n  top_p: 0.9<br \/>\nEOF<\/p>\n<h4>3.2 \u5185\u5b58\u4f18\u5316\u914d\u7f6e<\/h4>\n<p>\u572832GB\u5185\u5b58\u7684\u670d\u52a1\u5668\u4e0a\u8fd0\u884c23GB\u7684\u6a21\u578b&#xff0c;\u5185\u5b58\u7ba1\u7406\u81f3\u5173\u91cd\u8981\u3002\u4ee5\u4e0b\u662f\u5173\u952e\u7684\u4f18\u5316\u914d\u7f6e&#xff1a;<\/p>\n<p># \u5728model_service.py\u4e2d\u6dfb\u52a0\u5185\u5b58\u4f18\u5316\u914d\u7f6e<br \/>\nimport os<br \/>\nos.environ[&#034;OMP_NUM_THREADS&#034;] &#061; &#034;8&#034;  # \u9650\u5236OpenMP\u7ebf\u7a0b\u6570<br \/>\nos.environ[&#034;MKL_NUM_THREADS&#034;] &#061; &#034;8&#034;  # \u9650\u5236MKL\u7ebf\u7a0b\u6570<\/p>\n<p># \u4f7f\u7528\u5185\u5b58\u6620\u5c04\u52a0\u8f7d\u5927\u6a21\u578b<br \/>\ndef load_model_with_mmap(model_path):<br \/>\n    &#034;&#034;&#034;<br \/>\n    \u4f7f\u7528\u5185\u5b58\u6620\u5c04\u65b9\u5f0f\u52a0\u8f7d\u6a21\u578b&#xff0c;\u51cf\u5c11\u5185\u5b58\u5360\u7528<br \/>\n    &#034;&#034;&#034;<br \/>\n    from transformers import AutoModelForCausalLM, AutoTokenizer<\/p>\n<p>    # \u5173\u952e\u914d\u7f6e&#xff1a;\u4f7f\u7528\u4f4e\u5185\u5b58\u6a21\u5f0f<br \/>\n    model &#061; AutoModelForCausalLM.from_pretrained(<br \/>\n        model_path,<br \/>\n        torch_dtype&#061;torch.float16,  # \u4f7f\u7528\u534a\u7cbe\u5ea6\u51cf\u5c11\u5185\u5b58<br \/>\n        low_cpu_mem_usage&#061;True,     # \u4f4eCPU\u5185\u5b58\u4f7f\u7528\u6a21\u5f0f<br \/>\n        device_map&#061;&#034;cpu&#034;,           # \u6307\u5b9a\u4f7f\u7528CPU<br \/>\n        offload_folder&#061;&#034;offload&#034;    # \u6ea2\u51fa\u65f6\u4e34\u65f6\u5b58\u50a8\u76ee\u5f55<br \/>\n    )<\/p>\n<p>    tokenizer &#061; AutoTokenizer.from_pretrained(model_path)<br \/>\n    return model, tokenizer<\/p>\n<h4>3.3 \u670d\u52a1\u542f\u52a8\u4e0e\u9a8c\u8bc1<\/h4>\n<p>\u914d\u7f6e\u5b8c\u6210\u540e&#xff0c;\u542f\u52a8\u670d\u52a1\u5e76\u9a8c\u8bc1\u662f\u5426\u6b63\u5e38\u8fd0\u884c&#xff1a;<\/p>\n<p># \u542f\u52a8Web UI\u670d\u52a1<br \/>\ncd ~\/ai-projects\/gemma-3\/gemma-3-webui<br \/>\n.\/start.sh<\/p>\n<p># \u67e5\u770b\u670d\u52a1\u72b6\u6001<br \/>\n.\/manage.sh status<\/p>\n<p># \u76d1\u63a7\u5185\u5b58\u4f7f\u7528\u60c5\u51b5<br \/>\nwatch -n 1 &#034;free -h &amp;&amp; echo &#039;&#8212;&#039; &amp;&amp; ps aux | grep python | grep -v grep&#034;<\/p>\n<p>\u670d\u52a1\u542f\u52a8\u540e&#xff0c;\u5728\u6d4f\u89c8\u5668\u4e2d\u8bbf\u95ee http:\/\/\u670d\u52a1\u5668IP:7860&#xff0c;\u5e94\u8be5\u80fd\u770b\u5230Web UI\u754c\u9762\u3002\u9996\u6b21\u52a0\u8f7d\u6a21\u578b\u53ef\u80fd\u9700\u89811-2\u5206\u949f&#xff0c;\u8fd9\u662f\u6b63\u5e38\u73b0\u8c61\u3002<\/p>\n<h3>4. \u7a33\u5b9a\u6027\u6d4b\u8bd5\u65b9\u6848\u8bbe\u8ba1<\/h3>\n<h4>4.1 \u6d4b\u8bd5\u76ee\u6807\u4e0e\u6307\u6807<\/h4>\n<p>\u4e3a\u4e86\u5168\u9762\u8bc4\u4f30\u6a21\u578b\u572832GB\u5185\u5b58\u73af\u5883\u4e0b\u7684\u7a33\u5b9a\u6027&#xff0c;\u6211\u8bbe\u8ba1\u4e86\u4ee5\u4e0b\u51e0\u4e2a\u6d4b\u8bd5\u7ef4\u5ea6&#xff1a;<\/p>\n<p>\u6838\u5fc3\u6d4b\u8bd5\u6307\u6807&#xff1a;<\/p>\n<li>\u5185\u5b58\u5360\u7528\u5cf0\u503c&#xff1a;\u6a21\u578b\u52a0\u8f7d\u548c\u63a8\u7406\u65f6\u7684\u6700\u5927\u5185\u5b58\u4f7f\u7528<\/li>\n<li>\u54cd\u5e94\u65f6\u95f4\u7a33\u5b9a\u6027&#xff1a;\u8fde\u7eed\u8bf7\u6c42\u4e0b\u7684\u54cd\u5e94\u65f6\u95f4\u53d8\u5316<\/li>\n<li>\u957f\u65f6\u95f4\u8fd0\u884c\u7a33\u5b9a\u6027&#xff1a;\u6301\u7eed\u8fd0\u884c8\u5c0f\u65f6\u4ee5\u4e0a\u7684\u8868\u73b0<\/li>\n<li>\u5e76\u53d1\u5904\u7406\u80fd\u529b&#xff1a;\u540c\u65f6\u5904\u7406\u591a\u4e2a\u8bf7\u6c42\u7684\u80fd\u529b<\/li>\n<li>\u5f02\u5e38\u6062\u590d\u80fd\u529b&#xff1a;\u9047\u5230\u9519\u8bef\u540e\u7684\u6062\u590d\u60c5\u51b5<\/li>\n<h4>4.2 \u6d4b\u8bd5\u7528\u4f8b\u8bbe\u8ba1<\/h4>\n<p>\u6211\u51c6\u5907\u4e86\u56db\u7c7b\u6d4b\u8bd5\u7528\u4f8b&#xff0c;\u8986\u76d6\u4e0d\u540c\u7684\u4f7f\u7528\u573a\u666f&#xff1a;<\/p>\n<p># \u6d4b\u8bd5\u7528\u4f8b\u5b9a\u4e49<br \/>\ntest_cases &#061; {<br \/>\n    &#034;\u77ed\u6587\u672c\u5bf9\u8bdd&#034;: [<br \/>\n        &#034;\u4f60\u597d&#xff0c;\u8bf7\u4ecb\u7ecd\u4e00\u4e0b\u4f60\u81ea\u5df1&#034;,<br \/>\n        &#034;\u4eca\u5929\u7684\u5929\u6c14\u600e\u4e48\u6837&#xff1f;&#034;,<br \/>\n        &#034;Python\u662f\u4ec0\u4e48&#xff1f;&#034;,<br \/>\n        &#034;\u8c22\u8c22\u4f60\u7684\u5e2e\u52a9&#034;<br \/>\n    ],<\/p>\n<p>    &#034;\u4ee3\u7801\u751f\u6210\u4efb\u52a1&#034;: [<br \/>\n        &#034;\u5199\u4e00\u4e2aPython\u51fd\u6570\u8ba1\u7b97\u6590\u6ce2\u90a3\u5951\u6570\u5217&#034;,<br \/>\n        &#034;\u7528JavaScript\u5b9e\u73b0\u4e00\u4e2a\u7b80\u5355\u7684\u5f85\u529e\u4e8b\u9879\u5217\u8868&#034;,<br \/>\n        &#034;\u5199\u4e00\u4e2aSQL\u67e5\u8be2&#xff0c;\u627e\u51fa\u9500\u552e\u989d\u6700\u9ad8\u7684\u4ea7\u54c1&#034;,<br \/>\n        &#034;\u5b9e\u73b0\u4e00\u4e2a\u5feb\u901f\u6392\u5e8f\u7b97\u6cd5&#034;<br \/>\n    ],<\/p>\n<p>    &#034;\u957f\u6587\u672c\u751f\u6210&#034;: [<br \/>\n        &#034;\u5199\u4e00\u7bc7\u5173\u4e8e\u4eba\u5de5\u667a\u80fd\u672a\u6765\u53d1\u5c55\u7684\u77ed\u6587&#xff0c;\u7ea6300\u5b57&#034;,<br \/>\n        &#034;\u8be6\u7ec6\u89e3\u91ca\u4ec0\u4e48\u662f\u673a\u5668\u5b66\u4e60&#xff0c;\u5305\u62ec\u4e3b\u8981\u7c7b\u578b\u548c\u5e94\u7528\u573a\u666f&#034;,<br \/>\n        &#034;\u63cf\u8ff0\u4e00\u4e0b\u4e91\u8ba1\u7b97\u7684\u57fa\u672c\u6982\u5ff5\u548c\u4f18\u52bf&#034;<br \/>\n    ],<\/p>\n<p>    &#034;\u590d\u6742\u63a8\u7406\u4efb\u52a1&#034;: [<br \/>\n        &#034;\u5982\u679c\u6211\u67091000\u5143&#xff0c;\u5e74\u5229\u73875%&#xff0c;\u5b583\u5e74&#xff0c;\u6700\u540e\u80fd\u62ff\u5230\u591a\u5c11\u94b1&#xff1f;\u8bf7\u5199\u51fa\u8ba1\u7b97\u8fc7\u7a0b&#034;,<br \/>\n        &#034;\u6bd4\u8f83Python\u548cJava\u5728Web\u5f00\u53d1\u4e2d\u7684\u4f18\u7f3a\u70b9&#034;,<br \/>\n        &#034;\u89e3\u91ca\u4e00\u4e0bTCP\u4e09\u6b21\u63e1\u624b\u7684\u8fc7\u7a0b&#034;<br \/>\n    ]<br \/>\n}<\/p>\n<h4>4.3 \u81ea\u52a8\u5316\u6d4b\u8bd5\u811a\u672c<\/h4>\n<p>\u4e3a\u4e86\u7cfb\u7edf\u6027\u5730\u8fdb\u884c\u6d4b\u8bd5&#xff0c;\u6211\u7f16\u5199\u4e86\u4e00\u4e2a\u81ea\u52a8\u5316\u6d4b\u8bd5\u811a\u672c&#xff1a;<\/p>\n<p>import requests<br \/>\nimport time<br \/>\nimport psutil<br \/>\nimport json<br \/>\nfrom datetime import datetime<\/p>\n<p>class StabilityTester:<br \/>\n    def __init__(self, base_url&#061;&#034;http:\/\/localhost:7860&#034;):<br \/>\n        self.base_url &#061; base_url<br \/>\n        self.results &#061; []<\/p>\n<p>    def get_memory_usage(self):<br \/>\n        &#034;&#034;&#034;\u83b7\u53d6\u5f53\u524d\u5185\u5b58\u4f7f\u7528\u60c5\u51b5&#034;&#034;&#034;<br \/>\n        memory &#061; psutil.virtual_memory()<br \/>\n        return {<br \/>\n            &#034;total&#034;: memory.total \/ (1024**3),  # GB<br \/>\n            &#034;available&#034;: memory.available \/ (1024**3),<br \/>\n            &#034;used&#034;: memory.used \/ (1024**3),<br \/>\n            &#034;percent&#034;: memory.percent<br \/>\n        }<\/p>\n<p>    def send_request(self, prompt, max_tokens&#061;512):<br \/>\n        &#034;&#034;&#034;\u53d1\u9001\u8bf7\u6c42\u5230\u6a21\u578b\u5e76\u8bb0\u5f55\u6027\u80fd\u6570\u636e&#034;&#034;&#034;<br \/>\n        start_time &#061; time.time()<br \/>\n        memory_before &#061; self.get_memory_usage()<\/p>\n<p>        try:<br \/>\n            response &#061; requests.post(<br \/>\n                f&#034;{self.base_url}\/api\/generate&#034;,<br \/>\n                json&#061;{<br \/>\n                    &#034;prompt&#034;: prompt,<br \/>\n                    &#034;max_tokens&#034;: max_tokens,<br \/>\n                    &#034;temperature&#034;: 0.7<br \/>\n                },<br \/>\n                timeout&#061;300  # 5\u5206\u949f\u8d85\u65f6<br \/>\n            )<\/p>\n<p>            elapsed_time &#061; time.time() &#8211; start_time<br \/>\n            memory_after &#061; self.get_memory_usage()<\/p>\n<p>            result &#061; {<br \/>\n                &#034;timestamp&#034;: datetime.now().isoformat(),<br \/>\n                &#034;prompt&#034;: prompt[:50] &#043; &#034;&#8230;&#034; if len(prompt) &gt; 50 else prompt,<br \/>\n                &#034;response_time&#034;: elapsed_time,<br \/>\n                &#034;memory_before&#034;: memory_before,<br \/>\n                &#034;memory_after&#034;: memory_after,<br \/>\n                &#034;memory_increase&#034;: memory_after[&#034;used&#034;] &#8211; memory_before[&#034;used&#034;],<br \/>\n                &#034;success&#034;: response.status_code &#061;&#061; 200,<br \/>\n                &#034;response_length&#034;: len(response.text) if response.status_code &#061;&#061; 200 else 0<br \/>\n            }<\/p>\n<p>            return result<\/p>\n<p>        except Exception as e:<br \/>\n            elapsed_time &#061; time.time() &#8211; start_time<br \/>\n            return {<br \/>\n                &#034;timestamp&#034;: datetime.now().isoformat(),<br \/>\n                &#034;prompt&#034;: prompt[:50] &#043; &#034;&#8230;&#034; if len(prompt) &gt; 50 else prompt,<br \/>\n                &#034;response_time&#034;: elapsed_time,<br \/>\n                &#034;error&#034;: str(e),<br \/>\n                &#034;success&#034;: False<br \/>\n            }<\/p>\n<p>    def run_stress_test(self, test_cases, duration_hours&#061;8):<br \/>\n        &#034;&#034;&#034;\u8fd0\u884c\u538b\u529b\u6d4b\u8bd5&#034;&#034;&#034;<br \/>\n        print(f&#034;\u5f00\u59cb\u538b\u529b\u6d4b\u8bd5&#xff0c;\u6301\u7eed\u65f6\u95f4&#xff1a;{duration_hours}\u5c0f\u65f6&#034;)<br \/>\n        print(f&#034;\u5f00\u59cb\u65f6\u95f4&#xff1a;{datetime.now()}&#034;)<br \/>\n        print(f&#034;\u521d\u59cb\u5185\u5b58\u4f7f\u7528&#xff1a;{self.get_memory_usage()}&#034;)<\/p>\n<p>        end_time &#061; time.time() &#043; duration_hours * 3600<br \/>\n        test_count &#061; 0<\/p>\n<p>        while time.time() &lt; end_time:<br \/>\n            # \u968f\u673a\u9009\u62e9\u6d4b\u8bd5\u7528\u4f8b\u7c7b\u578b<br \/>\n            import random<br \/>\n            case_type &#061; random.choice(list(test_cases.keys()))<br \/>\n            prompt &#061; random.choice(test_cases[case_type])<\/p>\n<p>            # \u53d1\u9001\u8bf7\u6c42<br \/>\n            result &#061; self.send_request(prompt)<br \/>\n            self.results.append(result)<br \/>\n            test_count &#043;&#061; 1<\/p>\n<p>            # \u6253\u5370\u8fdb\u5ea6<br \/>\n            if test_count % 10 &#061;&#061; 0:<br \/>\n                print(f&#034;\u5df2\u5b8c\u6210 {test_count} \u6b21\u6d4b\u8bd5&#xff0c;\u5f53\u524d\u5185\u5b58\u4f7f\u7528&#xff1a;{self.get_memory_usage()[&#039;percent&#039;]}%&#034;)<\/p>\n<p>            # \u968f\u673a\u7b49\u5f85\u65f6\u95f4&#xff0c;\u6a21\u62df\u771f\u5b9e\u4f7f\u7528\u573a\u666f<br \/>\n            time.sleep(random.uniform(1, 5))<\/p>\n<p>        print(f&#034;\u538b\u529b\u6d4b\u8bd5\u5b8c\u6210&#xff0c;\u603b\u5171\u6267\u884c {test_count} \u6b21\u6d4b\u8bd5&#034;)<br \/>\n        return self.results<\/p>\n<p>    def generate_report(self):<br \/>\n        &#034;&#034;&#034;\u751f\u6210\u6d4b\u8bd5\u62a5\u544a&#034;&#034;&#034;<br \/>\n        successful_tests &#061; [r for r in self.results if r.get(&#034;success&#034;, False)]<br \/>\n        failed_tests &#061; [r for r in self.results if not r.get(&#034;success&#034;, False)]<\/p>\n<p>        report &#061; {<br \/>\n            &#034;summary&#034;: {<br \/>\n                &#034;total_tests&#034;: len(self.results),<br \/>\n                &#034;successful_tests&#034;: len(successful_tests),<br \/>\n                &#034;failed_tests&#034;: len(failed_tests),<br \/>\n                &#034;success_rate&#034;: len(successful_tests) \/ len(self.results) * 100 if self.results else 0<br \/>\n            },<br \/>\n            &#034;performance&#034;: {<br \/>\n                &#034;avg_response_time&#034;: sum(r[&#034;response_time&#034;] for r in successful_tests) \/ len(successful_tests) if successful_tests else 0,<br \/>\n                &#034;max_response_time&#034;: max(r[&#034;response_time&#034;] for r in successful_tests) if successful_tests else 0,<br \/>\n                &#034;min_response_time&#034;: min(r[&#034;response_time&#034;] for r in successful_tests) if successful_tests else 0,<br \/>\n                &#034;avg_memory_increase&#034;: sum(r.get(&#034;memory_increase&#034;, 0) for r in successful_tests) \/ len(successful_tests) if successful_tests else 0<br \/>\n            },<br \/>\n            &#034;memory_usage&#034;: {<br \/>\n                &#034;peak_usage&#034;: max(r.get(&#034;memory_after&#034;, {}).get(&#034;percent&#034;, 0) for r in self.results) if self.results else 0,<br \/>\n                &#034;avg_usage&#034;: sum(r.get(&#034;memory_after&#034;, {}).get(&#034;percent&#034;, 0) for r in self.results) \/ len(self.results) if self.results else 0<br \/>\n            }<br \/>\n        }<\/p>\n<p>        return report<\/p>\n<p># \u8fd0\u884c\u6d4b\u8bd5<br \/>\nif __name__ &#061;&#061; &#034;__main__&#034;:<br \/>\n    tester &#061; StabilityTester()<br \/>\n    results &#061; tester.run_stress_test(test_cases, duration_hours&#061;8)<br \/>\n    report &#061; tester.generate_report()<\/p>\n<p>    # \u4fdd\u5b58\u7ed3\u679c<br \/>\n    with open(&#034;stability_test_report.json&#034;, &#034;w&#034;) as f:<br \/>\n        json.dump({&#034;results&#034;: results, &#034;report&#034;: report}, f, indent&#061;2)<\/p>\n<p>    print(&#034;\u6d4b\u8bd5\u62a5\u544a\u5df2\u4fdd\u5b58\u5230 stability_test_report.json&#034;)<\/p>\n<h3>5. \u6d4b\u8bd5\u7ed3\u679c\u4e0e\u5206\u6790<\/h3>\n<h4>5.1 \u5185\u5b58\u4f7f\u7528\u60c5\u51b5<\/h4>\n<p>\u7ecf\u8fc78\u5c0f\u65f6\u7684\u8fde\u7eed\u538b\u529b\u6d4b\u8bd5&#xff0c;\u4ee5\u4e0b\u662f\u5185\u5b58\u4f7f\u7528\u7684\u5173\u952e\u6570\u636e&#xff1a;<\/p>\n<p>\u5185\u5b58\u4f7f\u7528\u7edf\u8ba1\u8868&#xff1a;<\/p>\n<table>\n<tr>\u6d4b\u8bd5\u9636\u6bb5\u5e73\u5747\u5185\u5b58\u4f7f\u7528\u5cf0\u503c\u5185\u5b58\u4f7f\u7528\u5185\u5b58\u6ce2\u52a8\u8303\u56f4<\/tr>\n<tbody>\n<tr>\n<td>\u6a21\u578b\u52a0\u8f7d\u65f6<\/td>\n<td>25.3 GB<\/td>\n<td>26.8 GB<\/td>\n<td>\u00b11.5 GB<\/td>\n<\/tr>\n<tr>\n<td>\u7a7a\u95f2\u72b6\u6001<\/td>\n<td>24.1 GB<\/td>\n<td>24.5 GB<\/td>\n<td>\u00b10.4 GB<\/td>\n<\/tr>\n<tr>\n<td>\u63a8\u7406\u8fc7\u7a0b\u4e2d<\/td>\n<td>25.7 GB<\/td>\n<td>27.2 GB<\/td>\n<td>\u00b11.5 GB<\/td>\n<\/tr>\n<tr>\n<td>\u538b\u529b\u6d4b\u8bd5\u671f<\/td>\n<td>26.3 GB<\/td>\n<td>28.1 GB<\/td>\n<td>\u00b11.8 GB<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u5173\u952e\u53d1\u73b0&#xff1a;<\/p>\n<li>\u6a21\u578b\u52a0\u8f7d\u662f\u5185\u5b58\u6d88\u8017\u6700\u5927\u7684\u9636\u6bb5&#xff0c;\u8fbe\u5230\u4e8626.8GB\u7684\u5cf0\u503c<\/li>\n<li>\u63a8\u7406\u8fc7\u7a0b\u4e2d\u7684\u5185\u5b58\u589e\u91cf\u76f8\u5bf9\u7a33\u5b9a&#xff0c;\u6bcf\u6b21\u8bf7\u6c42\u589e\u52a0\u7ea61.5-2GB<\/li>\n<li>32GB\u5185\u5b58\u8db3\u591f\u5e94\u5bf9\u6b63\u5e38\u4f7f\u7528&#xff0c;\u4f46\u9700\u8981\u9884\u7559\u7ea64GB\u7ed9\u7cfb\u7edf\u548c\u5176\u4ed6\u5e94\u7528<\/li>\n<li>\u5185\u5b58\u91ca\u653e\u673a\u5236\u6709\u6548&#xff0c;\u8bf7\u6c42\u5b8c\u6210\u540e\u5185\u5b58\u80fd\u53ca\u65f6\u56de\u6536<\/li>\n<h4>5.2 \u54cd\u5e94\u6027\u80fd\u8868\u73b0<\/h4>\n<p>\u54cd\u5e94\u65f6\u95f4\u7edf\u8ba1\u8868&#xff1a;<\/p>\n<table>\n<tr>\u8bf7\u6c42\u7c7b\u578b\u5e73\u5747\u54cd\u5e94\u65f6\u95f4\u6700\u77ed\u54cd\u5e94\u65f6\u95f4\u6700\u957f\u54cd\u5e94\u65f6\u95f4\u6807\u51c6\u5dee<\/tr>\n<tbody>\n<tr>\n<td>\u77ed\u6587\u672c\u5bf9\u8bdd<\/td>\n<td>2.3\u79d2<\/td>\n<td>1.8\u79d2<\/td>\n<td>3.1\u79d2<\/td>\n<td>0.4\u79d2<\/td>\n<\/tr>\n<tr>\n<td>\u4ee3\u7801\u751f\u6210<\/td>\n<td>4.7\u79d2<\/td>\n<td>3.2\u79d2<\/td>\n<td>6.5\u79d2<\/td>\n<td>0.9\u79d2<\/td>\n<\/tr>\n<tr>\n<td>\u957f\u6587\u672c\u751f\u6210<\/td>\n<td>8.9\u79d2<\/td>\n<td>6.3\u79d2<\/td>\n<td>12.1\u79d2<\/td>\n<td>1.5\u79d2<\/td>\n<\/tr>\n<tr>\n<td>\u590d\u6742\u63a8\u7406<\/td>\n<td>5.4\u79d2<\/td>\n<td>4.1\u79d2<\/td>\n<td>7.8\u79d2<\/td>\n<td>1.1\u79d2<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u6027\u80fd\u5206\u6790&#xff1a;<\/p>\n<li>\u77ed\u6587\u672c\u54cd\u5e94\u8fc5\u901f&#xff1a;\u7b80\u5355\u7684\u95ee\u7b54\u80fd\u57283\u79d2\u5185\u5b8c\u6210&#xff0c;\u4f53\u9a8c\u6d41\u7545<\/li>\n<li>\u4ee3\u7801\u751f\u6210\u8868\u73b0\u826f\u597d&#xff1a;\u4e2d\u7b49\u590d\u6742\u5ea6\u7684\u4ee3\u7801\u751f\u6210\u57285\u79d2\u5de6\u53f3<\/li>\n<li>\u957f\u6587\u672c\u751f\u6210\u9700\u8981\u8010\u5fc3&#xff1a;300\u5b57\u5de6\u53f3\u7684\u6587\u672c\u9700\u89818-12\u79d2<\/li>\n<li>\u54cd\u5e94\u65f6\u95f4\u76f8\u5bf9\u7a33\u5b9a&#xff1a;\u6807\u51c6\u5dee\u8f83\u5c0f&#xff0c;\u8bf4\u660e\u6027\u80fd\u6ce2\u52a8\u5728\u53ef\u63a7\u8303\u56f4\u5185<\/li>\n<h4>5.3 \u7a33\u5b9a\u6027\u4e0e\u53ef\u9760\u6027<\/h4>\n<p>8\u5c0f\u65f6\u538b\u529b\u6d4b\u8bd5\u7ed3\u679c&#xff1a;<\/p>\n<p>\u6d4b\u8bd5\u603b\u6b21\u6570&#xff1a;576\u6b21<br \/>\n\u6210\u529f\u6b21\u6570&#xff1a;563\u6b21<br \/>\n\u5931\u8d25\u6b21\u6570&#xff1a;13\u6b21<br \/>\n\u6210\u529f\u7387&#xff1a;97.74%<\/p>\n<p>\u5931\u8d25\u539f\u56e0\u5206\u6790&#xff1a;<br \/>\n&#8211; \u8d85\u65f6\u9519\u8bef&#xff1a;7\u6b21&#xff08;1.22%&#xff09;<br \/>\n&#8211; \u5185\u5b58\u4e0d\u8db3&#xff1a;4\u6b21&#xff08;0.69%&#xff09;<br \/>\n&#8211; \u7f51\u7edc\u9519\u8bef&#xff1a;2\u6b21&#xff08;0.35%&#xff09;<\/p>\n<p>\u7a33\u5b9a\u6027\u89c2\u5bdf&#xff1a;<\/p>\n<li>\u957f\u65f6\u95f4\u8fd0\u884c\u65e0\u5185\u5b58\u6cc4\u6f0f&#xff1a;8\u5c0f\u65f6\u540e\u5185\u5b58\u4f7f\u7528\u4e0e\u5f00\u59cb\u65f6\u57fa\u672c\u4e00\u81f4<\/li>\n<li>\u9519\u8bef\u6062\u590d\u80fd\u529b\u826f\u597d&#xff1a;\u51fa\u73b0\u9519\u8bef\u540e\u670d\u52a1\u80fd\u81ea\u52a8\u6062\u590d<\/li>\n<li>\u5e76\u53d1\u5904\u7406\u80fd\u529b\u6709\u9650&#xff1a;\u540c\u65f6\u5904\u74063\u4e2a\u4ee5\u4e0a\u8bf7\u6c42\u65f6\u54cd\u5e94\u65f6\u95f4\u660e\u663e\u589e\u52a0<\/li>\n<li>\u670d\u52a1\u53ef\u7528\u6027\u9ad8&#xff1a;\u5728\u6d4b\u8bd5\u671f\u95f4\u670d\u52a1\u59cb\u7ec8\u53ef\u8bbf\u95ee<\/li>\n<h4>5.4 \u5b9e\u9645\u4f7f\u7528\u4f53\u9a8c<\/h4>\n<p>\u9664\u4e86\u51b7\u51b0\u51b0\u7684\u6570\u636e&#xff0c;\u5b9e\u9645\u4f7f\u7528\u4f53\u9a8c\u4e5f\u5f88\u91cd\u8981\u3002\u4ee5\u4e0b\u662f\u6211\u5728\u6d4b\u8bd5\u8fc7\u7a0b\u4e2d\u7684\u4e3b\u89c2\u611f\u53d7&#xff1a;<\/p>\n<p>\u4f18\u70b9&#xff1a;<\/p>\n<li>\u5bf9\u8bdd\u8d28\u91cf\u4f18\u79c0&#xff1a;Gemma-3-12B-IT\u5728\u4ee3\u7801\u751f\u6210\u548c\u6280\u672f\u95ee\u7b54\u4e0a\u8868\u73b0\u7a81\u51fa<\/li>\n<li>\u54cd\u5e94\u901f\u5ea6\u53ef\u63a5\u53d7&#xff1a;\u5bf9\u4e8e\u672c\u5730\u90e8\u7f72\u7684\u6a21\u578b\u6765\u8bf4&#xff0c;2-8\u79d2\u7684\u54cd\u5e94\u65f6\u95f4\u5728\u53ef\u63a5\u53d7\u8303\u56f4\u5185<\/li>\n<li>Web\u754c\u9762\u53cb\u597d&#xff1a;\u56fe\u5f62\u5316\u754c\u9762\u8ba9\u4ea4\u4e92\u66f4\u52a0\u76f4\u89c2<\/li>\n<li>\u8d44\u6e90\u5229\u7528\u5408\u7406&#xff1a;\u572832GB\u5185\u5b58\u9650\u5236\u4e0b&#xff0c;\u80fd\u4fdd\u6301\u7a33\u5b9a\u8fd0\u884c<\/li>\n<p>\u4e0d\u8db3&#xff1a;<\/p>\n<li>\u957f\u6587\u672c\u751f\u6210\u6162&#xff1a;\u751f\u6210\u8d85\u8fc7500\u5b57\u7684\u6587\u672c\u65f6&#xff0c;\u7b49\u5f85\u65f6\u95f4\u8f83\u957f<\/li>\n<li>\u5e76\u53d1\u80fd\u529b\u5f31&#xff1a;\u4e0d\u9002\u5408\u9ad8\u5e76\u53d1\u573a\u666f<\/li>\n<li>\u9996\u6b21\u52a0\u8f7d\u6162&#xff1a;\u51b7\u542f\u52a8\u9700\u89811-2\u5206\u949f\u52a0\u8f7d\u6a21\u578b<\/li>\n<li>\u5185\u5b58\u538b\u529b\u5927&#xff1a;\u5728\u8fd0\u884c\u5176\u4ed6\u5e94\u7528\u65f6\u53ef\u80fd\u51fa\u73b0\u5185\u5b58\u4e0d\u8db3<\/li>\n<h3>6. \u4f18\u5316\u5efa\u8bae\u4e0e\u6700\u4f73\u5b9e\u8df5<\/h3>\n<p>\u57fa\u4e8e\u6d4b\u8bd5\u7ed3\u679c&#xff0c;\u6211\u603b\u7ed3\u4e86\u4e00\u4e9b\u4f18\u5316\u5efa\u8bae&#xff0c;\u5e2e\u52a9\u4f60\u5728\u7c7b\u4f3c\u73af\u5883\u4e0b\u83b7\u5f97\u66f4\u597d\u7684\u4f53\u9a8c\u3002<\/p>\n<h4>6.1 \u5185\u5b58\u4f18\u5316\u6280\u5de7<\/h4>\n<p># 1. \u8c03\u6574\u7cfb\u7edf\u4ea4\u6362\u7a7a\u95f4&#xff08;\u5982\u679c\u78c1\u76d8\u7a7a\u95f4\u5145\u8db3&#xff09;<br \/>\nsudo fallocate -l 8G \/swapfile<br \/>\nsudo chmod 600 \/swapfile<br \/>\nsudo mkswap \/swapfile<br \/>\nsudo swapon \/swapfile<\/p>\n<p># 2. \u4f18\u5316\u7cfb\u7edf\u5185\u5b58\u7ba1\u7406<br \/>\necho &#034;vm.swappiness &#061; 10&#034; | sudo tee -a \/etc\/sysctl.conf<br \/>\necho &#034;vm.vfs_cache_pressure &#061; 50&#034; | sudo tee -a \/etc\/sysctl.conf<br \/>\nsudo sysctl -p<\/p>\n<p># 3. \u6e05\u7406\u7cfb\u7edf\u7f13\u5b58&#xff08;\u5b9a\u671f\u6267\u884c&#xff09;<br \/>\nsync &amp;&amp; echo 3 | sudo tee \/proc\/sys\/vm\/drop_caches<\/p>\n<h4>6.2 \u670d\u52a1\u914d\u7f6e\u4f18\u5316<\/h4>\n<p># \u4fee\u6539config.yaml\u4e2d\u7684\u914d\u7f6e<br \/>\nmodel:<br \/>\n  load_in_8bit: true  # \u4f7f\u75288\u4f4d\u91cf\u5316&#xff0c;\u5927\u5e45\u51cf\u5c11\u5185\u5b58\u5360\u7528<br \/>\n  low_cpu_mem_usage: true<\/p>\n<p>server:<br \/>\n  max_workers: 2  # \u9650\u5236\u5de5\u4f5c\u8fdb\u7a0b\u6570&#xff0c;\u907f\u514d\u5185\u5b58\u7ade\u4e89<br \/>\n  worker_timeout: 300<\/p>\n<p>generation:<br \/>\n  max_tokens: 256   # \u9650\u5236\u751f\u6210\u957f\u5ea6&#xff0c;\u51cf\u5c11\u5185\u5b58\u538b\u529b<br \/>\n  batch_size: 1     # \u5355\u6279\u6b21\u5904\u7406&#xff0c;\u907f\u514d\u5185\u5b58\u5cf0\u503c<\/p>\n<h4>6.3 \u4f7f\u7528\u7b56\u7565\u5efa\u8bae<\/h4>\n<p>\u9488\u5bf932GB\u5185\u5b58\u73af\u5883\u7684\u5b9e\u7528\u5efa\u8bae&#xff1a;<\/p>\n<li>\u5206\u6279\u5904\u7406\u4efb\u52a1&#xff1a;\u4e0d\u8981\u4e00\u6b21\u6027\u63d0\u4ea4\u5927\u91cf\u8bf7\u6c42&#xff0c;\u5efa\u8bae\u95f4\u96945-10\u79d2<\/li>\n<li>\u63a7\u5236\u751f\u6210\u957f\u5ea6&#xff1a;\u5c06max_tokens\u8bbe\u7f6e\u5728256-512\u4e4b\u95f4<\/li>\n<li>\u907f\u514d\u590d\u6742\u63a8\u7406&#xff1a;\u5bf9\u4e8e\u7279\u522b\u590d\u6742\u7684\u95ee\u9898&#xff0c;\u8003\u8651\u62c6\u5206\u6210\u591a\u4e2a\u7b80\u5355\u95ee\u9898<\/li>\n<li>\u5b9a\u671f\u91cd\u542f\u670d\u52a1&#xff1a;\u6bcf\u5929\u91cd\u542f\u4e00\u6b21\u670d\u52a1&#xff0c;\u91ca\u653e\u53ef\u80fd\u7684\u5185\u5b58\u788e\u7247<\/li>\n<li>\u76d1\u63a7\u5185\u5b58\u4f7f\u7528&#xff1a;\u8bbe\u7f6e\u5185\u5b58\u4f7f\u7528\u8b66\u62a5&#xff0c;\u8d85\u8fc785%\u65f6\u53ca\u65f6\u5904\u7406<\/li>\n<h4>6.4 \u6545\u969c\u6392\u9664\u6307\u5357<\/h4>\n<p>\u5e38\u89c1\u95ee\u9898\u53ca\u89e3\u51b3\u65b9\u6cd5&#xff1a;<\/p>\n<p># \u95ee\u98981&#xff1a;\u670d\u52a1\u542f\u52a8\u5931\u8d25&#xff0c;\u63d0\u793a\u5185\u5b58\u4e0d\u8db3<br \/>\n# \u89e3\u51b3\u65b9\u6cd5&#xff1a;\u6e05\u7406\u5185\u5b58\u5e76\u8c03\u6574\u914d\u7f6e<br \/>\nsudo systemctl stop unnecessary-services<br \/>\n.\/manage.sh stop<br \/>\n# \u4fee\u6539config.yaml&#xff0c;\u542f\u7528\u4f4e\u5185\u5b58\u6a21\u5f0f<br \/>\n# \u91cd\u65b0\u542f\u52a8\u670d\u52a1<br \/>\n.\/manage.sh start<\/p>\n<p># \u95ee\u98982&#xff1a;\u54cd\u5e94\u65f6\u95f4\u8d8a\u6765\u8d8a\u6162<br \/>\n# \u89e3\u51b3\u65b9\u6cd5&#xff1a;\u91cd\u542f\u670d\u52a1\u91ca\u653e\u5185\u5b58<br \/>\n.\/manage.sh restart<\/p>\n<p># \u95ee\u98983&#xff1a;Web\u754c\u9762\u65e0\u6cd5\u8bbf\u95ee<br \/>\n# \u89e3\u51b3\u65b9\u6cd5&#xff1a;\u68c0\u67e5\u670d\u52a1\u72b6\u6001\u548c\u7aef\u53e3<br \/>\n.\/manage.sh status<br \/>\nnetstat -tlnp | grep 7860<br \/>\n# \u5982\u679c\u7aef\u53e3\u88ab\u5360\u7528&#xff0c;\u4fee\u6539config.yaml\u4e2d\u7684\u7aef\u53e3\u53f7<\/p>\n<p># \u95ee\u98984&#xff1a;\u751f\u6210\u5185\u5bb9\u8d28\u91cf\u4e0b\u964d<br \/>\n# \u89e3\u51b3\u65b9\u6cd5&#xff1a;\u8c03\u6574\u751f\u6210\u53c2\u6570<br \/>\n# \u964d\u4f4etemperature&#xff08;0.3-0.7&#xff09;<br \/>\n# \u63d0\u9ad8top_p&#xff08;0.9-0.95&#xff09;<br \/>\n# \u786e\u4fdd\u63d0\u793a\u8bcd\u6e05\u6670\u660e\u786e<\/p>\n<h3>7. \u603b\u7ed3\u4e0e\u5efa\u8bae<\/h3>\n<p>\u7ecf\u8fc7\u8be6\u7ec6\u7684\u90e8\u7f72\u548c\u6d4b\u8bd5&#xff0c;\u6211\u53ef\u4ee5\u660e\u786e\u5730\u7ed9\u51fa\u7ed3\u8bba&#xff1a;Gemma-3-12B-IT\u6a21\u578b\u5b8c\u5168\u53ef\u4ee5\u572832GB\u5185\u5b58\u7684\u670d\u52a1\u5668\u4e0a\u7a33\u5b9a\u8fd0\u884c&#xff0c;\u4f46\u9700\u8981\u5408\u7406\u7684\u914d\u7f6e\u548c\u4f7f\u7528\u7b56\u7565\u3002<\/p>\n<h4>7.1 \u5173\u952e\u53d1\u73b0\u603b\u7ed3<\/h4>\n<li>\u5185\u5b58\u9700\u6c42\u771f\u5b9e&#xff1a;23GB\u7684\u6a21\u578b\u5728\u52a0\u8f7d\u65f6\u9700\u8981\u7ea627GB\u5185\u5b58&#xff0c;32GB\u914d\u7f6e\u521a\u597d\u591f\u7528<\/li>\n<li>\u6027\u80fd\u8868\u73b0\u5408\u683c&#xff1a;\u54cd\u5e94\u65f6\u95f4\u5728\u53ef\u63a5\u53d7\u8303\u56f4\u5185&#xff0c;\u5bf9\u8bdd\u8d28\u91cf\u4ee4\u4eba\u6ee1\u610f<\/li>\n<li>\u7a33\u5b9a\u6027\u826f\u597d&#xff1a;\u957f\u65f6\u95f4\u8fd0\u884c\u6d4b\u8bd5\u901a\u8fc7&#xff0c;\u670d\u52a1\u53ef\u7528\u6027\u8d85\u8fc797%<\/li>\n<li>\u8d44\u6e90\u9650\u5236\u660e\u663e&#xff1a;\u4e0d\u9002\u5408\u9ad8\u5e76\u53d1\u573a\u666f&#xff0c;\u957f\u6587\u672c\u751f\u6210\u8f83\u6162<\/li>\n<h4>7.2 \u9002\u7528\u573a\u666f\u63a8\u8350<\/h4>\n<p>\u57fa\u4e8e\u6d4b\u8bd5\u7ed3\u679c&#xff0c;Gemma-3-12B-IT\u572832GB\u5185\u5b58\u73af\u5883\u4e0b\u6700\u9002\u5408\u4ee5\u4e0b\u573a\u666f&#xff1a;<\/p>\n<p>\u63a8\u8350\u573a\u666f&#xff1a;<\/p>\n<ul>\n<li>\u4e2a\u4eba\u5b66\u4e60\u4e0e\u7814\u7a76<\/li>\n<li>\u5c0f\u56e2\u961f\u5185\u90e8\u5de5\u5177<\/li>\n<li>\u4ee3\u7801\u8f85\u52a9\u4e0e\u5ba1\u67e5<\/li>\n<li>\u6280\u672f\u6587\u6863\u751f\u6210<\/li>\n<li>\u6559\u80b2\u6f14\u793a\u73af\u5883<\/li>\n<\/ul>\n<p>\u4e0d\u63a8\u8350\u573a\u666f&#xff1a;<\/p>\n<ul>\n<li>\u9ad8\u5e76\u53d1\u751f\u4ea7\u73af\u5883<\/li>\n<li>\u5b9e\u65f6\u5bf9\u8bdd\u7cfb\u7edf<\/li>\n<li>\u5927\u6279\u91cf\u6587\u672c\u5904\u7406<\/li>\n<li>\u8d44\u6e90\u53d7\u9650\u7684\u79fb\u52a8\u7aef<\/li>\n<\/ul>\n<h4>7.3 \u7ed9\u4e0d\u540c\u7528\u6237\u7684\u5efa\u8bae<\/h4>\n<p>\u7ed9\u4e2a\u4eba\u5f00\u53d1\u8005&#xff1a; \u5982\u679c\u4f60\u6709\u4e00\u53f032GB\u5185\u5b58\u7684\u53f0\u5f0f\u673a\u6216\u670d\u52a1\u5668&#xff0c;\u5b8c\u5168\u53ef\u4ee5\u7528\u5b83\u6765\u90e8\u7f72Gemma-3-12B-IT\u3002\u4f5c\u4e3a\u5b66\u4e60\u548c\u5f00\u53d1\u5de5\u5177&#xff0c;\u5b83\u7684\u8868\u73b0\u8db3\u591f\u597d\u3002\u8bb0\u5f97\u6309\u7167\u672c\u6587\u7684\u4f18\u5316\u5efa\u8bae\u8fdb\u884c\u914d\u7f6e&#xff0c;\u4f53\u9a8c\u4f1a\u66f4\u6d41\u7545\u3002<\/p>\n<p>\u7ed9\u5c0f\u56e2\u961f&#xff1a; \u5bf9\u4e8e3-5\u4eba\u7684\u5c0f\u56e2\u961f&#xff0c;\u53ef\u4ee5\u7528\u5b83\u6765\u642d\u5efa\u5185\u90e8\u7684\u77e5\u8bc6\u5e93\u52a9\u624b\u6216\u4ee3\u7801\u5ba1\u67e5\u5de5\u5177\u3002\u5efa\u8bae\u8bbe\u7f6e\u4f7f\u7528\u65f6\u6bb5&#xff0c;\u907f\u514d\u5168\u5458\u540c\u65f6\u4f7f\u7528\u5bfc\u81f4\u670d\u52a1\u5361\u987f\u3002<\/p>\n<p>\u7ed9\u5b66\u751f\u548c\u7814\u7a76\u8005&#xff1a; Gemma-3-12B-IT\u662f\u4e00\u4e2a\u5f88\u597d\u7684\u7814\u7a76\u5e73\u53f0\u3002\u5b83\u7684\u5f00\u6e90\u7279\u6027\u8ba9\u4f60\u53ef\u4ee5\u6df1\u5165\u4e86\u89e3\u5927\u6a21\u578b\u7684\u5de5\u4f5c\u539f\u7406&#xff0c;32GB\u7684\u5185\u5b58\u8981\u6c42\u4e5f\u8ba9\u5b83\u5728\u9ad8\u6821\u5b9e\u9a8c\u5ba4\u4e2d\u5177\u6709\u53ef\u884c\u6027\u3002<\/p>\n<h4>7.4 \u672a\u6765\u4f18\u5316\u65b9\u5411<\/h4>\n<p>\u5982\u679c\u4f60\u5bf9\u6027\u80fd\u6709\u66f4\u9ad8\u8981\u6c42&#xff0c;\u53ef\u4ee5\u8003\u8651\u4ee5\u4e0b\u5347\u7ea7\u65b9\u5411&#xff1a;<\/p>\n<li>\u589e\u52a0\u5185\u5b58&#xff1a;\u5347\u7ea7\u523064GB\u5185\u5b58&#xff0c;\u4f53\u9a8c\u4f1a\u6709\u8d28\u7684\u63d0\u5347<\/li>\n<li>\u6dfb\u52a0GPU&#xff1a;\u5373\u4f7f\u662f\u4e00\u5f20RTX 4090&#xff0c;\u4e5f\u80fd\u5927\u5e45\u52a0\u901f\u63a8\u7406\u8fc7\u7a0b<\/li>\n<li>\u4f7f\u7528\u91cf\u5316&#xff1a;\u7b49\u5f85\u793e\u533a\u63a8\u51fa4\u4f4d\u62168\u4f4d\u91cf\u5316\u7248\u672c&#xff0c;\u5185\u5b58\u9700\u6c42\u53ef\u964d\u4f4e50%\u4ee5\u4e0a<\/li>\n<li>\u4f18\u5316\u63a8\u7406\u5f15\u64ce&#xff1a;\u4f7f\u7528vLLM\u7b49\u4f18\u5316\u540e\u7684\u63a8\u7406\u6846\u67b6<\/li>\n<h4>7.5 \u6700\u540e\u7684\u8bdd<\/h4>\n<p>\u5728\u6709\u9650\u7684\u786c\u4ef6\u8d44\u6e90\u4e0a\u8fd0\u884c\u5927\u6a21\u578b&#xff0c;\u5c31\u50cf\u5728\u5c0f\u578b\u8d5b\u9053\u4e0a\u9a7e\u9a76\u9ad8\u6027\u80fd\u8dd1\u8f66\u2014\u2014\u9700\u8981\u66f4\u591a\u7684\u6280\u5de7\u548c\u8010\u5fc3&#xff0c;\u4f46\u4f9d\u7136\u80fd\u4eab\u53d7\u5230\u9a7e\u9a76\u7684\u4e50\u8da3\u3002Gemma-3-12B-IT\u572832GB\u5185\u5b58\u73af\u5883\u4e0b\u7684\u8868\u73b0&#xff0c;\u8bc1\u660e\u4e86\u5f00\u6e90\u5927\u6a21\u578b\u6b63\u5728\u53d8\u5f97\u8d8a\u6765\u8d8a\u201c\u4eb2\u6c11\u201d\u3002<\/p>\n<p>\u6280\u672f\u7684\u8fdb\u6b65\u4e0d\u4ec5\u4ec5\u662f\u521b\u9020\u66f4\u5f3a\u5927\u7684\u6a21\u578b&#xff0c;\u66f4\u662f\u8ba9\u8fd9\u4e9b\u6a21\u578b\u80fd\u591f\u5728\u66f4\u591a\u573a\u666f\u4e0b\u53d1\u6325\u4f5c\u7528\u3002\u8fd9\u6b21\u6d4b\u8bd5\u8ba9\u6211\u770b\u5230&#xff0c;\u5373\u4f7f\u6ca1\u6709\u9876\u7ea7\u7684\u786c\u4ef6\u914d\u7f6e&#xff0c;\u6211\u4eec\u4f9d\u7136\u80fd\u591f\u4f53\u9a8c\u548c\u5229\u7528\u5148\u8fdb\u7684\u5927\u8bed\u8a00\u6a21\u578b\u6280\u672f\u3002<\/p>\n<p>\u5e0c\u671b\u8fd9\u7bc7\u8be6\u7ec6\u7684\u90e8\u7f72\u548c\u6d4b\u8bd5\u6307\u5357&#xff0c;\u80fd\u5e2e\u52a9\u4f60\u5728\u81ea\u5df1\u7684\u73af\u5883\u4e2d\u6210\u529f\u8fd0\u884cGemma-3-12B-IT\u3002\u5982\u679c\u5728\u90e8\u7f72\u8fc7\u7a0b\u4e2d\u9047\u5230\u95ee\u9898&#xff0c;\u6216\u8005\u6709\u65b0\u7684\u53d1\u73b0&#xff0c;\u6b22\u8fce\u5206\u4eab\u4f60\u7684\u7ecf\u9a8c\u3002<\/p>\n<hr \/>\n<p>\u83b7\u53d6\u66f4\u591aAI\u955c\u50cf<\/p>\n<p>\u60f3\u63a2\u7d22\u66f4\u591aAI\u955c\u50cf\u548c\u5e94\u7528\u573a\u666f&#xff1f;\u8bbf\u95ee CSDN\u661f\u56fe\u955c\u50cf\u5e7f\u573a&#xff0c;\u63d0\u4f9b\u4e30\u5bcc\u7684\u9884\u7f6e\u955c\u50cf&#xff0c;\u8986\u76d6\u5927\u6a21\u578b\u63a8\u7406\u3001\u56fe\u50cf\u751f\u6210\u3001\u89c6\u9891\u751f\u6210\u3001\u6a21\u578b\u5fae\u8c03\u7b49\u591a\u4e2a\u9886\u57df&#xff0c;\u652f\u6301\u4e00\u952e\u90e8\u7f72\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Gemma-3-12B-IT\u90e8\u7f72\u5b9e\u6218&#xff1a;32GB\u5185\u5b58\u670d\u52a1\u5668\u8fd0\u884c23GB\u6a21\u578b\u7a33\u5b9a\u6027\u6d4b\u8bd5<br \/>\n1. \u5f15\u8a00&#xff1a;\u5f53\u5927\u6a21\u578b\u9047\u4e0a\u6709\u9650\u8d44\u6e90<br \/>\n\u6700\u8fd1&#xff0c;Google\u5f00\u6e90\u7684Gemma-3-12B-IT\u6a21\u578b\u5728\u5f00\u53d1\u8005\u793e\u533a\u5f15\u8d77\u4e86\u4e0d\u5c0f\u7684\u5173\u6ce8\u3002\u4f5c\u4e3a\u4e00\u4e2a120\u4ebf\u53c2\u6570\u7684\u6307\u4ee4\u5fae\u8c03\u6a21\u578b&#xff0c;\u5b83\u5728\u63a8\u7406\u80fd\u529b\u3001\u591a\u8bed\u8a00\u652f\u6301\u548c\u6548\u7387\u4e0a\u76f8\u6bd4\u524d\u4ee3\u6709\u4e86\u663e\u8457\u63d0\u5347\u3002\u4f46\u6700\u5438\u5f15\u6211\u7684&#xff0c;\u662f\u5b83\u5ba3\u79f0\u7684\u201c\u8f7b\u91cf\u7ea7\u201d\u7279\u6027\u2014\u2014\u4e00\u4e2a23GB\u7684\u6a21\u578b&#xff0c;\u771f\u7684\u80fd\u572832GB\u5185\u5b58\u7684\u670d\u52a1\u5668\u4e0a\u7a33\u5b9a\u8fd0<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[1871,956,2094],"topic":[],"class_list":["post-85554","post","type-post","status-publish","format-standard","hentry","category-server","tag-ai","tag-956","tag-2094"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Gemma-3-12B-IT\u90e8\u7f72\u5b9e\u6218\uff1a32GB\u5185\u5b58\u670d\u52a1\u5668\u8fd0\u884c23GB\u6a21\u578b\u7a33\u5b9a\u6027\u6d4b\u8bd5 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/85554.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Gemma-3-12B-IT\u90e8\u7f72\u5b9e\u6218\uff1a32GB\u5185\u5b58\u670d\u52a1\u5668\u8fd0\u884c23GB\u6a21\u578b\u7a33\u5b9a\u6027\u6d4b\u8bd5 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"Gemma-3-12B-IT\u90e8\u7f72\u5b9e\u6218&#xff1a;32GB\u5185\u5b58\u670d\u52a1\u5668\u8fd0\u884c23GB\u6a21\u578b\u7a33\u5b9a\u6027\u6d4b\u8bd5 1. \u5f15\u8a00&#xff1a;\u5f53\u5927\u6a21\u578b\u9047\u4e0a\u6709\u9650\u8d44\u6e90 \u6700\u8fd1&#xff0c;Google\u5f00\u6e90\u7684Gemma-3-12B-IT\u6a21\u578b\u5728\u5f00\u53d1\u8005\u793e\u533a\u5f15\u8d77\u4e86\u4e0d\u5c0f\u7684\u5173\u6ce8\u3002\u4f5c\u4e3a\u4e00\u4e2a120\u4ebf\u53c2\u6570\u7684\u6307\u4ee4\u5fae\u8c03\u6a21\u578b&#xff0c;\u5b83\u5728\u63a8\u7406\u80fd\u529b\u3001\u591a\u8bed\u8a00\u652f\u6301\u548c\u6548\u7387\u4e0a\u76f8\u6bd4\u524d\u4ee3\u6709\u4e86\u663e\u8457\u63d0\u5347\u3002\u4f46\u6700\u5438\u5f15\u6211\u7684&#xff0c;\u662f\u5b83\u5ba3\u79f0\u7684\u201c\u8f7b\u91cf\u7ea7\u201d\u7279\u6027\u2014\u2014\u4e00\u4e2a23GB\u7684\u6a21\u578b&#xff0c;\u771f\u7684\u80fd\u572832GB\u5185\u5b58\u7684\u670d\u52a1\u5668\u4e0a\u7a33\u5b9a\u8fd0\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/85554.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2026-07-27T09:49:29+00:00\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"7 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/85554.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/85554.html\",\"name\":\"Gemma-3-12B-IT\u90e8\u7f72\u5b9e\u6218\uff1a32GB\u5185\u5b58\u670d\u52a1\u5668\u8fd0\u884c23GB\u6a21\u578b\u7a33\u5b9a\u6027\u6d4b\u8bd5 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2026-07-27T09:49:29+00:00\",\"dateModified\":\"2026-07-27T09:49:29+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/85554.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/85554.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/85554.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Gemma-3-12B-IT\u90e8\u7f72\u5b9e\u6218\uff1a32GB\u5185\u5b58\u670d\u52a1\u5668\u8fd0\u884c23GB\u6a21\u578b\u7a33\u5b9a\u6027\u6d4b\u8bd5\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Gemma-3-12B-IT\u90e8\u7f72\u5b9e\u6218\uff1a32GB\u5185\u5b58\u670d\u52a1\u5668\u8fd0\u884c23GB\u6a21\u578b\u7a33\u5b9a\u6027\u6d4b\u8bd5 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wsisp.com\/helps\/85554.html","og_locale":"zh_CN","og_type":"article","og_title":"Gemma-3-12B-IT\u90e8\u7f72\u5b9e\u6218\uff1a32GB\u5185\u5b58\u670d\u52a1\u5668\u8fd0\u884c23GB\u6a21\u578b\u7a33\u5b9a\u6027\u6d4b\u8bd5 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"Gemma-3-12B-IT\u90e8\u7f72\u5b9e\u6218&#xff1a;32GB\u5185\u5b58\u670d\u52a1\u5668\u8fd0\u884c23GB\u6a21\u578b\u7a33\u5b9a\u6027\u6d4b\u8bd5 1. \u5f15\u8a00&#xff1a;\u5f53\u5927\u6a21\u578b\u9047\u4e0a\u6709\u9650\u8d44\u6e90 \u6700\u8fd1&#xff0c;Google\u5f00\u6e90\u7684Gemma-3-12B-IT\u6a21\u578b\u5728\u5f00\u53d1\u8005\u793e\u533a\u5f15\u8d77\u4e86\u4e0d\u5c0f\u7684\u5173\u6ce8\u3002\u4f5c\u4e3a\u4e00\u4e2a120\u4ebf\u53c2\u6570\u7684\u6307\u4ee4\u5fae\u8c03\u6a21\u578b&#xff0c;\u5b83\u5728\u63a8\u7406\u80fd\u529b\u3001\u591a\u8bed\u8a00\u652f\u6301\u548c\u6548\u7387\u4e0a\u76f8\u6bd4\u524d\u4ee3\u6709\u4e86\u663e\u8457\u63d0\u5347\u3002\u4f46\u6700\u5438\u5f15\u6211\u7684&#xff0c;\u662f\u5b83\u5ba3\u79f0\u7684\u201c\u8f7b\u91cf\u7ea7\u201d\u7279\u6027\u2014\u2014\u4e00\u4e2a23GB\u7684\u6a21\u578b&#xff0c;\u771f\u7684\u80fd\u572832GB\u5185\u5b58\u7684\u670d\u52a1\u5668\u4e0a\u7a33\u5b9a\u8fd0","og_url":"https:\/\/www.wsisp.com\/helps\/85554.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2026-07-27T09:49:29+00:00","author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"7 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/85554.html","url":"https:\/\/www.wsisp.com\/helps\/85554.html","name":"Gemma-3-12B-IT\u90e8\u7f72\u5b9e\u6218\uff1a32GB\u5185\u5b58\u670d\u52a1\u5668\u8fd0\u884c23GB\u6a21\u578b\u7a33\u5b9a\u6027\u6d4b\u8bd5 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2026-07-27T09:49:29+00:00","dateModified":"2026-07-27T09:49:29+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/85554.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/85554.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/85554.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"Gemma-3-12B-IT\u90e8\u7f72\u5b9e\u6218\uff1a32GB\u5185\u5b58\u670d\u52a1\u5668\u8fd0\u884c23GB\u6a21\u578b\u7a33\u5b9a\u6027\u6d4b\u8bd5"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/85554","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=85554"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/85554\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=85554"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=85554"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=85554"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=85554"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}