import{s as wa,o as ba,n as Ut}from"../chunks/scheduler.6062bdaf.js";import{S as _a,i as $a,g as o,s as l,r as h,A as ya,h as i,f as a,c as s,j as ga,u as f,x as r,k as ma,y as Ma,a as n,v as p,d as c,t as u,w as g}from"../chunks/index.4bca734e.js";import{T as Ct}from"../chunks/Tip.b9ac1f03.js";import{C as $}from"../chunks/CodeBlock.cbbddafc.js";import{H as b,E as va}from"../chunks/getInferenceSnippets.b564dd8b.js";function Ta(y){let d,w=`The returned filepath is a pointer to the HF local cache. Therefore, it is important to not modify the file to avoid
having a corrupted cache. If you are interested in getting to know more about how files are cached, please refer to our
<a href="./manage-cache">caching guide</a>.`;return{c(){d=o("p"),d.innerHTML=w},l(m){d=i(m,"P",{"data-svelte-h":!0}),r(d)!=="svelte-1jtqj65"&&(d.innerHTML=w)},m(m,_){n(m,d,_)},p:Ut,d(m){m&&a(d)}}}function ja(y){let d,w='Don’t worry about the <code>.cache/huggingface/</code> folder when committing changes to the Hub! This folder is automatically ignored by both <code>git</code> and <a href="/docs/huggingface_hub/main/en/package_reference/hf_api#huggingface_hub.HfApi.upload_folder">upload_folder()</a>.';return{c(){d=o("p"),d.innerHTML=w},l(m){d=i(m,"P",{"data-svelte-h":!0}),r(d)!=="svelte-1vi59oc"&&(d.innerHTML=w)},m(m,_){n(m,d,_)},p:Ut,d(m){m&&a(d)}}}function xa(y){let d,w=`<code>hf_transfer</code> is a power user tool!
It is tested and production-ready,
but it lacks user-friendly features like advanced error handling or proxies.
For more details, please take a look at this <a href="https://huggingface.co/docs/huggingface_hub/hf_transfer" rel="nofollow">section</a>.`;return{c(){d=o("p"),d.innerHTML=w},l(m){d=i(m,"P",{"data-svelte-h":!0}),r(d)!=="svelte-ac3n7l"&&(d.innerHTML=w)},m(m,_){n(m,d,_)},p:Ut,d(m){m&&a(d)}}}function Ha(y){let d,w,m,_,j,He,x,Zt=`The <code>huggingface_hub</code> library provides functions to download files from the repositories
stored on the Hub. You can use these functions independently or integrate them into your
own library, making it more convenient for your users to interact with the Hub. This
guide will show you how to:`,ke,H,Gt="<li>Download and cache a single file.</li> <li>Download and cache an entire repository.</li> <li>Download files to a local folder.</li>",Je,k,Le,J,It=`The <a href="/docs/huggingface_hub/main/en/package_reference/file_download#huggingface_hub.hf_hub_download">hf_hub_download()</a> function is the main function for downloading files from the Hub.
It downloads the remote file, caches it on disk (in a version-aware way), and returns its local file path.`,qe,M,Ce,L,Ue,q,Xt=`Select the file to download using the <code>repo_id</code>, <code>repo_type</code> and <code>filename</code> parameters. By default, the file will
be considered as being part of a <code>model</code> repo.`,Ze,C,Ge,U,Ie,Z,Yt=`By default, the latest version from the <code>main</code> branch is downloaded. However, in some cases you want to download a file
at a particular version (e.g. from a specific branch, a PR, a tag or a commit hash).
To do so, use the <code>revision</code> parameter:`,Xe,G,Ye,I,Rt="<strong>Note:</strong> When using the commit hash, it must be the full-length hash instead of a 7-character commit hash.",Re,X,Ne,Y,Nt=`In case you want to construct the URL used to download a file from a repo, you can use <a href="/docs/huggingface_hub/main/en/package_reference/file_download#huggingface_hub.hf_hub_url">hf_hub_url()</a> which returns a URL.
Note that it is used internally by <a href="/docs/huggingface_hub/main/en/package_reference/file_download#huggingface_hub.hf_hub_download">hf_hub_download()</a>.`,Be,R,Pe,N,Bt=`<a href="/docs/huggingface_hub/main/en/package_reference/file_download#huggingface_hub.snapshot_download">snapshot_download()</a> downloads an entire repository at a given revision. It uses internally <a href="/docs/huggingface_hub/main/en/package_reference/file_download#huggingface_hub.hf_hub_download">hf_hub_download()</a> which
means all downloaded files are also cached on your local disk. Downloads are made concurrently to speed-up the process.`,We,B,Pt="To download a whole repository, just pass the <code>repo_id</code> and <code>repo_type</code>:",Fe,P,ze,W,Wt=`<a href="/docs/huggingface_hub/main/en/package_reference/file_download#huggingface_hub.snapshot_download">snapshot_download()</a> downloads the latest revision by default. If you want a specific repository revision, use the
<code>revision</code> parameter:`,Qe,F,Se,z,De,Q,Ft=`<a href="/docs/huggingface_hub/main/en/package_reference/file_download#huggingface_hub.snapshot_download">snapshot_download()</a> provides an easy way to download a repository. However, you don’t always want to download the
entire content of a repository. For example, you might want to prevent downloading all <code>.bin</code> files if you know you’ll
only use the <code>.safetensors</code> weights. You can do that using <code>allow_patterns</code> and <code>ignore_patterns</code> parameters.`,Ve,S,zt=`These parameters accept either a single pattern or a list of patterns. Patterns are Standard Wildcards (globbing
patterns) as documented <a href="https://tldp.org/LDP/GNU-Linux-Tools-Summary/html/x11655.htm" rel="nofollow">here</a>. The pattern matching is
based on <a href="https://docs.python.org/3/library/fnmatch.html" rel="nofollow"><code>fnmatch</code></a>.`,Ae,D,Qt="For example, you can use <code>allow_patterns</code> to only download JSON configuration files:",Ee,V,Ke,A,St=`On the other hand, <code>ignore_patterns</code> can exclude certain files from being downloaded. The
following example ignores the <code>.msgpack</code> and <code>.h5</code> file extensions:`,Oe,E,et,K,Dt=`Finally, you can combine both to precisely filter your download. Here is an example to download all json and markdown
files except <code>vocab.json</code>.`,tt,O,at,ee,nt,te,Vt='By default, we recommend using the <a href="./manage-cache">cache system</a> to download files from the Hub. You can specify a custom cache location using the <code>cache_dir</code> parameter in <a href="/docs/huggingface_hub/main/en/package_reference/file_download#huggingface_hub.hf_hub_download">hf_hub_download()</a> and <a href="/docs/huggingface_hub/main/en/package_reference/file_download#huggingface_hub.snapshot_download">snapshot_download()</a>, or by setting the <a href="../package_reference/environment_variables#hf_home"><code>HF_HOME</code></a> environment variable.',lt,ae,At="However, if you need to download files to a specific folder, you can pass a <code>local_dir</code> parameter to the download function. This is useful to get a workflow closer to what the <code>git</code> command offers. The downloaded files will maintain their original file structure within the specified folder. For example, if <code>filename=&quot;data/train.csv&quot;</code> and <code>local_dir=&quot;path/to/folder&quot;</code>, the resulting filepath will be <code>&quot;path/to/folder/data/train.csv&quot;</code>.",st,ne,Et="A <code>.cache/huggingface/</code> folder is created at the root of your local directory containing metadata about the downloaded files. This prevents re-downloading files if they’re already up-to-date. If the metadata has changed, then the new file version is downloaded. This makes the <code>local_dir</code> optimized for pulling only the latest changes.",ot,le,Kt="After completing the download, you can safely remove the <code>.cache/huggingface/</code> folder if you no longer need it. However, be aware that re-running your script without this folder may result in longer recovery times, as metadata will be lost. Rest assured that your local data will remain intact and unaffected.",it,v,rt,se,dt,oe,Ot=`You can use the <code>hf download</code> command from the terminal to directly download files from the Hub.
Internally, it uses the same <a href="/docs/huggingface_hub/main/en/package_reference/file_download#huggingface_hub.hf_hub_download">hf_hub_download()</a> and <a href="/docs/huggingface_hub/main/en/package_reference/file_download#huggingface_hub.snapshot_download">snapshot_download()</a> helpers described above and prints the
returned path to the terminal.`,ht,ie,ft,re,ea=`You can download multiple files at once which displays a progress bar and returns the snapshot path in which the files
are located:`,pt,de,ct,he,ta='For more details about the CLI download command, please refer to the <a href="./cli#hf-download">CLI guide</a>.',ut,fe,gt,pe,aa="There are two options to speed up downloads. Both involve installing a Python package written in Rust.",mt,ce,na='<li><code>hf_xet</code> is newer and uses the Xet storage backend for upload/download. Xet storage is the <a href="https://huggingface.co/changelog/xet-default-for-new-users" rel="nofollow">default for all new Hub users and organizations</a>, and is in the process of being rolled out to all users. If you don’t have access, join the <a href="https://huggingface.co/join/xet" rel="nofollow">waitlist</a> to make Xet the default for all your repositories!</li> <li><code>hf_transfer</code> is a power-tool to download and upload to our LFS storage backend (note: this is less future-proof than Xet). It is thoroughly tested and has been in production for a long time, but it has some limitations.</li>',wt,ue,bt,ge,la=`Take advantage of faster downloads through <code>hf_xet</code>, the Python binding to the <a href="https://github.com/huggingface/xet-core" rel="nofollow"><code>xet-core</code></a> library that enables
chunk-based deduplication for faster downloads and uploads. <code>hf_xet</code> integrates seamlessly with <code>huggingface_hub</code>, but uses the Rust <code>xet-core</code> library and Xet storage instead of LFS.`,_t,me,sa='<code>hf_xet</code> uses the Xet storage system, which breaks files down into immutable chunks, storing collections of these chunks (called blocks or xorbs) remotely and retrieving them to reassemble the file when requested. When downloading, after confirming the user is authorized to access the files, <code>hf_xet</code> will query the Xet content-addressable service (CAS) with the LFS SHA256 hash for this file to receive the reconstruction metadata (ranges within xorbs) to assemble these files, along with presigned URLs to download the xorbs directly. Then <code>hf_xet</code> will efficiently download the xorb ranges necessary and will write out the files on disk. <code>hf_xet</code> uses a local disk cache to only download chunks once, learn more in the <a href="./manage-cache#chunk-based-caching-xet">Chunk-based caching(Xet)</a> section.',$t,we,oa="To enable it, simply install the latest version of <code>huggingface_hub</code>:",yt,be,Mt,_e,ia="As of <code>huggingface_hub</code> 0.32.0, this will also install <code>hf_xet</code>.",vt,$e,ra="Note: <code>hf_xet</code> will only be utilized when the files being downloaded are being stored with Xet Storage.",Tt,ye,da='All other <code>huggingface_hub</code> APIs will continue to work without any modification. To learn more about the benefits of Xet storage and <code>hf_xet</code>, refer to this <a href="https://huggingface.co/docs/hub/storage-backends" rel="nofollow">section</a>.',jt,Me,xt,ve,ha=`If you are running on a machine with high bandwidth,
you can increase your download speed with <a href="https://github.com/huggingface/hf_transfer" rel="nofollow"><code>hf_transfer</code></a>,
a Rust-based library developed to speed up file transfers with the Hub.
To enable it:`,Ht,Te,fa=`<li>Specify the <code>hf_transfer</code> extra when installing <code>huggingface_hub</code>
(e.g. <code>pip install huggingface_hub[hf_transfer]</code>).</li> <li>Set <code>HF_HUB_ENABLE_HF_TRANSFER=1</code> as an environment variable.</li>`,kt,T,Jt,je,Lt,xe,qt;return j=new b({props:{title:"Download files from the Hub",local:"download-files-from-the-hub",headingTag:"h1"}}),k=new b({props:{title:"Download a single file",local:"download-a-single-file",headingTag:"h2"}}),M=new Ct({props:{$$slots:{default:[Ta]},$$scope:{ctx:y}}}),L=new b({props:{title:"From latest version",local:"from-latest-version",headingTag:"h3"}}),C=new $({props:{code:"ZnJvbSUyMGh1Z2dpbmdmYWNlX2h1YiUyMGltcG9ydCUyMGhmX2h1Yl9kb3dubG9hZCUwQWhmX2h1Yl9kb3dubG9hZChyZXBvX2lkJTNEJTIybHlzYW5kcmUlMkZhcnhpdi1ubHAlMjIlMkMlMjBmaWxlbmFtZSUzRCUyMmNvbmZpZy5qc29uJTIyKSUwQSUwQWhmX2h1Yl9kb3dubG9hZChyZXBvX2lkJTNEJTIyZ29vZ2xlJTJGZmxldXJzJTIyJTJDJTIwZmlsZW5hbWUlM0QlMjJmbGV1cnMucHklMjIlMkMlMjByZXBvX3R5cGUlM0QlMjJkYXRhc2V0JTIyKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> huggingface_hub <span class="hljs-keyword">import</span> hf_hub_download
<span class="hljs-meta">&gt;&gt;&gt; </span>hf_hub_download(repo_id=<span class="hljs-string">&quot;lysandre/arxiv-nlp&quot;</span>, filename=<span class="hljs-string">&quot;config.json&quot;</span>)
<span class="hljs-string">&#x27;/root/.cache/huggingface/hub/models--lysandre--arxiv-nlp/snapshots/894a9adde21d9a3e3843e6d5aeaaf01875c7fade/config.json&#x27;</span>

<span class="hljs-comment"># Download from a dataset</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>hf_hub_download(repo_id=<span class="hljs-string">&quot;google/fleurs&quot;</span>, filename=<span class="hljs-string">&quot;fleurs.py&quot;</span>, repo_type=<span class="hljs-string">&quot;dataset&quot;</span>)
<span class="hljs-string">&#x27;/root/.cache/huggingface/hub/datasets--google--fleurs/snapshots/199e4ae37915137c555b1765c01477c216287d34/fleurs.py&#x27;</span>`,wrap:!1}}),U=new b({props:{title:"From specific version",local:"from-specific-version",headingTag:"h3"}}),G=new $({props:{code:"aGZfaHViX2Rvd25sb2FkKHJlcG9faWQlM0QlMjJseXNhbmRyZSUyRmFyeGl2LW5scCUyMiUyQyUyMGZpbGVuYW1lJTNEJTIyY29uZmlnLmpzb24lMjIlMkMlMjByZXZpc2lvbiUzRCUyMnYxLjAlMjIpJTBBJTBBaGZfaHViX2Rvd25sb2FkKHJlcG9faWQlM0QlMjJseXNhbmRyZSUyRmFyeGl2LW5scCUyMiUyQyUyMGZpbGVuYW1lJTNEJTIyY29uZmlnLmpzb24lMjIlMkMlMjByZXZpc2lvbiUzRCUyMnRlc3QtYnJhbmNoJTIyKSUwQSUwQWhmX2h1Yl9kb3dubG9hZChyZXBvX2lkJTNEJTIybHlzYW5kcmUlMkZhcnhpdi1ubHAlMjIlMkMlMjBmaWxlbmFtZSUzRCUyMmNvbmZpZy5qc29uJTIyJTJDJTIwcmV2aXNpb24lM0QlMjJyZWZzJTJGcHIlMkYzJTIyKSUwQSUwQWhmX2h1Yl9kb3dubG9hZChyZXBvX2lkJTNEJTIybHlzYW5kcmUlMkZhcnhpdi1ubHAlMjIlMkMlMjBmaWxlbmFtZSUzRCUyMmNvbmZpZy5qc29uJTIyJTJDJTIwcmV2aXNpb24lM0QlMjI4NzdiODRhOGY5M2YyZDYxOWZhYTJhNmU1MTRhMzJiZWVmODhhYjBhJTIyKQ==",highlighted:`<span class="hljs-comment"># Download from the \`v1.0\` tag</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>hf_hub_download(repo_id=<span class="hljs-string">&quot;lysandre/arxiv-nlp&quot;</span>, filename=<span class="hljs-string">&quot;config.json&quot;</span>, revision=<span class="hljs-string">&quot;v1.0&quot;</span>)

<span class="hljs-comment"># Download from the \`test-branch\` branch</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>hf_hub_download(repo_id=<span class="hljs-string">&quot;lysandre/arxiv-nlp&quot;</span>, filename=<span class="hljs-string">&quot;config.json&quot;</span>, revision=<span class="hljs-string">&quot;test-branch&quot;</span>)

<span class="hljs-comment"># Download from Pull Request #3</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>hf_hub_download(repo_id=<span class="hljs-string">&quot;lysandre/arxiv-nlp&quot;</span>, filename=<span class="hljs-string">&quot;config.json&quot;</span>, revision=<span class="hljs-string">&quot;refs/pr/3&quot;</span>)

<span class="hljs-comment"># Download from a specific commit hash</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>hf_hub_download(repo_id=<span class="hljs-string">&quot;lysandre/arxiv-nlp&quot;</span>, filename=<span class="hljs-string">&quot;config.json&quot;</span>, revision=<span class="hljs-string">&quot;877b84a8f93f2d619faa2a6e514a32beef88ab0a&quot;</span>)`,wrap:!1}}),X=new b({props:{title:"Construct a download URL",local:"construct-a-download-url",headingTag:"h3"}}),R=new b({props:{title:"Download an entire repository",local:"download-an-entire-repository",headingTag:"h2"}}),P=new $({props:{code:"ZnJvbSUyMGh1Z2dpbmdmYWNlX2h1YiUyMGltcG9ydCUyMHNuYXBzaG90X2Rvd25sb2FkJTBBc25hcHNob3RfZG93bmxvYWQocmVwb19pZCUzRCUyMmx5c2FuZHJlJTJGYXJ4aXYtbmxwJTIyKSUwQSUwQXNuYXBzaG90X2Rvd25sb2FkKHJlcG9faWQlM0QlMjJnb29nbGUlMkZmbGV1cnMlMjIlMkMlMjByZXBvX3R5cGUlM0QlMjJkYXRhc2V0JTIyKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> huggingface_hub <span class="hljs-keyword">import</span> snapshot_download
<span class="hljs-meta">&gt;&gt;&gt; </span>snapshot_download(repo_id=<span class="hljs-string">&quot;lysandre/arxiv-nlp&quot;</span>)
<span class="hljs-string">&#x27;/home/lysandre/.cache/huggingface/hub/models--lysandre--arxiv-nlp/snapshots/894a9adde21d9a3e3843e6d5aeaaf01875c7fade&#x27;</span>

<span class="hljs-comment"># Or from a dataset</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>snapshot_download(repo_id=<span class="hljs-string">&quot;google/fleurs&quot;</span>, repo_type=<span class="hljs-string">&quot;dataset&quot;</span>)
<span class="hljs-string">&#x27;/home/lysandre/.cache/huggingface/hub/datasets--google--fleurs/snapshots/199e4ae37915137c555b1765c01477c216287d34&#x27;</span>`,wrap:!1}}),F=new $({props:{code:"ZnJvbSUyMGh1Z2dpbmdmYWNlX2h1YiUyMGltcG9ydCUyMHNuYXBzaG90X2Rvd25sb2FkJTBBc25hcHNob3RfZG93bmxvYWQocmVwb19pZCUzRCUyMmx5c2FuZHJlJTJGYXJ4aXYtbmxwJTIyJTJDJTIwcmV2aXNpb24lM0QlMjJyZWZzJTJGcHIlMkYxJTIyKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> huggingface_hub <span class="hljs-keyword">import</span> snapshot_download
<span class="hljs-meta">&gt;&gt;&gt; </span>snapshot_download(repo_id=<span class="hljs-string">&quot;lysandre/arxiv-nlp&quot;</span>, revision=<span class="hljs-string">&quot;refs/pr/1&quot;</span>)`,wrap:!1}}),z=new b({props:{title:"Filter files to download",local:"filter-files-to-download",headingTag:"h3"}}),V=new $({props:{code:"ZnJvbSUyMGh1Z2dpbmdmYWNlX2h1YiUyMGltcG9ydCUyMHNuYXBzaG90X2Rvd25sb2FkJTBBc25hcHNob3RfZG93bmxvYWQocmVwb19pZCUzRCUyMmx5c2FuZHJlJTJGYXJ4aXYtbmxwJTIyJTJDJTIwYWxsb3dfcGF0dGVybnMlM0QlMjIqLmpzb24lMjIp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> huggingface_hub <span class="hljs-keyword">import</span> snapshot_download
<span class="hljs-meta">&gt;&gt;&gt; </span>snapshot_download(repo_id=<span class="hljs-string">&quot;lysandre/arxiv-nlp&quot;</span>, allow_patterns=<span class="hljs-string">&quot;*.json&quot;</span>)`,wrap:!1}}),E=new $({props:{code:"ZnJvbSUyMGh1Z2dpbmdmYWNlX2h1YiUyMGltcG9ydCUyMHNuYXBzaG90X2Rvd25sb2FkJTBBc25hcHNob3RfZG93bmxvYWQocmVwb19pZCUzRCUyMmx5c2FuZHJlJTJGYXJ4aXYtbmxwJTIyJTJDJTIwaWdub3JlX3BhdHRlcm5zJTNEJTVCJTIyKi5tc2dwYWNrJTIyJTJDJTIwJTIyKi5oNSUyMiU1RCk=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> huggingface_hub <span class="hljs-keyword">import</span> snapshot_download
<span class="hljs-meta">&gt;&gt;&gt; </span>snapshot_download(repo_id=<span class="hljs-string">&quot;lysandre/arxiv-nlp&quot;</span>, ignore_patterns=[<span class="hljs-string">&quot;*.msgpack&quot;</span>, <span class="hljs-string">&quot;*.h5&quot;</span>])`,wrap:!1}}),O=new $({props:{code:"ZnJvbSUyMGh1Z2dpbmdmYWNlX2h1YiUyMGltcG9ydCUyMHNuYXBzaG90X2Rvd25sb2FkJTBBc25hcHNob3RfZG93bmxvYWQocmVwb19pZCUzRCUyMmdwdDIlMjIlMkMlMjBhbGxvd19wYXR0ZXJucyUzRCU1QiUyMioubWQlMjIlMkMlMjAlMjIqLmpzb24lMjIlNUQlMkMlMjBpZ25vcmVfcGF0dGVybnMlM0QlMjJ2b2NhYi5qc29uJTIyKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> huggingface_hub <span class="hljs-keyword">import</span> snapshot_download
<span class="hljs-meta">&gt;&gt;&gt; </span>snapshot_download(repo_id=<span class="hljs-string">&quot;gpt2&quot;</span>, allow_patterns=[<span class="hljs-string">&quot;*.md&quot;</span>, <span class="hljs-string">&quot;*.json&quot;</span>], ignore_patterns=<span class="hljs-string">&quot;vocab.json&quot;</span>)`,wrap:!1}}),ee=new b({props:{title:"Download file(s) to a local folder",local:"download-files-to-a-local-folder",headingTag:"h2"}}),v=new Ct({props:{$$slots:{default:[ja]},$$scope:{ctx:y}}}),se=new b({props:{title:"Download from the CLI",local:"download-from-the-cli",headingTag:"h2"}}),ie=new $({props:{code:"aGYlMjBkb3dubG9hZCUyMGdwdDIlMjBjb25maWcuanNvbg==",highlighted:`&gt;&gt;&gt; hf download gpt2 config.json
/home/wauplin/.cache/huggingface/hub/models--gpt2/snapshots/11c5a3d5811f50298f278a704980280950aedb10/config.json`,wrap:!1}}),de=new $({props:{code:"aGYlMjBkb3dubG9hZCUyMGdwdDIlMjBjb25maWcuanNvbiUyMG1vZGVsLnNhZmV0ZW5zb3Jz",highlighted:`&gt;&gt;&gt; hf download gpt2 config.json model.safetensors
Fetching 2 files: 100%|████████████████████████████████████████████| 2/2 [00:00&lt;00:00, 23831.27it/s]
/home/wauplin/.cache/huggingface/hub/models--gpt2/snapshots/11c5a3d5811f50298f278a704980280950aedb10`,wrap:!1}}),fe=new b({props:{title:"Faster downloads",local:"faster-downloads",headingTag:"h2"}}),ue=new b({props:{title:"hf_xet",local:"hfxet",headingTag:"h3"}}),be=new $({props:{code:"cGlwJTIwaW5zdGFsbCUyMC1VJTIwJTIyaHVnZ2luZ2ZhY2VfaHViJTIy",highlighted:'pip install -U <span class="hljs-string">&quot;huggingface_hub&quot;</span>',wrap:!1}}),Me=new b({props:{title:"hf_transfer",local:"hftransfer",headingTag:"h3"}}),T=new Ct({props:{warning:!0,$$slots:{default:[xa]},$$scope:{ctx:y}}}),je=new va({props:{source:"https://github.com/huggingface/huggingface_hub/blob/main/docs/source/en/guides/download.md"}}),{c(){d=o("meta"),w=l(),m=o("p"),_=l(),h(j.$$.fragment),He=l(),x=o("p"),x.innerHTML=Zt,ke=l(),H=o("ul"),H.innerHTML=Gt,Je=l(),h(k.$$.fragment),Le=l(),J=o("p"),J.innerHTML=It,qe=l(),h(M.$$.fragment),Ce=l(),h(L.$$.fragment),Ue=l(),q=o("p"),q.innerHTML=Xt,Ze=l(),h(C.$$.fragment),Ge=l(),h(U.$$.fragment),Ie=l(),Z=o("p"),Z.innerHTML=Yt,Xe=l(),h(G.$$.fragment),Ye=l(),I=o("p"),I.innerHTML=Rt,Re=l(),h(X.$$.fragment),Ne=l(),Y=o("p"),Y.innerHTML=Nt,Be=l(),h(R.$$.fragment),Pe=l(),N=o("p"),N.innerHTML=Bt,We=l(),B=o("p"),B.innerHTML=Pt,Fe=l(),h(P.$$.fragment),ze=l(),W=o("p"),W.innerHTML=Wt,Qe=l(),h(F.$$.fragment),Se=l(),h(z.$$.fragment),De=l(),Q=o("p"),Q.innerHTML=Ft,Ve=l(),S=o("p"),S.innerHTML=zt,Ae=l(),D=o("p"),D.innerHTML=Qt,Ee=l(),h(V.$$.fragment),Ke=l(),A=o("p"),A.innerHTML=St,Oe=l(),h(E.$$.fragment),et=l(),K=o("p"),K.innerHTML=Dt,tt=l(),h(O.$$.fragment),at=l(),h(ee.$$.fragment),nt=l(),te=o("p"),te.innerHTML=Vt,lt=l(),ae=o("p"),ae.innerHTML=At,st=l(),ne=o("p"),ne.innerHTML=Et,ot=l(),le=o("p"),le.innerHTML=Kt,it=l(),h(v.$$.fragment),rt=l(),h(se.$$.fragment),dt=l(),oe=o("p"),oe.innerHTML=Ot,ht=l(),h(ie.$$.fragment),ft=l(),re=o("p"),re.textContent=ea,pt=l(),h(de.$$.fragment),ct=l(),he=o("p"),he.innerHTML=ta,ut=l(),h(fe.$$.fragment),gt=l(),pe=o("p"),pe.textContent=aa,mt=l(),ce=o("ul"),ce.innerHTML=na,wt=l(),h(ue.$$.fragment),bt=l(),ge=o("p"),ge.innerHTML=la,_t=l(),me=o("p"),me.innerHTML=sa,$t=l(),we=o("p"),we.innerHTML=oa,yt=l(),h(be.$$.fragment),Mt=l(),_e=o("p"),_e.innerHTML=ia,vt=l(),$e=o("p"),$e.innerHTML=ra,Tt=l(),ye=o("p"),ye.innerHTML=da,jt=l(),h(Me.$$.fragment),xt=l(),ve=o("p"),ve.innerHTML=ha,Ht=l(),Te=o("ol"),Te.innerHTML=fa,kt=l(),h(T.$$.fragment),Jt=l(),h(je.$$.fragment),Lt=l(),xe=o("p"),this.h()},l(e){const t=ya("svelte-u9bgzb",document.head);d=i(t,"META",{name:!0,content:!0}),t.forEach(a),w=s(e),m=i(e,"P",{}),ga(m).forEach(a),_=s(e),f(j.$$.fragment,e),He=s(e),x=i(e,"P",{"data-svelte-h":!0}),r(x)!=="svelte-10amgpw"&&(x.innerHTML=Zt),ke=s(e),H=i(e,"UL",{"data-svelte-h":!0}),r(H)!=="svelte-1jcodts"&&(H.innerHTML=Gt),Je=s(e),f(k.$$.fragment,e),Le=s(e),J=i(e,"P",{"data-svelte-h":!0}),r(J)!=="svelte-1h7nepg"&&(J.innerHTML=It),qe=s(e),f(M.$$.fragment,e),Ce=s(e),f(L.$$.fragment,e),Ue=s(e),q=i(e,"P",{"data-svelte-h":!0}),r(q)!=="svelte-18kdxej"&&(q.innerHTML=Xt),Ze=s(e),f(C.$$.fragment,e),Ge=s(e),f(U.$$.fragment,e),Ie=s(e),Z=i(e,"P",{"data-svelte-h":!0}),r(Z)!=="svelte-16duplw"&&(Z.innerHTML=Yt),Xe=s(e),f(G.$$.fragment,e),Ye=s(e),I=i(e,"P",{"data-svelte-h":!0}),r(I)!=="svelte-1inqh8h"&&(I.innerHTML=Rt),Re=s(e),f(X.$$.fragment,e),Ne=s(e),Y=i(e,"P",{"data-svelte-h":!0}),r(Y)!=="svelte-1g8f65c"&&(Y.innerHTML=Nt),Be=s(e),f(R.$$.fragment,e),Pe=s(e),N=i(e,"P",{"data-svelte-h":!0}),r(N)!=="svelte-1xrc0oj"&&(N.innerHTML=Bt),We=s(e),B=i(e,"P",{"data-svelte-h":!0}),r(B)!=="svelte-18b676r"&&(B.innerHTML=Pt),Fe=s(e),f(P.$$.fragment,e),ze=s(e),W=i(e,"P",{"data-svelte-h":!0}),r(W)!=="svelte-1omhhlo"&&(W.innerHTML=Wt),Qe=s(e),f(F.$$.fragment,e),Se=s(e),f(z.$$.fragment,e),De=s(e),Q=i(e,"P",{"data-svelte-h":!0}),r(Q)!=="svelte-1ddox2e"&&(Q.innerHTML=Ft),Ve=s(e),S=i(e,"P",{"data-svelte-h":!0}),r(S)!=="svelte-u3vbhu"&&(S.innerHTML=zt),Ae=s(e),D=i(e,"P",{"data-svelte-h":!0}),r(D)!=="svelte-1dn885x"&&(D.innerHTML=Qt),Ee=s(e),f(V.$$.fragment,e),Ke=s(e),A=i(e,"P",{"data-svelte-h":!0}),r(A)!=="svelte-uzetax"&&(A.innerHTML=St),Oe=s(e),f(E.$$.fragment,e),et=s(e),K=i(e,"P",{"data-svelte-h":!0}),r(K)!=="svelte-ndvph"&&(K.innerHTML=Dt),tt=s(e),f(O.$$.fragment,e),at=s(e),f(ee.$$.fragment,e),nt=s(e),te=i(e,"P",{"data-svelte-h":!0}),r(te)!=="svelte-1mbgx4u"&&(te.innerHTML=Vt),lt=s(e),ae=i(e,"P",{"data-svelte-h":!0}),r(ae)!=="svelte-7dqi55"&&(ae.innerHTML=At),st=s(e),ne=i(e,"P",{"data-svelte-h":!0}),r(ne)!=="svelte-xmbqlw"&&(ne.innerHTML=Et),ot=s(e),le=i(e,"P",{"data-svelte-h":!0}),r(le)!=="svelte-9mgyuw"&&(le.innerHTML=Kt),it=s(e),f(v.$$.fragment,e),rt=s(e),f(se.$$.fragment,e),dt=s(e),oe=i(e,"P",{"data-svelte-h":!0}),r(oe)!=="svelte-15e6l7c"&&(oe.innerHTML=Ot),ht=s(e),f(ie.$$.fragment,e),ft=s(e),re=i(e,"P",{"data-svelte-h":!0}),r(re)!=="svelte-c19wqr"&&(re.textContent=ea),pt=s(e),f(de.$$.fragment,e),ct=s(e),he=i(e,"P",{"data-svelte-h":!0}),r(he)!=="svelte-okh1lr"&&(he.innerHTML=ta),ut=s(e),f(fe.$$.fragment,e),gt=s(e),pe=i(e,"P",{"data-svelte-h":!0}),r(pe)!=="svelte-k4ctg0"&&(pe.textContent=aa),mt=s(e),ce=i(e,"UL",{"data-svelte-h":!0}),r(ce)!=="svelte-1rt3hxv"&&(ce.innerHTML=na),wt=s(e),f(ue.$$.fragment,e),bt=s(e),ge=i(e,"P",{"data-svelte-h":!0}),r(ge)!=="svelte-dgqlzs"&&(ge.innerHTML=la),_t=s(e),me=i(e,"P",{"data-svelte-h":!0}),r(me)!=="svelte-16zgl6t"&&(me.innerHTML=sa),$t=s(e),we=i(e,"P",{"data-svelte-h":!0}),r(we)!=="svelte-1ocnvge"&&(we.innerHTML=oa),yt=s(e),f(be.$$.fragment,e),Mt=s(e),_e=i(e,"P",{"data-svelte-h":!0}),r(_e)!=="svelte-9vjh74"&&(_e.innerHTML=ia),vt=s(e),$e=i(e,"P",{"data-svelte-h":!0}),r($e)!=="svelte-5lcqv2"&&($e.innerHTML=ra),Tt=s(e),ye=i(e,"P",{"data-svelte-h":!0}),r(ye)!=="svelte-n2tblp"&&(ye.innerHTML=da),jt=s(e),f(Me.$$.fragment,e),xt=s(e),ve=i(e,"P",{"data-svelte-h":!0}),r(ve)!=="svelte-7tg4bb"&&(ve.innerHTML=ha),Ht=s(e),Te=i(e,"OL",{"data-svelte-h":!0}),r(Te)!=="svelte-qiartd"&&(Te.innerHTML=fa),kt=s(e),f(T.$$.fragment,e),Jt=s(e),f(je.$$.fragment,e),Lt=s(e),xe=i(e,"P",{}),ga(xe).forEach(a),this.h()},h(){ma(d,"name","hf:doc:metadata"),ma(d,"content",ka)},m(e,t){Ma(document.head,d),n(e,w,t),n(e,m,t),n(e,_,t),p(j,e,t),n(e,He,t),n(e,x,t),n(e,ke,t),n(e,H,t),n(e,Je,t),p(k,e,t),n(e,Le,t),n(e,J,t),n(e,qe,t),p(M,e,t),n(e,Ce,t),p(L,e,t),n(e,Ue,t),n(e,q,t),n(e,Ze,t),p(C,e,t),n(e,Ge,t),p(U,e,t),n(e,Ie,t),n(e,Z,t),n(e,Xe,t),p(G,e,t),n(e,Ye,t),n(e,I,t),n(e,Re,t),p(X,e,t),n(e,Ne,t),n(e,Y,t),n(e,Be,t),p(R,e,t),n(e,Pe,t),n(e,N,t),n(e,We,t),n(e,B,t),n(e,Fe,t),p(P,e,t),n(e,ze,t),n(e,W,t),n(e,Qe,t),p(F,e,t),n(e,Se,t),p(z,e,t),n(e,De,t),n(e,Q,t),n(e,Ve,t),n(e,S,t),n(e,Ae,t),n(e,D,t),n(e,Ee,t),p(V,e,t),n(e,Ke,t),n(e,A,t),n(e,Oe,t),p(E,e,t),n(e,et,t),n(e,K,t),n(e,tt,t),p(O,e,t),n(e,at,t),p(ee,e,t),n(e,nt,t),n(e,te,t),n(e,lt,t),n(e,ae,t),n(e,st,t),n(e,ne,t),n(e,ot,t),n(e,le,t),n(e,it,t),p(v,e,t),n(e,rt,t),p(se,e,t),n(e,dt,t),n(e,oe,t),n(e,ht,t),p(ie,e,t),n(e,ft,t),n(e,re,t),n(e,pt,t),p(de,e,t),n(e,ct,t),n(e,he,t),n(e,ut,t),p(fe,e,t),n(e,gt,t),n(e,pe,t),n(e,mt,t),n(e,ce,t),n(e,wt,t),p(ue,e,t),n(e,bt,t),n(e,ge,t),n(e,_t,t),n(e,me,t),n(e,$t,t),n(e,we,t),n(e,yt,t),p(be,e,t),n(e,Mt,t),n(e,_e,t),n(e,vt,t),n(e,$e,t),n(e,Tt,t),n(e,ye,t),n(e,jt,t),p(Me,e,t),n(e,xt,t),n(e,ve,t),n(e,Ht,t),n(e,Te,t),n(e,kt,t),p(T,e,t),n(e,Jt,t),p(je,e,t),n(e,Lt,t),n(e,xe,t),qt=!0},p(e,[t]){const pa={};t&2&&(pa.$$scope={dirty:t,ctx:e}),M.$set(pa);const ca={};t&2&&(ca.$$scope={dirty:t,ctx:e}),v.$set(ca);const ua={};t&2&&(ua.$$scope={dirty:t,ctx:e}),T.$set(ua)},i(e){qt||(c(j.$$.fragment,e),c(k.$$.fragment,e),c(M.$$.fragment,e),c(L.$$.fragment,e),c(C.$$.fragment,e),c(U.$$.fragment,e),c(G.$$.fragment,e),c(X.$$.fragment,e),c(R.$$.fragment,e),c(P.$$.fragment,e),c(F.$$.fragment,e),c(z.$$.fragment,e),c(V.$$.fragment,e),c(E.$$.fragment,e),c(O.$$.fragment,e),c(ee.$$.fragment,e),c(v.$$.fragment,e),c(se.$$.fragment,e),c(ie.$$.fragment,e),c(de.$$.fragment,e),c(fe.$$.fragment,e),c(ue.$$.fragment,e),c(be.$$.fragment,e),c(Me.$$.fragment,e),c(T.$$.fragment,e),c(je.$$.fragment,e),qt=!0)},o(e){u(j.$$.fragment,e),u(k.$$.fragment,e),u(M.$$.fragment,e),u(L.$$.fragment,e),u(C.$$.fragment,e),u(U.$$.fragment,e),u(G.$$.fragment,e),u(X.$$.fragment,e),u(R.$$.fragment,e),u(P.$$.fragment,e),u(F.$$.fragment,e),u(z.$$.fragment,e),u(V.$$.fragment,e),u(E.$$.fragment,e),u(O.$$.fragment,e),u(ee.$$.fragment,e),u(v.$$.fragment,e),u(se.$$.fragment,e),u(ie.$$.fragment,e),u(de.$$.fragment,e),u(fe.$$.fragment,e),u(ue.$$.fragment,e),u(be.$$.fragment,e),u(Me.$$.fragment,e),u(T.$$.fragment,e),u(je.$$.fragment,e),qt=!1},d(e){e&&(a(w),a(m),a(_),a(He),a(x),a(ke),a(H),a(Je),a(Le),a(J),a(qe),a(Ce),a(Ue),a(q),a(Ze),a(Ge),a(Ie),a(Z),a(Xe),a(Ye),a(I),a(Re),a(Ne),a(Y),a(Be),a(Pe),a(N),a(We),a(B),a(Fe),a(ze),a(W),a(Qe),a(Se),a(De),a(Q),a(Ve),a(S),a(Ae),a(D),a(Ee),a(Ke),a(A),a(Oe),a(et),a(K),a(tt),a(at),a(nt),a(te),a(lt),a(ae),a(st),a(ne),a(ot),a(le),a(it),a(rt),a(dt),a(oe),a(ht),a(ft),a(re),a(pt),a(ct),a(he),a(ut),a(gt),a(pe),a(mt),a(ce),a(wt),a(bt),a(ge),a(_t),a(me),a($t),a(we),a(yt),a(Mt),a(_e),a(vt),a($e),a(Tt),a(ye),a(jt),a(xt),a(ve),a(Ht),a(Te),a(kt),a(Jt),a(Lt),a(xe)),a(d),g(j,e),g(k,e),g(M,e),g(L,e),g(C,e),g(U,e),g(G,e),g(X,e),g(R,e),g(P,e),g(F,e),g(z,e),g(V,e),g(E,e),g(O,e),g(ee,e),g(v,e),g(se,e),g(ie,e),g(de,e),g(fe,e),g(ue,e),g(be,e),g(Me,e),g(T,e),g(je,e)}}}const ka='{"title":"Download files from the Hub","local":"download-files-from-the-hub","sections":[{"title":"Download a single file","local":"download-a-single-file","sections":[{"title":"From latest version","local":"from-latest-version","sections":[],"depth":3},{"title":"From specific version","local":"from-specific-version","sections":[],"depth":3},{"title":"Construct a download URL","local":"construct-a-download-url","sections":[],"depth":3}],"depth":2},{"title":"Download an entire repository","local":"download-an-entire-repository","sections":[{"title":"Filter files to download","local":"filter-files-to-download","sections":[],"depth":3}],"depth":2},{"title":"Download file(s) to a local folder","local":"download-files-to-a-local-folder","sections":[],"depth":2},{"title":"Download from the CLI","local":"download-from-the-cli","sections":[],"depth":2},{"title":"Faster downloads","local":"faster-downloads","sections":[{"title":"hf_xet","local":"hfxet","sections":[],"depth":3},{"title":"hf_transfer","local":"hftransfer","sections":[],"depth":3}],"depth":2}],"depth":1}';function Ja(y){return ba(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Ga extends _a{constructor(d){super(),$a(this,d,Ja,Ha,wa,{})}}export{Ga as component};
