import{S as zb,i as Cb,s as jb,e as a,k as p,w as v,t as n,M as Nb,c as r,d as t,m as u,a as i,x as w,h as s,b as f,N as qb,G as e,g as _,y as T,q as F,o as $,B as E,v as Ab,L as Je}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 Ze}from"../../chunks/CodeBlock-hf-doc-builder.js";import{I as Xe}from"../../chunks/IconCopyLink-hf-doc-builder.js";import{E as Ge}from"../../chunks/ExampleCodeBlock-hf-doc-builder.js";function Pb(C){let d,k,h,m,y;return m=new Ze({props:{code:`0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1
| first sequence    | second sequence |`,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"),k=n("pair mask has the following format:"),h=p(),v(m.$$.fragment)},l(l){d=r(l,"P",{});var c=i(d);k=s(c,"pair mask has the following format:"),c.forEach(t),h=u(l),w(m.$$.fragment,l)},m(l,c){_(l,d,c),e(d,k),_(l,h,c),T(m,l,c),y=!0},p:Je,i(l){y||(F(m.$$.fragment,l),y=!0)},o(l){$(m.$$.fragment,l),y=!1},d(l){l&&t(d),l&&t(h),E(m,l)}}}function Ob(C){let d,k,h,m,y;return{c(){d=a("p"),k=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);k=s(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),h=r(c,"CODE",{});var z=i(h);m=s(z,"Module"),z.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,k),e(d,h),e(h,m),e(d,y)},d(l){l&&t(d)}}}function Db(C){let d,k,h,m,y;return m=new Ze({props:{code:`from transformers import AutoTokenizer, FlaubertModel
import torch

tokenizer = AutoTokenizer.from_pretrained("flaubert/flaubert_base_cased")
model = FlaubertModel.from_pretrained("flaubert/flaubert_base_cased")

inputs = tokenizer("Hello, my dog is cute", return_tensors="pt")
outputs = model(**inputs)

last_hidden_states = outputs.last_hidden_state`,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"),k=n("Example:"),h=p(),v(m.$$.fragment)},l(l){d=r(l,"P",{});var c=i(d);k=s(c,"Example:"),c.forEach(t),h=u(l),w(m.$$.fragment,l)},m(l,c){_(l,d,c),e(d,k),_(l,h,c),T(m,l,c),y=!0},p:Je,i(l){y||(F(m.$$.fragment,l),y=!0)},o(l){$(m.$$.fragment,l),y=!1},d(l){l&&t(d),l&&t(h),E(m,l)}}}function Sb(C){let d,k,h,m,y;return{c(){d=a("p"),k=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);k=s(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),h=r(c,"CODE",{});var z=i(h);m=s(z,"Module"),z.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,k),e(d,h),e(h,m),e(d,y)},d(l){l&&t(d)}}}function Lb(C){let d,k,h,m,y;return m=new Ze({props:{code:`from transformers import AutoTokenizer, FlaubertWithLMHeadModel
import torch

tokenizer = AutoTokenizer.from_pretrained("flaubert/flaubert_base_cased")
model = FlaubertWithLMHeadModel.from_pretrained("flaubert/flaubert_base_cased")

inputs = tokenizer("The capital of France is <special1>.", return_tensors="pt")

with torch.no_grad():
    logits = model(**inputs).logits

# retrieve index of <special1>
mask_token_index = (inputs.input_ids == tokenizer.mask_token_id)[0].nonzero(as_tuple=True)[0]

predicted_token_id = logits[0, mask_token_index].argmax(axis=-1)

labels = tokenizer("The capital of France is Paris.", return_tensors="pt")["input_ids"]
# mask labels of non-<special1> tokens
labels = torch.where(inputs.input_ids == tokenizer.mask_token_id, labels, -100)

outputs = model(**inputs, labels=labels)`,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"),k=n("Example:"),h=p(),v(m.$$.fragment)},l(l){d=r(l,"P",{});var c=i(d);k=s(c,"Example:"),c.forEach(t),h=u(l),w(m.$$.fragment,l)},m(l,c){_(l,d,c),e(d,k),_(l,h,c),T(m,l,c),y=!0},p:Je,i(l){y||(F(m.$$.fragment,l),y=!0)},o(l){$(m.$$.fragment,l),y=!1},d(l){l&&t(d),l&&t(h),E(m,l)}}}function Ib(C){let d,k,h,m,y;return{c(){d=a("p"),k=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);k=s(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),h=r(c,"CODE",{});var z=i(h);m=s(z,"Module"),z.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,k),e(d,h),e(h,m),e(d,y)},d(l){l&&t(d)}}}function Wb(C){let d,k,h,m,y;return m=new Ze({props:{code:`import torch
from transformers import AutoTokenizer, FlaubertForSequenceClassification

tokenizer = AutoTokenizer.from_pretrained("flaubert/flaubert_base_cased")
model = FlaubertForSequenceClassification.from_pretrained("flaubert/flaubert_base_cased")

inputs = tokenizer("Hello, my dog is cute", return_tensors="pt")

with torch.no_grad():
    logits = model(**inputs).logits

predicted_class_id = logits.argmax().item()

# To train a model on \`num_labels\` classes, you can pass \`num_labels=num_labels\` to \`.from_pretrained(...)\`
num_labels = len(model.config.id2label)
model = FlaubertForSequenceClassification.from_pretrained("flaubert/flaubert_base_cased", num_labels=num_labels)

labels = torch.tensor([1])
loss = model(**inputs, labels=labels).loss`,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"),k=n("Example of single-label classification:"),h=p(),v(m.$$.fragment)},l(l){d=r(l,"P",{});var c=i(d);k=s(c,"Example of single-label classification:"),c.forEach(t),h=u(l),w(m.$$.fragment,l)},m(l,c){_(l,d,c),e(d,k),_(l,h,c),T(m,l,c),y=!0},p:Je,i(l){y||(F(m.$$.fragment,l),y=!0)},o(l){$(m.$$.fragment,l),y=!1},d(l){l&&t(d),l&&t(h),E(m,l)}}}function Hb(C){let d,k,h,m,y;return m=new Ze({props:{code:`import torch
from transformers import AutoTokenizer, FlaubertForSequenceClassification

tokenizer = AutoTokenizer.from_pretrained("flaubert/flaubert_base_cased")
model = FlaubertForSequenceClassification.from_pretrained("flaubert/flaubert_base_cased", problem_type="multi_label_classification")

inputs = tokenizer("Hello, my dog is cute", return_tensors="pt")

with torch.no_grad():
    logits = model(**inputs).logits

predicted_class_ids = torch.arange(0, logits.shape[-1])[torch.sigmoid(logits).squeeze(dim=0) > 0.5]

# To train a model on \`num_labels\` classes, you can pass \`num_labels=num_labels\` to \`.from_pretrained(...)\`
num_labels = len(model.config.id2label)
model = FlaubertForSequenceClassification.from_pretrained(
    "flaubert/flaubert_base_cased", num_labels=num_labels, problem_type="multi_label_classification"
)

labels = torch.sum(
    torch.nn.functional.one_hot(predicted_class_ids[None, :].clone(), num_classes=num_labels), dim=1
).to(torch.float)
loss = model(**inputs, labels=labels).loss`,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"),k=n("Example of multi-label classification:"),h=p(),v(m.$$.fragment)},l(l){d=r(l,"P",{});var c=i(d);k=s(c,"Example of multi-label classification:"),c.forEach(t),h=u(l),w(m.$$.fragment,l)},m(l,c){_(l,d,c),e(d,k),_(l,h,c),T(m,l,c),y=!0},p:Je,i(l){y||(F(m.$$.fragment,l),y=!0)},o(l){$(m.$$.fragment,l),y=!1},d(l){l&&t(d),l&&t(h),E(m,l)}}}function Ub(C){let d,k,h,m,y;return{c(){d=a("p"),k=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);k=s(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),h=r(c,"CODE",{});var z=i(h);m=s(z,"Module"),z.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,k),e(d,h),e(h,m),e(d,y)},d(l){l&&t(d)}}}function Qb(C){let d,k,h,m,y;return m=new Ze({props:{code:`from transformers import AutoTokenizer, FlaubertForMultipleChoice
import torch

tokenizer = AutoTokenizer.from_pretrained("flaubert/flaubert_base_cased")
model = FlaubertForMultipleChoice.from_pretrained("flaubert/flaubert_base_cased")

prompt = "In Italy, pizza served in formal settings, such as at a restaurant, is presented unsliced."
choice0 = "It is eaten with a fork and a knife."
choice1 = "It is eaten while held in the hand."
labels = torch.tensor(0).unsqueeze(0)  # choice0 is correct (according to Wikipedia ;)), batch size 1

encoding = tokenizer([prompt, prompt], [choice0, choice1], return_tensors="pt", padding=True)
outputs = model(**{k: v.unsqueeze(0) for k, v in encoding.items()}, labels=labels)  # batch size is 1

# the linear classifier still needs to be trained
loss = outputs.loss
logits = outputs.logits`,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"),k=n("Example:"),h=p(),v(m.$$.fragment)},l(l){d=r(l,"P",{});var c=i(d);k=s(c,"Example:"),c.forEach(t),h=u(l),w(m.$$.fragment,l)},m(l,c){_(l,d,c),e(d,k),_(l,h,c),T(m,l,c),y=!0},p:Je,i(l){y||(F(m.$$.fragment,l),y=!0)},o(l){$(m.$$.fragment,l),y=!1},d(l){l&&t(d),l&&t(h),E(m,l)}}}function Bb(C){let d,k,h,m,y;return{c(){d=a("p"),k=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);k=s(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),h=r(c,"CODE",{});var z=i(h);m=s(z,"Module"),z.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,k),e(d,h),e(h,m),e(d,y)},d(l){l&&t(d)}}}function Rb(C){let d,k,h,m,y;return m=new Ze({props:{code:`from transformers import AutoTokenizer, FlaubertForTokenClassification
import torch

tokenizer = AutoTokenizer.from_pretrained("flaubert/flaubert_base_cased")
model = FlaubertForTokenClassification.from_pretrained("flaubert/flaubert_base_cased")

inputs = tokenizer(
    "HuggingFace is a company based in Paris and New York", add_special_tokens=False, return_tensors="pt"
)

with torch.no_grad():
    logits = model(**inputs).logits

predicted_token_class_ids = logits.argmax(-1)

# Note that tokens are classified rather then input words which means that
# there might be more predicted token classes than words.
# Multiple token classes might account for the same word
predicted_tokens_classes = [model.config.id2label[t.item()] for t in predicted_token_class_ids[0]]

labels = predicted_token_class_ids
loss = model(**inputs, labels=labels).loss`,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"),k=n("Example:"),h=p(),v(m.$$.fragment)},l(l){d=r(l,"P",{});var c=i(d);k=s(c,"Example:"),c.forEach(t),h=u(l),w(m.$$.fragment,l)},m(l,c){_(l,d,c),e(d,k),_(l,h,c),T(m,l,c),y=!0},p:Je,i(l){y||(F(m.$$.fragment,l),y=!0)},o(l){$(m.$$.fragment,l),y=!1},d(l){l&&t(d),l&&t(h),E(m,l)}}}function Kb(C){let d,k,h,m,y;return{c(){d=a("p"),k=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);k=s(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),h=r(c,"CODE",{});var z=i(h);m=s(z,"Module"),z.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,k),e(d,h),e(h,m),e(d,y)},d(l){l&&t(d)}}}function Vb(C){let d,k,h,m,y;return m=new Ze({props:{code:`from transformers import AutoTokenizer, FlaubertForQuestionAnsweringSimple
import torch

tokenizer = AutoTokenizer.from_pretrained("flaubert/flaubert_base_cased")
model = FlaubertForQuestionAnsweringSimple.from_pretrained("flaubert/flaubert_base_cased")

question, text = "Who was Jim Henson?", "Jim Henson was a nice puppet"

inputs = tokenizer(question, text, return_tensors="pt")
with torch.no_grad():
    outputs = model(**inputs)

answer_start_index = outputs.start_logits.argmax()
answer_end_index = outputs.end_logits.argmax()

predict_answer_tokens = inputs.input_ids[0, answer_start_index : answer_end_index + 1]

# target is "nice puppet"
target_start_index = torch.tensor([14])
target_end_index = torch.tensor([15])

outputs = model(**inputs, start_positions=target_start_index, end_positions=target_end_index)
loss = outputs.loss`,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"),k=n("Example:"),h=p(),v(m.$$.fragment)},l(l){d=r(l,"P",{});var c=i(d);k=s(c,"Example:"),c.forEach(t),h=u(l),w(m.$$.fragment,l)},m(l,c){_(l,d,c),e(d,k),_(l,h,c),T(m,l,c),y=!0},p:Je,i(l){y||(F(m.$$.fragment,l),y=!0)},o(l){$(m.$$.fragment,l),y=!1},d(l){l&&t(d),l&&t(h),E(m,l)}}}function Yb(C){let d,k,h,m,y;return{c(){d=a("p"),k=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);k=s(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),h=r(c,"CODE",{});var z=i(h);m=s(z,"Module"),z.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,k),e(d,h),e(h,m),e(d,y)},d(l){l&&t(d)}}}function Xb(C){let d,k,h,m,y;return m=new Ze({props:{code:`from transformers import XLMTokenizer, XLMForQuestionAnswering
import torch

tokenizer = XLMTokenizer.from_pretrained("xlm-mlm-en-2048")
model = XLMForQuestionAnswering.from_pretrained("xlm-mlm-en-2048")

input_ids = torch.tensor(tokenizer.encode("Hello, my dog is cute", add_special_tokens=True)).unsqueeze(
    0
)  # Batch size 1
start_positions = torch.tensor([1])
end_positions = torch.tensor([3])

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

tokenizer = AutoTokenizer.from_pretrained("flaubert/flaubert_base_cased")
model = TFFlaubertModel.from_pretrained("flaubert/flaubert_base_cased")

inputs = tokenizer("Hello, my dog is cute", return_tensors="tf")
outputs = model(inputs)

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

tokenizer = AutoTokenizer.from_pretrained("flaubert/flaubert_base_cased")
model = TFFlaubertWithLMHeadModel.from_pretrained("flaubert/flaubert_base_cased")

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

tokenizer = AutoTokenizer.from_pretrained("flaubert/flaubert_base_cased")
model = TFFlaubertForSequenceClassification.from_pretrained("flaubert/flaubert_base_cased")

inputs = tokenizer("Hello, my dog is cute", return_tensors="tf")

logits = model(**inputs).logits

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

tokenizer = AutoTokenizer.from_pretrained("flaubert/flaubert_base_cased")
model = TFFlaubertForMultipleChoice.from_pretrained("flaubert/flaubert_base_cased")

prompt = "In Italy, pizza served in formal settings, such as at a restaurant, is presented unsliced."
choice0 = "It is eaten with a fork and a knife."
choice1 = "It is eaten while held in the hand."

encoding = tokenizer([prompt, prompt], [choice0, choice1], return_tensors="tf", padding=True)
inputs = {k: tf.expand_dims(v, 0) for k, v in encoding.items()}
outputs = model(inputs)  # batch size is 1

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

tokenizer = AutoTokenizer.from_pretrained("flaubert/flaubert_base_cased")
model = TFFlaubertForTokenClassification.from_pretrained("flaubert/flaubert_base_cased")

inputs = tokenizer(
    "HuggingFace is a company based in Paris and New York", add_special_tokens=False, return_tensors="tf"
)

logits = model(**inputs).logits
predicted_token_class_ids = tf.math.argmax(logits, axis=-1)

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

tokenizer = AutoTokenizer.from_pretrained("flaubert/flaubert_base_cased")
model = TFFlaubertForQuestionAnsweringSimple.from_pretrained("flaubert/flaubert_base_cased")

question, text = "Who was Jim Henson?", "Jim Henson was a nice puppet"

inputs = tokenizer(question, text, return_tensors="tf")
outputs = model(**inputs)

answer_start_index = int(tf.math.argmax(outputs.start_logits, axis=-1)[0])
answer_end_index = int(tf.math.argmax(outputs.end_logits, axis=-1)[0])

predict_answer_tokens = inputs.input_ids[0, answer_start_index : answer_end_index + 1]`,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"),k=n("Example:"),h=p(),v(m.$$.fragment)},l(l){d=r(l,"P",{});var c=i(d);k=s(c,"Example:"),c.forEach(t),h=u(l),w(m.$$.fragment,l)},m(l,c){_(l,d,c),e(d,k),_(l,h,c),T(m,l,c),y=!0},p:Je,i(l){y||(F(m.$$.fragment,l),y=!0)},o(l){$(m.$$.fragment,l),y=!1},d(l){l&&t(d),l&&t(h),E(m,l)}}}function _y(C){let d,k;return d=new Ze({props:{code:`# target is "nice puppet"
target_start_index = tf.constant([14])
target_end_index = tf.constant([15])

outputs = model(**inputs, start_positions=target_start_index, end_positions=target_end_index)
loss = tf.math.reduce_mean(outputs.loss)`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># target is &quot;nice puppet&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>target_start_index = tf.constant([<span class="hljs-number">14</span>])
<span class="hljs-meta">&gt;&gt;&gt; </span>target_end_index = tf.constant([<span class="hljs-number">15</span>])

<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs, start_positions=target_start_index, end_positions=target_end_index)
<span class="hljs-meta">&gt;&gt;&gt; </span>loss = tf.math.reduce_mean(outputs.loss)`}}),{c(){v(d.$$.fragment)},l(h){w(d.$$.fragment,h)},m(h,m){T(d,h,m),k=!0},p:Je,i(h){k||(F(d.$$.fragment,h),k=!0)},o(h){$(d.$$.fragment,h),k=!1},d(h){E(d,h)}}}function by(C){let d,k,h,m,y,l,c,z,ve,ge,L,ce,J,M,we,U,pe,Ne,V,te,ae,B,le,Te,R,Fe,_e,I,$e,de,oe,j,P,ue,Y,be,he,K,Ee,ye,N,Me,W,xe,qe,H,ze,Ce,S,me,X,ke,Z,A,je,O,ne,re,g,x,Ie,ee,We,Le,q,Oe,Ae,He,Ue,De,D,G,Qe,Se,Q,Be,Re,fe,Pe,se,Ke,Tr,Ea,Wd,bl,Vt,zo,Fr,Un,Hd,$r,Ud,yl,Nt,Qn,Qd,At,Bd,Ma,Rd,Kd,xa,Vd,Yd,Bn,Xd,Gd,Jd,Yt,Zd,qa,ec,tc,za,oc,nc,kl,Xt,Co,Er,Rn,sc,Mr,ac,vl,Ve,Kn,rc,xr,ic,lc,Pt,qr,dc,cc,zr,pc,uc,Ot,hc,Cr,mc,fc,jr,gc,_c,Nr,bc,yc,kc,Vn,vc,Ar,wc,Tc,Fc,Yn,$c,Ca,Ec,Mc,xc,Dt,Xn,qc,Pr,zc,Cc,Gn,ja,jc,Or,Nc,Ac,Na,Pc,Dr,Oc,Dc,jo,Jn,Sc,Sr,Lc,Ic,bt,Zn,Wc,Lr,Hc,Uc,No,Qc,Gt,Bc,Ir,Rc,Kc,Wr,Vc,Yc,Xc,Ao,es,Gc,ts,Jc,Hr,Zc,ep,wl,Jt,Po,Ur,os,tp,Qr,op,Tl,Zt,ns,np,yt,ss,sp,eo,ap,Aa,rp,ip,Br,lp,dp,cp,Oo,pp,Do,Fl,to,So,Rr,as,up,Kr,hp,$l,it,rs,mp,Vr,fp,gp,is,_p,Pa,bp,yp,kp,ls,vp,ds,wp,Tp,Fp,kt,cs,$p,oo,Ep,Oa,Mp,xp,Yr,qp,zp,Cp,Lo,jp,Io,El,no,Wo,Xr,ps,Np,Gr,Ap,Ml,lt,us,Pp,Jr,Op,Dp,hs,Sp,Da,Lp,Ip,Wp,ms,Hp,fs,Up,Qp,Bp,ut,gs,Rp,so,Kp,Sa,Vp,Yp,Zr,Xp,Gp,Jp,Ho,Zp,Uo,eu,Qo,xl,ao,Bo,ei,_s,tu,ti,ou,ql,dt,bs,nu,oi,su,au,ys,ru,La,iu,lu,du,ks,cu,vs,pu,uu,hu,vt,ws,mu,ro,fu,Ia,gu,_u,ni,bu,yu,ku,Ro,vu,Ko,zl,io,Vo,si,Ts,wu,ai,Tu,Cl,ct,Fs,Fu,ri,$u,Eu,$s,Mu,Wa,xu,qu,zu,Es,Cu,Ms,ju,Nu,Au,wt,xs,Pu,lo,Ou,Ha,Du,Su,ii,Lu,Iu,Wu,Yo,Hu,Xo,jl,co,Go,li,qs,Uu,di,Qu,Nl,pt,zs,Bu,po,Ru,ci,Ku,Vu,pi,Yu,Xu,Gu,Cs,Ju,Ua,Zu,eh,th,js,oh,Ns,nh,sh,ah,Tt,As,rh,uo,ih,Qa,lh,dh,ui,ch,ph,uh,Jo,hh,Zo,Al,ho,en,hi,Ps,mh,mi,fh,Pl,mo,Os,gh,ht,Ds,_h,fo,bh,Ba,yh,kh,fi,vh,wh,Th,tn,Fh,Ss,$h,gi,Eh,Mh,xh,on,Ol,go,nn,_i,Ls,qh,bi,zh,Dl,et,Is,Ch,yi,jh,Nh,Ws,Ah,Ra,Ph,Oh,Dh,Hs,Sh,Us,Lh,Ih,Wh,sn,Hh,Ft,Qs,Uh,_o,Qh,Ka,Bh,Rh,ki,Kh,Vh,Yh,an,Xh,rn,Sl,bo,ln,vi,Bs,Gh,wi,Jh,Ll,tt,Rs,Zh,Ti,em,tm,Ks,om,Va,nm,sm,am,Vs,rm,Ys,im,lm,dm,dn,cm,$t,Xs,pm,yo,um,Ya,hm,mm,Fi,fm,gm,_m,cn,bm,pn,Il,ko,un,$i,Gs,ym,Ei,km,Wl,ot,Js,vm,Mi,wm,Tm,Zs,Fm,Xa,$m,Em,Mm,ea,xm,ta,qm,zm,Cm,hn,jm,mt,oa,Nm,vo,Am,Ga,Pm,Om,xi,Dm,Sm,Lm,mn,Im,fn,Wm,gn,Hl,wo,_n,qi,na,Hm,zi,Um,Ul,nt,sa,Qm,Ci,Bm,Rm,aa,Km,Ja,Vm,Ym,Xm,ra,Gm,ia,Jm,Zm,ef,bn,tf,Et,la,of,To,nf,Za,sf,af,ji,rf,lf,df,yn,cf,kn,Ql,Fo,vn,Ni,da,pf,Ai,uf,Bl,st,ca,hf,Pi,mf,ff,pa,gf,er,_f,bf,yf,ua,kf,ha,vf,wf,Tf,wn,Ff,ft,ma,$f,$o,Ef,tr,Mf,xf,Oi,qf,zf,Cf,Tn,jf,Fn,Nf,$n,Rl,Eo,En,Di,fa,Af,Si,Pf,Kl,at,ga,Of,Mo,Df,Li,Sf,Lf,Ii,If,Wf,Hf,_a,Uf,or,Qf,Bf,Rf,ba,Kf,ya,Vf,Yf,Xf,Mn,Gf,gt,ka,Jf,xo,Zf,nr,eg,tg,Wi,og,ng,sg,xn,ag,qn,rg,zn,Vl;return l=new Xe({}),le=new Xe({}),x=new Xe({}),Un=new Xe({}),Qn=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/v4.27.1/en/model_doc/flaubert#transformers.FlaubertModel">FlaubertModel</a> or <a href="/docs/transformers/v4.27.1/en/model_doc/flaubert#transformers.TFFlaubertModel">TFFlaubertModel</a>.`,name:"vocab_size"},{anchor:"transformers.FlaubertConfig.emb_dim",description:`<strong>emb_dim</strong> (<code>int</code>, <em>optional</em>, defaults to 2048) &#x2014;
Dimensionality of the encoder layers and the pooler layer.`,name:"emb_dim"},{anchor:"transformers.FlaubertConfig.n_layer",description:`<strong>n_layer</strong> (<code>int</code>, <em>optional</em>, defaults to 12) &#x2014;
Number of hidden layers in the Transformer encoder.`,name:"n_layer"},{anchor:"transformers.FlaubertConfig.n_head",description:`<strong>n_head</strong> (<code>int</code>, <em>optional</em>, defaults to 16) &#x2014;
Number of attention heads for each attention layer in the Transformer encoder.`,name:"n_head"},{anchor:"transformers.FlaubertConfig.dropout",description:`<strong>dropout</strong> (<code>float</code>, <em>optional</em>, defaults to 0.1) &#x2014;
The dropout probability for all fully connected layers in the embeddings, encoder, and pooler.`,name:"dropout"},{anchor:"transformers.FlaubertConfig.attention_dropout",description:`<strong>attention_dropout</strong> (<code>float</code>, <em>optional</em>, defaults to 0.1) &#x2014;
The dropout probability for the attention mechanism`,name:"attention_dropout"},{anchor:"transformers.FlaubertConfig.gelu_activation",description:`<strong>gelu_activation</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to use a <em>gelu</em> activation instead of <em>relu</em>.`,name:"gelu_activation"},{anchor:"transformers.FlaubertConfig.sinusoidal_embeddings",description:`<strong>sinusoidal_embeddings</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to use sinusoidal positional embeddings instead of absolute positional embeddings.`,name:"sinusoidal_embeddings"},{anchor:"transformers.FlaubertConfig.causal",description:`<strong>causal</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not the model should behave in a causal manner. Causal models use a triangular attention mask in
order to only attend to the left-side context instead if a bidirectional context.`,name:"causal"},{anchor:"transformers.FlaubertConfig.asm",description:`<strong>asm</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to use an adaptive log softmax projection layer instead of a linear layer for the prediction
layer.`,name:"asm"},{anchor:"transformers.FlaubertConfig.n_langs",description:`<strong>n_langs</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
The number of languages the model handles. Set to 1 for monolingual models.`,name:"n_langs"},{anchor:"transformers.FlaubertConfig.use_lang_emb",description:`<strong>use_lang_emb</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to use language embeddings. Some models use additional language embeddings, see <a href="http://huggingface.co/transformers/multilingual.html#xlm-language-embeddings" rel="nofollow">the multilingual
models page</a> for information
on how to use them.`,name:"use_lang_emb"},{anchor:"transformers.FlaubertConfig.max_position_embeddings",description:`<strong>max_position_embeddings</strong> (<code>int</code>, <em>optional</em>, defaults to 512) &#x2014;
The maximum sequence length that this model might ever be used with. Typically set this to something large
just in case (e.g., 512 or 1024 or 2048).`,name:"max_position_embeddings"},{anchor:"transformers.FlaubertConfig.embed_init_std",description:`<strong>embed_init_std</strong> (<code>float</code>, <em>optional</em>, defaults to 2048^-0.5) &#x2014;
The standard deviation of the truncated_normal_initializer for initializing the embedding matrices.`,name:"embed_init_std"},{anchor:"transformers.FlaubertConfig.init_std",description:`<strong>init_std</strong> (<code>int</code>, <em>optional</em>, defaults to 50257) &#x2014;
The standard deviation of the truncated_normal_initializer for initializing all weight matrices except the
embedding matrices.`,name:"init_std"},{anchor:"transformers.FlaubertConfig.layer_norm_eps",description:`<strong>layer_norm_eps</strong> (<code>float</code>, <em>optional</em>, defaults to 1e-12) &#x2014;
The epsilon used by the layer normalization layers.`,name:"layer_norm_eps"},{anchor:"transformers.FlaubertConfig.bos_index",description:`<strong>bos_index</strong> (<code>int</code>, <em>optional</em>, defaults to 0) &#x2014;
The index of the beginning of sentence token in the vocabulary.`,name:"bos_index"},{anchor:"transformers.FlaubertConfig.eos_index",description:`<strong>eos_index</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
The index of the end of sentence token in the vocabulary.`,name:"eos_index"},{anchor:"transformers.FlaubertConfig.pad_index",description:`<strong>pad_index</strong> (<code>int</code>, <em>optional</em>, defaults to 2) &#x2014;
The index of the padding token in the vocabulary.`,name:"pad_index"},{anchor:"transformers.FlaubertConfig.unk_index",description:`<strong>unk_index</strong> (<code>int</code>, <em>optional</em>, defaults to 3) &#x2014;
The index of the unknown token in the vocabulary.`,name:"unk_index"},{anchor:"transformers.FlaubertConfig.mask_index",description:`<strong>mask_index</strong> (<code>int</code>, <em>optional</em>, defaults to 5) &#x2014;
The index of the masking token in the vocabulary.`,name:"mask_index"},{anchor:"transformers.FlaubertConfig.is_encoder(bool,",description:`<strong>is_encoder(<code>bool</code>,</strong> <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not the initialized model should be a transformer encoder or decoder as seen in Vaswani et al.`,name:"is_encoder(bool,"},{anchor:"transformers.FlaubertConfig.summary_type",description:`<strong>summary_type</strong> (<code>string</code>, <em>optional</em>, defaults to &#x201C;first&#x201D;) &#x2014;
Argument used when doing sequence summary. Used in the sequence classification and multiple choice models.</p>
<p>Has to be one of the following options:</p>
<ul>
<li><code>&quot;last&quot;</code>: Take the last token hidden state (like XLNet).</li>
<li><code>&quot;first&quot;</code>: Take the first token hidden state (like BERT).</li>
<li><code>&quot;mean&quot;</code>: Take the mean of all tokens hidden states.</li>
<li><code>&quot;cls_index&quot;</code>: Supply a Tensor of classification token position (like GPT/GPT-2).</li>
<li><code>&quot;attn&quot;</code>: Not implemented now, use multi-head attention.</li>
</ul>`,name:"summary_type"},{anchor:"transformers.FlaubertConfig.summary_use_proj",description:`<strong>summary_use_proj</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Argument used when doing sequence summary. Used in the sequence classification and multiple choice models.</p>
<p>Whether or not to add a projection after the vector extraction.`,name:"summary_use_proj"},{anchor:"transformers.FlaubertConfig.summary_activation",description:`<strong>summary_activation</strong> (<code>str</code>, <em>optional</em>) &#x2014;
Argument used when doing sequence summary. Used in the sequence classification and multiple choice models.</p>
<p>Pass <code>&quot;tanh&quot;</code> for a tanh activation to the output, any other value will result in no activation.`,name:"summary_activation"},{anchor:"transformers.FlaubertConfig.summary_proj_to_labels",description:`<strong>summary_proj_to_labels</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Used in the sequence classification and multiple choice models.</p>
<p>Whether the projection outputs should have <code>config.num_labels</code> or <code>config.hidden_size</code> classes.`,name:"summary_proj_to_labels"},{anchor:"transformers.FlaubertConfig.summary_first_dropout",description:`<strong>summary_first_dropout</strong> (<code>float</code>, <em>optional</em>, defaults to 0.1) &#x2014;
Used in the sequence classification and multiple choice models.</p>
<p>The dropout ratio to be used after the projection and activation.`,name:"summary_first_dropout"},{anchor:"transformers.FlaubertConfig.start_n_top",description:`<strong>start_n_top</strong> (<code>int</code>, <em>optional</em>, defaults to 5) &#x2014;
Used in the SQuAD evaluation script.`,name:"start_n_top"},{anchor:"transformers.FlaubertConfig.end_n_top",description:`<strong>end_n_top</strong> (<code>int</code>, <em>optional</em>, defaults to 5) &#x2014;
Used in the SQuAD evaluation script.`,name:"end_n_top"},{anchor:"transformers.FlaubertConfig.mask_token_id",description:`<strong>mask_token_id</strong> (<code>int</code>, <em>optional</em>, defaults to 0) &#x2014;
Model agnostic parameter to identify masked tokens when generating text in an MLM context.`,name:"mask_token_id"},{anchor:"transformers.FlaubertConfig.lang_id",description:`<strong>lang_id</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
The ID of the language used by the model. This parameter is used when generating text in a given language.`,name:"lang_id"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/flaubert/configuration_flaubert.py#L34"}}),Rn=new Xe({}),Kn=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/v4.27.1/src/transformers/models/flaubert/tokenization_flaubert.py#L165"}}),Xn=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/v4.27.1/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>
`}}),Jn=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/v4.27.1/src/transformers/models/flaubert/tokenization_flaubert.py#L470"}}),Zn=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/v4.27.1/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 Ge({props:{anchor:"transformers.FlaubertTokenizer.create_token_type_ids_from_sequences.example",$$slots:{default:[Pb]},$$scope:{ctx:C}}}),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/v4.27.1/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 Xe({}),ns=new ie({props:{name:"class transformers.FlaubertModel",anchor:"transformers.FlaubertModel",parameters:[{name:"config",val:""}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/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/v4.27.1/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.27.1/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/v4.27.1/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/flaubert/modeling_flaubert.py#L476",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.modeling_outputs.BaseModelOutput"
>transformers.modeling_outputs.BaseModelOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.27.1/en/model_doc/flaubert#transformers.FlaubertConfig"
>FlaubertConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>last_hidden_state</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>) \u2014 Sequence of hidden-states at the output of the last layer of the model.</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.modeling_outputs.BaseModelOutput"
>transformers.modeling_outputs.BaseModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Oo=new Ye({props:{$$slots:{default:[Ob]},$$scope:{ctx:C}}}),Do=new Ge({props:{anchor:"transformers.FlaubertModel.forward.example",$$slots:{default:[Db]},$$scope:{ctx:C}}}),as=new Xe({}),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/v4.27.1/en/model_doc/flaubert#transformers.FlaubertConfig">FlaubertConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.27.1/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/flaubert/modeling_flaubert.py#L655"}}),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/v4.27.1/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.27.1/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/v4.27.1/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.FlaubertWithLMHeadModel.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Labels for language modeling. Note that the labels <strong>are shifted</strong> inside the model, i.e. you can set
<code>labels = input_ids</code> Indices are selected in <code>[-100, 0, ..., config.vocab_size]</code> All labels set to <code>-100</code>
are ignored (masked), the loss is only computed for labels in <code>[0, ..., config.vocab_size]</code>`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/flaubert/modeling_flaubert.py#L685",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.modeling_outputs.MaskedLMOutput"
>transformers.modeling_outputs.MaskedLMOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.27.1/en/model_doc/flaubert#transformers.FlaubertConfig"
>FlaubertConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Masked language modeling (MLM) loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, config.vocab_size)</code>) \u2014 Prediction scores of the language modeling head (scores for each vocabulary token before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.modeling_outputs.MaskedLMOutput"
>transformers.modeling_outputs.MaskedLMOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Lo=new Ye({props:{$$slots:{default:[Sb]},$$scope:{ctx:C}}}),Io=new Ge({props:{anchor:"transformers.FlaubertWithLMHeadModel.forward.example",$$slots:{default:[Lb]},$$scope:{ctx:C}}}),ps=new Xe({}),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/v4.27.1/en/model_doc/flaubert#transformers.FlaubertConfig">FlaubertConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.27.1/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/flaubert/modeling_flaubert.py#L753"}}),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/v4.27.1/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.27.1/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/v4.27.1/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.FlaubertForSequenceClassification.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for computing the sequence classification/regression loss. Indices should be in <code>[0, ..., config.num_labels - 1]</code>. If <code>config.num_labels == 1</code> a regression loss is computed (Mean-Square loss), If
<code>config.num_labels &gt; 1</code> a classification loss is computed (Cross-Entropy).`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/flaubert/modeling_flaubert.py#L765",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.modeling_outputs.SequenceClassifierOutput"
>transformers.modeling_outputs.SequenceClassifierOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.27.1/en/model_doc/flaubert#transformers.FlaubertConfig"
>FlaubertConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Classification (or regression if config.num_labels==1) loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, config.num_labels)</code>) \u2014 Classification (or regression if config.num_labels==1) scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.modeling_outputs.SequenceClassifierOutput"
>transformers.modeling_outputs.SequenceClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Ho=new Ye({props:{$$slots:{default:[Ib]},$$scope:{ctx:C}}}),Uo=new Ge({props:{anchor:"transformers.FlaubertForSequenceClassification.forward.example",$$slots:{default:[Wb]},$$scope:{ctx:C}}}),Qo=new Ge({props:{anchor:"transformers.FlaubertForSequenceClassification.forward.example-2",$$slots:{default:[Hb]},$$scope:{ctx:C}}}),_s=new Xe({}),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/v4.27.1/en/model_doc/flaubert#transformers.FlaubertConfig">FlaubertConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.27.1/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/flaubert/modeling_flaubert.py#L1212"}}),ws=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/v4.27.1/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.27.1/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/v4.27.1/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.FlaubertForMultipleChoice.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for computing the multiple choice classification loss. Indices should be in <code>[0, ..., num_choices-1]</code> where <code>num_choices</code> is the size of the second dimension of the input tensors. (See
<code>input_ids</code> above)`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/flaubert/modeling_flaubert.py#L1223",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.modeling_outputs.MultipleChoiceModelOutput"
>transformers.modeling_outputs.MultipleChoiceModelOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.27.1/en/model_doc/flaubert#transformers.FlaubertConfig"
>FlaubertConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <em>(1,)</em>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Classification loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_choices)</code>) \u2014 <em>num_choices</em> is the second dimension of the input tensors. (see <em>input_ids</em> above).</p>
<p>Classification scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.modeling_outputs.MultipleChoiceModelOutput"
>transformers.modeling_outputs.MultipleChoiceModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Ro=new Ye({props:{$$slots:{default:[Ub]},$$scope:{ctx:C}}}),Ko=new Ge({props:{anchor:"transformers.FlaubertForMultipleChoice.forward.example",$$slots:{default:[Qb]},$$scope:{ctx:C}}}),Ts=new Xe({}),Fs=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/v4.27.1/en/model_doc/flaubert#transformers.FlaubertConfig">FlaubertConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.27.1/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/flaubert/modeling_flaubert.py#L856"}}),xs=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/v4.27.1/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.27.1/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/v4.27.1/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.FlaubertForTokenClassification.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Labels for computing the token classification loss. Indices should be in <code>[0, ..., config.num_labels - 1]</code>.`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/flaubert/modeling_flaubert.py#L868",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.modeling_outputs.TokenClassifierOutput"
>transformers.modeling_outputs.TokenClassifierOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.27.1/en/model_doc/flaubert#transformers.FlaubertConfig"
>FlaubertConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided)  \u2014 Classification loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, config.num_labels)</code>) \u2014 Classification scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.27.1/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:[Bb]},$$scope:{ctx:C}}}),Xo=new Ge({props:{anchor:"transformers.FlaubertForTokenClassification.forward.example",$$slots:{default:[Rb]},$$scope:{ctx:C}}}),qs=new Xe({}),zs=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/v4.27.1/en/model_doc/flaubert#transformers.FlaubertConfig">FlaubertConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.27.1/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/flaubert/modeling_flaubert.py#L941"}}),As=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/v4.27.1/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.27.1/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/v4.27.1/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.FlaubertForQuestionAnsweringSimple.forward.start_positions",description:`<strong>start_positions</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for position (index) of the start of the labelled span for computing the token classification loss.
Positions are clamped to the length of the sequence (<code>sequence_length</code>). Position outside of the sequence
are not taken into account for computing the loss.`,name:"start_positions"},{anchor:"transformers.FlaubertForQuestionAnsweringSimple.forward.end_positions",description:`<strong>end_positions</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for position (index) of the end of the labelled span for computing the token classification loss.
Positions are clamped to the length of the sequence (<code>sequence_length</code>). Position outside of the sequence
are not taken into account for computing the loss.`,name:"end_positions"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/flaubert/modeling_flaubert.py#L951",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.modeling_outputs.QuestionAnsweringModelOutput"
>transformers.modeling_outputs.QuestionAnsweringModelOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.27.1/en/model_doc/flaubert#transformers.FlaubertConfig"
>FlaubertConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Total span extraction loss is the sum of a Cross-Entropy for the start and end positions.</p>
</li>
<li>
<p><strong>start_logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>) \u2014 Span-start scores (before SoftMax).</p>
</li>
<li>
<p><strong>end_logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>) \u2014 Span-end scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.modeling_outputs.QuestionAnsweringModelOutput"
>transformers.modeling_outputs.QuestionAnsweringModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Jo=new Ye({props:{$$slots:{default:[Kb]},$$scope:{ctx:C}}}),Zo=new Ge({props:{anchor:"transformers.FlaubertForQuestionAnsweringSimple.forward.example",$$slots:{default:[Vb]},$$scope:{ctx:C}}}),Ps=new Xe({}),Os=new ie({props:{name:"class transformers.FlaubertForQuestionAnswering",anchor:"transformers.FlaubertForQuestionAnswering",parameters:[{name:"config",val:""}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/flaubert/modeling_flaubert.py#L1090"}}),Ds=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/v4.27.1/src/transformers/models/flaubert/modeling_flaubert.py#L1100",returnDescription:`
<p>A <code>transformers.models.flaubert.modeling_flaubert.FlaubertForQuestionAnsweringOutput</code> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.27.1/en/model_doc/flaubert#transformers.FlaubertConfig"
>FlaubertConfig</a>) and inputs.</p>
<ul>
<li><strong>config</strong> (<a
  href="/docs/transformers/v4.27.1/en/model_doc/flaubert#transformers.FlaubertConfig"
>FlaubertConfig</a>): Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a
  href="/docs/transformers/v4.27.1/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:C}}}),on=new Ge({props:{anchor:"transformers.FlaubertForQuestionAnswering.forward.example",$$slots:{default:[Xb]},$$scope:{ctx:C}}}),Ls=new Xe({}),Is=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/v4.27.1/en/model_doc/flaubert#transformers.FlaubertConfig">FlaubertConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.27.1/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/flaubert/modeling_tf_flaubert.py#L244"}}),sn=new Ye({props:{$$slots:{default:[Gb]},$$scope:{ctx:C}}}),Qs=new ie({props:{name:"call",anchor:"transformers.TFFlaubertModel.call",parameters:[{name:"input_ids",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"attention_mask",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"langs",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"token_type_ids",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"position_ids",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"lengths",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"cache",val:": typing.Union[typing.Dict[str, tensorflow.python.framework.ops.Tensor], NoneType] = None"},{name:"head_mask",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"inputs_embeds",val:": typing.Optional[tensorflow.python.framework.ops.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"},{name:"training",val:": typing.Optional[bool] = False"}],parametersDescription:[{anchor:"transformers.TFFlaubertModel.call.input_ids",description:`<strong>input_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.27.1/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.TFFlaubertModel.call.attention_mask",description:`<strong>attention_mask</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li><code>1</code> for tokens that are <strong>not masked</strong>,</li>
