import{S as wl,i as bl,s as _l,e as a,k as m,w as f,t as n,M as $l,c as r,d as t,m as c,a as l,x as d,h as i,b as h,G as s,g as p,y as v,q as y,o as g,B as w,v as kl}from"../chunks/vendor-hf-doc-builder.js";import{T as yl}from"../chunks/Tip-hf-doc-builder.js";import{Y as gl}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 Ml(Re){let u,T,b,k,E;return{c(){u=a("p"),T=n("Refer to the Performance "),b=a("a"),k=n("guide"),E=n(" for more details about memory-saving techniques."),this.h()},l(_){u=r(_,"P",{});var $=l(u);T=i($,"Refer to the Performance "),b=r($,"A",{href:!0});var J=l(b);k=i(J,"guide"),J.forEach(t),E=i($," for more details about memory-saving techniques."),$.forEach(t),this.h()},h(){h(b,"href","performance")},m(_,$){p(_,u,$),s(u,T),s(u,b),s(b,k),s(u,E)},d(_){_&&t(u)}}}function jl(Re){let u,T,b,k,E;return{c(){u=a("p"),T=n("By default, the tokenizer creates an "),b=a("code"),k=n("attention_mask"),E=n(" for you based on your specific tokenizer\u2019s defaults.")},l(_){u=r(_,"P",{});var $=l(u);T=i($,"By default, the tokenizer creates an "),b=r($,"CODE",{});var J=l(b);k=i(J,"attention_mask"),J.forEach(t),E=i($," for you based on your specific tokenizer\u2019s defaults."),$.forEach(t)},m(_,$){p(_,u,$),s(u,T),s(u,b),s(b,k),s(u,E)},d(_){_&&t(u)}}}function El(Re){let u,T,b,k,E,_,$,J,po,Yt,He,mo,qt,me,Lt,xe,A,co,ce,ho,uo,he,fo,vo,ue,yo,go,Ot,fe,Kt,I,vt,de,wo,ve,bo,_o,$o,yt,ye,ko,ze,Mo,jo,es,H,Eo,ge,To,Uo,ts,Z,x,gt,we,Jo,wt,Ao,ss,De,Vo,os,be,as,z,Co,Xe,Io,Zo,rs,G,D,bt,_e,Go,_t,Bo,ls,Ye,Fo,ns,$e,is,qe,Qo,ps,X,B,Wo,Le,$t,Po,No,Oe,So,Ro,Ho,F,xo,Ke,kt,zo,Do,et,Xo,Yo,ms,Y,cs,Q,q,Mt,ke,qo,jt,Lo,hs,L,Oo,Me,Ko,ea,us,tt,V,ta,Et,sa,oa,je,Tt,aa,ra,st,la,na,fs,Ee,ds,ot,W,ia,Ut,pa,ma,at,ca,ha,vs,Te,ys,P,O,Jt,Ue,ua,At,fa,gs,K,da,Vt,va,ya,ws,Je,bs,rt,ga,_s,Ae,$s,N,ee,Ct,Ve,wa,It,ba,ks,lt,_a,Ms,Ce,js,nt,$a,Es,Ie,Ts,it,ka,Us,Ze,Js,S,te,Zt,Ge,Ma,Gt,ja,As,M,Ea,Bt,Ta,Ua,Ft,Ja,Aa,Qt,Va,Ca,Wt,Ia,Za,Pt,Ga,Ba,Vs,Be,Cs,pt,Fa,Is,Fe,Zs,mt,Qa,Gs,Qe,Bs,se,Wa,Nt,Pa,Na,Fs,oe,Qs,We,Ws,ae,Sa,St,Ra,Ha,Ps,re,Rt,xa,za,Ht,Da,Ns,R,le,xt,Pe,Xa,zt,Ya,Ss,C,qa,ct,La,Oa,Dt,Ka,er,Rs,Ne,Hs;return _=new pe({}),me=new gl({props:{id:"S2EEG3JIt2A"}}),fe=new gl({props:{id:"_PAli-V4wj0"}}),we=new pe({}),be=new j({props:{code:"VmFsdWVFcnJvciUzQSUyMENvbm5lY3Rpb24lMjBlcnJvciUyQyUyMGFuZCUyMHdlJTIwY2Fubm90JTIwZmluZCUyMHRoZSUyMHJlcXVlc3RlZCUyMGZpbGVzJTIwaW4lMjB0aGUlMjBjYWNoZWQlMjBwYXRoLiUwQVBsZWFzZSUyMHRyeSUyMGFnYWluJTIwb3IlMjBtYWtlJTIwc3VyZSUyMHlvdXIlMjBJbnRlcm5ldCUyMGNvbm5lY3Rpb24lMjBpcyUyMG9uLg==",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>.`}}),_e=new pe({}),$e=new j({props:{code:"Q1VEQSUyMG91dCUyMG9mJTIwbWVtb3J5LiUyMFRyaWVkJTIwdG8lMjBhbGxvY2F0ZSUyMDI1Ni4wMCUyME1pQiUyMChHUFUlMjAwJTNCJTIwMTEuMTclMjBHaUIlMjB0b3RhbCUyMGNhcGFjaXR5JTNCJTIwOS43MCUyMEdpQiUyMGFscmVhZHklMjBhbGxvY2F0ZWQlM0IlMjAxNzkuODElMjBNaUIlMjBmcmVlJTNCJTIwOS44NSUyMEdpQiUyMHJlc2VydmVkJTIwaW4lMjB0b3RhbCUyMGJ5JTIwUHlUb3JjaCk=",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)'}}),Y=new yl({props:{$$slots:{default:[Ml]},$$scope:{ctx:Re}}}),ke=new pe({}),Ee=new j({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMFRGUHJlVHJhaW5lZE1vZGVsJTBBZnJvbSUyMHRlbnNvcmZsb3clMjBpbXBvcnQlMjBrZXJhcyUwQSUwQW1vZGVsLnNhdmVfd2VpZ2h0cyglMjJzb21lX2ZvbGRlciUyRnRmX21vZGVsLmg1JTIyKSUwQW1vZGVsJTIwJTNEJTIwVEZQcmVUcmFpbmVkTW9kZWwuZnJvbV9wcmV0cmFpbmVkKCUyMnNvbWVfZm9sZGVyJTIyKQ==",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:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMFRGUHJlVHJhaW5lZE1vZGVsJTBBJTBBbW9kZWwuc2F2ZV9wcmV0cmFpbmVkKCUyMnBhdGhfdG8lMkZtb2RlbCUyMiklMEFtb2RlbCUyMCUzRCUyMFRGUHJlVHJhaW5lZE1vZGVsLmZyb21fcHJldHJhaW5lZCglMjJwYXRoX3RvJTJGbW9kZWwlMjIp",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>)`}}),Ue=new pe({}),Je=new j({props:{code:"SW1wb3J0RXJyb3IlM0ElMjBjYW5ub3QlMjBpbXBvcnQlMjBuYW1lJTIwJ0ltYWdlR1BUSW1hZ2VQcm9jZXNzb3InJTIwZnJvbSUyMCd0cmFuc2Zvcm1lcnMnJTIwKHVua25vd24lMjBsb2NhdGlvbik=",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>)'}}),Ae=new j({props:{code:"cGlwJTIwaW5zdGFsbCUyMHRyYW5zZm9ybWVycyUyMC0tdXBncmFkZQ==",highlighted:"pip install transformers --upgrade"}}),Ve=new pe({}),Ce=new j({props:{code:"UnVudGltZUVycm9yJTNBJTIwQ1VEQSUyMGVycm9yJTNBJTIwZGV2aWNlLXNpZGUlMjBhc3NlcnQlMjB0cmlnZ2VyZWQ=",highlighted:'RuntimeError: CUDA <span class="hljs-literal">error</span>: device-<span class="hljs-literal">side</span> <span class="hljs-keyword">assert</span> triggered'}}),Ie=new j({props:{code:"aW1wb3J0JTIwb3MlMEElMEFvcy5lbnZpcm9uJTVCJTIyQ1VEQV9WSVNJQkxFX0RFVklDRVMlMjIlNUQlMjAlM0QlMjAlMjIlMjI=",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>`}}),Ze=new j({props:{code:"aW1wb3J0JTIwb3MlMEElMEFvcy5lbnZpcm9uJTVCJTIyQ1VEQV9MQVVOQ0hfQkxPQ0tJTkclMjIlNUQlMjAlM0QlMjAlMjIxJTIy",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>`}}),Ge=new pe({}),Be=new j({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Nb2RlbEZvclNlcXVlbmNlQ2xhc3NpZmljYXRpb24lMEFpbXBvcnQlMjB0b3JjaCUwQSUwQW1vZGVsJTIwJTNEJTIwQXV0b01vZGVsRm9yU2VxdWVuY2VDbGFzc2lmaWNhdGlvbi5mcm9tX3ByZXRyYWluZWQoJTIyYmVydC1iYXNlLXVuY2FzZWQlMjIpJTBBbW9kZWwuY29uZmlnLnBhZF90b2tlbl9pZA==",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>`}}),Fe=new j({props:{code:"aW5wdXRfaWRzJTIwJTNEJTIwdG9yY2gudGVuc29yKCU1QiU1Qjc1OTIlMkMlMjAyMDU3JTJDJTIwMjA5NyUyQyUyMDIzOTMlMkMlMjA5NjExJTJDJTIwMjExNSU1RCUyQyUyMCU1Qjc1OTIlMkMlMjAwJTJDJTIwMCUyQyUyMDAlMkMlMjAwJTJDJTIwMCU1RCU1RCklMEFvdXRwdXQlMjAlM0QlMjBtb2RlbChpbnB1dF9pZHMpJTBBcHJpbnQob3V0cHV0LmxvZ2l0cyk=",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;)`}}),Qe=new j({props:{code:"aW5wdXRfaWRzJTIwJTNEJTIwdG9yY2gudGVuc29yKCU1QiU1Qjc1OTIlNUQlNUQpJTBBb3V0cHV0JTIwJTNEJTIwbW9kZWwoaW5wdXRfaWRzKSUwQXByaW50KG91dHB1dC5sb2dpdHMp",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 yl({props:{$$slots:{default:[jl]},$$scope:{ctx:Re}}}),We=new j({props:{code:"YXR0ZW50aW9uX21hc2slMjAlM0QlMjB0b3JjaC50ZW5zb3IoJTVCJTVCMSUyQyUyMDElMkMlMjAxJTJDJTIwMSUyQyUyMDElMkMlMjAxJTVEJTJDJTIwJTVCMSUyQyUyMDAlMkMlMjAwJTJDJTIwMCUyQyUyMDAlMkMlMjAwJTVEJTVEKSUwQW91dHB1dCUyMCUzRCUyMG1vZGVsKGlucHV0X2lkcyUyQyUyMGF0dGVudGlvbl9tYXNrJTNEYXR0ZW50aW9uX21hc2spJTBBcHJpbnQob3V0cHV0LmxvZ2l0cyk=",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;)`}}),Pe=new pe({}),Ne=new j({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Qcm9jZXNzb3IlMkMlMjBBdXRvTW9kZWxGb3JRdWVzdGlvbkFuc3dlcmluZyUwQSUwQXByb2Nlc3NvciUyMCUzRCUyMEF1dG9Qcm9jZXNzb3IuZnJvbV9wcmV0cmFpbmVkKCUyMmdwdDItbWVkaXVtJTIyKSUwQW1vZGVsJTIwJTNEJTIwQXV0b01vZGVsRm9yUXVlc3Rpb25BbnN3ZXJpbmcuZnJvbV9wcmV0cmFpbmVkKCUyMmdwdDItbWVkaXVtJTIyKQ==",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(){u=a("meta"),T=m(),b=a("h1"),k=a("a"),E=a("span"),f(_.$$.fragment),$=m(),J=a("span"),po=n("Troubleshoot"),Yt=m(),He=a("p"),mo=n("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:"),qt=m(),f(me.$$.fragment),Lt=m(),xe=a("ol"),A=a("li"),co=n("Asking for help on the "),ce=a("a"),ho=n("forums"),uo=n(". There are specific categories you can post your question to, like "),he=a("a"),fo=n("Beginners"),vo=n(" or "),ue=a("a"),yo=n("\u{1F917} Transformers"),go=n(". Make sure you write a good descriptive forum post with some reproducible code to maximize the likelihood that your problem is solved!"),Ot=m(),f(fe.$$.fragment),Kt=m(),I=a("ol"),vt=a("li"),de=a("p"),wo=n("Create an "),ve=a("a"),bo=n("Issue"),_o=n(" 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."),$o=m(),yt=a("li"),ye=a("p"),ko=n("Check the "),ze=a("a"),Mo=n("Migration"),jo=n(" guide if you use an older version of \u{1F917} Transformers since some important changes have been introduced between versions."),es=m(),H=a("p"),Eo=n("For more details about troubleshooting and getting help, take a look at "),ge=a("a"),To=n("Chapter 8"),Uo=n(" of the Hugging Face course."),ts=m(),Z=a("h2"),x=a("a"),gt=a("span"),f(we.$$.fragment),Jo=m(),wt=a("span"),Ao=n("Firewalled environments"),ss=m(),De=a("p"),Vo=n("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(),f(be.$$.fragment),as=m(),z=a("p"),Co=n("In this case, you should try to run \u{1F917} Transformers on "),Xe=a("a"),Io=n("offline mode"),Zo=n(" to avoid the connection error."),rs=m(),G=a("h2"),D=a("a"),bt=a("span"),f(_e.$$.fragment),Go=m(),_t=a("span"),Bo=n("CUDA out of memory"),ls=m(),Ye=a("p"),Fo=n("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:"),ns=m(),f($e.$$.fragment),is=m(),qe=a("p"),Qo=n("Here are some potential solutions you can try to lessen memory use:"),ps=m(),X=a("ul"),B=a("li"),Wo=n("Reduce the "),Le=a("a"),$t=a("code"),Po=n("per_device_train_batch_size"),No=n(" value in "),Oe=a("a"),So=n("TrainingArguments"),Ro=n("."),Ho=m(),F=a("li"),xo=n("Try using "),Ke=a("a"),kt=a("code"),zo=n("gradient_accumulation_steps"),Do=n(" in "),et=a("a"),Xo=n("TrainingArguments"),Yo=n(" to effectively increase overall batch size."),ms=m(),f(Y.$$.fragment),cs=m(),Q=a("h2"),q=a("a"),Mt=a("span"),f(ke.$$.fragment),qo=m(),jt=a("span"),Lo=n("Unable to load a saved TensorFlow model"),hs=m(),L=a("p"),Oo=n("TensorFlow\u2019s "),Me=a("a"),Ko=n("model.save"),ea=n(" 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:"),us=m(),tt=a("ul"),V=a("li"),ta=n("Save the model weights as a "),Et=a("code"),sa=n("h5"),oa=n(" file extension with "),je=a("a"),Tt=a("code"),aa=n("model.save_weights"),ra=n(" and then reload the model with "),st=a("a"),la=n("from_pretrained()"),na=n(":"),fs=m(),f(Ee.$$.fragment),ds=m(),ot=a("ul"),W=a("li"),ia=n("Save the model with "),Ut=a("code"),pa=n("~TFPretrainedModel.save_pretrained"),ma=n(" and load it again with "),at=a("a"),ca=n("from_pretrained()"),ha=n(":"),vs=m(),f(Te.$$.fragment),ys=m(),P=a("h2"),O=a("a"),Jt=a("span"),f(Ue.$$.fragment),ua=m(),At=a("span"),fa=n("ImportError"),gs=m(),K=a("p"),da=n("Another common error you may encounter, especially if it is a newly released model, is "),Vt=a("code"),va=n("ImportError"),ya=n(":"),ws=m(),f(Je.$$.fragment),bs=m(),rt=a("p"),ga=n("For these error types, check to make sure you have the latest version of \u{1F917} Transformers installed to access the most recent models:"),_s=m(),f(Ae.$$.fragment),$s=m(),N=a("h2"),ee=a("a"),Ct=a("span"),f(Ve.$$.fragment),wa=m(),It=a("span"),ba=n("CUDA error: device-side assert triggered"),ks=m(),lt=a("p"),_a=n("Sometimes you may run into a generic CUDA error about an error in the device code."),Ms=m(),f(Ce.$$.fragment),js=m(),nt=a("p"),$a=n("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:"),Es=m(),f(Ie.$$.fragment),Ts=m(),it=a("p"),ka=n("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:"),Us=m(),f(Ze.$$.fragment),Js=m(),S=a("h2"),te=a("a"),Zt=a("span"),f(Ge.$$.fragment),Ma=m(),Gt=a("span"),ja=n("Incorrect output when padding tokens aren't masked"),As=m(),M=a("p"),Ea=n("In some cases, the output "),Bt=a("code"),Ta=n("hidden_state"),Ua=n(" may be incorrect if the "),Ft=a("code"),Ja=n("input_ids"),Aa=n(" include padding tokens. To demonstrate, load a model and tokenizer. You can access a model\u2019s "),Qt=a("code"),Va=n("pad_token_id"),Ca=n(" to see its value. The "),Wt=a("code"),Ia=n("pad_token_id"),Za=n(" may be "),Pt=a("code"),Ga=n("None"),Ba=n(" for some models, but you can always manually set it."),Vs=m(),f(Be.$$.fragment),Cs=m(),pt=a("p"),Fa=n("The following example shows the output without masking the padding tokens:"),Is=m(),f(Fe.$$.fragment),Zs=m(),mt=a("p"),Qa=n("Here is the actual output of the second sequence:"),Gs=m(),f(Qe.$$.fragment),Bs=m(),se=a("p"),Wa=n("Most of the time, you should provide an "),Nt=a("code"),Pa=n("attention_mask"),Na=n(" to your model to ignore the padding tokens to avoid this silent error. Now the output of the second sequence matches its actual output:"),Fs=m(),f(oe.$$.fragment),Qs=m(),f(We.$$.fragment),Ws=m(),ae=a("p"),Sa=n("\u{1F917} Transformers doesn\u2019t automatically create an "),St=a("code"),Ra=n("attention_mask"),Ha=n(" to mask a padding token if it is provided because:"),Ps=m(),re=a("ul"),Rt=a("li"),xa=n("Some models don\u2019t have a padding token."),za=m(),Ht=a("li"),Da=n("For some use-cases, users want a model to attend to a padding token."),Ns=m(),R=a("h2"),le=a("a"),xt=a("span"),f(Pe.$$.fragment),Xa=m(),zt=a("span"),Ya=n("ValueError: Unrecognized configuration class XYZ for this kind of AutoModel"),Ss=m(),C=a("p"),qa=n("Generally, we recommend using the "),ct=a("a"),La=n("AutoModel"),Oa=n(` 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 `),Dt=a("code"),Ka=n("ValueError"),er=n(` 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:`),Rs=m(),f(Ne.$$.fragment),this.h()},l(e){const o=$l('[data-svelte="svelte-1phssyn"]',document.head);u=r(o,"META",{name:!0,content:!0}),o.forEach(t),T=c(e),b=r(e,"H1",{class:!0});var Se=l(b);k=r(Se,"A",{id:!0,class:!0,href:!0});var Xt=l(k);E=r(Xt,"SPAN",{});var tr=l(E);d(_.$$.fragment,tr),tr.forEach(t),Xt.forEach(t),$=c(Se),J=r(Se,"SPAN",{});var sr=l(J);po=i(sr,"Troubleshoot"),sr.forEach(t),Se.forEach(t),Yt=c(e),He=r(e,"P",{});var or=l(He);mo=i(or,"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:"),or.forEach(t),qt=c(e),d(me.$$.fragment,e),Lt=c(e),xe=r(e,"OL",{});var ar=l(xe);A=r(ar,"LI",{});var ne=l(A);co=i(ne,"Asking for help on the "),ce=r(ne,"A",{href:!0,rel:!0});var rr=l(ce);ho=i(rr,"forums"),rr.forEach(t),uo=i(ne,". There are specific categories you can post your question to, like "),he=r(ne,"A",{href:!0,rel:!0});var lr=l(he);fo=i(lr,"Beginners"),lr.forEach(t),vo=i(ne," or "),ue=r(ne,"A",{href:!0,rel:!0});var nr=l(ue);yo=i(nr,"\u{1F917} Transformers"),nr.forEach(t),go=i(ne,". Make sure you write a good descriptive forum post with some reproducible code to maximize the likelihood that your problem is solved!"),ne.forEach(t),ar.forEach(t),Ot=c(e),d(fe.$$.fragment,e),Kt=c(e),I=r(e,"OL",{start:!0});var xs=l(I);vt=r(xs,"LI",{});var ir=l(vt);de=r(ir,"P",{});var zs=l(de);wo=i(zs,"Create an "),ve=r(zs,"A",{href:!0,rel:!0});var pr=l(ve);bo=i(pr,"Issue"),pr.forEach(t),_o=i(zs," 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."),zs.forEach(t),ir.forEach(t),$o=c(xs),yt=r(xs,"LI",{});var mr=l(yt);ye=r(mr,"P",{});var Ds=l(ye);ko=i(Ds,"Check the "),ze=r(Ds,"A",{href:!0});var cr=l(ze);Mo=i(cr,"Migration"),cr.forEach(t),jo=i(Ds," guide if you use an older version of \u{1F917} Transformers since some important changes have been introduced between versions."),Ds.forEach(t),mr.forEach(t),xs.forEach(t),es=c(e),H=r(e,"P",{});var Xs=l(H);Eo=i(Xs,"For more details about troubleshooting and getting help, take a look at "),ge=r(Xs,"A",{href:!0,rel:!0});var hr=l(ge);To=i(hr,"Chapter 8"),hr.forEach(t),Uo=i(Xs," of the Hugging Face course."),Xs.forEach(t),ts=c(e),Z=r(e,"H2",{class:!0});var Ys=l(Z);x=r(Ys,"A",{id:!0,class:!0,href:!0});var ur=l(x);gt=r(ur,"SPAN",{});var fr=l(gt);d(we.$$.fragment,fr),fr.forEach(t),ur.forEach(t),Jo=c(Ys),wt=r(Ys,"SPAN",{});var dr=l(wt);Ao=i(dr,"Firewalled environments"),dr.forEach(t),Ys.forEach(t),ss=c(e),De=r(e,"P",{});var vr=l(De);Vo=i(vr,"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:"),vr.forEach(t),os=c(e),d(be.$$.fragment,e),as=c(e),z=r(e,"P",{});var qs=l(z);Co=i(qs,"In this case, you should try to run \u{1F917} Transformers on "),Xe=r(qs,"A",{href:!0});var yr=l(Xe);Io=i(yr,"offline mode"),yr.forEach(t),Zo=i(qs," to avoid the connection error."),qs.forEach(t),rs=c(e),G=r(e,"H2",{class:!0});var Ls=l(G);D=r(Ls,"A",{id:!0,class:!0,href:!0});var gr=l(D);bt=r(gr,"SPAN",{});var wr=l(bt);d(_e.$$.fragment,wr),wr.forEach(t),gr.forEach(t),Go=c(Ls),_t=r(Ls,"SPAN",{});var br=l(_t);Bo=i(br,"CUDA out of memory"),br.forEach(t),Ls.forEach(t),ls=c(e),Ye=r(e,"P",{});var _r=l(Ye);Fo=i(_r,"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:"),_r.forEach(t),ns=c(e),d($e.$$.fragment,e),is=c(e),qe=r(e,"P",{});var $r=l(qe);Qo=i($r,"Here are some potential solutions you can try to lessen memory use:"),$r.forEach(t),ps=c(e),X=r(e,"UL",{});var Os=l(X);B=r(Os,"LI",{});var ht=l(B);Wo=i(ht,"Reduce the "),Le=r(ht,"A",{href:!0});var kr=l(Le);$t=r(kr,"CODE",{});var Mr=l($t);Po=i(Mr,"per_device_train_batch_size"),Mr.forEach(t),kr.forEach(t),No=i(ht," value in "),Oe=r(ht,"A",{href:!0});var jr=l(Oe);So=i(jr,"TrainingArguments"),jr.forEach(t),Ro=i(ht,"."),ht.forEach(t),Ho=c(Os),F=r(Os,"LI",{});var ut=l(F);xo=i(ut,"Try using "),Ke=r(ut,"A",{href:!0});var Er=l(Ke);kt=r(Er,"CODE",{});var Tr=l(kt);zo=i(Tr,"gradient_accumulation_steps"),Tr.forEach(t),Er.forEach(t),Do=i(ut," in "),et=r(ut,"A",{href:!0});var Ur=l(et);Xo=i(Ur,"TrainingArguments"),Ur.forEach(t),Yo=i(ut," to effectively increase overall batch size."),ut.forEach(t),Os.forEach(t),ms=c(e),d(Y.$$.fragment,e),cs=c(e),Q=r(e,"H2",{class:!0});var Ks=l(Q);q=r(Ks,"A",{id:!0,class:!0,href:!0});var Jr=l(q);Mt=r(Jr,"SPAN",{});var Ar=l(Mt);d(ke.$$.fragment,Ar),Ar.forEach(t),Jr.forEach(t),qo=c(Ks),jt=r(Ks,"SPAN",{});var Vr=l(jt);Lo=i(Vr,"Unable to load a saved TensorFlow model"),Vr.forEach(t),Ks.forEach(t),hs=c(e),L=r(e,"P",{});var eo=l(L);Oo=i(eo,"TensorFlow\u2019s "),Me=r(eo,"A",{href:!0,rel:!0});var Cr=l(Me);Ko=i(Cr,"model.save"),Cr.forEach(t),ea=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),us=c(e),tt=r(e,"UL",{});var Ir=l(tt);V=r(Ir,"LI",{});var ie=l(V);ta=i(ie,"Save the model weights as a "),Et=r(ie,"CODE",{});var Zr=l(Et);sa=i(Zr,"h5"),Zr.forEach(t),oa=i(ie," file extension with "),je=r(ie,"A",{href:!0,rel:!0});var Gr=l(je);Tt=r(Gr,"CODE",{});var Br=l(Tt);aa=i(Br,"model.save_weights"),Br.forEach(t),Gr.forEach(t),ra=i(ie," and then reload the model with "),st=r(ie,"A",{href:!0});var Fr=l(st);la=i(Fr,"from_pretrained()"),Fr.forEach(t),na=i(ie,":"),ie.forEach(t),Ir.forEach(t),fs=c(e),d(Ee.$$.fragment,e),ds=c(e),ot=r(e,"UL",{});var Qr=l(ot);W=r(Qr,"LI",{});var ft=l(W);ia=i(ft,"Save the model with "),Ut=r(ft,"CODE",{});var Wr=l(Ut);pa=i(Wr,"~TFPretrainedModel.save_pretrained"),Wr.forEach(t),ma=i(ft," and load it again with "),at=r(ft,"A",{href:!0});var Pr=l(at);ca=i(Pr,"from_pretrained()"),Pr.forEach(t),ha=i(ft,":"),ft.forEach(t),Qr.forEach(t),vs=c(e),d(Te.$$.fragment,e),ys=c(e),P=r(e,"H2",{class:!0});var to=l(P);O=r(to,"A",{id:!0,class:!0,href:!0});var Nr=l(O);Jt=r(Nr,"SPAN",{});var Sr=l(Jt);d(Ue.$$.fragment,Sr),Sr.forEach(t),Nr.forEach(t),ua=c(to),At=r(to,"SPAN",{});var Rr=l(At);fa=i(Rr,"ImportError"),Rr.forEach(t),to.forEach(t),gs=c(e),K=r(e,"P",{});var so=l(K);da=i(so,"Another common error you may encounter, especially if it is a newly released model, is "),Vt=r(so,"CODE",{});var Hr=l(Vt);va=i(Hr,"ImportError"),Hr.forEach(t),ya=i(so,":"),so.forEach(t),ws=c(e),d(Je.$$.fragment,e),bs=c(e),rt=r(e,"P",{});var xr=l(rt);ga=i(xr,"For these error types, check to make sure you have the latest version of \u{1F917} Transformers installed to access the most recent models:"),xr.forEach(t),_s=c(e),d(Ae.$$.fragment,e),$s=c(e),N=r(e,"H2",{class:!0});var oo=l(N);ee=r(oo,"A",{id:!0,class:!0,href:!0});var zr=l(ee);Ct=r(zr,"SPAN",{});var Dr=l(Ct);d(Ve.$$.fragment,Dr),Dr.forEach(t),zr.forEach(t),wa=c(oo),It=r(oo,"SPAN",{});var Xr=l(It);ba=i(Xr,"CUDA error: device-side assert triggered"),Xr.forEach(t),oo.forEach(t),ks=c(e),lt=r(e,"P",{});var Yr=l(lt);_a=i(Yr,"Sometimes you may run into a generic CUDA error about an error in the device code."),Yr.forEach(t),Ms=c(e),d(Ce.$$.fragment,e),js=c(e),nt=r(e,"P",{});var qr=l(nt);$a=i(qr,"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:"),qr.forEach(t),Es=c(e),d(Ie.$$.fragment,e),Ts=c(e),it=r(e,"P",{});var Lr=l(it);ka=i(Lr,"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:"),Lr.forEach(t),Us=c(e),d(Ze.$$.fragment,e),Js=c(e),S=r(e,"H2",{class:!0});var ao=l(S);te=r(ao,"A",{id:!0,class:!0,href:!0});var Or=l(te);Zt=r(Or,"SPAN",{});var Kr=l(Zt);d(Ge.$$.fragment,Kr),Kr.forEach(t),Or.forEach(t),Ma=c(ao),Gt=r(ao,"SPAN",{});var el=l(Gt);ja=i(el,"Incorrect output when padding tokens aren't masked"),el.forEach(t),ao.forEach(t),As=c(e),M=r(e,"P",{});var U=l(M);Ea=i(U,"In some cases, the output "),Bt=r(U,"CODE",{});var tl=l(Bt);Ta=i(tl,"hidden_state"),tl.forEach(t),Ua=i(U," may be incorrect if the "),Ft=r(U,"CODE",{});var sl=l(Ft);Ja=i(sl,"input_ids"),sl.forEach(t),Aa=i(U," include padding tokens. To demonstrate, load a model and tokenizer. You can access a model\u2019s "),Qt=r(U,"CODE",{});var ol=l(Qt);Va=i(ol,"pad_token_id"),ol.forEach(t),Ca=i(U," to see its value. The "),Wt=r(U,"CODE",{});var al=l(Wt);Ia=i(al,"pad_token_id"),al.forEach(t),Za=i(U," may be "),Pt=r(U,"CODE",{});var rl=l(Pt);Ga=i(rl,"None"),rl.forEach(t),Ba=i(U," for some models, but you can always manually set it."),U.forEach(t),Vs=c(e),d(Be.$$.fragment,e),Cs=c(e),pt=r(e,"P",{});var ll=l(pt);Fa=i(ll,"The following example shows the output without masking the padding tokens:"),ll.forEach(t),Is=c(e),d(Fe.$$.fragment,e),Zs=c(e),mt=r(e,"P",{});var nl=l(mt);Qa=i(nl,"Here is the actual output of the second sequence:"),nl.forEach(t),Gs=c(e),d(Qe.$$.fragment,e),Bs=c(e),se=r(e,"P",{});var ro=l(se);Wa=i(ro,"Most of the time, you should provide an "),Nt=r(ro,"CODE",{});var il=l(Nt);Pa=i(il,"attention_mask"),il.forEach(t),Na=i(ro," to your model to ignore the padding tokens to avoid this silent error. Now the output of the second sequence matches its actual output:"),ro.forEach(t),Fs=c(e),d(oe.$$.fragment,e),Qs=c(e),d(We.$$.fragment,e),Ws=c(e),ae=r(e,"P",{});var lo=l(ae);Sa=i(lo,"\u{1F917} Transformers doesn\u2019t automatically create an "),St=r(lo,"CODE",{});var pl=l(St);Ra=i(pl,"attention_mask"),pl.forEach(t),Ha=i(lo," to mask a padding token if it is provided because:"),lo.forEach(t),Ps=c(e),re=r(e,"UL",{});var no=l(re);Rt=r(no,"LI",{});var ml=l(Rt);xa=i(ml,"Some models don\u2019t have a padding token."),ml.forEach(t),za=c(no),Ht=r(no,"LI",{});var cl=l(Ht);Da=i(cl,"For some use-cases, users want a model to attend to a padding token."),cl.forEach(t),no.forEach(t),Ns=c(e),R=r(e,"H2",{class:!0});var io=l(R);le=r(io,"A",{id:!0,class:!0,href:!0});var hl=l(le);xt=r(hl,"SPAN",{});var ul=l(xt);d(Pe.$$.fragment,ul),ul.forEach(t),hl.forEach(t),Xa=c(io),zt=r(io,"SPAN",{});var fl=l(zt);Ya=i(fl,"ValueError: Unrecognized configuration class XYZ for this kind of AutoModel"),fl.forEach(t),io.forEach(t),Ss=c(e),C=r(e,"P",{});var dt=l(C);qa=i(dt,"Generally, we recommend using the "),ct=r(dt,"A",{href:!0});var dl=l(ct);La=i(dl,"AutoModel"),dl.forEach(t),Oa=i(dt,` 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 `),Dt=r(dt,"CODE",{});var vl=l(Dt);Ka=i(vl,"ValueError"),vl.forEach(t),er=i(dt,` 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:`),dt.forEach(t),Rs=c(e),d(Ne.$$.fragment,e),this.h()},h(){h(u,"name","hf:doc:metadata"),h(u,"content",JSON.stringify(Tl)),h(k,"id","troubleshoot"),h(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"),h(k,"href","#troubleshoot"),h(b,"class","relative group"),h(ce,"href","https://discuss.huggingface.co/"),h(ce,"rel","nofollow"),h(he,"href","https://discuss.huggingface.co/c/beginners/5"),h(he,"rel","nofollow"),h(ue,"href","https://discuss.huggingface.co/c/transformers/9"),h(ue,"rel","nofollow"),h(ve,"href","https://github.com/huggingface/transformers/issues/new/choose"),h(ve,"rel","nofollow"),h(ze,"href","migration"),h(I,"start","2"),h(ge,"href","https://huggingface.co/course/chapter8/1?fw=pt"),h(ge,"rel","nofollow"),h(x,"id","firewalled-environments"),h(x,"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"),h(x,"href","#firewalled-environments"),h(Z,"class","relative group"),h(Xe,"href","installation#offline-mode"),h(D,"id","cuda-out-of-memory"),h(D,"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"),h(D,"href","#cuda-out-of-memory"),h(G,"class","relative group"),h(Le,"href","main_classes/trainer#transformers.TrainingArguments.per_device_train_batch_size"),h(Oe,"href","/docs/transformers/v4.33.0/en/main_classes/trainer#transformers.TrainingArguments"),h(Ke,"href","main_classes/trainer#transformers.TrainingArguments.gradient_accumulation_steps"),h(et,"href","/docs/transformers/v4.33.0/en/main_classes/trainer#transformers.TrainingArguments"),h(q,"id","unable-to-load-a-saved-tensorflow-model"),h(q,"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"),h(q,"href","#unable-to-load-a-saved-tensorflow-model"),h(Q,"class","relative group"),h(Me,"href","https://www.tensorflow.org/tutorials/keras/save_and_load#save_the_entire_model"),h(Me,"rel","nofollow"),h(je,"href","https://www.tensorflow.org/tutorials/keras/save_and_load#save_the_entire_model"),h(je,"rel","nofollow"),h(st,"href","/docs/transformers/v4.33.0/en/main_classes/model#transformers.TFPreTrainedModel.from_pretrained"),h(at,"href","/docs/transformers/v4.33.0/en/main_classes/model#transformers.TFPreTrainedModel.from_pretrained"),h(O,"id","importerror"),h(O,"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"),h(O,"href","#importerror"),h(P,"class","relative group"),h(ee,"id","cuda-error-deviceside-assert-triggered"),h(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"),h(ee,"href","#cuda-error-deviceside-assert-triggered"),h(N,"class","relative group"),h(te,"id","incorrect-output-when-padding-tokens-arent-masked"),h(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"),h(te,"href","#incorrect-output-when-padding-tokens-arent-masked"),h(S,"class","relative group"),h(le,"id","valueerror-unrecognized-configuration-class-xyz-for-this-kind-of-automodel"),h(le,"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"),h(le,"href","#valueerror-unrecognized-configuration-class-xyz-for-this-kind-of-automodel"),h(R,"class","relative group"),h(ct,"href","/docs/transformers/v4.33.0/en/model_doc/auto#transformers.AutoModel")},m(e,o){s(document.head,u),p(e,T,o),p(e,b,o),s(b,k),s(k,E),v(_,E,null),s(b,$),s(b,J),s(J,po),p(e,Yt,o),p(e,He,o),s(He,mo),p(e,qt,o),v(me,e,o),p(e,Lt,o),p(e,xe,o),s(xe,A),s(A,co),s(A,ce),s(ce,ho),s(A,uo),s(A,he),s(he,fo),s(A,vo),s(A,ue),s(ue,yo),s(A,go),p(e,Ot,o),v(fe,e,o),p(e,Kt,o),p(e,I,o),s(I,vt),s(vt,de),s(de,wo),s(de,ve),s(ve,bo),s(de,_o),s(I,$o),s(I,yt),s(yt,ye),s(ye,ko),s(ye,ze),s(ze,Mo),s(ye,jo),p(e,es,o),p(e,H,o),s(H,Eo),s(H,ge),s(ge,To),s(H,Uo),p(e,ts,o),p(e,Z,o),s(Z,x),s(x,gt),v(we,gt,null),s(Z,Jo),s(Z,wt),s(wt,Ao),p(e,ss,o),p(e,De,o),s(De,Vo),p(e,os,o),v(be,e,o),p(e,as,o),p(e,z,o),s(z,Co),s(z,Xe),s(Xe,Io),s(z,Zo),p(e,rs,o),p(e,G,o),s(G,D),s(D,bt),v(_e,bt,null),s(G,Go),s(G,_t),s(_t,Bo),p(e,ls,o),p(e,Ye,o),s(Ye,Fo),p(e,ns,o),v($e,e,o),p(e,is,o),p(e,qe,o),s(qe,Qo),p(e,ps,o),p(e,X,o),s(X,B),s(B,Wo),s(B,Le),s(Le,$t),s($t,Po),s(B,No),s(B,Oe),s(Oe,So),s(B,Ro),s(X,Ho),s(X,F),s(F,xo),s(F,Ke),s(Ke,kt),s(kt,zo),s(F,Do),s(F,et),s(et,Xo),s(F,Yo),p(e,ms,o),v(Y,e,o),p(e,cs,o),p(e,Q,o),s(Q,q),s(q,Mt),v(ke,Mt,null),s(Q,qo),s(Q,jt),s(jt,Lo),p(e,hs,o),p(e,L,o),s(L,Oo),s(L,Me),s(Me,Ko),s(L,ea),p(e,us,o),p(e,tt,o),s(tt,V),s(V,ta),s(V,Et),s(Et,sa),s(V,oa),s(V,je),s(je,Tt),s(Tt,aa),s(V,ra),s(V,st),s(st,la),s(V,na),p(e,fs,o),v(Ee,e,o),p(e,ds,o),p(e,ot,o),s(ot,W),s(W,ia),s(W,Ut),s(Ut,pa),s(W,ma),s(W,at),s(at,ca),s(W,ha),p(e,vs,o),v(Te,e,o),p(e,ys,o),p(e,P,o),s(P,O),s(O,Jt),v(Ue,Jt,null),s(P,ua),s(P,At),s(At,fa),p(e,gs,o),p(e,K,o),s(K,da),s(K,Vt),s(Vt,va),s(K,ya),p(e,ws,o),v(Je,e,o),p(e,bs,o),p(e,rt,o),s(rt,ga),p(e,_s,o),v(Ae,e,o),p(e,$s,o),p(e,N,o),s(N,ee),s(ee,Ct),v(Ve,Ct,null),s(N,wa),s(N,It),s(It,ba),p(e,ks,o),p(e,lt,o),s(lt,_a),p(e,Ms,o),v(Ce,e,o),p(e,js,o),p(e,nt,o),s(nt,$a),p(e,Es,o),v(Ie,e,o),p(e,Ts,o),p(e,it,o),s(it,ka),p(e,Us,o),v(Ze,e,o),p(e,Js,o),p(e,S,o),s(S,te),s(te,Zt),v(Ge,Zt,null),s(S,Ma),s(S,Gt),s(Gt,ja),p(e,As,o),p(e,M,o),s(M,Ea),s(M,Bt),s(Bt,Ta),s(M,Ua),s(M,Ft),s(Ft,Ja),s(M,Aa),s(M,Qt),s(Qt,Va),s(M,Ca),s(M,Wt),s(Wt,Ia),s(M,Za),s(M,Pt),s(Pt,Ga),s(M,Ba),p(e,Vs,o),v(Be,e,o),p(e,Cs,o),p(e,pt,o),s(pt,Fa),p(e,Is,o),v(Fe,e,o),p(e,Zs,o),p(e,mt,o),s(mt,Qa),p(e,Gs,o),v(Qe,e,o),p(e,Bs,o),p(e,se,o),s(se,Wa),s(se,Nt),s(Nt,Pa),s(se,Na),p(e,Fs,o),v(oe,e,o),p(e,Qs,o),v(We,e,o),p(e,Ws,o),p(e,ae,o),s(ae,Sa),s(ae,St),s(St,Ra),s(ae,Ha),p(e,Ps,o),p(e,re,o),s(re,Rt),s(Rt,xa),s(re,za),s(re,Ht),s(Ht,Da),p(e,Ns,o),p(e,R,o),s(R,le),s(le,xt),v(Pe,xt,null),s(R,Xa),s(R,zt),s(zt,Ya),p(e,Ss,o),p(e,C,o),s(C,qa),s(C,ct),s(ct,La),s(C,Oa),s(C,Dt),s(Dt,Ka),s(C,er),p(e,Rs,o),v(Ne,e,o),Hs=!0},p(e,[o]){const Se={};o&2&&(Se.$$scope={dirty:o,ctx:e}),Y.$set(Se);const Xt={};o&2&&(Xt.$$scope={dirty:o,ctx:e}),oe.$set(Xt)},i(e){Hs||(y(_.$$.fragment,e),y(me.$$.fragment,e),y(fe.$$.fragment,e),y(we.$$.fragment,e),y(be.$$.fragment,e),y(_e.$$.fragment,e),y($e.$$.fragment,e),y(Y.$$.fragment,e),y(ke.$$.fragment,e),y(Ee.$$.fragment,e),y(Te.$$.fragment,e),y(Ue.$$.fragment,e),y(Je.$$.fragment,e),y(Ae.$$.fragment,e),y(Ve.$$.fragment,e),y(Ce.$$.fragment,e),y(Ie.$$.fragment,e),y(Ze.$$.fragment,e),y(Ge.$$.fragment,e),y(Be.$$.fragment,e),y(Fe.$$.fragment,e),y(Qe.$$.fragment,e),y(oe.$$.fragment,e),y(We.$$.fragment,e),y(Pe.$$.fragment,e),y(Ne.$$.fragment,e),Hs=!0)},o(e){g(_.$$.fragment,e),g(me.$$.fragment,e),g(fe.$$.fragment,e),g(we.$$.fragment,e),g(be.$$.fragment,e),g(_e.$$.fragment,e),g($e.$$.fragment,e),g(Y.$$.fragment,e),g(ke.$$.fragment,e),g(Ee.$$.fragment,e),g(Te.$$.fragment,e),g(Ue.$$.fragment,e),g(Je.$$.fragment,e),g(Ae.$$.fragment,e),g(Ve.$$.fragment,e),g(Ce.$$.fragment,e),g(Ie.$$.fragment,e),g(Ze.$$.fragment,e),g(Ge.$$.fragment,e),g(Be.$$.fragment,e),g(Fe.$$.fragment,e),g(Qe.$$.fragment,e),g(oe.$$.fragment,e),g(We.$$.fragment,e),g(Pe.$$.fragment,e),g(Ne.$$.fragment,e),Hs=!1},d(e){t(u),e&&t(T),e&&t(b),w(_),e&&t(Yt),e&&t(He),e&&t(qt),w(me,e),e&&t(Lt),e&&t(xe),e&&t(Ot),w(fe,e),e&&t(Kt),e&&t(I),e&&t(es),e&&t(H),e&&t(ts),e&&t(Z),w(we),e&&t(ss),e&&t(De),e&&t(os),w(be,e),e&&t(as),e&&t(z),e&&t(rs),e&&t(G),w(_e),e&&t(ls),e&&t(Ye),e&&t(ns),w($e,e),e&&t(is),e&&t(qe),e&&t(ps),e&&t(X),e&&t(ms),w(Y,e),e&&t(cs),e&&t(Q),w(ke),e&&t(hs),e&&t(L),e&&t(us),e&&t(tt),e&&t(fs),w(Ee,e),e&&t(ds),e&&t(ot),e&&t(vs),w(Te,e),e&&t(ys),e&&t(P),w(Ue),e&&t(gs),e&&t(K),e&&t(ws),w(Je,e),e&&t(bs),e&&t(rt),e&&t(_s),w(Ae,e),e&&t($s),e&&t(N),w(Ve),e&&t(ks),e&&t(lt),e&&t(Ms),w(Ce,e),e&&t(js),e&&t(nt),e&&t(Es),w(Ie,e),e&&t(Ts),e&&t(it),e&&t(Us),w(Ze,e),e&&t(Js),e&&t(S),w(Ge),e&&t(As),e&&t(M),e&&t(Vs),w(Be,e),e&&t(Cs),e&&t(pt),e&&t(Is),w(Fe,e),e&&t(Zs),e&&t(mt),e&&t(Gs),w(Qe,e),e&&t(Bs),e&&t(se),e&&t(Fs),w(oe,e),e&&t(Qs),w(We,e),e&&t(Ws),e&&t(ae),e&&t(Ps),e&&t(re),e&&t(Ns),e&&t(R),w(Pe),e&&t(Ss),e&&t(C),e&&t(Rs),w(Ne,e)}}}const Tl={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 Ul(Re){return kl(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Zl extends wl{constructor(u){super();bl(this,u,Ul,El,_l,{})}}export{Zl as default,Tl as metadata};
