{"id":386,"date":"2025-02-12T19:28:00","date_gmt":"2025-02-12T11:28:00","guid":{"rendered":"https:\/\/daogu.work\/?p=386"},"modified":"2025-02-12T19:28:02","modified_gmt":"2025-02-12T11:28:02","slug":"huggingface-%e6%a8%a1%e5%9e%8bgit-clone%e4%b8%8b%e8%bd%bd%e9%81%bf%e5%9d%91%e6%8c%87%e5%8d%97","status":"publish","type":"post","link":"https:\/\/daogu.work\/?p=386","title":{"rendered":"HuggingFace \u6a21\u578bgit clone\u4e0b\u8f7d\u907f\u5751\u6307\u5357"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">\u5f15\u8a00<\/h2>\n\n\n\n<p>\u521a\u5f00\u59cb\u63a5\u4eceHuggingFace\u4e0b\u8f7d\u6a21\u578b\u65f6\uff0c\u53d1\u73b0\u76f4\u63a5\u7528<code>git clone<\/code>\u4f1a\u9047\u5230\u4e00\u4e2a\u5934\u75bc\u7684\u95ee\u9898\uff1a\u660e\u660e\u53ea\u60f3\u4e0b\u8f7d\u51e0\u4e2a\u5c0f\u914d\u7f6e\u6587\u4ef6\uff0c\u7ed3\u679c\u5374\u4e00\u76f4\u5361\u7740\u4e0d\u52a8\uff0c\u539f\u56e0\u5c31\u5728\u4e8e\u5b83\u5728\u4e0b\u8f7d\u6a21\u578b\u6587\u4ef6\uff0c\u4e14\u6ca1\u6709\u8fdb\u5ea6\u6761\uff0c\u4e0d\u77e5\u9053\u4f55\u65f6\u7ed3\u675f\u3002<\/p>\n\n\n\n<p><strong>\u6280\u672f\u80cc\u666f\u5c0f\u8d34\u58eb<\/strong>\uff1aHuggingFace \u4f7f\u7528 Git LFS\uff08Large File Storage\uff09\u7ba1\u7406\u5927\u6587\u4ef6\u3002\u8fd9\u4e2a\u7cfb\u7edf\u4f1a\u5728\u672c\u5730\u4ed3\u5e93\u4e2d\u4fdd\u7559 LFS \u6587\u4ef6\u6307\u9488\uff0c\u5b9e\u9645\u4e0b\u8f7d\u65f6\u518d\u8fdb\u884c\u66ff\u6362\u3002\u8fd9\u5c31\u5bfc\u81f4\u4e86\u53cc\u500d\u7a7a\u95f4\u5360\u7528\u2014\u2014\u6307\u9488\u5360\u4e00\u4efd\uff0c\u771f\u5b9e\u6587\u4ef6\u53c8\u5360\u4e00\u4efd\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u4e3a\u4ec0\u4e48\u9700\u8981\u8df3\u8fc7\u6a21\u578b\u6587\u4ef6\uff1f<\/h2>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>\u7a7a\u95f4\u6d6a\u8d39<\/strong>\uff1a\u7ed3\u5408\u4e0a\u9762\u7684\u5c0f\u8d34\u58eb\uff0c15G \u7684\u6a21\u578b\u6587\u4ef6\u4e0b\u8f7d\u65f6\u5b9e\u9645\u9700\u8981 30G \u5b58\u50a8\u7a7a\u95f4<\/li>\n\n\n\n<li><strong>\u7f51\u7edc\u8106\u5f31<\/strong>\uff1a\u6ca1\u6709\u8fdb\u5ea6\u6761\u548c\u65ad\u70b9\u7eed\u4f20\uff0c\u65ad\u7f51\u5c31\u8981\u91cd\u5934\u518d\u6765<\/li>\n\n\n\n<li><strong>\u7075\u6d3b\u7ba1\u7406<\/strong>\uff1a\u7528\u4e0b\u8f7d\u5de5\u5177\u5355\u72ec\u5904\u7406\u5927\u6587\u4ef6\u66f4\u53ef\u9760<\/li>\n<\/ol>\n\n\n\n<h2 class=\"wp-block-heading\">\u6838\u5fc3\u89e3\u51b3\u65b9\u6848\uff1aGIT_LFS_SKIP_SMUDGE<\/h2>\n\n\n\n<p>\u914d\u7f6e\u4e00\u4e2a\u73af\u5883\u53d8\u91cf\u6765\u8df3\u8fc7\u6a21\u578b\u6587\u4ef6\u7684\u4e0b\u8f7d\u3002\u4e00\u5f00\u59cb\u6211\u53ea\u662f\u8003\u8651\u4f7f\u7528git clone\u6765\u6307\u5b9a\u8df3\u8fc7\u6587\u4ef6\uff0c\u53d1\u73b0\u6ca1\u6709\u8fd9\u79cd\u65b9\u6cd5\u3002\u540e\u6765\u641c\u7d22\u5927\u6587\u4ef6\uff0c\u7ed9\u4e86\u8fd9\u6837\u4e00\u4e2a\u89e3\u51b3\u65b9\u6848\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u6c38\u4e45\u8bbe\u7f6e\u65b9\u6848\uff08\u9002\u5408\u957f\u671f\u5f00\u53d1\u8005\uff09<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code># Windows CMD\nsetx GIT_LFS_SKIP_SMUDGE 1\n# Windows PowerShell\n&#91;System.Environment]::SetEnvironmentVariable('GIT_LFS_SKIP_SMUDGE','1','User')<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">\u4e34\u65f6\u8bbe\u7f6e\u65b9\u6848\uff08\u63a8\u8350\u5355\u6b21\u4f7f\u7528\uff09<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code># CMD \u4e00\u6b21\u6027\u65b9\u6848\nset GIT_LFS_SKIP_SMUDGE=1 &amp;&amp; git clone --single-branch --branch 6_5 https:\/\/huggingface.co\/bartowski\/starcoder2-3b-exl2\n\n# PowerShell \u4e34\u65f6\u65b9\u6848\n$env:GIT_LFS_SKIP_SMUDGE=1; git clone --single-branch --branch 6_5 https:\/\/huggingface.co\/bartowski\/starcoder2-3b-exl2<\/code><\/pre>\n\n\n\n<p><strong>\u6ce8\u610f<\/strong>\uff1a\u8fd9\u91cc\u6709\u4e2a\u5e38\u89c1\u5751\u70b9\u2014\u2014PowerShell \u9700\u8981\u7528\u5206\u53f7\u5206\u9694\u547d\u4ee4\uff0c\u800c CMD \u7528\u53cc&amp;&amp;\u7b26\u53f7\u3002\u4e4b\u524d\u5c31\u56e0\u4e3a\u8fd9\u4e2a\u5dee\u5f02\uff0c\u6211\u7684\u811a\u672c\u5728\u51cc\u6668\u4e09\u70b9\u62a5\u9519\u4e86\u5341\u51e0\u6b21\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">git clone\u540e\u7684\u8865\u6551\u63aa\u65bd<\/h2>\n\n\n\n<p>git clone\u5b8c\u5c0f\u6587\u4ef6\u540e\uff0c\u6a21\u578b\u6587\u4ef6\u7684\u4f4d\u7f6e\u4f1a\u88ab\u540c\u540d\u6587\u672c\u6587\u4ef6\u5360\u7528\uff0c\u8fd9\u65f6\u5019\u53ef\u4ee5\uff1a<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>\u7528 IDM\/XDown \u7b49\u5de5\u5177\u4e0b\u8f7d\u5927\u6587\u4ef6<\/li>\n\n\n\n<li>\u628a\u4e0b\u8f7d\u597d\u7684\u6a21\u578b\u6587\u4ef6\u653e\u5230\u4ed3\u5e93\u7684\u5bf9\u5e94\u4f4d\u7f6e<\/li>\n<\/ol>\n\n\n\n<p>\u6bd4\u5982\u76ee\u6807\u6a21\u578b\u6587\u4ef6\u5730\u5740\u662f\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>wget https:\/\/huggingface.co\/bartowski\/starcoder2-3b-exl2\/resolve\/6_5\/output.safetensors<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">\u4e3a\u4ec0\u4e48\u63a8\u8350\u8fd9\u4e2a\u65b9\u6848\uff1f<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u7701\u7a7a\u95f4\uff1a\u4e4b\u524d\u90e8\u7f72 Stable Diffusion \u6a21\u578b\u65f6\uff0c\u4f7f\u7528git clone\u63d0\u793a\u78c1\u76d8\u7a7a\u95f4\u4e0d\u8db3\uff0c\u5bb3\u6211\u5220\u9664\u4e86\u597d\u591a\u6587\u4ef6\u3002\u540e\u6765\u4e0b\u8f7d\u5b8c\u6210\u540e\u53d1\u73b0\u6ca1\u6709\u5360\u7528\u90a3\u4e48\u5927\u7a7a\u95f4\u3002<\/li>\n\n\n\n<li>\u7701\u6d41\u91cf\uff1a\u65ad\u7f51\u4e4b\u540e\u4f60\u8981\u91cd\u65b0\u4e0b\u8f7d\uff0c\u56e0\u4e3a\u4e0d\u652f\u6301\u65ad\u70b9\u7eed\u4f20\uff0c\u6240\u4ee5\u4e4b\u524d\u4e0b\u8f7d\u7684\u4f5c\u8d39\u3002<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">\u8fdb\u4e00\u6b65\u9605\u8bfb<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/git-lfs.com\/\">Git LFS \u5b98\u65b9\u6587\u6863<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/huggingface.co\/docs\">HuggingFace \u6a21\u578b\u5e93\u6700\u4f73\u5b9e\u8df5<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/learn.microsoft.com\/zh-cn\/windows\/win32\/procthread\/environment-variables\">Windows \u73af\u5883\u53d8\u91cf\u7ba1\u7406\u6307\u5357<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>\u5f15\u8a00 \u521a\u5f00\u59cb\u63a5\u4eceHuggingFace\u4e0b\u8f7d\u6a21\u578b\u65f6\uff0c\u53d1\u73b0\u76f4\u63a5\u7528git clone\u4f1a\u9047\u5230\u4e00\u4e2a\u5934\u75bc\u7684\u95ee\u9898\uff1a\u660e\u660e\u53ea\u60f3\u4e0b [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[204],"tags":[211,210],"class_list":["post-386","post","type-post","status-publish","format-standard","hentry","category-llm","tag-git-clone","tag-huggingface"],"_links":{"self":[{"href":"https:\/\/daogu.work\/index.php?rest_route=\/wp\/v2\/posts\/386","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/daogu.work\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/daogu.work\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/daogu.work\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/daogu.work\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=386"}],"version-history":[{"count":1,"href":"https:\/\/daogu.work\/index.php?rest_route=\/wp\/v2\/posts\/386\/revisions"}],"predecessor-version":[{"id":387,"href":"https:\/\/daogu.work\/index.php?rest_route=\/wp\/v2\/posts\/386\/revisions\/387"}],"wp:attachment":[{"href":"https:\/\/daogu.work\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=386"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/daogu.work\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=386"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/daogu.work\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=386"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}