import{s as Po,o as Mo,n as ze}from"../chunks/scheduler.25b97de1.js";import{S as Co,i as xo,g as l,s,r as h,A as zo,h as c,f as o,c as r,j as q,u,x as m,k as W,y as d,a,v as f,d as g,t as _,w as b}from"../chunks/index.d9030fc9.js";import{T as Ae}from"../chunks/Tip.baa67368.js";import{D as B}from"../chunks/Docstring.e257edda.js";import{C as De}from"../chunks/CodeBlock.e6cd0d95.js";import{E as $o}from"../chunks/ExampleCodeBlock.20db4b6e.js";import{H as Q,E as Fo}from"../chunks/EditOnGithub.91d95064.js";function Jo(P){let n,T=`The <code>Persimmon</code> models were trained using <code>bfloat16</code>, but the original inference uses <code>float16</code> The checkpoints uploaded on the hub use <code>torch_dtype = &#39;float16&#39;</code> which will be
used by the <code>AutoModel</code> API to cast the checkpoints from <code>torch.float32</code> to <code>torch.float16</code>.`,i,p,M="The <code>dtype</code> of the online weights is mostly irrelevant, unless you are using <code>torch_dtype=&quot;auto&quot;</code> when initializing a model using <code>model = AutoModelForCausalLM.from_pretrained(&quot;path&quot;, torch_dtype = &quot;auto&quot;)</code>. The reason is that the model will first be downloaded ( using the <code>dtype</code> of the checkpoints online) then it will be cast to the default <code>dtype</code> of <code>torch</code> (becomes <code>torch.float32</code>). Users should specify the <code>torch_dtype</code> they want, and if they don’t it will be <code>torch.float32</code>.",y,k,K="Finetuning the model in <code>float16</code> is not recommended and known to produce <code>nan</code>, as such the model should be fine-tuned in <code>bfloat16</code>.";return{c(){n=l("p"),n.innerHTML=T,i=s(),p=l("p"),p.innerHTML=M,y=s(),k=l("p"),k.innerHTML=K},l(v){n=c(v,"P",{"data-svelte-h":!0}),m(n)!=="svelte-17q3pz"&&(n.innerHTML=T),i=r(v),p=c(v,"P",{"data-svelte-h":!0}),m(p)!=="svelte-1mgue3n"&&(p.innerHTML=M),y=r(v),k=c(v,"P",{"data-svelte-h":!0}),m(k)!=="svelte-1p3drsu"&&(k.innerHTML=K)},m(v,R){a(v,n,R),a(v,i,R),a(v,p,R),a(v,y,R),a(v,k,R)},p:ze,d(v){v&&(o(n),o(i),o(p),o(y),o(k))}}}function Lo(P){let n,T;return n=new De({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMFBlcnNpbW1vbk1vZGVsJTJDJTIwUGVyc2ltbW9uQ29uZmlnJTBBJTBBJTIzJTIwSW5pdGlhbGl6aW5nJTIwYSUyMFBlcnNpbW1vbiUyMHBlcnNpbW1vbi03YiUyMHN0eWxlJTIwY29uZmlndXJhdGlvbiUwQWNvbmZpZ3VyYXRpb24lMjAlM0QlMjBQZXJzaW1tb25Db25maWcoKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> PersimmonModel, PersimmonConfig

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a Persimmon persimmon-7b style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = PersimmonConfig()`,wrap:!1}}),{c(){h(n.$$.fragment)},l(i){u(n.$$.fragment,i)},m(i,p){f(n,i,p),T=!0},p:ze,i(i){T||(g(n.$$.fragment,i),T=!0)},o(i){_(n.$$.fragment,i),T=!1},d(i){b(n,i)}}}function Io(P){let n,T=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code>
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`;return{c(){n=l("p"),n.innerHTML=T},l(i){n=c(i,"P",{"data-svelte-h":!0}),m(n)!=="svelte-fincs2"&&(n.innerHTML=T)},m(i,p){a(i,n,p)},p:ze,d(i){i&&o(n)}}}function qo(P){let n,T=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code>
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`;return{c(){n=l("p"),n.innerHTML=T},l(i){n=c(i,"P",{"data-svelte-h":!0}),m(n)!=="svelte-fincs2"&&(n.innerHTML=T)},m(i,p){a(i,n,p)},p:ze,d(i){i&&o(n)}}}function Wo(P){let n,T="Example:",i,p,M;return p=new De({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBQZXJzaW1tb25Gb3JDYXVzYWxMTSUwQSUwQW1vZGVsJTIwJTNEJTIwUGVyc2ltbW9uRm9yQ2F1c2FsTE0uZnJvbV9wcmV0cmFpbmVkKCUyMmFkZXB0JTJGcGVyc2ltbW9uLThiLWJhc2UlMjIpJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIyYWRlcHQlMkZwZXJzaW1tb24tOGItYmFzZSUyMiklMEElMEFwcm9tcHQlMjAlM0QlMjAlMjJodW1hbiUzQSUyMEhleSUyQyUyMHdoYXQlMjBzaG91bGQlMjBJJTIwZWF0JTIwZm9yJTIwZGlubmVyJTNGJTIyJTBBaW5wdXRzJTIwJTNEJTIwdG9rZW5pemVyKHByb21wdCUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIycHQlMjIpJTBBJTBBJTIzJTIwR2VuZXJhdGUlMEFnZW5lcmF0ZV9pZHMlMjAlM0QlMjBtb2RlbC5nZW5lcmF0ZShpbnB1dHMuaW5wdXRfaWRzJTJDJTIwbWF4X2xlbmd0aCUzRDMwKSUwQXRva2VuaXplci5iYXRjaF9kZWNvZGUoZ2VuZXJhdGVfaWRzJTJDJTIwc2tpcF9zcGVjaWFsX3Rva2VucyUzRFRydWUlMkMlMjBjbGVhbl91cF90b2tlbml6YXRpb25fc3BhY2VzJTNERmFsc2UpJTVCMCU1RA==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, PersimmonForCausalLM

<span class="hljs-meta">&gt;&gt;&gt; </span>model = PersimmonForCausalLM.from_pretrained(<span class="hljs-string">&quot;adept/persimmon-8b-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;adept/persimmon-8b-base&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>prompt = <span class="hljs-string">&quot;human: Hey, what should I eat for dinner?&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(prompt, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Generate</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>generate_ids = model.generate(inputs.input_ids, max_length=<span class="hljs-number">30</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer.batch_decode(generate_ids, skip_special_tokens=<span class="hljs-literal">True</span>, clean_up_tokenization_spaces=<span class="hljs-literal">False</span>)[<span class="hljs-number">0</span>]
<span class="hljs-string">&#x27;human: Hey, what should I eat for dinner?\\n\\ncat: 🐱\\n\\nhuman: 😐\\n\\n&#x27;</span>`,wrap:!1}}),{c(){n=l("p"),n.textContent=T,i=s(),h(p.$$.fragment)},l(y){n=c(y,"P",{"data-svelte-h":!0}),m(n)!=="svelte-11lpom8"&&(n.textContent=T),i=r(y),u(p.$$.fragment,y)},m(y,k){a(y,n,k),a(y,i,k),f(p,y,k),M=!0},p:ze,i(y){M||(g(p.$$.fragment,y),M=!0)},o(y){_(p.$$.fragment,y),M=!1},d(y){y&&(o(n),o(i)),b(p,y)}}}function Zo(P){let n,T=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code>
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`;return{c(){n=l("p"),n.innerHTML=T},l(i){n=c(i,"P",{"data-svelte-h":!0}),m(n)!=="svelte-fincs2"&&(n.innerHTML=T)},m(i,p){a(i,n,p)},p:ze,d(i){i&&o(n)}}}function Go(P){let n,T=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code>
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`;return{c(){n=l("p"),n.innerHTML=T},l(i){n=c(i,"P",{"data-svelte-h":!0}),m(n)!=="svelte-fincs2"&&(n.innerHTML=T)},m(i,p){a(i,n,p)},p:ze,d(i){i&&o(n)}}}function Ho(P){let n,T,i,p,M,y,k,K,v,R='The Persimmon model was created by <a href="https://www.adept.ai/blog/persimmon-8b" rel="nofollow">ADEPT</a>, and authored by Erich Elsen, Augustus Odena, Maxwell Nye, Sağnak Taşırlar, Tri Dao, Curtis Hawthorne, Deepak Moparthi, Arushi Somani.',Ee,ee,Et="The authors introduced Persimmon-8B, a decoder model based on the classic transformers architecture, with query and key normalization. Persimmon-8B is a fully permissively-licensed model with approximately 8 billion parameters, released under the Apache license.  Some of the key attributes of Persimmon-8B are long context size (16K), performance, and capabilities for multimodal extensions.",Qe,te,Qt="The authors showcase their approach to model evaluation, focusing on practical text generation, mirroring how users interact with language models. The work also includes a comparative analysis, pitting Persimmon-8B against other prominent models (MPT 7B Instruct and Llama 2 Base 7B 1-Shot), across various evaluation tasks. The results demonstrate Persimmon-8B’s competitive performance, even with limited training data.",Ke,oe,Kt="In terms of model details, the work outlines the architecture and training methodology of Persimmon-8B, providing insights into its design choices, sequence length, and dataset composition. The authors present a fast inference code that outperforms traditional implementations through operator fusion and CUDA graph utilization while maintaining code coherence. They express their anticipation of how the community will leverage this contribution to drive innovation, hinting at further upcoming releases as part of an ongoing series of developments.",et,ne,eo=`This model was contributed by <a href="https://huggingface.co/ArthurZ" rel="nofollow">ArthurZ</a>.
The original code can be found <a href="https://github.com/persimmon-ai-labs/adept-inference" rel="nofollow">here</a>.`,tt,se,ot,V,nt,re,to="Tips:",st,ae,oo="<li>To convert the model, you need to clone the original repository using <code>git clone https://github.com/persimmon-ai-labs/adept-inference</code>, then get the checkpoints:</li>",rt,ie,at,de,no="For the chat model:",it,le,dt,ce,so="Thereafter, models can be loaded via:",lt,me,ct,pe,ro=`<li><p>Perismmon uses a <code>sentencepiece</code> based tokenizer, with a <code>Unigram</code> model. It supports bytefallback, which is only available in <code>tokenizers==0.14.0</code> for the fast tokenizer.
The <code>LlamaTokenizer</code> is used as it is a standard wrapper around sentencepiece. The <code>chat</code> template will be updated with the templating functions in a follow up PR!</p></li> <li><p>The authors suggest to use the following prompt format for the chat mode: <code>f&quot;human: {prompt}\\n\\nadept:&quot;</code></p></li>`,mt,he,pt,z,ue,$t,Fe,ao=`This is the configuration class to store the configuration of a <a href="/docs/transformers/pr_31208/en/model_doc/persimmon#transformers.PersimmonModel">PersimmonModel</a>. It is used to instantiate an
Persimmon model according to the specified arguments, defining the model architecture. Instantiating a
configuration with the defaults will yield a similar configuration to that of the
<a href="https://huggingface.co/adept/persimmon-8b-base" rel="nofollow">adept/persimmon-8b-base</a>.`,Pt,Je,io=`Configuration objects inherit from <a href="/docs/transformers/pr_31208/en/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> and can be used to control the model outputs. Read the
documentation from <a href="/docs/transformers/pr_31208/en/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> for more information.`,Mt,X,ht,fe,ut,C,ge,Ct,Le,lo=`The bare Persimmon Model outputting raw hidden-states without any specific head on top.
This model inherits from <a href="/docs/transformers/pr_31208/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a>. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`,xt,Ie,co=`This model is also a PyTorch <a href="https://pytorch.org/docs/stable/nn.html#torch.nn.Module" rel="nofollow">torch.nn.Module</a> subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`,zt,qe,mo="Transformer decoder consisting of <em>config.num_hidden_layers</em> layers. Each layer is a <code>PersimmonDecoderLayer</code>",Ft,Z,_e,Jt,We,po='The <a href="/docs/transformers/pr_31208/en/model_doc/persimmon#transformers.PersimmonModel">PersimmonModel</a> forward method, overrides the <code>__call__</code> special method.',Lt,O,ft,be,gt,S,Te,It,J,ye,qt,Ze,ho='The <a href="/docs/transformers/pr_31208/en/model_doc/persimmon#transformers.PersimmonForCausalLM">PersimmonForCausalLM</a> forward method, overrides the <code>__call__</code> special method.',Wt,Y,Zt,A,_t,ve,bt,w,ke,Gt,Ge,uo="The Persimmon transformer with a sequence classification head on top (linear layer).",Ht,He,fo=`<a href="/docs/transformers/pr_31208/en/model_doc/persimmon#transformers.PersimmonForSequenceClassification">PersimmonForSequenceClassification</a> uses the last token in order to do the classification, as other causal
models (e.g. GPT-2) do.`,Ut,Ue,go=`Since it does classification on the last token, it requires to know the position of the last token. If a
<code>pad_token_id</code> is defined in the configuration, it finds the last token that is not a padding token in each row. If
no <code>pad_token_id</code> is defined, it simply takes the last value in each row of the batch. Since it cannot guess the
padding tokens when <code>inputs_embeds</code> are passed instead of <code>input_ids</code>, it does the same (take the last value in
each row of the batch).`,St,Se,_o=`This model inherits from <a href="/docs/transformers/pr_31208/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a>. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`,Nt,Ne,bo=`This model is also a PyTorch <a href="https://pytorch.org/docs/stable/nn.html#torch.nn.Module" rel="nofollow">torch.nn.Module</a> subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`,jt,G,we,Bt,je,To='The <a href="/docs/transformers/pr_31208/en/model_doc/persimmon#transformers.PersimmonForSequenceClassification">PersimmonForSequenceClassification</a> forward method, overrides the <code>__call__</code> special method.',Rt,D,Tt,$e,yt,x,Pe,Vt,Be,yo=`The Persimmon Model transformer with a token classification head on top (a linear layer on top of the hidden-states
output) e.g. for Named-Entity-Recognition (NER) tasks.`,Xt,Re,vo=`This model inherits from <a href="/docs/transformers/pr_31208/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a>. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`,Ot,Ve,ko=`This model is also a PyTorch <a href="https://pytorch.org/docs/stable/nn.html#torch.nn.Module" rel="nofollow">torch.nn.Module</a> subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`,Yt,H,Me,At,Xe,wo='The <a href="/docs/transformers/pr_31208/en/model_doc/persimmon#transformers.PersimmonForTokenClassification">PersimmonForTokenClassification</a> forward method, overrides the <code>__call__</code> special method.',Dt,E,vt,Ce,kt,Ye,wt;return M=new Q({props:{title:"Persimmon",local:"persimmon",headingTag:"h1"}}),k=new Q({props:{title:"Overview",local:"overview",headingTag:"h2"}}),se=new Q({props:{title:"Usage tips",local:"usage-tips",headingTag:"h2"}}),V=new Ae({props:{warning:!0,$$slots:{default:[Jo]},$$scope:{ctx:P}}}),ie=new De({props:{code:"Z2l0JTIwY2xvbmUlMjBodHRwcyUzQSUyRiUyRmdpdGh1Yi5jb20lMkZwZXJzaW1tb24tYWktbGFicyUyRmFkZXB0LWluZmVyZW5jZSUwQXdnZXQlMjBodHRwcyUzQSUyRiUyRmF4dGtuNHhsNWNpcC5vYmplY3RzdG9yYWdlLnVzLXBob2VuaXgtMS5vY2kuY3VzdG9tZXItb2NpLmNvbSUyRm4lMkZheHRrbjR4bDVjaXAlMkZiJTJGYWRlcHQtcHVibGljLWRhdGElMkZvJTJGOGJfYmFzZV9tb2RlbF9yZWxlYXNlLnRhciUwQXRhciUyMC14dmYlMjA4Yl9iYXNlX21vZGVsX3JlbGVhc2UudGFyJTBBcHl0aG9uJTIwc3JjJTJGdHJhbnNmb3JtZXJzJTJGbW9kZWxzJTJGcGVyc2ltbW9uJTJGY29udmVydF9wZXJzaW1tb25fd2VpZ2h0c190b19oZi5weSUyMCUyMC0taW5wdXRfZGlyJTIwJTJGcGF0aCUyRnRvJTJGZG93bmxvYWRlZCUyRnBlcnNpbW1vbiUyRndlaWdodHMlMkYlMjAtLW91dHB1dF9kaXIlMjAlMkZvdXRwdXQlMkZwYXRoJTIwJTVDJTBBJTIwJTIwJTIwJTIwLS1wdF9tb2RlbF9wYXRoJTIwJTJGcGF0aCUyRnRvJTJGOGJfY2hhdF9tb2RlbF9yZWxlYXNlJTJGaXRlcl8wMDAxMjUxJTJGbXBfcmFua18wMCUyRm1vZGVsX29wdGltX3JuZy5wdCUwQSUyMCUyMCUyMCUyMC0tYWRhX2xpYl9wYXRoJTIwJTJGcGF0aCUyRnRvJTJGYWRlcHQtaW5mZXJlbmNl",highlighted:`git <span class="hljs-built_in">clone</span> https://github.com/persimmon-ai-labs/adept-inference
wget https://axtkn4xl5cip.objectstorage.us-phoenix-1.oci.customer-oci.com/n/axtkn4xl5cip/b/adept-public-data/o/8b_base_model_release.tar
tar -xvf 8b_base_model_release.tar
python src/transformers/models/persimmon/convert_persimmon_weights_to_hf.py  --input_dir /path/to/downloaded/persimmon/weights/ --output_dir /output/path \\
    --pt_model_path /path/to/8b_chat_model_release/iter_0001251/mp_rank_00/model_optim_rng.pt
    --ada_lib_path /path/to/adept-inference`,wrap:!1}}),le=new De({props:{code:"d2dldCUyMGh0dHBzJTNBJTJGJTJGYXh0a240eGw1Y2lwLm9iamVjdHN0b3JhZ2UudXMtcGhvZW5peC0xLm9jaS5jdXN0b21lci1vY2kuY29tJTJGbiUyRmF4dGtuNHhsNWNpcCUyRmIlMkZhZGVwdC1wdWJsaWMtZGF0YSUyRm8lMkY4Yl9jaGF0X21vZGVsX3JlbGVhc2UudGFyJTBBdGFyJTIwLXh2ZiUyMDhiX2Jhc2VfbW9kZWxfcmVsZWFzZS50YXI=",highlighted:`wget https://axtkn4xl5cip.objectstorage.us-phoenix-1.oci.customer-oci.com/n/axtkn4xl5cip/b/adept-public-data/o/8b_chat_model_release.tar
tar -xvf 8b_base_model_release.tar`,wrap:!1}}),me=new De({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMFBlcnNpbW1vbkZvckNhdXNhbExNJTJDJTIwUGVyc2ltbW9uVG9rZW5pemVyJTBBJTBBbW9kZWwlMjAlM0QlMjBQZXJzaW1tb25Gb3JDYXVzYWxMTS5mcm9tX3ByZXRyYWluZWQoJTIyJTJGb3V0cHV0JTJGcGF0aCUyMiklMEF0b2tlbml6ZXIlMjAlM0QlMjBQZXJzaW1tb25Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMiUyRm91dHB1dCUyRnBhdGglMjIp",highlighted:`<span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> PersimmonForCausalLM, PersimmonTokenizer

model = PersimmonForCausalLM.from_pretrained(<span class="hljs-string">&quot;/output/path&quot;</span>)
tokenizer = PersimmonTokenizer.from_pretrained(<span class="hljs-string">&quot;/output/path&quot;</span>)`,wrap:!1}}),he=new Q({props:{title:"PersimmonConfig",local:"transformers.PersimmonConfig",headingTag:"h2"}}),ue=new B({props:{name:"class transformers.PersimmonConfig",anchor:"transformers.PersimmonConfig",parameters:[{name:"vocab_size",val:" = 262144"},{name:"hidden_size",val:" = 4096"},{name:"intermediate_size",val:" = 16384"},{name:"num_hidden_layers",val:" = 36"},{name:"num_attention_heads",val:" = 64"},{name:"hidden_act",val:" = 'relu2'"},{name:"max_position_embeddings",val:" = 16384"},{name:"initializer_range",val:" = 0.02"},{name:"layer_norm_eps",val:" = 1e-05"},{name:"use_cache",val:" = True"},{name:"tie_word_embeddings",val:" = False"},{name:"rope_theta",val:" = 25000.0"},{name:"rope_scaling",val:" = None"},{name:"qk_layernorm",val:" = True"},{name:"hidden_dropout",val:" = 0.0"},{name:"attention_dropout",val:" = 0.0"},{name:"partial_rotary_factor",val:" = 0.5"},{name:"pad_token_id",val:" = None"},{name:"bos_token_id",val:" = 1"},{name:"eos_token_id",val:" = 2"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.PersimmonConfig.vocab_size",description:`<strong>vocab_size</strong> (<code>int</code>, <em>optional</em>, defaults to 262144) &#x2014;
Vocabulary size of the Persimmon model. Defines the number of different tokens that can be represented by
the <code>inputs_ids</code> passed when calling <a href="/docs/transformers/pr_31208/en/model_doc/persimmon#transformers.PersimmonModel">PersimmonModel</a>`,name:"vocab_size"},{anchor:"transformers.PersimmonConfig.hidden_size",description:`<strong>hidden_size</strong> (<code>int</code>, <em>optional</em>, defaults to 4096) &#x2014;
Dimension of the hidden representations.`,name:"hidden_size"},{anchor:"transformers.PersimmonConfig.intermediate_size",description:`<strong>intermediate_size</strong> (<code>int</code>, <em>optional</em>, defaults to 16384) &#x2014;
Dimension of the MLP representations.`,name:"intermediate_size"},{anchor:"transformers.PersimmonConfig.num_hidden_layers",description:`<strong>num_hidden_layers</strong> (<code>int</code>, <em>optional</em>, defaults to 36) &#x2014;
Number of hidden layers in the Transformer encoder.`,name:"num_hidden_layers"},{anchor:"transformers.PersimmonConfig.num_attention_heads",description:`<strong>num_attention_heads</strong> (<code>int</code>, <em>optional</em>, defaults to 64) &#x2014;
Number of attention heads for each attention layer in the Transformer encoder.`,name:"num_attention_heads"},{anchor:"transformers.PersimmonConfig.hidden_act",description:`<strong>hidden_act</strong> (<code>str</code> or <code>function</code>, <em>optional</em>, defaults to <code>&quot;relu2&quot;</code>) &#x2014;
The non-linear activation function (function or string) in the decoder.`,name:"hidden_act"},{anchor:"transformers.PersimmonConfig.max_position_embeddings",description:`<strong>max_position_embeddings</strong> (<code>int</code>, <em>optional</em>, defaults to 16384) &#x2014;
The maximum sequence length that this model might ever be used with.`,name:"max_position_embeddings"},{anchor:"transformers.PersimmonConfig.initializer_range",description:`<strong>initializer_range</strong> (<code>float</code>, <em>optional</em>, defaults to 0.02) &#x2014;
The standard deviation of the truncated_normal_initializer for initializing all weight matrices.`,name:"initializer_range"},{anchor:"transformers.PersimmonConfig.layer_norm_eps",description:`<strong>layer_norm_eps</strong> (<code>float</code>, <em>optional</em>, defaults to 1e-5) &#x2014;
The epsilon used by the rms normalization layers.`,name:"layer_norm_eps"},{anchor:"transformers.PersimmonConfig.use_cache",description:`<strong>use_cache</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not the model should return the last key/values attentions (not used by all models). Only
relevant if <code>config.is_decoder=True</code>.`,name:"use_cache"},{anchor:"transformers.PersimmonConfig.tie_word_embeddings(bool,",description:`<strong>tie_word_embeddings(<code>bool</code>,</strong> <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether to tie weight embeddings`,name:"tie_word_embeddings(bool,"},{anchor:"transformers.PersimmonConfig.rope_theta",description:`<strong>rope_theta</strong> (<code>float</code>, <em>optional</em>, defaults to 25000.0) &#x2014;
The base period of the RoPE embeddings.`,name:"rope_theta"},{anchor:"transformers.PersimmonConfig.rope_scaling",description:`<strong>rope_scaling</strong> (<code>Dict</code>, <em>optional</em>) &#x2014;
Dictionary containing the scaling configuration for the RoPE embeddings. Currently supports two scaling
strategies: linear and dynamic. Their scaling factor must be a float greater than 1. The expected format is
<code>{&quot;type&quot;: strategy name, &quot;factor&quot;: scaling factor}</code>. When using this flag, don&#x2019;t update
<code>max_position_embeddings</code> to the expected new maximum. See the following thread for more information on how
these scaling strategies behave:
<a href="https://www.reddit.com/r/LocalPersimmon/comments/14mrgpr/dynamically_scaled_rope_further_increases/" rel="nofollow">https://www.reddit.com/r/LocalPersimmon/comments/14mrgpr/dynamically_scaled_rope_further_increases/</a>. This
is an experimental feature, subject to breaking API changes in future versions.`,name:"rope_scaling"},{anchor:"transformers.PersimmonConfig.qk_layernorm",description:`<strong>qk_layernorm</strong> (<code>bool</code>, <em>optional</em>, default to <code>True</code>) &#x2014;
Whether or not to normalize the Queries and Keys after projecting the hidden states`,name:"qk_layernorm"},{anchor:"transformers.PersimmonConfig.hidden_dropout",description:`<strong>hidden_dropout</strong> (<code>float</code>, <em>optional</em>, default to 0.0) &#x2014;
The dropout ratio after applying the MLP to the hidden states.`,name:"hidden_dropout"},{anchor:"transformers.PersimmonConfig.attention_dropout",description:`<strong>attention_dropout</strong> (<code>float</code>, <em>optional</em>, default to 0.0) &#x2014;
The dropout ratio after computing the attention scores.`,name:"attention_dropout"},{anchor:"transformers.PersimmonConfig.partial_rotary_factor",description:`<strong>partial_rotary_factor</strong> (<code>float</code>, <em>optional</em>, default to 0.5) &#x2014;
Percentage of the query and keys which will have rotary embedding.</p>
<p>Example &#x2014;`,name:"partial_rotary_factor"}],source:"https://github.com/huggingface/transformers/blob/vr_31208/src/transformers/models/persimmon/configuration_persimmon.py#L24"}}),X=new $o({props:{anchor:"transformers.PersimmonConfig.example",$$slots:{default:[Lo]},$$scope:{ctx:P}}}),fe=new Q({props:{title:"PersimmonModel",local:"transformers.PersimmonModel",headingTag:"h2"}}),ge=new B({props:{name:"class transformers.PersimmonModel",anchor:"transformers.PersimmonModel",parameters:[{name:"config",val:": PersimmonConfig"}],parametersDescription:[{anchor:"transformers.PersimmonModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_31208/en/model_doc/persimmon#transformers.PersimmonConfig">PersimmonConfig</a>) &#x2014;
Model configuration class with all the parameters of the model. Initializing with a config file does not
load the weights associated with the model, only the configuration. Check out the
<a href="/docs/transformers/pr_31208/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.
config &#x2014; PersimmonConfig`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/vr_31208/src/transformers/models/persimmon/modeling_persimmon.py#L550"}}),_e=new B({props:{name:"forward",anchor:"transformers.PersimmonModel.forward",parameters:[{name:"input_ids",val:": LongTensor = None"},{name:"attention_mask",val:": Optional = None"},{name:"position_ids",val:": Optional = None"},{name:"past_key_values",val:": Optional = None"},{name:"inputs_embeds",val:": Optional = None"},{name:"use_cache",val:": Optional = None"},{name:"output_attentions",val:": Optional = None"},{name:"output_hidden_states",val:": Optional = None"},{name:"return_dict",val:": Optional = None"}],parametersDescription:[{anchor:"transformers.PersimmonModel.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary. Padding will be ignored by default should you provide
it.</p>
<p>Indices can be obtained using <a href="/docs/transformers/pr_31208/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/pr_31208/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_31208/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.PersimmonModel.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a></p>
<p>Indices can be obtained using <a href="/docs/transformers/pr_31208/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/pr_31208/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_31208/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p>If <code>past_key_values</code> is used, optionally only the last <code>decoder_input_ids</code> have to be input (see
<code>past_key_values</code>).</p>
<p>If you want to change padding behavior, you should read <code>modeling_opt._prepare_decoder_attention_mask</code>
and modify to your needs. See diagram 1 in <a href="https://arxiv.org/abs/1910.13461" rel="nofollow">the paper</a> for more
information on the default strategy.</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"attention_mask"},{anchor:"transformers.PersimmonModel.forward.position_ids",description:`<strong>position_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.n_positions - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.PersimmonModel.forward.past_key_values",description:`<strong>past_key_values</strong> (<code>Cache</code> or <code>tuple(tuple(torch.FloatTensor))</code>, <em>optional</em>) &#x2014;
Pre-computed hidden-states (key and values in the self-attention blocks and in the cross-attention
blocks) that can be used to speed up sequential decoding. This typically consists in the <code>past_key_values</code>
returned by the model at a previous stage of decoding, when <code>use_cache=True</code> or <code>config.use_cache=True</code>.</p>
<p>Two formats are allowed:</p>
<ul>
<li>a <a href="/docs/transformers/pr_31208/en/internal/generation_utils#transformers.Cache">Cache</a> instance;</li>
<li>Tuple of <code>tuple(torch.FloatTensor)</code> of length <code>config.n_layers</code>, with each tuple having 2 tensors of
shape <code>(batch_size, num_heads, sequence_length, embed_size_per_head)</code>). This is also known as the legacy
cache format.</li>
</ul>
<p>The model will output the same cache format that is fed as input. If no <code>past_key_values</code> are passed, the
legacy cache format will be returned.</p>
<p>If <code>past_key_values</code> are used, the user can optionally input only the last <code>input_ids</code> (those that don&#x2019;t
have their past key value states given to this model) of shape <code>(batch_size, 1)</code> instead of all <code>input_ids</code>
of shape <code>(batch_size, sequence_length)</code>.`,name:"past_key_values"},{anchor:"transformers.PersimmonModel.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.PersimmonModel.forward.use_cache",description:`<strong>use_cache</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
If set to <code>True</code>, <code>past_key_values</code> key value states are returned and can be used to speed up decoding (see
<code>past_key_values</code>).`,name:"use_cache"},{anchor:"transformers.PersimmonModel.forward.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.PersimmonModel.forward.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.PersimmonModel.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/pr_31208/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/vr_31208/src/transformers/models/persimmon/modeling_persimmon.py#L583"}}),O=new Ae({props:{$$slots:{default:[Io]},$$scope:{ctx:P}}}),be=new Q({props:{title:"PersimmonForCausalLM",local:"transformers.PersimmonForCausalLM",headingTag:"h2"}}),Te=new B({props:{name:"class transformers.PersimmonForCausalLM",anchor:"transformers.PersimmonForCausalLM",parameters:[{name:"config",val:""}],source:"https://github.com/huggingface/transformers/blob/vr_31208/src/transformers/models/persimmon/modeling_persimmon.py#L707"}}),ye=new B({props:{name:"forward",anchor:"transformers.PersimmonForCausalLM.forward",parameters:[{name:"input_ids",val:": LongTensor = None"},{name:"attention_mask",val:": Optional = None"},{name:"position_ids",val:": Optional = None"},{name:"past_key_values",val:": Optional = None"},{name:"inputs_embeds",val:": Optional = None"},{name:"labels",val:": Optional = None"},{name:"use_cache",val:": Optional = None"},{name:"output_attentions",val:": Optional = None"},{name:"output_hidden_states",val:": Optional = None"},{name:"return_dict",val:": Optional = None"}],parametersDescription:[{anchor:"transformers.PersimmonForCausalLM.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary. Padding will be ignored by default should you provide
it.</p>
<p>Indices can be obtained using <a href="/docs/transformers/pr_31208/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/pr_31208/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_31208/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.PersimmonForCausalLM.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a></p>
<p>Indices can be obtained using <a href="/docs/transformers/pr_31208/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/pr_31208/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_31208/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p>If <code>past_key_values</code> is used, optionally only the last <code>decoder_input_ids</code> have to be input (see
<code>past_key_values</code>).</p>
<p>If you want to change padding behavior, you should read <code>modeling_opt._prepare_decoder_attention_mask</code>
and modify to your needs. See diagram 1 in <a href="https://arxiv.org/abs/1910.13461" rel="nofollow">the paper</a> for more
information on the default strategy.</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"attention_mask"},{anchor:"transformers.PersimmonForCausalLM.forward.position_ids",description:`<strong>position_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.n_positions - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.PersimmonForCausalLM.forward.past_key_values",description:`<strong>past_key_values</strong> (<code>Cache</code> or <code>tuple(tuple(torch.FloatTensor))</code>, <em>optional</em>) &#x2014;
Pre-computed hidden-states (key and values in the self-attention blocks and in the cross-attention
blocks) that can be used to speed up sequential decoding. This typically consists in the <code>past_key_values</code>
returned by the model at a previous stage of decoding, when <code>use_cache=True</code> or <code>config.use_cache=True</code>.</p>
<p>Two formats are allowed:</p>
<ul>
<li>a <a href="/docs/transformers/pr_31208/en/internal/generation_utils#transformers.Cache">Cache</a> instance;</li>
<li>Tuple of <code>tuple(torch.FloatTensor)</code> of length <code>config.n_layers</code>, with each tuple having 2 tensors of
shape <code>(batch_size, num_heads, sequence_length, embed_size_per_head)</code>). This is also known as the legacy
cache format.</li>
</ul>
<p>The model will output the same cache format that is fed as input. If no <code>past_key_values</code> are passed, the
legacy cache format will be returned.</p>
<p>If <code>past_key_values</code> are used, the user can optionally input only the last <code>input_ids</code> (those that don&#x2019;t
have their past key value states given to this model) of shape <code>(batch_size, 1)</code> instead of all <code>input_ids</code>
of shape <code>(batch_size, sequence_length)</code>.`,name:"past_key_values"},{anchor:"transformers.PersimmonForCausalLM.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.PersimmonForCausalLM.forward.use_cache",description:`<strong>use_cache</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
If set to <code>True</code>, <code>past_key_values</code> key value states are returned and can be used to speed up decoding (see
<code>past_key_values</code>).`,name:"use_cache"},{anchor:"transformers.PersimmonForCausalLM.forward.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.PersimmonForCausalLM.forward.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.PersimmonForCausalLM.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/pr_31208/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.</p>
<p>Args &#x2014;
labels (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>):
Labels for computing the masked language modeling loss. Indices should either be in <code>[0, ..., config.vocab_size]</code> or -100 (see <code>input_ids</code> docstring). Tokens with indices set to <code>-100</code> are ignored
(masked), the loss is only computed for the tokens with labels in <code>[0, ..., config.vocab_size]</code>.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/vr_31208/src/transformers/models/persimmon/modeling_persimmon.py#L744",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <a
  href="/docs/transformers/pr_31208/en/main_classes/output#transformers.modeling_outputs.CausalLMOutputWithPast"
>transformers.modeling_outputs.CausalLMOutputWithPast</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/pr_31208/en/model_doc/persimmon#transformers.PersimmonConfig"
>PersimmonConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided) — Language modeling loss (for next-token prediction).</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, config.vocab_size)</code>) — Prediction scores of the language modeling head (scores for each vocabulary token before SoftMax).</p>
</li>
<li>
<p><strong>past_key_values</strong> (<code>tuple(tuple(torch.FloatTensor))</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) — Tuple of <code>tuple(torch.FloatTensor)</code> of length <code>config.n_layers</code>, with each tuple having 2 tensors of shape
<code>(batch_size, num_heads, sequence_length, embed_size_per_head)</code>)</p>
<p>Contains pre-computed hidden-states (key and values in the self-attention blocks) that can be used (see
<code>past_key_values</code> input) to speed up sequential decoding.</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) — Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) — Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><a
  href="/docs/transformers/pr_31208/en/main_classes/output#transformers.modeling_outputs.CausalLMOutputWithPast"
>transformers.modeling_outputs.CausalLMOutputWithPast</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Y=new Ae({props:{$$slots:{default:[qo]},$$scope:{ctx:P}}}),A=new $o({props:{anchor:"transformers.PersimmonForCausalLM.forward.example",$$slots:{default:[Wo]},$$scope:{ctx:P}}}),ve=new Q({props:{title:"PersimmonForSequenceClassification",local:"transformers.PersimmonForSequenceClassification",headingTag:"h2"}}),ke=new B({props:{name:"class transformers.PersimmonForSequenceClassification",anchor:"transformers.PersimmonForSequenceClassification",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.PersimmonForSequenceClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_31208/en/model_doc/persimmon#transformers.PersimmonConfig">PersimmonConfig</a>) &#x2014;
Model configuration class with all the parameters of the model. Initializing with a config file does not
load the weights associated with the model, only the configuration. Check out the
<a href="/docs/transformers/pr_31208/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/vr_31208/src/transformers/models/persimmon/modeling_persimmon.py#L896"}}),we=new B({props:{name:"forward",anchor:"transformers.PersimmonForSequenceClassification.forward",parameters:[{name:"input_ids",val:": LongTensor = None"},{name:"attention_mask",val:": Optional = None"},{name:"position_ids",val:": Optional = None"},{name:"past_key_values",val:": Union = None"},{name:"inputs_embeds",val:": Optional = None"},{name:"labels",val:": Optional = None"},{name:"use_cache",val:": Optional = None"},{name:"output_attentions",val:": Optional = None"},{name:"output_hidden_states",val:": Optional = None"},{name:"return_dict",val:": Optional = None"}],parametersDescription:[{anchor:"transformers.PersimmonForSequenceClassification.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary. Padding will be ignored by default should you provide
it.</p>
<p>Indices can be obtained using <a href="/docs/transformers/pr_31208/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/pr_31208/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_31208/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.PersimmonForSequenceClassification.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a></p>
<p>Indices can be obtained using <a href="/docs/transformers/pr_31208/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/pr_31208/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_31208/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p>If <code>past_key_values</code> is used, optionally only the last <code>decoder_input_ids</code> have to be input (see
<code>past_key_values</code>).</p>
<p>If you want to change padding behavior, you should read <code>modeling_opt._prepare_decoder_attention_mask</code>
and modify to your needs. See diagram 1 in <a href="https://arxiv.org/abs/1910.13461" rel="nofollow">the paper</a> for more
information on the default strategy.</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"attention_mask"},{anchor:"transformers.PersimmonForSequenceClassification.forward.position_ids",description:`<strong>position_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.n_positions - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.PersimmonForSequenceClassification.forward.past_key_values",description:`<strong>past_key_values</strong> (<code>Cache</code> or <code>tuple(tuple(torch.FloatTensor))</code>, <em>optional</em>) &#x2014;
Pre-computed hidden-states (key and values in the self-attention blocks and in the cross-attention
blocks) that can be used to speed up sequential decoding. This typically consists in the <code>past_key_values</code>
returned by the model at a previous stage of decoding, when <code>use_cache=True</code> or <code>config.use_cache=True</code>.</p>
<p>Two formats are allowed:</p>
<ul>
<li>a <a href="/docs/transformers/pr_31208/en/internal/generation_utils#transformers.Cache">Cache</a> instance;</li>
<li>Tuple of <code>tuple(torch.FloatTensor)</code> of length <code>config.n_layers</code>, with each tuple having 2 tensors of
shape <code>(batch_size, num_heads, sequence_length, embed_size_per_head)</code>). This is also known as the legacy
cache format.</li>
</ul>
<p>The model will output the same cache format that is fed as input. If no <code>past_key_values</code> are passed, the
legacy cache format will be returned.</p>
<p>If <code>past_key_values</code> are used, the user can optionally input only the last <code>input_ids</code> (those that don&#x2019;t
have their past key value states given to this model) of shape <code>(batch_size, 1)</code> instead of all <code>input_ids</code>
of shape <code>(batch_size, sequence_length)</code>.`,name:"past_key_values"},{anchor:"transformers.PersimmonForSequenceClassification.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.PersimmonForSequenceClassification.forward.use_cache",description:`<strong>use_cache</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
If set to <code>True</code>, <code>past_key_values</code> key value states are returned and can be used to speed up decoding (see
<code>past_key_values</code>).`,name:"use_cache"},{anchor:"transformers.PersimmonForSequenceClassification.forward.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.PersimmonForSequenceClassification.forward.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.PersimmonForSequenceClassification.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/pr_31208/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.PersimmonForSequenceClassification.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for computing the sequence classification/regression loss. Indices should be in <code>[0, ..., config.num_labels - 1]</code>. If <code>config.num_labels == 1</code> a regression loss is computed (Mean-Square loss), If
<code>config.num_labels &gt; 1</code> a classification loss is computed (Cross-Entropy).`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/vr_31208/src/transformers/models/persimmon/modeling_persimmon.py#L928"}}),D=new Ae({props:{$$slots:{default:[Zo]},$$scope:{ctx:P}}}),$e=new Q({props:{title:"PersimmonForTokenClassification",local:"transformers.PersimmonForTokenClassification",headingTag:"h2"}}),Pe=new B({props:{name:"class transformers.PersimmonForTokenClassification",anchor:"transformers.PersimmonForTokenClassification",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.PersimmonForTokenClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_31208/en/model_doc/persimmon#transformers.PersimmonConfig">PersimmonConfig</a>) &#x2014;
Model configuration class with all the parameters of the model. Initializing with a config file does not
load the weights associated with the model, only the configuration. Check out the
<a href="/docs/transformers/pr_31208/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/vr_31208/src/transformers/models/persimmon/modeling_persimmon.py#L1020"}}),Me=new B({props:{name:"forward",anchor:"transformers.PersimmonForTokenClassification.forward",parameters:[{name:"input_ids",val:": LongTensor = None"},{name:"attention_mask",val:": Optional = None"},{name:"position_ids",val:": Optional = None"},{name:"past_key_values",val:": Optional = None"},{name:"inputs_embeds",val:": Optional = None"},{name:"labels",val:": Optional = None"},{name:"use_cache",val:": Optional = None"},{name:"output_attentions",val:": Optional = None"},{name:"output_hidden_states",val:": Optional = None"},{name:"return_dict",val:": Optional = None"}],parametersDescription:[{anchor:"transformers.PersimmonForTokenClassification.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary. Padding will be ignored by default should you provide
it.</p>
<p>Indices can be obtained using <a href="/docs/transformers/pr_31208/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/pr_31208/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_31208/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.PersimmonForTokenClassification.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a></p>
<p>Indices can be obtained using <a href="/docs/transformers/pr_31208/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/pr_31208/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_31208/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p>If <code>past_key_values</code> is used, optionally only the last <code>decoder_input_ids</code> have to be input (see
<code>past_key_values</code>).</p>
<p>If you want to change padding behavior, you should read <code>modeling_opt._prepare_decoder_attention_mask</code>
and modify to your needs. See diagram 1 in <a href="https://arxiv.org/abs/1910.13461" rel="nofollow">the paper</a> for more
information on the default strategy.</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"attention_mask"},{anchor:"transformers.PersimmonForTokenClassification.forward.position_ids",description:`<strong>position_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.n_positions - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.PersimmonForTokenClassification.forward.past_key_values",description:`<strong>past_key_values</strong> (<code>Cache</code> or <code>tuple(tuple(torch.FloatTensor))</code>, <em>optional</em>) &#x2014;
Pre-computed hidden-states (key and values in the self-attention blocks and in the cross-attention
blocks) that can be used to speed up sequential decoding. This typically consists in the <code>past_key_values</code>
returned by the model at a previous stage of decoding, when <code>use_cache=True</code> or <code>config.use_cache=True</code>.</p>
<p>Two formats are allowed:</p>
<ul>
<li>a <a href="/docs/transformers/pr_31208/en/internal/generation_utils#transformers.Cache">Cache</a> instance;</li>
<li>Tuple of <code>tuple(torch.FloatTensor)</code> of length <code>config.n_layers</code>, with each tuple having 2 tensors of
shape <code>(batch_size, num_heads, sequence_length, embed_size_per_head)</code>). This is also known as the legacy
cache format.</li>
</ul>
<p>The model will output the same cache format that is fed as input. If no <code>past_key_values</code> are passed, the
legacy cache format will be returned.</p>
<p>If <code>past_key_values</code> are used, the user can optionally input only the last <code>input_ids</code> (those that don&#x2019;t
have their past key value states given to this model) of shape <code>(batch_size, 1)</code> instead of all <code>input_ids</code>
of shape <code>(batch_size, sequence_length)</code>.`,name:"past_key_values"},{anchor:"transformers.PersimmonForTokenClassification.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.PersimmonForTokenClassification.forward.use_cache",description:`<strong>use_cache</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
If set to <code>True</code>, <code>past_key_values</code> key value states are returned and can be used to speed up decoding (see
<code>past_key_values</code>).`,name:"use_cache"},{anchor:"transformers.PersimmonForTokenClassification.forward.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.PersimmonForTokenClassification.forward.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.PersimmonForTokenClassification.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/pr_31208/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.PersimmonForTokenClassification.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for computing the sequence classification/regression loss. Indices should be in <code>[0, ..., config.num_labels - 1]</code>. If <code>config.num_labels == 1</code> a regression loss is computed (Mean-Square loss), If
<code>config.num_labels &gt; 1</code> a classification loss is computed (Cross-Entropy).`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/vr_31208/src/transformers/models/persimmon/modeling_persimmon.py#L1051"}}),E=new Ae({props:{$$slots:{default:[Go]},$$scope:{ctx:P}}}),Ce=new Fo({props:{source:"https://github.com/huggingface/transformers/blob/main/docs/source/en/model_doc/persimmon.md"}}),{c(){n=l("meta"),T=s(),i=l("p"),p=s(),h(M.$$.fragment),y=s(),h(k.$$.fragment),K=s(),v=l("p"),v.innerHTML=R,Ee=s(),ee=l("p"),ee.textContent=Et,Qe=s(),te=l("p"),te.textContent=Qt,Ke=s(),oe=l("p"),oe.textContent=Kt,et=s(),ne=l("p"),ne.innerHTML=eo,tt=s(),h(se.$$.fragment),ot=s(),h(V.$$.fragment),nt=s(),re=l("p"),re.textContent=to,st=s(),ae=l("ul"),ae.innerHTML=oo,rt=s(),h(ie.$$.fragment),at=s(),de=l("p"),de.textContent=no,it=s(),h(le.$$.fragment),dt=s(),ce=l("p"),ce.textContent=so,lt=s(),h(me.$$.fragment),ct=s(),pe=l("ul"),pe.innerHTML=ro,mt=s(),h(he.$$.fragment),pt=s(),z=l("div"),h(ue.$$.fragment),$t=s(),Fe=l("p"),Fe.innerHTML=ao,Pt=s(),Je=l("p"),Je.innerHTML=io,Mt=s(),h(X.$$.fragment),ht=s(),h(fe.$$.fragment),ut=s(),C=l("div"),h(ge.$$.fragment),Ct=s(),Le=l("p"),Le.innerHTML=lo,xt=s(),Ie=l("p"),Ie.innerHTML=co,zt=s(),qe=l("p"),qe.innerHTML=mo,Ft=s(),Z=l("div"),h(_e.$$.fragment),Jt=s(),We=l("p"),We.innerHTML=po,Lt=s(),h(O.$$.fragment),ft=s(),h(be.$$.fragment),gt=s(),S=l("div"),h(Te.$$.fragment),It=s(),J=l("div"),h(ye.$$.fragment),qt=s(),Ze=l("p"),Ze.innerHTML=ho,Wt=s(),h(Y.$$.fragment),Zt=s(),h(A.$$.fragment),_t=s(),h(ve.$$.fragment),bt=s(),w=l("div"),h(ke.$$.fragment),Gt=s(),Ge=l("p"),Ge.textContent=uo,Ht=s(),He=l("p"),He.innerHTML=fo,Ut=s(),Ue=l("p"),Ue.innerHTML=go,St=s(),Se=l("p"),Se.innerHTML=_o,Nt=s(),Ne=l("p"),Ne.innerHTML=bo,jt=s(),G=l("div"),h(we.$$.fragment),Bt=s(),je=l("p"),je.innerHTML=To,Rt=s(),h(D.$$.fragment),Tt=s(),h($e.$$.fragment),yt=s(),x=l("div"),h(Pe.$$.fragment),Vt=s(),Be=l("p"),Be.textContent=yo,Xt=s(),Re=l("p"),Re.innerHTML=vo,Ot=s(),Ve=l("p"),Ve.innerHTML=ko,Yt=s(),H=l("div"),h(Me.$$.fragment),At=s(),Xe=l("p"),Xe.innerHTML=wo,Dt=s(),h(E.$$.fragment),vt=s(),h(Ce.$$.fragment),kt=s(),Ye=l("p"),this.h()},l(e){const t=zo("svelte-u9bgzb",document.head);n=c(t,"META",{name:!0,content:!0}),t.forEach(o),T=r(e),i=c(e,"P",{}),q(i).forEach(o),p=r(e),u(M.$$.fragment,e),y=r(e),u(k.$$.fragment,e),K=r(e),v=c(e,"P",{"data-svelte-h":!0}),m(v)!=="svelte-1dqqllh"&&(v.innerHTML=R),Ee=r(e),ee=c(e,"P",{"data-svelte-h":!0}),m(ee)!=="svelte-tohaaf"&&(ee.textContent=Et),Qe=r(e),te=c(e,"P",{"data-svelte-h":!0}),m(te)!=="svelte-gxqz2j"&&(te.textContent=Qt),Ke=r(e),oe=c(e,"P",{"data-svelte-h":!0}),m(oe)!=="svelte-l2kkzt"&&(oe.textContent=Kt),et=r(e),ne=c(e,"P",{"data-svelte-h":!0}),m(ne)!=="svelte-1kv44aj"&&(ne.innerHTML=eo),tt=r(e),u(se.$$.fragment,e),ot=r(e),u(V.$$.fragment,e),nt=r(e),re=c(e,"P",{"data-svelte-h":!0}),m(re)!=="svelte-axv494"&&(re.textContent=to),st=r(e),ae=c(e,"UL",{"data-svelte-h":!0}),m(ae)!=="svelte-g9ue9k"&&(ae.innerHTML=oo),rt=r(e),u(ie.$$.fragment,e),at=r(e),de=c(e,"P",{"data-svelte-h":!0}),m(de)!=="svelte-1cs7acv"&&(de.textContent=no),it=r(e),u(le.$$.fragment,e),dt=r(e),ce=c(e,"P",{"data-svelte-h":!0}),m(ce)!=="svelte-nia5es"&&(ce.textContent=so),lt=r(e),u(me.$$.fragment,e),ct=r(e),pe=c(e,"UL",{"data-svelte-h":!0}),m(pe)!=="svelte-yk84b4"&&(pe.innerHTML=ro),mt=r(e),u(he.$$.fragment,e),pt=r(e),z=c(e,"DIV",{class:!0});var L=q(z);u(ue.$$.fragment,L),$t=r(L),Fe=c(L,"P",{"data-svelte-h":!0}),m(Fe)!=="svelte-z4vzk6"&&(Fe.innerHTML=ao),Pt=r(L),Je=c(L,"P",{"data-svelte-h":!0}),m(Je)!=="svelte-1jogkw7"&&(Je.innerHTML=io),Mt=r(L),u(X.$$.fragment,L),L.forEach(o),ht=r(e),u(fe.$$.fragment,e),ut=r(e),C=c(e,"DIV",{class:!0});var F=q(C);u(ge.$$.fragment,F),Ct=r(F),Le=c(F,"P",{"data-svelte-h":!0}),m(Le)!=="svelte-1ulrbyq"&&(Le.innerHTML=lo),xt=r(F),Ie=c(F,"P",{"data-svelte-h":!0}),m(Ie)!=="svelte-hswkmf"&&(Ie.innerHTML=co),zt=r(F),qe=c(F,"P",{"data-svelte-h":!0}),m(qe)!=="svelte-3gfl0d"&&(qe.innerHTML=mo),Ft=r(F),Z=c(F,"DIV",{class:!0});var N=q(Z);u(_e.$$.fragment,N),Jt=r(N),We=c(N,"P",{"data-svelte-h":!0}),m(We)!=="svelte-10boeub"&&(We.innerHTML=po),Lt=r(N),u(O.$$.fragment,N),N.forEach(o),F.forEach(o),ft=r(e),u(be.$$.fragment,e),gt=r(e),S=c(e,"DIV",{class:!0});var xe=q(S);u(Te.$$.fragment,xe),It=r(xe),J=c(xe,"DIV",{class:!0});var I=q(J);u(ye.$$.fragment,I),qt=r(I),Ze=c(I,"P",{"data-svelte-h":!0}),m(Ze)!=="svelte-czxefz"&&(Ze.innerHTML=ho),Wt=r(I),u(Y.$$.fragment,I),Zt=r(I),u(A.$$.fragment,I),I.forEach(o),xe.forEach(o),_t=r(e),u(ve.$$.fragment,e),bt=r(e),w=c(e,"DIV",{class:!0});var $=q(w);u(ke.$$.fragment,$),Gt=r($),Ge=c($,"P",{"data-svelte-h":!0}),m(Ge)!=="svelte-1oalnz1"&&(Ge.textContent=uo),Ht=r($),He=c($,"P",{"data-svelte-h":!0}),m(He)!=="svelte-541y9k"&&(He.innerHTML=fo),Ut=r($),Ue=c($,"P",{"data-svelte-h":!0}),m(Ue)!=="svelte-10ugs3m"&&(Ue.innerHTML=go),St=r($),Se=c($,"P",{"data-svelte-h":!0}),m(Se)!=="svelte-1bqdtqu"&&(Se.innerHTML=_o),Nt=r($),Ne=c($,"P",{"data-svelte-h":!0}),m(Ne)!=="svelte-hswkmf"&&(Ne.innerHTML=bo),jt=r($),G=c($,"DIV",{class:!0});var j=q(G);u(we.$$.fragment,j),Bt=r(j),je=c(j,"P",{"data-svelte-h":!0}),m(je)!=="svelte-1lqgyf1"&&(je.innerHTML=To),Rt=r(j),u(D.$$.fragment,j),j.forEach(o),$.forEach(o),Tt=r(e),u($e.$$.fragment,e),yt=r(e),x=c(e,"DIV",{class:!0});var U=q(x);u(Pe.$$.fragment,U),Vt=r(U),Be=c(U,"P",{"data-svelte-h":!0}),m(Be)!=="svelte-fb5bx3"&&(Be.textContent=yo),Xt=r(U),Re=c(U,"P",{"data-svelte-h":!0}),m(Re)!=="svelte-1bqdtqu"&&(Re.innerHTML=vo),Ot=r(U),Ve=c(U,"P",{"data-svelte-h":!0}),m(Ve)!=="svelte-hswkmf"&&(Ve.innerHTML=ko),Yt=r(U),H=c(U,"DIV",{class:!0});var Oe=q(H);u(Me.$$.fragment,Oe),At=r(Oe),Xe=c(Oe,"P",{"data-svelte-h":!0}),m(Xe)!=="svelte-1vvjzsx"&&(Xe.innerHTML=wo),Dt=r(Oe),u(E.$$.fragment,Oe),Oe.forEach(o),U.forEach(o),vt=r(e),u(Ce.$$.fragment,e),kt=r(e),Ye=c(e,"P",{}),q(Ye).forEach(o),this.h()},h(){W(n,"name","hf:doc:metadata"),W(n,"content",Uo),W(z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),W(Z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),W(C,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),W(J,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),W(S,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),W(G,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),W(w,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),W(H,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),W(x,"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,t){d(document.head,n),a(e,T,t),a(e,i,t),a(e,p,t),f(M,e,t),a(e,y,t),f(k,e,t),a(e,K,t),a(e,v,t),a(e,Ee,t),a(e,ee,t),a(e,Qe,t),a(e,te,t),a(e,Ke,t),a(e,oe,t),a(e,et,t),a(e,ne,t),a(e,tt,t),f(se,e,t),a(e,ot,t),f(V,e,t),a(e,nt,t),a(e,re,t),a(e,st,t),a(e,ae,t),a(e,rt,t),f(ie,e,t),a(e,at,t),a(e,de,t),a(e,it,t),f(le,e,t),a(e,dt,t),a(e,ce,t),a(e,lt,t),f(me,e,t),a(e,ct,t),a(e,pe,t),a(e,mt,t),f(he,e,t),a(e,pt,t),a(e,z,t),f(ue,z,null),d(z,$t),d(z,Fe),d(z,Pt),d(z,Je),d(z,Mt),f(X,z,null),a(e,ht,t),f(fe,e,t),a(e,ut,t),a(e,C,t),f(ge,C,null),d(C,Ct),d(C,Le),d(C,xt),d(C,Ie),d(C,zt),d(C,qe),d(C,Ft),d(C,Z),f(_e,Z,null),d(Z,Jt),d(Z,We),d(Z,Lt),f(O,Z,null),a(e,ft,t),f(be,e,t),a(e,gt,t),a(e,S,t),f(Te,S,null),d(S,It),d(S,J),f(ye,J,null),d(J,qt),d(J,Ze),d(J,Wt),f(Y,J,null),d(J,Zt),f(A,J,null),a(e,_t,t),f(ve,e,t),a(e,bt,t),a(e,w,t),f(ke,w,null),d(w,Gt),d(w,Ge),d(w,Ht),d(w,He),d(w,Ut),d(w,Ue),d(w,St),d(w,Se),d(w,Nt),d(w,Ne),d(w,jt),d(w,G),f(we,G,null),d(G,Bt),d(G,je),d(G,Rt),f(D,G,null),a(e,Tt,t),f($e,e,t),a(e,yt,t),a(e,x,t),f(Pe,x,null),d(x,Vt),d(x,Be),d(x,Xt),d(x,Re),d(x,Ot),d(x,Ve),d(x,Yt),d(x,H),f(Me,H,null),d(H,At),d(H,Xe),d(H,Dt),f(E,H,null),a(e,vt,t),f(Ce,e,t),a(e,kt,t),a(e,Ye,t),wt=!0},p(e,[t]){const L={};t&2&&(L.$$scope={dirty:t,ctx:e}),V.$set(L);const F={};t&2&&(F.$$scope={dirty:t,ctx:e}),X.$set(F);const N={};t&2&&(N.$$scope={dirty:t,ctx:e}),O.$set(N);const xe={};t&2&&(xe.$$scope={dirty:t,ctx:e}),Y.$set(xe);const I={};t&2&&(I.$$scope={dirty:t,ctx:e}),A.$set(I);const $={};t&2&&($.$$scope={dirty:t,ctx:e}),D.$set($);const j={};t&2&&(j.$$scope={dirty:t,ctx:e}),E.$set(j)},i(e){wt||(g(M.$$.fragment,e),g(k.$$.fragment,e),g(se.$$.fragment,e),g(V.$$.fragment,e),g(ie.$$.fragment,e),g(le.$$.fragment,e),g(me.$$.fragment,e),g(he.$$.fragment,e),g(ue.$$.fragment,e),g(X.$$.fragment,e),g(fe.$$.fragment,e),g(ge.$$.fragment,e),g(_e.$$.fragment,e),g(O.$$.fragment,e),g(be.$$.fragment,e),g(Te.$$.fragment,e),g(ye.$$.fragment,e),g(Y.$$.fragment,e),g(A.$$.fragment,e),g(ve.$$.fragment,e),g(ke.$$.fragment,e),g(we.$$.fragment,e),g(D.$$.fragment,e),g($e.$$.fragment,e),g(Pe.$$.fragment,e),g(Me.$$.fragment,e),g(E.$$.fragment,e),g(Ce.$$.fragment,e),wt=!0)},o(e){_(M.$$.fragment,e),_(k.$$.fragment,e),_(se.$$.fragment,e),_(V.$$.fragment,e),_(ie.$$.fragment,e),_(le.$$.fragment,e),_(me.$$.fragment,e),_(he.$$.fragment,e),_(ue.$$.fragment,e),_(X.$$.fragment,e),_(fe.$$.fragment,e),_(ge.$$.fragment,e),_(_e.$$.fragment,e),_(O.$$.fragment,e),_(be.$$.fragment,e),_(Te.$$.fragment,e),_(ye.$$.fragment,e),_(Y.$$.fragment,e),_(A.$$.fragment,e),_(ve.$$.fragment,e),_(ke.$$.fragment,e),_(we.$$.fragment,e),_(D.$$.fragment,e),_($e.$$.fragment,e),_(Pe.$$.fragment,e),_(Me.$$.fragment,e),_(E.$$.fragment,e),_(Ce.$$.fragment,e),wt=!1},d(e){e&&(o(T),o(i),o(p),o(y),o(K),o(v),o(Ee),o(ee),o(Qe),o(te),o(Ke),o(oe),o(et),o(ne),o(tt),o(ot),o(nt),o(re),o(st),o(ae),o(rt),o(at),o(de),o(it),o(dt),o(ce),o(lt),o(ct),o(pe),o(mt),o(pt),o(z),o(ht),o(ut),o(C),o(ft),o(gt),o(S),o(_t),o(bt),o(w),o(Tt),o(yt),o(x),o(vt),o(kt),o(Ye)),o(n),b(M,e),b(k,e),b(se,e),b(V,e),b(ie,e),b(le,e),b(me,e),b(he,e),b(ue),b(X),b(fe,e),b(ge),b(_e),b(O),b(be,e),b(Te),b(ye),b(Y),b(A),b(ve,e),b(ke),b(we),b(D),b($e,e),b(Pe),b(Me),b(E),b(Ce,e)}}}const Uo='{"title":"Persimmon","local":"persimmon","sections":[{"title":"Overview","local":"overview","sections":[],"depth":2},{"title":"Usage tips","local":"usage-tips","sections":[],"depth":2},{"title":"PersimmonConfig","local":"transformers.PersimmonConfig","sections":[],"depth":2},{"title":"PersimmonModel","local":"transformers.PersimmonModel","sections":[],"depth":2},{"title":"PersimmonForCausalLM","local":"transformers.PersimmonForCausalLM","sections":[],"depth":2},{"title":"PersimmonForSequenceClassification","local":"transformers.PersimmonForSequenceClassification","sections":[],"depth":2},{"title":"PersimmonForTokenClassification","local":"transformers.PersimmonForTokenClassification","sections":[],"depth":2}],"depth":1}';function So(P){return Mo(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Yo extends Co{constructor(n){super(),xo(this,n,So,Ho,Po,{})}}export{Yo as component};