<li><code>0</code> for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.TFFlaubertModel.call.langs",description:`<strong>langs</strong> (<code>tf.Tensor</code> or <code>Numpy array</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
A parallel sequence of tokens to be used to indicate the language of each token in the input. Indices are
languages ids which can be obtained from the language names by using two conversion mappings provided in
the configuration of the model (only provided for multilingual models). More precisely, the <em>language name
to language id</em> mapping is in <code>model.config.lang2id</code> (which is a dictionary string to int) and the
<em>language id to language name</em> mapping is in <code>model.config.id2lang</code> (dictionary int to string).</p>
<p>See usage examples detailed in the <a href="../multilingual">multilingual documentation</a>.`,name:"langs"},{anchor:"transformers.TFFlaubertModel.call.token_type_ids",description:`<strong>token_type_ids</strong> (<code>tf.Tensor</code> or <code>Numpy array</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li><code>0</code> corresponds to a <em>sentence A</em> token,</li>
<li><code>1</code> corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.TFFlaubertModel.call.position_ids",description:`<strong>position_ids</strong> (<code>tf.Tensor</code> or <code>Numpy array</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.TFFlaubertModel.call.lengths",description:`<strong>lengths</strong> (<code>tf.Tensor</code> or <code>Numpy array</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Length of each sentence that can be used to avoid performing attention on padding token indices. You can
also use <em>attention_mask</em> for the same result (see above), kept here for compatibility Indices selected in
<code>[0, ..., input_ids.size(-1)]</code>:`,name:"lengths"},{anchor:"transformers.TFFlaubertModel.call.cache",description:`<strong>cache</strong> (<code>Dict[str, tf.Tensor]</code>, <em>optional</em>) &#x2014;
Dictionary string to <code>tf.FloatTensor</code> that contains precomputed hidden states (key and values in the
attention blocks) as computed by the model (see <code>cache</code> output below). Can be used to speed up sequential
decoding.</p>
<p>The dictionary object will be modified in-place during the forward pass to add newly computed
hidden-states.`,name:"cache"},{anchor:"transformers.TFFlaubertModel.call.head_mask",description:`<strong>head_mask</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li><code>1</code> indicates the head is <strong>not masked</strong>,</li>
<li><code>0</code> indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.TFFlaubertModel.call.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.TFFlaubertModel.call.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail. This argument can be used only in eager mode, in graph mode the value in the
config will be used instead.`,name:"output_attentions"},{anchor:"transformers.TFFlaubertModel.call.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail. This argument can be used only in eager mode, in graph mode the value in the config will be
used instead.`,name:"output_hidden_states"},{anchor:"transformers.TFFlaubertModel.call.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.TFFlaubertModel.call.training",description:`<strong>training</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to use the model in training mode (some modules like dropout modules have different
behaviors between training and evaluation).`,name:"training"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/flaubert/modeling_tf_flaubert.py#L249",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.modeling_tf_outputs.TFBaseModelOutput"
>transformers.modeling_tf_outputs.TFBaseModelOutput</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/v4.27.1/en/model_doc/flaubert#transformers.FlaubertConfig"
>FlaubertConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>last_hidden_state</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>) \u2014 Sequence of hidden-states at the output of the last layer of the model.</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(tf.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.27.1/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:[Jb]},$$scope:{ctx:C}}}),rn=new Ge({props:{anchor:"transformers.TFFlaubertModel.call.example",$$slots:{default:[Zb]},$$scope:{ctx:C}}}),Bs=new Xe({}),Rs=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/v4.27.1/en/model_doc/flaubert#transformers.FlaubertConfig">FlaubertConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.27.1/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/flaubert/modeling_tf_flaubert.py#L777"}}),dn=new Ye({props:{$$slots:{default:[ey]},$$scope:{ctx:C}}}),Xs=new ie({props:{name:"call",anchor:"transformers.TFFlaubertWithLMHeadModel.call",parameters:[{name:"input_ids",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"attention_mask",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"langs",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"token_type_ids",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"position_ids",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"lengths",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"cache",val:": typing.Union[typing.Dict[str, tensorflow.python.framework.ops.Tensor], NoneType] = None"},{name:"head_mask",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"inputs_embeds",val:": typing.Optional[tensorflow.python.framework.ops.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"},{name:"training",val:": typing.Optional[bool] = False"}],parametersDescription:[{anchor:"transformers.TFFlaubertWithLMHeadModel.call.input_ids",description:`<strong>input_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.27.1/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.TFFlaubertWithLMHeadModel.call.attention_mask",description:`<strong>attention_mask</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li><code>1</code> for tokens that are <strong>not masked</strong>,</li>
<li><code>0</code> for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.TFFlaubertWithLMHeadModel.call.langs",description:`<strong>langs</strong> (<code>tf.Tensor</code> or <code>Numpy array</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
A parallel sequence of tokens to be used to indicate the language of each token in the input. Indices are
languages ids which can be obtained from the language names by using two conversion mappings provided in
the configuration of the model (only provided for multilingual models). More precisely, the <em>language name
to language id</em> mapping is in <code>model.config.lang2id</code> (which is a dictionary string to int) and the
<em>language id to language name</em> mapping is in <code>model.config.id2lang</code> (dictionary int to string).</p>
<p>See usage examples detailed in the <a href="../multilingual">multilingual documentation</a>.`,name:"langs"},{anchor:"transformers.TFFlaubertWithLMHeadModel.call.token_type_ids",description:`<strong>token_type_ids</strong> (<code>tf.Tensor</code> or <code>Numpy array</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li><code>0</code> corresponds to a <em>sentence A</em> token,</li>
<li><code>1</code> corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.TFFlaubertWithLMHeadModel.call.position_ids",description:`<strong>position_ids</strong> (<code>tf.Tensor</code> or <code>Numpy array</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.TFFlaubertWithLMHeadModel.call.lengths",description:`<strong>lengths</strong> (<code>tf.Tensor</code> or <code>Numpy array</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Length of each sentence that can be used to avoid performing attention on padding token indices. You can
also use <em>attention_mask</em> for the same result (see above), kept here for compatibility Indices selected in
<code>[0, ..., input_ids.size(-1)]</code>:`,name:"lengths"},{anchor:"transformers.TFFlaubertWithLMHeadModel.call.cache",description:`<strong>cache</strong> (<code>Dict[str, tf.Tensor]</code>, <em>optional</em>) &#x2014;
Dictionary string to <code>tf.FloatTensor</code> that contains precomputed hidden states (key and values in the
attention blocks) as computed by the model (see <code>cache</code> output below). Can be used to speed up sequential
decoding.</p>
<p>The dictionary object will be modified in-place during the forward pass to add newly computed
hidden-states.`,name:"cache"},{anchor:"transformers.TFFlaubertWithLMHeadModel.call.head_mask",description:`<strong>head_mask</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li><code>1</code> indicates the head is <strong>not masked</strong>,</li>
<li><code>0</code> indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.TFFlaubertWithLMHeadModel.call.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.TFFlaubertWithLMHeadModel.call.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail. This argument can be used only in eager mode, in graph mode the value in the
config will be used instead.`,name:"output_attentions"},{anchor:"transformers.TFFlaubertWithLMHeadModel.call.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail. This argument can be used only in eager mode, in graph mode the value in the config will be
used instead.`,name:"output_hidden_states"},{anchor:"transformers.TFFlaubertWithLMHeadModel.call.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.TFFlaubertWithLMHeadModel.call.training",description:`<strong>training</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to use the model in training mode (some modules like dropout modules have different
behaviors between training and evaluation).`,name:"training"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/flaubert/modeling_tf_flaubert.py#L806",returnDescription:`
<p>A <code>transformers.models.flaubert.modeling_tf_flaubert.TFFlaubertWithLMHeadModelOutput</code> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/v4.27.1/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:C}}}),pn=new Ge({props:{anchor:"transformers.TFFlaubertWithLMHeadModel.call.example",$$slots:{default:[oy]},$$scope:{ctx:C}}}),Gs=new Xe({}),Js=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/v4.27.1/en/model_doc/flaubert#transformers.FlaubertConfig">FlaubertConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.27.1/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/flaubert/modeling_tf_flaubert.py#L869"}}),hn=new Ye({props:{$$slots:{default:[ny]},$$scope:{ctx:C}}}),oa=new ie({props:{name:"call",anchor:"transformers.TFFlaubertForSequenceClassification.call",parameters:[{name:"input_ids",val:": typing.Union[typing.List[tensorflow.python.framework.ops.Tensor], typing.List[numpy.ndarray], typing.List[keras.engine.keras_tensor.KerasTensor], typing.Dict[str, tensorflow.python.framework.ops.Tensor], typing.Dict[str, numpy.ndarray], typing.Dict[str, keras.engine.keras_tensor.KerasTensor], tensorflow.python.framework.ops.Tensor, numpy.ndarray, keras.engine.keras_tensor.KerasTensor, NoneType] = None"},{name:"attention_mask",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"langs",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"token_type_ids",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"position_ids",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"lengths",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"cache",val:": typing.Union[typing.Dict[str, tensorflow.python.framework.ops.Tensor], NoneType] = None"},{name:"head_mask",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"inputs_embeds",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = 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"},{name:"labels",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"training",val:": bool = False"}],parametersDescription:[{anchor:"transformers.TFFlaubertForSequenceClassification.call.input_ids",description:`<strong>input_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.27.1/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.TFFlaubertForSequenceClassification.call.attention_mask",description:`<strong>attention_mask</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li><code>1</code> for tokens that are <strong>not masked</strong>,</li>
<li><code>0</code> for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.TFFlaubertForSequenceClassification.call.langs",description:`<strong>langs</strong> (<code>tf.Tensor</code> or <code>Numpy array</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
A parallel sequence of tokens to be used to indicate the language of each token in the input. Indices are
languages ids which can be obtained from the language names by using two conversion mappings provided in
the configuration of the model (only provided for multilingual models). More precisely, the <em>language name
to language id</em> mapping is in <code>model.config.lang2id</code> (which is a dictionary string to int) and the
<em>language id to language name</em> mapping is in <code>model.config.id2lang</code> (dictionary int to string).</p>
<p>See usage examples detailed in the <a href="../multilingual">multilingual documentation</a>.`,name:"langs"},{anchor:"transformers.TFFlaubertForSequenceClassification.call.token_type_ids",description:`<strong>token_type_ids</strong> (<code>tf.Tensor</code> or <code>Numpy array</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li><code>0</code> corresponds to a <em>sentence A</em> token,</li>
<li><code>1</code> corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.TFFlaubertForSequenceClassification.call.position_ids",description:`<strong>position_ids</strong> (<code>tf.Tensor</code> or <code>Numpy array</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.TFFlaubertForSequenceClassification.call.lengths",description:`<strong>lengths</strong> (<code>tf.Tensor</code> or <code>Numpy array</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Length of each sentence that can be used to avoid performing attention on padding token indices. You can
also use <em>attention_mask</em> for the same result (see above), kept here for compatibility Indices selected in
<code>[0, ..., input_ids.size(-1)]</code>:`,name:"lengths"},{anchor:"transformers.TFFlaubertForSequenceClassification.call.cache",description:`<strong>cache</strong> (<code>Dict[str, tf.Tensor]</code>, <em>optional</em>) &#x2014;
Dictionary string to <code>tf.FloatTensor</code> that contains precomputed hidden states (key and values in the
attention blocks) as computed by the model (see <code>cache</code> output below). Can be used to speed up sequential
decoding.</p>
<p>The dictionary object will be modified in-place during the forward pass to add newly computed
hidden-states.`,name:"cache"},{anchor:"transformers.TFFlaubertForSequenceClassification.call.head_mask",description:`<strong>head_mask</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li><code>1</code> indicates the head is <strong>not masked</strong>,</li>
<li><code>0</code> indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.TFFlaubertForSequenceClassification.call.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.TFFlaubertForSequenceClassification.call.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail. This argument can be used only in eager mode, in graph mode the value in the
config will be used instead.`,name:"output_attentions"},{anchor:"transformers.TFFlaubertForSequenceClassification.call.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail. This argument can be used only in eager mode, in graph mode the value in the config will be
used instead.`,name:"output_hidden_states"},{anchor:"transformers.TFFlaubertForSequenceClassification.call.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.TFFlaubertForSequenceClassification.call.training",description:`<strong>training</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to use the model in training mode (some modules like dropout modules have different
behaviors between training and evaluation).`,name:"training"},{anchor:"transformers.TFFlaubertForSequenceClassification.call.labels",description:`<strong>labels</strong> (<code>tf.Tensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for computing the sequence classification/regression loss. Indices should be in <code>[0, ..., config.num_labels - 1]</code>. If <code>config.num_labels == 1</code> a regression loss is computed (Mean-Square loss), If
<code>config.num_labels &gt; 1</code> a classification loss is computed (Cross-Entropy).`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/flaubert/modeling_tf_flaubert.py#L877",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.modeling_tf_outputs.TFSequenceClassifierOutput"
>transformers.modeling_tf_outputs.TFSequenceClassifierOutput</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/v4.27.1/en/model_doc/flaubert#transformers.FlaubertConfig"
>FlaubertConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, )</code>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Classification (or regression if config.num_labels==1) loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, config.num_labels)</code>) \u2014 Classification (or regression if config.num_labels==1) scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.27.1/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:C}}}),fn=new Ge({props:{anchor:"transformers.TFFlaubertForSequenceClassification.call.example",$$slots:{default:[ay]},$$scope:{ctx:C}}}),gn=new Ge({props:{anchor:"transformers.TFFlaubertForSequenceClassification.call.example-2",$$slots:{default:[ry]},$$scope:{ctx:C}}}),na=new Xe({}),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/v4.27.1/en/model_doc/flaubert#transformers.FlaubertConfig">FlaubertConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.27.1/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/flaubert/modeling_tf_flaubert.py#L1144"}}),bn=new Ye({props:{$$slots:{default:[iy]},$$scope:{ctx:C}}}),la=new ie({props:{name:"call",anchor:"transformers.TFFlaubertForMultipleChoice.call",parameters:[{name:"input_ids",val:": typing.Union[typing.List[tensorflow.python.framework.ops.Tensor], typing.List[numpy.ndarray], typing.List[keras.engine.keras_tensor.KerasTensor], typing.Dict[str, tensorflow.python.framework.ops.Tensor], typing.Dict[str, numpy.ndarray], typing.Dict[str, keras.engine.keras_tensor.KerasTensor], tensorflow.python.framework.ops.Tensor, numpy.ndarray, keras.engine.keras_tensor.KerasTensor, NoneType] = None"},{name:"attention_mask",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"langs",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"token_type_ids",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"position_ids",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"lengths",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"cache",val:": typing.Union[typing.Dict[str, tensorflow.python.framework.ops.Tensor], NoneType] = None"},{name:"head_mask",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"inputs_embeds",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = 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"},{name:"labels",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"training",val:": bool = False"}],parametersDescription:[{anchor:"transformers.TFFlaubertForMultipleChoice.call.input_ids",description:`<strong>input_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.27.1/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.TFFlaubertForMultipleChoice.call.attention_mask",description:`<strong>attention_mask</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li><code>1</code> for tokens that are <strong>not masked</strong>,</li>
<li><code>0</code> for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.TFFlaubertForMultipleChoice.call.langs",description:`<strong>langs</strong> (<code>tf.Tensor</code> or <code>Numpy array</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
A parallel sequence of tokens to be used to indicate the language of each token in the input. Indices are
languages ids which can be obtained from the language names by using two conversion mappings provided in
the configuration of the model (only provided for multilingual models). More precisely, the <em>language name
to language id</em> mapping is in <code>model.config.lang2id</code> (which is a dictionary string to int) and the
<em>language id to language name</em> mapping is in <code>model.config.id2lang</code> (dictionary int to string).</p>
<p>See usage examples detailed in the <a href="../multilingual">multilingual documentation</a>.`,name:"langs"},{anchor:"transformers.TFFlaubertForMultipleChoice.call.token_type_ids",description:`<strong>token_type_ids</strong> (<code>tf.Tensor</code> or <code>Numpy array</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li><code>0</code> corresponds to a <em>sentence A</em> token,</li>
<li><code>1</code> corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.TFFlaubertForMultipleChoice.call.position_ids",description:`<strong>position_ids</strong> (<code>tf.Tensor</code> or <code>Numpy array</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.TFFlaubertForMultipleChoice.call.lengths",description:`<strong>lengths</strong> (<code>tf.Tensor</code> or <code>Numpy array</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Length of each sentence that can be used to avoid performing attention on padding token indices. You can
also use <em>attention_mask</em> for the same result (see above), kept here for compatibility Indices selected in
<code>[0, ..., input_ids.size(-1)]</code>:`,name:"lengths"},{anchor:"transformers.TFFlaubertForMultipleChoice.call.cache",description:`<strong>cache</strong> (<code>Dict[str, tf.Tensor]</code>, <em>optional</em>) &#x2014;
Dictionary string to <code>tf.FloatTensor</code> that contains precomputed hidden states (key and values in the
attention blocks) as computed by the model (see <code>cache</code> output below). Can be used to speed up sequential
decoding.</p>
<p>The dictionary object will be modified in-place during the forward pass to add newly computed
hidden-states.`,name:"cache"},{anchor:"transformers.TFFlaubertForMultipleChoice.call.head_mask",description:`<strong>head_mask</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li><code>1</code> indicates the head is <strong>not masked</strong>,</li>
<li><code>0</code> indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.TFFlaubertForMultipleChoice.call.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.TFFlaubertForMultipleChoice.call.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail. This argument can be used only in eager mode, in graph mode the value in the
config will be used instead.`,name:"output_attentions"},{anchor:"transformers.TFFlaubertForMultipleChoice.call.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail. This argument can be used only in eager mode, in graph mode the value in the config will be
used instead.`,name:"output_hidden_states"},{anchor:"transformers.TFFlaubertForMultipleChoice.call.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.TFFlaubertForMultipleChoice.call.training",description:`<strong>training</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to use the model in training mode (some modules like dropout modules have different
behaviors between training and evaluation).`,name:"training"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/flaubert/modeling_tf_flaubert.py#L1173",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.modeling_tf_outputs.TFMultipleChoiceModelOutput"
>transformers.modeling_tf_outputs.TFMultipleChoiceModelOutput</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/v4.27.1/en/model_doc/flaubert#transformers.FlaubertConfig"
>FlaubertConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>tf.Tensor</code> of shape <em>(batch_size, )</em>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Classification loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, num_choices)</code>) \u2014 <em>num_choices</em> is the second dimension of the input tensors. (see <em>input_ids</em> above).</p>
<p>Classification scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.27.1/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:C}}}),kn=new Ge({props:{anchor:"transformers.TFFlaubertForMultipleChoice.call.example",$$slots:{default:[dy]},$$scope:{ctx:C}}}),da=new Xe({}),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/v4.27.1/en/model_doc/flaubert#transformers.FlaubertConfig">FlaubertConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.27.1/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/flaubert/modeling_tf_flaubert.py#L1056"}}),wn=new Ye({props:{$$slots:{default:[cy]},$$scope:{ctx:C}}}),ma=new ie({props:{name:"call",anchor:"transformers.TFFlaubertForTokenClassification.call",parameters:[{name:"input_ids",val:": typing.Union[typing.List[tensorflow.python.framework.ops.Tensor], typing.List[numpy.ndarray], typing.List[keras.engine.keras_tensor.KerasTensor], typing.Dict[str, tensorflow.python.framework.ops.Tensor], typing.Dict[str, numpy.ndarray], typing.Dict[str, keras.engine.keras_tensor.KerasTensor], tensorflow.python.framework.ops.Tensor, numpy.ndarray, keras.engine.keras_tensor.KerasTensor, NoneType] = None"},{name:"attention_mask",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"langs",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"token_type_ids",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"position_ids",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"lengths",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"cache",val:": typing.Union[typing.Dict[str, tensorflow.python.framework.ops.Tensor], NoneType] = None"},{name:"head_mask",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"inputs_embeds",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = 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"},{name:"labels",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"training",val:": bool = False"}],parametersDescription:[{anchor:"transformers.TFFlaubertForTokenClassification.call.input_ids",description:`<strong>input_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.27.1/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.TFFlaubertForTokenClassification.call.attention_mask",description:`<strong>attention_mask</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li><code>1</code> for tokens that are <strong>not masked</strong>,</li>
<li><code>0</code> for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.TFFlaubertForTokenClassification.call.langs",description:`<strong>langs</strong> (<code>tf.Tensor</code> or <code>Numpy array</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
A parallel sequence of tokens to be used to indicate the language of each token in the input. Indices are
languages ids which can be obtained from the language names by using two conversion mappings provided in
the configuration of the model (only provided for multilingual models). More precisely, the <em>language name
to language id</em> mapping is in <code>model.config.lang2id</code> (which is a dictionary string to int) and the
<em>language id to language name</em> mapping is in <code>model.config.id2lang</code> (dictionary int to string).</p>
<p>See usage examples detailed in the <a href="../multilingual">multilingual documentation</a>.`,name:"langs"},{anchor:"transformers.TFFlaubertForTokenClassification.call.token_type_ids",description:`<strong>token_type_ids</strong> (<code>tf.Tensor</code> or <code>Numpy array</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li><code>0</code> corresponds to a <em>sentence A</em> token,</li>
<li><code>1</code> corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.TFFlaubertForTokenClassification.call.position_ids",description:`<strong>position_ids</strong> (<code>tf.Tensor</code> or <code>Numpy array</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.TFFlaubertForTokenClassification.call.lengths",description:`<strong>lengths</strong> (<code>tf.Tensor</code> or <code>Numpy array</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Length of each sentence that can be used to avoid performing attention on padding token indices. You can
also use <em>attention_mask</em> for the same result (see above), kept here for compatibility Indices selected in
<code>[0, ..., input_ids.size(-1)]</code>:`,name:"lengths"},{anchor:"transformers.TFFlaubertForTokenClassification.call.cache",description:`<strong>cache</strong> (<code>Dict[str, tf.Tensor]</code>, <em>optional</em>) &#x2014;
Dictionary string to <code>tf.FloatTensor</code> that contains precomputed hidden states (key and values in the
attention blocks) as computed by the model (see <code>cache</code> output below). Can be used to speed up sequential
decoding.</p>
<p>The dictionary object will be modified in-place during the forward pass to add newly computed
hidden-states.`,name:"cache"},{anchor:"transformers.TFFlaubertForTokenClassification.call.head_mask",description:`<strong>head_mask</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li><code>1</code> indicates the head is <strong>not masked</strong>,</li>
<li><code>0</code> indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.TFFlaubertForTokenClassification.call.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.TFFlaubertForTokenClassification.call.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail. This argument can be used only in eager mode, in graph mode the value in the
config will be used instead.`,name:"output_attentions"},{anchor:"transformers.TFFlaubertForTokenClassification.call.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail. This argument can be used only in eager mode, in graph mode the value in the config will be
used instead.`,name:"output_hidden_states"},{anchor:"transformers.TFFlaubertForTokenClassification.call.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.TFFlaubertForTokenClassification.call.training",description:`<strong>training</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to use the model in training mode (some modules like dropout modules have different
behaviors between training and evaluation).`,name:"training"},{anchor:"transformers.TFFlaubertForTokenClassification.call.labels",description:`<strong>labels</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Labels for computing the token classification loss. Indices should be in <code>[0, ..., config.num_labels - 1]</code>.`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/flaubert/modeling_tf_flaubert.py#L1067",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.modeling_tf_outputs.TFTokenClassifierOutput"
>transformers.modeling_tf_outputs.TFTokenClassifierOutput</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/v4.27.1/en/model_doc/flaubert#transformers.FlaubertConfig"
>FlaubertConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>tf.Tensor</code> of shape <code>(n,)</code>, <em>optional</em>, where n is the number of unmasked labels, returned when <code>labels</code> is provided)  \u2014 Classification loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, config.num_labels)</code>) \u2014 Classification scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.modeling_tf_outputs.TFTokenClassifierOutput"
>transformers.modeling_tf_outputs.TFTokenClassifierOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),Tn=new Ye({props:{$$slots:{default:[py]},$$scope:{ctx:C}}}),Fn=new Ge({props:{anchor:"transformers.TFFlaubertForTokenClassification.call.example",$$slots:{default:[uy]},$$scope:{ctx:C}}}),$n=new Ge({props:{anchor:"transformers.TFFlaubertForTokenClassification.call.example-2",$$slots:{default:[hy]},$$scope:{ctx:C}}}),fa=new Xe({}),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/v4.27.1/en/model_doc/flaubert#transformers.FlaubertConfig">FlaubertConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.27.1/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/flaubert/modeling_tf_flaubert.py#L955"}}),Mn=new Ye({props:{$$slots:{default:[my]},$$scope:{ctx:C}}}),ka=new ie({props:{name:"call",anchor:"transformers.TFFlaubertForQuestionAnsweringSimple.call",parameters:[{name:"input_ids",val:": typing.Union[typing.List[tensorflow.python.framework.ops.Tensor], typing.List[numpy.ndarray], typing.List[keras.engine.keras_tensor.KerasTensor], typing.Dict[str, tensorflow.python.framework.ops.Tensor], typing.Dict[str, numpy.ndarray], typing.Dict[str, keras.engine.keras_tensor.KerasTensor], tensorflow.python.framework.ops.Tensor, numpy.ndarray, keras.engine.keras_tensor.KerasTensor, NoneType] = None"},{name:"attention_mask",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"langs",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"token_type_ids",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"position_ids",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"lengths",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"cache",val:": typing.Union[typing.Dict[str, tensorflow.python.framework.ops.Tensor], NoneType] = None"},{name:"head_mask",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"inputs_embeds",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = 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"},{name:"start_positions",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"end_positions",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"training",val:": bool = False"}],parametersDescription:[{anchor:"transformers.TFFlaubertForQuestionAnsweringSimple.call.input_ids",description:`<strong>input_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.27.1/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.TFFlaubertForQuestionAnsweringSimple.call.attention_mask",description:`<strong>attention_mask</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li><code>1</code> for tokens that are <strong>not masked</strong>,</li>
<li><code>0</code> for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.TFFlaubertForQuestionAnsweringSimple.call.langs",description:`<strong>langs</strong> (<code>tf.Tensor</code> or <code>Numpy array</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
A parallel sequence of tokens to be used to indicate the language of each token in the input. Indices are
languages ids which can be obtained from the language names by using two conversion mappings provided in
the configuration of the model (only provided for multilingual models). More precisely, the <em>language name
to language id</em> mapping is in <code>model.config.lang2id</code> (which is a dictionary string to int) and the
<em>language id to language name</em> mapping is in <code>model.config.id2lang</code> (dictionary int to string).</p>
<p>See usage examples detailed in the <a href="../multilingual">multilingual documentation</a>.`,name:"langs"},{anchor:"transformers.TFFlaubertForQuestionAnsweringSimple.call.token_type_ids",description:`<strong>token_type_ids</strong> (<code>tf.Tensor</code> or <code>Numpy array</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li><code>0</code> corresponds to a <em>sentence A</em> token,</li>
<li><code>1</code> corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.TFFlaubertForQuestionAnsweringSimple.call.position_ids",description:`<strong>position_ids</strong> (<code>tf.Tensor</code> or <code>Numpy array</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.TFFlaubertForQuestionAnsweringSimple.call.lengths",description:`<strong>lengths</strong> (<code>tf.Tensor</code> or <code>Numpy array</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Length of each sentence that can be used to avoid performing attention on padding token indices. You can
also use <em>attention_mask</em> for the same result (see above), kept here for compatibility Indices selected in
<code>[0, ..., input_ids.size(-1)]</code>:`,name:"lengths"},{anchor:"transformers.TFFlaubertForQuestionAnsweringSimple.call.cache",description:`<strong>cache</strong> (<code>Dict[str, tf.Tensor]</code>, <em>optional</em>) &#x2014;
Dictionary string to <code>tf.FloatTensor</code> that contains precomputed hidden states (key and values in the
attention blocks) as computed by the model (see <code>cache</code> output below). Can be used to speed up sequential
decoding.</p>
<p>The dictionary object will be modified in-place during the forward pass to add newly computed
hidden-states.`,name:"cache"},{anchor:"transformers.TFFlaubertForQuestionAnsweringSimple.call.head_mask",description:`<strong>head_mask</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li><code>1</code> indicates the head is <strong>not masked</strong>,</li>
<li><code>0</code> indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.TFFlaubertForQuestionAnsweringSimple.call.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.TFFlaubertForQuestionAnsweringSimple.call.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail. This argument can be used only in eager mode, in graph mode the value in the
config will be used instead.`,name:"output_attentions"},{anchor:"transformers.TFFlaubertForQuestionAnsweringSimple.call.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail. This argument can be used only in eager mode, in graph mode the value in the config will be
used instead.`,name:"output_hidden_states"},{anchor:"transformers.TFFlaubertForQuestionAnsweringSimple.call.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.TFFlaubertForQuestionAnsweringSimple.call.training",description:`<strong>training</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to use the model in training mode (some modules like dropout modules have different
behaviors between training and evaluation).`,name:"training"},{anchor:"transformers.TFFlaubertForQuestionAnsweringSimple.call.start_positions",description:`<strong>start_positions</strong> (<code>tf.Tensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for position (index) of the start of the labelled span for computing the token classification loss.
Positions are clamped to the length of the sequence (<code>sequence_length</code>). Position outside of the sequence
are not taken into account for computing the loss.`,name:"start_positions"},{anchor:"transformers.TFFlaubertForQuestionAnsweringSimple.call.end_positions",description:`<strong>end_positions</strong> (<code>tf.Tensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for position (index) of the end of the labelled span for computing the token classification loss.
Positions are clamped to the length of the sequence (<code>sequence_length</code>). Position outside of the sequence
are not taken into account for computing the loss.`,name:"end_positions"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/flaubert/modeling_tf_flaubert.py#L963",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.modeling_tf_outputs.TFQuestionAnsweringModelOutput"
>transformers.modeling_tf_outputs.TFQuestionAnsweringModelOutput</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/v4.27.1/en/model_doc/flaubert#transformers.FlaubertConfig"
>FlaubertConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, )</code>, <em>optional</em>, returned when <code>start_positions</code> and <code>end_positions</code> are provided) \u2014 Total span extraction loss is the sum of a Cross-Entropy for the start and end positions.</p>
</li>
<li>
<p><strong>start_logits</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>) \u2014 Span-start scores (before SoftMax).</p>
</li>
<li>
<p><strong>end_logits</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>) \u2014 Span-end scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.modeling_tf_outputs.TFQuestionAnsweringModelOutput"
>transformers.modeling_tf_outputs.TFQuestionAnsweringModelOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),xn=new Ye({props:{$$slots:{default:[fy]},$$scope:{ctx:C}}}),qn=new Ge({props:{anchor:"transformers.TFFlaubertForQuestionAnsweringSimple.call.example",$$slots:{default:[gy]},$$scope:{ctx:C}}}),zn=new Ge({props:{anchor:"transformers.TFFlaubertForQuestionAnsweringSimple.call.example-2",$$slots:{default:[_y]},$$scope:{ctx:C}}}),{c(){d=a("meta"),k=p(),h=a("h1"),m=a("a"),y=a("span"),v(l.$$.fragment),c=p(),z=a("span"),ve=n("FlauBERT"),ge=p(),L=a("div"),ce=a("a"),J=a("img"),we=p(),U=a("a"),pe=a("img"),V=p(),te=a("h2"),ae=a("a"),B=a("span"),v(le.$$.fragment),Te=p(),R=a("span"),Fe=n("Overview"),_e=p(),I=a("p"),$e=n("The FlauBERT model was proposed in the paper "),de=a("a"),oe=n("FlauBERT: Unsupervised Language Model Pre-training for French"),j=n(` by Hang Le et al. It\u2019s a transformer model pretrained using a masked language
modeling (MLM) objective (like BERT).`),P=p(),ue=a("p"),Y=n("The abstract from the paper is the following:"),be=p(),he=a("p"),K=a("em"),Ee=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"),Me=n("This model was contributed by "),W=a("a"),xe=n("formiel"),qe=n(". The original code can be found "),H=a("a"),ze=n("here"),Ce=n("."),S=p(),me=a("p"),X=n("Tips:"),ke=p(),Z=a("ul"),A=a("li"),je=n("Like RoBERTa, without the sentence ordering prediction (so just trained on the MLM objective)."),O=p(),ne=a("h2"),re=a("a"),g=a("span"),v(x.$$.fragment),Ie=p(),ee=a("span"),We=n("Documentation resources"),Le=p(),q=a("ul"),Oe=a("li"),Ae=a("a"),He=n("Text classification task guide"),Ue=p(),De=a("li"),D=a("a"),G=n("Token classification task guide"),Qe=p(),Se=a("li"),Q=a("a"),Be=n("Question answering task guide"),Re=p(),fe=a("li"),Pe=a("a"),se=n("Masked language modeling task guide"),Ke=p(),Tr=a("li"),Ea=a("a"),Wd=n("Multiple choice task guide"),bl=p(),Vt=a("h2"),zo=a("a"),Fr=a("span"),v(Un.$$.fragment),Hd=p(),$r=a("span"),Ud=n("FlaubertConfig"),yl=p(),Nt=a("div"),v(Qn.$$.fragment),Qd=p(),At=a("p"),Bd=n("This is the configuration class to store the configuration of a "),Ma=a("a"),Rd=n("FlaubertModel"),Kd=n(" or a "),xa=a("a"),Vd=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
`),Bn=a("a"),Xd=n("flaubert/flaubert_base_uncased"),Gd=n(" architecture."),Jd=p(),Yt=a("p"),Zd=n("Configuration objects inherit from "),qa=a("a"),ec=n("PretrainedConfig"),tc=n(` and can be used to control the model outputs. Read the
documentation from `),za=a("a"),oc=n("PretrainedConfig"),nc=n(" for more information."),kl=p(),Xt=a("h2"),Co=a("a"),Er=a("span"),v(Rn.$$.fragment),sc=p(),Mr=a("span"),ac=n("FlaubertTokenizer"),vl=p(),Ve=a("div"),v(Kn.$$.fragment),rc=p(),xr=a("p"),ic=n("Construct a Flaubert tokenizer. Based on Byte-Pair Encoding. The tokenization process is the following:"),lc=p(),Pt=a("ul"),qr=a("li"),dc=n("Moses preprocessing and tokenization."),cc=p(),zr=a("li"),pc=n("Normalizing all inputs text."),uc=p(),Ot=a("li"),hc=n("The arguments "),Cr=a("code"),mc=n("special_tokens"),fc=n(" and the function "),jr=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."),kc=p(),Vn=a("li"),vc=n("The argument "),Ar=a("code"),wc=n("do_lowercase"),Tc=n(" controls lower casing (automatically set for pretrained vocabularies)."),Fc=p(),Yn=a("p"),$c=n("This tokenizer inherits from "),Ca=a("a"),Ec=n("PreTrainedTokenizer"),Mc=n(` which contains most of the main methods. Users should refer to
this superclass for more information regarding those methods.`),xc=p(),Dt=a("div"),v(Xn.$$.fragment),qc=p(),Pr=a("p"),zc=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:`),Cc=p(),Gn=a("ul"),ja=a("li"),jc=n("single sequence: "),Or=a("code"),Nc=n("<s> X </s>"),Ac=p(),Na=a("li"),Pc=n("pair of sequences: "),Dr=a("code"),Oc=n("<s> A </s> B </s>"),Dc=p(),jo=a("div"),v(Jn.$$.fragment),Sc=p(),Sr=a("p"),Lc=n("Converts a sequence of tokens (string) in a single string."),Ic=p(),bt=a("div"),v(Zn.$$.fragment),Wc=p(),Lr=a("p"),Hc=n("Create a mask from the two sequences passed to be used in a sequence-pair classification task. An XLM sequence"),Uc=p(),v(No.$$.fragment),Qc=p(),Gt=a("p"),Bc=n("If "),Ir=a("code"),Rc=n("token_ids_1"),Kc=n(" is "),Wr=a("code"),Vc=n("None"),Yc=n(", this method only returns the first portion of the mask (0s)."),Xc=p(),Ao=a("div"),v(es.$$.fragment),Gc=p(),ts=a("p"),Jc=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 `),Hr=a("code"),Zc=n("prepare_for_model"),ep=n(" method."),wl=p(),Jt=a("h2"),Po=a("a"),Ur=a("span"),v(os.$$.fragment),tp=p(),Qr=a("span"),op=n("FlaubertModel"),Tl=p(),Zt=a("div"),v(ns.$$.fragment),np=p(),yt=a("div"),v(ss.$$.fragment),sp=p(),eo=a("p"),ap=n("The "),Aa=a("a"),rp=n("FlaubertModel"),ip=n(" forward method, overrides the "),Br=a("code"),lp=n("__call__"),dp=n(" special method."),cp=p(),v(Oo.$$.fragment),pp=p(),v(Do.$$.fragment),Fl=p(),to=a("h2"),So=a("a"),Rr=a("span"),v(as.$$.fragment),up=p(),Kr=a("span"),hp=n("FlaubertWithLMHeadModel"),$l=p(),it=a("div"),v(rs.$$.fragment),mp=p(),Vr=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 "),Pa=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.)`),kp=p(),ls=a("p"),vp=n("This model is also a PyTorch "),ds=a("a"),wp=n("torch.nn.Module"),Tp=n(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Fp=p(),kt=a("div"),v(cs.$$.fragment),$p=p(),oo=a("p"),Ep=n("The "),Oa=a("a"),Mp=n("FlaubertWithLMHeadModel"),xp=n(" forward method, overrides the "),Yr=a("code"),qp=n("__call__"),zp=n(" special method."),Cp=p(),v(Lo.$$.fragment),jp=p(),v(Io.$$.fragment),El=p(),no=a("h2"),Wo=a("a"),Xr=a("span"),v(ps.$$.fragment),Np=p(),Gr=a("span"),Ap=n("FlaubertForSequenceClassification"),Ml=p(),lt=a("div"),v(us.$$.fragment),Pp=p(),Jr=a("p"),Op=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.`),Dp=p(),hs=a("p"),Sp=n("This model inherits from "),Da=a("a"),Lp=n("PreTrainedModel"),Ip=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.)`),Wp=p(),ms=a("p"),Hp=n("This model is also a PyTorch "),fs=a("a"),Up=n("torch.nn.Module"),Qp=n(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Bp=p(),ut=a("div"),v(gs.$$.fragment),Rp=p(),so=a("p"),Kp=n("The "),Sa=a("a"),Vp=n("FlaubertForSequenceClassification"),Yp=n(" forward method, overrides the "),Zr=a("code"),Xp=n("__call__"),Gp=n(" special method."),Jp=p(),v(Ho.$$.fragment),Zp=p(),v(Uo.$$.fragment),eu=p(),v(Qo.$$.fragment),xl=p(),ao=a("h2"),Bo=a("a"),ei=a("span"),v(_s.$$.fragment),tu=p(),ti=a("span"),ou=n("FlaubertForMultipleChoice"),ql=p(),dt=a("div"),v(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 "),La=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(),ks=a("p"),cu=n("This model is also a PyTorch "),vs=a("a"),pu=n("torch.nn.Module"),uu=n(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),hu=p(),vt=a("div"),v(ws.$$.fragment),mu=p(),ro=a("p"),fu=n("The "),Ia=a("a"),gu=n("FlaubertForMultipleChoice"),_u=n(" forward method, overrides the "),ni=a("code"),bu=n("__call__"),yu=n(" special method."),ku=p(),v(Ro.$$.fragment),vu=p(),v(Ko.$$.fragment),zl=p(),io=a("h2"),Vo=a("a"),si=a("span"),v(Ts.$$.fragment),wu=p(),ai=a("span"),Tu=n("FlaubertForTokenClassification"),Cl=p(),ct=a("div"),v(Fs.$$.fragment),Fu=p(),ri=a("p"),$u=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.`),Eu=p(),$s=a("p"),Mu=n("This model inherits from "),Wa=a("a"),xu=n("PreTrainedModel"),qu=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.)`),zu=p(),Es=a("p"),Cu=n("This model is also a PyTorch "),Ms=a("a"),ju=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.`),Au=p(),wt=a("div"),v(xs.$$.fragment),Pu=p(),lo=a("p"),Ou=n("The "),Ha=a("a"),Du=n("FlaubertForTokenClassification"),Su=n(" forward method, overrides the "),ii=a("code"),Lu=n("__call__"),Iu=n(" special method."),Wu=p(),v(Yo.$$.fragment),Hu=p(),v(Xo.$$.fragment),jl=p(),co=a("h2"),Go=a("a"),li=a("span"),v(qs.$$.fragment),Uu=p(),di=a("span"),Qu=n("FlaubertForQuestionAnsweringSimple"),Nl=p(),pt=a("div"),v(zs.$$.fragment),Bu=p(),po=a("p"),Ru=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"),Ku=n("span start logits"),Vu=n(" and "),pi=a("code"),Yu=n("span end logits"),Xu=n(")."),Gu=p(),Cs=a("p"),Ju=n("This model inherits from "),Ua=a("a"),Zu=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(),js=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(),Tt=a("div"),v(As.$$.fragment),rh=p(),uo=a("p"),ih=n("The "),Qa=a("a"),lh=n("FlaubertForQuestionAnsweringSimple"),dh=n(" forward method, overrides the "),ui=a("code"),ch=n("__call__"),ph=n(" special method."),uh=p(),v(Jo.$$.fragment),hh=p(),v(Zo.$$.fragment),Al=p(),ho=a("h2"),en=a("a"),hi=a("span"),v(Ps.$$.fragment),mh=p(),mi=a("span"),fh=n("FlaubertForQuestionAnswering"),Pl=p(),mo=a("div"),v(Os.$$.fragment),gh=p(),ht=a("div"),v(Ds.$$.fragment),_h=p(),fo=a("p"),bh=n("The "),Ba=a("a"),yh=n("FlaubertForQuestionAnswering"),kh=n(" forward method, overrides the "),fi=a("code"),vh=n("__call__"),wh=n(" special method."),Th=p(),v(tn.$$.fragment),Fh=p(),Ss=a("p"),$h=n("Base class for outputs of question answering models using a "),gi=a("code"),Eh=n("SquadHead"),Mh=n("."),xh=p(),v(on.$$.fragment),Ol=p(),go=a("h2"),nn=a("a"),_i=a("span"),v(Ls.$$.fragment),qh=p(),bi=a("span"),zh=n("TFFlaubertModel"),Dl=p(),et=a("div"),v(Is.$$.fragment),Ch=p(),yi=a("p"),jh=n("The bare Flaubert Model transformer outputting raw hidden-states without any specific head on top."),Nh=p(),Ws=a("p"),Ah=n("This model inherits from "),Ra=a("a"),Ph=n("TFPreTrainedModel"),Oh=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.)`),Dh=p(),Hs=a("p"),Sh=n("This model is also a "),Us=a("a"),Lh=n("tf.keras.Model"),Ih=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.`),Wh=p(),v(sn.$$.fragment),Hh=p(),Ft=a("div"),v(Qs.$$.fragment),Uh=p(),_o=a("p"),Qh=n("The "),Ka=a("a"),Bh=n("TFFlaubertModel"),Rh=n(" forward method, overrides the "),ki=a("code"),Kh=n("__call__"),Vh=n(" special method."),Yh=p(),v(an.$$.fragment),Xh=p(),v(rn.$$.fragment),Sl=p(),bo=a("h2"),ln=a("a"),vi=a("span"),v(Bs.$$.fragment),Gh=p(),wi=a("span"),Jh=n("TFFlaubertWithLMHeadModel"),Ll=p(),tt=a("div"),v(Rs.$$.fragment),Zh=p(),Ti=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(),Ks=a("p"),om=n("This model inherits from "),Va=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(),Vs=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(),v(dn.$$.fragment),cm=p(),$t=a("div"),v(Xs.$$.fragment),pm=p(),yo=a("p"),um=n("The "),Ya=a("a"),hm=n("TFFlaubertWithLMHeadModel"),mm=n(" forward method, overrides the "),Fi=a("code"),fm=n("__call__"),gm=n(" special method."),_m=p(),v(cn.$$.fragment),bm=p(),v(pn.$$.fragment),Il=p(),ko=a("h2"),un=a("a"),$i=a("span"),v(Gs.$$.fragment),ym=p(),Ei=a("span"),km=n("TFFlaubertForSequenceClassification"),Wl=p(),ot=a("div"),v(Js.$$.fragment),vm=p(),Mi=a("p"),wm=n(`Flaubert Model with a sequence classification/regression head on top (a linear layer on top of the pooled output)
e.g. for GLUE tasks.`),Tm=p(),Zs=a("p"),Fm=n("This model inherits from "),Xa=a("a"),$m=n("TFPreTrainedModel"),Em=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.)`),Mm=p(),ea=a("p"),xm=n("This model is also a "),ta=a("a"),qm=n("tf.keras.Model"),zm=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.`),Cm=p(),v(hn.$$.fragment),jm=p(),mt=a("div"),v(oa.$$.fragment),Nm=p(),vo=a("p"),Am=n("The "),Ga=a("a"),Pm=n("TFFlaubertForSequenceClassification"),Om=n(" forward method, overrides the "),xi=a("code"),Dm=n("__call__"),Sm=n(" special method."),Lm=p(),v(mn.$$.fragment),Im=p(),v(fn.$$.fragment),Wm=p(),v(gn.$$.fragment),Hl=p(),wo=a("h2"),_n=a("a"),qi=a("span"),v(na.$$.fragment),Hm=p(),zi=a("span"),Um=n("TFFlaubertForMultipleChoice"),Ul=p(),nt=a("div"),v(sa.$$.fragment),Qm=p(),Ci=a("p"),Bm=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.`),Rm=p(),aa=a("p"),Km=n("This model inherits from "),Ja=a("a"),Vm=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.)`),Xm=p(),ra=a("p"),Gm=n("This model is also a "),ia=a("a"),Jm=n("tf.keras.Model"),Zm=n(` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),ef=p(),v(bn.$$.fragment),tf=p(),Et=a("div"),v(la.$$.fragment),of=p(),To=a("p"),nf=n("The "),Za=a("a"),sf=n("TFFlaubertForMultipleChoice"),af=n(" forward method, overrides the "),ji=a("code"),rf=n("__call__"),lf=n(" special method."),df=p(),v(yn.$$.fragment),cf=p(),v(kn.$$.fragment),Ql=p(),Fo=a("h2"),vn=a("a"),Ni=a("span"),v(da.$$.fragment),pf=p(),Ai=a("span"),uf=n("TFFlaubertForTokenClassification"),Bl=p(),st=a("div"),v(ca.$$.fragment),hf=p(),Pi=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"),kf=n("This model is also a "),ha=a("a"),vf=n("tf.keras.Model"),wf=n(` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),Tf=p(),v(wn.$$.fragment),Ff=p(),ft=a("div"),v(ma.$$.fragment),$f=p(),$o=a("p"),Ef=n("The "),tr=a("a"),Mf=n("TFFlaubertForTokenClassification"),xf=n(" forward method, overrides the "),Oi=a("code"),qf=n("__call__"),zf=n(" special method."),Cf=p(),v(Tn.$$.fragment),jf=p(),v(Fn.$$.fragment),Nf=p(),v($n.$$.fragment),Rl=p(),Eo=a("h2"),En=a("a"),Di=a("span"),v(fa.$$.fragment),Af=p(),Si=a("span"),Pf=n("TFFlaubertForQuestionAnsweringSimple"),Kl=p(),at=a("div"),v(ga.$$.fragment),Of=p(),Mo=a("p"),Df=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 `),Li=a("code"),Sf=n("span start logits"),Lf=n(" and "),Ii=a("code"),If=n("span end logits"),Wf=n(")."),Hf=p(),_a=a("p"),Uf=n("This model inherits from "),or=a("a"),Qf=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.)`),Rf=p(),ba=a("p"),Kf=n("This model is also a "),ya=a("a"),Vf=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.`),Xf=p(),v(Mn.$$.fragment),Gf=p(),gt=a("div"),v(ka.$$.fragment),Jf=p(),xo=a("p"),Zf=n("The "),nr=a("a"),eg=n("TFFlaubertForQuestionAnsweringSimple"),tg=n(" forward method, overrides the "),Wi=a("code"),og=n("__call__"),ng=n(" special method."),sg=p(),v(xn.$$.fragment),ag=p(),v(qn.$$.fragment),rg=p(),v(zn.$$.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),k=u(o),h=r(o,"H1",{class:!0});var va=i(h);m=r(va,"A",{id:!0,class:!0,href:!0});var Hi=i(m);y=r(Hi,"SPAN",{});var Ui=i(y);w(l.$$.fragment,Ui),Ui.forEach(t),Hi.forEach(t),c=u(va),z=r(va,"SPAN",{});var Qi=i(z);ve=s(Qi,"FlauBERT"),Qi.forEach(t),va.forEach(t),ge=u(o),L=r(o,"DIV",{class:!0});var wa=i(L);ce=r(wa,"A",{href:!0});var Bi=i(ce);J=r(Bi,"IMG",{alt:!0,src:!0}),Bi.forEach(t),we=u(wa),U=r(wa,"A",{href:!0});var Ri=i(U);pe=r(Ri,"IMG",{alt:!0,src:!0}),Ri.forEach(t),wa.forEach(t),V=u(o),te=r(o,"H2",{class:!0});var Ta=i(te);ae=r(Ta,"A",{id:!0,class:!0,href:!0});var Ki=i(ae);B=r(Ki,"SPAN",{});var Vi=i(B);w(le.$$.fragment,Vi),Vi.forEach(t),Ki.forEach(t),Te=u(Ta),R=r(Ta,"SPAN",{});var Yi=i(R);Fe=s(Yi,"Overview"),Yi.forEach(t),Ta.forEach(t),_e=u(o),I=r(o,"P",{});var Fa=i(I);$e=s(Fa,"The FlauBERT model was proposed in the paper "),de=r(Fa,"A",{href:!0,rel:!0});var Xi=i(de);oe=s(Xi,"FlauBERT: Unsupervised Language Model Pre-training for French"),Xi.forEach(t),j=s(Fa,` by Hang Le et al. It\u2019s a transformer model pretrained using a masked language
modeling (MLM) objective (like BERT).`),Fa.forEach(t),P=u(o),ue=r(o,"P",{});var Gi=i(ue);Y=s(Gi,"The abstract from the paper is the following:"),Gi.forEach(t),be=u(o),he=r(o,"P",{});var Ji=i(he);K=r(Ji,"EM",{});var Zi=i(K);Ee=s(Zi,`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.`),Zi.forEach(t),Ji.forEach(t),ye=u(o),N=r(o,"P",{});var qo=i(N);Me=s(qo,"This model was contributed by "),W=r(qo,"A",{href:!0,rel:!0});var el=i(W);xe=s(el,"formiel"),el.forEach(t),qe=s(qo,". The original code can be found "),H=r(qo,"A",{href:!0,rel:!0});var tl=i(H);ze=s(tl,"here"),tl.forEach(t),Ce=s(qo,"."),qo.forEach(t),S=u(o),me=r(o,"P",{});var ol=i(me);X=s(ol,"Tips:"),ol.forEach(t),ke=u(o),Z=r(o,"UL",{});var nl=i(Z);A=r(nl,"LI",{});var sl=i(A);je=s(sl,"Like RoBERTa, without the sentence ordering prediction (so just trained on the MLM objective)."),sl.forEach(t),nl.forEach(t),O=u(o),ne=r(o,"H2",{class:!0});var $a=i(ne);re=r($a,"A",{id:!0,class:!0,href:!0});var al=i(re);g=r(al,"SPAN",{});var rl=i(g);w(x.$$.fragment,rl),rl.forEach(t),al.forEach(t),Ie=u($a),ee=r($a,"SPAN",{});var il=i(ee);We=s(il,"Documentation resources"),il.forEach(t),$a.forEach(t),Le=u(o),q=r(o,"UL",{});var _t=i(q);Oe=r(_t,"LI",{});var ll=i(Oe);Ae=r(ll,"A",{href:!0});var dl=i(Ae);He=s(dl,"Text classification task guide"),dl.forEach(t),ll.forEach(t),Ue=u(_t),De=r(_t,"LI",{});var cl=i(De);D=r(cl,"A",{href:!0});var pl=i(D);G=s(pl,"Token classification task guide"),pl.forEach(t),cl.forEach(t),Qe=u(_t),Se=r(_t,"LI",{});var ul=i(Se);Q=r(ul,"A",{href:!0});var hl=i(Q);Be=s(hl,"Question answering task guide"),hl.forEach(t),ul.forEach(t),Re=u(_t),fe=r(_t,"LI",{});var ml=i(fe);Pe=r(ml,"A",{href:!0});var fl=i(Pe);se=s(fl,"Masked language modeling task guide"),fl.forEach(t),ml.forEach(t),Ke=u(_t),Tr=r(_t,"LI",{});var gl=i(Tr);Ea=r(gl,"A",{href:!0});var _l=i(Ea);Wd=s(_l,"Multiple choice task guide"),_l.forEach(t),gl.forEach(t),_t.forEach(t),bl=u(o),Vt=r(o,"H2",{class:!0});var Yl=i(Vt);zo=r(Yl,"A",{id:!0,class:!0,href:!0});var dg=i(zo);Fr=r(dg,"SPAN",{});var cg=i(Fr);w(Un.$$.fragment,cg),cg.forEach(t),dg.forEach(t),Hd=u(Yl),$r=r(Yl,"SPAN",{});var pg=i($r);Ud=s(pg,"FlaubertConfig"),pg.forEach(t),Yl.forEach(t),yl=u(o),Nt=r(o,"DIV",{class:!0});var sr=i(Nt);w(Qn.$$.fragment,sr),Qd=u(sr),At=r(sr,"P",{});var Cn=i(At);Bd=s(Cn,"This is the configuration class to store the configuration of a "),Ma=r(Cn,"A",{href:!0});var ug=i(Ma);Rd=s(ug,"FlaubertModel"),ug.forEach(t),Kd=s(Cn," or a "),xa=r(Cn,"A",{href:!0});var hg=i(xa);Vd=s(hg,"TFFlaubertModel"),hg.forEach(t),Yd=s(Cn,`. 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
`),Bn=r(Cn,"A",{href:!0,rel:!0});var mg=i(Bn);Xd=s(mg,"flaubert/flaubert_base_uncased"),mg.forEach(t),Gd=s(Cn," architecture."),Cn.forEach(t),Jd=u(sr),Yt=r(sr,"P",{});var ar=i(Yt);Zd=s(ar,"Configuration objects inherit from "),qa=r(ar,"A",{href:!0});var fg=i(qa);ec=s(fg,"PretrainedConfig"),fg.forEach(t),tc=s(ar,` and can be used to control the model outputs. Read the
documentation from `),za=r(ar,"A",{href:!0});var gg=i(za);oc=s(gg,"PretrainedConfig"),gg.forEach(t),nc=s(ar," for more information."),ar.forEach(t),sr.forEach(t),kl=u(o),Xt=r(o,"H2",{class:!0});var Xl=i(Xt);Co=r(Xl,"A",{id:!0,class:!0,href:!0});var _g=i(Co);Er=r(_g,"SPAN",{});var bg=i(Er);w(Rn.$$.fragment,bg),bg.forEach(t),_g.forEach(t),sc=u(Xl),Mr=r(Xl,"SPAN",{});var yg=i(Mr);ac=s(yg,"FlaubertTokenizer"),yg.forEach(t),Xl.forEach(t),vl=u(o),Ve=r(o,"DIV",{class:!0});var rt=i(Ve);w(Kn.$$.fragment,rt),rc=u(rt),xr=r(rt,"P",{});var kg=i(xr);ic=s(kg,"Construct a Flaubert tokenizer. Based on Byte-Pair Encoding. The tokenization process is the following:"),kg.forEach(t),lc=u(rt),Pt=r(rt,"UL",{});var jn=i(Pt);qr=r(jn,"LI",{});var vg=i(qr);dc=s(vg,"Moses preprocessing and tokenization."),vg.forEach(t),cc=u(jn),zr=r(jn,"LI",{});var wg=i(zr);pc=s(wg,"Normalizing all inputs text."),wg.forEach(t),uc=u(jn),Ot=r(jn,"LI",{});var Nn=i(Ot);hc=s(Nn,"The arguments "),Cr=r(Nn,"CODE",{});var Tg=i(Cr);mc=s(Tg,"special_tokens"),Tg.forEach(t),fc=s(Nn," and the function "),jr=r(Nn,"CODE",{});var Fg=i(jr);gc=s(Fg,"set_special_tokens"),Fg.forEach(t),_c=s(Nn,`, can be used to add additional symbols (like
\u201D`),Nr=r(Nn,"STRONG",{});var $g=i(Nr);bc=s($g,"classify"),$g.forEach(t),yc=s(Nn,"\u201D) to a vocabulary."),Nn.forEach(t),kc=u(jn),Vn=r(jn,"LI",{});var Gl=i(Vn);vc=s(Gl,"The argument "),Ar=r(Gl,"CODE",{});var Eg=i(Ar);wc=s(Eg,"do_lowercase"),Eg.forEach(t),Tc=s(Gl," controls lower casing (automatically set for pretrained vocabularies)."),Gl.forEach(t),jn.forEach(t),Fc=u(rt),Yn=r(rt,"P",{});var Jl=i(Yn);$c=s(Jl,"This tokenizer inherits from "),Ca=r(Jl,"A",{href:!0});var Mg=i(Ca);Ec=s(Mg,"PreTrainedTokenizer"),Mg.forEach(t),Mc=s(Jl,` which contains most of the main methods. Users should refer to
this superclass for more information regarding those methods.`),Jl.forEach(t),xc=u(rt),Dt=r(rt,"DIV",{class:!0});var rr=i(Dt);w(Xn.$$.fragment,rr),qc=u(rr),Pr=r(rr,"P",{});var xg=i(Pr);zc=s(xg,`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:`),xg.forEach(t),Cc=u(rr),Gn=r(rr,"UL",{});var Zl=i(Gn);ja=r(Zl,"LI",{});var ig=i(ja);jc=s(ig,"single sequence: "),Or=r(ig,"CODE",{});var qg=i(Or);Nc=s(qg,"<s> X </s>"),qg.forEach(t),ig.forEach(t),Ac=u(Zl),Na=r(Zl,"LI",{});var lg=i(Na);Pc=s(lg,"pair of sequences: "),Dr=r(lg,"CODE",{});var zg=i(Dr);Oc=s(zg,"<s> A </s> B </s>"),zg.forEach(t),lg.forEach(t),Zl.forEach(t),rr.forEach(t),Dc=u(rt),jo=r(rt,"DIV",{class:!0});var ed=i(jo);w(Jn.$$.fragment,ed),Sc=u(ed),Sr=r(ed,"P",{});var Cg=i(Sr);Lc=s(Cg,"Converts a sequence of tokens (string) in a single string."),Cg.forEach(t),ed.forEach(t),Ic=u(rt),bt=r(rt,"DIV",{class:!0});var An=i(bt);w(Zn.$$.fragment,An),Wc=u(An),Lr=r(An,"P",{});var jg=i(Lr);Hc=s(jg,"Create a mask from the two sequences passed to be used in a sequence-pair classification task. An XLM sequence"),jg.forEach(t),Uc=u(An),w(No.$$.fragment,An),Qc=u(An),Gt=r(An,"P",{});var ir=i(Gt);Bc=s(ir,"If "),Ir=r(ir,"CODE",{});var Ng=i(Ir);Rc=s(Ng,"token_ids_1"),Ng.forEach(t),Kc=s(ir," is "),Wr=r(ir,"CODE",{});var Ag=i(Wr);Vc=s(Ag,"None"),Ag.forEach(t),Yc=s(ir,", this method only returns the first portion of the mask (0s)."),ir.forEach(t),An.forEach(t),Xc=u(rt),Ao=r(rt,"DIV",{class:!0});var td=i(Ao);w(es.$$.fragment,td),Gc=u(td),ts=r(td,"P",{});var od=i(ts);Jc=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 `),Hr=r(od,"CODE",{});var Pg=i(Hr);Zc=s(Pg,"prepare_for_model"),Pg.forEach(t),ep=s(od," method."),od.forEach(t),td.forEach(t),rt.forEach(t),wl=u(o),Jt=r(o,"H2",{class:!0});var nd=i(Jt);Po=r(nd,"A",{id:!0,class:!0,href:!0});var Og=i(Po);Ur=r(Og,"SPAN",{});var Dg=i(Ur);w(os.$$.fragment,Dg),Dg.forEach(t),Og.forEach(t),tp=u(nd),Qr=r(nd,"SPAN",{});var Sg=i(Qr);op=s(Sg,"FlaubertModel"),Sg.forEach(t),nd.forEach(t),Tl=u(o),Zt=r(o,"DIV",{class:!0});var sd=i(Zt);w(ns.$$.fragment,sd),np=u(sd),yt=r(sd,"DIV",{class:!0});var Pn=i(yt);w(ss.$$.fragment,Pn),sp=u(Pn),eo=r(Pn,"P",{});var lr=i(eo);ap=s(lr,"The "),Aa=r(lr,"A",{href:!0});var Lg=i(Aa);rp=s(Lg,"FlaubertModel"),Lg.forEach(t),ip=s(lr," forward method, overrides the "),Br=r(lr,"CODE",{});var Ig=i(Br);lp=s(Ig,"__call__"),Ig.forEach(t),dp=s(lr," special method."),lr.forEach(t),cp=u(Pn),w(Oo.$$.fragment,Pn),pp=u(Pn),w(Do.$$.fragment,Pn),Pn.forEach(t),sd.forEach(t),Fl=u(o),to=r(o,"H2",{class:!0});var ad=i(to);So=r(ad,"A",{id:!0,class:!0,href:!0});var Wg=i(So);Rr=r(Wg,"SPAN",{});var Hg=i(Rr);w(as.$$.fragment,Hg),Hg.forEach(t),Wg.forEach(t),up=u(ad),Kr=r(ad,"SPAN",{});var Ug=i(Kr);hp=s(Ug,"FlaubertWithLMHeadModel"),Ug.forEach(t),ad.forEach(t),$l=u(o),it=r(o,"DIV",{class:!0});var St=i(it);w(rs.$$.fragment,St),mp=u(St),Vr=r(St,"P",{});var Qg=i(Vr);fp=s(Qg,`The Flaubert Model transformer with a language modeling head on top (linear layer with weights tied to the input
embeddings).`),Qg.forEach(t),gp=u(St),is=r(St,"P",{});var rd=i(is);_p=s(rd,"This model inherits from "),Pa=r(rd,"A",{href:!0});var Bg=i(Pa);bp=s(Bg,"PreTrainedModel"),Bg.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),kp=u(St),ls=r(St,"P",{});var id=i(ls);vp=s(id,"This model is also a PyTorch "),ds=r(id,"A",{href:!0,rel:!0});var Rg=i(ds);wp=s(Rg,"torch.nn.Module"),Rg.forEach(t),Tp=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),Fp=u(St),kt=r(St,"DIV",{class:!0});var On=i(kt);w(cs.$$.fragment,On),$p=u(On),oo=r(On,"P",{});var dr=i(oo);Ep=s(dr,"The "),Oa=r(dr,"A",{href:!0});var Kg=i(Oa);Mp=s(Kg,"FlaubertWithLMHeadModel"),Kg.forEach(t),xp=s(dr," forward method, overrides the "),Yr=r(dr,"CODE",{});var Vg=i(Yr);qp=s(Vg,"__call__"),Vg.forEach(t),zp=s(dr," special method."),dr.forEach(t),Cp=u(On),w(Lo.$$.fragment,On),jp=u(On),w(Io.$$.fragment,On),On.forEach(t),St.forEach(t),El=u(o),no=r(o,"H2",{class:!0});var ld=i(no);Wo=r(ld,"A",{id:!0,class:!0,href:!0});var Yg=i(Wo);Xr=r(Yg,"SPAN",{});var Xg=i(Xr);w(ps.$$.fragment,Xg),Xg.forEach(t),Yg.forEach(t),Np=u(ld),Gr=r(ld,"SPAN",{});var Gg=i(Gr);Ap=s(Gg,"FlaubertForSequenceClassification"),Gg.forEach(t),ld.forEach(t),Ml=u(o),lt=r(o,"DIV",{class:!0});var Lt=i(lt);w(us.$$.fragment,Lt),Pp=u(Lt),Jr=r(Lt,"P",{});var Jg=i(Jr);Op=s(Jg,`Flaubert Model with a sequence classification/regression head on top (a linear layer on top of the pooled output)
e.g. for GLUE tasks.`),Jg.forEach(t),Dp=u(Lt),hs=r(Lt,"P",{});var dd=i(hs);Sp=s(dd,"This model inherits from "),Da=r(dd,"A",{href:!0});var Zg=i(Da);Lp=s(Zg,"PreTrainedModel"),Zg.forEach(t),Ip=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),Wp=u(Lt),ms=r(Lt,"P",{});var cd=i(ms);Hp=s(cd,"This model is also a PyTorch "),fs=r(cd,"A",{href:!0,rel:!0});var e_=i(fs);Up=s(e_,"torch.nn.Module"),e_.forEach(t),Qp=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),Bp=u(Lt),ut=r(Lt,"DIV",{class:!0});var It=i(ut);w(gs.$$.fragment,It),Rp=u(It),so=r(It,"P",{});var cr=i(so);Kp=s(cr,"The "),Sa=r(cr,"A",{href:!0});var t_=i(Sa);Vp=s(t_,"FlaubertForSequenceClassification"),t_.forEach(t),Yp=s(cr," forward method, overrides the "),Zr=r(cr,"CODE",{});var o_=i(Zr);Xp=s(o_,"__call__"),o_.forEach(t),Gp=s(cr," special method."),cr.forEach(t),Jp=u(It),w(Ho.$$.fragment,It),Zp=u(It),w(Uo.$$.fragment,It),eu=u(It),w(Qo.$$.fragment,It),It.forEach(t),Lt.forEach(t),xl=u(o),ao=r(o,"H2",{class:!0});var pd=i(ao);Bo=r(pd,"A",{id:!0,class:!0,href:!0});var n_=i(Bo);ei=r(n_,"SPAN",{});var s_=i(ei);w(_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),ql=u(o),dt=r(o,"DIV",{class:!0});var Wt=i(dt);w(bs.$$.fragment,Wt),nu=u(Wt),oi=r(Wt,"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(Wt),ys=r(Wt,"P",{});var ud=i(ys);ru=s(ud,"This model inherits from "),La=r(ud,"A",{href:!0});var i_=i(La);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(Wt),ks=r(Wt,"P",{});var hd=i(ks);cu=s(hd,"This model is also a PyTorch "),vs=r(hd,"A",{href:!0,rel:!0});var l_=i(vs);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(Wt),vt=r(Wt,"DIV",{class:!0});var Dn=i(vt);w(ws.$$.fragment,Dn),mu=u(Dn),ro=r(Dn,"P",{});var pr=i(ro);fu=s(pr,"The "),Ia=r(pr,"A",{href:!0});var d_=i(Ia);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),ku=u(Dn),w(Ro.$$.fragment,Dn),vu=u(Dn),w(Ko.$$.fragment,Dn),Dn.forEach(t),Wt.forEach(t),zl=u(o),io=r(o,"H2",{class:!0});var md=i(io);Vo=r(md,"A",{id:!0,class:!0,href:!0});var p_=i(Vo);si=r(p_,"SPAN",{});var u_=i(si);w(Ts.$$.fragment,u_),u_.forEach(t),p_.forEach(t),wu=u(md),ai=r(md,"SPAN",{});var h_=i(ai);Tu=s(h_,"FlaubertForTokenClassification"),h_.forEach(t),md.forEach(t),Cl=u(o),ct=r(o,"DIV",{class:!0});var Ht=i(ct);w(Fs.$$.fragment,Ht),Fu=u(Ht),ri=r(Ht,"P",{});var m_=i(ri);$u=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),Eu=u(Ht),$s=r(Ht,"P",{});var fd=i($s);Mu=s(fd,"This model inherits from "),Wa=r(fd,"A",{href:!0});var f_=i(Wa);xu=s(f_,"PreTrainedModel"),f_.forEach(t),qu=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),zu=u(Ht),Es=r(Ht,"P",{});var gd=i(Es);Cu=s(gd,"This model is also a PyTorch "),Ms=r(gd,"A",{href:!0,rel:!0});var g_=i(Ms);ju=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),Au=u(Ht),wt=r(Ht,"DIV",{class:!0});var Sn=i(wt);w(xs.$$.fragment,Sn),Pu=u(Sn),lo=r(Sn,"P",{});var ur=i(lo);Ou=s(ur,"The "),Ha=r(ur,"A",{href:!0});var __=i(Ha);Du=s(__,"FlaubertForTokenClassification"),__.forEach(t),Su=s(ur," forward method, overrides the "),ii=r(ur,"CODE",{});var b_=i(ii);Lu=s(b_,"__call__"),b_.forEach(t),Iu=s(ur," special method."),ur.forEach(t),Wu=u(Sn),w(Yo.$$.fragment,Sn),Hu=u(Sn),w(Xo.$$.fragment,Sn),Sn.forEach(t),Ht.forEach(t),jl=u(o),co=r(o,"H2",{class:!0});var _d=i(co);Go=r(_d,"A",{id:!0,class:!0,href:!0});var y_=i(Go);li=r(y_,"SPAN",{});var k_=i(li);w(qs.$$.fragment,k_),k_.forEach(t),y_.forEach(t),Uu=u(_d),di=r(_d,"SPAN",{});var v_=i(di);Qu=s(v_,"FlaubertForQuestionAnsweringSimple"),v_.forEach(t),_d.forEach(t),Nl=u(o),pt=r(o,"DIV",{class:!0});var Ut=i(pt);w(zs.$$.fragment,Ut),Bu=u(Ut),po=r(Ut,"P",{});var hr=i(po);Ru=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 w_=i(ci);Ku=s(w_,"span start logits"),w_.forEach(t),Vu=s(hr," and "),pi=r(hr,"CODE",{});var T_=i(pi);Yu=s(T_,"span end logits"),T_.forEach(t),Xu=s(hr,")."),hr.forEach(t),Gu=u(Ut),Cs=r(Ut,"P",{});var bd=i(Cs);Ju=s(bd,"This model inherits from "),Ua=r(bd,"A",{href:!0});var F_=i(Ua);Zu=s(F_,"PreTrainedModel"),F_.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(Ut),js=r(Ut,"P",{});var yd=i(js);oh=s(yd,"This model is also a PyTorch "),Ns=r(yd,"A",{href:!0,rel:!0});var $_=i(Ns);nh=s($_,"torch.nn.Module"),$_.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(Ut),Tt=r(Ut,"DIV",{class:!0});var Ln=i(Tt);w(As.$$.fragment,Ln),rh=u(Ln),uo=r(Ln,"P",{});var mr=i(uo);ih=s(mr,"The "),Qa=r(mr,"A",{href:!0});var E_=i(Qa);lh=s(E_,"FlaubertForQuestionAnsweringSimple"),E_.forEach(t),dh=s(mr," forward method, overrides the "),ui=r(mr,"CODE",{});var M_=i(ui);ch=s(M_,"__call__"),M_.forEach(t),ph=s(mr," special method."),mr.forEach(t),uh=u(Ln),w(Jo.$$.fragment,Ln),hh=u(Ln),w(Zo.$$.fragment,Ln),Ln.forEach(t),Ut.forEach(t),Al=u(o),ho=r(o,"H2",{class:!0});var kd=i(ho);en=r(kd,"A",{id:!0,class:!0,href:!0});var x_=i(en);hi=r(x_,"SPAN",{});var q_=i(hi);w(Ps.$$.fragment,q_),q_.forEach(t),x_.forEach(t),mh=u(kd),mi=r(kd,"SPAN",{});var z_=i(mi);fh=s(z_,"FlaubertForQuestionAnswering"),z_.forEach(t),kd.forEach(t),Pl=u(o),mo=r(o,"DIV",{class:!0});var vd=i(mo);w(Os.$$.fragment,vd),gh=u(vd),ht=r(vd,"DIV",{class:!0});var Qt=i(ht);w(Ds.$$.fragment,Qt),_h=u(Qt),fo=r(Qt,"P",{});var fr=i(fo);bh=s(fr,"The "),Ba=r(fr,"A",{href:!0});var C_=i(Ba);yh=s(C_,"FlaubertForQuestionAnswering"),C_.forEach(t),kh=s(fr," forward method, overrides the "),fi=r(fr,"CODE",{});var j_=i(fi);vh=s(j_,"__call__"),j_.forEach(t),wh=s(fr," special method."),fr.forEach(t),Th=u(Qt),w(tn.$$.fragment,Qt),Fh=u(Qt),Ss=r(Qt,"P",{});var wd=i(Ss);$h=s(wd,"Base class for outputs of question answering models using a "),gi=r(wd,"CODE",{});var N_=i(gi);Eh=s(N_,"SquadHead"),N_.forEach(t),Mh=s(wd,"."),wd.forEach(t),xh=u(Qt),w(on.$$.fragment,Qt),Qt.forEach(t),vd.forEach(t),Ol=u(o),go=r(o,"H2",{class:!0});var Td=i(go);nn=r(Td,"A",{id:!0,class:!0,href:!0});var A_=i(nn);_i=r(A_,"SPAN",{});var P_=i(_i);w(Ls.$$.fragment,P_),P_.forEach(t),A_.forEach(t),qh=u(Td),bi=r(Td,"SPAN",{});var O_=i(bi);zh=s(O_,"TFFlaubertModel"),O_.forEach(t),Td.forEach(t),Dl=u(o),et=r(o,"DIV",{class:!0});var Mt=i(et);w(Is.$$.fragment,Mt),Ch=u(Mt),yi=r(Mt,"P",{});var D_=i(yi);jh=s(D_,"The bare Flaubert Model transformer outputting raw hidden-states without any specific head on top."),D_.forEach(t),Nh=u(Mt),Ws=r(Mt,"P",{});var Fd=i(Ws);Ah=s(Fd,"This model inherits from "),Ra=r(Fd,"A",{href:!0});var S_=i(Ra);Ph=s(S_,"TFPreTrainedModel"),S_.forEach(t),Oh=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),Dh=u(Mt),Hs=r(Mt,"P",{});var $d=i(Hs);Sh=s($d,"This model is also a "),Us=r($d,"A",{href:!0,rel:!0});var L_=i(Us);Lh=s(L_,"tf.keras.Model"),L_.forEach(t),Ih=s($d,` 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.`),$d.forEach(t),Wh=u(Mt),w(sn.$$.fragment,Mt),Hh=u(Mt),Ft=r(Mt,"DIV",{class:!0});var In=i(Ft);w(Qs.$$.fragment,In),Uh=u(In),_o=r(In,"P",{});var gr=i(_o);Qh=s(gr,"The "),Ka=r(gr,"A",{href:!0});var I_=i(Ka);Bh=s(I_,"TFFlaubertModel"),I_.forEach(t),Rh=s(gr," forward method, overrides the "),ki=r(gr,"CODE",{});var W_=i(ki);Kh=s(W_,"__call__"),W_.forEach(t),Vh=s(gr," special method."),gr.forEach(t),Yh=u(In),w(an.$$.fragment,In),Xh=u(In),w(rn.$$.fragment,In),In.forEach(t),Mt.forEach(t),Sl=u(o),bo=r(o,"H2",{class:!0});var Ed=i(bo);ln=r(Ed,"A",{id:!0,class:!0,href:!0});var H_=i(ln);vi=r(H_,"SPAN",{});var U_=i(vi);w(Bs.$$.fragment,U_),U_.forEach(t),H_.forEach(t),Gh=u(Ed),wi=r(Ed,"SPAN",{});var Q_=i(wi);Jh=s(Q_,"TFFlaubertWithLMHeadModel"),Q_.forEach(t),Ed.forEach(t),Ll=u(o),tt=r(o,"DIV",{class:!0});var xt=i(tt);w(Rs.$$.fragment,xt),Zh=u(xt),Ti=r(xt,"P",{});var B_=i(Ti);em=s(B_,`The Flaubert Model transformer with a language modeling head on top (linear layer with weights tied to the input
embeddings).`),B_.forEach(t),tm=u(xt),Ks=r(xt,"P",{});var Md=i(Ks);om=s(Md,"This model inherits from "),Va=r(Md,"A",{href:!0});var R_=i(Va);nm=s(R_,"TFPreTrainedModel"),R_.forEach(t),sm=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),am=u(xt),Vs=r(xt,"P",{});var xd=i(Vs);rm=s(xd,"This model is also a "),Ys=r(xd,"A",{href:!0,rel:!0});var K_=i(Ys);im=s(K_,"tf.keras.Model"),K_.forEach(t),lm=s(xd,` 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.`),xd.forEach(t),dm=u(xt),w(dn.$$.fragment,xt),cm=u(xt),$t=r(xt,"DIV",{class:!0});var Wn=i($t);w(Xs.$$.fragment,Wn),pm=u(Wn),yo=r(Wn,"P",{});var _r=i(yo);um=s(_r,"The "),Ya=r(_r,"A",{href:!0});var V_=i(Ya);hm=s(V_,"TFFlaubertWithLMHeadModel"),V_.forEach(t),mm=s(_r," forward method, overrides the "),Fi=r(_r,"CODE",{});var Y_=i(Fi);fm=s(Y_,"__call__"),Y_.forEach(t),gm=s(_r," special method."),_r.forEach(t),_m=u(Wn),w(cn.$$.fragment,Wn),bm=u(Wn),w(pn.$$.fragment,Wn),Wn.forEach(t),xt.forEach(t),Il=u(o),ko=r(o,"H2",{class:!0});var qd=i(ko);un=r(qd,"A",{id:!0,class:!0,href:!0});var X_=i(un);$i=r(X_,"SPAN",{});var G_=i($i);w(Gs.$$.fragment,G_),G_.forEach(t),X_.forEach(t),ym=u(qd),Ei=r(qd,"SPAN",{});var J_=i(Ei);km=s(J_,"TFFlaubertForSequenceClassification"),J_.forEach(t),qd.forEach(t),Wl=u(o),ot=r(o,"DIV",{class:!0});var qt=i(ot);w(Js.$$.fragment,qt),vm=u(qt),Mi=r(qt,"P",{});var Z_=i(Mi);wm=s(Z_,`Flaubert Model with a sequence classification/regression head on top (a linear layer on top of the pooled output)
e.g. for GLUE tasks.`),Z_.forEach(t),Tm=u(qt),Zs=r(qt,"P",{});var zd=i(Zs);Fm=s(zd,"This model inherits from "),Xa=r(zd,"A",{href:!0});var eb=i(Xa);$m=s(eb,"TFPreTrainedModel"),eb.forEach(t),Em=s(zd,`. 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.)`),zd.forEach(t),Mm=u(qt),ea=r(qt,"P",{});var Cd=i(ea);xm=s(Cd,"This model is also a "),ta=r(Cd,"A",{href:!0,rel:!0});var tb=i(ta);qm=s(tb,"tf.keras.Model"),tb.forEach(t),zm=s(Cd,` 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.`),Cd.forEach(t),Cm=u(qt),w(hn.$$.fragment,qt),jm=u(qt),mt=r(qt,"DIV",{class:!0});var Bt=i(mt);w(oa.$$.fragment,Bt),Nm=u(Bt),vo=r(Bt,"P",{});var br=i(vo);Am=s(br,"The "),Ga=r(br,"A",{href:!0});var ob=i(Ga);Pm=s(ob,"TFFlaubertForSequenceClassification"),ob.forEach(t),Om=s(br," forward method, overrides the "),xi=r(br,"CODE",{});var nb=i(xi);Dm=s(nb,"__call__"),nb.forEach(t),Sm=s(br," special method."),br.forEach(t),Lm=u(Bt),w(mn.$$.fragment,Bt),Im=u(Bt),w(fn.$$.fragment,Bt),Wm=u(Bt),w(gn.$$.fragment,Bt),Bt.forEach(t),qt.forEach(t),Hl=u(o),wo=r(o,"H2",{class:!0});var jd=i(wo);_n=r(jd,"A",{id:!0,class:!0,href:!0});var sb=i(_n);qi=r(sb,"SPAN",{});var ab=i(qi);w(na.$$.fragment,ab),ab.forEach(t),sb.forEach(t),Hm=u(jd),zi=r(jd,"SPAN",{});var rb=i(zi);Um=s(rb,"TFFlaubertForMultipleChoice"),rb.forEach(t),jd.forEach(t),Ul=u(o),nt=r(o,"DIV",{class:!0});var zt=i(nt);w(sa.$$.fragment,zt),Qm=u(zt),Ci=r(zt,"P",{});var ib=i(Ci);Bm=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),Rm=u(zt),aa=r(zt,"P",{});var Nd=i(aa);Km=s(Nd,"This model inherits from "),Ja=r(Nd,"A",{href:!0});var lb=i(Ja);Vm=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),Xm=u(zt),ra=r(zt,"P",{});var Ad=i(ra);Gm=s(Ad,"This model is also a "),ia=r(Ad,"A",{href:!0,rel:!0});var db=i(ia);Jm=s(db,"tf.keras.Model"),db.forEach(t),Zm=s(Ad,` 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.`),Ad.forEach(t),ef=u(zt),w(bn.$$.fragment,zt),tf=u(zt),Et=r(zt,"DIV",{class:!0});var Hn=i(Et);w(la.$$.fragment,Hn),of=u(Hn),To=r(Hn,"P",{});var yr=i(To);nf=s(yr,"The "),Za=r(yr,"A",{href:!0});var cb=i(Za);sf=s(cb,"TFFlaubertForMultipleChoice"),cb.forEach(t),af=s(yr," forward method, overrides the "),ji=r(yr,"CODE",{});var pb=i(ji);rf=s(pb,"__call__"),pb.forEach(t),lf=s(yr," special method."),yr.forEach(t),df=u(Hn),w(yn.$$.fragment,Hn),cf=u(Hn),w(kn.$$.fragment,Hn),Hn.forEach(t),zt.forEach(t),Ql=u(o),Fo=r(o,"H2",{class:!0});var Pd=i(Fo);vn=r(Pd,"A",{id:!0,class:!0,href:!0});var ub=i(vn);Ni=r(ub,"SPAN",{});var hb=i(Ni);w(da.$$.fragment,hb),hb.forEach(t),ub.forEach(t),pf=u(Pd),Ai=r(Pd,"SPAN",{});var mb=i(Ai);uf=s(mb,"TFFlaubertForTokenClassification"),mb.forEach(t),Pd.forEach(t),Bl=u(o),st=r(o,"DIV",{class:!0});var Ct=i(st);w(ca.$$.fragment,Ct),hf=u(Ct),Pi=r(Ct,"P",{});var fb=i(Pi);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(Ct),pa=r(Ct,"P",{});var Od=i(pa);gf=s(Od,"This model inherits from "),er=r(Od,"A",{href:!0});var gb=i(er);_f=s(gb,"TFPreTrainedModel"),gb.forEach(t),bf=s(Od,`. 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.)`),Od.forEach(t),yf=u(Ct),ua=r(Ct,"P",{});var Dd=i(ua);kf=s(Dd,"This model is also a "),ha=r(Dd,"A",{href:!0,rel:!0});var _b=i(ha);vf=s(_b,"tf.keras.Model"),_b.forEach(t),wf=s(Dd,` 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.`),Dd.forEach(t),Tf=u(Ct),w(wn.$$.fragment,Ct),Ff=u(Ct),ft=r(Ct,"DIV",{class:!0});var Rt=i(ft);w(ma.$$.fragment,Rt),$f=u(Rt),$o=r(Rt,"P",{});var kr=i($o);Ef=s(kr,"The "),tr=r(kr,"A",{href:!0});var bb=i(tr);Mf=s(bb,"TFFlaubertForTokenClassification"),bb.forEach(t),xf=s(kr," forward method, overrides the "),Oi=r(kr,"CODE",{});var yb=i(Oi);qf=s(yb,"__call__"),yb.forEach(t),zf=s(kr," special method."),kr.forEach(t),Cf=u(Rt),w(Tn.$$.fragment,Rt),jf=u(Rt),w(Fn.$$.fragment,Rt),Nf=u(Rt),w($n.$$.fragment,Rt),Rt.forEach(t),Ct.forEach(t),Rl=u(o),Eo=r(o,"H2",{class:!0});var Sd=i(Eo);En=r(Sd,"A",{id:!0,class:!0,href:!0});var kb=i(En);Di=r(kb,"SPAN",{});var vb=i(Di);w(fa.$$.fragment,vb),vb.forEach(t),kb.forEach(t),Af=u(Sd),Si=r(Sd,"SPAN",{});var wb=i(Si);Pf=s(wb,"TFFlaubertForQuestionAnsweringSimple"),wb.forEach(t),Sd.forEach(t),Kl=u(o),at=r(o,"DIV",{class:!0});var jt=i(at);w(ga.$$.fragment,jt),Of=u(jt),Mo=r(jt,"P",{});var vr=i(Mo);Df=s(vr,`Flaubert Model with a span classification head on top for extractive question-answering tasks like SQuAD (a linear
layer on top of the hidden-states output to compute `),Li=r(vr,"CODE",{});var Tb=i(Li);Sf=s(Tb,"span start logits"),Tb.forEach(t),Lf=s(vr," and "),Ii=r(vr,"CODE",{});var Fb=i(Ii);If=s(Fb,"span end logits"),Fb.forEach(t),Wf=s(vr,")."),vr.forEach(t),Hf=u(jt),_a=r(jt,"P",{});var Ld=i(_a);Uf=s(Ld,"This model inherits from "),or=r(Ld,"A",{href:!0});var $b=i(or);Qf=s($b,"TFPreTrainedModel"),$b.forEach(t),Bf=s(Ld,`. 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.)`),Ld.forEach(t),Rf=u(jt),ba=r(jt,"P",{});var Id=i(ba);Kf=s(Id,"This model is also a "),ya=r(Id,"A",{href:!0,rel:!0});var Eb=i(ya);Vf=s(Eb,"tf.keras.Model"),Eb.forEach(t),Yf=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),Xf=u(jt),w(Mn.$$.fragment,jt),Gf=u(jt),gt=r(jt,"DIV",{class:!0});var Kt=i(gt);w(ka.$$.fragment,Kt),Jf=u(Kt),xo=r(Kt,"P",{});var wr=i(xo);Zf=s(wr,"The "),nr=r(wr,"A",{href:!0});var Mb=i(nr);eg=s(Mb,"TFFlaubertForQuestionAnsweringSimple"),Mb.forEach(t),tg=s(wr," forward method, overrides the "),Wi=r(wr,"CODE",{});var xb=i(Wi);og=s(xb,"__call__"),xb.forEach(t),ng=s(wr," special method."),wr.forEach(t),sg=u(Kt),w(xn.$$.fragment,Kt),ag=u(Kt),w(qn.$$.fragment,Kt),rg=u(Kt),w(zn.$$.fragment,Kt),Kt.forEach(t),jt.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(J,"alt","Models"),qb(J.src,M="https://img.shields.io/badge/All_model_pages-flaubert-blueviolet")||f(J,"src",M),f(ce,"href","https://huggingface.co/models?filter=flaubert"),f(pe,"alt","Spaces"),qb(pe.src,Ne="https://img.shields.io/badge/%F0%9F%A4%97%20Hugging%20Face-Spaces-blue")||f(pe,"src",Ne),f(U,"href","https://huggingface.co/spaces/docs-demos/flaubert_small_cased"),f(L,"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(W,"href","https://huggingface.co/formiel"),f(W,"rel","nofollow"),f(H,"href","https://github.com/getalp/Flaubert"),f(H,"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(Ae,"href","./tasks/sequence_classification"),f(D,"href","./tasks/token_classification"),f(Q,"href","./tasks/question_answering"),f(Pe,"href","./tasks/masked_language_modeling"),f(Ea,"href","./tasks/multiple_choice"),f(zo,"id","transformers.FlaubertConfig"),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.FlaubertConfig"),f(Vt,"class","relative group"),f(Ma,"href","/docs/transformers/v4.27.1/en/model_doc/flaubert#transformers.FlaubertModel"),f(xa,"href","/docs/transformers/v4.27.1/en/model_doc/flaubert#transformers.TFFlaubertModel"),f(Bn,"href","https://huggingface.co/flaubert/flaubert_base_uncased"),f(Bn,"rel","nofollow"),f(qa,"href","/docs/transformers/v4.27.1/en/main_classes/configuration#transformers.PretrainedConfig"),f(za,"href","/docs/transformers/v4.27.1/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(Co,"id","transformers.FlaubertTokenizer"),f(Co,"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(Co,"href","#transformers.FlaubertTokenizer"),f(Xt,"class","relative group"),f(Ca,"href","/docs/transformers/v4.27.1/en/main_classes/tokenizer#transformers.PreTrainedTokenizer"),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(jo,"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(Ao,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(Ve,"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.FlaubertModel"),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.FlaubertModel"),f(Jt,"class","relative group"),f(Aa,"href","/docs/transformers/v4.27.1/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(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(So,"id","transformers.FlaubertWithLMHeadModel"),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.FlaubertWithLMHeadModel"),f(to,"class","relative group"),f(Pa,"href","/docs/transformers/v4.27.1/en/main_classes/model#transformers.PreTrainedModel"),f(ds,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),f(ds,"rel","nofollow"),f(Oa,"href","/docs/transformers/v4.27.1/en/model_doc/flaubert#transformers.FlaubertWithLMHeadModel"),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(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(Wo,"id","transformers.FlaubertForSequenceClassification"),f(Wo,"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(Wo,"href","#transformers.FlaubertForSequenceClassification"),f(no,"class","relative group"),f(Da,"href","/docs/transformers/v4.27.1/en/main_classes/model#transformers.PreTrainedModel"),f(fs,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),f(fs,"rel","nofollow"),f(Sa,"href","/docs/transformers/v4.27.1/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(Bo,"id","transformers.FlaubertForMultipleChoice"),f(Bo,"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(Bo,"href","#transformers.FlaubertForMultipleChoice"),f(ao,"class","relative group"),f(La,"href","/docs/transformers/v4.27.1/en/main_classes/model#transformers.PreTrainedModel"),f(vs,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),f(vs,"rel","nofollow"),f(Ia,"href","/docs/transformers/v4.27.1/en/model_doc/flaubert#transformers.FlaubertForMultipleChoice"),f(vt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(dt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(Vo,"id","transformers.FlaubertForTokenClassification"),f(Vo,"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(Vo,"href","#transformers.FlaubertForTokenClassification"),f(io,"class","relative group"),f(Wa,"href","/docs/transformers/v4.27.1/en/main_classes/model#transformers.PreTrainedModel"),f(Ms,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),f(Ms,"rel","nofollow"),f(Ha,"href","/docs/transformers/v4.27.1/en/model_doc/flaubert#transformers.FlaubertForTokenClassification"),f(wt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(ct,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(Go,"id","transformers.FlaubertForQuestionAnsweringSimple"),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.FlaubertForQuestionAnsweringSimple"),f(co,"class","relative group"),f(Ua,"href","/docs/transformers/v4.27.1/en/main_classes/model#transformers.PreTrainedModel"),f(Ns,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),f(Ns,"rel","nofollow"),f(Qa,"href","/docs/transformers/v4.27.1/en/model_doc/flaubert#transformers.FlaubertForQuestionAnsweringSimple"),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(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(Ba,"href","/docs/transformers/v4.27.1/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(Ra,"href","/docs/transformers/v4.27.1/en/main_classes/model#transformers.TFPreTrainedModel"),f(Us,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),f(Us,"rel","nofollow"),f(Ka,"href","/docs/transformers/v4.27.1/en/model_doc/flaubert#transformers.TFFlaubertModel"),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(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(Va,"href","/docs/transformers/v4.27.1/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/v4.27.1/en/model_doc/flaubert#transformers.TFFlaubertWithLMHeadModel"),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(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(ko,"class","relative group"),f(Xa,"href","/docs/transformers/v4.27.1/en/main_classes/model#transformers.TFPreTrainedModel"),f(ta,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),f(ta,"rel","nofollow"),f(Ga,"href","/docs/transformers/v4.27.1/en/model_doc/flaubert#transformers.TFFlaubertForSequenceClassification"),f(mt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(ot,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(_n,"id","transformers.TFFlaubertForMultipleChoice"),f(_n,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),f(_n,"href","#transformers.TFFlaubertForMultipleChoice"),f(wo,"class","relative group"),f(Ja,"href","/docs/transformers/v4.27.1/en/main_classes/model#transformers.TFPreTrainedModel"),f(ia,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),f(ia,"rel","nofollow"),f(Za,"href","/docs/transformers/v4.27.1/en/model_doc/flaubert#transformers.TFFlaubertForMultipleChoice"),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(nt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(vn,"id","transformers.TFFlaubertForTokenClassification"),f(vn,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),f(vn,"href","#transformers.TFFlaubertForTokenClassification"),f(Fo,"class","relative group"),f(er,"href","/docs/transformers/v4.27.1/en/main_classes/model#transformers.TFPreTrainedModel"),f(ha,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),f(ha,"rel","nofollow"),f(tr,"href","/docs/transformers/v4.27.1/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(En,"id","transformers.TFFlaubertForQuestionAnsweringSimple"),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.TFFlaubertForQuestionAnsweringSimple"),f(Eo,"class","relative group"),f(or,"href","/docs/transformers/v4.27.1/en/main_classes/model#transformers.TFPreTrainedModel"),f(ya,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),f(ya,"rel","nofollow"),f(nr,"href","/docs/transformers/v4.27.1/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,k,b),_(o,h,b),e(h,m),e(m,y),T(l,y,null),e(h,c),e(h,z),e(z,ve),_(o,ge,b),_(o,L,b),e(L,ce),e(ce,J),e(L,we),e(L,U),e(U,pe),_(o,V,b),_(o,te,b),e(te,ae),e(ae,B),T(le,B,null),e(te,Te),e(te,R),e(R,Fe),_(o,_e,b),_(o,I,b),e(I,$e),e(I,de),e(de,oe),e(I,j),_(o,P,b),_(o,ue,b),e(ue,Y),_(o,be,b),_(o,he,b),e(he,K),e(K,Ee),_(o,ye,b),_(o,N,b),e(N,Me),e(N,W),e(W,xe),e(N,qe),e(N,H),e(H,ze),e(N,Ce),_(o,S,b),_(o,me,b),e(me,X),_(o,ke,b),_(o,Z,b),e(Z,A),e(A,je),_(o,O,b),_(o,ne,b),e(ne,re),e(re,g),T(x,g,null),e(ne,Ie),e(ne,ee),e(ee,We),_(o,Le,b),_(o,q,b),e(q,Oe),e(Oe,Ae),e(Ae,He),e(q,Ue),e(q,De),e(De,D),e(D,G),e(q,Qe),e(q,Se),e(Se,Q),e(Q,Be),e(q,Re),e(q,fe),e(fe,Pe),e(Pe,se),e(q,Ke),e(q,Tr),e(Tr,Ea),e(Ea,Wd),_(o,bl,b),_(o,Vt,b),e(Vt,zo),e(zo,Fr),T(Un,Fr,null),e(Vt,Hd),e(Vt,$r),e($r,Ud),_(o,yl,b),_(o,Nt,b),T(Qn,Nt,null),e(Nt,Qd),e(Nt,At),e(At,Bd),e(At,Ma),e(Ma,Rd),e(At,Kd),e(At,xa),e(xa,Vd),e(At,Yd),e(At,Bn),e(Bn,Xd),e(At,Gd),e(Nt,Jd),e(Nt,Yt),e(Yt,Zd),e(Yt,qa),e(qa,ec),e(Yt,tc),e(Yt,za),e(za,oc),e(Yt,nc),_(o,kl,b),_(o,Xt,b),e(Xt,Co),e(Co,Er),T(Rn,Er,null),e(Xt,sc),e(Xt,Mr),e(Mr,ac),_(o,vl,b),_(o,Ve,b),T(Kn,Ve,null),e(Ve,rc),e(Ve,xr),e(xr,ic),e(Ve,lc),e(Ve,Pt),e(Pt,qr),e(qr,dc),e(Pt,cc),e(Pt,zr),e(zr,pc),e(Pt,uc),e(Pt,Ot),e(Ot,hc),e(Ot,Cr),e(Cr,mc),e(Ot,fc),e(Ot,jr),e(jr,gc),e(Ot,_c),e(Ot,Nr),e(Nr,bc),e(Ot,yc),e(Pt,kc),e(Pt,Vn),e(Vn,vc),e(Vn,Ar),e(Ar,wc),e(Vn,Tc),e(Ve,Fc),e(Ve,Yn),e(Yn,$c),e(Yn,Ca),e(Ca,Ec),e(Yn,Mc),e(Ve,xc),e(Ve,Dt),T(Xn,Dt,null),e(Dt,qc),e(Dt,Pr),e(Pr,zc),e(Dt,Cc),e(Dt,Gn),e(Gn,ja),e(ja,jc),e(ja,Or),e(Or,Nc),e(Gn,Ac),e(Gn,Na),e(Na,Pc),e(Na,Dr),e(Dr,Oc),e(Ve,Dc),e(Ve,jo),T(Jn,jo,null),e(jo,Sc),e(jo,Sr),e(Sr,Lc),e(Ve,Ic),e(Ve,bt),T(Zn,bt,null),e(bt,Wc),e(bt,Lr),e(Lr,Hc),e(bt,Uc),T(No,bt,null),e(bt,Qc),e(bt,Gt),e(Gt,Bc),e(Gt,Ir),e(Ir,Rc),e(Gt,Kc),e(Gt,Wr),e(Wr,Vc),e(Gt,Yc),e(Ve,Xc),e(Ve,Ao),T(es,Ao,null),e(Ao,Gc),e(Ao,ts),e(ts,Jc),e(ts,Hr),e(Hr,Zc),e(ts,ep),_(o,wl,b),_(o,Jt,b),e(Jt,Po),e(Po,Ur),T(os,Ur,null),e(Jt,tp),e(Jt,Qr),e(Qr,op),_(o,Tl,b),_(o,Zt,b),T(ns,Zt,null),e(Zt,np),e(Zt,yt),T(ss,yt,null),e(yt,sp),e(yt,eo),e(eo,ap),e(eo,Aa),e(Aa,rp),e(eo,ip),e(eo,Br),e(Br,lp),e(eo,dp),e(yt,cp),T(Oo,yt,null),e(yt,pp),T(Do,yt,null),_(o,Fl,b),_(o,to,b),e(to,So),e(So,Rr),T(as,Rr,null),e(to,up),e(to,Kr),e(Kr,hp),_(o,$l,b),_(o,it,b),T(rs,it,null),e(it,mp),e(it,Vr),e(Vr,fp),e(it,gp),e(it,is),e(is,_p),e(is,Pa),e(Pa,bp),e(is,yp),e(it,kp),e(it,ls),e(ls,vp),e(ls,ds),e(ds,wp),e(ls,Tp),e(it,Fp),e(it,kt),T(cs,kt,null),e(kt,$p),e(kt,oo),e(oo,Ep),e(oo,Oa),e(Oa,Mp),e(oo,xp),e(oo,Yr),e(Yr,qp),e(oo,zp),e(kt,Cp),T(Lo,kt,null),e(kt,jp),T(Io,kt,null),_(o,El,b),_(o,no,b),e(no,Wo),e(Wo,Xr),T(ps,Xr,null),e(no,Np),e(no,Gr),e(Gr,Ap),_(o,Ml,b),_(o,lt,b),T(us,lt,null),e(lt,Pp),e(lt,Jr),e(Jr,Op),e(lt,Dp),e(lt,hs),e(hs,Sp),e(hs,Da),e(Da,Lp),e(hs,Ip),e(lt,Wp),e(lt,ms),e(ms,Hp),e(ms,fs),e(fs,Up),e(ms,Qp),e(lt,Bp),e(lt,ut),T(gs,ut,null),e(ut,Rp),e(ut,so),e(so,Kp),e(so,Sa),e(Sa,Vp),e(so,Yp),e(so,Zr),e(Zr,Xp),e(so,Gp),e(ut,Jp),T(Ho,ut,null),e(ut,Zp),T(Uo,ut,null),e(ut,eu),T(Qo,ut,null),_(o,xl,b),_(o,ao,b),e(ao,Bo),e(Bo,ei),T(_s,ei,null),e(ao,tu),e(ao,ti),e(ti,ou),_(o,ql,b),_(o,dt,b),T(bs,dt,null),e(dt,nu),e(dt,oi),e(oi,su),e(dt,au),e(dt,ys),e(ys,ru),e(ys,La),e(La,iu),e(ys,lu),e(dt,du),e(dt,ks),e(ks,cu),e(ks,vs),e(vs,pu),e(ks,uu),e(dt,hu),e(dt,vt),T(ws,vt,null),e(vt,mu),e(vt,ro),e(ro,fu),e(ro,Ia),e(Ia,gu),e(ro,_u),e(ro,ni),e(ni,bu),e(ro,yu),e(vt,ku),T(Ro,vt,null),e(vt,vu),T(Ko,vt,null),_(o,zl,b),_(o,io,b),e(io,Vo),e(Vo,si),T(Ts,si,null),e(io,wu),e(io,ai),e(ai,Tu),_(o,Cl,b),_(o,ct,b),T(Fs,ct,null),e(ct,Fu),e(ct,ri),e(ri,$u),e(ct,Eu),e(ct,$s),e($s,Mu),e($s,Wa),e(Wa,xu),e($s,qu),e(ct,zu),e(ct,Es),e(Es,Cu),e(Es,Ms),e(Ms,ju),e(Es,Nu),e(ct,Au),e(ct,wt),T(xs,wt,null),e(wt,Pu),e(wt,lo),e(lo,Ou),e(lo,Ha),e(Ha,Du),e(lo,Su),e(lo,ii),e(ii,Lu),e(lo,Iu),e(wt,Wu),T(Yo,wt,null),e(wt,Hu),T(Xo,wt,null),_(o,jl,b),_(o,co,b),e(co,Go),e(Go,li),T(qs,li,null),e(co,Uu),e(co,di),e(di,Qu),_(o,Nl,b),_(o,pt,b),T(zs,pt,null),e(pt,Bu),e(pt,po),e(po,Ru),e(po,ci),e(ci,Ku),e(po,Vu),e(po,pi),e(pi,Yu),e(po,Xu),e(pt,Gu),e(pt,Cs),e(Cs,Ju),e(Cs,Ua),e(Ua,Zu),e(Cs,eh),e(pt,th),e(pt,js),e(js,oh),e(js,Ns),e(Ns,nh),e(js,sh),e(pt,ah),e(pt,Tt),T(As,Tt,null),e(Tt,rh),e(Tt,uo),e(uo,ih),e(uo,Qa),e(Qa,lh),e(uo,dh),e(uo,ui),e(ui,ch),e(uo,ph),e(Tt,uh),T(Jo,Tt,null),e(Tt,hh),T(Zo,Tt,null),_(o,Al,b),_(o,ho,b),e(ho,en),e(en,hi),T(Ps,hi,null),e(ho,mh),e(ho,mi),e(mi,fh),_(o,Pl,b),_(o,mo,b),T(Os,mo,null),e(mo,gh),e(mo,ht),T(Ds,ht,null),e(ht,_h),e(ht,fo),e(fo,bh),e(fo,Ba),e(Ba,yh),e(fo,kh),e(fo,fi),e(fi,vh),e(fo,wh),e(ht,Th),T(tn,ht,null),e(ht,Fh),e(ht,Ss),e(Ss,$h),e(Ss,gi),e(gi,Eh),e(Ss,Mh),e(ht,xh),T(on,ht,null),_(o,Ol,b),_(o,go,b),e(go,nn),e(nn,_i),T(Ls,_i,null),e(go,qh),e(go,bi),e(bi,zh),_(o,Dl,b),_(o,et,b),T(Is,et,null),e(et,Ch),e(et,yi),e(yi,jh),e(et,Nh),e(et,Ws),e(Ws,Ah),e(Ws,Ra),e(Ra,Ph),e(Ws,Oh),e(et,Dh),e(et,Hs),e(Hs,Sh),e(Hs,Us),e(Us,Lh),e(Hs,Ih),e(et,Wh),T(sn,et,null),e(et,Hh),e(et,Ft),T(Qs,Ft,null),e(Ft,Uh),e(Ft,_o),e(_o,Qh),e(_o,Ka),e(Ka,Bh),e(_o,Rh),e(_o,ki),e(ki,Kh),e(_o,Vh),e(Ft,Yh),T(an,Ft,null),e(Ft,Xh),T(rn,Ft,null),_(o,Sl,b),_(o,bo,b),e(bo,ln),e(ln,vi),T(Bs,vi,null),e(bo,Gh),e(bo,wi),e(wi,Jh),_(o,Ll,b),_(o,tt,b),T(Rs,tt,null),e(tt,Zh),e(tt,Ti),e(Ti,em),e(tt,tm),e(tt,Ks),e(Ks,om),e(Ks,Va),e(Va,nm),e(Ks,sm),e(tt,am),e(tt,Vs),e(Vs,rm),e(Vs,Ys),e(Ys,im),e(Vs,lm),e(tt,dm),T(dn,tt,null),e(tt,cm),e(tt,$t),T(Xs,$t,null),e($t,pm),e($t,yo),e(yo,um),e(yo,Ya),e(Ya,hm),e(yo,mm),e(yo,Fi),e(Fi,fm),e(yo,gm),e($t,_m),T(cn,$t,null),e($t,bm),T(pn,$t,null),_(o,Il,b),_(o,ko,b),e(ko,un),e(un,$i),T(Gs,$i,null),e(ko,ym),e(ko,Ei),e(Ei,km),_(o,Wl,b),_(o,ot,b),T(Js,ot,null),e(ot,vm),e(ot,Mi),e(Mi,wm),e(ot,Tm),e(ot,Zs),e(Zs,Fm),e(Zs,Xa),e(Xa,$m),e(Zs,Em),e(ot,Mm),e(ot,ea),e(ea,xm),e(ea,ta),e(ta,qm),e(ea,zm),e(ot,Cm),T(hn,ot,null),e(ot,jm),e(ot,mt),T(oa,mt,null),e(mt,Nm),e(mt,vo),e(vo,Am),e(vo,Ga),e(Ga,Pm),e(vo,Om),e(vo,xi),e(xi,Dm),e(vo,Sm),e(mt,Lm),T(mn,mt,null),e(mt,Im),T(fn,mt,null),e(mt,Wm),T(gn,mt,null),_(o,Hl,b),_(o,wo,b),e(wo,_n),e(_n,qi),T(na,qi,null),e(wo,Hm),e(wo,zi),e(zi,Um),_(o,Ul,b),_(o,nt,b),T(sa,nt,null),e(nt,Qm),e(nt,Ci),e(Ci,Bm),e(nt,Rm),e(nt,aa),e(aa,Km),e(aa,Ja),e(Ja,Vm),e(aa,Ym),e(nt,Xm),e(nt,ra),e(ra,Gm),e(ra,ia),e(ia,Jm),e(ra,Zm),e(nt,ef),T(bn,nt,null),e(nt,tf),e(nt,Et),T(la,Et,null),e(Et,of),e(Et,To),e(To,nf),e(To,Za),e(Za,sf),e(To,af),e(To,ji),e(ji,rf),e(To,lf),e(Et,df),T(yn,Et,null),e(Et,cf),T(kn,Et,null),_(o,Ql,b),_(o,Fo,b),e(Fo,vn),e(vn,Ni),T(da,Ni,null),e(Fo,pf),e(Fo,Ai),e(Ai,uf),_(o,Bl,b),_(o,st,b),T(ca,st,null),e(st,hf),e(st,Pi),e(Pi,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,kf),e(ua,ha),e(ha,vf),e(ua,wf),e(st,Tf),T(wn,st,null),e(st,Ff),e(st,ft),T(ma,ft,null),e(ft,$f),e(ft,$o),e($o,Ef),e($o,tr),e(tr,Mf),e($o,xf),e($o,Oi),e(Oi,qf),e($o,zf),e(ft,Cf),T(Tn,ft,null),e(ft,jf),T(Fn,ft,null),e(ft,Nf),T($n,ft,null),_(o,Rl,b),_(o,Eo,b),e(Eo,En),e(En,Di),T(fa,Di,null),e(Eo,Af),e(Eo,Si),e(Si,Pf),_(o,Kl,b),_(o,at,b),T(ga,at,null),e(at,Of),e(at,Mo),e(Mo,Df),e(Mo,Li),e(Li,Sf),e(Mo,Lf),e(Mo,Ii),e(Ii,If),e(Mo,Wf),e(at,Hf),e(at,_a),e(_a,Uf),e(_a,or),e(or,Qf),e(_a,Bf),e(at,Rf),e(at,ba),e(ba,Kf),e(ba,ya),e(ya,Vf),e(ba,Yf),e(at,Xf),T(Mn,at,null),e(at,Gf),e(at,gt),T(ka,gt,null),e(gt,Jf),e(gt,xo),e(xo,Zf),e(xo,nr),e(nr,eg),e(xo,tg),e(xo,Wi),e(Wi,og),e(xo,ng),e(gt,sg),T(xn,gt,null),e(gt,ag),T(qn,gt,null),e(gt,rg),T(zn,gt,null),Vl=!0},p(o,[b]){const va={};b&2&&(va.$$scope={dirty:b,ctx:o}),No.$set(va);const Hi={};b&2&&(Hi.$$scope={dirty:b,ctx:o}),Oo.$set(Hi);const Ui={};b&2&&(Ui.$$scope={dirty:b,ctx:o}),Do.$set(Ui);const Qi={};b&2&&(Qi.$$scope={dirty:b,ctx:o}),Lo.$set(Qi);const wa={};b&2&&(wa.$$scope={dirty:b,ctx:o}),Io.$set(wa);const Bi={};b&2&&(Bi.$$scope={dirty:b,ctx:o}),Ho.$set(Bi);const Ri={};b&2&&(Ri.$$scope={dirty:b,ctx:o}),Uo.$set(Ri);const Ta={};b&2&&(Ta.$$scope={dirty:b,ctx:o}),Qo.$set(Ta);const Ki={};b&2&&(Ki.$$scope={dirty:b,ctx:o}),Ro.$set(Ki);const Vi={};b&2&&(Vi.$$scope={dirty:b,ctx:o}),Ko.$set(Vi);const Yi={};b&2&&(Yi.$$scope={dirty:b,ctx:o}),Yo.$set(Yi);const Fa={};b&2&&(Fa.$$scope={dirty:b,ctx:o}),Xo.$set(Fa);const Xi={};b&2&&(Xi.$$scope={dirty:b,ctx:o}),Jo.$set(Xi);const Gi={};b&2&&(Gi.$$scope={dirty:b,ctx:o}),Zo.$set(Gi);const Ji={};b&2&&(Ji.$$scope={dirty:b,ctx:o}),tn.$set(Ji);const Zi={};b&2&&(Zi.$$scope={dirty:b,ctx:o}),on.$set(Zi);const qo={};b&2&&(qo.$$scope={dirty:b,ctx:o}),sn.$set(qo);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 $a={};b&2&&($a.$$scope={dirty:b,ctx:o}),hn.$set($a);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}),kn.$set(dl);const cl={};b&2&&(cl.$$scope={dirty:b,ctx:o}),wn.$set(cl);const pl={};b&2&&(pl.$$scope={dirty:b,ctx:o}),Tn.$set(pl);const ul={};b&2&&(ul.$$scope={dirty:b,ctx:o}),Fn.$set(ul);const hl={};b&2&&(hl.$$scope={dirty:b,ctx:o}),$n.$set(hl);const ml={};b&2&&(ml.$$scope={dirty:b,ctx:o}),Mn.$set(ml);const fl={};b&2&&(fl.$$scope={dirty:b,ctx:o}),xn.$set(fl);const gl={};b&2&&(gl.$$scope={dirty:b,ctx:o}),qn.$set(gl);const _l={};b&2&&(_l.$$scope={dirty:b,ctx:o}),zn.$set(_l)},i(o){Vl||(F(l.$$.fragment,o),F(le.$$.fragment,o),F(x.$$.fragment,o),F(Un.$$.fragment,o),F(Qn.$$.fragment,o),F(Rn.$$.fragment,o),F(Kn.$$.fragment,o),F(Xn.$$.fragment,o),F(Jn.$$.fragment,o),F(Zn.$$.fragment,o),F(No.$$.fragment,o),F(es.$$.fragment,o),F(os.$$.fragment,o),F(ns.$$.fragment,o),F(ss.$$.fragment,o),F(Oo.$$.fragment,o),F(Do.$$.fragment,o),F(as.$$.fragment,o),F(rs.$$.fragment,o),F(cs.$$.fragment,o),F(Lo.$$.fragment,o),F(Io.$$.fragment,o),F(ps.$$.fragment,o),F(us.$$.fragment,o),F(gs.$$.fragment,o),F(Ho.$$.fragment,o),F(Uo.$$.fragment,o),F(Qo.$$.fragment,o),F(_s.$$.fragment,o),F(bs.$$.fragment,o),F(ws.$$.fragment,o),F(Ro.$$.fragment,o),F(Ko.$$.fragment,o),F(Ts.$$.fragment,o),F(Fs.$$.fragment,o),F(xs.$$.fragment,o),F(Yo.$$.fragment,o),F(Xo.$$.fragment,o),F(qs.$$.fragment,o),F(zs.$$.fragment,o),F(As.$$.fragment,o),F(Jo.$$.fragment,o),F(Zo.$$.fragment,o),F(Ps.$$.fragment,o),F(Os.$$.fragment,o),F(Ds.$$.fragment,o),F(tn.$$.fragment,o),F(on.$$.fragment,o),F(Ls.$$.fragment,o),F(Is.$$.fragment,o),F(sn.$$.fragment,o),F(Qs.$$.fragment,o),F(an.$$.fragment,o),F(rn.$$.fragment,o),F(Bs.$$.fragment,o),F(Rs.$$.fragment,o),F(dn.$$.fragment,o),F(Xs.$$.fragment,o),F(cn.$$.fragment,o),F(pn.$$.fragment,o),F(Gs.$$.fragment,o),F(Js.$$.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(kn.$$.fragment,o),F(da.$$.fragment,o),F(ca.$$.fragment,o),F(wn.$$.fragment,o),F(ma.$$.fragment,o),F(Tn.$$.fragment,o),F(Fn.$$.fragment,o),F($n.$$.fragment,o),F(fa.$$.fragment,o),F(ga.$$.fragment,o),F(Mn.$$.fragment,o),F(ka.$$.fragment,o),F(xn.$$.fragment,o),F(qn.$$.fragment,o),F(zn.$$.fragment,o),Vl=!0)},o(o){$(l.$$.fragment,o),$(le.$$.fragment,o),$(x.$$.fragment,o),$(Un.$$.fragment,o),$(Qn.$$.fragment,o),$(Rn.$$.fragment,o),$(Kn.$$.fragment,o),$(Xn.$$.fragment,o),$(Jn.$$.fragment,o),$(Zn.$$.fragment,o),$(No.$$.fragment,o),$(es.$$.fragment,o),$(os.$$.fragment,o),$(ns.$$.fragment,o),$(ss.$$.fragment,o),$(Oo.$$.fragment,o),$(Do.$$.fragment,o),$(as.$$.fragment,o),$(rs.$$.fragment,o),$(cs.$$.fragment,o),$(Lo.$$.fragment,o),$(Io.$$.fragment,o),$(ps.$$.fragment,o),$(us.$$.fragment,o),$(gs.$$.fragment,o),$(Ho.$$.fragment,o),$(Uo.$$.fragment,o),$(Qo.$$.fragment,o),$(_s.$$.fragment,o),$(bs.$$.fragment,o),$(ws.$$.fragment,o),$(Ro.$$.fragment,o),$(Ko.$$.fragment,o),$(Ts.$$.fragment,o),$(Fs.$$.fragment,o),$(xs.$$.fragment,o),$(Yo.$$.fragment,o),$(Xo.$$.fragment,o),$(qs.$$.fragment,o),$(zs.$$.fragment,o),$(As.$$.fragment,o),$(Jo.$$.fragment,o),$(Zo.$$.fragment,o),$(Ps.$$.fragment,o),$(Os.$$.fragment,o),$(Ds.$$.fragment,o),$(tn.$$.fragment,o),$(on.$$.fragment,o),$(Ls.$$.fragment,o),$(Is.$$.fragment,o),$(sn.$$.fragment,o),$(Qs.$$.fragment,o),$(an.$$.fragment,o),$(rn.$$.fragment,o),$(Bs.$$.fragment,o),$(Rs.$$.fragment,o),$(dn.$$.fragment,o),$(Xs.$$.fragment,o),$(cn.$$.fragment,o),$(pn.$$.fragment,o),$(Gs.$$.fragment,o),$(Js.$$.fragment,o),$(hn.$$.fragment,o),$(oa.$$.fragment,o),$(mn.$$.fragment,o),$(fn.$$.fragment,o),$(gn.$$.fragment,o),$(na.$$.fragment,o),$(sa.$$.fragment,o),$(bn.$$.fragment,o),$(la.$$.fragment,o),$(yn.$$.fragment,o),$(kn.$$.fragment,o),$(da.$$.fragment,o),$(ca.$$.fragment,o),$(wn.$$.fragment,o),$(ma.$$.fragment,o),$(Tn.$$.fragment,o),$(Fn.$$.fragment,o),$($n.$$.fragment,o),$(fa.$$.fragment,o),$(ga.$$.fragment,o),$(Mn.$$.fragment,o),$(ka.$$.fragment,o),$(xn.$$.fragment,o),$(qn.$$.fragment,o),$(zn.$$.fragment,o),Vl=!1},d(o){t(d),o&&t(k),o&&t(h),E(l),o&&t(ge),o&&t(L),o&&t(V),o&&t(te),E(le),o&&t(_e),o&&t(I),o&&t(P),o&&t(ue),o&&t(be),o&&t(he),o&&t(ye),o&&t(N),o&&t(S),o&&t(me),o&&t(ke),o&&t(Z),o&&t(O),o&&t(ne),E(x),o&&t(Le),o&&t(q),o&&t(bl),o&&t(Vt),E(Un),o&&t(yl),o&&t(Nt),E(Qn),o&&t(kl),o&&t(Xt),E(Rn),o&&t(vl),o&&t(Ve),E(Kn),E(Xn),E(Jn),E(Zn),E(No),E(es),o&&t(wl),o&&t(Jt),E(os),o&&t(Tl),o&&t(Zt),E(ns),E(ss),E(Oo),E(Do),o&&t(Fl),o&&t(to),E(as),o&&t($l),o&&t(it),E(rs),E(cs),E(Lo),E(Io),o&&t(El),o&&t(no),E(ps),o&&t(Ml),o&&t(lt),E(us),E(gs),E(Ho),E(Uo),E(Qo),o&&t(xl),o&&t(ao),E(_s),o&&t(ql),o&&t(dt),E(bs),E(ws),E(Ro),E(Ko),o&&t(zl),o&&t(io),E(Ts),o&&t(Cl),o&&t(ct),E(Fs),E(xs),E(Yo),E(Xo),o&&t(jl),o&&t(co),E(qs),o&&t(Nl),o&&t(pt),E(zs),E(As),E(Jo),E(Zo),o&&t(Al),o&&t(ho),E(Ps),o&&t(Pl),o&&t(mo),E(Os),E(Ds),E(tn),E(on),o&&t(Ol),o&&t(go),E(Ls),o&&t(Dl),o&&t(et),E(Is),E(sn),E(Qs),E(an),E(rn),o&&t(Sl),o&&t(bo),E(Bs),o&&t(Ll),o&&t(tt),E(Rs),E(dn),E(Xs),E(cn),E(pn),o&&t(Il),o&&t(ko),E(Gs),o&&t(Wl),o&&t(ot),E(Js),E(hn),E(oa),E(mn),E(fn),E(gn),o&&t(Hl),o&&t(wo),E(na),o&&t(Ul),o&&t(nt),E(sa),E(bn),E(la),E(yn),E(kn),o&&t(Ql),o&&t(Fo),E(da),o&&t(Bl),o&&t(st),E(ca),E(wn),E(ma),E(Tn),E(Fn),E($n),o&&t(Rl),o&&t(Eo),E(fa),o&&t(Kl),o&&t(at),E(ga),E(Mn),E(ka),E(xn),E(qn),E(zn)}}}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 ky(C){return Ab(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class My extends zb{constructor(d){super();Cb(this,d,ky,by,jb,{})}}export{My as default,yy as metadata};
