import{S as $n,i as yn,s as bn,e as r,k as m,w as d,t as l,M as kn,c as a,d as t,m as f,a as n,x as c,h as i,b as u,G as s,g as p,y as g,q as v,o as w,B as _,v as En}from"../chunks/vendor-hf-doc-builder.js";import{T as wn}from"../chunks/Tip-hf-doc-builder.js";import{Y as _n}from"../chunks/Youtube-hf-doc-builder.js";import{I as pe}from"../chunks/IconCopyLink-hf-doc-builder.js";import{C as j}from"../chunks/CodeBlock-hf-doc-builder.js";function jn(He){let h,T,$,k,A;return{c(){h=r("p"),T=l("Refer to the Performance "),$=r("a"),k=l("guide"),A=l(" for more details about memory-saving techniques."),this.h()},l(y){h=a(y,"P",{});var b=n(h);T=i(b,"Refer to the Performance "),$=a(b,"A",{href:!0});var C=n($);k=i(C,"guide"),C.forEach(t),A=i(b," for more details about memory-saving techniques."),b.forEach(t),this.h()},h(){u($,"href","performance")},m(y,b){p(y,h,b),s(h,T),s(h,$),s($,k),s(h,A)},d(y){y&&t(h)}}}function An(He){let h,T,$,k,A;return{c(){h=r("p"),T=l("By default, the tokenizer creates an "),$=r("code"),k=l("attention_mask"),A=l(" for you based on your specific tokenizer\u2019s defaults.")},l(y){h=a(y,"P",{});var b=n(h);T=i(b,"By default, the tokenizer creates an "),$=a(b,"CODE",{});var C=n($);k=i(C,"attention_mask"),C.forEach(t),A=i(b," for you based on your specific tokenizer\u2019s defaults."),b.forEach(t)},m(y,b){p(y,h,b),s(h,T),s(h,$),s($,k),s(h,A)},d(y){y&&t(h)}}}function Tn(He){let h,T,$,k,A,y,b,C,po,Xt,Oe,mo,Zt,me,Jt,Ve,F,fo,fe,uo,ho,ue,co,go,he,vo,wo,Kt,de,Wt,U,gt,ce,_o,ge,$o,yo,bo,vt,ve,ko,Ye,Eo,jo,es,O,Ao,we,To,Po,ts,q,V,wt,_e,Co,_t,Fo,ss,Re,Io,os,$e,rs,Y,Mo,Qe,Uo,qo,as,S,R,$t,ye,So,yt,xo,ns,Xe,Do,ls,be,is,Ze,Bo,ps,Q,x,Go,Je,bt,No,zo,Ke,Lo,Ho,Oo,D,Vo,We,kt,Yo,Ro,et,Qo,Xo,ms,X,fs,B,Z,Et,ke,Zo,jt,Jo,us,J,Ko,Ee,Wo,er,hs,tt,I,tr,At,sr,or,je,Tt,rr,ar,st,nr,lr,ds,Ae,cs,ot,G,ir,Pt,pr,mr,rt,fr,ur,gs,Te,vs,N,K,Ct,Pe,hr,Ft,dr,ws,W,cr,It,gr,vr,_s,Ce,$s,at,wr,ys,Fe,bs,z,ee,Mt,Ie,_r,Ut,$r,ks,nt,yr,Es,Me,js,lt,br,As,Ue,Ts,it,kr,Ps,qe,Cs,L,te,qt,Se,Er,St,jr,Fs,E,Ar,xt,Tr,Pr,Dt,Cr,Fr,Bt,Ir,Mr,Gt,Ur,qr,Nt,Sr,xr,Is,xe,Ms,pt,Dr,Us,De,qs,mt,Br,Ss,Be,xs,se,Gr,zt,Nr,zr,Ds,oe,Bs,Ge,Gs,re,Lr,Lt,Hr,Or,Ns,ae,Ht,Vr,Yr,Ot,Rr,zs,H,ne,Vt,Ne,Qr,Yt,Xr,Ls,M,Zr,ft,Jr,Kr,Rt,Wr,ea,Hs,ze,Os;return y=new pe({}),me=new _n({props:{id:"S2EEG3JIt2A"}}),de=new _n({props:{id:"_PAli-V4wj0"}}),_e=new pe({}),$e=new j({props:{code:`ValueError: Connection error, and we cannot find the requested files in the cached path.
Please try again or make sure your Internet connection is on.`,highlighted:`ValueError: Connection error, <span class="hljs-built_in">and</span> we cannot <span class="hljs-keyword">find</span> the requested <span class="hljs-keyword">files</span> in the cached path.
Please <span class="hljs-keyword">try</span> again <span class="hljs-built_in">or</span> <span class="hljs-keyword">make</span> sure your Internet connection <span class="hljs-keyword">is</span> <span class="hljs-keyword">on</span>.`}}),ye=new pe({}),be=new j({props:{code:"CUDA out of memory. Tried to allocate 256.00 MiB (GPU 0; 11.17 GiB total capacity; 9.70 GiB already allocated; 179.81 MiB free; 9.85 GiB reserved in total by PyTorch)",highlighted:'<span class="hljs-attribute">CUDA</span> out of memory. Tried to allocate <span class="hljs-number">256</span>.<span class="hljs-number">00</span> MiB (GPU <span class="hljs-number">0</span>; <span class="hljs-number">11</span>.<span class="hljs-number">17</span> GiB total capacity; <span class="hljs-number">9</span>.<span class="hljs-number">70</span> GiB already allocated; <span class="hljs-number">179</span>.<span class="hljs-number">81</span> MiB free; <span class="hljs-number">9</span>.<span class="hljs-number">85</span> GiB reserved in total by PyTorch)'}}),X=new wn({props:{$$slots:{default:[jn]},$$scope:{ctx:He}}}),ke=new pe({}),Ae=new j({props:{code:`from transformers import TFPreTrainedModel
from tensorflow import keras

model.save_weights("some_folder/tf_model.h5")
model = TFPreTrainedModel.from_pretrained("some_folder")`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> TFPreTrainedModel
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> tensorflow <span class="hljs-keyword">import</span> keras

<span class="hljs-meta">&gt;&gt;&gt; </span>model.save_weights(<span class="hljs-string">&quot;some_folder/tf_model.h5&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFPreTrainedModel.from_pretrained(<span class="hljs-string">&quot;some_folder&quot;</span>)`}}),Te=new j({props:{code:`from transformers import TFPreTrainedModel

model.save_pretrained("path_to/model")
model = TFPreTrainedModel.from_pretrained("path_to/model")`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> TFPreTrainedModel

<span class="hljs-meta">&gt;&gt;&gt; </span>model.save_pretrained(<span class="hljs-string">&quot;path_to/model&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFPreTrainedModel.from_pretrained(<span class="hljs-string">&quot;path_to/model&quot;</span>)`}}),Pe=new pe({}),Ce=new j({props:{code:"ImportError: cannot import name 'ImageGPTImageProcessor' from 'transformers' (unknown location)",highlighted:'ImportError: cannot <span class="hljs-keyword">import</span> <span class="hljs-type">name</span> <span class="hljs-string">&#x27;ImageGPTImageProcessor&#x27;</span> <span class="hljs-keyword">from</span> <span class="hljs-string">&#x27;transformers&#x27;</span> (<span class="hljs-type">unknown</span> <span class="hljs-keyword">location</span>)'}}),Fe=new j({props:{code:"pip install transformers --upgrade",highlighted:"pip install transformers --upgrade"}}),Ie=new pe({}),Me=new j({props:{code:"RuntimeError: CUDA error: device-side assert triggered",highlighted:'RuntimeError: CUDA <span class="hljs-literal">error</span>: device-<span class="hljs-literal">side</span> <span class="hljs-keyword">assert</span> triggered'}}),Ue=new j({props:{code:`import os

os.environ["CUDA_VISIBLE_DEVICES"] = ""`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> os

<span class="hljs-meta">&gt;&gt;&gt; </span>os.environ[<span class="hljs-string">&quot;CUDA_VISIBLE_DEVICES&quot;</span>] = <span class="hljs-string">&quot;&quot;</span>`}}),qe=new j({props:{code:`import os

os.environ["CUDA_LAUNCH_BLOCKING"] = "1"`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> os

<span class="hljs-meta">&gt;&gt;&gt; </span>os.environ[<span class="hljs-string">&quot;CUDA_LAUNCH_BLOCKING&quot;</span>] = <span class="hljs-string">&quot;1&quot;</span>`}}),Se=new pe({}),xe=new j({props:{code:`from transformers import AutoModelForSequenceClassification
import torch

model = AutoModelForSequenceClassification.from_pretrained("bert-base-uncased")
model.config.pad_token_id`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoModelForSequenceClassification
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch

<span class="hljs-meta">&gt;&gt;&gt; </span>model = AutoModelForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;bert-base-uncased&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model.config.pad_token_id
<span class="hljs-number">0</span>`}}),De=new j({props:{code:`input_ids = torch.tensor([[7592, 2057, 2097, 2393, 9611, 2115], [7592, 0, 0, 0, 0, 0]])
output = model(input_ids)
print(output.logits)`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span>input_ids = torch.tensor([[<span class="hljs-number">7592</span>, <span class="hljs-number">2057</span>, <span class="hljs-number">2097</span>, <span class="hljs-number">2393</span>, <span class="hljs-number">9611</span>, <span class="hljs-number">2115</span>], [<span class="hljs-number">7592</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>]])
<span class="hljs-meta">&gt;&gt;&gt; </span>output = model(input_ids)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">print</span>(output.logits)
tensor([[ <span class="hljs-number">0.0082</span>, -<span class="hljs-number">0.2307</span>],
        [ <span class="hljs-number">0.1317</span>, -<span class="hljs-number">0.1683</span>]], grad_fn=&lt;AddmmBackward0&gt;)`}}),Be=new j({props:{code:`input_ids = torch.tensor([[7592]])
output = model(input_ids)
print(output.logits)`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span>input_ids = torch.tensor([[<span class="hljs-number">7592</span>]])
<span class="hljs-meta">&gt;&gt;&gt; </span>output = model(input_ids)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">print</span>(output.logits)
tensor([[-<span class="hljs-number">0.1008</span>, -<span class="hljs-number">0.4061</span>]], grad_fn=&lt;AddmmBackward0&gt;)`}}),oe=new wn({props:{$$slots:{default:[An]},$$scope:{ctx:He}}}),Ge=new j({props:{code:`attention_mask = torch.tensor([[1, 1, 1, 1, 1, 1], [1, 0, 0, 0, 0, 0]])
output = model(input_ids, attention_mask=attention_mask)
print(output.logits)`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span>attention_mask = torch.tensor([[<span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>], [<span class="hljs-number">1</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>]])
<span class="hljs-meta">&gt;&gt;&gt; </span>output = model(input_ids, attention_mask=attention_mask)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">print</span>(output.logits)
tensor([[ <span class="hljs-number">0.0082</span>, -<span class="hljs-number">0.2307</span>],
        [-<span class="hljs-number">0.1008</span>, -<span class="hljs-number">0.4061</span>]], grad_fn=&lt;AddmmBackward0&gt;)`}}),Ne=new pe({}),ze=new j({props:{code:`from transformers import AutoProcessor, AutoModelForQuestionAnswering

processor = AutoProcessor.from_pretrained("gpt2-medium")
model = AutoModelForQuestionAnswering.from_pretrained("gpt2-medium")`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoProcessor, AutoModelForQuestionAnswering

<span class="hljs-meta">&gt;&gt;&gt; </span>processor = AutoProcessor.from_pretrained(<span class="hljs-string">&quot;gpt2-medium&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = AutoModelForQuestionAnswering.from_pretrained(<span class="hljs-string">&quot;gpt2-medium&quot;</span>)
ValueError: Unrecognized configuration <span class="hljs-keyword">class</span> &lt;<span class="hljs-keyword">class</span> <span class="hljs-string">&#x27;transformers.models.gpt2.configuration_gpt2.GPT2Config&#x27;</span>&gt; <span class="hljs-keyword">for</span> this kind of AutoModel: AutoModelForQuestionAnswering.
Model <span class="hljs-built_in">type</span> should be one of AlbertConfig, BartConfig, BertConfig, BigBirdConfig, BigBirdPegasusConfig, BloomConfig, ...`}}),{c(){h=r("meta"),T=m(),$=r("h1"),k=r("a"),A=r("span"),d(y.$$.fragment),b=m(),C=r("span"),po=l("Troubleshoot"),Xt=m(),Oe=r("p"),mo=l("Sometimes errors occur, but we are here to help! This guide covers some of the most common issues we\u2019ve seen and how you can resolve them. However, this guide isn\u2019t meant to be a comprehensive collection of every \u{1F917} Transformers issue. For more help with troubleshooting your issue, try:"),Zt=m(),d(me.$$.fragment),Jt=m(),Ve=r("ol"),F=r("li"),fo=l("Asking for help on the "),fe=r("a"),uo=l("forums"),ho=l(". There are specific categories you can post your question to, like "),ue=r("a"),co=l("Beginners"),go=l(" or "),he=r("a"),vo=l("\u{1F917} Transformers"),wo=l(". Make sure you write a good descriptive forum post with some reproducible code to maximize the likelihood that your problem is solved!"),Kt=m(),d(de.$$.fragment),Wt=m(),U=r("ol"),gt=r("li"),ce=r("p"),_o=l("Create an "),ge=r("a"),$o=l("Issue"),yo=l(" on the \u{1F917} Transformers repository if it is a bug related to the library. Try to include as much information describing the bug as possible to help us better figure out what\u2019s wrong and how we can fix it."),bo=m(),vt=r("li"),ve=r("p"),ko=l("Check the "),Ye=r("a"),Eo=l("Migration"),jo=l(" guide if you use an older version of \u{1F917} Transformers since some important changes have been introduced between versions."),es=m(),O=r("p"),Ao=l("For more details about troubleshooting and getting help, take a look at "),we=r("a"),To=l("Chapter 8"),Po=l(" of the Hugging Face course."),ts=m(),q=r("h2"),V=r("a"),wt=r("span"),d(_e.$$.fragment),Co=m(),_t=r("span"),Fo=l("Firewalled environments"),ss=m(),Re=r("p"),Io=l("Some GPU instances on cloud and intranet setups are firewalled to external connections, resulting in a connection error. When your script attempts to download model weights or datasets, the download will hang and then timeout with the following message:"),os=m(),d($e.$$.fragment),rs=m(),Y=r("p"),Mo=l("In this case, you should try to run \u{1F917} Transformers on "),Qe=r("a"),Uo=l("offline mode"),qo=l(" to avoid the connection error."),as=m(),S=r("h2"),R=r("a"),$t=r("span"),d(ye.$$.fragment),So=m(),yt=r("span"),xo=l("CUDA out of memory"),ns=m(),Xe=r("p"),Do=l("Training large models with millions of parameters can be challenging without the appropriate hardware. A common error you may encounter when the GPU runs out of memory is:"),ls=m(),d(be.$$.fragment),is=m(),Ze=r("p"),Bo=l("Here are some potential solutions you can try to lessen memory use:"),ps=m(),Q=r("ul"),x=r("li"),Go=l("Reduce the "),Je=r("a"),bt=r("code"),No=l("per_device_train_batch_size"),zo=l(" value in "),Ke=r("a"),Lo=l("TrainingArguments"),Ho=l("."),Oo=m(),D=r("li"),Vo=l("Try using "),We=r("a"),kt=r("code"),Yo=l("gradient_accumulation_steps"),Ro=l(" in "),et=r("a"),Qo=l("TrainingArguments"),Xo=l(" to effectively increase overall batch size."),ms=m(),d(X.$$.fragment),fs=m(),B=r("h2"),Z=r("a"),Et=r("span"),d(ke.$$.fragment),Zo=m(),jt=r("span"),Jo=l("Unable to load a saved TensorFlow model"),us=m(),J=r("p"),Ko=l("TensorFlow\u2019s "),Ee=r("a"),Wo=l("model.save"),er=l(" method will save the entire model - architecture, weights, training configuration - in a single file. However, when you load the model file again, you may run into an error because \u{1F917} Transformers may not load all the TensorFlow-related objects in the model file. To avoid issues with saving and loading TensorFlow models, we recommend you:"),hs=m(),tt=r("ul"),I=r("li"),tr=l("Save the model weights as a "),At=r("code"),sr=l("h5"),or=l(" file extension with "),je=r("a"),Tt=r("code"),rr=l("model.save_weights"),ar=l(" and then reload the model with "),st=r("a"),nr=l("from_pretrained()"),lr=l(":"),ds=m(),d(Ae.$$.fragment),cs=m(),ot=r("ul"),G=r("li"),ir=l("Save the model with "),Pt=r("code"),pr=l("~TFPretrainedModel.save_pretrained"),mr=l(" and load it again with "),rt=r("a"),fr=l("from_pretrained()"),ur=l(":"),gs=m(),d(Te.$$.fragment),vs=m(),N=r("h2"),K=r("a"),Ct=r("span"),d(Pe.$$.fragment),hr=m(),Ft=r("span"),dr=l("ImportError"),ws=m(),W=r("p"),cr=l("Another common error you may encounter, especially if it is a newly released model, is "),It=r("code"),gr=l("ImportError"),vr=l(":"),_s=m(),d(Ce.$$.fragment),$s=m(),at=r("p"),wr=l("For these error types, check to make sure you have the latest version of \u{1F917} Transformers installed to access the most recent models:"),ys=m(),d(Fe.$$.fragment),bs=m(),z=r("h2"),ee=r("a"),Mt=r("span"),d(Ie.$$.fragment),_r=m(),Ut=r("span"),$r=l("CUDA error: device-side assert triggered"),ks=m(),nt=r("p"),yr=l("Sometimes you may run into a generic CUDA error about an error in the device code."),Es=m(),d(Me.$$.fragment),js=m(),lt=r("p"),br=l("You should try to run the code on a CPU first to get a more descriptive error message. Add the following environment variable to the beginning of your code to switch to a CPU:"),As=m(),d(Ue.$$.fragment),Ts=m(),it=r("p"),kr=l("Another option is to get a better traceback from the GPU. Add the following environment variable to the beginning of your code to get the traceback to point to the source of the error:"),Ps=m(),d(qe.$$.fragment),Cs=m(),L=r("h2"),te=r("a"),qt=r("span"),d(Se.$$.fragment),Er=m(),St=r("span"),jr=l("Incorrect output when padding tokens aren't masked"),Fs=m(),E=r("p"),Ar=l("In some cases, the output "),xt=r("code"),Tr=l("hidden_state"),Pr=l(" may be incorrect if the "),Dt=r("code"),Cr=l("input_ids"),Fr=l(" include padding tokens. To demonstrate, load a model and tokenizer. You can access a model\u2019s "),Bt=r("code"),Ir=l("pad_token_id"),Mr=l(" to see its value. The "),Gt=r("code"),Ur=l("pad_token_id"),qr=l(" may be "),Nt=r("code"),Sr=l("None"),xr=l(" for some models, but you can always manually set it."),Is=m(),d(xe.$$.fragment),Ms=m(),pt=r("p"),Dr=l("The following example shows the output without masking the padding tokens:"),Us=m(),d(De.$$.fragment),qs=m(),mt=r("p"),Br=l("Here is the actual output of the second sequence:"),Ss=m(),d(Be.$$.fragment),xs=m(),se=r("p"),Gr=l("Most of the time, you should provide an "),zt=r("code"),Nr=l("attention_mask"),zr=l(" to your model to ignore the padding tokens to avoid this silent error. Now the output of the second sequence matches its actual output:"),Ds=m(),d(oe.$$.fragment),Bs=m(),d(Ge.$$.fragment),Gs=m(),re=r("p"),Lr=l("\u{1F917} Transformers doesn\u2019t automatically create an "),Lt=r("code"),Hr=l("attention_mask"),Or=l(" to mask a padding token if it is provided because:"),Ns=m(),ae=r("ul"),Ht=r("li"),Vr=l("Some models don\u2019t have a padding token."),Yr=m(),Ot=r("li"),Rr=l("For some use-cases, users want a model to attend to a padding token."),zs=m(),H=r("h2"),ne=r("a"),Vt=r("span"),d(Ne.$$.fragment),Qr=m(),Yt=r("span"),Xr=l("ValueError: Unrecognized configuration class XYZ for this kind of AutoModel"),Ls=m(),M=r("p"),Zr=l("Generally, we recommend using the "),ft=r("a"),Jr=l("AutoModel"),Kr=l(` class to load pretrained instances of models. This class
can automatically infer and load the correct architecture from a given checkpoint based on the configuration. If you see
this `),Rt=r("code"),Wr=l("ValueError"),ea=l(` when loading a model from a checkpoint, this means the Auto class couldn\u2019t find a mapping from
the configuration in the given checkpoint to the kind of model you are trying to load. Most commonly, this happens when a
checkpoint doesn\u2019t support a given task.
For instance, you\u2019ll see this error in the following example because there is no GPT2 for question answering:`),Hs=m(),d(ze.$$.fragment),this.h()},l(e){const o=kn('[data-svelte="svelte-1phssyn"]',document.head);h=a(o,"META",{name:!0,content:!0}),o.forEach(t),T=f(e),$=a(e,"H1",{class:!0});var Le=n($);k=a(Le,"A",{id:!0,class:!0,href:!0});var Qt=n(k);A=a(Qt,"SPAN",{});var ta=n(A);c(y.$$.fragment,ta),ta.forEach(t),Qt.forEach(t),b=f(Le),C=a(Le,"SPAN",{});var sa=n(C);po=i(sa,"Troubleshoot"),sa.forEach(t),Le.forEach(t),Xt=f(e),Oe=a(e,"P",{});var oa=n(Oe);mo=i(oa,"Sometimes errors occur, but we are here to help! This guide covers some of the most common issues we\u2019ve seen and how you can resolve them. However, this guide isn\u2019t meant to be a comprehensive collection of every \u{1F917} Transformers issue. For more help with troubleshooting your issue, try:"),oa.forEach(t),Zt=f(e),c(me.$$.fragment,e),Jt=f(e),Ve=a(e,"OL",{});var ra=n(Ve);F=a(ra,"LI",{});var le=n(F);fo=i(le,"Asking for help on the "),fe=a(le,"A",{href:!0,rel:!0});var aa=n(fe);uo=i(aa,"forums"),aa.forEach(t),ho=i(le,". There are specific categories you can post your question to, like "),ue=a(le,"A",{href:!0,rel:!0});var na=n(ue);co=i(na,"Beginners"),na.forEach(t),go=i(le," or "),he=a(le,"A",{href:!0,rel:!0});var la=n(he);vo=i(la,"\u{1F917} Transformers"),la.forEach(t),wo=i(le,". Make sure you write a good descriptive forum post with some reproducible code to maximize the likelihood that your problem is solved!"),le.forEach(t),ra.forEach(t),Kt=f(e),c(de.$$.fragment,e),Wt=f(e),U=a(e,"OL",{start:!0});var Vs=n(U);gt=a(Vs,"LI",{});var ia=n(gt);ce=a(ia,"P",{});var Ys=n(ce);_o=i(Ys,"Create an "),ge=a(Ys,"A",{href:!0,rel:!0});var pa=n(ge);$o=i(pa,"Issue"),pa.forEach(t),yo=i(Ys," on the \u{1F917} Transformers repository if it is a bug related to the library. Try to include as much information describing the bug as possible to help us better figure out what\u2019s wrong and how we can fix it."),Ys.forEach(t),ia.forEach(t),bo=f(Vs),vt=a(Vs,"LI",{});var ma=n(vt);ve=a(ma,"P",{});var Rs=n(ve);ko=i(Rs,"Check the "),Ye=a(Rs,"A",{href:!0});var fa=n(Ye);Eo=i(fa,"Migration"),fa.forEach(t),jo=i(Rs," guide if you use an older version of \u{1F917} Transformers since some important changes have been introduced between versions."),Rs.forEach(t),ma.forEach(t),Vs.forEach(t),es=f(e),O=a(e,"P",{});var Qs=n(O);Ao=i(Qs,"For more details about troubleshooting and getting help, take a look at "),we=a(Qs,"A",{href:!0,rel:!0});var ua=n(we);To=i(ua,"Chapter 8"),ua.forEach(t),Po=i(Qs," of the Hugging Face course."),Qs.forEach(t),ts=f(e),q=a(e,"H2",{class:!0});var Xs=n(q);V=a(Xs,"A",{id:!0,class:!0,href:!0});var ha=n(V);wt=a(ha,"SPAN",{});var da=n(wt);c(_e.$$.fragment,da),da.forEach(t),ha.forEach(t),Co=f(Xs),_t=a(Xs,"SPAN",{});var ca=n(_t);Fo=i(ca,"Firewalled environments"),ca.forEach(t),Xs.forEach(t),ss=f(e),Re=a(e,"P",{});var ga=n(Re);Io=i(ga,"Some GPU instances on cloud and intranet setups are firewalled to external connections, resulting in a connection error. When your script attempts to download model weights or datasets, the download will hang and then timeout with the following message:"),ga.forEach(t),os=f(e),c($e.$$.fragment,e),rs=f(e),Y=a(e,"P",{});var Zs=n(Y);Mo=i(Zs,"In this case, you should try to run \u{1F917} Transformers on "),Qe=a(Zs,"A",{href:!0});var va=n(Qe);Uo=i(va,"offline mode"),va.forEach(t),qo=i(Zs," to avoid the connection error."),Zs.forEach(t),as=f(e),S=a(e,"H2",{class:!0});var Js=n(S);R=a(Js,"A",{id:!0,class:!0,href:!0});var wa=n(R);$t=a(wa,"SPAN",{});var _a=n($t);c(ye.$$.fragment,_a),_a.forEach(t),wa.forEach(t),So=f(Js),yt=a(Js,"SPAN",{});var $a=n(yt);xo=i($a,"CUDA out of memory"),$a.forEach(t),Js.forEach(t),ns=f(e),Xe=a(e,"P",{});var ya=n(Xe);Do=i(ya,"Training large models with millions of parameters can be challenging without the appropriate hardware. A common error you may encounter when the GPU runs out of memory is:"),ya.forEach(t),ls=f(e),c(be.$$.fragment,e),is=f(e),Ze=a(e,"P",{});var ba=n(Ze);Bo=i(ba,"Here are some potential solutions you can try to lessen memory use:"),ba.forEach(t),ps=f(e),Q=a(e,"UL",{});var Ks=n(Q);x=a(Ks,"LI",{});var ut=n(x);Go=i(ut,"Reduce the "),Je=a(ut,"A",{href:!0});var ka=n(Je);bt=a(ka,"CODE",{});var Ea=n(bt);No=i(Ea,"per_device_train_batch_size"),Ea.forEach(t),ka.forEach(t),zo=i(ut," value in "),Ke=a(ut,"A",{href:!0});var ja=n(Ke);Lo=i(ja,"TrainingArguments"),ja.forEach(t),Ho=i(ut,"."),ut.forEach(t),Oo=f(Ks),D=a(Ks,"LI",{});var ht=n(D);Vo=i(ht,"Try using "),We=a(ht,"A",{href:!0});var Aa=n(We);kt=a(Aa,"CODE",{});var Ta=n(kt);Yo=i(Ta,"gradient_accumulation_steps"),Ta.forEach(t),Aa.forEach(t),Ro=i(ht," in "),et=a(ht,"A",{href:!0});var Pa=n(et);Qo=i(Pa,"TrainingArguments"),Pa.forEach(t),Xo=i(ht," to effectively increase overall batch size."),ht.forEach(t),Ks.forEach(t),ms=f(e),c(X.$$.fragment,e),fs=f(e),B=a(e,"H2",{class:!0});var Ws=n(B);Z=a(Ws,"A",{id:!0,class:!0,href:!0});var Ca=n(Z);Et=a(Ca,"SPAN",{});var Fa=n(Et);c(ke.$$.fragment,Fa),Fa.forEach(t),Ca.forEach(t),Zo=f(Ws),jt=a(Ws,"SPAN",{});var Ia=n(jt);Jo=i(Ia,"Unable to load a saved TensorFlow model"),Ia.forEach(t),Ws.forEach(t),us=f(e),J=a(e,"P",{});var eo=n(J);Ko=i(eo,"TensorFlow\u2019s "),Ee=a(eo,"A",{href:!0,rel:!0});var Ma=n(Ee);Wo=i(Ma,"model.save"),Ma.forEach(t),er=i(eo," method will save the entire model - architecture, weights, training configuration - in a single file. However, when you load the model file again, you may run into an error because \u{1F917} Transformers may not load all the TensorFlow-related objects in the model file. To avoid issues with saving and loading TensorFlow models, we recommend you:"),eo.forEach(t),hs=f(e),tt=a(e,"UL",{});var Ua=n(tt);I=a(Ua,"LI",{});var ie=n(I);tr=i(ie,"Save the model weights as a "),At=a(ie,"CODE",{});var qa=n(At);sr=i(qa,"h5"),qa.forEach(t),or=i(ie," file extension with "),je=a(ie,"A",{href:!0,rel:!0});var Sa=n(je);Tt=a(Sa,"CODE",{});var xa=n(Tt);rr=i(xa,"model.save_weights"),xa.forEach(t),Sa.forEach(t),ar=i(ie," and then reload the model with "),st=a(ie,"A",{href:!0});var Da=n(st);nr=i(Da,"from_pretrained()"),Da.forEach(t),lr=i(ie,":"),ie.forEach(t),Ua.forEach(t),ds=f(e),c(Ae.$$.fragment,e),cs=f(e),ot=a(e,"UL",{});var Ba=n(ot);G=a(Ba,"LI",{});var dt=n(G);ir=i(dt,"Save the model with "),Pt=a(dt,"CODE",{});var Ga=n(Pt);pr=i(Ga,"~TFPretrainedModel.save_pretrained"),Ga.forEach(t),mr=i(dt," and load it again with "),rt=a(dt,"A",{href:!0});var Na=n(rt);fr=i(Na,"from_pretrained()"),Na.forEach(t),ur=i(dt,":"),dt.forEach(t),Ba.forEach(t),gs=f(e),c(Te.$$.fragment,e),vs=f(e),N=a(e,"H2",{class:!0});var to=n(N);K=a(to,"A",{id:!0,class:!0,href:!0});var za=n(K);Ct=a(za,"SPAN",{});var La=n(Ct);c(Pe.$$.fragment,La),La.forEach(t),za.forEach(t),hr=f(to),Ft=a(to,"SPAN",{});var Ha=n(Ft);dr=i(Ha,"ImportError"),Ha.forEach(t),to.forEach(t),ws=f(e),W=a(e,"P",{});var so=n(W);cr=i(so,"Another common error you may encounter, especially if it is a newly released model, is "),It=a(so,"CODE",{});var Oa=n(It);gr=i(Oa,"ImportError"),Oa.forEach(t),vr=i(so,":"),so.forEach(t),_s=f(e),c(Ce.$$.fragment,e),$s=f(e),at=a(e,"P",{});var Va=n(at);wr=i(Va,"For these error types, check to make sure you have the latest version of \u{1F917} Transformers installed to access the most recent models:"),Va.forEach(t),ys=f(e),c(Fe.$$.fragment,e),bs=f(e),z=a(e,"H2",{class:!0});var oo=n(z);ee=a(oo,"A",{id:!0,class:!0,href:!0});var Ya=n(ee);Mt=a(Ya,"SPAN",{});var Ra=n(Mt);c(Ie.$$.fragment,Ra),Ra.forEach(t),Ya.forEach(t),_r=f(oo),Ut=a(oo,"SPAN",{});var Qa=n(Ut);$r=i(Qa,"CUDA error: device-side assert triggered"),Qa.forEach(t),oo.forEach(t),ks=f(e),nt=a(e,"P",{});var Xa=n(nt);yr=i(Xa,"Sometimes you may run into a generic CUDA error about an error in the device code."),Xa.forEach(t),Es=f(e),c(Me.$$.fragment,e),js=f(e),lt=a(e,"P",{});var Za=n(lt);br=i(Za,"You should try to run the code on a CPU first to get a more descriptive error message. Add the following environment variable to the beginning of your code to switch to a CPU:"),Za.forEach(t),As=f(e),c(Ue.$$.fragment,e),Ts=f(e),it=a(e,"P",{});var Ja=n(it);kr=i(Ja,"Another option is to get a better traceback from the GPU. Add the following environment variable to the beginning of your code to get the traceback to point to the source of the error:"),Ja.forEach(t),Ps=f(e),c(qe.$$.fragment,e),Cs=f(e),L=a(e,"H2",{class:!0});var ro=n(L);te=a(ro,"A",{id:!0,class:!0,href:!0});var Ka=n(te);qt=a(Ka,"SPAN",{});var Wa=n(qt);c(Se.$$.fragment,Wa),Wa.forEach(t),Ka.forEach(t),Er=f(ro),St=a(ro,"SPAN",{});var en=n(St);jr=i(en,"Incorrect output when padding tokens aren't masked"),en.forEach(t),ro.forEach(t),Fs=f(e),E=a(e,"P",{});var P=n(E);Ar=i(P,"In some cases, the output "),xt=a(P,"CODE",{});var tn=n(xt);Tr=i(tn,"hidden_state"),tn.forEach(t),Pr=i(P," may be incorrect if the "),Dt=a(P,"CODE",{});var sn=n(Dt);Cr=i(sn,"input_ids"),sn.forEach(t),Fr=i(P," include padding tokens. To demonstrate, load a model and tokenizer. You can access a model\u2019s "),Bt=a(P,"CODE",{});var on=n(Bt);Ir=i(on,"pad_token_id"),on.forEach(t),Mr=i(P," to see its value. The "),Gt=a(P,"CODE",{});var rn=n(Gt);Ur=i(rn,"pad_token_id"),rn.forEach(t),qr=i(P," may be "),Nt=a(P,"CODE",{});var an=n(Nt);Sr=i(an,"None"),an.forEach(t),xr=i(P," for some models, but you can always manually set it."),P.forEach(t),Is=f(e),c(xe.$$.fragment,e),Ms=f(e),pt=a(e,"P",{});var nn=n(pt);Dr=i(nn,"The following example shows the output without masking the padding tokens:"),nn.forEach(t),Us=f(e),c(De.$$.fragment,e),qs=f(e),mt=a(e,"P",{});var ln=n(mt);Br=i(ln,"Here is the actual output of the second sequence:"),ln.forEach(t),Ss=f(e),c(Be.$$.fragment,e),xs=f(e),se=a(e,"P",{});var ao=n(se);Gr=i(ao,"Most of the time, you should provide an "),zt=a(ao,"CODE",{});var pn=n(zt);Nr=i(pn,"attention_mask"),pn.forEach(t),zr=i(ao," to your model to ignore the padding tokens to avoid this silent error. Now the output of the second sequence matches its actual output:"),ao.forEach(t),Ds=f(e),c(oe.$$.fragment,e),Bs=f(e),c(Ge.$$.fragment,e),Gs=f(e),re=a(e,"P",{});var no=n(re);Lr=i(no,"\u{1F917} Transformers doesn\u2019t automatically create an "),Lt=a(no,"CODE",{});var mn=n(Lt);Hr=i(mn,"attention_mask"),mn.forEach(t),Or=i(no," to mask a padding token if it is provided because:"),no.forEach(t),Ns=f(e),ae=a(e,"UL",{});var lo=n(ae);Ht=a(lo,"LI",{});var fn=n(Ht);Vr=i(fn,"Some models don\u2019t have a padding token."),fn.forEach(t),Yr=f(lo),Ot=a(lo,"LI",{});var un=n(Ot);Rr=i(un,"For some use-cases, users want a model to attend to a padding token."),un.forEach(t),lo.forEach(t),zs=f(e),H=a(e,"H2",{class:!0});var io=n(H);ne=a(io,"A",{id:!0,class:!0,href:!0});var hn=n(ne);Vt=a(hn,"SPAN",{});var dn=n(Vt);c(Ne.$$.fragment,dn),dn.forEach(t),hn.forEach(t),Qr=f(io),Yt=a(io,"SPAN",{});var cn=n(Yt);Xr=i(cn,"ValueError: Unrecognized configuration class XYZ for this kind of AutoModel"),cn.forEach(t),io.forEach(t),Ls=f(e),M=a(e,"P",{});var ct=n(M);Zr=i(ct,"Generally, we recommend using the "),ft=a(ct,"A",{href:!0});var gn=n(ft);Jr=i(gn,"AutoModel"),gn.forEach(t),Kr=i(ct,` class to load pretrained instances of models. This class
can automatically infer and load the correct architecture from a given checkpoint based on the configuration. If you see
this `),Rt=a(ct,"CODE",{});var vn=n(Rt);Wr=i(vn,"ValueError"),vn.forEach(t),ea=i(ct,` when loading a model from a checkpoint, this means the Auto class couldn\u2019t find a mapping from
the configuration in the given checkpoint to the kind of model you are trying to load. Most commonly, this happens when a
checkpoint doesn\u2019t support a given task.
For instance, you\u2019ll see this error in the following example because there is no GPT2 for question answering:`),ct.forEach(t),Hs=f(e),c(ze.$$.fragment,e),this.h()},h(){u(h,"name","hf:doc:metadata"),u(h,"content",JSON.stringify(Pn)),u(k,"id","troubleshoot"),u(k,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),u(k,"href","#troubleshoot"),u($,"class","relative group"),u(fe,"href","https://discuss.huggingface.co/"),u(fe,"rel","nofollow"),u(ue,"href","https://discuss.huggingface.co/c/beginners/5"),u(ue,"rel","nofollow"),u(he,"href","https://discuss.huggingface.co/c/transformers/9"),u(he,"rel","nofollow"),u(ge,"href","https://github.com/huggingface/transformers/issues/new/choose"),u(ge,"rel","nofollow"),u(Ye,"href","migration"),u(U,"start","2"),u(we,"href","https://huggingface.co/course/chapter8/1?fw=pt"),u(we,"rel","nofollow"),u(V,"id","firewalled-environments"),u(V,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),u(V,"href","#firewalled-environments"),u(q,"class","relative group"),u(Qe,"href","installation#offline-mode"),u(R,"id","cuda-out-of-memory"),u(R,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),u(R,"href","#cuda-out-of-memory"),u(S,"class","relative group"),u(Je,"href","main_classes/trainer#transformers.TrainingArguments.per_device_train_batch_size"),u(Ke,"href","/docs/transformers/v4.29.0/en/main_classes/trainer#transformers.TrainingArguments"),u(We,"href","main_classes/trainer#transformers.TrainingArguments.gradient_accumulation_steps"),u(et,"href","/docs/transformers/v4.29.0/en/main_classes/trainer#transformers.TrainingArguments"),u(Z,"id","unable-to-load-a-saved-tensorflow-model"),u(Z,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),u(Z,"href","#unable-to-load-a-saved-tensorflow-model"),u(B,"class","relative group"),u(Ee,"href","https://www.tensorflow.org/tutorials/keras/save_and_load#save_the_entire_model"),u(Ee,"rel","nofollow"),u(je,"href","https://www.tensorflow.org/tutorials/keras/save_and_load#save_the_entire_model"),u(je,"rel","nofollow"),u(st,"href","/docs/transformers/v4.29.0/en/main_classes/model#transformers.TFPreTrainedModel.from_pretrained"),u(rt,"href","/docs/transformers/v4.29.0/en/main_classes/model#transformers.TFPreTrainedModel.from_pretrained"),u(K,"id","importerror"),u(K,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),u(K,"href","#importerror"),u(N,"class","relative group"),u(ee,"id","cuda-error-deviceside-assert-triggered"),u(ee,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),u(ee,"href","#cuda-error-deviceside-assert-triggered"),u(z,"class","relative group"),u(te,"id","incorrect-output-when-padding-tokens-arent-masked"),u(te,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),u(te,"href","#incorrect-output-when-padding-tokens-arent-masked"),u(L,"class","relative group"),u(ne,"id","valueerror-unrecognized-configuration-class-xyz-for-this-kind-of-automodel"),u(ne,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),u(ne,"href","#valueerror-unrecognized-configuration-class-xyz-for-this-kind-of-automodel"),u(H,"class","relative group"),u(ft,"href","/docs/transformers/v4.29.0/en/model_doc/auto#transformers.AutoModel")},m(e,o){s(document.head,h),p(e,T,o),p(e,$,o),s($,k),s(k,A),g(y,A,null),s($,b),s($,C),s(C,po),p(e,Xt,o),p(e,Oe,o),s(Oe,mo),p(e,Zt,o),g(me,e,o),p(e,Jt,o),p(e,Ve,o),s(Ve,F),s(F,fo),s(F,fe),s(fe,uo),s(F,ho),s(F,ue),s(ue,co),s(F,go),s(F,he),s(he,vo),s(F,wo),p(e,Kt,o),g(de,e,o),p(e,Wt,o),p(e,U,o),s(U,gt),s(gt,ce),s(ce,_o),s(ce,ge),s(ge,$o),s(ce,yo),s(U,bo),s(U,vt),s(vt,ve),s(ve,ko),s(ve,Ye),s(Ye,Eo),s(ve,jo),p(e,es,o),p(e,O,o),s(O,Ao),s(O,we),s(we,To),s(O,Po),p(e,ts,o),p(e,q,o),s(q,V),s(V,wt),g(_e,wt,null),s(q,Co),s(q,_t),s(_t,Fo),p(e,ss,o),p(e,Re,o),s(Re,Io),p(e,os,o),g($e,e,o),p(e,rs,o),p(e,Y,o),s(Y,Mo),s(Y,Qe),s(Qe,Uo),s(Y,qo),p(e,as,o),p(e,S,o),s(S,R),s(R,$t),g(ye,$t,null),s(S,So),s(S,yt),s(yt,xo),p(e,ns,o),p(e,Xe,o),s(Xe,Do),p(e,ls,o),g(be,e,o),p(e,is,o),p(e,Ze,o),s(Ze,Bo),p(e,ps,o),p(e,Q,o),s(Q,x),s(x,Go),s(x,Je),s(Je,bt),s(bt,No),s(x,zo),s(x,Ke),s(Ke,Lo),s(x,Ho),s(Q,Oo),s(Q,D),s(D,Vo),s(D,We),s(We,kt),s(kt,Yo),s(D,Ro),s(D,et),s(et,Qo),s(D,Xo),p(e,ms,o),g(X,e,o),p(e,fs,o),p(e,B,o),s(B,Z),s(Z,Et),g(ke,Et,null),s(B,Zo),s(B,jt),s(jt,Jo),p(e,us,o),p(e,J,o),s(J,Ko),s(J,Ee),s(Ee,Wo),s(J,er),p(e,hs,o),p(e,tt,o),s(tt,I),s(I,tr),s(I,At),s(At,sr),s(I,or),s(I,je),s(je,Tt),s(Tt,rr),s(I,ar),s(I,st),s(st,nr),s(I,lr),p(e,ds,o),g(Ae,e,o),p(e,cs,o),p(e,ot,o),s(ot,G),s(G,ir),s(G,Pt),s(Pt,pr),s(G,mr),s(G,rt),s(rt,fr),s(G,ur),p(e,gs,o),g(Te,e,o),p(e,vs,o),p(e,N,o),s(N,K),s(K,Ct),g(Pe,Ct,null),s(N,hr),s(N,Ft),s(Ft,dr),p(e,ws,o),p(e,W,o),s(W,cr),s(W,It),s(It,gr),s(W,vr),p(e,_s,o),g(Ce,e,o),p(e,$s,o),p(e,at,o),s(at,wr),p(e,ys,o),g(Fe,e,o),p(e,bs,o),p(e,z,o),s(z,ee),s(ee,Mt),g(Ie,Mt,null),s(z,_r),s(z,Ut),s(Ut,$r),p(e,ks,o),p(e,nt,o),s(nt,yr),p(e,Es,o),g(Me,e,o),p(e,js,o),p(e,lt,o),s(lt,br),p(e,As,o),g(Ue,e,o),p(e,Ts,o),p(e,it,o),s(it,kr),p(e,Ps,o),g(qe,e,o),p(e,Cs,o),p(e,L,o),s(L,te),s(te,qt),g(Se,qt,null),s(L,Er),s(L,St),s(St,jr),p(e,Fs,o),p(e,E,o),s(E,Ar),s(E,xt),s(xt,Tr),s(E,Pr),s(E,Dt),s(Dt,Cr),s(E,Fr),s(E,Bt),s(Bt,Ir),s(E,Mr),s(E,Gt),s(Gt,Ur),s(E,qr),s(E,Nt),s(Nt,Sr),s(E,xr),p(e,Is,o),g(xe,e,o),p(e,Ms,o),p(e,pt,o),s(pt,Dr),p(e,Us,o),g(De,e,o),p(e,qs,o),p(e,mt,o),s(mt,Br),p(e,Ss,o),g(Be,e,o),p(e,xs,o),p(e,se,o),s(se,Gr),s(se,zt),s(zt,Nr),s(se,zr),p(e,Ds,o),g(oe,e,o),p(e,Bs,o),g(Ge,e,o),p(e,Gs,o),p(e,re,o),s(re,Lr),s(re,Lt),s(Lt,Hr),s(re,Or),p(e,Ns,o),p(e,ae,o),s(ae,Ht),s(Ht,Vr),s(ae,Yr),s(ae,Ot),s(Ot,Rr),p(e,zs,o),p(e,H,o),s(H,ne),s(ne,Vt),g(Ne,Vt,null),s(H,Qr),s(H,Yt),s(Yt,Xr),p(e,Ls,o),p(e,M,o),s(M,Zr),s(M,ft),s(ft,Jr),s(M,Kr),s(M,Rt),s(Rt,Wr),s(M,ea),p(e,Hs,o),g(ze,e,o),Os=!0},p(e,[o]){const Le={};o&2&&(Le.$$scope={dirty:o,ctx:e}),X.$set(Le);const Qt={};o&2&&(Qt.$$scope={dirty:o,ctx:e}),oe.$set(Qt)},i(e){Os||(v(y.$$.fragment,e),v(me.$$.fragment,e),v(de.$$.fragment,e),v(_e.$$.fragment,e),v($e.$$.fragment,e),v(ye.$$.fragment,e),v(be.$$.fragment,e),v(X.$$.fragment,e),v(ke.$$.fragment,e),v(Ae.$$.fragment,e),v(Te.$$.fragment,e),v(Pe.$$.fragment,e),v(Ce.$$.fragment,e),v(Fe.$$.fragment,e),v(Ie.$$.fragment,e),v(Me.$$.fragment,e),v(Ue.$$.fragment,e),v(qe.$$.fragment,e),v(Se.$$.fragment,e),v(xe.$$.fragment,e),v(De.$$.fragment,e),v(Be.$$.fragment,e),v(oe.$$.fragment,e),v(Ge.$$.fragment,e),v(Ne.$$.fragment,e),v(ze.$$.fragment,e),Os=!0)},o(e){w(y.$$.fragment,e),w(me.$$.fragment,e),w(de.$$.fragment,e),w(_e.$$.fragment,e),w($e.$$.fragment,e),w(ye.$$.fragment,e),w(be.$$.fragment,e),w(X.$$.fragment,e),w(ke.$$.fragment,e),w(Ae.$$.fragment,e),w(Te.$$.fragment,e),w(Pe.$$.fragment,e),w(Ce.$$.fragment,e),w(Fe.$$.fragment,e),w(Ie.$$.fragment,e),w(Me.$$.fragment,e),w(Ue.$$.fragment,e),w(qe.$$.fragment,e),w(Se.$$.fragment,e),w(xe.$$.fragment,e),w(De.$$.fragment,e),w(Be.$$.fragment,e),w(oe.$$.fragment,e),w(Ge.$$.fragment,e),w(Ne.$$.fragment,e),w(ze.$$.fragment,e),Os=!1},d(e){t(h),e&&t(T),e&&t($),_(y),e&&t(Xt),e&&t(Oe),e&&t(Zt),_(me,e),e&&t(Jt),e&&t(Ve),e&&t(Kt),_(de,e),e&&t(Wt),e&&t(U),e&&t(es),e&&t(O),e&&t(ts),e&&t(q),_(_e),e&&t(ss),e&&t(Re),e&&t(os),_($e,e),e&&t(rs),e&&t(Y),e&&t(as),e&&t(S),_(ye),e&&t(ns),e&&t(Xe),e&&t(ls),_(be,e),e&&t(is),e&&t(Ze),e&&t(ps),e&&t(Q),e&&t(ms),_(X,e),e&&t(fs),e&&t(B),_(ke),e&&t(us),e&&t(J),e&&t(hs),e&&t(tt),e&&t(ds),_(Ae,e),e&&t(cs),e&&t(ot),e&&t(gs),_(Te,e),e&&t(vs),e&&t(N),_(Pe),e&&t(ws),e&&t(W),e&&t(_s),_(Ce,e),e&&t($s),e&&t(at),e&&t(ys),_(Fe,e),e&&t(bs),e&&t(z),_(Ie),e&&t(ks),e&&t(nt),e&&t(Es),_(Me,e),e&&t(js),e&&t(lt),e&&t(As),_(Ue,e),e&&t(Ts),e&&t(it),e&&t(Ps),_(qe,e),e&&t(Cs),e&&t(L),_(Se),e&&t(Fs),e&&t(E),e&&t(Is),_(xe,e),e&&t(Ms),e&&t(pt),e&&t(Us),_(De,e),e&&t(qs),e&&t(mt),e&&t(Ss),_(Be,e),e&&t(xs),e&&t(se),e&&t(Ds),_(oe,e),e&&t(Bs),_(Ge,e),e&&t(Gs),e&&t(re),e&&t(Ns),e&&t(ae),e&&t(zs),e&&t(H),_(Ne),e&&t(Ls),e&&t(M),e&&t(Hs),_(ze,e)}}}const Pn={local:"troubleshoot",sections:[{local:"firewalled-environments",title:"Firewalled environments"},{local:"cuda-out-of-memory",title:"CUDA out of memory"},{local:"unable-to-load-a-saved-tensorflow-model",title:"Unable to load a saved TensorFlow model"},{local:"importerror",title:"ImportError"},{local:"cuda-error-deviceside-assert-triggered",title:"CUDA error: device-side assert triggered"},{local:"incorrect-output-when-padding-tokens-arent-masked",title:"Incorrect output when padding tokens aren't masked"},{local:"valueerror-unrecognized-configuration-class-xyz-for-this-kind-of-automodel",title:"ValueError: Unrecognized configuration class XYZ for this kind of AutoModel"}],title:"Troubleshoot"};function Cn(He){return En(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Sn extends $n{constructor(h){super();yn(this,h,Cn,Tn,bn,{})}}export{Sn as default,Pn as metadata};
