import{S as Jb,i as zb,s as Ub,e as a,k as p,w,t as n,M as Nb,c as r,d as t,m as u,a as i,x as k,h as s,b as f,N as Cb,G as e,g as _,y as v,q as M,o as F,B as $,v as Ib,L as Oe}from"../../chunks/vendor-hf-doc-builder.js";import{T as Ye}from"../../chunks/Tip-hf-doc-builder.js";import{D as ie}from"../../chunks/Docstring-hf-doc-builder.js";import{C as Ke}from"../../chunks/CodeBlock-hf-doc-builder.js";import{I as Le}from"../../chunks/IconCopyLink-hf-doc-builder.js";import{E as He}from"../../chunks/ExampleCodeBlock-hf-doc-builder.js";function xb(z){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(),w(m.$$.fragment)},l(l){d=r(l,"P",{});var c=i(d);T=s(c,"pair mask has the following format:"),c.forEach(t),h=u(l),k(m.$$.fragment,l)},m(l,c){_(l,d,c),e(d,T),_(l,h,c),v(m,l,c),y=!0},p:Oe,i(l){y||(M(m.$$.fragment,l),y=!0)},o(l){F(m.$$.fragment,l),y=!1},d(l){l&&t(d),l&&t(h),$(m,l)}}}function Wb(z){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(l){d=r(l,"P",{});var c=i(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=i(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(l,c){_(l,d,c),e(d,T),e(d,h),e(h,m),e(d,y)},d(l){l&&t(d)}}}function Zb(z){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(),w(m.$$.fragment)},l(l){d=r(l,"P",{});var c=i(d);T=s(c,"Example:"),c.forEach(t),h=u(l),k(m.$$.fragment,l)},m(l,c){_(l,d,c),e(d,T),_(l,h,c),v(m,l,c),y=!0},p:Oe,i(l){y||(M(m.$$.fragment,l),y=!0)},o(l){F(m.$$.fragment,l),y=!1},d(l){l&&t(d),l&&t(h),$(m,l)}}}function qb(z){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(l){d=r(l,"P",{});var c=i(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=i(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(l,c){_(l,d,c),e(d,T),e(d,h),e(h,m),e(d,y)},d(l){l&&t(d)}}}function Bb(z){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(),w(m.$$.fragment)},l(l){d=r(l,"P",{});var c=i(d);T=s(c,"Example:"),c.forEach(t),h=u(l),k(m.$$.fragment,l)},m(l,c){_(l,d,c),e(d,T),_(l,h,c),v(m,l,c),y=!0},p:Oe,i(l){y||(M(m.$$.fragment,l),y=!0)},o(l){F(m.$$.fragment,l),y=!1},d(l){l&&t(d),l&&t(h),$(m,l)}}}function Vb(z){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(l){d=r(l,"P",{});var c=i(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=i(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(l,c){_(l,d,c),e(d,T),e(d,h),e(h,m),e(d,y)},d(l){l&&t(d)}}}function Gb(z){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(),w(m.$$.fragment)},l(l){d=r(l,"P",{});var c=i(d);T=s(c,"Example of single-label classification:"),c.forEach(t),h=u(l),k(m.$$.fragment,l)},m(l,c){_(l,d,c),e(d,T),_(l,h,c),v(m,l,c),y=!0},p:Oe,i(l){y||(M(m.$$.fragment,l),y=!0)},o(l){F(m.$$.fragment,l),y=!1},d(l){l&&t(d),l&&t(h),$(m,l)}}}function Rb(z){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(),w(m.$$.fragment)},l(l){d=r(l,"P",{});var c=i(d);T=s(c,"Example of multi-label classification:"),c.forEach(t),h=u(l),k(m.$$.fragment,l)},m(l,c){_(l,d,c),e(d,T),_(l,h,c),v(m,l,c),y=!0},p:Oe,i(l){y||(M(m.$$.fragment,l),y=!0)},o(l){F(m.$$.fragment,l),y=!1},d(l){l&&t(d),l&&t(h),$(m,l)}}}function Xb(z){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(l){d=r(l,"P",{});var c=i(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=i(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(l,c){_(l,d,c),e(d,T),e(d,h),e(h,m),e(d,y)},d(l){l&&t(d)}}}function Ab(z){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(),w(m.$$.fragment)},l(l){d=r(l,"P",{});var c=i(d);T=s(c,"Example:"),c.forEach(t),h=u(l),k(m.$$.fragment,l)},m(l,c){_(l,d,c),e(d,T),_(l,h,c),v(m,l,c),y=!0},p:Oe,i(l){y||(M(m.$$.fragment,l),y=!0)},o(l){F(m.$$.fragment,l),y=!1},d(l){l&&t(d),l&&t(h),$(m,l)}}}function Sb(z){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(l){d=r(l,"P",{});var c=i(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=i(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(l,c){_(l,d,c),e(d,T),e(d,h),e(h,m),e(d,y)},d(l){l&&t(d)}}}function Db(z){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(),w(m.$$.fragment)},l(l){d=r(l,"P",{});var c=i(d);T=s(c,"Example:"),c.forEach(t),h=u(l),k(m.$$.fragment,l)},m(l,c){_(l,d,c),e(d,T),_(l,h,c),v(m,l,c),y=!0},p:Oe,i(l){y||(M(m.$$.fragment,l),y=!0)},o(l){F(m.$$.fragment,l),y=!1},d(l){l&&t(d),l&&t(h),$(m,l)}}}function Qb(z){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(l){d=r(l,"P",{});var c=i(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=i(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(l,c){_(l,d,c),e(d,T),e(d,h),e(h,m),e(d,y)},d(l){l&&t(d)}}}function Pb(z){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(),w(m.$$.fragment)},l(l){d=r(l,"P",{});var c=i(d);T=s(c,"Example:"),c.forEach(t),h=u(l),k(m.$$.fragment,l)},m(l,c){_(l,d,c),e(d,T),_(l,h,c),v(m,l,c),y=!0},p:Oe,i(l){y||(M(m.$$.fragment,l),y=!0)},o(l){F(m.$$.fragment,l),y=!1},d(l){l&&t(d),l&&t(h),$(m,l)}}}function Yb(z){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(l){d=r(l,"P",{});var c=i(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=i(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(l,c){_(l,d,c),e(d,T),e(d,h),e(h,m),e(d,y)},d(l){l&&t(d)}}}function Lb(z){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(),w(m.$$.fragment)},l(l){d=r(l,"P",{});var c=i(d);T=s(c,"Example:"),c.forEach(t),h=u(l),k(m.$$.fragment,l)},m(l,c){_(l,d,c),e(d,T),_(l,h,c),v(m,l,c),y=!0},p:Oe,i(l){y||(M(m.$$.fragment,l),y=!0)},o(l){F(m.$$.fragment,l),y=!1},d(l){l&&t(d),l&&t(h),$(m,l)}}}function Hb(z){let d,T,h,m,y,l,c,J,we,ge,B,ce,O,E,ke,X,pe,Ne,P,te,ae,S,le,ve,D,Me,_e,V,Fe,de,oe,U,x,ue,Y,be,he,Q,$e,ye,N,Ee,G,je,Ce,R,Je,ze,q,me,L,Te,K,I,Ue,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:"),l=p(),c=a("ul"),J=a("li"),we=n("having all inputs as keyword arguments (like PyTorch models), or"),ge=p(),B=a("li"),ce=n("having all inputs as a list, tuple or dict in the first positional argument."),O=p(),E=a("p"),ke=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 `),P=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"),le=n("fit()"),ve=n(" and "),D=a("code"),Me=n("predict()"),_e=n(`, such as when creating your own layers or models with
the Keras `),V=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(),U=a("ul"),x=a("li"),ue=n("a single Tensor with "),Y=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])"),ze=p(),q=a("li"),me=n(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),L=a("code"),Te=n('model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),K=p(),I=a("p"),Ue=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=i(d);T=s(j,"TensorFlow models and layers in "),h=r(j,"CODE",{});var Ve=i(h);m=s(Ve,"transformers"),Ve.forEach(t),y=s(j," accept two formats as input:"),j.forEach(t),l=u(g),c=r(g,"UL",{});var ee=i(c);J=r(ee,"LI",{});var Ge=i(J);we=s(Ge,"having all inputs as keyword arguments (like PyTorch models), or"),Ge.forEach(t),ge=u(ee),B=r(ee,"LI",{});var Be=i(B);ce=s(Be,"having all inputs as a list, tuple or dict in the first positional argument."),Be.forEach(t),ee.forEach(t),O=u(g),E=r(g,"P",{});var C=i(E);ke=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=i(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 `),P=r(C,"CODE",{});var Ie=i(P);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=i(S);le=s(Re,"fit()"),Re.forEach(t),ve=s(C," and "),D=r(C,"CODE",{});var Xe=i(D);Me=s(Xe,"predict()"),Xe.forEach(t),_e=s(C,`, such as when creating your own layers or models with
the Keras `),V=r(C,"CODE",{});var Ze=i(V);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),U=r(g,"UL",{});var Z=i(U);x=r(Z,"LI",{});var H=i(x);ue=s(H,"a single Tensor with "),Y=r(H,"CODE",{});var Ae=i(Y);be=s(Ae,"input_ids"),Ae.forEach(t),he=s(H," only and nothing else: "),Q=r(H,"CODE",{});var qe=i(Q);$e=s(qe,"model(input_ids)"),qe.forEach(t),H.forEach(t),ye=u(Z),N=r(Z,"LI",{});var A=i(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=i(G);je=s(Se,"model([input_ids, attention_mask])"),Se.forEach(t),Ce=s(A," or "),R=r(A,"CODE",{});var De=i(R);Je=s(De,"model([input_ids, attention_mask, token_type_ids])"),De.forEach(t),A.forEach(t),ze=u(Z),q=r(Z,"LI",{});var fe=i(q);me=s(fe,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),L=r(fe,"CODE",{});var xe=i(L);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=i(I);Ue=s(se,`Note that when creating models and layers with
`),W=r(se,"A",{href:!0,rel:!0});var Qe=i(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,l,j),_(g,c,j),e(c,J),e(J,we),e(c,ge),e(c,B),e(B,ce),_(g,O,j),_(g,E,j),e(E,ke),e(E,X),e(X,pe),e(E,Ne),e(E,P),e(P,te),e(E,ae),e(E,S),e(S,le),e(E,ve),e(E,D),e(D,Me),e(E,_e),e(E,V),e(V,Fe),e(E,de),_(g,oe,j),_(g,U,j),e(U,x),e(x,ue),e(x,Y),e(Y,be),e(x,he),e(x,Q),e(Q,$e),e(U,ye),e(U,N),e(N,Ee),e(N,G),e(G,je),e(N,Ce),e(N,R),e(R,Je),e(U,ze),e(U,q),e(q,me),e(q,L),e(L,Te),_(g,K,j),_(g,I,j),e(I,Ue),e(I,W),e(W,ne),e(I,re)},d(g){g&&t(d),g&&t(l),g&&t(c),g&&t(O),g&&t(E),g&&t(oe),g&&t(U),g&&t(K),g&&t(I)}}}function Ob(z){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(l){d=r(l,"P",{});var c=i(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=i(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(l,c){_(l,d,c),e(d,T),e(d,h),e(h,m),e(d,y)},d(l){l&&t(d)}}}function Kb(z){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(),w(m.$$.fragment)},l(l){d=r(l,"P",{});var c=i(d);T=s(c,"Example:"),c.forEach(t),h=u(l),k(m.$$.fragment,l)},m(l,c){_(l,d,c),e(d,T),_(l,h,c),v(m,l,c),y=!0},p:Oe,i(l){y||(M(m.$$.fragment,l),y=!0)},o(l){F(m.$$.fragment,l),y=!1},d(l){l&&t(d),l&&t(h),$(m,l)}}}function ey(z){let d,T,h,m,y,l,c,J,we,ge,B,ce,O,E,ke,X,pe,Ne,P,te,ae,S,le,ve,D,Me,_e,V,Fe,de,oe,U,x,ue,Y,be,he,Q,$e,ye,N,Ee,G,je,Ce,R,Je,ze,q,me,L,Te,K,I,Ue,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:"),l=p(),c=a("ul"),J=a("li"),we=n("having all inputs as keyword arguments (like PyTorch models), or"),ge=p(),B=a("li"),ce=n("having all inputs as a list, tuple or dict in the first positional argument."),O=p(),E=a("p"),ke=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 `),P=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"),le=n("fit()"),ve=n(" and "),D=a("code"),Me=n("predict()"),_e=n(`, such as when creating your own layers or models with
the Keras `),V=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(),U=a("ul"),x=a("li"),ue=n("a single Tensor with "),Y=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])"),ze=p(),q=a("li"),me=n(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),L=a("code"),Te=n('model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),K=p(),I=a("p"),Ue=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=i(d);T=s(j,"TensorFlow models and layers in "),h=r(j,"CODE",{});var Ve=i(h);m=s(Ve,"transformers"),Ve.forEach(t),y=s(j," accept two formats as input:"),j.forEach(t),l=u(g),c=r(g,"UL",{});var ee=i(c);J=r(ee,"LI",{});var Ge=i(J);we=s(Ge,"having all inputs as keyword arguments (like PyTorch models), or"),Ge.forEach(t),ge=u(ee),B=r(ee,"LI",{});var Be=i(B);ce=s(Be,"having all inputs as a list, tuple or dict in the first positional argument."),Be.forEach(t),ee.forEach(t),O=u(g),E=r(g,"P",{});var C=i(E);ke=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=i(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 `),P=r(C,"CODE",{});var Ie=i(P);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=i(S);le=s(Re,"fit()"),Re.forEach(t),ve=s(C," and "),D=r(C,"CODE",{});var Xe=i(D);Me=s(Xe,"predict()"),Xe.forEach(t),_e=s(C,`, such as when creating your own layers or models with
the Keras `),V=r(C,"CODE",{});var Ze=i(V);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),U=r(g,"UL",{});var Z=i(U);x=r(Z,"LI",{});var H=i(x);ue=s(H,"a single Tensor with "),Y=r(H,"CODE",{});var Ae=i(Y);be=s(Ae,"input_ids"),Ae.forEach(t),he=s(H," only and nothing else: "),Q=r(H,"CODE",{});var qe=i(Q);$e=s(qe,"model(input_ids)"),qe.forEach(t),H.forEach(t),ye=u(Z),N=r(Z,"LI",{});var A=i(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=i(G);je=s(Se,"model([input_ids, attention_mask])"),Se.forEach(t),Ce=s(A," or "),R=r(A,"CODE",{});var De=i(R);Je=s(De,"model([input_ids, attention_mask, token_type_ids])"),De.forEach(t),A.forEach(t),ze=u(Z),q=r(Z,"LI",{});var fe=i(q);me=s(fe,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),L=r(fe,"CODE",{});var xe=i(L);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=i(I);Ue=s(se,`Note that when creating models and layers with
`),W=r(se,"A",{href:!0,rel:!0});var Qe=i(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,l,j),_(g,c,j),e(c,J),e(J,we),e(c,ge),e(c,B),e(B,ce),_(g,O,j),_(g,E,j),e(E,ke),e(E,X),e(X,pe),e(E,Ne),e(E,P),e(P,te),e(E,ae),e(E,S),e(S,le),e(E,ve),e(E,D),e(D,Me),e(E,_e),e(E,V),e(V,Fe),e(E,de),_(g,oe,j),_(g,U,j),e(U,x),e(x,ue),e(x,Y),e(Y,be),e(x,he),e(x,Q),e(Q,$e),e(U,ye),e(U,N),e(N,Ee),e(N,G),e(G,je),e(N,Ce),e(N,R),e(R,Je),e(U,ze),e(U,q),e(q,me),e(q,L),e(L,Te),_(g,K,j),_(g,I,j),e(I,Ue),e(I,W),e(W,ne),e(I,re)},d(g){g&&t(d),g&&t(l),g&&t(c),g&&t(O),g&&t(E),g&&t(oe),g&&t(U),g&&t(K),g&&t(I)}}}function ty(z){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(l){d=r(l,"P",{});var c=i(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=i(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(l,c){_(l,d,c),e(d,T),e(d,h),e(h,m),e(d,y)},d(l){l&&t(d)}}}function oy(z){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(),w(m.$$.fragment)},l(l){d=r(l,"P",{});var c=i(d);T=s(c,"Example:"),c.forEach(t),h=u(l),k(m.$$.fragment,l)},m(l,c){_(l,d,c),e(d,T),_(l,h,c),v(m,l,c),y=!0},p:Oe,i(l){y||(M(m.$$.fragment,l),y=!0)},o(l){F(m.$$.fragment,l),y=!1},d(l){l&&t(d),l&&t(h),$(m,l)}}}function ny(z){let d,T,h,m,y,l,c,J,we,ge,B,ce,O,E,ke,X,pe,Ne,P,te,ae,S,le,ve,D,Me,_e,V,Fe,de,oe,U,x,ue,Y,be,he,Q,$e,ye,N,Ee,G,je,Ce,R,Je,ze,q,me,L,Te,K,I,Ue,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:"),l=p(),c=a("ul"),J=a("li"),we=n("having all inputs as keyword arguments (like PyTorch models), or"),ge=p(),B=a("li"),ce=n("having all inputs as a list, tuple or dict in the first positional argument."),O=p(),E=a("p"),ke=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 `),P=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"),le=n("fit()"),ve=n(" and "),D=a("code"),Me=n("predict()"),_e=n(`, such as when creating your own layers or models with
the Keras `),V=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(),U=a("ul"),x=a("li"),ue=n("a single Tensor with "),Y=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])"),ze=p(),q=a("li"),me=n(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),L=a("code"),Te=n('model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),K=p(),I=a("p"),Ue=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=i(d);T=s(j,"TensorFlow models and layers in "),h=r(j,"CODE",{});var Ve=i(h);m=s(Ve,"transformers"),Ve.forEach(t),y=s(j," accept two formats as input:"),j.forEach(t),l=u(g),c=r(g,"UL",{});var ee=i(c);J=r(ee,"LI",{});var Ge=i(J);we=s(Ge,"having all inputs as keyword arguments (like PyTorch models), or"),Ge.forEach(t),ge=u(ee),B=r(ee,"LI",{});var Be=i(B);ce=s(Be,"having all inputs as a list, tuple or dict in the first positional argument."),Be.forEach(t),ee.forEach(t),O=u(g),E=r(g,"P",{});var C=i(E);ke=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=i(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 `),P=r(C,"CODE",{});var Ie=i(P);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=i(S);le=s(Re,"fit()"),Re.forEach(t),ve=s(C," and "),D=r(C,"CODE",{});var Xe=i(D);Me=s(Xe,"predict()"),Xe.forEach(t),_e=s(C,`, such as when creating your own layers or models with
the Keras `),V=r(C,"CODE",{});var Ze=i(V);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),U=r(g,"UL",{});var Z=i(U);x=r(Z,"LI",{});var H=i(x);ue=s(H,"a single Tensor with "),Y=r(H,"CODE",{});var Ae=i(Y);be=s(Ae,"input_ids"),Ae.forEach(t),he=s(H," only and nothing else: "),Q=r(H,"CODE",{});var qe=i(Q);$e=s(qe,"model(input_ids)"),qe.forEach(t),H.forEach(t),ye=u(Z),N=r(Z,"LI",{});var A=i(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=i(G);je=s(Se,"model([input_ids, attention_mask])"),Se.forEach(t),Ce=s(A," or "),R=r(A,"CODE",{});var De=i(R);Je=s(De,"model([input_ids, attention_mask, token_type_ids])"),De.forEach(t),A.forEach(t),ze=u(Z),q=r(Z,"LI",{});var fe=i(q);me=s(fe,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),L=r(fe,"CODE",{});var xe=i(L);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=i(I);Ue=s(se,`Note that when creating models and layers with
`),W=r(se,"A",{href:!0,rel:!0});var Qe=i(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,l,j),_(g,c,j),e(c,J),e(J,we),e(c,ge),e(c,B),e(B,ce),_(g,O,j),_(g,E,j),e(E,ke),e(E,X),e(X,pe),e(E,Ne),e(E,P),e(P,te),e(E,ae),e(E,S),e(S,le),e(E,ve),e(E,D),e(D,Me),e(E,_e),e(E,V),e(V,Fe),e(E,de),_(g,oe,j),_(g,U,j),e(U,x),e(x,ue),e(x,Y),e(Y,be),e(x,he),e(x,Q),e(Q,$e),e(U,ye),e(U,N),e(N,Ee),e(N,G),e(G,je),e(N,Ce),e(N,R),e(R,Je),e(U,ze),e(U,q),e(q,me),e(q,L),e(L,Te),_(g,K,j),_(g,I,j),e(I,Ue),e(I,W),e(W,ne),e(I,re)},d(g){g&&t(d),g&&t(l),g&&t(c),g&&t(O),g&&t(E),g&&t(oe),g&&t(U),g&&t(K),g&&t(I)}}}function sy(z){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(l){d=r(l,"P",{});var c=i(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=i(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(l,c){_(l,d,c),e(d,T),e(d,h),e(h,m),e(d,y)},d(l){l&&t(d)}}}function ay(z){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(),w(m.$$.fragment)},l(l){d=r(l,"P",{});var c=i(d);T=s(c,"Example:"),c.forEach(t),h=u(l),k(m.$$.fragment,l)},m(l,c){_(l,d,c),e(d,T),_(l,h,c),v(m,l,c),y=!0},p:Oe,i(l){y||(M(m.$$.fragment,l),y=!0)},o(l){F(m.$$.fragment,l),y=!1},d(l){l&&t(d),l&&t(h),$(m,l)}}}function ry(z){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(){w(d.$$.fragment)},l(h){k(d.$$.fragment,h)},m(h,m){v(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 iy(z){let d,T,h,m,y,l,c,J,we,ge,B,ce,O,E,ke,X,pe,Ne,P,te,ae,S,le,ve,D,Me,_e,V,Fe,de,oe,U,x,ue,Y,be,he,Q,$e,ye,N,Ee,G,je,Ce,R,Je,ze,q,me,L,Te,K,I,Ue,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:"),l=p(),c=a("ul"),J=a("li"),we=n("having all inputs as keyword arguments (like PyTorch models), or"),ge=p(),B=a("li"),ce=n("having all inputs as a list, tuple or dict in the first positional argument."),O=p(),E=a("p"),ke=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 `),P=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"),le=n("fit()"),ve=n(" and "),D=a("code"),Me=n("predict()"),_e=n(`, such as when creating your own layers or models with
the Keras `),V=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(),U=a("ul"),x=a("li"),ue=n("a single Tensor with "),Y=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])"),ze=p(),q=a("li"),me=n(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),L=a("code"),Te=n('model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),K=p(),I=a("p"),Ue=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=i(d);T=s(j,"TensorFlow models and layers in "),h=r(j,"CODE",{});var Ve=i(h);m=s(Ve,"transformers"),Ve.forEach(t),y=s(j," accept two formats as input:"),j.forEach(t),l=u(g),c=r(g,"UL",{});var ee=i(c);J=r(ee,"LI",{});var Ge=i(J);we=s(Ge,"having all inputs as keyword arguments (like PyTorch models), or"),Ge.forEach(t),ge=u(ee),B=r(ee,"LI",{});var Be=i(B);ce=s(Be,"having all inputs as a list, tuple or dict in the first positional argument."),Be.forEach(t),ee.forEach(t),O=u(g),E=r(g,"P",{});var C=i(E);ke=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=i(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 `),P=r(C,"CODE",{});var Ie=i(P);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=i(S);le=s(Re,"fit()"),Re.forEach(t),ve=s(C," and "),D=r(C,"CODE",{});var Xe=i(D);Me=s(Xe,"predict()"),Xe.forEach(t),_e=s(C,`, such as when creating your own layers or models with
the Keras `),V=r(C,"CODE",{});var Ze=i(V);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),U=r(g,"UL",{});var Z=i(U);x=r(Z,"LI",{});var H=i(x);ue=s(H,"a single Tensor with "),Y=r(H,"CODE",{});var Ae=i(Y);be=s(Ae,"input_ids"),Ae.forEach(t),he=s(H," only and nothing else: "),Q=r(H,"CODE",{});var qe=i(Q);$e=s(qe,"model(input_ids)"),qe.forEach(t),H.forEach(t),ye=u(Z),N=r(Z,"LI",{});var A=i(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=i(G);je=s(Se,"model([input_ids, attention_mask])"),Se.forEach(t),Ce=s(A," or "),R=r(A,"CODE",{});var De=i(R);Je=s(De,"model([input_ids, attention_mask, token_type_ids])"),De.forEach(t),A.forEach(t),ze=u(Z),q=r(Z,"LI",{});var fe=i(q);me=s(fe,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),L=r(fe,"CODE",{});var xe=i(L);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=i(I);Ue=s(se,`Note that when creating models and layers with
`),W=r(se,"A",{href:!0,rel:!0});var Qe=i(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,l,j),_(g,c,j),e(c,J),e(J,we),e(c,ge),e(c,B),e(B,ce),_(g,O,j),_(g,E,j),e(E,ke),e(E,X),e(X,pe),e(E,Ne),e(E,P),e(P,te),e(E,ae),e(E,S),e(S,le),e(E,ve),e(E,D),e(D,Me),e(E,_e),e(E,V),e(V,Fe),e(E,de),_(g,oe,j),_(g,U,j),e(U,x),e(x,ue),e(x,Y),e(Y,be),e(x,he),e(x,Q),e(Q,$e),e(U,ye),e(U,N),e(N,Ee),e(N,G),e(G,je),e(N,Ce),e(N,R),e(R,Je),e(U,ze),e(U,q),e(q,me),e(q,L),e(L,Te),_(g,K,j),_(g,I,j),e(I,Ue),e(I,W),e(W,ne),e(I,re)},d(g){g&&t(d),g&&t(l),g&&t(c),g&&t(O),g&&t(E),g&&t(oe),g&&t(U),g&&t(K),g&&t(I)}}}function ly(z){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(l){d=r(l,"P",{});var c=i(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=i(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(l,c){_(l,d,c),e(d,T),e(d,h),e(h,m),e(d,y)},d(l){l&&t(d)}}}function dy(z){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(),w(m.$$.fragment)},l(l){d=r(l,"P",{});var c=i(d);T=s(c,"Example:"),c.forEach(t),h=u(l),k(m.$$.fragment,l)},m(l,c){_(l,d,c),e(d,T),_(l,h,c),v(m,l,c),y=!0},p:Oe,i(l){y||(M(m.$$.fragment,l),y=!0)},o(l){F(m.$$.fragment,l),y=!1},d(l){l&&t(d),l&&t(h),$(m,l)}}}function cy(z){let d,T,h,m,y,l,c,J,we,ge,B,ce,O,E,ke,X,pe,Ne,P,te,ae,S,le,ve,D,Me,_e,V,Fe,de,oe,U,x,ue,Y,be,he,Q,$e,ye,N,Ee,G,je,Ce,R,Je,ze,q,me,L,Te,K,I,Ue,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:"),l=p(),c=a("ul"),J=a("li"),we=n("having all inputs as keyword arguments (like PyTorch models), or"),ge=p(),B=a("li"),ce=n("having all inputs as a list, tuple or dict in the first positional argument."),O=p(),E=a("p"),ke=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 `),P=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"),le=n("fit()"),ve=n(" and "),D=a("code"),Me=n("predict()"),_e=n(`, such as when creating your own layers or models with
the Keras `),V=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(),U=a("ul"),x=a("li"),ue=n("a single Tensor with "),Y=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])"),ze=p(),q=a("li"),me=n(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),L=a("code"),Te=n('model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),K=p(),I=a("p"),Ue=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=i(d);T=s(j,"TensorFlow models and layers in "),h=r(j,"CODE",{});var Ve=i(h);m=s(Ve,"transformers"),Ve.forEach(t),y=s(j," accept two formats as input:"),j.forEach(t),l=u(g),c=r(g,"UL",{});var ee=i(c);J=r(ee,"LI",{});var Ge=i(J);we=s(Ge,"having all inputs as keyword arguments (like PyTorch models), or"),Ge.forEach(t),ge=u(ee),B=r(ee,"LI",{});var Be=i(B);ce=s(Be,"having all inputs as a list, tuple or dict in the first positional argument."),Be.forEach(t),ee.forEach(t),O=u(g),E=r(g,"P",{});var C=i(E);ke=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=i(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 `),P=r(C,"CODE",{});var Ie=i(P);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=i(S);le=s(Re,"fit()"),Re.forEach(t),ve=s(C," and "),D=r(C,"CODE",{});var Xe=i(D);Me=s(Xe,"predict()"),Xe.forEach(t),_e=s(C,`, such as when creating your own layers or models with
the Keras `),V=r(C,"CODE",{});var Ze=i(V);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),U=r(g,"UL",{});var Z=i(U);x=r(Z,"LI",{});var H=i(x);ue=s(H,"a single Tensor with "),Y=r(H,"CODE",{});var Ae=i(Y);be=s(Ae,"input_ids"),Ae.forEach(t),he=s(H," only and nothing else: "),Q=r(H,"CODE",{});var qe=i(Q);$e=s(qe,"model(input_ids)"),qe.forEach(t),H.forEach(t),ye=u(Z),N=r(Z,"LI",{});var A=i(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=i(G);je=s(Se,"model([input_ids, attention_mask])"),Se.forEach(t),Ce=s(A," or "),R=r(A,"CODE",{});var De=i(R);Je=s(De,"model([input_ids, attention_mask, token_type_ids])"),De.forEach(t),A.forEach(t),ze=u(Z),q=r(Z,"LI",{});var fe=i(q);me=s(fe,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),L=r(fe,"CODE",{});var xe=i(L);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=i(I);Ue=s(se,`Note that when creating models and layers with
`),W=r(se,"A",{href:!0,rel:!0});var Qe=i(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,l,j),_(g,c,j),e(c,J),e(J,we),e(c,ge),e(c,B),e(B,ce),_(g,O,j),_(g,E,j),e(E,ke),e(E,X),e(X,pe),e(E,Ne),e(E,P),e(P,te),e(E,ae),e(E,S),e(S,le),e(E,ve),e(E,D),e(D,Me),e(E,_e),e(E,V),e(V,Fe),e(E,de),_(g,oe,j),_(g,U,j),e(U,x),e(x,ue),e(x,Y),e(Y,be),e(x,he),e(x,Q),e(Q,$e),e(U,ye),e(U,N),e(N,Ee),e(N,G),e(G,je),e(N,Ce),e(N,R),e(R,Je),e(U,ze),e(U,q),e(q,me),e(q,L),e(L,Te),_(g,K,j),_(g,I,j),e(I,Ue),e(I,W),e(W,ne),e(I,re)},d(g){g&&t(d),g&&t(l),g&&t(c),g&&t(O),g&&t(E),g&&t(oe),g&&t(U),g&&t(K),g&&t(I)}}}function py(z){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(l){d=r(l,"P",{});var c=i(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=i(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(l,c){_(l,d,c),e(d,T),e(d,h),e(h,m),e(d,y)},d(l){l&&t(d)}}}function uy(z){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(),w(m.$$.fragment)},l(l){d=r(l,"P",{});var c=i(d);T=s(c,"Example:"),c.forEach(t),h=u(l),k(m.$$.fragment,l)},m(l,c){_(l,d,c),e(d,T),_(l,h,c),v(m,l,c),y=!0},p:Oe,i(l){y||(M(m.$$.fragment,l),y=!0)},o(l){F(m.$$.fragment,l),y=!1},d(l){l&&t(d),l&&t(h),$(m,l)}}}function hy(z){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(){w(d.$$.fragment)},l(h){k(d.$$.fragment,h)},m(h,m){v(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(z){let d,T,h,m,y,l,c,J,we,ge,B,ce,O,E,ke,X,pe,Ne,P,te,ae,S,le,ve,D,Me,_e,V,Fe,de,oe,U,x,ue,Y,be,he,Q,$e,ye,N,Ee,G,je,Ce,R,Je,ze,q,me,L,Te,K,I,Ue,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:"),l=p(),c=a("ul"),J=a("li"),we=n("having all inputs as keyword arguments (like PyTorch models), or"),ge=p(),B=a("li"),ce=n("having all inputs as a list, tuple or dict in the first positional argument."),O=p(),E=a("p"),ke=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 `),P=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"),le=n("fit()"),ve=n(" and "),D=a("code"),Me=n("predict()"),_e=n(`, such as when creating your own layers or models with
the Keras `),V=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(),U=a("ul"),x=a("li"),ue=n("a single Tensor with "),Y=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])"),ze=p(),q=a("li"),me=n(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),L=a("code"),Te=n('model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),K=p(),I=a("p"),Ue=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=i(d);T=s(j,"TensorFlow models and layers in "),h=r(j,"CODE",{});var Ve=i(h);m=s(Ve,"transformers"),Ve.forEach(t),y=s(j," accept two formats as input:"),j.forEach(t),l=u(g),c=r(g,"UL",{});var ee=i(c);J=r(ee,"LI",{});var Ge=i(J);we=s(Ge,"having all inputs as keyword arguments (like PyTorch models), or"),Ge.forEach(t),ge=u(ee),B=r(ee,"LI",{});var Be=i(B);ce=s(Be,"having all inputs as a list, tuple or dict in the first positional argument."),Be.forEach(t),ee.forEach(t),O=u(g),E=r(g,"P",{});var C=i(E);ke=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=i(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 `),P=r(C,"CODE",{});var Ie=i(P);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=i(S);le=s(Re,"fit()"),Re.forEach(t),ve=s(C," and "),D=r(C,"CODE",{});var Xe=i(D);Me=s(Xe,"predict()"),Xe.forEach(t),_e=s(C,`, such as when creating your own layers or models with
the Keras `),V=r(C,"CODE",{});var Ze=i(V);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),U=r(g,"UL",{});var Z=i(U);x=r(Z,"LI",{});var H=i(x);ue=s(H,"a single Tensor with "),Y=r(H,"CODE",{});var Ae=i(Y);be=s(Ae,"input_ids"),Ae.forEach(t),he=s(H," only and nothing else: "),Q=r(H,"CODE",{});var qe=i(Q);$e=s(qe,"model(input_ids)"),qe.forEach(t),H.forEach(t),ye=u(Z),N=r(Z,"LI",{});var A=i(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=i(G);je=s(Se,"model([input_ids, attention_mask])"),Se.forEach(t),Ce=s(A," or "),R=r(A,"CODE",{});var De=i(R);Je=s(De,"model([input_ids, attention_mask, token_type_ids])"),De.forEach(t),A.forEach(t),ze=u(Z),q=r(Z,"LI",{});var fe=i(q);me=s(fe,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),L=r(fe,"CODE",{});var xe=i(L);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=i(I);Ue=s(se,`Note that when creating models and layers with
`),W=r(se,"A",{href:!0,rel:!0});var Qe=i(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,l,j),_(g,c,j),e(c,J),e(J,we),e(c,ge),e(c,B),e(B,ce),_(g,O,j),_(g,E,j),e(E,ke),e(E,X),e(X,pe),e(E,Ne),e(E,P),e(P,te),e(E,ae),e(E,S),e(S,le),e(E,ve),e(E,D),e(D,Me),e(E,_e),e(E,V),e(V,Fe),e(E,de),_(g,oe,j),_(g,U,j),e(U,x),e(x,ue),e(x,Y),e(Y,be),e(x,he),e(x,Q),e(Q,$e),e(U,ye),e(U,N),e(N,Ee),e(N,G),e(G,je),e(N,Ce),e(N,R),e(R,Je),e(U,ze),e(U,q),e(q,me),e(q,L),e(L,Te),_(g,K,j),_(g,I,j),e(I,Ue),e(I,W),e(W,ne),e(I,re)},d(g){g&&t(d),g&&t(l),g&&t(c),g&&t(O),g&&t(E),g&&t(oe),g&&t(U),g&&t(K),g&&t(I)}}}function fy(z){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(l){d=r(l,"P",{});var c=i(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=i(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(l,c){_(l,d,c),e(d,T),e(d,h),e(h,m),e(d,y)},d(l){l&&t(d)}}}function gy(z){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(),w(m.$$.fragment)},l(l){d=r(l,"P",{});var c=i(d);T=s(c,"Example:"),c.forEach(t),h=u(l),k(m.$$.fragment,l)},m(l,c){_(l,d,c),e(d,T),_(l,h,c),v(m,l,c),y=!0},p:Oe,i(l){y||(M(m.$$.fragment,l),y=!0)},o(l){F(m.$$.fragment,l),y=!1},d(l){l&&t(d),l&&t(h),$(m,l)}}}function _y(z){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(){w(d.$$.fragment)},l(h){k(d.$$.fragment,h)},m(h,m){v(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(z){let d,T,h,m,y,l,c,J,we,ge,B,ce,O,E,ke,X,pe,Ne,P,te,ae,S,le,ve,D,Me,_e,V,Fe,de,oe,U,x,ue,Y,be,he,Q,$e,ye,N,Ee,G,je,Ce,R,Je,ze,q,me,L,Te,K,I,Ue,W,ne,re,g,j,Ve,ee,Ge,Be,C,We,Ie,Re,Xe,Ze,Z,H,Ae,qe,A,Se,De,fe,xe,se,Qe,vr,$a,Gd,bl,Pt,Jo,Mr,Xn,Rd,Fr,Xd,yl,Nt,An,Ad,It,Sd,Ea,Dd,Qd,ja,Pd,Yd,Sn,Ld,Hd,Od,Yt,Kd,Ca,ec,tc,Ja,oc,nc,Tl,Lt,zo,$r,Dn,sc,Er,ac,wl,Pe,Qn,rc,jr,ic,lc,xt,Cr,dc,cc,Jr,pc,uc,Wt,hc,zr,mc,fc,Ur,gc,_c,Nr,bc,yc,Tc,Pn,wc,Ir,kc,vc,Mc,Yn,Fc,za,$c,Ec,jc,Zt,Ln,Cc,xr,Jc,zc,Hn,Ua,Uc,Wr,Nc,Ic,Na,xc,Zr,Wc,Zc,Uo,On,qc,qr,Bc,Vc,bt,Kn,Gc,Br,Rc,Xc,No,Ac,Ht,Sc,Vr,Dc,Qc,Gr,Pc,Yc,Lc,Io,es,Hc,ts,Oc,Rr,Kc,ep,kl,Ot,xo,Xr,os,tp,Ar,op,vl,Kt,ns,np,yt,ss,sp,eo,ap,Ia,rp,ip,Sr,lp,dp,cp,Wo,pp,Zo,Ml,to,qo,Dr,as,up,Qr,hp,Fl,it,rs,mp,Pr,fp,gp,is,_p,xa,bp,yp,Tp,ls,wp,ds,kp,vp,Mp,Tt,cs,Fp,oo,$p,Wa,Ep,jp,Yr,Cp,Jp,zp,Bo,Up,Vo,$l,no,Go,Lr,ps,Np,Hr,Ip,El,lt,us,xp,Or,Wp,Zp,hs,qp,Za,Bp,Vp,Gp,ms,Rp,fs,Xp,Ap,Sp,ut,gs,Dp,so,Qp,qa,Pp,Yp,Kr,Lp,Hp,Op,Ro,Kp,Xo,eu,Ao,jl,ao,So,ei,_s,tu,ti,ou,Cl,dt,bs,nu,oi,su,au,ys,ru,Ba,iu,lu,du,Ts,cu,ws,pu,uu,hu,wt,ks,mu,ro,fu,Va,gu,_u,ni,bu,yu,Tu,Do,wu,Qo,Jl,io,Po,si,vs,ku,ai,vu,zl,ct,Ms,Mu,ri,Fu,$u,Fs,Eu,Ga,ju,Cu,Ju,$s,zu,Es,Uu,Nu,Iu,kt,js,xu,lo,Wu,Ra,Zu,qu,ii,Bu,Vu,Gu,Yo,Ru,Lo,Ul,co,Ho,li,Cs,Xu,di,Au,Nl,pt,Js,Su,po,Du,ci,Qu,Pu,pi,Yu,Lu,Hu,zs,Ou,Xa,Ku,eh,th,Us,oh,Ns,nh,sh,ah,vt,Is,rh,uo,ih,Aa,lh,dh,ui,ch,ph,uh,Oo,hh,Ko,Il,ho,en,hi,xs,mh,mi,fh,xl,mo,Ws,gh,ht,Zs,_h,fo,bh,Sa,yh,Th,fi,wh,kh,vh,tn,Mh,qs,Fh,gi,$h,Eh,jh,on,Wl,go,nn,_i,Bs,Ch,bi,Jh,Zl,et,Vs,zh,yi,Uh,Nh,Gs,Ih,Da,xh,Wh,Zh,Rs,qh,Xs,Bh,Vh,Gh,sn,Rh,Mt,As,Xh,_o,Ah,Qa,Sh,Dh,Ti,Qh,Ph,Yh,an,Lh,rn,ql,bo,ln,wi,Ss,Hh,ki,Oh,Bl,tt,Ds,Kh,vi,em,tm,Qs,om,Pa,nm,sm,am,Ps,rm,Ys,im,lm,dm,dn,cm,Ft,Ls,pm,yo,um,Ya,hm,mm,Mi,fm,gm,_m,cn,bm,pn,Vl,To,un,Fi,Hs,ym,$i,Tm,Gl,ot,Os,wm,Ei,km,vm,Ks,Mm,La,Fm,$m,Em,ea,jm,ta,Cm,Jm,zm,hn,Um,mt,oa,Nm,wo,Im,Ha,xm,Wm,ji,Zm,qm,Bm,mn,Vm,fn,Gm,gn,Rl,ko,_n,Ci,na,Rm,Ji,Xm,Xl,nt,sa,Am,zi,Sm,Dm,aa,Qm,Oa,Pm,Ym,Lm,ra,Hm,ia,Om,Km,ef,bn,tf,$t,la,of,vo,nf,Ka,sf,af,Ui,rf,lf,df,yn,cf,Tn,Al,Mo,wn,Ni,da,pf,Ii,uf,Sl,st,ca,hf,xi,mf,ff,pa,gf,er,_f,bf,yf,ua,Tf,ha,wf,kf,vf,kn,Mf,ft,ma,Ff,Fo,$f,tr,Ef,jf,Wi,Cf,Jf,zf,vn,Uf,Mn,Nf,Fn,Dl,$o,$n,Zi,fa,If,qi,xf,Ql,at,ga,Wf,Eo,Zf,Bi,qf,Bf,Vi,Vf,Gf,Rf,_a,Xf,or,Af,Sf,Df,ba,Qf,ya,Pf,Yf,Lf,En,Hf,gt,Ta,Of,jo,Kf,nr,eg,tg,Gi,og,ng,sg,jn,ag,Cn,rg,Jn,Pl;return l=new Le({}),le=new Le({}),j=new Le({}),Xn=new Le({}),An=new ie({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/main/en/model_doc/flaubert#transformers.FlaubertModel">FlaubertModel</a> or <a href="/docs/transformers/main/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/main/src/transformers/models/flaubert/configuration_flaubert.py#L34"}}),Dn=new Le({}),Qn=new ie({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/main/src/transformers/models/flaubert/tokenization_flaubert.py#L165"}}),Ln=new ie({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/main/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 ie({props:{name:"convert_tokens_to_string",anchor:"transformers.FlaubertTokenizer.convert_tokens_to_string",parameters:[{name:"tokens",val:""}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/flaubert/tokenization_flaubert.py#L470"}}),Kn=new ie({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/main/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:z}}}),es=new ie({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/main/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 Le({}),ns=new ie({props:{name:"class transformers.FlaubertModel",anchor:"transformers.FlaubertModel",parameters:[{name:"config",val:""}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/flaubert/modeling_flaubert.py#L380"}}),ss=new ie({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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.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/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/flaubert/modeling_flaubert.py#L473",returnDescription:`
<p>A <a
  href="/docs/transformers/main/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/main/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/main/en/main_classes/output#transformers.modeling_outputs.BaseModelOutput"
>transformers.modeling_outputs.BaseModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Wo=new Ye({props:{$$slots:{default:[Wb]},$$scope:{ctx:z}}}),Zo=new He({props:{anchor:"transformers.FlaubertModel.forward.example",$$slots:{default:[Zb]},$$scope:{ctx:z}}}),as=new Le({}),rs=new ie({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/main/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/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/flaubert/modeling_flaubert.py#L653"}}),cs=new ie({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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.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/main/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/main/src/transformers/models/flaubert/modeling_flaubert.py#L683",returnDescription:`
<p>A <a
  href="/docs/transformers/main/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/main/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/main/en/main_classes/output#transformers.modeling_outputs.MaskedLMOutput"
>transformers.modeling_outputs.MaskedLMOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Bo=new Ye({props:{$$slots:{default:[qb]},$$scope:{ctx:z}}}),Vo=new He({props:{anchor:"transformers.FlaubertWithLMHeadModel.forward.example",$$slots:{default:[Bb]},$$scope:{ctx:z}}}),ps=new Le({}),us=new ie({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/main/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/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/flaubert/modeling_flaubert.py#L751"}}),gs=new ie({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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.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/main/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/main/src/transformers/models/flaubert/modeling_flaubert.py#L763",returnDescription:`
<p>A <a
  href="/docs/transformers/main/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/main/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/main/en/main_classes/output#transformers.modeling_outputs.SequenceClassifierOutput"
>transformers.modeling_outputs.SequenceClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Ro=new Ye({props:{$$slots:{default:[Vb]},$$scope:{ctx:z}}}),Xo=new He({props:{anchor:"transformers.FlaubertForSequenceClassification.forward.example",$$slots:{default:[Gb]},$$scope:{ctx:z}}}),Ao=new He({props:{anchor:"transformers.FlaubertForSequenceClassification.forward.example-2",$$slots:{default:[Rb]},$$scope:{ctx:z}}}),_s=new Le({}),bs=new ie({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/main/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/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/flaubert/modeling_flaubert.py#L1210"}}),ks=new ie({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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.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/main/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/main/src/transformers/models/flaubert/modeling_flaubert.py#L1221",returnDescription:`
<p>A <a
  href="/docs/transformers/main/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/main/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/main/en/main_classes/output#transformers.modeling_outputs.MultipleChoiceModelOutput"
>transformers.modeling_outputs.MultipleChoiceModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Do=new Ye({props:{$$slots:{default:[Xb]},$$scope:{ctx:z}}}),Qo=new He({props:{anchor:"transformers.FlaubertForMultipleChoice.forward.example",$$slots:{default:[Ab]},$$scope:{ctx:z}}}),vs=new Le({}),Ms=new ie({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/main/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/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/flaubert/modeling_flaubert.py#L854"}}),js=new ie({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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.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/main/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/main/src/transformers/models/flaubert/modeling_flaubert.py#L866",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.TokenClassifierOutput"
>transformers.modeling_outputs.TokenClassifierOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/main/en/model_doc/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/main/en/main_classes/output#transformers.modeling_outputs.TokenClassifierOutput"
>transformers.modeling_outputs.TokenClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Yo=new Ye({props:{$$slots:{default:[Sb]},$$scope:{ctx:z}}}),Lo=new He({props:{anchor:"transformers.FlaubertForTokenClassification.forward.example",$$slots:{default:[Db]},$$scope:{ctx:z}}}),Cs=new Le({}),Js=new ie({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/main/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/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/flaubert/modeling_flaubert.py#L939"}}),Is=new ie({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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.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/main/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/main/src/transformers/models/flaubert/modeling_flaubert.py#L949",returnDescription:`
<p>A <a
  href="/docs/transformers/main/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/main/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/main/en/main_classes/output#transformers.modeling_outputs.QuestionAnsweringModelOutput"
>transformers.modeling_outputs.QuestionAnsweringModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Oo=new Ye({props:{$$slots:{default:[Qb]},$$scope:{ctx:z}}}),Ko=new He({props:{anchor:"transformers.FlaubertForQuestionAnsweringSimple.forward.example",$$slots:{default:[Pb]},$$scope:{ctx:z}}}),xs=new Le({}),Ws=new ie({props:{name:"class transformers.FlaubertForQuestionAnswering",anchor:"transformers.FlaubertForQuestionAnswering",parameters:[{name:"config",val:""}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/flaubert/modeling_flaubert.py#L1088"}}),Zs=new ie({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/main/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/main/en/model_doc/flaubert#transformers.FlaubertConfig"
>FlaubertConfig</a>) and inputs.</p>
<ul>
<li><strong>config</strong> (<a
  href="/docs/transformers/main/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/main/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 Ye({props:{$$slots:{default:[Yb]},$$scope:{ctx:z}}}),on=new He({props:{anchor:"transformers.FlaubertForQuestionAnswering.forward.example",$$slots:{default:[Lb]},$$scope:{ctx:z}}}),Bs=new Le({}),Vs=new ie({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/main/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/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/flaubert/modeling_tf_flaubert.py#L247"}}),sn=new Ye({props:{$$slots:{default:[Hb]},$$scope:{ctx:z}}}),As=new ie({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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/main/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/main/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/main/src/transformers/models/flaubert/modeling_tf_flaubert.py#L252",returnDescription:`
<p>A <a
  href="/docs/transformers/main/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/main/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/main/en/main_classes/output#transformers.modeling_tf_outputs.TFBaseModelOutput"
>transformers.modeling_tf_outputs.TFBaseModelOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),an=new Ye({props:{$$slots:{default:[Ob]},$$scope:{ctx:z}}}),rn=new He({props:{anchor:"transformers.TFFlaubertModel.call.example",$$slots:{default:[Kb]},$$scope:{ctx:z}}}),Ss=new Le({}),Ds=new ie({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/main/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/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/flaubert/modeling_tf_flaubert.py#L764"}}),dn=new Ye({props:{$$slots:{default:[ey]},$$scope:{ctx:z}}}),Ls=new ie({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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/main/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/main/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/main/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/main/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 Ye({props:{$$slots:{default:[ty]},$$scope:{ctx:z}}}),pn=new He({props:{anchor:"transformers.TFFlaubertWithLMHeadModel.call.example",$$slots:{default:[oy]},$$scope:{ctx:z}}}),Hs=new Le({}),Os=new ie({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/main/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/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/flaubert/modeling_tf_flaubert.py#L850"}}),hn=new Ye({props:{$$slots:{default:[ny]},$$scope:{ctx:z}}}),oa=new ie({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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/main/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/main/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/main/src/transformers/models/flaubert/modeling_tf_flaubert.py#L858",returnDescription:`
<p>A <a
  href="/docs/transformers/main/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/main/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/main/en/main_classes/output#transformers.modeling_tf_outputs.TFSequenceClassifierOutput"
>transformers.modeling_tf_outputs.TFSequenceClassifierOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),mn=new Ye({props:{$$slots:{default:[sy]},$$scope:{ctx:z}}}),fn=new He({props:{anchor:"transformers.TFFlaubertForSequenceClassification.call.example",$$slots:{default:[ay]},$$scope:{ctx:z}}}),gn=new He({props:{anchor:"transformers.TFFlaubertForSequenceClassification.call.example-2",$$slots:{default:[ry]},$$scope:{ctx:z}}}),na=new Le({}),sa=new ie({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/main/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/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/flaubert/modeling_tf_flaubert.py#L1102"}}),bn=new Ye({props:{$$slots:{default:[iy]},$$scope:{ctx:z}}}),la=new ie({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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/main/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/main/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/main/src/transformers/models/flaubert/modeling_tf_flaubert.py#L1131",returnDescription:`
<p>A <a
  href="/docs/transformers/main/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/main/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/main/en/main_classes/output#transformers.modeling_tf_outputs.TFMultipleChoiceModelOutput"
>transformers.modeling_tf_outputs.TFMultipleChoiceModelOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),yn=new Ye({props:{$$slots:{default:[ly]},$$scope:{ctx:z}}}),Tn=new He({props:{anchor:"transformers.TFFlaubertForMultipleChoice.call.example",$$slots:{default:[dy]},$$scope:{ctx:z}}}),da=new Le({}),ca=new ie({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/main/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/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/flaubert/modeling_tf_flaubert.py#L1021"}}),kn=new Ye({props:{$$slots:{default:[cy]},$$scope:{ctx:z}}}),ma=new ie({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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/main/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/main/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/main/src/transformers/models/flaubert/modeling_tf_flaubert.py#L1032",returnDescription:`
<p>A <a
  href="/docs/transformers/main/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/main/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/main/en/main_classes/output#transformers.modeling_tf_outputs.TFTokenClassifierOutput"
>transformers.modeling_tf_outputs.TFTokenClassifierOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),vn=new Ye({props:{$$slots:{default:[py]},$$scope:{ctx:z}}}),Mn=new He({props:{anchor:"transformers.TFFlaubertForTokenClassification.call.example",$$slots:{default:[uy]},$$scope:{ctx:z}}}),Fn=new He({props:{anchor:"transformers.TFFlaubertForTokenClassification.call.example-2",$$slots:{default:[hy]},$$scope:{ctx:z}}}),fa=new Le({}),ga=new ie({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/main/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/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/flaubert/modeling_tf_flaubert.py#L929"}}),En=new Ye({props:{$$slots:{default:[my]},$$scope:{ctx:z}}}),Ta=new ie({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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/main/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/main/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/main/src/transformers/models/flaubert/modeling_tf_flaubert.py#L937",returnDescription:`
<p>A <a
  href="/docs/transformers/main/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/main/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/main/en/main_classes/output#transformers.modeling_tf_outputs.TFQuestionAnsweringModelOutput"
>transformers.modeling_tf_outputs.TFQuestionAnsweringModelOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),jn=new Ye({props:{$$slots:{default:[fy]},$$scope:{ctx:z}}}),Cn=new He({props:{anchor:"transformers.TFFlaubertForQuestionAnsweringSimple.call.example",$$slots:{default:[gy]},$$scope:{ctx:z}}}),Jn=new He({props:{anchor:"transformers.TFFlaubertForQuestionAnsweringSimple.call.example-2",$$slots:{default:[_y]},$$scope:{ctx:z}}}),{c(){d=a("meta"),T=p(),h=a("h1"),m=a("a"),y=a("span"),w(l.$$.fragment),c=p(),J=a("span"),we=n("FlauBERT"),ge=p(),B=a("div"),ce=a("a"),O=a("img"),ke=p(),X=a("a"),pe=a("img"),P=p(),te=a("h2"),ae=a("a"),S=a("span"),w(le.$$.fragment),ve=p(),D=a("span"),Me=n("Overview"),_e=p(),V=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"),U=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"),Y=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"),ze=n("."),q=p(),me=a("p"),L=n("Tips:"),Te=p(),K=a("ul"),I=a("li"),Ue=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"),w(j.$$.fragment),Ve=p(),ee=a("span"),Ge=n("Documentation resources"),Be=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(),vr=a("li"),$a=a("a"),Gd=n("Multiple choice task guide"),bl=p(),Pt=a("h2"),Jo=a("a"),Mr=a("span"),w(Xn.$$.fragment),Rd=p(),Fr=a("span"),Xd=n("FlaubertConfig"),yl=p(),Nt=a("div"),w(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"),Pd=n("TFFlaubertModel"),Yd=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"),Ld=n("flaubert/flaubert_base_uncased"),Hd=n(" architecture."),Od=p(),Yt=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."),Tl=p(),Lt=a("h2"),zo=a("a"),$r=a("span"),w(Dn.$$.fragment),sc=p(),Er=a("span"),ac=n("FlaubertTokenizer"),wl=p(),Pe=a("div"),w(Qn.$$.fragment),rc=p(),jr=a("p"),ic=n("Construct a Flaubert tokenizer. Based on Byte-Pair Encoding. The tokenization process is the following:"),lc=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 "),zr=a("code"),mc=n("special_tokens"),fc=n(" and the function "),Ur=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(),Pn=a("li"),wc=n("The argument "),Ir=a("code"),kc=n("do_lowercase"),vc=n(" controls lower casing (automatically set for pretrained vocabularies)."),Mc=p(),Yn=a("p"),Fc=n("This tokenizer inherits from "),za=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"),w(Ln.$$.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:`),zc=p(),Hn=a("ul"),Ua=a("li"),Uc=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(),Uo=a("div"),w(On.$$.fragment),qc=p(),qr=a("p"),Bc=n("Converts a sequence of tokens (string) in a single string."),Vc=p(),bt=a("div"),w(Kn.$$.fragment),Gc=p(),Br=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(),w(No.$$.fragment),Ac=p(),Ht=a("p"),Sc=n("If "),Vr=a("code"),Dc=n("token_ids_1"),Qc=n(" is "),Gr=a("code"),Pc=n("None"),Yc=n(", this method only returns the first portion of the mask (0s)."),Lc=p(),Io=a("div"),w(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."),kl=p(),Ot=a("h2"),xo=a("a"),Xr=a("span"),w(os.$$.fragment),tp=p(),Ar=a("span"),op=n("FlaubertModel"),vl=p(),Kt=a("div"),w(ns.$$.fragment),np=p(),yt=a("div"),w(ss.$$.fragment),sp=p(),eo=a("p"),ap=n("The "),Ia=a("a"),rp=n("FlaubertModel"),ip=n(" forward method, overrides the "),Sr=a("code"),lp=n("__call__"),dp=n(" special method."),cp=p(),w(Wo.$$.fragment),pp=p(),w(Zo.$$.fragment),Ml=p(),to=a("h2"),qo=a("a"),Dr=a("span"),w(as.$$.fragment),up=p(),Qr=a("span"),hp=n("FlaubertWithLMHeadModel"),Fl=p(),it=a("div"),w(rs.$$.fragment),mp=p(),Pr=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(),is=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(),ls=a("p"),wp=n("This model is also a PyTorch "),ds=a("a"),kp=n("torch.nn.Module"),vp=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"),w(cs.$$.fragment),Fp=p(),oo=a("p"),$p=n("The "),Wa=a("a"),Ep=n("FlaubertWithLMHeadModel"),jp=n(" forward method, overrides the "),Yr=a("code"),Cp=n("__call__"),Jp=n(" special method."),zp=p(),w(Bo.$$.fragment),Up=p(),w(Vo.$$.fragment),$l=p(),no=a("h2"),Go=a("a"),Lr=a("span"),w(ps.$$.fragment),Np=p(),Hr=a("span"),Ip=n("FlaubertForSequenceClassification"),El=p(),lt=a("div"),w(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"),Bp=n("PreTrainedModel"),Vp=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"),w(gs.$$.fragment),Dp=p(),so=a("p"),Qp=n("The "),qa=a("a"),Pp=n("FlaubertForSequenceClassification"),Yp=n(" forward method, overrides the "),Kr=a("code"),Lp=n("__call__"),Hp=n(" special method."),Op=p(),w(Ro.$$.fragment),Kp=p(),w(Xo.$$.fragment),eu=p(),w(Ao.$$.fragment),jl=p(),ao=a("h2"),So=a("a"),ei=a("span"),w(_s.$$.fragment),tu=p(),ti=a("span"),ou=n("FlaubertForMultipleChoice"),Cl=p(),dt=a("div"),w(bs.$$.fragment),nu=p(),oi=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 "),Ba=a("a"),iu=n("PreTrainedModel"),lu=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 "),ws=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(),wt=a("div"),w(ks.$$.fragment),mu=p(),ro=a("p"),fu=n("The "),Va=a("a"),gu=n("FlaubertForMultipleChoice"),_u=n(" forward method, overrides the "),ni=a("code"),bu=n("__call__"),yu=n(" special method."),Tu=p(),w(Do.$$.fragment),wu=p(),w(Qo.$$.fragment),Jl=p(),io=a("h2"),Po=a("a"),si=a("span"),w(vs.$$.fragment),ku=p(),ai=a("span"),vu=n("FlaubertForTokenClassification"),zl=p(),ct=a("div"),w(Ms.$$.fragment),Mu=p(),ri=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"),zu=n("This model is also a PyTorch "),Es=a("a"),Uu=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(),kt=a("div"),w(js.$$.fragment),xu=p(),lo=a("p"),Wu=n("The "),Ra=a("a"),Zu=n("FlaubertForTokenClassification"),qu=n(" forward method, overrides the "),ii=a("code"),Bu=n("__call__"),Vu=n(" special method."),Gu=p(),w(Yo.$$.fragment),Ru=p(),w(Lo.$$.fragment),Ul=p(),co=a("h2"),Ho=a("a"),li=a("span"),w(Cs.$$.fragment),Xu=p(),di=a("span"),Au=n("FlaubertForQuestionAnsweringSimple"),Nl=p(),pt=a("div"),w(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 `),ci=a("code"),Qu=n("span start logits"),Pu=n(" and "),pi=a("code"),Yu=n("span end logits"),Lu=n(")."),Hu=p(),zs=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(),Us=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(),vt=a("div"),w(Is.$$.fragment),rh=p(),uo=a("p"),ih=n("The "),Aa=a("a"),lh=n("FlaubertForQuestionAnsweringSimple"),dh=n(" forward method, overrides the "),ui=a("code"),ch=n("__call__"),ph=n(" special method."),uh=p(),w(Oo.$$.fragment),hh=p(),w(Ko.$$.fragment),Il=p(),ho=a("h2"),en=a("a"),hi=a("span"),w(xs.$$.fragment),mh=p(),mi=a("span"),fh=n("FlaubertForQuestionAnswering"),xl=p(),mo=a("div"),w(Ws.$$.fragment),gh=p(),ht=a("div"),w(Zs.$$.fragment),_h=p(),fo=a("p"),bh=n("The "),Sa=a("a"),yh=n("FlaubertForQuestionAnswering"),Th=n(" forward method, overrides the "),fi=a("code"),wh=n("__call__"),kh=n(" special method."),vh=p(),w(tn.$$.fragment),Mh=p(),qs=a("p"),Fh=n("Base class for outputs of question answering models using a "),gi=a("code"),$h=n("SquadHead"),Eh=n("."),jh=p(),w(on.$$.fragment),Wl=p(),go=a("h2"),nn=a("a"),_i=a("span"),w(Bs.$$.fragment),Ch=p(),bi=a("span"),Jh=n("TFFlaubertModel"),Zl=p(),et=a("div"),w(Vs.$$.fragment),zh=p(),yi=a("p"),Uh=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"),Bh=n("tf.keras.Model"),Vh=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(),w(sn.$$.fragment),Rh=p(),Mt=a("div"),w(As.$$.fragment),Xh=p(),_o=a("p"),Ah=n("The "),Qa=a("a"),Sh=n("TFFlaubertModel"),Dh=n(" forward method, overrides the "),Ti=a("code"),Qh=n("__call__"),Ph=n(" special method."),Yh=p(),w(an.$$.fragment),Lh=p(),w(rn.$$.fragment),ql=p(),bo=a("h2"),ln=a("a"),wi=a("span"),w(Ss.$$.fragment),Hh=p(),ki=a("span"),Oh=n("TFFlaubertWithLMHeadModel"),Bl=p(),tt=a("div"),w(Ds.$$.fragment),Kh=p(),vi=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 "),Pa=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(),Ps=a("p"),rm=n("This model is also a "),Ys=a("a"),im=n("tf.keras.Model"),lm=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(),w(dn.$$.fragment),cm=p(),Ft=a("div"),w(Ls.$$.fragment),pm=p(),yo=a("p"),um=n("The "),Ya=a("a"),hm=n("TFFlaubertWithLMHeadModel"),mm=n(" forward method, overrides the "),Mi=a("code"),fm=n("__call__"),gm=n(" special method."),_m=p(),w(cn.$$.fragment),bm=p(),w(pn.$$.fragment),Vl=p(),To=a("h2"),un=a("a"),Fi=a("span"),w(Hs.$$.fragment),ym=p(),$i=a("span"),Tm=n("TFFlaubertForSequenceClassification"),Gl=p(),ot=a("div"),w(Os.$$.fragment),wm=p(),Ei=a("p"),km=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.`),vm=p(),Ks=a("p"),Mm=n("This model inherits from "),La=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.`),zm=p(),w(hn.$$.fragment),Um=p(),mt=a("div"),w(oa.$$.fragment),Nm=p(),wo=a("p"),Im=n("The "),Ha=a("a"),xm=n("TFFlaubertForSequenceClassification"),Wm=n(" forward method, overrides the "),ji=a("code"),Zm=n("__call__"),qm=n(" special method."),Bm=p(),w(mn.$$.fragment),Vm=p(),w(fn.$$.fragment),Gm=p(),w(gn.$$.fragment),Rl=p(),ko=a("h2"),_n=a("a"),Ci=a("span"),w(na.$$.fragment),Rm=p(),Ji=a("span"),Xm=n("TFFlaubertForMultipleChoice"),Xl=p(),nt=a("div"),w(sa.$$.fragment),Am=p(),zi=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"),Pm=n("TFPreTrainedModel"),Ym=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.)`),Lm=p(),ra=a("p"),Hm=n("This model is also a "),ia=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(),w(bn.$$.fragment),tf=p(),$t=a("div"),w(la.$$.fragment),of=p(),vo=a("p"),nf=n("The "),Ka=a("a"),sf=n("TFFlaubertForMultipleChoice"),af=n(" forward method, overrides the "),Ui=a("code"),rf=n("__call__"),lf=n(" special method."),df=p(),w(yn.$$.fragment),cf=p(),w(Tn.$$.fragment),Al=p(),Mo=a("h2"),wn=a("a"),Ni=a("span"),w(da.$$.fragment),pf=p(),Ii=a("span"),uf=n("TFFlaubertForTokenClassification"),Sl=p(),st=a("div"),w(ca.$$.fragment),hf=p(),xi=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"),wf=n("tf.keras.Model"),kf=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.`),vf=p(),w(kn.$$.fragment),Mf=p(),ft=a("div"),w(ma.$$.fragment),Ff=p(),Fo=a("p"),$f=n("The "),tr=a("a"),Ef=n("TFFlaubertForTokenClassification"),jf=n(" forward method, overrides the "),Wi=a("code"),Cf=n("__call__"),Jf=n(" special method."),zf=p(),w(vn.$$.fragment),Uf=p(),w(Mn.$$.fragment),Nf=p(),w(Fn.$$.fragment),Dl=p(),$o=a("h2"),$n=a("a"),Zi=a("span"),w(fa.$$.fragment),If=p(),qi=a("span"),xf=n("TFFlaubertForQuestionAnsweringSimple"),Ql=p(),at=a("div"),w(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 `),Bi=a("code"),qf=n("span start logits"),Bf=n(" and "),Vi=a("code"),Vf=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"),Pf=n("tf.keras.Model"),Yf=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.`),Lf=p(),w(En.$$.fragment),Hf=p(),gt=a("div"),w(Ta.$$.fragment),Of=p(),jo=a("p"),Kf=n("The "),nr=a("a"),eg=n("TFFlaubertForQuestionAnsweringSimple"),tg=n(" forward method, overrides the "),Gi=a("code"),og=n("__call__"),ng=n(" special method."),sg=p(),w(jn.$$.fragment),ag=p(),w(Cn.$$.fragment),rg=p(),w(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 wa=i(h);m=r(wa,"A",{id:!0,class:!0,href:!0});var Ri=i(m);y=r(Ri,"SPAN",{});var Xi=i(y);k(l.$$.fragment,Xi),Xi.forEach(t),Ri.forEach(t),c=u(wa),J=r(wa,"SPAN",{});var Ai=i(J);we=s(Ai,"FlauBERT"),Ai.forEach(t),wa.forEach(t),ge=u(o),B=r(o,"DIV",{class:!0});var ka=i(B);ce=r(ka,"A",{href:!0});var Si=i(ce);O=r(Si,"IMG",{alt:!0,src:!0}),Si.forEach(t),ke=u(ka),X=r(ka,"A",{href:!0});var Di=i(X);pe=r(Di,"IMG",{alt:!0,src:!0}),Di.forEach(t),ka.forEach(t),P=u(o),te=r(o,"H2",{class:!0});var va=i(te);ae=r(va,"A",{id:!0,class:!0,href:!0});var Qi=i(ae);S=r(Qi,"SPAN",{});var Pi=i(S);k(le.$$.fragment,Pi),Pi.forEach(t),Qi.forEach(t),ve=u(va),D=r(va,"SPAN",{});var Yi=i(D);Me=s(Yi,"Overview"),Yi.forEach(t),va.forEach(t),_e=u(o),V=r(o,"P",{});var Ma=i(V);Fe=s(Ma,"The FlauBERT model was proposed in the paper "),de=r(Ma,"A",{href:!0,rel:!0});var Li=i(de);oe=s(Li,"FlauBERT: Unsupervised Language Model Pre-training for French"),Li.forEach(t),U=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 Hi=i(ue);Y=s(Hi,"The abstract from the paper is the following:"),Hi.forEach(t),be=u(o),he=r(o,"P",{});var Oi=i(he);Q=r(Oi,"EM",{});var Ki=i(Q);$e=s(Ki,`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.`),Ki.forEach(t),Oi.forEach(t),ye=u(o),N=r(o,"P",{});var Co=i(N);Ee=s(Co,"This model was contributed by "),G=r(Co,"A",{href:!0,rel:!0});var el=i(G);je=s(el,"formiel"),el.forEach(t),Ce=s(Co,". The original code can be found "),R=r(Co,"A",{href:!0,rel:!0});var tl=i(R);Je=s(tl,"here"),tl.forEach(t),ze=s(Co,"."),Co.forEach(t),q=u(o),me=r(o,"P",{});var ol=i(me);L=s(ol,"Tips:"),ol.forEach(t),Te=u(o),K=r(o,"UL",{});var nl=i(K);I=r(nl,"LI",{});var sl=i(I);Ue=s(sl,"Like RoBERTa, without the sentence ordering prediction (so just trained on the MLM objective)."),sl.forEach(t),nl.forEach(t),W=u(o),ne=r(o,"H2",{class:!0});var Fa=i(ne);re=r(Fa,"A",{id:!0,class:!0,href:!0});var al=i(re);g=r(al,"SPAN",{});var rl=i(g);k(j.$$.fragment,rl),rl.forEach(t),al.forEach(t),Ve=u(Fa),ee=r(Fa,"SPAN",{});var il=i(ee);Ge=s(il,"Documentation resources"),il.forEach(t),Fa.forEach(t),Be=u(o),C=r(o,"UL",{});var _t=i(C);We=r(_t,"LI",{});var ll=i(We);Ie=r(ll,"A",{href:!0});var dl=i(Ie);Re=s(dl,"Text classification task guide"),dl.forEach(t),ll.forEach(t),Xe=u(_t),Ze=r(_t,"LI",{});var cl=i(Ze);Z=r(cl,"A",{href:!0});var pl=i(Z);H=s(pl,"Token classification task guide"),pl.forEach(t),cl.forEach(t),Ae=u(_t),qe=r(_t,"LI",{});var ul=i(qe);A=r(ul,"A",{href:!0});var hl=i(A);Se=s(hl,"Question answering task guide"),hl.forEach(t),ul.forEach(t),De=u(_t),fe=r(_t,"LI",{});var ml=i(fe);xe=r(ml,"A",{href:!0});var fl=i(xe);se=s(fl,"Masked language modeling task guide"),fl.forEach(t),ml.forEach(t),Qe=u(_t),vr=r(_t,"LI",{});var gl=i(vr);$a=r(gl,"A",{href:!0});var _l=i($a);Gd=s(_l,"Multiple choice task guide"),_l.forEach(t),gl.forEach(t),_t.forEach(t),bl=u(o),Pt=r(o,"H2",{class:!0});var Yl=i(Pt);Jo=r(Yl,"A",{id:!0,class:!0,href:!0});var dg=i(Jo);Mr=r(dg,"SPAN",{});var cg=i(Mr);k(Xn.$$.fragment,cg),cg.forEach(t),dg.forEach(t),Rd=u(Yl),Fr=r(Yl,"SPAN",{});var pg=i(Fr);Xd=s(pg,"FlaubertConfig"),pg.forEach(t),Yl.forEach(t),yl=u(o),Nt=r(o,"DIV",{class:!0});var sr=i(Nt);k(An.$$.fragment,sr),Ad=u(sr),It=r(sr,"P",{});var zn=i(It);Sd=s(zn,"This is the configuration class to store the configuration of a "),Ea=r(zn,"A",{href:!0});var ug=i(Ea);Dd=s(ug,"FlaubertModel"),ug.forEach(t),Qd=s(zn," or a "),ja=r(zn,"A",{href:!0});var hg=i(ja);Pd=s(hg,"TFFlaubertModel"),hg.forEach(t),Yd=s(zn,`. 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(zn,"A",{href:!0,rel:!0});var mg=i(Sn);Ld=s(mg,"flaubert/flaubert_base_uncased"),mg.forEach(t),Hd=s(zn," architecture."),zn.forEach(t),Od=u(sr),Yt=r(sr,"P",{});var ar=i(Yt);Kd=s(ar,"Configuration objects inherit from "),Ca=r(ar,"A",{href:!0});var fg=i(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=i(Ja);oc=s(gg,"PretrainedConfig"),gg.forEach(t),nc=s(ar," for more information."),ar.forEach(t),sr.forEach(t),Tl=u(o),Lt=r(o,"H2",{class:!0});var Ll=i(Lt);zo=r(Ll,"A",{id:!0,class:!0,href:!0});var _g=i(zo);$r=r(_g,"SPAN",{});var bg=i($r);k(Dn.$$.fragment,bg),bg.forEach(t),_g.forEach(t),sc=u(Ll),Er=r(Ll,"SPAN",{});var yg=i(Er);ac=s(yg,"FlaubertTokenizer"),yg.forEach(t),Ll.forEach(t),wl=u(o),Pe=r(o,"DIV",{class:!0});var rt=i(Pe);k(Qn.$$.fragment,rt),rc=u(rt),jr=r(rt,"P",{});var Tg=i(jr);ic=s(Tg,"Construct a Flaubert tokenizer. Based on Byte-Pair Encoding. The tokenization process is the following:"),Tg.forEach(t),lc=u(rt),xt=r(rt,"UL",{});var Un=i(xt);Cr=r(Un,"LI",{});var wg=i(Cr);dc=s(wg,"Moses preprocessing and tokenization."),wg.forEach(t),cc=u(Un),Jr=r(Un,"LI",{});var kg=i(Jr);pc=s(kg,"Normalizing all inputs text."),kg.forEach(t),uc=u(Un),Wt=r(Un,"LI",{});var Nn=i(Wt);hc=s(Nn,"The arguments "),zr=r(Nn,"CODE",{});var vg=i(zr);mc=s(vg,"special_tokens"),vg.forEach(t),fc=s(Nn," and the function "),Ur=r(Nn,"CODE",{});var Mg=i(Ur);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=i(Nr);bc=s(Fg,"classify"),Fg.forEach(t),yc=s(Nn,"\u201D) to a vocabulary."),Nn.forEach(t),Tc=u(Un),Pn=r(Un,"LI",{});var Hl=i(Pn);wc=s(Hl,"The argument "),Ir=r(Hl,"CODE",{});var $g=i(Ir);kc=s($g,"do_lowercase"),$g.forEach(t),vc=s(Hl," controls lower casing (automatically set for pretrained vocabularies)."),Hl.forEach(t),Un.forEach(t),Mc=u(rt),Yn=r(rt,"P",{});var Ol=i(Yn);Fc=s(Ol,"This tokenizer inherits from "),za=r(Ol,"A",{href:!0});var Eg=i(za);$c=s(Eg,"PreTrainedTokenizer"),Eg.forEach(t),Ec=s(Ol,` which contains most of the main methods. Users should refer to
this superclass for more information regarding those methods.`),Ol.forEach(t),jc=u(rt),Zt=r(rt,"DIV",{class:!0});var rr=i(Zt);k(Ln.$$.fragment,rr),Cc=u(rr),xr=r(rr,"P",{});var jg=i(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),zc=u(rr),Hn=r(rr,"UL",{});var Kl=i(Hn);Ua=r(Kl,"LI",{});var ig=i(Ua);Uc=s(ig,"single sequence: "),Wr=r(ig,"CODE",{});var Cg=i(Wr);Nc=s(Cg,"<s> X </s>"),Cg.forEach(t),ig.forEach(t),Ic=u(Kl),Na=r(Kl,"LI",{});var lg=i(Na);xc=s(lg,"pair of sequences: "),Zr=r(lg,"CODE",{});var Jg=i(Zr);Wc=s(Jg,"<s> A </s> B </s>"),Jg.forEach(t),lg.forEach(t),Kl.forEach(t),rr.forEach(t),Zc=u(rt),Uo=r(rt,"DIV",{class:!0});var ed=i(Uo);k(On.$$.fragment,ed),qc=u(ed),qr=r(ed,"P",{});var zg=i(qr);Bc=s(zg,"Converts a sequence of tokens (string) in a single string."),zg.forEach(t),ed.forEach(t),Vc=u(rt),bt=r(rt,"DIV",{class:!0});var In=i(bt);k(Kn.$$.fragment,In),Gc=u(In),Br=r(In,"P",{});var Ug=i(Br);Rc=s(Ug,"Create a mask from the two sequences passed to be used in a sequence-pair classification task. An XLM sequence"),Ug.forEach(t),Xc=u(In),k(No.$$.fragment,In),Ac=u(In),Ht=r(In,"P",{});var ir=i(Ht);Sc=s(ir,"If "),Vr=r(ir,"CODE",{});var Ng=i(Vr);Dc=s(Ng,"token_ids_1"),Ng.forEach(t),Qc=s(ir," is "),Gr=r(ir,"CODE",{});var Ig=i(Gr);Pc=s(Ig,"None"),Ig.forEach(t),Yc=s(ir,", this method only returns the first portion of the mask (0s)."),ir.forEach(t),In.forEach(t),Lc=u(rt),Io=r(rt,"DIV",{class:!0});var td=i(Io);k(es.$$.fragment,td),Hc=u(td),ts=r(td,"P",{});var od=i(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=i(Rr);Kc=s(xg,"prepare_for_model"),xg.forEach(t),ep=s(od," method."),od.forEach(t),td.forEach(t),rt.forEach(t),kl=u(o),Ot=r(o,"H2",{class:!0});var nd=i(Ot);xo=r(nd,"A",{id:!0,class:!0,href:!0});var Wg=i(xo);Xr=r(Wg,"SPAN",{});var Zg=i(Xr);k(os.$$.fragment,Zg),Zg.forEach(t),Wg.forEach(t),tp=u(nd),Ar=r(nd,"SPAN",{});var qg=i(Ar);op=s(qg,"FlaubertModel"),qg.forEach(t),nd.forEach(t),vl=u(o),Kt=r(o,"DIV",{class:!0});var sd=i(Kt);k(ns.$$.fragment,sd),np=u(sd),yt=r(sd,"DIV",{class:!0});var xn=i(yt);k(ss.$$.fragment,xn),sp=u(xn),eo=r(xn,"P",{});var lr=i(eo);ap=s(lr,"The "),Ia=r(lr,"A",{href:!0});var Bg=i(Ia);rp=s(Bg,"FlaubertModel"),Bg.forEach(t),ip=s(lr," forward method, overrides the "),Sr=r(lr,"CODE",{});var Vg=i(Sr);lp=s(Vg,"__call__"),Vg.forEach(t),dp=s(lr," special method."),lr.forEach(t),cp=u(xn),k(Wo.$$.fragment,xn),pp=u(xn),k(Zo.$$.fragment,xn),xn.forEach(t),sd.forEach(t),Ml=u(o),to=r(o,"H2",{class:!0});var ad=i(to);qo=r(ad,"A",{id:!0,class:!0,href:!0});var Gg=i(qo);Dr=r(Gg,"SPAN",{});var Rg=i(Dr);k(as.$$.fragment,Rg),Rg.forEach(t),Gg.forEach(t),up=u(ad),Qr=r(ad,"SPAN",{});var Xg=i(Qr);hp=s(Xg,"FlaubertWithLMHeadModel"),Xg.forEach(t),ad.forEach(t),Fl=u(o),it=r(o,"DIV",{class:!0});var qt=i(it);k(rs.$$.fragment,qt),mp=u(qt),Pr=r(qt,"P",{});var Ag=i(Pr);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),is=r(qt,"P",{});var rd=i(is);_p=s(rd,"This model inherits from "),xa=r(rd,"A",{href:!0});var Sg=i(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),ls=r(qt,"P",{});var id=i(ls);wp=s(id,"This model is also a PyTorch "),ds=r(id,"A",{href:!0,rel:!0});var Dg=i(ds);kp=s(Dg,"torch.nn.Module"),Dg.forEach(t),vp=s(id,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),id.forEach(t),Mp=u(qt),Tt=r(qt,"DIV",{class:!0});var Wn=i(Tt);k(cs.$$.fragment,Wn),Fp=u(Wn),oo=r(Wn,"P",{});var dr=i(oo);$p=s(dr,"The "),Wa=r(dr,"A",{href:!0});var Qg=i(Wa);Ep=s(Qg,"FlaubertWithLMHeadModel"),Qg.forEach(t),jp=s(dr," forward method, overrides the "),Yr=r(dr,"CODE",{});var Pg=i(Yr);Cp=s(Pg,"__call__"),Pg.forEach(t),Jp=s(dr," special method."),dr.forEach(t),zp=u(Wn),k(Bo.$$.fragment,Wn),Up=u(Wn),k(Vo.$$.fragment,Wn),Wn.forEach(t),qt.forEach(t),$l=u(o),no=r(o,"H2",{class:!0});var ld=i(no);Go=r(ld,"A",{id:!0,class:!0,href:!0});var Yg=i(Go);Lr=r(Yg,"SPAN",{});var Lg=i(Lr);k(ps.$$.fragment,Lg),Lg.forEach(t),Yg.forEach(t),Np=u(ld),Hr=r(ld,"SPAN",{});var Hg=i(Hr);Ip=s(Hg,"FlaubertForSequenceClassification"),Hg.forEach(t),ld.forEach(t),El=u(o),lt=r(o,"DIV",{class:!0});var Bt=i(lt);k(us.$$.fragment,Bt),xp=u(Bt),Or=r(Bt,"P",{});var Og=i(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(Bt),hs=r(Bt,"P",{});var dd=i(hs);qp=s(dd,"This model inherits from "),Za=r(dd,"A",{href:!0});var Kg=i(Za);Bp=s(Kg,"PreTrainedModel"),Kg.forEach(t),Vp=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(Bt),ms=r(Bt,"P",{});var cd=i(ms);Rp=s(cd,"This model is also a PyTorch "),fs=r(cd,"A",{href:!0,rel:!0});var e_=i(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(Bt),ut=r(Bt,"DIV",{class:!0});var Vt=i(ut);k(gs.$$.fragment,Vt),Dp=u(Vt),so=r(Vt,"P",{});var cr=i(so);Qp=s(cr,"The "),qa=r(cr,"A",{href:!0});var t_=i(qa);Pp=s(t_,"FlaubertForSequenceClassification"),t_.forEach(t),Yp=s(cr," forward method, overrides the "),Kr=r(cr,"CODE",{});var o_=i(Kr);Lp=s(o_,"__call__"),o_.forEach(t),Hp=s(cr," special method."),cr.forEach(t),Op=u(Vt),k(Ro.$$.fragment,Vt),Kp=u(Vt),k(Xo.$$.fragment,Vt),eu=u(Vt),k(Ao.$$.fragment,Vt),Vt.forEach(t),Bt.forEach(t),jl=u(o),ao=r(o,"H2",{class:!0});var pd=i(ao);So=r(pd,"A",{id:!0,class:!0,href:!0});var n_=i(So);ei=r(n_,"SPAN",{});var s_=i(ei);k(_s.$$.fragment,s_),s_.forEach(t),n_.forEach(t),tu=u(pd),ti=r(pd,"SPAN",{});var a_=i(ti);ou=s(a_,"FlaubertForMultipleChoice"),a_.forEach(t),pd.forEach(t),Cl=u(o),dt=r(o,"DIV",{class:!0});var Gt=i(dt);k(bs.$$.fragment,Gt),nu=u(Gt),oi=r(Gt,"P",{});var r_=i(oi);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=i(ys);ru=s(ud,"This model inherits from "),Ba=r(ud,"A",{href:!0});var i_=i(Ba);iu=s(i_,"PreTrainedModel"),i_.forEach(t),lu=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=i(Ts);cu=s(hd,"This model is also a PyTorch "),ws=r(hd,"A",{href:!0,rel:!0});var l_=i(ws);pu=s(l_,"torch.nn.Module"),l_.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),wt=r(Gt,"DIV",{class:!0});var Zn=i(wt);k(ks.$$.fragment,Zn),mu=u(Zn),ro=r(Zn,"P",{});var pr=i(ro);fu=s(pr,"The "),Va=r(pr,"A",{href:!0});var d_=i(Va);gu=s(d_,"FlaubertForMultipleChoice"),d_.forEach(t),_u=s(pr," forward method, overrides the "),ni=r(pr,"CODE",{});var c_=i(ni);bu=s(c_,"__call__"),c_.forEach(t),yu=s(pr," special method."),pr.forEach(t),Tu=u(Zn),k(Do.$$.fragment,Zn),wu=u(Zn),k(Qo.$$.fragment,Zn),Zn.forEach(t),Gt.forEach(t),Jl=u(o),io=r(o,"H2",{class:!0});var md=i(io);Po=r(md,"A",{id:!0,class:!0,href:!0});var p_=i(Po);si=r(p_,"SPAN",{});var u_=i(si);k(vs.$$.fragment,u_),u_.forEach(t),p_.forEach(t),ku=u(md),ai=r(md,"SPAN",{});var h_=i(ai);vu=s(h_,"FlaubertForTokenClassification"),h_.forEach(t),md.forEach(t),zl=u(o),ct=r(o,"DIV",{class:!0});var Rt=i(ct);k(Ms.$$.fragment,Rt),Mu=u(Rt),ri=r(Rt,"P",{});var m_=i(ri);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=i(Fs);Eu=s(fd,"This model inherits from "),Ga=r(fd,"A",{href:!0});var f_=i(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=i($s);zu=s(gd,"This model is also a PyTorch "),Es=r(gd,"A",{href:!0,rel:!0});var g_=i(Es);Uu=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),kt=r(Rt,"DIV",{class:!0});var qn=i(kt);k(js.$$.fragment,qn),xu=u(qn),lo=r(qn,"P",{});var ur=i(lo);Wu=s(ur,"The "),Ra=r(ur,"A",{href:!0});var __=i(Ra);Zu=s(__,"FlaubertForTokenClassification"),__.forEach(t),qu=s(ur," forward method, overrides the "),ii=r(ur,"CODE",{});var b_=i(ii);Bu=s(b_,"__call__"),b_.forEach(t),Vu=s(ur," special method."),ur.forEach(t),Gu=u(qn),k(Yo.$$.fragment,qn),Ru=u(qn),k(Lo.$$.fragment,qn),qn.forEach(t),Rt.forEach(t),Ul=u(o),co=r(o,"H2",{class:!0});var _d=i(co);Ho=r(_d,"A",{id:!0,class:!0,href:!0});var y_=i(Ho);li=r(y_,"SPAN",{});var T_=i(li);k(Cs.$$.fragment,T_),T_.forEach(t),y_.forEach(t),Xu=u(_d),di=r(_d,"SPAN",{});var w_=i(di);Au=s(w_,"FlaubertForQuestionAnsweringSimple"),w_.forEach(t),_d.forEach(t),Nl=u(o),pt=r(o,"DIV",{class:!0});var Xt=i(pt);k(Js.$$.fragment,Xt),Su=u(Xt),po=r(Xt,"P",{});var hr=i(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 `),ci=r(hr,"CODE",{});var k_=i(ci);Qu=s(k_,"span start logits"),k_.forEach(t),Pu=s(hr," and "),pi=r(hr,"CODE",{});var v_=i(pi);Yu=s(v_,"span end logits"),v_.forEach(t),Lu=s(hr,")."),hr.forEach(t),Hu=u(Xt),zs=r(Xt,"P",{});var bd=i(zs);Ou=s(bd,"This model inherits from "),Xa=r(bd,"A",{href:!0});var M_=i(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),Us=r(Xt,"P",{});var yd=i(Us);oh=s(yd,"This model is also a PyTorch "),Ns=r(yd,"A",{href:!0,rel:!0});var F_=i(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),vt=r(Xt,"DIV",{class:!0});var Bn=i(vt);k(Is.$$.fragment,Bn),rh=u(Bn),uo=r(Bn,"P",{});var mr=i(uo);ih=s(mr,"The "),Aa=r(mr,"A",{href:!0});var $_=i(Aa);lh=s($_,"FlaubertForQuestionAnsweringSimple"),$_.forEach(t),dh=s(mr," forward method, overrides the "),ui=r(mr,"CODE",{});var E_=i(ui);ch=s(E_,"__call__"),E_.forEach(t),ph=s(mr," special method."),mr.forEach(t),uh=u(Bn),k(Oo.$$.fragment,Bn),hh=u(Bn),k(Ko.$$.fragment,Bn),Bn.forEach(t),Xt.forEach(t),Il=u(o),ho=r(o,"H2",{class:!0});var Td=i(ho);en=r(Td,"A",{id:!0,class:!0,href:!0});var j_=i(en);hi=r(j_,"SPAN",{});var C_=i(hi);k(xs.$$.fragment,C_),C_.forEach(t),j_.forEach(t),mh=u(Td),mi=r(Td,"SPAN",{});var J_=i(mi);fh=s(J_,"FlaubertForQuestionAnswering"),J_.forEach(t),Td.forEach(t),xl=u(o),mo=r(o,"DIV",{class:!0});var wd=i(mo);k(Ws.$$.fragment,wd),gh=u(wd),ht=r(wd,"DIV",{class:!0});var At=i(ht);k(Zs.$$.fragment,At),_h=u(At),fo=r(At,"P",{});var fr=i(fo);bh=s(fr,"The "),Sa=r(fr,"A",{href:!0});var z_=i(Sa);yh=s(z_,"FlaubertForQuestionAnswering"),z_.forEach(t),Th=s(fr," forward method, overrides the "),fi=r(fr,"CODE",{});var U_=i(fi);wh=s(U_,"__call__"),U_.forEach(t),kh=s(fr," special method."),fr.forEach(t),vh=u(At),k(tn.$$.fragment,At),Mh=u(At),qs=r(At,"P",{});var kd=i(qs);Fh=s(kd,"Base class for outputs of question answering models using a "),gi=r(kd,"CODE",{});var N_=i(gi);$h=s(N_,"SquadHead"),N_.forEach(t),Eh=s(kd,"."),kd.forEach(t),jh=u(At),k(on.$$.fragment,At),At.forEach(t),wd.forEach(t),Wl=u(o),go=r(o,"H2",{class:!0});var vd=i(go);nn=r(vd,"A",{id:!0,class:!0,href:!0});var I_=i(nn);_i=r(I_,"SPAN",{});var x_=i(_i);k(Bs.$$.fragment,x_),x_.forEach(t),I_.forEach(t),Ch=u(vd),bi=r(vd,"SPAN",{});var W_=i(bi);Jh=s(W_,"TFFlaubertModel"),W_.forEach(t),vd.forEach(t),Zl=u(o),et=r(o,"DIV",{class:!0});var Et=i(et);k(Vs.$$.fragment,Et),zh=u(Et),yi=r(Et,"P",{});var Z_=i(yi);Uh=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=i(Gs);Ih=s(Md,"This model inherits from "),Da=r(Md,"A",{href:!0});var q_=i(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=i(Rs);qh=s(Fd,"This model is also a "),Xs=r(Fd,"A",{href:!0,rel:!0});var B_=i(Xs);Bh=s(B_,"tf.keras.Model"),B_.forEach(t),Vh=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),k(sn.$$.fragment,Et),Rh=u(Et),Mt=r(Et,"DIV",{class:!0});var Vn=i(Mt);k(As.$$.fragment,Vn),Xh=u(Vn),_o=r(Vn,"P",{});var gr=i(_o);Ah=s(gr,"The "),Qa=r(gr,"A",{href:!0});var V_=i(Qa);Sh=s(V_,"TFFlaubertModel"),V_.forEach(t),Dh=s(gr," forward method, overrides the "),Ti=r(gr,"CODE",{});var G_=i(Ti);Qh=s(G_,"__call__"),G_.forEach(t),Ph=s(gr," special method."),gr.forEach(t),Yh=u(Vn),k(an.$$.fragment,Vn),Lh=u(Vn),k(rn.$$.fragment,Vn),Vn.forEach(t),Et.forEach(t),ql=u(o),bo=r(o,"H2",{class:!0});var $d=i(bo);ln=r($d,"A",{id:!0,class:!0,href:!0});var R_=i(ln);wi=r(R_,"SPAN",{});var X_=i(wi);k(Ss.$$.fragment,X_),X_.forEach(t),R_.forEach(t),Hh=u($d),ki=r($d,"SPAN",{});var A_=i(ki);Oh=s(A_,"TFFlaubertWithLMHeadModel"),A_.forEach(t),$d.forEach(t),Bl=u(o),tt=r(o,"DIV",{class:!0});var jt=i(tt);k(Ds.$$.fragment,jt),Kh=u(jt),vi=r(jt,"P",{});var S_=i(vi);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=i(Qs);om=s(Ed,"This model inherits from "),Pa=r(Ed,"A",{href:!0});var D_=i(Pa);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),Ps=r(jt,"P",{});var jd=i(Ps);rm=s(jd,"This model is also a "),Ys=r(jd,"A",{href:!0,rel:!0});var Q_=i(Ys);im=s(Q_,"tf.keras.Model"),Q_.forEach(t),lm=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),k(dn.$$.fragment,jt),cm=u(jt),Ft=r(jt,"DIV",{class:!0});var Gn=i(Ft);k(Ls.$$.fragment,Gn),pm=u(Gn),yo=r(Gn,"P",{});var _r=i(yo);um=s(_r,"The "),Ya=r(_r,"A",{href:!0});var P_=i(Ya);hm=s(P_,"TFFlaubertWithLMHeadModel"),P_.forEach(t),mm=s(_r," forward method, overrides the "),Mi=r(_r,"CODE",{});var Y_=i(Mi);fm=s(Y_,"__call__"),Y_.forEach(t),gm=s(_r," special method."),_r.forEach(t),_m=u(Gn),k(cn.$$.fragment,Gn),bm=u(Gn),k(pn.$$.fragment,Gn),Gn.forEach(t),jt.forEach(t),Vl=u(o),To=r(o,"H2",{class:!0});var Cd=i(To);un=r(Cd,"A",{id:!0,class:!0,href:!0});var L_=i(un);Fi=r(L_,"SPAN",{});var H_=i(Fi);k(Hs.$$.fragment,H_),H_.forEach(t),L_.forEach(t),ym=u(Cd),$i=r(Cd,"SPAN",{});var O_=i($i);Tm=s(O_,"TFFlaubertForSequenceClassification"),O_.forEach(t),Cd.forEach(t),Gl=u(o),ot=r(o,"DIV",{class:!0});var Ct=i(ot);k(Os.$$.fragment,Ct),wm=u(Ct),Ei=r(Ct,"P",{});var K_=i(Ei);km=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),vm=u(Ct),Ks=r(Ct,"P",{});var Jd=i(Ks);Mm=s(Jd,"This model inherits from "),La=r(Jd,"A",{href:!0});var eb=i(La);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 zd=i(ea);jm=s(zd,"This model is also a "),ta=r(zd,"A",{href:!0,rel:!0});var tb=i(ta);Cm=s(tb,"tf.keras.Model"),tb.forEach(t),Jm=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),zm=u(Ct),k(hn.$$.fragment,Ct),Um=u(Ct),mt=r(Ct,"DIV",{class:!0});var St=i(mt);k(oa.$$.fragment,St),Nm=u(St),wo=r(St,"P",{});var br=i(wo);Im=s(br,"The "),Ha=r(br,"A",{href:!0});var ob=i(Ha);xm=s(ob,"TFFlaubertForSequenceClassification"),ob.forEach(t),Wm=s(br," forward method, overrides the "),ji=r(br,"CODE",{});var nb=i(ji);Zm=s(nb,"__call__"),nb.forEach(t),qm=s(br," special method."),br.forEach(t),Bm=u(St),k(mn.$$.fragment,St),Vm=u(St),k(fn.$$.fragment,St),Gm=u(St),k(gn.$$.fragment,St),St.forEach(t),Ct.forEach(t),Rl=u(o),ko=r(o,"H2",{class:!0});var Ud=i(ko);_n=r(Ud,"A",{id:!0,class:!0,href:!0});var sb=i(_n);Ci=r(sb,"SPAN",{});var ab=i(Ci);k(na.$$.fragment,ab),ab.forEach(t),sb.forEach(t),Rm=u(Ud),Ji=r(Ud,"SPAN",{});var rb=i(Ji);Xm=s(rb,"TFFlaubertForMultipleChoice"),rb.forEach(t),Ud.forEach(t),Xl=u(o),nt=r(o,"DIV",{class:!0});var Jt=i(nt);k(sa.$$.fragment,Jt),Am=u(Jt),zi=r(Jt,"P",{});var ib=i(zi);Sm=s(ib,`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.`),ib.forEach(t),Dm=u(Jt),aa=r(Jt,"P",{});var Nd=i(aa);Qm=s(Nd,"This model inherits from "),Oa=r(Nd,"A",{href:!0});var lb=i(Oa);Pm=s(lb,"TFPreTrainedModel"),lb.forEach(t),Ym=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),Lm=u(Jt),ra=r(Jt,"P",{});var Id=i(ra);Hm=s(Id,"This model is also a "),ia=r(Id,"A",{href:!0,rel:!0});var db=i(ia);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),k(bn.$$.fragment,Jt),tf=u(Jt),$t=r(Jt,"DIV",{class:!0});var Rn=i($t);k(la.$$.fragment,Rn),of=u(Rn),vo=r(Rn,"P",{});var yr=i(vo);nf=s(yr,"The "),Ka=r(yr,"A",{href:!0});var cb=i(Ka);sf=s(cb,"TFFlaubertForMultipleChoice"),cb.forEach(t),af=s(yr," forward method, overrides the "),Ui=r(yr,"CODE",{});var pb=i(Ui);rf=s(pb,"__call__"),pb.forEach(t),lf=s(yr," special method."),yr.forEach(t),df=u(Rn),k(yn.$$.fragment,Rn),cf=u(Rn),k(Tn.$$.fragment,Rn),Rn.forEach(t),Jt.forEach(t),Al=u(o),Mo=r(o,"H2",{class:!0});var xd=i(Mo);wn=r(xd,"A",{id:!0,class:!0,href:!0});var ub=i(wn);Ni=r(ub,"SPAN",{});var hb=i(Ni);k(da.$$.fragment,hb),hb.forEach(t),ub.forEach(t),pf=u(xd),Ii=r(xd,"SPAN",{});var mb=i(Ii);uf=s(mb,"TFFlaubertForTokenClassification"),mb.forEach(t),xd.forEach(t),Sl=u(o),st=r(o,"DIV",{class:!0});var zt=i(st);k(ca.$$.fragment,zt),hf=u(zt),xi=r(zt,"P",{});var fb=i(xi);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(zt),pa=r(zt,"P",{});var Wd=i(pa);gf=s(Wd,"This model inherits from "),er=r(Wd,"A",{href:!0});var gb=i(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(zt),ua=r(zt,"P",{});var Zd=i(ua);Tf=s(Zd,"This model is also a "),ha=r(Zd,"A",{href:!0,rel:!0});var _b=i(ha);wf=s(_b,"tf.keras.Model"),_b.forEach(t),kf=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),vf=u(zt),k(kn.$$.fragment,zt),Mf=u(zt),ft=r(zt,"DIV",{class:!0});var Dt=i(ft);k(ma.$$.fragment,Dt),Ff=u(Dt),Fo=r(Dt,"P",{});var Tr=i(Fo);$f=s(Tr,"The "),tr=r(Tr,"A",{href:!0});var bb=i(tr);Ef=s(bb,"TFFlaubertForTokenClassification"),bb.forEach(t),jf=s(Tr," forward method, overrides the "),Wi=r(Tr,"CODE",{});var yb=i(Wi);Cf=s(yb,"__call__"),yb.forEach(t),Jf=s(Tr," special method."),Tr.forEach(t),zf=u(Dt),k(vn.$$.fragment,Dt),Uf=u(Dt),k(Mn.$$.fragment,Dt),Nf=u(Dt),k(Fn.$$.fragment,Dt),Dt.forEach(t),zt.forEach(t),Dl=u(o),$o=r(o,"H2",{class:!0});var qd=i($o);$n=r(qd,"A",{id:!0,class:!0,href:!0});var Tb=i($n);Zi=r(Tb,"SPAN",{});var wb=i(Zi);k(fa.$$.fragment,wb),wb.forEach(t),Tb.forEach(t),If=u(qd),qi=r(qd,"SPAN",{});var kb=i(qi);xf=s(kb,"TFFlaubertForQuestionAnsweringSimple"),kb.forEach(t),qd.forEach(t),Ql=u(o),at=r(o,"DIV",{class:!0});var Ut=i(at);k(ga.$$.fragment,Ut),Wf=u(Ut),Eo=r(Ut,"P",{});var wr=i(Eo);Zf=s(wr,`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 `),Bi=r(wr,"CODE",{});var vb=i(Bi);qf=s(vb,"span start logits"),vb.forEach(t),Bf=s(wr," and "),Vi=r(wr,"CODE",{});var Mb=i(Vi);Vf=s(Mb,"span end logits"),Mb.forEach(t),Gf=s(wr,")."),wr.forEach(t),Rf=u(Ut),_a=r(Ut,"P",{});var Bd=i(_a);Xf=s(Bd,"This model inherits from "),or=r(Bd,"A",{href:!0});var Fb=i(or);Af=s(Fb,"TFPreTrainedModel"),Fb.forEach(t),Sf=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),Df=u(Ut),ba=r(Ut,"P",{});var Vd=i(ba);Qf=s(Vd,"This model is also a "),ya=r(Vd,"A",{href:!0,rel:!0});var $b=i(ya);Pf=s($b,"tf.keras.Model"),$b.forEach(t),Yf=s(Vd,` 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.`),Vd.forEach(t),Lf=u(Ut),k(En.$$.fragment,Ut),Hf=u(Ut),gt=r(Ut,"DIV",{class:!0});var Qt=i(gt);k(Ta.$$.fragment,Qt),Of=u(Qt),jo=r(Qt,"P",{});var kr=i(jo);Kf=s(kr,"The "),nr=r(kr,"A",{href:!0});var Eb=i(nr);eg=s(Eb,"TFFlaubertForQuestionAnsweringSimple"),Eb.forEach(t),tg=s(kr," forward method, overrides the "),Gi=r(kr,"CODE",{});var jb=i(Gi);og=s(jb,"__call__"),jb.forEach(t),ng=s(kr," special method."),kr.forEach(t),sg=u(Qt),k(jn.$$.fragment,Qt),ag=u(Qt),k(Cn.$$.fragment,Qt),rg=u(Qt),k(Jn.$$.fragment,Qt),Qt.forEach(t),Ut.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(B,"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(Pt,"class","relative group"),f(Ea,"href","/docs/transformers/main/en/model_doc/flaubert#transformers.FlaubertModel"),f(ja,"href","/docs/transformers/main/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/main/en/main_classes/configuration#transformers.PretrainedConfig"),f(Ja,"href","/docs/transformers/main/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(zo,"id","transformers.FlaubertTokenizer"),f(zo,"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(zo,"href","#transformers.FlaubertTokenizer"),f(Lt,"class","relative group"),f(za,"href","/docs/transformers/main/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(Uo,"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(Pe,"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/main/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/main/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/main/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(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(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/main/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/main/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(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(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(Ba,"href","/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel"),f(ws,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),f(ws,"rel","nofollow"),f(Va,"href","/docs/transformers/main/en/model_doc/flaubert#transformers.FlaubertForMultipleChoice"),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(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(Po,"id","transformers.FlaubertForTokenClassification"),f(Po,"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(Po,"href","#transformers.FlaubertForTokenClassification"),f(io,"class","relative group"),f(Ga,"href","/docs/transformers/main/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/main/en/model_doc/flaubert#transformers.FlaubertForTokenClassification"),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(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/main/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/main/en/model_doc/flaubert#transformers.FlaubertForQuestionAnsweringSimple"),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(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/main/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/main/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/main/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(Pa,"href","/docs/transformers/main/en/main_classes/model#transformers.TFPreTrainedModel"),f(Ys,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),f(Ys,"rel","nofollow"),f(Ya,"href","/docs/transformers/main/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(La,"href","/docs/transformers/main/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/main/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(ko,"class","relative group"),f(Oa,"href","/docs/transformers/main/en/main_classes/model#transformers.TFPreTrainedModel"),f(ia,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),f(ia,"rel","nofollow"),f(Ka,"href","/docs/transformers/main/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(wn,"id","transformers.TFFlaubertForTokenClassification"),f(wn,"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(wn,"href","#transformers.TFFlaubertForTokenClassification"),f(Mo,"class","relative group"),f(er,"href","/docs/transformers/main/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/main/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/main/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/main/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),v(l,y,null),e(h,c),e(h,J),e(J,we),_(o,ge,b),_(o,B,b),e(B,ce),e(ce,O),e(B,ke),e(B,X),e(X,pe),_(o,P,b),_(o,te,b),e(te,ae),e(ae,S),v(le,S,null),e(te,ve),e(te,D),e(D,Me),_(o,_e,b),_(o,V,b),e(V,Fe),e(V,de),e(de,oe),e(V,U),_(o,x,b),_(o,ue,b),e(ue,Y),_(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,ze),_(o,q,b),_(o,me,b),e(me,L),_(o,Te,b),_(o,K,b),e(K,I),e(I,Ue),_(o,W,b),_(o,ne,b),e(ne,re),e(re,g),v(j,g,null),e(ne,Ve),e(ne,ee),e(ee,Ge),_(o,Be,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,vr),e(vr,$a),e($a,Gd),_(o,bl,b),_(o,Pt,b),e(Pt,Jo),e(Jo,Mr),v(Xn,Mr,null),e(Pt,Rd),e(Pt,Fr),e(Fr,Xd),_(o,yl,b),_(o,Nt,b),v(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,Pd),e(It,Yd),e(It,Sn),e(Sn,Ld),e(It,Hd),e(Nt,Od),e(Nt,Yt),e(Yt,Kd),e(Yt,Ca),e(Ca,ec),e(Yt,tc),e(Yt,Ja),e(Ja,oc),e(Yt,nc),_(o,Tl,b),_(o,Lt,b),e(Lt,zo),e(zo,$r),v(Dn,$r,null),e(Lt,sc),e(Lt,Er),e(Er,ac),_(o,wl,b),_(o,Pe,b),v(Qn,Pe,null),e(Pe,rc),e(Pe,jr),e(jr,ic),e(Pe,lc),e(Pe,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,zr),e(zr,mc),e(Wt,fc),e(Wt,Ur),e(Ur,gc),e(Wt,_c),e(Wt,Nr),e(Nr,bc),e(Wt,yc),e(xt,Tc),e(xt,Pn),e(Pn,wc),e(Pn,Ir),e(Ir,kc),e(Pn,vc),e(Pe,Mc),e(Pe,Yn),e(Yn,Fc),e(Yn,za),e(za,$c),e(Yn,Ec),e(Pe,jc),e(Pe,Zt),v(Ln,Zt,null),e(Zt,Cc),e(Zt,xr),e(xr,Jc),e(Zt,zc),e(Zt,Hn),e(Hn,Ua),e(Ua,Uc),e(Ua,Wr),e(Wr,Nc),e(Hn,Ic),e(Hn,Na),e(Na,xc),e(Na,Zr),e(Zr,Wc),e(Pe,Zc),e(Pe,Uo),v(On,Uo,null),e(Uo,qc),e(Uo,qr),e(qr,Bc),e(Pe,Vc),e(Pe,bt),v(Kn,bt,null),e(bt,Gc),e(bt,Br),e(Br,Rc),e(bt,Xc),v(No,bt,null),e(bt,Ac),e(bt,Ht),e(Ht,Sc),e(Ht,Vr),e(Vr,Dc),e(Ht,Qc),e(Ht,Gr),e(Gr,Pc),e(Ht,Yc),e(Pe,Lc),e(Pe,Io),v(es,Io,null),e(Io,Hc),e(Io,ts),e(ts,Oc),e(ts,Rr),e(Rr,Kc),e(ts,ep),_(o,kl,b),_(o,Ot,b),e(Ot,xo),e(xo,Xr),v(os,Xr,null),e(Ot,tp),e(Ot,Ar),e(Ar,op),_(o,vl,b),_(o,Kt,b),v(ns,Kt,null),e(Kt,np),e(Kt,yt),v(ss,yt,null),e(yt,sp),e(yt,eo),e(eo,ap),e(eo,Ia),e(Ia,rp),e(eo,ip),e(eo,Sr),e(Sr,lp),e(eo,dp),e(yt,cp),v(Wo,yt,null),e(yt,pp),v(Zo,yt,null),_(o,Ml,b),_(o,to,b),e(to,qo),e(qo,Dr),v(as,Dr,null),e(to,up),e(to,Qr),e(Qr,hp),_(o,Fl,b),_(o,it,b),v(rs,it,null),e(it,mp),e(it,Pr),e(Pr,fp),e(it,gp),e(it,is),e(is,_p),e(is,xa),e(xa,bp),e(is,yp),e(it,Tp),e(it,ls),e(ls,wp),e(ls,ds),e(ds,kp),e(ls,vp),e(it,Mp),e(it,Tt),v(cs,Tt,null),e(Tt,Fp),e(Tt,oo),e(oo,$p),e(oo,Wa),e(Wa,Ep),e(oo,jp),e(oo,Yr),e(Yr,Cp),e(oo,Jp),e(Tt,zp),v(Bo,Tt,null),e(Tt,Up),v(Vo,Tt,null),_(o,$l,b),_(o,no,b),e(no,Go),e(Go,Lr),v(ps,Lr,null),e(no,Np),e(no,Hr),e(Hr,Ip),_(o,El,b),_(o,lt,b),v(us,lt,null),e(lt,xp),e(lt,Or),e(Or,Wp),e(lt,Zp),e(lt,hs),e(hs,qp),e(hs,Za),e(Za,Bp),e(hs,Vp),e(lt,Gp),e(lt,ms),e(ms,Rp),e(ms,fs),e(fs,Xp),e(ms,Ap),e(lt,Sp),e(lt,ut),v(gs,ut,null),e(ut,Dp),e(ut,so),e(so,Qp),e(so,qa),e(qa,Pp),e(so,Yp),e(so,Kr),e(Kr,Lp),e(so,Hp),e(ut,Op),v(Ro,ut,null),e(ut,Kp),v(Xo,ut,null),e(ut,eu),v(Ao,ut,null),_(o,jl,b),_(o,ao,b),e(ao,So),e(So,ei),v(_s,ei,null),e(ao,tu),e(ao,ti),e(ti,ou),_(o,Cl,b),_(o,dt,b),v(bs,dt,null),e(dt,nu),e(dt,oi),e(oi,su),e(dt,au),e(dt,ys),e(ys,ru),e(ys,Ba),e(Ba,iu),e(ys,lu),e(dt,du),e(dt,Ts),e(Ts,cu),e(Ts,ws),e(ws,pu),e(Ts,uu),e(dt,hu),e(dt,wt),v(ks,wt,null),e(wt,mu),e(wt,ro),e(ro,fu),e(ro,Va),e(Va,gu),e(ro,_u),e(ro,ni),e(ni,bu),e(ro,yu),e(wt,Tu),v(Do,wt,null),e(wt,wu),v(Qo,wt,null),_(o,Jl,b),_(o,io,b),e(io,Po),e(Po,si),v(vs,si,null),e(io,ku),e(io,ai),e(ai,vu),_(o,zl,b),_(o,ct,b),v(Ms,ct,null),e(ct,Mu),e(ct,ri),e(ri,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,zu),e($s,Es),e(Es,Uu),e($s,Nu),e(ct,Iu),e(ct,kt),v(js,kt,null),e(kt,xu),e(kt,lo),e(lo,Wu),e(lo,Ra),e(Ra,Zu),e(lo,qu),e(lo,ii),e(ii,Bu),e(lo,Vu),e(kt,Gu),v(Yo,kt,null),e(kt,Ru),v(Lo,kt,null),_(o,Ul,b),_(o,co,b),e(co,Ho),e(Ho,li),v(Cs,li,null),e(co,Xu),e(co,di),e(di,Au),_(o,Nl,b),_(o,pt,b),v(Js,pt,null),e(pt,Su),e(pt,po),e(po,Du),e(po,ci),e(ci,Qu),e(po,Pu),e(po,pi),e(pi,Yu),e(po,Lu),e(pt,Hu),e(pt,zs),e(zs,Ou),e(zs,Xa),e(Xa,Ku),e(zs,eh),e(pt,th),e(pt,Us),e(Us,oh),e(Us,Ns),e(Ns,nh),e(Us,sh),e(pt,ah),e(pt,vt),v(Is,vt,null),e(vt,rh),e(vt,uo),e(uo,ih),e(uo,Aa),e(Aa,lh),e(uo,dh),e(uo,ui),e(ui,ch),e(uo,ph),e(vt,uh),v(Oo,vt,null),e(vt,hh),v(Ko,vt,null),_(o,Il,b),_(o,ho,b),e(ho,en),e(en,hi),v(xs,hi,null),e(ho,mh),e(ho,mi),e(mi,fh),_(o,xl,b),_(o,mo,b),v(Ws,mo,null),e(mo,gh),e(mo,ht),v(Zs,ht,null),e(ht,_h),e(ht,fo),e(fo,bh),e(fo,Sa),e(Sa,yh),e(fo,Th),e(fo,fi),e(fi,wh),e(fo,kh),e(ht,vh),v(tn,ht,null),e(ht,Mh),e(ht,qs),e(qs,Fh),e(qs,gi),e(gi,$h),e(qs,Eh),e(ht,jh),v(on,ht,null),_(o,Wl,b),_(o,go,b),e(go,nn),e(nn,_i),v(Bs,_i,null),e(go,Ch),e(go,bi),e(bi,Jh),_(o,Zl,b),_(o,et,b),v(Vs,et,null),e(et,zh),e(et,yi),e(yi,Uh),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,Bh),e(Rs,Vh),e(et,Gh),v(sn,et,null),e(et,Rh),e(et,Mt),v(As,Mt,null),e(Mt,Xh),e(Mt,_o),e(_o,Ah),e(_o,Qa),e(Qa,Sh),e(_o,Dh),e(_o,Ti),e(Ti,Qh),e(_o,Ph),e(Mt,Yh),v(an,Mt,null),e(Mt,Lh),v(rn,Mt,null),_(o,ql,b),_(o,bo,b),e(bo,ln),e(ln,wi),v(Ss,wi,null),e(bo,Hh),e(bo,ki),e(ki,Oh),_(o,Bl,b),_(o,tt,b),v(Ds,tt,null),e(tt,Kh),e(tt,vi),e(vi,em),e(tt,tm),e(tt,Qs),e(Qs,om),e(Qs,Pa),e(Pa,nm),e(Qs,sm),e(tt,am),e(tt,Ps),e(Ps,rm),e(Ps,Ys),e(Ys,im),e(Ps,lm),e(tt,dm),v(dn,tt,null),e(tt,cm),e(tt,Ft),v(Ls,Ft,null),e(Ft,pm),e(Ft,yo),e(yo,um),e(yo,Ya),e(Ya,hm),e(yo,mm),e(yo,Mi),e(Mi,fm),e(yo,gm),e(Ft,_m),v(cn,Ft,null),e(Ft,bm),v(pn,Ft,null),_(o,Vl,b),_(o,To,b),e(To,un),e(un,Fi),v(Hs,Fi,null),e(To,ym),e(To,$i),e($i,Tm),_(o,Gl,b),_(o,ot,b),v(Os,ot,null),e(ot,wm),e(ot,Ei),e(Ei,km),e(ot,vm),e(ot,Ks),e(Ks,Mm),e(Ks,La),e(La,Fm),e(Ks,$m),e(ot,Em),e(ot,ea),e(ea,jm),e(ea,ta),e(ta,Cm),e(ea,Jm),e(ot,zm),v(hn,ot,null),e(ot,Um),e(ot,mt),v(oa,mt,null),e(mt,Nm),e(mt,wo),e(wo,Im),e(wo,Ha),e(Ha,xm),e(wo,Wm),e(wo,ji),e(ji,Zm),e(wo,qm),e(mt,Bm),v(mn,mt,null),e(mt,Vm),v(fn,mt,null),e(mt,Gm),v(gn,mt,null),_(o,Rl,b),_(o,ko,b),e(ko,_n),e(_n,Ci),v(na,Ci,null),e(ko,Rm),e(ko,Ji),e(Ji,Xm),_(o,Xl,b),_(o,nt,b),v(sa,nt,null),e(nt,Am),e(nt,zi),e(zi,Sm),e(nt,Dm),e(nt,aa),e(aa,Qm),e(aa,Oa),e(Oa,Pm),e(aa,Ym),e(nt,Lm),e(nt,ra),e(ra,Hm),e(ra,ia),e(ia,Om),e(ra,Km),e(nt,ef),v(bn,nt,null),e(nt,tf),e(nt,$t),v(la,$t,null),e($t,of),e($t,vo),e(vo,nf),e(vo,Ka),e(Ka,sf),e(vo,af),e(vo,Ui),e(Ui,rf),e(vo,lf),e($t,df),v(yn,$t,null),e($t,cf),v(Tn,$t,null),_(o,Al,b),_(o,Mo,b),e(Mo,wn),e(wn,Ni),v(da,Ni,null),e(Mo,pf),e(Mo,Ii),e(Ii,uf),_(o,Sl,b),_(o,st,b),v(ca,st,null),e(st,hf),e(st,xi),e(xi,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,wf),e(ua,kf),e(st,vf),v(kn,st,null),e(st,Mf),e(st,ft),v(ma,ft,null),e(ft,Ff),e(ft,Fo),e(Fo,$f),e(Fo,tr),e(tr,Ef),e(Fo,jf),e(Fo,Wi),e(Wi,Cf),e(Fo,Jf),e(ft,zf),v(vn,ft,null),e(ft,Uf),v(Mn,ft,null),e(ft,Nf),v(Fn,ft,null),_(o,Dl,b),_(o,$o,b),e($o,$n),e($n,Zi),v(fa,Zi,null),e($o,If),e($o,qi),e(qi,xf),_(o,Ql,b),_(o,at,b),v(ga,at,null),e(at,Wf),e(at,Eo),e(Eo,Zf),e(Eo,Bi),e(Bi,qf),e(Eo,Bf),e(Eo,Vi),e(Vi,Vf),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,Pf),e(ba,Yf),e(at,Lf),v(En,at,null),e(at,Hf),e(at,gt),v(Ta,gt,null),e(gt,Of),e(gt,jo),e(jo,Kf),e(jo,nr),e(nr,eg),e(jo,tg),e(jo,Gi),e(Gi,og),e(jo,ng),e(gt,sg),v(jn,gt,null),e(gt,ag),v(Cn,gt,null),e(gt,rg),v(Jn,gt,null),Pl=!0},p(o,[b]){const wa={};b&2&&(wa.$$scope={dirty:b,ctx:o}),No.$set(wa);const Ri={};b&2&&(Ri.$$scope={dirty:b,ctx:o}),Wo.$set(Ri);const Xi={};b&2&&(Xi.$$scope={dirty:b,ctx:o}),Zo.$set(Xi);const Ai={};b&2&&(Ai.$$scope={dirty:b,ctx:o}),Bo.$set(Ai);const ka={};b&2&&(ka.$$scope={dirty:b,ctx:o}),Vo.$set(ka);const Si={};b&2&&(Si.$$scope={dirty:b,ctx:o}),Ro.$set(Si);const Di={};b&2&&(Di.$$scope={dirty:b,ctx:o}),Xo.$set(Di);const va={};b&2&&(va.$$scope={dirty:b,ctx:o}),Ao.$set(va);const Qi={};b&2&&(Qi.$$scope={dirty:b,ctx:o}),Do.$set(Qi);const Pi={};b&2&&(Pi.$$scope={dirty:b,ctx:o}),Qo.$set(Pi);const Yi={};b&2&&(Yi.$$scope={dirty:b,ctx:o}),Yo.$set(Yi);const Ma={};b&2&&(Ma.$$scope={dirty:b,ctx:o}),Lo.$set(Ma);const Li={};b&2&&(Li.$$scope={dirty:b,ctx:o}),Oo.$set(Li);const Hi={};b&2&&(Hi.$$scope={dirty:b,ctx:o}),Ko.$set(Hi);const Oi={};b&2&&(Oi.$$scope={dirty:b,ctx:o}),tn.$set(Oi);const Ki={};b&2&&(Ki.$$scope={dirty:b,ctx:o}),on.$set(Ki);const Co={};b&2&&(Co.$$scope={dirty:b,ctx:o}),sn.$set(Co);const el={};b&2&&(el.$$scope={dirty:b,ctx:o}),an.$set(el);const tl={};b&2&&(tl.$$scope={dirty:b,ctx:o}),rn.$set(tl);const ol={};b&2&&(ol.$$scope={dirty:b,ctx:o}),dn.$set(ol);const nl={};b&2&&(nl.$$scope={dirty:b,ctx:o}),cn.$set(nl);const sl={};b&2&&(sl.$$scope={dirty:b,ctx:o}),pn.$set(sl);const Fa={};b&2&&(Fa.$$scope={dirty:b,ctx:o}),hn.$set(Fa);const al={};b&2&&(al.$$scope={dirty:b,ctx:o}),mn.$set(al);const rl={};b&2&&(rl.$$scope={dirty:b,ctx:o}),fn.$set(rl);const il={};b&2&&(il.$$scope={dirty:b,ctx:o}),gn.$set(il);const _t={};b&2&&(_t.$$scope={dirty:b,ctx:o}),bn.$set(_t);const ll={};b&2&&(ll.$$scope={dirty:b,ctx:o}),yn.$set(ll);const dl={};b&2&&(dl.$$scope={dirty:b,ctx:o}),Tn.$set(dl);const cl={};b&2&&(cl.$$scope={dirty:b,ctx:o}),kn.$set(cl);const pl={};b&2&&(pl.$$scope={dirty:b,ctx:o}),vn.$set(pl);const ul={};b&2&&(ul.$$scope={dirty:b,ctx:o}),Mn.$set(ul);const hl={};b&2&&(hl.$$scope={dirty:b,ctx:o}),Fn.$set(hl);const ml={};b&2&&(ml.$$scope={dirty:b,ctx:o}),En.$set(ml);const fl={};b&2&&(fl.$$scope={dirty:b,ctx:o}),jn.$set(fl);const gl={};b&2&&(gl.$$scope={dirty:b,ctx:o}),Cn.$set(gl);const _l={};b&2&&(_l.$$scope={dirty:b,ctx:o}),Jn.$set(_l)},i(o){Pl||(M(l.$$.fragment,o),M(le.$$.fragment,o),M(j.$$.fragment,o),M(Xn.$$.fragment,o),M(An.$$.fragment,o),M(Dn.$$.fragment,o),M(Qn.$$.fragment,o),M(Ln.$$.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(Bo.$$.fragment,o),M(Vo.$$.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(ks.$$.fragment,o),M(Do.$$.fragment,o),M(Qo.$$.fragment,o),M(vs.$$.fragment,o),M(Ms.$$.fragment,o),M(js.$$.fragment,o),M(Yo.$$.fragment,o),M(Lo.$$.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(Bs.$$.fragment,o),M(Vs.$$.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(Ls.$$.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(la.$$.fragment,o),M(yn.$$.fragment,o),M(Tn.$$.fragment,o),M(da.$$.fragment,o),M(ca.$$.fragment,o),M(kn.$$.fragment,o),M(ma.$$.fragment,o),M(vn.$$.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),Pl=!0)},o(o){F(l.$$.fragment,o),F(le.$$.fragment,o),F(j.$$.fragment,o),F(Xn.$$.fragment,o),F(An.$$.fragment,o),F(Dn.$$.fragment,o),F(Qn.$$.fragment,o),F(Ln.$$.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(Bo.$$.fragment,o),F(Vo.$$.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(ks.$$.fragment,o),F(Do.$$.fragment,o),F(Qo.$$.fragment,o),F(vs.$$.fragment,o),F(Ms.$$.fragment,o),F(js.$$.fragment,o),F(Yo.$$.fragment,o),F(Lo.$$.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(Bs.$$.fragment,o),F(Vs.$$.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(Ls.$$.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(la.$$.fragment,o),F(yn.$$.fragment,o),F(Tn.$$.fragment,o),F(da.$$.fragment,o),F(ca.$$.fragment,o),F(kn.$$.fragment,o),F(ma.$$.fragment,o),F(vn.$$.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),Pl=!1},d(o){t(d),o&&t(T),o&&t(h),$(l),o&&t(ge),o&&t(B),o&&t(P),o&&t(te),$(le),o&&t(_e),o&&t(V),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(Be),o&&t(C),o&&t(bl),o&&t(Pt),$(Xn),o&&t(yl),o&&t(Nt),$(An),o&&t(Tl),o&&t(Lt),$(Dn),o&&t(wl),o&&t(Pe),$(Qn),$(Ln),$(On),$(Kn),$(No),$(es),o&&t(kl),o&&t(Ot),$(os),o&&t(vl),o&&t(Kt),$(ns),$(ss),$(Wo),$(Zo),o&&t(Ml),o&&t(to),$(as),o&&t(Fl),o&&t(it),$(rs),$(cs),$(Bo),$(Vo),o&&t($l),o&&t(no),$(ps),o&&t(El),o&&t(lt),$(us),$(gs),$(Ro),$(Xo),$(Ao),o&&t(jl),o&&t(ao),$(_s),o&&t(Cl),o&&t(dt),$(bs),$(ks),$(Do),$(Qo),o&&t(Jl),o&&t(io),$(vs),o&&t(zl),o&&t(ct),$(Ms),$(js),$(Yo),$(Lo),o&&t(Ul),o&&t(co),$(Cs),o&&t(Nl),o&&t(pt),$(Js),$(Is),$(Oo),$(Ko),o&&t(Il),o&&t(ho),$(xs),o&&t(xl),o&&t(mo),$(Ws),$(Zs),$(tn),$(on),o&&t(Wl),o&&t(go),$(Bs),o&&t(Zl),o&&t(et),$(Vs),$(sn),$(As),$(an),$(rn),o&&t(ql),o&&t(bo),$(Ss),o&&t(Bl),o&&t(tt),$(Ds),$(dn),$(Ls),$(cn),$(pn),o&&t(Vl),o&&t(To),$(Hs),o&&t(Gl),o&&t(ot),$(Os),$(hn),$(oa),$(mn),$(fn),$(gn),o&&t(Rl),o&&t(ko),$(na),o&&t(Xl),o&&t(nt),$(sa),$(bn),$(la),$(yn),$(Tn),o&&t(Al),o&&t(Mo),$(da),o&&t(Sl),o&&t(st),$(ca),$(kn),$(ma),$(vn),$(Mn),$(Fn),o&&t(Dl),o&&t($o),$(fa),o&&t(Ql),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(z){return Ib(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Ey extends Jb{constructor(d){super();zb(this,d,Ty,by,Ub,{})}}export{Ey as default,yy as metadata};
