{"id":79128,"date":"2026-03-01T07:36:22","date_gmt":"2026-02-28T23:36:22","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/79128.html"},"modified":"2026-03-01T07:36:22","modified_gmt":"2026-02-28T23:36:22","slug":"%e9%ab%98%e6%95%88%e8%a7%a3%e5%86%b3%e6%9c%8d%e5%8a%a1%e5%99%a8%e4%b8%8b%e8%bd%bdhuggingface%e6%a8%a1%e5%9e%8b%e6%95%b0%e6%8d%ae%e9%9b%86%e7%9a%843%e7%a7%8d%e5%ae%9e%e6%88%98%e6%96%b9%e6%b3%95","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/79128.html","title":{"rendered":"\u9ad8\u6548\u89e3\u51b3\u670d\u52a1\u5668\u4e0b\u8f7dhuggingFace\u6a21\u578b\u6570\u636e\u96c6\u76843\u79cd\u5b9e\u6218\u65b9\u6cd5"},"content":{"rendered":"<h3>1. \u4e3a\u4ec0\u4e48\u4f60\u7684\u670d\u52a1\u5668\u4e0b\u8f7dHugging Face\u6a21\u578b\u603b\u662f\u201c\u9f9f\u901f\u201d&#xff1f;<\/h3>\n<p>\u5982\u679c\u4f60\u5728\u670d\u52a1\u5668\u4e0a\u6298\u817e\u8fc7AI\u6a21\u578b&#xff0c;\u6211\u731c\u4f60\u4e00\u5b9a\u9047\u5230\u8fc7\u8fd9\u4e2a\u573a\u666f&#xff1a;\u6ee1\u6000\u6fc0\u52a8\u5730\u6572\u4e0b\u4e00\u884c from transformers import AutoModelForCausalLM&#xff0c;\u7ed3\u679c\u7ec8\u7aef\u5361\u5728\u90a3\u91cc\u4e00\u52a8\u4e0d\u52a8&#xff0c;\u6216\u8005\u4e0b\u8f7d\u8fdb\u5ea6\u6761\u50cf\u8717\u725b\u4e00\u6837\u722c\u884c&#xff0c;\u6700\u540e\u8fd8\u7ed9\u4f60\u629b\u51fa\u4e00\u4e2a ConnectionError \u6216\u8005\u8d85\u65f6\u3002\u8fd9\u79cd\u611f\u89c9&#xff0c;\u5c31\u50cf\u53bb\u8d85\u5e02\u4e70\u6ce1\u9762&#xff0c;\u7ed3\u679c\u5728\u6536\u94f6\u53f0\u6392\u4e86\u4e00\u4e2a\u5c0f\u65f6\u7684\u961f&#xff0c;\u522b\u63d0\u591a\u7cdf\u5fc3\u4e86\u3002<\/p>\n<p>\u6211\u521a\u5f00\u59cb\u5728\u516c\u53f8\u7684GPU\u670d\u52a1\u5668\u4e0a\u90e8\u7f72\u6a21\u578b\u65f6&#xff0c;\u4e5f\u5929\u5929\u88ab\u8fd9\u4e2a\u95ee\u9898\u6298\u78e8\u3002\u516c\u53f8\u7684\u670d\u52a1\u5668\u5e26\u5bbd\u662f\u591f\u7684&#xff0c;\u4f46\u4e0b\u8f7d\u4e00\u4e2a\u51e0GB\u7684\u6a21\u578b&#xff0c;\u52a8\u4e0d\u52a8\u5c31\u8981\u4e00\u4e24\u4e2a\u5c0f\u65f6&#xff0c;\u4e25\u91cd\u62d6\u6162\u4e86\u5b9e\u9a8c\u548c\u90e8\u7f72\u7684\u8282\u594f\u3002\u540e\u6765\u6211\u624d\u660e\u767d&#xff0c;\u95ee\u9898\u5f80\u5f80\u4e0d\u51fa\u5728\u4f60\u7684\u670d\u52a1\u5668&#xff0c;\u4e5f\u4e0d\u51fa\u5728Hugging Face&#xff0c;\u800c\u51fa\u5728\u201c\u8ddd\u79bb\u201d\u548c\u201c\u7f51\u7edc\u73af\u5883\u201d\u4e0a\u3002Hugging Face\u7684\u4e3b\u4ed3\u5e93\u6258\u7ba1\u5728\u6d77\u5916&#xff0c;\u5bf9\u4e8e\u56fd\u5185\u7684\u670d\u52a1\u5668\u6765\u8bf4&#xff0c;\u76f4\u8fde\u4e0b\u8f7d\u5c31\u50cf\u8de8\u6d0b\u6253\u7535\u8bdd&#xff0c;\u5ef6\u8fdf\u9ad8\u3001\u4e22\u5305\u591a&#xff0c;\u901f\u5ea6\u81ea\u7136\u4e0a\u4e0d\u53bb\u3002\u66f4\u522b\u63d0\u6709\u4e9b\u516c\u53f8\u7684\u670d\u52a1\u5668\u51fa\u4e8e\u5b89\u5168\u8003\u8651&#xff0c;\u5bf9\u5916\u7f51\u8bbf\u95ee\u8fd8\u6709\u5404\u79cd\u9650\u5236\u3002<\/p>\n<p>\u6240\u4ee5&#xff0c;\u4eca\u5929\u6211\u60f3\u548c\u4f60\u5206\u4eab\u7684&#xff0c;\u4e0d\u662f\u4ec0\u4e48\u9ad8\u6df1\u7684\u7406\u8bba&#xff0c;\u800c\u662f\u6211\u8e29\u8fc7\u65e0\u6570\u5751\u4e4b\u540e&#xff0c;\u603b\u7ed3\u51fa\u7684\u4e09\u79cd\u771f\u6b63\u9ad8\u6548\u3001\u80fd\u843d\u5730\u7684\u4e0b\u8f7d\u65b9\u6cd5\u3002\u5b83\u4eec\u7684\u76ee\u6807\u5f88\u7b80\u5355&#xff1a;\u628a\u539f\u672c\u9700\u8981\u51e0\u5c0f\u65f6\u7684\u4e0b\u8f7d\u8fc7\u7a0b&#xff0c;\u7f29\u77ed\u5230\u51e0\u5206\u949f\u6216\u5341\u51e0\u5206\u949f\u3002\u8fd9\u4e09\u79cd\u65b9\u6cd5\u5404\u6709\u5404\u7684\u9002\u7528\u573a\u666f&#xff0c;\u6211\u4f1a\u628a\u5b83\u4eec\u7684\u539f\u7406\u3001\u5177\u4f53\u64cd\u4f5c\u6b65\u9aa4\u3001\u4ee5\u53ca\u6211\u5b9e\u9645\u4f7f\u7528\u4e2d\u9047\u5230\u7684\u201c\u5751\u201d\u548c\u6280\u5de7&#xff0c;\u90fd\u6beb\u65e0\u4fdd\u7559\u5730\u544a\u8bc9\u4f60\u3002\u65e0\u8bba\u4f60\u662f\u5728\u516c\u53f8\u7684\u5185\u7f51\u670d\u52a1\u5668\u3001\u5b66\u6821\u7684\u8ba1\u7b97\u96c6\u7fa4&#xff0c;\u8fd8\u662f\u81ea\u5df1\u7684\u4e91\u4e3b\u673a\u4e0a&#xff0c;\u90fd\u80fd\u627e\u5230\u9002\u5408\u4f60\u7684\u90a3\u4e00\u6b3e\u3002<\/p>\n<h3>2. \u65b9\u6cd5\u4e00&#xff1a;\u62e5\u62b1\u5b98\u65b9\u201c\u5229\u5668\u201d\u2014\u2014huggingface-cli\u4e0e\u955c\u50cf\u7ad9<\/h3>\n<p>\u8fd9\u662f\u6211\u6700\u63a8\u8350&#xff0c;\u4e5f\u662f\u76ee\u524d\u6700\u4e3b\u6d41\u3001\u6700\u7a33\u5b9a\u7684\u65b9\u6cd5\u3002\u5b83\u7684\u6838\u5fc3\u601d\u8def\u4e0d\u662f\u786c\u95ef\u201c\u6162\u8f66\u9053\u201d&#xff0c;\u800c\u662f\u806a\u660e\u5730\u6362\u4e00\u6761\u201c\u5feb\u8f66\u9053\u201d\u2014\u2014\u4f7f\u7528\u56fd\u5185\u955c\u50cf\u7ad9\u3002<\/p>\n<h4>2.1 \u955c\u50cf\u7ad9&#xff1a;\u4f60\u7684\u4e0b\u8f7d\u201c\u52a0\u901f\u5668\u201d<\/h4>\n<p>\u4f60\u53ef\u4ee5\u628aHugging Face\u7684\u5b98\u65b9\u4ed3\u5e93\u60f3\u8c61\u6210\u4e00\u4e2a\u5de8\u5927\u7684\u3001\u6d77\u5916\u7684\u4e2d\u592e\u4ed3\u5e93\u3002\u955c\u50cf\u7ad9&#xff0c;\u5c31\u662f\u5728\u8fd9\u4e2a\u4e2d\u592e\u4ed3\u5e93\u9644\u8fd1&#xff08;\u6bd4\u5982\u56fd\u5185&#xff09;\u5efa\u7acb\u7684\u4e00\u4e2a\u5185\u5bb9\u5b8c\u5168\u76f8\u540c\u7684\u526f\u672c\u4ed3\u5e93\u3002\u5f53\u4f60\u7684\u670d\u52a1\u5668\u4ece\u955c\u50cf\u7ad9\u4e0b\u8f7d\u65f6&#xff0c;\u6570\u636e\u4e0d\u9700\u8981\u6f02\u6d0b\u8fc7\u6d77&#xff0c;\u901f\u5ea6\u81ea\u7136\u4f1a\u6709\u8d28\u7684\u98de\u8dc3\u3002\u76ee\u524d\u56fd\u5185\u6709\u51e0\u4e2a\u7a33\u5b9a\u53ef\u9760\u7684\u955c\u50cf\u670d\u52a1&#xff0c;\u6bd4\u5982 hf-mirror.com&#xff0c;\u5c31\u662f\u793e\u533a\u7ef4\u62a4\u7684\u4e00\u4e2a\u4f18\u79c0\u955c\u50cf\u3002<\/p>\n<p>\u8fd9\u4e2a\u65b9\u6cd5\u4e4b\u6240\u4ee5\u6392\u5728\u7b2c\u4e00\u4f4d&#xff0c;\u662f\u56e0\u4e3a\u5b83\u65e0\u9700\u4fee\u6539\u4f60\u7684\u4ee3\u7801\u3002\u4f60\u4e4b\u524d\u600e\u4e48\u5199 from_pretrained \u7684&#xff0c;\u73b0\u5728\u8fd8\u600e\u4e48\u5199\u3002\u6240\u6709\u7684\u201c\u52a0\u901f\u9b54\u6cd5\u201d\u90fd\u901a\u8fc7\u73af\u5883\u53d8\u91cf\u5728\u80cc\u540e\u5b8c\u6210&#xff0c;\u5bf9\u4e0a\u5c42\u5e94\u7528\u5b8c\u5168\u900f\u660e&#xff0c;\u975e\u5e38\u4f18\u96c5\u3002<\/p>\n<h4>2.2 \u624b\u628a\u624b\u914d\u7f6e&#xff1a;\u8ba9\u4e0b\u8f7d\u901f\u5ea6\u98de\u8d77\u6765<\/h4>\n<p>\u7406\u8bba\u8bf4\u5b8c\u4e86&#xff0c;\u54b1\u4eec\u76f4\u63a5\u4e0a\u5e72\u8d27\u3002\u4e0b\u9762\u8fd9\u4e00\u5957\u7ec4\u5408\u62f3&#xff0c;\u662f\u6211\u5728\u51e0\u5341\u53f0\u670d\u52a1\u5668\u4e0a\u9a8c\u8bc1\u8fc7\u7684\u6807\u51c6\u6d41\u7a0b\u3002<\/p>\n<p>\u9996\u5148&#xff0c;\u5b89\u88c5\u5fc5\u4e0d\u53ef\u5c11\u7684Python\u5305\u3002\u6211\u5efa\u8bae\u76f4\u63a5\u7528 pip \u5b89\u88c5\u6700\u65b0\u7248\u7684 huggingface-hub&#xff0c;\u5b83\u81ea\u5e26\u4e86 huggingface-cli \u8fd9\u4e2a\u547d\u4ee4\u884c\u5de5\u5177\u3002<\/p>\n<p>pip install -U huggingface_hub<\/p>\n<p>\u63a5\u4e0b\u6765\u662f\u5173\u952e\u4e00\u6b65&#xff1a;\u8bbe\u7f6e\u955c\u50cf\u7ad9\u73af\u5883\u53d8\u91cf\u3002\u6253\u5f00\u4f60\u7684 ~\/.bashrc \u6587\u4ef6&#xff08;\u5982\u679c\u4f60\u7528zsh&#xff0c;\u5c31\u662f ~\/.zshrc&#xff09;\u3002<\/p>\n<p>vim ~\/.bashrc<\/p>\n<p>\u5728\u6587\u4ef6\u7684\u672b\u5c3e&#xff0c;\u6dfb\u52a0\u4e0b\u9762\u8fd9\u884c\u201c\u5492\u8bed\u201d&#xff1a;<\/p>\n<p>export HF_ENDPOINT&#061;https:\/\/hf-mirror.com<\/p>\n<p>\u4fdd\u5b58\u9000\u51fa\u540e&#xff0c;\u522b\u5fd8\u4e86\u8ba9\u914d\u7f6e\u7acb\u523b\u751f\u6548&#xff1a;<\/p>\n<p>source ~\/.bashrc<\/p>\n<p>\u4e3a\u4e86\u786e\u8ba4\u914d\u7f6e\u6210\u529f\u4e86&#xff0c;\u4f60\u53ef\u4ee5\u7528\u8fd9\u4e2a\u547d\u4ee4\u68c0\u67e5\u4e00\u4e0b&#xff1a;<\/p>\n<p>echo $HF_ENDPOINT<\/p>\n<p>\u5982\u679c\u7ec8\u7aef\u6253\u5370\u51fa https:\/\/hf-mirror.com&#xff0c;\u606d\u559c\u4f60&#xff0c;\u5feb\u8f66\u9053\u5df2\u7ecf\u94fa\u597d\u4e86\u3002<\/p>\n<p>\u73b0\u5728&#xff0c;\u8ba9\u6211\u4eec\u6765\u5b9e\u9645\u4e0b\u8f7d\u4e00\u4e2a\u6a21\u578b\u8bd5\u8bd5\u3002\u6bd4\u5982&#xff0c;\u6211\u60f3\u4e0b\u8f7d\u5fae\u8f6f\u7684 Phi-3-mini-4k-instruct \u8fd9\u4e2a\u5c0f\u578b\u4f46\u80fd\u529b\u5f88\u5f3a\u7684\u6a21\u578b\u5230\u5f53\u524d\u76ee\u5f55\u4e0b\u7684 .\/phi3-model \u6587\u4ef6\u5939\u91cc\u3002<\/p>\n<p>huggingface-cli download microsoft\/Phi-3-mini-4k-instruct &#8211;local-dir .\/phi3-model &#8211;resume-download<\/p>\n<p>\u89e3\u91ca\u4e00\u4e0b\u8fd9\u51e0\u4e2a\u53c2\u6570&#xff1a;<\/p>\n<ul>\n<li>&#8211;local-dir&#xff1a;\u6307\u5b9a\u6a21\u578b\u4e0b\u8f7d\u5230\u672c\u5730\u7684\u54ea\u4e2a\u76ee\u5f55\u3002<\/li>\n<li>&#8211;resume-download&#xff1a;\u8fd9\u4e2a\u53c2\u6570\u592a\u6709\u7528\u4e86&#xff01;\u5b83\u652f\u6301\u65ad\u70b9\u7eed\u4f20\u3002\u4e07\u4e00\u7f51\u7edc\u6ce2\u52a8\u4e0b\u8f7d\u4e2d\u65ad\u4e86&#xff0c;\u91cd\u65b0\u8fd0\u884c\u8fd9\u4e2a\u547d\u4ee4\u4f1a\u4ece\u65ad\u6389\u7684\u5730\u65b9\u7ee7\u7eed\u4e0b\u8f7d&#xff0c;\u800c\u4e0d\u662f\u4ece\u5934\u5f00\u59cb&#xff0c;\u7701\u65f6\u7701\u5fc3\u3002<\/li>\n<\/ul>\n<p>\u4e0b\u8f7d\u6570\u636e\u96c6\u7684\u64cd\u4f5c\u51e0\u4e4e\u4e00\u6a21\u4e00\u6837&#xff0c;\u53ea\u662f\u9700\u8981\u52a0\u4e00\u4e2a &#8211;repo-type dataset \u6765\u6307\u660e\u7c7b\u578b\u3002\u6bd4\u5982\u4e0b\u8f7d\u7ecf\u5178\u7684 glue \u6570\u636e\u96c6&#xff1a;<\/p>\n<p>huggingface-cli download &#8211;repo-type dataset glue &#8211;local-dir .\/glue-data &#8211;resume-download<\/p>\n<h4>2.3 \u9ad8\u7ea7\u6280\u5de7\u4e0e\u907f\u5751\u6307\u5357<\/h4>\n<p>\u7528\u719f\u4e86\u57fa\u672c\u547d\u4ee4\u540e&#xff0c;\u6709\u51e0\u4e2a\u8fdb\u9636\u6280\u5de7\u80fd\u8ba9\u4f60\u66f4\u5f97\u5fc3\u5e94\u624b\u3002<\/p>\n<p>\u7b2c\u4e00&#xff0c;\u5904\u7406\u5927\u6a21\u578b\u7684\u201c\u7626\u8eab\u201d\u6280\u5de7\u3002 \u6709\u4e9b\u6a21\u578b\u4ed3\u5e93\u91cc\u4f1a\u5305\u542b\u591a\u79cd\u683c\u5f0f\u7684\u6587\u4ef6&#xff0c;\u6bd4\u5982PyTorch\u7684 .bin \u6587\u4ef6\u548cTensorFlow\u7684 .h5 \u6587\u4ef6\u3002\u5982\u679c\u4f60\u53ea\u7528PyTorch&#xff0c;\u53ef\u4ee5\u901a\u8fc7 &#8211;include \u53c2\u6570\u53ea\u4e0b\u8f7d\u4f60\u9700\u8981\u7684\u6587\u4ef6&#xff0c;\u80fd\u8282\u7701\u4e0d\u5c11\u65f6\u95f4\u548c\u78c1\u76d8\u7a7a\u95f4\u3002<\/p>\n<p>huggingface-cli download meta-llama\/Llama-2-7b &#8211;local-dir .\/llama2-7b &#8211;resume-download &#8211;include &#034;*.bin&#034; &#034;*.json&#034; &#034;*.txt&#034;<\/p>\n<p>\u7b2c\u4e8c&#xff0c;\u5173\u4e8e\u8f6f\u94fe\u63a5\u7684\u6289\u62e9\u3002 \u9ed8\u8ba4\u60c5\u51b5\u4e0b&#xff0c;huggingface-cli \u4e0b\u8f7d\u7684\u6a21\u578b\u6587\u4ef6\u4f1a\u653e\u5728\u4e00\u4e2a\u7edf\u4e00\u7684\u7f13\u5b58\u76ee\u5f55&#xff08;\u6bd4\u5982 ~\/.cache\/huggingface\/hub&#xff09;&#xff0c;\u7136\u540e\u5728\u4f60\u7684 &#8211;local-dir \u91cc\u521b\u5efa\u6307\u5411\u8fd9\u4e9b\u7f13\u5b58\u6587\u4ef6\u7684\u8f6f\u94fe\u63a5\u3002\u8fd9\u6837\u505a\u7684\u597d\u5904\u662f&#xff0c;\u540c\u4e00\u4e2a\u6a21\u578b\u88ab\u591a\u4e2a\u9879\u76ee\u5f15\u7528\u65f6&#xff0c;\u7269\u7406\u4e0a\u53ea\u5b58\u50a8\u4e00\u4efd&#xff0c;\u8282\u7701\u7a7a\u95f4\u3002\u4f46\u574f\u5904\u662f&#xff0c;\u5982\u679c\u4f60\u60f3\u628a &#8211;local-dir \u6574\u4e2a\u6587\u4ef6\u5939\u6253\u5305\u62f7\u8d1d\u5230\u522b\u5904&#xff0c;\u8f6f\u94fe\u63a5\u4f1a\u5931\u6548\u3002\u5982\u679c\u4f60\u5e0c\u671b\u4e0b\u8f7d\u7684\u6587\u4ef6\u5939\u662f\u72ec\u7acb\u3001\u5b8c\u6574\u7684&#xff0c;\u53ef\u4ee5\u52a0\u4e0a &#8211;local-dir-use-symlinks False \u53c2\u6570\u7981\u7528\u8f6f\u94fe\u63a5\u3002<\/p>\n<p>huggingface-cli download google-bert\/bert-base-uncased &#8211;local-dir .\/bert-model &#8211;resume-download &#8211;local-dir-use-symlinks False<\/p>\n<p>\u7b2c\u4e09&#xff0c;\u79c1\u6709\u6a21\u578b\u4e0e\u8ba4\u8bc1\u3002 \u5982\u679c\u4f60\u8981\u4e0b\u8f7d\u516c\u53f8\u5185\u90e8\u6216\u81ea\u5df1\u8d26\u53f7\u4e0b\u7684\u79c1\u6709\u6a21\u578b&#xff0c;\u9700\u8981\u5148\u8fdb\u884c\u8ba4\u8bc1\u3002\u5728Hugging Face\u5b98\u7f51\u4f60\u7684\u8d26\u6237\u8bbe\u7f6e\u91cc\u751f\u6210\u4e00\u4e2a Access Token&#xff0c;\u7136\u540e\u5728\u670d\u52a1\u5668\u4e0a\u8fd0\u884c\u4e0b\u9762\u8fd9\u884cPython\u547d\u4ee4\u6765\u4fdd\u5b58\u5b83&#xff1a;<\/p>\n<p>python -c &#034;from huggingface_hub import HfFolder; HfFolder.save_token(&#039;\u4f60\u7684_token_\u5b57\u7b26\u4e32&#039;)&#034;<\/p>\n<p>\u4e4b\u540e&#xff0c;huggingface-cli \u5728\u4e0b\u8f7d\u79c1\u6709\u6a21\u578b\u65f6\u5c31\u4f1a\u81ea\u52a8\u4f7f\u7528\u8fd9\u4e2atoken\u4e86\u3002<\/p>\n<p>\u8fd9\u4e2a\u65b9\u6cd5\u51e0\u4e4e\u9002\u7528\u4e8e\u6240\u6709\u573a\u666f&#xff0c;\u662f\u6211\u65e5\u5e38\u7684\u9ed8\u8ba4\u9009\u62e9\u3002\u5b83\u7684\u4f18\u52bf\u662f\u7a33\u5b9a\u3001\u7701\u5fc3\u3001\u5bf9\u4ee3\u7801\u65e0\u4fb5\u5165\u3002\u552f\u4e00\u9700\u8981\u6ce8\u610f\u7684\u5c31\u662f\u786e\u4fdd\u955c\u50cf\u7ad9\u672c\u8eab\u662f\u7a33\u5b9a\u53ef\u7528\u7684\u3002<\/p>\n<h3>3. \u65b9\u6cd5\u4e8c&#xff1a;\u5316\u6574\u4e3a\u96f6\u2014\u2014\u624b\u52a8\u4e0b\u8f7d\u4e0e\u201c\u62fc\u56fe\u201d<\/h3>\n<p>\u5f53\u547d\u4ee4\u884c\u5de5\u5177\u56e0\u4e3a\u67d0\u4e9b\u7f51\u7edc\u7b56\u7565\u539f\u56e0\u65e0\u6cd5\u4f7f\u7528\u65f6&#xff08;\u6bd4\u5982\u670d\u52a1\u5668\u9650\u5236\u7279\u5b9a\u7aef\u53e3\u7684\u51fa\u7ad9\u8fde\u63a5&#xff09;&#xff0c;\u6216\u8005\u4f60\u9700\u8981\u5bf9\u4e0b\u8f7d\u8fc7\u7a0b\u6709\u7edd\u5bf9\u7cbe\u7ec6\u7684\u63a7\u5236\u65f6&#xff0c;\u201c\u624b\u52a8\u4e0b\u8f7d\u201d\u8fd9\u4e2a\u770b\u4f3c\u539f\u59cb\u7684\u65b9\u6cd5&#xff0c;\u53cd\u800c\u6210\u4e86\u6700\u53ef\u9760\u7684\u9003\u751f\u901a\u9053\u3002<\/p>\n<h4>3.1 \u4ec0\u4e48\u65f6\u5019\u9700\u8981\u624b\u52a8\u4e0b\u8f7d&#xff1f;<\/h4>\n<p>\u6211\u9047\u5230\u8fc7\u4e00\u6b21\u5178\u578b\u60c5\u51b5&#xff1a;\u5ba2\u6237\u7684\u670d\u52a1\u5668\u5904\u4e8e\u4e00\u4e2a\u975e\u5e38\u4e25\u683c\u7684\u5185\u7f51\u73af\u5883&#xff0c;\u53ea\u80fd\u901a\u8fc7\u7279\u5b9a\u7684HTTP\u4ee3\u7406\u8bbf\u95ee\u5916\u7f51&#xff0c;\u800c\u4e14\u8fd9\u4e2a\u4ee3\u7406\u5bf9\u67d0\u4e9b\u547d\u4ee4\u884c\u5de5\u5177\u7684\u53d1\u8d77\u7684\u8fde\u63a5\u652f\u6301\u4e0d\u597d\u3002huggingface-cli \u600e\u4e48\u914d\u7f6e\u90fd\u8fde\u4e0d\u4e0a\u3002\u8fd9\u65f6\u5019&#xff0c;\u624b\u52a8\u4e0b\u8f7d\u5c31\u6210\u4e86\u552f\u4e00\u7684\u9009\u62e9\u3002<\/p>\n<p>\u624b\u52a8\u4e0b\u8f7d\u7684\u6838\u5fc3\u601d\u60f3\u5f88\u7b80\u5355&#xff1a;\u6d4f\u89c8\u5668\u80fd\u8bbf\u95ee\u7684\u9875\u9762&#xff0c;\u4f60\u5c31\u80fd\u7528\u66f4\u57fa\u7840\u7684\u5de5\u5177\u628a\u6587\u4ef6\u201c\u62d6\u201d\u4e0b\u6765\u3002\u6211\u4eec\u5229\u7528 wget \u6216 curl \u8fd9\u7c7b\u51e0\u4e4e\u5728\u6240\u6709Linux\u7cfb\u7edf\u4e0a\u90fd\u5b58\u5728\u7684\u5de5\u5177&#xff0c;\u76f4\u63a5\u4eceHugging Face\u7f51\u7ad9\u6216\u56fd\u5185\u955c\u50cf\u7ad9\u7684\u9875\u9762\u4e0a\u4e0b\u8f7d\u6bcf\u4e00\u4e2a\u6a21\u578b\u6587\u4ef6&#xff0c;\u7136\u540e\u6309\u7167\u6b63\u786e\u7684\u76ee\u5f55\u7ed3\u6784\u653e\u597d\u3002<\/p>\n<h4>3.2 \u5b9e\u6218\u6f14\u7ec3&#xff1a;\u4e00\u6b65\u6b65\u201c\u62fc\u88c5\u201d\u4e00\u4e2a\u6a21\u578b<\/h4>\n<p>\u6211\u4eec\u4ee5 bert-base-uncased \u8fd9\u4e2a\u5e38\u7528\u6a21\u578b\u4e3a\u4f8b&#xff0c;\u6f14\u793a\u5982\u4f55\u624b\u52a8\u628a\u5b83\u201c\u7ec4\u88c5\u201d\u8d77\u6765\u3002<\/p>\n<p>\u7b2c\u4e00\u6b65&#xff1a;\u83b7\u53d6\u6587\u4ef6\u6e05\u5355\u3002<br \/>\n\u6253\u5f00\u4f60\u7684\u6d4f\u89c8\u5668&#xff0c;\u8bbf\u95ee https:\/\/huggingface.co\/google-bert\/bert-base-uncased\/tree\/main\u3002\u4f60\u4f1a\u770b\u5230\u4e00\u4e2a\u6587\u4ef6\u5217\u8868&#xff0c;\u91cc\u9762\u5305\u542b\u4e86 config.json, pytorch_model.bin, vocab.txt \u7b49\u5173\u952e\u6587\u4ef6\u3002\u4f60\u9700\u8981\u7684\u5c31\u662f\u8fd9\u4e9b\u6587\u4ef6\u7684\u4e0b\u8f7d\u94fe\u63a5\u3002<\/p>\n<p>\u66f4\u9ad8\u6548\u7684\u65b9\u6cd5\u662f&#xff0c;\u76f4\u63a5\u8bbf\u95ee\u955c\u50cf\u7ad9\u7684\u76f8\u540c\u9875\u9762&#xff1a;https:\/\/hf-mirror.com\/google-bert\/bert-base-uncased\/tree\/main\u3002\u901f\u5ea6\u4f1a\u5feb\u5f88\u591a\u3002<\/p>\n<p>\u7b2c\u4e8c\u6b65&#xff1a;\u521b\u5efa\u672c\u5730\u76ee\u5f55\u7ed3\u6784\u3002<br \/>\n\u5728\u4f60\u7684\u670d\u52a1\u5668\u4e0a&#xff0c;\u521b\u5efa\u4e00\u4e2a\u5bf9\u5e94\u7684\u6587\u4ef6\u5939\u3002<\/p>\n<p>mkdir -p .\/bert-base-uncased<br \/>\ncd .\/bert-base-uncased<\/p>\n<p>\u7b2c\u4e09\u6b65&#xff1a;\u4f7f\u7528wget\u6279\u91cf\u4e0b\u8f7d\u3002<br \/>\n\u4f60\u53ef\u4ee5\u4e00\u4e2a\u4e00\u4e2a\u6587\u4ef6\u4e0b\u8f7d&#xff0c;\u4f46\u90a3\u6837\u592a\u6162\u4e86\u3002\u6211\u4eec\u53ef\u4ee5\u5229\u7528 wget \u7684\u7279\u6027\u6279\u91cf\u64cd\u4f5c\u3002\u9996\u5148&#xff0c;\u628a\u4f60\u8981\u4e0b\u8f7d\u7684\u6587\u4ef6\u5217\u8868\u6574\u7406\u5230\u4e00\u4e2a\u6587\u672c\u6587\u4ef6\u91cc&#xff0c;\u6bd4\u5982 filelist.txt&#xff1a;<\/p>\n<p>https:\/\/hf-mirror.com\/google-bert\/bert-base-uncased\/resolve\/main\/config.json<br \/>\nhttps:\/\/hf-mirror.com\/google-bert\/bert-base-uncased\/resolve\/main\/pytorch_model.bin<br \/>\nhttps:\/\/hf-mirror.com\/google-bert\/bert-base-uncased\/resolve\/main\/vocab.txt<br \/>\nhttps:\/\/hf-mirror.com\/google-bert\/bert-base-uncased\/resolve\/main\/tokenizer.json<\/p>\n<p>\u6ce8\u610f&#xff0c;\u94fe\u63a5\u7528\u7684\u662f resolve\/main&#xff0c;\u8fd9\u6307\u5411\u7684\u662f\u6587\u4ef6\u672c\u8eab&#xff0c;\u800c\u4e0d\u662f\u6587\u4ef6\u5217\u8868\u9875\u9762\u3002\u7136\u540e&#xff0c;\u4f7f\u7528 wget \u7684 -i \u53c2\u6570\u4ece\u6587\u4ef6\u5217\u8868\u4e0b\u8f7d&#xff1a;<\/p>\n<p>wget -i filelist.txt<\/p>\n<p>\u5982\u679c\u4f60\u7684\u7f51\u7edc\u9700\u8981\u4ee3\u7406&#xff0c;\u53ef\u4ee5\u52a0\u4e0a\u4ee3\u7406\u53c2\u6570&#xff1a;<\/p>\n<p>wget -e use_proxy&#061;yes -e http_proxy&#061;\u4f60\u7684\u4ee3\u7406\u5730\u5740:\u7aef\u53e3 -i filelist.txt<\/p>\n<p>\u7b2c\u56db\u6b65&#xff1a;\u9a8c\u8bc1\u4e0e\u4f7f\u7528\u3002<br \/>\n\u4e0b\u8f7d\u5b8c\u6210\u540e&#xff0c;\u4f60\u7684 .\/bert-base-uncased \u76ee\u5f55\u91cc\u5e94\u8be5\u5c31\u6709\u4e86\u6240\u6709\u5fc5\u8981\u7684\u6587\u4ef6\u3002\u73b0\u5728&#xff0c;\u4f60\u5c31\u53ef\u4ee5\u5728Python\u4ee3\u7801\u4e2d\u50cf\u52a0\u8f7d\u666e\u901a\u6a21\u578b\u4e00\u6837\u52a0\u8f7d\u5b83\u4e86&#xff1a;<\/p>\n<p>from transformers import AutoTokenizer, AutoModel<br \/>\ntokenizer &#061; AutoTokenizer.from_pretrained(&#034;.\/bert-base-uncased&#034;)<br \/>\nmodel &#061; AutoModel.from_pretrained(&#034;.\/bert-base-uncased&#034;)<\/p>\n<p>\u4ee3\u7801\u4f1a\u4ece\u4f60\u6307\u5b9a\u7684\u672c\u5730\u8def\u5f84\u52a0\u8f7d&#xff0c;\u5b8c\u5168\u4e0d\u9700\u8981\u7f51\u7edc\u8fde\u63a5\u3002<\/p>\n<h4>3.3 \u501f\u52a9ModelScope\u7b49\u56fd\u5185\u5e73\u53f0<\/h4>\n<p>\u9664\u4e86\u76f4\u63a5\u201c\u786c\u5543\u201dHugging Face\u9875\u9762&#xff0c;\u8fd8\u6709\u4e00\u4e2a\u66f4\u53cb\u597d\u7684\u9009\u62e9&#xff1a;ModelScope&#xff08;\u9b54\u642d\u793e\u533a&#xff09;\u3002\u8fd9\u662f\u963f\u91cc\u4e91\u63a8\u51fa\u7684\u4e00\u4e2a\u6a21\u578b\u5f00\u6e90\u793e\u533a&#xff0c;\u5b83\u955c\u50cf\u4e86\u975e\u5e38\u591aHugging Face\u4e0a\u7684\u70ed\u95e8\u6a21\u578b&#xff0c;\u5e76\u4e14\u670d\u52a1\u5668\u5728\u56fd\u5185&#xff0c;\u4e0b\u8f7d\u901f\u5ea6\u901a\u5e38\u975e\u5e38\u5feb\u3002<\/p>\n<p>\u5728ModelScope\u4e0a\u627e\u5230\u4f60\u9700\u8981\u7684\u6a21\u578b&#xff0c;\u5b83\u901a\u5e38\u4f1a\u63d0\u4f9b\u591a\u79cd\u4e0b\u8f7d\u65b9\u5f0f&#xff0c;\u5305\u62ec\u76f4\u63a5\u7684HTTP\u94fe\u63a5\u3001\u4ee5\u53ca\u5b83\u81ea\u5df1\u7684Python SDK\u3002\u4f7f\u7528\u5b83\u7684SDK\u4e0b\u8f7d&#xff0c;\u4f53\u9a8c\u548c huggingface-hub \u7c7b\u4f3c&#xff0c;\u4f46\u8d70\u7684\u662f\u56fd\u5185\u7f51\u7edc\u3002<\/p>\n<p>from modelscope import snapshot_download<br \/>\nmodel_dir &#061; snapshot_download(&#039;damo\/bert-base-uncased&#039;, cache_dir&#061;&#039;.\/local_model&#039;)<\/p>\n<p>\u624b\u52a8\u4e0b\u8f7d\u7684\u65b9\u6cd5\u867d\u7136\u6b65\u9aa4\u7a0d\u591a&#xff0c;\u4f46\u5b83\u7ed9\u4e86\u4f60\u6700\u5927\u7684\u7075\u6d3b\u6027\u548c\u53ef\u63a7\u6027\u3002\u5c24\u5176\u662f\u5728\u5904\u7406\u8d85\u5927\u578b\u6a21\u578b&#xff08;\u51e0\u5341GB\u751a\u81f3\u4e0a\u767eGB&#xff09;\u65f6&#xff0c;\u4f60\u53ef\u4ee5\u5206\u6279\u6b21\u3001\u5206\u6587\u4ef6\u4e0b\u8f7d&#xff0c;\u7ba1\u7406\u8d77\u6765\u66f4\u6e05\u6670\u3002\u5b83\u5c31\u50cf\u5907\u4efd\u7684\u201c\u745e\u58eb\u519b\u5200\u201d&#xff0c;\u867d\u7136\u4e0d\u5e38\u7528&#xff0c;\u4f46\u5173\u952e\u65f6\u523b\u603b\u80fd\u6d3e\u4e0a\u7528\u573a\u3002<\/p>\n<h3>4. \u65b9\u6cd5\u4e09&#xff1a;\u76f4\u51fb\u6838\u5fc3\u2014\u2014\u4fee\u6539\u5e93\u6587\u4ef6\u201c\u91cd\u5b9a\u5411\u201d\u6d41\u91cf<\/h3>\n<p>\u5982\u679c\u8bf4\u524d\u4e24\u79cd\u65b9\u6cd5\u662f\u4ece\u201c\u7528\u6237\u4fa7\u201d\u89e3\u51b3\u95ee\u9898&#xff0c;\u90a3\u4e48\u8fd9\u7b2c\u4e09\u79cd\u65b9\u6cd5\u5c31\u662f\u4ece\u201c\u5e93\u5185\u90e8\u201d\u52a8\u624b\u672f\u3002\u5b83\u7684\u539f\u7406\u975e\u5e38\u76f4\u63a5&#xff1a;\u627e\u5230Hugging Face\u5e93\u91cc\u9762\u90a3\u4e2a\u5b9a\u4e49\u5b98\u65b9\u7f51\u5740\u7684\u53d8\u91cf&#xff0c;\u628a\u5b83\u4ece\u6d77\u5916\u5730\u5740\u6539\u6210\u56fd\u5185\u955c\u50cf\u5730\u5740\u3002<\/p>\n<h4>4.1 \u7406\u89e3\u539f\u7406&#xff1a;\u5e38\u91cf\u7684\u529b\u91cf<\/h4>\n<p>\u5728 huggingface_hub \u8fd9\u4e2aPython\u5e93\u7684\u5185\u90e8&#xff0c;\u6709\u4e00\u4e2a\u6587\u4ef6\u53eb constants.py\u3002\u8fd9\u4e2a\u6587\u4ef6\u91cc\u5b9a\u4e49\u4e86\u8bb8\u591a\u5e38\u91cf&#xff0c;\u5176\u4e2d\u5c31\u5305\u62ec\u4e00\u4e2a\u53eb\u505a ENDPOINT \u7684\u53d8\u91cf&#xff0c;\u5b83\u7684\u503c\u9ed8\u8ba4\u662f &#034;https:\/\/huggingface.co&#034;\u3002\u6240\u6709\u901a\u8fc7\u8fd9\u4e2a\u5e93\u53d1\u8d77\u7684\u6a21\u578b\u4e0b\u8f7d\u8bf7\u6c42&#xff0c;\u5176\u76ee\u6807\u5730\u5740\u90fd\u662f\u57fa\u4e8e\u8fd9\u4e2a ENDPOINT \u6784\u5efa\u7684\u3002<\/p>\n<p>\u6211\u4eec\u7684\u201c\u624b\u672f\u201d\u5c31\u662f\u627e\u5230\u8fd9\u4e2a\u6587\u4ef6&#xff0c;\u628a ENDPOINT \u7684\u503c\u6539\u6210 &#034;https:\/\/hf-mirror.com&#034;\u3002\u8fd9\u6837\u4e00\u6765&#xff0c;\u4efb\u4f55\u901a\u8fc7 transformers \u6216 datasets \u5e93\u7684 from_pretrained \u65b9\u6cd5\u53d1\u8d77\u7684\u4e0b\u8f7d&#xff0c;\u5176\u6d41\u91cf\u90fd\u4f1a\u81ea\u52a8\u6d41\u5411\u955c\u50cf\u7ad9\u3002<\/p>\n<h4>4.2 \u8be6\u7ec6\u64cd\u4f5c\u6b65\u9aa4&#xff1a;\u627e\u5230\u5e76\u4fee\u6539\u90a3\u4e2a\u5173\u952e\u6587\u4ef6<\/h4>\n<p>\u542c\u8d77\u6765\u6709\u70b9\u9ed1\u5ba2\u7684\u611f\u89c9&#xff0c;\u4f46\u64cd\u4f5c\u8d77\u6765\u5176\u5b9e\u5f88\u7b80\u5355\u3002\u96be\u70b9\u5728\u4e8e\u627e\u5230\u8fd9\u4e2a\u6587\u4ef6\u5728\u4f60\u670d\u52a1\u5668\u4e0a\u7684\u5177\u4f53\u8def\u5f84&#xff0c;\u56e0\u4e3a\u5b83\u85cf\u5728Python\u7684 site-packages \u76ee\u5f55\u91cc&#xff0c;\u800c\u8fd9\u4e2a\u76ee\u5f55\u7684\u4f4d\u7f6e\u56e0\u4f60\u7684Python\u73af\u5883\u7ba1\u7406\u65b9\u5f0f&#xff08;\u7cfb\u7edfPython\u3001conda\u3001venv\u7b49&#xff09;\u800c\u5f02\u3002<\/p>\n<p>\u7b2c\u4e00\u6b65&#xff1a;\u5b9a\u4f4d\u4f60\u7684Python\u73af\u5883\u3002<br \/>\n\u9996\u5148&#xff0c;\u786e\u8ba4\u4f60\u8fd0\u884cAI\u4ee3\u7801\u65f6\u7528\u7684\u662f\u54ea\u4e2aPython\u3002\u6700\u51c6\u786e\u7684\u65b9\u6cd5\u662f&#xff0c;\u5728\u4f60\u8fd0\u884c\u9879\u76ee\u7684\u865a\u62df\u73af\u5883\u4e2d&#xff0c;\u6267\u884c&#xff1a;<\/p>\n<p>which python<\/p>\n<p>\u6216\u8005<\/p>\n<p>python -c &#034;import sys; print(sys.executable)&#034;<\/p>\n<p>\u8fd9\u4f1a\u6253\u5370\u51faPython\u89e3\u91ca\u5668\u7684\u7edd\u5bf9\u8def\u5f84\u3002\u4ece\u8def\u5f84\u91cc\u4f60\u901a\u5e38\u80fd\u770b\u51fa\u7aef\u502a&#xff0c;\u6bd4\u5982\u5305\u542b conda\u3001envs\u3001venv \u7b49\u5b57\u6837\u3002<\/p>\n<p>\u7b2c\u4e8c\u6b65&#xff1a;\u5bfb\u627econstants.py\u3002<br \/>\n\u5047\u8bbe\u4f60\u7528\u7684\u662fconda\u73af\u5883&#xff0c;\u73af\u5883\u540d\u53eb ai&#xff0c;\u90a3\u4e48 constants.py \u7684\u8def\u5f84\u5f88\u53ef\u80fd\u7c7b\u4f3c\u4e8e&#xff1a;<br \/>\n\/home\/\u4f60\u7684\u7528\u6237\u540d\/miniconda3\/envs\/ai\/lib\/python3.9\/site-packages\/huggingface_hub\/constants.py<\/p>\n<p>\u4e00\u4e2a\u901a\u7528\u7684\u67e5\u627e\u547d\u4ee4\u662f&#xff1a;<\/p>\n<p>find \/home\/\u4f60\u7684\u7528\u6237\u540d -name &#034;constants.py&#034; 2&gt;\/dev\/null | grep huggingface_hub<\/p>\n<p>\u6216\u8005\u66f4\u7cbe\u786e\u4e00\u70b9&#xff1a;<\/p>\n<p>python -c &#034;import huggingface_hub; print(huggingface_hub.__file__)&#034;<\/p>\n<p>\u8fd9\u4e2a\u547d\u4ee4\u4f1a\u8f93\u51fa huggingface_hub \u5305\u7684 __init__.py \u6587\u4ef6\u4f4d\u7f6e&#xff0c;constants.py \u5c31\u5728\u540c\u4e00\u4e2a\u76ee\u5f55\u4e0b\u3002<\/p>\n<p>\u7b2c\u4e09\u6b65&#xff1a;\u8fdb\u884c\u4fee\u6539\u3002<br \/>\n\u627e\u5230\u6587\u4ef6\u540e&#xff0c;\u7528 vim \u6216 nano \u7f16\u8f91\u5668\u6253\u5f00\u5b83\u3002<\/p>\n<p>vim \/path\/to\/your\/site-packages\/huggingface_hub\/constants.py<\/p>\n<p>\u5728\u6587\u4ef6\u91cc\u641c\u7d22 ENDPOINT&#xff08;\u901a\u5e38\u5728\u7b2c20-40\u884c\u5de6\u53f3&#xff09;&#xff0c;\u4f60\u4f1a\u770b\u5230\u7c7b\u4f3c\u8fd9\u6837\u7684\u4e00\u884c&#xff1a;<\/p>\n<p>ENDPOINT &#061; &#034;https:\/\/huggingface.co&#034;<\/p>\n<p>\u628a\u5b83\u4fee\u6539\u4e3a&#xff1a;<\/p>\n<p>ENDPOINT &#061; &#034;https:\/\/hf-mirror.com&#034;<\/p>\n<p>\u4fdd\u5b58\u5e76\u9000\u51fa\u3002<\/p>\n<h4>4.3 \u65b9\u6cd5\u8bc4\u4f30&#xff1a;\u4f18\u70b9\u3001\u98ce\u9669\u4e0e\u9002\u7528\u573a\u666f<\/h4>\n<p>\u4fee\u6539\u5b8c\u4e4b\u540e&#xff0c;\u4f60\u4e0d\u9700\u8981\u6539\u4efb\u4f55\u4ee3\u7801&#xff0c;\u4e5f\u4e0d\u9700\u8981\u8bbe\u7f6e\u73af\u5883\u53d8\u91cf\u3002\u76f4\u63a5\u8fd0\u884c\u4f60\u539f\u6765\u7684\u52a0\u8f7d\u6a21\u578b\u7684\u811a\u672c&#xff0c;\u901f\u5ea6\u5e94\u8be5\u5c31\u5df2\u7ecf\u63d0\u5347\u4e86\u3002\u8fd9\u79cd\u65b9\u6cd5\u53ef\u8c13\u201c\u4e00\u52b3\u6c38\u9038\u201d&#xff0c;\u5bf9\u5f53\u524dPython\u73af\u5883\u4e0b\u7684\u6240\u6709\u7a0b\u5e8f\u90fd\u751f\u6548\u3002<\/p>\n<p>\u4f46\u662f&#xff0c;\u6211\u5fc5\u987b\u544a\u8bc9\u4f60\u5b83\u7684\u6f5c\u5728\u98ce\u9669&#xff1a;<\/p>\n<li>\u73af\u5883\u9694\u79bb\u6027\u5dee&#xff1a;\u4f60\u4fee\u6539\u7684\u662f\u67d0\u4e2a\u7279\u5b9aPython\u73af\u5883\u4e0b\u7684\u5e93\u6587\u4ef6\u3002\u5982\u679c\u4f60\u6709\u591a\u4e2a\u865a\u62df\u73af\u5883&#xff0c;\u6bcf\u4e2a\u73af\u5883\u90fd\u9700\u8981\u5355\u72ec\u4fee\u6539\u3002<\/li>\n<li>\u66f4\u65b0\u98ce\u9669&#xff1a;\u5f53\u4f60\u7528 pip install -U huggingface_hub \u5347\u7ea7\u8fd9\u4e2a\u5e93\u65f6&#xff0c;\u5b89\u88c5\u8fc7\u7a0b\u5f88\u53ef\u80fd\u4f1a\u7528\u65b0\u7248\u672c\u7684\u6587\u4ef6\u8986\u76d6\u6389\u4f60\u4fee\u6539\u8fc7\u7684 constants.py&#xff0c;\u5bfc\u81f4\u4fee\u6539\u5931\u6548\u3002\u4f60\u9700\u8981\u8bb0\u4f4f&#xff0c;\u6bcf\u6b21\u5347\u7ea7\u540e\u53ef\u80fd\u8981\u91cd\u65b0\u4fee\u6539\u3002<\/li>\n<li>\u53ef\u7ef4\u62a4\u6027&#xff1a;\u5bf9\u4e8e\u56e2\u961f\u534f\u4f5c\u7684\u9879\u76ee&#xff0c;\u4f60\u5f88\u96be\u8981\u6c42\u6bcf\u4e2a\u6210\u5458\u7684\u6bcf\u4e2a\u73af\u5883\u90fd\u53bb\u505a\u540c\u6837\u7684\u4fee\u6539\u3002\u8fd9\u589e\u52a0\u4e86\u9879\u76ee\u914d\u7f6e\u7684\u590d\u6742\u5ea6\u3002<\/li>\n<p>\u56e0\u6b64&#xff0c;\u6211\u901a\u5e38\u53ea\u5728\u4e00\u4e9b\u4e34\u65f6\u7684\u3001\u4e2a\u4eba\u7684\u3001\u4e14\u4e0d\u65b9\u4fbf\u914d\u7f6e\u7cfb\u7edf\u73af\u5883\u53d8\u91cf\u7684\u5b9e\u9a8c\u73af\u5883\u4e2d\u4f7f\u7528\u8fd9\u79cd\u65b9\u6cd5\u3002\u6bd4\u5982&#xff0c;\u5728\u67d0\u4e2aDocker\u5bb9\u5668\u91cc\u5feb\u901f\u6d4b\u8bd5&#xff0c;\u6216\u8005\u5728\u4e00\u53f0\u6743\u9650\u53d7\u9650\u3001\u65e0\u6cd5\u4fee\u6539\u7528\u6237\u914d\u7f6e\u6587\u4ef6&#xff08;~\/.bashrc&#xff09;\u7684\u4e34\u65f6\u670d\u52a1\u5668\u4e0a\u3002<\/p>\n<h3>5. \u65b9\u6cd5\u5bf9\u6bd4\u4e0e\u573a\u666f\u9009\u62e9\u6307\u5357<\/h3>\n<p>\u597d\u4e86&#xff0c;\u4e09\u79cd\u65b9\u6cd5\u90fd\u4ecb\u7ecd\u5b8c\u4e86\u3002\u4f60\u53ef\u80fd\u6709\u70b9\u773c\u82b1\u7f2d\u4e71&#xff0c;\u4e0d\u77e5\u9053\u5230\u5e95\u8be5\u9009\u54ea\u4e2a\u3002\u522b\u6025&#xff0c;\u6211\u753b\u4e86\u4e00\u5f20\u5bf9\u6bd4\u8868&#xff0c;\u5e76\u7ed9\u4f60\u4e00\u4e9b\u6700\u76f4\u63a5\u7684\u5efa\u8bae\u3002<\/p>\n<table>\n<tr>\u7279\u6027\u7ef4\u5ea6\u65b9\u6cd5\u4e00&#xff1a;huggingface-cli &#043; \u955c\u50cf\u7ad9\u65b9\u6cd5\u4e8c&#xff1a;\u624b\u52a8\u4e0b\u8f7d\u65b9\u6cd5\u4e09&#xff1a;\u4fee\u6539\u5e93\u6587\u4ef6<\/tr>\n<tbody>\n<tr>\n<td style=\"text-align:left\">\u4e0a\u624b\u96be\u5ea6<\/td>\n<td style=\"text-align:left\">\u4f4e<\/td>\n<td style=\"text-align:left\">\u4e2d<\/td>\n<td style=\"text-align:left\">\u4e2d<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align:left\">\u4e0b\u8f7d\u901f\u5ea6<\/td>\n<td style=\"text-align:left\">\u5feb&#xff08;\u4f9d\u8d56\u955c\u50cf\u7ad9&#xff09;<\/td>\n<td style=\"text-align:left\">\u5feb&#xff08;\u53ef\u76f4\u8fde\u955c\u50cf&#xff09;<\/td>\n<td style=\"text-align:left\">\u5feb&#xff08;\u4f9d\u8d56\u955c\u50cf\u7ad9&#xff09;<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align:left\">\u7a33\u5b9a\u6027<\/td>\n<td style=\"text-align:left\">\u9ad8<\/td>\n<td style=\"text-align:left\">\u6781\u9ad8<\/td>\n<td style=\"text-align:left\">\u4e2d&#xff08;\u5347\u7ea7\u53ef\u80fd\u5931\u6548&#xff09;<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align:left\">\u5bf9\u4ee3\u7801\u7684\u4fb5\u5165\u6027<\/td>\n<td style=\"text-align:left\">\u65e0<\/td>\n<td style=\"text-align:left\">\u9700\u6307\u5b9a\u672c\u5730\u8def\u5f84<\/td>\n<td style=\"text-align:left\">\u65e0<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align:left\">\u73af\u5883\u4f9d\u8d56\u6027<\/td>\n<td style=\"text-align:left\">\u9700\u914d\u7f6e\u73af\u5883\u53d8\u91cf<\/td>\n<td style=\"text-align:left\">\u51e0\u4e4e\u65e0\u4f9d\u8d56<\/td>\n<td style=\"text-align:left\">\u4fee\u6539\u7279\u5b9a\u73af\u5883\u6587\u4ef6<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align:left\">\u56e2\u961f\u534f\u4f5c\u53cb\u597d\u5ea6<\/td>\n<td style=\"text-align:left\">\u9ad8&#xff08;\u914d\u7f6e\u53ef\u6587\u6863\u5316&#xff09;<\/td>\n<td style=\"text-align:left\">\u4e2d&#xff08;\u9700\u5171\u4eab\u6587\u4ef6&#xff09;<\/td>\n<td style=\"text-align:left\">\u4f4e&#xff08;\u6bcf\u4eba\u9700\u4fee\u6539&#xff09;<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align:left\">\u9002\u7528\u573a\u666f<\/td>\n<td style=\"text-align:left\">\u7edd\u5927\u591a\u6570\u60c5\u51b5&#xff0c;\u9996\u9009\u63a8\u8350<\/td>\n<td style=\"text-align:left\">\u7f51\u7edc\u53d7\u9650\u73af\u5883\u3001\u8d85\u5927\u6587\u4ef6\u5206\u6cbb\u3001\u5907\u4efd<\/td>\n<td style=\"text-align:left\">\u4e34\u65f6\u6d4b\u8bd5\u3001\u5feb\u901f\u9a8c\u8bc1\u3001\u5355\u7528\u6237\u73af\u5883<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u6211\u7684\u4e2a\u4eba\u7ecf\u9a8c\u662f&#xff1a;<\/p>\n<p>\u9996\u5148&#xff0c;\u65e0\u8111\u5c1d\u8bd5\u65b9\u6cd5\u4e00\u3002 \u572895%\u7684\u60c5\u51b5\u4e0b&#xff0c;\u8bbe\u7f6e HF_ENDPOINT \u73af\u5883\u53d8\u91cf\u5c31\u80fd\u5b8c\u7f8e\u89e3\u51b3\u95ee\u9898\u3002\u5b83\u89c4\u8303\u3001\u5e72\u51c0\u3001\u5f71\u54cd\u53ef\u63a7\u3002\u8bb0\u5f97\u628a export HF_ENDPOINT&#061;https:\/\/hf-mirror.com \u8fd9\u6761\u547d\u4ee4\u5199\u8fdb\u4f60\u7684\u670d\u52a1\u5668\u521d\u59cb\u5316\u811a\u672c\u6216\u8005Dockerfile\u91cc&#xff0c;\u5f62\u6210\u4e60\u60ef\u3002<\/p>\n<p>\u5f53\u65b9\u6cd5\u4e00\u5931\u6548\u65f6&#xff08;\u6bd4\u5982\u5947\u602a\u7684\u7f51\u7edc\u7b56\u7565&#xff09;&#xff0c;\u8003\u8651\u65b9\u6cd5\u4e8c\u3002 \u624b\u52a8\u4e0b\u8f7d\u867d\u7136\u7e41\u7410&#xff0c;\u4f46\u5b83\u662f\u7a7f\u900f\u80fd\u529b\u6700\u5f3a\u7684\u65b9\u6cd5\u3002\u4f60\u53ef\u4ee5\u628a\u4e0b\u8f7d\u597d\u7684\u6a21\u578b\u6587\u4ef6\u5939\u6253\u5305\u6210\u538b\u7f29\u5305&#xff0c;\u5728\u5185\u7f51\u670d\u52a1\u5668\u4e4b\u95f4\u4f20\u8f93&#xff0c;\u8fd9\u6bd4\u91cd\u590d\u4ece\u5916\u7f51\u4e0b\u8f7d\u5feb\u5f97\u591a\u3002\u5bf9\u4e8e\u8d85\u5927\u578b\u6a21\u578b&#xff0c;\u624b\u52a8\u4e0b\u8f7d\u5e76\u7ba1\u7406\u5404\u4e2a\u5206\u7247\u6587\u4ef6&#xff0c;\u5fc3\u91cc\u4e5f\u66f4\u8e0f\u5b9e\u3002<\/p>\n<p>\u65b9\u6cd5\u4e09&#xff0c;\u4f5c\u4e3a\u6700\u540e\u7684\u624b\u6bb5\u6216\u4e34\u65f6\u5de5\u5177\u3002 \u6211\u53ea\u6709\u5728\u4e00\u79cd\u60c5\u51b5\u4e0b\u4f1a\u7528\u5b83&#xff1a;\u5f53\u6211\u62ff\u5230\u4e00\u4e2a\u5168\u65b0\u7684\u3001\u6743\u9650\u5f88\u201c\u5e72\u51c0\u201d\u7684\u4e34\u65f6\u4e91\u4e3b\u673a&#xff0c;\u53ea\u60f3\u5feb\u901f\u8dd1\u901a\u4e00\u4e2a\u6a21\u578bdemo&#xff0c;\u4e0d\u60f3\u53bb\u914d\u7f6e\u7528\u6237\u73af\u5883\u53d8\u91cf\u65f6&#xff0c;\u6211\u4f1a\u76f4\u63a5 vim \u4fee\u6539\u4e00\u4e0b\u5e93\u6587\u4ef6&#xff0c;\u5341\u5206\u949f\u641e\u5b9a\u6d4b\u8bd5&#xff0c;\u7136\u540e\u5c31\u628a\u8fd9\u4e2a\u73af\u5883\u6254\u6389\u4e86\u3002<\/p>\n<p>\u6700\u540e&#xff0c;\u518d\u5206\u4eab\u4e00\u4e2a\u6211\u8e29\u8fc7\u7684\u5751&#xff1a;\u65e0\u8bba\u7528\u54ea\u79cd\u65b9\u6cd5&#xff0c;\u4e0b\u8f7d\u7279\u522b\u5927\u7684\u6a21\u578b&#xff08;\u6bd4\u5982\u4e0a\u767eGB\u7684LLaMA\u6216Falcon&#xff09;\u65f6&#xff0c;\u52a1\u5fc5\u5173\u6ce8\u670d\u52a1\u5668\u7684\u78c1\u76d8\u7a7a\u95f4\u548cinode\u6570\u91cf\u3002\u6211\u66fe\u7ecf\u56e0\u4e3a\u78c1\u76d8\u7a7a\u95f4\u4e0d\u8db3&#xff0c;\u4e0b\u8f7d\u5230\u4e00\u534a\u5931\u8d25&#xff0c;\u6e05\u7406\u7a7a\u95f4\u540e&#xff0c;\u53c8\u56e0\u4e3a\u6587\u4ef6\u6570\u91cf\u592a\u591a&#xff08;\u51e0\u767e\u4e07\u4e2a\u5c0f\u6587\u4ef6&#xff09;\u628ainode\u7528\u5149\u4e86&#xff0c;\u518d\u6b21\u5931\u8d25\u3002\u5bf9\u4e8e\u8fd9\u79cd\u5927\u6a21\u578b&#xff0c;\u5982\u679c\u6761\u4ef6\u5141\u8bb8&#xff0c;\u76f4\u63a5\u4e0b\u8f7d\u5df2\u7ecf\u5408\u5e76\u597d\u7684\u5355\u6587\u4ef6\u683c\u5f0f&#xff08;\u5982 .safetensors \u6216GGUF\u683c\u5f0f&#xff09;&#xff0c;\u4f1a\u7701\u53bb\u5f88\u591a\u6587\u4ef6\u7cfb\u7edf\u7ba1\u7406\u7684\u9ebb\u70e6\u3002\u4e0b\u8f7d\u7684\u4e16\u754c\u5f88\u7cbe\u5f69&#xff0c;\u4f46\u4e5f\u5145\u6ee1\u5c0f\u9677\u9631&#xff0c;\u5e0c\u671b\u6211\u7684\u8fd9\u4e9b\u7ecf\u9a8c\u80fd\u5e2e\u4f60\u5c11\u8d70\u4e9b\u5f2f\u8def&#xff0c;\u628a\u66f4\u591a\u65f6\u95f4\u82b1\u5728\u6709\u8da3\u7684\u6a21\u578b\u5b9e\u9a8c\u548c\u4e1a\u52a1\u521b\u65b0\u4e0a\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>1. \u4e3a\u4ec0\u4e48\u4f60\u7684\u670d\u52a1\u5668\u4e0b\u8f7dHugging Face\u6a21\u578b\u603b\u662f\u201c\u9f9f\u901f\u201d&#xff1f;<br \/>\n\u5982\u679c\u4f60\u5728\u670d\u52a1\u5668\u4e0a\u6298\u817e\u8fc7AI\u6a21\u578b&#xff0c;\u6211\u731c\u4f60\u4e00\u5b9a\u9047\u5230\u8fc7\u8fd9\u4e2a\u573a\u666f&#xff1a;\u6ee1\u6000\u6fc0\u52a8\u5730\u6572\u4e0b\u4e00\u884c from transformers import AutoModelForCausalLM&#xff0c;\u7ed3\u679c\u7ec8\u7aef\u5361\u5728\u90a3\u91cc\u4e00\u52a8\u4e0d\u52a8&#xff0c;\u6216\u8005\u4e0b\u8f7d\u8fdb\u5ea6\u6761\u50cf\u8717\u725b\u4e00\u6837\u722c\u884c&#xff0c;\u6700\u540e\u8fd8\u7ed9\u4f60\u629b\u51fa\u4e00\u4e2a ConnectionError \u6216\u8005\u8d85\u65f6\u3002\u8fd9\u79cd\u611f\u89c9&#xff0c;\u5c31\u50cf\u53bb\u8d85\u5e02\u4e70\u6ce1<\/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":[7591,8789,1559,43],"topic":[],"class_list":["post-79128","post","type-post","status-publish","format-standard","hentry","category-server","tag-ai","tag-8789","tag-huggingface","tag-43"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u9ad8\u6548\u89e3\u51b3\u670d\u52a1\u5668\u4e0b\u8f7dhuggingFace\u6a21\u578b\u6570\u636e\u96c6\u76843\u79cd\u5b9e\u6218\u65b9\u6cd5 - \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\/79128.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u9ad8\u6548\u89e3\u51b3\u670d\u52a1\u5668\u4e0b\u8f7dhuggingFace\u6a21\u578b\u6570\u636e\u96c6\u76843\u79cd\u5b9e\u6218\u65b9\u6cd5 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"1. \u4e3a\u4ec0\u4e48\u4f60\u7684\u670d\u52a1\u5668\u4e0b\u8f7dHugging Face\u6a21\u578b\u603b\u662f\u201c\u9f9f\u901f\u201d&#xff1f; \u5982\u679c\u4f60\u5728\u670d\u52a1\u5668\u4e0a\u6298\u817e\u8fc7AI\u6a21\u578b&#xff0c;\u6211\u731c\u4f60\u4e00\u5b9a\u9047\u5230\u8fc7\u8fd9\u4e2a\u573a\u666f&#xff1a;\u6ee1\u6000\u6fc0\u52a8\u5730\u6572\u4e0b\u4e00\u884c from transformers import AutoModelForCausalLM&#xff0c;\u7ed3\u679c\u7ec8\u7aef\u5361\u5728\u90a3\u91cc\u4e00\u52a8\u4e0d\u52a8&#xff0c;\u6216\u8005\u4e0b\u8f7d\u8fdb\u5ea6\u6761\u50cf\u8717\u725b\u4e00\u6837\u722c\u884c&#xff0c;\u6700\u540e\u8fd8\u7ed9\u4f60\u629b\u51fa\u4e00\u4e2a ConnectionError \u6216\u8005\u8d85\u65f6\u3002\u8fd9\u79cd\u611f\u89c9&#xff0c;\u5c31\u50cf\u53bb\u8d85\u5e02\u4e70\u6ce1\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/79128.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2026-02-28T23:36:22+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=\"5 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/79128.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/79128.html\",\"name\":\"\u9ad8\u6548\u89e3\u51b3\u670d\u52a1\u5668\u4e0b\u8f7dhuggingFace\u6a21\u578b\u6570\u636e\u96c6\u76843\u79cd\u5b9e\u6218\u65b9\u6cd5 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2026-02-28T23:36:22+00:00\",\"dateModified\":\"2026-02-28T23:36:22+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/79128.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/79128.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/79128.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u9ad8\u6548\u89e3\u51b3\u670d\u52a1\u5668\u4e0b\u8f7dhuggingFace\u6a21\u578b\u6570\u636e\u96c6\u76843\u79cd\u5b9e\u6218\u65b9\u6cd5\"}]},{\"@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":"\u9ad8\u6548\u89e3\u51b3\u670d\u52a1\u5668\u4e0b\u8f7dhuggingFace\u6a21\u578b\u6570\u636e\u96c6\u76843\u79cd\u5b9e\u6218\u65b9\u6cd5 - \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\/79128.html","og_locale":"zh_CN","og_type":"article","og_title":"\u9ad8\u6548\u89e3\u51b3\u670d\u52a1\u5668\u4e0b\u8f7dhuggingFace\u6a21\u578b\u6570\u636e\u96c6\u76843\u79cd\u5b9e\u6218\u65b9\u6cd5 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"1. \u4e3a\u4ec0\u4e48\u4f60\u7684\u670d\u52a1\u5668\u4e0b\u8f7dHugging Face\u6a21\u578b\u603b\u662f\u201c\u9f9f\u901f\u201d&#xff1f; \u5982\u679c\u4f60\u5728\u670d\u52a1\u5668\u4e0a\u6298\u817e\u8fc7AI\u6a21\u578b&#xff0c;\u6211\u731c\u4f60\u4e00\u5b9a\u9047\u5230\u8fc7\u8fd9\u4e2a\u573a\u666f&#xff1a;\u6ee1\u6000\u6fc0\u52a8\u5730\u6572\u4e0b\u4e00\u884c from transformers import AutoModelForCausalLM&#xff0c;\u7ed3\u679c\u7ec8\u7aef\u5361\u5728\u90a3\u91cc\u4e00\u52a8\u4e0d\u52a8&#xff0c;\u6216\u8005\u4e0b\u8f7d\u8fdb\u5ea6\u6761\u50cf\u8717\u725b\u4e00\u6837\u722c\u884c&#xff0c;\u6700\u540e\u8fd8\u7ed9\u4f60\u629b\u51fa\u4e00\u4e2a ConnectionError \u6216\u8005\u8d85\u65f6\u3002\u8fd9\u79cd\u611f\u89c9&#xff0c;\u5c31\u50cf\u53bb\u8d85\u5e02\u4e70\u6ce1","og_url":"https:\/\/www.wsisp.com\/helps\/79128.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2026-02-28T23:36:22+00:00","author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"5 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/79128.html","url":"https:\/\/www.wsisp.com\/helps\/79128.html","name":"\u9ad8\u6548\u89e3\u51b3\u670d\u52a1\u5668\u4e0b\u8f7dhuggingFace\u6a21\u578b\u6570\u636e\u96c6\u76843\u79cd\u5b9e\u6218\u65b9\u6cd5 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2026-02-28T23:36:22+00:00","dateModified":"2026-02-28T23:36:22+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/79128.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/79128.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/79128.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"\u9ad8\u6548\u89e3\u51b3\u670d\u52a1\u5668\u4e0b\u8f7dhuggingFace\u6a21\u578b\u6570\u636e\u96c6\u76843\u79cd\u5b9e\u6218\u65b9\u6cd5"}]},{"@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\/79128","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=79128"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/79128\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=79128"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=79128"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=79128"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=79128"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}