import{S as Jb,i as Ub,s as zb,e as a,k as p,w as v,t as n,M as Nb,c as r,d as t,m as u,a as l,x as w,h as s,b as f,N as Cb,G as e,g as _,y as k,q as M,o as F,B as $,v as Ib,L as Oe}from"../../chunks/vendor-hf-doc-builder.js";import{T as Le}from"../../chunks/Tip-hf-doc-builder.js";import{D as le}from"../../chunks/Docstring-hf-doc-builder.js";import{C as Ke}from"../../chunks/CodeBlock-hf-doc-builder.js";import{I as Pe}from"../../chunks/IconCopyLink-hf-doc-builder.js";import{E as He}from"../../chunks/ExampleCodeBlock-hf-doc-builder.js";function xb(U){let d,T,h,m,y;return m=new Ke({props:{code:"MCUyMDAlMjAwJTIwMCUyMDAlMjAwJTIwMCUyMDAlMjAwJTIwMCUyMDAlMjAxJTIwMSUyMDElMjAxJTIwMSUyMDElMjAxJTIwMSUyMDElMEElN0MlMjBmaXJzdCUyMHNlcXVlbmNlJTIwJTIwJTIwJTIwJTdDJTIwc2Vjb25kJTIwc2VxdWVuY2UlMjAlN0M=",highlighted:`0<span class="hljs-number"> 0 </span>0<span class="hljs-number"> 0 </span>0<span class="hljs-number"> 0 </span>0<span class="hljs-number"> 0 </span>0<span class="hljs-number"> 0 </span>0<span class="hljs-number"> 1 </span>1<span class="hljs-number"> 1 </span>1<span class="hljs-number"> 1 </span>1<span class="hljs-number"> 1 </span>1 1
| first sequence    | second sequence |`}}),{c(){d=a("p"),T=n("pair mask has the following format:"),h=p(),v(m.$$.fragment)},l(i){d=r(i,"P",{});var c=l(d);T=s(c,"pair mask has the following format:"),c.forEach(t),h=u(i),w(m.$$.fragment,i)},m(i,c){_(i,d,c),e(d,T),_(i,h,c),k(m,i,c),y=!0},p:Oe,i(i){y||(M(m.$$.fragment,i),y=!0)},o(i){F(m.$$.fragment,i),y=!1},d(i){i&&t(d),i&&t(h),$(m,i)}}}function Wb(U){let d,T,h,m,y;return{c(){d=a("p"),T=n("Although the recipe for forward pass needs to be defined within this function, one should call the "),h=a("code"),m=n("Module"),y=n(`
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(i){d=r(i,"P",{});var c=l(d);T=s(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),h=r(c,"CODE",{});var J=l(h);m=s(J,"Module"),J.forEach(t),y=s(c,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),c.forEach(t)},m(i,c){_(i,d,c),e(d,T),e(d,h),e(h,m),e(d,y)},d(i){i&&t(d)}}}function Zb(U){let d,T,h,m,y;return m=new Ke({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBGbGF1YmVydE1vZGVsJTBBaW1wb3J0JTIwdG9yY2glMEElMEF0b2tlbml6ZXIlMjAlM0QlMjBBdXRvVG9rZW5pemVyLmZyb21fcHJldHJhaW5lZCglMjJmbGF1YmVydCUyRmZsYXViZXJ0X2Jhc2VfY2FzZWQlMjIpJTBBbW9kZWwlMjAlM0QlMjBGbGF1YmVydE1vZGVsLmZyb21fcHJldHJhaW5lZCglMjJmbGF1YmVydCUyRmZsYXViZXJ0X2Jhc2VfY2FzZWQlMjIpJTBBJTBBaW5wdXRzJTIwJTNEJTIwdG9rZW5pemVyKCUyMkhlbGxvJTJDJTIwbXklMjBkb2clMjBpcyUyMGN1dGUlMjIlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKSUwQW91dHB1dHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cyklMEElMEFsYXN0X2hpZGRlbl9zdGF0ZXMlMjAlM0QlMjBvdXRwdXRzLmxhc3RfaGlkZGVuX3N0YXRl",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, FlaubertModel
<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;flaubert/flaubert_base_cased&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = FlaubertModel.from_pretrained(<span class="hljs-string">&quot;flaubert/flaubert_base_cased&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(){d=a("p"),T=n("Example:"),h=p(),v(m.$$.fragment)},l(i){d=r(i,"P",{});var c=l(d);T=s(c,"Example:"),c.forEach(t),h=u(i),w(m.$$.fragment,i)},m(i,c){_(i,d,c),e(d,T),_(i,h,c),k(m,i,c),y=!0},p:Oe,i(i){y||(M(m.$$.fragment,i),y=!0)},o(i){F(m.$$.fragment,i),y=!1},d(i){i&&t(d),i&&t(h),$(m,i)}}}function qb(U){let d,T,h,m,y;return{c(){d=a("p"),T=n("Although the recipe for forward pass needs to be defined within this function, one should call the "),h=a("code"),m=n("Module"),y=n(`
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(i){d=r(i,"P",{});var c=l(d);T=s(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),h=r(c,"CODE",{});var J=l(h);m=s(J,"Module"),J.forEach(t),y=s(c,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),c.forEach(t)},m(i,c){_(i,d,c),e(d,T),e(d,h),e(h,m),e(d,y)},d(i){i&&t(d)}}}function Vb(U){let d,T,h,m,y;return m=new Ke({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBGbGF1YmVydFdpdGhMTUhlYWRNb2RlbCUwQWltcG9ydCUyMHRvcmNoJTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIyZmxhdWJlcnQlMkZmbGF1YmVydF9iYXNlX2Nhc2VkJTIyKSUwQW1vZGVsJTIwJTNEJTIwRmxhdWJlcnRXaXRoTE1IZWFkTW9kZWwuZnJvbV9wcmV0cmFpbmVkKCUyMmZsYXViZXJ0JTJGZmxhdWJlcnRfYmFzZV9jYXNlZCUyMiklMEElMEFpbnB1dHMlMjAlM0QlMjB0b2tlbml6ZXIoJTIyVGhlJTIwY2FwaXRhbCUyMG9mJTIwRnJhbmNlJTIwaXMlMjAlM0NzcGVjaWFsMSUzRS4lMjIlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKSUwQSUwQXdpdGglMjB0b3JjaC5ub19ncmFkKCklM0ElMEElMjAlMjAlMjAlMjBsb2dpdHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cykubG9naXRzJTBBJTBBJTIzJTIwcmV0cmlldmUlMjBpbmRleCUyMG9mJTIwJTNDc3BlY2lhbDElM0UlMEFtYXNrX3Rva2VuX2luZGV4JTIwJTNEJTIwKGlucHV0cy5pbnB1dF9pZHMlMjAlM0QlM0QlMjB0b2tlbml6ZXIubWFza190b2tlbl9pZCklNUIwJTVELm5vbnplcm8oYXNfdHVwbGUlM0RUcnVlKSU1QjAlNUQlMEElMEFwcmVkaWN0ZWRfdG9rZW5faWQlMjAlM0QlMjBsb2dpdHMlNUIwJTJDJTIwbWFza190b2tlbl9pbmRleCU1RC5hcmdtYXgoYXhpcyUzRC0xKSUwQSUwQWxhYmVscyUyMCUzRCUyMHRva2VuaXplciglMjJUaGUlMjBjYXBpdGFsJTIwb2YlMjBGcmFuY2UlMjBpcyUyMFBhcmlzLiUyMiUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIycHQlMjIpJTVCJTIyaW5wdXRfaWRzJTIyJTVEJTBBJTIzJTIwbWFzayUyMGxhYmVscyUyMG9mJTIwbm9uLSUzQ3NwZWNpYWwxJTNFJTIwdG9rZW5zJTBBbGFiZWxzJTIwJTNEJTIwdG9yY2gud2hlcmUoaW5wdXRzLmlucHV0X2lkcyUyMCUzRCUzRCUyMHRva2VuaXplci5tYXNrX3Rva2VuX2lkJTJDJTIwbGFiZWxzJTJDJTIwLTEwMCklMEElMEFvdXRwdXRzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMlMkMlMjBsYWJlbHMlM0RsYWJlbHMp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, FlaubertWithLMHeadModel
<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;flaubert/flaubert_base_cased&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = FlaubertWithLMHeadModel.from_pretrained(<span class="hljs-string">&quot;flaubert/flaubert_base_cased&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(<span class="hljs-string">&quot;The capital of France is &lt;special1&gt;.&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><span class="hljs-comment"># retrieve index of &lt;special1&gt;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>mask_token_index = (inputs.input_ids == tokenizer.mask_token_id)[<span class="hljs-number">0</span>].nonzero(as_tuple=<span class="hljs-literal">True</span>)[<span class="hljs-number">0</span>]

<span class="hljs-meta">&gt;&gt;&gt; </span>predicted_token_id = logits[<span class="hljs-number">0</span>, mask_token_index].argmax(axis=-<span class="hljs-number">1</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>labels = tokenizer(<span class="hljs-string">&quot;The capital of France is Paris.&quot;</span>, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)[<span class="hljs-string">&quot;input_ids&quot;</span>]
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># mask labels of non-&lt;special1&gt; tokens</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>labels = torch.where(inputs.input_ids == tokenizer.mask_token_id, labels, -<span class="hljs-number">100</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs, labels=labels)`}}),{c(){d=a("p"),T=n("Example:"),h=p(),v(m.$$.fragment)},l(i){d=r(i,"P",{});var c=l(d);T=s(c,"Example:"),c.forEach(t),h=u(i),w(m.$$.fragment,i)},m(i,c){_(i,d,c),e(d,T),_(i,h,c),k(m,i,c),y=!0},p:Oe,i(i){y||(M(m.$$.fragment,i),y=!0)},o(i){F(m.$$.fragment,i),y=!1},d(i){i&&t(d),i&&t(h),$(m,i)}}}function Bb(U){let d,T,h,m,y;return{c(){d=a("p"),T=n("Although the recipe for forward pass needs to be defined within this function, one should call the "),h=a("code"),m=n("Module"),y=n(`
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(i){d=r(i,"P",{});var c=l(d);T=s(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),h=r(c,"CODE",{});var J=l(h);m=s(J,"Module"),J.forEach(t),y=s(c,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),c.forEach(t)},m(i,c){_(i,d,c),e(d,T),e(d,h),e(h,m),e(d,y)},d(i){i&&t(d)}}}function Gb(U){let d,T,h,m,y;return m=new Ke({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwQXV0b1Rva2VuaXplciUyQyUyMEZsYXViZXJ0Rm9yU2VxdWVuY2VDbGFzc2lmaWNhdGlvbiUwQSUwQXRva2VuaXplciUyMCUzRCUyMEF1dG9Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMmZsYXViZXJ0JTJGZmxhdWJlcnRfYmFzZV9jYXNlZCUyMiklMEFtb2RlbCUyMCUzRCUyMEZsYXViZXJ0Rm9yU2VxdWVuY2VDbGFzc2lmaWNhdGlvbi5mcm9tX3ByZXRyYWluZWQoJTIyZmxhdWJlcnQlMkZmbGF1YmVydF9iYXNlX2Nhc2VkJTIyKSUwQSUwQWlucHV0cyUyMCUzRCUyMHRva2VuaXplciglMjJIZWxsbyUyQyUyMG15JTIwZG9nJTIwaXMlMjBjdXRlJTIyJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMiklMEElMEF3aXRoJTIwdG9yY2gubm9fZ3JhZCgpJTNBJTBBJTIwJTIwJTIwJTIwbG9naXRzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMpLmxvZ2l0cyUwQSUwQXByZWRpY3RlZF9jbGFzc19pZCUyMCUzRCUyMGxvZ2l0cy5hcmdtYXgoKS5pdGVtKCklMEElMEElMjMlMjBUbyUyMHRyYWluJTIwYSUyMG1vZGVsJTIwb24lMjAlNjBudW1fbGFiZWxzJTYwJTIwY2xhc3NlcyUyQyUyMHlvdSUyMGNhbiUyMHBhc3MlMjAlNjBudW1fbGFiZWxzJTNEbnVtX2xhYmVscyU2MCUyMHRvJTIwJTYwLmZyb21fcHJldHJhaW5lZCguLi4pJTYwJTBBbnVtX2xhYmVscyUyMCUzRCUyMGxlbihtb2RlbC5jb25maWcuaWQybGFiZWwpJTBBbW9kZWwlMjAlM0QlMjBGbGF1YmVydEZvclNlcXVlbmNlQ2xhc3NpZmljYXRpb24uZnJvbV9wcmV0cmFpbmVkKCUyMmZsYXViZXJ0JTJGZmxhdWJlcnRfYmFzZV9jYXNlZCUyMiUyQyUyMG51bV9sYWJlbHMlM0RudW1fbGFiZWxzKSUwQSUwQWxhYmVscyUyMCUzRCUyMHRvcmNoLnRlbnNvciglNUIxJTVEKSUwQWxvc3MlMjAlM0QlMjBtb2RlbCgqKmlucHV0cyUyQyUyMGxhYmVscyUzRGxhYmVscykubG9zcw==",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, FlaubertForSequenceClassification

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;flaubert/flaubert_base_cased&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = FlaubertForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;flaubert/flaubert_base_cased&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 = FlaubertForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;flaubert/flaubert_base_cased&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(){d=a("p"),T=n("Example of single-label classification:"),h=p(),v(m.$$.fragment)},l(i){d=r(i,"P",{});var c=l(d);T=s(c,"Example of single-label classification:"),c.forEach(t),h=u(i),w(m.$$.fragment,i)},m(i,c){_(i,d,c),e(d,T),_(i,h,c),k(m,i,c),y=!0},p:Oe,i(i){y||(M(m.$$.fragment,i),y=!0)},o(i){F(m.$$.fragment,i),y=!1},d(i){i&&t(d),i&&t(h),$(m,i)}}}function Rb(U){let d,T,h,m,y;return m=new Ke({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwQXV0b1Rva2VuaXplciUyQyUyMEZsYXViZXJ0Rm9yU2VxdWVuY2VDbGFzc2lmaWNhdGlvbiUwQSUwQXRva2VuaXplciUyMCUzRCUyMEF1dG9Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMmZsYXViZXJ0JTJGZmxhdWJlcnRfYmFzZV9jYXNlZCUyMiklMEFtb2RlbCUyMCUzRCUyMEZsYXViZXJ0Rm9yU2VxdWVuY2VDbGFzc2lmaWNhdGlvbi5mcm9tX3ByZXRyYWluZWQoJTIyZmxhdWJlcnQlMkZmbGF1YmVydF9iYXNlX2Nhc2VkJTIyJTJDJTIwcHJvYmxlbV90eXBlJTNEJTIybXVsdGlfbGFiZWxfY2xhc3NpZmljYXRpb24lMjIpJTBBJTBBaW5wdXRzJTIwJTNEJTIwdG9rZW5pemVyKCUyMkhlbGxvJTJDJTIwbXklMjBkb2clMjBpcyUyMGN1dGUlMjIlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKSUwQSUwQXdpdGglMjB0b3JjaC5ub19ncmFkKCklM0ElMEElMjAlMjAlMjAlMjBsb2dpdHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cykubG9naXRzJTBBJTBBcHJlZGljdGVkX2NsYXNzX2lkcyUyMCUzRCUyMHRvcmNoLmFyYW5nZSgwJTJDJTIwbG9naXRzLnNoYXBlJTVCLTElNUQpJTVCdG9yY2guc2lnbW9pZChsb2dpdHMpLnNxdWVlemUoZGltJTNEMCklMjAlM0UlMjAwLjUlNUQlMEElMEElMjMlMjBUbyUyMHRyYWluJTIwYSUyMG1vZGVsJTIwb24lMjAlNjBudW1fbGFiZWxzJTYwJTIwY2xhc3NlcyUyQyUyMHlvdSUyMGNhbiUyMHBhc3MlMjAlNjBudW1fbGFiZWxzJTNEbnVtX2xhYmVscyU2MCUyMHRvJTIwJTYwLmZyb21fcHJldHJhaW5lZCguLi4pJTYwJTBBbnVtX2xhYmVscyUyMCUzRCUyMGxlbihtb2RlbC5jb25maWcuaWQybGFiZWwpJTBBbW9kZWwlMjAlM0QlMjBGbGF1YmVydEZvclNlcXVlbmNlQ2xhc3NpZmljYXRpb24uZnJvbV9wcmV0cmFpbmVkKCUwQSUyMCUyMCUyMCUyMCUyMmZsYXViZXJ0JTJGZmxhdWJlcnRfYmFzZV9jYXNlZCUyMiUyQyUyMG51bV9sYWJlbHMlM0RudW1fbGFiZWxzJTJDJTIwcHJvYmxlbV90eXBlJTNEJTIybXVsdGlfbGFiZWxfY2xhc3NpZmljYXRpb24lMjIlMEEpJTBBJTBBbGFiZWxzJTIwJTNEJTIwdG9yY2guc3VtKCUwQSUyMCUyMCUyMCUyMHRvcmNoLm5uLmZ1bmN0aW9uYWwub25lX2hvdChwcmVkaWN0ZWRfY2xhc3NfaWRzJTVCTm9uZSUyQyUyMCUzQSU1RC5jbG9uZSgpJTJDJTIwbnVtX2NsYXNzZXMlM0RudW1fbGFiZWxzKSUyQyUyMGRpbSUzRDElMEEpLnRvKHRvcmNoLmZsb2F0KSUwQWxvc3MlMjAlM0QlMjBtb2RlbCgqKmlucHV0cyUyQyUyMGxhYmVscyUzRGxhYmVscykubG9zcw==",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, FlaubertForSequenceClassification

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;flaubert/flaubert_base_cased&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = FlaubertForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;flaubert/flaubert_base_cased&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 = FlaubertForSequenceClassification.from_pretrained(
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;flaubert/flaubert_base_cased&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(){d=a("p"),T=n("Example of multi-label classification:"),h=p(),v(m.$$.fragment)},l(i){d=r(i,"P",{});var c=l(d);T=s(c,"Example of multi-label classification:"),c.forEach(t),h=u(i),w(m.$$.fragment,i)},m(i,c){_(i,d,c),e(d,T),_(i,h,c),k(m,i,c),y=!0},p:Oe,i(i){y||(M(m.$$.fragment,i),y=!0)},o(i){F(m.$$.fragment,i),y=!1},d(i){i&&t(d),i&&t(h),$(m,i)}}}function Xb(U){let d,T,h,m,y;return{c(){d=a("p"),T=n("Although the recipe for forward pass needs to be defined within this function, one should call the "),h=a("code"),m=n("Module"),y=n(`
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(i){d=r(i,"P",{});var c=l(d);T=s(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),h=r(c,"CODE",{});var J=l(h);m=s(J,"Module"),J.forEach(t),y=s(c,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),c.forEach(t)},m(i,c){_(i,d,c),e(d,T),e(d,h),e(h,m),e(d,y)},d(i){i&&t(d)}}}function Ab(U){let d,T,h,m,y;return m=new Ke({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBGbGF1YmVydEZvck11bHRpcGxlQ2hvaWNlJTBBaW1wb3J0JTIwdG9yY2glMEElMEF0b2tlbml6ZXIlMjAlM0QlMjBBdXRvVG9rZW5pemVyLmZyb21fcHJldHJhaW5lZCglMjJmbGF1YmVydCUyRmZsYXViZXJ0X2Jhc2VfY2FzZWQlMjIpJTBBbW9kZWwlMjAlM0QlMjBGbGF1YmVydEZvck11bHRpcGxlQ2hvaWNlLmZyb21fcHJldHJhaW5lZCglMjJmbGF1YmVydCUyRmZsYXViZXJ0X2Jhc2VfY2FzZWQlMjIpJTBBJTBBcHJvbXB0JTIwJTNEJTIwJTIySW4lMjBJdGFseSUyQyUyMHBpenphJTIwc2VydmVkJTIwaW4lMjBmb3JtYWwlMjBzZXR0aW5ncyUyQyUyMHN1Y2glMjBhcyUyMGF0JTIwYSUyMHJlc3RhdXJhbnQlMkMlMjBpcyUyMHByZXNlbnRlZCUyMHVuc2xpY2VkLiUyMiUwQWNob2ljZTAlMjAlM0QlMjAlMjJJdCUyMGlzJTIwZWF0ZW4lMjB3aXRoJTIwYSUyMGZvcmslMjBhbmQlMjBhJTIwa25pZmUuJTIyJTBBY2hvaWNlMSUyMCUzRCUyMCUyMkl0JTIwaXMlMjBlYXRlbiUyMHdoaWxlJTIwaGVsZCUyMGluJTIwdGhlJTIwaGFuZC4lMjIlMEFsYWJlbHMlMjAlM0QlMjB0b3JjaC50ZW5zb3IoMCkudW5zcXVlZXplKDApJTIwJTIwJTIzJTIwY2hvaWNlMCUyMGlzJTIwY29ycmVjdCUyMChhY2NvcmRpbmclMjB0byUyMFdpa2lwZWRpYSUyMCUzQikpJTJDJTIwYmF0Y2glMjBzaXplJTIwMSUwQSUwQWVuY29kaW5nJTIwJTNEJTIwdG9rZW5pemVyKCU1QnByb21wdCUyQyUyMHByb21wdCU1RCUyQyUyMCU1QmNob2ljZTAlMkMlMjBjaG9pY2UxJTVEJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMiUyQyUyMHBhZGRpbmclM0RUcnVlKSUwQW91dHB1dHMlMjAlM0QlMjBtb2RlbCgqKiU3QmslM0ElMjB2LnVuc3F1ZWV6ZSgwKSUyMGZvciUyMGslMkMlMjB2JTIwaW4lMjBlbmNvZGluZy5pdGVtcygpJTdEJTJDJTIwbGFiZWxzJTNEbGFiZWxzKSUyMCUyMCUyMyUyMGJhdGNoJTIwc2l6ZSUyMGlzJTIwMSUwQSUwQSUyMyUyMHRoZSUyMGxpbmVhciUyMGNsYXNzaWZpZXIlMjBzdGlsbCUyMG5lZWRzJTIwdG8lMjBiZSUyMHRyYWluZWQlMEFsb3NzJTIwJTNEJTIwb3V0cHV0cy5sb3NzJTBBbG9naXRzJTIwJTNEJTIwb3V0cHV0cy5sb2dpdHM=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, FlaubertForMultipleChoice
<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;flaubert/flaubert_base_cased&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = FlaubertForMultipleChoice.from_pretrained(<span class="hljs-string">&quot;flaubert/flaubert_base_cased&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>prompt = <span class="hljs-string">&quot;In Italy, pizza served in formal settings, such as at a restaurant, is presented unsliced.&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>choice0 = <span class="hljs-string">&quot;It is eaten with a fork and a knife.&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>choice1 = <span class="hljs-string">&quot;It is eaten while held in the hand.&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>labels = torch.tensor(<span class="hljs-number">0</span>).unsqueeze(<span class="hljs-number">0</span>)  <span class="hljs-comment"># choice0 is correct (according to Wikipedia ;)), batch size 1</span>

<span class="hljs-meta">&gt;&gt;&gt; </span>encoding = tokenizer([prompt, prompt], [choice0, choice1], return_tensors=<span class="hljs-string">&quot;pt&quot;</span>, padding=<span class="hljs-literal">True</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**{k: v.unsqueeze(<span class="hljs-number">0</span>) <span class="hljs-keyword">for</span> k, v <span class="hljs-keyword">in</span> encoding.items()}, labels=labels)  <span class="hljs-comment"># batch size is 1</span>

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># the linear classifier still needs to be trained</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>loss = outputs.loss
<span class="hljs-meta">&gt;&gt;&gt; </span>logits = outputs.logits`}}),{c(){d=a("p"),T=n("Example:"),h=p(),v(m.$$.fragment)},l(i){d=r(i,"P",{});var c=l(d);T=s(c,"Example:"),c.forEach(t),h=u(i),w(m.$$.fragment,i)},m(i,c){_(i,d,c),e(d,T),_(i,h,c),k(m,i,c),y=!0},p:Oe,i(i){y||(M(m.$$.fragment,i),y=!0)},o(i){F(m.$$.fragment,i),y=!1},d(i){i&&t(d),i&&t(h),$(m,i)}}}function Sb(U){let d,T,h,m,y;return{c(){d=a("p"),T=n("Although the recipe for forward pass needs to be defined within this function, one should call the "),h=a("code"),m=n("Module"),y=n(`
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(i){d=r(i,"P",{});var c=l(d);T=s(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),h=r(c,"CODE",{});var J=l(h);m=s(J,"Module"),J.forEach(t),y=s(c,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),c.forEach(t)},m(i,c){_(i,d,c),e(d,T),e(d,h),e(h,m),e(d,y)},d(i){i&&t(d)}}}function Db(U){let d,T,h,m,y;return m=new Ke({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBGbGF1YmVydEZvclRva2VuQ2xhc3NpZmljYXRpb24lMEFpbXBvcnQlMjB0b3JjaCUwQSUwQXRva2VuaXplciUyMCUzRCUyMEF1dG9Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMmZsYXViZXJ0JTJGZmxhdWJlcnRfYmFzZV9jYXNlZCUyMiklMEFtb2RlbCUyMCUzRCUyMEZsYXViZXJ0Rm9yVG9rZW5DbGFzc2lmaWNhdGlvbi5mcm9tX3ByZXRyYWluZWQoJTIyZmxhdWJlcnQlMkZmbGF1YmVydF9iYXNlX2Nhc2VkJTIyKSUwQSUwQWlucHV0cyUyMCUzRCUyMHRva2VuaXplciglMEElMjAlMjAlMjAlMjAlMjJIdWdnaW5nRmFjZSUyMGlzJTIwYSUyMGNvbXBhbnklMjBiYXNlZCUyMGluJTIwUGFyaXMlMjBhbmQlMjBOZXclMjBZb3JrJTIyJTJDJTIwYWRkX3NwZWNpYWxfdG9rZW5zJTNERmFsc2UlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyJTBBKSUwQSUwQXdpdGglMjB0b3JjaC5ub19ncmFkKCklM0ElMEElMjAlMjAlMjAlMjBsb2dpdHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cykubG9naXRzJTBBJTBBcHJlZGljdGVkX3Rva2VuX2NsYXNzX2lkcyUyMCUzRCUyMGxvZ2l0cy5hcmdtYXgoLTEpJTBBJTBBJTIzJTIwTm90ZSUyMHRoYXQlMjB0b2tlbnMlMjBhcmUlMjBjbGFzc2lmaWVkJTIwcmF0aGVyJTIwdGhlbiUyMGlucHV0JTIwd29yZHMlMjB3aGljaCUyMG1lYW5zJTIwdGhhdCUwQSUyMyUyMHRoZXJlJTIwbWlnaHQlMjBiZSUyMG1vcmUlMjBwcmVkaWN0ZWQlMjB0b2tlbiUyMGNsYXNzZXMlMjB0aGFuJTIwd29yZHMuJTBBJTIzJTIwTXVsdGlwbGUlMjB0b2tlbiUyMGNsYXNzZXMlMjBtaWdodCUyMGFjY291bnQlMjBmb3IlMjB0aGUlMjBzYW1lJTIwd29yZCUwQXByZWRpY3RlZF90b2tlbnNfY2xhc3NlcyUyMCUzRCUyMCU1Qm1vZGVsLmNvbmZpZy5pZDJsYWJlbCU1QnQuaXRlbSgpJTVEJTIwZm9yJTIwdCUyMGluJTIwcHJlZGljdGVkX3Rva2VuX2NsYXNzX2lkcyU1QjAlNUQlNUQlMEElMEFsYWJlbHMlMjAlM0QlMjBwcmVkaWN0ZWRfdG9rZW5fY2xhc3NfaWRzJTBBbG9zcyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzJTJDJTIwbGFiZWxzJTNEbGFiZWxzKS5sb3Nz",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, FlaubertForTokenClassification
<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;flaubert/flaubert_base_cased&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = FlaubertForTokenClassification.from_pretrained(<span class="hljs-string">&quot;flaubert/flaubert_base_cased&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(){d=a("p"),T=n("Example:"),h=p(),v(m.$$.fragment)},l(i){d=r(i,"P",{});var c=l(d);T=s(c,"Example:"),c.forEach(t),h=u(i),w(m.$$.fragment,i)},m(i,c){_(i,d,c),e(d,T),_(i,h,c),k(m,i,c),y=!0},p:Oe,i(i){y||(M(m.$$.fragment,i),y=!0)},o(i){F(m.$$.fragment,i),y=!1},d(i){i&&t(d),i&&t(h),$(m,i)}}}function Qb(U){let d,T,h,m,y;return{c(){d=a("p"),T=n("Although the recipe for forward pass needs to be defined within this function, one should call the "),h=a("code"),m=n("Module"),y=n(`
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(i){d=r(i,"P",{});var c=l(d);T=s(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),h=r(c,"CODE",{});var J=l(h);m=s(J,"Module"),J.forEach(t),y=s(c,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),c.forEach(t)},m(i,c){_(i,d,c),e(d,T),e(d,h),e(h,m),e(d,y)},d(i){i&&t(d)}}}function Yb(U){let d,T,h,m,y;return m=new Ke({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBGbGF1YmVydEZvclF1ZXN0aW9uQW5zd2VyaW5nU2ltcGxlJTBBaW1wb3J0JTIwdG9yY2glMEElMEF0b2tlbml6ZXIlMjAlM0QlMjBBdXRvVG9rZW5pemVyLmZyb21fcHJldHJhaW5lZCglMjJmbGF1YmVydCUyRmZsYXViZXJ0X2Jhc2VfY2FzZWQlMjIpJTBBbW9kZWwlMjAlM0QlMjBGbGF1YmVydEZvclF1ZXN0aW9uQW5zd2VyaW5nU2ltcGxlLmZyb21fcHJldHJhaW5lZCglMjJmbGF1YmVydCUyRmZsYXViZXJ0X2Jhc2VfY2FzZWQlMjIpJTBBJTBBcXVlc3Rpb24lMkMlMjB0ZXh0JTIwJTNEJTIwJTIyV2hvJTIwd2FzJTIwSmltJTIwSGVuc29uJTNGJTIyJTJDJTIwJTIySmltJTIwSGVuc29uJTIwd2FzJTIwYSUyMG5pY2UlMjBwdXBwZXQlMjIlMEElMEFpbnB1dHMlMjAlM0QlMjB0b2tlbml6ZXIocXVlc3Rpb24lMkMlMjB0ZXh0JTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMiklMEF3aXRoJTIwdG9yY2gubm9fZ3JhZCgpJTNBJTBBJTIwJTIwJTIwJTIwb3V0cHV0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzKSUwQSUwQWFuc3dlcl9zdGFydF9pbmRleCUyMCUzRCUyMG91dHB1dHMuc3RhcnRfbG9naXRzLmFyZ21heCgpJTBBYW5zd2VyX2VuZF9pbmRleCUyMCUzRCUyMG91dHB1dHMuZW5kX2xvZ2l0cy5hcmdtYXgoKSUwQSUwQXByZWRpY3RfYW5zd2VyX3Rva2VucyUyMCUzRCUyMGlucHV0cy5pbnB1dF9pZHMlNUIwJTJDJTIwYW5zd2VyX3N0YXJ0X2luZGV4JTIwJTNBJTIwYW5zd2VyX2VuZF9pbmRleCUyMCUyQiUyMDElNUQlMEElMEElMjMlMjB0YXJnZXQlMjBpcyUyMCUyMm5pY2UlMjBwdXBwZXQlMjIlMEF0YXJnZXRfc3RhcnRfaW5kZXglMjAlM0QlMjB0b3JjaC50ZW5zb3IoJTVCMTQlNUQpJTBBdGFyZ2V0X2VuZF9pbmRleCUyMCUzRCUyMHRvcmNoLnRlbnNvciglNUIxNSU1RCklMEElMEFvdXRwdXRzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMlMkMlMjBzdGFydF9wb3NpdGlvbnMlM0R0YXJnZXRfc3RhcnRfaW5kZXglMkMlMjBlbmRfcG9zaXRpb25zJTNEdGFyZ2V0X2VuZF9pbmRleCklMEFsb3NzJTIwJTNEJTIwb3V0cHV0cy5sb3Nz",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, FlaubertForQuestionAnsweringSimple
<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;flaubert/flaubert_base_cased&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = FlaubertForQuestionAnsweringSimple.from_pretrained(<span class="hljs-string">&quot;flaubert/flaubert_base_cased&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>question, text = <span class="hljs-string">&quot;Who was Jim Henson?&quot;</span>, <span class="hljs-string">&quot;Jim Henson was a nice puppet&quot;</span>

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(question, text, 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>    outputs = model(**inputs)

<span class="hljs-meta">&gt;&gt;&gt; </span>answer_start_index = outputs.start_logits.argmax()
<span class="hljs-meta">&gt;&gt;&gt; </span>answer_end_index = outputs.end_logits.argmax()

<span class="hljs-meta">&gt;&gt;&gt; </span>predict_answer_tokens = inputs.input_ids[<span class="hljs-number">0</span>, answer_start_index : answer_end_index + <span class="hljs-number">1</span>]

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># target is &quot;nice puppet&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>target_start_index = torch.tensor([<span class="hljs-number">14</span>])
<span class="hljs-meta">&gt;&gt;&gt; </span>target_end_index = torch.tensor([<span class="hljs-number">15</span>])

<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs, start_positions=target_start_index, end_positions=target_end_index)
<span class="hljs-meta">&gt;&gt;&gt; </span>loss = outputs.loss`}}),{c(){d=a("p"),T=n("Example:"),h=p(),v(m.$$.fragment)},l(i){d=r(i,"P",{});var c=l(d);T=s(c,"Example:"),c.forEach(t),h=u(i),w(m.$$.fragment,i)},m(i,c){_(i,d,c),e(d,T),_(i,h,c),k(m,i,c),y=!0},p:Oe,i(i){y||(M(m.$$.fragment,i),y=!0)},o(i){F(m.$$.fragment,i),y=!1},d(i){i&&t(d),i&&t(h),$(m,i)}}}function Lb(U){let d,T,h,m,y;return{c(){d=a("p"),T=n("Although the recipe for forward pass needs to be defined within this function, one should call the "),h=a("code"),m=n("Module"),y=n(`
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(i){d=r(i,"P",{});var c=l(d);T=s(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),h=r(c,"CODE",{});var J=l(h);m=s(J,"Module"),J.forEach(t),y=s(c,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),c.forEach(t)},m(i,c){_(i,d,c),e(d,T),e(d,h),e(h,m),e(d,y)},d(i){i&&t(d)}}}function Pb(U){let d,T,h,m,y;return m=new Ke({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMFhMTVRva2VuaXplciUyQyUyMFhMTUZvclF1ZXN0aW9uQW5zd2VyaW5nJTBBaW1wb3J0JTIwdG9yY2glMEElMEF0b2tlbml6ZXIlMjAlM0QlMjBYTE1Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMnhsbS1tbG0tZW4tMjA0OCUyMiklMEFtb2RlbCUyMCUzRCUyMFhMTUZvclF1ZXN0aW9uQW5zd2VyaW5nLmZyb21fcHJldHJhaW5lZCglMjJ4bG0tbWxtLWVuLTIwNDglMjIpJTBBJTBBaW5wdXRfaWRzJTIwJTNEJTIwdG9yY2gudGVuc29yKHRva2VuaXplci5lbmNvZGUoJTIySGVsbG8lMkMlMjBteSUyMGRvZyUyMGlzJTIwY3V0ZSUyMiUyQyUyMGFkZF9zcGVjaWFsX3Rva2VucyUzRFRydWUpKS51bnNxdWVlemUoJTBBJTIwJTIwJTIwJTIwMCUwQSklMjAlMjAlMjMlMjBCYXRjaCUyMHNpemUlMjAxJTBBc3RhcnRfcG9zaXRpb25zJTIwJTNEJTIwdG9yY2gudGVuc29yKCU1QjElNUQpJTBBZW5kX3Bvc2l0aW9ucyUyMCUzRCUyMHRvcmNoLnRlbnNvciglNUIzJTVEKSUwQSUwQW91dHB1dHMlMjAlM0QlMjBtb2RlbChpbnB1dF9pZHMlMkMlMjBzdGFydF9wb3NpdGlvbnMlM0RzdGFydF9wb3NpdGlvbnMlMkMlMjBlbmRfcG9zaXRpb25zJTNEZW5kX3Bvc2l0aW9ucyklMEFsb3NzJTIwJTNEJTIwb3V0cHV0cy5sb3Nz",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> XLMTokenizer, XLMForQuestionAnswering
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = XLMTokenizer.from_pretrained(<span class="hljs-string">&quot;xlm-mlm-en-2048&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = XLMForQuestionAnswering.from_pretrained(<span class="hljs-string">&quot;xlm-mlm-en-2048&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>input_ids = torch.tensor(tokenizer.encode(<span class="hljs-string">&quot;Hello, my dog is cute&quot;</span>, add_special_tokens=<span class="hljs-literal">True</span>)).unsqueeze(
<span class="hljs-meta">... </span>    <span class="hljs-number">0</span>
<span class="hljs-meta">... </span>)  <span class="hljs-comment"># Batch size 1</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>start_positions = torch.tensor([<span class="hljs-number">1</span>])
<span class="hljs-meta">&gt;&gt;&gt; </span>end_positions = torch.tensor([<span class="hljs-number">3</span>])

<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(input_ids, start_positions=start_positions, end_positions=end_positions)
<span class="hljs-meta">&gt;&gt;&gt; </span>loss = outputs.loss`}}),{c(){d=a("p"),T=n("Example:"),h=p(),v(m.$$.fragment)},l(i){d=r(i,"P",{});var c=l(d);T=s(c,"Example:"),c.forEach(t),h=u(i),w(m.$$.fragment,i)},m(i,c){_(i,d,c),e(d,T),_(i,h,c),k(m,i,c),y=!0},p:Oe,i(i){y||(M(m.$$.fragment,i),y=!0)},o(i){F(m.$$.fragment,i),y=!1},d(i){i&&t(d),i&&t(h),$(m,i)}}}function Hb(U){let d,T,h,m,y,i,c,J,ve,ge,V,ce,O,E,we,X,pe,Ne,Y,te,ae,S,ie,ke,D,Me,_e,B,Fe,de,oe,z,x,ue,L,be,he,Q,$e,ye,N,Ee,G,je,Ce,R,Je,Ue,q,me,P,Te,K,I,ze,W,ne,re;return{c(){d=a("p"),T=n("TensorFlow models and layers in "),h=a("code"),m=n("transformers"),y=n(" accept two formats as input:"),i=p(),c=a("ul"),J=a("li"),ve=n("having all inputs as keyword arguments (like PyTorch models), or"),ge=p(),V=a("li"),ce=n("having all inputs as a list, tuple or dict in the first positional argument."),O=p(),E=a("p"),we=n(`The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
and layers. Because of this support, when using methods like `),X=a("code"),pe=n("model.fit()"),Ne=n(` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),Y=a("code"),te=n("model.fit()"),ae=n(` supports! If, however, you want to use the second
format outside of Keras methods like `),S=a("code"),ie=n("fit()"),ke=n(" and "),D=a("code"),Me=n("predict()"),_e=n(`, such as when creating your own layers or models with
the Keras `),B=a("code"),Fe=n("Functional"),de=n(` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),oe=p(),z=a("ul"),x=a("li"),ue=n("a single Tensor with "),L=a("code"),be=n("input_ids"),he=n(" only and nothing else: "),Q=a("code"),$e=n("model(input_ids)"),ye=p(),N=a("li"),Ee=n(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),G=a("code"),je=n("model([input_ids, attention_mask])"),Ce=n(" or "),R=a("code"),Je=n("model([input_ids, attention_mask, token_type_ids])"),Ue=p(),q=a("li"),me=n(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),P=a("code"),Te=n('model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),K=p(),I=a("p"),ze=n(`Note that when creating models and layers with
`),W=a("a"),ne=n("subclassing"),re=n(` then you don\u2019t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`),this.h()},l(g){d=r(g,"P",{});var j=l(d);T=s(j,"TensorFlow models and layers in "),h=r(j,"CODE",{});var Be=l(h);m=s(Be,"transformers"),Be.forEach(t),y=s(j," accept two formats as input:"),j.forEach(t),i=u(g),c=r(g,"UL",{});var ee=l(c);J=r(ee,"LI",{});var Ge=l(J);ve=s(Ge,"having all inputs as keyword arguments (like PyTorch models), or"),Ge.forEach(t),ge=u(ee),V=r(ee,"LI",{});var Ve=l(V);ce=s(Ve,"having all inputs as a list, tuple or dict in the first positional argument."),Ve.forEach(t),ee.forEach(t),O=u(g),E=r(g,"P",{});var C=l(E);we=s(C,`The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
and layers. Because of this support, when using methods like `),X=r(C,"CODE",{});var We=l(X);pe=s(We,"model.fit()"),We.forEach(t),Ne=s(C,` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),Y=r(C,"CODE",{});var Ie=l(Y);te=s(Ie,"model.fit()"),Ie.forEach(t),ae=s(C,` supports! If, however, you want to use the second
format outside of Keras methods like `),S=r(C,"CODE",{});var Re=l(S);ie=s(Re,"fit()"),Re.forEach(t),ke=s(C," and "),D=r(C,"CODE",{});var Xe=l(D);Me=s(Xe,"predict()"),Xe.forEach(t),_e=s(C,`, such as when creating your own layers or models with
the Keras `),B=r(C,"CODE",{});var Ze=l(B);Fe=s(Ze,"Functional"),Ze.forEach(t),de=s(C,` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),C.forEach(t),oe=u(g),z=r(g,"UL",{});var Z=l(z);x=r(Z,"LI",{});var H=l(x);ue=s(H,"a single Tensor with "),L=r(H,"CODE",{});var Ae=l(L);be=s(Ae,"input_ids"),Ae.forEach(t),he=s(H," only and nothing else: "),Q=r(H,"CODE",{});var qe=l(Q);$e=s(qe,"model(input_ids)"),qe.forEach(t),H.forEach(t),ye=u(Z),N=r(Z,"LI",{});var A=l(N);Ee=s(A,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),G=r(A,"CODE",{});var Se=l(G);je=s(Se,"model([input_ids, attention_mask])"),Se.forEach(t),Ce=s(A," or "),R=r(A,"CODE",{});var De=l(R);Je=s(De,"model([input_ids, attention_mask, token_type_ids])"),De.forEach(t),A.forEach(t),Ue=u(Z),q=r(Z,"LI",{});var fe=l(q);me=s(fe,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),P=r(fe,"CODE",{});var xe=l(P);Te=s(xe,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),xe.forEach(t),fe.forEach(t),Z.forEach(t),K=u(g),I=r(g,"P",{});var se=l(I);ze=s(se,`Note that when creating models and layers with
`),W=r(se,"A",{href:!0,rel:!0});var Qe=l(W);ne=s(Qe,"subclassing"),Qe.forEach(t),re=s(se,` then you don\u2019t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`),se.forEach(t),this.h()},h(){f(W,"href","https://keras.io/guides/making_new_layers_and_models_via_subclassing/"),f(W,"rel","nofollow")},m(g,j){_(g,d,j),e(d,T),e(d,h),e(h,m),e(d,y),_(g,i,j),_(g,c,j),e(c,J),e(J,ve),e(c,ge),e(c,V),e(V,ce),_(g,O,j),_(g,E,j),e(E,we),e(E,X),e(X,pe),e(E,Ne),e(E,Y),e(Y,te),e(E,ae),e(E,S),e(S,ie),e(E,ke),e(E,D),e(D,Me),e(E,_e),e(E,B),e(B,Fe),e(E,de),_(g,oe,j),_(g,z,j),e(z,x),e(x,ue),e(x,L),e(L,be),e(x,he),e(x,Q),e(Q,$e),e(z,ye),e(z,N),e(N,Ee),e(N,G),e(G,je),e(N,Ce),e(N,R),e(R,Je),e(z,Ue),e(z,q),e(q,me),e(q,P),e(P,Te),_(g,K,j),_(g,I,j),e(I,ze),e(I,W),e(W,ne),e(I,re)},d(g){g&&t(d),g&&t(i),g&&t(c),g&&t(O),g&&t(E),g&&t(oe),g&&t(z),g&&t(K),g&&t(I)}}}function Ob(U){let d,T,h,m,y;return{c(){d=a("p"),T=n("Although the recipe for forward pass needs to be defined within this function, one should call the "),h=a("code"),m=n("Module"),y=n(`
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(i){d=r(i,"P",{});var c=l(d);T=s(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),h=r(c,"CODE",{});var J=l(h);m=s(J,"Module"),J.forEach(t),y=s(c,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),c.forEach(t)},m(i,c){_(i,d,c),e(d,T),e(d,h),e(h,m),e(d,y)},d(i){i&&t(d)}}}function Kb(U){let d,T,h,m,y;return m=new Ke({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBURkZsYXViZXJ0TW9kZWwlMEFpbXBvcnQlMjB0ZW5zb3JmbG93JTIwYXMlMjB0ZiUwQSUwQXRva2VuaXplciUyMCUzRCUyMEF1dG9Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMmZsYXViZXJ0JTJGZmxhdWJlcnRfYmFzZV9jYXNlZCUyMiklMEFtb2RlbCUyMCUzRCUyMFRGRmxhdWJlcnRNb2RlbC5mcm9tX3ByZXRyYWluZWQoJTIyZmxhdWJlcnQlMkZmbGF1YmVydF9iYXNlX2Nhc2VkJTIyKSUwQSUwQWlucHV0cyUyMCUzRCUyMHRva2VuaXplciglMjJIZWxsbyUyQyUyMG15JTIwZG9nJTIwaXMlMjBjdXRlJTIyJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJ0ZiUyMiklMEFvdXRwdXRzJTIwJTNEJTIwbW9kZWwoaW5wdXRzKSUwQSUwQWxhc3RfaGlkZGVuX3N0YXRlcyUyMCUzRCUyMG91dHB1dHMubGFzdF9oaWRkZW5fc3RhdGU=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, TFFlaubertModel
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> tensorflow <span class="hljs-keyword">as</span> tf

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;flaubert/flaubert_base_cased&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFFlaubertModel.from_pretrained(<span class="hljs-string">&quot;flaubert/flaubert_base_cased&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;tf&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(){d=a("p"),T=n("Example:"),h=p(),v(m.$$.fragment)},l(i){d=r(i,"P",{});var c=l(d);T=s(c,"Example:"),c.forEach(t),h=u(i),w(m.$$.fragment,i)},m(i,c){_(i,d,c),e(d,T),_(i,h,c),k(m,i,c),y=!0},p:Oe,i(i){y||(M(m.$$.fragment,i),y=!0)},o(i){F(m.$$.fragment,i),y=!1},d(i){i&&t(d),i&&t(h),$(m,i)}}}function ey(U){let d,T,h,m,y,i,c,J,ve,ge,V,ce,O,E,we,X,pe,Ne,Y,te,ae,S,ie,ke,D,Me,_e,B,Fe,de,oe,z,x,ue,L,be,he,Q,$e,ye,N,Ee,G,je,Ce,R,Je,Ue,q,me,P,Te,K,I,ze,W,ne,re;return{c(){d=a("p"),T=n("TensorFlow models and layers in "),h=a("code"),m=n("transformers"),y=n(" accept two formats as input:"),i=p(),c=a("ul"),J=a("li"),ve=n("having all inputs as keyword arguments (like PyTorch models), or"),ge=p(),V=a("li"),ce=n("having all inputs as a list, tuple or dict in the first positional argument."),O=p(),E=a("p"),we=n(`The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
and layers. Because of this support, when using methods like `),X=a("code"),pe=n("model.fit()"),Ne=n(` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),Y=a("code"),te=n("model.fit()"),ae=n(` supports! If, however, you want to use the second
format outside of Keras methods like `),S=a("code"),ie=n("fit()"),ke=n(" and "),D=a("code"),Me=n("predict()"),_e=n(`, such as when creating your own layers or models with
the Keras `),B=a("code"),Fe=n("Functional"),de=n(` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),oe=p(),z=a("ul"),x=a("li"),ue=n("a single Tensor with "),L=a("code"),be=n("input_ids"),he=n(" only and nothing else: "),Q=a("code"),$e=n("model(input_ids)"),ye=p(),N=a("li"),Ee=n(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),G=a("code"),je=n("model([input_ids, attention_mask])"),Ce=n(" or "),R=a("code"),Je=n("model([input_ids, attention_mask, token_type_ids])"),Ue=p(),q=a("li"),me=n(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),P=a("code"),Te=n('model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),K=p(),I=a("p"),ze=n(`Note that when creating models and layers with
`),W=a("a"),ne=n("subclassing"),re=n(` then you don\u2019t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`),this.h()},l(g){d=r(g,"P",{});var j=l(d);T=s(j,"TensorFlow models and layers in "),h=r(j,"CODE",{});var Be=l(h);m=s(Be,"transformers"),Be.forEach(t),y=s(j," accept two formats as input:"),j.forEach(t),i=u(g),c=r(g,"UL",{});var ee=l(c);J=r(ee,"LI",{});var Ge=l(J);ve=s(Ge,"having all inputs as keyword arguments (like PyTorch models), or"),Ge.forEach(t),ge=u(ee),V=r(ee,"LI",{});var Ve=l(V);ce=s(Ve,"having all inputs as a list, tuple or dict in the first positional argument."),Ve.forEach(t),ee.forEach(t),O=u(g),E=r(g,"P",{});var C=l(E);we=s(C,`The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
and layers. Because of this support, when using methods like `),X=r(C,"CODE",{});var We=l(X);pe=s(We,"model.fit()"),We.forEach(t),Ne=s(C,` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),Y=r(C,"CODE",{});var Ie=l(Y);te=s(Ie,"model.fit()"),Ie.forEach(t),ae=s(C,` supports! If, however, you want to use the second
format outside of Keras methods like `),S=r(C,"CODE",{});var Re=l(S);ie=s(Re,"fit()"),Re.forEach(t),ke=s(C," and "),D=r(C,"CODE",{});var Xe=l(D);Me=s(Xe,"predict()"),Xe.forEach(t),_e=s(C,`, such as when creating your own layers or models with
the Keras `),B=r(C,"CODE",{});var Ze=l(B);Fe=s(Ze,"Functional"),Ze.forEach(t),de=s(C,` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),C.forEach(t),oe=u(g),z=r(g,"UL",{});var Z=l(z);x=r(Z,"LI",{});var H=l(x);ue=s(H,"a single Tensor with "),L=r(H,"CODE",{});var Ae=l(L);be=s(Ae,"input_ids"),Ae.forEach(t),he=s(H," only and nothing else: "),Q=r(H,"CODE",{});var qe=l(Q);$e=s(qe,"model(input_ids)"),qe.forEach(t),H.forEach(t),ye=u(Z),N=r(Z,"LI",{});var A=l(N);Ee=s(A,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),G=r(A,"CODE",{});var Se=l(G);je=s(Se,"model([input_ids, attention_mask])"),Se.forEach(t),Ce=s(A," or "),R=r(A,"CODE",{});var De=l(R);Je=s(De,"model([input_ids, attention_mask, token_type_ids])"),De.forEach(t),A.forEach(t),Ue=u(Z),q=r(Z,"LI",{});var fe=l(q);me=s(fe,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),P=r(fe,"CODE",{});var xe=l(P);Te=s(xe,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),xe.forEach(t),fe.forEach(t),Z.forEach(t),K=u(g),I=r(g,"P",{});var se=l(I);ze=s(se,`Note that when creating models and layers with
`),W=r(se,"A",{href:!0,rel:!0});var Qe=l(W);ne=s(Qe,"subclassing"),Qe.forEach(t),re=s(se,` then you don\u2019t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`),se.forEach(t),this.h()},h(){f(W,"href","https://keras.io/guides/making_new_layers_and_models_via_subclassing/"),f(W,"rel","nofollow")},m(g,j){_(g,d,j),e(d,T),e(d,h),e(h,m),e(d,y),_(g,i,j),_(g,c,j),e(c,J),e(J,ve),e(c,ge),e(c,V),e(V,ce),_(g,O,j),_(g,E,j),e(E,we),e(E,X),e(X,pe),e(E,Ne),e(E,Y),e(Y,te),e(E,ae),e(E,S),e(S,ie),e(E,ke),e(E,D),e(D,Me),e(E,_e),e(E,B),e(B,Fe),e(E,de),_(g,oe,j),_(g,z,j),e(z,x),e(x,ue),e(x,L),e(L,be),e(x,he),e(x,Q),e(Q,$e),e(z,ye),e(z,N),e(N,Ee),e(N,G),e(G,je),e(N,Ce),e(N,R),e(R,Je),e(z,Ue),e(z,q),e(q,me),e(q,P),e(P,Te),_(g,K,j),_(g,I,j),e(I,ze),e(I,W),e(W,ne),e(I,re)},d(g){g&&t(d),g&&t(i),g&&t(c),g&&t(O),g&&t(E),g&&t(oe),g&&t(z),g&&t(K),g&&t(I)}}}function ty(U){let d,T,h,m,y;return{c(){d=a("p"),T=n("Although the recipe for forward pass needs to be defined within this function, one should call the "),h=a("code"),m=n("Module"),y=n(`
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(i){d=r(i,"P",{});var c=l(d);T=s(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),h=r(c,"CODE",{});var J=l(h);m=s(J,"Module"),J.forEach(t),y=s(c,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),c.forEach(t)},m(i,c){_(i,d,c),e(d,T),e(d,h),e(h,m),e(d,y)},d(i){i&&t(d)}}}function oy(U){let d,T,h,m,y;return m=new Ke({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBURkZsYXViZXJ0V2l0aExNSGVhZE1vZGVsJTBBaW1wb3J0JTIwdGVuc29yZmxvdyUyMGFzJTIwdGYlMEElMEF0b2tlbml6ZXIlMjAlM0QlMjBBdXRvVG9rZW5pemVyLmZyb21fcHJldHJhaW5lZCglMjJmbGF1YmVydCUyRmZsYXViZXJ0X2Jhc2VfY2FzZWQlMjIpJTBBbW9kZWwlMjAlM0QlMjBURkZsYXViZXJ0V2l0aExNSGVhZE1vZGVsLmZyb21fcHJldHJhaW5lZCglMjJmbGF1YmVydCUyRmZsYXViZXJ0X2Jhc2VfY2FzZWQlMjIpJTBBJTBBaW5wdXRzJTIwJTNEJTIwdG9rZW5pemVyKCUyMkhlbGxvJTJDJTIwbXklMjBkb2clMjBpcyUyMGN1dGUlMjIlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnRmJTIyKSUwQW91dHB1dHMlMjAlM0QlMjBtb2RlbChpbnB1dHMpJTBBbG9naXRzJTIwJTNEJTIwb3V0cHV0cy5sb2dpdHM=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, TFFlaubertWithLMHeadModel
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> tensorflow <span class="hljs-keyword">as</span> tf

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;flaubert/flaubert_base_cased&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFFlaubertWithLMHeadModel.from_pretrained(<span class="hljs-string">&quot;flaubert/flaubert_base_cased&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;tf&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(inputs)
<span class="hljs-meta">&gt;&gt;&gt; </span>logits = outputs.logits`}}),{c(){d=a("p"),T=n("Example:"),h=p(),v(m.$$.fragment)},l(i){d=r(i,"P",{});var c=l(d);T=s(c,"Example:"),c.forEach(t),h=u(i),w(m.$$.fragment,i)},m(i,c){_(i,d,c),e(d,T),_(i,h,c),k(m,i,c),y=!0},p:Oe,i(i){y||(M(m.$$.fragment,i),y=!0)},o(i){F(m.$$.fragment,i),y=!1},d(i){i&&t(d),i&&t(h),$(m,i)}}}function ny(U){let d,T,h,m,y,i,c,J,ve,ge,V,ce,O,E,we,X,pe,Ne,Y,te,ae,S,ie,ke,D,Me,_e,B,Fe,de,oe,z,x,ue,L,be,he,Q,$e,ye,N,Ee,G,je,Ce,R,Je,Ue,q,me,P,Te,K,I,ze,W,ne,re;return{c(){d=a("p"),T=n("TensorFlow models and layers in "),h=a("code"),m=n("transformers"),y=n(" accept two formats as input:"),i=p(),c=a("ul"),J=a("li"),ve=n("having all inputs as keyword arguments (like PyTorch models), or"),ge=p(),V=a("li"),ce=n("having all inputs as a list, tuple or dict in the first positional argument."),O=p(),E=a("p"),we=n(`The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
and layers. Because of this support, when using methods like `),X=a("code"),pe=n("model.fit()"),Ne=n(` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),Y=a("code"),te=n("model.fit()"),ae=n(` supports! If, however, you want to use the second
format outside of Keras methods like `),S=a("code"),ie=n("fit()"),ke=n(" and "),D=a("code"),Me=n("predict()"),_e=n(`, such as when creating your own layers or models with
the Keras `),B=a("code"),Fe=n("Functional"),de=n(` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),oe=p(),z=a("ul"),x=a("li"),ue=n("a single Tensor with "),L=a("code"),be=n("input_ids"),he=n(" only and nothing else: "),Q=a("code"),$e=n("model(input_ids)"),ye=p(),N=a("li"),Ee=n(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),G=a("code"),je=n("model([input_ids, attention_mask])"),Ce=n(" or "),R=a("code"),Je=n("model([input_ids, attention_mask, token_type_ids])"),Ue=p(),q=a("li"),me=n(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),P=a("code"),Te=n('model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),K=p(),I=a("p"),ze=n(`Note that when creating models and layers with
`),W=a("a"),ne=n("subclassing"),re=n(` then you don\u2019t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`),this.h()},l(g){d=r(g,"P",{});var j=l(d);T=s(j,"TensorFlow models and layers in "),h=r(j,"CODE",{});var Be=l(h);m=s(Be,"transformers"),Be.forEach(t),y=s(j," accept two formats as input:"),j.forEach(t),i=u(g),c=r(g,"UL",{});var ee=l(c);J=r(ee,"LI",{});var Ge=l(J);ve=s(Ge,"having all inputs as keyword arguments (like PyTorch models), or"),Ge.forEach(t),ge=u(ee),V=r(ee,"LI",{});var Ve=l(V);ce=s(Ve,"having all inputs as a list, tuple or dict in the first positional argument."),Ve.forEach(t),ee.forEach(t),O=u(g),E=r(g,"P",{});var C=l(E);we=s(C,`The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
and layers. Because of this support, when using methods like `),X=r(C,"CODE",{});var We=l(X);pe=s(We,"model.fit()"),We.forEach(t),Ne=s(C,` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),Y=r(C,"CODE",{});var Ie=l(Y);te=s(Ie,"model.fit()"),Ie.forEach(t),ae=s(C,` supports! If, however, you want to use the second
format outside of Keras methods like `),S=r(C,"CODE",{});var Re=l(S);ie=s(Re,"fit()"),Re.forEach(t),ke=s(C," and "),D=r(C,"CODE",{});var Xe=l(D);Me=s(Xe,"predict()"),Xe.forEach(t),_e=s(C,`, such as when creating your own layers or models with
the Keras `),B=r(C,"CODE",{});var Ze=l(B);Fe=s(Ze,"Functional"),Ze.forEach(t),de=s(C,` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),C.forEach(t),oe=u(g),z=r(g,"UL",{});var Z=l(z);x=r(Z,"LI",{});var H=l(x);ue=s(H,"a single Tensor with "),L=r(H,"CODE",{});var Ae=l(L);be=s(Ae,"input_ids"),Ae.forEach(t),he=s(H," only and nothing else: "),Q=r(H,"CODE",{});var qe=l(Q);$e=s(qe,"model(input_ids)"),qe.forEach(t),H.forEach(t),ye=u(Z),N=r(Z,"LI",{});var A=l(N);Ee=s(A,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),G=r(A,"CODE",{});var Se=l(G);je=s(Se,"model([input_ids, attention_mask])"),Se.forEach(t),Ce=s(A," or "),R=r(A,"CODE",{});var De=l(R);Je=s(De,"model([input_ids, attention_mask, token_type_ids])"),De.forEach(t),A.forEach(t),Ue=u(Z),q=r(Z,"LI",{});var fe=l(q);me=s(fe,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),P=r(fe,"CODE",{});var xe=l(P);Te=s(xe,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),xe.forEach(t),fe.forEach(t),Z.forEach(t),K=u(g),I=r(g,"P",{});var se=l(I);ze=s(se,`Note that when creating models and layers with
`),W=r(se,"A",{href:!0,rel:!0});var Qe=l(W);ne=s(Qe,"subclassing"),Qe.forEach(t),re=s(se,` then you don\u2019t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`),se.forEach(t),this.h()},h(){f(W,"href","https://keras.io/guides/making_new_layers_and_models_via_subclassing/"),f(W,"rel","nofollow")},m(g,j){_(g,d,j),e(d,T),e(d,h),e(h,m),e(d,y),_(g,i,j),_(g,c,j),e(c,J),e(J,ve),e(c,ge),e(c,V),e(V,ce),_(g,O,j),_(g,E,j),e(E,we),e(E,X),e(X,pe),e(E,Ne),e(E,Y),e(Y,te),e(E,ae),e(E,S),e(S,ie),e(E,ke),e(E,D),e(D,Me),e(E,_e),e(E,B),e(B,Fe),e(E,de),_(g,oe,j),_(g,z,j),e(z,x),e(x,ue),e(x,L),e(L,be),e(x,he),e(x,Q),e(Q,$e),e(z,ye),e(z,N),e(N,Ee),e(N,G),e(G,je),e(N,Ce),e(N,R),e(R,Je),e(z,Ue),e(z,q),e(q,me),e(q,P),e(P,Te),_(g,K,j),_(g,I,j),e(I,ze),e(I,W),e(W,ne),e(I,re)},d(g){g&&t(d),g&&t(i),g&&t(c),g&&t(O),g&&t(E),g&&t(oe),g&&t(z),g&&t(K),g&&t(I)}}}function sy(U){let d,T,h,m,y;return{c(){d=a("p"),T=n("Although the recipe for forward pass needs to be defined within this function, one should call the "),h=a("code"),m=n("Module"),y=n(`
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(i){d=r(i,"P",{});var c=l(d);T=s(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),h=r(c,"CODE",{});var J=l(h);m=s(J,"Module"),J.forEach(t),y=s(c,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),c.forEach(t)},m(i,c){_(i,d,c),e(d,T),e(d,h),e(h,m),e(d,y)},d(i){i&&t(d)}}}function ay(U){let d,T,h,m,y;return m=new Ke({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBURkZsYXViZXJ0Rm9yU2VxdWVuY2VDbGFzc2lmaWNhdGlvbiUwQWltcG9ydCUyMHRlbnNvcmZsb3clMjBhcyUyMHRmJTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIyZmxhdWJlcnQlMkZmbGF1YmVydF9iYXNlX2Nhc2VkJTIyKSUwQW1vZGVsJTIwJTNEJTIwVEZGbGF1YmVydEZvclNlcXVlbmNlQ2xhc3NpZmljYXRpb24uZnJvbV9wcmV0cmFpbmVkKCUyMmZsYXViZXJ0JTJGZmxhdWJlcnRfYmFzZV9jYXNlZCUyMiklMEElMEFpbnB1dHMlMjAlM0QlMjB0b2tlbml6ZXIoJTIySGVsbG8lMkMlMjBteSUyMGRvZyUyMGlzJTIwY3V0ZSUyMiUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIydGYlMjIpJTBBJTBBbG9naXRzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMpLmxvZ2l0cyUwQSUwQXByZWRpY3RlZF9jbGFzc19pZCUyMCUzRCUyMGludCh0Zi5tYXRoLmFyZ21heChsb2dpdHMlMkMlMjBheGlzJTNELTEpJTVCMCU1RCk=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, TFFlaubertForSequenceClassification
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> tensorflow <span class="hljs-keyword">as</span> tf

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;flaubert/flaubert_base_cased&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFFlaubertForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;flaubert/flaubert_base_cased&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;tf&quot;</span>)

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

<span class="hljs-meta">&gt;&gt;&gt; </span>predicted_class_id = <span class="hljs-built_in">int</span>(tf.math.argmax(logits, axis=-<span class="hljs-number">1</span>)[<span class="hljs-number">0</span>])`}}),{c(){d=a("p"),T=n("Example:"),h=p(),v(m.$$.fragment)},l(i){d=r(i,"P",{});var c=l(d);T=s(c,"Example:"),c.forEach(t),h=u(i),w(m.$$.fragment,i)},m(i,c){_(i,d,c),e(d,T),_(i,h,c),k(m,i,c),y=!0},p:Oe,i(i){y||(M(m.$$.fragment,i),y=!0)},o(i){F(m.$$.fragment,i),y=!1},d(i){i&&t(d),i&&t(h),$(m,i)}}}function ry(U){let d,T;return d=new Ke({props:{code:"JTIzJTIwVG8lMjB0cmFpbiUyMGElMjBtb2RlbCUyMG9uJTIwJTYwbnVtX2xhYmVscyU2MCUyMGNsYXNzZXMlMkMlMjB5b3UlMjBjYW4lMjBwYXNzJTIwJTYwbnVtX2xhYmVscyUzRG51bV9sYWJlbHMlNjAlMjB0byUyMCU2MC5mcm9tX3ByZXRyYWluZWQoLi4uKSU2MCUwQW51bV9sYWJlbHMlMjAlM0QlMjBsZW4obW9kZWwuY29uZmlnLmlkMmxhYmVsKSUwQW1vZGVsJTIwJTNEJTIwVEZGbGF1YmVydEZvclNlcXVlbmNlQ2xhc3NpZmljYXRpb24uZnJvbV9wcmV0cmFpbmVkKCUyMmZsYXViZXJ0JTJGZmxhdWJlcnRfYmFzZV9jYXNlZCUyMiUyQyUyMG51bV9sYWJlbHMlM0RudW1fbGFiZWxzKSUwQSUwQWxhYmVscyUyMCUzRCUyMHRmLmNvbnN0YW50KDEpJTBBbG9zcyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzJTJDJTIwbGFiZWxzJTNEbGFiZWxzKS5sb3Nz",highlighted:'<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>\n<span class="hljs-meta">&gt;&gt;&gt; </span>num_labels = <span class="hljs-built_in">len</span>(model.config.id2label)\n<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFFlaubertForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;flaubert/flaubert_base_cased&quot;</span>, num_labels=num_labels)\n\n<span class="hljs-meta">&gt;&gt;&gt; </span>labels = tf.constant(<span class="hljs-number">1</span>)\n<span class="hljs-meta">&gt;&gt;&gt; </span>loss = model(**inputs, labels=labels).loss'}}),{c(){v(d.$$.fragment)},l(h){w(d.$$.fragment,h)},m(h,m){k(d,h,m),T=!0},p:Oe,i(h){T||(M(d.$$.fragment,h),T=!0)},o(h){F(d.$$.fragment,h),T=!1},d(h){$(d,h)}}}function ly(U){let d,T,h,m,y,i,c,J,ve,ge,V,ce,O,E,we,X,pe,Ne,Y,te,ae,S,ie,ke,D,Me,_e,B,Fe,de,oe,z,x,ue,L,be,he,Q,$e,ye,N,Ee,G,je,Ce,R,Je,Ue,q,me,P,Te,K,I,ze,W,ne,re;return{c(){d=a("p"),T=n("TensorFlow models and layers in "),h=a("code"),m=n("transformers"),y=n(" accept two formats as input:"),i=p(),c=a("ul"),J=a("li"),ve=n("having all inputs as keyword arguments (like PyTorch models), or"),ge=p(),V=a("li"),ce=n("having all inputs as a list, tuple or dict in the first positional argument."),O=p(),E=a("p"),we=n(`The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
and layers. Because of this support, when using methods like `),X=a("code"),pe=n("model.fit()"),Ne=n(` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),Y=a("code"),te=n("model.fit()"),ae=n(` supports! If, however, you want to use the second
format outside of Keras methods like `),S=a("code"),ie=n("fit()"),ke=n(" and "),D=a("code"),Me=n("predict()"),_e=n(`, such as when creating your own layers or models with
the Keras `),B=a("code"),Fe=n("Functional"),de=n(` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),oe=p(),z=a("ul"),x=a("li"),ue=n("a single Tensor with "),L=a("code"),be=n("input_ids"),he=n(" only and nothing else: "),Q=a("code"),$e=n("model(input_ids)"),ye=p(),N=a("li"),Ee=n(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),G=a("code"),je=n("model([input_ids, attention_mask])"),Ce=n(" or "),R=a("code"),Je=n("model([input_ids, attention_mask, token_type_ids])"),Ue=p(),q=a("li"),me=n(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),P=a("code"),Te=n('model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),K=p(),I=a("p"),ze=n(`Note that when creating models and layers with
`),W=a("a"),ne=n("subclassing"),re=n(` then you don\u2019t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`),this.h()},l(g){d=r(g,"P",{});var j=l(d);T=s(j,"TensorFlow models and layers in "),h=r(j,"CODE",{});var Be=l(h);m=s(Be,"transformers"),Be.forEach(t),y=s(j," accept two formats as input:"),j.forEach(t),i=u(g),c=r(g,"UL",{});var ee=l(c);J=r(ee,"LI",{});var Ge=l(J);ve=s(Ge,"having all inputs as keyword arguments (like PyTorch models), or"),Ge.forEach(t),ge=u(ee),V=r(ee,"LI",{});var Ve=l(V);ce=s(Ve,"having all inputs as a list, tuple or dict in the first positional argument."),Ve.forEach(t),ee.forEach(t),O=u(g),E=r(g,"P",{});var C=l(E);we=s(C,`The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
and layers. Because of this support, when using methods like `),X=r(C,"CODE",{});var We=l(X);pe=s(We,"model.fit()"),We.forEach(t),Ne=s(C,` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),Y=r(C,"CODE",{});var Ie=l(Y);te=s(Ie,"model.fit()"),Ie.forEach(t),ae=s(C,` supports! If, however, you want to use the second
format outside of Keras methods like `),S=r(C,"CODE",{});var Re=l(S);ie=s(Re,"fit()"),Re.forEach(t),ke=s(C," and "),D=r(C,"CODE",{});var Xe=l(D);Me=s(Xe,"predict()"),Xe.forEach(t),_e=s(C,`, such as when creating your own layers or models with
the Keras `),B=r(C,"CODE",{});var Ze=l(B);Fe=s(Ze,"Functional"),Ze.forEach(t),de=s(C,` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),C.forEach(t),oe=u(g),z=r(g,"UL",{});var Z=l(z);x=r(Z,"LI",{});var H=l(x);ue=s(H,"a single Tensor with "),L=r(H,"CODE",{});var Ae=l(L);be=s(Ae,"input_ids"),Ae.forEach(t),he=s(H," only and nothing else: "),Q=r(H,"CODE",{});var qe=l(Q);$e=s(qe,"model(input_ids)"),qe.forEach(t),H.forEach(t),ye=u(Z),N=r(Z,"LI",{});var A=l(N);Ee=s(A,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),G=r(A,"CODE",{});var Se=l(G);je=s(Se,"model([input_ids, attention_mask])"),Se.forEach(t),Ce=s(A," or "),R=r(A,"CODE",{});var De=l(R);Je=s(De,"model([input_ids, attention_mask, token_type_ids])"),De.forEach(t),A.forEach(t),Ue=u(Z),q=r(Z,"LI",{});var fe=l(q);me=s(fe,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),P=r(fe,"CODE",{});var xe=l(P);Te=s(xe,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),xe.forEach(t),fe.forEach(t),Z.forEach(t),K=u(g),I=r(g,"P",{});var se=l(I);ze=s(se,`Note that when creating models and layers with
`),W=r(se,"A",{href:!0,rel:!0});var Qe=l(W);ne=s(Qe,"subclassing"),Qe.forEach(t),re=s(se,` then you don\u2019t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`),se.forEach(t),this.h()},h(){f(W,"href","https://keras.io/guides/making_new_layers_and_models_via_subclassing/"),f(W,"rel","nofollow")},m(g,j){_(g,d,j),e(d,T),e(d,h),e(h,m),e(d,y),_(g,i,j),_(g,c,j),e(c,J),e(J,ve),e(c,ge),e(c,V),e(V,ce),_(g,O,j),_(g,E,j),e(E,we),e(E,X),e(X,pe),e(E,Ne),e(E,Y),e(Y,te),e(E,ae),e(E,S),e(S,ie),e(E,ke),e(E,D),e(D,Me),e(E,_e),e(E,B),e(B,Fe),e(E,de),_(g,oe,j),_(g,z,j),e(z,x),e(x,ue),e(x,L),e(L,be),e(x,he),e(x,Q),e(Q,$e),e(z,ye),e(z,N),e(N,Ee),e(N,G),e(G,je),e(N,Ce),e(N,R),e(R,Je),e(z,Ue),e(z,q),e(q,me),e(q,P),e(P,Te),_(g,K,j),_(g,I,j),e(I,ze),e(I,W),e(W,ne),e(I,re)},d(g){g&&t(d),g&&t(i),g&&t(c),g&&t(O),g&&t(E),g&&t(oe),g&&t(z),g&&t(K),g&&t(I)}}}function iy(U){let d,T,h,m,y;return{c(){d=a("p"),T=n("Although the recipe for forward pass needs to be defined within this function, one should call the "),h=a("code"),m=n("Module"),y=n(`
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(i){d=r(i,"P",{});var c=l(d);T=s(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),h=r(c,"CODE",{});var J=l(h);m=s(J,"Module"),J.forEach(t),y=s(c,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),c.forEach(t)},m(i,c){_(i,d,c),e(d,T),e(d,h),e(h,m),e(d,y)},d(i){i&&t(d)}}}function dy(U){let d,T,h,m,y;return m=new Ke({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBURkZsYXViZXJ0Rm9yTXVsdGlwbGVDaG9pY2UlMEFpbXBvcnQlMjB0ZW5zb3JmbG93JTIwYXMlMjB0ZiUwQSUwQXRva2VuaXplciUyMCUzRCUyMEF1dG9Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMmZsYXViZXJ0JTJGZmxhdWJlcnRfYmFzZV9jYXNlZCUyMiklMEFtb2RlbCUyMCUzRCUyMFRGRmxhdWJlcnRGb3JNdWx0aXBsZUNob2ljZS5mcm9tX3ByZXRyYWluZWQoJTIyZmxhdWJlcnQlMkZmbGF1YmVydF9iYXNlX2Nhc2VkJTIyKSUwQSUwQXByb21wdCUyMCUzRCUyMCUyMkluJTIwSXRhbHklMkMlMjBwaXp6YSUyMHNlcnZlZCUyMGluJTIwZm9ybWFsJTIwc2V0dGluZ3MlMkMlMjBzdWNoJTIwYXMlMjBhdCUyMGElMjByZXN0YXVyYW50JTJDJTIwaXMlMjBwcmVzZW50ZWQlMjB1bnNsaWNlZC4lMjIlMEFjaG9pY2UwJTIwJTNEJTIwJTIySXQlMjBpcyUyMGVhdGVuJTIwd2l0aCUyMGElMjBmb3JrJTIwYW5kJTIwYSUyMGtuaWZlLiUyMiUwQWNob2ljZTElMjAlM0QlMjAlMjJJdCUyMGlzJTIwZWF0ZW4lMjB3aGlsZSUyMGhlbGQlMjBpbiUyMHRoZSUyMGhhbmQuJTIyJTBBJTBBZW5jb2RpbmclMjAlM0QlMjB0b2tlbml6ZXIoJTVCcHJvbXB0JTJDJTIwcHJvbXB0JTVEJTJDJTIwJTVCY2hvaWNlMCUyQyUyMGNob2ljZTElNUQlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnRmJTIyJTJDJTIwcGFkZGluZyUzRFRydWUpJTBBaW5wdXRzJTIwJTNEJTIwJTdCayUzQSUyMHRmLmV4cGFuZF9kaW1zKHYlMkMlMjAwKSUyMGZvciUyMGslMkMlMjB2JTIwaW4lMjBlbmNvZGluZy5pdGVtcygpJTdEJTBBb3V0cHV0cyUyMCUzRCUyMG1vZGVsKGlucHV0cyklMjAlMjAlMjMlMjBiYXRjaCUyMHNpemUlMjBpcyUyMDElMEElMEElMjMlMjB0aGUlMjBsaW5lYXIlMjBjbGFzc2lmaWVyJTIwc3RpbGwlMjBuZWVkcyUyMHRvJTIwYmUlMjB0cmFpbmVkJTBBbG9naXRzJTIwJTNEJTIwb3V0cHV0cy5sb2dpdHM=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, TFFlaubertForMultipleChoice
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> tensorflow <span class="hljs-keyword">as</span> tf

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;flaubert/flaubert_base_cased&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFFlaubertForMultipleChoice.from_pretrained(<span class="hljs-string">&quot;flaubert/flaubert_base_cased&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>prompt = <span class="hljs-string">&quot;In Italy, pizza served in formal settings, such as at a restaurant, is presented unsliced.&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>choice0 = <span class="hljs-string">&quot;It is eaten with a fork and a knife.&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>choice1 = <span class="hljs-string">&quot;It is eaten while held in the hand.&quot;</span>

<span class="hljs-meta">&gt;&gt;&gt; </span>encoding = tokenizer([prompt, prompt], [choice0, choice1], return_tensors=<span class="hljs-string">&quot;tf&quot;</span>, padding=<span class="hljs-literal">True</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = {k: tf.expand_dims(v, <span class="hljs-number">0</span>) <span class="hljs-keyword">for</span> k, v <span class="hljs-keyword">in</span> encoding.items()}
<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(inputs)  <span class="hljs-comment"># batch size is 1</span>

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># the linear classifier still needs to be trained</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>logits = outputs.logits`}}),{c(){d=a("p"),T=n("Example:"),h=p(),v(m.$$.fragment)},l(i){d=r(i,"P",{});var c=l(d);T=s(c,"Example:"),c.forEach(t),h=u(i),w(m.$$.fragment,i)},m(i,c){_(i,d,c),e(d,T),_(i,h,c),k(m,i,c),y=!0},p:Oe,i(i){y||(M(m.$$.fragment,i),y=!0)},o(i){F(m.$$.fragment,i),y=!1},d(i){i&&t(d),i&&t(h),$(m,i)}}}function cy(U){let d,T,h,m,y,i,c,J,ve,ge,V,ce,O,E,we,X,pe,Ne,Y,te,ae,S,ie,ke,D,Me,_e,B,Fe,de,oe,z,x,ue,L,be,he,Q,$e,ye,N,Ee,G,je,Ce,R,Je,Ue,q,me,P,Te,K,I,ze,W,ne,re;return{c(){d=a("p"),T=n("TensorFlow models and layers in "),h=a("code"),m=n("transformers"),y=n(" accept two formats as input:"),i=p(),c=a("ul"),J=a("li"),ve=n("having all inputs as keyword arguments (like PyTorch models), or"),ge=p(),V=a("li"),ce=n("having all inputs as a list, tuple or dict in the first positional argument."),O=p(),E=a("p"),we=n(`The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
and layers. Because of this support, when using methods like `),X=a("code"),pe=n("model.fit()"),Ne=n(` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),Y=a("code"),te=n("model.fit()"),ae=n(` supports! If, however, you want to use the second
format outside of Keras methods like `),S=a("code"),ie=n("fit()"),ke=n(" and "),D=a("code"),Me=n("predict()"),_e=n(`, such as when creating your own layers or models with
the Keras `),B=a("code"),Fe=n("Functional"),de=n(` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),oe=p(),z=a("ul"),x=a("li"),ue=n("a single Tensor with "),L=a("code"),be=n("input_ids"),he=n(" only and nothing else: "),Q=a("code"),$e=n("model(input_ids)"),ye=p(),N=a("li"),Ee=n(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),G=a("code"),je=n("model([input_ids, attention_mask])"),Ce=n(" or "),R=a("code"),Je=n("model([input_ids, attention_mask, token_type_ids])"),Ue=p(),q=a("li"),me=n(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),P=a("code"),Te=n('model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),K=p(),I=a("p"),ze=n(`Note that when creating models and layers with
`),W=a("a"),ne=n("subclassing"),re=n(` then you don\u2019t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`),this.h()},l(g){d=r(g,"P",{});var j=l(d);T=s(j,"TensorFlow models and layers in "),h=r(j,"CODE",{});var Be=l(h);m=s(Be,"transformers"),Be.forEach(t),y=s(j," accept two formats as input:"),j.forEach(t),i=u(g),c=r(g,"UL",{});var ee=l(c);J=r(ee,"LI",{});var Ge=l(J);ve=s(Ge,"having all inputs as keyword arguments (like PyTorch models), or"),Ge.forEach(t),ge=u(ee),V=r(ee,"LI",{});var Ve=l(V);ce=s(Ve,"having all inputs as a list, tuple or dict in the first positional argument."),Ve.forEach(t),ee.forEach(t),O=u(g),E=r(g,"P",{});var C=l(E);we=s(C,`The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
and layers. Because of this support, when using methods like `),X=r(C,"CODE",{});var We=l(X);pe=s(We,"model.fit()"),We.forEach(t),Ne=s(C,` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),Y=r(C,"CODE",{});var Ie=l(Y);te=s(Ie,"model.fit()"),Ie.forEach(t),ae=s(C,` supports! If, however, you want to use the second
format outside of Keras methods like `),S=r(C,"CODE",{});var Re=l(S);ie=s(Re,"fit()"),Re.forEach(t),ke=s(C," and "),D=r(C,"CODE",{});var Xe=l(D);Me=s(Xe,"predict()"),Xe.forEach(t),_e=s(C,`, such as when creating your own layers or models with
the Keras `),B=r(C,"CODE",{});var Ze=l(B);Fe=s(Ze,"Functional"),Ze.forEach(t),de=s(C,` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),C.forEach(t),oe=u(g),z=r(g,"UL",{});var Z=l(z);x=r(Z,"LI",{});var H=l(x);ue=s(H,"a single Tensor with "),L=r(H,"CODE",{});var Ae=l(L);be=s(Ae,"input_ids"),Ae.forEach(t),he=s(H," only and nothing else: "),Q=r(H,"CODE",{});var qe=l(Q);$e=s(qe,"model(input_ids)"),qe.forEach(t),H.forEach(t),ye=u(Z),N=r(Z,"LI",{});var A=l(N);Ee=s(A,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),G=r(A,"CODE",{});var Se=l(G);je=s(Se,"model([input_ids, attention_mask])"),Se.forEach(t),Ce=s(A," or "),R=r(A,"CODE",{});var De=l(R);Je=s(De,"model([input_ids, attention_mask, token_type_ids])"),De.forEach(t),A.forEach(t),Ue=u(Z),q=r(Z,"LI",{});var fe=l(q);me=s(fe,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),P=r(fe,"CODE",{});var xe=l(P);Te=s(xe,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),xe.forEach(t),fe.forEach(t),Z.forEach(t),K=u(g),I=r(g,"P",{});var se=l(I);ze=s(se,`Note that when creating models and layers with
`),W=r(se,"A",{href:!0,rel:!0});var Qe=l(W);ne=s(Qe,"subclassing"),Qe.forEach(t),re=s(se,` then you don\u2019t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`),se.forEach(t),this.h()},h(){f(W,"href","https://keras.io/guides/making_new_layers_and_models_via_subclassing/"),f(W,"rel","nofollow")},m(g,j){_(g,d,j),e(d,T),e(d,h),e(h,m),e(d,y),_(g,i,j),_(g,c,j),e(c,J),e(J,ve),e(c,ge),e(c,V),e(V,ce),_(g,O,j),_(g,E,j),e(E,we),e(E,X),e(X,pe),e(E,Ne),e(E,Y),e(Y,te),e(E,ae),e(E,S),e(S,ie),e(E,ke),e(E,D),e(D,Me),e(E,_e),e(E,B),e(B,Fe),e(E,de),_(g,oe,j),_(g,z,j),e(z,x),e(x,ue),e(x,L),e(L,be),e(x,he),e(x,Q),e(Q,$e),e(z,ye),e(z,N),e(N,Ee),e(N,G),e(G,je),e(N,Ce),e(N,R),e(R,Je),e(z,Ue),e(z,q),e(q,me),e(q,P),e(P,Te),_(g,K,j),_(g,I,j),e(I,ze),e(I,W),e(W,ne),e(I,re)},d(g){g&&t(d),g&&t(i),g&&t(c),g&&t(O),g&&t(E),g&&t(oe),g&&t(z),g&&t(K),g&&t(I)}}}function py(U){let d,T,h,m,y;return{c(){d=a("p"),T=n("Although the recipe for forward pass needs to be defined within this function, one should call the "),h=a("code"),m=n("Module"),y=n(`
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(i){d=r(i,"P",{});var c=l(d);T=s(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),h=r(c,"CODE",{});var J=l(h);m=s(J,"Module"),J.forEach(t),y=s(c,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),c.forEach(t)},m(i,c){_(i,d,c),e(d,T),e(d,h),e(h,m),e(d,y)},d(i){i&&t(d)}}}function uy(U){let d,T,h,m,y;return m=new Ke({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBURkZsYXViZXJ0Rm9yVG9rZW5DbGFzc2lmaWNhdGlvbiUwQWltcG9ydCUyMHRlbnNvcmZsb3clMjBhcyUyMHRmJTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIyZmxhdWJlcnQlMkZmbGF1YmVydF9iYXNlX2Nhc2VkJTIyKSUwQW1vZGVsJTIwJTNEJTIwVEZGbGF1YmVydEZvclRva2VuQ2xhc3NpZmljYXRpb24uZnJvbV9wcmV0cmFpbmVkKCUyMmZsYXViZXJ0JTJGZmxhdWJlcnRfYmFzZV9jYXNlZCUyMiklMEElMEFpbnB1dHMlMjAlM0QlMjB0b2tlbml6ZXIoJTBBJTIwJTIwJTIwJTIwJTIySHVnZ2luZ0ZhY2UlMjBpcyUyMGElMjBjb21wYW55JTIwYmFzZWQlMjBpbiUyMFBhcmlzJTIwYW5kJTIwTmV3JTIwWW9yayUyMiUyQyUyMGFkZF9zcGVjaWFsX3Rva2VucyUzREZhbHNlJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJ0ZiUyMiUwQSklMEElMEFsb2dpdHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cykubG9naXRzJTBBcHJlZGljdGVkX3Rva2VuX2NsYXNzX2lkcyUyMCUzRCUyMHRmLm1hdGguYXJnbWF4KGxvZ2l0cyUyQyUyMGF4aXMlM0QtMSklMEElMEElMjMlMjBOb3RlJTIwdGhhdCUyMHRva2VucyUyMGFyZSUyMGNsYXNzaWZpZWQlMjByYXRoZXIlMjB0aGVuJTIwaW5wdXQlMjB3b3JkcyUyMHdoaWNoJTIwbWVhbnMlMjB0aGF0JTBBJTIzJTIwdGhlcmUlMjBtaWdodCUyMGJlJTIwbW9yZSUyMHByZWRpY3RlZCUyMHRva2VuJTIwY2xhc3NlcyUyMHRoYW4lMjB3b3Jkcy4lMEElMjMlMjBNdWx0aXBsZSUyMHRva2VuJTIwY2xhc3NlcyUyMG1pZ2h0JTIwYWNjb3VudCUyMGZvciUyMHRoZSUyMHNhbWUlMjB3b3JkJTBBcHJlZGljdGVkX3Rva2Vuc19jbGFzc2VzJTIwJTNEJTIwJTVCbW9kZWwuY29uZmlnLmlkMmxhYmVsJTVCdCU1RCUyMGZvciUyMHQlMjBpbiUyMHByZWRpY3RlZF90b2tlbl9jbGFzc19pZHMlNUIwJTVELm51bXB5KCkudG9saXN0KCklNUQ=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, TFFlaubertForTokenClassification
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> tensorflow <span class="hljs-keyword">as</span> tf

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;flaubert/flaubert_base_cased&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFFlaubertForTokenClassification.from_pretrained(<span class="hljs-string">&quot;flaubert/flaubert_base_cased&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;tf&quot;</span>
<span class="hljs-meta">... </span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>logits = model(**inputs).logits
<span class="hljs-meta">&gt;&gt;&gt; </span>predicted_token_class_ids = tf.math.argmax(logits, axis=-<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] <span class="hljs-keyword">for</span> t <span class="hljs-keyword">in</span> predicted_token_class_ids[<span class="hljs-number">0</span>].numpy().tolist()]`}}),{c(){d=a("p"),T=n("Example:"),h=p(),v(m.$$.fragment)},l(i){d=r(i,"P",{});var c=l(d);T=s(c,"Example:"),c.forEach(t),h=u(i),w(m.$$.fragment,i)},m(i,c){_(i,d,c),e(d,T),_(i,h,c),k(m,i,c),y=!0},p:Oe,i(i){y||(M(m.$$.fragment,i),y=!0)},o(i){F(m.$$.fragment,i),y=!1},d(i){i&&t(d),i&&t(h),$(m,i)}}}function hy(U){let d,T;return d=new Ke({props:{code:"bGFiZWxzJTIwJTNEJTIwcHJlZGljdGVkX3Rva2VuX2NsYXNzX2lkcyUwQWxvc3MlMjAlM0QlMjB0Zi5tYXRoLnJlZHVjZV9tZWFuKG1vZGVsKCoqaW5wdXRzJTJDJTIwbGFiZWxzJTNEbGFiZWxzKS5sb3NzKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span>labels = predicted_token_class_ids
<span class="hljs-meta">&gt;&gt;&gt; </span>loss = tf.math.reduce_mean(model(**inputs, labels=labels).loss)`}}),{c(){v(d.$$.fragment)},l(h){w(d.$$.fragment,h)},m(h,m){k(d,h,m),T=!0},p:Oe,i(h){T||(M(d.$$.fragment,h),T=!0)},o(h){F(d.$$.fragment,h),T=!1},d(h){$(d,h)}}}function my(U){let d,T,h,m,y,i,c,J,ve,ge,V,ce,O,E,we,X,pe,Ne,Y,te,ae,S,ie,ke,D,Me,_e,B,Fe,de,oe,z,x,ue,L,be,he,Q,$e,ye,N,Ee,G,je,Ce,R,Je,Ue,q,me,P,Te,K,I,ze,W,ne,re;return{c(){d=a("p"),T=n("TensorFlow models and layers in "),h=a("code"),m=n("transformers"),y=n(" accept two formats as input:"),i=p(),c=a("ul"),J=a("li"),ve=n("having all inputs as keyword arguments (like PyTorch models), or"),ge=p(),V=a("li"),ce=n("having all inputs as a list, tuple or dict in the first positional argument."),O=p(),E=a("p"),we=n(`The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
and layers. Because of this support, when using methods like `),X=a("code"),pe=n("model.fit()"),Ne=n(` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),Y=a("code"),te=n("model.fit()"),ae=n(` supports! If, however, you want to use the second
format outside of Keras methods like `),S=a("code"),ie=n("fit()"),ke=n(" and "),D=a("code"),Me=n("predict()"),_e=n(`, such as when creating your own layers or models with
the Keras `),B=a("code"),Fe=n("Functional"),de=n(` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),oe=p(),z=a("ul"),x=a("li"),ue=n("a single Tensor with "),L=a("code"),be=n("input_ids"),he=n(" only and nothing else: "),Q=a("code"),$e=n("model(input_ids)"),ye=p(),N=a("li"),Ee=n(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),G=a("code"),je=n("model([input_ids, attention_mask])"),Ce=n(" or "),R=a("code"),Je=n("model([input_ids, attention_mask, token_type_ids])"),Ue=p(),q=a("li"),me=n(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),P=a("code"),Te=n('model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),K=p(),I=a("p"),ze=n(`Note that when creating models and layers with
`),W=a("a"),ne=n("subclassing"),re=n(` then you don\u2019t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`),this.h()},l(g){d=r(g,"P",{});var j=l(d);T=s(j,"TensorFlow models and layers in "),h=r(j,"CODE",{});var Be=l(h);m=s(Be,"transformers"),Be.forEach(t),y=s(j," accept two formats as input:"),j.forEach(t),i=u(g),c=r(g,"UL",{});var ee=l(c);J=r(ee,"LI",{});var Ge=l(J);ve=s(Ge,"having all inputs as keyword arguments (like PyTorch models), or"),Ge.forEach(t),ge=u(ee),V=r(ee,"LI",{});var Ve=l(V);ce=s(Ve,"having all inputs as a list, tuple or dict in the first positional argument."),Ve.forEach(t),ee.forEach(t),O=u(g),E=r(g,"P",{});var C=l(E);we=s(C,`The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
and layers. Because of this support, when using methods like `),X=r(C,"CODE",{});var We=l(X);pe=s(We,"model.fit()"),We.forEach(t),Ne=s(C,` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),Y=r(C,"CODE",{});var Ie=l(Y);te=s(Ie,"model.fit()"),Ie.forEach(t),ae=s(C,` supports! If, however, you want to use the second
format outside of Keras methods like `),S=r(C,"CODE",{});var Re=l(S);ie=s(Re,"fit()"),Re.forEach(t),ke=s(C," and "),D=r(C,"CODE",{});var Xe=l(D);Me=s(Xe,"predict()"),Xe.forEach(t),_e=s(C,`, such as when creating your own layers or models with
the Keras `),B=r(C,"CODE",{});var Ze=l(B);Fe=s(Ze,"Functional"),Ze.forEach(t),de=s(C,` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),C.forEach(t),oe=u(g),z=r(g,"UL",{});var Z=l(z);x=r(Z,"LI",{});var H=l(x);ue=s(H,"a single Tensor with "),L=r(H,"CODE",{});var Ae=l(L);be=s(Ae,"input_ids"),Ae.forEach(t),he=s(H," only and nothing else: "),Q=r(H,"CODE",{});var qe=l(Q);$e=s(qe,"model(input_ids)"),qe.forEach(t),H.forEach(t),ye=u(Z),N=r(Z,"LI",{});var A=l(N);Ee=s(A,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),G=r(A,"CODE",{});var Se=l(G);je=s(Se,"model([input_ids, attention_mask])"),Se.forEach(t),Ce=s(A," or "),R=r(A,"CODE",{});var De=l(R);Je=s(De,"model([input_ids, attention_mask, token_type_ids])"),De.forEach(t),A.forEach(t),Ue=u(Z),q=r(Z,"LI",{});var fe=l(q);me=s(fe,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),P=r(fe,"CODE",{});var xe=l(P);Te=s(xe,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),xe.forEach(t),fe.forEach(t),Z.forEach(t),K=u(g),I=r(g,"P",{});var se=l(I);ze=s(se,`Note that when creating models and layers with
`),W=r(se,"A",{href:!0,rel:!0});var Qe=l(W);ne=s(Qe,"subclassing"),Qe.forEach(t),re=s(se,` then you don\u2019t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`),se.forEach(t),this.h()},h(){f(W,"href","https://keras.io/guides/making_new_layers_and_models_via_subclassing/"),f(W,"rel","nofollow")},m(g,j){_(g,d,j),e(d,T),e(d,h),e(h,m),e(d,y),_(g,i,j),_(g,c,j),e(c,J),e(J,ve),e(c,ge),e(c,V),e(V,ce),_(g,O,j),_(g,E,j),e(E,we),e(E,X),e(X,pe),e(E,Ne),e(E,Y),e(Y,te),e(E,ae),e(E,S),e(S,ie),e(E,ke),e(E,D),e(D,Me),e(E,_e),e(E,B),e(B,Fe),e(E,de),_(g,oe,j),_(g,z,j),e(z,x),e(x,ue),e(x,L),e(L,be),e(x,he),e(x,Q),e(Q,$e),e(z,ye),e(z,N),e(N,Ee),e(N,G),e(G,je),e(N,Ce),e(N,R),e(R,Je),e(z,Ue),e(z,q),e(q,me),e(q,P),e(P,Te),_(g,K,j),_(g,I,j),e(I,ze),e(I,W),e(W,ne),e(I,re)},d(g){g&&t(d),g&&t(i),g&&t(c),g&&t(O),g&&t(E),g&&t(oe),g&&t(z),g&&t(K),g&&t(I)}}}function fy(U){let d,T,h,m,y;return{c(){d=a("p"),T=n("Although the recipe for forward pass needs to be defined within this function, one should call the "),h=a("code"),m=n("Module"),y=n(`
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(i){d=r(i,"P",{});var c=l(d);T=s(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),h=r(c,"CODE",{});var J=l(h);m=s(J,"Module"),J.forEach(t),y=s(c,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),c.forEach(t)},m(i,c){_(i,d,c),e(d,T),e(d,h),e(h,m),e(d,y)},d(i){i&&t(d)}}}function gy(U){let d,T,h,m,y;return m=new Ke({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBURkZsYXViZXJ0Rm9yUXVlc3Rpb25BbnN3ZXJpbmdTaW1wbGUlMEFpbXBvcnQlMjB0ZW5zb3JmbG93JTIwYXMlMjB0ZiUwQSUwQXRva2VuaXplciUyMCUzRCUyMEF1dG9Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMmZsYXViZXJ0JTJGZmxhdWJlcnRfYmFzZV9jYXNlZCUyMiklMEFtb2RlbCUyMCUzRCUyMFRGRmxhdWJlcnRGb3JRdWVzdGlvbkFuc3dlcmluZ1NpbXBsZS5mcm9tX3ByZXRyYWluZWQoJTIyZmxhdWJlcnQlMkZmbGF1YmVydF9iYXNlX2Nhc2VkJTIyKSUwQSUwQXF1ZXN0aW9uJTJDJTIwdGV4dCUyMCUzRCUyMCUyMldobyUyMHdhcyUyMEppbSUyMEhlbnNvbiUzRiUyMiUyQyUyMCUyMkppbSUyMEhlbnNvbiUyMHdhcyUyMGElMjBuaWNlJTIwcHVwcGV0JTIyJTBBJTBBaW5wdXRzJTIwJTNEJTIwdG9rZW5pemVyKHF1ZXN0aW9uJTJDJTIwdGV4dCUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIydGYlMjIpJTBBb3V0cHV0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzKSUwQSUwQWFuc3dlcl9zdGFydF9pbmRleCUyMCUzRCUyMGludCh0Zi5tYXRoLmFyZ21heChvdXRwdXRzLnN0YXJ0X2xvZ2l0cyUyQyUyMGF4aXMlM0QtMSklNUIwJTVEKSUwQWFuc3dlcl9lbmRfaW5kZXglMjAlM0QlMjBpbnQodGYubWF0aC5hcmdtYXgob3V0cHV0cy5lbmRfbG9naXRzJTJDJTIwYXhpcyUzRC0xKSU1QjAlNUQpJTBBJTBBcHJlZGljdF9hbnN3ZXJfdG9rZW5zJTIwJTNEJTIwaW5wdXRzLmlucHV0X2lkcyU1QjAlMkMlMjBhbnN3ZXJfc3RhcnRfaW5kZXglMjAlM0ElMjBhbnN3ZXJfZW5kX2luZGV4JTIwJTJCJTIwMSU1RA==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, TFFlaubertForQuestionAnsweringSimple
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> tensorflow <span class="hljs-keyword">as</span> tf

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;flaubert/flaubert_base_cased&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFFlaubertForQuestionAnsweringSimple.from_pretrained(<span class="hljs-string">&quot;flaubert/flaubert_base_cased&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>question, text = <span class="hljs-string">&quot;Who was Jim Henson?&quot;</span>, <span class="hljs-string">&quot;Jim Henson was a nice puppet&quot;</span>

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(question, text, return_tensors=<span class="hljs-string">&quot;tf&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs)

<span class="hljs-meta">&gt;&gt;&gt; </span>answer_start_index = <span class="hljs-built_in">int</span>(tf.math.argmax(outputs.start_logits, axis=-<span class="hljs-number">1</span>)[<span class="hljs-number">0</span>])
<span class="hljs-meta">&gt;&gt;&gt; </span>answer_end_index = <span class="hljs-built_in">int</span>(tf.math.argmax(outputs.end_logits, axis=-<span class="hljs-number">1</span>)[<span class="hljs-number">0</span>])

<span class="hljs-meta">&gt;&gt;&gt; </span>predict_answer_tokens = inputs.input_ids[<span class="hljs-number">0</span>, answer_start_index : answer_end_index + <span class="hljs-number">1</span>]`}}),{c(){d=a("p"),T=n("Example:"),h=p(),v(m.$$.fragment)},l(i){d=r(i,"P",{});var c=l(d);T=s(c,"Example:"),c.forEach(t),h=u(i),w(m.$$.fragment,i)},m(i,c){_(i,d,c),e(d,T),_(i,h,c),k(m,i,c),y=!0},p:Oe,i(i){y||(M(m.$$.fragment,i),y=!0)},o(i){F(m.$$.fragment,i),y=!1},d(i){i&&t(d),i&&t(h),$(m,i)}}}function _y(U){let d,T;return d=new Ke({props:{code:"JTIzJTIwdGFyZ2V0JTIwaXMlMjAlMjJuaWNlJTIwcHVwcGV0JTIyJTBBdGFyZ2V0X3N0YXJ0X2luZGV4JTIwJTNEJTIwdGYuY29uc3RhbnQoJTVCMTQlNUQpJTBBdGFyZ2V0X2VuZF9pbmRleCUyMCUzRCUyMHRmLmNvbnN0YW50KCU1QjE1JTVEKSUwQSUwQW91dHB1dHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cyUyQyUyMHN0YXJ0X3Bvc2l0aW9ucyUzRHRhcmdldF9zdGFydF9pbmRleCUyQyUyMGVuZF9wb3NpdGlvbnMlM0R0YXJnZXRfZW5kX2luZGV4KSUwQWxvc3MlMjAlM0QlMjB0Zi5tYXRoLnJlZHVjZV9tZWFuKG91dHB1dHMubG9zcyk=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># target is &quot;nice puppet&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>target_start_index = tf.constant([<span class="hljs-number">14</span>])
<span class="hljs-meta">&gt;&gt;&gt; </span>target_end_index = tf.constant([<span class="hljs-number">15</span>])

<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs, start_positions=target_start_index, end_positions=target_end_index)
<span class="hljs-meta">&gt;&gt;&gt; </span>loss = tf.math.reduce_mean(outputs.loss)`}}),{c(){v(d.$$.fragment)},l(h){w(d.$$.fragment,h)},m(h,m){k(d,h,m),T=!0},p:Oe,i(h){T||(M(d.$$.fragment,h),T=!0)},o(h){F(d.$$.fragment,h),T=!1},d(h){$(d,h)}}}function by(U){let d,T,h,m,y,i,c,J,ve,ge,V,ce,O,E,we,X,pe,Ne,Y,te,ae,S,ie,ke,D,Me,_e,B,Fe,de,oe,z,x,ue,L,be,he,Q,$e,ye,N,Ee,G,je,Ce,R,Je,Ue,q,me,P,Te,K,I,ze,W,ne,re,g,j,Be,ee,Ge,Ve,C,We,Ie,Re,Xe,Ze,Z,H,Ae,qe,A,Se,De,fe,xe,se,Qe,kr,$a,Gd,bi,Yt,Jo,Mr,Xn,Rd,Fr,Xd,yi,Nt,An,Ad,It,Sd,Ea,Dd,Qd,ja,Yd,Ld,Sn,Pd,Hd,Od,Lt,Kd,Ca,ec,tc,Ja,oc,nc,Ti,Pt,Uo,$r,Dn,sc,Er,ac,vi,Ye,Qn,rc,jr,lc,ic,xt,Cr,dc,cc,Jr,pc,uc,Wt,hc,Ur,mc,fc,zr,gc,_c,Nr,bc,yc,Tc,Yn,vc,Ir,wc,kc,Mc,Ln,Fc,Ua,$c,Ec,jc,Zt,Pn,Cc,xr,Jc,Uc,Hn,za,zc,Wr,Nc,Ic,Na,xc,Zr,Wc,Zc,zo,On,qc,qr,Vc,Bc,bt,Kn,Gc,Vr,Rc,Xc,No,Ac,Ht,Sc,Br,Dc,Qc,Gr,Yc,Lc,Pc,Io,es,Hc,ts,Oc,Rr,Kc,ep,wi,Ot,xo,Xr,os,tp,Ar,op,ki,Kt,ns,np,yt,ss,sp,eo,ap,Ia,rp,lp,Sr,ip,dp,cp,Wo,pp,Zo,Mi,to,qo,Dr,as,up,Qr,hp,Fi,lt,rs,mp,Yr,fp,gp,ls,_p,xa,bp,yp,Tp,is,vp,ds,wp,kp,Mp,Tt,cs,Fp,oo,$p,Wa,Ep,jp,Lr,Cp,Jp,Up,Vo,zp,Bo,$i,no,Go,Pr,ps,Np,Hr,Ip,Ei,it,us,xp,Or,Wp,Zp,hs,qp,Za,Vp,Bp,Gp,ms,Rp,fs,Xp,Ap,Sp,ut,gs,Dp,so,Qp,qa,Yp,Lp,Kr,Pp,Hp,Op,Ro,Kp,Xo,eu,Ao,ji,ao,So,el,_s,tu,tl,ou,Ci,dt,bs,nu,ol,su,au,ys,ru,Va,lu,iu,du,Ts,cu,vs,pu,uu,hu,vt,ws,mu,ro,fu,Ba,gu,_u,nl,bu,yu,Tu,Do,vu,Qo,Ji,lo,Yo,sl,ks,wu,al,ku,Ui,ct,Ms,Mu,rl,Fu,$u,Fs,Eu,Ga,ju,Cu,Ju,$s,Uu,Es,zu,Nu,Iu,wt,js,xu,io,Wu,Ra,Zu,qu,ll,Vu,Bu,Gu,Lo,Ru,Po,zi,co,Ho,il,Cs,Xu,dl,Au,Ni,pt,Js,Su,po,Du,cl,Qu,Yu,pl,Lu,Pu,Hu,Us,Ou,Xa,Ku,eh,th,zs,oh,Ns,nh,sh,ah,kt,Is,rh,uo,lh,Aa,ih,dh,ul,ch,ph,uh,Oo,hh,Ko,Ii,ho,en,hl,xs,mh,ml,fh,xi,mo,Ws,gh,ht,Zs,_h,fo,bh,Sa,yh,Th,fl,vh,wh,kh,tn,Mh,qs,Fh,gl,$h,Eh,jh,on,Wi,go,nn,_l,Vs,Ch,bl,Jh,Zi,et,Bs,Uh,yl,zh,Nh,Gs,Ih,Da,xh,Wh,Zh,Rs,qh,Xs,Vh,Bh,Gh,sn,Rh,Mt,As,Xh,_o,Ah,Qa,Sh,Dh,Tl,Qh,Yh,Lh,an,Ph,rn,qi,bo,ln,vl,Ss,Hh,wl,Oh,Vi,tt,Ds,Kh,kl,em,tm,Qs,om,Ya,nm,sm,am,Ys,rm,Ls,lm,im,dm,dn,cm,Ft,Ps,pm,yo,um,La,hm,mm,Ml,fm,gm,_m,cn,bm,pn,Bi,To,un,Fl,Hs,ym,$l,Tm,Gi,ot,Os,vm,El,wm,km,Ks,Mm,Pa,Fm,$m,Em,ea,jm,ta,Cm,Jm,Um,hn,zm,mt,oa,Nm,vo,Im,Ha,xm,Wm,jl,Zm,qm,Vm,mn,Bm,fn,Gm,gn,Ri,wo,_n,Cl,na,Rm,Jl,Xm,Xi,nt,sa,Am,Ul,Sm,Dm,aa,Qm,Oa,Ym,Lm,Pm,ra,Hm,la,Om,Km,ef,bn,tf,$t,ia,of,ko,nf,Ka,sf,af,zl,rf,lf,df,yn,cf,Tn,Ai,Mo,vn,Nl,da,pf,Il,uf,Si,st,ca,hf,xl,mf,ff,pa,gf,er,_f,bf,yf,ua,Tf,ha,vf,wf,kf,wn,Mf,ft,ma,Ff,Fo,$f,tr,Ef,jf,Wl,Cf,Jf,Uf,kn,zf,Mn,Nf,Fn,Di,$o,$n,Zl,fa,If,ql,xf,Qi,at,ga,Wf,Eo,Zf,Vl,qf,Vf,Bl,Bf,Gf,Rf,_a,Xf,or,Af,Sf,Df,ba,Qf,ya,Yf,Lf,Pf,En,Hf,gt,Ta,Of,jo,Kf,nr,eg,tg,Gl,og,ng,sg,jn,ag,Cn,rg,Jn,Yi;return i=new Pe({}),ie=new Pe({}),j=new Pe({}),Xn=new Pe({}),An=new le({props:{name:"class transformers.FlaubertConfig",anchor:"transformers.FlaubertConfig",parameters:[{name:"pre_norm",val:" = False"},{name:"layerdrop",val:" = 0.0"},{name:"vocab_size",val:" = 30145"},{name:"emb_dim",val:" = 2048"},{name:"n_layers",val:" = 12"},{name:"n_heads",val:" = 16"},{name:"dropout",val:" = 0.1"},{name:"attention_dropout",val:" = 0.1"},{name:"gelu_activation",val:" = True"},{name:"sinusoidal_embeddings",val:" = False"},{name:"causal",val:" = False"},{name:"asm",val:" = False"},{name:"n_langs",val:" = 1"},{name:"use_lang_emb",val:" = True"},{name:"max_position_embeddings",val:" = 512"},{name:"embed_init_std",val:" = 0.02209708691207961"},{name:"layer_norm_eps",val:" = 1e-12"},{name:"init_std",val:" = 0.02"},{name:"bos_index",val:" = 0"},{name:"eos_index",val:" = 1"},{name:"pad_index",val:" = 2"},{name:"unk_index",val:" = 3"},{name:"mask_index",val:" = 5"},{name:"is_encoder",val:" = True"},{name:"summary_type",val:" = 'first'"},{name:"summary_use_proj",val:" = True"},{name:"summary_activation",val:" = None"},{name:"summary_proj_to_labels",val:" = True"},{name:"summary_first_dropout",val:" = 0.1"},{name:"start_n_top",val:" = 5"},{name:"end_n_top",val:" = 5"},{name:"mask_token_id",val:" = 0"},{name:"lang_id",val:" = 0"},{name:"pad_token_id",val:" = 2"},{name:"bos_token_id",val:" = 0"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.FlaubertConfig.pre_norm",description:`<strong>pre_norm</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether to apply the layer normalization before or after the feed forward layer following the attention in
each layer (Vaswani et al., Tensor2Tensor for Neural Machine Translation. 2018)`,name:"pre_norm"},{anchor:"transformers.FlaubertConfig.layerdrop",description:`<strong>layerdrop</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#x2014;
Probability to drop layers during training (Fan et al., Reducing Transformer Depth on Demand with
Structured Dropout. ICLR 2020)`,name:"layerdrop"},{anchor:"transformers.FlaubertConfig.vocab_size",description:`<strong>vocab_size</strong> (<code>int</code>, <em>optional</em>, defaults to 30145) &#x2014;
Vocabulary size of the FlauBERT model. Defines the number of different tokens that can be represented by
the <code>inputs_ids</code> passed when calling <a href="/docs/transformers/v4.31.0/en/model_doc/flaubert#transformers.FlaubertModel">FlaubertModel</a> or <a href="/docs/transformers/v4.31.0/en/model_doc/flaubert#transformers.TFFlaubertModel">TFFlaubertModel</a>.`,name:"vocab_size"},{anchor:"transformers.FlaubertConfig.emb_dim",description:`<strong>emb_dim</strong> (<code>int</code>, <em>optional</em>, defaults to 2048) &#x2014;
Dimensionality of the encoder layers and the pooler layer.`,name:"emb_dim"},{anchor:"transformers.FlaubertConfig.n_layer",description:`<strong>n_layer</strong> (<code>int</code>, <em>optional</em>, defaults to 12) &#x2014;
Number of hidden layers in the Transformer encoder.`,name:"n_layer"},{anchor:"transformers.FlaubertConfig.n_head",description:`<strong>n_head</strong> (<code>int</code>, <em>optional</em>, defaults to 16) &#x2014;
Number of attention heads for each attention layer in the Transformer encoder.`,name:"n_head"},{anchor:"transformers.FlaubertConfig.dropout",description:`<strong>dropout</strong> (<code>float</code>, <em>optional</em>, defaults to 0.1) &#x2014;
The dropout probability for all fully connected layers in the embeddings, encoder, and pooler.`,name:"dropout"},{anchor:"transformers.FlaubertConfig.attention_dropout",description:`<strong>attention_dropout</strong> (<code>float</code>, <em>optional</em>, defaults to 0.1) &#x2014;
The dropout probability for the attention mechanism`,name:"attention_dropout"},{anchor:"transformers.FlaubertConfig.gelu_activation",description:`<strong>gelu_activation</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to use a <em>gelu</em> activation instead of <em>relu</em>.`,name:"gelu_activation"},{anchor:"transformers.FlaubertConfig.sinusoidal_embeddings",description:`<strong>sinusoidal_embeddings</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to use sinusoidal positional embeddings instead of absolute positional embeddings.`,name:"sinusoidal_embeddings"},{anchor:"transformers.FlaubertConfig.causal",description:`<strong>causal</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not the model should behave in a causal manner. Causal models use a triangular attention mask in
order to only attend to the left-side context instead if a bidirectional context.`,name:"causal"},{anchor:"transformers.FlaubertConfig.asm",description:`<strong>asm</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to use an adaptive log softmax projection layer instead of a linear layer for the prediction
layer.`,name:"asm"},{anchor:"transformers.FlaubertConfig.n_langs",description:`<strong>n_langs</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
The number of languages the model handles. Set to 1 for monolingual models.`,name:"n_langs"},{anchor:"transformers.FlaubertConfig.use_lang_emb",description:`<strong>use_lang_emb</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to use language embeddings. Some models use additional language embeddings, see <a href="http://huggingface.co/transformers/multilingual.html#xlm-language-embeddings" rel="nofollow">the multilingual
models page</a> for information
on how to use them.`,name:"use_lang_emb"},{anchor:"transformers.FlaubertConfig.max_position_embeddings",description:`<strong>max_position_embeddings</strong> (<code>int</code>, <em>optional</em>, defaults to 512) &#x2014;
The maximum sequence length that this model might ever be used with. Typically set this to something large
just in case (e.g., 512 or 1024 or 2048).`,name:"max_position_embeddings"},{anchor:"transformers.FlaubertConfig.embed_init_std",description:`<strong>embed_init_std</strong> (<code>float</code>, <em>optional</em>, defaults to 2048^-0.5) &#x2014;
The standard deviation of the truncated_normal_initializer for initializing the embedding matrices.`,name:"embed_init_std"},{anchor:"transformers.FlaubertConfig.init_std",description:`<strong>init_std</strong> (<code>int</code>, <em>optional</em>, defaults to 50257) &#x2014;
The standard deviation of the truncated_normal_initializer for initializing all weight matrices except the
embedding matrices.`,name:"init_std"},{anchor:"transformers.FlaubertConfig.layer_norm_eps",description:`<strong>layer_norm_eps</strong> (<code>float</code>, <em>optional</em>, defaults to 1e-12) &#x2014;
The epsilon used by the layer normalization layers.`,name:"layer_norm_eps"},{anchor:"transformers.FlaubertConfig.bos_index",description:`<strong>bos_index</strong> (<code>int</code>, <em>optional</em>, defaults to 0) &#x2014;
The index of the beginning of sentence token in the vocabulary.`,name:"bos_index"},{anchor:"transformers.FlaubertConfig.eos_index",description:`<strong>eos_index</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
The index of the end of sentence token in the vocabulary.`,name:"eos_index"},{anchor:"transformers.FlaubertConfig.pad_index",description:`<strong>pad_index</strong> (<code>int</code>, <em>optional</em>, defaults to 2) &#x2014;
The index of the padding token in the vocabulary.`,name:"pad_index"},{anchor:"transformers.FlaubertConfig.unk_index",description:`<strong>unk_index</strong> (<code>int</code>, <em>optional</em>, defaults to 3) &#x2014;
The index of the unknown token in the vocabulary.`,name:"unk_index"},{anchor:"transformers.FlaubertConfig.mask_index",description:`<strong>mask_index</strong> (<code>int</code>, <em>optional</em>, defaults to 5) &#x2014;
The index of the masking token in the vocabulary.`,name:"mask_index"},{anchor:"transformers.FlaubertConfig.is_encoder(bool,",description:`<strong>is_encoder(<code>bool</code>,</strong> <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not the initialized model should be a transformer encoder or decoder as seen in Vaswani et al.`,name:"is_encoder(bool,"},{anchor:"transformers.FlaubertConfig.summary_type",description:`<strong>summary_type</strong> (<code>string</code>, <em>optional</em>, defaults to &#x201C;first&#x201D;) &#x2014;
Argument used when doing sequence summary. Used in the sequence classification and multiple choice models.</p>
<p>Has to be one of the following options:</p>
<ul>
<li><code>&quot;last&quot;</code>: Take the last token hidden state (like XLNet).</li>
<li><code>&quot;first&quot;</code>: Take the first token hidden state (like BERT).</li>
<li><code>&quot;mean&quot;</code>: Take the mean of all tokens hidden states.</li>
<li><code>&quot;cls_index&quot;</code>: Supply a Tensor of classification token position (like GPT/GPT-2).</li>
<li><code>&quot;attn&quot;</code>: Not implemented now, use multi-head attention.</li>
</ul>`,name:"summary_type"},{anchor:"transformers.FlaubertConfig.summary_use_proj",description:`<strong>summary_use_proj</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Argument used when doing sequence summary. Used in the sequence classification and multiple choice models.</p>
<p>Whether or not to add a projection after the vector extraction.`,name:"summary_use_proj"},{anchor:"transformers.FlaubertConfig.summary_activation",description:`<strong>summary_activation</strong> (<code>str</code>, <em>optional</em>) &#x2014;
Argument used when doing sequence summary. Used in the sequence classification and multiple choice models.</p>
<p>Pass <code>&quot;tanh&quot;</code> for a tanh activation to the output, any other value will result in no activation.`,name:"summary_activation"},{anchor:"transformers.FlaubertConfig.summary_proj_to_labels",description:`<strong>summary_proj_to_labels</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Used in the sequence classification and multiple choice models.</p>
<p>Whether the projection outputs should have <code>config.num_labels</code> or <code>config.hidden_size</code> classes.`,name:"summary_proj_to_labels"},{anchor:"transformers.FlaubertConfig.summary_first_dropout",description:`<strong>summary_first_dropout</strong> (<code>float</code>, <em>optional</em>, defaults to 0.1) &#x2014;
Used in the sequence classification and multiple choice models.</p>
<p>The dropout ratio to be used after the projection and activation.`,name:"summary_first_dropout"},{anchor:"transformers.FlaubertConfig.start_n_top",description:`<strong>start_n_top</strong> (<code>int</code>, <em>optional</em>, defaults to 5) &#x2014;
Used in the SQuAD evaluation script.`,name:"start_n_top"},{anchor:"transformers.FlaubertConfig.end_n_top",description:`<strong>end_n_top</strong> (<code>int</code>, <em>optional</em>, defaults to 5) &#x2014;
Used in the SQuAD evaluation script.`,name:"end_n_top"},{anchor:"transformers.FlaubertConfig.mask_token_id",description:`<strong>mask_token_id</strong> (<code>int</code>, <em>optional</em>, defaults to 0) &#x2014;
Model agnostic parameter to identify masked tokens when generating text in an MLM context.`,name:"mask_token_id"},{anchor:"transformers.FlaubertConfig.lang_id",description:`<strong>lang_id</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
The ID of the language used by the model. This parameter is used when generating text in a given language.`,name:"lang_id"}],source:"https://github.com/huggingface/transformers/blob/v4.31.0/src/transformers/models/flaubert/configuration_flaubert.py#L34"}}),Dn=new Pe({}),Qn=new le({props:{name:"class transformers.FlaubertTokenizer",anchor:"transformers.FlaubertTokenizer",parameters:[{name:"vocab_file",val:""},{name:"merges_file",val:""},{name:"do_lowercase",val:" = False"},{name:"unk_token",val:" = '<unk>'"},{name:"bos_token",val:" = '<s>'"},{name:"sep_token",val:" = '</s>'"},{name:"pad_token",val:" = '<pad>'"},{name:"cls_token",val:" = '</s>'"},{name:"mask_token",val:" = '<special1>'"},{name:"additional_special_tokens",val:" = ['<special0>', '<special1>', '<special2>', '<special3>', '<special4>', '<special5>', '<special6>', '<special7>', '<special8>', '<special9>']"},{name:"lang2id",val:" = None"},{name:"id2lang",val:" = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.FlaubertTokenizer.vocab_file",description:`<strong>vocab_file</strong> (<code>str</code>) &#x2014;
Vocabulary file.`,name:"vocab_file"},{anchor:"transformers.FlaubertTokenizer.merges_file",description:`<strong>merges_file</strong> (<code>str</code>) &#x2014;
Merges file.`,name:"merges_file"},{anchor:"transformers.FlaubertTokenizer.do_lowercase",description:`<strong>do_lowercase</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Controls lower casing.`,name:"do_lowercase"},{anchor:"transformers.FlaubertTokenizer.unk_token",description:`<strong>unk_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;unk&gt;&quot;</code>) &#x2014;
The unknown token. A token that is not in the vocabulary cannot be converted to an ID and is set to be this
token instead.`,name:"unk_token"},{anchor:"transformers.FlaubertTokenizer.bos_token",description:`<strong>bos_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;s&gt;&quot;</code>) &#x2014;
The beginning of sequence token that was used during pretraining. Can be used a sequence classifier token.</p>
<div class="course-tip  bg-gradient-to-br dark:bg-gradient-to-r before:border-green-500 dark:before:border-green-800 from-green-50 dark:from-gray-900 to-white dark:to-gray-950 border border-green-50 text-green-700 dark:text-gray-400">
						
<p>When building a sequence using special tokens, this is not the token that is used for the beginning of
sequence. The token used is the <code>cls_token</code>.</p>

					</div>`,name:"bos_token"},{anchor:"transformers.FlaubertTokenizer.sep_token",description:`<strong>sep_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;/s&gt;&quot;</code>) &#x2014;
The separator token, which is used when building a sequence from multiple sequences, e.g. two sequences for
sequence classification or for a text and a question for question answering. It is also used as the last
token of a sequence built with special tokens.`,name:"sep_token"},{anchor:"transformers.FlaubertTokenizer.pad_token",description:`<strong>pad_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;pad&gt;&quot;</code>) &#x2014;
The token used for padding, for example when batching sequences of different lengths.`,name:"pad_token"},{anchor:"transformers.FlaubertTokenizer.cls_token",description:`<strong>cls_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;/s&gt;&quot;</code>) &#x2014;
The classifier token which is used when doing sequence classification (classification of the whole sequence
instead of per-token classification). It is the first token of the sequence when built with special tokens.`,name:"cls_token"},{anchor:"transformers.FlaubertTokenizer.mask_token",description:`<strong>mask_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;special1&gt;&quot;</code>) &#x2014;
The token used for masking values. This is the token used when training this model with masked language
modeling. This is the token which the model will try to predict.`,name:"mask_token"},{anchor:"transformers.FlaubertTokenizer.additional_special_tokens",description:`<strong>additional_special_tokens</strong> (<code>List[str]</code>, <em>optional</em>, defaults to <code>[&quot;&lt;special0&gt;&quot;,&quot;&lt;special1&gt;&quot;,&quot;&lt;special2&gt;&quot;,&quot;&lt;special3&gt;&quot;,&quot;&lt;special4&gt;&quot;,&quot;&lt;special5&gt;&quot;,&quot;&lt;special6&gt;&quot;,&quot;&lt;special7&gt;&quot;,&quot;&lt;special8&gt;&quot;,&quot;&lt;special9&gt;&quot;]</code>) &#x2014;
List of additional special tokens.`,name:"additional_special_tokens"},{anchor:"transformers.FlaubertTokenizer.lang2id",description:`<strong>lang2id</strong> (<code>Dict[str, int]</code>, <em>optional</em>) &#x2014;
Dictionary mapping languages string identifiers to their IDs.`,name:"lang2id"},{anchor:"transformers.FlaubertTokenizer.id2lang",description:`<strong>id2lang</strong> (<code>Dict[int, str]</code>, <em>optional</em>) &#x2014;
Dictionary mapping language IDs to their string identifiers.`,name:"id2lang"}],source:"https://github.com/huggingface/transformers/blob/v4.31.0/src/transformers/models/flaubert/tokenization_flaubert.py#L165"}}),Pn=new le({props:{name:"build_inputs_with_special_tokens",anchor:"transformers.FlaubertTokenizer.build_inputs_with_special_tokens",parameters:[{name:"token_ids_0",val:": typing.List[int]"},{name:"token_ids_1",val:": typing.Optional[typing.List[int]] = None"}],parametersDescription:[{anchor:"transformers.FlaubertTokenizer.build_inputs_with_special_tokens.token_ids_0",description:`<strong>token_ids_0</strong> (<code>List[int]</code>) &#x2014;
List of IDs to which the special tokens will be added.`,name:"token_ids_0"},{anchor:"transformers.FlaubertTokenizer.build_inputs_with_special_tokens.token_ids_1",description:`<strong>token_ids_1</strong> (<code>List[int]</code>, <em>optional</em>) &#x2014;
Optional second list of IDs for sequence pairs.`,name:"token_ids_1"}],source:"https://github.com/huggingface/transformers/blob/v4.31.0/src/transformers/models/flaubert/tokenization_flaubert.py#L476",returnDescription:`
<p>List of <a href="../glossary#input-ids">input IDs</a> with the appropriate special tokens.</p>
`,returnType:`
<p><code>List[int]</code></p>
`}}),On=new le({props:{name:"convert_tokens_to_string",anchor:"transformers.FlaubertTokenizer.convert_tokens_to_string",parameters:[{name:"tokens",val:""}],source:"https://github.com/huggingface/transformers/blob/v4.31.0/src/transformers/models/flaubert/tokenization_flaubert.py#L470"}}),Kn=new le({props:{name:"create_token_type_ids_from_sequences",anchor:"transformers.FlaubertTokenizer.create_token_type_ids_from_sequences",parameters:[{name:"token_ids_0",val:": typing.List[int]"},{name:"token_ids_1",val:": typing.Optional[typing.List[int]] = None"}],parametersDescription:[{anchor:"transformers.FlaubertTokenizer.create_token_type_ids_from_sequences.token_ids_0",description:`<strong>token_ids_0</strong> (<code>List[int]</code>) &#x2014;
List of IDs.`,name:"token_ids_0"},{anchor:"transformers.FlaubertTokenizer.create_token_type_ids_from_sequences.token_ids_1",description:`<strong>token_ids_1</strong> (<code>List[int]</code>, <em>optional</em>) &#x2014;
Optional second list of IDs for sequence pairs.`,name:"token_ids_1"}],source:"https://github.com/huggingface/transformers/blob/v4.31.0/src/transformers/models/flaubert/tokenization_flaubert.py#L533",returnDescription:`
<p>List of <a href="../glossary#token-type-ids">token type IDs</a> according to the given sequence(s).</p>
`,returnType:`
<p><code>List[int]</code></p>
`}}),No=new He({props:{anchor:"transformers.FlaubertTokenizer.create_token_type_ids_from_sequences.example",$$slots:{default:[xb]},$$scope:{ctx:U}}}),es=new le({props:{name:"get_special_tokens_mask",anchor:"transformers.FlaubertTokenizer.get_special_tokens_mask",parameters:[{name:"token_ids_0",val:": typing.List[int]"},{name:"token_ids_1",val:": typing.Optional[typing.List[int]] = None"},{name:"already_has_special_tokens",val:": bool = False"}],parametersDescription:[{anchor:"transformers.FlaubertTokenizer.get_special_tokens_mask.token_ids_0",description:`<strong>token_ids_0</strong> (<code>List[int]</code>) &#x2014;
List of IDs.`,name:"token_ids_0"},{anchor:"transformers.FlaubertTokenizer.get_special_tokens_mask.token_ids_1",description:`<strong>token_ids_1</strong> (<code>List[int]</code>, <em>optional</em>) &#x2014;
Optional second list of IDs for sequence pairs.`,name:"token_ids_1"},{anchor:"transformers.FlaubertTokenizer.get_special_tokens_mask.already_has_special_tokens",description:`<strong>already_has_special_tokens</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not the token list is already formatted with special tokens for the model.`,name:"already_has_special_tokens"}],source:"https://github.com/huggingface/transformers/blob/v4.31.0/src/transformers/models/flaubert/tokenization_flaubert.py#L504",returnDescription:`
<p>A list of integers in the range [0, 1]: 1 for a special token, 0 for a sequence token.</p>
`,returnType:`
<p><code>List[int]</code></p>
`}}),os=new Pe({}),ns=new le({props:{name:"class transformers.FlaubertModel",anchor:"transformers.FlaubertModel",parameters:[{name:"config",val:""}],source:"https://github.com/huggingface/transformers/blob/v4.31.0/src/transformers/models/flaubert/modeling_flaubert.py#L380"}}),ss=new le({props:{name:"forward",anchor:"transformers.FlaubertModel.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"langs",val:": typing.Optional[torch.Tensor] = None"},{name:"token_type_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"position_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"lengths",val:": typing.Optional[torch.LongTensor] = None"},{name:"cache",val:": typing.Union[typing.Dict[str, torch.FloatTensor], NoneType] = None"},{name:"head_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.FloatTensor] = 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.FlaubertModel.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.31.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.31.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.31.0/en/model_doc/wav2vec2#transformers.Wav2Vec2CTCTokenizer.__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.FlaubertModel.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.FlaubertModel.forward.token_type_ids",description:`<strong>token_type_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.FlaubertModel.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.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.FlaubertModel.forward.lengths",description:`<strong>lengths</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Length of each sentence that can be used to avoid performing attention on padding token indices. You can
also use <code>attention_mask</code> for the same result (see above), kept here for compatibility. Indices selected in
<code>[0, ..., input_ids.size(-1)]</code>:`,name:"lengths"},{anchor:"transformers.FlaubertModel.forward.cache",description:`<strong>cache</strong> (<code>Dict[str, torch.FloatTensor]</code>, <em>optional</em>) &#x2014;
Dictionary strings to <code>torch.FloatTensor</code> that contains precomputed hidden-states (key and values in the
attention blocks) as computed by the model (see <code>cache</code> output below). Can be used to speed up sequential
decoding. The dictionary object will be modified in-place during the forward pass to add newly computed
hidden-states.`,name:"cache"},{anchor:"transformers.FlaubertModel.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.FlaubertModel.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.FlaubertModel.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.FlaubertModel.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.FlaubertModel.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/v4.31.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.31.0/src/transformers/models/flaubert/modeling_flaubert.py#L473",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.31.0/en/main_classes/output#transformers.modeling_outputs.BaseModelOutput"
>transformers.modeling_outputs.BaseModelOutput</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/v4.31.0/en/model_doc/flaubert#transformers.FlaubertConfig"
>FlaubertConfig</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>
</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/v4.31.0/en/main_classes/output#transformers.modeling_outputs.BaseModelOutput"
>transformers.modeling_outputs.BaseModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Wo=new Le({props:{$$slots:{default:[Wb]},$$scope:{ctx:U}}}),Zo=new He({props:{anchor:"transformers.FlaubertModel.forward.example",$$slots:{default:[Zb]},$$scope:{ctx:U}}}),as=new Pe({}),rs=new le({props:{name:"class transformers.FlaubertWithLMHeadModel",anchor:"transformers.FlaubertWithLMHeadModel",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.FlaubertWithLMHeadModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.31.0/en/model_doc/flaubert#transformers.FlaubertConfig">FlaubertConfig</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/v4.31.0/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/v4.31.0/src/transformers/models/flaubert/modeling_flaubert.py#L653"}}),cs=new le({props:{name:"forward",anchor:"transformers.FlaubertWithLMHeadModel.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"langs",val:": typing.Optional[torch.Tensor] = None"},{name:"token_type_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"position_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"lengths",val:": typing.Optional[torch.Tensor] = None"},{name:"cache",val:": typing.Union[typing.Dict[str, torch.Tensor], NoneType] = 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:"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.FlaubertWithLMHeadModel.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.31.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.31.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.31.0/en/model_doc/wav2vec2#transformers.Wav2Vec2CTCTokenizer.__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.FlaubertWithLMHeadModel.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.FlaubertWithLMHeadModel.forward.token_type_ids",description:`<strong>token_type_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.FlaubertWithLMHeadModel.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.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.FlaubertWithLMHeadModel.forward.lengths",description:`<strong>lengths</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Length of each sentence that can be used to avoid performing attention on padding token indices. You can
also use <code>attention_mask</code> for the same result (see above), kept here for compatibility. Indices selected in
<code>[0, ..., input_ids.size(-1)]</code>:`,name:"lengths"},{anchor:"transformers.FlaubertWithLMHeadModel.forward.cache",description:`<strong>cache</strong> (<code>Dict[str, torch.FloatTensor]</code>, <em>optional</em>) &#x2014;
Dictionary strings to <code>torch.FloatTensor</code> that contains precomputed hidden-states (key and values in the
attention blocks) as computed by the model (see <code>cache</code> output below). Can be used to speed up sequential
decoding. The dictionary object will be modified in-place during the forward pass to add newly computed
hidden-states.`,name:"cache"},{anchor:"transformers.FlaubertWithLMHeadModel.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.FlaubertWithLMHeadModel.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.FlaubertWithLMHeadModel.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.FlaubertWithLMHeadModel.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.FlaubertWithLMHeadModel.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/v4.31.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.FlaubertWithLMHeadModel.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/v4.31.0/src/transformers/models/flaubert/modeling_flaubert.py#L683",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.31.0/en/main_classes/output#transformers.modeling_outputs.MaskedLMOutput"
>transformers.modeling_outputs.MaskedLMOutput</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/v4.31.0/en/model_doc/flaubert#transformers.FlaubertConfig"
>FlaubertConfig</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 Masked language modeling (MLM) loss.</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>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.31.0/en/main_classes/output#transformers.modeling_outputs.MaskedLMOutput"
>transformers.modeling_outputs.MaskedLMOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Vo=new Le({props:{$$slots:{default:[qb]},$$scope:{ctx:U}}}),Bo=new He({props:{anchor:"transformers.FlaubertWithLMHeadModel.forward.example",$$slots:{default:[Vb]},$$scope:{ctx:U}}}),ps=new Pe({}),us=new le({props:{name:"class transformers.FlaubertForSequenceClassification",anchor:"transformers.FlaubertForSequenceClassification",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.FlaubertForSequenceClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.31.0/en/model_doc/flaubert#transformers.FlaubertConfig">FlaubertConfig</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/v4.31.0/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/v4.31.0/src/transformers/models/flaubert/modeling_flaubert.py#L751"}}),gs=new le({props:{name:"forward",anchor:"transformers.FlaubertForSequenceClassification.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"langs",val:": typing.Optional[torch.Tensor] = None"},{name:"token_type_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"position_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"lengths",val:": typing.Optional[torch.Tensor] = None"},{name:"cache",val:": typing.Union[typing.Dict[str, torch.Tensor], NoneType] = 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:"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.FlaubertForSequenceClassification.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.31.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.31.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.31.0/en/model_doc/wav2vec2#transformers.Wav2Vec2CTCTokenizer.__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.FlaubertForSequenceClassification.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.FlaubertForSequenceClassification.forward.token_type_ids",description:`<strong>token_type_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.FlaubertForSequenceClassification.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.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.FlaubertForSequenceClassification.forward.lengths",description:`<strong>lengths</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Length of each sentence that can be used to avoid performing attention on padding token indices. You can
also use <code>attention_mask</code> for the same result (see above), kept here for compatibility. Indices selected in
<code>[0, ..., input_ids.size(-1)]</code>:`,name:"lengths"},{anchor:"transformers.FlaubertForSequenceClassification.forward.cache",description:`<strong>cache</strong> (<code>Dict[str, torch.FloatTensor]</code>, <em>optional</em>) &#x2014;
Dictionary strings to <code>torch.FloatTensor</code> that contains precomputed hidden-states (key and values in the
attention blocks) as computed by the model (see <code>cache</code> output below). Can be used to speed up sequential
decoding. The dictionary object will be modified in-place during the forward pass to add newly computed
hidden-states.`,name:"cache"},{anchor:"transformers.FlaubertForSequenceClassification.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.FlaubertForSequenceClassification.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.FlaubertForSequenceClassification.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.FlaubertForSequenceClassification.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.FlaubertForSequenceClassification.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/v4.31.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.FlaubertForSequenceClassification.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/v4.31.0/src/transformers/models/flaubert/modeling_flaubert.py#L763",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.31.0/en/main_classes/output#transformers.modeling_outputs.SequenceClassifierOutput"
>transformers.modeling_outputs.SequenceClassifierOutput</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/v4.31.0/en/model_doc/flaubert#transformers.FlaubertConfig"
>FlaubertConfig</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>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/v4.31.0/en/main_classes/output#transformers.modeling_outputs.SequenceClassifierOutput"
>transformers.modeling_outputs.SequenceClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Ro=new Le({props:{$$slots:{default:[Bb]},$$scope:{ctx:U}}}),Xo=new He({props:{anchor:"transformers.FlaubertForSequenceClassification.forward.example",$$slots:{default:[Gb]},$$scope:{ctx:U}}}),Ao=new He({props:{anchor:"transformers.FlaubertForSequenceClassification.forward.example-2",$$slots:{default:[Rb]},$$scope:{ctx:U}}}),_s=new Pe({}),bs=new le({props:{name:"class transformers.FlaubertForMultipleChoice",anchor:"transformers.FlaubertForMultipleChoice",parameters:[{name:"config",val:""},{name:"*inputs",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.FlaubertForMultipleChoice.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.31.0/en/model_doc/flaubert#transformers.FlaubertConfig">FlaubertConfig</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/v4.31.0/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/v4.31.0/src/transformers/models/flaubert/modeling_flaubert.py#L1210"}}),ws=new le({props:{name:"forward",anchor:"transformers.FlaubertForMultipleChoice.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"langs",val:": typing.Optional[torch.Tensor] = None"},{name:"token_type_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"position_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"lengths",val:": typing.Optional[torch.Tensor] = None"},{name:"cache",val:": typing.Union[typing.Dict[str, torch.Tensor], NoneType] = 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:"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.FlaubertForMultipleChoice.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.31.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.31.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.31.0/en/model_doc/wav2vec2#transformers.Wav2Vec2CTCTokenizer.__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.FlaubertForMultipleChoice.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.FlaubertForMultipleChoice.forward.token_type_ids",description:`<strong>token_type_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.FlaubertForMultipleChoice.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.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.FlaubertForMultipleChoice.forward.lengths",description:`<strong>lengths</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Length of each sentence that can be used to avoid performing attention on padding token indices. You can
also use <code>attention_mask</code> for the same result (see above), kept here for compatibility. Indices selected in
<code>[0, ..., input_ids.size(-1)]</code>:`,name:"lengths"},{anchor:"transformers.FlaubertForMultipleChoice.forward.cache",description:`<strong>cache</strong> (<code>Dict[str, torch.FloatTensor]</code>, <em>optional</em>) &#x2014;
Dictionary strings to <code>torch.FloatTensor</code> that contains precomputed hidden-states (key and values in the
attention blocks) as computed by the model (see <code>cache</code> output below). Can be used to speed up sequential
decoding. The dictionary object will be modified in-place during the forward pass to add newly computed
hidden-states.`,name:"cache"},{anchor:"transformers.FlaubertForMultipleChoice.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.FlaubertForMultipleChoice.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.FlaubertForMultipleChoice.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.FlaubertForMultipleChoice.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.FlaubertForMultipleChoice.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/v4.31.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.FlaubertForMultipleChoice.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for computing the multiple choice classification loss. Indices should be in <code>[0, ..., num_choices-1]</code> where <code>num_choices</code> is the size of the second dimension of the input tensors. (See
<code>input_ids</code> above)`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/v4.31.0/src/transformers/models/flaubert/modeling_flaubert.py#L1221",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.31.0/en/main_classes/output#transformers.modeling_outputs.MultipleChoiceModelOutput"
>transformers.modeling_outputs.MultipleChoiceModelOutput</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/v4.31.0/en/model_doc/flaubert#transformers.FlaubertConfig"
>FlaubertConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <em>(1,)</em>, <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, num_choices)</code>) \u2014 <em>num_choices</em> is the second dimension of the input tensors. (see <em>input_ids</em> above).</p>
<p>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/v4.31.0/en/main_classes/output#transformers.modeling_outputs.MultipleChoiceModelOutput"
>transformers.modeling_outputs.MultipleChoiceModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Do=new Le({props:{$$slots:{default:[Xb]},$$scope:{ctx:U}}}),Qo=new He({props:{anchor:"transformers.FlaubertForMultipleChoice.forward.example",$$slots:{default:[Ab]},$$scope:{ctx:U}}}),ks=new Pe({}),Ms=new le({props:{name:"class transformers.FlaubertForTokenClassification",anchor:"transformers.FlaubertForTokenClassification",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.FlaubertForTokenClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.31.0/en/model_doc/flaubert#transformers.FlaubertConfig">FlaubertConfig</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/v4.31.0/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/v4.31.0/src/transformers/models/flaubert/modeling_flaubert.py#L854"}}),js=new le({props:{name:"forward",anchor:"transformers.FlaubertForTokenClassification.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"langs",val:": typing.Optional[torch.Tensor] = None"},{name:"token_type_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"position_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"lengths",val:": typing.Optional[torch.Tensor] = None"},{name:"cache",val:": typing.Union[typing.Dict[str, torch.Tensor], NoneType] = 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:"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.FlaubertForTokenClassification.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.31.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.31.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.31.0/en/model_doc/wav2vec2#transformers.Wav2Vec2CTCTokenizer.__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.FlaubertForTokenClassification.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.FlaubertForTokenClassification.forward.token_type_ids",description:`<strong>token_type_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.FlaubertForTokenClassification.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.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.FlaubertForTokenClassification.forward.lengths",description:`<strong>lengths</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Length of each sentence that can be used to avoid performing attention on padding token indices. You can
also use <code>attention_mask</code> for the same result (see above), kept here for compatibility. Indices selected in
<code>[0, ..., input_ids.size(-1)]</code>:`,name:"lengths"},{anchor:"transformers.FlaubertForTokenClassification.forward.cache",description:`<strong>cache</strong> (<code>Dict[str, torch.FloatTensor]</code>, <em>optional</em>) &#x2014;
Dictionary strings to <code>torch.FloatTensor</code> that contains precomputed hidden-states (key and values in the
attention blocks) as computed by the model (see <code>cache</code> output below). Can be used to speed up sequential
decoding. The dictionary object will be modified in-place during the forward pass to add newly computed
hidden-states.`,name:"cache"},{anchor:"transformers.FlaubertForTokenClassification.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.FlaubertForTokenClassification.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.FlaubertForTokenClassification.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.FlaubertForTokenClassification.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.FlaubertForTokenClassification.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/v4.31.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.FlaubertForTokenClassification.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Labels for computing the token classification loss. Indices should be in <code>[0, ..., config.num_labels - 1]</code>.`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/v4.31.0/src/transformers/models/flaubert/modeling_flaubert.py#L866",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.31.0/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/v4.31.0/en/model_doc/flaubert#transformers.FlaubertConfig"
>FlaubertConfig</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/v4.31.0/en/main_classes/output#transformers.modeling_outputs.TokenClassifierOutput"
>transformers.modeling_outputs.TokenClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Lo=new Le({props:{$$slots:{default:[Sb]},$$scope:{ctx:U}}}),Po=new He({props:{anchor:"transformers.FlaubertForTokenClassification.forward.example",$$slots:{default:[Db]},$$scope:{ctx:U}}}),Cs=new Pe({}),Js=new le({props:{name:"class transformers.FlaubertForQuestionAnsweringSimple",anchor:"transformers.FlaubertForQuestionAnsweringSimple",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.FlaubertForQuestionAnsweringSimple.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.31.0/en/model_doc/flaubert#transformers.FlaubertConfig">FlaubertConfig</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/v4.31.0/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/v4.31.0/src/transformers/models/flaubert/modeling_flaubert.py#L939"}}),Is=new le({props:{name:"forward",anchor:"transformers.FlaubertForQuestionAnsweringSimple.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"langs",val:": typing.Optional[torch.Tensor] = None"},{name:"token_type_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"position_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"lengths",val:": typing.Optional[torch.Tensor] = None"},{name:"cache",val:": typing.Union[typing.Dict[str, torch.Tensor], NoneType] = None"},{name:"head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.Tensor] = None"},{name:"start_positions",val:": typing.Optional[torch.Tensor] = None"},{name:"end_positions",val:": typing.Optional[torch.Tensor] = 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.FlaubertForQuestionAnsweringSimple.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.31.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.31.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.31.0/en/model_doc/wav2vec2#transformers.Wav2Vec2CTCTokenizer.__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.FlaubertForQuestionAnsweringSimple.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.FlaubertForQuestionAnsweringSimple.forward.token_type_ids",description:`<strong>token_type_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.FlaubertForQuestionAnsweringSimple.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.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.FlaubertForQuestionAnsweringSimple.forward.lengths",description:`<strong>lengths</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Length of each sentence that can be used to avoid performing attention on padding token indices. You can
also use <code>attention_mask</code> for the same result (see above), kept here for compatibility. Indices selected in
<code>[0, ..., input_ids.size(-1)]</code>:`,name:"lengths"},{anchor:"transformers.FlaubertForQuestionAnsweringSimple.forward.cache",description:`<strong>cache</strong> (<code>Dict[str, torch.FloatTensor]</code>, <em>optional</em>) &#x2014;
Dictionary strings to <code>torch.FloatTensor</code> that contains precomputed hidden-states (key and values in the
attention blocks) as computed by the model (see <code>cache</code> output below). Can be used to speed up sequential
decoding. The dictionary object will be modified in-place during the forward pass to add newly computed
hidden-states.`,name:"cache"},{anchor:"transformers.FlaubertForQuestionAnsweringSimple.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.FlaubertForQuestionAnsweringSimple.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.FlaubertForQuestionAnsweringSimple.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.FlaubertForQuestionAnsweringSimple.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.FlaubertForQuestionAnsweringSimple.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/v4.31.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.FlaubertForQuestionAnsweringSimple.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.FlaubertForQuestionAnsweringSimple.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/v4.31.0/src/transformers/models/flaubert/modeling_flaubert.py#L949",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.31.0/en/main_classes/output#transformers.modeling_outputs.QuestionAnsweringModelOutput"
>transformers.modeling_outputs.QuestionAnsweringModelOutput</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/v4.31.0/en/model_doc/flaubert#transformers.FlaubertConfig"
>FlaubertConfig</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 Total span extraction loss is the sum of a Cross-Entropy for the start and end positions.</p>
</li>
<li>
<p><strong>start_logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>) \u2014 Span-start scores (before SoftMax).</p>
</li>
<li>
<p><strong>end_logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>) \u2014 Span-end 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/v4.31.0/en/main_classes/output#transformers.modeling_outputs.QuestionAnsweringModelOutput"
>transformers.modeling_outputs.QuestionAnsweringModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Oo=new Le({props:{$$slots:{default:[Qb]},$$scope:{ctx:U}}}),Ko=new He({props:{anchor:"transformers.FlaubertForQuestionAnsweringSimple.forward.example",$$slots:{default:[Yb]},$$scope:{ctx:U}}}),xs=new Pe({}),Ws=new le({props:{name:"class transformers.FlaubertForQuestionAnswering",anchor:"transformers.FlaubertForQuestionAnswering",parameters:[{name:"config",val:""}],source:"https://github.com/huggingface/transformers/blob/v4.31.0/src/transformers/models/flaubert/modeling_flaubert.py#L1088"}}),Zs=new le({props:{name:"forward",anchor:"transformers.FlaubertForQuestionAnswering.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"langs",val:": typing.Optional[torch.Tensor] = None"},{name:"token_type_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"position_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"lengths",val:": typing.Optional[torch.Tensor] = None"},{name:"cache",val:": typing.Union[typing.Dict[str, torch.Tensor], NoneType] = None"},{name:"head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.Tensor] = None"},{name:"start_positions",val:": typing.Optional[torch.Tensor] = None"},{name:"end_positions",val:": typing.Optional[torch.Tensor] = None"},{name:"is_impossible",val:": typing.Optional[torch.Tensor] = None"},{name:"cls_index",val:": typing.Optional[torch.Tensor] = None"},{name:"p_mask",val:": typing.Optional[torch.Tensor] = 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.FlaubertForQuestionAnswering.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.`,name:"input_ids"}],source:"https://github.com/huggingface/transformers/blob/v4.31.0/src/transformers/models/flaubert/modeling_flaubert.py#L1098",returnDescription:`
<p>A <code>transformers.models.flaubert.modeling_flaubert.FlaubertForQuestionAnsweringOutput</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/v4.31.0/en/model_doc/flaubert#transformers.FlaubertConfig"
>FlaubertConfig</a>) and inputs.</p>
<ul>
<li><strong>config</strong> (<a
  href="/docs/transformers/v4.31.0/en/model_doc/flaubert#transformers.FlaubertConfig"
>FlaubertConfig</a>): 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/v4.31.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained"
>from_pretrained()</a> method to load the model weights.</li>
</ul>
`,returnType:`
<p><code>transformers.models.flaubert.modeling_flaubert.FlaubertForQuestionAnsweringOutput</code> or <code>tuple(torch.FloatTensor)</code></p>
`}}),tn=new Le({props:{$$slots:{default:[Lb]},$$scope:{ctx:U}}}),on=new He({props:{anchor:"transformers.FlaubertForQuestionAnswering.forward.example",$$slots:{default:[Pb]},$$scope:{ctx:U}}}),Vs=new Pe({}),Bs=new le({props:{name:"class transformers.TFFlaubertModel",anchor:"transformers.TFFlaubertModel",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFFlaubertModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.31.0/en/model_doc/flaubert#transformers.FlaubertConfig">FlaubertConfig</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/v4.31.0/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/v4.31.0/src/transformers/models/flaubert/modeling_tf_flaubert.py#L247"}}),sn=new Le({props:{$$slots:{default:[Hb]},$$scope:{ctx:U}}}),As=new le({props:{name:"call",anchor:"transformers.TFFlaubertModel.call",parameters:[{name:"input_ids",val:": np.ndarray | tf.Tensor | None = None"},{name:"attention_mask",val:": np.ndarray | tf.Tensor | None = None"},{name:"langs",val:": np.ndarray | tf.Tensor | None = None"},{name:"token_type_ids",val:": np.ndarray | tf.Tensor | None = None"},{name:"position_ids",val:": np.ndarray | tf.Tensor | None = None"},{name:"lengths",val:": np.ndarray | tf.Tensor | None = None"},{name:"cache",val:": Optional[Dict[str, tf.Tensor]] = None"},{name:"head_mask",val:": np.ndarray | tf.Tensor | None = None"},{name:"inputs_embeds",val:": tf.Tensor | None = None"},{name:"output_attentions",val:": Optional[bool] = None"},{name:"output_hidden_states",val:": Optional[bool] = None"},{name:"return_dict",val:": Optional[bool] = None"},{name:"training",val:": Optional[bool] = False"}],parametersDescription:[{anchor:"transformers.TFFlaubertModel.call.input_ids",description:`<strong>input_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.31.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.31.0/en/model_doc/wav2vec2#transformers.Wav2Vec2CTCTokenizer.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/v4.31.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.TFFlaubertModel.call.attention_mask",description:`<strong>attention_mask</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li><code>1</code> for tokens that are <strong>not masked</strong>,</li>
<li><code>0</code> 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.TFFlaubertModel.call.langs",description:`<strong>langs</strong> (<code>tf.Tensor</code> or <code>Numpy array</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
A parallel sequence of tokens to be used to indicate the language of each token in the input. Indices are
languages ids which can be obtained from the language names by using two conversion mappings provided in
the configuration of the model (only provided for multilingual models). More precisely, the <em>language name
to language id</em> mapping is in <code>model.config.lang2id</code> (which is a dictionary string to int) and the
<em>language id to language name</em> mapping is in <code>model.config.id2lang</code> (dictionary int to string).</p>
<p>See usage examples detailed in the <a href="../multilingual">multilingual documentation</a>.`,name:"langs"},{anchor:"transformers.TFFlaubertModel.call.token_type_ids",description:`<strong>token_type_ids</strong> (<code>tf.Tensor</code> or <code>Numpy array</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li><code>0</code> corresponds to a <em>sentence A</em> token,</li>
<li><code>1</code> corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.TFFlaubertModel.call.position_ids",description:`<strong>position_ids</strong> (<code>tf.Tensor</code> or <code>Numpy array</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.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.TFFlaubertModel.call.lengths",description:`<strong>lengths</strong> (<code>tf.Tensor</code> or <code>Numpy array</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Length of each sentence that can be used to avoid performing attention on padding token indices. You can
also use <em>attention_mask</em> for the same result (see above), kept here for compatibility Indices selected in
<code>[0, ..., input_ids.size(-1)]</code>:`,name:"lengths"},{anchor:"transformers.TFFlaubertModel.call.cache",description:`<strong>cache</strong> (<code>Dict[str, tf.Tensor]</code>, <em>optional</em>) &#x2014;
Dictionary string to <code>tf.FloatTensor</code> that contains precomputed hidden states (key and values in the
attention blocks) as computed by the model (see <code>cache</code> output below). Can be used to speed up sequential
decoding.</p>
<p>The dictionary object will be modified in-place during the forward pass to add newly computed
hidden-states.`,name:"cache"},{anchor:"transformers.TFFlaubertModel.call.head_mask",description:`<strong>head_mask</strong> (<code>Numpy array</code> or <code>tf.Tensor</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><code>1</code> indicates the head is <strong>not masked</strong>,</li>
<li><code>0</code> indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.TFFlaubertModel.call.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.TFFlaubertModel.call.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. This argument can be used only in eager mode, in graph mode the value in the
config will be used instead.`,name:"output_attentions"},{anchor:"transformers.TFFlaubertModel.call.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. This argument can be used only in eager mode, in graph mode the value in the config will be
used instead.`,name:"output_hidden_states"},{anchor:"transformers.TFFlaubertModel.call.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.31.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.TFFlaubertModel.call.training",description:`<strong>training</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to use the model in training mode (some modules like dropout modules have different
behaviors between training and evaluation).`,name:"training"}],source:"https://github.com/huggingface/transformers/blob/v4.31.0/src/transformers/models/flaubert/modeling_tf_flaubert.py#L252",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.31.0/en/main_classes/output#transformers.modeling_tf_outputs.TFBaseModelOutput"
>transformers.modeling_tf_outputs.TFBaseModelOutput</a> or a tuple of <code>tf.Tensor</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/v4.31.0/en/model_doc/flaubert#transformers.FlaubertConfig"
>FlaubertConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>last_hidden_state</strong> (<code>tf.Tensor</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>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(tf.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>tf.Tensor</code> (one for the output of the embeddings + 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 initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(tf.Tensor)</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>tf.Tensor</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/v4.31.0/en/main_classes/output#transformers.modeling_tf_outputs.TFBaseModelOutput"
>transformers.modeling_tf_outputs.TFBaseModelOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),an=new Le({props:{$$slots:{default:[Ob]},$$scope:{ctx:U}}}),rn=new He({props:{anchor:"transformers.TFFlaubertModel.call.example",$$slots:{default:[Kb]},$$scope:{ctx:U}}}),Ss=new Pe({}),Ds=new le({props:{name:"class transformers.TFFlaubertWithLMHeadModel",anchor:"transformers.TFFlaubertWithLMHeadModel",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFFlaubertWithLMHeadModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.31.0/en/model_doc/flaubert#transformers.FlaubertConfig">FlaubertConfig</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/v4.31.0/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/v4.31.0/src/transformers/models/flaubert/modeling_tf_flaubert.py#L764"}}),dn=new Le({props:{$$slots:{default:[ey]},$$scope:{ctx:U}}}),Ps=new le({props:{name:"call",anchor:"transformers.TFFlaubertWithLMHeadModel.call",parameters:[{name:"input_ids",val:": np.ndarray | tf.Tensor | None = None"},{name:"attention_mask",val:": np.ndarray | tf.Tensor | None = None"},{name:"langs",val:": np.ndarray | tf.Tensor | None = None"},{name:"token_type_ids",val:": np.ndarray | tf.Tensor | None = None"},{name:"position_ids",val:": np.ndarray | tf.Tensor | None = None"},{name:"lengths",val:": np.ndarray | tf.Tensor | None = None"},{name:"cache",val:": Optional[Dict[str, tf.Tensor]] = None"},{name:"head_mask",val:": np.ndarray | tf.Tensor | None = None"},{name:"inputs_embeds",val:": tf.Tensor | None = None"},{name:"output_attentions",val:": Optional[bool] = None"},{name:"output_hidden_states",val:": Optional[bool] = None"},{name:"return_dict",val:": Optional[bool] = None"},{name:"training",val:": Optional[bool] = False"}],parametersDescription:[{anchor:"transformers.TFFlaubertWithLMHeadModel.call.input_ids",description:`<strong>input_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.31.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.31.0/en/model_doc/wav2vec2#transformers.Wav2Vec2CTCTokenizer.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/v4.31.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.TFFlaubertWithLMHeadModel.call.attention_mask",description:`<strong>attention_mask</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li><code>1</code> for tokens that are <strong>not masked</strong>,</li>
<li><code>0</code> 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.TFFlaubertWithLMHeadModel.call.langs",description:`<strong>langs</strong> (<code>tf.Tensor</code> or <code>Numpy array</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
A parallel sequence of tokens to be used to indicate the language of each token in the input. Indices are
languages ids which can be obtained from the language names by using two conversion mappings provided in
the configuration of the model (only provided for multilingual models). More precisely, the <em>language name
to language id</em> mapping is in <code>model.config.lang2id</code> (which is a dictionary string to int) and the
<em>language id to language name</em> mapping is in <code>model.config.id2lang</code> (dictionary int to string).</p>
<p>See usage examples detailed in the <a href="../multilingual">multilingual documentation</a>.`,name:"langs"},{anchor:"transformers.TFFlaubertWithLMHeadModel.call.token_type_ids",description:`<strong>token_type_ids</strong> (<code>tf.Tensor</code> or <code>Numpy array</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li><code>0</code> corresponds to a <em>sentence A</em> token,</li>
<li><code>1</code> corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.TFFlaubertWithLMHeadModel.call.position_ids",description:`<strong>position_ids</strong> (<code>tf.Tensor</code> or <code>Numpy array</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.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.TFFlaubertWithLMHeadModel.call.lengths",description:`<strong>lengths</strong> (<code>tf.Tensor</code> or <code>Numpy array</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Length of each sentence that can be used to avoid performing attention on padding token indices. You can
also use <em>attention_mask</em> for the same result (see above), kept here for compatibility Indices selected in
<code>[0, ..., input_ids.size(-1)]</code>:`,name:"lengths"},{anchor:"transformers.TFFlaubertWithLMHeadModel.call.cache",description:`<strong>cache</strong> (<code>Dict[str, tf.Tensor]</code>, <em>optional</em>) &#x2014;
Dictionary string to <code>tf.FloatTensor</code> that contains precomputed hidden states (key and values in the
attention blocks) as computed by the model (see <code>cache</code> output below). Can be used to speed up sequential
decoding.</p>
<p>The dictionary object will be modified in-place during the forward pass to add newly computed
hidden-states.`,name:"cache"},{anchor:"transformers.TFFlaubertWithLMHeadModel.call.head_mask",description:`<strong>head_mask</strong> (<code>Numpy array</code> or <code>tf.Tensor</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><code>1</code> indicates the head is <strong>not masked</strong>,</li>
<li><code>0</code> indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.TFFlaubertWithLMHeadModel.call.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.TFFlaubertWithLMHeadModel.call.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. This argument can be used only in eager mode, in graph mode the value in the
config will be used instead.`,name:"output_attentions"},{anchor:"transformers.TFFlaubertWithLMHeadModel.call.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. This argument can be used only in eager mode, in graph mode the value in the config will be
used instead.`,name:"output_hidden_states"},{anchor:"transformers.TFFlaubertWithLMHeadModel.call.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.31.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.TFFlaubertWithLMHeadModel.call.training",description:`<strong>training</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to use the model in training mode (some modules like dropout modules have different
behaviors between training and evaluation).`,name:"training"}],source:"https://github.com/huggingface/transformers/blob/v4.31.0/src/transformers/models/flaubert/modeling_tf_flaubert.py#L793",returnDescription:`
<p>A <code>transformers.models.flaubert.modeling_tf_flaubert.TFFlaubertWithLMHeadModelOutput</code> or a tuple of <code>tf.Tensor</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/v4.31.0/en/model_doc/flaubert#transformers.FlaubertConfig"
>FlaubertConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>logits</strong> (<code>tf.Tensor</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(tf.Tensor)</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>tf.Tensor</code> (one for the output of the embeddings + 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 initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(tf.Tensor)</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>tf.Tensor</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.models.flaubert.modeling_tf_flaubert.TFFlaubertWithLMHeadModelOutput</code> or <code>tuple(tf.Tensor)</code></p>
`}}),cn=new Le({props:{$$slots:{default:[ty]},$$scope:{ctx:U}}}),pn=new He({props:{anchor:"transformers.TFFlaubertWithLMHeadModel.call.example",$$slots:{default:[oy]},$$scope:{ctx:U}}}),Hs=new Pe({}),Os=new le({props:{name:"class transformers.TFFlaubertForSequenceClassification",anchor:"transformers.TFFlaubertForSequenceClassification",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFFlaubertForSequenceClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.31.0/en/model_doc/flaubert#transformers.FlaubertConfig">FlaubertConfig</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/v4.31.0/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/v4.31.0/src/transformers/models/flaubert/modeling_tf_flaubert.py#L850"}}),hn=new Le({props:{$$slots:{default:[ny]},$$scope:{ctx:U}}}),oa=new le({props:{name:"call",anchor:"transformers.TFFlaubertForSequenceClassification.call",parameters:[{name:"input_ids",val:": TFModelInputType | None = None"},{name:"attention_mask",val:": np.ndarray | tf.Tensor | None = None"},{name:"langs",val:": np.ndarray | tf.Tensor | None = None"},{name:"token_type_ids",val:": np.ndarray | tf.Tensor | None = None"},{name:"position_ids",val:": np.ndarray | tf.Tensor | None = None"},{name:"lengths",val:": np.ndarray | tf.Tensor | None = None"},{name:"cache",val:": Optional[Dict[str, tf.Tensor]] = None"},{name:"head_mask",val:": np.ndarray | tf.Tensor | None = None"},{name:"inputs_embeds",val:": np.ndarray | tf.Tensor | None = None"},{name:"output_attentions",val:": Optional[bool] = None"},{name:"output_hidden_states",val:": Optional[bool] = None"},{name:"return_dict",val:": Optional[bool] = None"},{name:"labels",val:": np.ndarray | tf.Tensor | None = None"},{name:"training",val:": bool = False"}],parametersDescription:[{anchor:"transformers.TFFlaubertForSequenceClassification.call.input_ids",description:`<strong>input_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.31.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.31.0/en/model_doc/wav2vec2#transformers.Wav2Vec2CTCTokenizer.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/v4.31.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.TFFlaubertForSequenceClassification.call.attention_mask",description:`<strong>attention_mask</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li><code>1</code> for tokens that are <strong>not masked</strong>,</li>
<li><code>0</code> 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.TFFlaubertForSequenceClassification.call.langs",description:`<strong>langs</strong> (<code>tf.Tensor</code> or <code>Numpy array</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
A parallel sequence of tokens to be used to indicate the language of each token in the input. Indices are
languages ids which can be obtained from the language names by using two conversion mappings provided in
the configuration of the model (only provided for multilingual models). More precisely, the <em>language name
to language id</em> mapping is in <code>model.config.lang2id</code> (which is a dictionary string to int) and the
<em>language id to language name</em> mapping is in <code>model.config.id2lang</code> (dictionary int to string).</p>
<p>See usage examples detailed in the <a href="../multilingual">multilingual documentation</a>.`,name:"langs"},{anchor:"transformers.TFFlaubertForSequenceClassification.call.token_type_ids",description:`<strong>token_type_ids</strong> (<code>tf.Tensor</code> or <code>Numpy array</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li><code>0</code> corresponds to a <em>sentence A</em> token,</li>
<li><code>1</code> corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.TFFlaubertForSequenceClassification.call.position_ids",description:`<strong>position_ids</strong> (<code>tf.Tensor</code> or <code>Numpy array</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.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.TFFlaubertForSequenceClassification.call.lengths",description:`<strong>lengths</strong> (<code>tf.Tensor</code> or <code>Numpy array</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Length of each sentence that can be used to avoid performing attention on padding token indices. You can
also use <em>attention_mask</em> for the same result (see above), kept here for compatibility Indices selected in
<code>[0, ..., input_ids.size(-1)]</code>:`,name:"lengths"},{anchor:"transformers.TFFlaubertForSequenceClassification.call.cache",description:`<strong>cache</strong> (<code>Dict[str, tf.Tensor]</code>, <em>optional</em>) &#x2014;
Dictionary string to <code>tf.FloatTensor</code> that contains precomputed hidden states (key and values in the
attention blocks) as computed by the model (see <code>cache</code> output below). Can be used to speed up sequential
decoding.</p>
<p>The dictionary object will be modified in-place during the forward pass to add newly computed
hidden-states.`,name:"cache"},{anchor:"transformers.TFFlaubertForSequenceClassification.call.head_mask",description:`<strong>head_mask</strong> (<code>Numpy array</code> or <code>tf.Tensor</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><code>1</code> indicates the head is <strong>not masked</strong>,</li>
<li><code>0</code> indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.TFFlaubertForSequenceClassification.call.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.TFFlaubertForSequenceClassification.call.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. This argument can be used only in eager mode, in graph mode the value in the
config will be used instead.`,name:"output_attentions"},{anchor:"transformers.TFFlaubertForSequenceClassification.call.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. This argument can be used only in eager mode, in graph mode the value in the config will be
used instead.`,name:"output_hidden_states"},{anchor:"transformers.TFFlaubertForSequenceClassification.call.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.31.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.TFFlaubertForSequenceClassification.call.training",description:`<strong>training</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to use the model in training mode (some modules like dropout modules have different
behaviors between training and evaluation).`,name:"training"},{anchor:"transformers.TFFlaubertForSequenceClassification.call.labels",description:`<strong>labels</strong> (<code>tf.Tensor</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/v4.31.0/src/transformers/models/flaubert/modeling_tf_flaubert.py#L858",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.31.0/en/main_classes/output#transformers.modeling_tf_outputs.TFSequenceClassifierOutput"
>transformers.modeling_tf_outputs.TFSequenceClassifierOutput</a> or a tuple of <code>tf.Tensor</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/v4.31.0/en/model_doc/flaubert#transformers.FlaubertConfig"
>FlaubertConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, )</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>tf.Tensor</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>hidden_states</strong> (<code>tuple(tf.Tensor)</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>tf.Tensor</code> (one for the output of the embeddings + 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 initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(tf.Tensor)</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>tf.Tensor</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/v4.31.0/en/main_classes/output#transformers.modeling_tf_outputs.TFSequenceClassifierOutput"
>transformers.modeling_tf_outputs.TFSequenceClassifierOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),mn=new Le({props:{$$slots:{default:[sy]},$$scope:{ctx:U}}}),fn=new He({props:{anchor:"transformers.TFFlaubertForSequenceClassification.call.example",$$slots:{default:[ay]},$$scope:{ctx:U}}}),gn=new He({props:{anchor:"transformers.TFFlaubertForSequenceClassification.call.example-2",$$slots:{default:[ry]},$$scope:{ctx:U}}}),na=new Pe({}),sa=new le({props:{name:"class transformers.TFFlaubertForMultipleChoice",anchor:"transformers.TFFlaubertForMultipleChoice",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFFlaubertForMultipleChoice.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.31.0/en/model_doc/flaubert#transformers.FlaubertConfig">FlaubertConfig</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/v4.31.0/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/v4.31.0/src/transformers/models/flaubert/modeling_tf_flaubert.py#L1102"}}),bn=new Le({props:{$$slots:{default:[ly]},$$scope:{ctx:U}}}),ia=new le({props:{name:"call",anchor:"transformers.TFFlaubertForMultipleChoice.call",parameters:[{name:"input_ids",val:": TFModelInputType | None = None"},{name:"attention_mask",val:": np.ndarray | tf.Tensor | None = None"},{name:"langs",val:": np.ndarray | tf.Tensor | None = None"},{name:"token_type_ids",val:": np.ndarray | tf.Tensor | None = None"},{name:"position_ids",val:": np.ndarray | tf.Tensor | None = None"},{name:"lengths",val:": np.ndarray | tf.Tensor | None = None"},{name:"cache",val:": Optional[Dict[str, tf.Tensor]] = None"},{name:"head_mask",val:": np.ndarray | tf.Tensor | None = None"},{name:"inputs_embeds",val:": np.ndarray | tf.Tensor | None = None"},{name:"output_attentions",val:": Optional[bool] = None"},{name:"output_hidden_states",val:": Optional[bool] = None"},{name:"return_dict",val:": Optional[bool] = None"},{name:"labels",val:": np.ndarray | tf.Tensor | None = None"},{name:"training",val:": bool = False"}],parametersDescription:[{anchor:"transformers.TFFlaubertForMultipleChoice.call.input_ids",description:`<strong>input_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.31.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.31.0/en/model_doc/wav2vec2#transformers.Wav2Vec2CTCTokenizer.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/v4.31.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.TFFlaubertForMultipleChoice.call.attention_mask",description:`<strong>attention_mask</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li><code>1</code> for tokens that are <strong>not masked</strong>,</li>
<li><code>0</code> 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.TFFlaubertForMultipleChoice.call.langs",description:`<strong>langs</strong> (<code>tf.Tensor</code> or <code>Numpy array</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
A parallel sequence of tokens to be used to indicate the language of each token in the input. Indices are
languages ids which can be obtained from the language names by using two conversion mappings provided in
the configuration of the model (only provided for multilingual models). More precisely, the <em>language name
to language id</em> mapping is in <code>model.config.lang2id</code> (which is a dictionary string to int) and the
<em>language id to language name</em> mapping is in <code>model.config.id2lang</code> (dictionary int to string).</p>
<p>See usage examples detailed in the <a href="../multilingual">multilingual documentation</a>.`,name:"langs"},{anchor:"transformers.TFFlaubertForMultipleChoice.call.token_type_ids",description:`<strong>token_type_ids</strong> (<code>tf.Tensor</code> or <code>Numpy array</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li><code>0</code> corresponds to a <em>sentence A</em> token,</li>
<li><code>1</code> corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.TFFlaubertForMultipleChoice.call.position_ids",description:`<strong>position_ids</strong> (<code>tf.Tensor</code> or <code>Numpy array</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.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.TFFlaubertForMultipleChoice.call.lengths",description:`<strong>lengths</strong> (<code>tf.Tensor</code> or <code>Numpy array</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Length of each sentence that can be used to avoid performing attention on padding token indices. You can
also use <em>attention_mask</em> for the same result (see above), kept here for compatibility Indices selected in
<code>[0, ..., input_ids.size(-1)]</code>:`,name:"lengths"},{anchor:"transformers.TFFlaubertForMultipleChoice.call.cache",description:`<strong>cache</strong> (<code>Dict[str, tf.Tensor]</code>, <em>optional</em>) &#x2014;
Dictionary string to <code>tf.FloatTensor</code> that contains precomputed hidden states (key and values in the
attention blocks) as computed by the model (see <code>cache</code> output below). Can be used to speed up sequential
decoding.</p>
<p>The dictionary object will be modified in-place during the forward pass to add newly computed
hidden-states.`,name:"cache"},{anchor:"transformers.TFFlaubertForMultipleChoice.call.head_mask",description:`<strong>head_mask</strong> (<code>Numpy array</code> or <code>tf.Tensor</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><code>1</code> indicates the head is <strong>not masked</strong>,</li>
<li><code>0</code> indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.TFFlaubertForMultipleChoice.call.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.TFFlaubertForMultipleChoice.call.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. This argument can be used only in eager mode, in graph mode the value in the
config will be used instead.`,name:"output_attentions"},{anchor:"transformers.TFFlaubertForMultipleChoice.call.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. This argument can be used only in eager mode, in graph mode the value in the config will be
used instead.`,name:"output_hidden_states"},{anchor:"transformers.TFFlaubertForMultipleChoice.call.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.31.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.TFFlaubertForMultipleChoice.call.training",description:`<strong>training</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to use the model in training mode (some modules like dropout modules have different
behaviors between training and evaluation).`,name:"training"}],source:"https://github.com/huggingface/transformers/blob/v4.31.0/src/transformers/models/flaubert/modeling_tf_flaubert.py#L1131",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.31.0/en/main_classes/output#transformers.modeling_tf_outputs.TFMultipleChoiceModelOutput"
>transformers.modeling_tf_outputs.TFMultipleChoiceModelOutput</a> or a tuple of <code>tf.Tensor</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/v4.31.0/en/model_doc/flaubert#transformers.FlaubertConfig"
>FlaubertConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>tf.Tensor</code> of shape <em>(batch_size, )</em>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Classification loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, num_choices)</code>) \u2014 <em>num_choices</em> is the second dimension of the input tensors. (see <em>input_ids</em> above).</p>
<p>Classification scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(tf.Tensor)</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>tf.Tensor</code> (one for the output of the embeddings + 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 initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(tf.Tensor)</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>tf.Tensor</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/v4.31.0/en/main_classes/output#transformers.modeling_tf_outputs.TFMultipleChoiceModelOutput"
>transformers.modeling_tf_outputs.TFMultipleChoiceModelOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),yn=new Le({props:{$$slots:{default:[iy]},$$scope:{ctx:U}}}),Tn=new He({props:{anchor:"transformers.TFFlaubertForMultipleChoice.call.example",$$slots:{default:[dy]},$$scope:{ctx:U}}}),da=new Pe({}),ca=new le({props:{name:"class transformers.TFFlaubertForTokenClassification",anchor:"transformers.TFFlaubertForTokenClassification",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFFlaubertForTokenClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.31.0/en/model_doc/flaubert#transformers.FlaubertConfig">FlaubertConfig</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/v4.31.0/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/v4.31.0/src/transformers/models/flaubert/modeling_tf_flaubert.py#L1021"}}),wn=new Le({props:{$$slots:{default:[cy]},$$scope:{ctx:U}}}),ma=new le({props:{name:"call",anchor:"transformers.TFFlaubertForTokenClassification.call",parameters:[{name:"input_ids",val:": TFModelInputType | None = None"},{name:"attention_mask",val:": np.ndarray | tf.Tensor | None = None"},{name:"langs",val:": np.ndarray | tf.Tensor | None = None"},{name:"token_type_ids",val:": np.ndarray | tf.Tensor | None = None"},{name:"position_ids",val:": np.ndarray | tf.Tensor | None = None"},{name:"lengths",val:": np.ndarray | tf.Tensor | None = None"},{name:"cache",val:": Optional[Dict[str, tf.Tensor]] = None"},{name:"head_mask",val:": np.ndarray | tf.Tensor | None = None"},{name:"inputs_embeds",val:": np.ndarray | tf.Tensor | None = None"},{name:"output_attentions",val:": Optional[bool] = None"},{name:"output_hidden_states",val:": Optional[bool] = None"},{name:"return_dict",val:": Optional[bool] = None"},{name:"labels",val:": np.ndarray | tf.Tensor | None = None"},{name:"training",val:": bool = False"}],parametersDescription:[{anchor:"transformers.TFFlaubertForTokenClassification.call.input_ids",description:`<strong>input_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.31.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.31.0/en/model_doc/wav2vec2#transformers.Wav2Vec2CTCTokenizer.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/v4.31.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.TFFlaubertForTokenClassification.call.attention_mask",description:`<strong>attention_mask</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li><code>1</code> for tokens that are <strong>not masked</strong>,</li>
<li><code>0</code> 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.TFFlaubertForTokenClassification.call.langs",description:`<strong>langs</strong> (<code>tf.Tensor</code> or <code>Numpy array</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
A parallel sequence of tokens to be used to indicate the language of each token in the input. Indices are
languages ids which can be obtained from the language names by using two conversion mappings provided in
the configuration of the model (only provided for multilingual models). More precisely, the <em>language name
to language id</em> mapping is in <code>model.config.lang2id</code> (which is a dictionary string to int) and the
<em>language id to language name</em> mapping is in <code>model.config.id2lang</code> (dictionary int to string).</p>
<p>See usage examples detailed in the <a href="../multilingual">multilingual documentation</a>.`,name:"langs"},{anchor:"transformers.TFFlaubertForTokenClassification.call.token_type_ids",description:`<strong>token_type_ids</strong> (<code>tf.Tensor</code> or <code>Numpy array</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li><code>0</code> corresponds to a <em>sentence A</em> token,</li>
<li><code>1</code> corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.TFFlaubertForTokenClassification.call.position_ids",description:`<strong>position_ids</strong> (<code>tf.Tensor</code> or <code>Numpy array</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.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.TFFlaubertForTokenClassification.call.lengths",description:`<strong>lengths</strong> (<code>tf.Tensor</code> or <code>Numpy array</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Length of each sentence that can be used to avoid performing attention on padding token indices. You can
also use <em>attention_mask</em> for the same result (see above), kept here for compatibility Indices selected in
<code>[0, ..., input_ids.size(-1)]</code>:`,name:"lengths"},{anchor:"transformers.TFFlaubertForTokenClassification.call.cache",description:`<strong>cache</strong> (<code>Dict[str, tf.Tensor]</code>, <em>optional</em>) &#x2014;
Dictionary string to <code>tf.FloatTensor</code> that contains precomputed hidden states (key and values in the
attention blocks) as computed by the model (see <code>cache</code> output below). Can be used to speed up sequential
decoding.</p>
<p>The dictionary object will be modified in-place during the forward pass to add newly computed
hidden-states.`,name:"cache"},{anchor:"transformers.TFFlaubertForTokenClassification.call.head_mask",description:`<strong>head_mask</strong> (<code>Numpy array</code> or <code>tf.Tensor</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><code>1</code> indicates the head is <strong>not masked</strong>,</li>
<li><code>0</code> indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.TFFlaubertForTokenClassification.call.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.TFFlaubertForTokenClassification.call.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. This argument can be used only in eager mode, in graph mode the value in the
config will be used instead.`,name:"output_attentions"},{anchor:"transformers.TFFlaubertForTokenClassification.call.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. This argument can be used only in eager mode, in graph mode the value in the config will be
used instead.`,name:"output_hidden_states"},{anchor:"transformers.TFFlaubertForTokenClassification.call.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.31.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.TFFlaubertForTokenClassification.call.training",description:`<strong>training</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to use the model in training mode (some modules like dropout modules have different
behaviors between training and evaluation).`,name:"training"},{anchor:"transformers.TFFlaubertForTokenClassification.call.labels",description:`<strong>labels</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Labels for computing the token classification loss. Indices should be in <code>[0, ..., config.num_labels - 1]</code>.`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/v4.31.0/src/transformers/models/flaubert/modeling_tf_flaubert.py#L1032",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.31.0/en/main_classes/output#transformers.modeling_tf_outputs.TFTokenClassifierOutput"
>transformers.modeling_tf_outputs.TFTokenClassifierOutput</a> or a tuple of <code>tf.Tensor</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/v4.31.0/en/model_doc/flaubert#transformers.FlaubertConfig"
>FlaubertConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>tf.Tensor</code> of shape <code>(n,)</code>, <em>optional</em>, where n is the number of unmasked labels, returned when <code>labels</code> is provided)  \u2014 Classification loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>tf.Tensor</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(tf.Tensor)</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>tf.Tensor</code> (one for the output of the embeddings + 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 initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(tf.Tensor)</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>tf.Tensor</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/v4.31.0/en/main_classes/output#transformers.modeling_tf_outputs.TFTokenClassifierOutput"
>transformers.modeling_tf_outputs.TFTokenClassifierOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),kn=new Le({props:{$$slots:{default:[py]},$$scope:{ctx:U}}}),Mn=new He({props:{anchor:"transformers.TFFlaubertForTokenClassification.call.example",$$slots:{default:[uy]},$$scope:{ctx:U}}}),Fn=new He({props:{anchor:"transformers.TFFlaubertForTokenClassification.call.example-2",$$slots:{default:[hy]},$$scope:{ctx:U}}}),fa=new Pe({}),ga=new le({props:{name:"class transformers.TFFlaubertForQuestionAnsweringSimple",anchor:"transformers.TFFlaubertForQuestionAnsweringSimple",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFFlaubertForQuestionAnsweringSimple.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.31.0/en/model_doc/flaubert#transformers.FlaubertConfig">FlaubertConfig</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/v4.31.0/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/v4.31.0/src/transformers/models/flaubert/modeling_tf_flaubert.py#L929"}}),En=new Le({props:{$$slots:{default:[my]},$$scope:{ctx:U}}}),Ta=new le({props:{name:"call",anchor:"transformers.TFFlaubertForQuestionAnsweringSimple.call",parameters:[{name:"input_ids",val:": TFModelInputType | None = None"},{name:"attention_mask",val:": np.ndarray | tf.Tensor | None = None"},{name:"langs",val:": np.ndarray | tf.Tensor | None = None"},{name:"token_type_ids",val:": np.ndarray | tf.Tensor | None = None"},{name:"position_ids",val:": np.ndarray | tf.Tensor | None = None"},{name:"lengths",val:": np.ndarray | tf.Tensor | None = None"},{name:"cache",val:": Optional[Dict[str, tf.Tensor]] = None"},{name:"head_mask",val:": np.ndarray | tf.Tensor | None = None"},{name:"inputs_embeds",val:": np.ndarray | tf.Tensor | None = None"},{name:"output_attentions",val:": Optional[bool] = None"},{name:"output_hidden_states",val:": Optional[bool] = None"},{name:"return_dict",val:": Optional[bool] = None"},{name:"start_positions",val:": np.ndarray | tf.Tensor | None = None"},{name:"end_positions",val:": np.ndarray | tf.Tensor | None = None"},{name:"training",val:": bool = False"}],parametersDescription:[{anchor:"transformers.TFFlaubertForQuestionAnsweringSimple.call.input_ids",description:`<strong>input_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.31.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.31.0/en/model_doc/wav2vec2#transformers.Wav2Vec2CTCTokenizer.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/v4.31.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.TFFlaubertForQuestionAnsweringSimple.call.attention_mask",description:`<strong>attention_mask</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li><code>1</code> for tokens that are <strong>not masked</strong>,</li>
<li><code>0</code> 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.TFFlaubertForQuestionAnsweringSimple.call.langs",description:`<strong>langs</strong> (<code>tf.Tensor</code> or <code>Numpy array</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
A parallel sequence of tokens to be used to indicate the language of each token in the input. Indices are
languages ids which can be obtained from the language names by using two conversion mappings provided in
the configuration of the model (only provided for multilingual models). More precisely, the <em>language name
to language id</em> mapping is in <code>model.config.lang2id</code> (which is a dictionary string to int) and the
<em>language id to language name</em> mapping is in <code>model.config.id2lang</code> (dictionary int to string).</p>
<p>See usage examples detailed in the <a href="../multilingual">multilingual documentation</a>.`,name:"langs"},{anchor:"transformers.TFFlaubertForQuestionAnsweringSimple.call.token_type_ids",description:`<strong>token_type_ids</strong> (<code>tf.Tensor</code> or <code>Numpy array</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li><code>0</code> corresponds to a <em>sentence A</em> token,</li>
<li><code>1</code> corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.TFFlaubertForQuestionAnsweringSimple.call.position_ids",description:`<strong>position_ids</strong> (<code>tf.Tensor</code> or <code>Numpy array</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.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.TFFlaubertForQuestionAnsweringSimple.call.lengths",description:`<strong>lengths</strong> (<code>tf.Tensor</code> or <code>Numpy array</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Length of each sentence that can be used to avoid performing attention on padding token indices. You can
also use <em>attention_mask</em> for the same result (see above), kept here for compatibility Indices selected in
<code>[0, ..., input_ids.size(-1)]</code>:`,name:"lengths"},{anchor:"transformers.TFFlaubertForQuestionAnsweringSimple.call.cache",description:`<strong>cache</strong> (<code>Dict[str, tf.Tensor]</code>, <em>optional</em>) &#x2014;
Dictionary string to <code>tf.FloatTensor</code> that contains precomputed hidden states (key and values in the
attention blocks) as computed by the model (see <code>cache</code> output below). Can be used to speed up sequential
decoding.</p>
<p>The dictionary object will be modified in-place during the forward pass to add newly computed
hidden-states.`,name:"cache"},{anchor:"transformers.TFFlaubertForQuestionAnsweringSimple.call.head_mask",description:`<strong>head_mask</strong> (<code>Numpy array</code> or <code>tf.Tensor</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><code>1</code> indicates the head is <strong>not masked</strong>,</li>
<li><code>0</code> indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.TFFlaubertForQuestionAnsweringSimple.call.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.TFFlaubertForQuestionAnsweringSimple.call.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. This argument can be used only in eager mode, in graph mode the value in the
config will be used instead.`,name:"output_attentions"},{anchor:"transformers.TFFlaubertForQuestionAnsweringSimple.call.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. This argument can be used only in eager mode, in graph mode the value in the config will be
used instead.`,name:"output_hidden_states"},{anchor:"transformers.TFFlaubertForQuestionAnsweringSimple.call.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.31.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.TFFlaubertForQuestionAnsweringSimple.call.training",description:`<strong>training</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to use the model in training mode (some modules like dropout modules have different
behaviors between training and evaluation).`,name:"training"},{anchor:"transformers.TFFlaubertForQuestionAnsweringSimple.call.start_positions",description:`<strong>start_positions</strong> (<code>tf.Tensor</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.TFFlaubertForQuestionAnsweringSimple.call.end_positions",description:`<strong>end_positions</strong> (<code>tf.Tensor</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/v4.31.0/src/transformers/models/flaubert/modeling_tf_flaubert.py#L937",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.31.0/en/main_classes/output#transformers.modeling_tf_outputs.TFQuestionAnsweringModelOutput"
>transformers.modeling_tf_outputs.TFQuestionAnsweringModelOutput</a> or a tuple of <code>tf.Tensor</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/v4.31.0/en/model_doc/flaubert#transformers.FlaubertConfig"
>FlaubertConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, )</code>, <em>optional</em>, returned when <code>start_positions</code> and <code>end_positions</code> are provided) \u2014 Total span extraction loss is the sum of a Cross-Entropy for the start and end positions.</p>
</li>
<li>
<p><strong>start_logits</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>) \u2014 Span-start scores (before SoftMax).</p>
</li>
<li>
<p><strong>end_logits</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>) \u2014 Span-end scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(tf.Tensor)</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>tf.Tensor</code> (one for the output of the embeddings + 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 initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(tf.Tensor)</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>tf.Tensor</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/v4.31.0/en/main_classes/output#transformers.modeling_tf_outputs.TFQuestionAnsweringModelOutput"
>transformers.modeling_tf_outputs.TFQuestionAnsweringModelOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),jn=new Le({props:{$$slots:{default:[fy]},$$scope:{ctx:U}}}),Cn=new He({props:{anchor:"transformers.TFFlaubertForQuestionAnsweringSimple.call.example",$$slots:{default:[gy]},$$scope:{ctx:U}}}),Jn=new He({props:{anchor:"transformers.TFFlaubertForQuestionAnsweringSimple.call.example-2",$$slots:{default:[_y]},$$scope:{ctx:U}}}),{c(){d=a("meta"),T=p(),h=a("h1"),m=a("a"),y=a("span"),v(i.$$.fragment),c=p(),J=a("span"),ve=n("FlauBERT"),ge=p(),V=a("div"),ce=a("a"),O=a("img"),we=p(),X=a("a"),pe=a("img"),Y=p(),te=a("h2"),ae=a("a"),S=a("span"),v(ie.$$.fragment),ke=p(),D=a("span"),Me=n("Overview"),_e=p(),B=a("p"),Fe=n("The FlauBERT model was proposed in the paper "),de=a("a"),oe=n("FlauBERT: Unsupervised Language Model Pre-training for French"),z=n(` by Hang Le et al. It\u2019s a transformer model pretrained using a masked language
modeling (MLM) objective (like BERT).`),x=p(),ue=a("p"),L=n("The abstract from the paper is the following:"),be=p(),he=a("p"),Q=a("em"),$e=n(`Language models have become a key step to achieve state-of-the art results in many different Natural Language
Processing (NLP) tasks. Leveraging the huge amount of unlabeled texts nowadays available, they provide an efficient way
to pre-train continuous word representations that can be fine-tuned for a downstream task, along with their
contextualization at the sentence level. This has been widely demonstrated for English using contextualized
representations (Dai and Le, 2015; Peters et al., 2018; Howard and Ruder, 2018; Radford et al., 2018; Devlin et al.,
2019; Yang et al., 2019b). In this paper, we introduce and share FlauBERT, a model learned on a very large and
heterogeneous French corpus. Models of different sizes are trained using the new CNRS (French National Centre for
Scientific Research) Jean Zay supercomputer. We apply our French language models to diverse NLP tasks (text
classification, paraphrasing, natural language inference, parsing, word sense disambiguation) and show that most of the
time they outperform other pretraining approaches. Different versions of FlauBERT as well as a unified evaluation
protocol for the downstream tasks, called FLUE (French Language Understanding Evaluation), are shared to the research
community for further reproducible experiments in French NLP.`),ye=p(),N=a("p"),Ee=n("This model was contributed by "),G=a("a"),je=n("formiel"),Ce=n(". The original code can be found "),R=a("a"),Je=n("here"),Ue=n("."),q=p(),me=a("p"),P=n("Tips:"),Te=p(),K=a("ul"),I=a("li"),ze=n("Like RoBERTa, without the sentence ordering prediction (so just trained on the MLM objective)."),W=p(),ne=a("h2"),re=a("a"),g=a("span"),v(j.$$.fragment),Be=p(),ee=a("span"),Ge=n("Documentation resources"),Ve=p(),C=a("ul"),We=a("li"),Ie=a("a"),Re=n("Text classification task guide"),Xe=p(),Ze=a("li"),Z=a("a"),H=n("Token classification task guide"),Ae=p(),qe=a("li"),A=a("a"),Se=n("Question answering task guide"),De=p(),fe=a("li"),xe=a("a"),se=n("Masked language modeling task guide"),Qe=p(),kr=a("li"),$a=a("a"),Gd=n("Multiple choice task guide"),bi=p(),Yt=a("h2"),Jo=a("a"),Mr=a("span"),v(Xn.$$.fragment),Rd=p(),Fr=a("span"),Xd=n("FlaubertConfig"),yi=p(),Nt=a("div"),v(An.$$.fragment),Ad=p(),It=a("p"),Sd=n("This is the configuration class to store the configuration of a "),Ea=a("a"),Dd=n("FlaubertModel"),Qd=n(" or a "),ja=a("a"),Yd=n("TFFlaubertModel"),Ld=n(`. It is
used to instantiate a FlauBERT 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 FlauBERT
`),Sn=a("a"),Pd=n("flaubert/flaubert_base_uncased"),Hd=n(" architecture."),Od=p(),Lt=a("p"),Kd=n("Configuration objects inherit from "),Ca=a("a"),ec=n("PretrainedConfig"),tc=n(` and can be used to control the model outputs. Read the
documentation from `),Ja=a("a"),oc=n("PretrainedConfig"),nc=n(" for more information."),Ti=p(),Pt=a("h2"),Uo=a("a"),$r=a("span"),v(Dn.$$.fragment),sc=p(),Er=a("span"),ac=n("FlaubertTokenizer"),vi=p(),Ye=a("div"),v(Qn.$$.fragment),rc=p(),jr=a("p"),lc=n("Construct a Flaubert tokenizer. Based on Byte-Pair Encoding. The tokenization process is the following:"),ic=p(),xt=a("ul"),Cr=a("li"),dc=n("Moses preprocessing and tokenization."),cc=p(),Jr=a("li"),pc=n("Normalizing all inputs text."),uc=p(),Wt=a("li"),hc=n("The arguments "),Ur=a("code"),mc=n("special_tokens"),fc=n(" and the function "),zr=a("code"),gc=n("set_special_tokens"),_c=n(`, can be used to add additional symbols (like
\u201D`),Nr=a("strong"),bc=n("classify"),yc=n("\u201D) to a vocabulary."),Tc=p(),Yn=a("li"),vc=n("The argument "),Ir=a("code"),wc=n("do_lowercase"),kc=n(" controls lower casing (automatically set for pretrained vocabularies)."),Mc=p(),Ln=a("p"),Fc=n("This tokenizer inherits from "),Ua=a("a"),$c=n("PreTrainedTokenizer"),Ec=n(` which contains most of the main methods. Users should refer to
this superclass for more information regarding those methods.`),jc=p(),Zt=a("div"),v(Pn.$$.fragment),Cc=p(),xr=a("p"),Jc=n(`Build model inputs from a sequence or a pair of sequence for sequence classification tasks by concatenating and
adding special tokens. An XLM sequence has the following format:`),Uc=p(),Hn=a("ul"),za=a("li"),zc=n("single sequence: "),Wr=a("code"),Nc=n("<s> X </s>"),Ic=p(),Na=a("li"),xc=n("pair of sequences: "),Zr=a("code"),Wc=n("<s> A </s> B </s>"),Zc=p(),zo=a("div"),v(On.$$.fragment),qc=p(),qr=a("p"),Vc=n("Converts a sequence of tokens (string) in a single string."),Bc=p(),bt=a("div"),v(Kn.$$.fragment),Gc=p(),Vr=a("p"),Rc=n("Create a mask from the two sequences passed to be used in a sequence-pair classification task. An XLM sequence"),Xc=p(),v(No.$$.fragment),Ac=p(),Ht=a("p"),Sc=n("If "),Br=a("code"),Dc=n("token_ids_1"),Qc=n(" is "),Gr=a("code"),Yc=n("None"),Lc=n(", this method only returns the first portion of the mask (0s)."),Pc=p(),Io=a("div"),v(es.$$.fragment),Hc=p(),ts=a("p"),Oc=n(`Retrieve sequence ids from a token list that has no special tokens added. This method is called when adding
special tokens using the tokenizer `),Rr=a("code"),Kc=n("prepare_for_model"),ep=n(" method."),wi=p(),Ot=a("h2"),xo=a("a"),Xr=a("span"),v(os.$$.fragment),tp=p(),Ar=a("span"),op=n("FlaubertModel"),ki=p(),Kt=a("div"),v(ns.$$.fragment),np=p(),yt=a("div"),v(ss.$$.fragment),sp=p(),eo=a("p"),ap=n("The "),Ia=a("a"),rp=n("FlaubertModel"),lp=n(" forward method, overrides the "),Sr=a("code"),ip=n("__call__"),dp=n(" special method."),cp=p(),v(Wo.$$.fragment),pp=p(),v(Zo.$$.fragment),Mi=p(),to=a("h2"),qo=a("a"),Dr=a("span"),v(as.$$.fragment),up=p(),Qr=a("span"),hp=n("FlaubertWithLMHeadModel"),Fi=p(),lt=a("div"),v(rs.$$.fragment),mp=p(),Yr=a("p"),fp=n(`The Flaubert Model transformer with a language modeling head on top (linear layer with weights tied to the input
embeddings).`),gp=p(),ls=a("p"),_p=n("This model inherits from "),xa=a("a"),bp=n("PreTrainedModel"),yp=n(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),Tp=p(),is=a("p"),vp=n("This model is also a PyTorch "),ds=a("a"),wp=n("torch.nn.Module"),kp=n(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Mp=p(),Tt=a("div"),v(cs.$$.fragment),Fp=p(),oo=a("p"),$p=n("The "),Wa=a("a"),Ep=n("FlaubertWithLMHeadModel"),jp=n(" forward method, overrides the "),Lr=a("code"),Cp=n("__call__"),Jp=n(" special method."),Up=p(),v(Vo.$$.fragment),zp=p(),v(Bo.$$.fragment),$i=p(),no=a("h2"),Go=a("a"),Pr=a("span"),v(ps.$$.fragment),Np=p(),Hr=a("span"),Ip=n("FlaubertForSequenceClassification"),Ei=p(),it=a("div"),v(us.$$.fragment),xp=p(),Or=a("p"),Wp=n(`Flaubert Model with a sequence classification/regression head on top (a linear layer on top of the pooled output)
e.g. for GLUE tasks.`),Zp=p(),hs=a("p"),qp=n("This model inherits from "),Za=a("a"),Vp=n("PreTrainedModel"),Bp=n(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),Gp=p(),ms=a("p"),Rp=n("This model is also a PyTorch "),fs=a("a"),Xp=n("torch.nn.Module"),Ap=n(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Sp=p(),ut=a("div"),v(gs.$$.fragment),Dp=p(),so=a("p"),Qp=n("The "),qa=a("a"),Yp=n("FlaubertForSequenceClassification"),Lp=n(" forward method, overrides the "),Kr=a("code"),Pp=n("__call__"),Hp=n(" special method."),Op=p(),v(Ro.$$.fragment),Kp=p(),v(Xo.$$.fragment),eu=p(),v(Ao.$$.fragment),ji=p(),ao=a("h2"),So=a("a"),el=a("span"),v(_s.$$.fragment),tu=p(),tl=a("span"),ou=n("FlaubertForMultipleChoice"),Ci=p(),dt=a("div"),v(bs.$$.fragment),nu=p(),ol=a("p"),su=n(`Flaubert Model with a multiple choice classification head on top (a linear layer on top of the pooled output and a
softmax) e.g. for RocStories/SWAG tasks.`),au=p(),ys=a("p"),ru=n("This model inherits from "),Va=a("a"),lu=n("PreTrainedModel"),iu=n(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),du=p(),Ts=a("p"),cu=n("This model is also a PyTorch "),vs=a("a"),pu=n("torch.nn.Module"),uu=n(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),hu=p(),vt=a("div"),v(ws.$$.fragment),mu=p(),ro=a("p"),fu=n("The "),Ba=a("a"),gu=n("FlaubertForMultipleChoice"),_u=n(" forward method, overrides the "),nl=a("code"),bu=n("__call__"),yu=n(" special method."),Tu=p(),v(Do.$$.fragment),vu=p(),v(Qo.$$.fragment),Ji=p(),lo=a("h2"),Yo=a("a"),sl=a("span"),v(ks.$$.fragment),wu=p(),al=a("span"),ku=n("FlaubertForTokenClassification"),Ui=p(),ct=a("div"),v(Ms.$$.fragment),Mu=p(),rl=a("p"),Fu=n(`Flaubert 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.`),$u=p(),Fs=a("p"),Eu=n("This model inherits from "),Ga=a("a"),ju=n("PreTrainedModel"),Cu=n(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),Ju=p(),$s=a("p"),Uu=n("This model is also a PyTorch "),Es=a("a"),zu=n("torch.nn.Module"),Nu=n(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Iu=p(),wt=a("div"),v(js.$$.fragment),xu=p(),io=a("p"),Wu=n("The "),Ra=a("a"),Zu=n("FlaubertForTokenClassification"),qu=n(" forward method, overrides the "),ll=a("code"),Vu=n("__call__"),Bu=n(" special method."),Gu=p(),v(Lo.$$.fragment),Ru=p(),v(Po.$$.fragment),zi=p(),co=a("h2"),Ho=a("a"),il=a("span"),v(Cs.$$.fragment),Xu=p(),dl=a("span"),Au=n("FlaubertForQuestionAnsweringSimple"),Ni=p(),pt=a("div"),v(Js.$$.fragment),Su=p(),po=a("p"),Du=n(`Flaubert Model 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 `),cl=a("code"),Qu=n("span start logits"),Yu=n(" and "),pl=a("code"),Lu=n("span end logits"),Pu=n(")."),Hu=p(),Us=a("p"),Ou=n("This model inherits from "),Xa=a("a"),Ku=n("PreTrainedModel"),eh=n(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),th=p(),zs=a("p"),oh=n("This model is also a PyTorch "),Ns=a("a"),nh=n("torch.nn.Module"),sh=n(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),ah=p(),kt=a("div"),v(Is.$$.fragment),rh=p(),uo=a("p"),lh=n("The "),Aa=a("a"),ih=n("FlaubertForQuestionAnsweringSimple"),dh=n(" forward method, overrides the "),ul=a("code"),ch=n("__call__"),ph=n(" special method."),uh=p(),v(Oo.$$.fragment),hh=p(),v(Ko.$$.fragment),Ii=p(),ho=a("h2"),en=a("a"),hl=a("span"),v(xs.$$.fragment),mh=p(),ml=a("span"),fh=n("FlaubertForQuestionAnswering"),xi=p(),mo=a("div"),v(Ws.$$.fragment),gh=p(),ht=a("div"),v(Zs.$$.fragment),_h=p(),fo=a("p"),bh=n("The "),Sa=a("a"),yh=n("FlaubertForQuestionAnswering"),Th=n(" forward method, overrides the "),fl=a("code"),vh=n("__call__"),wh=n(" special method."),kh=p(),v(tn.$$.fragment),Mh=p(),qs=a("p"),Fh=n("Base class for outputs of question answering models using a "),gl=a("code"),$h=n("SquadHead"),Eh=n("."),jh=p(),v(on.$$.fragment),Wi=p(),go=a("h2"),nn=a("a"),_l=a("span"),v(Vs.$$.fragment),Ch=p(),bl=a("span"),Jh=n("TFFlaubertModel"),Zi=p(),et=a("div"),v(Bs.$$.fragment),Uh=p(),yl=a("p"),zh=n("The bare Flaubert Model transformer outputting raw hidden-states without any specific head on top."),Nh=p(),Gs=a("p"),Ih=n("This model inherits from "),Da=a("a"),xh=n("TFPreTrainedModel"),Wh=n(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),Zh=p(),Rs=a("p"),qh=n("This model is also a "),Xs=a("a"),Vh=n("tf.keras.Model"),Bh=n(` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),Gh=p(),v(sn.$$.fragment),Rh=p(),Mt=a("div"),v(As.$$.fragment),Xh=p(),_o=a("p"),Ah=n("The "),Qa=a("a"),Sh=n("TFFlaubertModel"),Dh=n(" forward method, overrides the "),Tl=a("code"),Qh=n("__call__"),Yh=n(" special method."),Lh=p(),v(an.$$.fragment),Ph=p(),v(rn.$$.fragment),qi=p(),bo=a("h2"),ln=a("a"),vl=a("span"),v(Ss.$$.fragment),Hh=p(),wl=a("span"),Oh=n("TFFlaubertWithLMHeadModel"),Vi=p(),tt=a("div"),v(Ds.$$.fragment),Kh=p(),kl=a("p"),em=n(`The Flaubert Model transformer with a language modeling head on top (linear layer with weights tied to the input
embeddings).`),tm=p(),Qs=a("p"),om=n("This model inherits from "),Ya=a("a"),nm=n("TFPreTrainedModel"),sm=n(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),am=p(),Ys=a("p"),rm=n("This model is also a "),Ls=a("a"),lm=n("tf.keras.Model"),im=n(` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),dm=p(),v(dn.$$.fragment),cm=p(),Ft=a("div"),v(Ps.$$.fragment),pm=p(),yo=a("p"),um=n("The "),La=a("a"),hm=n("TFFlaubertWithLMHeadModel"),mm=n(" forward method, overrides the "),Ml=a("code"),fm=n("__call__"),gm=n(" special method."),_m=p(),v(cn.$$.fragment),bm=p(),v(pn.$$.fragment),Bi=p(),To=a("h2"),un=a("a"),Fl=a("span"),v(Hs.$$.fragment),ym=p(),$l=a("span"),Tm=n("TFFlaubertForSequenceClassification"),Gi=p(),ot=a("div"),v(Os.$$.fragment),vm=p(),El=a("p"),wm=n(`Flaubert Model with a sequence classification/regression head on top (a linear layer on top of the pooled output)
e.g. for GLUE tasks.`),km=p(),Ks=a("p"),Mm=n("This model inherits from "),Pa=a("a"),Fm=n("TFPreTrainedModel"),$m=n(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),Em=p(),ea=a("p"),jm=n("This model is also a "),ta=a("a"),Cm=n("tf.keras.Model"),Jm=n(` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),Um=p(),v(hn.$$.fragment),zm=p(),mt=a("div"),v(oa.$$.fragment),Nm=p(),vo=a("p"),Im=n("The "),Ha=a("a"),xm=n("TFFlaubertForSequenceClassification"),Wm=n(" forward method, overrides the "),jl=a("code"),Zm=n("__call__"),qm=n(" special method."),Vm=p(),v(mn.$$.fragment),Bm=p(),v(fn.$$.fragment),Gm=p(),v(gn.$$.fragment),Ri=p(),wo=a("h2"),_n=a("a"),Cl=a("span"),v(na.$$.fragment),Rm=p(),Jl=a("span"),Xm=n("TFFlaubertForMultipleChoice"),Xi=p(),nt=a("div"),v(sa.$$.fragment),Am=p(),Ul=a("p"),Sm=n(`Flaubert Model with a multiple choice classification head on top (a linear layer on top of the pooled output and a
softmax) e.g. for RocStories/SWAG tasks.`),Dm=p(),aa=a("p"),Qm=n("This model inherits from "),Oa=a("a"),Ym=n("TFPreTrainedModel"),Lm=n(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),Pm=p(),ra=a("p"),Hm=n("This model is also a "),la=a("a"),Om=n("tf.keras.Model"),Km=n(` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),ef=p(),v(bn.$$.fragment),tf=p(),$t=a("div"),v(ia.$$.fragment),of=p(),ko=a("p"),nf=n("The "),Ka=a("a"),sf=n("TFFlaubertForMultipleChoice"),af=n(" forward method, overrides the "),zl=a("code"),rf=n("__call__"),lf=n(" special method."),df=p(),v(yn.$$.fragment),cf=p(),v(Tn.$$.fragment),Ai=p(),Mo=a("h2"),vn=a("a"),Nl=a("span"),v(da.$$.fragment),pf=p(),Il=a("span"),uf=n("TFFlaubertForTokenClassification"),Si=p(),st=a("div"),v(ca.$$.fragment),hf=p(),xl=a("p"),mf=n(`Flaubert 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.`),ff=p(),pa=a("p"),gf=n("This model inherits from "),er=a("a"),_f=n("TFPreTrainedModel"),bf=n(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),yf=p(),ua=a("p"),Tf=n("This model is also a "),ha=a("a"),vf=n("tf.keras.Model"),wf=n(` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),kf=p(),v(wn.$$.fragment),Mf=p(),ft=a("div"),v(ma.$$.fragment),Ff=p(),Fo=a("p"),$f=n("The "),tr=a("a"),Ef=n("TFFlaubertForTokenClassification"),jf=n(" forward method, overrides the "),Wl=a("code"),Cf=n("__call__"),Jf=n(" special method."),Uf=p(),v(kn.$$.fragment),zf=p(),v(Mn.$$.fragment),Nf=p(),v(Fn.$$.fragment),Di=p(),$o=a("h2"),$n=a("a"),Zl=a("span"),v(fa.$$.fragment),If=p(),ql=a("span"),xf=n("TFFlaubertForQuestionAnsweringSimple"),Qi=p(),at=a("div"),v(ga.$$.fragment),Wf=p(),Eo=a("p"),Zf=n(`Flaubert Model with a span classification head on top for extractive question-answering tasks like SQuAD (a linear
layer on top of the hidden-states output to compute `),Vl=a("code"),qf=n("span start logits"),Vf=n(" and "),Bl=a("code"),Bf=n("span end logits"),Gf=n(")."),Rf=p(),_a=a("p"),Xf=n("This model inherits from "),or=a("a"),Af=n("TFPreTrainedModel"),Sf=n(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),Df=p(),ba=a("p"),Qf=n("This model is also a "),ya=a("a"),Yf=n("tf.keras.Model"),Lf=n(` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),Pf=p(),v(En.$$.fragment),Hf=p(),gt=a("div"),v(Ta.$$.fragment),Of=p(),jo=a("p"),Kf=n("The "),nr=a("a"),eg=n("TFFlaubertForQuestionAnsweringSimple"),tg=n(" forward method, overrides the "),Gl=a("code"),og=n("__call__"),ng=n(" special method."),sg=p(),v(jn.$$.fragment),ag=p(),v(Cn.$$.fragment),rg=p(),v(Jn.$$.fragment),this.h()},l(o){const b=Nb('[data-svelte="svelte-1phssyn"]',document.head);d=r(b,"META",{name:!0,content:!0}),b.forEach(t),T=u(o),h=r(o,"H1",{class:!0});var va=l(h);m=r(va,"A",{id:!0,class:!0,href:!0});var Rl=l(m);y=r(Rl,"SPAN",{});var Xl=l(y);w(i.$$.fragment,Xl),Xl.forEach(t),Rl.forEach(t),c=u(va),J=r(va,"SPAN",{});var Al=l(J);ve=s(Al,"FlauBERT"),Al.forEach(t),va.forEach(t),ge=u(o),V=r(o,"DIV",{class:!0});var wa=l(V);ce=r(wa,"A",{href:!0});var Sl=l(ce);O=r(Sl,"IMG",{alt:!0,src:!0}),Sl.forEach(t),we=u(wa),X=r(wa,"A",{href:!0});var Dl=l(X);pe=r(Dl,"IMG",{alt:!0,src:!0}),Dl.forEach(t),wa.forEach(t),Y=u(o),te=r(o,"H2",{class:!0});var ka=l(te);ae=r(ka,"A",{id:!0,class:!0,href:!0});var Ql=l(ae);S=r(Ql,"SPAN",{});var Yl=l(S);w(ie.$$.fragment,Yl),Yl.forEach(t),Ql.forEach(t),ke=u(ka),D=r(ka,"SPAN",{});var Ll=l(D);Me=s(Ll,"Overview"),Ll.forEach(t),ka.forEach(t),_e=u(o),B=r(o,"P",{});var Ma=l(B);Fe=s(Ma,"The FlauBERT model was proposed in the paper "),de=r(Ma,"A",{href:!0,rel:!0});var Pl=l(de);oe=s(Pl,"FlauBERT: Unsupervised Language Model Pre-training for French"),Pl.forEach(t),z=s(Ma,` by Hang Le et al. It\u2019s a transformer model pretrained using a masked language
modeling (MLM) objective (like BERT).`),Ma.forEach(t),x=u(o),ue=r(o,"P",{});var Hl=l(ue);L=s(Hl,"The abstract from the paper is the following:"),Hl.forEach(t),be=u(o),he=r(o,"P",{});var Ol=l(he);Q=r(Ol,"EM",{});var Kl=l(Q);$e=s(Kl,`Language models have become a key step to achieve state-of-the art results in many different Natural Language
Processing (NLP) tasks. Leveraging the huge amount of unlabeled texts nowadays available, they provide an efficient way
to pre-train continuous word representations that can be fine-tuned for a downstream task, along with their
contextualization at the sentence level. This has been widely demonstrated for English using contextualized
representations (Dai and Le, 2015; Peters et al., 2018; Howard and Ruder, 2018; Radford et al., 2018; Devlin et al.,
2019; Yang et al., 2019b). In this paper, we introduce and share FlauBERT, a model learned on a very large and
heterogeneous French corpus. Models of different sizes are trained using the new CNRS (French National Centre for
Scientific Research) Jean Zay supercomputer. We apply our French language models to diverse NLP tasks (text
classification, paraphrasing, natural language inference, parsing, word sense disambiguation) and show that most of the
time they outperform other pretraining approaches. Different versions of FlauBERT as well as a unified evaluation
protocol for the downstream tasks, called FLUE (French Language Understanding Evaluation), are shared to the research
community for further reproducible experiments in French NLP.`),Kl.forEach(t),Ol.forEach(t),ye=u(o),N=r(o,"P",{});var Co=l(N);Ee=s(Co,"This model was contributed by "),G=r(Co,"A",{href:!0,rel:!0});var ei=l(G);je=s(ei,"formiel"),ei.forEach(t),Ce=s(Co,". The original code can be found "),R=r(Co,"A",{href:!0,rel:!0});var ti=l(R);Je=s(ti,"here"),ti.forEach(t),Ue=s(Co,"."),Co.forEach(t),q=u(o),me=r(o,"P",{});var oi=l(me);P=s(oi,"Tips:"),oi.forEach(t),Te=u(o),K=r(o,"UL",{});var ni=l(K);I=r(ni,"LI",{});var si=l(I);ze=s(si,"Like RoBERTa, without the sentence ordering prediction (so just trained on the MLM objective)."),si.forEach(t),ni.forEach(t),W=u(o),ne=r(o,"H2",{class:!0});var Fa=l(ne);re=r(Fa,"A",{id:!0,class:!0,href:!0});var ai=l(re);g=r(ai,"SPAN",{});var ri=l(g);w(j.$$.fragment,ri),ri.forEach(t),ai.forEach(t),Be=u(Fa),ee=r(Fa,"SPAN",{});var li=l(ee);Ge=s(li,"Documentation resources"),li.forEach(t),Fa.forEach(t),Ve=u(o),C=r(o,"UL",{});var _t=l(C);We=r(_t,"LI",{});var ii=l(We);Ie=r(ii,"A",{href:!0});var di=l(Ie);Re=s(di,"Text classification task guide"),di.forEach(t),ii.forEach(t),Xe=u(_t),Ze=r(_t,"LI",{});var ci=l(Ze);Z=r(ci,"A",{href:!0});var pi=l(Z);H=s(pi,"Token classification task guide"),pi.forEach(t),ci.forEach(t),Ae=u(_t),qe=r(_t,"LI",{});var ui=l(qe);A=r(ui,"A",{href:!0});var hi=l(A);Se=s(hi,"Question answering task guide"),hi.forEach(t),ui.forEach(t),De=u(_t),fe=r(_t,"LI",{});var mi=l(fe);xe=r(mi,"A",{href:!0});var fi=l(xe);se=s(fi,"Masked language modeling task guide"),fi.forEach(t),mi.forEach(t),Qe=u(_t),kr=r(_t,"LI",{});var gi=l(kr);$a=r(gi,"A",{href:!0});var _i=l($a);Gd=s(_i,"Multiple choice task guide"),_i.forEach(t),gi.forEach(t),_t.forEach(t),bi=u(o),Yt=r(o,"H2",{class:!0});var Li=l(Yt);Jo=r(Li,"A",{id:!0,class:!0,href:!0});var dg=l(Jo);Mr=r(dg,"SPAN",{});var cg=l(Mr);w(Xn.$$.fragment,cg),cg.forEach(t),dg.forEach(t),Rd=u(Li),Fr=r(Li,"SPAN",{});var pg=l(Fr);Xd=s(pg,"FlaubertConfig"),pg.forEach(t),Li.forEach(t),yi=u(o),Nt=r(o,"DIV",{class:!0});var sr=l(Nt);w(An.$$.fragment,sr),Ad=u(sr),It=r(sr,"P",{});var Un=l(It);Sd=s(Un,"This is the configuration class to store the configuration of a "),Ea=r(Un,"A",{href:!0});var ug=l(Ea);Dd=s(ug,"FlaubertModel"),ug.forEach(t),Qd=s(Un," or a "),ja=r(Un,"A",{href:!0});var hg=l(ja);Yd=s(hg,"TFFlaubertModel"),hg.forEach(t),Ld=s(Un,`. It is
used to instantiate a FlauBERT 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 FlauBERT
`),Sn=r(Un,"A",{href:!0,rel:!0});var mg=l(Sn);Pd=s(mg,"flaubert/flaubert_base_uncased"),mg.forEach(t),Hd=s(Un," architecture."),Un.forEach(t),Od=u(sr),Lt=r(sr,"P",{});var ar=l(Lt);Kd=s(ar,"Configuration objects inherit from "),Ca=r(ar,"A",{href:!0});var fg=l(Ca);ec=s(fg,"PretrainedConfig"),fg.forEach(t),tc=s(ar,` and can be used to control the model outputs. Read the
documentation from `),Ja=r(ar,"A",{href:!0});var gg=l(Ja);oc=s(gg,"PretrainedConfig"),gg.forEach(t),nc=s(ar," for more information."),ar.forEach(t),sr.forEach(t),Ti=u(o),Pt=r(o,"H2",{class:!0});var Pi=l(Pt);Uo=r(Pi,"A",{id:!0,class:!0,href:!0});var _g=l(Uo);$r=r(_g,"SPAN",{});var bg=l($r);w(Dn.$$.fragment,bg),bg.forEach(t),_g.forEach(t),sc=u(Pi),Er=r(Pi,"SPAN",{});var yg=l(Er);ac=s(yg,"FlaubertTokenizer"),yg.forEach(t),Pi.forEach(t),vi=u(o),Ye=r(o,"DIV",{class:!0});var rt=l(Ye);w(Qn.$$.fragment,rt),rc=u(rt),jr=r(rt,"P",{});var Tg=l(jr);lc=s(Tg,"Construct a Flaubert tokenizer. Based on Byte-Pair Encoding. The tokenization process is the following:"),Tg.forEach(t),ic=u(rt),xt=r(rt,"UL",{});var zn=l(xt);Cr=r(zn,"LI",{});var vg=l(Cr);dc=s(vg,"Moses preprocessing and tokenization."),vg.forEach(t),cc=u(zn),Jr=r(zn,"LI",{});var wg=l(Jr);pc=s(wg,"Normalizing all inputs text."),wg.forEach(t),uc=u(zn),Wt=r(zn,"LI",{});var Nn=l(Wt);hc=s(Nn,"The arguments "),Ur=r(Nn,"CODE",{});var kg=l(Ur);mc=s(kg,"special_tokens"),kg.forEach(t),fc=s(Nn," and the function "),zr=r(Nn,"CODE",{});var Mg=l(zr);gc=s(Mg,"set_special_tokens"),Mg.forEach(t),_c=s(Nn,`, can be used to add additional symbols (like
\u201D`),Nr=r(Nn,"STRONG",{});var Fg=l(Nr);bc=s(Fg,"classify"),Fg.forEach(t),yc=s(Nn,"\u201D) to a vocabulary."),Nn.forEach(t),Tc=u(zn),Yn=r(zn,"LI",{});var Hi=l(Yn);vc=s(Hi,"The argument "),Ir=r(Hi,"CODE",{});var $g=l(Ir);wc=s($g,"do_lowercase"),$g.forEach(t),kc=s(Hi," controls lower casing (automatically set for pretrained vocabularies)."),Hi.forEach(t),zn.forEach(t),Mc=u(rt),Ln=r(rt,"P",{});var Oi=l(Ln);Fc=s(Oi,"This tokenizer inherits from "),Ua=r(Oi,"A",{href:!0});var Eg=l(Ua);$c=s(Eg,"PreTrainedTokenizer"),Eg.forEach(t),Ec=s(Oi,` which contains most of the main methods. Users should refer to
this superclass for more information regarding those methods.`),Oi.forEach(t),jc=u(rt),Zt=r(rt,"DIV",{class:!0});var rr=l(Zt);w(Pn.$$.fragment,rr),Cc=u(rr),xr=r(rr,"P",{});var jg=l(xr);Jc=s(jg,`Build model inputs from a sequence or a pair of sequence for sequence classification tasks by concatenating and
adding special tokens. An XLM sequence has the following format:`),jg.forEach(t),Uc=u(rr),Hn=r(rr,"UL",{});var Ki=l(Hn);za=r(Ki,"LI",{});var lg=l(za);zc=s(lg,"single sequence: "),Wr=r(lg,"CODE",{});var Cg=l(Wr);Nc=s(Cg,"<s> X </s>"),Cg.forEach(t),lg.forEach(t),Ic=u(Ki),Na=r(Ki,"LI",{});var ig=l(Na);xc=s(ig,"pair of sequences: "),Zr=r(ig,"CODE",{});var Jg=l(Zr);Wc=s(Jg,"<s> A </s> B </s>"),Jg.forEach(t),ig.forEach(t),Ki.forEach(t),rr.forEach(t),Zc=u(rt),zo=r(rt,"DIV",{class:!0});var ed=l(zo);w(On.$$.fragment,ed),qc=u(ed),qr=r(ed,"P",{});var Ug=l(qr);Vc=s(Ug,"Converts a sequence of tokens (string) in a single string."),Ug.forEach(t),ed.forEach(t),Bc=u(rt),bt=r(rt,"DIV",{class:!0});var In=l(bt);w(Kn.$$.fragment,In),Gc=u(In),Vr=r(In,"P",{});var zg=l(Vr);Rc=s(zg,"Create a mask from the two sequences passed to be used in a sequence-pair classification task. An XLM sequence"),zg.forEach(t),Xc=u(In),w(No.$$.fragment,In),Ac=u(In),Ht=r(In,"P",{});var lr=l(Ht);Sc=s(lr,"If "),Br=r(lr,"CODE",{});var Ng=l(Br);Dc=s(Ng,"token_ids_1"),Ng.forEach(t),Qc=s(lr," is "),Gr=r(lr,"CODE",{});var Ig=l(Gr);Yc=s(Ig,"None"),Ig.forEach(t),Lc=s(lr,", this method only returns the first portion of the mask (0s)."),lr.forEach(t),In.forEach(t),Pc=u(rt),Io=r(rt,"DIV",{class:!0});var td=l(Io);w(es.$$.fragment,td),Hc=u(td),ts=r(td,"P",{});var od=l(ts);Oc=s(od,`Retrieve sequence ids from a token list that has no special tokens added. This method is called when adding
special tokens using the tokenizer `),Rr=r(od,"CODE",{});var xg=l(Rr);Kc=s(xg,"prepare_for_model"),xg.forEach(t),ep=s(od," method."),od.forEach(t),td.forEach(t),rt.forEach(t),wi=u(o),Ot=r(o,"H2",{class:!0});var nd=l(Ot);xo=r(nd,"A",{id:!0,class:!0,href:!0});var Wg=l(xo);Xr=r(Wg,"SPAN",{});var Zg=l(Xr);w(os.$$.fragment,Zg),Zg.forEach(t),Wg.forEach(t),tp=u(nd),Ar=r(nd,"SPAN",{});var qg=l(Ar);op=s(qg,"FlaubertModel"),qg.forEach(t),nd.forEach(t),ki=u(o),Kt=r(o,"DIV",{class:!0});var sd=l(Kt);w(ns.$$.fragment,sd),np=u(sd),yt=r(sd,"DIV",{class:!0});var xn=l(yt);w(ss.$$.fragment,xn),sp=u(xn),eo=r(xn,"P",{});var ir=l(eo);ap=s(ir,"The "),Ia=r(ir,"A",{href:!0});var Vg=l(Ia);rp=s(Vg,"FlaubertModel"),Vg.forEach(t),lp=s(ir," forward method, overrides the "),Sr=r(ir,"CODE",{});var Bg=l(Sr);ip=s(Bg,"__call__"),Bg.forEach(t),dp=s(ir," special method."),ir.forEach(t),cp=u(xn),w(Wo.$$.fragment,xn),pp=u(xn),w(Zo.$$.fragment,xn),xn.forEach(t),sd.forEach(t),Mi=u(o),to=r(o,"H2",{class:!0});var ad=l(to);qo=r(ad,"A",{id:!0,class:!0,href:!0});var Gg=l(qo);Dr=r(Gg,"SPAN",{});var Rg=l(Dr);w(as.$$.fragment,Rg),Rg.forEach(t),Gg.forEach(t),up=u(ad),Qr=r(ad,"SPAN",{});var Xg=l(Qr);hp=s(Xg,"FlaubertWithLMHeadModel"),Xg.forEach(t),ad.forEach(t),Fi=u(o),lt=r(o,"DIV",{class:!0});var qt=l(lt);w(rs.$$.fragment,qt),mp=u(qt),Yr=r(qt,"P",{});var Ag=l(Yr);fp=s(Ag,`The Flaubert Model transformer with a language modeling head on top (linear layer with weights tied to the input
embeddings).`),Ag.forEach(t),gp=u(qt),ls=r(qt,"P",{});var rd=l(ls);_p=s(rd,"This model inherits from "),xa=r(rd,"A",{href:!0});var Sg=l(xa);bp=s(Sg,"PreTrainedModel"),Sg.forEach(t),yp=s(rd,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),rd.forEach(t),Tp=u(qt),is=r(qt,"P",{});var ld=l(is);vp=s(ld,"This model is also a PyTorch "),ds=r(ld,"A",{href:!0,rel:!0});var Dg=l(ds);wp=s(Dg,"torch.nn.Module"),Dg.forEach(t),kp=s(ld,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),ld.forEach(t),Mp=u(qt),Tt=r(qt,"DIV",{class:!0});var Wn=l(Tt);w(cs.$$.fragment,Wn),Fp=u(Wn),oo=r(Wn,"P",{});var dr=l(oo);$p=s(dr,"The "),Wa=r(dr,"A",{href:!0});var Qg=l(Wa);Ep=s(Qg,"FlaubertWithLMHeadModel"),Qg.forEach(t),jp=s(dr," forward method, overrides the "),Lr=r(dr,"CODE",{});var Yg=l(Lr);Cp=s(Yg,"__call__"),Yg.forEach(t),Jp=s(dr," special method."),dr.forEach(t),Up=u(Wn),w(Vo.$$.fragment,Wn),zp=u(Wn),w(Bo.$$.fragment,Wn),Wn.forEach(t),qt.forEach(t),$i=u(o),no=r(o,"H2",{class:!0});var id=l(no);Go=r(id,"A",{id:!0,class:!0,href:!0});var Lg=l(Go);Pr=r(Lg,"SPAN",{});var Pg=l(Pr);w(ps.$$.fragment,Pg),Pg.forEach(t),Lg.forEach(t),Np=u(id),Hr=r(id,"SPAN",{});var Hg=l(Hr);Ip=s(Hg,"FlaubertForSequenceClassification"),Hg.forEach(t),id.forEach(t),Ei=u(o),it=r(o,"DIV",{class:!0});var Vt=l(it);w(us.$$.fragment,Vt),xp=u(Vt),Or=r(Vt,"P",{});var Og=l(Or);Wp=s(Og,`Flaubert Model with a sequence classification/regression head on top (a linear layer on top of the pooled output)
e.g. for GLUE tasks.`),Og.forEach(t),Zp=u(Vt),hs=r(Vt,"P",{});var dd=l(hs);qp=s(dd,"This model inherits from "),Za=r(dd,"A",{href:!0});var Kg=l(Za);Vp=s(Kg,"PreTrainedModel"),Kg.forEach(t),Bp=s(dd,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),dd.forEach(t),Gp=u(Vt),ms=r(Vt,"P",{});var cd=l(ms);Rp=s(cd,"This model is also a PyTorch "),fs=r(cd,"A",{href:!0,rel:!0});var e_=l(fs);Xp=s(e_,"torch.nn.Module"),e_.forEach(t),Ap=s(cd,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),cd.forEach(t),Sp=u(Vt),ut=r(Vt,"DIV",{class:!0});var Bt=l(ut);w(gs.$$.fragment,Bt),Dp=u(Bt),so=r(Bt,"P",{});var cr=l(so);Qp=s(cr,"The "),qa=r(cr,"A",{href:!0});var t_=l(qa);Yp=s(t_,"FlaubertForSequenceClassification"),t_.forEach(t),Lp=s(cr," forward method, overrides the "),Kr=r(cr,"CODE",{});var o_=l(Kr);Pp=s(o_,"__call__"),o_.forEach(t),Hp=s(cr," special method."),cr.forEach(t),Op=u(Bt),w(Ro.$$.fragment,Bt),Kp=u(Bt),w(Xo.$$.fragment,Bt),eu=u(Bt),w(Ao.$$.fragment,Bt),Bt.forEach(t),Vt.forEach(t),ji=u(o),ao=r(o,"H2",{class:!0});var pd=l(ao);So=r(pd,"A",{id:!0,class:!0,href:!0});var n_=l(So);el=r(n_,"SPAN",{});var s_=l(el);w(_s.$$.fragment,s_),s_.forEach(t),n_.forEach(t),tu=u(pd),tl=r(pd,"SPAN",{});var a_=l(tl);ou=s(a_,"FlaubertForMultipleChoice"),a_.forEach(t),pd.forEach(t),Ci=u(o),dt=r(o,"DIV",{class:!0});var Gt=l(dt);w(bs.$$.fragment,Gt),nu=u(Gt),ol=r(Gt,"P",{});var r_=l(ol);su=s(r_,`Flaubert Model with a multiple choice classification head on top (a linear layer on top of the pooled output and a
softmax) e.g. for RocStories/SWAG tasks.`),r_.forEach(t),au=u(Gt),ys=r(Gt,"P",{});var ud=l(ys);ru=s(ud,"This model inherits from "),Va=r(ud,"A",{href:!0});var l_=l(Va);lu=s(l_,"PreTrainedModel"),l_.forEach(t),iu=s(ud,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),ud.forEach(t),du=u(Gt),Ts=r(Gt,"P",{});var hd=l(Ts);cu=s(hd,"This model is also a PyTorch "),vs=r(hd,"A",{href:!0,rel:!0});var i_=l(vs);pu=s(i_,"torch.nn.Module"),i_.forEach(t),uu=s(hd,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),hd.forEach(t),hu=u(Gt),vt=r(Gt,"DIV",{class:!0});var Zn=l(vt);w(ws.$$.fragment,Zn),mu=u(Zn),ro=r(Zn,"P",{});var pr=l(ro);fu=s(pr,"The "),Ba=r(pr,"A",{href:!0});var d_=l(Ba);gu=s(d_,"FlaubertForMultipleChoice"),d_.forEach(t),_u=s(pr," forward method, overrides the "),nl=r(pr,"CODE",{});var c_=l(nl);bu=s(c_,"__call__"),c_.forEach(t),yu=s(pr," special method."),pr.forEach(t),Tu=u(Zn),w(Do.$$.fragment,Zn),vu=u(Zn),w(Qo.$$.fragment,Zn),Zn.forEach(t),Gt.forEach(t),Ji=u(o),lo=r(o,"H2",{class:!0});var md=l(lo);Yo=r(md,"A",{id:!0,class:!0,href:!0});var p_=l(Yo);sl=r(p_,"SPAN",{});var u_=l(sl);w(ks.$$.fragment,u_),u_.forEach(t),p_.forEach(t),wu=u(md),al=r(md,"SPAN",{});var h_=l(al);ku=s(h_,"FlaubertForTokenClassification"),h_.forEach(t),md.forEach(t),Ui=u(o),ct=r(o,"DIV",{class:!0});var Rt=l(ct);w(Ms.$$.fragment,Rt),Mu=u(Rt),rl=r(Rt,"P",{});var m_=l(rl);Fu=s(m_,`Flaubert 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.`),m_.forEach(t),$u=u(Rt),Fs=r(Rt,"P",{});var fd=l(Fs);Eu=s(fd,"This model inherits from "),Ga=r(fd,"A",{href:!0});var f_=l(Ga);ju=s(f_,"PreTrainedModel"),f_.forEach(t),Cu=s(fd,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),fd.forEach(t),Ju=u(Rt),$s=r(Rt,"P",{});var gd=l($s);Uu=s(gd,"This model is also a PyTorch "),Es=r(gd,"A",{href:!0,rel:!0});var g_=l(Es);zu=s(g_,"torch.nn.Module"),g_.forEach(t),Nu=s(gd,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),gd.forEach(t),Iu=u(Rt),wt=r(Rt,"DIV",{class:!0});var qn=l(wt);w(js.$$.fragment,qn),xu=u(qn),io=r(qn,"P",{});var ur=l(io);Wu=s(ur,"The "),Ra=r(ur,"A",{href:!0});var __=l(Ra);Zu=s(__,"FlaubertForTokenClassification"),__.forEach(t),qu=s(ur," forward method, overrides the "),ll=r(ur,"CODE",{});var b_=l(ll);Vu=s(b_,"__call__"),b_.forEach(t),Bu=s(ur," special method."),ur.forEach(t),Gu=u(qn),w(Lo.$$.fragment,qn),Ru=u(qn),w(Po.$$.fragment,qn),qn.forEach(t),Rt.forEach(t),zi=u(o),co=r(o,"H2",{class:!0});var _d=l(co);Ho=r(_d,"A",{id:!0,class:!0,href:!0});var y_=l(Ho);il=r(y_,"SPAN",{});var T_=l(il);w(Cs.$$.fragment,T_),T_.forEach(t),y_.forEach(t),Xu=u(_d),dl=r(_d,"SPAN",{});var v_=l(dl);Au=s(v_,"FlaubertForQuestionAnsweringSimple"),v_.forEach(t),_d.forEach(t),Ni=u(o),pt=r(o,"DIV",{class:!0});var Xt=l(pt);w(Js.$$.fragment,Xt),Su=u(Xt),po=r(Xt,"P",{});var hr=l(po);Du=s(hr,`Flaubert Model 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 `),cl=r(hr,"CODE",{});var w_=l(cl);Qu=s(w_,"span start logits"),w_.forEach(t),Yu=s(hr," and "),pl=r(hr,"CODE",{});var k_=l(pl);Lu=s(k_,"span end logits"),k_.forEach(t),Pu=s(hr,")."),hr.forEach(t),Hu=u(Xt),Us=r(Xt,"P",{});var bd=l(Us);Ou=s(bd,"This model inherits from "),Xa=r(bd,"A",{href:!0});var M_=l(Xa);Ku=s(M_,"PreTrainedModel"),M_.forEach(t),eh=s(bd,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),bd.forEach(t),th=u(Xt),zs=r(Xt,"P",{});var yd=l(zs);oh=s(yd,"This model is also a PyTorch "),Ns=r(yd,"A",{href:!0,rel:!0});var F_=l(Ns);nh=s(F_,"torch.nn.Module"),F_.forEach(t),sh=s(yd,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),yd.forEach(t),ah=u(Xt),kt=r(Xt,"DIV",{class:!0});var Vn=l(kt);w(Is.$$.fragment,Vn),rh=u(Vn),uo=r(Vn,"P",{});var mr=l(uo);lh=s(mr,"The "),Aa=r(mr,"A",{href:!0});var $_=l(Aa);ih=s($_,"FlaubertForQuestionAnsweringSimple"),$_.forEach(t),dh=s(mr," forward method, overrides the "),ul=r(mr,"CODE",{});var E_=l(ul);ch=s(E_,"__call__"),E_.forEach(t),ph=s(mr," special method."),mr.forEach(t),uh=u(Vn),w(Oo.$$.fragment,Vn),hh=u(Vn),w(Ko.$$.fragment,Vn),Vn.forEach(t),Xt.forEach(t),Ii=u(o),ho=r(o,"H2",{class:!0});var Td=l(ho);en=r(Td,"A",{id:!0,class:!0,href:!0});var j_=l(en);hl=r(j_,"SPAN",{});var C_=l(hl);w(xs.$$.fragment,C_),C_.forEach(t),j_.forEach(t),mh=u(Td),ml=r(Td,"SPAN",{});var J_=l(ml);fh=s(J_,"FlaubertForQuestionAnswering"),J_.forEach(t),Td.forEach(t),xi=u(o),mo=r(o,"DIV",{class:!0});var vd=l(mo);w(Ws.$$.fragment,vd),gh=u(vd),ht=r(vd,"DIV",{class:!0});var At=l(ht);w(Zs.$$.fragment,At),_h=u(At),fo=r(At,"P",{});var fr=l(fo);bh=s(fr,"The "),Sa=r(fr,"A",{href:!0});var U_=l(Sa);yh=s(U_,"FlaubertForQuestionAnswering"),U_.forEach(t),Th=s(fr," forward method, overrides the "),fl=r(fr,"CODE",{});var z_=l(fl);vh=s(z_,"__call__"),z_.forEach(t),wh=s(fr," special method."),fr.forEach(t),kh=u(At),w(tn.$$.fragment,At),Mh=u(At),qs=r(At,"P",{});var wd=l(qs);Fh=s(wd,"Base class for outputs of question answering models using a "),gl=r(wd,"CODE",{});var N_=l(gl);$h=s(N_,"SquadHead"),N_.forEach(t),Eh=s(wd,"."),wd.forEach(t),jh=u(At),w(on.$$.fragment,At),At.forEach(t),vd.forEach(t),Wi=u(o),go=r(o,"H2",{class:!0});var kd=l(go);nn=r(kd,"A",{id:!0,class:!0,href:!0});var I_=l(nn);_l=r(I_,"SPAN",{});var x_=l(_l);w(Vs.$$.fragment,x_),x_.forEach(t),I_.forEach(t),Ch=u(kd),bl=r(kd,"SPAN",{});var W_=l(bl);Jh=s(W_,"TFFlaubertModel"),W_.forEach(t),kd.forEach(t),Zi=u(o),et=r(o,"DIV",{class:!0});var Et=l(et);w(Bs.$$.fragment,Et),Uh=u(Et),yl=r(Et,"P",{});var Z_=l(yl);zh=s(Z_,"The bare Flaubert Model transformer outputting raw hidden-states without any specific head on top."),Z_.forEach(t),Nh=u(Et),Gs=r(Et,"P",{});var Md=l(Gs);Ih=s(Md,"This model inherits from "),Da=r(Md,"A",{href:!0});var q_=l(Da);xh=s(q_,"TFPreTrainedModel"),q_.forEach(t),Wh=s(Md,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),Md.forEach(t),Zh=u(Et),Rs=r(Et,"P",{});var Fd=l(Rs);qh=s(Fd,"This model is also a "),Xs=r(Fd,"A",{href:!0,rel:!0});var V_=l(Xs);Vh=s(V_,"tf.keras.Model"),V_.forEach(t),Bh=s(Fd,` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),Fd.forEach(t),Gh=u(Et),w(sn.$$.fragment,Et),Rh=u(Et),Mt=r(Et,"DIV",{class:!0});var Bn=l(Mt);w(As.$$.fragment,Bn),Xh=u(Bn),_o=r(Bn,"P",{});var gr=l(_o);Ah=s(gr,"The "),Qa=r(gr,"A",{href:!0});var B_=l(Qa);Sh=s(B_,"TFFlaubertModel"),B_.forEach(t),Dh=s(gr," forward method, overrides the "),Tl=r(gr,"CODE",{});var G_=l(Tl);Qh=s(G_,"__call__"),G_.forEach(t),Yh=s(gr," special method."),gr.forEach(t),Lh=u(Bn),w(an.$$.fragment,Bn),Ph=u(Bn),w(rn.$$.fragment,Bn),Bn.forEach(t),Et.forEach(t),qi=u(o),bo=r(o,"H2",{class:!0});var $d=l(bo);ln=r($d,"A",{id:!0,class:!0,href:!0});var R_=l(ln);vl=r(R_,"SPAN",{});var X_=l(vl);w(Ss.$$.fragment,X_),X_.forEach(t),R_.forEach(t),Hh=u($d),wl=r($d,"SPAN",{});var A_=l(wl);Oh=s(A_,"TFFlaubertWithLMHeadModel"),A_.forEach(t),$d.forEach(t),Vi=u(o),tt=r(o,"DIV",{class:!0});var jt=l(tt);w(Ds.$$.fragment,jt),Kh=u(jt),kl=r(jt,"P",{});var S_=l(kl);em=s(S_,`The Flaubert Model transformer with a language modeling head on top (linear layer with weights tied to the input
embeddings).`),S_.forEach(t),tm=u(jt),Qs=r(jt,"P",{});var Ed=l(Qs);om=s(Ed,"This model inherits from "),Ya=r(Ed,"A",{href:!0});var D_=l(Ya);nm=s(D_,"TFPreTrainedModel"),D_.forEach(t),sm=s(Ed,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),Ed.forEach(t),am=u(jt),Ys=r(jt,"P",{});var jd=l(Ys);rm=s(jd,"This model is also a "),Ls=r(jd,"A",{href:!0,rel:!0});var Q_=l(Ls);lm=s(Q_,"tf.keras.Model"),Q_.forEach(t),im=s(jd,` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),jd.forEach(t),dm=u(jt),w(dn.$$.fragment,jt),cm=u(jt),Ft=r(jt,"DIV",{class:!0});var Gn=l(Ft);w(Ps.$$.fragment,Gn),pm=u(Gn),yo=r(Gn,"P",{});var _r=l(yo);um=s(_r,"The "),La=r(_r,"A",{href:!0});var Y_=l(La);hm=s(Y_,"TFFlaubertWithLMHeadModel"),Y_.forEach(t),mm=s(_r," forward method, overrides the "),Ml=r(_r,"CODE",{});var L_=l(Ml);fm=s(L_,"__call__"),L_.forEach(t),gm=s(_r," special method."),_r.forEach(t),_m=u(Gn),w(cn.$$.fragment,Gn),bm=u(Gn),w(pn.$$.fragment,Gn),Gn.forEach(t),jt.forEach(t),Bi=u(o),To=r(o,"H2",{class:!0});var Cd=l(To);un=r(Cd,"A",{id:!0,class:!0,href:!0});var P_=l(un);Fl=r(P_,"SPAN",{});var H_=l(Fl);w(Hs.$$.fragment,H_),H_.forEach(t),P_.forEach(t),ym=u(Cd),$l=r(Cd,"SPAN",{});var O_=l($l);Tm=s(O_,"TFFlaubertForSequenceClassification"),O_.forEach(t),Cd.forEach(t),Gi=u(o),ot=r(o,"DIV",{class:!0});var Ct=l(ot);w(Os.$$.fragment,Ct),vm=u(Ct),El=r(Ct,"P",{});var K_=l(El);wm=s(K_,`Flaubert Model with a sequence classification/regression head on top (a linear layer on top of the pooled output)
e.g. for GLUE tasks.`),K_.forEach(t),km=u(Ct),Ks=r(Ct,"P",{});var Jd=l(Ks);Mm=s(Jd,"This model inherits from "),Pa=r(Jd,"A",{href:!0});var eb=l(Pa);Fm=s(eb,"TFPreTrainedModel"),eb.forEach(t),$m=s(Jd,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),Jd.forEach(t),Em=u(Ct),ea=r(Ct,"P",{});var Ud=l(ea);jm=s(Ud,"This model is also a "),ta=r(Ud,"A",{href:!0,rel:!0});var tb=l(ta);Cm=s(tb,"tf.keras.Model"),tb.forEach(t),Jm=s(Ud,` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),Ud.forEach(t),Um=u(Ct),w(hn.$$.fragment,Ct),zm=u(Ct),mt=r(Ct,"DIV",{class:!0});var St=l(mt);w(oa.$$.fragment,St),Nm=u(St),vo=r(St,"P",{});var br=l(vo);Im=s(br,"The "),Ha=r(br,"A",{href:!0});var ob=l(Ha);xm=s(ob,"TFFlaubertForSequenceClassification"),ob.forEach(t),Wm=s(br," forward method, overrides the "),jl=r(br,"CODE",{});var nb=l(jl);Zm=s(nb,"__call__"),nb.forEach(t),qm=s(br," special method."),br.forEach(t),Vm=u(St),w(mn.$$.fragment,St),Bm=u(St),w(fn.$$.fragment,St),Gm=u(St),w(gn.$$.fragment,St),St.forEach(t),Ct.forEach(t),Ri=u(o),wo=r(o,"H2",{class:!0});var zd=l(wo);_n=r(zd,"A",{id:!0,class:!0,href:!0});var sb=l(_n);Cl=r(sb,"SPAN",{});var ab=l(Cl);w(na.$$.fragment,ab),ab.forEach(t),sb.forEach(t),Rm=u(zd),Jl=r(zd,"SPAN",{});var rb=l(Jl);Xm=s(rb,"TFFlaubertForMultipleChoice"),rb.forEach(t),zd.forEach(t),Xi=u(o),nt=r(o,"DIV",{class:!0});var Jt=l(nt);w(sa.$$.fragment,Jt),Am=u(Jt),Ul=r(Jt,"P",{});var lb=l(Ul);Sm=s(lb,`Flaubert Model with a multiple choice classification head on top (a linear layer on top of the pooled output and a
softmax) e.g. for RocStories/SWAG tasks.`),lb.forEach(t),Dm=u(Jt),aa=r(Jt,"P",{});var Nd=l(aa);Qm=s(Nd,"This model inherits from "),Oa=r(Nd,"A",{href:!0});var ib=l(Oa);Ym=s(ib,"TFPreTrainedModel"),ib.forEach(t),Lm=s(Nd,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),Nd.forEach(t),Pm=u(Jt),ra=r(Jt,"P",{});var Id=l(ra);Hm=s(Id,"This model is also a "),la=r(Id,"A",{href:!0,rel:!0});var db=l(la);Om=s(db,"tf.keras.Model"),db.forEach(t),Km=s(Id,` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),Id.forEach(t),ef=u(Jt),w(bn.$$.fragment,Jt),tf=u(Jt),$t=r(Jt,"DIV",{class:!0});var Rn=l($t);w(ia.$$.fragment,Rn),of=u(Rn),ko=r(Rn,"P",{});var yr=l(ko);nf=s(yr,"The "),Ka=r(yr,"A",{href:!0});var cb=l(Ka);sf=s(cb,"TFFlaubertForMultipleChoice"),cb.forEach(t),af=s(yr," forward method, overrides the "),zl=r(yr,"CODE",{});var pb=l(zl);rf=s(pb,"__call__"),pb.forEach(t),lf=s(yr," special method."),yr.forEach(t),df=u(Rn),w(yn.$$.fragment,Rn),cf=u(Rn),w(Tn.$$.fragment,Rn),Rn.forEach(t),Jt.forEach(t),Ai=u(o),Mo=r(o,"H2",{class:!0});var xd=l(Mo);vn=r(xd,"A",{id:!0,class:!0,href:!0});var ub=l(vn);Nl=r(ub,"SPAN",{});var hb=l(Nl);w(da.$$.fragment,hb),hb.forEach(t),ub.forEach(t),pf=u(xd),Il=r(xd,"SPAN",{});var mb=l(Il);uf=s(mb,"TFFlaubertForTokenClassification"),mb.forEach(t),xd.forEach(t),Si=u(o),st=r(o,"DIV",{class:!0});var Ut=l(st);w(ca.$$.fragment,Ut),hf=u(Ut),xl=r(Ut,"P",{});var fb=l(xl);mf=s(fb,`Flaubert 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.`),fb.forEach(t),ff=u(Ut),pa=r(Ut,"P",{});var Wd=l(pa);gf=s(Wd,"This model inherits from "),er=r(Wd,"A",{href:!0});var gb=l(er);_f=s(gb,"TFPreTrainedModel"),gb.forEach(t),bf=s(Wd,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),Wd.forEach(t),yf=u(Ut),ua=r(Ut,"P",{});var Zd=l(ua);Tf=s(Zd,"This model is also a "),ha=r(Zd,"A",{href:!0,rel:!0});var _b=l(ha);vf=s(_b,"tf.keras.Model"),_b.forEach(t),wf=s(Zd,` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),Zd.forEach(t),kf=u(Ut),w(wn.$$.fragment,Ut),Mf=u(Ut),ft=r(Ut,"DIV",{class:!0});var Dt=l(ft);w(ma.$$.fragment,Dt),Ff=u(Dt),Fo=r(Dt,"P",{});var Tr=l(Fo);$f=s(Tr,"The "),tr=r(Tr,"A",{href:!0});var bb=l(tr);Ef=s(bb,"TFFlaubertForTokenClassification"),bb.forEach(t),jf=s(Tr," forward method, overrides the "),Wl=r(Tr,"CODE",{});var yb=l(Wl);Cf=s(yb,"__call__"),yb.forEach(t),Jf=s(Tr," special method."),Tr.forEach(t),Uf=u(Dt),w(kn.$$.fragment,Dt),zf=u(Dt),w(Mn.$$.fragment,Dt),Nf=u(Dt),w(Fn.$$.fragment,Dt),Dt.forEach(t),Ut.forEach(t),Di=u(o),$o=r(o,"H2",{class:!0});var qd=l($o);$n=r(qd,"A",{id:!0,class:!0,href:!0});var Tb=l($n);Zl=r(Tb,"SPAN",{});var vb=l(Zl);w(fa.$$.fragment,vb),vb.forEach(t),Tb.forEach(t),If=u(qd),ql=r(qd,"SPAN",{});var wb=l(ql);xf=s(wb,"TFFlaubertForQuestionAnsweringSimple"),wb.forEach(t),qd.forEach(t),Qi=u(o),at=r(o,"DIV",{class:!0});var zt=l(at);w(ga.$$.fragment,zt),Wf=u(zt),Eo=r(zt,"P",{});var vr=l(Eo);Zf=s(vr,`Flaubert Model with a span classification head on top for extractive question-answering tasks like SQuAD (a linear
layer on top of the hidden-states output to compute `),Vl=r(vr,"CODE",{});var kb=l(Vl);qf=s(kb,"span start logits"),kb.forEach(t),Vf=s(vr," and "),Bl=r(vr,"CODE",{});var Mb=l(Bl);Bf=s(Mb,"span end logits"),Mb.forEach(t),Gf=s(vr,")."),vr.forEach(t),Rf=u(zt),_a=r(zt,"P",{});var Vd=l(_a);Xf=s(Vd,"This model inherits from "),or=r(Vd,"A",{href:!0});var Fb=l(or);Af=s(Fb,"TFPreTrainedModel"),Fb.forEach(t),Sf=s(Vd,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),Vd.forEach(t),Df=u(zt),ba=r(zt,"P",{});var Bd=l(ba);Qf=s(Bd,"This model is also a "),ya=r(Bd,"A",{href:!0,rel:!0});var $b=l(ya);Yf=s($b,"tf.keras.Model"),$b.forEach(t),Lf=s(Bd,` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),Bd.forEach(t),Pf=u(zt),w(En.$$.fragment,zt),Hf=u(zt),gt=r(zt,"DIV",{class:!0});var Qt=l(gt);w(Ta.$$.fragment,Qt),Of=u(Qt),jo=r(Qt,"P",{});var wr=l(jo);Kf=s(wr,"The "),nr=r(wr,"A",{href:!0});var Eb=l(nr);eg=s(Eb,"TFFlaubertForQuestionAnsweringSimple"),Eb.forEach(t),tg=s(wr," forward method, overrides the "),Gl=r(wr,"CODE",{});var jb=l(Gl);og=s(jb,"__call__"),jb.forEach(t),ng=s(wr," special method."),wr.forEach(t),sg=u(Qt),w(jn.$$.fragment,Qt),ag=u(Qt),w(Cn.$$.fragment,Qt),rg=u(Qt),w(Jn.$$.fragment,Qt),Qt.forEach(t),zt.forEach(t),this.h()},h(){f(d,"name","hf:doc:metadata"),f(d,"content",JSON.stringify(yy)),f(m,"id","flaubert"),f(m,"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"),f(m,"href","#flaubert"),f(h,"class","relative group"),f(O,"alt","Models"),Cb(O.src,E="https://img.shields.io/badge/All_model_pages-flaubert-blueviolet")||f(O,"src",E),f(ce,"href","https://huggingface.co/models?filter=flaubert"),f(pe,"alt","Spaces"),Cb(pe.src,Ne="https://img.shields.io/badge/%F0%9F%A4%97%20Hugging%20Face-Spaces-blue")||f(pe,"src",Ne),f(X,"href","https://huggingface.co/spaces/docs-demos/flaubert_small_cased"),f(V,"class","flex flex-wrap space-x-1"),f(ae,"id","overview"),f(ae,"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"),f(ae,"href","#overview"),f(te,"class","relative group"),f(de,"href","https://arxiv.org/abs/1912.05372"),f(de,"rel","nofollow"),f(G,"href","https://huggingface.co/formiel"),f(G,"rel","nofollow"),f(R,"href","https://github.com/getalp/Flaubert"),f(R,"rel","nofollow"),f(re,"id","documentation-resources"),f(re,"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"),f(re,"href","#documentation-resources"),f(ne,"class","relative group"),f(Ie,"href","../tasks/sequence_classification"),f(Z,"href","../tasks/token_classification"),f(A,"href","../tasks/question_answering"),f(xe,"href","../tasks/masked_language_modeling"),f($a,"href","../tasks/multiple_choice"),f(Jo,"id","transformers.FlaubertConfig"),f(Jo,"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"),f(Jo,"href","#transformers.FlaubertConfig"),f(Yt,"class","relative group"),f(Ea,"href","/docs/transformers/v4.31.0/en/model_doc/flaubert#transformers.FlaubertModel"),f(ja,"href","/docs/transformers/v4.31.0/en/model_doc/flaubert#transformers.TFFlaubertModel"),f(Sn,"href","https://huggingface.co/flaubert/flaubert_base_uncased"),f(Sn,"rel","nofollow"),f(Ca,"href","/docs/transformers/v4.31.0/en/main_classes/configuration#transformers.PretrainedConfig"),f(Ja,"href","/docs/transformers/v4.31.0/en/main_classes/configuration#transformers.PretrainedConfig"),f(Nt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(Uo,"id","transformers.FlaubertTokenizer"),f(Uo,"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"),f(Uo,"href","#transformers.FlaubertTokenizer"),f(Pt,"class","relative group"),f(Ua,"href","/docs/transformers/v4.31.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizer"),f(Zt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(zo,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(bt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(Io,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(Ye,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(xo,"id","transformers.FlaubertModel"),f(xo,"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"),f(xo,"href","#transformers.FlaubertModel"),f(Ot,"class","relative group"),f(Ia,"href","/docs/transformers/v4.31.0/en/model_doc/flaubert#transformers.FlaubertModel"),f(yt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(Kt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(qo,"id","transformers.FlaubertWithLMHeadModel"),f(qo,"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"),f(qo,"href","#transformers.FlaubertWithLMHeadModel"),f(to,"class","relative group"),f(xa,"href","/docs/transformers/v4.31.0/en/main_classes/model#transformers.PreTrainedModel"),f(ds,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),f(ds,"rel","nofollow"),f(Wa,"href","/docs/transformers/v4.31.0/en/model_doc/flaubert#transformers.FlaubertWithLMHeadModel"),f(Tt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(lt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(Go,"id","transformers.FlaubertForSequenceClassification"),f(Go,"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"),f(Go,"href","#transformers.FlaubertForSequenceClassification"),f(no,"class","relative group"),f(Za,"href","/docs/transformers/v4.31.0/en/main_classes/model#transformers.PreTrainedModel"),f(fs,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),f(fs,"rel","nofollow"),f(qa,"href","/docs/transformers/v4.31.0/en/model_doc/flaubert#transformers.FlaubertForSequenceClassification"),f(ut,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(it,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(So,"id","transformers.FlaubertForMultipleChoice"),f(So,"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"),f(So,"href","#transformers.FlaubertForMultipleChoice"),f(ao,"class","relative group"),f(Va,"href","/docs/transformers/v4.31.0/en/main_classes/model#transformers.PreTrainedModel"),f(vs,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),f(vs,"rel","nofollow"),f(Ba,"href","/docs/transformers/v4.31.0/en/model_doc/flaubert#transformers.FlaubertForMultipleChoice"),f(vt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(dt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(Yo,"id","transformers.FlaubertForTokenClassification"),f(Yo,"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"),f(Yo,"href","#transformers.FlaubertForTokenClassification"),f(lo,"class","relative group"),f(Ga,"href","/docs/transformers/v4.31.0/en/main_classes/model#transformers.PreTrainedModel"),f(Es,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),f(Es,"rel","nofollow"),f(Ra,"href","/docs/transformers/v4.31.0/en/model_doc/flaubert#transformers.FlaubertForTokenClassification"),f(wt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(ct,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(Ho,"id","transformers.FlaubertForQuestionAnsweringSimple"),f(Ho,"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"),f(Ho,"href","#transformers.FlaubertForQuestionAnsweringSimple"),f(co,"class","relative group"),f(Xa,"href","/docs/transformers/v4.31.0/en/main_classes/model#transformers.PreTrainedModel"),f(Ns,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),f(Ns,"rel","nofollow"),f(Aa,"href","/docs/transformers/v4.31.0/en/model_doc/flaubert#transformers.FlaubertForQuestionAnsweringSimple"),f(kt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(pt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(en,"id","transformers.FlaubertForQuestionAnswering"),f(en,"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"),f(en,"href","#transformers.FlaubertForQuestionAnswering"),f(ho,"class","relative group"),f(Sa,"href","/docs/transformers/v4.31.0/en/model_doc/flaubert#transformers.FlaubertForQuestionAnswering"),f(ht,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(mo,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(nn,"id","transformers.TFFlaubertModel"),f(nn,"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"),f(nn,"href","#transformers.TFFlaubertModel"),f(go,"class","relative group"),f(Da,"href","/docs/transformers/v4.31.0/en/main_classes/model#transformers.TFPreTrainedModel"),f(Xs,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),f(Xs,"rel","nofollow"),f(Qa,"href","/docs/transformers/v4.31.0/en/model_doc/flaubert#transformers.TFFlaubertModel"),f(Mt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(et,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(ln,"id","transformers.TFFlaubertWithLMHeadModel"),f(ln,"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"),f(ln,"href","#transformers.TFFlaubertWithLMHeadModel"),f(bo,"class","relative group"),f(Ya,"href","/docs/transformers/v4.31.0/en/main_classes/model#transformers.TFPreTrainedModel"),f(Ls,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),f(Ls,"rel","nofollow"),f(La,"href","/docs/transformers/v4.31.0/en/model_doc/flaubert#transformers.TFFlaubertWithLMHeadModel"),f(Ft,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(tt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(un,"id","transformers.TFFlaubertForSequenceClassification"),f(un,"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"),f(un,"href","#transformers.TFFlaubertForSequenceClassification"),f(To,"class","relative group"),f(Pa,"href","/docs/transformers/v4.31.0/en/main_classes/model#transformers.TFPreTrainedModel"),f(ta,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),f(ta,"rel","nofollow"),f(Ha,"href","/docs/transformers/v4.31.0/en/model_doc/flaubert#transformers.TFFlaubertForSequenceClassification"),f(mt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(ot,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(_n,"id","transformers.TFFlaubertForMultipleChoice"),f(_n,"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"),f(_n,"href","#transformers.TFFlaubertForMultipleChoice"),f(wo,"class","relative group"),f(Oa,"href","/docs/transformers/v4.31.0/en/main_classes/model#transformers.TFPreTrainedModel"),f(la,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),f(la,"rel","nofollow"),f(Ka,"href","/docs/transformers/v4.31.0/en/model_doc/flaubert#transformers.TFFlaubertForMultipleChoice"),f($t,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(nt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(vn,"id","transformers.TFFlaubertForTokenClassification"),f(vn,"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"),f(vn,"href","#transformers.TFFlaubertForTokenClassification"),f(Mo,"class","relative group"),f(er,"href","/docs/transformers/v4.31.0/en/main_classes/model#transformers.TFPreTrainedModel"),f(ha,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),f(ha,"rel","nofollow"),f(tr,"href","/docs/transformers/v4.31.0/en/model_doc/flaubert#transformers.TFFlaubertForTokenClassification"),f(ft,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(st,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f($n,"id","transformers.TFFlaubertForQuestionAnsweringSimple"),f($n,"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"),f($n,"href","#transformers.TFFlaubertForQuestionAnsweringSimple"),f($o,"class","relative group"),f(or,"href","/docs/transformers/v4.31.0/en/main_classes/model#transformers.TFPreTrainedModel"),f(ya,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),f(ya,"rel","nofollow"),f(nr,"href","/docs/transformers/v4.31.0/en/model_doc/flaubert#transformers.TFFlaubertForQuestionAnsweringSimple"),f(gt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(at,"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,b){e(document.head,d),_(o,T,b),_(o,h,b),e(h,m),e(m,y),k(i,y,null),e(h,c),e(h,J),e(J,ve),_(o,ge,b),_(o,V,b),e(V,ce),e(ce,O),e(V,we),e(V,X),e(X,pe),_(o,Y,b),_(o,te,b),e(te,ae),e(ae,S),k(ie,S,null),e(te,ke),e(te,D),e(D,Me),_(o,_e,b),_(o,B,b),e(B,Fe),e(B,de),e(de,oe),e(B,z),_(o,x,b),_(o,ue,b),e(ue,L),_(o,be,b),_(o,he,b),e(he,Q),e(Q,$e),_(o,ye,b),_(o,N,b),e(N,Ee),e(N,G),e(G,je),e(N,Ce),e(N,R),e(R,Je),e(N,Ue),_(o,q,b),_(o,me,b),e(me,P),_(o,Te,b),_(o,K,b),e(K,I),e(I,ze),_(o,W,b),_(o,ne,b),e(ne,re),e(re,g),k(j,g,null),e(ne,Be),e(ne,ee),e(ee,Ge),_(o,Ve,b),_(o,C,b),e(C,We),e(We,Ie),e(Ie,Re),e(C,Xe),e(C,Ze),e(Ze,Z),e(Z,H),e(C,Ae),e(C,qe),e(qe,A),e(A,Se),e(C,De),e(C,fe),e(fe,xe),e(xe,se),e(C,Qe),e(C,kr),e(kr,$a),e($a,Gd),_(o,bi,b),_(o,Yt,b),e(Yt,Jo),e(Jo,Mr),k(Xn,Mr,null),e(Yt,Rd),e(Yt,Fr),e(Fr,Xd),_(o,yi,b),_(o,Nt,b),k(An,Nt,null),e(Nt,Ad),e(Nt,It),e(It,Sd),e(It,Ea),e(Ea,Dd),e(It,Qd),e(It,ja),e(ja,Yd),e(It,Ld),e(It,Sn),e(Sn,Pd),e(It,Hd),e(Nt,Od),e(Nt,Lt),e(Lt,Kd),e(Lt,Ca),e(Ca,ec),e(Lt,tc),e(Lt,Ja),e(Ja,oc),e(Lt,nc),_(o,Ti,b),_(o,Pt,b),e(Pt,Uo),e(Uo,$r),k(Dn,$r,null),e(Pt,sc),e(Pt,Er),e(Er,ac),_(o,vi,b),_(o,Ye,b),k(Qn,Ye,null),e(Ye,rc),e(Ye,jr),e(jr,lc),e(Ye,ic),e(Ye,xt),e(xt,Cr),e(Cr,dc),e(xt,cc),e(xt,Jr),e(Jr,pc),e(xt,uc),e(xt,Wt),e(Wt,hc),e(Wt,Ur),e(Ur,mc),e(Wt,fc),e(Wt,zr),e(zr,gc),e(Wt,_c),e(Wt,Nr),e(Nr,bc),e(Wt,yc),e(xt,Tc),e(xt,Yn),e(Yn,vc),e(Yn,Ir),e(Ir,wc),e(Yn,kc),e(Ye,Mc),e(Ye,Ln),e(Ln,Fc),e(Ln,Ua),e(Ua,$c),e(Ln,Ec),e(Ye,jc),e(Ye,Zt),k(Pn,Zt,null),e(Zt,Cc),e(Zt,xr),e(xr,Jc),e(Zt,Uc),e(Zt,Hn),e(Hn,za),e(za,zc),e(za,Wr),e(Wr,Nc),e(Hn,Ic),e(Hn,Na),e(Na,xc),e(Na,Zr),e(Zr,Wc),e(Ye,Zc),e(Ye,zo),k(On,zo,null),e(zo,qc),e(zo,qr),e(qr,Vc),e(Ye,Bc),e(Ye,bt),k(Kn,bt,null),e(bt,Gc),e(bt,Vr),e(Vr,Rc),e(bt,Xc),k(No,bt,null),e(bt,Ac),e(bt,Ht),e(Ht,Sc),e(Ht,Br),e(Br,Dc),e(Ht,Qc),e(Ht,Gr),e(Gr,Yc),e(Ht,Lc),e(Ye,Pc),e(Ye,Io),k(es,Io,null),e(Io,Hc),e(Io,ts),e(ts,Oc),e(ts,Rr),e(Rr,Kc),e(ts,ep),_(o,wi,b),_(o,Ot,b),e(Ot,xo),e(xo,Xr),k(os,Xr,null),e(Ot,tp),e(Ot,Ar),e(Ar,op),_(o,ki,b),_(o,Kt,b),k(ns,Kt,null),e(Kt,np),e(Kt,yt),k(ss,yt,null),e(yt,sp),e(yt,eo),e(eo,ap),e(eo,Ia),e(Ia,rp),e(eo,lp),e(eo,Sr),e(Sr,ip),e(eo,dp),e(yt,cp),k(Wo,yt,null),e(yt,pp),k(Zo,yt,null),_(o,Mi,b),_(o,to,b),e(to,qo),e(qo,Dr),k(as,Dr,null),e(to,up),e(to,Qr),e(Qr,hp),_(o,Fi,b),_(o,lt,b),k(rs,lt,null),e(lt,mp),e(lt,Yr),e(Yr,fp),e(lt,gp),e(lt,ls),e(ls,_p),e(ls,xa),e(xa,bp),e(ls,yp),e(lt,Tp),e(lt,is),e(is,vp),e(is,ds),e(ds,wp),e(is,kp),e(lt,Mp),e(lt,Tt),k(cs,Tt,null),e(Tt,Fp),e(Tt,oo),e(oo,$p),e(oo,Wa),e(Wa,Ep),e(oo,jp),e(oo,Lr),e(Lr,Cp),e(oo,Jp),e(Tt,Up),k(Vo,Tt,null),e(Tt,zp),k(Bo,Tt,null),_(o,$i,b),_(o,no,b),e(no,Go),e(Go,Pr),k(ps,Pr,null),e(no,Np),e(no,Hr),e(Hr,Ip),_(o,Ei,b),_(o,it,b),k(us,it,null),e(it,xp),e(it,Or),e(Or,Wp),e(it,Zp),e(it,hs),e(hs,qp),e(hs,Za),e(Za,Vp),e(hs,Bp),e(it,Gp),e(it,ms),e(ms,Rp),e(ms,fs),e(fs,Xp),e(ms,Ap),e(it,Sp),e(it,ut),k(gs,ut,null),e(ut,Dp),e(ut,so),e(so,Qp),e(so,qa),e(qa,Yp),e(so,Lp),e(so,Kr),e(Kr,Pp),e(so,Hp),e(ut,Op),k(Ro,ut,null),e(ut,Kp),k(Xo,ut,null),e(ut,eu),k(Ao,ut,null),_(o,ji,b),_(o,ao,b),e(ao,So),e(So,el),k(_s,el,null),e(ao,tu),e(ao,tl),e(tl,ou),_(o,Ci,b),_(o,dt,b),k(bs,dt,null),e(dt,nu),e(dt,ol),e(ol,su),e(dt,au),e(dt,ys),e(ys,ru),e(ys,Va),e(Va,lu),e(ys,iu),e(dt,du),e(dt,Ts),e(Ts,cu),e(Ts,vs),e(vs,pu),e(Ts,uu),e(dt,hu),e(dt,vt),k(ws,vt,null),e(vt,mu),e(vt,ro),e(ro,fu),e(ro,Ba),e(Ba,gu),e(ro,_u),e(ro,nl),e(nl,bu),e(ro,yu),e(vt,Tu),k(Do,vt,null),e(vt,vu),k(Qo,vt,null),_(o,Ji,b),_(o,lo,b),e(lo,Yo),e(Yo,sl),k(ks,sl,null),e(lo,wu),e(lo,al),e(al,ku),_(o,Ui,b),_(o,ct,b),k(Ms,ct,null),e(ct,Mu),e(ct,rl),e(rl,Fu),e(ct,$u),e(ct,Fs),e(Fs,Eu),e(Fs,Ga),e(Ga,ju),e(Fs,Cu),e(ct,Ju),e(ct,$s),e($s,Uu),e($s,Es),e(Es,zu),e($s,Nu),e(ct,Iu),e(ct,wt),k(js,wt,null),e(wt,xu),e(wt,io),e(io,Wu),e(io,Ra),e(Ra,Zu),e(io,qu),e(io,ll),e(ll,Vu),e(io,Bu),e(wt,Gu),k(Lo,wt,null),e(wt,Ru),k(Po,wt,null),_(o,zi,b),_(o,co,b),e(co,Ho),e(Ho,il),k(Cs,il,null),e(co,Xu),e(co,dl),e(dl,Au),_(o,Ni,b),_(o,pt,b),k(Js,pt,null),e(pt,Su),e(pt,po),e(po,Du),e(po,cl),e(cl,Qu),e(po,Yu),e(po,pl),e(pl,Lu),e(po,Pu),e(pt,Hu),e(pt,Us),e(Us,Ou),e(Us,Xa),e(Xa,Ku),e(Us,eh),e(pt,th),e(pt,zs),e(zs,oh),e(zs,Ns),e(Ns,nh),e(zs,sh),e(pt,ah),e(pt,kt),k(Is,kt,null),e(kt,rh),e(kt,uo),e(uo,lh),e(uo,Aa),e(Aa,ih),e(uo,dh),e(uo,ul),e(ul,ch),e(uo,ph),e(kt,uh),k(Oo,kt,null),e(kt,hh),k(Ko,kt,null),_(o,Ii,b),_(o,ho,b),e(ho,en),e(en,hl),k(xs,hl,null),e(ho,mh),e(ho,ml),e(ml,fh),_(o,xi,b),_(o,mo,b),k(Ws,mo,null),e(mo,gh),e(mo,ht),k(Zs,ht,null),e(ht,_h),e(ht,fo),e(fo,bh),e(fo,Sa),e(Sa,yh),e(fo,Th),e(fo,fl),e(fl,vh),e(fo,wh),e(ht,kh),k(tn,ht,null),e(ht,Mh),e(ht,qs),e(qs,Fh),e(qs,gl),e(gl,$h),e(qs,Eh),e(ht,jh),k(on,ht,null),_(o,Wi,b),_(o,go,b),e(go,nn),e(nn,_l),k(Vs,_l,null),e(go,Ch),e(go,bl),e(bl,Jh),_(o,Zi,b),_(o,et,b),k(Bs,et,null),e(et,Uh),e(et,yl),e(yl,zh),e(et,Nh),e(et,Gs),e(Gs,Ih),e(Gs,Da),e(Da,xh),e(Gs,Wh),e(et,Zh),e(et,Rs),e(Rs,qh),e(Rs,Xs),e(Xs,Vh),e(Rs,Bh),e(et,Gh),k(sn,et,null),e(et,Rh),e(et,Mt),k(As,Mt,null),e(Mt,Xh),e(Mt,_o),e(_o,Ah),e(_o,Qa),e(Qa,Sh),e(_o,Dh),e(_o,Tl),e(Tl,Qh),e(_o,Yh),e(Mt,Lh),k(an,Mt,null),e(Mt,Ph),k(rn,Mt,null),_(o,qi,b),_(o,bo,b),e(bo,ln),e(ln,vl),k(Ss,vl,null),e(bo,Hh),e(bo,wl),e(wl,Oh),_(o,Vi,b),_(o,tt,b),k(Ds,tt,null),e(tt,Kh),e(tt,kl),e(kl,em),e(tt,tm),e(tt,Qs),e(Qs,om),e(Qs,Ya),e(Ya,nm),e(Qs,sm),e(tt,am),e(tt,Ys),e(Ys,rm),e(Ys,Ls),e(Ls,lm),e(Ys,im),e(tt,dm),k(dn,tt,null),e(tt,cm),e(tt,Ft),k(Ps,Ft,null),e(Ft,pm),e(Ft,yo),e(yo,um),e(yo,La),e(La,hm),e(yo,mm),e(yo,Ml),e(Ml,fm),e(yo,gm),e(Ft,_m),k(cn,Ft,null),e(Ft,bm),k(pn,Ft,null),_(o,Bi,b),_(o,To,b),e(To,un),e(un,Fl),k(Hs,Fl,null),e(To,ym),e(To,$l),e($l,Tm),_(o,Gi,b),_(o,ot,b),k(Os,ot,null),e(ot,vm),e(ot,El),e(El,wm),e(ot,km),e(ot,Ks),e(Ks,Mm),e(Ks,Pa),e(Pa,Fm),e(Ks,$m),e(ot,Em),e(ot,ea),e(ea,jm),e(ea,ta),e(ta,Cm),e(ea,Jm),e(ot,Um),k(hn,ot,null),e(ot,zm),e(ot,mt),k(oa,mt,null),e(mt,Nm),e(mt,vo),e(vo,Im),e(vo,Ha),e(Ha,xm),e(vo,Wm),e(vo,jl),e(jl,Zm),e(vo,qm),e(mt,Vm),k(mn,mt,null),e(mt,Bm),k(fn,mt,null),e(mt,Gm),k(gn,mt,null),_(o,Ri,b),_(o,wo,b),e(wo,_n),e(_n,Cl),k(na,Cl,null),e(wo,Rm),e(wo,Jl),e(Jl,Xm),_(o,Xi,b),_(o,nt,b),k(sa,nt,null),e(nt,Am),e(nt,Ul),e(Ul,Sm),e(nt,Dm),e(nt,aa),e(aa,Qm),e(aa,Oa),e(Oa,Ym),e(aa,Lm),e(nt,Pm),e(nt,ra),e(ra,Hm),e(ra,la),e(la,Om),e(ra,Km),e(nt,ef),k(bn,nt,null),e(nt,tf),e(nt,$t),k(ia,$t,null),e($t,of),e($t,ko),e(ko,nf),e(ko,Ka),e(Ka,sf),e(ko,af),e(ko,zl),e(zl,rf),e(ko,lf),e($t,df),k(yn,$t,null),e($t,cf),k(Tn,$t,null),_(o,Ai,b),_(o,Mo,b),e(Mo,vn),e(vn,Nl),k(da,Nl,null),e(Mo,pf),e(Mo,Il),e(Il,uf),_(o,Si,b),_(o,st,b),k(ca,st,null),e(st,hf),e(st,xl),e(xl,mf),e(st,ff),e(st,pa),e(pa,gf),e(pa,er),e(er,_f),e(pa,bf),e(st,yf),e(st,ua),e(ua,Tf),e(ua,ha),e(ha,vf),e(ua,wf),e(st,kf),k(wn,st,null),e(st,Mf),e(st,ft),k(ma,ft,null),e(ft,Ff),e(ft,Fo),e(Fo,$f),e(Fo,tr),e(tr,Ef),e(Fo,jf),e(Fo,Wl),e(Wl,Cf),e(Fo,Jf),e(ft,Uf),k(kn,ft,null),e(ft,zf),k(Mn,ft,null),e(ft,Nf),k(Fn,ft,null),_(o,Di,b),_(o,$o,b),e($o,$n),e($n,Zl),k(fa,Zl,null),e($o,If),e($o,ql),e(ql,xf),_(o,Qi,b),_(o,at,b),k(ga,at,null),e(at,Wf),e(at,Eo),e(Eo,Zf),e(Eo,Vl),e(Vl,qf),e(Eo,Vf),e(Eo,Bl),e(Bl,Bf),e(Eo,Gf),e(at,Rf),e(at,_a),e(_a,Xf),e(_a,or),e(or,Af),e(_a,Sf),e(at,Df),e(at,ba),e(ba,Qf),e(ba,ya),e(ya,Yf),e(ba,Lf),e(at,Pf),k(En,at,null),e(at,Hf),e(at,gt),k(Ta,gt,null),e(gt,Of),e(gt,jo),e(jo,Kf),e(jo,nr),e(nr,eg),e(jo,tg),e(jo,Gl),e(Gl,og),e(jo,ng),e(gt,sg),k(jn,gt,null),e(gt,ag),k(Cn,gt,null),e(gt,rg),k(Jn,gt,null),Yi=!0},p(o,[b]){const va={};b&2&&(va.$$scope={dirty:b,ctx:o}),No.$set(va);const Rl={};b&2&&(Rl.$$scope={dirty:b,ctx:o}),Wo.$set(Rl);const Xl={};b&2&&(Xl.$$scope={dirty:b,ctx:o}),Zo.$set(Xl);const Al={};b&2&&(Al.$$scope={dirty:b,ctx:o}),Vo.$set(Al);const wa={};b&2&&(wa.$$scope={dirty:b,ctx:o}),Bo.$set(wa);const Sl={};b&2&&(Sl.$$scope={dirty:b,ctx:o}),Ro.$set(Sl);const Dl={};b&2&&(Dl.$$scope={dirty:b,ctx:o}),Xo.$set(Dl);const ka={};b&2&&(ka.$$scope={dirty:b,ctx:o}),Ao.$set(ka);const Ql={};b&2&&(Ql.$$scope={dirty:b,ctx:o}),Do.$set(Ql);const Yl={};b&2&&(Yl.$$scope={dirty:b,ctx:o}),Qo.$set(Yl);const Ll={};b&2&&(Ll.$$scope={dirty:b,ctx:o}),Lo.$set(Ll);const Ma={};b&2&&(Ma.$$scope={dirty:b,ctx:o}),Po.$set(Ma);const Pl={};b&2&&(Pl.$$scope={dirty:b,ctx:o}),Oo.$set(Pl);const Hl={};b&2&&(Hl.$$scope={dirty:b,ctx:o}),Ko.$set(Hl);const Ol={};b&2&&(Ol.$$scope={dirty:b,ctx:o}),tn.$set(Ol);const Kl={};b&2&&(Kl.$$scope={dirty:b,ctx:o}),on.$set(Kl);const Co={};b&2&&(Co.$$scope={dirty:b,ctx:o}),sn.$set(Co);const ei={};b&2&&(ei.$$scope={dirty:b,ctx:o}),an.$set(ei);const ti={};b&2&&(ti.$$scope={dirty:b,ctx:o}),rn.$set(ti);const oi={};b&2&&(oi.$$scope={dirty:b,ctx:o}),dn.$set(oi);const ni={};b&2&&(ni.$$scope={dirty:b,ctx:o}),cn.$set(ni);const si={};b&2&&(si.$$scope={dirty:b,ctx:o}),pn.$set(si);const Fa={};b&2&&(Fa.$$scope={dirty:b,ctx:o}),hn.$set(Fa);const ai={};b&2&&(ai.$$scope={dirty:b,ctx:o}),mn.$set(ai);const ri={};b&2&&(ri.$$scope={dirty:b,ctx:o}),fn.$set(ri);const li={};b&2&&(li.$$scope={dirty:b,ctx:o}),gn.$set(li);const _t={};b&2&&(_t.$$scope={dirty:b,ctx:o}),bn.$set(_t);const ii={};b&2&&(ii.$$scope={dirty:b,ctx:o}),yn.$set(ii);const di={};b&2&&(di.$$scope={dirty:b,ctx:o}),Tn.$set(di);const ci={};b&2&&(ci.$$scope={dirty:b,ctx:o}),wn.$set(ci);const pi={};b&2&&(pi.$$scope={dirty:b,ctx:o}),kn.$set(pi);const ui={};b&2&&(ui.$$scope={dirty:b,ctx:o}),Mn.$set(ui);const hi={};b&2&&(hi.$$scope={dirty:b,ctx:o}),Fn.$set(hi);const mi={};b&2&&(mi.$$scope={dirty:b,ctx:o}),En.$set(mi);const fi={};b&2&&(fi.$$scope={dirty:b,ctx:o}),jn.$set(fi);const gi={};b&2&&(gi.$$scope={dirty:b,ctx:o}),Cn.$set(gi);const _i={};b&2&&(_i.$$scope={dirty:b,ctx:o}),Jn.$set(_i)},i(o){Yi||(M(i.$$.fragment,o),M(ie.$$.fragment,o),M(j.$$.fragment,o),M(Xn.$$.fragment,o),M(An.$$.fragment,o),M(Dn.$$.fragment,o),M(Qn.$$.fragment,o),M(Pn.$$.fragment,o),M(On.$$.fragment,o),M(Kn.$$.fragment,o),M(No.$$.fragment,o),M(es.$$.fragment,o),M(os.$$.fragment,o),M(ns.$$.fragment,o),M(ss.$$.fragment,o),M(Wo.$$.fragment,o),M(Zo.$$.fragment,o),M(as.$$.fragment,o),M(rs.$$.fragment,o),M(cs.$$.fragment,o),M(Vo.$$.fragment,o),M(Bo.$$.fragment,o),M(ps.$$.fragment,o),M(us.$$.fragment,o),M(gs.$$.fragment,o),M(Ro.$$.fragment,o),M(Xo.$$.fragment,o),M(Ao.$$.fragment,o),M(_s.$$.fragment,o),M(bs.$$.fragment,o),M(ws.$$.fragment,o),M(Do.$$.fragment,o),M(Qo.$$.fragment,o),M(ks.$$.fragment,o),M(Ms.$$.fragment,o),M(js.$$.fragment,o),M(Lo.$$.fragment,o),M(Po.$$.fragment,o),M(Cs.$$.fragment,o),M(Js.$$.fragment,o),M(Is.$$.fragment,o),M(Oo.$$.fragment,o),M(Ko.$$.fragment,o),M(xs.$$.fragment,o),M(Ws.$$.fragment,o),M(Zs.$$.fragment,o),M(tn.$$.fragment,o),M(on.$$.fragment,o),M(Vs.$$.fragment,o),M(Bs.$$.fragment,o),M(sn.$$.fragment,o),M(As.$$.fragment,o),M(an.$$.fragment,o),M(rn.$$.fragment,o),M(Ss.$$.fragment,o),M(Ds.$$.fragment,o),M(dn.$$.fragment,o),M(Ps.$$.fragment,o),M(cn.$$.fragment,o),M(pn.$$.fragment,o),M(Hs.$$.fragment,o),M(Os.$$.fragment,o),M(hn.$$.fragment,o),M(oa.$$.fragment,o),M(mn.$$.fragment,o),M(fn.$$.fragment,o),M(gn.$$.fragment,o),M(na.$$.fragment,o),M(sa.$$.fragment,o),M(bn.$$.fragment,o),M(ia.$$.fragment,o),M(yn.$$.fragment,o),M(Tn.$$.fragment,o),M(da.$$.fragment,o),M(ca.$$.fragment,o),M(wn.$$.fragment,o),M(ma.$$.fragment,o),M(kn.$$.fragment,o),M(Mn.$$.fragment,o),M(Fn.$$.fragment,o),M(fa.$$.fragment,o),M(ga.$$.fragment,o),M(En.$$.fragment,o),M(Ta.$$.fragment,o),M(jn.$$.fragment,o),M(Cn.$$.fragment,o),M(Jn.$$.fragment,o),Yi=!0)},o(o){F(i.$$.fragment,o),F(ie.$$.fragment,o),F(j.$$.fragment,o),F(Xn.$$.fragment,o),F(An.$$.fragment,o),F(Dn.$$.fragment,o),F(Qn.$$.fragment,o),F(Pn.$$.fragment,o),F(On.$$.fragment,o),F(Kn.$$.fragment,o),F(No.$$.fragment,o),F(es.$$.fragment,o),F(os.$$.fragment,o),F(ns.$$.fragment,o),F(ss.$$.fragment,o),F(Wo.$$.fragment,o),F(Zo.$$.fragment,o),F(as.$$.fragment,o),F(rs.$$.fragment,o),F(cs.$$.fragment,o),F(Vo.$$.fragment,o),F(Bo.$$.fragment,o),F(ps.$$.fragment,o),F(us.$$.fragment,o),F(gs.$$.fragment,o),F(Ro.$$.fragment,o),F(Xo.$$.fragment,o),F(Ao.$$.fragment,o),F(_s.$$.fragment,o),F(bs.$$.fragment,o),F(ws.$$.fragment,o),F(Do.$$.fragment,o),F(Qo.$$.fragment,o),F(ks.$$.fragment,o),F(Ms.$$.fragment,o),F(js.$$.fragment,o),F(Lo.$$.fragment,o),F(Po.$$.fragment,o),F(Cs.$$.fragment,o),F(Js.$$.fragment,o),F(Is.$$.fragment,o),F(Oo.$$.fragment,o),F(Ko.$$.fragment,o),F(xs.$$.fragment,o),F(Ws.$$.fragment,o),F(Zs.$$.fragment,o),F(tn.$$.fragment,o),F(on.$$.fragment,o),F(Vs.$$.fragment,o),F(Bs.$$.fragment,o),F(sn.$$.fragment,o),F(As.$$.fragment,o),F(an.$$.fragment,o),F(rn.$$.fragment,o),F(Ss.$$.fragment,o),F(Ds.$$.fragment,o),F(dn.$$.fragment,o),F(Ps.$$.fragment,o),F(cn.$$.fragment,o),F(pn.$$.fragment,o),F(Hs.$$.fragment,o),F(Os.$$.fragment,o),F(hn.$$.fragment,o),F(oa.$$.fragment,o),F(mn.$$.fragment,o),F(fn.$$.fragment,o),F(gn.$$.fragment,o),F(na.$$.fragment,o),F(sa.$$.fragment,o),F(bn.$$.fragment,o),F(ia.$$.fragment,o),F(yn.$$.fragment,o),F(Tn.$$.fragment,o),F(da.$$.fragment,o),F(ca.$$.fragment,o),F(wn.$$.fragment,o),F(ma.$$.fragment,o),F(kn.$$.fragment,o),F(Mn.$$.fragment,o),F(Fn.$$.fragment,o),F(fa.$$.fragment,o),F(ga.$$.fragment,o),F(En.$$.fragment,o),F(Ta.$$.fragment,o),F(jn.$$.fragment,o),F(Cn.$$.fragment,o),F(Jn.$$.fragment,o),Yi=!1},d(o){t(d),o&&t(T),o&&t(h),$(i),o&&t(ge),o&&t(V),o&&t(Y),o&&t(te),$(ie),o&&t(_e),o&&t(B),o&&t(x),o&&t(ue),o&&t(be),o&&t(he),o&&t(ye),o&&t(N),o&&t(q),o&&t(me),o&&t(Te),o&&t(K),o&&t(W),o&&t(ne),$(j),o&&t(Ve),o&&t(C),o&&t(bi),o&&t(Yt),$(Xn),o&&t(yi),o&&t(Nt),$(An),o&&t(Ti),o&&t(Pt),$(Dn),o&&t(vi),o&&t(Ye),$(Qn),$(Pn),$(On),$(Kn),$(No),$(es),o&&t(wi),o&&t(Ot),$(os),o&&t(ki),o&&t(Kt),$(ns),$(ss),$(Wo),$(Zo),o&&t(Mi),o&&t(to),$(as),o&&t(Fi),o&&t(lt),$(rs),$(cs),$(Vo),$(Bo),o&&t($i),o&&t(no),$(ps),o&&t(Ei),o&&t(it),$(us),$(gs),$(Ro),$(Xo),$(Ao),o&&t(ji),o&&t(ao),$(_s),o&&t(Ci),o&&t(dt),$(bs),$(ws),$(Do),$(Qo),o&&t(Ji),o&&t(lo),$(ks),o&&t(Ui),o&&t(ct),$(Ms),$(js),$(Lo),$(Po),o&&t(zi),o&&t(co),$(Cs),o&&t(Ni),o&&t(pt),$(Js),$(Is),$(Oo),$(Ko),o&&t(Ii),o&&t(ho),$(xs),o&&t(xi),o&&t(mo),$(Ws),$(Zs),$(tn),$(on),o&&t(Wi),o&&t(go),$(Vs),o&&t(Zi),o&&t(et),$(Bs),$(sn),$(As),$(an),$(rn),o&&t(qi),o&&t(bo),$(Ss),o&&t(Vi),o&&t(tt),$(Ds),$(dn),$(Ps),$(cn),$(pn),o&&t(Bi),o&&t(To),$(Hs),o&&t(Gi),o&&t(ot),$(Os),$(hn),$(oa),$(mn),$(fn),$(gn),o&&t(Ri),o&&t(wo),$(na),o&&t(Xi),o&&t(nt),$(sa),$(bn),$(ia),$(yn),$(Tn),o&&t(Ai),o&&t(Mo),$(da),o&&t(Si),o&&t(st),$(ca),$(wn),$(ma),$(kn),$(Mn),$(Fn),o&&t(Di),o&&t($o),$(fa),o&&t(Qi),o&&t(at),$(ga),$(En),$(Ta),$(jn),$(Cn),$(Jn)}}}const yy={local:"flaubert",sections:[{local:"overview",title:"Overview"},{local:"documentation-resources",title:"Documentation resources"},{local:"transformers.FlaubertConfig",title:"FlaubertConfig"},{local:"transformers.FlaubertTokenizer",title:"FlaubertTokenizer"},{local:"transformers.FlaubertModel",title:"FlaubertModel"},{local:"transformers.FlaubertWithLMHeadModel",title:"FlaubertWithLMHeadModel"},{local:"transformers.FlaubertForSequenceClassification",title:"FlaubertForSequenceClassification"},{local:"transformers.FlaubertForMultipleChoice",title:"FlaubertForMultipleChoice"},{local:"transformers.FlaubertForTokenClassification",title:"FlaubertForTokenClassification"},{local:"transformers.FlaubertForQuestionAnsweringSimple",title:"FlaubertForQuestionAnsweringSimple"},{local:"transformers.FlaubertForQuestionAnswering",title:"FlaubertForQuestionAnswering"},{local:"transformers.TFFlaubertModel",title:"TFFlaubertModel"},{local:"transformers.TFFlaubertWithLMHeadModel",title:"TFFlaubertWithLMHeadModel"},{local:"transformers.TFFlaubertForSequenceClassification",title:"TFFlaubertForSequenceClassification"},{local:"transformers.TFFlaubertForMultipleChoice",title:"TFFlaubertForMultipleChoice"},{local:"transformers.TFFlaubertForTokenClassification",title:"TFFlaubertForTokenClassification"},{local:"transformers.TFFlaubertForQuestionAnsweringSimple",title:"TFFlaubertForQuestionAnsweringSimple"}],title:"FlauBERT"};function Ty(U){return Ib(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Ey extends Jb{constructor(d){super();Ub(this,d,Ty,by,zb,{})}}export{Ey as default,yy as metadata};
