import{S as vs,i as ws,s as Cs,e as n,k as d,w as b,t as o,M as ks,c as a,d as t,m as c,a as s,x as y,h as r,b as p,G as e,g as T,y as v,q as w,o as C,B as k,v as $s,L as bs}from"../../chunks/vendor-hf-doc-builder.js";import{T as gs}from"../../chunks/Tip-hf-doc-builder.js";import{D as E}from"../../chunks/Docstring-hf-doc-builder.js";import{C as ys}from"../../chunks/CodeBlock-hf-doc-builder.js";import{I as us}from"../../chunks/IconCopyLink-hf-doc-builder.js";import{E as _s}from"../../chunks/ExampleCodeBlock-hf-doc-builder.js";function Ps(W){let h,P,u,g,x;return{c(){h=n("p"),P=o(`A configuration file can be loaded and saved to disk. Loading the configuration file and using this file to
initialize a model does `),u=n("strong"),g=o("not"),x=o(" load the model weights. It only affects the model\u2019s configuration.")},l(m){h=a(m,"P",{});var _=s(h);P=r(_,`A configuration file can be loaded and saved to disk. Loading the configuration file and using this file to
initialize a model does `),u=a(_,"STRONG",{});var B=s(u);g=r(B,"not"),B.forEach(t),x=r(_," load the model weights. It only affects the model\u2019s configuration."),_.forEach(t)},m(m,_){T(m,h,_),e(h,P),e(h,u),e(u,g),e(h,x)},d(m){m&&t(h)}}}function xs(W){let h,P,u,g,x;return g=new ys({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Db25maWclMEElMEFjb25maWclMjAlM0QlMjBBdXRvQ29uZmlnLmZyb21fcHJldHJhaW5lZCglMjJiZXJ0LWJhc2UtY2FzZWQlMjIpJTBBJTBBJTIzJTIwUHVzaCUyMHRoZSUyMGNvbmZpZyUyMHRvJTIweW91ciUyMG5hbWVzcGFjZSUyMHdpdGglMjB0aGUlMjBuYW1lJTIwJTIybXktZmluZXR1bmVkLWJlcnQlMjIuJTBBY29uZmlnLnB1c2hfdG9faHViKCUyMm15LWZpbmV0dW5lZC1iZXJ0JTIyKSUwQSUwQSUyMyUyMFB1c2glMjB0aGUlMjBjb25maWclMjB0byUyMGFuJTIwb3JnYW5pemF0aW9uJTIwd2l0aCUyMHRoZSUyMG5hbWUlMjAlMjJteS1maW5ldHVuZWQtYmVydCUyMi4lMEFjb25maWcucHVzaF90b19odWIoJTIyaHVnZ2luZ2ZhY2UlMkZteS1maW5ldHVuZWQtYmVydCUyMik=",highlighted:`<span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoConfig

config = AutoConfig.from_pretrained(<span class="hljs-string">&quot;bert-base-cased&quot;</span>)

<span class="hljs-comment"># Push the config to your namespace with the name &quot;my-finetuned-bert&quot;.</span>
config.push_to_hub(<span class="hljs-string">&quot;my-finetuned-bert&quot;</span>)

<span class="hljs-comment"># Push the config to an organization with the name &quot;my-finetuned-bert&quot;.</span>
config.push_to_hub(<span class="hljs-string">&quot;huggingface/my-finetuned-bert&quot;</span>)`}}),{c(){h=n("p"),P=o("Examples:"),u=d(),b(g.$$.fragment)},l(m){h=a(m,"P",{});var _=s(h);P=r(_,"Examples:"),_.forEach(t),u=c(m),y(g.$$.fragment,m)},m(m,_){T(m,h,_),e(h,P),T(m,u,_),v(g,m,_),x=!0},p:bs,i(m){x||(w(g.$$.fragment,m),x=!0)},o(m){C(g.$$.fragment,m),x=!1},d(m){m&&t(h),m&&t(u),k(g,m)}}}function Ts(W){let h,P,u,g,x;return g=new ys({props:{code:"JTIzJTIwV2UlMjBjYW4ndCUyMGluc3RhbnRpYXRlJTIwZGlyZWN0bHklMjB0aGUlMjBiYXNlJTIwY2xhc3MlMjAqUHJldHJhaW5lZENvbmZpZyolMjBzbyUyMGxldCdzJTIwc2hvdyUyMHRoZSUyMGV4YW1wbGVzJTIwb24lMjBhJTBBJTIzJTIwZGVyaXZlZCUyMGNsYXNzJTNBJTIwQmVydENvbmZpZyUwQWNvbmZpZyUyMCUzRCUyMEJlcnRDb25maWcuZnJvbV9wcmV0cmFpbmVkKCUwQSUyMCUyMCUyMCUyMCUyMmJlcnQtYmFzZS11bmNhc2VkJTIyJTBBKSUyMCUyMCUyMyUyMERvd25sb2FkJTIwY29uZmlndXJhdGlvbiUyMGZyb20lMjBodWdnaW5nZmFjZS5jbyUyMGFuZCUyMGNhY2hlLiUwQWNvbmZpZyUyMCUzRCUyMEJlcnRDb25maWcuZnJvbV9wcmV0cmFpbmVkKCUwQSUyMCUyMCUyMCUyMCUyMi4lMkZ0ZXN0JTJGc2F2ZWRfbW9kZWwlMkYlMjIlMEEpJTIwJTIwJTIzJTIwRS5nLiUyMGNvbmZpZyUyMChvciUyMG1vZGVsKSUyMHdhcyUyMHNhdmVkJTIwdXNpbmclMjAqc2F2ZV9wcmV0cmFpbmVkKCcuJTJGdGVzdCUyRnNhdmVkX21vZGVsJTJGJykqJTBBY29uZmlnJTIwJTNEJTIwQmVydENvbmZpZy5mcm9tX3ByZXRyYWluZWQoJTIyLiUyRnRlc3QlMkZzYXZlZF9tb2RlbCUyRm15X2NvbmZpZ3VyYXRpb24uanNvbiUyMiklMEFjb25maWclMjAlM0QlMjBCZXJ0Q29uZmlnLmZyb21fcHJldHJhaW5lZCglMjJiZXJ0LWJhc2UtdW5jYXNlZCUyMiUyQyUyMG91dHB1dF9hdHRlbnRpb25zJTNEVHJ1ZSUyQyUyMGZvbyUzREZhbHNlKSUwQWFzc2VydCUyMGNvbmZpZy5vdXRwdXRfYXR0ZW50aW9ucyUyMCUzRCUzRCUyMFRydWUlMEFjb25maWclMkMlMjB1bnVzZWRfa3dhcmdzJTIwJTNEJTIwQmVydENvbmZpZy5mcm9tX3ByZXRyYWluZWQoJTBBJTIwJTIwJTIwJTIwJTIyYmVydC1iYXNlLXVuY2FzZWQlMjIlMkMlMjBvdXRwdXRfYXR0ZW50aW9ucyUzRFRydWUlMkMlMjBmb28lM0RGYWxzZSUyQyUyMHJldHVybl91bnVzZWRfa3dhcmdzJTNEVHJ1ZSUwQSklMEFhc3NlcnQlMjBjb25maWcub3V0cHV0X2F0dGVudGlvbnMlMjAlM0QlM0QlMjBUcnVlJTBBYXNzZXJ0JTIwdW51c2VkX2t3YXJncyUyMCUzRCUzRCUyMCU3QiUyMmZvbyUyMiUzQSUyMEZhbHNlJTdE",highlighted:`<span class="hljs-comment"># We can&#x27;t instantiate directly the base class *PretrainedConfig* so let&#x27;s show the examples on a</span>
<span class="hljs-comment"># derived class: BertConfig</span>
config = BertConfig.from_pretrained(
    <span class="hljs-string">&quot;bert-base-uncased&quot;</span>
)  <span class="hljs-comment"># Download configuration from huggingface.co and cache.</span>
config = BertConfig.from_pretrained(
    <span class="hljs-string">&quot;./test/saved_model/&quot;</span>
)  <span class="hljs-comment"># E.g. config (or model) was saved using *save_pretrained(&#x27;./test/saved_model/&#x27;)*</span>
config = BertConfig.from_pretrained(<span class="hljs-string">&quot;./test/saved_model/my_configuration.json&quot;</span>)
config = BertConfig.from_pretrained(<span class="hljs-string">&quot;bert-base-uncased&quot;</span>, output_attentions=<span class="hljs-literal">True</span>, foo=<span class="hljs-literal">False</span>)
<span class="hljs-keyword">assert</span> config.output_attentions == <span class="hljs-literal">True</span>
config, unused_kwargs = BertConfig.from_pretrained(
    <span class="hljs-string">&quot;bert-base-uncased&quot;</span>, output_attentions=<span class="hljs-literal">True</span>, foo=<span class="hljs-literal">False</span>, return_unused_kwargs=<span class="hljs-literal">True</span>
)
<span class="hljs-keyword">assert</span> config.output_attentions == <span class="hljs-literal">True</span>
<span class="hljs-keyword">assert</span> unused_kwargs == {<span class="hljs-string">&quot;foo&quot;</span>: <span class="hljs-literal">False</span>}`}}),{c(){h=n("p"),P=o("Examples:"),u=d(),b(g.$$.fragment)},l(m){h=a(m,"P",{});var _=s(h);P=r(_,"Examples:"),_.forEach(t),u=c(m),y(g.$$.fragment,m)},m(m,_){T(m,h,_),e(h,P),T(m,u,_),v(g,m,_),x=!0},p:bs,i(m){x||(w(g.$$.fragment,m),x=!0)},o(m){C(g.$$.fragment,m),x=!1},d(m){m&&t(h),m&&t(u),k(g,m)}}}function Es(W){let h,P;return{c(){h=n("p"),P=o("This API is experimental and may have some slight breaking changes in the next releases.")},l(u){h=a(u,"P",{});var g=s(h);P=r(g,"This API is experimental and may have some slight breaking changes in the next releases."),g.forEach(t)},m(u,g){T(u,h,g),e(h,P)},d(u){u&&t(h)}}}function Ms(W){let h,P,u,g,x,m,_,B,xo,oo,O,To,Le,Eo,Mo,ro,M,Uo,at,zo,jo,st,Jo,Do,it,Io,Zo,dt,Wo,No,no,q,G,ct,ve,Fo,lt,So,ao,l,we,Ao,mt,Vo,qo,H,Lo,ft,Ro,Bo,j,N,ht,Oo,Go,pt,Ho,Xo,Re,Yo,Qo,Ko,U,gt,er,tr,ut,or,rr,Be,nr,ar,Oe,sr,ir,Ge,dr,cr,lr,X,_t,mr,fr,bt,hr,pr,gr,Y,yt,ur,_r,vt,br,yr,vr,wt,wr,Cr,J,Q,Ct,kr,$r,kt,Pr,xr,Tr,K,$t,Er,Mr,Pt,Ur,zr,jr,ee,xt,Jr,Dr,Tt,Ir,Zr,Wr,te,Et,Nr,Fr,Mt,Sr,Ar,Vr,F,Ce,qr,Ut,Lr,Rr,oe,Br,re,ke,Or,D,Gr,zt,Hr,Xr,jt,Yr,Qr,Jt,Kr,en,tn,ne,$e,on,Pe,rn,He,nn,an,sn,ae,xe,dn,Te,cn,Xe,ln,mn,fn,S,Ee,hn,Me,pn,Ye,gn,un,_n,se,bn,ie,Ue,yn,I,vn,Dt,wn,Cn,Qe,kn,$n,It,Pn,xn,Tn,A,ze,En,je,Mn,Zt,Un,zn,jn,de,Jn,ce,Je,Dn,L,In,Wt,Zn,Wn,Ke,Nn,Fn,Sn,le,De,An,Nt,Vn,qn,me,Ie,Ln,Ft,Rn,Bn,fe,Ze,On,St,Gn,Hn,he,We,Xn,At,Yn,Qn,pe,Ne,Kn,Fe,ea,Vt,ta,oa,ra,z,Se,na,Ae,aa,qt,sa,ia,da,R,ca,Lt,la,ma,Rt,fa,ha,pa,Bt,ga,so;return m=new us({}),ve=new us({}),we=new E({props:{name:"class transformers.PretrainedConfig",anchor:"transformers.PretrainedConfig",parameters:[{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.PretrainedConfig.name_or_path",description:`<strong>name_or_path</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&quot;</code>) &#x2014;
Store the string that was passed to <a href="/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">PreTrainedModel.from_pretrained()</a> or
<a href="/docs/transformers/main/en/main_classes/model#transformers.TFPreTrainedModel.from_pretrained">TFPreTrainedModel.from_pretrained()</a> as <code>pretrained_model_name_or_path</code> if the configuration was created
with such a method.`,name:"name_or_path"},{anchor:"transformers.PretrainedConfig.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not the model should return all hidden-states.`,name:"output_hidden_states"},{anchor:"transformers.PretrainedConfig.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not the model should returns all attentions.`,name:"output_attentions"},{anchor:"transformers.PretrainedConfig.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not the model should return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.PretrainedConfig.is_encoder_decoder",description:`<strong>is_encoder_decoder</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether the model is used as an encoder/decoder or not.`,name:"is_encoder_decoder"},{anchor:"transformers.PretrainedConfig.is_decoder",description:`<strong>is_decoder</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether the model is used as decoder or not (in which case it&#x2019;s used as an encoder).`,name:"is_decoder"},{anchor:"transformers.PretrainedConfig.cross_attention_hidden_size**",description:`<strong>cross_attention_hidden_size**</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
The hidden size of the cross-attention layer in case the model is used as a decoder in an encoder-decoder
setting and the cross-attention hidden dimension differs from <code>self.config.hidden_size</code>.`,name:"cross_attention_hidden_size**"},{anchor:"transformers.PretrainedConfig.add_cross_attention",description:`<strong>add_cross_attention</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether cross-attention layers should be added to the model. Note, this option is only relevant for models
that can be used as decoder models within the <a href="/docs/transformers/main/en/model_doc/encoder-decoder#transformers.EncoderDecoderModel">EncoderDecoderModel</a> class, which consists of all models
in <code>AUTO_MODELS_FOR_CAUSAL_LM</code>.`,name:"add_cross_attention"},{anchor:"transformers.PretrainedConfig.tie_encoder_decoder",description:`<strong>tie_encoder_decoder</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether all encoder weights should be tied to their equivalent decoder weights. This requires the encoder
and decoder model to have the exact same parameter names.`,name:"tie_encoder_decoder"},{anchor:"transformers.PretrainedConfig.prune_heads",description:`<strong>prune_heads</strong> (<code>Dict[int, List[int]]</code>, <em>optional</em>, defaults to <code>{}</code>) &#x2014;
Pruned heads of the model. The keys are the selected layer indices and the associated values, the list of
heads to prune in said layer.</p>
<p>For instance <code>{1: [0, 2], 2: [2, 3]}</code> will prune heads 0 and 2 on layer 1 and heads 2 and 3 on layer 2.`,name:"prune_heads"},{anchor:"transformers.PretrainedConfig.chunk_size_feed_forward",description:`<strong>chunk_size_feed_forward</strong> (<code>int</code>, <em>optional</em>, defaults to <code>0</code>) &#x2014;
The chunk size of all feed forward layers in the residual attention blocks. A chunk size of <code>0</code> means that
the feed forward layer is not chunked. A chunk size of n means that the feed forward layer processes <code>n</code> &lt;
sequence_length embeddings at a time. For more information on feed forward chunking, see <a href="../glossary.html#feed-forward-chunking">How does Feed
Forward Chunking work?</a>.`,name:"chunk_size_feed_forward"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/configuration_utils.py#L49",parameterGroups:[{title:"Parameters for sequence generation",parametersDescription:[{anchor:"transformers.PretrainedConfig.max_length",description:`<strong>max_length</strong> (<code>int</code>, <em>optional</em>, defaults to 20) &#x2014;
Maximum length that will be used by default in the <code>generate</code> method of the model.`,name:"max_length"},{anchor:"transformers.PretrainedConfig.min_length",description:`<strong>min_length</strong> (<code>int</code>, <em>optional</em>, defaults to 0) &#x2014;
Minimum length that will be used by default in the <code>generate</code> method of the model.`,name:"min_length"},{anchor:"transformers.PretrainedConfig.do_sample",description:`<strong>do_sample</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Flag that will be used by default in the <code>generate</code> method of the model. Whether or not to use sampling ;
use greedy decoding otherwise.`,name:"do_sample"},{anchor:"transformers.PretrainedConfig.early_stopping",description:`<strong>early_stopping</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Flag that will be used by default in the <code>generate</code> method of the model. Whether to stop the beam search
when at least <code>num_beams</code> sentences are finished per batch or not.`,name:"early_stopping"},{anchor:"transformers.PretrainedConfig.num_beams",description:`<strong>num_beams</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
Number of beams for beam search that will be used by default in the <code>generate</code> method of the model. 1 means
no beam search.`,name:"num_beams"},{anchor:"transformers.PretrainedConfig.num_beam_groups",description:`<strong>num_beam_groups</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
Number of groups to divide <code>num_beams</code> into in order to ensure diversity among different groups of beams
that will be used by default in the <code>generate</code> method of the model. 1 means no group beam search.`,name:"num_beam_groups"},{anchor:"transformers.PretrainedConfig.diversity_penalty",description:`<strong>diversity_penalty</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#x2014;
Value to control diversity for group beam search. that will be used by default in the <code>generate</code> method of
the model. 0 means no diversity penalty. The higher the penalty, the more diverse are the outputs.`,name:"diversity_penalty"},{anchor:"transformers.PretrainedConfig.temperature",description:`<strong>temperature</strong> (<code>float</code>, <em>optional</em>, defaults to 1.0) &#x2014;
The value used to module the next token probabilities that will be used by default in the <code>generate</code> method
of the model. Must be strictly positive.`,name:"temperature"},{anchor:"transformers.PretrainedConfig.top_k",description:`<strong>top_k</strong> (<code>int</code>, <em>optional</em>, defaults to 50) &#x2014;
Number of highest probability vocabulary tokens to keep for top-k-filtering that will be used by default in
the <code>generate</code> method of the model.`,name:"top_k"},{anchor:"transformers.PretrainedConfig.top_p",description:`<strong>top_p</strong> (<code>float</code>, <em>optional</em>, defaults to 1) &#x2014;
Value that will be used by default in the <code>generate</code> method of the model for <code>top_p</code>. If set to float &lt; 1,
only the most probable tokens with probabilities that add up to <code>top_p</code> or higher are kept for generation.`,name:"top_p"},{anchor:"transformers.PretrainedConfig.typical_p",description:`<strong>typical_p</strong> (<code>float</code>, <em>optional</em>, defaults to 1) &#x2014;
Local typicality measures how similar the conditional probability of predicting a target token next is to
the expected conditional probability of predicting a random token next, given the partial text already
generated. If set to float &lt; 1, the smallest set of the most locally typical tokens with probabilities that
add up to <code>typical_p</code> or higher are kept for generation. See <a href="https://arxiv.org/pdf/2202.00666.pdf" rel="nofollow">this
paper</a> for more details.`,name:"typical_p"},{anchor:"transformers.PretrainedConfig.repetition_penalty",description:`<strong>repetition_penalty</strong> (<code>float</code>, <em>optional</em>, defaults to 1) &#x2014;
Parameter for repetition penalty that will be used by default in the <code>generate</code> method of the model. 1.0
means no penalty.`,name:"repetition_penalty"},{anchor:"transformers.PretrainedConfig.length_penalty",description:`<strong>length_penalty</strong> (<code>float</code>, <em>optional</em>, defaults to 1) &#x2014;
Exponential penalty to the length that is used with beam-based generation. It is applied as an exponent to
the sequence length, which in turn is used to divide the score of the sequence. Since the score is the log
likelihood of the sequence (i.e. negative), <code>length_penalty</code> &gt; 0.0 promotes longer sequences, while
<code>length_penalty</code> &lt; 0.0 encourages shorter sequences.`,name:"length_penalty"},{anchor:"transformers.PretrainedConfig.no_repeat_ngram_size",description:`<strong>no_repeat_ngram_size</strong> (<code>int</code>, <em>optional</em>, defaults to 0) &#x2014; Value that will be used by default in the &#x2014;
<code>generate</code> method of the model for <code>no_repeat_ngram_size</code>. If set to int &gt; 0, all ngrams of that size can
only occur once.`,name:"no_repeat_ngram_size"},{anchor:"transformers.PretrainedConfig.encoder_no_repeat_ngram_size",description:`<strong>encoder_no_repeat_ngram_size</strong> (<code>int</code>, <em>optional</em>, defaults to 0) &#x2014; Value that will be used by &#x2014;
default in the <code>generate</code> method of the model for <code>encoder_no_repeat_ngram_size</code>. If set to int &gt; 0, all
ngrams of that size that occur in the <code>encoder_input_ids</code> cannot occur in the <code>decoder_input_ids</code>.`,name:"encoder_no_repeat_ngram_size"},{anchor:"transformers.PretrainedConfig.bad_words_ids",description:`<strong>bad_words_ids</strong> (<code>List[int]</code>, <em>optional</em>) &#x2014;
List of token ids that are not allowed to be generated that will be used by default in the <code>generate</code>
method of the model. In order to get the tokens of the words that should not appear in the generated text,
use <code>tokenizer.encode(bad_word, add_prefix_space=True)</code>.`,name:"bad_words_ids"},{anchor:"transformers.PretrainedConfig.num_return_sequences",description:`<strong>num_return_sequences</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
Number of independently computed returned sequences for each element in the batch that will be used by
default in the <code>generate</code> method of the model.`,name:"num_return_sequences"},{anchor:"transformers.PretrainedConfig.output_scores",description:`<strong>output_scores</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether the model should return the logits when used for generation.`,name:"output_scores"},{anchor:"transformers.PretrainedConfig.return_dict_in_generate",description:`<strong>return_dict_in_generate</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether the model should return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a <code>torch.LongTensor</code>.`,name:"return_dict_in_generate"},{anchor:"transformers.PretrainedConfig.forced_bos_token_id",description:`<strong>forced_bos_token_id</strong> (<code>int</code>, <em>optional</em>) &#x2014;
The id of the token to force as the first generated token after the <code>decoder_start_token_id</code>. Useful for
multilingual models like <a href="../model_doc/mbart">mBART</a> where the first generated token needs to be the target
language token.`,name:"forced_bos_token_id"},{anchor:"transformers.PretrainedConfig.forced_eos_token_id",description:`<strong>forced_eos_token_id</strong> (<code>int</code>, <em>optional</em>) &#x2014;
The id of the token to force as the last generated token when <code>max_length</code> is reached.`,name:"forced_eos_token_id"},{anchor:"transformers.PretrainedConfig.remove_invalid_values",description:`<strong>remove_invalid_values</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether to remove possible <em>nan</em> and <em>inf</em> outputs of the model to prevent the generation method to crash.
Note that using <code>remove_invalid_values</code> can slow down generation.`,name:"remove_invalid_values"}]},{title:"Parameters for fine-tuning tasks",parametersDescription:[{anchor:"transformers.PretrainedConfig.architectures",description:`<strong>architectures</strong> (<code>List[str]</code>, <em>optional</em>) &#x2014;
Model architectures that can be used with the model pretrained weights.`,name:"architectures"},{anchor:"transformers.PretrainedConfig.finetuning_task",description:`<strong>finetuning_task</strong> (<code>str</code>, <em>optional</em>) &#x2014;
Name of the task used to fine-tune the model. This can be used when converting from an original (TensorFlow
or PyTorch) checkpoint.`,name:"finetuning_task"},{anchor:"transformers.PretrainedConfig.id2label",description:`<strong>id2label</strong> (<code>Dict[int, str]</code>, <em>optional</em>) &#x2014;
A map from index (for instance prediction index, or target index) to label.`,name:"id2label"},{anchor:"transformers.PretrainedConfig.label2id",description:"<strong>label2id</strong> (<code>Dict[str, int]</code>, <em>optional</em>) &#x2014; A map from label to index for the model.",name:"label2id"},{anchor:"transformers.PretrainedConfig.num_labels",description:`<strong>num_labels</strong> (<code>int</code>, <em>optional</em>) &#x2014;
Number of labels to use in the last layer added to the model, typically for a classification task.`,name:"num_labels"},{anchor:"transformers.PretrainedConfig.task_specific_params",description:`<strong>task_specific_params</strong> (<code>Dict[str, Any]</code>, <em>optional</em>) &#x2014;
Additional keyword arguments to store for the current task.`,name:"task_specific_params"},{anchor:"transformers.PretrainedConfig.problem_type",description:`<strong>problem_type</strong> (<code>str</code>, <em>optional</em>) &#x2014;
Problem type for <code>XxxForSequenceClassification</code> models. Can be one of <code>&quot;regression&quot;</code>,
<code>&quot;single_label_classification&quot;</code> or <code>&quot;multi_label_classification&quot;</code>.`,name:"problem_type"}]},{title:"Parameters linked to the tokenizer",parametersDescription:[{anchor:"transformers.PretrainedConfig.tokenizer_class",description:`<strong>tokenizer_class</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The name of the associated tokenizer class to use (if none is set, will use the tokenizer associated to the
model by default).`,name:"tokenizer_class"},{anchor:"transformers.PretrainedConfig.prefix",description:`<strong>prefix</strong> (<code>str</code>, <em>optional</em>) &#x2014;
A specific prompt that should be added at the beginning of each text before calling the model.`,name:"prefix"},{anchor:"transformers.PretrainedConfig.bos_token_id",description:"<strong>bos_token_id</strong> (<code>int</code>, <em>optional</em>) &#x2014; The id of the <em>beginning-of-stream</em> token.",name:"bos_token_id"},{anchor:"transformers.PretrainedConfig.pad_token_id",description:"<strong>pad_token_id</strong> (<code>int</code>, <em>optional</em>) &#x2014; The id of the <em>padding</em> token.",name:"pad_token_id"},{anchor:"transformers.PretrainedConfig.eos_token_id",description:"<strong>eos_token_id</strong> (<code>int</code>, <em>optional</em>) &#x2014; The id of the <em>end-of-stream</em> token.",name:"eos_token_id"},{anchor:"transformers.PretrainedConfig.decoder_start_token_id",description:`<strong>decoder_start_token_id</strong> (<code>int</code>, <em>optional</em>) &#x2014;
If an encoder-decoder model starts decoding with a different token than <em>bos</em>, the id of that token.`,name:"decoder_start_token_id"},{anchor:"transformers.PretrainedConfig.sep_token_id",description:"<strong>sep_token_id</strong> (<code>int</code>, <em>optional</em>) &#x2014; The id of the <em>separation</em> token.",name:"sep_token_id"}]},{title:"PyTorch specific parameters",parametersDescription:[{anchor:"transformers.PretrainedConfig.torchscript",description:`<strong>torchscript</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not the model should be used with Torchscript.`,name:"torchscript"},{anchor:"transformers.PretrainedConfig.tie_word_embeddings",description:`<strong>tie_word_embeddings</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether the model&#x2019;s input and output word embeddings should be tied. Note that this is only relevant if the
model has a output word embedding layer.`,name:"tie_word_embeddings"},{anchor:"transformers.PretrainedConfig.torch_dtype",description:`<strong>torch_dtype</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The <code>dtype</code> of the weights. This attribute can be used to initialize the model to a non-default <code>dtype</code>
(which is normally <code>float32</code>) and thus allow for optimal storage allocation. For example, if the saved
model is <code>float16</code>, ideally we want to load it back using the minimal amount of memory needed to load
<code>float16</code> weights. Since the config object is stored in plain text, this attribute contains just the
floating type string without the <code>torch.</code> prefix. For example, for <code>torch.float16</code> \`<code>torch_dtype</code> is the
<code>&quot;float16&quot;</code> string.</p>
<p>This attribute is currently not being used during model loading time, but this may change in the future
versions. But we can already start preparing for the future by saving the dtype with save_pretrained.`,name:"torch_dtype"}]},{title:"TensorFlow specific parameters",parametersDescription:[{anchor:"transformers.PretrainedConfig.use_bfloat16",description:`<strong>use_bfloat16</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not the model should use BFloat16 scalars (only used by some TensorFlow models).`,name:"use_bfloat16"},{anchor:"transformers.PretrainedConfig.tf_legacy_loss",description:`<strong>tf_legacy_loss</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether the model should use legacy TensorFlow losses. Legacy losses have variable output shapes and may
not be XLA-compatible. This option is here for backward compatibility and will be removed in Transformers
v5.`,name:"tf_legacy_loss"}]}]}}),H=new gs({props:{$$slots:{default:[Ps]},$$scope:{ctx:W}}}),Ce=new E({props:{name:"push_to_hub",anchor:"transformers.PretrainedConfig.push_to_hub",parameters:[{name:"repo_id",val:": str"},{name:"use_temp_dir",val:": typing.Optional[bool] = None"},{name:"commit_message",val:": typing.Optional[str] = None"},{name:"private",val:": typing.Optional[bool] = None"},{name:"token",val:": typing.Union[bool, str, NoneType] = None"},{name:"max_shard_size",val:": typing.Union[int, str, NoneType] = '10GB'"},{name:"create_pr",val:": bool = False"},{name:"safe_serialization",val:": bool = False"},{name:"revision",val:": str = None"},{name:"**deprecated_kwargs",val:""}],parametersDescription:[{anchor:"transformers.PretrainedConfig.push_to_hub.repo_id",description:`<strong>repo_id</strong> (<code>str</code>) &#x2014;
The name of the repository you want to push your config to. It should contain your organization name
when pushing to a given organization.`,name:"repo_id"},{anchor:"transformers.PretrainedConfig.push_to_hub.use_temp_dir",description:`<strong>use_temp_dir</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to use a temporary directory to store the files saved before they are pushed to the Hub.
Will default to <code>True</code> if there is no directory named like <code>repo_id</code>, <code>False</code> otherwise.`,name:"use_temp_dir"},{anchor:"transformers.PretrainedConfig.push_to_hub.commit_message",description:`<strong>commit_message</strong> (<code>str</code>, <em>optional</em>) &#x2014;
Message to commit while pushing. Will default to <code>&quot;Upload config&quot;</code>.`,name:"commit_message"},{anchor:"transformers.PretrainedConfig.push_to_hub.private",description:`<strong>private</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not the repository created should be private.`,name:"private"},{anchor:"transformers.PretrainedConfig.push_to_hub.token",description:`<strong>token</strong> (<code>bool</code> or <code>str</code>, <em>optional</em>) &#x2014;
The token to use as HTTP bearer authorization for remote files. If <code>True</code>, will use the token generated
when running <code>huggingface-cli login</code> (stored in <code>~/.huggingface</code>). Will default to <code>True</code> if <code>repo_url</code>
is not specified.`,name:"token"},{anchor:"transformers.PretrainedConfig.push_to_hub.max_shard_size",description:`<strong>max_shard_size</strong> (<code>int</code> or <code>str</code>, <em>optional</em>, defaults to <code>&quot;10GB&quot;</code>) &#x2014;
Only applicable for models. The maximum size for a checkpoint before being sharded. Checkpoints shard
will then be each of size lower than this size. If expressed as a string, needs to be digits followed
by a unit (like <code>&quot;5MB&quot;</code>).`,name:"max_shard_size"},{anchor:"transformers.PretrainedConfig.push_to_hub.create_pr",description:`<strong>create_pr</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to create a PR with the uploaded files or directly commit.`,name:"create_pr"},{anchor:"transformers.PretrainedConfig.push_to_hub.safe_serialization",description:`<strong>safe_serialization</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to convert the model weights in safetensors format for safer serialization.`,name:"safe_serialization"},{anchor:"transformers.PretrainedConfig.push_to_hub.revision",description:`<strong>revision</strong> (<code>str</code>, <em>optional</em>) &#x2014;
Branch to push the uploaded files to.`,name:"revision"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/utils/hub.py#L786"}}),oe=new _s({props:{anchor:"transformers.PretrainedConfig.push_to_hub.example",$$slots:{default:[xs]},$$scope:{ctx:W}}}),ke=new E({props:{name:"dict_torch_dtype_to_str",anchor:"transformers.PretrainedConfig.dict_torch_dtype_to_str",parameters:[{name:"d",val:": typing.Dict[str, typing.Any]"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/configuration_utils.py#L977"}}),$e=new E({props:{name:"from_dict",anchor:"transformers.PretrainedConfig.from_dict",parameters:[{name:"config_dict",val:": typing.Dict[str, typing.Any]"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.PretrainedConfig.from_dict.config_dict",description:`<strong>config_dict</strong> (<code>Dict[str, Any]</code>) &#x2014;
Dictionary that will be used to instantiate the configuration object. Such a dictionary can be
retrieved from a pretrained checkpoint by leveraging the <a href="/docs/transformers/main/en/main_classes/configuration#transformers.PretrainedConfig.get_config_dict">get_config_dict()</a> method.`,name:"config_dict"},{anchor:"transformers.PretrainedConfig.from_dict.kwargs",description:`<strong>kwargs</strong> (<code>Dict[str, Any]</code>) &#x2014;
Additional parameters from which to initialize the configuration object.`,name:"kwargs"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/configuration_utils.py#L723",returnDescription:`
<p>The configuration object instantiated from those parameters.</p>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/configuration#transformers.PretrainedConfig"
>PretrainedConfig</a></p>
`}}),xe=new E({props:{name:"from_json_file",anchor:"transformers.PretrainedConfig.from_json_file",parameters:[{name:"json_file",val:": typing.Union[str, os.PathLike]"}],parametersDescription:[{anchor:"transformers.PretrainedConfig.from_json_file.json_file",description:`<strong>json_file</strong> (<code>str</code> or <code>os.PathLike</code>) &#x2014;
Path to the JSON file containing the parameters.`,name:"json_file"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/configuration_utils.py#L781",returnDescription:`
<p>The configuration object instantiated from that JSON file.</p>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/configuration#transformers.PretrainedConfig"
>PretrainedConfig</a></p>
`}}),Ee=new E({props:{name:"from_pretrained",anchor:"transformers.PretrainedConfig.from_pretrained",parameters:[{name:"pretrained_model_name_or_path",val:": typing.Union[str, os.PathLike]"},{name:"cache_dir",val:": typing.Union[str, os.PathLike, NoneType] = None"},{name:"force_download",val:": bool = False"},{name:"local_files_only",val:": bool = False"},{name:"token",val:": typing.Union[str, bool, NoneType] = None"},{name:"revision",val:": str = 'main'"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.PretrainedConfig.from_pretrained.pretrained_model_name_or_path",description:`<strong>pretrained_model_name_or_path</strong> (<code>str</code> or <code>os.PathLike</code>) &#x2014;
This can be either:</p>
<ul>
<li>a string, the <em>model id</em> of a pretrained model configuration hosted inside a model repo on
huggingface.co. Valid model ids can be located at the root-level, like <code>bert-base-uncased</code>, or
namespaced under a user or organization name, like <code>dbmdz/bert-base-german-cased</code>.</li>
<li>a path to a <em>directory</em> containing a configuration file saved using the
<a href="/docs/transformers/main/en/main_classes/configuration#transformers.PretrainedConfig.save_pretrained">save_pretrained()</a> method, e.g., <code>./my_model_directory/</code>.</li>
<li>a path or url to a saved configuration JSON <em>file</em>, e.g., <code>./my_model_directory/configuration.json</code>.</li>
</ul>`,name:"pretrained_model_name_or_path"},{anchor:"transformers.PretrainedConfig.from_pretrained.cache_dir",description:`<strong>cache_dir</strong> (<code>str</code> or <code>os.PathLike</code>, <em>optional</em>) &#x2014;
Path to a directory in which a downloaded pretrained model configuration should be cached if the
standard cache should not be used.`,name:"cache_dir"},{anchor:"transformers.PretrainedConfig.from_pretrained.force_download",description:`<strong>force_download</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to force to (re-)download the configuration files and override the cached versions if
they exist.`,name:"force_download"},{anchor:"transformers.PretrainedConfig.from_pretrained.resume_download",description:`<strong>resume_download</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to delete incompletely received file. Attempts to resume the download if such a file
exists.`,name:"resume_download"},{anchor:"transformers.PretrainedConfig.from_pretrained.proxies",description:`<strong>proxies</strong> (<code>Dict[str, str]</code>, <em>optional</em>) &#x2014;
A dictionary of proxy servers to use by protocol or endpoint, e.g., <code>{&apos;http&apos;: &apos;foo.bar:3128&apos;, &apos;http://hostname&apos;: &apos;foo.bar:4012&apos;}.</code> The proxies are used on each request.`,name:"proxies"},{anchor:"transformers.PretrainedConfig.from_pretrained.token",description:`<strong>token</strong> (<code>str</code> or <code>bool</code>, <em>optional</em>) &#x2014;
The token to use as HTTP bearer authorization for remote files. If <code>True</code>, or not specified, will use
the token generated when running <code>huggingface-cli login</code> (stored in <code>~/.huggingface</code>).`,name:"token"},{anchor:"transformers.PretrainedConfig.from_pretrained.revision",description:`<strong>revision</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;main&quot;</code>) &#x2014;
The specific model version to use. It can be a branch name, a tag name, or a commit id, since we use a
git-based system for storing models and other artifacts on huggingface.co, so <code>revision</code> can be any
identifier allowed by git.</p>
<div class="course-tip  bg-gradient-to-br dark:bg-gradient-to-r before:border-green-500 dark:before:border-green-800 from-green-50 dark:from-gray-900 to-white dark:to-gray-950 border border-green-50 text-green-700 dark:text-gray-400">
						
<p>To test a pull request you made on the Hub, you can pass \`revision=&#x201C;refs/pr/<pr_number>&#x201C;.</pr_number></p>

					</div>`,name:"revision"},{anchor:"transformers.PretrainedConfig.from_pretrained.return_unused_kwargs",description:`<strong>return_unused_kwargs</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
If <code>False</code>, then this function returns just the final configuration object.</p>
<p>If <code>True</code>, then this functions returns a <code>Tuple(config, unused_kwargs)</code> where <em>unused_kwargs</em> is a
dictionary consisting of the key/value pairs whose keys are not configuration attributes: i.e., the
part of <code>kwargs</code> which has not been used to update <code>config</code> and is otherwise ignored.`,name:"return_unused_kwargs"},{anchor:"transformers.PretrainedConfig.from_pretrained.subfolder",description:`<strong>subfolder</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&quot;</code>) &#x2014;
In case the relevant files are located inside a subfolder of the model repo on huggingface.co, you can
specify the folder name here.`,name:"subfolder"},{anchor:"transformers.PretrainedConfig.from_pretrained.kwargs",description:`<strong>kwargs</strong> (<code>Dict[str, Any]</code>, <em>optional</em>) &#x2014;
The values in kwargs of any keys which are configuration attributes will be used to override the loaded
values. Behavior concerning key/value pairs whose keys are <em>not</em> configuration attributes is controlled
by the <code>return_unused_kwargs</code> keyword parameter.`,name:"kwargs"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/configuration_utils.py#L497",returnDescription:`
<p>The configuration object instantiated from this pretrained model.</p>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/configuration#transformers.PretrainedConfig"
>PretrainedConfig</a></p>
`}}),se=new _s({props:{anchor:"transformers.PretrainedConfig.from_pretrained.example",$$slots:{default:[Ts]},$$scope:{ctx:W}}}),Ue=new E({props:{name:"get_config_dict",anchor:"transformers.PretrainedConfig.get_config_dict",parameters:[{name:"pretrained_model_name_or_path",val:": typing.Union[str, os.PathLike]"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.PretrainedConfig.get_config_dict.pretrained_model_name_or_path",description:`<strong>pretrained_model_name_or_path</strong> (<code>str</code> or <code>os.PathLike</code>) &#x2014;
The identifier of the pre-trained checkpoint from which we want the dictionary of parameters.`,name:"pretrained_model_name_or_path"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/configuration_utils.py#L600",returnDescription:`
<p>The dictionary(ies) that will be used to instantiate the configuration object.</p>
`,returnType:`
<p><code>Tuple[Dict, Dict]</code></p>
`}}),ze=new E({props:{name:"register_for_auto_class",anchor:"transformers.PretrainedConfig.register_for_auto_class",parameters:[{name:"auto_class",val:" = 'AutoConfig'"}],parametersDescription:[{anchor:"transformers.PretrainedConfig.register_for_auto_class.auto_class",description:`<strong>auto_class</strong> (<code>str</code> or <code>type</code>, <em>optional</em>, defaults to <code>&quot;AutoConfig&quot;</code>) &#x2014;
The auto class to register this new configuration with.`,name:"auto_class"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/configuration_utils.py#L989"}}),de=new gs({props:{warning:!0,$$slots:{default:[Es]},$$scope:{ctx:W}}}),Je=new E({props:{name:"save_pretrained",anchor:"transformers.PretrainedConfig.save_pretrained",parameters:[{name:"save_directory",val:": typing.Union[str, os.PathLike]"},{name:"push_to_hub",val:": bool = False"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.PretrainedConfig.save_pretrained.save_directory",description:`<strong>save_directory</strong> (<code>str</code> or <code>os.PathLike</code>) &#x2014;
Directory where the configuration JSON file will be saved (will be created if it does not exist).`,name:"save_directory"},{anchor:"transformers.PretrainedConfig.save_pretrained.push_to_hub",description:`<strong>push_to_hub</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to push your model to the Hugging Face model hub after saving it. You can specify the
repository you want to push to with <code>repo_id</code> (will default to the name of <code>save_directory</code> in your
namespace).`,name:"push_to_hub"},{anchor:"transformers.PretrainedConfig.save_pretrained.kwargs",description:`<strong>kwargs</strong> (<code>Dict[str, Any]</code>, <em>optional</em>) &#x2014;
Additional key word arguments passed along to the <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.push_to_hub">push_to_hub()</a> method.`,name:"kwargs"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/configuration_utils.py#L423"}}),De=new E({props:{name:"to_dict",anchor:"transformers.PretrainedConfig.to_dict",parameters:[],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/configuration_utils.py#L860",returnDescription:`
<p>Dictionary of all the attributes that make up this configuration instance.</p>
`,returnType:`
<p><code>Dict[str, Any]</code></p>
`}}),Ie=new E({props:{name:"to_diff_dict",anchor:"transformers.PretrainedConfig.to_diff_dict",parameters:[],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/configuration_utils.py#L809",returnDescription:`
<p>Dictionary of all the attributes that make up this configuration instance,</p>
`,returnType:`
<p><code>Dict[str, Any]</code></p>
`}}),Ze=new E({props:{name:"to_json_file",anchor:"transformers.PretrainedConfig.to_json_file",parameters:[{name:"json_file_path",val:": typing.Union[str, os.PathLike]"},{name:"use_diff",val:": bool = True"}],parametersDescription:[{anchor:"transformers.PretrainedConfig.to_json_file.json_file_path",description:`<strong>json_file_path</strong> (<code>str</code> or <code>os.PathLike</code>) &#x2014;
Path to the JSON file in which this configuration instance&#x2019;s parameters will be saved.`,name:"json_file_path"},{anchor:"transformers.PretrainedConfig.to_json_file.use_diff",description:`<strong>use_diff</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
If set to <code>True</code>, only the difference between the config instance and the default <code>PretrainedConfig()</code>
is serialized to JSON file.`,name:"use_diff"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/configuration_utils.py#L915"}}),We=new E({props:{name:"to_json_string",anchor:"transformers.PretrainedConfig.to_json_string",parameters:[{name:"use_diff",val:": bool = True"}],parametersDescription:[{anchor:"transformers.PretrainedConfig.to_json_string.use_diff",description:`<strong>use_diff</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
If set to <code>True</code>, only the difference between the config instance and the default <code>PretrainedConfig()</code>
is serialized to JSON string.`,name:"use_diff"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/configuration_utils.py#L897",returnDescription:`
<p>String containing all the attributes that make up this configuration instance in JSON format.</p>
`,returnType:`
<p><code>str</code></p>
`}}),Ne=new E({props:{name:"update",anchor:"transformers.PretrainedConfig.update",parameters:[{name:"config_dict",val:": typing.Dict[str, typing.Any]"}],parametersDescription:[{anchor:"transformers.PretrainedConfig.update.config_dict",description:"<strong>config_dict</strong> (<code>Dict[str, Any]</code>) &#x2014; Dictionary of attributes that should be updated for this class.",name:"config_dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/configuration_utils.py#L929"}}),Se=new E({props:{name:"update_from_string",anchor:"transformers.PretrainedConfig.update_from_string",parameters:[{name:"update_str",val:": str"}],parametersDescription:[{anchor:"transformers.PretrainedConfig.update_from_string.update_str",description:"<strong>update_str</strong> (<code>str</code>) &#x2014; String with attributes that should be updated for this class.",name:"update_str"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/configuration_utils.py#L939"}}),{c(){h=n("meta"),P=d(),u=n("h1"),g=n("a"),x=n("span"),b(m.$$.fragment),_=d(),B=n("span"),xo=o("Configuration"),oo=d(),O=n("p"),To=o("The base class "),Le=n("a"),Eo=o("PretrainedConfig"),Mo=o(` implements the common methods for loading/saving a configuration
either from a local file or directory, or from a pretrained model configuration provided by the library (downloaded
from HuggingFace\u2019s AWS S3 repository).`),ro=d(),M=n("p"),Uo=o(`Each derived config class implements model specific attributes. Common attributes present in all config classes are:
`),at=n("code"),zo=o("hidden_size"),jo=o(", "),st=n("code"),Jo=o("num_attention_heads"),Do=o(", and "),it=n("code"),Io=o("num_hidden_layers"),Zo=o(`. Text models further implement:
`),dt=n("code"),Wo=o("vocab_size"),No=o("."),no=d(),q=n("h2"),G=n("a"),ct=n("span"),b(ve.$$.fragment),Fo=d(),lt=n("span"),So=o("PretrainedConfig"),ao=d(),l=n("div"),b(we.$$.fragment),Ao=d(),mt=n("p"),Vo=o(`Base class for all configuration classes. Handles a few parameters common to all models\u2019 configurations as well as
methods for loading/downloading/saving configurations.`),qo=d(),b(H.$$.fragment),Lo=d(),ft=n("p"),Ro=o("Class attributes (overridden by derived classes):"),Bo=d(),j=n("ul"),N=n("li"),ht=n("strong"),Oo=o("model_type"),Go=o(" ("),pt=n("code"),Ho=o("str"),Xo=o(`) \u2014 An identifier for the model type, serialized into the JSON file, and used to recreate
the correct object in `),Re=n("a"),Yo=o("AutoConfig"),Qo=o("."),Ko=d(),U=n("li"),gt=n("strong"),er=o("is_composition"),tr=o(" ("),ut=n("code"),or=o("bool"),rr=o(`) \u2014 Whether the config class is composed of multiple sub-configs. In this case the
config has to be initialized from two or more configs of type `),Be=n("a"),nr=o("PretrainedConfig"),ar=o(` like:
`),Oe=n("a"),sr=o("EncoderDecoderConfig"),ir=o(" or "),Ge=n("a"),dr=o("~RagConfig"),cr=o("."),lr=d(),X=n("li"),_t=n("strong"),mr=o("keys_to_ignore_at_inference"),fr=o(" ("),bt=n("code"),hr=o("List[str]"),pr=o(`) \u2014 A list of keys to ignore by default when looking at dictionary
outputs of the model during inference.`),gr=d(),Y=n("li"),yt=n("strong"),ur=o("attribute_map"),_r=o(" ("),vt=n("code"),br=o("Dict[str, str]"),yr=o(`) \u2014 A dict that maps model specific attribute names to the standardized
naming of attributes.`),vr=d(),wt=n("p"),wr=o("Common attributes (present in all subclasses):"),Cr=d(),J=n("ul"),Q=n("li"),Ct=n("strong"),kr=o("vocab_size"),$r=o(" ("),kt=n("code"),Pr=o("int"),xr=o(`) \u2014 The number of tokens in the vocabulary, which is also the first dimension of the
embeddings matrix (this attribute may be missing for models that don\u2019t have a text modality like ViT).`),Tr=d(),K=n("li"),$t=n("strong"),Er=o("hidden_size"),Mr=o(" ("),Pt=n("code"),Ur=o("int"),zr=o(") \u2014 The hidden size of the model."),jr=d(),ee=n("li"),xt=n("strong"),Jr=o("num_attention_heads"),Dr=o(" ("),Tt=n("code"),Ir=o("int"),Zr=o(`) \u2014 The number of attention heads used in the multi-head attention layers of the
model.`),Wr=d(),te=n("li"),Et=n("strong"),Nr=o("num_hidden_layers"),Fr=o(" ("),Mt=n("code"),Sr=o("int"),Ar=o(") \u2014 The number of blocks in the model."),Vr=d(),F=n("div"),b(Ce.$$.fragment),qr=d(),Ut=n("p"),Lr=o("Upload the configuration file to the \u{1F917} Model Hub."),Rr=d(),b(oe.$$.fragment),Br=d(),re=n("div"),b(ke.$$.fragment),Or=d(),D=n("p"),Gr=o("Checks whether the passed dictionary and its nested dicts have a "),zt=n("em"),Hr=o("torch_dtype"),Xr=o(` key and if it\u2019s not None,
converts torch.dtype to a string of just the type. For example, `),jt=n("code"),Yr=o("torch.float32"),Qr=o(" get converted into "),Jt=n("em"),Kr=o("\u201Cfloat32\u201D"),en=o(`
string, which can then be stored in the json format.`),tn=d(),ne=n("div"),b($e.$$.fragment),on=d(),Pe=n("p"),rn=o("Instantiates a "),He=n("a"),nn=o("PretrainedConfig"),an=o(" from a Python dictionary of parameters."),sn=d(),ae=n("div"),b(xe.$$.fragment),dn=d(),Te=n("p"),cn=o("Instantiates a "),Xe=n("a"),ln=o("PretrainedConfig"),mn=o(" from the path to a JSON file of parameters."),fn=d(),S=n("div"),b(Ee.$$.fragment),hn=d(),Me=n("p"),pn=o("Instantiate a "),Ye=n("a"),gn=o("PretrainedConfig"),un=o(" (or a derived class) from a pretrained model configuration."),_n=d(),b(se.$$.fragment),bn=d(),ie=n("div"),b(Ue.$$.fragment),yn=d(),I=n("p"),vn=o("From a "),Dt=n("code"),wn=o("pretrained_model_name_or_path"),Cn=o(`, resolve to a dictionary of parameters, to be used for instantiating a
`),Qe=n("a"),kn=o("PretrainedConfig"),$n=o(" using "),It=n("code"),Pn=o("from_dict"),xn=o("."),Tn=d(),A=n("div"),b(ze.$$.fragment),En=d(),je=n("p"),Mn=o(`Register this class with a given auto class. This should only be used for custom configurations as the ones in
the library are already mapped with `),Zt=n("code"),Un=o("AutoConfig"),zn=o("."),jn=d(),b(de.$$.fragment),Jn=d(),ce=n("div"),b(Je.$$.fragment),Dn=d(),L=n("p"),In=o("Save a configuration object to the directory "),Wt=n("code"),Zn=o("save_directory"),Wn=o(`, so that it can be re-loaded using the
`),Ke=n("a"),Nn=o("from_pretrained()"),Fn=o(" class method."),Sn=d(),le=n("div"),b(De.$$.fragment),An=d(),Nt=n("p"),Vn=o("Serializes this instance to a Python dictionary."),qn=d(),me=n("div"),b(Ie.$$.fragment),Ln=d(),Ft=n("p"),Rn=o(`Removes all attributes from config which correspond to the default config attributes for better readability and
serializes to a Python dictionary.`),Bn=d(),fe=n("div"),b(Ze.$$.fragment),On=d(),St=n("p"),Gn=o("Save this instance to a JSON file."),Hn=d(),he=n("div"),b(We.$$.fragment),Xn=d(),At=n("p"),Yn=o("Serializes this instance to a JSON string."),Qn=d(),pe=n("div"),b(Ne.$$.fragment),Kn=d(),Fe=n("p"),ea=o("Updates attributes of this class with attributes from "),Vt=n("code"),ta=o("config_dict"),oa=o("."),ra=d(),z=n("div"),b(Se.$$.fragment),na=d(),Ae=n("p"),aa=o("Updates attributes of this class with attributes from "),qt=n("code"),sa=o("update_str"),ia=o("."),da=d(),R=n("p"),ca=o("The expected format is ints, floats and strings as is, and for booleans use "),Lt=n("code"),la=o("true"),ma=o(" or "),Rt=n("code"),fa=o("false"),ha=o(`. For example:
\u201Cn_embd=10,resid_pdrop=0.2,scale_attn_weights=false,summary_type=cls_index\u201D`),pa=d(),Bt=n("p"),ga=o("The keys to change have to already exist in the config object."),this.h()},l(i){const $=ks('[data-svelte="svelte-1phssyn"]',document.head);h=a($,"META",{name:!0,content:!0}),$.forEach(t),P=c(i),u=a(i,"H1",{class:!0});var Ve=s(u);g=a(Ve,"A",{id:!0,class:!0,href:!0});var Ot=s(g);x=a(Ot,"SPAN",{});var Gt=s(x);y(m.$$.fragment,Gt),Gt.forEach(t),Ot.forEach(t),_=c(Ve),B=a(Ve,"SPAN",{});var Ht=s(B);xo=r(Ht,"Configuration"),Ht.forEach(t),Ve.forEach(t),oo=c(i),O=a(i,"P",{});var io=s(O);To=r(io,"The base class "),Le=a(io,"A",{href:!0});var ua=s(Le);Eo=r(ua,"PretrainedConfig"),ua.forEach(t),Mo=r(io,` implements the common methods for loading/saving a configuration
either from a local file or directory, or from a pretrained model configuration provided by the library (downloaded
from HuggingFace\u2019s AWS S3 repository).`),io.forEach(t),ro=c(i),M=a(i,"P",{});var V=s(M);Uo=r(V,`Each derived config class implements model specific attributes. Common attributes present in all config classes are:
`),at=a(V,"CODE",{});var _a=s(at);zo=r(_a,"hidden_size"),_a.forEach(t),jo=r(V,", "),st=a(V,"CODE",{});var ba=s(st);Jo=r(ba,"num_attention_heads"),ba.forEach(t),Do=r(V,", and "),it=a(V,"CODE",{});var ya=s(it);Io=r(ya,"num_hidden_layers"),ya.forEach(t),Zo=r(V,`. Text models further implement:
`),dt=a(V,"CODE",{});var va=s(dt);Wo=r(va,"vocab_size"),va.forEach(t),No=r(V,"."),V.forEach(t),no=c(i),q=a(i,"H2",{class:!0});var co=s(q);G=a(co,"A",{id:!0,class:!0,href:!0});var wa=s(G);ct=a(wa,"SPAN",{});var Ca=s(ct);y(ve.$$.fragment,Ca),Ca.forEach(t),wa.forEach(t),Fo=c(co),lt=a(co,"SPAN",{});var ka=s(lt);So=r(ka,"PretrainedConfig"),ka.forEach(t),co.forEach(t),ao=c(i),l=a(i,"DIV",{class:!0});var f=s(l);y(we.$$.fragment,f),Ao=c(f),mt=a(f,"P",{});var $a=s(mt);Vo=r($a,`Base class for all configuration classes. Handles a few parameters common to all models\u2019 configurations as well as
methods for loading/downloading/saving configurations.`),$a.forEach(t),qo=c(f),y(H.$$.fragment,f),Lo=c(f),ft=a(f,"P",{});var Pa=s(ft);Ro=r(Pa,"Class attributes (overridden by derived classes):"),Pa.forEach(t),Bo=c(f),j=a(f,"UL",{});var ge=s(j);N=a(ge,"LI",{});var qe=s(N);ht=a(qe,"STRONG",{});var xa=s(ht);Oo=r(xa,"model_type"),xa.forEach(t),Go=r(qe," ("),pt=a(qe,"CODE",{});var Ta=s(pt);Ho=r(Ta,"str"),Ta.forEach(t),Xo=r(qe,`) \u2014 An identifier for the model type, serialized into the JSON file, and used to recreate
the correct object in `),Re=a(qe,"A",{href:!0});var Ea=s(Re);Yo=r(Ea,"AutoConfig"),Ea.forEach(t),Qo=r(qe,"."),qe.forEach(t),Ko=c(ge),U=a(ge,"LI",{});var Z=s(U);gt=a(Z,"STRONG",{});var Ma=s(gt);er=r(Ma,"is_composition"),Ma.forEach(t),tr=r(Z," ("),ut=a(Z,"CODE",{});var Ua=s(ut);or=r(Ua,"bool"),Ua.forEach(t),rr=r(Z,`) \u2014 Whether the config class is composed of multiple sub-configs. In this case the
config has to be initialized from two or more configs of type `),Be=a(Z,"A",{href:!0});var za=s(Be);nr=r(za,"PretrainedConfig"),za.forEach(t),ar=r(Z,` like:
`),Oe=a(Z,"A",{href:!0});var ja=s(Oe);sr=r(ja,"EncoderDecoderConfig"),ja.forEach(t),ir=r(Z," or "),Ge=a(Z,"A",{href:!0});var Ja=s(Ge);dr=r(Ja,"~RagConfig"),Ja.forEach(t),cr=r(Z,"."),Z.forEach(t),lr=c(ge),X=a(ge,"LI",{});var Xt=s(X);_t=a(Xt,"STRONG",{});var Da=s(_t);mr=r(Da,"keys_to_ignore_at_inference"),Da.forEach(t),fr=r(Xt," ("),bt=a(Xt,"CODE",{});var Ia=s(bt);hr=r(Ia,"List[str]"),Ia.forEach(t),pr=r(Xt,`) \u2014 A list of keys to ignore by default when looking at dictionary
outputs of the model during inference.`),Xt.forEach(t),gr=c(ge),Y=a(ge,"LI",{});var Yt=s(Y);yt=a(Yt,"STRONG",{});var Za=s(yt);ur=r(Za,"attribute_map"),Za.forEach(t),_r=r(Yt," ("),vt=a(Yt,"CODE",{});var Wa=s(vt);br=r(Wa,"Dict[str, str]"),Wa.forEach(t),yr=r(Yt,`) \u2014 A dict that maps model specific attribute names to the standardized
naming of attributes.`),Yt.forEach(t),ge.forEach(t),vr=c(f),wt=a(f,"P",{});var Na=s(wt);wr=r(Na,"Common attributes (present in all subclasses):"),Na.forEach(t),Cr=c(f),J=a(f,"UL",{});var ue=s(J);Q=a(ue,"LI",{});var Qt=s(Q);Ct=a(Qt,"STRONG",{});var Fa=s(Ct);kr=r(Fa,"vocab_size"),Fa.forEach(t),$r=r(Qt," ("),kt=a(Qt,"CODE",{});var Sa=s(kt);Pr=r(Sa,"int"),Sa.forEach(t),xr=r(Qt,`) \u2014 The number of tokens in the vocabulary, which is also the first dimension of the
embeddings matrix (this attribute may be missing for models that don\u2019t have a text modality like ViT).`),Qt.forEach(t),Tr=c(ue),K=a(ue,"LI",{});var Kt=s(K);$t=a(Kt,"STRONG",{});var Aa=s($t);Er=r(Aa,"hidden_size"),Aa.forEach(t),Mr=r(Kt," ("),Pt=a(Kt,"CODE",{});var Va=s(Pt);Ur=r(Va,"int"),Va.forEach(t),zr=r(Kt,") \u2014 The hidden size of the model."),Kt.forEach(t),jr=c(ue),ee=a(ue,"LI",{});var eo=s(ee);xt=a(eo,"STRONG",{});var qa=s(xt);Jr=r(qa,"num_attention_heads"),qa.forEach(t),Dr=r(eo," ("),Tt=a(eo,"CODE",{});var La=s(Tt);Ir=r(La,"int"),La.forEach(t),Zr=r(eo,`) \u2014 The number of attention heads used in the multi-head attention layers of the
model.`),eo.forEach(t),Wr=c(ue),te=a(ue,"LI",{});var to=s(te);Et=a(to,"STRONG",{});var Ra=s(Et);Nr=r(Ra,"num_hidden_layers"),Ra.forEach(t),Fr=r(to," ("),Mt=a(to,"CODE",{});var Ba=s(Mt);Sr=r(Ba,"int"),Ba.forEach(t),Ar=r(to,") \u2014 The number of blocks in the model."),to.forEach(t),ue.forEach(t),Vr=c(f),F=a(f,"DIV",{class:!0});var et=s(F);y(Ce.$$.fragment,et),qr=c(et),Ut=a(et,"P",{});var Oa=s(Ut);Lr=r(Oa,"Upload the configuration file to the \u{1F917} Model Hub."),Oa.forEach(t),Rr=c(et),y(oe.$$.fragment,et),et.forEach(t),Br=c(f),re=a(f,"DIV",{class:!0});var lo=s(re);y(ke.$$.fragment,lo),Or=c(lo),D=a(lo,"P",{});var _e=s(D);Gr=r(_e,"Checks whether the passed dictionary and its nested dicts have a "),zt=a(_e,"EM",{});var Ga=s(zt);Hr=r(Ga,"torch_dtype"),Ga.forEach(t),Xr=r(_e,` key and if it\u2019s not None,
converts torch.dtype to a string of just the type. For example, `),jt=a(_e,"CODE",{});var Ha=s(jt);Yr=r(Ha,"torch.float32"),Ha.forEach(t),Qr=r(_e," get converted into "),Jt=a(_e,"EM",{});var Xa=s(Jt);Kr=r(Xa,"\u201Cfloat32\u201D"),Xa.forEach(t),en=r(_e,`
string, which can then be stored in the json format.`),_e.forEach(t),lo.forEach(t),tn=c(f),ne=a(f,"DIV",{class:!0});var mo=s(ne);y($e.$$.fragment,mo),on=c(mo),Pe=a(mo,"P",{});var fo=s(Pe);rn=r(fo,"Instantiates a "),He=a(fo,"A",{href:!0});var Ya=s(He);nn=r(Ya,"PretrainedConfig"),Ya.forEach(t),an=r(fo," from a Python dictionary of parameters."),fo.forEach(t),mo.forEach(t),sn=c(f),ae=a(f,"DIV",{class:!0});var ho=s(ae);y(xe.$$.fragment,ho),dn=c(ho),Te=a(ho,"P",{});var po=s(Te);cn=r(po,"Instantiates a "),Xe=a(po,"A",{href:!0});var Qa=s(Xe);ln=r(Qa,"PretrainedConfig"),Qa.forEach(t),mn=r(po," from the path to a JSON file of parameters."),po.forEach(t),ho.forEach(t),fn=c(f),S=a(f,"DIV",{class:!0});var tt=s(S);y(Ee.$$.fragment,tt),hn=c(tt),Me=a(tt,"P",{});var go=s(Me);pn=r(go,"Instantiate a "),Ye=a(go,"A",{href:!0});var Ka=s(Ye);gn=r(Ka,"PretrainedConfig"),Ka.forEach(t),un=r(go," (or a derived class) from a pretrained model configuration."),go.forEach(t),_n=c(tt),y(se.$$.fragment,tt),tt.forEach(t),bn=c(f),ie=a(f,"DIV",{class:!0});var uo=s(ie);y(Ue.$$.fragment,uo),yn=c(uo),I=a(uo,"P",{});var be=s(I);vn=r(be,"From a "),Dt=a(be,"CODE",{});var es=s(Dt);wn=r(es,"pretrained_model_name_or_path"),es.forEach(t),Cn=r(be,`, resolve to a dictionary of parameters, to be used for instantiating a
`),Qe=a(be,"A",{href:!0});var ts=s(Qe);kn=r(ts,"PretrainedConfig"),ts.forEach(t),$n=r(be," using "),It=a(be,"CODE",{});var os=s(It);Pn=r(os,"from_dict"),os.forEach(t),xn=r(be,"."),be.forEach(t),uo.forEach(t),Tn=c(f),A=a(f,"DIV",{class:!0});var ot=s(A);y(ze.$$.fragment,ot),En=c(ot),je=a(ot,"P",{});var _o=s(je);Mn=r(_o,`Register this class with a given auto class. This should only be used for custom configurations as the ones in
the library are already mapped with `),Zt=a(_o,"CODE",{});var rs=s(Zt);Un=r(rs,"AutoConfig"),rs.forEach(t),zn=r(_o,"."),_o.forEach(t),jn=c(ot),y(de.$$.fragment,ot),ot.forEach(t),Jn=c(f),ce=a(f,"DIV",{class:!0});var bo=s(ce);y(Je.$$.fragment,bo),Dn=c(bo),L=a(bo,"P",{});var rt=s(L);In=r(rt,"Save a configuration object to the directory "),Wt=a(rt,"CODE",{});var ns=s(Wt);Zn=r(ns,"save_directory"),ns.forEach(t),Wn=r(rt,`, so that it can be re-loaded using the
`),Ke=a(rt,"A",{href:!0});var as=s(Ke);Nn=r(as,"from_pretrained()"),as.forEach(t),Fn=r(rt," class method."),rt.forEach(t),bo.forEach(t),Sn=c(f),le=a(f,"DIV",{class:!0});var yo=s(le);y(De.$$.fragment,yo),An=c(yo),Nt=a(yo,"P",{});var ss=s(Nt);Vn=r(ss,"Serializes this instance to a Python dictionary."),ss.forEach(t),yo.forEach(t),qn=c(f),me=a(f,"DIV",{class:!0});var vo=s(me);y(Ie.$$.fragment,vo),Ln=c(vo),Ft=a(vo,"P",{});var is=s(Ft);Rn=r(is,`Removes all attributes from config which correspond to the default config attributes for better readability and
serializes to a Python dictionary.`),is.forEach(t),vo.forEach(t),Bn=c(f),fe=a(f,"DIV",{class:!0});var wo=s(fe);y(Ze.$$.fragment,wo),On=c(wo),St=a(wo,"P",{});var ds=s(St);Gn=r(ds,"Save this instance to a JSON file."),ds.forEach(t),wo.forEach(t),Hn=c(f),he=a(f,"DIV",{class:!0});var Co=s(he);y(We.$$.fragment,Co),Xn=c(Co),At=a(Co,"P",{});var cs=s(At);Yn=r(cs,"Serializes this instance to a JSON string."),cs.forEach(t),Co.forEach(t),Qn=c(f),pe=a(f,"DIV",{class:!0});var ko=s(pe);y(Ne.$$.fragment,ko),Kn=c(ko),Fe=a(ko,"P",{});var $o=s(Fe);ea=r($o,"Updates attributes of this class with attributes from "),Vt=a($o,"CODE",{});var ls=s(Vt);ta=r(ls,"config_dict"),ls.forEach(t),oa=r($o,"."),$o.forEach(t),ko.forEach(t),ra=c(f),z=a(f,"DIV",{class:!0});var ye=s(z);y(Se.$$.fragment,ye),na=c(ye),Ae=a(ye,"P",{});var Po=s(Ae);aa=r(Po,"Updates attributes of this class with attributes from "),qt=a(Po,"CODE",{});var ms=s(qt);sa=r(ms,"update_str"),ms.forEach(t),ia=r(Po,"."),Po.forEach(t),da=c(ye),R=a(ye,"P",{});var nt=s(R);ca=r(nt,"The expected format is ints, floats and strings as is, and for booleans use "),Lt=a(nt,"CODE",{});var fs=s(Lt);la=r(fs,"true"),fs.forEach(t),ma=r(nt," or "),Rt=a(nt,"CODE",{});var hs=s(Rt);fa=r(hs,"false"),hs.forEach(t),ha=r(nt,`. For example:
\u201Cn_embd=10,resid_pdrop=0.2,scale_attn_weights=false,summary_type=cls_index\u201D`),nt.forEach(t),pa=c(ye),Bt=a(ye,"P",{});var ps=s(Bt);ga=r(ps,"The keys to change have to already exist in the config object."),ps.forEach(t),ye.forEach(t),f.forEach(t),this.h()},h(){p(h,"name","hf:doc:metadata"),p(h,"content",JSON.stringify(Us)),p(g,"id","configuration"),p(g,"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"),p(g,"href","#configuration"),p(u,"class","relative group"),p(Le,"href","/docs/transformers/main/en/main_classes/configuration#transformers.PretrainedConfig"),p(G,"id","transformers.PretrainedConfig"),p(G,"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"),p(G,"href","#transformers.PretrainedConfig"),p(q,"class","relative group"),p(Re,"href","/docs/transformers/main/en/model_doc/auto#transformers.AutoConfig"),p(Be,"href","/docs/transformers/main/en/main_classes/configuration#transformers.PretrainedConfig"),p(Oe,"href","/docs/transformers/main/en/model_doc/encoder-decoder#transformers.EncoderDecoderConfig"),p(Ge,"href","/docs/transformers/main/en/model_doc/rag#transformers.RagConfig"),p(F,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(re,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(He,"href","/docs/transformers/main/en/main_classes/configuration#transformers.PretrainedConfig"),p(ne,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(Xe,"href","/docs/transformers/main/en/main_classes/configuration#transformers.PretrainedConfig"),p(ae,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(Ye,"href","/docs/transformers/main/en/main_classes/configuration#transformers.PretrainedConfig"),p(S,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(Qe,"href","/docs/transformers/main/en/main_classes/configuration#transformers.PretrainedConfig"),p(ie,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(A,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(Ke,"href","/docs/transformers/main/en/main_classes/configuration#transformers.PretrainedConfig.from_pretrained"),p(ce,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(le,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(me,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(fe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(he,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(pe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(l,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(i,$){e(document.head,h),T(i,P,$),T(i,u,$),e(u,g),e(g,x),v(m,x,null),e(u,_),e(u,B),e(B,xo),T(i,oo,$),T(i,O,$),e(O,To),e(O,Le),e(Le,Eo),e(O,Mo),T(i,ro,$),T(i,M,$),e(M,Uo),e(M,at),e(at,zo),e(M,jo),e(M,st),e(st,Jo),e(M,Do),e(M,it),e(it,Io),e(M,Zo),e(M,dt),e(dt,Wo),e(M,No),T(i,no,$),T(i,q,$),e(q,G),e(G,ct),v(ve,ct,null),e(q,Fo),e(q,lt),e(lt,So),T(i,ao,$),T(i,l,$),v(we,l,null),e(l,Ao),e(l,mt),e(mt,Vo),e(l,qo),v(H,l,null),e(l,Lo),e(l,ft),e(ft,Ro),e(l,Bo),e(l,j),e(j,N),e(N,ht),e(ht,Oo),e(N,Go),e(N,pt),e(pt,Ho),e(N,Xo),e(N,Re),e(Re,Yo),e(N,Qo),e(j,Ko),e(j,U),e(U,gt),e(gt,er),e(U,tr),e(U,ut),e(ut,or),e(U,rr),e(U,Be),e(Be,nr),e(U,ar),e(U,Oe),e(Oe,sr),e(U,ir),e(U,Ge),e(Ge,dr),e(U,cr),e(j,lr),e(j,X),e(X,_t),e(_t,mr),e(X,fr),e(X,bt),e(bt,hr),e(X,pr),e(j,gr),e(j,Y),e(Y,yt),e(yt,ur),e(Y,_r),e(Y,vt),e(vt,br),e(Y,yr),e(l,vr),e(l,wt),e(wt,wr),e(l,Cr),e(l,J),e(J,Q),e(Q,Ct),e(Ct,kr),e(Q,$r),e(Q,kt),e(kt,Pr),e(Q,xr),e(J,Tr),e(J,K),e(K,$t),e($t,Er),e(K,Mr),e(K,Pt),e(Pt,Ur),e(K,zr),e(J,jr),e(J,ee),e(ee,xt),e(xt,Jr),e(ee,Dr),e(ee,Tt),e(Tt,Ir),e(ee,Zr),e(J,Wr),e(J,te),e(te,Et),e(Et,Nr),e(te,Fr),e(te,Mt),e(Mt,Sr),e(te,Ar),e(l,Vr),e(l,F),v(Ce,F,null),e(F,qr),e(F,Ut),e(Ut,Lr),e(F,Rr),v(oe,F,null),e(l,Br),e(l,re),v(ke,re,null),e(re,Or),e(re,D),e(D,Gr),e(D,zt),e(zt,Hr),e(D,Xr),e(D,jt),e(jt,Yr),e(D,Qr),e(D,Jt),e(Jt,Kr),e(D,en),e(l,tn),e(l,ne),v($e,ne,null),e(ne,on),e(ne,Pe),e(Pe,rn),e(Pe,He),e(He,nn),e(Pe,an),e(l,sn),e(l,ae),v(xe,ae,null),e(ae,dn),e(ae,Te),e(Te,cn),e(Te,Xe),e(Xe,ln),e(Te,mn),e(l,fn),e(l,S),v(Ee,S,null),e(S,hn),e(S,Me),e(Me,pn),e(Me,Ye),e(Ye,gn),e(Me,un),e(S,_n),v(se,S,null),e(l,bn),e(l,ie),v(Ue,ie,null),e(ie,yn),e(ie,I),e(I,vn),e(I,Dt),e(Dt,wn),e(I,Cn),e(I,Qe),e(Qe,kn),e(I,$n),e(I,It),e(It,Pn),e(I,xn),e(l,Tn),e(l,A),v(ze,A,null),e(A,En),e(A,je),e(je,Mn),e(je,Zt),e(Zt,Un),e(je,zn),e(A,jn),v(de,A,null),e(l,Jn),e(l,ce),v(Je,ce,null),e(ce,Dn),e(ce,L),e(L,In),e(L,Wt),e(Wt,Zn),e(L,Wn),e(L,Ke),e(Ke,Nn),e(L,Fn),e(l,Sn),e(l,le),v(De,le,null),e(le,An),e(le,Nt),e(Nt,Vn),e(l,qn),e(l,me),v(Ie,me,null),e(me,Ln),e(me,Ft),e(Ft,Rn),e(l,Bn),e(l,fe),v(Ze,fe,null),e(fe,On),e(fe,St),e(St,Gn),e(l,Hn),e(l,he),v(We,he,null),e(he,Xn),e(he,At),e(At,Yn),e(l,Qn),e(l,pe),v(Ne,pe,null),e(pe,Kn),e(pe,Fe),e(Fe,ea),e(Fe,Vt),e(Vt,ta),e(Fe,oa),e(l,ra),e(l,z),v(Se,z,null),e(z,na),e(z,Ae),e(Ae,aa),e(Ae,qt),e(qt,sa),e(Ae,ia),e(z,da),e(z,R),e(R,ca),e(R,Lt),e(Lt,la),e(R,ma),e(R,Rt),e(Rt,fa),e(R,ha),e(z,pa),e(z,Bt),e(Bt,ga),so=!0},p(i,[$]){const Ve={};$&2&&(Ve.$$scope={dirty:$,ctx:i}),H.$set(Ve);const Ot={};$&2&&(Ot.$$scope={dirty:$,ctx:i}),oe.$set(Ot);const Gt={};$&2&&(Gt.$$scope={dirty:$,ctx:i}),se.$set(Gt);const Ht={};$&2&&(Ht.$$scope={dirty:$,ctx:i}),de.$set(Ht)},i(i){so||(w(m.$$.fragment,i),w(ve.$$.fragment,i),w(we.$$.fragment,i),w(H.$$.fragment,i),w(Ce.$$.fragment,i),w(oe.$$.fragment,i),w(ke.$$.fragment,i),w($e.$$.fragment,i),w(xe.$$.fragment,i),w(Ee.$$.fragment,i),w(se.$$.fragment,i),w(Ue.$$.fragment,i),w(ze.$$.fragment,i),w(de.$$.fragment,i),w(Je.$$.fragment,i),w(De.$$.fragment,i),w(Ie.$$.fragment,i),w(Ze.$$.fragment,i),w(We.$$.fragment,i),w(Ne.$$.fragment,i),w(Se.$$.fragment,i),so=!0)},o(i){C(m.$$.fragment,i),C(ve.$$.fragment,i),C(we.$$.fragment,i),C(H.$$.fragment,i),C(Ce.$$.fragment,i),C(oe.$$.fragment,i),C(ke.$$.fragment,i),C($e.$$.fragment,i),C(xe.$$.fragment,i),C(Ee.$$.fragment,i),C(se.$$.fragment,i),C(Ue.$$.fragment,i),C(ze.$$.fragment,i),C(de.$$.fragment,i),C(Je.$$.fragment,i),C(De.$$.fragment,i),C(Ie.$$.fragment,i),C(Ze.$$.fragment,i),C(We.$$.fragment,i),C(Ne.$$.fragment,i),C(Se.$$.fragment,i),so=!1},d(i){t(h),i&&t(P),i&&t(u),k(m),i&&t(oo),i&&t(O),i&&t(ro),i&&t(M),i&&t(no),i&&t(q),k(ve),i&&t(ao),i&&t(l),k(we),k(H),k(Ce),k(oe),k(ke),k($e),k(xe),k(Ee),k(se),k(Ue),k(ze),k(de),k(Je),k(De),k(Ie),k(Ze),k(We),k(Ne),k(Se)}}}const Us={local:"configuration",sections:[{local:"transformers.PretrainedConfig",title:"PretrainedConfig"}],title:"Configuration"};function zs(W){return $s(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Ns extends vs{constructor(h){super();ws(this,h,zs,Ms,Cs,{})}}export{Ns as default,Us as metadata};
