import{S as Al,i as Sl,s as Pl,e as r,k as m,w as v,t as s,M as Bl,c as l,d as t,m as f,a as i,x as w,h as a,b as p,G as e,g as b,y as T,q as k,o as F,B as M,v as Vl,L as tt}from"../../chunks/vendor-hf-doc-builder.js";import{T as et}from"../../chunks/Tip-hf-doc-builder.js";import{D as A}from"../../chunks/Docstring-hf-doc-builder.js";import{C as nt}from"../../chunks/CodeBlock-hf-doc-builder.js";import{I as me}from"../../chunks/IconCopyLink-hf-doc-builder.js";import{E as ot}from"../../chunks/ExampleCodeBlock-hf-doc-builder.js";function Ql($){let c,y,u,h,_;return{c(){c=r("p"),y=s(`Falcon models were initially added to the Hugging Face Hub as custom code checkpoints. However, Falcon is now fully
supported in the Transformers library. If you fine-tuned a model from a custom code checkpoint, we recommend converting
your checkpoint to the new in-library format, as this should give significant improvements to stability and
performance, especially for generation, as well as removing the need to use `),u=r("code"),h=s("trust_remote_code=True"),_=s("!")},l(n){c=l(n,"P",{});var d=i(c);y=a(d,`Falcon models were initially added to the Hugging Face Hub as custom code checkpoints. However, Falcon is now fully
supported in the Transformers library. If you fine-tuned a model from a custom code checkpoint, we recommend converting
your checkpoint to the new in-library format, as this should give significant improvements to stability and
performance, especially for generation, as well as removing the need to use `),u=l(d,"CODE",{});var C=i(u);h=a(C,"trust_remote_code=True"),C.forEach(t),_=a(d,"!"),d.forEach(t)},m(n,d){b(n,c,d),e(c,y),e(c,u),e(u,h),e(c,_)},d(n){n&&t(c)}}}function Xl($){let c,y,u,h,_;return h=new nt({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEZhbGNvbk1vZGVsJTJDJTIwRmFsY29uQ29uZmlnJTBBJTBBJTIzJTIwSW5pdGlhbGl6aW5nJTIwYSUyMHNtYWxsJTIwKDItbGF5ZXIpJTIwRmFsY29uJTIwY29uZmlndXJhdGlvbiUwQWNvbmZpZ3VyYXRpb24lMjAlM0QlMjBGYWxjb25Db25maWcobnVtX2hpZGRlbl9sYXllcnMlM0QyKSUwQSUwQSUyMyUyMEluaXRpYWxpemluZyUyMGElMjBtb2RlbCUyMGZyb20lMjB0aGUlMjBzbWFsbCUyMGNvbmZpZ3VyYXRpb24lMEFtb2RlbCUyMCUzRCUyMEZhbGNvbk1vZGVsKGNvbmZpZ3VyYXRpb24pJTBBJTBBJTIzJTIwQWNjZXNzaW5nJTIwdGhlJTIwbW9kZWwlMjBjb25maWd1cmF0aW9uJTBBY29uZmlndXJhdGlvbiUyMCUzRCUyMG1vZGVsLmNvbmZpZw==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt;</span> <span class="language-python"><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> FalconModel, FalconConfig</span>

<span class="hljs-meta">&gt;&gt;&gt;</span> <span class="language-python"><span class="hljs-comment"># Initializing a small (2-layer) Falcon configuration</span></span>
<span class="hljs-meta">&gt;&gt;&gt;</span> <span class="language-python">configuration = FalconConfig(num_hidden_layers=<span class="hljs-number">2</span>)</span>

<span class="hljs-meta">&gt;&gt;&gt;</span> <span class="language-python"><span class="hljs-comment"># Initializing a model from the small configuration</span></span>
<span class="hljs-meta">&gt;&gt;&gt;</span> <span class="language-python">model = FalconModel(configuration)</span>

<span class="hljs-meta">&gt;&gt;&gt;</span> <span class="language-python"><span class="hljs-comment"># Accessing the model configuration</span></span>
<span class="hljs-meta">&gt;&gt;&gt;</span> <span class="language-python">configuration = model.config</span>`}}),{c(){c=r("p"),y=s("Example:"),u=m(),v(h.$$.fragment)},l(n){c=l(n,"P",{});var d=i(c);y=a(d,"Example:"),d.forEach(t),u=f(n),w(h.$$.fragment,n)},m(n,d){b(n,c,d),e(c,y),b(n,u,d),T(h,n,d),_=!0},p:tt,i(n){_||(k(h.$$.fragment,n),_=!0)},o(n){F(h.$$.fragment,n),_=!1},d(n){n&&t(c),n&&t(u),M(h,n)}}}function Yl($){let c,y,u,h,_;return{c(){c=r("p"),y=s("Although the recipe for forward pass needs to be defined within this function, one should call the "),u=r("code"),h=s("Module"),_=s(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(n){c=l(n,"P",{});var d=i(c);y=a(d,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=l(d,"CODE",{});var C=i(u);h=a(C,"Module"),C.forEach(t),_=a(d,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),d.forEach(t)},m(n,d){b(n,c,d),e(c,y),e(c,u),e(u,h),e(c,_)},d(n){n&&t(c)}}}function Ll($){let c,y,u,h,_;return h=new nt({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBGYWxjb25Nb2RlbCUwQWltcG9ydCUyMHRvcmNoJTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIyUm9ja2V0a25pZ2h0MSUyRmZhbGNvbi1ydy0xYiUyMiklMEFtb2RlbCUyMCUzRCUyMEZhbGNvbk1vZGVsLmZyb21fcHJldHJhaW5lZCglMjJSb2NrZXRrbmlnaHQxJTJGZmFsY29uLXJ3LTFiJTIyKSUwQSUwQWlucHV0cyUyMCUzRCUyMHRva2VuaXplciglMjJIZWxsbyUyQyUyMG15JTIwZG9nJTIwaXMlMjBjdXRlJTIyJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMiklMEFvdXRwdXRzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMpJTBBJTBBbGFzdF9oaWRkZW5fc3RhdGVzJTIwJTNEJTIwb3V0cHV0cy5sYXN0X2hpZGRlbl9zdGF0ZQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, FalconModel
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;Rocketknight1/falcon-rw-1b&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = FalconModel.from_pretrained(<span class="hljs-string">&quot;Rocketknight1/falcon-rw-1b&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(<span class="hljs-string">&quot;Hello, my dog is cute&quot;</span>, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs)

<span class="hljs-meta">&gt;&gt;&gt; </span>last_hidden_states = outputs.last_hidden_state`}}),{c(){c=r("p"),y=s("Example:"),u=m(),v(h.$$.fragment)},l(n){c=l(n,"P",{});var d=i(c);y=a(d,"Example:"),d.forEach(t),u=f(n),w(h.$$.fragment,n)},m(n,d){b(n,c,d),e(c,y),b(n,u,d),T(h,n,d),_=!0},p:tt,i(n){_||(k(h.$$.fragment,n),_=!0)},o(n){F(h.$$.fragment,n),_=!1},d(n){n&&t(c),n&&t(u),M(h,n)}}}function Hl($){let c,y,u,h,_;return{c(){c=r("p"),y=s("Although the recipe for forward pass needs to be defined within this function, one should call the "),u=r("code"),h=s("Module"),_=s(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(n){c=l(n,"P",{});var d=i(c);y=a(d,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=l(d,"CODE",{});var C=i(u);h=a(C,"Module"),C.forEach(t),_=a(d,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),d.forEach(t)},m(n,d){b(n,c,d),e(c,y),e(c,u),e(u,h),e(c,_)},d(n){n&&t(c)}}}function Ol($){let c,y,u,h,_;return h=new nt({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwQXV0b1Rva2VuaXplciUyQyUyMEZhbGNvbkZvckNhdXNhbExNJTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIyUm9ja2V0a25pZ2h0MSUyRmZhbGNvbi1ydy0xYiUyMiklMEFtb2RlbCUyMCUzRCUyMEZhbGNvbkZvckNhdXNhbExNLmZyb21fcHJldHJhaW5lZCglMjJSb2NrZXRrbmlnaHQxJTJGZmFsY29uLXJ3LTFiJTIyKSUwQSUwQWlucHV0cyUyMCUzRCUyMHRva2VuaXplciglMjJIZWxsbyUyQyUyMG15JTIwZG9nJTIwaXMlMjBjdXRlJTIyJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMiklMEFvdXRwdXRzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMlMkMlMjBsYWJlbHMlM0RpbnB1dHMlNUIlMjJpbnB1dF9pZHMlMjIlNUQpJTBBbG9zcyUyMCUzRCUyMG91dHB1dHMubG9zcyUwQWxvZ2l0cyUyMCUzRCUyMG91dHB1dHMubG9naXRz",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, FalconForCausalLM

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;Rocketknight1/falcon-rw-1b&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = FalconForCausalLM.from_pretrained(<span class="hljs-string">&quot;Rocketknight1/falcon-rw-1b&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(<span class="hljs-string">&quot;Hello, my dog is cute&quot;</span>, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs, labels=inputs[<span class="hljs-string">&quot;input_ids&quot;</span>])
<span class="hljs-meta">&gt;&gt;&gt; </span>loss = outputs.loss
<span class="hljs-meta">&gt;&gt;&gt; </span>logits = outputs.logits`}}),{c(){c=r("p"),y=s("Example:"),u=m(),v(h.$$.fragment)},l(n){c=l(n,"P",{});var d=i(c);y=a(d,"Example:"),d.forEach(t),u=f(n),w(h.$$.fragment,n)},m(n,d){b(n,c,d),e(c,y),b(n,u,d),T(h,n,d),_=!0},p:tt,i(n){_||(k(h.$$.fragment,n),_=!0)},o(n){F(h.$$.fragment,n),_=!1},d(n){n&&t(c),n&&t(u),M(h,n)}}}function Dl($){let c,y,u,h,_;return{c(){c=r("p"),y=s("Although the recipe for forward pass needs to be defined within this function, one should call the "),u=r("code"),h=s("Module"),_=s(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(n){c=l(n,"P",{});var d=i(c);y=a(d,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=l(d,"CODE",{});var C=i(u);h=a(C,"Module"),C.forEach(t),_=a(d,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),d.forEach(t)},m(n,d){b(n,c,d),e(c,y),e(c,u),e(u,h),e(c,_)},d(n){n&&t(c)}}}function Kl($){let c,y,u,h,_;return h=new nt({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwQXV0b1Rva2VuaXplciUyQyUyMEZhbGNvbkZvclNlcXVlbmNlQ2xhc3NpZmljYXRpb24lMEElMEF0b2tlbml6ZXIlMjAlM0QlMjBBdXRvVG9rZW5pemVyLmZyb21fcHJldHJhaW5lZCglMjJSb2NrZXRrbmlnaHQxJTJGZmFsY29uLXJ3LTFiJTIyKSUwQW1vZGVsJTIwJTNEJTIwRmFsY29uRm9yU2VxdWVuY2VDbGFzc2lmaWNhdGlvbi5mcm9tX3ByZXRyYWluZWQoJTIyUm9ja2V0a25pZ2h0MSUyRmZhbGNvbi1ydy0xYiUyMiklMEElMEFpbnB1dHMlMjAlM0QlMjB0b2tlbml6ZXIoJTIySGVsbG8lMkMlMjBteSUyMGRvZyUyMGlzJTIwY3V0ZSUyMiUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIycHQlMjIpJTBBJTBBd2l0aCUyMHRvcmNoLm5vX2dyYWQoKSUzQSUwQSUyMCUyMCUyMCUyMGxvZ2l0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzKS5sb2dpdHMlMEElMEFwcmVkaWN0ZWRfY2xhc3NfaWQlMjAlM0QlMjBsb2dpdHMuYXJnbWF4KCkuaXRlbSgpJTBBJTBBJTIzJTIwVG8lMjB0cmFpbiUyMGElMjBtb2RlbCUyMG9uJTIwJTYwbnVtX2xhYmVscyU2MCUyMGNsYXNzZXMlMkMlMjB5b3UlMjBjYW4lMjBwYXNzJTIwJTYwbnVtX2xhYmVscyUzRG51bV9sYWJlbHMlNjAlMjB0byUyMCU2MC5mcm9tX3ByZXRyYWluZWQoLi4uKSU2MCUwQW51bV9sYWJlbHMlMjAlM0QlMjBsZW4obW9kZWwuY29uZmlnLmlkMmxhYmVsKSUwQW1vZGVsJTIwJTNEJTIwRmFsY29uRm9yU2VxdWVuY2VDbGFzc2lmaWNhdGlvbi5mcm9tX3ByZXRyYWluZWQoJTIyUm9ja2V0a25pZ2h0MSUyRmZhbGNvbi1ydy0xYiUyMiUyQyUyMG51bV9sYWJlbHMlM0RudW1fbGFiZWxzKSUwQSUwQWxhYmVscyUyMCUzRCUyMHRvcmNoLnRlbnNvciglNUIxJTVEKSUwQWxvc3MlMjAlM0QlMjBtb2RlbCgqKmlucHV0cyUyQyUyMGxhYmVscyUzRGxhYmVscykubG9zcw==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, FalconForSequenceClassification

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;Rocketknight1/falcon-rw-1b&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = FalconForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;Rocketknight1/falcon-rw-1b&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(<span class="hljs-string">&quot;Hello, my dog is cute&quot;</span>, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">with</span> torch.no_grad():
<span class="hljs-meta">... </span>    logits = model(**inputs).logits

<span class="hljs-meta">&gt;&gt;&gt; </span>predicted_class_id = logits.argmax().item()

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># To train a model on \`num_labels\` classes, you can pass \`num_labels=num_labels\` to \`.from_pretrained(...)\`</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>num_labels = <span class="hljs-built_in">len</span>(model.config.id2label)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = FalconForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;Rocketknight1/falcon-rw-1b&quot;</span>, num_labels=num_labels)

<span class="hljs-meta">&gt;&gt;&gt; </span>labels = torch.tensor([<span class="hljs-number">1</span>])
<span class="hljs-meta">&gt;&gt;&gt; </span>loss = model(**inputs, labels=labels).loss`}}),{c(){c=r("p"),y=s("Example of single-label classification:"),u=m(),v(h.$$.fragment)},l(n){c=l(n,"P",{});var d=i(c);y=a(d,"Example of single-label classification:"),d.forEach(t),u=f(n),w(h.$$.fragment,n)},m(n,d){b(n,c,d),e(c,y),b(n,u,d),T(h,n,d),_=!0},p:tt,i(n){_||(k(h.$$.fragment,n),_=!0)},o(n){F(h.$$.fragment,n),_=!1},d(n){n&&t(c),n&&t(u),M(h,n)}}}function ei($){let c,y,u,h,_;return h=new nt({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwQXV0b1Rva2VuaXplciUyQyUyMEZhbGNvbkZvclNlcXVlbmNlQ2xhc3NpZmljYXRpb24lMEElMEF0b2tlbml6ZXIlMjAlM0QlMjBBdXRvVG9rZW5pemVyLmZyb21fcHJldHJhaW5lZCglMjJSb2NrZXRrbmlnaHQxJTJGZmFsY29uLXJ3LTFiJTIyKSUwQW1vZGVsJTIwJTNEJTIwRmFsY29uRm9yU2VxdWVuY2VDbGFzc2lmaWNhdGlvbi5mcm9tX3ByZXRyYWluZWQoJTIyUm9ja2V0a25pZ2h0MSUyRmZhbGNvbi1ydy0xYiUyMiUyQyUyMHByb2JsZW1fdHlwZSUzRCUyMm11bHRpX2xhYmVsX2NsYXNzaWZpY2F0aW9uJTIyKSUwQSUwQWlucHV0cyUyMCUzRCUyMHRva2VuaXplciglMjJIZWxsbyUyQyUyMG15JTIwZG9nJTIwaXMlMjBjdXRlJTIyJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMiklMEElMEF3aXRoJTIwdG9yY2gubm9fZ3JhZCgpJTNBJTBBJTIwJTIwJTIwJTIwbG9naXRzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMpLmxvZ2l0cyUwQSUwQXByZWRpY3RlZF9jbGFzc19pZHMlMjAlM0QlMjB0b3JjaC5hcmFuZ2UoMCUyQyUyMGxvZ2l0cy5zaGFwZSU1Qi0xJTVEKSU1QnRvcmNoLnNpZ21vaWQobG9naXRzKS5zcXVlZXplKGRpbSUzRDApJTIwJTNFJTIwMC41JTVEJTBBJTBBJTIzJTIwVG8lMjB0cmFpbiUyMGElMjBtb2RlbCUyMG9uJTIwJTYwbnVtX2xhYmVscyU2MCUyMGNsYXNzZXMlMkMlMjB5b3UlMjBjYW4lMjBwYXNzJTIwJTYwbnVtX2xhYmVscyUzRG51bV9sYWJlbHMlNjAlMjB0byUyMCU2MC5mcm9tX3ByZXRyYWluZWQoLi4uKSU2MCUwQW51bV9sYWJlbHMlMjAlM0QlMjBsZW4obW9kZWwuY29uZmlnLmlkMmxhYmVsKSUwQW1vZGVsJTIwJTNEJTIwRmFsY29uRm9yU2VxdWVuY2VDbGFzc2lmaWNhdGlvbi5mcm9tX3ByZXRyYWluZWQoJTBBJTIwJTIwJTIwJTIwJTIyUm9ja2V0a25pZ2h0MSUyRmZhbGNvbi1ydy0xYiUyMiUyQyUyMG51bV9sYWJlbHMlM0RudW1fbGFiZWxzJTJDJTIwcHJvYmxlbV90eXBlJTNEJTIybXVsdGlfbGFiZWxfY2xhc3NpZmljYXRpb24lMjIlMEEpJTBBJTBBbGFiZWxzJTIwJTNEJTIwdG9yY2guc3VtKCUwQSUyMCUyMCUyMCUyMHRvcmNoLm5uLmZ1bmN0aW9uYWwub25lX2hvdChwcmVkaWN0ZWRfY2xhc3NfaWRzJTVCTm9uZSUyQyUyMCUzQSU1RC5jbG9uZSgpJTJDJTIwbnVtX2NsYXNzZXMlM0RudW1fbGFiZWxzKSUyQyUyMGRpbSUzRDElMEEpLnRvKHRvcmNoLmZsb2F0KSUwQWxvc3MlMjAlM0QlMjBtb2RlbCgqKmlucHV0cyUyQyUyMGxhYmVscyUzRGxhYmVscykubG9zcw==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, FalconForSequenceClassification

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;Rocketknight1/falcon-rw-1b&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = FalconForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;Rocketknight1/falcon-rw-1b&quot;</span>, problem_type=<span class="hljs-string">&quot;multi_label_classification&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(<span class="hljs-string">&quot;Hello, my dog is cute&quot;</span>, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">with</span> torch.no_grad():
<span class="hljs-meta">... </span>    logits = model(**inputs).logits

<span class="hljs-meta">&gt;&gt;&gt; </span>predicted_class_ids = torch.arange(<span class="hljs-number">0</span>, logits.shape[-<span class="hljs-number">1</span>])[torch.sigmoid(logits).squeeze(dim=<span class="hljs-number">0</span>) &gt; <span class="hljs-number">0.5</span>]

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># To train a model on \`num_labels\` classes, you can pass \`num_labels=num_labels\` to \`.from_pretrained(...)\`</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>num_labels = <span class="hljs-built_in">len</span>(model.config.id2label)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = FalconForSequenceClassification.from_pretrained(
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;Rocketknight1/falcon-rw-1b&quot;</span>, num_labels=num_labels, problem_type=<span class="hljs-string">&quot;multi_label_classification&quot;</span>
<span class="hljs-meta">... </span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>labels = torch.<span class="hljs-built_in">sum</span>(
<span class="hljs-meta">... </span>    torch.nn.functional.one_hot(predicted_class_ids[<span class="hljs-literal">None</span>, :].clone(), num_classes=num_labels), dim=<span class="hljs-number">1</span>
<span class="hljs-meta">... </span>).to(torch.<span class="hljs-built_in">float</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>loss = model(**inputs, labels=labels).loss`}}),{c(){c=r("p"),y=s("Example of multi-label classification:"),u=m(),v(h.$$.fragment)},l(n){c=l(n,"P",{});var d=i(c);y=a(d,"Example of multi-label classification:"),d.forEach(t),u=f(n),w(h.$$.fragment,n)},m(n,d){b(n,c,d),e(c,y),b(n,u,d),T(h,n,d),_=!0},p:tt,i(n){_||(k(h.$$.fragment,n),_=!0)},o(n){F(h.$$.fragment,n),_=!1},d(n){n&&t(c),n&&t(u),M(h,n)}}}function oi($){let c,y,u,h,_;return{c(){c=r("p"),y=s("Although the recipe for forward pass needs to be defined within this function, one should call the "),u=r("code"),h=s("Module"),_=s(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(n){c=l(n,"P",{});var d=i(c);y=a(d,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=l(d,"CODE",{});var C=i(u);h=a(C,"Module"),C.forEach(t),_=a(d,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),d.forEach(t)},m(n,d){b(n,c,d),e(c,y),e(c,u),e(u,h),e(c,_)},d(n){n&&t(c)}}}function ti($){let c,y,u,h,_;return h=new nt({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBGYWxjb25Gb3JUb2tlbkNsYXNzaWZpY2F0aW9uJTBBaW1wb3J0JTIwdG9yY2glMEElMEF0b2tlbml6ZXIlMjAlM0QlMjBBdXRvVG9rZW5pemVyLmZyb21fcHJldHJhaW5lZCglMjJSb2NrZXRrbmlnaHQxJTJGZmFsY29uLXJ3LTFiJTIyKSUwQW1vZGVsJTIwJTNEJTIwRmFsY29uRm9yVG9rZW5DbGFzc2lmaWNhdGlvbi5mcm9tX3ByZXRyYWluZWQoJTIyUm9ja2V0a25pZ2h0MSUyRmZhbGNvbi1ydy0xYiUyMiklMEElMEFpbnB1dHMlMjAlM0QlMjB0b2tlbml6ZXIoJTBBJTIwJTIwJTIwJTIwJTIySHVnZ2luZ0ZhY2UlMjBpcyUyMGElMjBjb21wYW55JTIwYmFzZWQlMjBpbiUyMFBhcmlzJTIwYW5kJTIwTmV3JTIwWW9yayUyMiUyQyUyMGFkZF9zcGVjaWFsX3Rva2VucyUzREZhbHNlJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMiUwQSklMEElMEF3aXRoJTIwdG9yY2gubm9fZ3JhZCgpJTNBJTBBJTIwJTIwJTIwJTIwbG9naXRzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMpLmxvZ2l0cyUwQSUwQXByZWRpY3RlZF90b2tlbl9jbGFzc19pZHMlMjAlM0QlMjBsb2dpdHMuYXJnbWF4KC0xKSUwQSUwQSUyMyUyME5vdGUlMjB0aGF0JTIwdG9rZW5zJTIwYXJlJTIwY2xhc3NpZmllZCUyMHJhdGhlciUyMHRoZW4lMjBpbnB1dCUyMHdvcmRzJTIwd2hpY2glMjBtZWFucyUyMHRoYXQlMEElMjMlMjB0aGVyZSUyMG1pZ2h0JTIwYmUlMjBtb3JlJTIwcHJlZGljdGVkJTIwdG9rZW4lMjBjbGFzc2VzJTIwdGhhbiUyMHdvcmRzLiUwQSUyMyUyME11bHRpcGxlJTIwdG9rZW4lMjBjbGFzc2VzJTIwbWlnaHQlMjBhY2NvdW50JTIwZm9yJTIwdGhlJTIwc2FtZSUyMHdvcmQlMEFwcmVkaWN0ZWRfdG9rZW5zX2NsYXNzZXMlMjAlM0QlMjAlNUJtb2RlbC5jb25maWcuaWQybGFiZWwlNUJ0Lml0ZW0oKSU1RCUyMGZvciUyMHQlMjBpbiUyMHByZWRpY3RlZF90b2tlbl9jbGFzc19pZHMlNUIwJTVEJTVEJTBBJTBBbGFiZWxzJTIwJTNEJTIwcHJlZGljdGVkX3Rva2VuX2NsYXNzX2lkcyUwQWxvc3MlMjAlM0QlMjBtb2RlbCgqKmlucHV0cyUyQyUyMGxhYmVscyUzRGxhYmVscykubG9zcw==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, FalconForTokenClassification
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;Rocketknight1/falcon-rw-1b&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = FalconForTokenClassification.from_pretrained(<span class="hljs-string">&quot;Rocketknight1/falcon-rw-1b&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;HuggingFace is a company based in Paris and New York&quot;</span>, add_special_tokens=<span class="hljs-literal">False</span>, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>
<span class="hljs-meta">... </span>)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">with</span> torch.no_grad():
<span class="hljs-meta">... </span>    logits = model(**inputs).logits

<span class="hljs-meta">&gt;&gt;&gt; </span>predicted_token_class_ids = logits.argmax(-<span class="hljs-number">1</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Note that tokens are classified rather then input words which means that</span>
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># there might be more predicted token classes than words.</span>
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Multiple token classes might account for the same word</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>predicted_tokens_classes = [model.config.id2label[t.item()] <span class="hljs-keyword">for</span> t <span class="hljs-keyword">in</span> predicted_token_class_ids[<span class="hljs-number">0</span>]]

<span class="hljs-meta">&gt;&gt;&gt; </span>labels = predicted_token_class_ids
<span class="hljs-meta">&gt;&gt;&gt; </span>loss = model(**inputs, labels=labels).loss`}}),{c(){c=r("p"),y=s("Example:"),u=m(),v(h.$$.fragment)},l(n){c=l(n,"P",{});var d=i(c);y=a(d,"Example:"),d.forEach(t),u=f(n),w(h.$$.fragment,n)},m(n,d){b(n,c,d),e(c,y),b(n,u,d),T(h,n,d),_=!0},p:tt,i(n){_||(k(h.$$.fragment,n),_=!0)},o(n){F(h.$$.fragment,n),_=!1},d(n){n&&t(c),n&&t(u),M(h,n)}}}function ni($){let c,y,u,h,_;return{c(){c=r("p"),y=s("Although the recipe for forward pass needs to be defined within this function, one should call the "),u=r("code"),h=s("Module"),_=s(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(n){c=l(n,"P",{});var d=i(c);y=a(d,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=l(d,"CODE",{});var C=i(u);h=a(C,"Module"),C.forEach(t),_=a(d,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),d.forEach(t)},m(n,d){b(n,c,d),e(c,y),e(c,u),e(u,h),e(c,_)},d(n){n&&t(c)}}}function si($){let c,y,u,h,_,n,d,C,In,Xt,O,fe,st,Ae,xn,at,Un,Yt,S,Wn,Se,Nn,Zn,Pe,qn,Rn,Lt,ge,Gn,rt,An,Sn,Ht,_e,Pn,Be,Bn,Vn,Ot,D,be,lt,Ve,Qn,it,Xn,Dt,ye,Kt,x,Yn,ct,Ln,Hn,Qe,On,Dn,dt,Kn,es,pt,os,ts,en,K,ve,ht,Xe,ns,ut,ss,on,N,Ye,as,ee,rs,jo,ls,is,Le,cs,ds,ps,oe,hs,zo,us,ms,Io,fs,gs,_s,we,tn,te,Te,mt,He,bs,ft,ys,nn,E,Oe,vs,gt,ws,Ts,De,ks,xo,Fs,Ms,$s,Ke,Cs,eo,Js,Es,js,q,oo,zs,ne,Is,Uo,xs,Us,_t,Ws,Ns,Zs,ke,qs,Fe,sn,se,Me,bt,to,Rs,yt,Gs,an,j,no,As,vt,Ss,Ps,so,Bs,Wo,Vs,Qs,Xs,ao,Ys,ro,Ls,Hs,Os,R,lo,Ds,ae,Ks,No,ea,oa,wt,ta,na,sa,$e,aa,Ce,rn,re,Je,Tt,io,ra,kt,la,ln,J,co,ia,Ft,ca,da,Zo,qo,pa,ha,ua,Z,ma,Mt,fa,ga,$t,_a,ba,Ct,ya,va,Jt,wa,Ta,ka,po,Fa,Ro,Ma,$a,Ca,ho,Ja,uo,Ea,ja,za,U,mo,Ia,le,xa,Go,Ua,Wa,Et,Na,Za,qa,Ee,Ra,je,Ga,ze,cn,ie,Ie,jt,fo,Aa,zt,Sa,dn,z,go,Pa,It,Ba,Va,_o,Qa,Ao,Xa,Ya,La,bo,Ha,yo,Oa,Da,Ka,G,vo,er,ce,or,So,tr,nr,xt,sr,ar,rr,xe,lr,Ue,pn,de,We,Ut,wo,ir,Wt,cr,hn,I,To,dr,pe,pr,Nt,hr,ur,Zt,mr,fr,gr,ko,_r,Po,br,yr,vr,Fo,wr,Mo,Tr,kr,Fr,P,$o,Mr,he,$r,Bo,Cr,Jr,qt,Er,jr,zr,Ne,un;return n=new me({}),Ae=new me({}),Ve=new me({}),ye=new et({props:{$$slots:{default:[Ql]},$$scope:{ctx:$}}}),Xe=new me({}),Ye=new A({props:{name:"class transformers.FalconConfig",anchor:"transformers.FalconConfig",parameters:[{name:"vocab_size",val:" = 65024"},{name:"hidden_size",val:" = 4544"},{name:"num_hidden_layers",val:" = 32"},{name:"num_attention_heads",val:" = 71"},{name:"layer_norm_epsilon",val:" = 1e-05"},{name:"initializer_range",val:" = 0.02"},{name:"use_cache",val:" = True"},{name:"hidden_dropout",val:" = 0.0"},{name:"attention_dropout",val:" = 0.0"},{name:"num_kv_heads",val:" = None"},{name:"alibi",val:" = False"},{name:"new_decoder_architecture",val:" = False"},{name:"multi_query",val:" = True"},{name:"parallel_attn",val:" = True"},{name:"bias",val:" = False"},{name:"max_position_embeddings",val:" = 2048"},{name:"rope_theta",val:" = 10000.0"},{name:"rope_scaling",val:" = None"},{name:"bos_token_id",val:" = 11"},{name:"eos_token_id",val:" = 11"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.FalconConfig.vocab_size",description:`<strong>vocab_size</strong> (<code>int</code>, <em>optional</em>, defaults to 65024) &#x2014;
Vocabulary size of the Falcon model. Defines the number of different tokens that can be represented by the
<code>inputs_ids</code> passed when calling <a href="/docs/transformers/main/en/model_doc/falcon#transformers.FalconModel">FalconModel</a>`,name:"vocab_size"},{anchor:"transformers.FalconConfig.hidden_size",description:`<strong>hidden_size</strong> (<code>int</code>, <em>optional</em>, defaults to 4544) &#x2014;
Dimension of the hidden representations.`,name:"hidden_size"},{anchor:"transformers.FalconConfig.num_hidden_layers",description:`<strong>num_hidden_layers</strong> (<code>int</code>, <em>optional</em>, defaults to 32) &#x2014;
Number of hidden layers in the Transformer decoder.`,name:"num_hidden_layers"},{anchor:"transformers.FalconConfig.num_attention_heads",description:`<strong>num_attention_heads</strong> (<code>int</code>, <em>optional</em>, defaults to 71) &#x2014;
Number of attention heads for each attention layer in the Transformer encoder.`,name:"num_attention_heads"},{anchor:"transformers.FalconConfig.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.FalconConfig.use_cache",description:`<strong>use_cache</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether 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.FalconConfig.layer_norm_epsilon",description:`<strong>layer_norm_epsilon</strong> (<code>float</code>, <em>optional</em>, defaults to 1e-5) &#x2014;
The epsilon used by the layer normalization layers.`,name:"layer_norm_epsilon"},{anchor:"transformers.FalconConfig.hidden_dropout",description:`<strong>hidden_dropout</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#x2014;
The dropout probability for MLP layers.`,name:"hidden_dropout"},{anchor:"transformers.FalconConfig.attention_dropout",description:`<strong>attention_dropout</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#x2014;
The dropout probability for attention layers.`,name:"attention_dropout"},{anchor:"transformers.FalconConfig.num_kv_heads",description:`<strong>num_kv_heads</strong> (<code>int</code>, <em>optional</em>) &#x2014;
Number of key-value heads to use per attention layer. If unset, defaults to the same value as
<code>num_attention_heads</code>.`,name:"num_kv_heads"},{anchor:"transformers.FalconConfig.alibi",description:`<strong>alibi</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether to use ALiBi positional biases during self-attention.`,name:"alibi"},{anchor:"transformers.FalconConfig.new_decoder_architecture",description:`<strong>new_decoder_architecture</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether to use the new (Falcon-40B) decoder architecture. If <code>True</code>, the <code>multi_query</code> and <code>parallel_attn</code>
arguments are ignored, as the new decoder always uses parallel attention.`,name:"new_decoder_architecture"},{anchor:"transformers.FalconConfig.multi_query",description:`<strong>multi_query</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to use multi-query attention in the decoder. Ignored when <code>new_decoder_architecture</code> is <code>True</code>.`,name:"multi_query"},{anchor:"transformers.FalconConfig.parallel_attn",description:`<strong>parallel_attn</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to compute attention in parallel with the feedforward layer. If False, they are consecutive
instead, as in the original Transformer architecture. Ignored when <code>new_decoder_architecture</code> is <code>True</code>.`,name:"parallel_attn"},{anchor:"transformers.FalconConfig.bias",description:`<strong>bias</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether to use bias on Linear layers.`,name:"bias"},{anchor:"transformers.FalconConfig.max_position_embeddings",description:`<strong>max_position_embeddings</strong> (<code>int</code>, <em>optional</em>, defaults to 2048) &#x2014;
The maximum sequence length that this model might ever be used with, when <code>alibi</code> is <code>False</code>. Pretrained
Falcon models with RoPE support up to 2048 tokens.`,name:"max_position_embeddings"},{anchor:"transformers.FalconConfig.rope_theta",description:`<strong>rope_theta</strong> (<code>float</code>, <em>optional</em>, defaults to 10000.0) &#x2014;
The base period of the RoPE embeddings.`,name:"rope_theta"},{anchor:"transformers.FalconConfig.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 an 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/LocalLLaMA/comments/14mrgpr/dynamically_scaled_rope_further_increases/" rel="nofollow">https://www.reddit.com/r/LocalLLaMA/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.FalconConfig.bos_token_id",description:`<strong>bos_token_id</strong> (<code>int</code>, <em>optional</em>, defaults to 11) &#x2014;
The id of the &#x201C;beginning-of-sequence&#x201D; token.`,name:"bos_token_id"},{anchor:"transformers.FalconConfig.eos_token_id",description:`<strong>eos_token_id</strong> (<code>int</code>, <em>optional</em>, defaults to 11) &#x2014;
The id of the &#x201C;end-of-sequence&#x201D; token.`,name:"eos_token_id"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/falcon/configuration_falcon.py#L32"}}),we=new ot({props:{anchor:"transformers.FalconConfig.example",$$slots:{default:[Xl]},$$scope:{ctx:$}}}),He=new me({}),Oe=new A({props:{name:"class transformers.FalconModel",anchor:"transformers.FalconModel",parameters:[{name:"config",val:": FalconConfig"}],parametersDescription:[{anchor:"transformers.FalconModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/falcon#transformers.FalconConfig">FalconConfig</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/main/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/main/src/transformers/models/falcon/modeling_falcon.py#L800"}}),oo=new A({props:{name:"forward",anchor:"transformers.FalconModel.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"past_key_values",val:": typing.Union[typing.Tuple[typing.Tuple[torch.Tensor, torch.Tensor], ...], NoneType] = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"position_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"head_mask",val:": typing.Optional[torch.LongTensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.LongTensor] = None"},{name:"use_cache",val:": typing.Optional[bool] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.FalconModel.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, input_ids_length)</code>) &#x2014;
<code>input_ids_length</code> = <code>sequence_length</code> if <code>past_key_values</code> is <code>None</code> else <code>past_key_values[0][0].shape[2]</code>
(<code>sequence_length</code> of input past key value states). Indices of input sequence tokens in the vocabulary.</p>
<p>If <code>past_key_values</code> is used, only <code>input_ids</code> that do not have their past calculated should be passed as
<code>input_ids</code>.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__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.FalconModel.forward.past_key_values",description:`<strong>past_key_values</strong> (<code>Tuple[Tuple[torch.Tensor]]</code> of length <code>config.num_hidden_layers</code>) &#x2014;
Contains precomputed hidden-states (key and values in the attention blocks) as computed by the model (see
<code>past_key_values</code> output below). Can be used to speed up sequential decoding. The <code>input_ids</code> which have
their past given to this model should not be passed as <code>input_ids</code> as they have already been computed.</p>
<p>Each element of <code>past_key_values</code> is a tuple (past_key, past_value):</p>
<ul>
<li>past_key: [batch_size * num_heads, head_dim, kv_length]</li>
<li>past_value: [batch_size * num_heads, kv_length, head_dim]</li>
</ul>`,name:"past_key_values"},{anchor:"transformers.FalconModel.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.FloatTensor</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>`,name:"attention_mask"},{anchor:"transformers.FalconModel.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.FalconModel.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</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:"head_mask"},{anchor:"transformers.FalconModel.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.</p>
<p>If <code>past_key_values</code> is used, optionally only the last <code>inputs_embeds</code> have to be input (see
<code>past_key_values</code>).`,name:"inputs_embeds"},{anchor:"transformers.FalconModel.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.FalconModel.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.FalconModel.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.FalconModel.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/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/falcon/modeling_falcon.py#L859",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.BaseModelOutputWithPastAndCrossAttentions"
>transformers.modeling_outputs.BaseModelOutputWithPastAndCrossAttentions</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/main/en/model_doc/falcon#transformers.FalconConfig"
>FalconConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>last_hidden_state</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>) \u2014 Sequence of hidden-states at the output of the last layer of the model.</p>
<p>If <code>past_key_values</code> is used only the last hidden-state of the sequences of shape <code>(batch_size, 1, hidden_size)</code> is output.</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>) \u2014 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>) and optionally if
<code>config.is_encoder_decoder=True</code> 2 additional tensors of shape <code>(batch_size, num_heads, encoder_sequence_length, embed_size_per_head)</code>.</p>
<p>Contains pre-computed hidden-states (key and values in the self-attention blocks and optionally if
<code>config.is_encoder_decoder=True</code> in the cross-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>) \u2014 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>) \u2014 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>
<li>
<p><strong>cross_attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> and <code>config.add_cross_attention=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 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 of the decoder\u2019s cross-attention layer, after the attention softmax, used to compute the
weighted average in the cross-attention heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.BaseModelOutputWithPastAndCrossAttentions"
>transformers.modeling_outputs.BaseModelOutputWithPastAndCrossAttentions</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),ke=new et({props:{$$slots:{default:[Yl]},$$scope:{ctx:$}}}),Fe=new ot({props:{anchor:"transformers.FalconModel.forward.example",$$slots:{default:[Ll]},$$scope:{ctx:$}}}),to=new me({}),no=new A({props:{name:"class transformers.FalconForCausalLM",anchor:"transformers.FalconForCausalLM",parameters:[{name:"config",val:": FalconConfig"}],parametersDescription:[{anchor:"transformers.FalconForCausalLM.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/falcon#transformers.FalconConfig">FalconConfig</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/main/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/main/src/transformers/models/falcon/modeling_falcon.py#L1011"}}),lo=new A({props:{name:"forward",anchor:"transformers.FalconForCausalLM.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"past_key_values",val:": typing.Union[typing.Tuple[typing.Tuple[torch.Tensor, torch.Tensor], ...], NoneType] = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"position_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.Tensor] = None"},{name:"labels",val:": typing.Optional[torch.Tensor] = None"},{name:"use_cache",val:": typing.Optional[bool] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.FalconForCausalLM.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, input_ids_length)</code>) &#x2014;
<code>input_ids_length</code> = <code>sequence_length</code> if <code>past_key_values</code> is <code>None</code> else <code>past_key_values[0][0].shape[2]</code>
(<code>sequence_length</code> of input past key value states). Indices of input sequence tokens in the vocabulary.</p>
<p>If <code>past_key_values</code> is used, only <code>input_ids</code> that do not have their past calculated should be passed as
<code>input_ids</code>.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__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.FalconForCausalLM.forward.past_key_values",description:`<strong>past_key_values</strong> (<code>Tuple[Tuple[torch.Tensor]]</code> of length <code>config.num_hidden_layers</code>) &#x2014;
Contains precomputed hidden-states (key and values in the attention blocks) as computed by the model (see
<code>past_key_values</code> output below). Can be used to speed up sequential decoding. The <code>input_ids</code> which have
their past given to this model should not be passed as <code>input_ids</code> as they have already been computed.</p>
<p>Each element of <code>past_key_values</code> is a tuple (past_key, past_value):</p>
<ul>
<li>past_key: [batch_size * num_heads, head_dim, kv_length]</li>
<li>past_value: [batch_size * num_heads, kv_length, head_dim]</li>
</ul>`,name:"past_key_values"},{anchor:"transformers.FalconForCausalLM.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.FloatTensor</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>`,name:"attention_mask"},{anchor:"transformers.FalconForCausalLM.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.FalconForCausalLM.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</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:"head_mask"},{anchor:"transformers.FalconForCausalLM.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.</p>
<p>If <code>past_key_values</code> is used, optionally only the last <code>inputs_embeds</code> have to be input (see
<code>past_key_values</code>).`,name:"inputs_embeds"},{anchor:"transformers.FalconForCausalLM.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.FalconForCausalLM.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.FalconForCausalLM.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.FalconForCausalLM.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/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.FalconForCausalLM.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Labels for language modeling. Note that the labels <strong>are shifted</strong> inside the model, i.e. you can set
<code>labels = input_ids</code> Indices are selected in <code>[-100, 0, ..., config.vocab_size]</code> All labels set to <code>-100</code>
are ignored (masked), the loss is only computed for labels in <code>[0, ..., config.vocab_size]</code>`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/falcon/modeling_falcon.py#L1055",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.CausalLMOutputWithCrossAttentions"
>transformers.modeling_outputs.CausalLMOutputWithCrossAttentions</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/main/en/model_doc/falcon#transformers.FalconConfig"
>FalconConfig</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) \u2014 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>) \u2014 Prediction scores of the language modeling head (scores for each vocabulary token before SoftMax).</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>) \u2014 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>) \u2014 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>
<li>
<p><strong>cross_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>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Cross attentions weights after the attention softmax, used to compute the weighted average in the
cross-attention heads.</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>) \u2014 Tuple of <code>torch.FloatTensor</code> tuples of length <code>config.n_layers</code>, with each tuple containing the cached key,
value states of the self-attention and the cross-attention layers if model is used in encoder-decoder
setting. Only relevant if <code>config.is_decoder = True</code>.</p>
<p>Contains pre-computed hidden-states (key and values in the attention blocks) that can be used (see
<code>past_key_values</code> input) to speed up sequential decoding.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.CausalLMOutputWithCrossAttentions"
>transformers.modeling_outputs.CausalLMOutputWithCrossAttentions</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),$e=new et({props:{$$slots:{default:[Hl]},$$scope:{ctx:$}}}),Ce=new ot({props:{anchor:"transformers.FalconForCausalLM.forward.example",$$slots:{default:[Ol]},$$scope:{ctx:$}}}),io=new me({}),co=new A({props:{name:"class transformers.FalconForSequenceClassification",anchor:"transformers.FalconForSequenceClassification",parameters:[{name:"config",val:": FalconConfig"}],parametersDescription:[{anchor:"transformers.FalconForSequenceClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/falcon#transformers.FalconConfig">FalconConfig</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/main/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/main/src/transformers/models/falcon/modeling_falcon.py#L1164"}}),mo=new A({props:{name:"forward",anchor:"transformers.FalconForSequenceClassification.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"past_key_values",val:": typing.Union[typing.Tuple[typing.Tuple[torch.Tensor, torch.Tensor], ...], NoneType] = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.Tensor] = None"},{name:"labels",val:": typing.Optional[torch.Tensor] = None"},{name:"use_cache",val:": typing.Optional[bool] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.FalconForSequenceClassification.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, input_ids_length)</code>) &#x2014;
<code>input_ids_length</code> = <code>sequence_length</code> if <code>past_key_values</code> is <code>None</code> else <code>past_key_values[0][0].shape[2]</code>
(<code>sequence_length</code> of input past key value states). Indices of input sequence tokens in the vocabulary.</p>
<p>If <code>past_key_values</code> is used, only <code>input_ids</code> that do not have their past calculated should be passed as
<code>input_ids</code>.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__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.FalconForSequenceClassification.forward.past_key_values",description:`<strong>past_key_values</strong> (<code>Tuple[Tuple[torch.Tensor]]</code> of length <code>config.num_hidden_layers</code>) &#x2014;
Contains precomputed hidden-states (key and values in the attention blocks) as computed by the model (see
<code>past_key_values</code> output below). Can be used to speed up sequential decoding. The <code>input_ids</code> which have
their past given to this model should not be passed as <code>input_ids</code> as they have already been computed.</p>
<p>Each element of <code>past_key_values</code> is a tuple (past_key, past_value):</p>
<ul>
<li>past_key: [batch_size * num_heads, head_dim, kv_length]</li>
<li>past_value: [batch_size * num_heads, kv_length, head_dim]</li>
</ul>`,name:"past_key_values"},{anchor:"transformers.FalconForSequenceClassification.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.FloatTensor</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>`,name:"attention_mask"},{anchor:"transformers.FalconForSequenceClassification.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.FalconForSequenceClassification.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</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:"head_mask"},{anchor:"transformers.FalconForSequenceClassification.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.</p>
<p>If <code>past_key_values</code> is used, optionally only the last <code>inputs_embeds</code> have to be input (see
<code>past_key_values</code>).`,name:"inputs_embeds"},{anchor:"transformers.FalconForSequenceClassification.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.FalconForSequenceClassification.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.FalconForSequenceClassification.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.FalconForSequenceClassification.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/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.FalconForSequenceClassification.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/main/src/transformers/models/falcon/modeling_falcon.py#L1174",returnDescription:`
<p>A <code>transformers.modeling_outputs.SequenceClassifierOutputWithPast</code> 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/main/en/model_doc/falcon#transformers.FalconConfig"
>FalconConfig</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) \u2014 Classification (or regression if config.num_labels==1) loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, config.num_labels)</code>) \u2014 Classification (or regression if config.num_labels==1) scores (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>) \u2014 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>) \u2014 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>) \u2014 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:`
<p><code>transformers.modeling_outputs.SequenceClassifierOutputWithPast</code> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Ee=new et({props:{$$slots:{default:[Dl]},$$scope:{ctx:$}}}),je=new ot({props:{anchor:"transformers.FalconForSequenceClassification.forward.example",$$slots:{default:[Kl]},$$scope:{ctx:$}}}),ze=new ot({props:{anchor:"transformers.FalconForSequenceClassification.forward.example-2",$$slots:{default:[ei]},$$scope:{ctx:$}}}),fo=new me({}),go=new A({props:{name:"class transformers.FalconForTokenClassification",anchor:"transformers.FalconForTokenClassification",parameters:[{name:"config",val:": FalconConfig"}],parametersDescription:[{anchor:"transformers.FalconForTokenClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/falcon#transformers.FalconConfig">FalconConfig</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/main/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/main/src/transformers/models/falcon/modeling_falcon.py#L1280"}}),vo=new A({props:{name:"forward",anchor:"transformers.FalconForTokenClassification.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"past_key_values",val:": typing.Union[typing.Tuple[typing.Tuple[torch.Tensor, torch.Tensor], ...], NoneType] = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.Tensor] = None"},{name:"labels",val:": typing.Optional[torch.Tensor] = None"},{name:"use_cache",val:": typing.Optional[bool] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.FalconForTokenClassification.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, input_ids_length)</code>) &#x2014;
<code>input_ids_length</code> = <code>sequence_length</code> if <code>past_key_values</code> is <code>None</code> else <code>past_key_values[0][0].shape[2]</code>
(<code>sequence_length</code> of input past key value states). Indices of input sequence tokens in the vocabulary.</p>
<p>If <code>past_key_values</code> is used, only <code>input_ids</code> that do not have their past calculated should be passed as
<code>input_ids</code>.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__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.FalconForTokenClassification.forward.past_key_values",description:`<strong>past_key_values</strong> (<code>Tuple[Tuple[torch.Tensor]]</code> of length <code>config.num_hidden_layers</code>) &#x2014;
Contains precomputed hidden-states (key and values in the attention blocks) as computed by the model (see
<code>past_key_values</code> output below). Can be used to speed up sequential decoding. The <code>input_ids</code> which have
their past given to this model should not be passed as <code>input_ids</code> as they have already been computed.</p>
<p>Each element of <code>past_key_values</code> is a tuple (past_key, past_value):</p>
<ul>
<li>past_key: [batch_size * num_heads, head_dim, kv_length]</li>
<li>past_value: [batch_size * num_heads, kv_length, head_dim]</li>
</ul>`,name:"past_key_values"},{anchor:"transformers.FalconForTokenClassification.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.FloatTensor</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>`,name:"attention_mask"},{anchor:"transformers.FalconForTokenClassification.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.FalconForTokenClassification.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</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:"head_mask"},{anchor:"transformers.FalconForTokenClassification.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.</p>
<p>If <code>past_key_values</code> is used, optionally only the last <code>inputs_embeds</code> have to be input (see
<code>past_key_values</code>).`,name:"inputs_embeds"},{anchor:"transformers.FalconForTokenClassification.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.FalconForTokenClassification.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.FalconForTokenClassification.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.FalconForTokenClassification.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/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.FalconForTokenClassification.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/main/src/transformers/models/falcon/modeling_falcon.py#L1298",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.TokenClassifierOutput"
>transformers.modeling_outputs.TokenClassifierOutput</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/main/en/model_doc/falcon#transformers.FalconConfig"
>FalconConfig</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)  \u2014 Classification loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, config.num_labels)</code>) \u2014 Classification scores (before SoftMax).</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>) \u2014 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>) \u2014 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:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.TokenClassifierOutput"
>transformers.modeling_outputs.TokenClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),xe=new et({props:{$$slots:{default:[oi]},$$scope:{ctx:$}}}),Ue=new ot({props:{anchor:"transformers.FalconForTokenClassification.forward.example",$$slots:{default:[ti]},$$scope:{ctx:$}}}),wo=new me({}),To=new A({props:{name:"class transformers.FalconForQuestionAnswering",anchor:"transformers.FalconForQuestionAnswering",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.FalconForQuestionAnswering.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/falcon#transformers.FalconConfig">FalconConfig</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/main/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/main/src/transformers/models/falcon/modeling_falcon.py#L1369"}}),$o=new A({props:{name:"forward",anchor:"transformers.FalconForQuestionAnswering.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"head_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"start_positions",val:": typing.Optional[torch.LongTensor] = None"},{name:"end_positions",val:": typing.Optional[torch.LongTensor] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.FalconForQuestionAnswering.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, input_ids_length)</code>) &#x2014;
<code>input_ids_length</code> = <code>sequence_length</code> if <code>past_key_values</code> is <code>None</code> else <code>past_key_values[0][0].shape[2]</code>
(<code>sequence_length</code> of input past key value states). Indices of input sequence tokens in the vocabulary.</p>
<p>If <code>past_key_values</code> is used, only <code>input_ids</code> that do not have their past calculated should be passed as
<code>input_ids</code>.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__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.FalconForQuestionAnswering.forward.past_key_values",description:`<strong>past_key_values</strong> (<code>Tuple[Tuple[torch.Tensor]]</code> of length <code>config.num_hidden_layers</code>) &#x2014;
Contains precomputed hidden-states (key and values in the attention blocks) as computed by the model (see
<code>past_key_values</code> output below). Can be used to speed up sequential decoding. The <code>input_ids</code> which have
their past given to this model should not be passed as <code>input_ids</code> as they have already been computed.</p>
<p>Each element of <code>past_key_values</code> is a tuple (past_key, past_value):</p>
<ul>
<li>past_key: [batch_size * num_heads, head_dim, kv_length]</li>
<li>past_value: [batch_size * num_heads, kv_length, head_dim]</li>
</ul>`,name:"past_key_values"},{anchor:"transformers.FalconForQuestionAnswering.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.FloatTensor</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>`,name:"attention_mask"},{anchor:"transformers.FalconForQuestionAnswering.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.FalconForQuestionAnswering.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</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:"head_mask"},{anchor:"transformers.FalconForQuestionAnswering.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.</p>
<p>If <code>past_key_values</code> is used, optionally only the last <code>inputs_embeds</code> have to be input (see
<code>past_key_values</code>).`,name:"inputs_embeds"},{anchor:"transformers.FalconForQuestionAnswering.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.FalconForQuestionAnswering.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.FalconForQuestionAnswering.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.FalconForQuestionAnswering.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/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.FalconForQuestionAnswering.forward.start_positions",description:`<strong>start_positions</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for position (index) of the start of the labelled span for computing the token classification loss.
Positions are clamped to the length of the sequence (<code>sequence_length</code>). Position outside of the sequence
are not taken into account for computing the loss.`,name:"start_positions"},{anchor:"transformers.FalconForQuestionAnswering.forward.end_positions",description:`<strong>end_positions</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for position (index) of the end of the labelled span for computing the token classification loss.
Positions are clamped to the length of the sequence (<code>sequence_length</code>). Position outside of the sequence
are not taken into account for computing the loss.`,name:"end_positions"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/falcon/modeling_falcon.py#L1378"}}),Ne=new et({props:{$$slots:{default:[ni]},$$scope:{ctx:$}}}),{c(){c=r("meta"),y=m(),u=r("h1"),h=r("a"),_=r("span"),v(n.$$.fragment),d=m(),C=r("span"),In=s("Falcon"),Xt=m(),O=r("h2"),fe=r("a"),st=r("span"),v(Ae.$$.fragment),xn=m(),at=r("span"),Un=s("Overview"),Yt=m(),S=r("p"),Wn=s("Falcon is a class of causal decoder-only models built by "),Se=r("a"),Nn=s("TII"),Zn=s(`. The largest Falcon checkpoints
have been trained on >=1T tokens of text, with a particular emphasis on the `),Pe=r("a"),qn=s("RefinedWeb"),Rn=s(`
corpus. They are made available under the Apache 2.0 license.`),Lt=m(),ge=r("p"),Gn=s(`Falcon\u2019s architecture is modern and optimized for inference, with multi-query attention and support for efficient
attention variants like `),rt=r("code"),An=s("FlashAttention"),Sn=s(`. Both \u2018base\u2019 models trained only as causal language models as well as
\u2018instruct\u2019 models that have received further fine-tuning are available.`),Ht=m(),_e=r("p"),Pn=s(`Falcon models are (as of 2023) some of the largest and most powerful open-source language models,
and consistently rank highly in the `),Be=r("a"),Bn=s("OpenLLM leaderboard"),Vn=s("."),Ot=m(),D=r("h2"),be=r("a"),lt=r("span"),v(Ve.$$.fragment),Qn=m(),it=r("span"),Xn=s("Converting custom checkpoints"),Dt=m(),v(ye.$$.fragment),Kt=m(),x=r("p"),Yn=s("You can convert custom code checkpoints to full Transformers checkpoints using the "),ct=r("code"),Ln=s("convert_custom_code_checkpoint.py"),Hn=s(`
script located in the
`),Qe=r("a"),On=s("Falcon model directory"),Dn=s(`
of the Transformers library. To use this script, simply call it with
`),dt=r("code"),Kn=s("python convert_custom_code_checkpoint.py --checkpoint_dir my_model"),es=s(`. This will convert your checkpoint in-place, and
you can immediately load it from the directory afterwards with e.g. `),pt=r("code"),os=s("from_pretrained()"),ts=s(`. If your model hasn\u2019t been
uploaded to the Hub, we recommend making a backup before attempting the conversion, just in case!`),en=m(),K=r("h2"),ve=r("a"),ht=r("span"),v(Xe.$$.fragment),ns=m(),ut=r("span"),ss=s("FalconConfig"),on=m(),N=r("div"),v(Ye.$$.fragment),as=m(),ee=r("p"),rs=s("This is the configuration class to store the configuration of a "),jo=r("a"),ls=s("FalconModel"),is=s(`. It is used to instantiate a Falcon
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
`),Le=r("a"),cs=s("tiiuae/falcon-7b"),ds=s(" architecture."),ps=m(),oe=r("p"),hs=s("Configuration objects inherit from "),zo=r("a"),us=s("PretrainedConfig"),ms=s(` and can be used to control the model outputs. Read the
documentation from `),Io=r("a"),fs=s("PretrainedConfig"),gs=s(" for more information."),_s=m(),v(we.$$.fragment),tn=m(),te=r("h2"),Te=r("a"),mt=r("span"),v(He.$$.fragment),bs=m(),ft=r("span"),ys=s("FalconModel"),nn=m(),E=r("div"),v(Oe.$$.fragment),vs=m(),gt=r("p"),ws=s("The bare Falcon Model transformer outputting raw hidden-states without any specific head on top."),Ts=m(),De=r("p"),ks=s("This model inherits from "),xo=r("a"),Fs=s("PreTrainedModel"),Ms=s(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings etc.)`),$s=m(),Ke=r("p"),Cs=s("This model is also a PyTorch "),eo=r("a"),Js=s("torch.nn.Module"),Es=s(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),js=m(),q=r("div"),v(oo.$$.fragment),zs=m(),ne=r("p"),Is=s("The "),Uo=r("a"),xs=s("FalconModel"),Us=s(" forward method, overrides the "),_t=r("code"),Ws=s("__call__"),Ns=s(" special method."),Zs=m(),v(ke.$$.fragment),qs=m(),v(Fe.$$.fragment),sn=m(),se=r("h2"),Me=r("a"),bt=r("span"),v(to.$$.fragment),Rs=m(),yt=r("span"),Gs=s("FalconForCausalLM"),an=m(),j=r("div"),v(no.$$.fragment),As=m(),vt=r("p"),Ss=s("The Falcon Model transformer with a language modeling head on top (linear layer with weights tied to the input embeddings)."),Ps=m(),so=r("p"),Bs=s("This model inherits from "),Wo=r("a"),Vs=s("PreTrainedModel"),Qs=s(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings etc.)`),Xs=m(),ao=r("p"),Ys=s("This model is also a PyTorch "),ro=r("a"),Ls=s("torch.nn.Module"),Hs=s(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Os=m(),R=r("div"),v(lo.$$.fragment),Ds=m(),ae=r("p"),Ks=s("The "),No=r("a"),ea=s("FalconForCausalLM"),oa=s(" forward method, overrides the "),wt=r("code"),ta=s("__call__"),na=s(" special method."),sa=m(),v($e.$$.fragment),aa=m(),v(Ce.$$.fragment),rn=m(),re=r("h2"),Je=r("a"),Tt=r("span"),v(io.$$.fragment),ra=m(),kt=r("span"),la=s("FalconForSequenceClassification"),ln=m(),J=r("div"),v(co.$$.fragment),ia=m(),Ft=r("p"),ca=s("The Falcon Model transformer with a sequence classification head on top (linear layer)."),da=m(),Zo=r("p"),qo=r("a"),pa=s("FalconForSequenceClassification"),ha=s(` uses the last token in order to do the classification, as other causal models
(e.g. GPT-1) do.`),ua=m(),Z=r("p"),ma=s(`Since it does classification on the last token, it requires to know the position of the last token. If a
`),Mt=r("code"),fa=s("pad_token_id"),ga=s(` is defined in the configuration, it finds the last token that is not a padding token in each row. If
no `),$t=r("code"),_a=s("pad_token_id"),ba=s(` is defined, it simply takes the last value in each row of the batch. Since it cannot guess the
padding tokens when `),Ct=r("code"),ya=s("inputs_embeds"),va=s(" are passed instead of "),Jt=r("code"),wa=s("input_ids"),Ta=s(`, it does the same (take the last value in
each row of the batch).`),ka=m(),po=r("p"),Fa=s("This model inherits from "),Ro=r("a"),Ma=s("PreTrainedModel"),$a=s(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings etc.)`),Ca=m(),ho=r("p"),Ja=s("This model is also a PyTorch "),uo=r("a"),Ea=s("torch.nn.Module"),ja=s(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),za=m(),U=r("div"),v(mo.$$.fragment),Ia=m(),le=r("p"),xa=s("The "),Go=r("a"),Ua=s("FalconForSequenceClassification"),Wa=s(" forward method, overrides the "),Et=r("code"),Na=s("__call__"),Za=s(" special method."),qa=m(),v(Ee.$$.fragment),Ra=m(),v(je.$$.fragment),Ga=m(),v(ze.$$.fragment),cn=m(),ie=r("h2"),Ie=r("a"),jt=r("span"),v(fo.$$.fragment),Aa=m(),zt=r("span"),Sa=s("FalconForTokenClassification"),dn=m(),z=r("div"),v(go.$$.fragment),Pa=m(),It=r("p"),Ba=s(`Falcon Model 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.`),Va=m(),_o=r("p"),Qa=s("This model inherits from "),Ao=r("a"),Xa=s("PreTrainedModel"),Ya=s(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings etc.)`),La=m(),bo=r("p"),Ha=s("This model is also a PyTorch "),yo=r("a"),Oa=s("torch.nn.Module"),Da=s(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Ka=m(),G=r("div"),v(vo.$$.fragment),er=m(),ce=r("p"),or=s("The "),So=r("a"),tr=s("FalconForTokenClassification"),nr=s(" forward method, overrides the "),xt=r("code"),sr=s("__call__"),ar=s(" special method."),rr=m(),v(xe.$$.fragment),lr=m(),v(Ue.$$.fragment),pn=m(),de=r("h2"),We=r("a"),Ut=r("span"),v(wo.$$.fragment),ir=m(),Wt=r("span"),cr=s("FalconForQuestionAnswering"),hn=m(),I=r("div"),v(To.$$.fragment),dr=m(),pe=r("p"),pr=s(`The Falcon Model transformer with a span classification head on top for extractive question-answering tasks like
SQuAD (a linear layers on top of the hidden-states output to compute `),Nt=r("code"),hr=s("span start logits"),ur=s(" and "),Zt=r("code"),mr=s("span end logits"),fr=s(")."),gr=m(),ko=r("p"),_r=s("This model inherits from "),Po=r("a"),br=s("PreTrainedModel"),yr=s(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings etc.)`),vr=m(),Fo=r("p"),wr=s("This model is also a PyTorch "),Mo=r("a"),Tr=s("torch.nn.Module"),kr=s(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Fr=m(),P=r("div"),v($o.$$.fragment),Mr=m(),he=r("p"),$r=s("The "),Bo=r("a"),Cr=s("FalconForQuestionAnswering"),Jr=s(" forward method, overrides the "),qt=r("code"),Er=s("__call__"),jr=s(" special method."),zr=m(),v(Ne.$$.fragment),this.h()},l(o){const g=Bl('[data-svelte="svelte-1phssyn"]',document.head);c=l(g,"META",{name:!0,content:!0}),g.forEach(t),y=f(o),u=l(o,"H1",{class:!0});var Co=i(u);h=l(Co,"A",{id:!0,class:!0,href:!0});var Rt=i(h);_=l(Rt,"SPAN",{});var Gt=i(_);w(n.$$.fragment,Gt),Gt.forEach(t),Rt.forEach(t),d=f(Co),C=l(Co,"SPAN",{});var At=i(C);In=a(At,"Falcon"),At.forEach(t),Co.forEach(t),Xt=f(o),O=l(o,"H2",{class:!0});var Jo=i(O);fe=l(Jo,"A",{id:!0,class:!0,href:!0});var St=i(fe);st=l(St,"SPAN",{});var Pt=i(st);w(Ae.$$.fragment,Pt),Pt.forEach(t),St.forEach(t),xn=f(Jo),at=l(Jo,"SPAN",{});var Bt=i(at);Un=a(Bt,"Overview"),Bt.forEach(t),Jo.forEach(t),Yt=f(o),S=l(o,"P",{});var ue=i(S);Wn=a(ue,"Falcon is a class of causal decoder-only models built by "),Se=l(ue,"A",{href:!0,rel:!0});var Vt=i(Se);Nn=a(Vt,"TII"),Vt.forEach(t),Zn=a(ue,`. The largest Falcon checkpoints
have been trained on >=1T tokens of text, with a particular emphasis on the `),Pe=l(ue,"A",{href:!0,rel:!0});var Qt=i(Pe);qn=a(Qt,"RefinedWeb"),Qt.forEach(t),Rn=a(ue,`
corpus. They are made available under the Apache 2.0 license.`),ue.forEach(t),Lt=f(o),ge=l(o,"P",{});var Eo=i(ge);Gn=a(Eo,`Falcon\u2019s architecture is modern and optimized for inference, with multi-query attention and support for efficient
attention variants like `),rt=l(Eo,"CODE",{});var xr=i(rt);An=a(xr,"FlashAttention"),xr.forEach(t),Sn=a(Eo,`. Both \u2018base\u2019 models trained only as causal language models as well as
\u2018instruct\u2019 models that have received further fine-tuning are available.`),Eo.forEach(t),Ht=f(o),_e=l(o,"P",{});var mn=i(_e);Pn=a(mn,`Falcon models are (as of 2023) some of the largest and most powerful open-source language models,
and consistently rank highly in the `),Be=l(mn,"A",{href:!0,rel:!0});var Ur=i(Be);Bn=a(Ur,"OpenLLM leaderboard"),Ur.forEach(t),Vn=a(mn,"."),mn.forEach(t),Ot=f(o),D=l(o,"H2",{class:!0});var fn=i(D);be=l(fn,"A",{id:!0,class:!0,href:!0});var Wr=i(be);lt=l(Wr,"SPAN",{});var Nr=i(lt);w(Ve.$$.fragment,Nr),Nr.forEach(t),Wr.forEach(t),Qn=f(fn),it=l(fn,"SPAN",{});var Zr=i(it);Xn=a(Zr,"Converting custom checkpoints"),Zr.forEach(t),fn.forEach(t),Dt=f(o),w(ye.$$.fragment,o),Kt=f(o),x=l(o,"P",{});var B=i(x);Yn=a(B,"You can convert custom code checkpoints to full Transformers checkpoints using the "),ct=l(B,"CODE",{});var qr=i(ct);Ln=a(qr,"convert_custom_code_checkpoint.py"),qr.forEach(t),Hn=a(B,`
script located in the
`),Qe=l(B,"A",{href:!0,rel:!0});var Rr=i(Qe);On=a(Rr,"Falcon model directory"),Rr.forEach(t),Dn=a(B,`
of the Transformers library. To use this script, simply call it with
`),dt=l(B,"CODE",{});var Gr=i(dt);Kn=a(Gr,"python convert_custom_code_checkpoint.py --checkpoint_dir my_model"),Gr.forEach(t),es=a(B,`. This will convert your checkpoint in-place, and
you can immediately load it from the directory afterwards with e.g. `),pt=l(B,"CODE",{});var Ar=i(pt);os=a(Ar,"from_pretrained()"),Ar.forEach(t),ts=a(B,`. If your model hasn\u2019t been
uploaded to the Hub, we recommend making a backup before attempting the conversion, just in case!`),B.forEach(t),en=f(o),K=l(o,"H2",{class:!0});var gn=i(K);ve=l(gn,"A",{id:!0,class:!0,href:!0});var Sr=i(ve);ht=l(Sr,"SPAN",{});var Pr=i(ht);w(Xe.$$.fragment,Pr),Pr.forEach(t),Sr.forEach(t),ns=f(gn),ut=l(gn,"SPAN",{});var Br=i(ut);ss=a(Br,"FalconConfig"),Br.forEach(t),gn.forEach(t),on=f(o),N=l(o,"DIV",{class:!0});var Ze=i(N);w(Ye.$$.fragment,Ze),as=f(Ze),ee=l(Ze,"P",{});var Vo=i(ee);rs=a(Vo,"This is the configuration class to store the configuration of a "),jo=l(Vo,"A",{href:!0});var Vr=i(jo);ls=a(Vr,"FalconModel"),Vr.forEach(t),is=a(Vo,`. It is used to instantiate a Falcon
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
`),Le=l(Vo,"A",{href:!0,rel:!0});var Qr=i(Le);cs=a(Qr,"tiiuae/falcon-7b"),Qr.forEach(t),ds=a(Vo," architecture."),Vo.forEach(t),ps=f(Ze),oe=l(Ze,"P",{});var Qo=i(oe);hs=a(Qo,"Configuration objects inherit from "),zo=l(Qo,"A",{href:!0});var Xr=i(zo);us=a(Xr,"PretrainedConfig"),Xr.forEach(t),ms=a(Qo,` and can be used to control the model outputs. Read the
documentation from `),Io=l(Qo,"A",{href:!0});var Yr=i(Io);fs=a(Yr,"PretrainedConfig"),Yr.forEach(t),gs=a(Qo," for more information."),Qo.forEach(t),_s=f(Ze),w(we.$$.fragment,Ze),Ze.forEach(t),tn=f(o),te=l(o,"H2",{class:!0});var _n=i(te);Te=l(_n,"A",{id:!0,class:!0,href:!0});var Lr=i(Te);mt=l(Lr,"SPAN",{});var Hr=i(mt);w(He.$$.fragment,Hr),Hr.forEach(t),Lr.forEach(t),bs=f(_n),ft=l(_n,"SPAN",{});var Or=i(ft);ys=a(Or,"FalconModel"),Or.forEach(t),_n.forEach(t),nn=f(o),E=l(o,"DIV",{class:!0});var V=i(E);w(Oe.$$.fragment,V),vs=f(V),gt=l(V,"P",{});var Dr=i(gt);ws=a(Dr,"The bare Falcon Model transformer outputting raw hidden-states without any specific head on top."),Dr.forEach(t),Ts=f(V),De=l(V,"P",{});var bn=i(De);ks=a(bn,"This model inherits from "),xo=l(bn,"A",{href:!0});var Kr=i(xo);Fs=a(Kr,"PreTrainedModel"),Kr.forEach(t),Ms=a(bn,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings etc.)`),bn.forEach(t),$s=f(V),Ke=l(V,"P",{});var yn=i(Ke);Cs=a(yn,"This model is also a PyTorch "),eo=l(yn,"A",{href:!0,rel:!0});var el=i(eo);Js=a(el,"torch.nn.Module"),el.forEach(t),Es=a(yn,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),yn.forEach(t),js=f(V),q=l(V,"DIV",{class:!0});var qe=i(q);w(oo.$$.fragment,qe),zs=f(qe),ne=l(qe,"P",{});var Xo=i(ne);Is=a(Xo,"The "),Uo=l(Xo,"A",{href:!0});var ol=i(Uo);xs=a(ol,"FalconModel"),ol.forEach(t),Us=a(Xo," forward method, overrides the "),_t=l(Xo,"CODE",{});var tl=i(_t);Ws=a(tl,"__call__"),tl.forEach(t),Ns=a(Xo," special method."),Xo.forEach(t),Zs=f(qe),w(ke.$$.fragment,qe),qs=f(qe),w(Fe.$$.fragment,qe),qe.forEach(t),V.forEach(t),sn=f(o),se=l(o,"H2",{class:!0});var vn=i(se);Me=l(vn,"A",{id:!0,class:!0,href:!0});var nl=i(Me);bt=l(nl,"SPAN",{});var sl=i(bt);w(to.$$.fragment,sl),sl.forEach(t),nl.forEach(t),Rs=f(vn),yt=l(vn,"SPAN",{});var al=i(yt);Gs=a(al,"FalconForCausalLM"),al.forEach(t),vn.forEach(t),an=f(o),j=l(o,"DIV",{class:!0});var Q=i(j);w(no.$$.fragment,Q),As=f(Q),vt=l(Q,"P",{});var rl=i(vt);Ss=a(rl,"The Falcon Model transformer with a language modeling head on top (linear layer with weights tied to the input embeddings)."),rl.forEach(t),Ps=f(Q),so=l(Q,"P",{});var wn=i(so);Bs=a(wn,"This model inherits from "),Wo=l(wn,"A",{href:!0});var ll=i(Wo);Vs=a(ll,"PreTrainedModel"),ll.forEach(t),Qs=a(wn,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings etc.)`),wn.forEach(t),Xs=f(Q),ao=l(Q,"P",{});var Tn=i(ao);Ys=a(Tn,"This model is also a PyTorch "),ro=l(Tn,"A",{href:!0,rel:!0});var il=i(ro);Ls=a(il,"torch.nn.Module"),il.forEach(t),Hs=a(Tn,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Tn.forEach(t),Os=f(Q),R=l(Q,"DIV",{class:!0});var Re=i(R);w(lo.$$.fragment,Re),Ds=f(Re),ae=l(Re,"P",{});var Yo=i(ae);Ks=a(Yo,"The "),No=l(Yo,"A",{href:!0});var cl=i(No);ea=a(cl,"FalconForCausalLM"),cl.forEach(t),oa=a(Yo," forward method, overrides the "),wt=l(Yo,"CODE",{});var dl=i(wt);ta=a(dl,"__call__"),dl.forEach(t),na=a(Yo," special method."),Yo.forEach(t),sa=f(Re),w($e.$$.fragment,Re),aa=f(Re),w(Ce.$$.fragment,Re),Re.forEach(t),Q.forEach(t),rn=f(o),re=l(o,"H2",{class:!0});var kn=i(re);Je=l(kn,"A",{id:!0,class:!0,href:!0});var pl=i(Je);Tt=l(pl,"SPAN",{});var hl=i(Tt);w(io.$$.fragment,hl),hl.forEach(t),pl.forEach(t),ra=f(kn),kt=l(kn,"SPAN",{});var ul=i(kt);la=a(ul,"FalconForSequenceClassification"),ul.forEach(t),kn.forEach(t),ln=f(o),J=l(o,"DIV",{class:!0});var W=i(J);w(co.$$.fragment,W),ia=f(W),Ft=l(W,"P",{});var ml=i(Ft);ca=a(ml,"The Falcon Model transformer with a sequence classification head on top (linear layer)."),ml.forEach(t),da=f(W),Zo=l(W,"P",{});var Ir=i(Zo);qo=l(Ir,"A",{href:!0});var fl=i(qo);pa=a(fl,"FalconForSequenceClassification"),fl.forEach(t),ha=a(Ir,` uses the last token in order to do the classification, as other causal models
(e.g. GPT-1) do.`),Ir.forEach(t),ua=f(W),Z=l(W,"P",{});var X=i(Z);ma=a(X,`Since it does classification on the last token, it requires to know the position of the last token. If a
`),Mt=l(X,"CODE",{});var gl=i(Mt);fa=a(gl,"pad_token_id"),gl.forEach(t),ga=a(X,` is defined in the configuration, it finds the last token that is not a padding token in each row. If
no `),$t=l(X,"CODE",{});var _l=i($t);_a=a(_l,"pad_token_id"),_l.forEach(t),ba=a(X,` is defined, it simply takes the last value in each row of the batch. Since it cannot guess the
padding tokens when `),Ct=l(X,"CODE",{});var bl=i(Ct);ya=a(bl,"inputs_embeds"),bl.forEach(t),va=a(X," are passed instead of "),Jt=l(X,"CODE",{});var yl=i(Jt);wa=a(yl,"input_ids"),yl.forEach(t),Ta=a(X,`, it does the same (take the last value in
each row of the batch).`),X.forEach(t),ka=f(W),po=l(W,"P",{});var Fn=i(po);Fa=a(Fn,"This model inherits from "),Ro=l(Fn,"A",{href:!0});var vl=i(Ro);Ma=a(vl,"PreTrainedModel"),vl.forEach(t),$a=a(Fn,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings etc.)`),Fn.forEach(t),Ca=f(W),ho=l(W,"P",{});var Mn=i(ho);Ja=a(Mn,"This model is also a PyTorch "),uo=l(Mn,"A",{href:!0,rel:!0});var wl=i(uo);Ea=a(wl,"torch.nn.Module"),wl.forEach(t),ja=a(Mn,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Mn.forEach(t),za=f(W),U=l(W,"DIV",{class:!0});var Y=i(U);w(mo.$$.fragment,Y),Ia=f(Y),le=l(Y,"P",{});var Lo=i(le);xa=a(Lo,"The "),Go=l(Lo,"A",{href:!0});var Tl=i(Go);Ua=a(Tl,"FalconForSequenceClassification"),Tl.forEach(t),Wa=a(Lo," forward method, overrides the "),Et=l(Lo,"CODE",{});var kl=i(Et);Na=a(kl,"__call__"),kl.forEach(t),Za=a(Lo," special method."),Lo.forEach(t),qa=f(Y),w(Ee.$$.fragment,Y),Ra=f(Y),w(je.$$.fragment,Y),Ga=f(Y),w(ze.$$.fragment,Y),Y.forEach(t),W.forEach(t),cn=f(o),ie=l(o,"H2",{class:!0});var $n=i(ie);Ie=l($n,"A",{id:!0,class:!0,href:!0});var Fl=i(Ie);jt=l(Fl,"SPAN",{});var Ml=i(jt);w(fo.$$.fragment,Ml),Ml.forEach(t),Fl.forEach(t),Aa=f($n),zt=l($n,"SPAN",{});var $l=i(zt);Sa=a($l,"FalconForTokenClassification"),$l.forEach(t),$n.forEach(t),dn=f(o),z=l(o,"DIV",{class:!0});var L=i(z);w(go.$$.fragment,L),Pa=f(L),It=l(L,"P",{});var Cl=i(It);Ba=a(Cl,`Falcon Model 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.`),Cl.forEach(t),Va=f(L),_o=l(L,"P",{});var Cn=i(_o);Qa=a(Cn,"This model inherits from "),Ao=l(Cn,"A",{href:!0});var Jl=i(Ao);Xa=a(Jl,"PreTrainedModel"),Jl.forEach(t),Ya=a(Cn,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings etc.)`),Cn.forEach(t),La=f(L),bo=l(L,"P",{});var Jn=i(bo);Ha=a(Jn,"This model is also a PyTorch "),yo=l(Jn,"A",{href:!0,rel:!0});var El=i(yo);Oa=a(El,"torch.nn.Module"),El.forEach(t),Da=a(Jn,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Jn.forEach(t),Ka=f(L),G=l(L,"DIV",{class:!0});var Ge=i(G);w(vo.$$.fragment,Ge),er=f(Ge),ce=l(Ge,"P",{});var Ho=i(ce);or=a(Ho,"The "),So=l(Ho,"A",{href:!0});var jl=i(So);tr=a(jl,"FalconForTokenClassification"),jl.forEach(t),nr=a(Ho," forward method, overrides the "),xt=l(Ho,"CODE",{});var zl=i(xt);sr=a(zl,"__call__"),zl.forEach(t),ar=a(Ho," special method."),Ho.forEach(t),rr=f(Ge),w(xe.$$.fragment,Ge),lr=f(Ge),w(Ue.$$.fragment,Ge),Ge.forEach(t),L.forEach(t),pn=f(o),de=l(o,"H2",{class:!0});var En=i(de);We=l(En,"A",{id:!0,class:!0,href:!0});var Il=i(We);Ut=l(Il,"SPAN",{});var xl=i(Ut);w(wo.$$.fragment,xl),xl.forEach(t),Il.forEach(t),ir=f(En),Wt=l(En,"SPAN",{});var Ul=i(Wt);cr=a(Ul,"FalconForQuestionAnswering"),Ul.forEach(t),En.forEach(t),hn=f(o),I=l(o,"DIV",{class:!0});var H=i(I);w(To.$$.fragment,H),dr=f(H),pe=l(H,"P",{});var Oo=i(pe);pr=a(Oo,`The Falcon Model transformer with a span classification head on top for extractive question-answering tasks like
SQuAD (a linear layers on top of the hidden-states output to compute `),Nt=l(Oo,"CODE",{});var Wl=i(Nt);hr=a(Wl,"span start logits"),Wl.forEach(t),ur=a(Oo," and "),Zt=l(Oo,"CODE",{});var Nl=i(Zt);mr=a(Nl,"span end logits"),Nl.forEach(t),fr=a(Oo,")."),Oo.forEach(t),gr=f(H),ko=l(H,"P",{});var jn=i(ko);_r=a(jn,"This model inherits from "),Po=l(jn,"A",{href:!0});var Zl=i(Po);br=a(Zl,"PreTrainedModel"),Zl.forEach(t),yr=a(jn,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings etc.)`),jn.forEach(t),vr=f(H),Fo=l(H,"P",{});var zn=i(Fo);wr=a(zn,"This model is also a PyTorch "),Mo=l(zn,"A",{href:!0,rel:!0});var ql=i(Mo);Tr=a(ql,"torch.nn.Module"),ql.forEach(t),kr=a(zn,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),zn.forEach(t),Fr=f(H),P=l(H,"DIV",{class:!0});var Do=i(P);w($o.$$.fragment,Do),Mr=f(Do),he=l(Do,"P",{});var Ko=i(he);$r=a(Ko,"The "),Bo=l(Ko,"A",{href:!0});var Rl=i(Bo);Cr=a(Rl,"FalconForQuestionAnswering"),Rl.forEach(t),Jr=a(Ko," forward method, overrides the "),qt=l(Ko,"CODE",{});var Gl=i(qt);Er=a(Gl,"__call__"),Gl.forEach(t),jr=a(Ko," special method."),Ko.forEach(t),zr=f(Do),w(Ne.$$.fragment,Do),Do.forEach(t),H.forEach(t),this.h()},h(){p(c,"name","hf:doc:metadata"),p(c,"content",JSON.stringify(ai)),p(h,"id","falcon"),p(h,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),p(h,"href","#falcon"),p(u,"class","relative group"),p(fe,"id","overview"),p(fe,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),p(fe,"href","#overview"),p(O,"class","relative group"),p(Se,"href","https://www.tii.ae/"),p(Se,"rel","nofollow"),p(Pe,"href","https://arxiv.org/abs/2306.01116"),p(Pe,"rel","nofollow"),p(Be,"href","https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard"),p(Be,"rel","nofollow"),p(be,"id","converting-custom-checkpoints"),p(be,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),p(be,"href","#converting-custom-checkpoints"),p(D,"class","relative group"),p(Qe,"href","https://github.com/huggingface/transformers/tree/main/src/transformers/models/falcon"),p(Qe,"rel","nofollow"),p(ve,"id","transformers.FalconConfig"),p(ve,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),p(ve,"href","#transformers.FalconConfig"),p(K,"class","relative group"),p(jo,"href","/docs/transformers/main/en/model_doc/falcon#transformers.FalconModel"),p(Le,"href","https://huggingface.co/tiiuae/falcon-7b"),p(Le,"rel","nofollow"),p(zo,"href","/docs/transformers/main/en/main_classes/configuration#transformers.PretrainedConfig"),p(Io,"href","/docs/transformers/main/en/main_classes/configuration#transformers.PretrainedConfig"),p(N,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(Te,"id","transformers.FalconModel"),p(Te,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),p(Te,"href","#transformers.FalconModel"),p(te,"class","relative group"),p(xo,"href","/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel"),p(eo,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),p(eo,"rel","nofollow"),p(Uo,"href","/docs/transformers/main/en/model_doc/falcon#transformers.FalconModel"),p(q,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(E,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(Me,"id","transformers.FalconForCausalLM"),p(Me,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),p(Me,"href","#transformers.FalconForCausalLM"),p(se,"class","relative group"),p(Wo,"href","/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel"),p(ro,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),p(ro,"rel","nofollow"),p(No,"href","/docs/transformers/main/en/model_doc/falcon#transformers.FalconForCausalLM"),p(R,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(j,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(Je,"id","transformers.FalconForSequenceClassification"),p(Je,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),p(Je,"href","#transformers.FalconForSequenceClassification"),p(re,"class","relative group"),p(qo,"href","/docs/transformers/main/en/model_doc/falcon#transformers.FalconForSequenceClassification"),p(Ro,"href","/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel"),p(uo,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),p(uo,"rel","nofollow"),p(Go,"href","/docs/transformers/main/en/model_doc/falcon#transformers.FalconForSequenceClassification"),p(U,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(J,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(Ie,"id","transformers.FalconForTokenClassification"),p(Ie,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),p(Ie,"href","#transformers.FalconForTokenClassification"),p(ie,"class","relative group"),p(Ao,"href","/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel"),p(yo,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),p(yo,"rel","nofollow"),p(So,"href","/docs/transformers/main/en/model_doc/falcon#transformers.FalconForTokenClassification"),p(G,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(We,"id","transformers.FalconForQuestionAnswering"),p(We,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),p(We,"href","#transformers.FalconForQuestionAnswering"),p(de,"class","relative group"),p(Po,"href","/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel"),p(Mo,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),p(Mo,"rel","nofollow"),p(Bo,"href","/docs/transformers/main/en/model_doc/falcon#transformers.FalconForQuestionAnswering"),p(P,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(I,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(o,g){e(document.head,c),b(o,y,g),b(o,u,g),e(u,h),e(h,_),T(n,_,null),e(u,d),e(u,C),e(C,In),b(o,Xt,g),b(o,O,g),e(O,fe),e(fe,st),T(Ae,st,null),e(O,xn),e(O,at),e(at,Un),b(o,Yt,g),b(o,S,g),e(S,Wn),e(S,Se),e(Se,Nn),e(S,Zn),e(S,Pe),e(Pe,qn),e(S,Rn),b(o,Lt,g),b(o,ge,g),e(ge,Gn),e(ge,rt),e(rt,An),e(ge,Sn),b(o,Ht,g),b(o,_e,g),e(_e,Pn),e(_e,Be),e(Be,Bn),e(_e,Vn),b(o,Ot,g),b(o,D,g),e(D,be),e(be,lt),T(Ve,lt,null),e(D,Qn),e(D,it),e(it,Xn),b(o,Dt,g),T(ye,o,g),b(o,Kt,g),b(o,x,g),e(x,Yn),e(x,ct),e(ct,Ln),e(x,Hn),e(x,Qe),e(Qe,On),e(x,Dn),e(x,dt),e(dt,Kn),e(x,es),e(x,pt),e(pt,os),e(x,ts),b(o,en,g),b(o,K,g),e(K,ve),e(ve,ht),T(Xe,ht,null),e(K,ns),e(K,ut),e(ut,ss),b(o,on,g),b(o,N,g),T(Ye,N,null),e(N,as),e(N,ee),e(ee,rs),e(ee,jo),e(jo,ls),e(ee,is),e(ee,Le),e(Le,cs),e(ee,ds),e(N,ps),e(N,oe),e(oe,hs),e(oe,zo),e(zo,us),e(oe,ms),e(oe,Io),e(Io,fs),e(oe,gs),e(N,_s),T(we,N,null),b(o,tn,g),b(o,te,g),e(te,Te),e(Te,mt),T(He,mt,null),e(te,bs),e(te,ft),e(ft,ys),b(o,nn,g),b(o,E,g),T(Oe,E,null),e(E,vs),e(E,gt),e(gt,ws),e(E,Ts),e(E,De),e(De,ks),e(De,xo),e(xo,Fs),e(De,Ms),e(E,$s),e(E,Ke),e(Ke,Cs),e(Ke,eo),e(eo,Js),e(Ke,Es),e(E,js),e(E,q),T(oo,q,null),e(q,zs),e(q,ne),e(ne,Is),e(ne,Uo),e(Uo,xs),e(ne,Us),e(ne,_t),e(_t,Ws),e(ne,Ns),e(q,Zs),T(ke,q,null),e(q,qs),T(Fe,q,null),b(o,sn,g),b(o,se,g),e(se,Me),e(Me,bt),T(to,bt,null),e(se,Rs),e(se,yt),e(yt,Gs),b(o,an,g),b(o,j,g),T(no,j,null),e(j,As),e(j,vt),e(vt,Ss),e(j,Ps),e(j,so),e(so,Bs),e(so,Wo),e(Wo,Vs),e(so,Qs),e(j,Xs),e(j,ao),e(ao,Ys),e(ao,ro),e(ro,Ls),e(ao,Hs),e(j,Os),e(j,R),T(lo,R,null),e(R,Ds),e(R,ae),e(ae,Ks),e(ae,No),e(No,ea),e(ae,oa),e(ae,wt),e(wt,ta),e(ae,na),e(R,sa),T($e,R,null),e(R,aa),T(Ce,R,null),b(o,rn,g),b(o,re,g),e(re,Je),e(Je,Tt),T(io,Tt,null),e(re,ra),e(re,kt),e(kt,la),b(o,ln,g),b(o,J,g),T(co,J,null),e(J,ia),e(J,Ft),e(Ft,ca),e(J,da),e(J,Zo),e(Zo,qo),e(qo,pa),e(Zo,ha),e(J,ua),e(J,Z),e(Z,ma),e(Z,Mt),e(Mt,fa),e(Z,ga),e(Z,$t),e($t,_a),e(Z,ba),e(Z,Ct),e(Ct,ya),e(Z,va),e(Z,Jt),e(Jt,wa),e(Z,Ta),e(J,ka),e(J,po),e(po,Fa),e(po,Ro),e(Ro,Ma),e(po,$a),e(J,Ca),e(J,ho),e(ho,Ja),e(ho,uo),e(uo,Ea),e(ho,ja),e(J,za),e(J,U),T(mo,U,null),e(U,Ia),e(U,le),e(le,xa),e(le,Go),e(Go,Ua),e(le,Wa),e(le,Et),e(Et,Na),e(le,Za),e(U,qa),T(Ee,U,null),e(U,Ra),T(je,U,null),e(U,Ga),T(ze,U,null),b(o,cn,g),b(o,ie,g),e(ie,Ie),e(Ie,jt),T(fo,jt,null),e(ie,Aa),e(ie,zt),e(zt,Sa),b(o,dn,g),b(o,z,g),T(go,z,null),e(z,Pa),e(z,It),e(It,Ba),e(z,Va),e(z,_o),e(_o,Qa),e(_o,Ao),e(Ao,Xa),e(_o,Ya),e(z,La),e(z,bo),e(bo,Ha),e(bo,yo),e(yo,Oa),e(bo,Da),e(z,Ka),e(z,G),T(vo,G,null),e(G,er),e(G,ce),e(ce,or),e(ce,So),e(So,tr),e(ce,nr),e(ce,xt),e(xt,sr),e(ce,ar),e(G,rr),T(xe,G,null),e(G,lr),T(Ue,G,null),b(o,pn,g),b(o,de,g),e(de,We),e(We,Ut),T(wo,Ut,null),e(de,ir),e(de,Wt),e(Wt,cr),b(o,hn,g),b(o,I,g),T(To,I,null),e(I,dr),e(I,pe),e(pe,pr),e(pe,Nt),e(Nt,hr),e(pe,ur),e(pe,Zt),e(Zt,mr),e(pe,fr),e(I,gr),e(I,ko),e(ko,_r),e(ko,Po),e(Po,br),e(ko,yr),e(I,vr),e(I,Fo),e(Fo,wr),e(Fo,Mo),e(Mo,Tr),e(Fo,kr),e(I,Fr),e(I,P),T($o,P,null),e(P,Mr),e(P,he),e(he,$r),e(he,Bo),e(Bo,Cr),e(he,Jr),e(he,qt),e(qt,Er),e(he,jr),e(P,zr),T(Ne,P,null),un=!0},p(o,[g]){const Co={};g&2&&(Co.$$scope={dirty:g,ctx:o}),ye.$set(Co);const Rt={};g&2&&(Rt.$$scope={dirty:g,ctx:o}),we.$set(Rt);const Gt={};g&2&&(Gt.$$scope={dirty:g,ctx:o}),ke.$set(Gt);const At={};g&2&&(At.$$scope={dirty:g,ctx:o}),Fe.$set(At);const Jo={};g&2&&(Jo.$$scope={dirty:g,ctx:o}),$e.$set(Jo);const St={};g&2&&(St.$$scope={dirty:g,ctx:o}),Ce.$set(St);const Pt={};g&2&&(Pt.$$scope={dirty:g,ctx:o}),Ee.$set(Pt);const Bt={};g&2&&(Bt.$$scope={dirty:g,ctx:o}),je.$set(Bt);const ue={};g&2&&(ue.$$scope={dirty:g,ctx:o}),ze.$set(ue);const Vt={};g&2&&(Vt.$$scope={dirty:g,ctx:o}),xe.$set(Vt);const Qt={};g&2&&(Qt.$$scope={dirty:g,ctx:o}),Ue.$set(Qt);const Eo={};g&2&&(Eo.$$scope={dirty:g,ctx:o}),Ne.$set(Eo)},i(o){un||(k(n.$$.fragment,o),k(Ae.$$.fragment,o),k(Ve.$$.fragment,o),k(ye.$$.fragment,o),k(Xe.$$.fragment,o),k(Ye.$$.fragment,o),k(we.$$.fragment,o),k(He.$$.fragment,o),k(Oe.$$.fragment,o),k(oo.$$.fragment,o),k(ke.$$.fragment,o),k(Fe.$$.fragment,o),k(to.$$.fragment,o),k(no.$$.fragment,o),k(lo.$$.fragment,o),k($e.$$.fragment,o),k(Ce.$$.fragment,o),k(io.$$.fragment,o),k(co.$$.fragment,o),k(mo.$$.fragment,o),k(Ee.$$.fragment,o),k(je.$$.fragment,o),k(ze.$$.fragment,o),k(fo.$$.fragment,o),k(go.$$.fragment,o),k(vo.$$.fragment,o),k(xe.$$.fragment,o),k(Ue.$$.fragment,o),k(wo.$$.fragment,o),k(To.$$.fragment,o),k($o.$$.fragment,o),k(Ne.$$.fragment,o),un=!0)},o(o){F(n.$$.fragment,o),F(Ae.$$.fragment,o),F(Ve.$$.fragment,o),F(ye.$$.fragment,o),F(Xe.$$.fragment,o),F(Ye.$$.fragment,o),F(we.$$.fragment,o),F(He.$$.fragment,o),F(Oe.$$.fragment,o),F(oo.$$.fragment,o),F(ke.$$.fragment,o),F(Fe.$$.fragment,o),F(to.$$.fragment,o),F(no.$$.fragment,o),F(lo.$$.fragment,o),F($e.$$.fragment,o),F(Ce.$$.fragment,o),F(io.$$.fragment,o),F(co.$$.fragment,o),F(mo.$$.fragment,o),F(Ee.$$.fragment,o),F(je.$$.fragment,o),F(ze.$$.fragment,o),F(fo.$$.fragment,o),F(go.$$.fragment,o),F(vo.$$.fragment,o),F(xe.$$.fragment,o),F(Ue.$$.fragment,o),F(wo.$$.fragment,o),F(To.$$.fragment,o),F($o.$$.fragment,o),F(Ne.$$.fragment,o),un=!1},d(o){t(c),o&&t(y),o&&t(u),M(n),o&&t(Xt),o&&t(O),M(Ae),o&&t(Yt),o&&t(S),o&&t(Lt),o&&t(ge),o&&t(Ht),o&&t(_e),o&&t(Ot),o&&t(D),M(Ve),o&&t(Dt),M(ye,o),o&&t(Kt),o&&t(x),o&&t(en),o&&t(K),M(Xe),o&&t(on),o&&t(N),M(Ye),M(we),o&&t(tn),o&&t(te),M(He),o&&t(nn),o&&t(E),M(Oe),M(oo),M(ke),M(Fe),o&&t(sn),o&&t(se),M(to),o&&t(an),o&&t(j),M(no),M(lo),M($e),M(Ce),o&&t(rn),o&&t(re),M(io),o&&t(ln),o&&t(J),M(co),M(mo),M(Ee),M(je),M(ze),o&&t(cn),o&&t(ie),M(fo),o&&t(dn),o&&t(z),M(go),M(vo),M(xe),M(Ue),o&&t(pn),o&&t(de),M(wo),o&&t(hn),o&&t(I),M(To),M($o),M(Ne)}}}const ai={local:"falcon",sections:[{local:"overview",title:"Overview"},{local:"converting-custom-checkpoints",title:"Converting custom checkpoints "},{local:"transformers.FalconConfig",title:"FalconConfig"},{local:"transformers.FalconModel",title:"FalconModel"},{local:"transformers.FalconForCausalLM",title:"FalconForCausalLM"},{local:"transformers.FalconForSequenceClassification",title:"FalconForSequenceClassification"},{local:"transformers.FalconForTokenClassification",title:"FalconForTokenClassification"},{local:"transformers.FalconForQuestionAnswering",title:"FalconForQuestionAnswering"}],title:"Falcon"};function ri($){return Vl(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class ui extends Al{constructor(c){super();Sl(this,c,ri,si,Pl,{})}}export{ui as default,ai as metadata};
