import{s as po,o as ho,n as et}from"../chunks/scheduler.9bc65507.js";import{S as uo,i as go,g as a,s as o,r as u,A as _o,h as s,f as c,c as n,j as C,x as f,u as g,k as $,y as t,a as w,v as _,d as b,t as y,w as v}from"../chunks/index.707bf1b6.js";import{T as lo}from"../chunks/Tip.c2ecdbf4.js";import{D as P}from"../chunks/Docstring.86474e80.js";import{C as fo}from"../chunks/CodeBlock.54a9f38d.js";import{E as mo}from"../chunks/ExampleCodeBlock.034f3a73.js";import{H as bo,E as yo}from"../chunks/EditOnGithub.922df6ba.js";function vo(j){let d,k=`A configuration file can be loaded and saved to disk. Loading the configuration file and using this file to
initialize a model does <strong>not</strong> load the model weights. It only affects the model’s configuration.`;return{c(){d=a("p"),d.innerHTML=k},l(p){d=s(p,"P",{"data-svelte-h":!0}),f(d)!=="svelte-s3sff7"&&(d.innerHTML=k)},m(p,h){w(p,d,h)},p:et,d(p){p&&c(d)}}}function wo(j){let d,k="Examples:",p,h,x;return h=new fo({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Db25maWclMEElMEFjb25maWclMjAlM0QlMjBBdXRvQ29uZmlnLmZyb21fcHJldHJhaW5lZCglMjJnb29nbGUtYmVydCUyRmJlcnQtYmFzZS1jYXNlZCUyMiklMEElMEElMjMlMjBQdXNoJTIwdGhlJTIwY29uZmlnJTIwdG8lMjB5b3VyJTIwbmFtZXNwYWNlJTIwd2l0aCUyMHRoZSUyMG5hbWUlMjAlMjJteS1maW5ldHVuZWQtYmVydCUyMi4lMEFjb25maWcucHVzaF90b19odWIoJTIybXktZmluZXR1bmVkLWJlcnQlMjIpJTBBJTBBJTIzJTIwUHVzaCUyMHRoZSUyMGNvbmZpZyUyMHRvJTIwYW4lMjBvcmdhbml6YXRpb24lMjB3aXRoJTIwdGhlJTIwbmFtZSUyMCUyMm15LWZpbmV0dW5lZC1iZXJ0JTIyLiUwQWNvbmZpZy5wdXNoX3RvX2h1YiglMjJodWdnaW5nZmFjZSUyRm15LWZpbmV0dW5lZC1iZXJ0JTIyKQ==",highlighted:`<span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoConfig

config = AutoConfig.from_pretrained(<span class="hljs-string">&quot;google-bert/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>)`,wrap:!1}}),{c(){d=a("p"),d.textContent=k,p=o(),u(h.$$.fragment)},l(l){d=s(l,"P",{"data-svelte-h":!0}),f(d)!=="svelte-kvfsh7"&&(d.textContent=k),p=n(l),g(h.$$.fragment,l)},m(l,T){w(l,d,T),w(l,p,T),_(h,l,T),x=!0},p:et,i(l){x||(b(h.$$.fragment,l),x=!0)},o(l){y(h.$$.fragment,l),x=!1},d(l){l&&(c(d),c(p)),v(h,l)}}}function xo(j){let d,k="Examples:",p,h,x;return h=new fo({props:{code:"JTIzJTIwV2UlMjBjYW4ndCUyMGluc3RhbnRpYXRlJTIwZGlyZWN0bHklMjB0aGUlMjBiYXNlJTIwY2xhc3MlMjAqUHJldHJhaW5lZENvbmZpZyolMjBzbyUyMGxldCdzJTIwc2hvdyUyMHRoZSUyMGV4YW1wbGVzJTIwb24lMjBhJTBBJTIzJTIwZGVyaXZlZCUyMGNsYXNzJTNBJTIwQmVydENvbmZpZyUwQWNvbmZpZyUyMCUzRCUyMEJlcnRDb25maWcuZnJvbV9wcmV0cmFpbmVkKCUwQSUyMCUyMCUyMCUyMCUyMmdvb2dsZS1iZXJ0JTJGYmVydC1iYXNlLXVuY2FzZWQlMjIlMEEpJTIwJTIwJTIzJTIwRG93bmxvYWQlMjBjb25maWd1cmF0aW9uJTIwZnJvbSUyMGh1Z2dpbmdmYWNlLmNvJTIwYW5kJTIwY2FjaGUuJTBBY29uZmlnJTIwJTNEJTIwQmVydENvbmZpZy5mcm9tX3ByZXRyYWluZWQoJTBBJTIwJTIwJTIwJTIwJTIyLiUyRnRlc3QlMkZzYXZlZF9tb2RlbCUyRiUyMiUwQSklMjAlMjAlMjMlMjBFLmcuJTIwY29uZmlnJTIwKG9yJTIwbW9kZWwpJTIwd2FzJTIwc2F2ZWQlMjB1c2luZyUyMCpzYXZlX3ByZXRyYWluZWQoJy4lMkZ0ZXN0JTJGc2F2ZWRfbW9kZWwlMkYnKSolMEFjb25maWclMjAlM0QlMjBCZXJ0Q29uZmlnLmZyb21fcHJldHJhaW5lZCglMjIuJTJGdGVzdCUyRnNhdmVkX21vZGVsJTJGbXlfY29uZmlndXJhdGlvbi5qc29uJTIyKSUwQWNvbmZpZyUyMCUzRCUyMEJlcnRDb25maWcuZnJvbV9wcmV0cmFpbmVkKCUyMmdvb2dsZS1iZXJ0JTJGYmVydC1iYXNlLXVuY2FzZWQlMjIlMkMlMjBvdXRwdXRfYXR0ZW50aW9ucyUzRFRydWUlMkMlMjBmb28lM0RGYWxzZSklMEFhc3NlcnQlMjBjb25maWcub3V0cHV0X2F0dGVudGlvbnMlMjAlM0QlM0QlMjBUcnVlJTBBY29uZmlnJTJDJTIwdW51c2VkX2t3YXJncyUyMCUzRCUyMEJlcnRDb25maWcuZnJvbV9wcmV0cmFpbmVkKCUwQSUyMCUyMCUyMCUyMCUyMmdvb2dsZS1iZXJ0JTJGYmVydC1iYXNlLXVuY2FzZWQlMjIlMkMlMjBvdXRwdXRfYXR0ZW50aW9ucyUzRFRydWUlMkMlMjBmb28lM0RGYWxzZSUyQyUyMHJldHVybl91bnVzZWRfa3dhcmdzJTNEVHJ1ZSUwQSklMEFhc3NlcnQlMjBjb25maWcub3V0cHV0X2F0dGVudGlvbnMlMjAlM0QlM0QlMjBUcnVlJTBBYXNzZXJ0JTIwdW51c2VkX2t3YXJncyUyMCUzRCUzRCUyMCU3QiUyMmZvbyUyMiUzQSUyMEZhbHNlJTdE",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;google-bert/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;google-bert/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;google-bert/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>}`,wrap:!1}}),{c(){d=a("p"),d.textContent=k,p=o(),u(h.$$.fragment)},l(l){d=s(l,"P",{"data-svelte-h":!0}),f(d)!=="svelte-kvfsh7"&&(d.textContent=k),p=n(l),g(h.$$.fragment,l)},m(l,T){w(l,d,T),w(l,p,T),_(h,l,T),x=!0},p:et,i(l){x||(b(h.$$.fragment,l),x=!0)},o(l){y(h.$$.fragment,l),x=!1},d(l){l&&(c(d),c(p)),v(h,l)}}}function Co(j){let d,k="This API is experimental and may have some slight breaking changes in the next releases.";return{c(){d=a("p"),d.textContent=k},l(p){d=s(p,"P",{"data-svelte-h":!0}),f(d)!=="svelte-15rpg4"&&(d.textContent=k)},m(p,h){w(p,d,h)},p:et,d(p){p&&c(d)}}}function $o(j){let d,k,p,h,x,l="＃ 構成",T,Y,Vt=`基本クラス <a href="/docs/transformers/pr_31172/ja/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> は、設定をロード/保存するための一般的なメソッドを実装します。
ローカル ファイルまたはディレクトリから、またはライブラリ (ダウンロードされた) によって提供される事前トレーニング済みモデル構成から
HuggingFace の AWS S3 リポジトリから)。`,Ve,G,Ht=`各派生構成クラスはモデル固有の属性を実装します。すべての構成クラスに存在する共通の属性は次のとおりです。
<code>hidden_​​size</code>、<code>num_attention_heads</code>、および <code>num_hidden_​​layers</code>。テキスト モデルはさらに以下を実装します。
<code>vocab_size</code>。`,He,Q,Ne,r,O,tt,ge,Nt=`Base class for all configuration classes. Handles a few parameters common to all models’ configurations as well as
methods for loading/downloading/saving configurations.`,ot,Z,nt,_e,Bt="Class attributes (overridden by derived classes):",rt,be,Et=`<li><strong>model_type</strong> (<code>str</code>) — An identifier for the model type, serialized into the JSON file, and used to recreate
the correct object in <a href="/docs/transformers/pr_31172/ja/model_doc/auto#transformers.AutoConfig">AutoConfig</a>.</li> <li><strong>is_composition</strong> (<code>bool</code>) — 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 <a href="/docs/transformers/pr_31172/ja/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> like:
<code>EncoderDecoderConfig</code> or <code>~RagConfig</code>.</li> <li><strong>keys_to_ignore_at_inference</strong> (<code>List[str]</code>) — A list of keys to ignore by default when looking at dictionary
outputs of the model during inference.</li> <li><strong>attribute_map</strong> (<code>Dict[str, str]</code>) — A dict that maps model specific attribute names to the standardized
naming of attributes.</li>`,at,ye,St="Common attributes (present in all subclasses):",st,ve,Xt=`<li><strong>vocab_size</strong> (<code>int</code>) — 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’t have a text modality like ViT).</li> <li><strong>hidden_size</strong> (<code>int</code>) — The hidden size of the model.</li> <li><strong>num_attention_heads</strong> (<code>int</code>) — The number of attention heads used in the multi-head attention layers of the
model.</li> <li><strong>num_hidden_layers</strong> (<code>int</code>) — The number of blocks in the model.</li>`,it,J,K,dt,we,Rt="Upload the configuration file to the 🤗 Model Hub.",ct,I,lt,L,ee,mt,xe,At=`Checks whether the passed dictionary and its nested dicts have a <em>torch_dtype</em> key and if it’s not None,
converts torch.dtype to a string of just the type. For example, <code>torch.float32</code> get converted into <em>“float32”</em>
string, which can then be stored in the json format.`,ft,F,te,pt,Ce,Yt='Instantiates a <a href="/docs/transformers/pr_31172/ja/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> from a Python dictionary of parameters.',ht,q,oe,ut,$e,Gt='Instantiates a <a href="/docs/transformers/pr_31172/ja/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> from the path to a JSON file of parameters.',gt,U,ne,_t,ke,Qt='Instantiate a <a href="/docs/transformers/pr_31172/ja/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> (or a derived class) from a pretrained model configuration.',bt,D,yt,V,re,vt,Pe,Ot=`From a <code>pretrained_model_name_or_path</code>, resolve to a dictionary of parameters, to be used for instantiating a
<a href="/docs/transformers/pr_31172/ja/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> using <code>from_dict</code>.`,wt,z,ae,xt,Te,Kt=`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 <code>AutoConfig</code>.`,Ct,H,$t,N,se,kt,Me,eo=`Save a configuration object to the directory <code>save_directory</code>, so that it can be re-loaded using the
<a href="/docs/transformers/pr_31172/ja/main_classes/configuration#transformers.PretrainedConfig.from_pretrained">from_pretrained()</a> class method.`,Pt,B,ie,Tt,je,to="Serializes this instance to a Python dictionary.",Mt,E,de,jt,Je,oo=`Removes all attributes from config which correspond to the default config attributes for better readability and
serializes to a Python dictionary.`,Jt,S,ce,Ut,Ue,no="Save this instance to a JSON file.",zt,X,le,Wt,ze,ro="Serializes this instance to a JSON string.",Zt,R,me,It,We,ao="Updates attributes of this class with attributes from <code>config_dict</code>.",Lt,M,fe,Ft,Ze,so="Updates attributes of this class with attributes from <code>update_str</code>.",qt,Ie,io=`The expected format is ints, floats and strings as is, and for booleans use <code>true</code> or <code>false</code>. For example:
“n_embd=10,resid_pdrop=0.2,scale_attn_weights=false,summary_type=cls_index”`,Dt,Le,co="The keys to change have to already exist in the config object.",Be,pe,Ee,De,Se;return Q=new bo({props:{title:"PretrainedConfig",local:"transformers.PretrainedConfig",headingTag:"h2"}}),O=new P({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/pr_31172/ja/main_classes/model#transformers.PreTrainedModel.from_pretrained">PreTrainedModel.from_pretrained()</a> or
<a href="/docs/transformers/pr_31172/ja/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/pr_31172/ja/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 <code>EncoderDecoderModel</code> 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/vr_31172/src/transformers/configuration_utils.py#L50",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/pr_31172/ja/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"}]}]}}),Z=new lo({props:{$$slots:{default:[vo]},$$scope:{ctx:j}}}),K=new P({props:{name:"push_to_hub",anchor:"transformers.PretrainedConfig.push_to_hub",parameters:[{name:"repo_id",val:": str"},{name:"use_temp_dir",val:": Optional = None"},{name:"commit_message",val:": Optional = None"},{name:"private",val:": Optional = None"},{name:"token",val:": Union = None"},{name:"max_shard_size",val:": Union = '5GB'"},{name:"create_pr",val:": bool = False"},{name:"safe_serialization",val:": bool = True"},{name:"revision",val:": str = None"},{name:"commit_description",val:": str = None"},{name:"tags",val:": Optional = 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;5GB&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>). We default it to <code>&quot;5GB&quot;</code> so that users can easily load models on free-tier
Google Colab instances without any CPU OOM issues.`,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>True</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"},{anchor:"transformers.PretrainedConfig.push_to_hub.commit_description",description:`<strong>commit_description</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The description of the commit that will be created`,name:"commit_description"},{anchor:"transformers.PretrainedConfig.push_to_hub.tags",description:`<strong>tags</strong> (<code>List[str]</code>, <em>optional</em>) &#x2014;
List of tags to push on the Hub.`,name:"tags"}],source:"https://github.com/huggingface/transformers/blob/vr_31172/src/transformers/utils/hub.py#L809"}}),I=new mo({props:{anchor:"transformers.PretrainedConfig.push_to_hub.example",$$slots:{default:[wo]},$$scope:{ctx:j}}}),ee=new P({props:{name:"dict_torch_dtype_to_str",anchor:"transformers.PretrainedConfig.dict_torch_dtype_to_str",parameters:[{name:"d",val:": Dict"}],source:"https://github.com/huggingface/transformers/blob/vr_31172/src/transformers/configuration_utils.py#L1013"}}),te=new P({props:{name:"from_dict",anchor:"transformers.PretrainedConfig.from_dict",parameters:[{name:"config_dict",val:": Dict"},{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/pr_31172/ja/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/vr_31172/src/transformers/configuration_utils.py#L745",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>The configuration object instantiated from those parameters.</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><a
  href="/docs/transformers/pr_31172/ja/main_classes/configuration#transformers.PretrainedConfig"
>PretrainedConfig</a></p>
`}}),oe=new P({props:{name:"from_json_file",anchor:"transformers.PretrainedConfig.from_json_file",parameters:[{name:"json_file",val:": Union"}],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/vr_31172/src/transformers/configuration_utils.py#L806",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>The configuration object instantiated from that JSON file.</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><a
  href="/docs/transformers/pr_31172/ja/main_classes/configuration#transformers.PretrainedConfig"
>PretrainedConfig</a></p>
`}}),ne=new P({props:{name:"from_pretrained",anchor:"transformers.PretrainedConfig.from_pretrained",parameters:[{name:"pretrained_model_name_or_path",val:": Union"},{name:"cache_dir",val:": Union = None"},{name:"force_download",val:": bool = False"},{name:"local_files_only",val:": bool = False"},{name:"token",val:": Union = 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.</li>
<li>a path to a <em>directory</em> containing a configuration file saved using the
<a href="/docs/transformers/pr_31172/ja/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.
resume_download &#x2014;
Deprecated and ignored. All downloads are now resumed by default when possible.
Will be removed in v5 of Transformers.`,name:"force_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/vr_31172/src/transformers/configuration_utils.py#L510",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>The configuration object instantiated from this pretrained model.</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><a
  href="/docs/transformers/pr_31172/ja/main_classes/configuration#transformers.PretrainedConfig"
>PretrainedConfig</a></p>
`}}),D=new mo({props:{anchor:"transformers.PretrainedConfig.from_pretrained.example",$$slots:{default:[xo]},$$scope:{ctx:j}}}),re=new P({props:{name:"get_config_dict",anchor:"transformers.PretrainedConfig.get_config_dict",parameters:[{name:"pretrained_model_name_or_path",val:": Union"},{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/vr_31172/src/transformers/configuration_utils.py#L612",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>The dictionary(ies) that will be used to instantiate the configuration object.</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>Tuple[Dict, Dict]</code></p>
`}}),ae=new P({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/vr_31172/src/transformers/configuration_utils.py#L1025"}}),H=new lo({props:{warning:!0,$$slots:{default:[Co]},$$scope:{ctx:j}}}),se=new P({props:{name:"save_pretrained",anchor:"transformers.PretrainedConfig.save_pretrained",parameters:[{name:"save_directory",val:": Union"},{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/pr_31172/ja/main_classes/model#transformers.utils.PushToHubMixin.push_to_hub">push_to_hub()</a> method.`,name:"kwargs"}],source:"https://github.com/huggingface/transformers/blob/vr_31172/src/transformers/configuration_utils.py#L423"}}),ie=new P({props:{name:"to_dict",anchor:"transformers.PretrainedConfig.to_dict",parameters:[],source:"https://github.com/huggingface/transformers/blob/vr_31172/src/transformers/configuration_utils.py#L891",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>Dictionary of all the attributes that make up this configuration instance.</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>Dict[str, Any]</code></p>
`}}),de=new P({props:{name:"to_diff_dict",anchor:"transformers.PretrainedConfig.to_diff_dict",parameters:[],source:"https://github.com/huggingface/transformers/blob/vr_31172/src/transformers/configuration_utils.py#L834",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>Dictionary of all the attributes that make up this configuration instance,</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>Dict[str, Any]</code></p>
`}}),ce=new P({props:{name:"to_json_file",anchor:"transformers.PretrainedConfig.to_json_file",parameters:[{name:"json_file_path",val:": Union"},{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/vr_31172/src/transformers/configuration_utils.py#L951"}}),le=new P({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/vr_31172/src/transformers/configuration_utils.py#L933",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>String containing all the attributes that make up this configuration instance in JSON format.</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>str</code></p>
`}}),me=new P({props:{name:"update",anchor:"transformers.PretrainedConfig.update",parameters:[{name:"config_dict",val:": Dict"}],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/vr_31172/src/transformers/configuration_utils.py#L965"}}),fe=new P({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/vr_31172/src/transformers/configuration_utils.py#L975"}}),pe=new yo({props:{source:"https://github.com/huggingface/transformers/blob/main/docs/source/ja/main_classes/configuration.md"}}),{c(){d=a("meta"),k=o(),p=a("p"),h=o(),x=a("p"),x.textContent=l,T=o(),Y=a("p"),Y.innerHTML=Vt,Ve=o(),G=a("p"),G.innerHTML=Ht,He=o(),u(Q.$$.fragment),Ne=o(),r=a("div"),u(O.$$.fragment),tt=o(),ge=a("p"),ge.textContent=Nt,ot=o(),u(Z.$$.fragment),nt=o(),_e=a("p"),_e.textContent=Bt,rt=o(),be=a("ul"),be.innerHTML=Et,at=o(),ye=a("p"),ye.textContent=St,st=o(),ve=a("ul"),ve.innerHTML=Xt,it=o(),J=a("div"),u(K.$$.fragment),dt=o(),we=a("p"),we.textContent=Rt,ct=o(),u(I.$$.fragment),lt=o(),L=a("div"),u(ee.$$.fragment),mt=o(),xe=a("p"),xe.innerHTML=At,ft=o(),F=a("div"),u(te.$$.fragment),pt=o(),Ce=a("p"),Ce.innerHTML=Yt,ht=o(),q=a("div"),u(oe.$$.fragment),ut=o(),$e=a("p"),$e.innerHTML=Gt,gt=o(),U=a("div"),u(ne.$$.fragment),_t=o(),ke=a("p"),ke.innerHTML=Qt,bt=o(),u(D.$$.fragment),yt=o(),V=a("div"),u(re.$$.fragment),vt=o(),Pe=a("p"),Pe.innerHTML=Ot,wt=o(),z=a("div"),u(ae.$$.fragment),xt=o(),Te=a("p"),Te.innerHTML=Kt,Ct=o(),u(H.$$.fragment),$t=o(),N=a("div"),u(se.$$.fragment),kt=o(),Me=a("p"),Me.innerHTML=eo,Pt=o(),B=a("div"),u(ie.$$.fragment),Tt=o(),je=a("p"),je.textContent=to,Mt=o(),E=a("div"),u(de.$$.fragment),jt=o(),Je=a("p"),Je.textContent=oo,Jt=o(),S=a("div"),u(ce.$$.fragment),Ut=o(),Ue=a("p"),Ue.textContent=no,zt=o(),X=a("div"),u(le.$$.fragment),Wt=o(),ze=a("p"),ze.textContent=ro,Zt=o(),R=a("div"),u(me.$$.fragment),It=o(),We=a("p"),We.innerHTML=ao,Lt=o(),M=a("div"),u(fe.$$.fragment),Ft=o(),Ze=a("p"),Ze.innerHTML=so,qt=o(),Ie=a("p"),Ie.innerHTML=io,Dt=o(),Le=a("p"),Le.textContent=co,Be=o(),u(pe.$$.fragment),Ee=o(),De=a("p"),this.h()},l(e){const m=_o("svelte-u9bgzb",document.head);d=s(m,"META",{name:!0,content:!0}),m.forEach(c),k=n(e),p=s(e,"P",{}),C(p).forEach(c),h=n(e),x=s(e,"P",{"data-svelte-h":!0}),f(x)!=="svelte-h0g430"&&(x.textContent=l),T=n(e),Y=s(e,"P",{"data-svelte-h":!0}),f(Y)!=="svelte-laan4j"&&(Y.innerHTML=Vt),Ve=n(e),G=s(e,"P",{"data-svelte-h":!0}),f(G)!=="svelte-lq0qfk"&&(G.innerHTML=Ht),He=n(e),g(Q.$$.fragment,e),Ne=n(e),r=s(e,"DIV",{class:!0});var i=C(r);g(O.$$.fragment,i),tt=n(i),ge=s(i,"P",{"data-svelte-h":!0}),f(ge)!=="svelte-1p9qi0i"&&(ge.textContent=Nt),ot=n(i),g(Z.$$.fragment,i),nt=n(i),_e=s(i,"P",{"data-svelte-h":!0}),f(_e)!=="svelte-1qxxkvo"&&(_e.textContent=Bt),rt=n(i),be=s(i,"UL",{"data-svelte-h":!0}),f(be)!=="svelte-1oqj68t"&&(be.innerHTML=Et),at=n(i),ye=s(i,"P",{"data-svelte-h":!0}),f(ye)!=="svelte-1yi3c0w"&&(ye.textContent=St),st=n(i),ve=s(i,"UL",{"data-svelte-h":!0}),f(ve)!=="svelte-1cjcwii"&&(ve.innerHTML=Xt),it=n(i),J=s(i,"DIV",{class:!0});var W=C(J);g(K.$$.fragment,W),dt=n(W),we=s(W,"P",{"data-svelte-h":!0}),f(we)!=="svelte-j50kqf"&&(we.textContent=Rt),ct=n(W),g(I.$$.fragment,W),W.forEach(c),lt=n(i),L=s(i,"DIV",{class:!0});var he=C(L);g(ee.$$.fragment,he),mt=n(he),xe=s(he,"P",{"data-svelte-h":!0}),f(xe)!=="svelte-m61tyl"&&(xe.innerHTML=At),he.forEach(c),ft=n(i),F=s(i,"DIV",{class:!0});var ue=C(F);g(te.$$.fragment,ue),pt=n(ue),Ce=s(ue,"P",{"data-svelte-h":!0}),f(Ce)!=="svelte-1n36caf"&&(Ce.innerHTML=Yt),ue.forEach(c),ht=n(i),q=s(i,"DIV",{class:!0});var Xe=C(q);g(oe.$$.fragment,Xe),ut=n(Xe),$e=s(Xe,"P",{"data-svelte-h":!0}),f($e)!=="svelte-1oc5n0m"&&($e.innerHTML=Gt),Xe.forEach(c),gt=n(i),U=s(i,"DIV",{class:!0});var Fe=C(U);g(ne.$$.fragment,Fe),_t=n(Fe),ke=s(Fe,"P",{"data-svelte-h":!0}),f(ke)!=="svelte-1l6ubw8"&&(ke.innerHTML=Qt),bt=n(Fe),g(D.$$.fragment,Fe),Fe.forEach(c),yt=n(i),V=s(i,"DIV",{class:!0});var Re=C(V);g(re.$$.fragment,Re),vt=n(Re),Pe=s(Re,"P",{"data-svelte-h":!0}),f(Pe)!=="svelte-qm2ls"&&(Pe.innerHTML=Ot),Re.forEach(c),wt=n(i),z=s(i,"DIV",{class:!0});var qe=C(z);g(ae.$$.fragment,qe),xt=n(qe),Te=s(qe,"P",{"data-svelte-h":!0}),f(Te)!=="svelte-30y31e"&&(Te.innerHTML=Kt),Ct=n(qe),g(H.$$.fragment,qe),qe.forEach(c),$t=n(i),N=s(i,"DIV",{class:!0});var Ae=C(N);g(se.$$.fragment,Ae),kt=n(Ae),Me=s(Ae,"P",{"data-svelte-h":!0}),f(Me)!=="svelte-74060m"&&(Me.innerHTML=eo),Ae.forEach(c),Pt=n(i),B=s(i,"DIV",{class:!0});var Ye=C(B);g(ie.$$.fragment,Ye),Tt=n(Ye),je=s(Ye,"P",{"data-svelte-h":!0}),f(je)!=="svelte-1ww3wqq"&&(je.textContent=to),Ye.forEach(c),Mt=n(i),E=s(i,"DIV",{class:!0});var Ge=C(E);g(de.$$.fragment,Ge),jt=n(Ge),Je=s(Ge,"P",{"data-svelte-h":!0}),f(Je)!=="svelte-1p6bdas"&&(Je.textContent=oo),Ge.forEach(c),Jt=n(i),S=s(i,"DIV",{class:!0});var Qe=C(S);g(ce.$$.fragment,Qe),Ut=n(Qe),Ue=s(Qe,"P",{"data-svelte-h":!0}),f(Ue)!=="svelte-1g70y32"&&(Ue.textContent=no),Qe.forEach(c),zt=n(i),X=s(i,"DIV",{class:!0});var Oe=C(X);g(le.$$.fragment,Oe),Wt=n(Oe),ze=s(Oe,"P",{"data-svelte-h":!0}),f(ze)!=="svelte-5ayq1f"&&(ze.textContent=ro),Oe.forEach(c),Zt=n(i),R=s(i,"DIV",{class:!0});var Ke=C(R);g(me.$$.fragment,Ke),It=n(Ke),We=s(Ke,"P",{"data-svelte-h":!0}),f(We)!=="svelte-1hh5fg7"&&(We.innerHTML=ao),Ke.forEach(c),Lt=n(i),M=s(i,"DIV",{class:!0});var A=C(M);g(fe.$$.fragment,A),Ft=n(A),Ze=s(A,"P",{"data-svelte-h":!0}),f(Ze)!=="svelte-a2aodj"&&(Ze.innerHTML=so),qt=n(A),Ie=s(A,"P",{"data-svelte-h":!0}),f(Ie)!=="svelte-179z5e8"&&(Ie.innerHTML=io),Dt=n(A),Le=s(A,"P",{"data-svelte-h":!0}),f(Le)!=="svelte-5bouux"&&(Le.textContent=co),A.forEach(c),i.forEach(c),Be=n(e),g(pe.$$.fragment,e),Ee=n(e),De=s(e,"P",{}),C(De).forEach(c),this.h()},h(){$(d,"name","hf:doc:metadata"),$(d,"content",ko),$(J,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),$(L,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),$(F,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),$(q,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),$(U,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),$(V,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),$(z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),$(N,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),$(B,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),$(E,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),$(S,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),$(X,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),$(R,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),$(M,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),$(r,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(e,m){t(document.head,d),w(e,k,m),w(e,p,m),w(e,h,m),w(e,x,m),w(e,T,m),w(e,Y,m),w(e,Ve,m),w(e,G,m),w(e,He,m),_(Q,e,m),w(e,Ne,m),w(e,r,m),_(O,r,null),t(r,tt),t(r,ge),t(r,ot),_(Z,r,null),t(r,nt),t(r,_e),t(r,rt),t(r,be),t(r,at),t(r,ye),t(r,st),t(r,ve),t(r,it),t(r,J),_(K,J,null),t(J,dt),t(J,we),t(J,ct),_(I,J,null),t(r,lt),t(r,L),_(ee,L,null),t(L,mt),t(L,xe),t(r,ft),t(r,F),_(te,F,null),t(F,pt),t(F,Ce),t(r,ht),t(r,q),_(oe,q,null),t(q,ut),t(q,$e),t(r,gt),t(r,U),_(ne,U,null),t(U,_t),t(U,ke),t(U,bt),_(D,U,null),t(r,yt),t(r,V),_(re,V,null),t(V,vt),t(V,Pe),t(r,wt),t(r,z),_(ae,z,null),t(z,xt),t(z,Te),t(z,Ct),_(H,z,null),t(r,$t),t(r,N),_(se,N,null),t(N,kt),t(N,Me),t(r,Pt),t(r,B),_(ie,B,null),t(B,Tt),t(B,je),t(r,Mt),t(r,E),_(de,E,null),t(E,jt),t(E,Je),t(r,Jt),t(r,S),_(ce,S,null),t(S,Ut),t(S,Ue),t(r,zt),t(r,X),_(le,X,null),t(X,Wt),t(X,ze),t(r,Zt),t(r,R),_(me,R,null),t(R,It),t(R,We),t(r,Lt),t(r,M),_(fe,M,null),t(M,Ft),t(M,Ze),t(M,qt),t(M,Ie),t(M,Dt),t(M,Le),w(e,Be,m),_(pe,e,m),w(e,Ee,m),w(e,De,m),Se=!0},p(e,[m]){const i={};m&2&&(i.$$scope={dirty:m,ctx:e}),Z.$set(i);const W={};m&2&&(W.$$scope={dirty:m,ctx:e}),I.$set(W);const he={};m&2&&(he.$$scope={dirty:m,ctx:e}),D.$set(he);const ue={};m&2&&(ue.$$scope={dirty:m,ctx:e}),H.$set(ue)},i(e){Se||(b(Q.$$.fragment,e),b(O.$$.fragment,e),b(Z.$$.fragment,e),b(K.$$.fragment,e),b(I.$$.fragment,e),b(ee.$$.fragment,e),b(te.$$.fragment,e),b(oe.$$.fragment,e),b(ne.$$.fragment,e),b(D.$$.fragment,e),b(re.$$.fragment,e),b(ae.$$.fragment,e),b(H.$$.fragment,e),b(se.$$.fragment,e),b(ie.$$.fragment,e),b(de.$$.fragment,e),b(ce.$$.fragment,e),b(le.$$.fragment,e),b(me.$$.fragment,e),b(fe.$$.fragment,e),b(pe.$$.fragment,e),Se=!0)},o(e){y(Q.$$.fragment,e),y(O.$$.fragment,e),y(Z.$$.fragment,e),y(K.$$.fragment,e),y(I.$$.fragment,e),y(ee.$$.fragment,e),y(te.$$.fragment,e),y(oe.$$.fragment,e),y(ne.$$.fragment,e),y(D.$$.fragment,e),y(re.$$.fragment,e),y(ae.$$.fragment,e),y(H.$$.fragment,e),y(se.$$.fragment,e),y(ie.$$.fragment,e),y(de.$$.fragment,e),y(ce.$$.fragment,e),y(le.$$.fragment,e),y(me.$$.fragment,e),y(fe.$$.fragment,e),y(pe.$$.fragment,e),Se=!1},d(e){e&&(c(k),c(p),c(h),c(x),c(T),c(Y),c(Ve),c(G),c(He),c(Ne),c(r),c(Be),c(Ee),c(De)),c(d),v(Q,e),v(O),v(Z),v(K),v(I),v(ee),v(te),v(oe),v(ne),v(D),v(re),v(ae),v(H),v(se),v(ie),v(de),v(ce),v(le),v(me),v(fe),v(pe,e)}}}const ko='{"title":"PretrainedConfig","local":"transformers.PretrainedConfig","sections":[],"depth":2}';function Po(j){return ho(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Zo extends uo{constructor(d){super(),go(this,d,Po,$o,po,{})}}export{Zo as component};
