import{s as zt,o as Ft,n as ct}from"../chunks/scheduler.6062bdaf.js";import{S as Wt,i as Qt,g as i,s as n,r as c,A as Pt,h as d,f as a,c as s,j as Bt,u as p,x as r,k as Nt,y as Dt,a as l,v as f,d as u,t as m,w as g}from"../chunks/index.4bca734e.js";import{H as _,g as St}from"../chunks/Heading.949e2f88.js";import{T as ht}from"../chunks/Tip.b9ac1f03.js";import{C as y}from"../chunks/CodeBlock.fa01571c.js";function Vt($){let o,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(){o=i("p"),o.innerHTML=w},l(h){o=d(h,"P",{"data-svelte-h":!0}),r(o)!=="svelte-1jtqj65"&&(o.innerHTML=w)},m(h,b){l(h,o,b)},p:ct,d(h){h&&a(o)}}}function Et($){let o,w="Progress bars are supported in <code>hf_transfer</code> starting from version <code>0.1.4</code>. Consider upgrading (<code>pip install -U hf-transfer</code>) if you plan to enable faster downloads.";return{c(){o=i("p"),o.innerHTML=w},l(h){o=d(h,"P",{"data-svelte-h":!0}),r(o)!=="svelte-81fibs"&&(o.innerHTML=w)},m(h,b){l(h,o,b)},p:ct,d(h){h&&a(o)}}}function Kt($){let o,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(){o=i("p"),o.innerHTML=w},l(h){o=d(h,"P",{"data-svelte-h":!0}),r(o)!=="svelte-13ykduv"&&(o.innerHTML=w)},m(h,b){l(h,o,b)},p:ct,d(h){h&&a(o)}}}function At($){let o,w,h,b,j,ge,k,pt=`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:`,we,J,ft="<li>Download and cache a single file.</li> <li>Download and cache an entire repository.</li> <li>Download files to a local folder.</li>",be,H,_e,x,ut=`The <a href="/docs/huggingface_hub/v0.19.2/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.`,ye,v,$e,q,ve,Z,mt=`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.`,Me,U,Te,L,je,C,gt=`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:`,ke,Y,Je,I,wt="<strong>Note:</strong> When using the commit hash, it must be the full-length hash instead of a 7-character commit hash.",He,G,xe,X,bt=`In case you want to construct the URL used to download a file from a repo, you can use <a href="/docs/huggingface_hub/v0.19.2/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/v0.19.2/en/package_reference/file_download#huggingface_hub.hf_hub_download">hf_hub_download()</a>.`,qe,R,Ze,B,_t=`<a href="/docs/huggingface_hub/v0.19.2/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/v0.19.2/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.`,Ue,N,yt="To download a whole repository, just pass the <code>repo_id</code> and <code>repo_type</code>:",Le,z,Ce,F,$t=`<a href="/docs/huggingface_hub/v0.19.2/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:`,Ye,W,Ie,Q,Ge,P,vt=`<a href="/docs/huggingface_hub/v0.19.2/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.`,Xe,D,Mt=`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>.`,Re,S,Tt="For example, you can use <code>allow_patterns</code> to only download JSON configuration files:",Be,V,Ne,E,jt=`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:`,ze,K,Fe,A,kt=`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>.`,We,O,Qe,ee,Pe,te,Jt=`The recommended (and default) way to download files from the Hub is to use the <a href="./manage-cache">cache-system</a>.
You can define your cache location by setting <code>cache_dir</code> parameter (both in <a href="/docs/huggingface_hub/v0.19.2/en/package_reference/file_download#huggingface_hub.hf_hub_download">hf_hub_download()</a> and <a href="/docs/huggingface_hub/v0.19.2/en/package_reference/file_download#huggingface_hub.snapshot_download">snapshot_download()</a>).`,De,ae,Ht=`However, in some cases you want to download files and move them to a specific folder. This is useful to get a workflow
closer to what <code>git</code> commands offer. You can do that using the <code>local_dir</code> and <code>local_dir_use_symlinks</code> parameters:`,Se,le,xt=`<li><code>local_dir</code> must be a path to a folder on your system. The downloaded files will keep the same file structure as in the
repo. For example if <code>filename=&quot;data/train.csv&quot;</code> and <code>local_dir=&quot;path/to/folder&quot;</code>, then the returned filepath will be
<code>&quot;path/to/folder/data/train.csv&quot;</code>.</li> <li><code>local_dir_use_symlinks</code> defines how the file must be saved in your local folder.<ul><li>The default behavior (<code>&quot;auto&quot;</code>) is to duplicate small files (&lt;5MB) and use symlinks for bigger files. Symlinks allow
to optimize both bandwidth and disk usage. However manually editing a symlinked file might corrupt the cache, hence
the duplication for small files. The 5MB threshold can be configured with the <code>HF_HUB_LOCAL_DIR_AUTO_SYMLINK_THRESHOLD</code>
environment variable.</li> <li>If <code>local_dir_use_symlinks=True</code> is set, all files are symlinked for an optimal disk space optimization. This is
for example useful when downloading a huge dataset with thousands of small files.</li> <li>Finally, if you don’t want symlinks at all you can disable them (<code>local_dir_use_symlinks=False</code>). The cache directory
will still be used to check wether the file is already cached or not. If already cached, the file is <strong>duplicated</strong>
from the cache (i.e. saves bandwidth but increases disk usage). If the file is not already cached, it will be
downloaded and moved directly to the local dir. This means that if you need to reuse it somewhere else later, it
will be <strong>re-downloaded</strong>.</li></ul></li>`,Ve,ne,qt="Here is a table that summarizes the different options to help you choose the parameters that best suit your use case.",Ee,se,Zt='<thead><tr><th>Parameters</th> <th align="center">File already cached</th> <th align="center">Returned path</th> <th align="center">Can read path?</th> <th align="center">Can save to path?</th> <th align="center">Optimized bandwidth</th> <th align="center">Optimized disk usage</th></tr></thead> <tbody><tr><td><code>local_dir=None</code></td> <td align="center"></td> <td align="center">symlink in cache</td> <td align="center">✅</td> <td align="center">❌<br/><em>(save would corrupt the cache)</em></td> <td align="center">✅</td> <td align="center">✅</td></tr> <tr><td><code>local_dir=&quot;path/to/folder&quot;</code><br/><code>local_dir_use_symlinks=&quot;auto&quot;</code></td> <td align="center"></td> <td align="center">file or symlink in folder</td> <td align="center">✅</td> <td align="center">✅ <em>(for small files)</em> <br/> ⚠️ <em>(for big files do not resolve path before saving)</em></td> <td align="center">✅</td> <td align="center">✅</td></tr> <tr><td><code>local_dir=&quot;path/to/folder&quot;</code><br/><code>local_dir_use_symlinks=True</code></td> <td align="center"></td> <td align="center">symlink in folder</td> <td align="center">✅</td> <td align="center">⚠️<br/><em>(do not resolve path before saving)</em></td> <td align="center">✅</td> <td align="center">✅</td></tr> <tr><td><code>local_dir=&quot;path/to/folder&quot;</code><br/><code>local_dir_use_symlinks=False</code></td> <td align="center">No</td> <td align="center">file in folder</td> <td align="center">✅</td> <td align="center">✅</td> <td align="center">❌<br/><em>(if re-run, file is re-downloaded)</em></td> <td align="center">⚠️<br/>(multiple copies if ran in multiple folders)</td></tr> <tr><td><code>local_dir=&quot;path/to/folder&quot;</code><br/><code>local_dir_use_symlinks=False</code></td> <td align="center">Yes</td> <td align="center">file in folder</td> <td align="center">✅</td> <td align="center">✅</td> <td align="center">⚠️<br/><em>(file has to be cached first)</em></td> <td align="center">❌<br/><em>(file is duplicated)</em></td></tr></tbody>',Ke,oe,Ut=`<strong>Note:</strong> if you are on a Windows machine, you need to enable developer mode or run <code>huggingface_hub</code> as admin to enable
symlinks. Check out the <a href="../guides/manage-cache#limitations">cache limitations</a> section for more details.`,Ae,ie,Oe,de,Lt=`You can use the <code>huggingface-cli download</code> command from the terminal to directly download files from the Hub.
Internally, it uses the same <a href="/docs/huggingface_hub/v0.19.2/en/package_reference/file_download#huggingface_hub.hf_hub_download">hf_hub_download()</a> and <a href="/docs/huggingface_hub/v0.19.2/en/package_reference/file_download#huggingface_hub.snapshot_download">snapshot_download()</a> helpers described above and prints the
returned path to the terminal.`,et,re,tt,he,Ct=`You can download multiple files at once which displays a progress bar and returns the snapshot path in which the files
are located:`,at,ce,lt,pe,Yt='For more details about the CLI download command, please refer to the <a href="./cli#huggingface-cli-download">CLI guide</a>.',nt,fe,st,ue,It='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, install the package (<code>pip install hf_transfer</code>) and set <code>HF_HUB_ENABLE_HF_TRANSFER=1</code> as an environment variable.',ot,M,it,T,dt,me,rt;return j=new _({props:{title:"Download files from the Hub",local:"download-files-from-the-hub",headingTag:"h1"}}),H=new _({props:{title:"Download a single file",local:"download-a-single-file",headingTag:"h2"}}),v=new ht({props:{$$slots:{default:[Vt]},$$scope:{ctx:$}}}),q=new _({props:{title:"From latest version",local:"from-latest-version",headingTag:"h3"}}),U=new y({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}}),L=new _({props:{title:"From specific version",local:"from-specific-version",headingTag:"h3"}}),Y=new y({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}}),G=new _({props:{title:"Construct a download URL",local:"construct-a-download-url",headingTag:"h3"}}),R=new _({props:{title:"Download an entire repository",local:"download-an-entire-repository",headingTag:"h2"}}),z=new y({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}}),W=new y({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}}),Q=new _({props:{title:"Filter files to download",local:"filter-files-to-download",headingTag:"h3"}}),V=new y({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}}),K=new y({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 y({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 _({props:{title:"Download file(s) to local folder",local:"download-files-to-local-folder",headingTag:"h2"}}),ie=new _({props:{title:"Download from the CLI",local:"download-from-the-cli",headingTag:"h2"}}),re=new y({props:{code:"aHVnZ2luZ2ZhY2UtY2xpJTIwZG93bmxvYWQlMjBncHQyJTIwY29uZmlnLmpzb24=",highlighted:`&gt;&gt;&gt; huggingface-cli download gpt2 config.json
/home/wauplin/.cache/huggingface/hub/models--gpt2/snapshots/11c5a3d5811f50298f278a704980280950aedb10/config.json`,wrap:!1}}),ce=new y({props:{code:"aHVnZ2luZ2ZhY2UtY2xpJTIwZG93bmxvYWQlMjBncHQyJTIwY29uZmlnLmpzb24lMjBtb2RlbC5zYWZldGVuc29ycw==",highlighted:`&gt;&gt;&gt; huggingface-cli 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 _({props:{title:"Faster downloads",local:"faster-downloads",headingTag:"h2"}}),M=new ht({props:{$$slots:{default:[Et]},$$scope:{ctx:$}}}),T=new ht({props:{warning:!0,$$slots:{default:[Kt]},$$scope:{ctx:$}}}),{c(){o=i("meta"),w=n(),h=i("p"),b=n(),c(j.$$.fragment),ge=n(),k=i("p"),k.innerHTML=pt,we=n(),J=i("ul"),J.innerHTML=ft,be=n(),c(H.$$.fragment),_e=n(),x=i("p"),x.innerHTML=ut,ye=n(),c(v.$$.fragment),$e=n(),c(q.$$.fragment),ve=n(),Z=i("p"),Z.innerHTML=mt,Me=n(),c(U.$$.fragment),Te=n(),c(L.$$.fragment),je=n(),C=i("p"),C.innerHTML=gt,ke=n(),c(Y.$$.fragment),Je=n(),I=i("p"),I.innerHTML=wt,He=n(),c(G.$$.fragment),xe=n(),X=i("p"),X.innerHTML=bt,qe=n(),c(R.$$.fragment),Ze=n(),B=i("p"),B.innerHTML=_t,Ue=n(),N=i("p"),N.innerHTML=yt,Le=n(),c(z.$$.fragment),Ce=n(),F=i("p"),F.innerHTML=$t,Ye=n(),c(W.$$.fragment),Ie=n(),c(Q.$$.fragment),Ge=n(),P=i("p"),P.innerHTML=vt,Xe=n(),D=i("p"),D.innerHTML=Mt,Re=n(),S=i("p"),S.innerHTML=Tt,Be=n(),c(V.$$.fragment),Ne=n(),E=i("p"),E.innerHTML=jt,ze=n(),c(K.$$.fragment),Fe=n(),A=i("p"),A.innerHTML=kt,We=n(),c(O.$$.fragment),Qe=n(),c(ee.$$.fragment),Pe=n(),te=i("p"),te.innerHTML=Jt,De=n(),ae=i("p"),ae.innerHTML=Ht,Se=n(),le=i("ul"),le.innerHTML=xt,Ve=n(),ne=i("p"),ne.textContent=qt,Ee=n(),se=i("table"),se.innerHTML=Zt,Ke=n(),oe=i("p"),oe.innerHTML=Ut,Ae=n(),c(ie.$$.fragment),Oe=n(),de=i("p"),de.innerHTML=Lt,et=n(),c(re.$$.fragment),tt=n(),he=i("p"),he.textContent=Ct,at=n(),c(ce.$$.fragment),lt=n(),pe=i("p"),pe.innerHTML=Yt,nt=n(),c(fe.$$.fragment),st=n(),ue=i("p"),ue.innerHTML=It,ot=n(),c(M.$$.fragment),it=n(),c(T.$$.fragment),dt=n(),me=i("p"),this.h()},l(e){const t=Pt("svelte-u9bgzb",document.head);o=d(t,"META",{name:!0,content:!0}),t.forEach(a),w=s(e),h=d(e,"P",{}),Bt(h).forEach(a),b=s(e),p(j.$$.fragment,e),ge=s(e),k=d(e,"P",{"data-svelte-h":!0}),r(k)!=="svelte-10amgpw"&&(k.innerHTML=pt),we=s(e),J=d(e,"UL",{"data-svelte-h":!0}),r(J)!=="svelte-39f2bi"&&(J.innerHTML=ft),be=s(e),p(H.$$.fragment,e),_e=s(e),x=d(e,"P",{"data-svelte-h":!0}),r(x)!=="svelte-cc71sx"&&(x.innerHTML=ut),ye=s(e),p(v.$$.fragment,e),$e=s(e),p(q.$$.fragment,e),ve=s(e),Z=d(e,"P",{"data-svelte-h":!0}),r(Z)!=="svelte-18kdxej"&&(Z.innerHTML=mt),Me=s(e),p(U.$$.fragment,e),Te=s(e),p(L.$$.fragment,e),je=s(e),C=d(e,"P",{"data-svelte-h":!0}),r(C)!=="svelte-16duplw"&&(C.innerHTML=gt),ke=s(e),p(Y.$$.fragment,e),Je=s(e),I=d(e,"P",{"data-svelte-h":!0}),r(I)!=="svelte-1inqh8h"&&(I.innerHTML=wt),He=s(e),p(G.$$.fragment,e),xe=s(e),X=d(e,"P",{"data-svelte-h":!0}),r(X)!=="svelte-woexf6"&&(X.innerHTML=bt),qe=s(e),p(R.$$.fragment,e),Ze=s(e),B=d(e,"P",{"data-svelte-h":!0}),r(B)!=="svelte-1auowvz"&&(B.innerHTML=_t),Ue=s(e),N=d(e,"P",{"data-svelte-h":!0}),r(N)!=="svelte-18b676r"&&(N.innerHTML=yt),Le=s(e),p(z.$$.fragment,e),Ce=s(e),F=d(e,"P",{"data-svelte-h":!0}),r(F)!=="svelte-1kxnadf"&&(F.innerHTML=$t),Ye=s(e),p(W.$$.fragment,e),Ie=s(e),p(Q.$$.fragment,e),Ge=s(e),P=d(e,"P",{"data-svelte-h":!0}),r(P)!=="svelte-1y7j5lp"&&(P.innerHTML=vt),Xe=s(e),D=d(e,"P",{"data-svelte-h":!0}),r(D)!=="svelte-u3vbhu"&&(D.innerHTML=Mt),Re=s(e),S=d(e,"P",{"data-svelte-h":!0}),r(S)!=="svelte-1dn885x"&&(S.innerHTML=Tt),Be=s(e),p(V.$$.fragment,e),Ne=s(e),E=d(e,"P",{"data-svelte-h":!0}),r(E)!=="svelte-uzetax"&&(E.innerHTML=jt),ze=s(e),p(K.$$.fragment,e),Fe=s(e),A=d(e,"P",{"data-svelte-h":!0}),r(A)!=="svelte-ndvph"&&(A.innerHTML=kt),We=s(e),p(O.$$.fragment,e),Qe=s(e),p(ee.$$.fragment,e),Pe=s(e),te=d(e,"P",{"data-svelte-h":!0}),r(te)!=="svelte-16iuz1g"&&(te.innerHTML=Jt),De=s(e),ae=d(e,"P",{"data-svelte-h":!0}),r(ae)!=="svelte-ph8yhc"&&(ae.innerHTML=Ht),Se=s(e),le=d(e,"UL",{"data-svelte-h":!0}),r(le)!=="svelte-8wrzrg"&&(le.innerHTML=xt),Ve=s(e),ne=d(e,"P",{"data-svelte-h":!0}),r(ne)!=="svelte-bmnyq5"&&(ne.textContent=qt),Ee=s(e),se=d(e,"TABLE",{"data-svelte-h":!0}),r(se)!=="svelte-1qvhd9t"&&(se.innerHTML=Zt),Ke=s(e),oe=d(e,"P",{"data-svelte-h":!0}),r(oe)!=="svelte-1slb1nq"&&(oe.innerHTML=Ut),Ae=s(e),p(ie.$$.fragment,e),Oe=s(e),de=d(e,"P",{"data-svelte-h":!0}),r(de)!=="svelte-1q8f2wf"&&(de.innerHTML=Lt),et=s(e),p(re.$$.fragment,e),tt=s(e),he=d(e,"P",{"data-svelte-h":!0}),r(he)!=="svelte-c19wqr"&&(he.textContent=Ct),at=s(e),p(ce.$$.fragment,e),lt=s(e),pe=d(e,"P",{"data-svelte-h":!0}),r(pe)!=="svelte-n4le8a"&&(pe.innerHTML=Yt),nt=s(e),p(fe.$$.fragment,e),st=s(e),ue=d(e,"P",{"data-svelte-h":!0}),r(ue)!=="svelte-1e9pmj4"&&(ue.innerHTML=It),ot=s(e),p(M.$$.fragment,e),it=s(e),p(T.$$.fragment,e),dt=s(e),me=d(e,"P",{}),Bt(me).forEach(a),this.h()},h(){Nt(o,"name","hf:doc:metadata"),Nt(o,"content",Ot)},m(e,t){Dt(document.head,o),l(e,w,t),l(e,h,t),l(e,b,t),f(j,e,t),l(e,ge,t),l(e,k,t),l(e,we,t),l(e,J,t),l(e,be,t),f(H,e,t),l(e,_e,t),l(e,x,t),l(e,ye,t),f(v,e,t),l(e,$e,t),f(q,e,t),l(e,ve,t),l(e,Z,t),l(e,Me,t),f(U,e,t),l(e,Te,t),f(L,e,t),l(e,je,t),l(e,C,t),l(e,ke,t),f(Y,e,t),l(e,Je,t),l(e,I,t),l(e,He,t),f(G,e,t),l(e,xe,t),l(e,X,t),l(e,qe,t),f(R,e,t),l(e,Ze,t),l(e,B,t),l(e,Ue,t),l(e,N,t),l(e,Le,t),f(z,e,t),l(e,Ce,t),l(e,F,t),l(e,Ye,t),f(W,e,t),l(e,Ie,t),f(Q,e,t),l(e,Ge,t),l(e,P,t),l(e,Xe,t),l(e,D,t),l(e,Re,t),l(e,S,t),l(e,Be,t),f(V,e,t),l(e,Ne,t),l(e,E,t),l(e,ze,t),f(K,e,t),l(e,Fe,t),l(e,A,t),l(e,We,t),f(O,e,t),l(e,Qe,t),f(ee,e,t),l(e,Pe,t),l(e,te,t),l(e,De,t),l(e,ae,t),l(e,Se,t),l(e,le,t),l(e,Ve,t),l(e,ne,t),l(e,Ee,t),l(e,se,t),l(e,Ke,t),l(e,oe,t),l(e,Ae,t),f(ie,e,t),l(e,Oe,t),l(e,de,t),l(e,et,t),f(re,e,t),l(e,tt,t),l(e,he,t),l(e,at,t),f(ce,e,t),l(e,lt,t),l(e,pe,t),l(e,nt,t),f(fe,e,t),l(e,st,t),l(e,ue,t),l(e,ot,t),f(M,e,t),l(e,it,t),f(T,e,t),l(e,dt,t),l(e,me,t),rt=!0},p(e,[t]){const Gt={};t&2&&(Gt.$$scope={dirty:t,ctx:e}),v.$set(Gt);const Xt={};t&2&&(Xt.$$scope={dirty:t,ctx:e}),M.$set(Xt);const Rt={};t&2&&(Rt.$$scope={dirty:t,ctx:e}),T.$set(Rt)},i(e){rt||(u(j.$$.fragment,e),u(H.$$.fragment,e),u(v.$$.fragment,e),u(q.$$.fragment,e),u(U.$$.fragment,e),u(L.$$.fragment,e),u(Y.$$.fragment,e),u(G.$$.fragment,e),u(R.$$.fragment,e),u(z.$$.fragment,e),u(W.$$.fragment,e),u(Q.$$.fragment,e),u(V.$$.fragment,e),u(K.$$.fragment,e),u(O.$$.fragment,e),u(ee.$$.fragment,e),u(ie.$$.fragment,e),u(re.$$.fragment,e),u(ce.$$.fragment,e),u(fe.$$.fragment,e),u(M.$$.fragment,e),u(T.$$.fragment,e),rt=!0)},o(e){m(j.$$.fragment,e),m(H.$$.fragment,e),m(v.$$.fragment,e),m(q.$$.fragment,e),m(U.$$.fragment,e),m(L.$$.fragment,e),m(Y.$$.fragment,e),m(G.$$.fragment,e),m(R.$$.fragment,e),m(z.$$.fragment,e),m(W.$$.fragment,e),m(Q.$$.fragment,e),m(V.$$.fragment,e),m(K.$$.fragment,e),m(O.$$.fragment,e),m(ee.$$.fragment,e),m(ie.$$.fragment,e),m(re.$$.fragment,e),m(ce.$$.fragment,e),m(fe.$$.fragment,e),m(M.$$.fragment,e),m(T.$$.fragment,e),rt=!1},d(e){e&&(a(w),a(h),a(b),a(ge),a(k),a(we),a(J),a(be),a(_e),a(x),a(ye),a($e),a(ve),a(Z),a(Me),a(Te),a(je),a(C),a(ke),a(Je),a(I),a(He),a(xe),a(X),a(qe),a(Ze),a(B),a(Ue),a(N),a(Le),a(Ce),a(F),a(Ye),a(Ie),a(Ge),a(P),a(Xe),a(D),a(Re),a(S),a(Be),a(Ne),a(E),a(ze),a(Fe),a(A),a(We),a(Qe),a(Pe),a(te),a(De),a(ae),a(Se),a(le),a(Ve),a(ne),a(Ee),a(se),a(Ke),a(oe),a(Ae),a(Oe),a(de),a(et),a(tt),a(he),a(at),a(lt),a(pe),a(nt),a(st),a(ue),a(ot),a(it),a(dt),a(me)),a(o),g(j,e),g(H,e),g(v,e),g(q,e),g(U,e),g(L,e),g(Y,e),g(G,e),g(R,e),g(z,e),g(W,e),g(Q,e),g(V,e),g(K,e),g(O,e),g(ee,e),g(ie,e),g(re,e),g(ce,e),g(fe,e),g(M,e),g(T,e)}}}const Ot='{"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 local folder","local":"download-files-to-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":[],"depth":2}],"depth":1}';function ea($){return Ft(()=>{new URLSearchParams(window.location.search).get("fw"),window.hfDocGoto=St}),[]}class oa extends Wt{constructor(o){super(),Qt(this,o,ea,At,zt,{})}}export{oa as component};
