import{S as __,i as b_,s as y_,e as a,k as u,w as T,t as o,M as k_,c as r,d as t,m as h,a as i,x as v,h as n,b as g,G as e,g as _,y as F,q as $,o as E,B as M,v as w_,L as Ge}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 Je}from"../../chunks/CodeBlock-hf-doc-builder.js";import{I as at}from"../../chunks/IconCopyLink-hf-doc-builder.js";import{E as Xe}from"../../chunks/ExampleCodeBlock-hf-doc-builder.js";function T_(C){let d,y,p,m,b;return m=new Je({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"),y=o("pair mask has the following format:"),p=u(),T(m.$$.fragment)},l(l){d=r(l,"P",{});var c=i(d);y=n(c,"pair mask has the following format:"),c.forEach(t),p=h(l),v(m.$$.fragment,l)},m(l,c){_(l,d,c),e(d,y),_(l,p,c),F(m,l,c),b=!0},p:Ge,i(l){b||($(m.$$.fragment,l),b=!0)},o(l){E(m.$$.fragment,l),b=!1},d(l){l&&t(d),l&&t(p),M(m,l)}}}function v_(C){let d,y,p,m,b;return{c(){d=a("p"),y=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),p=a("code"),m=o("Module"),b=o(`
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);y=n(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),p=r(c,"CODE",{});var z=i(p);m=n(z,"Module"),z.forEach(t),b=n(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,y),e(d,p),e(p,m),e(d,b)},d(l){l&&t(d)}}}function F_(C){let d,y,p,m,b;return m=new Je({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"),y=o("Example:"),p=u(),T(m.$$.fragment)},l(l){d=r(l,"P",{});var c=i(d);y=n(c,"Example:"),c.forEach(t),p=h(l),v(m.$$.fragment,l)},m(l,c){_(l,d,c),e(d,y),_(l,p,c),F(m,l,c),b=!0},p:Ge,i(l){b||($(m.$$.fragment,l),b=!0)},o(l){E(m.$$.fragment,l),b=!1},d(l){l&&t(d),l&&t(p),M(m,l)}}}function $_(C){let d,y,p,m,b;return{c(){d=a("p"),y=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),p=a("code"),m=o("Module"),b=o(`
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);y=n(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),p=r(c,"CODE",{});var z=i(p);m=n(z,"Module"),z.forEach(t),b=n(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,y),e(d,p),e(p,m),e(d,b)},d(l){l&&t(d)}}}function E_(C){let d,y,p,m,b;return m=new Je({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"),y=o("Example:"),p=u(),T(m.$$.fragment)},l(l){d=r(l,"P",{});var c=i(d);y=n(c,"Example:"),c.forEach(t),p=h(l),v(m.$$.fragment,l)},m(l,c){_(l,d,c),e(d,y),_(l,p,c),F(m,l,c),b=!0},p:Ge,i(l){b||($(m.$$.fragment,l),b=!0)},o(l){E(m.$$.fragment,l),b=!1},d(l){l&&t(d),l&&t(p),M(m,l)}}}function M_(C){let d,y,p,m,b;return{c(){d=a("p"),y=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),p=a("code"),m=o("Module"),b=o(`
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);y=n(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),p=r(c,"CODE",{});var z=i(p);m=n(z,"Module"),z.forEach(t),b=n(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,y),e(d,p),e(p,m),e(d,b)},d(l){l&&t(d)}}}function x_(C){let d,y,p,m,b;return m=new Je({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"),y=o("Example of single-label classification:"),p=u(),T(m.$$.fragment)},l(l){d=r(l,"P",{});var c=i(d);y=n(c,"Example of single-label classification:"),c.forEach(t),p=h(l),v(m.$$.fragment,l)},m(l,c){_(l,d,c),e(d,y),_(l,p,c),F(m,l,c),b=!0},p:Ge,i(l){b||($(m.$$.fragment,l),b=!0)},o(l){E(m.$$.fragment,l),b=!1},d(l){l&&t(d),l&&t(p),M(m,l)}}}function q_(C){let d,y,p,m,b;return m=new Je({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"),y=o("Example of multi-label classification:"),p=u(),T(m.$$.fragment)},l(l){d=r(l,"P",{});var c=i(d);y=n(c,"Example of multi-label classification:"),c.forEach(t),p=h(l),v(m.$$.fragment,l)},m(l,c){_(l,d,c),e(d,y),_(l,p,c),F(m,l,c),b=!0},p:Ge,i(l){b||($(m.$$.fragment,l),b=!0)},o(l){E(m.$$.fragment,l),b=!1},d(l){l&&t(d),l&&t(p),M(m,l)}}}function z_(C){let d,y,p,m,b;return{c(){d=a("p"),y=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),p=a("code"),m=o("Module"),b=o(`
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);y=n(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),p=r(c,"CODE",{});var z=i(p);m=n(z,"Module"),z.forEach(t),b=n(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,y),e(d,p),e(p,m),e(d,b)},d(l){l&&t(d)}}}function C_(C){let d,y,p,m,b;return m=new Je({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"),y=o("Example:"),p=u(),T(m.$$.fragment)},l(l){d=r(l,"P",{});var c=i(d);y=n(c,"Example:"),c.forEach(t),p=h(l),v(m.$$.fragment,l)},m(l,c){_(l,d,c),e(d,y),_(l,p,c),F(m,l,c),b=!0},p:Ge,i(l){b||($(m.$$.fragment,l),b=!0)},o(l){E(m.$$.fragment,l),b=!1},d(l){l&&t(d),l&&t(p),M(m,l)}}}function j_(C){let d,y,p,m,b;return{c(){d=a("p"),y=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),p=a("code"),m=o("Module"),b=o(`
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);y=n(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),p=r(c,"CODE",{});var z=i(p);m=n(z,"Module"),z.forEach(t),b=n(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,y),e(d,p),e(p,m),e(d,b)},d(l){l&&t(d)}}}function N_(C){let d,y,p,m,b;return m=new Je({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"),y=o("Example:"),p=u(),T(m.$$.fragment)},l(l){d=r(l,"P",{});var c=i(d);y=n(c,"Example:"),c.forEach(t),p=h(l),v(m.$$.fragment,l)},m(l,c){_(l,d,c),e(d,y),_(l,p,c),F(m,l,c),b=!0},p:Ge,i(l){b||($(m.$$.fragment,l),b=!0)},o(l){E(m.$$.fragment,l),b=!1},d(l){l&&t(d),l&&t(p),M(m,l)}}}function A_(C){let d,y,p,m,b;return{c(){d=a("p"),y=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),p=a("code"),m=o("Module"),b=o(`
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);y=n(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),p=r(c,"CODE",{});var z=i(p);m=n(z,"Module"),z.forEach(t),b=n(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,y),e(d,p),e(p,m),e(d,b)},d(l){l&&t(d)}}}function P_(C){let d,y,p,m,b;return m=new Je({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"),y=o("Example:"),p=u(),T(m.$$.fragment)},l(l){d=r(l,"P",{});var c=i(d);y=n(c,"Example:"),c.forEach(t),p=h(l),v(m.$$.fragment,l)},m(l,c){_(l,d,c),e(d,y),_(l,p,c),F(m,l,c),b=!0},p:Ge,i(l){b||($(m.$$.fragment,l),b=!0)},o(l){E(m.$$.fragment,l),b=!1},d(l){l&&t(d),l&&t(p),M(m,l)}}}function O_(C){let d,y,p,m,b;return{c(){d=a("p"),y=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),p=a("code"),m=o("Module"),b=o(`
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);y=n(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),p=r(c,"CODE",{});var z=i(p);m=n(z,"Module"),z.forEach(t),b=n(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,y),e(d,p),e(p,m),e(d,b)},d(l){l&&t(d)}}}function D_(C){let d,y,p,m,b;return m=new Je({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"),y=o("Example:"),p=u(),T(m.$$.fragment)},l(l){d=r(l,"P",{});var c=i(d);y=n(c,"Example:"),c.forEach(t),p=h(l),v(m.$$.fragment,l)},m(l,c){_(l,d,c),e(d,y),_(l,p,c),F(m,l,c),b=!0},p:Ge,i(l){b||($(m.$$.fragment,l),b=!0)},o(l){E(m.$$.fragment,l),b=!1},d(l){l&&t(d),l&&t(p),M(m,l)}}}function S_(C){let d,y,p,m,b,l,c,z,Te,ge,S,ae,Z,w,ve,U,Fe,_e,I,$e,le,V,Ee,be,W,Me,ye,H,me,xe,te,j,P,de,Y,qe,ce,X,ze,ke,N,re,Q,pe,Ce,B,je,we,O,ue,G,ee,ne,A,Ne,D,he,Ae;return{c(){d=a("p"),y=o("TensorFlow models and layers in "),p=a("code"),m=o("transformers"),b=o(" accept two formats as input:"),l=u(),c=a("ul"),z=a("li"),Te=o("having all inputs as keyword arguments (like PyTorch models), or"),ge=u(),S=a("li"),ae=o("having all inputs as a list, tuple or dict in the first positional argument."),Z=u(),w=a("p"),ve=o(`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"),Fe=o("model.fit()"),_e=o(` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),I=a("code"),$e=o("model.fit()"),le=o(` supports! If, however, you want to use the second
format outside of Keras methods like `),V=a("code"),Ee=o("fit()"),be=o(" and "),W=a("code"),Me=o("predict()"),ye=o(`, such as when creating your own layers or models with
the Keras `),H=a("code"),me=o("Functional"),xe=o(` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),te=u(),j=a("ul"),P=a("li"),de=o("a single Tensor with "),Y=a("code"),qe=o("input_ids"),ce=o(" only and nothing else: "),X=a("code"),ze=o("model(input_ids)"),ke=u(),N=a("li"),re=o(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),Q=a("code"),pe=o("model([input_ids, attention_mask])"),Ce=o(" or "),B=a("code"),je=o("model([input_ids, attention_mask, token_type_ids])"),we=u(),O=a("li"),ue=o(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),G=a("code"),ee=o('model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),ne=u(),A=a("p"),Ne=o(`Note that when creating models and layers with
`),D=a("a"),he=o("subclassing"),Ae=o(` 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(f){d=r(f,"P",{});var x=i(d);y=n(x,"TensorFlow models and layers in "),p=r(x,"CODE",{});var We=i(p);m=n(We,"transformers"),We.forEach(t),b=n(x," accept two formats as input:"),x.forEach(t),l=h(f),c=r(f,"UL",{});var se=i(c);z=r(se,"LI",{});var He=i(z);Te=n(He,"having all inputs as keyword arguments (like PyTorch models), or"),He.forEach(t),ge=h(se),S=r(se,"LI",{});var Pe=i(S);ae=n(Pe,"having all inputs as a list, tuple or dict in the first positional argument."),Pe.forEach(t),se.forEach(t),Z=h(f),w=r(f,"P",{});var q=i(w);ve=n(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 Le=i(U);Fe=n(Le,"model.fit()"),Le.forEach(t),_e=n(q,` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),I=r(q,"CODE",{});var Ue=i(I);$e=n(Ue,"model.fit()"),Ue.forEach(t),le=n(q,` supports! If, however, you want to use the second
format outside of Keras methods like `),V=r(q,"CODE",{});var Qe=i(V);Ee=n(Qe,"fit()"),Qe.forEach(t),be=n(q," and "),W=r(q,"CODE",{});var Ie=i(W);Me=n(Ie,"predict()"),Ie.forEach(t),ye=n(q,`, such as when creating your own layers or models with
the Keras `),H=r(q,"CODE",{});var Be=i(H);me=n(Be,"Functional"),Be.forEach(t),xe=n(q,` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),q.forEach(t),te=h(f),j=r(f,"UL",{});var L=i(j);P=r(L,"LI",{});var K=i(P);de=n(K,"a single Tensor with "),Y=r(K,"CODE",{});var Oe=i(Y);qe=n(Oe,"input_ids"),Oe.forEach(t),ce=n(K," only and nothing else: "),X=r(K,"CODE",{});var De=i(X);ze=n(De,"model(input_ids)"),De.forEach(t),K.forEach(t),ke=h(L),N=r(L,"LI",{});var R=i(N);re=n(R,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),Q=r(R,"CODE",{});var Se=i(Q);pe=n(Se,"model([input_ids, attention_mask])"),Se.forEach(t),Ce=n(R," or "),B=r(R,"CODE",{});var Re=i(B);je=n(Re,"model([input_ids, attention_mask, token_type_ids])"),Re.forEach(t),R.forEach(t),we=h(L),O=r(L,"LI",{});var fe=i(O);ue=n(fe,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),G=r(fe,"CODE",{});var Ke=i(G);ee=n(Ke,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),Ke.forEach(t),fe.forEach(t),L.forEach(t),ne=h(f),A=r(f,"P",{});var oe=i(A);Ne=n(oe,`Note that when creating models and layers with
`),D=r(oe,"A",{href:!0,rel:!0});var J=i(D);he=n(J,"subclassing"),J.forEach(t),Ae=n(oe,` 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!`),oe.forEach(t),this.h()},h(){g(D,"href","https://keras.io/guides/making_new_layers_and_models_via_subclassing/"),g(D,"rel","nofollow")},m(f,x){_(f,d,x),e(d,y),e(d,p),e(p,m),e(d,b),_(f,l,x),_(f,c,x),e(c,z),e(z,Te),e(c,ge),e(c,S),e(S,ae),_(f,Z,x),_(f,w,x),e(w,ve),e(w,U),e(U,Fe),e(w,_e),e(w,I),e(I,$e),e(w,le),e(w,V),e(V,Ee),e(w,be),e(w,W),e(W,Me),e(w,ye),e(w,H),e(H,me),e(w,xe),_(f,te,x),_(f,j,x),e(j,P),e(P,de),e(P,Y),e(Y,qe),e(P,ce),e(P,X),e(X,ze),e(j,ke),e(j,N),e(N,re),e(N,Q),e(Q,pe),e(N,Ce),e(N,B),e(B,je),e(j,we),e(j,O),e(O,ue),e(O,G),e(G,ee),_(f,ne,x),_(f,A,x),e(A,Ne),e(A,D),e(D,he),e(A,Ae)},d(f){f&&t(d),f&&t(l),f&&t(c),f&&t(Z),f&&t(w),f&&t(te),f&&t(j),f&&t(ne),f&&t(A)}}}function L_(C){let d,y,p,m,b;return{c(){d=a("p"),y=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),p=a("code"),m=o("Module"),b=o(`
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);y=n(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),p=r(c,"CODE",{});var z=i(p);m=n(z,"Module"),z.forEach(t),b=n(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,y),e(d,p),e(p,m),e(d,b)},d(l){l&&t(d)}}}function I_(C){let d,y,p,m,b;return m=new Je({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"),y=o("Example:"),p=u(),T(m.$$.fragment)},l(l){d=r(l,"P",{});var c=i(d);y=n(c,"Example:"),c.forEach(t),p=h(l),v(m.$$.fragment,l)},m(l,c){_(l,d,c),e(d,y),_(l,p,c),F(m,l,c),b=!0},p:Ge,i(l){b||($(m.$$.fragment,l),b=!0)},o(l){E(m.$$.fragment,l),b=!1},d(l){l&&t(d),l&&t(p),M(m,l)}}}function W_(C){let d,y,p,m,b,l,c,z,Te,ge,S,ae,Z,w,ve,U,Fe,_e,I,$e,le,V,Ee,be,W,Me,ye,H,me,xe,te,j,P,de,Y,qe,ce,X,ze,ke,N,re,Q,pe,Ce,B,je,we,O,ue,G,ee,ne,A,Ne,D,he,Ae;return{c(){d=a("p"),y=o("TensorFlow models and layers in "),p=a("code"),m=o("transformers"),b=o(" accept two formats as input:"),l=u(),c=a("ul"),z=a("li"),Te=o("having all inputs as keyword arguments (like PyTorch models), or"),ge=u(),S=a("li"),ae=o("having all inputs as a list, tuple or dict in the first positional argument."),Z=u(),w=a("p"),ve=o(`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"),Fe=o("model.fit()"),_e=o(` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),I=a("code"),$e=o("model.fit()"),le=o(` supports! If, however, you want to use the second
format outside of Keras methods like `),V=a("code"),Ee=o("fit()"),be=o(" and "),W=a("code"),Me=o("predict()"),ye=o(`, such as when creating your own layers or models with
the Keras `),H=a("code"),me=o("Functional"),xe=o(` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),te=u(),j=a("ul"),P=a("li"),de=o("a single Tensor with "),Y=a("code"),qe=o("input_ids"),ce=o(" only and nothing else: "),X=a("code"),ze=o("model(input_ids)"),ke=u(),N=a("li"),re=o(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),Q=a("code"),pe=o("model([input_ids, attention_mask])"),Ce=o(" or "),B=a("code"),je=o("model([input_ids, attention_mask, token_type_ids])"),we=u(),O=a("li"),ue=o(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),G=a("code"),ee=o('model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),ne=u(),A=a("p"),Ne=o(`Note that when creating models and layers with
`),D=a("a"),he=o("subclassing"),Ae=o(` 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(f){d=r(f,"P",{});var x=i(d);y=n(x,"TensorFlow models and layers in "),p=r(x,"CODE",{});var We=i(p);m=n(We,"transformers"),We.forEach(t),b=n(x," accept two formats as input:"),x.forEach(t),l=h(f),c=r(f,"UL",{});var se=i(c);z=r(se,"LI",{});var He=i(z);Te=n(He,"having all inputs as keyword arguments (like PyTorch models), or"),He.forEach(t),ge=h(se),S=r(se,"LI",{});var Pe=i(S);ae=n(Pe,"having all inputs as a list, tuple or dict in the first positional argument."),Pe.forEach(t),se.forEach(t),Z=h(f),w=r(f,"P",{});var q=i(w);ve=n(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 Le=i(U);Fe=n(Le,"model.fit()"),Le.forEach(t),_e=n(q,` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),I=r(q,"CODE",{});var Ue=i(I);$e=n(Ue,"model.fit()"),Ue.forEach(t),le=n(q,` supports! If, however, you want to use the second
format outside of Keras methods like `),V=r(q,"CODE",{});var Qe=i(V);Ee=n(Qe,"fit()"),Qe.forEach(t),be=n(q," and "),W=r(q,"CODE",{});var Ie=i(W);Me=n(Ie,"predict()"),Ie.forEach(t),ye=n(q,`, such as when creating your own layers or models with
the Keras `),H=r(q,"CODE",{});var Be=i(H);me=n(Be,"Functional"),Be.forEach(t),xe=n(q,` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),q.forEach(t),te=h(f),j=r(f,"UL",{});var L=i(j);P=r(L,"LI",{});var K=i(P);de=n(K,"a single Tensor with "),Y=r(K,"CODE",{});var Oe=i(Y);qe=n(Oe,"input_ids"),Oe.forEach(t),ce=n(K," only and nothing else: "),X=r(K,"CODE",{});var De=i(X);ze=n(De,"model(input_ids)"),De.forEach(t),K.forEach(t),ke=h(L),N=r(L,"LI",{});var R=i(N);re=n(R,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),Q=r(R,"CODE",{});var Se=i(Q);pe=n(Se,"model([input_ids, attention_mask])"),Se.forEach(t),Ce=n(R," or "),B=r(R,"CODE",{});var Re=i(B);je=n(Re,"model([input_ids, attention_mask, token_type_ids])"),Re.forEach(t),R.forEach(t),we=h(L),O=r(L,"LI",{});var fe=i(O);ue=n(fe,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),G=r(fe,"CODE",{});var Ke=i(G);ee=n(Ke,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),Ke.forEach(t),fe.forEach(t),L.forEach(t),ne=h(f),A=r(f,"P",{});var oe=i(A);Ne=n(oe,`Note that when creating models and layers with
`),D=r(oe,"A",{href:!0,rel:!0});var J=i(D);he=n(J,"subclassing"),J.forEach(t),Ae=n(oe,` 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!`),oe.forEach(t),this.h()},h(){g(D,"href","https://keras.io/guides/making_new_layers_and_models_via_subclassing/"),g(D,"rel","nofollow")},m(f,x){_(f,d,x),e(d,y),e(d,p),e(p,m),e(d,b),_(f,l,x),_(f,c,x),e(c,z),e(z,Te),e(c,ge),e(c,S),e(S,ae),_(f,Z,x),_(f,w,x),e(w,ve),e(w,U),e(U,Fe),e(w,_e),e(w,I),e(I,$e),e(w,le),e(w,V),e(V,Ee),e(w,be),e(w,W),e(W,Me),e(w,ye),e(w,H),e(H,me),e(w,xe),_(f,te,x),_(f,j,x),e(j,P),e(P,de),e(P,Y),e(Y,qe),e(P,ce),e(P,X),e(X,ze),e(j,ke),e(j,N),e(N,re),e(N,Q),e(Q,pe),e(N,Ce),e(N,B),e(B,je),e(j,we),e(j,O),e(O,ue),e(O,G),e(G,ee),_(f,ne,x),_(f,A,x),e(A,Ne),e(A,D),e(D,he),e(A,Ae)},d(f){f&&t(d),f&&t(l),f&&t(c),f&&t(Z),f&&t(w),f&&t(te),f&&t(j),f&&t(ne),f&&t(A)}}}function H_(C){let d,y,p,m,b;return{c(){d=a("p"),y=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),p=a("code"),m=o("Module"),b=o(`
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);y=n(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),p=r(c,"CODE",{});var z=i(p);m=n(z,"Module"),z.forEach(t),b=n(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,y),e(d,p),e(p,m),e(d,b)},d(l){l&&t(d)}}}function U_(C){let d,y,p,m,b;return m=new Je({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"),y=o("Example:"),p=u(),T(m.$$.fragment)},l(l){d=r(l,"P",{});var c=i(d);y=n(c,"Example:"),c.forEach(t),p=h(l),v(m.$$.fragment,l)},m(l,c){_(l,d,c),e(d,y),_(l,p,c),F(m,l,c),b=!0},p:Ge,i(l){b||($(m.$$.fragment,l),b=!0)},o(l){E(m.$$.fragment,l),b=!1},d(l){l&&t(d),l&&t(p),M(m,l)}}}function Q_(C){let d,y,p,m,b,l,c,z,Te,ge,S,ae,Z,w,ve,U,Fe,_e,I,$e,le,V,Ee,be,W,Me,ye,H,me,xe,te,j,P,de,Y,qe,ce,X,ze,ke,N,re,Q,pe,Ce,B,je,we,O,ue,G,ee,ne,A,Ne,D,he,Ae;return{c(){d=a("p"),y=o("TensorFlow models and layers in "),p=a("code"),m=o("transformers"),b=o(" accept two formats as input:"),l=u(),c=a("ul"),z=a("li"),Te=o("having all inputs as keyword arguments (like PyTorch models), or"),ge=u(),S=a("li"),ae=o("having all inputs as a list, tuple or dict in the first positional argument."),Z=u(),w=a("p"),ve=o(`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"),Fe=o("model.fit()"),_e=o(` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),I=a("code"),$e=o("model.fit()"),le=o(` supports! If, however, you want to use the second
format outside of Keras methods like `),V=a("code"),Ee=o("fit()"),be=o(" and "),W=a("code"),Me=o("predict()"),ye=o(`, such as when creating your own layers or models with
the Keras `),H=a("code"),me=o("Functional"),xe=o(` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),te=u(),j=a("ul"),P=a("li"),de=o("a single Tensor with "),Y=a("code"),qe=o("input_ids"),ce=o(" only and nothing else: "),X=a("code"),ze=o("model(input_ids)"),ke=u(),N=a("li"),re=o(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),Q=a("code"),pe=o("model([input_ids, attention_mask])"),Ce=o(" or "),B=a("code"),je=o("model([input_ids, attention_mask, token_type_ids])"),we=u(),O=a("li"),ue=o(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),G=a("code"),ee=o('model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),ne=u(),A=a("p"),Ne=o(`Note that when creating models and layers with
`),D=a("a"),he=o("subclassing"),Ae=o(` 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(f){d=r(f,"P",{});var x=i(d);y=n(x,"TensorFlow models and layers in "),p=r(x,"CODE",{});var We=i(p);m=n(We,"transformers"),We.forEach(t),b=n(x," accept two formats as input:"),x.forEach(t),l=h(f),c=r(f,"UL",{});var se=i(c);z=r(se,"LI",{});var He=i(z);Te=n(He,"having all inputs as keyword arguments (like PyTorch models), or"),He.forEach(t),ge=h(se),S=r(se,"LI",{});var Pe=i(S);ae=n(Pe,"having all inputs as a list, tuple or dict in the first positional argument."),Pe.forEach(t),se.forEach(t),Z=h(f),w=r(f,"P",{});var q=i(w);ve=n(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 Le=i(U);Fe=n(Le,"model.fit()"),Le.forEach(t),_e=n(q,` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),I=r(q,"CODE",{});var Ue=i(I);$e=n(Ue,"model.fit()"),Ue.forEach(t),le=n(q,` supports! If, however, you want to use the second
format outside of Keras methods like `),V=r(q,"CODE",{});var Qe=i(V);Ee=n(Qe,"fit()"),Qe.forEach(t),be=n(q," and "),W=r(q,"CODE",{});var Ie=i(W);Me=n(Ie,"predict()"),Ie.forEach(t),ye=n(q,`, such as when creating your own layers or models with
the Keras `),H=r(q,"CODE",{});var Be=i(H);me=n(Be,"Functional"),Be.forEach(t),xe=n(q,` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),q.forEach(t),te=h(f),j=r(f,"UL",{});var L=i(j);P=r(L,"LI",{});var K=i(P);de=n(K,"a single Tensor with "),Y=r(K,"CODE",{});var Oe=i(Y);qe=n(Oe,"input_ids"),Oe.forEach(t),ce=n(K," only and nothing else: "),X=r(K,"CODE",{});var De=i(X);ze=n(De,"model(input_ids)"),De.forEach(t),K.forEach(t),ke=h(L),N=r(L,"LI",{});var R=i(N);re=n(R,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),Q=r(R,"CODE",{});var Se=i(Q);pe=n(Se,"model([input_ids, attention_mask])"),Se.forEach(t),Ce=n(R," or "),B=r(R,"CODE",{});var Re=i(B);je=n(Re,"model([input_ids, attention_mask, token_type_ids])"),Re.forEach(t),R.forEach(t),we=h(L),O=r(L,"LI",{});var fe=i(O);ue=n(fe,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),G=r(fe,"CODE",{});var Ke=i(G);ee=n(Ke,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),Ke.forEach(t),fe.forEach(t),L.forEach(t),ne=h(f),A=r(f,"P",{});var oe=i(A);Ne=n(oe,`Note that when creating models and layers with
`),D=r(oe,"A",{href:!0,rel:!0});var J=i(D);he=n(J,"subclassing"),J.forEach(t),Ae=n(oe,` 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!`),oe.forEach(t),this.h()},h(){g(D,"href","https://keras.io/guides/making_new_layers_and_models_via_subclassing/"),g(D,"rel","nofollow")},m(f,x){_(f,d,x),e(d,y),e(d,p),e(p,m),e(d,b),_(f,l,x),_(f,c,x),e(c,z),e(z,Te),e(c,ge),e(c,S),e(S,ae),_(f,Z,x),_(f,w,x),e(w,ve),e(w,U),e(U,Fe),e(w,_e),e(w,I),e(I,$e),e(w,le),e(w,V),e(V,Ee),e(w,be),e(w,W),e(W,Me),e(w,ye),e(w,H),e(H,me),e(w,xe),_(f,te,x),_(f,j,x),e(j,P),e(P,de),e(P,Y),e(Y,qe),e(P,ce),e(P,X),e(X,ze),e(j,ke),e(j,N),e(N,re),e(N,Q),e(Q,pe),e(N,Ce),e(N,B),e(B,je),e(j,we),e(j,O),e(O,ue),e(O,G),e(G,ee),_(f,ne,x),_(f,A,x),e(A,Ne),e(A,D),e(D,he),e(A,Ae)},d(f){f&&t(d),f&&t(l),f&&t(c),f&&t(Z),f&&t(w),f&&t(te),f&&t(j),f&&t(ne),f&&t(A)}}}function B_(C){let d,y,p,m,b;return{c(){d=a("p"),y=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),p=a("code"),m=o("Module"),b=o(`
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);y=n(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),p=r(c,"CODE",{});var z=i(p);m=n(z,"Module"),z.forEach(t),b=n(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,y),e(d,p),e(p,m),e(d,b)},d(l){l&&t(d)}}}function R_(C){let d,y,p,m,b;return m=new Je({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"),y=o("Example:"),p=u(),T(m.$$.fragment)},l(l){d=r(l,"P",{});var c=i(d);y=n(c,"Example:"),c.forEach(t),p=h(l),v(m.$$.fragment,l)},m(l,c){_(l,d,c),e(d,y),_(l,p,c),F(m,l,c),b=!0},p:Ge,i(l){b||($(m.$$.fragment,l),b=!0)},o(l){E(m.$$.fragment,l),b=!1},d(l){l&&t(d),l&&t(p),M(m,l)}}}function K_(C){let d,y;return d=new Je({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(){T(d.$$.fragment)},l(p){v(d.$$.fragment,p)},m(p,m){F(d,p,m),y=!0},p:Ge,i(p){y||($(d.$$.fragment,p),y=!0)},o(p){E(d.$$.fragment,p),y=!1},d(p){M(d,p)}}}function V_(C){let d,y,p,m,b,l,c,z,Te,ge,S,ae,Z,w,ve,U,Fe,_e,I,$e,le,V,Ee,be,W,Me,ye,H,me,xe,te,j,P,de,Y,qe,ce,X,ze,ke,N,re,Q,pe,Ce,B,je,we,O,ue,G,ee,ne,A,Ne,D,he,Ae;return{c(){d=a("p"),y=o("TensorFlow models and layers in "),p=a("code"),m=o("transformers"),b=o(" accept two formats as input:"),l=u(),c=a("ul"),z=a("li"),Te=o("having all inputs as keyword arguments (like PyTorch models), or"),ge=u(),S=a("li"),ae=o("having all inputs as a list, tuple or dict in the first positional argument."),Z=u(),w=a("p"),ve=o(`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"),Fe=o("model.fit()"),_e=o(` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),I=a("code"),$e=o("model.fit()"),le=o(` supports! If, however, you want to use the second
format outside of Keras methods like `),V=a("code"),Ee=o("fit()"),be=o(" and "),W=a("code"),Me=o("predict()"),ye=o(`, such as when creating your own layers or models with
the Keras `),H=a("code"),me=o("Functional"),xe=o(` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),te=u(),j=a("ul"),P=a("li"),de=o("a single Tensor with "),Y=a("code"),qe=o("input_ids"),ce=o(" only and nothing else: "),X=a("code"),ze=o("model(input_ids)"),ke=u(),N=a("li"),re=o(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),Q=a("code"),pe=o("model([input_ids, attention_mask])"),Ce=o(" or "),B=a("code"),je=o("model([input_ids, attention_mask, token_type_ids])"),we=u(),O=a("li"),ue=o(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),G=a("code"),ee=o('model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),ne=u(),A=a("p"),Ne=o(`Note that when creating models and layers with
`),D=a("a"),he=o("subclassing"),Ae=o(` 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(f){d=r(f,"P",{});var x=i(d);y=n(x,"TensorFlow models and layers in "),p=r(x,"CODE",{});var We=i(p);m=n(We,"transformers"),We.forEach(t),b=n(x," accept two formats as input:"),x.forEach(t),l=h(f),c=r(f,"UL",{});var se=i(c);z=r(se,"LI",{});var He=i(z);Te=n(He,"having all inputs as keyword arguments (like PyTorch models), or"),He.forEach(t),ge=h(se),S=r(se,"LI",{});var Pe=i(S);ae=n(Pe,"having all inputs as a list, tuple or dict in the first positional argument."),Pe.forEach(t),se.forEach(t),Z=h(f),w=r(f,"P",{});var q=i(w);ve=n(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 Le=i(U);Fe=n(Le,"model.fit()"),Le.forEach(t),_e=n(q,` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),I=r(q,"CODE",{});var Ue=i(I);$e=n(Ue,"model.fit()"),Ue.forEach(t),le=n(q,` supports! If, however, you want to use the second
format outside of Keras methods like `),V=r(q,"CODE",{});var Qe=i(V);Ee=n(Qe,"fit()"),Qe.forEach(t),be=n(q," and "),W=r(q,"CODE",{});var Ie=i(W);Me=n(Ie,"predict()"),Ie.forEach(t),ye=n(q,`, such as when creating your own layers or models with
the Keras `),H=r(q,"CODE",{});var Be=i(H);me=n(Be,"Functional"),Be.forEach(t),xe=n(q,` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),q.forEach(t),te=h(f),j=r(f,"UL",{});var L=i(j);P=r(L,"LI",{});var K=i(P);de=n(K,"a single Tensor with "),Y=r(K,"CODE",{});var Oe=i(Y);qe=n(Oe,"input_ids"),Oe.forEach(t),ce=n(K," only and nothing else: "),X=r(K,"CODE",{});var De=i(X);ze=n(De,"model(input_ids)"),De.forEach(t),K.forEach(t),ke=h(L),N=r(L,"LI",{});var R=i(N);re=n(R,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),Q=r(R,"CODE",{});var Se=i(Q);pe=n(Se,"model([input_ids, attention_mask])"),Se.forEach(t),Ce=n(R," or "),B=r(R,"CODE",{});var Re=i(B);je=n(Re,"model([input_ids, attention_mask, token_type_ids])"),Re.forEach(t),R.forEach(t),we=h(L),O=r(L,"LI",{});var fe=i(O);ue=n(fe,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),G=r(fe,"CODE",{});var Ke=i(G);ee=n(Ke,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),Ke.forEach(t),fe.forEach(t),L.forEach(t),ne=h(f),A=r(f,"P",{});var oe=i(A);Ne=n(oe,`Note that when creating models and layers with
`),D=r(oe,"A",{href:!0,rel:!0});var J=i(D);he=n(J,"subclassing"),J.forEach(t),Ae=n(oe,` 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!`),oe.forEach(t),this.h()},h(){g(D,"href","https://keras.io/guides/making_new_layers_and_models_via_subclassing/"),g(D,"rel","nofollow")},m(f,x){_(f,d,x),e(d,y),e(d,p),e(p,m),e(d,b),_(f,l,x),_(f,c,x),e(c,z),e(z,Te),e(c,ge),e(c,S),e(S,ae),_(f,Z,x),_(f,w,x),e(w,ve),e(w,U),e(U,Fe),e(w,_e),e(w,I),e(I,$e),e(w,le),e(w,V),e(V,Ee),e(w,be),e(w,W),e(W,Me),e(w,ye),e(w,H),e(H,me),e(w,xe),_(f,te,x),_(f,j,x),e(j,P),e(P,de),e(P,Y),e(Y,qe),e(P,ce),e(P,X),e(X,ze),e(j,ke),e(j,N),e(N,re),e(N,Q),e(Q,pe),e(N,Ce),e(N,B),e(B,je),e(j,we),e(j,O),e(O,ue),e(O,G),e(G,ee),_(f,ne,x),_(f,A,x),e(A,Ne),e(A,D),e(D,he),e(A,Ae)},d(f){f&&t(d),f&&t(l),f&&t(c),f&&t(Z),f&&t(w),f&&t(te),f&&t(j),f&&t(ne),f&&t(A)}}}function Y_(C){let d,y,p,m,b;return{c(){d=a("p"),y=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),p=a("code"),m=o("Module"),b=o(`
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);y=n(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),p=r(c,"CODE",{});var z=i(p);m=n(z,"Module"),z.forEach(t),b=n(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,y),e(d,p),e(p,m),e(d,b)},d(l){l&&t(d)}}}function X_(C){let d,y,p,m,b;return m=new Je({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"),y=o("Example:"),p=u(),T(m.$$.fragment)},l(l){d=r(l,"P",{});var c=i(d);y=n(c,"Example:"),c.forEach(t),p=h(l),v(m.$$.fragment,l)},m(l,c){_(l,d,c),e(d,y),_(l,p,c),F(m,l,c),b=!0},p:Ge,i(l){b||($(m.$$.fragment,l),b=!0)},o(l){E(m.$$.fragment,l),b=!1},d(l){l&&t(d),l&&t(p),M(m,l)}}}function G_(C){let d,y,p,m,b,l,c,z,Te,ge,S,ae,Z,w,ve,U,Fe,_e,I,$e,le,V,Ee,be,W,Me,ye,H,me,xe,te,j,P,de,Y,qe,ce,X,ze,ke,N,re,Q,pe,Ce,B,je,we,O,ue,G,ee,ne,A,Ne,D,he,Ae;return{c(){d=a("p"),y=o("TensorFlow models and layers in "),p=a("code"),m=o("transformers"),b=o(" accept two formats as input:"),l=u(),c=a("ul"),z=a("li"),Te=o("having all inputs as keyword arguments (like PyTorch models), or"),ge=u(),S=a("li"),ae=o("having all inputs as a list, tuple or dict in the first positional argument."),Z=u(),w=a("p"),ve=o(`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"),Fe=o("model.fit()"),_e=o(` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),I=a("code"),$e=o("model.fit()"),le=o(` supports! If, however, you want to use the second
format outside of Keras methods like `),V=a("code"),Ee=o("fit()"),be=o(" and "),W=a("code"),Me=o("predict()"),ye=o(`, such as when creating your own layers or models with
the Keras `),H=a("code"),me=o("Functional"),xe=o(` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),te=u(),j=a("ul"),P=a("li"),de=o("a single Tensor with "),Y=a("code"),qe=o("input_ids"),ce=o(" only and nothing else: "),X=a("code"),ze=o("model(input_ids)"),ke=u(),N=a("li"),re=o(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),Q=a("code"),pe=o("model([input_ids, attention_mask])"),Ce=o(" or "),B=a("code"),je=o("model([input_ids, attention_mask, token_type_ids])"),we=u(),O=a("li"),ue=o(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),G=a("code"),ee=o('model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),ne=u(),A=a("p"),Ne=o(`Note that when creating models and layers with
`),D=a("a"),he=o("subclassing"),Ae=o(` 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(f){d=r(f,"P",{});var x=i(d);y=n(x,"TensorFlow models and layers in "),p=r(x,"CODE",{});var We=i(p);m=n(We,"transformers"),We.forEach(t),b=n(x," accept two formats as input:"),x.forEach(t),l=h(f),c=r(f,"UL",{});var se=i(c);z=r(se,"LI",{});var He=i(z);Te=n(He,"having all inputs as keyword arguments (like PyTorch models), or"),He.forEach(t),ge=h(se),S=r(se,"LI",{});var Pe=i(S);ae=n(Pe,"having all inputs as a list, tuple or dict in the first positional argument."),Pe.forEach(t),se.forEach(t),Z=h(f),w=r(f,"P",{});var q=i(w);ve=n(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 Le=i(U);Fe=n(Le,"model.fit()"),Le.forEach(t),_e=n(q,` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),I=r(q,"CODE",{});var Ue=i(I);$e=n(Ue,"model.fit()"),Ue.forEach(t),le=n(q,` supports! If, however, you want to use the second
format outside of Keras methods like `),V=r(q,"CODE",{});var Qe=i(V);Ee=n(Qe,"fit()"),Qe.forEach(t),be=n(q," and "),W=r(q,"CODE",{});var Ie=i(W);Me=n(Ie,"predict()"),Ie.forEach(t),ye=n(q,`, such as when creating your own layers or models with
the Keras `),H=r(q,"CODE",{});var Be=i(H);me=n(Be,"Functional"),Be.forEach(t),xe=n(q,` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),q.forEach(t),te=h(f),j=r(f,"UL",{});var L=i(j);P=r(L,"LI",{});var K=i(P);de=n(K,"a single Tensor with "),Y=r(K,"CODE",{});var Oe=i(Y);qe=n(Oe,"input_ids"),Oe.forEach(t),ce=n(K," only and nothing else: "),X=r(K,"CODE",{});var De=i(X);ze=n(De,"model(input_ids)"),De.forEach(t),K.forEach(t),ke=h(L),N=r(L,"LI",{});var R=i(N);re=n(R,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),Q=r(R,"CODE",{});var Se=i(Q);pe=n(Se,"model([input_ids, attention_mask])"),Se.forEach(t),Ce=n(R," or "),B=r(R,"CODE",{});var Re=i(B);je=n(Re,"model([input_ids, attention_mask, token_type_ids])"),Re.forEach(t),R.forEach(t),we=h(L),O=r(L,"LI",{});var fe=i(O);ue=n(fe,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),G=r(fe,"CODE",{});var Ke=i(G);ee=n(Ke,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),Ke.forEach(t),fe.forEach(t),L.forEach(t),ne=h(f),A=r(f,"P",{});var oe=i(A);Ne=n(oe,`Note that when creating models and layers with
`),D=r(oe,"A",{href:!0,rel:!0});var J=i(D);he=n(J,"subclassing"),J.forEach(t),Ae=n(oe,` 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!`),oe.forEach(t),this.h()},h(){g(D,"href","https://keras.io/guides/making_new_layers_and_models_via_subclassing/"),g(D,"rel","nofollow")},m(f,x){_(f,d,x),e(d,y),e(d,p),e(p,m),e(d,b),_(f,l,x),_(f,c,x),e(c,z),e(z,Te),e(c,ge),e(c,S),e(S,ae),_(f,Z,x),_(f,w,x),e(w,ve),e(w,U),e(U,Fe),e(w,_e),e(w,I),e(I,$e),e(w,le),e(w,V),e(V,Ee),e(w,be),e(w,W),e(W,Me),e(w,ye),e(w,H),e(H,me),e(w,xe),_(f,te,x),_(f,j,x),e(j,P),e(P,de),e(P,Y),e(Y,qe),e(P,ce),e(P,X),e(X,ze),e(j,ke),e(j,N),e(N,re),e(N,Q),e(Q,pe),e(N,Ce),e(N,B),e(B,je),e(j,we),e(j,O),e(O,ue),e(O,G),e(G,ee),_(f,ne,x),_(f,A,x),e(A,Ne),e(A,D),e(D,he),e(A,Ae)},d(f){f&&t(d),f&&t(l),f&&t(c),f&&t(Z),f&&t(w),f&&t(te),f&&t(j),f&&t(ne),f&&t(A)}}}function J_(C){let d,y,p,m,b;return{c(){d=a("p"),y=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),p=a("code"),m=o("Module"),b=o(`
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);y=n(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),p=r(c,"CODE",{});var z=i(p);m=n(z,"Module"),z.forEach(t),b=n(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,y),e(d,p),e(p,m),e(d,b)},d(l){l&&t(d)}}}function Z_(C){let d,y,p,m,b;return m=new Je({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"),y=o("Example:"),p=u(),T(m.$$.fragment)},l(l){d=r(l,"P",{});var c=i(d);y=n(c,"Example:"),c.forEach(t),p=h(l),v(m.$$.fragment,l)},m(l,c){_(l,d,c),e(d,y),_(l,p,c),F(m,l,c),b=!0},p:Ge,i(l){b||($(m.$$.fragment,l),b=!0)},o(l){E(m.$$.fragment,l),b=!1},d(l){l&&t(d),l&&t(p),M(m,l)}}}function eb(C){let d,y;return d=new Je({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(){T(d.$$.fragment)},l(p){v(d.$$.fragment,p)},m(p,m){F(d,p,m),y=!0},p:Ge,i(p){y||($(d.$$.fragment,p),y=!0)},o(p){E(d.$$.fragment,p),y=!1},d(p){M(d,p)}}}function tb(C){let d,y,p,m,b,l,c,z,Te,ge,S,ae,Z,w,ve,U,Fe,_e,I,$e,le,V,Ee,be,W,Me,ye,H,me,xe,te,j,P,de,Y,qe,ce,X,ze,ke,N,re,Q,pe,Ce,B,je,we,O,ue,G,ee,ne,A,Ne,D,he,Ae;return{c(){d=a("p"),y=o("TensorFlow models and layers in "),p=a("code"),m=o("transformers"),b=o(" accept two formats as input:"),l=u(),c=a("ul"),z=a("li"),Te=o("having all inputs as keyword arguments (like PyTorch models), or"),ge=u(),S=a("li"),ae=o("having all inputs as a list, tuple or dict in the first positional argument."),Z=u(),w=a("p"),ve=o(`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"),Fe=o("model.fit()"),_e=o(` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),I=a("code"),$e=o("model.fit()"),le=o(` supports! If, however, you want to use the second
format outside of Keras methods like `),V=a("code"),Ee=o("fit()"),be=o(" and "),W=a("code"),Me=o("predict()"),ye=o(`, such as when creating your own layers or models with
the Keras `),H=a("code"),me=o("Functional"),xe=o(` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),te=u(),j=a("ul"),P=a("li"),de=o("a single Tensor with "),Y=a("code"),qe=o("input_ids"),ce=o(" only and nothing else: "),X=a("code"),ze=o("model(input_ids)"),ke=u(),N=a("li"),re=o(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),Q=a("code"),pe=o("model([input_ids, attention_mask])"),Ce=o(" or "),B=a("code"),je=o("model([input_ids, attention_mask, token_type_ids])"),we=u(),O=a("li"),ue=o(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),G=a("code"),ee=o('model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),ne=u(),A=a("p"),Ne=o(`Note that when creating models and layers with
`),D=a("a"),he=o("subclassing"),Ae=o(` 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(f){d=r(f,"P",{});var x=i(d);y=n(x,"TensorFlow models and layers in "),p=r(x,"CODE",{});var We=i(p);m=n(We,"transformers"),We.forEach(t),b=n(x," accept two formats as input:"),x.forEach(t),l=h(f),c=r(f,"UL",{});var se=i(c);z=r(se,"LI",{});var He=i(z);Te=n(He,"having all inputs as keyword arguments (like PyTorch models), or"),He.forEach(t),ge=h(se),S=r(se,"LI",{});var Pe=i(S);ae=n(Pe,"having all inputs as a list, tuple or dict in the first positional argument."),Pe.forEach(t),se.forEach(t),Z=h(f),w=r(f,"P",{});var q=i(w);ve=n(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 Le=i(U);Fe=n(Le,"model.fit()"),Le.forEach(t),_e=n(q,` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),I=r(q,"CODE",{});var Ue=i(I);$e=n(Ue,"model.fit()"),Ue.forEach(t),le=n(q,` supports! If, however, you want to use the second
format outside of Keras methods like `),V=r(q,"CODE",{});var Qe=i(V);Ee=n(Qe,"fit()"),Qe.forEach(t),be=n(q," and "),W=r(q,"CODE",{});var Ie=i(W);Me=n(Ie,"predict()"),Ie.forEach(t),ye=n(q,`, such as when creating your own layers or models with
the Keras `),H=r(q,"CODE",{});var Be=i(H);me=n(Be,"Functional"),Be.forEach(t),xe=n(q,` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),q.forEach(t),te=h(f),j=r(f,"UL",{});var L=i(j);P=r(L,"LI",{});var K=i(P);de=n(K,"a single Tensor with "),Y=r(K,"CODE",{});var Oe=i(Y);qe=n(Oe,"input_ids"),Oe.forEach(t),ce=n(K," only and nothing else: "),X=r(K,"CODE",{});var De=i(X);ze=n(De,"model(input_ids)"),De.forEach(t),K.forEach(t),ke=h(L),N=r(L,"LI",{});var R=i(N);re=n(R,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),Q=r(R,"CODE",{});var Se=i(Q);pe=n(Se,"model([input_ids, attention_mask])"),Se.forEach(t),Ce=n(R," or "),B=r(R,"CODE",{});var Re=i(B);je=n(Re,"model([input_ids, attention_mask, token_type_ids])"),Re.forEach(t),R.forEach(t),we=h(L),O=r(L,"LI",{});var fe=i(O);ue=n(fe,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),G=r(fe,"CODE",{});var Ke=i(G);ee=n(Ke,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),Ke.forEach(t),fe.forEach(t),L.forEach(t),ne=h(f),A=r(f,"P",{});var oe=i(A);Ne=n(oe,`Note that when creating models and layers with
`),D=r(oe,"A",{href:!0,rel:!0});var J=i(D);he=n(J,"subclassing"),J.forEach(t),Ae=n(oe,` 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!`),oe.forEach(t),this.h()},h(){g(D,"href","https://keras.io/guides/making_new_layers_and_models_via_subclassing/"),g(D,"rel","nofollow")},m(f,x){_(f,d,x),e(d,y),e(d,p),e(p,m),e(d,b),_(f,l,x),_(f,c,x),e(c,z),e(z,Te),e(c,ge),e(c,S),e(S,ae),_(f,Z,x),_(f,w,x),e(w,ve),e(w,U),e(U,Fe),e(w,_e),e(w,I),e(I,$e),e(w,le),e(w,V),e(V,Ee),e(w,be),e(w,W),e(W,Me),e(w,ye),e(w,H),e(H,me),e(w,xe),_(f,te,x),_(f,j,x),e(j,P),e(P,de),e(P,Y),e(Y,qe),e(P,ce),e(P,X),e(X,ze),e(j,ke),e(j,N),e(N,re),e(N,Q),e(Q,pe),e(N,Ce),e(N,B),e(B,je),e(j,we),e(j,O),e(O,ue),e(O,G),e(G,ee),_(f,ne,x),_(f,A,x),e(A,Ne),e(A,D),e(D,he),e(A,Ae)},d(f){f&&t(d),f&&t(l),f&&t(c),f&&t(Z),f&&t(w),f&&t(te),f&&t(j),f&&t(ne),f&&t(A)}}}function ob(C){let d,y,p,m,b;return{c(){d=a("p"),y=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),p=a("code"),m=o("Module"),b=o(`
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);y=n(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),p=r(c,"CODE",{});var z=i(p);m=n(z,"Module"),z.forEach(t),b=n(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,y),e(d,p),e(p,m),e(d,b)},d(l){l&&t(d)}}}function nb(C){let d,y,p,m,b;return m=new Je({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"),y=o("Example:"),p=u(),T(m.$$.fragment)},l(l){d=r(l,"P",{});var c=i(d);y=n(c,"Example:"),c.forEach(t),p=h(l),v(m.$$.fragment,l)},m(l,c){_(l,d,c),e(d,y),_(l,p,c),F(m,l,c),b=!0},p:Ge,i(l){b||($(m.$$.fragment,l),b=!0)},o(l){E(m.$$.fragment,l),b=!1},d(l){l&&t(d),l&&t(p),M(m,l)}}}function sb(C){let d,y;return d=new Je({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(){T(d.$$.fragment)},l(p){v(d.$$.fragment,p)},m(p,m){F(d,p,m),y=!0},p:Ge,i(p){y||($(d.$$.fragment,p),y=!0)},o(p){E(d.$$.fragment,p),y=!1},d(p){M(d,p)}}}function ab(C){let d,y,p,m,b,l,c,z,Te,ge,S,ae,Z,w,ve,U,Fe,_e,I,$e,le,V,Ee,be,W,Me,ye,H,me,xe,te,j,P,de,Y,qe,ce,X,ze,ke,N,re,Q,pe,Ce,B,je,we,O,ue,G,ee,ne,A,Ne,D,he,Ae,f,x,We,se,He,Pe,q,Le,Ue,Qe,Ie,Be,L,K,Oe,De,R,Se,Re,fe,Ke,oe,J,On,ld,ar,dd,cd,Ct,rr,pd,ud,ir,hd,md,jt,fd,lr,gd,_d,dr,bd,yd,cr,kd,wd,Td,Dn,vd,pr,Fd,$d,Ed,Sn,Md,fa,xd,qd,zd,Pt,Ln,Cd,ur,jd,Nd,In,ga,Ad,hr,Pd,Od,_a,Dd,mr,Sd,Ld,Mo,Wn,Id,fr,Wd,Hd,gt,Hn,Ud,gr,Qd,Bd,xo,Rd,Rt,Kd,_r,Vd,Yd,br,Xd,Gd,Jd,qo,Un,Zd,Qn,ec,yr,tc,oc,Bi,Kt,zo,kr,Bn,nc,wr,sc,Ri,Vt,Rn,ac,_t,Kn,rc,Yt,ic,ba,lc,dc,Tr,cc,pc,uc,Co,hc,jo,Ki,Xt,No,vr,Vn,mc,Fr,fc,Vi,rt,Yn,gc,$r,_c,bc,Xn,yc,ya,kc,wc,Tc,Gn,vc,Jn,Fc,$c,Ec,bt,Zn,Mc,Gt,xc,ka,qc,zc,Er,Cc,jc,Nc,Ao,Ac,Po,Yi,Jt,Oo,Mr,es,Pc,xr,Oc,Xi,it,ts,Dc,qr,Sc,Lc,os,Ic,wa,Wc,Hc,Uc,ns,Qc,ss,Bc,Rc,Kc,pt,as,Vc,Zt,Yc,Ta,Xc,Gc,zr,Jc,Zc,ep,Do,tp,So,op,Lo,Gi,eo,Io,Cr,rs,np,jr,sp,Ji,lt,is,ap,Nr,rp,ip,ls,lp,va,dp,cp,pp,ds,up,cs,hp,mp,fp,yt,ps,gp,to,_p,Fa,bp,yp,Ar,kp,wp,Tp,Wo,vp,Ho,Zi,oo,Uo,Pr,us,Fp,Or,$p,el,dt,hs,Ep,Dr,Mp,xp,ms,qp,$a,zp,Cp,jp,fs,Np,gs,Ap,Pp,Op,kt,_s,Dp,no,Sp,Ea,Lp,Ip,Sr,Wp,Hp,Up,Qo,Qp,Bo,tl,so,Ro,Lr,bs,Bp,Ir,Rp,ol,ct,ys,Kp,ao,Vp,Wr,Yp,Xp,Hr,Gp,Jp,Zp,ks,eu,Ma,tu,ou,nu,ws,su,Ts,au,ru,iu,wt,vs,lu,ro,du,xa,cu,pu,Ur,uu,hu,mu,Ko,fu,Vo,nl,io,Yo,Qr,Fs,gu,Br,_u,sl,lo,$s,bu,ut,Es,yu,co,ku,qa,wu,Tu,Rr,vu,Fu,$u,Xo,Eu,Ms,Mu,Kr,xu,qu,zu,Go,al,po,Jo,Vr,xs,Cu,Yr,ju,rl,Ze,qs,Nu,Xr,Au,Pu,zs,Ou,za,Du,Su,Lu,Cs,Iu,js,Wu,Hu,Uu,Zo,Qu,Tt,Ns,Bu,uo,Ru,Ca,Ku,Vu,Gr,Yu,Xu,Gu,en,Ju,tn,il,ho,on,Jr,As,Zu,Zr,eh,ll,et,Ps,th,ei,oh,nh,Os,sh,ja,ah,rh,ih,Ds,lh,Ss,dh,ch,ph,nn,uh,vt,Ls,hh,mo,mh,Na,fh,gh,ti,_h,bh,yh,sn,kh,an,dl,fo,rn,oi,Is,wh,ni,Th,cl,tt,Ws,vh,si,Fh,$h,Hs,Eh,Aa,Mh,xh,qh,Us,zh,Qs,Ch,jh,Nh,ln,Ah,ht,Bs,Ph,go,Oh,Pa,Dh,Sh,ai,Lh,Ih,Wh,dn,Hh,cn,Uh,pn,pl,_o,un,ri,Rs,Qh,ii,Bh,ul,ot,Ks,Rh,li,Kh,Vh,Vs,Yh,Oa,Xh,Gh,Jh,Ys,Zh,Xs,em,tm,om,hn,nm,Ft,Gs,sm,bo,am,Da,rm,im,di,lm,dm,cm,mn,pm,fn,hl,yo,gn,ci,Js,um,pi,hm,ml,nt,Zs,mm,ui,fm,gm,ea,_m,Sa,bm,ym,km,ta,wm,oa,Tm,vm,Fm,_n,$m,mt,na,Em,ko,Mm,La,xm,qm,hi,zm,Cm,jm,bn,Nm,yn,Am,kn,fl,wo,wn,mi,sa,Pm,fi,Om,gl,st,aa,Dm,To,Sm,gi,Lm,Im,_i,Wm,Hm,Um,ra,Qm,Ia,Bm,Rm,Km,ia,Vm,la,Ym,Xm,Gm,Tn,Jm,ft,da,Zm,vo,ef,Wa,tf,of,bi,nf,sf,af,vn,rf,Fn,lf,$n,_l;return l=new at({}),w=new at({}),pe=new at({}),ue=new ie({props:{name:"class transformers.FlaubertConfig",anchor:"transformers.FlaubertConfig",parameters:[{name:"pre_norm",val:" = False"},{name:"layerdrop",val:" = 0.0"},{name:"vocab_size",val:" = 30145"},{name:"emb_dim",val:" = 2048"},{name:"n_layers",val:" = 12"},{name:"n_heads",val:" = 16"},{name:"dropout",val:" = 0.1"},{name:"attention_dropout",val:" = 0.1"},{name:"gelu_activation",val:" = True"},{name:"sinusoidal_embeddings",val:" = False"},{name:"causal",val:" = False"},{name:"asm",val:" = False"},{name:"n_langs",val:" = 1"},{name:"use_lang_emb",val:" = True"},{name:"max_position_embeddings",val:" = 512"},{name:"embed_init_std",val:" = 0.02209708691207961"},{name:"layer_norm_eps",val:" = 1e-12"},{name:"init_std",val:" = 0.02"},{name:"bos_index",val:" = 0"},{name:"eos_index",val:" = 1"},{name:"pad_index",val:" = 2"},{name:"unk_index",val:" = 3"},{name:"mask_index",val:" = 5"},{name:"is_encoder",val:" = True"},{name:"summary_type",val:" = 'first'"},{name:"summary_use_proj",val:" = True"},{name:"summary_activation",val:" = None"},{name:"summary_proj_to_labels",val:" = True"},{name:"summary_first_dropout",val:" = 0.1"},{name:"start_n_top",val:" = 5"},{name:"end_n_top",val:" = 5"},{name:"mask_token_id",val:" = 0"},{name:"lang_id",val:" = 0"},{name:"pad_token_id",val:" = 2"},{name:"bos_token_id",val:" = 0"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.FlaubertConfig.pre_norm",description:`<strong>pre_norm</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether to apply the layer normalization before or after the feed forward layer following the attention in
each layer (Vaswani et al., Tensor2Tensor for Neural Machine Translation. 2018)`,name:"pre_norm"},{anchor:"transformers.FlaubertConfig.layerdrop",description:`<strong>layerdrop</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#x2014;
Probability to drop layers during training (Fan et al., Reducing Transformer Depth on Demand with
Structured Dropout. ICLR 2020)`,name:"layerdrop"},{anchor:"transformers.FlaubertConfig.vocab_size",description:`<strong>vocab_size</strong> (<code>int</code>, <em>optional</em>, defaults to 30145) &#x2014;
Vocabulary size of the FlauBERT model. Defines the number of different tokens that can be represented by
the <code>inputs_ids</code> passed when calling <a href="/docs/transformers/main/en/model_doc/flaubert#transformers.FlaubertModel">FlaubertModel</a> or <a href="/docs/transformers/main/en/model_doc/flaubert#transformers.TFFlaubertModel">TFFlaubertModel</a>.`,name:"vocab_size"},{anchor:"transformers.FlaubertConfig.emb_dim",description:`<strong>emb_dim</strong> (<code>int</code>, <em>optional</em>, defaults to 2048) &#x2014;
Dimensionality of the encoder layers and the pooler layer.`,name:"emb_dim"},{anchor:"transformers.FlaubertConfig.n_layer",description:`<strong>n_layer</strong> (<code>int</code>, <em>optional</em>, defaults to 12) &#x2014;
Number of hidden layers in the Transformer encoder.`,name:"n_layer"},{anchor:"transformers.FlaubertConfig.n_head",description:`<strong>n_head</strong> (<code>int</code>, <em>optional</em>, defaults to 16) &#x2014;
Number of attention heads for each attention layer in the Transformer encoder.`,name:"n_head"},{anchor:"transformers.FlaubertConfig.dropout",description:`<strong>dropout</strong> (<code>float</code>, <em>optional</em>, defaults to 0.1) &#x2014;
The dropout probability for all fully connected layers in the embeddings, encoder, and pooler.`,name:"dropout"},{anchor:"transformers.FlaubertConfig.attention_dropout",description:`<strong>attention_dropout</strong> (<code>float</code>, <em>optional</em>, defaults to 0.1) &#x2014;
The dropout probability for the attention mechanism`,name:"attention_dropout"},{anchor:"transformers.FlaubertConfig.gelu_activation",description:`<strong>gelu_activation</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to use a <em>gelu</em> activation instead of <em>relu</em>.`,name:"gelu_activation"},{anchor:"transformers.FlaubertConfig.sinusoidal_embeddings",description:`<strong>sinusoidal_embeddings</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to use sinusoidal positional embeddings instead of absolute positional embeddings.`,name:"sinusoidal_embeddings"},{anchor:"transformers.FlaubertConfig.causal",description:`<strong>causal</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not the model should behave in a causal manner. Causal models use a triangular attention mask in
order to only attend to the left-side context instead if a bidirectional context.`,name:"causal"},{anchor:"transformers.FlaubertConfig.asm",description:`<strong>asm</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to use an adaptive log softmax projection layer instead of a linear layer for the prediction
layer.`,name:"asm"},{anchor:"transformers.FlaubertConfig.n_langs",description:`<strong>n_langs</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
The number of languages the model handles. Set to 1 for monolingual models.`,name:"n_langs"},{anchor:"transformers.FlaubertConfig.use_lang_emb",description:`<strong>use_lang_emb</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to use language embeddings. Some models use additional language embeddings, see <a href="http://huggingface.co/transformers/multilingual.html#xlm-language-embeddings" rel="nofollow">the multilingual
models page</a> for information
on how to use them.`,name:"use_lang_emb"},{anchor:"transformers.FlaubertConfig.max_position_embeddings",description:`<strong>max_position_embeddings</strong> (<code>int</code>, <em>optional</em>, defaults to 512) &#x2014;
The maximum sequence length that this model might ever be used with. Typically set this to something large
just in case (e.g., 512 or 1024 or 2048).`,name:"max_position_embeddings"},{anchor:"transformers.FlaubertConfig.embed_init_std",description:`<strong>embed_init_std</strong> (<code>float</code>, <em>optional</em>, defaults to 2048^-0.5) &#x2014;
The standard deviation of the truncated_normal_initializer for initializing the embedding matrices.`,name:"embed_init_std"},{anchor:"transformers.FlaubertConfig.init_std",description:`<strong>init_std</strong> (<code>int</code>, <em>optional</em>, defaults to 50257) &#x2014;
The standard deviation of the truncated_normal_initializer for initializing all weight matrices except the
embedding matrices.`,name:"init_std"},{anchor:"transformers.FlaubertConfig.layer_norm_eps",description:`<strong>layer_norm_eps</strong> (<code>float</code>, <em>optional</em>, defaults to 1e-12) &#x2014;
The epsilon used by the layer normalization layers.`,name:"layer_norm_eps"},{anchor:"transformers.FlaubertConfig.bos_index",description:`<strong>bos_index</strong> (<code>int</code>, <em>optional</em>, defaults to 0) &#x2014;
The index of the beginning of sentence token in the vocabulary.`,name:"bos_index"},{anchor:"transformers.FlaubertConfig.eos_index",description:`<strong>eos_index</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
The index of the end of sentence token in the vocabulary.`,name:"eos_index"},{anchor:"transformers.FlaubertConfig.pad_index",description:`<strong>pad_index</strong> (<code>int</code>, <em>optional</em>, defaults to 2) &#x2014;
The index of the padding token in the vocabulary.`,name:"pad_index"},{anchor:"transformers.FlaubertConfig.unk_index",description:`<strong>unk_index</strong> (<code>int</code>, <em>optional</em>, defaults to 3) &#x2014;
The index of the unknown token in the vocabulary.`,name:"unk_index"},{anchor:"transformers.FlaubertConfig.mask_index",description:`<strong>mask_index</strong> (<code>int</code>, <em>optional</em>, defaults to 5) &#x2014;
The index of the masking token in the vocabulary.`,name:"mask_index"},{anchor:"transformers.FlaubertConfig.is_encoder(bool,",description:`<strong>is_encoder(<code>bool</code>,</strong> <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not the initialized model should be a transformer encoder or decoder as seen in Vaswani et al.`,name:"is_encoder(bool,"},{anchor:"transformers.FlaubertConfig.summary_type",description:`<strong>summary_type</strong> (<code>string</code>, <em>optional</em>, defaults to &#x201C;first&#x201D;) &#x2014;
Argument used when doing sequence summary. Used in the sequence classification and multiple choice models.</p>
<p>Has to be one of the following options:</p>
<ul>
<li><code>&quot;last&quot;</code>: Take the last token hidden state (like XLNet).</li>
<li><code>&quot;first&quot;</code>: Take the first token hidden state (like BERT).</li>
<li><code>&quot;mean&quot;</code>: Take the mean of all tokens hidden states.</li>
<li><code>&quot;cls_index&quot;</code>: Supply a Tensor of classification token position (like GPT/GPT-2).</li>
<li><code>&quot;attn&quot;</code>: Not implemented now, use multi-head attention.</li>
</ul>`,name:"summary_type"},{anchor:"transformers.FlaubertConfig.summary_use_proj",description:`<strong>summary_use_proj</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Argument used when doing sequence summary. Used in the sequence classification and multiple choice models.</p>
<p>Whether or not to add a projection after the vector extraction.`,name:"summary_use_proj"},{anchor:"transformers.FlaubertConfig.summary_activation",description:`<strong>summary_activation</strong> (<code>str</code>, <em>optional</em>) &#x2014;
Argument used when doing sequence summary. Used in the sequence classification and multiple choice models.</p>
<p>Pass <code>&quot;tanh&quot;</code> for a tanh activation to the output, any other value will result in no activation.`,name:"summary_activation"},{anchor:"transformers.FlaubertConfig.summary_proj_to_labels",description:`<strong>summary_proj_to_labels</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Used in the sequence classification and multiple choice models.</p>
<p>Whether the projection outputs should have <code>config.num_labels</code> or <code>config.hidden_size</code> classes.`,name:"summary_proj_to_labels"},{anchor:"transformers.FlaubertConfig.summary_first_dropout",description:`<strong>summary_first_dropout</strong> (<code>float</code>, <em>optional</em>, defaults to 0.1) &#x2014;
Used in the sequence classification and multiple choice models.</p>
<p>The dropout ratio to be used after the projection and activation.`,name:"summary_first_dropout"},{anchor:"transformers.FlaubertConfig.start_n_top",description:`<strong>start_n_top</strong> (<code>int</code>, <em>optional</em>, defaults to 5) &#x2014;
Used in the SQuAD evaluation script.`,name:"start_n_top"},{anchor:"transformers.FlaubertConfig.end_n_top",description:`<strong>end_n_top</strong> (<code>int</code>, <em>optional</em>, defaults to 5) &#x2014;
Used in the SQuAD evaluation script.`,name:"end_n_top"},{anchor:"transformers.FlaubertConfig.mask_token_id",description:`<strong>mask_token_id</strong> (<code>int</code>, <em>optional</em>, defaults to 0) &#x2014;
Model agnostic parameter to identify masked tokens when generating text in an MLM context.`,name:"mask_token_id"},{anchor:"transformers.FlaubertConfig.lang_id",description:`<strong>lang_id</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
The ID of the language used by the model. This parameter is used when generating text in a given language.`,name:"lang_id"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/flaubert/configuration_flaubert.py#L34"}}),Se=new at({}),On=new ie({props:{name:"class transformers.FlaubertTokenizer",anchor:"transformers.FlaubertTokenizer",parameters:[{name:"vocab_file",val:""},{name:"merges_file",val:""},{name:"do_lowercase",val:" = False"},{name:"unk_token",val:" = '<unk>'"},{name:"bos_token",val:" = '<s>'"},{name:"sep_token",val:" = '</s>'"},{name:"pad_token",val:" = '<pad>'"},{name:"cls_token",val:" = '</s>'"},{name:"mask_token",val:" = '<special1>'"},{name:"additional_special_tokens",val:" = ['<special0>', '<special1>', '<special2>', '<special3>', '<special4>', '<special5>', '<special6>', '<special7>', '<special8>', '<special9>']"},{name:"lang2id",val:" = None"},{name:"id2lang",val:" = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.FlaubertTokenizer.vocab_file",description:`<strong>vocab_file</strong> (<code>str</code>) &#x2014;
Vocabulary file.`,name:"vocab_file"},{anchor:"transformers.FlaubertTokenizer.merges_file",description:`<strong>merges_file</strong> (<code>str</code>) &#x2014;
Merges file.`,name:"merges_file"},{anchor:"transformers.FlaubertTokenizer.do_lowercase",description:`<strong>do_lowercase</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Controls lower casing.`,name:"do_lowercase"},{anchor:"transformers.FlaubertTokenizer.unk_token",description:`<strong>unk_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;unk&gt;&quot;</code>) &#x2014;
The unknown token. A token that is not in the vocabulary cannot be converted to an ID and is set to be this
token instead.`,name:"unk_token"},{anchor:"transformers.FlaubertTokenizer.bos_token",description:`<strong>bos_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;s&gt;&quot;</code>) &#x2014;
The beginning of sequence token that was used during pretraining. Can be used a sequence classifier token.</p>
<div class="course-tip  bg-gradient-to-br dark:bg-gradient-to-r before:border-green-500 dark:before:border-green-800 from-green-50 dark:from-gray-900 to-white dark:to-gray-950 border border-green-50 text-green-700 dark:text-gray-400">
						
<p>When building a sequence using special tokens, this is not the token that is used for the beginning of
sequence. The token used is the <code>cls_token</code>.</p>

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