Buckets:

download
raw
45 kB
import{s as Ws,o as Zs,n as Vs}from"../chunks/scheduler.85c25b89.js";import{S as _s,i as Hs,g as i,s as a,r as c,A as Ls,h as o,f as t,c as n,j as Gs,u as h,x as p,k as Nt,y as Es,a as s,v as M,d as r,t as m,w as u,m as Ys,n as Ss}from"../chunks/index.c9bcf812.js";import{T as As}from"../chunks/Tip.d8f753fa.js";import{C as j}from"../chunks/CodeBlock.c004bd26.js";import{H as f}from"../chunks/getInferenceSnippets.5ea0a804.js";function Qs(Pe){let y,w="The <code>optimum-cli neuron cache set</code> command is useful when working on a new instance to use your own cache.";return{c(){y=i("p"),y.innerHTML=w},l(T){y=o(T,"P",{"data-svelte-h":!0}),p(y)!=="svelte-j3xvxf"&&(y.innerHTML=w)},m(T,d){s(T,y,d)},p:Vs,d(T){T&&t(y)}}}function Xs(Pe){let y,w,T="If at least one of those requirements is not met, the command will fail.";return{c(){y=Ys("Make sure that the Neuron cache repo to use is set up locally, this can be done by running the `optimum-cli neuron cache set` command.\nYou also need to make sure that you are logged in to the Hugging Face Hub and that you have the writing rights for the specified cache repo,\nthis can be done via the `huggingface-cli login` command.\n"),w=i("p"),w.textContent=T},l(d){y=Ss(d,"Make sure that the Neuron cache repo to use is set up locally, this can be done by running the `optimum-cli neuron cache set` command.\nYou also need to make sure that you are logged in to the Hugging Face Hub and that you have the writing rights for the specified cache repo,\nthis can be done via the `huggingface-cli login` command.\n"),w=o(d,"P",{"data-svelte-h":!0}),p(w)!=="svelte-1aq9jeo"&&(w.textContent=T)},m(d,U){s(d,y,U),s(d,w,U)},p:Vs,d(d){d&&(t(y),t(w))}}}function Fs(Pe){let y,w,T,d,U,qe,I,xt=`The Neuron Model Cache is a remote cache for compiled Neuron models in the <code>neff</code> format.
It is integrated into the <code>NeuronTrainer</code> and <code>NeuronModelForCausalLM</code> classes to enable loading pretrained models from the cache instead of compiling them locally.`,Ke,v,gt="<strong>Note: it is not available for models exported using any other NeuronModelXX classes, that use a different export mechanism.</strong>",el,$,kt='The Neuron Model Cache is hosted on the <a href="https://huggingface.co/aws-neuron/optimum-neuron-cache" rel="nofollow">Hugging Face Hub</a> and includes compiled files for all popular and supported <code>optimum-neuron</code> pre-trained models.',ll,N,Bt=`Before training a Transformers or Diffusion model or loading a NeuronModelForCausalLM on Neuron platforms, it needs to be exported to neuron format
with <a href="https://github.com/aws-neuron/aws-neuron-samples/tree/master/torch-neuronx" rel="nofollow"><code>torch-neuronx</code></a>.`,tl,x,Gt='When exporting a model, <a href="https://github.com/aws-neuron/aws-neuron-samples/tree/master/torch-neuronx" rel="nofollow"><code>torch-neuronx</code></a> will:',sl,g,At='<li>convert it to a set of <a href="https://github.com/pytorch/xla/" rel="nofollow">XLA</a> subgraphs,</li> <li>compile each subgraph with the neuronx compiler into a Neuron Executable File Format (NEFF) binary file.</li>',al,k,Vt=`The first step is relatively fast, but the compilation takes a lot of time.
To avoid recompiling all NEFF files every time a model is loaded on a NeuronX host, <a href="https://github.com/aws-neuron/aws-neuron-samples/tree/master/torch-neuronx" rel="nofollow"><code>torch-neuronx</code></a>
stores NEFF files in a local directory, usually <code>/var/tmp/neuron-compile-cache</code>.`,nl,B,Wt="However, this local cache is not shared between platforms, which means that every time you train or export a model on a new host, you need to recompile it.",il,G,Zt="We created the Neuron Model Cache to solve this limitation by providing a public repository of precompiled model graphs.",ol,A,_t="Note: we also support the creation of private, secured, remote model cache.",pl,V,cl,W,Ht="The public model cache will be used when you use the <code>NeuronTrainer</code> or <code>NeuronModelForCausalLM</code> classes. There are no additional changes needed.",hl,Z,Lt=`When exporting a model to neuron format, <code>optimum-neuron</code> will simply look for cached NEFF files in the hub repository during the compilation of the
model subgraphs.`,Ml,_,Et="If the NEFF files are cached, they will be fetched from the hub and directly loaded instead of being recompiled.",rl,H,ml,L,Yt='The Optimum Neuron Cache is built on top of the <a href="https://awsdocs-neuron.readthedocs-hosted.com/en/latest/general/arch/neuron-features/neuron-caching.html" rel="nofollow">NeuronX compiler cache</a>.',ul,E,St="It is important to understand that the cache operates on NEFF binaries, and not on the model itself.",yl,Y,Qt='As explained previously, each model exported to Neuron using the <code>NeuronTrainer</code> or <code>NeuronModelForCausalLM</code> is composed of <a href="https://github.com/pytorch/xla/" rel="nofollow">XLA</a> subgraphs.',wl,S,Xt="Each subgraph is unique, and results from the combination of:",Tl,Q,Ft="<li>the <code>transformers</code> python modeling code,</li> <li>the <code>transformers</code> model config,</li> <li>the <code>input_shapes</code> selected during the export,</li> <li>The precision of the model, full-precision, fp16 or bf16.</li>",dl,X,Rt="When compiling a subgraph to a NEFF file, other parameters influence the result:",jl,F,Ot="<li>The version of the Neuron X compiler,</li> <li>The number of Neuron cores used,</li> <li>The compilation parameters (such as the optimization level).</li>",fl,R,zt="All these parameters are combined together to create a unique hash that identifies a NEFF file.",Ul,O,Pt="This has two very important consequences:",bl,z,Dt="<li>it is only when actually exporting a model that the associated NEFF files can be identified,</li> <li>even a small change in the model configuration will lead to a different set of NEFF files.</li>",Jl,P,qt="It is therefore very difficult to know in advance if the NEFFs associated to a specific model configuration are cached.",Cl,D,Il,q,Kt=`The neuron cache lookup is a feature allowing users to look for compatible cached model configurations before exporting
a model for inference.`,vl,K,es="It is based on a dedicated registry composed of stored cached configurations.",$l,ee,ls="Cached model configurations are stored as entries under a specific subfolder in the Neuron Model Cache:",Nl,le,xl,te,ts=`Each entry corresponds to the combination of a model configuration and its export parameters: this is as close as we can get to
uniquely identify the exported model.`,gl,se,ss=`You can use the <code>optimum-cli</code> to lookup for compatible cached entries by passing it a hub model_id or the path to a file
containing a model <code>config.json</code>.`,kl,ae,Bl,ne,as=`<strong>Note that even if compatible cached entries exist, this does not always guarantee that the model will not be recompiled during export
if you modified the compilation parameters or updated the neuronx packages.</strong>`,Gl,ie,Al,oe,Vl,pe,ns="The repository for the public cache is <code>aws-neuron/optimum-neuron-cache</code>. This repository includes all precompiled files for commonly used models so that it is publicly available and free to use for everyone. But there are two limitations:",Wl,ce,is="<li>You will not be able to push your own compiled files on this repo</li> <li>It is public and you might want to use a private repo for private models</li>",Zl,he,os="To alleviate that you can create your own private cache repository using the <code>optimum-cli</code> or set the environment variable <code>CUSTOM_CACHE_REPO</code>.",_l,Me,Hl,re,ps="The Optimum CLI offers 2 subcommands for cache creation and setting:",Ll,me,cs=`<li><code>create</code>: To create a new cache repository that you can use as a private Neuron Model cache.</li> <li><code>set</code>: To set the name of the Neuron cache repository locally, the repository needs to exist
and will be used by default by <code>optimum-neuron</code>.</li>`,El,ue,hs="Create a new Neuron cache repository:",Yl,ye,Sl,we,Ms="The <code>-n</code> / <code>--name</code> option allows you to specify a name for the Neuron cache repo, if not set the default name will be used. The <code>--public</code> flag allows you to make your Neuron cache public as it will be created as a private repository by default.",Ql,Te,rs="Example:",Xl,de,Fl,je,ms="Set a different Trainium cache repository:",Rl,fe,Ol,Ue,us="Example:",zl,be,Pl,b,Dl,Je,ql,Ce,ys="Using the CLI is not always feasible, and not very practical for small testing. In this case, you can simply set the environment variable <code>CUSTOM_CACHE_REPO</code>.",Kl,Ie,ws="For example, if your cache repo is called <code>michaelbenayoun/my_custom_cache_repo</code>, you just need to do:",et,ve,lt,$e,Ts="or:",tt,Ne,st,xe,ds='You have to be <a href="https://huggingface.co/docs/huggingface_hub/quick-start#login" rel="nofollow">logged into the Hugging Face Hub</a> to be able to push and pull files from your private cache repository.',at,ge,nt,J,js='<img alt="Cache system flow" src="https://huggingface.co/datasets/optimum/documentation-images/resolve/main/neuron/cache_system_flow.jpg"/> <br/> <em style="color: grey">Cache system flow</em>',it,ke,fs=`At the beginning of each training step, the <a href="/docs/optimum.neuron/v0.3.0/en/package_reference/trainer#optimum.neuron.NeuronTrainer">NeuronTrainer</a> computes a <code>NeuronHash</code> and checks the cache repo(s) (official and custom) on the Hugging Face Hub to see if there are compiled files associated to this hash.
If that is the case, the files are downloaded directly to the local cache directory and no compilation is needed. Otherwise compilation is performed.`,ot,Be,Us='Just as for downloading compiled files, the <a href="/docs/optimum.neuron/v0.3.0/en/package_reference/trainer#optimum.neuron.NeuronTrainer">NeuronTrainer</a> will keep track of the newly created compilation files at each training step, and upload them to the Hugging Face Hub at save time or when training ends. This assumes that you have writing access to the cache repo, otherwise nothing will be pushed.',pt,Ge,ct,Ae,bs="The Optimum CLI can be used to perform various cache-related tasks, as described by the <code>optimum-cli neuron cache</code> command usage message:",ht,Ve,Mt,We,rt,Ze,Js="It is possible to add a model compilation files to a cache repo via the <code>optimum-cli neuron cache add</code> command:",mt,_e,ut,He,Cs="When running this command a small training session will be run and the resulting compilation files will be pushed.",yt,C,wt,Le,Is="Example:",Tt,Ee,dt,Ye,vs="This will push compilation files for the <code>prajjwal1/bert-tiny</code> model on the Neuron cache repo that was set up for the specified parameters.",jt,Se,ft,Qe,$s="It can also be convenient to request the cache repo to know which compilation files are available. This can be done via the <code>optimum-cli neuron cache list</code> command:",Ut,Xe,bt,Fe,Ns="As you can see, it is possible to:",Jt,Re,xs="<li>List all the models available for all compiler versions.</li> <li>List all the models available for a given compiler version by specifying the <code>-v / --version</code> argument.</li> <li>List all compilation files for a given model, there can be many for different input shapes and so on, by specifying the <code>-m / --model</code> argument.</li>",Ct,Oe,gs="Example:",It,ze,vt,De,$t;return U=new f({props:{title:"Neuron Model Cache",local:"neuron-model-cache",headingTag:"h1"}}),V=new f({props:{title:"How to use the Neuron model cache",local:"how-to-use-the-neuron-model-cache",headingTag:"h2"}}),H=new f({props:{title:"How caching works",local:"how-caching-works",headingTag:"h2"}}),D=new f({props:{title:"Neuron model cache lookup (inferentia only)",local:"neuron-model-cache-lookup-inferentia-only",headingTag:"h2"}}),le=new j({props:{code:"bmV1cm9ueGNjLTIuMTIuNTQuMCUyQmY2MzFjMjM2NSUwQSVFMiU5NCU5QyVFMiU5NCU4MCVFMiU5NCU4MCUyMDBfUkVHSVNUUlklMEElRTIlOTQlODIlMjAlMjAlMjAlRTIlOTQlOTQlRTIlOTQlODAlRTIlOTQlODAlMjAwLjAuMTglMEElRTIlOTQlODIlMjAlMjAlMjAlMjAlMjAlMjAlMjAlRTIlOTQlOTQlRTIlOTQlODAlRTIlOTQlODAlMjBsbGFtYSUwQSVFMiU5NCU4MiUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCVFMiU5NCU5NCVFMiU5NCU4MCVFMiU5NCU4MCUyMG1ldGEtbGxhbWElMEElRTIlOTQlODIlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlRTIlOTQlOTQlRTIlOTQlODAlRTIlOTQlODAlMjBMbGFtYS0yLTdiLWNoYXQtaGYlMEElRTIlOTQlODIlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlRTIlOTQlOTQlRTIlOTQlODAlRTIlOTQlODAlMjA1NGMxZjY2ODljZDg4ZjI0NmZjZS5qc29u",highlighted:`neuronxcc<span class="hljs-number">-2</span>.<span class="hljs-number">12</span>.<span class="hljs-number">54</span>.<span class="hljs-number">0</span>+f631c2365
├── <span class="hljs-number">0</span>_REGISTRY
│ └── <span class="hljs-number">0</span>.<span class="hljs-number">0</span>.<span class="hljs-number">18</span>
│ └── <span class="hljs-keyword">llama
</span>│ └── meta-<span class="hljs-keyword">llama
</span>│ └── <span class="hljs-keyword">Llama-2-7b-chat-hf
</span>│ └── <span class="hljs-number">54</span>c<span class="hljs-symbol">1f</span>6689cd<span class="hljs-symbol">88f</span><span class="hljs-symbol">246f</span>ce.<span class="hljs-keyword">json</span>`,wrap:!1}}),ae=new j({props:{code:"JTI0JTIwb3B0aW11bS1jbGklMjBuZXVyb24lMjBjYWNoZSUyMGxvb2t1cCUyMG1ldGEtbGxhbWElMkZMbGFtYS0yLTdiLWNoYXQtaGYlMEElMEEqKiolMjAxJTIwZW50cmllKHMpJTIwZm91bmQlMjBpbiUyMGNhY2hlJTIwZm9yJTIwbWV0YS1sbGFtYSUyRkxsYW1hLTItN2ItY2hhdC1oZiUyMCoqKiUwQSUwQXRhc2slM0ElMjB0ZXh0LWdlbmVyYXRpb24lMEFiYXRjaF9zaXplJTNBJTIwMSUwQW51bV9jb3JlcyUzQSUyMDI0JTBBYXV0b19jYXN0X3R5cGUlM0ElMjBmcDE2JTBBc2VxdWVuY2VfbGVuZ3RoJTNBJTIwMjA0OCUwQWNvbXBpbGVyX3R5cGUlM0ElMjBuZXVyb254LWNjJTBBY29tcGlsZXJfdmVyc2lvbiUzQSUyMDIuMTIuNTQuMCUyQmY2MzFjMjM2NSUwQWNoZWNrcG9pbnRfaWQlM0ElMjBtZXRhLWxsYW1hJTJGTGxhbWEtMi03Yi1jaGF0LWhmJTBBY2hlY2twb2ludF9yZXZpc2lvbiUzQSUyMGMxYjBkYjkzMzY4NGVkYmZlMjlhMDZmYTQ3ZWIxOWNjNDgwMjVlOTM=",highlighted:`<span class="hljs-meta prompt_">$ </span><span class="language-bash">optimum-cli neuron cache lookup meta-llama/Llama-2-7b-chat-hf</span>
*** 1 entrie(s) found in cache for meta-llama/Llama-2-7b-chat-hf ***
task: text-generation
batch_size: 1
num_cores: 24
auto_cast_type: fp16
sequence_length: 2048
compiler_type: neuronx-cc
compiler_version: 2.12.54.0+f631c2365
checkpoint_id: meta-llama/Llama-2-7b-chat-hf
checkpoint_revision: c1b0db933684edbfe29a06fa47eb19cc48025e93`,wrap:!1}}),ie=new f({props:{title:"Advanced usage (trainium only)",local:"advanced-usage-trainium-only",headingTag:"h2"}}),oe=new f({props:{title:"How to use a private Neuron model cache (trainium only)",local:"how-to-use-a-private-neuron-model-cache-trainium-only",headingTag:"h3"}}),Me=new f({props:{title:"Using the Optimum CLI",local:"using-the-optimum-cli",headingTag:"h4"}}),ye=new j({props:{code:"b3B0aW11bS1jbGklMjBuZXVyb24lMjBjYWNoZSUyMGNyZWF0ZSUyMC0taGVscCUwQSUwQXVzYWdlJTNBJTIwb3B0aW11bS1jbGklMjBuZXVyb24lMjBjYWNoZSUyMGNyZWF0ZSUyMCU1Qi1oJTVEJTIwJTVCLW4lMjBOQU1FJTVEJTIwJTVCLS1wdWJsaWMlNUQlMEElMEFvcHRpb25hbCUyMGFyZ3VtZW50cyUzQSUwQSUyMCUyMC1oJTJDJTIwLS1oZWxwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwc2hvdyUyMHRoaXMlMjBoZWxwJTIwbWVzc2FnZSUyMGFuZCUyMGV4aXQlMEElMjAlMjAtbiUyME5BTUUlMkMlMjAtLW5hbWUlMjBOQU1FJTIwJTIwVGhlJTIwbmFtZSUyMG9mJTIwdGhlJTIwcmVwbyUyMHRoYXQlMjB3aWxsJTIwYmUlMjB1c2VkJTIwYXMlMjBhJTIwcmVtb3RlJTIwY2FjaGUlMjBmb3IlMjB0aGUlMjBjb21waWxhdGlvbiUyMGZpbGVzLiUwQSUyMCUyMC0tcHVibGljJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwSWYlMjBzZXQlMkMlMjB0aGUlMjBjcmVhdGVkJTIwcmVwbyUyMHdpbGwlMjBiZSUyMHB1YmxpYy4lMjBCeSUyMGRlZmF1bHQlMjB0aGUlMjBjYWNoZSUyMHJlcG8lMjBpcyUyMHByaXZhdGUuJTBB",highlighted:`optimum-cli neuron cache create --help
usage: optimum-cli neuron cache create [-h] [-n <span class="hljs-keyword">NAME</span>] [--<span class="hljs-keyword">public</span>]
optional arguments:
-h, --help show this help <span class="hljs-keyword">message</span> <span class="hljs-keyword">and</span> <span class="hljs-keyword">exit</span>
-n <span class="hljs-keyword">NAME</span>, --<span class="hljs-keyword">name</span> <span class="hljs-keyword">NAME</span> The <span class="hljs-keyword">name</span> <span class="hljs-keyword">of</span> the repo that will be used <span class="hljs-keyword">as</span> a remote cache <span class="hljs-keyword">for</span> the compilation files.
--<span class="hljs-keyword">public</span> <span class="hljs-keyword">If</span> <span class="hljs-keyword">set</span>, the created repo will be <span class="hljs-keyword">public</span>. By <span class="hljs-keyword">default</span> the cache repo <span class="hljs-keyword">is</span> <span class="hljs-keyword">private</span>.
`,wrap:!1}}),de=new j({props:{code:"b3B0aW11bS1jbGklMjBuZXVyb24lMjBjYWNoZSUyMGNyZWF0ZSUwQSUwQU5ldXJvbiUyMGNhY2hlJTIwY3JlYXRlZCUyMG9uJTIwdGhlJTIwSHVnZ2luZyUyMEZhY2UlMjBIdWIlM0ElMjBtaWNoYWVsYmVuYXlvdW4lMkZvcHRpbXVtLW5ldXJvbi1jYWNoZSUyMCU1QnByaXZhdGUlNUQuJTBBTmV1cm9uJTIwY2FjaGUlMjBuYW1lJTIwc2V0JTIwbG9jYWxseSUyMHRvJTIwbWljaGFlbGJlbmF5b3VuJTJGb3B0aW11bS1uZXVyb24tY2FjaGUlMjBpbiUyMCUyRmhvbWUlMkZtaWNoYWVsJTJGLmNhY2hlJTJGaHVnZ2luZ2ZhY2UlMkZvcHRpbXVtX25ldXJvbl9jdXN0b21fY2FjaGUu",highlighted:`optimum-cli neuron cache create
Neuron cache created on the Hugging Face Hub: michaelbenayoun/optimum-neuron-cache [<span class="hljs-keyword">private</span>].
Neuron cache name set locally to michaelbenayoun<span class="hljs-regexp">/optimum-neuron-cache in /</span>home<span class="hljs-regexp">/michael/</span>.cache<span class="hljs-regexp">/huggingface/</span>optimum_neuron_custom_cache.`,wrap:!1}}),fe=new j({props:{code:"dXNhZ2UlM0ElMjBvcHRpbXVtLWNsaSUyMG5ldXJvbiUyMGNhY2hlJTIwc2V0JTIwJTVCLWglNUQlMjBuYW1lJTBBJTBBcG9zaXRpb25hbCUyMGFyZ3VtZW50cyUzQSUwQSUyMCUyMG5hbWUlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjBUaGUlMjBuYW1lJTIwb2YlMjB0aGUlMjByZXBvJTIwdG8lMjB1c2UlMjBhcyUyMHJlbW90ZSUyMGNhY2hlLiUwQSUwQW9wdGlvbmFsJTIwYXJndW1lbnRzJTNBJTBBJTIwJTIwLWglMkMlMjAtLWhlbHAlMjAlMjBzaG93JTIwdGhpcyUyMGhlbHAlMjBtZXNzYWdlJTIwYW5kJTIwZXhpdA==",highlighted:`usage: optimum-cli neuron cache set [-h] name
positional arguments:
name The name of the repo to use as remote cache.
optional arguments:
-h, --help show this help message and <span class="hljs-keyword">exit</span>`,wrap:!1}}),be=new j({props:{code:"b3B0aW11bS1jbGklMjBuZXVyb24lMjBjYWNoZSUyMHNldCUyMG1pY2hhZWxiZW5heW91biUyRm9wdGltdW0tbmV1cm9uLWNhY2hlJTBBJTBBTmV1cm9uJTIwY2FjaGUlMjBuYW1lJTIwc2V0JTIwbG9jYWxseSUyMHRvJTIwbWljaGFlbGJlbmF5b3VuJTJGb3B0aW11bS1uZXVyb24tY2FjaGUlMjBpbiUyMCUyRmhvbWUlMkZtaWNoYWVsJTJGLmNhY2hlJTJGaHVnZ2luZ2ZhY2UlMkZvcHRpbXVtX25ldXJvbl9jdXN0b21fY2FjaGU=",highlighted:`optimum-cli neuron cache set michaelbenayoun/optimum-neuron-cache
Neuron cache name set locally to michaelbenayoun<span class="hljs-regexp">/optimum-neuron-cache in /</span>home<span class="hljs-regexp">/michael/</span>.cache<span class="hljs-regexp">/huggingface/</span>optimum_neuron_custom_cache`,wrap:!1}}),b=new As({props:{$$slots:{default:[Qs]},$$scope:{ctx:Pe}}}),Je=new f({props:{title:"Using the environment variable CUSTOM_CACHE_REPO",local:"using-the-environment-variable-customcacherepo",headingTag:"h4"}}),ve=new j({props:{code:"Q1VTVE9NX0NBQ0hFX1JFUE8lM0QlMjJtaWNoYWVsYmVuYXlvdW4lMkZteV9jdXN0b21fY2FjaGVfcmVwbyUyMiUyMHRvcmNocnVuJTIwLi4u",highlighted:'CUSTOM_CACHE_REPO=<span class="hljs-string">&quot;michaelbenayoun/my_custom_cache_repo&quot;</span> torchrun ...',wrap:!1}}),Ne=new j({props:{code:"ZXhwb3J0JTIwQ1VTVE9NX0NBQ0hFX1JFUE8lM0QlMjJtaWNoYWVsYmVuYXlvdW4lMkZteV9jdXN0b21fY2FjaGVfcmVwbyUyMiUwQXRvcmNocnVuJTIwLi4u",highlighted:`<span class="hljs-built_in">export</span> CUSTOM_CACHE_REPO=<span class="hljs-string">&quot;michaelbenayoun/my_custom_cache_repo&quot;</span>
torchrun ...`,wrap:!1}}),ge=new f({props:{title:"Cache system flow",local:"cache-system-flow",headingTag:"h3"}}),Ge=new f({props:{title:"Optimum CLI",local:"optimum-cli",headingTag:"h2"}}),Ve=new j({props:{code:"dXNhZ2UlM0ElMjBvcHRpbXVtLWNsaSUyMG5ldXJvbiUyMGNhY2hlJTIwJTVCLWglNUQlMjAlN0JjcmVhdGUlMkNzZXQlMkNhZGQlMkNsaXN0JTdEJTIwLi4uJTBBJTBBcG9zaXRpb25hbCUyMGFyZ3VtZW50cyUzQSUwQSUyMCUyMCU3QmNyZWF0ZSUyQ3NldCUyQ2FkZCUyQ2xpc3QlMkNzeW5jaHJvbml6ZSUyQ2xvb2t1cCU3RCUwQSUyMCUyMCUyMCUyMGNyZWF0ZSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMENyZWF0ZSUyMGElMjBtb2RlbCUyMHJlcG8lMjBvbiUyMHRoZSUyMEh1Z2dpbmclMjBGYWNlJTIwSHViJTIwdG8lMjBzdG9yZSUyME5ldXJvbiUyMFglMjBjb21waWxhdGlvbiUyMGZpbGVzLiUwQSUyMCUyMCUyMCUyMHNldCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMFNldCUyMHRoZSUyMG5hbWUlMjBvZiUyMHRoZSUyME5ldXJvbiUyMGNhY2hlJTIwcmVwbyUyMHRvJTIwdXNlJTIwbG9jYWxseSUyMCh0cmFpbml1bSUyMG9ubHkpLiUwQSUyMCUyMCUyMCUyMGFkZCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMEFkZCUyMGElMjBtb2RlbCUyMHRvJTIwdGhlJTIwY2FjaGUlMjBvZiUyMHlvdXIlMjBjaG9pY2UlMjAodHJhaW5pdW0lMjBvbmx5KS4lMEElMjAlMjAlMjAlMjBsaXN0JTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwTGlzdCUyMG1vZGVscyUyMGluJTIwYSUyMGNhY2hlJTIwcmVwbyUyMCh0cmFpbml1bSUyMG9ubHkpLiUwQSUyMCUyMCUyMCUyMHN5bmNocm9uaXplJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwU3luY2hyb25pemUlMjBsb2NhbCUyMGNvbXBpbGVyJTIwY2FjaGUlMjB3aXRoJTIwdGhlJTIwaHViJTIwY2FjaGUlMjAoaW5mZXJlbnRpYSUyMG9ubHkpLiUwQSUyMCUyMCUyMCUyMGxvb2t1cCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMExvb2t1cCUyMHRoZSUyMG5ldXJvbnglMjBjb21waWxlciUyMGh1YiUyMGNhY2hlJTIwZm9yJTIwdGhlJTIwc3BlY2lmaWVkJTIwbW9kZWwlMjBpZCUyMChpbmZlcmVudGlhJTIwb25seSkuJTBBJTBBb3B0aW9uYWwlMjBhcmd1bWVudHMlM0ElMEElMjAlMjAtaCUyQyUyMC0taGVscCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMHNob3clMjB0aGlzJTIwaGVscCUyMG1lc3NhZ2UlMjBhbmQlMjBleGl0",highlighted:`usage: optimum-cli neuron cache [-h] {create,<span class="hljs-keyword">set</span>,<span class="hljs-built_in">add</span>,<span class="hljs-keyword">list</span>} ...
positional arguments:
{create,<span class="hljs-keyword">set</span>,<span class="hljs-built_in">add</span>,<span class="hljs-keyword">list</span>,synchronize,lookup}
create Create <span class="hljs-keyword">a</span> model repo <span class="hljs-keyword">on</span> the Hugging Face Hub <span class="hljs-keyword">to</span> store Neuron <span class="hljs-keyword">X</span> compilation <span class="hljs-keyword">files</span>.
<span class="hljs-keyword">set</span> Set the name of the Neuron cache repo <span class="hljs-keyword">to</span> use locally (trainium <span class="hljs-keyword">only</span>).
<span class="hljs-built_in">add</span> Add <span class="hljs-keyword">a</span> model <span class="hljs-keyword">to</span> the cache of your choice (trainium <span class="hljs-keyword">only</span>).
<span class="hljs-keyword">list</span> List models in <span class="hljs-keyword">a</span> cache repo (trainium <span class="hljs-keyword">only</span>).
synchronize Synchronize local <span class="hljs-keyword">compiler</span> cache with the hub cache (inferentia <span class="hljs-keyword">only</span>).
lookup Lookup the neuronx <span class="hljs-keyword">compiler</span> hub cache <span class="hljs-keyword">for</span> the specified model id (inferentia <span class="hljs-keyword">only</span>).
optional arguments:
-h, --<span class="hljs-keyword">help</span> show this <span class="hljs-keyword">help</span> message <span class="hljs-built_in">and</span> <span class="hljs-keyword">exit</span>`,wrap:!1}}),We=new f({props:{title:"Add a model to the cache (trainium only)",local:"add-a-model-to-the-cache-trainium-only",headingTag:"h3"}}),_e=new j({props:{code:"dXNhZ2UlM0ElMjBvcHRpbXVtLWNsaSUyMG5ldXJvbiUyMGNhY2hlJTIwYWRkJTIwJTVCLWglNUQlMjAtbSUyME1PREVMJTIwLS10YXNrJTIwVEFTSyUyMC0tdHJhaW5fYmF0Y2hfc2l6ZSUyMFRSQUlOX0JBVENIX1NJWkUlMjAlNUItLWV2YWxfYmF0Y2hfc2l6ZSUyMEVWQUxfQkFUQ0hfU0laRSU1RCUyMCU1Qi0tc2VxdWVuY2VfbGVuZ3RoJTIwU0VRVUVOQ0VfTEVOR1RIJTVEJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTVCLS1lbmNvZGVyX3NlcXVlbmNlX2xlbmd0aCUyMEVOQ09ERVJfU0VRVUVOQ0VfTEVOR1RIJTVEJTIwJTVCLS1kZWNvZGVyX3NlcXVlbmNlX2xlbmd0aCUyMERFQ09ERVJfU0VRVUVOQ0VfTEVOR1RIJTVEJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTVCLS1ncmFkaWVudF9hY2N1bXVsYXRpb25fc3RlcHMlMjBHUkFESUVOVF9BQ0NVTVVMQVRJT05fU1RFUFMlNUQlMjAtLXByZWNpc2lvbiUyMCU3QmZwJTJDYmYxNiU3RCUyMC0tbnVtX2NvcmVzJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTdCMSUyQzIlMkMzJTJDNCUyQzUlMkM2JTJDNyUyQzglMkM5JTJDMTAlMkMxMSUyQzEyJTJDMTMlMkMxNCUyQzE1JTJDMTYlMkMxNyUyQzE4JTJDMTklMkMyMCUyQzIxJTJDMjIlMkMyMyUyQzI0JTJDMjUlMkMyNiUyQzI3JTJDMjglMkMyOSUyQzMwJTJDMzElMkMzMiU3RCUyMCU1Qi0tbWF4X3N0ZXBzJTIwTUFYX1NURVBTJTVE",highlighted:`usage: optimum-cli neuron cache add <span class="hljs-selector-attr">[-h]</span> -m MODEL <span class="hljs-attr">--task</span> TASK <span class="hljs-attr">--train_batch_size</span> TRAIN_BATCH_SIZE <span class="hljs-selector-attr">[--eval_batch_size EVAL_BATCH_SIZE]</span> <span class="hljs-selector-attr">[--sequence_length SEQUENCE_LENGTH]</span>
<span class="hljs-selector-attr">[--encoder_sequence_length ENCODER_SEQUENCE_LENGTH]</span> <span class="hljs-selector-attr">[--decoder_sequence_length DECODER_SEQUENCE_LENGTH]</span>
<span class="hljs-selector-attr">[--gradient_accumulation_steps GRADIENT_ACCUMULATION_STEPS]</span> <span class="hljs-attr">--precision</span> {fp,bf16} <span class="hljs-attr">--num_cores</span>
{<span class="hljs-number">1</span>,<span class="hljs-number">2</span>,<span class="hljs-number">3</span>,<span class="hljs-number">4</span>,<span class="hljs-number">5</span>,<span class="hljs-number">6</span>,<span class="hljs-number">7</span>,<span class="hljs-number">8</span>,<span class="hljs-number">9</span>,<span class="hljs-number">10</span>,<span class="hljs-number">11</span>,<span class="hljs-number">12</span>,<span class="hljs-number">13</span>,<span class="hljs-number">14</span>,<span class="hljs-number">15</span>,<span class="hljs-number">16</span>,<span class="hljs-number">17</span>,<span class="hljs-number">18</span>,<span class="hljs-number">19</span>,<span class="hljs-number">20</span>,<span class="hljs-number">21</span>,<span class="hljs-number">22</span>,<span class="hljs-number">23</span>,<span class="hljs-number">24</span>,<span class="hljs-number">25</span>,<span class="hljs-number">26</span>,<span class="hljs-number">27</span>,<span class="hljs-number">28</span>,<span class="hljs-number">29</span>,<span class="hljs-number">30</span>,<span class="hljs-number">31</span>,<span class="hljs-number">32</span>} <span class="hljs-selector-attr">[--max_steps MAX_STEPS]</span>`,wrap:!1}}),C=new As({props:{warning:!0,$$slots:{default:[Xs]},$$scope:{ctx:Pe}}}),Ee=new j({props:{code:"b3B0aW11bS1jbGklMjBuZXVyb24lMjBjYWNoZSUyMGFkZCUyMCU1QyUwQSUyMCUyMC0tbW9kZWwlMjBwcmFqandhbDElMkZiZXJ0LXRpbnklMjAlNUMlMEElMjAlMjAtLXRhc2slMjB0ZXh0LWNsYXNzaWZpY2F0aW9uJTIwJTVDJTBBJTIwJTIwLS10cmFpbl9iYXRjaF9zaXplJTIwMTYlMjAlNUMlMEElMjAlMjAtLWV2YWxfYmF0Y2hfc2l6ZSUyMDE2JTIwJTVDJTBBJTIwJTIwLS1zZXF1ZW5jZV9sZW5ndGglMjAxMjglMjAlNUMlMEElMjAlMjAtLWdyYWRpZW50X2FjY3VtdWxhdGlvbl9zdGVwcyUyMDMyJTIwJTVDJTBBJTIwJTIwLS1udW1fY29yZXMlMjAzMiUyMCU1QyUwQSUyMCUyMC0tcHJlY2lzaW9uJTIwYmYxNg==",highlighted:`optimum-cli neuron cache <span class="hljs-built_in">add</span> \\
<span class="hljs-comment">--model prajjwal1/bert-tiny \\</span>
<span class="hljs-comment">--task text-classification \\</span>
<span class="hljs-comment">--train_batch_size 16 \\</span>
<span class="hljs-comment">--eval_batch_size 16 \\</span>
<span class="hljs-comment">--sequence_length 128 \\</span>
<span class="hljs-comment">--gradient_accumulation_steps 32 \\</span>
<span class="hljs-comment">--num_cores 32 \\</span>
<span class="hljs-comment">--precision bf16</span>`,wrap:!1}}),Se=new f({props:{title:"List a cache repo",local:"list-a-cache-repo",headingTag:"h3"}}),Xe=new j({props:{code:"dXNhZ2UlM0ElMjBvcHRpbXVtLWNsaSUyMG5ldXJvbiUyMGNhY2hlJTIwbGlzdCUyMCU1Qi1oJTVEJTIwJTVCLW0lMjBNT0RFTCU1RCUyMCU1Qi12JTIwVkVSU0lPTiU1RCUyMCU1Qm5hbWUlNUQlMEElMEFwb3NpdGlvbmFsJTIwYXJndW1lbnRzJTNBJTBBJTIwJTIwbmFtZSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMFRoZSUyMG5hbWUlMjBvZiUyMHRoZSUyMHJlcG8lMjB0byUyMGxpc3QuJTIwV2lsbCUyMHVzZSUyMHRoZSUyMGxvY2FsbHklMjBzYXZlZCUyMGNhY2hlJTIwcmVwbyUyMGlmJTIwbGVmdCUyMHVuc3BlY2lmaWVkLiUwQSUwQW9wdGlvbmFsJTIwYXJndW1lbnRzJTNBJTBBJTIwJTIwLWglMkMlMjAtLWhlbHAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjBzaG93JTIwdGhpcyUyMGhlbHAlMjBtZXNzYWdlJTIwYW5kJTIwZXhpdCUwQSUyMCUyMC1tJTIwTU9ERUwlMkMlMjAtLW1vZGVsJTIwTU9ERUwlMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjBUaGUlMjBtb2RlbCUyMG5hbWUlMjBvciUyMHBhdGglMjBvZiUyMHRoZSUyMG1vZGVsJTIwdG8lMjBjb25zaWRlci4lMjBJZiUyMGxlZnQlMjB1bnNwZWNpZmllZCUyQyUyMHdpbGwlMjBsaXN0JTIwYWxsJTIwYXZhaWxhYmxlJTIwbW9kZWxzLiUwQSUyMCUyMC12JTIwVkVSU0lPTiUyQyUyMC0tdmVyc2lvbiUyMFZFUlNJT04lMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjBUaGUlMjB2ZXJzaW9uJTIwb2YlMjB0aGUlMjBOZXVyb24lMjBYJTIwQ29tcGlsZXIlMjB0byUyMGNvbnNpZGVyLiUyMFdpbGwlMjBsaXN0JTIwYWxsJTIwYXZhaWxhYmxlJTIwdmVyc2lvbnMlMjBpZiUyMGxlZnQlMjB1bnNwZWNpZmllZC4=",highlighted:`usage: optimum-cli neuron cache <span class="hljs-keyword">list</span> [-h] [-<span class="hljs-keyword">m</span> MODEL] [-v VERSION] [name]
positional arguments:
name The name of the repo <span class="hljs-keyword">to</span> <span class="hljs-keyword">list</span>. Will use the locally saved cache repo <span class="hljs-keyword">if</span> <span class="hljs-keyword">left</span> unspecified.
optional arguments:
-h, --<span class="hljs-keyword">help</span> show this <span class="hljs-keyword">help</span> message <span class="hljs-built_in">and</span> <span class="hljs-keyword">exit</span>
-<span class="hljs-keyword">m</span> MODEL, --model MODEL
The model name <span class="hljs-built_in">or</span> path of the model <span class="hljs-keyword">to</span> consider. If <span class="hljs-keyword">left</span> unspecified, will <span class="hljs-keyword">list</span> <span class="hljs-keyword">all</span> available models.
-v VERSION, --<span class="hljs-keyword">version</span> VERSION
The <span class="hljs-keyword">version</span> of the Neuron <span class="hljs-keyword">X</span> Compiler <span class="hljs-keyword">to</span> consider. Will <span class="hljs-keyword">list</span> <span class="hljs-keyword">all</span> available versions <span class="hljs-keyword">if</span> <span class="hljs-keyword">left</span> unspecified.`,wrap:!1}}),ze=new j({props:{code:"b3B0aW11bS1jbGklMjBuZXVyb24lMjBjYWNoZSUyMGxpc3QlMjBhd3MtbmV1cm9uJTJGb3B0aW11bS1uZXVyb24tY2FjaGU=",highlighted:'optimum-cli neuron <span class="hljs-keyword">cache</span> list aws-neuron/optimum-neuron-<span class="hljs-keyword">cache</span>',wrap:!1}}),{c(){y=i("meta"),w=a(),T=i("p"),d=a(),c(U.$$.fragment),qe=a(),I=i("p"),I.innerHTML=xt,Ke=a(),v=i("p"),v.innerHTML=gt,el=a(),$=i("p"),$.innerHTML=kt,ll=a(),N=i("p"),N.innerHTML=Bt,tl=a(),x=i("p"),x.innerHTML=Gt,sl=a(),g=i("ul"),g.innerHTML=At,al=a(),k=i("p"),k.innerHTML=Vt,nl=a(),B=i("p"),B.textContent=Wt,il=a(),G=i("p"),G.textContent=Zt,ol=a(),A=i("p"),A.textContent=_t,pl=a(),c(V.$$.fragment),cl=a(),W=i("p"),W.innerHTML=Ht,hl=a(),Z=i("p"),Z.innerHTML=Lt,Ml=a(),_=i("p"),_.textContent=Et,rl=a(),c(H.$$.fragment),ml=a(),L=i("p"),L.innerHTML=Yt,ul=a(),E=i("p"),E.textContent=St,yl=a(),Y=i("p"),Y.innerHTML=Qt,wl=a(),S=i("p"),S.textContent=Xt,Tl=a(),Q=i("ul"),Q.innerHTML=Ft,dl=a(),X=i("p"),X.textContent=Rt,jl=a(),F=i("ul"),F.innerHTML=Ot,fl=a(),R=i("p"),R.textContent=zt,Ul=a(),O=i("p"),O.textContent=Pt,bl=a(),z=i("ul"),z.innerHTML=Dt,Jl=a(),P=i("p"),P.textContent=qt,Cl=a(),c(D.$$.fragment),Il=a(),q=i("p"),q.textContent=Kt,vl=a(),K=i("p"),K.textContent=es,$l=a(),ee=i("p"),ee.textContent=ls,Nl=a(),c(le.$$.fragment),xl=a(),te=i("p"),te.textContent=ts,gl=a(),se=i("p"),se.innerHTML=ss,kl=a(),c(ae.$$.fragment),Bl=a(),ne=i("p"),ne.innerHTML=as,Gl=a(),c(ie.$$.fragment),Al=a(),c(oe.$$.fragment),Vl=a(),pe=i("p"),pe.innerHTML=ns,Wl=a(),ce=i("ol"),ce.innerHTML=is,Zl=a(),he=i("p"),he.innerHTML=os,_l=a(),c(Me.$$.fragment),Hl=a(),re=i("p"),re.textContent=ps,Ll=a(),me=i("ul"),me.innerHTML=cs,El=a(),ue=i("p"),ue.textContent=hs,Yl=a(),c(ye.$$.fragment),Sl=a(),we=i("p"),we.innerHTML=Ms,Ql=a(),Te=i("p"),Te.textContent=rs,Xl=a(),c(de.$$.fragment),Fl=a(),je=i("p"),je.textContent=ms,Rl=a(),c(fe.$$.fragment),Ol=a(),Ue=i("p"),Ue.textContent=us,zl=a(),c(be.$$.fragment),Pl=a(),c(b.$$.fragment),Dl=a(),c(Je.$$.fragment),ql=a(),Ce=i("p"),Ce.innerHTML=ys,Kl=a(),Ie=i("p"),Ie.innerHTML=ws,et=a(),c(ve.$$.fragment),lt=a(),$e=i("p"),$e.textContent=Ts,tt=a(),c(Ne.$$.fragment),st=a(),xe=i("p"),xe.innerHTML=ds,at=a(),c(ge.$$.fragment),nt=a(),J=i("p"),J.innerHTML=js,it=a(),ke=i("p"),ke.innerHTML=fs,ot=a(),Be=i("p"),Be.innerHTML=Us,pt=a(),c(Ge.$$.fragment),ct=a(),Ae=i("p"),Ae.innerHTML=bs,ht=a(),c(Ve.$$.fragment),Mt=a(),c(We.$$.fragment),rt=a(),Ze=i("p"),Ze.innerHTML=Js,mt=a(),c(_e.$$.fragment),ut=a(),He=i("p"),He.textContent=Cs,yt=a(),c(C.$$.fragment),wt=a(),Le=i("p"),Le.textContent=Is,Tt=a(),c(Ee.$$.fragment),dt=a(),Ye=i("p"),Ye.innerHTML=vs,jt=a(),c(Se.$$.fragment),ft=a(),Qe=i("p"),Qe.innerHTML=$s,Ut=a(),c(Xe.$$.fragment),bt=a(),Fe=i("p"),Fe.textContent=Ns,Jt=a(),Re=i("ul"),Re.innerHTML=xs,Ct=a(),Oe=i("p"),Oe.textContent=gs,It=a(),c(ze.$$.fragment),vt=a(),De=i("p"),this.h()},l(e){const l=Ls("svelte-u9bgzb",document.head);y=o(l,"META",{name:!0,content:!0}),l.forEach(t),w=n(e),T=o(e,"P",{}),Gs(T).forEach(t),d=n(e),h(U.$$.fragment,e),qe=n(e),I=o(e,"P",{"data-svelte-h":!0}),p(I)!=="svelte-1gpva7n"&&(I.innerHTML=xt),Ke=n(e),v=o(e,"P",{"data-svelte-h":!0}),p(v)!=="svelte-17gthuj"&&(v.innerHTML=gt),el=n(e),$=o(e,"P",{"data-svelte-h":!0}),p($)!=="svelte-1brqt65"&&($.innerHTML=kt),ll=n(e),N=o(e,"P",{"data-svelte-h":!0}),p(N)!=="svelte-bxzl2y"&&(N.innerHTML=Bt),tl=n(e),x=o(e,"P",{"data-svelte-h":!0}),p(x)!=="svelte-1ht0rpw"&&(x.innerHTML=Gt),sl=n(e),g=o(e,"UL",{"data-svelte-h":!0}),p(g)!=="svelte-o0k9t9"&&(g.innerHTML=At),al=n(e),k=o(e,"P",{"data-svelte-h":!0}),p(k)!=="svelte-19utg6k"&&(k.innerHTML=Vt),nl=n(e),B=o(e,"P",{"data-svelte-h":!0}),p(B)!=="svelte-xqjm40"&&(B.textContent=Wt),il=n(e),G=o(e,"P",{"data-svelte-h":!0}),p(G)!=="svelte-pgddmx"&&(G.textContent=Zt),ol=n(e),A=o(e,"P",{"data-svelte-h":!0}),p(A)!=="svelte-1ih36js"&&(A.textContent=_t),pl=n(e),h(V.$$.fragment,e),cl=n(e),W=o(e,"P",{"data-svelte-h":!0}),p(W)!=="svelte-7db3j2"&&(W.innerHTML=Ht),hl=n(e),Z=o(e,"P",{"data-svelte-h":!0}),p(Z)!=="svelte-1yf7qx3"&&(Z.innerHTML=Lt),Ml=n(e),_=o(e,"P",{"data-svelte-h":!0}),p(_)!=="svelte-3uovh2"&&(_.textContent=Et),rl=n(e),h(H.$$.fragment,e),ml=n(e),L=o(e,"P",{"data-svelte-h":!0}),p(L)!=="svelte-ten2g9"&&(L.innerHTML=Yt),ul=n(e),E=o(e,"P",{"data-svelte-h":!0}),p(E)!=="svelte-4n1dx0"&&(E.textContent=St),yl=n(e),Y=o(e,"P",{"data-svelte-h":!0}),p(Y)!=="svelte-j69uqo"&&(Y.innerHTML=Qt),wl=n(e),S=o(e,"P",{"data-svelte-h":!0}),p(S)!=="svelte-a13ahi"&&(S.textContent=Xt),Tl=n(e),Q=o(e,"UL",{"data-svelte-h":!0}),p(Q)!=="svelte-yqd4ye"&&(Q.innerHTML=Ft),dl=n(e),X=o(e,"P",{"data-svelte-h":!0}),p(X)!=="svelte-1d5pbx1"&&(X.textContent=Rt),jl=n(e),F=o(e,"UL",{"data-svelte-h":!0}),p(F)!=="svelte-esajut"&&(F.innerHTML=Ot),fl=n(e),R=o(e,"P",{"data-svelte-h":!0}),p(R)!=="svelte-19kg2jt"&&(R.textContent=zt),Ul=n(e),O=o(e,"P",{"data-svelte-h":!0}),p(O)!=="svelte-10ycggs"&&(O.textContent=Pt),bl=n(e),z=o(e,"UL",{"data-svelte-h":!0}),p(z)!=="svelte-13jfx6f"&&(z.innerHTML=Dt),Jl=n(e),P=o(e,"P",{"data-svelte-h":!0}),p(P)!=="svelte-1gfp5wb"&&(P.textContent=qt),Cl=n(e),h(D.$$.fragment,e),Il=n(e),q=o(e,"P",{"data-svelte-h":!0}),p(q)!=="svelte-1vbfh4e"&&(q.textContent=Kt),vl=n(e),K=o(e,"P",{"data-svelte-h":!0}),p(K)!=="svelte-3pnikr"&&(K.textContent=es),$l=n(e),ee=o(e,"P",{"data-svelte-h":!0}),p(ee)!=="svelte-peax48"&&(ee.textContent=ls),Nl=n(e),h(le.$$.fragment,e),xl=n(e),te=o(e,"P",{"data-svelte-h":!0}),p(te)!=="svelte-ap9tv8"&&(te.textContent=ts),gl=n(e),se=o(e,"P",{"data-svelte-h":!0}),p(se)!=="svelte-i6ijok"&&(se.innerHTML=ss),kl=n(e),h(ae.$$.fragment,e),Bl=n(e),ne=o(e,"P",{"data-svelte-h":!0}),p(ne)!=="svelte-34litn"&&(ne.innerHTML=as),Gl=n(e),h(ie.$$.fragment,e),Al=n(e),h(oe.$$.fragment,e),Vl=n(e),pe=o(e,"P",{"data-svelte-h":!0}),p(pe)!=="svelte-1ob0ma0"&&(pe.innerHTML=ns),Wl=n(e),ce=o(e,"OL",{"data-svelte-h":!0}),p(ce)!=="svelte-1u4191l"&&(ce.innerHTML=is),Zl=n(e),he=o(e,"P",{"data-svelte-h":!0}),p(he)!=="svelte-16nb7jv"&&(he.innerHTML=os),_l=n(e),h(Me.$$.fragment,e),Hl=n(e),re=o(e,"P",{"data-svelte-h":!0}),p(re)!=="svelte-1a6223y"&&(re.textContent=ps),Ll=n(e),me=o(e,"UL",{"data-svelte-h":!0}),p(me)!=="svelte-1w1rbof"&&(me.innerHTML=cs),El=n(e),ue=o(e,"P",{"data-svelte-h":!0}),p(ue)!=="svelte-3k36mw"&&(ue.textContent=hs),Yl=n(e),h(ye.$$.fragment,e),Sl=n(e),we=o(e,"P",{"data-svelte-h":!0}),p(we)!=="svelte-19qd8g8"&&(we.innerHTML=Ms),Ql=n(e),Te=o(e,"P",{"data-svelte-h":!0}),p(Te)!=="svelte-11lpom8"&&(Te.textContent=rs),Xl=n(e),h(de.$$.fragment,e),Fl=n(e),je=o(e,"P",{"data-svelte-h":!0}),p(je)!=="svelte-zfzeq3"&&(je.textContent=ms),Rl=n(e),h(fe.$$.fragment,e),Ol=n(e),Ue=o(e,"P",{"data-svelte-h":!0}),p(Ue)!=="svelte-11lpom8"&&(Ue.textContent=us),zl=n(e),h(be.$$.fragment,e),Pl=n(e),h(b.$$.fragment,e),Dl=n(e),h(Je.$$.fragment,e),ql=n(e),Ce=o(e,"P",{"data-svelte-h":!0}),p(Ce)!=="svelte-1k1yegn"&&(Ce.innerHTML=ys),Kl=n(e),Ie=o(e,"P",{"data-svelte-h":!0}),p(Ie)!=="svelte-1789np1"&&(Ie.innerHTML=ws),et=n(e),h(ve.$$.fragment,e),lt=n(e),$e=o(e,"P",{"data-svelte-h":!0}),p($e)!=="svelte-ylttvt"&&($e.textContent=Ts),tt=n(e),h(Ne.$$.fragment,e),st=n(e),xe=o(e,"P",{"data-svelte-h":!0}),p(xe)!=="svelte-hjb8vh"&&(xe.innerHTML=ds),at=n(e),h(ge.$$.fragment,e),nt=n(e),J=o(e,"P",{align:!0,"data-svelte-h":!0}),p(J)!=="svelte-1v6yz4b"&&(J.innerHTML=js),it=n(e),ke=o(e,"P",{"data-svelte-h":!0}),p(ke)!=="svelte-1jjhnvu"&&(ke.innerHTML=fs),ot=n(e),Be=o(e,"P",{"data-svelte-h":!0}),p(Be)!=="svelte-n2wiqa"&&(Be.innerHTML=Us),pt=n(e),h(Ge.$$.fragment,e),ct=n(e),Ae=o(e,"P",{"data-svelte-h":!0}),p(Ae)!=="svelte-18b2k5h"&&(Ae.innerHTML=bs),ht=n(e),h(Ve.$$.fragment,e),Mt=n(e),h(We.$$.fragment,e),rt=n(e),Ze=o(e,"P",{"data-svelte-h":!0}),p(Ze)!=="svelte-yzylfb"&&(Ze.innerHTML=Js),mt=n(e),h(_e.$$.fragment,e),ut=n(e),He=o(e,"P",{"data-svelte-h":!0}),p(He)!=="svelte-jrg4yl"&&(He.textContent=Cs),yt=n(e),h(C.$$.fragment,e),wt=n(e),Le=o(e,"P",{"data-svelte-h":!0}),p(Le)!=="svelte-11lpom8"&&(Le.textContent=Is),Tt=n(e),h(Ee.$$.fragment,e),dt=n(e),Ye=o(e,"P",{"data-svelte-h":!0}),p(Ye)!=="svelte-1nerjnd"&&(Ye.innerHTML=vs),jt=n(e),h(Se.$$.fragment,e),ft=n(e),Qe=o(e,"P",{"data-svelte-h":!0}),p(Qe)!=="svelte-17hzr66"&&(Qe.innerHTML=$s),Ut=n(e),h(Xe.$$.fragment,e),bt=n(e),Fe=o(e,"P",{"data-svelte-h":!0}),p(Fe)!=="svelte-eogkf7"&&(Fe.textContent=Ns),Jt=n(e),Re=o(e,"UL",{"data-svelte-h":!0}),p(Re)!=="svelte-h35kw2"&&(Re.innerHTML=xs),Ct=n(e),Oe=o(e,"P",{"data-svelte-h":!0}),p(Oe)!=="svelte-11lpom8"&&(Oe.textContent=gs),It=n(e),h(ze.$$.fragment,e),vt=n(e),De=o(e,"P",{}),Gs(De).forEach(t),this.h()},h(){Nt(y,"name","hf:doc:metadata"),Nt(y,"content",Rs),Nt(J,"align","center")},m(e,l){Es(document.head,y),s(e,w,l),s(e,T,l),s(e,d,l),M(U,e,l),s(e,qe,l),s(e,I,l),s(e,Ke,l),s(e,v,l),s(e,el,l),s(e,$,l),s(e,ll,l),s(e,N,l),s(e,tl,l),s(e,x,l),s(e,sl,l),s(e,g,l),s(e,al,l),s(e,k,l),s(e,nl,l),s(e,B,l),s(e,il,l),s(e,G,l),s(e,ol,l),s(e,A,l),s(e,pl,l),M(V,e,l),s(e,cl,l),s(e,W,l),s(e,hl,l),s(e,Z,l),s(e,Ml,l),s(e,_,l),s(e,rl,l),M(H,e,l),s(e,ml,l),s(e,L,l),s(e,ul,l),s(e,E,l),s(e,yl,l),s(e,Y,l),s(e,wl,l),s(e,S,l),s(e,Tl,l),s(e,Q,l),s(e,dl,l),s(e,X,l),s(e,jl,l),s(e,F,l),s(e,fl,l),s(e,R,l),s(e,Ul,l),s(e,O,l),s(e,bl,l),s(e,z,l),s(e,Jl,l),s(e,P,l),s(e,Cl,l),M(D,e,l),s(e,Il,l),s(e,q,l),s(e,vl,l),s(e,K,l),s(e,$l,l),s(e,ee,l),s(e,Nl,l),M(le,e,l),s(e,xl,l),s(e,te,l),s(e,gl,l),s(e,se,l),s(e,kl,l),M(ae,e,l),s(e,Bl,l),s(e,ne,l),s(e,Gl,l),M(ie,e,l),s(e,Al,l),M(oe,e,l),s(e,Vl,l),s(e,pe,l),s(e,Wl,l),s(e,ce,l),s(e,Zl,l),s(e,he,l),s(e,_l,l),M(Me,e,l),s(e,Hl,l),s(e,re,l),s(e,Ll,l),s(e,me,l),s(e,El,l),s(e,ue,l),s(e,Yl,l),M(ye,e,l),s(e,Sl,l),s(e,we,l),s(e,Ql,l),s(e,Te,l),s(e,Xl,l),M(de,e,l),s(e,Fl,l),s(e,je,l),s(e,Rl,l),M(fe,e,l),s(e,Ol,l),s(e,Ue,l),s(e,zl,l),M(be,e,l),s(e,Pl,l),M(b,e,l),s(e,Dl,l),M(Je,e,l),s(e,ql,l),s(e,Ce,l),s(e,Kl,l),s(e,Ie,l),s(e,et,l),M(ve,e,l),s(e,lt,l),s(e,$e,l),s(e,tt,l),M(Ne,e,l),s(e,st,l),s(e,xe,l),s(e,at,l),M(ge,e,l),s(e,nt,l),s(e,J,l),s(e,it,l),s(e,ke,l),s(e,ot,l),s(e,Be,l),s(e,pt,l),M(Ge,e,l),s(e,ct,l),s(e,Ae,l),s(e,ht,l),M(Ve,e,l),s(e,Mt,l),M(We,e,l),s(e,rt,l),s(e,Ze,l),s(e,mt,l),M(_e,e,l),s(e,ut,l),s(e,He,l),s(e,yt,l),M(C,e,l),s(e,wt,l),s(e,Le,l),s(e,Tt,l),M(Ee,e,l),s(e,dt,l),s(e,Ye,l),s(e,jt,l),M(Se,e,l),s(e,ft,l),s(e,Qe,l),s(e,Ut,l),M(Xe,e,l),s(e,bt,l),s(e,Fe,l),s(e,Jt,l),s(e,Re,l),s(e,Ct,l),s(e,Oe,l),s(e,It,l),M(ze,e,l),s(e,vt,l),s(e,De,l),$t=!0},p(e,[l]){const ks={};l&2&&(ks.$$scope={dirty:l,ctx:e}),b.$set(ks);const Bs={};l&2&&(Bs.$$scope={dirty:l,ctx:e}),C.$set(Bs)},i(e){$t||(r(U.$$.fragment,e),r(V.$$.fragment,e),r(H.$$.fragment,e),r(D.$$.fragment,e),r(le.$$.fragment,e),r(ae.$$.fragment,e),r(ie.$$.fragment,e),r(oe.$$.fragment,e),r(Me.$$.fragment,e),r(ye.$$.fragment,e),r(de.$$.fragment,e),r(fe.$$.fragment,e),r(be.$$.fragment,e),r(b.$$.fragment,e),r(Je.$$.fragment,e),r(ve.$$.fragment,e),r(Ne.$$.fragment,e),r(ge.$$.fragment,e),r(Ge.$$.fragment,e),r(Ve.$$.fragment,e),r(We.$$.fragment,e),r(_e.$$.fragment,e),r(C.$$.fragment,e),r(Ee.$$.fragment,e),r(Se.$$.fragment,e),r(Xe.$$.fragment,e),r(ze.$$.fragment,e),$t=!0)},o(e){m(U.$$.fragment,e),m(V.$$.fragment,e),m(H.$$.fragment,e),m(D.$$.fragment,e),m(le.$$.fragment,e),m(ae.$$.fragment,e),m(ie.$$.fragment,e),m(oe.$$.fragment,e),m(Me.$$.fragment,e),m(ye.$$.fragment,e),m(de.$$.fragment,e),m(fe.$$.fragment,e),m(be.$$.fragment,e),m(b.$$.fragment,e),m(Je.$$.fragment,e),m(ve.$$.fragment,e),m(Ne.$$.fragment,e),m(ge.$$.fragment,e),m(Ge.$$.fragment,e),m(Ve.$$.fragment,e),m(We.$$.fragment,e),m(_e.$$.fragment,e),m(C.$$.fragment,e),m(Ee.$$.fragment,e),m(Se.$$.fragment,e),m(Xe.$$.fragment,e),m(ze.$$.fragment,e),$t=!1},d(e){e&&(t(w),t(T),t(d),t(qe),t(I),t(Ke),t(v),t(el),t($),t(ll),t(N),t(tl),t(x),t(sl),t(g),t(al),t(k),t(nl),t(B),t(il),t(G),t(ol),t(A),t(pl),t(cl),t(W),t(hl),t(Z),t(Ml),t(_),t(rl),t(ml),t(L),t(ul),t(E),t(yl),t(Y),t(wl),t(S),t(Tl),t(Q),t(dl),t(X),t(jl),t(F),t(fl),t(R),t(Ul),t(O),t(bl),t(z),t(Jl),t(P),t(Cl),t(Il),t(q),t(vl),t(K),t($l),t(ee),t(Nl),t(xl),t(te),t(gl),t(se),t(kl),t(Bl),t(ne),t(Gl),t(Al),t(Vl),t(pe),t(Wl),t(ce),t(Zl),t(he),t(_l),t(Hl),t(re),t(Ll),t(me),t(El),t(ue),t(Yl),t(Sl),t(we),t(Ql),t(Te),t(Xl),t(Fl),t(je),t(Rl),t(Ol),t(Ue),t(zl),t(Pl),t(Dl),t(ql),t(Ce),t(Kl),t(Ie),t(et),t(lt),t($e),t(tt),t(st),t(xe),t(at),t(nt),t(J),t(it),t(ke),t(ot),t(Be),t(pt),t(ct),t(Ae),t(ht),t(Mt),t(rt),t(Ze),t(mt),t(ut),t(He),t(yt),t(wt),t(Le),t(Tt),t(dt),t(Ye),t(jt),t(ft),t(Qe),t(Ut),t(bt),t(Fe),t(Jt),t(Re),t(Ct),t(Oe),t(It),t(vt),t(De)),t(y),u(U,e),u(V,e),u(H,e),u(D,e),u(le,e),u(ae,e),u(ie,e),u(oe,e),u(Me,e),u(ye,e),u(de,e),u(fe,e),u(be,e),u(b,e),u(Je,e),u(ve,e),u(Ne,e),u(ge,e),u(Ge,e),u(Ve,e),u(We,e),u(_e,e),u(C,e),u(Ee,e),u(Se,e),u(Xe,e),u(ze,e)}}}const Rs='{"title":"Neuron Model Cache","local":"neuron-model-cache","sections":[{"title":"How to use the Neuron model cache","local":"how-to-use-the-neuron-model-cache","sections":[],"depth":2},{"title":"How caching works","local":"how-caching-works","sections":[],"depth":2},{"title":"Neuron model cache lookup (inferentia only)","local":"neuron-model-cache-lookup-inferentia-only","sections":[],"depth":2},{"title":"Advanced usage (trainium only)","local":"advanced-usage-trainium-only","sections":[{"title":"How to use a private Neuron model cache (trainium only)","local":"how-to-use-a-private-neuron-model-cache-trainium-only","sections":[{"title":"Using the Optimum CLI","local":"using-the-optimum-cli","sections":[],"depth":4},{"title":"Using the environment variable CUSTOM_CACHE_REPO","local":"using-the-environment-variable-customcacherepo","sections":[],"depth":4}],"depth":3},{"title":"Cache system flow","local":"cache-system-flow","sections":[],"depth":3}],"depth":2},{"title":"Optimum CLI","local":"optimum-cli","sections":[{"title":"Add a model to the cache (trainium only)","local":"add-a-model-to-the-cache-trainium-only","sections":[],"depth":3},{"title":"List a cache repo","local":"list-a-cache-repo","sections":[],"depth":3}],"depth":2}],"depth":1}';function Os(Pe){return Zs(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class ea extends _s{constructor(y){super(),Hs(this,y,Os,Fs,Ws,{})}}export{ea as component};

Xet Storage Details

Size:
45 kB
·
Xet hash:
c201113fb5a04ee9f6b9fbeb459f1b7f68c9aa43773629b810da2f94bb9ec5d5

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.