import{S as nT,i as sT,s as aT,e as s,k as m,w as T,t as o,M as rT,c as a,d as t,m as p,a as r,x as w,h as n,b as g,G as e,g as _,y as C,q as $,o as F,B as E,v as iT,L as Ye}from"../../chunks/vendor-hf-doc-builder.js";import{T as Je}from"../../chunks/Tip-hf-doc-builder.js";import{D as se}from"../../chunks/Docstring-hf-doc-builder.js";import{C as Ze}from"../../chunks/CodeBlock-hf-doc-builder.js";import{I as Ge}from"../../chunks/IconCopyLink-hf-doc-builder.js";import{E as Xe}from"../../chunks/ExampleCodeBlock-hf-doc-builder.js";function lT(x){let d,k,h,u,y;return u=new Ze({props:{code:`from transformers import CamembertConfig, CamembertModel

# Initializing a Camembert camembert-base style configuration
configuration = CamembertConfig()

# Initializing a model (with random weights) from the camembert-base style configuration
model = CamembertModel(configuration)

# Accessing the model configuration
configuration = model.config`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> CamembertConfig, CamembertModel

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a Camembert camembert-base style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = CamembertConfig()

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a model (with random weights) from the camembert-base style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = CamembertModel(configuration)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Accessing the model configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = model.config`}}),{c(){d=s("p"),k=o("Example:"),h=m(),T(u.$$.fragment)},l(l){d=a(l,"P",{});var c=r(d);k=n(c,"Example:"),c.forEach(t),h=p(l),w(u.$$.fragment,l)},m(l,c){_(l,d,c),e(d,k),_(l,h,c),C(u,l,c),y=!0},p:Ye,i(l){y||($(u.$$.fragment,l),y=!0)},o(l){F(u.$$.fragment,l),y=!1},d(l){l&&t(d),l&&t(h),E(u,l)}}}function dT(x){let d,k,h,u,y;return{c(){d=s("p"),k=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),h=s("code"),u=o("Module"),y=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=a(l,"P",{});var c=r(d);k=n(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),h=a(c,"CODE",{});var q=r(h);u=n(q,"Module"),q.forEach(t),y=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,k),e(d,h),e(h,u),e(d,y)},d(l){l&&t(d)}}}function cT(x){let d,k,h,u,y;return u=new Ze({props:{code:`from transformers import AutoTokenizer, CamembertModel
import torch

tokenizer = AutoTokenizer.from_pretrained("camembert-base")
model = CamembertModel.from_pretrained("camembert-base")

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, CamembertModel
<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;camembert-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = CamembertModel.from_pretrained(<span class="hljs-string">&quot;camembert-base&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=s("p"),k=o("Example:"),h=m(),T(u.$$.fragment)},l(l){d=a(l,"P",{});var c=r(d);k=n(c,"Example:"),c.forEach(t),h=p(l),w(u.$$.fragment,l)},m(l,c){_(l,d,c),e(d,k),_(l,h,c),C(u,l,c),y=!0},p:Ye,i(l){y||($(u.$$.fragment,l),y=!0)},o(l){F(u.$$.fragment,l),y=!1},d(l){l&&t(d),l&&t(h),E(u,l)}}}function mT(x){let d,k,h,u,y;return{c(){d=s("p"),k=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),h=s("code"),u=o("Module"),y=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=a(l,"P",{});var c=r(d);k=n(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),h=a(c,"CODE",{});var q=r(h);u=n(q,"Module"),q.forEach(t),y=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,k),e(d,h),e(h,u),e(d,y)},d(l){l&&t(d)}}}function pT(x){let d,k,h,u,y;return u=new Ze({props:{code:`from transformers import AutoTokenizer, CamembertForCausalLM, AutoConfig
import torch

tokenizer = AutoTokenizer.from_pretrained("camembert-base")
config = AutoConfig.from_pretrained("camembert-base")
config.is_decoder = True
model = CamembertForCausalLM.from_pretrained("camembert-base", config=config)

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

prediction_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, CamembertForCausalLM, AutoConfig
<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;camembert-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>config = AutoConfig.from_pretrained(<span class="hljs-string">&quot;camembert-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>config.is_decoder = <span class="hljs-literal">True</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = CamembertForCausalLM.from_pretrained(<span class="hljs-string">&quot;camembert-base&quot;</span>, config=config)

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

tokenizer = AutoTokenizer.from_pretrained("camembert-base")
model = CamembertForMaskedLM.from_pretrained("camembert-base")

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

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

# retrieve index of <mask>
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)
tokenizer.decode(predicted_token_id)

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

outputs = model(**inputs, labels=labels)
round(outputs.loss.item(), 2)`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, CamembertForMaskedLM
<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;camembert-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = CamembertForMaskedLM.from_pretrained(<span class="hljs-string">&quot;camembert-base&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(<span class="hljs-string">&quot;The capital of France is &lt;mask&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;mask&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>tokenizer.decode(predicted_token_id)
<span class="hljs-string">&#x27; Paris&#x27;</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;mask&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)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">round</span>(outputs.loss.item(), <span class="hljs-number">2</span>)
<span class="hljs-number">0.1</span>`}}),{c(){d=s("p"),k=o("Example:"),h=m(),T(u.$$.fragment)},l(l){d=a(l,"P",{});var c=r(d);k=n(c,"Example:"),c.forEach(t),h=p(l),w(u.$$.fragment,l)},m(l,c){_(l,d,c),e(d,k),_(l,h,c),C(u,l,c),y=!0},p:Ye,i(l){y||($(u.$$.fragment,l),y=!0)},o(l){F(u.$$.fragment,l),y=!1},d(l){l&&t(d),l&&t(h),E(u,l)}}}function fT(x){let d,k,h,u,y;return{c(){d=s("p"),k=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),h=s("code"),u=o("Module"),y=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=a(l,"P",{});var c=r(d);k=n(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),h=a(c,"CODE",{});var q=r(h);u=n(q,"Module"),q.forEach(t),y=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,k),e(d,h),e(h,u),e(d,y)},d(l){l&&t(d)}}}function gT(x){let d,k,h,u,y;return u=new Ze({props:{code:`import torch
from transformers import AutoTokenizer, CamembertForSequenceClassification

tokenizer = AutoTokenizer.from_pretrained("cardiffnlp/twitter-roberta-base-emotion")
model = CamembertForSequenceClassification.from_pretrained("cardiffnlp/twitter-roberta-base-emotion")

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

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

predicted_class_id = logits.argmax().item()
model.config.id2label[predicted_class_id]

# 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 = CamembertForSequenceClassification.from_pretrained("cardiffnlp/twitter-roberta-base-emotion", num_labels=num_labels)

labels = torch.tensor([1])
loss = model(**inputs, labels=labels).loss
round(loss.item(), 2)`,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, CamembertForSequenceClassification

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;cardiffnlp/twitter-roberta-base-emotion&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = CamembertForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;cardiffnlp/twitter-roberta-base-emotion&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>model.config.id2label[predicted_class_id]
<span class="hljs-string">&#x27;optimism&#x27;</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 = CamembertForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;cardiffnlp/twitter-roberta-base-emotion&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
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">round</span>(loss.item(), <span class="hljs-number">2</span>)
<span class="hljs-number">0.08</span>`}}),{c(){d=s("p"),k=o("Example of single-label classification:"),h=m(),T(u.$$.fragment)},l(l){d=a(l,"P",{});var c=r(d);k=n(c,"Example of single-label classification:"),c.forEach(t),h=p(l),w(u.$$.fragment,l)},m(l,c){_(l,d,c),e(d,k),_(l,h,c),C(u,l,c),y=!0},p:Ye,i(l){y||($(u.$$.fragment,l),y=!0)},o(l){F(u.$$.fragment,l),y=!1},d(l){l&&t(d),l&&t(h),E(u,l)}}}function _T(x){let d,k,h,u,y;return u=new Ze({props:{code:`import torch
from transformers import AutoTokenizer, CamembertForSequenceClassification

tokenizer = AutoTokenizer.from_pretrained("cardiffnlp/twitter-roberta-base-emotion")
model = CamembertForSequenceClassification.from_pretrained("cardiffnlp/twitter-roberta-base-emotion", 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 = CamembertForSequenceClassification.from_pretrained(
    "cardiffnlp/twitter-roberta-base-emotion", 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, CamembertForSequenceClassification

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;cardiffnlp/twitter-roberta-base-emotion&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = CamembertForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;cardiffnlp/twitter-roberta-base-emotion&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 = CamembertForSequenceClassification.from_pretrained(
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;cardiffnlp/twitter-roberta-base-emotion&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=s("p"),k=o("Example of multi-label classification:"),h=m(),T(u.$$.fragment)},l(l){d=a(l,"P",{});var c=r(d);k=n(c,"Example of multi-label classification:"),c.forEach(t),h=p(l),w(u.$$.fragment,l)},m(l,c){_(l,d,c),e(d,k),_(l,h,c),C(u,l,c),y=!0},p:Ye,i(l){y||($(u.$$.fragment,l),y=!0)},o(l){F(u.$$.fragment,l),y=!1},d(l){l&&t(d),l&&t(h),E(u,l)}}}function bT(x){let d,k,h,u,y;return{c(){d=s("p"),k=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),h=s("code"),u=o("Module"),y=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=a(l,"P",{});var c=r(d);k=n(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),h=a(c,"CODE",{});var q=r(h);u=n(q,"Module"),q.forEach(t),y=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,k),e(d,h),e(h,u),e(d,y)},d(l){l&&t(d)}}}function kT(x){let d,k,h,u,y;return u=new Ze({props:{code:`from transformers import AutoTokenizer, CamembertForMultipleChoice
import torch

tokenizer = AutoTokenizer.from_pretrained("camembert-base")
model = CamembertForMultipleChoice.from_pretrained("camembert-base")

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, CamembertForMultipleChoice
<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;camembert-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = CamembertForMultipleChoice.from_pretrained(<span class="hljs-string">&quot;camembert-base&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=s("p"),k=o("Example:"),h=m(),T(u.$$.fragment)},l(l){d=a(l,"P",{});var c=r(d);k=n(c,"Example:"),c.forEach(t),h=p(l),w(u.$$.fragment,l)},m(l,c){_(l,d,c),e(d,k),_(l,h,c),C(u,l,c),y=!0},p:Ye,i(l){y||($(u.$$.fragment,l),y=!0)},o(l){F(u.$$.fragment,l),y=!1},d(l){l&&t(d),l&&t(h),E(u,l)}}}function yT(x){let d,k,h,u,y;return{c(){d=s("p"),k=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),h=s("code"),u=o("Module"),y=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=a(l,"P",{});var c=r(d);k=n(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),h=a(c,"CODE",{});var q=r(h);u=n(q,"Module"),q.forEach(t),y=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,k),e(d,h),e(h,u),e(d,y)},d(l){l&&t(d)}}}function vT(x){let d,k,h,u,y;return u=new Ze({props:{code:`from transformers import AutoTokenizer, CamembertForTokenClassification
import torch

tokenizer = AutoTokenizer.from_pretrained("Jean-Baptiste/roberta-large-ner-english")
model = CamembertForTokenClassification.from_pretrained("Jean-Baptiste/roberta-large-ner-english")

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]]
predicted_tokens_classes

labels = predicted_token_class_ids
loss = model(**inputs, labels=labels).loss
round(loss.item(), 2)`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, CamembertForTokenClassification
<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;Jean-Baptiste/roberta-large-ner-english&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = CamembertForTokenClassification.from_pretrained(<span class="hljs-string">&quot;Jean-Baptiste/roberta-large-ner-english&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>predicted_tokens_classes
[<span class="hljs-string">&#x27;O&#x27;</span>, <span class="hljs-string">&#x27;ORG&#x27;</span>, <span class="hljs-string">&#x27;ORG&#x27;</span>, <span class="hljs-string">&#x27;O&#x27;</span>, <span class="hljs-string">&#x27;O&#x27;</span>, <span class="hljs-string">&#x27;O&#x27;</span>, <span class="hljs-string">&#x27;O&#x27;</span>, <span class="hljs-string">&#x27;O&#x27;</span>, <span class="hljs-string">&#x27;LOC&#x27;</span>, <span class="hljs-string">&#x27;O&#x27;</span>, <span class="hljs-string">&#x27;LOC&#x27;</span>, <span class="hljs-string">&#x27;LOC&#x27;</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
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">round</span>(loss.item(), <span class="hljs-number">2</span>)
<span class="hljs-number">0.01</span>`}}),{c(){d=s("p"),k=o("Example:"),h=m(),T(u.$$.fragment)},l(l){d=a(l,"P",{});var c=r(d);k=n(c,"Example:"),c.forEach(t),h=p(l),w(u.$$.fragment,l)},m(l,c){_(l,d,c),e(d,k),_(l,h,c),C(u,l,c),y=!0},p:Ye,i(l){y||($(u.$$.fragment,l),y=!0)},o(l){F(u.$$.fragment,l),y=!1},d(l){l&&t(d),l&&t(h),E(u,l)}}}function TT(x){let d,k,h,u,y;return{c(){d=s("p"),k=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),h=s("code"),u=o("Module"),y=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=a(l,"P",{});var c=r(d);k=n(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),h=a(c,"CODE",{});var q=r(h);u=n(q,"Module"),q.forEach(t),y=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,k),e(d,h),e(h,u),e(d,y)},d(l){l&&t(d)}}}function wT(x){let d,k,h,u,y;return u=new Ze({props:{code:`from transformers import AutoTokenizer, CamembertForQuestionAnswering
import torch

tokenizer = AutoTokenizer.from_pretrained("deepset/roberta-base-squad2")
model = CamembertForQuestionAnswering.from_pretrained("deepset/roberta-base-squad2")

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]
tokenizer.decode(predict_answer_tokens, skip_special_tokens=True)

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

tokenizer = AutoTokenizer.from_pretrained("camembert-base")
model = TFCamembertModel.from_pretrained("camembert-base")

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

tokenizer = AutoTokenizer.from_pretrained("camembert-base")
model = TFCamembertForCausalLM.from_pretrained("camembert-base")

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

tokenizer = AutoTokenizer.from_pretrained("camembert-base")
model = TFCamembertForMaskedLM.from_pretrained("camembert-base")

inputs = tokenizer("The capital of France is <mask>.", return_tensors="tf")
logits = model(**inputs).logits

# retrieve index of <mask>
mask_token_index = tf.where((inputs.input_ids == tokenizer.mask_token_id)[0])
selected_logits = tf.gather_nd(logits[0], indices=mask_token_index)

predicted_token_id = tf.math.argmax(selected_logits, axis=-1)
tokenizer.decode(predicted_token_id)`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, TFCamembertForMaskedLM
<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;camembert-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFCamembertForMaskedLM.from_pretrained(<span class="hljs-string">&quot;camembert-base&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(<span class="hljs-string">&quot;The capital of France is &lt;mask&gt;.&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><span class="hljs-comment"># retrieve index of &lt;mask&gt;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>mask_token_index = tf.where((inputs.input_ids == tokenizer.mask_token_id)[<span class="hljs-number">0</span>])
<span class="hljs-meta">&gt;&gt;&gt; </span>selected_logits = tf.gather_nd(logits[<span class="hljs-number">0</span>], indices=mask_token_index)

<span class="hljs-meta">&gt;&gt;&gt; </span>predicted_token_id = tf.math.argmax(selected_logits, axis=-<span class="hljs-number">1</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer.decode(predicted_token_id)
<span class="hljs-string">&#x27; Paris&#x27;</span>`}}),{c(){d=s("p"),k=o("Example:"),h=m(),T(u.$$.fragment)},l(l){d=a(l,"P",{});var c=r(d);k=n(c,"Example:"),c.forEach(t),h=p(l),w(u.$$.fragment,l)},m(l,c){_(l,d,c),e(d,k),_(l,h,c),C(u,l,c),y=!0},p:Ye,i(l){y||($(u.$$.fragment,l),y=!0)},o(l){F(u.$$.fragment,l),y=!1},d(l){l&&t(d),l&&t(h),E(u,l)}}}function AT(x){let d,k;return d=new Ze({props:{code:`labels = tokenizer("The capital of France is Paris.", return_tensors="tf")["input_ids"]
# mask labels of non-<mask> tokens
labels = tf.where(inputs.input_ids == tokenizer.mask_token_id, labels, -100)

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

tokenizer = AutoTokenizer.from_pretrained("cardiffnlp/twitter-roberta-base-emotion")
model = TFCamembertForSequenceClassification.from_pretrained("cardiffnlp/twitter-roberta-base-emotion")

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])
model.config.id2label[predicted_class_id]`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, TFCamembertForSequenceClassification
<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;cardiffnlp/twitter-roberta-base-emotion&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFCamembertForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;cardiffnlp/twitter-roberta-base-emotion&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>])
<span class="hljs-meta">&gt;&gt;&gt; </span>model.config.id2label[predicted_class_id]
<span class="hljs-string">&#x27;optimism&#x27;</span>`}}),{c(){d=s("p"),k=o("Example:"),h=m(),T(u.$$.fragment)},l(l){d=a(l,"P",{});var c=r(d);k=n(c,"Example:"),c.forEach(t),h=p(l),w(u.$$.fragment,l)},m(l,c){_(l,d,c),e(d,k),_(l,h,c),C(u,l,c),y=!0},p:Ye,i(l){y||($(u.$$.fragment,l),y=!0)},o(l){F(u.$$.fragment,l),y=!1},d(l){l&&t(d),l&&t(h),E(u,l)}}}function NT(x){let d,k;return d=new Ze({props:{code:'# To train a model on `num_labels` classes, you can pass `num_labels=num_labels` to `.from_pretrained(...)`\nnum_labels = len(model.config.id2label)\nmodel = TFCamembertForSequenceClassification.from_pretrained("cardiffnlp/twitter-roberta-base-emotion", num_labels=num_labels)\n\nlabels = tf.constant(1)\nloss = model(**inputs, labels=labels).loss\nround(float(loss), 2)',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>
<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 = TFCamembertForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;cardiffnlp/twitter-roberta-base-emotion&quot;</span>, num_labels=num_labels)

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

tokenizer = AutoTokenizer.from_pretrained("camembert-base")
model = TFCamembertForMultipleChoice.from_pretrained("camembert-base")

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

tokenizer = AutoTokenizer.from_pretrained("ydshieh/roberta-large-ner-english")
model = TFCamembertForTokenClassification.from_pretrained("ydshieh/roberta-large-ner-english")

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

tokenizer = AutoTokenizer.from_pretrained("ydshieh/roberta-base-squad2")
model = TFCamembertForQuestionAnswering.from_pretrained("ydshieh/roberta-base-squad2")

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]
tokenizer.decode(predict_answer_tokens)`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, TFCamembertForQuestionAnswering
<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;ydshieh/roberta-base-squad2&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFCamembertForQuestionAnswering.from_pretrained(<span class="hljs-string">&quot;ydshieh/roberta-base-squad2&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>]
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer.decode(predict_answer_tokens)
<span class="hljs-string">&#x27; puppet&#x27;</span>`}}),{c(){d=s("p"),k=o("Example:"),h=m(),T(u.$$.fragment)},l(l){d=a(l,"P",{});var c=r(d);k=n(c,"Example:"),c.forEach(t),h=p(l),w(u.$$.fragment,l)},m(l,c){_(l,d,c),e(d,k),_(l,h,c),C(u,l,c),y=!0},p:Ye,i(l){y||($(u.$$.fragment,l),y=!0)},o(l){F(u.$$.fragment,l),y=!1},d(l){l&&t(d),l&&t(h),E(u,l)}}}function VT(x){let d,k;return d=new Ze({props:{code:`# target is "nice puppet"
target_start_index = tf.constant([14])
target_end_index = tf.constant([15])

outputs = model(**inputs, start_positions=target_start_index, end_positions=target_end_index)
loss = tf.math.reduce_mean(outputs.loss)
round(float(loss), 2)`,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)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">round</span>(<span class="hljs-built_in">float</span>(loss), <span class="hljs-number">2</span>)
<span class="hljs-number">0.86</span>`}}),{c(){T(d.$$.fragment)},l(h){w(d.$$.fragment,h)},m(h,u){C(d,h,u),k=!0},p:Ye,i(h){k||($(d.$$.fragment,h),k=!0)},o(h){F(d.$$.fragment,h),k=!1},d(h){E(d,h)}}}function JT(x){let d,k,h,u,y,l,c,q,ke,pe,I,ae,Y,v,ye,H,ve,he,W,Te,ie,V,we,ue,R,Ce,fe,B,me,$e,te,j,L,ge,U,le,Fe,K,Ee,Me,P,oe,J,de,ze,G,ce,qe,N,_e,S,re,Z,A,xe,O,je,be,f,M,Pe,ne,Re,Ie,z,Be,Ue,Se,Le,Ke,D,Q,Oe,He,X,We,Ne,Ae,Qe,ee,De,_m,Ad,ro,Wo,Ci,ds,bm,$i,km,Pd,$t,cs,ym,Bt,vm,_r,Tm,wm,br,Cm,$m,ms,Fm,Em,Mm,io,zm,kr,qm,xm,yr,jm,Am,Pm,Ro,Ld,lo,Bo,Fi,ps,Lm,Ei,Om,Od,et,hs,Nm,Ut,Dm,vr,Im,Sm,Tr,Wm,Rm,us,Bm,Um,Km,fs,Hm,wr,Qm,Vm,Jm,Kt,gs,Gm,Mi,Xm,Ym,_s,Cr,Zm,zi,ep,tp,$r,op,qi,np,sp,Uo,bs,ap,ks,rp,xi,ip,lp,dp,Ko,ys,cp,ji,mp,pp,Fr,vs,Nd,co,Ho,Ai,Ts,hp,Pi,up,Dd,ct,ws,fp,Ft,gp,Li,_p,bp,Er,kp,yp,Mr,vp,Tp,Cs,wp,Cp,$p,$s,Fp,zr,Ep,Mp,zp,Ht,Fs,qp,Oi,xp,jp,Es,qr,Ap,Ni,Pp,Lp,xr,Op,Di,Np,Dp,Qo,Ms,Ip,Ii,Sp,Id,mo,Vo,Si,zs,Wp,Wi,Rp,Sd,Ve,qs,Bp,Ri,Up,Kp,xs,Hp,jr,Qp,Vp,Jp,js,Gp,As,Xp,Yp,Zp,Ps,eh,Bi,th,oh,nh,tt,sh,Ui,ah,rh,Ki,ih,lh,Hi,dh,ch,Qi,mh,ph,Vi,hh,uh,Ji,fh,gh,_h,Jo,bh,Gi,kh,yh,Ls,vh,Th,Et,Os,wh,po,Ch,Ar,$h,Fh,Xi,Eh,Mh,zh,Go,qh,Xo,Wd,ho,Yo,Yi,Ns,xh,Zi,jh,Rd,mt,Ds,Ah,Is,Ph,el,Lh,Oh,Nh,Ss,Dh,Pr,Ih,Sh,Wh,Ws,Rh,Rs,Bh,Uh,Kh,Mt,Bs,Hh,uo,Qh,Lr,Vh,Jh,tl,Gh,Xh,Yh,Zo,Zh,en,Bd,fo,tn,ol,Us,eu,nl,tu,Ud,pt,Ks,ou,Hs,nu,sl,su,au,ru,Qs,iu,Or,lu,du,cu,Vs,mu,Js,pu,hu,uu,zt,Gs,fu,go,gu,Nr,_u,bu,al,ku,yu,vu,on,Tu,nn,Kd,_o,sn,rl,Xs,wu,il,Cu,Hd,ht,Ys,$u,ll,Fu,Eu,Zs,Mu,Dr,zu,qu,xu,ea,ju,ta,Au,Pu,Lu,bt,oa,Ou,bo,Nu,Ir,Du,Iu,dl,Su,Wu,Ru,an,Bu,rn,Uu,ln,Qd,ko,dn,cl,na,Ku,ml,Hu,Vd,ut,sa,Qu,pl,Vu,Ju,aa,Gu,Sr,Xu,Yu,Zu,ra,ef,ia,tf,of,nf,qt,la,sf,yo,af,Wr,rf,lf,hl,df,cf,mf,cn,pf,mn,Jd,vo,pn,ul,da,hf,fl,uf,Gd,ft,ca,ff,gl,gf,_f,ma,bf,Rr,kf,yf,vf,pa,Tf,ha,wf,Cf,$f,xt,ua,Ff,To,Ef,Br,Mf,zf,_l,qf,xf,jf,hn,Af,un,Xd,wo,fn,bl,fa,Pf,kl,Lf,Yd,gt,ga,Of,gn,Nf,yl,Df,If,vl,Sf,Wf,_a,Rf,Ur,Bf,Uf,Kf,ba,Hf,ka,Qf,Vf,Jf,jt,ya,Gf,Co,Xf,Kr,Yf,Zf,Tl,eg,tg,og,_n,ng,bn,Zd,$o,kn,wl,va,sg,Cl,ag,ec,ot,Ta,rg,$l,ig,lg,wa,dg,Hr,cg,mg,pg,Ca,hg,$a,ug,fg,gg,yn,_g,At,Fa,bg,Fo,kg,Qr,yg,vg,Fl,Tg,wg,Cg,vn,$g,Tn,tc,Eo,wn,El,Ea,Fg,Ml,Eg,oc,nt,Ma,Mg,za,zg,zl,qg,xg,jg,qa,Ag,Vr,Pg,Lg,Og,xa,Ng,ja,Dg,Ig,Sg,Cn,Wg,Pt,Aa,Rg,Mo,Bg,Jr,Ug,Kg,ql,Hg,Qg,Vg,$n,Jg,Fn,nc,zo,En,xl,Pa,Gg,jl,Xg,sc,st,La,Yg,Oa,Zg,Al,e_,t_,o_,Na,n_,Gr,s_,a_,r_,Da,i_,Ia,l_,d_,c_,Mn,m_,kt,Sa,p_,qo,h_,Xr,u_,f_,Pl,g_,__,b_,zn,k_,qn,y_,xn,ac,xo,jn,Ll,Wa,v_,Ol,T_,rc,at,Ra,w_,Nl,C_,$_,Ba,F_,Yr,E_,M_,z_,Ua,q_,Ka,x_,j_,A_,An,P_,yt,Ha,L_,jo,O_,Zr,N_,D_,Dl,I_,S_,W_,Pn,R_,Ln,B_,On,ic,Ao,Nn,Il,Qa,U_,Sl,K_,lc,rt,Va,H_,Wl,Q_,V_,Ja,J_,ei,G_,X_,Y_,Ga,Z_,Xa,eb,tb,ob,Dn,nb,Lt,Ya,sb,Po,ab,ti,rb,ib,Rl,lb,db,cb,In,mb,Sn,dc,Lo,Wn,Bl,Za,pb,Ul,hb,cc,it,er,ub,Kl,fb,gb,tr,_b,oi,bb,kb,yb,or,vb,nr,Tb,wb,Cb,Rn,$b,vt,sr,Fb,Oo,Eb,ni,Mb,zb,Hl,qb,xb,jb,Bn,Ab,Un,Pb,Kn,mc,No,Hn,Ql,ar,Lb,Vl,Ob,pc,lt,rr,Nb,Do,Db,Jl,Ib,Sb,Gl,Wb,Rb,Bb,ir,Ub,si,Kb,Hb,Qb,lr,Vb,dr,Jb,Gb,Xb,Qn,Yb,Tt,cr,Zb,Io,ek,ai,tk,ok,Xl,nk,sk,ak,Vn,rk,Jn,ik,Gn,hc;return l=new Ge({}),v=new Ge({}),A=new Ge({}),ds=new Ge({}),cs=new se({props:{name:"class transformers.CamembertConfig",anchor:"transformers.CamembertConfig",parameters:[{name:"vocab_size",val:" = 30522"},{name:"hidden_size",val:" = 768"},{name:"num_hidden_layers",val:" = 12"},{name:"num_attention_heads",val:" = 12"},{name:"intermediate_size",val:" = 3072"},{name:"hidden_act",val:" = 'gelu'"},{name:"hidden_dropout_prob",val:" = 0.1"},{name:"attention_probs_dropout_prob",val:" = 0.1"},{name:"max_position_embeddings",val:" = 512"},{name:"type_vocab_size",val:" = 2"},{name:"initializer_range",val:" = 0.02"},{name:"layer_norm_eps",val:" = 1e-12"},{name:"pad_token_id",val:" = 1"},{name:"bos_token_id",val:" = 0"},{name:"eos_token_id",val:" = 2"},{name:"position_embedding_type",val:" = 'absolute'"},{name:"use_cache",val:" = True"},{name:"classifier_dropout",val:" = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.CamembertConfig.vocab_size",description:`<strong>vocab_size</strong> (<code>int</code>, <em>optional</em>, defaults to 30522) &#x2014;
Vocabulary size of the BERT model. Defines the number of different tokens that can be represented by the
<code>inputs_ids</code> passed when calling <a href="/docs/transformers/v4.29.0/en/model_doc/camembert#transformers.CamembertModel">CamembertModel</a> or <a href="/docs/transformers/v4.29.0/en/model_doc/camembert#transformers.TFCamembertModel">TFCamembertModel</a>.`,name:"vocab_size"},{anchor:"transformers.CamembertConfig.hidden_size",description:`<strong>hidden_size</strong> (<code>int</code>, <em>optional</em>, defaults to 768) &#x2014;
Dimensionality of the encoder layers and the pooler layer.`,name:"hidden_size"},{anchor:"transformers.CamembertConfig.num_hidden_layers",description:`<strong>num_hidden_layers</strong> (<code>int</code>, <em>optional</em>, defaults to 12) &#x2014;
Number of hidden layers in the Transformer encoder.`,name:"num_hidden_layers"},{anchor:"transformers.CamembertConfig.num_attention_heads",description:`<strong>num_attention_heads</strong> (<code>int</code>, <em>optional</em>, defaults to 12) &#x2014;
Number of attention heads for each attention layer in the Transformer encoder.`,name:"num_attention_heads"},{anchor:"transformers.CamembertConfig.intermediate_size",description:`<strong>intermediate_size</strong> (<code>int</code>, <em>optional</em>, defaults to 3072) &#x2014;
Dimensionality of the &#x201C;intermediate&#x201D; (often named feed-forward) layer in the Transformer encoder.`,name:"intermediate_size"},{anchor:"transformers.CamembertConfig.hidden_act",description:`<strong>hidden_act</strong> (<code>str</code> or <code>Callable</code>, <em>optional</em>, defaults to <code>&quot;gelu&quot;</code>) &#x2014;
The non-linear activation function (function or string) in the encoder and pooler. If string, <code>&quot;gelu&quot;</code>,
<code>&quot;relu&quot;</code>, <code>&quot;silu&quot;</code> and <code>&quot;gelu_new&quot;</code> are supported.`,name:"hidden_act"},{anchor:"transformers.CamembertConfig.hidden_dropout_prob",description:`<strong>hidden_dropout_prob</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:"hidden_dropout_prob"},{anchor:"transformers.CamembertConfig.attention_probs_dropout_prob",description:`<strong>attention_probs_dropout_prob</strong> (<code>float</code>, <em>optional</em>, defaults to 0.1) &#x2014;
The dropout ratio for the attention probabilities.`,name:"attention_probs_dropout_prob"},{anchor:"transformers.CamembertConfig.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.CamembertConfig.type_vocab_size",description:`<strong>type_vocab_size</strong> (<code>int</code>, <em>optional</em>, defaults to 2) &#x2014;
The vocabulary size of the <code>token_type_ids</code> passed when calling <a href="/docs/transformers/v4.29.0/en/model_doc/camembert#transformers.CamembertModel">CamembertModel</a> or <a href="/docs/transformers/v4.29.0/en/model_doc/camembert#transformers.TFCamembertModel">TFCamembertModel</a>.`,name:"type_vocab_size"},{anchor:"transformers.CamembertConfig.initializer_range",description:`<strong>initializer_range</strong> (<code>float</code>, <em>optional</em>, defaults to 0.02) &#x2014;
The standard deviation of the truncated_normal_initializer for initializing all weight matrices.`,name:"initializer_range"},{anchor:"transformers.CamembertConfig.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.CamembertConfig.position_embedding_type",description:`<strong>position_embedding_type</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;absolute&quot;</code>) &#x2014;
Type of position embedding. Choose one of <code>&quot;absolute&quot;</code>, <code>&quot;relative_key&quot;</code>, <code>&quot;relative_key_query&quot;</code>. For
positional embeddings use <code>&quot;absolute&quot;</code>. For more information on <code>&quot;relative_key&quot;</code>, please refer to
<a href="https://arxiv.org/abs/1803.02155" rel="nofollow">Self-Attention with Relative Position Representations (Shaw et al.)</a>.
For more information on <code>&quot;relative_key_query&quot;</code>, please refer to <em>Method 4</em> in <a href="https://arxiv.org/abs/2009.13658" rel="nofollow">Improve Transformer Models
with Better Relative Position Embeddings (Huang et al.)</a>.`,name:"position_embedding_type"},{anchor:"transformers.CamembertConfig.is_decoder",description:`<strong>is_decoder</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether the model is used as a decoder or not. If <code>False</code>, the model is used as an encoder.`,name:"is_decoder"},{anchor:"transformers.CamembertConfig.use_cache",description:`<strong>use_cache</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not the model should return the last key/values attentions (not used by all models). Only
relevant if <code>config.is_decoder=True</code>.`,name:"use_cache"},{anchor:"transformers.CamembertConfig.classifier_dropout",description:`<strong>classifier_dropout</strong> (<code>float</code>, <em>optional</em>) &#x2014;
The dropout ratio for the classification head.`,name:"classifier_dropout"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/camembert/configuration_camembert.py#L39"}}),Ro=new Xe({props:{anchor:"transformers.CamembertConfig.example",$$slots:{default:[lT]},$$scope:{ctx:x}}}),ps=new Ge({}),hs=new se({props:{name:"class transformers.CamembertTokenizer",anchor:"transformers.CamembertTokenizer",parameters:[{name:"vocab_file",val:""},{name:"bos_token",val:" = '<s>'"},{name:"eos_token",val:" = '</s>'"},{name:"sep_token",val:" = '</s>'"},{name:"cls_token",val:" = '<s>'"},{name:"unk_token",val:" = '<unk>'"},{name:"pad_token",val:" = '<pad>'"},{name:"mask_token",val:" = '<mask>'"},{name:"additional_special_tokens",val:" = ['<s>NOTUSED', '</s>NOTUSED']"},{name:"sp_model_kwargs",val:": typing.Union[typing.Dict[str, typing.Any], NoneType] = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.CamembertTokenizer.vocab_file",description:`<strong>vocab_file</strong> (<code>str</code>) &#x2014;
<a href="https://github.com/google/sentencepiece" rel="nofollow">SentencePiece</a> file (generally has a <em>.spm</em> extension) that
contains the vocabulary necessary to instantiate a tokenizer.`,name:"vocab_file"},{anchor:"transformers.CamembertTokenizer.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.CamembertTokenizer.eos_token",description:`<strong>eos_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;/s&gt;&quot;</code>) &#x2014;
The end of sequence 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 end of sequence.
The token used is the <code>sep_token</code>.</p>

					</div>`,name:"eos_token"},{anchor:"transformers.CamembertTokenizer.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.CamembertTokenizer.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.CamembertTokenizer.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.CamembertTokenizer.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.CamembertTokenizer.mask_token",description:`<strong>mask_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;mask&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.CamembertTokenizer.additional_special_tokens",description:`<strong>additional_special_tokens</strong> (<code>List[str]</code>, <em>optional</em>, defaults to <code>[&quot;&lt;s&gt;NOTUSED&quot;, &quot;&lt;/s&gt;NOTUSED&quot;]</code>) &#x2014;
Additional special tokens used by the tokenizer.`,name:"additional_special_tokens"},{anchor:"transformers.CamembertTokenizer.sp_model_kwargs",description:`<strong>sp_model_kwargs</strong> (<code>dict</code>, <em>optional</em>) &#x2014;
Will be passed to the <code>SentencePieceProcessor.__init__()</code> method. The <a href="https://github.com/google/sentencepiece/tree/master/python" rel="nofollow">Python wrapper for
SentencePiece</a> can be used, among other things,
to set:</p>
<ul>
<li>
<p><code>enable_sampling</code>: Enable subword regularization.</p>
</li>
<li>
<p><code>nbest_size</code>: Sampling parameters for unigram. Invalid for BPE-Dropout.</p>
<ul>
<li><code>nbest_size = {0,1}</code>: No sampling is performed.</li>
<li><code>nbest_size &gt; 1</code>: samples from the nbest_size results.</li>
<li><code>nbest_size &lt; 0</code>: assuming that nbest_size is infinite and samples from the all hypothesis (lattice)
using forward-filtering-and-backward-sampling algorithm.</li>
</ul>
</li>
<li>
<p><code>alpha</code>: Smoothing parameter for unigram sampling, and dropout probability of merge operations for
BPE-dropout.</p>
</li>
</ul>`,name:"sp_model_kwargs"},{anchor:"transformers.CamembertTokenizer.sp_model",description:`<strong>sp_model</strong> (<code>SentencePieceProcessor</code>) &#x2014;
The <em>SentencePiece</em> processor that is used for every conversion (string, tokens and IDs).`,name:"sp_model"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/camembert/tokenization_camembert.py#L45"}}),gs=new se({props:{name:"build_inputs_with_special_tokens",anchor:"transformers.CamembertTokenizer.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.CamembertTokenizer.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.CamembertTokenizer.build_inputs_with_special_tokens.token_ids_1",description:`<strong>token_ids_1</strong> (<code>List[int]</code>, <em>optional</em>) &#x2014;
Optional second list of IDs for sequence pairs.`,name:"token_ids_1"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/camembert/tokenization_camembert.py#L161",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>
`}}),bs=new se({props:{name:"get_special_tokens_mask",anchor:"transformers.CamembertTokenizer.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.CamembertTokenizer.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.CamembertTokenizer.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.CamembertTokenizer.get_special_tokens_mask.already_has_special_tokens",description:`<strong>already_has_special_tokens</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not the token list is already formatted with special tokens for the model.`,name:"already_has_special_tokens"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/camembert/tokenization_camembert.py#L187",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>
`}}),ys=new se({props:{name:"create_token_type_ids_from_sequences",anchor:"transformers.CamembertTokenizer.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.CamembertTokenizer.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.CamembertTokenizer.create_token_type_ids_from_sequences.token_ids_1",description:`<strong>token_ids_1</strong> (<code>List[int]</code>, <em>optional</em>) &#x2014;
Optional second list of IDs for sequence pairs.`,name:"token_ids_1"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/camembert/tokenization_camembert.py#L214",returnDescription:`
<p>List of zeros.</p>
`,returnType:`
<p><code>List[int]</code></p>
`}}),vs=new se({props:{name:"save_vocabulary",anchor:"transformers.CamembertTokenizer.save_vocabulary",parameters:[{name:"save_directory",val:": str"},{name:"filename_prefix",val:": typing.Optional[str] = None"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/camembert/tokenization_camembert.py#L298"}}),Ts=new Ge({}),ws=new se({props:{name:"class transformers.CamembertTokenizerFast",anchor:"transformers.CamembertTokenizerFast",parameters:[{name:"vocab_file",val:" = None"},{name:"tokenizer_file",val:" = None"},{name:"bos_token",val:" = '<s>'"},{name:"eos_token",val:" = '</s>'"},{name:"sep_token",val:" = '</s>'"},{name:"cls_token",val:" = '<s>'"},{name:"unk_token",val:" = '<unk>'"},{name:"pad_token",val:" = '<pad>'"},{name:"mask_token",val:" = '<mask>'"},{name:"additional_special_tokens",val:" = ['<s>NOTUSED', '</s>NOTUSED']"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.CamembertTokenizerFast.vocab_file",description:`<strong>vocab_file</strong> (<code>str</code>) &#x2014;
<a href="https://github.com/google/sentencepiece" rel="nofollow">SentencePiece</a> file (generally has a <em>.spm</em> extension) that
contains the vocabulary necessary to instantiate a tokenizer.`,name:"vocab_file"},{anchor:"transformers.CamembertTokenizerFast.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.CamembertTokenizerFast.eos_token",description:`<strong>eos_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;/s&gt;&quot;</code>) &#x2014;
The end of sequence 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 end of sequence.
The token used is the <code>sep_token</code>.</p>

					</div>`,name:"eos_token"},{anchor:"transformers.CamembertTokenizerFast.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.CamembertTokenizerFast.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.CamembertTokenizerFast.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.CamembertTokenizerFast.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.CamembertTokenizerFast.mask_token",description:`<strong>mask_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;mask&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.CamembertTokenizerFast.additional_special_tokens",description:`<strong>additional_special_tokens</strong> (<code>List[str]</code>, <em>optional</em>, defaults to <code>[&quot;&lt;s&gt;NOTUSED&quot;, &quot;&lt;/s&gt;NOTUSED&quot;]</code>) &#x2014;
Additional special tokens used by the tokenizer.`,name:"additional_special_tokens"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/camembert/tokenization_camembert_fast.py#L53"}}),Fs=new se({props:{name:"build_inputs_with_special_tokens",anchor:"transformers.CamembertTokenizerFast.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.CamembertTokenizerFast.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.CamembertTokenizerFast.build_inputs_with_special_tokens.token_ids_1",description:`<strong>token_ids_1</strong> (<code>List[int]</code>, <em>optional</em>) &#x2014;
Optional second list of IDs for sequence pairs.`,name:"token_ids_1"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/camembert/tokenization_camembert_fast.py#L145",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>
`}}),Ms=new se({props:{name:"create_token_type_ids_from_sequences",anchor:"transformers.CamembertTokenizerFast.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.CamembertTokenizerFast.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.CamembertTokenizerFast.create_token_type_ids_from_sequences.token_ids_1",description:`<strong>token_ids_1</strong> (<code>List[int]</code>, <em>optional</em>) &#x2014;
Optional second list of IDs for sequence pairs.`,name:"token_ids_1"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/camembert/tokenization_camembert_fast.py#L171",returnDescription:`
<p>List of zeros.</p>
`,returnType:`
<p><code>List[int]</code></p>
`}}),zs=new Ge({}),qs=new se({props:{name:"class transformers.CamembertModel",anchor:"transformers.CamembertModel",parameters:[{name:"config",val:""},{name:"add_pooling_layer",val:" = True"}],parametersDescription:[{anchor:"transformers.CamembertModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.29.0/en/model_doc/camembert#transformers.CamembertConfig">CamembertConfig</a>) &#x2014; Model configuration class with all the parameters of the
model. Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.29.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/camembert/modeling_camembert.py#L749"}}),Os=new se({props:{name:"forward",anchor:"transformers.CamembertModel.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"attention_mask",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:"head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.Tensor] = None"},{name:"encoder_hidden_states",val:": typing.Optional[torch.Tensor] = None"},{name:"encoder_attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"past_key_values",val:": typing.Optional[typing.List[torch.FloatTensor]] = None"},{name:"use_cache",val:": typing.Optional[bool] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.CamembertModel.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.29.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.CamembertModel.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.CamembertModel.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.CamembertModel.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.CamembertModel.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.CamembertModel.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.CamembertModel.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.CamembertModel.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.CamembertModel.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.29.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.CamembertModel.forward.encoder_hidden_states",description:`<strong>encoder_hidden_states</strong>  (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Sequence of hidden-states at the output of the last layer of the encoder. Used in the cross-attention if
the model is configured as a decoder.`,name:"encoder_hidden_states"},{anchor:"transformers.CamembertModel.forward.encoder_attention_mask",description:`<strong>encoder_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 the padding token indices of the encoder input. This mask is used in
the cross-attention if the model is configured as a decoder. 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>`,name:"encoder_attention_mask"},{anchor:"transformers.CamembertModel.forward.past_key_values",description:`<strong>past_key_values</strong> (<code>tuple(tuple(torch.FloatTensor))</code> of length <code>config.n_layers</code> with each tuple having 4 tensors of shape <code>(batch_size, num_heads, sequence_length - 1, embed_size_per_head)</code>) &#x2014;
Contains precomputed key and value hidden states of the attention blocks. Can be used to speed up decoding.</p>
<p>If <code>past_key_values</code> are used, the user can optionally input only the last <code>decoder_input_ids</code> (those that
don&#x2019;t have their past key value states given to this model) of shape <code>(batch_size, 1)</code> instead of all
<code>decoder_input_ids</code> of shape <code>(batch_size, sequence_length)</code>.`,name:"past_key_values"},{anchor:"transformers.CamembertModel.forward.use_cache",description:`<strong>use_cache</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
If set to <code>True</code>, <code>past_key_values</code> key value states are returned and can be used to speed up decoding (see
<code>past_key_values</code>).`,name:"use_cache"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/camembert/modeling_camembert.py#L795",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.29.0/en/main_classes/output#transformers.modeling_outputs.BaseModelOutputWithPoolingAndCrossAttentions"
>transformers.modeling_outputs.BaseModelOutputWithPoolingAndCrossAttentions</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.29.0/en/model_doc/camembert#transformers.CamembertConfig"
>CamembertConfig</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>pooler_output</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, hidden_size)</code>) \u2014 Last layer hidden-state of the first token of the sequence (classification token) after further processing
through the layers used for the auxiliary pretraining task. E.g. for BERT-family of models, this returns
the classification token after processing through a linear layer and a tanh activation function. The linear
layer weights are trained from the next sentence prediction (classification) objective during pretraining.</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
<li>
<p><strong>cross_attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> and <code>config.add_cross_attention=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights of the decoder\u2019s cross-attention layer, after the attention softmax, used to compute the
weighted average in the cross-attention heads.</p>
</li>
<li>
<p><strong>past_key_values</strong> (<code>tuple(tuple(torch.FloatTensor))</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) \u2014 Tuple of <code>tuple(torch.FloatTensor)</code> of length <code>config.n_layers</code>, with each tuple having 2 tensors of shape
<code>(batch_size, num_heads, sequence_length, embed_size_per_head)</code>) and optionally if
<code>config.is_encoder_decoder=True</code> 2 additional tensors of shape <code>(batch_size, num_heads, encoder_sequence_length, embed_size_per_head)</code>.</p>
<p>Contains pre-computed hidden-states (key and values in the self-attention blocks and optionally if
<code>config.is_encoder_decoder=True</code> in the cross-attention blocks) that can be used (see <code>past_key_values</code>
input) to speed up sequential decoding.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.29.0/en/main_classes/output#transformers.modeling_outputs.BaseModelOutputWithPoolingAndCrossAttentions"
>transformers.modeling_outputs.BaseModelOutputWithPoolingAndCrossAttentions</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Go=new Je({props:{$$slots:{default:[dT]},$$scope:{ctx:x}}}),Xo=new Xe({props:{anchor:"transformers.CamembertModel.forward.example",$$slots:{default:[cT]},$$scope:{ctx:x}}}),Ns=new Ge({}),Ds=new se({props:{name:"class transformers.CamembertForCausalLM",anchor:"transformers.CamembertForCausalLM",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.CamembertForCausalLM.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.29.0/en/model_doc/camembert#transformers.CamembertConfig">CamembertConfig</a>) &#x2014; Model configuration class with all the parameters of the
model. Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.29.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/camembert/modeling_camembert.py#L1432"}}),Bs=new se({props:{name:"forward",anchor:"transformers.CamembertForCausalLM.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"token_type_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"position_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"head_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"encoder_hidden_states",val:": typing.Optional[torch.FloatTensor] = None"},{name:"encoder_attention_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"labels",val:": typing.Optional[torch.LongTensor] = None"},{name:"past_key_values",val:": typing.Tuple[typing.Tuple[torch.FloatTensor]] = None"},{name:"use_cache",val:": typing.Optional[bool] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.CamembertForCausalLM.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.29.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.CamembertForCausalLM.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.CamembertForCausalLM.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.CamembertForCausalLM.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.CamembertForCausalLM.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.CamembertForCausalLM.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.CamembertForCausalLM.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.CamembertForCausalLM.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.CamembertForCausalLM.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.29.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.CamembertForCausalLM.forward.encoder_hidden_states",description:`<strong>encoder_hidden_states</strong>  (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Sequence of hidden-states at the output of the last layer of the encoder. Used in the cross-attention if
the model is configured as a decoder.`,name:"encoder_hidden_states"},{anchor:"transformers.CamembertForCausalLM.forward.encoder_attention_mask",description:`<strong>encoder_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 the padding token indices of the encoder input. This mask is used in
the cross-attention if the model is configured as a decoder. 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>`,name:"encoder_attention_mask"},{anchor:"transformers.CamembertForCausalLM.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 left-to-right language modeling loss (next word prediction). Indices should be in
<code>[-100, 0, ..., config.vocab_size]</code> (see <code>input_ids</code> docstring) Tokens with indices set to <code>-100</code> are
ignored (masked), the loss is only computed for the tokens with labels in <code>[0, ..., config.vocab_size]</code>`,name:"labels"},{anchor:"transformers.CamembertForCausalLM.forward.past_key_values",description:`<strong>past_key_values</strong> (<code>tuple(tuple(torch.FloatTensor))</code> of length <code>config.n_layers</code> with each tuple having 4 tensors of shape <code>(batch_size, num_heads, sequence_length - 1, embed_size_per_head)</code>) &#x2014;
Contains precomputed key and value hidden states of the attention blocks. Can be used to speed up decoding.</p>
<p>If <code>past_key_values</code> are used, the user can optionally input only the last <code>decoder_input_ids</code> (those that
don&#x2019;t have their past key value states given to this model) of shape <code>(batch_size, 1)</code> instead of all
<code>decoder_input_ids</code> of shape <code>(batch_size, sequence_length)</code>.`,name:"past_key_values"},{anchor:"transformers.CamembertForCausalLM.forward.use_cache",description:`<strong>use_cache</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
If set to <code>True</code>, <code>past_key_values</code> key value states are returned and can be used to speed up decoding (see
<code>past_key_values</code>).`,name:"use_cache"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/camembert/modeling_camembert.py#L1458",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.29.0/en/main_classes/output#transformers.modeling_outputs.CausalLMOutputWithCrossAttentions"
>transformers.modeling_outputs.CausalLMOutputWithCrossAttentions</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.29.0/en/model_doc/camembert#transformers.CamembertConfig"
>CamembertConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Language modeling loss (for next-token prediction).</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, config.vocab_size)</code>) \u2014 Prediction scores of the language modeling head (scores for each vocabulary token before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
<li>
<p><strong>cross_attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Cross attentions weights after the attention softmax, used to compute the weighted average in the
cross-attention heads.</p>
</li>
<li>
<p><strong>past_key_values</strong> (<code>tuple(tuple(torch.FloatTensor))</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> tuples of length <code>config.n_layers</code>, with each tuple containing the cached key,
value states of the self-attention and the cross-attention layers if model is used in encoder-decoder
setting. Only relevant if <code>config.is_decoder = True</code>.</p>
<p>Contains pre-computed hidden-states (key and values in the attention blocks) that can be used (see
<code>past_key_values</code> input) to speed up sequential decoding.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.29.0/en/main_classes/output#transformers.modeling_outputs.CausalLMOutputWithCrossAttentions"
>transformers.modeling_outputs.CausalLMOutputWithCrossAttentions</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Zo=new Je({props:{$$slots:{default:[mT]},$$scope:{ctx:x}}}),en=new Xe({props:{anchor:"transformers.CamembertForCausalLM.forward.example",$$slots:{default:[pT]},$$scope:{ctx:x}}}),Us=new Ge({}),Ks=new se({props:{name:"class transformers.CamembertForMaskedLM",anchor:"transformers.CamembertForMaskedLM",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.CamembertForMaskedLM.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.29.0/en/model_doc/camembert#transformers.CamembertConfig">CamembertConfig</a>) &#x2014; Model configuration class with all the parameters of the
model. Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.29.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/camembert/modeling_camembert.py#L937"}}),Gs=new se({props:{name:"forward",anchor:"transformers.CamembertForMaskedLM.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"token_type_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"position_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"head_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"encoder_hidden_states",val:": typing.Optional[torch.FloatTensor] = None"},{name:"encoder_attention_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"labels",val:": typing.Optional[torch.LongTensor] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.CamembertForMaskedLM.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.29.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.CamembertForMaskedLM.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.CamembertForMaskedLM.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.CamembertForMaskedLM.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.CamembertForMaskedLM.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.CamembertForMaskedLM.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.CamembertForMaskedLM.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.CamembertForMaskedLM.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.CamembertForMaskedLM.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.29.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.CamembertForMaskedLM.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 masked language modeling loss. Indices should be in <code>[-100, 0, ..., config.vocab_size]</code> (see <code>input_ids</code> docstring) Tokens with indices set to <code>-100</code> are ignored (masked), the
loss is only computed for the tokens with labels in <code>[0, ..., config.vocab_size]</code>`,name:"labels"},{anchor:"transformers.CamembertForMaskedLM.forward.kwargs",description:`<strong>kwargs</strong> (<code>Dict[str, any]</code>, optional, defaults to <em>{}</em>) &#x2014;
Used to hide legacy arguments that have been deprecated.`,name:"kwargs"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/camembert/modeling_camembert.py#L966",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.29.0/en/main_classes/output#transformers.modeling_outputs.MaskedLMOutput"
>transformers.modeling_outputs.MaskedLMOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.29.0/en/model_doc/camembert#transformers.CamembertConfig"
>CamembertConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Masked language modeling (MLM) loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, config.vocab_size)</code>) \u2014 Prediction scores of the language modeling head (scores for each vocabulary token before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.29.0/en/main_classes/output#transformers.modeling_outputs.MaskedLMOutput"
>transformers.modeling_outputs.MaskedLMOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),on=new Je({props:{$$slots:{default:[hT]},$$scope:{ctx:x}}}),nn=new Xe({props:{anchor:"transformers.CamembertForMaskedLM.forward.example",$$slots:{default:[uT]},$$scope:{ctx:x}}}),Xs=new Ge({}),Ys=new se({props:{name:"class transformers.CamembertForSequenceClassification",anchor:"transformers.CamembertForSequenceClassification",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.CamembertForSequenceClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.29.0/en/model_doc/camembert#transformers.CamembertConfig">CamembertConfig</a>) &#x2014; Model configuration class with all the parameters of the
model. Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.29.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/camembert/modeling_camembert.py#L1043"}}),oa=new se({props:{name:"forward",anchor:"transformers.CamembertForSequenceClassification.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"token_type_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"position_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"head_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"labels",val:": typing.Optional[torch.LongTensor] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.CamembertForSequenceClassification.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.29.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.CamembertForSequenceClassification.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.CamembertForSequenceClassification.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.CamembertForSequenceClassification.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.CamembertForSequenceClassification.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.CamembertForSequenceClassification.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.CamembertForSequenceClassification.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.CamembertForSequenceClassification.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.CamembertForSequenceClassification.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.29.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.CamembertForSequenceClassification.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for computing the sequence classification/regression loss. Indices should be in <code>[0, ..., config.num_labels - 1]</code>. If <code>config.num_labels == 1</code> a regression loss is computed (Mean-Square loss), If
<code>config.num_labels &gt; 1</code> a classification loss is computed (Cross-Entropy).`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/camembert/modeling_camembert.py#L1057",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.29.0/en/main_classes/output#transformers.modeling_outputs.SequenceClassifierOutput"
>transformers.modeling_outputs.SequenceClassifierOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.29.0/en/model_doc/camembert#transformers.CamembertConfig"
>CamembertConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Classification (or regression if config.num_labels==1) loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, config.num_labels)</code>) \u2014 Classification (or regression if config.num_labels==1) scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.29.0/en/main_classes/output#transformers.modeling_outputs.SequenceClassifierOutput"
>transformers.modeling_outputs.SequenceClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),an=new Je({props:{$$slots:{default:[fT]},$$scope:{ctx:x}}}),rn=new Xe({props:{anchor:"transformers.CamembertForSequenceClassification.forward.example",$$slots:{default:[gT]},$$scope:{ctx:x}}}),ln=new Xe({props:{anchor:"transformers.CamembertForSequenceClassification.forward.example-2",$$slots:{default:[_T]},$$scope:{ctx:x}}}),na=new Ge({}),sa=new se({props:{name:"class transformers.CamembertForMultipleChoice",anchor:"transformers.CamembertForMultipleChoice",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.CamembertForMultipleChoice.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.29.0/en/model_doc/camembert#transformers.CamembertConfig">CamembertConfig</a>) &#x2014; Model configuration class with all the parameters of the
model. Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.29.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/camembert/modeling_camembert.py#L1145"}}),la=new se({props:{name:"forward",anchor:"transformers.CamembertForMultipleChoice.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"token_type_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"labels",val:": typing.Optional[torch.LongTensor] = None"},{name:"position_ids",val:": typing.Optional[torch.LongTensor] = 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.CamembertForMultipleChoice.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, num_choices, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.29.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.CamembertForMultipleChoice.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_choices, 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.CamembertForMultipleChoice.forward.token_type_ids",description:`<strong>token_type_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, num_choices, 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.CamembertForMultipleChoice.forward.position_ids",description:`<strong>position_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, num_choices, 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.CamembertForMultipleChoice.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.CamembertForMultipleChoice.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_choices, 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.CamembertForMultipleChoice.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.CamembertForMultipleChoice.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.CamembertForMultipleChoice.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.29.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.CamembertForMultipleChoice.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for computing the multiple choice classification loss. Indices should be in <code>[0, ..., num_choices-1]</code> where <code>num_choices</code> is the size of the second dimension of the input tensors. (See
<code>input_ids</code> above)`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/camembert/modeling_camembert.py#L1158",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.29.0/en/main_classes/output#transformers.modeling_outputs.MultipleChoiceModelOutput"
>transformers.modeling_outputs.MultipleChoiceModelOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.29.0/en/model_doc/camembert#transformers.CamembertConfig"
>CamembertConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <em>(1,)</em>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Classification loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_choices)</code>) \u2014 <em>num_choices</em> is the second dimension of the input tensors. (see <em>input_ids</em> above).</p>
<p>Classification scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.29.0/en/main_classes/output#transformers.modeling_outputs.MultipleChoiceModelOutput"
>transformers.modeling_outputs.MultipleChoiceModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),cn=new Je({props:{$$slots:{default:[bT]},$$scope:{ctx:x}}}),mn=new Xe({props:{anchor:"transformers.CamembertForMultipleChoice.forward.example",$$slots:{default:[kT]},$$scope:{ctx:x}}}),da=new Ge({}),ca=new se({props:{name:"class transformers.CamembertForTokenClassification",anchor:"transformers.CamembertForTokenClassification",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.CamembertForTokenClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.29.0/en/model_doc/camembert#transformers.CamembertConfig">CamembertConfig</a>) &#x2014; Model configuration class with all the parameters of the
model. Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.29.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/camembert/modeling_camembert.py#L1242"}}),ua=new se({props:{name:"forward",anchor:"transformers.CamembertForTokenClassification.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"token_type_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"position_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"head_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"labels",val:": typing.Optional[torch.LongTensor] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.CamembertForTokenClassification.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.29.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.CamembertForTokenClassification.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.CamembertForTokenClassification.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.CamembertForTokenClassification.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.CamembertForTokenClassification.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.CamembertForTokenClassification.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.CamembertForTokenClassification.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.CamembertForTokenClassification.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.CamembertForTokenClassification.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.29.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.CamembertForTokenClassification.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Labels for computing the token classification loss. Indices should be in <code>[0, ..., config.num_labels - 1]</code>.`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/camembert/modeling_camembert.py#L1260",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.29.0/en/main_classes/output#transformers.modeling_outputs.TokenClassifierOutput"
>transformers.modeling_outputs.TokenClassifierOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.29.0/en/model_doc/camembert#transformers.CamembertConfig"
>CamembertConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided)  \u2014 Classification loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, config.num_labels)</code>) \u2014 Classification scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.29.0/en/main_classes/output#transformers.modeling_outputs.TokenClassifierOutput"
>transformers.modeling_outputs.TokenClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),hn=new Je({props:{$$slots:{default:[yT]},$$scope:{ctx:x}}}),un=new Xe({props:{anchor:"transformers.CamembertForTokenClassification.forward.example",$$slots:{default:[vT]},$$scope:{ctx:x}}}),fa=new Ge({}),ga=new se({props:{name:"class transformers.CamembertForQuestionAnswering",anchor:"transformers.CamembertForQuestionAnswering",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.CamembertForQuestionAnswering.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.29.0/en/model_doc/camembert#transformers.CamembertConfig">CamembertConfig</a>) &#x2014; Model configuration class with all the parameters of the
model. Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.29.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/camembert/modeling_camembert.py#L1331"}}),ya=new se({props:{name:"forward",anchor:"transformers.CamembertForQuestionAnswering.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"token_type_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"position_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"head_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"start_positions",val:": typing.Optional[torch.LongTensor] = None"},{name:"end_positions",val:": typing.Optional[torch.LongTensor] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.CamembertForQuestionAnswering.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.29.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.CamembertForQuestionAnswering.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.CamembertForQuestionAnswering.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.CamembertForQuestionAnswering.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.CamembertForQuestionAnswering.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.CamembertForQuestionAnswering.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.CamembertForQuestionAnswering.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.CamembertForQuestionAnswering.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.CamembertForQuestionAnswering.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.29.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.CamembertForQuestionAnswering.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.CamembertForQuestionAnswering.forward.end_positions",description:`<strong>end_positions</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for position (index) of the end of the labelled span for computing the token classification loss.
Positions are clamped to the length of the sequence (<code>sequence_length</code>). Position outside of the sequence
are not taken into account for computing the loss.`,name:"end_positions"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/camembert/modeling_camembert.py#L1345",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.29.0/en/main_classes/output#transformers.modeling_outputs.QuestionAnsweringModelOutput"
>transformers.modeling_outputs.QuestionAnsweringModelOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.29.0/en/model_doc/camembert#transformers.CamembertConfig"
>CamembertConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Total span extraction loss is the sum of a Cross-Entropy for the start and end positions.</p>
</li>
<li>
<p><strong>start_logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>) \u2014 Span-start scores (before SoftMax).</p>
</li>
<li>
<p><strong>end_logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>) \u2014 Span-end scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.29.0/en/main_classes/output#transformers.modeling_outputs.QuestionAnsweringModelOutput"
>transformers.modeling_outputs.QuestionAnsweringModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),_n=new Je({props:{$$slots:{default:[TT]},$$scope:{ctx:x}}}),bn=new Xe({props:{anchor:"transformers.CamembertForQuestionAnswering.forward.example",$$slots:{default:[wT]},$$scope:{ctx:x}}}),va=new Ge({}),Ta=new se({props:{name:"class transformers.TFCamembertModel",anchor:"transformers.TFCamembertModel",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFCamembertModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.29.0/en/model_doc/camembert#transformers.CamembertConfig">CamembertConfig</a>) &#x2014; Model configuration class with all the parameters of the
model. Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.29.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/camembert/modeling_tf_camembert.py#L920"}}),yn=new Je({props:{$$slots:{default:[CT]},$$scope:{ctx:x}}}),Fa=new se({props:{name:"call",anchor:"transformers.TFCamembertModel.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:"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:"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:"encoder_hidden_states",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"encoder_attention_mask",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"past_key_values",val:": typing.Union[typing.Tuple[typing.Tuple[typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor]]], NoneType] = None"},{name:"use_cache",val:": typing.Optional[bool] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"},{name:"training",val:": typing.Optional[bool] = False"}],parametersDescription:[{anchor:"transformers.TFCamembertModel.call.input_ids",description:`<strong>input_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.29.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.TFCamembertModel.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>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.TFCamembertModel.call.token_type_ids",description:`<strong>token_type_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</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.TFCamembertModel.call.position_ids",description:`<strong>position_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</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.TFCamembertModel.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>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.TFCamembertModel.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.TFCamembertModel.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.TFCamembertModel.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.TFCamembertModel.call.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.29.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.TFCamembertModel.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.TFCamembertModel.call.encoder_hidden_states",description:`<strong>encoder_hidden_states</strong>  (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Sequence of hidden-states at the output of the last layer of the encoder. Used in the cross-attention if
the model is configured as a decoder.`,name:"encoder_hidden_states"},{anchor:"transformers.TFCamembertModel.call.encoder_attention_mask",description:`<strong>encoder_attention_mask</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on the padding token indices of the encoder input. This mask is used in
the cross-attention if the model is configured as a decoder. 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>`,name:"encoder_attention_mask"},{anchor:"transformers.TFCamembertModel.call.past_key_values",description:`<strong>past_key_values</strong> (<code>Tuple[Tuple[tf.Tensor]]</code> of length <code>config.n_layers</code>) &#x2014;
contains precomputed key and value hidden states of the attention blocks. Can be used to speed up decoding.
If <code>past_key_values</code> are used, the user can optionally input only the last <code>decoder_input_ids</code> (those that
don&#x2019;t have their past key value states given to this model) of shape <code>(batch_size, 1)</code> instead of all
<code>decoder_input_ids</code> of shape <code>(batch_size, sequence_length)</code>.`,name:"past_key_values"},{anchor:"transformers.TFCamembertModel.call.use_cache",description:`<strong>use_cache</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
If set to <code>True</code>, <code>past_key_values</code> key value states are returned and can be used to speed up decoding (see
<code>past_key_values</code>). Set to <code>False</code> during training, <code>True</code> during generation`,name:"use_cache"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/camembert/modeling_tf_camembert.py#L925",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.29.0/en/main_classes/output#transformers.modeling_tf_outputs.TFBaseModelOutputWithPoolingAndCrossAttentions"
>transformers.modeling_tf_outputs.TFBaseModelOutputWithPoolingAndCrossAttentions</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/v4.29.0/en/model_doc/camembert#transformers.CamembertConfig"
>CamembertConfig</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>pooler_output</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, hidden_size)</code>) \u2014 Last layer hidden-state of the first token of the sequence (classification token) further processed by a
Linear layer and a Tanh activation function. The Linear layer weights are trained from the next sentence
prediction (classification) objective during pretraining.</p>
<p>This output is usually <em>not</em> a good summary of the semantic content of the input, you\u2019re often better with
averaging or pooling the sequence of hidden-states for the whole input sequence.</p>
</li>
<li>
<p><strong>past_key_values</strong> (<code>List[tf.Tensor]</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) \u2014 List of <code>tf.Tensor</code> of length <code>config.n_layers</code>, with each tensor of shape <code>(2, batch_size, num_heads, sequence_length, embed_size_per_head)</code>).</p>
<p>Contains pre-computed hidden-states (key and values in the attention blocks) that can be used (see
<code>past_key_values</code> input) to speed up sequential decoding.</p>
</li>
<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>
<li>
<p><strong>cross_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 of the decoder\u2019s cross-attention layer, after the attention softmax, used to compute the
weighted average in the cross-attention heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.29.0/en/main_classes/output#transformers.modeling_tf_outputs.TFBaseModelOutputWithPoolingAndCrossAttentions"
>transformers.modeling_tf_outputs.TFBaseModelOutputWithPoolingAndCrossAttentions</a> or <code>tuple(tf.Tensor)</code></p>
`}}),vn=new Je({props:{$$slots:{default:[$T]},$$scope:{ctx:x}}}),Tn=new Xe({props:{anchor:"transformers.TFCamembertModel.call.example",$$slots:{default:[FT]},$$scope:{ctx:x}}}),Ea=new Ge({}),Ma=new se({props:{name:"class transformers.TFCamembertForCausalLM",anchor:"transformers.TFCamembertForCausalLM",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFCamembertForCausalLM.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.29.0/en/model_doc/camembert#transformers.CamembertConfig">CamembertConfig</a>) &#x2014; Model configuration class with all the parameters of the
model. Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.29.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/camembert/modeling_tf_camembert.py#L1585"}}),Cn=new Je({props:{$$slots:{default:[ET]},$$scope:{ctx:x}}}),Aa=new se({props:{name:"call",anchor:"transformers.TFCamembertForCausalLM.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:"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:"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:"encoder_hidden_states",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"encoder_attention_mask",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"past_key_values",val:": typing.Union[typing.Tuple[typing.Tuple[typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor]]], NoneType] = None"},{name:"use_cache",val:": typing.Optional[bool] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"},{name:"labels",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"training",val:": typing.Optional[bool] = False"}],parametersDescription:[{anchor:"transformers.TFCamembertForCausalLM.call.input_ids",description:`<strong>input_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.29.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.TFCamembertForCausalLM.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>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.TFCamembertForCausalLM.call.token_type_ids",description:`<strong>token_type_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</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.TFCamembertForCausalLM.call.position_ids",description:`<strong>position_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</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.TFCamembertForCausalLM.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>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.TFCamembertForCausalLM.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.TFCamembertForCausalLM.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.TFCamembertForCausalLM.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.TFCamembertForCausalLM.call.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.29.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.TFCamembertForCausalLM.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.TFCamembertForCausalLM.call.encoder_hidden_states",description:`<strong>encoder_hidden_states</strong>  (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Sequence of hidden-states at the output of the last layer of the encoder. Used in the cross-attention if
the model is configured as a decoder.`,name:"encoder_hidden_states"},{anchor:"transformers.TFCamembertForCausalLM.call.encoder_attention_mask",description:`<strong>encoder_attention_mask</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on the padding token indices of the encoder input. This mask is used in
the cross-attention if the model is configured as a decoder. 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>`,name:"encoder_attention_mask"},{anchor:"transformers.TFCamembertForCausalLM.call.past_key_values",description:`<strong>past_key_values</strong> (<code>Tuple[Tuple[tf.Tensor]]</code> of length <code>config.n_layers</code>) &#x2014;
contains precomputed key and value hidden states of the attention blocks. Can be used to speed up decoding.
If <code>past_key_values</code> are used, the user can optionally input only the last <code>decoder_input_ids</code> (those that
don&#x2019;t have their past key value states given to this model) of shape <code>(batch_size, 1)</code> instead of all
<code>decoder_input_ids</code> of shape <code>(batch_size, sequence_length)</code>.`,name:"past_key_values"},{anchor:"transformers.TFCamembertForCausalLM.call.use_cache",description:`<strong>use_cache</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
If set to <code>True</code>, <code>past_key_values</code> key value states are returned and can be used to speed up decoding (see
<code>past_key_values</code>). Set to <code>False</code> during training, <code>True</code> during generation`,name:"use_cache"},{anchor:"transformers.TFCamembertForCausalLM.call.labels",description:`<strong>labels</strong> (<code>tf.Tensor</code> or <code>np.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Labels for computing the cross entropy classification loss. Indices should be in <code>[0, ..., config.vocab_size - 1]</code>.`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/camembert/modeling_tf_camembert.py#L1618",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.29.0/en/main_classes/output#transformers.modeling_tf_outputs.TFCausalLMOutputWithCrossAttentions"
>transformers.modeling_tf_outputs.TFCausalLMOutputWithCrossAttentions</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/v4.29.0/en/model_doc/camembert#transformers.CamembertConfig"
>CamembertConfig</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 non-masked labels, returned when <code>labels</code> is provided) \u2014 Language modeling loss (for next-token prediction).</p>
</li>
<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>
<li>
<p><strong>cross_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 of the decoder\u2019s cross-attention layer, after the attention softmax, used to compute the
weighted average in the cross-attention heads.</p>
</li>
<li>
<p><strong>past_key_values</strong> (<code>List[tf.Tensor]</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) \u2014 List of <code>tf.Tensor</code> of length <code>config.n_layers</code>, with each tensor of shape <code>(2, batch_size, num_heads, sequence_length, embed_size_per_head)</code>).</p>
<p>Contains pre-computed hidden-states (key and values in the attention blocks) that can be used (see
<code>past_key_values</code> input) to speed up sequential decoding.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.29.0/en/main_classes/output#transformers.modeling_tf_outputs.TFCausalLMOutputWithCrossAttentions"
>transformers.modeling_tf_outputs.TFCausalLMOutputWithCrossAttentions</a> or <code>tuple(tf.Tensor)</code></p>
`}}),$n=new Je({props:{$$slots:{default:[MT]},$$scope:{ctx:x}}}),Fn=new Xe({props:{anchor:"transformers.TFCamembertForCausalLM.call.example",$$slots:{default:[zT]},$$scope:{ctx:x}}}),Pa=new Ge({}),La=new se({props:{name:"class transformers.TFCamembertForMaskedLM",anchor:"transformers.TFCamembertForMaskedLM",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFCamembertForMaskedLM.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.29.0/en/model_doc/camembert#transformers.CamembertConfig">CamembertConfig</a>) &#x2014; Model configuration class with all the parameters of the
model. Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.29.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/camembert/modeling_tf_camembert.py#L1068"}}),Mn=new Je({props:{$$slots:{default:[qT]},$$scope:{ctx:x}}}),Sa=new se({props:{name:"call",anchor:"transformers.TFCamembertForMaskedLM.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:"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:"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:": typing.Optional[bool] = False"}],parametersDescription:[{anchor:"transformers.TFCamembertForMaskedLM.call.input_ids",description:`<strong>input_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.29.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.TFCamembertForMaskedLM.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>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.TFCamembertForMaskedLM.call.token_type_ids",description:`<strong>token_type_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</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.TFCamembertForMaskedLM.call.position_ids",description:`<strong>position_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</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.TFCamembertForMaskedLM.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>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.TFCamembertForMaskedLM.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.TFCamembertForMaskedLM.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.TFCamembertForMaskedLM.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.TFCamembertForMaskedLM.call.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.29.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.TFCamembertForMaskedLM.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.TFCamembertForMaskedLM.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 masked language modeling loss. Indices should be in <code>[-100, 0, ..., config.vocab_size]</code> (see <code>input_ids</code> docstring) Tokens with indices set to <code>-100</code> are ignored (masked), the
loss is only computed for the tokens with labels in <code>[0, ..., config.vocab_size]</code>`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/camembert/modeling_tf_camembert.py#L1085",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.29.0/en/main_classes/output#transformers.modeling_tf_outputs.TFMaskedLMOutput"
>transformers.modeling_tf_outputs.TFMaskedLMOutput</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/v4.29.0/en/model_doc/camembert#transformers.CamembertConfig"
>CamembertConfig</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 non-masked labels, returned when <code>labels</code> is provided) \u2014 Masked language modeling (MLM) loss.</p>
</li>
<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><a
  href="/docs/transformers/v4.29.0/en/main_classes/output#transformers.modeling_tf_outputs.TFMaskedLMOutput"
>transformers.modeling_tf_outputs.TFMaskedLMOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),zn=new Je({props:{$$slots:{default:[xT]},$$scope:{ctx:x}}}),qn=new Xe({props:{anchor:"transformers.TFCamembertForMaskedLM.call.example",$$slots:{default:[jT]},$$scope:{ctx:x}}}),xn=new Xe({props:{anchor:"transformers.TFCamembertForMaskedLM.call.example-2",$$slots:{default:[AT]},$$scope:{ctx:x}}}),Wa=new Ge({}),Ra=new se({props:{name:"class transformers.TFCamembertForSequenceClassification",anchor:"transformers.TFCamembertForSequenceClassification",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFCamembertForSequenceClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.29.0/en/model_doc/camembert#transformers.CamembertConfig">CamembertConfig</a>) &#x2014; Model configuration class with all the parameters of the
model. Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.29.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/camembert/modeling_tf_camembert.py#L1189"}}),An=new Je({props:{$$slots:{default:[PT]},$$scope:{ctx:x}}}),Ha=new se({props:{name:"call",anchor:"transformers.TFCamembertForSequenceClassification.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:"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:"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:": typing.Optional[bool] = False"}],parametersDescription:[{anchor:"transformers.TFCamembertForSequenceClassification.call.input_ids",description:`<strong>input_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.29.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.TFCamembertForSequenceClassification.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>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.TFCamembertForSequenceClassification.call.token_type_ids",description:`<strong>token_type_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</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.TFCamembertForSequenceClassification.call.position_ids",description:`<strong>position_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</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.TFCamembertForSequenceClassification.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>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.TFCamembertForSequenceClassification.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.TFCamembertForSequenceClassification.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.TFCamembertForSequenceClassification.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.TFCamembertForSequenceClassification.call.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.29.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.TFCamembertForSequenceClassification.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.TFCamembertForSequenceClassification.call.labels",description:`<strong>labels</strong> (<code>tf.Tensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for computing the sequence classification/regression loss. Indices should be in <code>[0, ..., config.num_labels - 1]</code>. If <code>config.num_labels == 1</code> a regression loss is computed (Mean-Square loss), If
<code>config.num_labels &gt; 1</code> a classification loss is computed (Cross-Entropy).`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/camembert/modeling_tf_camembert.py#L1200",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.29.0/en/main_classes/output#transformers.modeling_tf_outputs.TFSequenceClassifierOutput"
>transformers.modeling_tf_outputs.TFSequenceClassifierOutput</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/v4.29.0/en/model_doc/camembert#transformers.CamembertConfig"
>CamembertConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, )</code>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Classification (or regression if config.num_labels==1) loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, config.num_labels)</code>) \u2014 Classification (or regression if config.num_labels==1) scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.29.0/en/main_classes/output#transformers.modeling_tf_outputs.TFSequenceClassifierOutput"
>transformers.modeling_tf_outputs.TFSequenceClassifierOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),Pn=new Je({props:{$$slots:{default:[LT]},$$scope:{ctx:x}}}),Ln=new Xe({props:{anchor:"transformers.TFCamembertForSequenceClassification.call.example",$$slots:{default:[OT]},$$scope:{ctx:x}}}),On=new Xe({props:{anchor:"transformers.TFCamembertForSequenceClassification.call.example-2",$$slots:{default:[NT]},$$scope:{ctx:x}}}),Qa=new Ge({}),Va=new se({props:{name:"class transformers.TFCamembertForMultipleChoice",anchor:"transformers.TFCamembertForMultipleChoice",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFCamembertForMultipleChoice.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.29.0/en/model_doc/camembert#transformers.CamembertConfig">CamembertConfig</a>) &#x2014; Model configuration class with all the parameters of the
model. Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.29.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/camembert/modeling_tf_camembert.py#L1364"}}),Dn=new Je({props:{$$slots:{default:[DT]},$$scope:{ctx:x}}}),Ya=new se({props:{name:"call",anchor:"transformers.TFCamembertForMultipleChoice.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:"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:"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:": typing.Optional[bool] = False"}],parametersDescription:[{anchor:"transformers.TFCamembertForMultipleChoice.call.input_ids",description:`<strong>input_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, num_choices, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.29.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.TFCamembertForMultipleChoice.call.attention_mask",description:`<strong>attention_mask</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, num_choices, 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.TFCamembertForMultipleChoice.call.token_type_ids",description:`<strong>token_type_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, num_choices, 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.TFCamembertForMultipleChoice.call.position_ids",description:`<strong>position_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, num_choices, 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.TFCamembertForMultipleChoice.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>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.TFCamembertForMultipleChoice.call.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, num_choices, 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.TFCamembertForMultipleChoice.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.TFCamembertForMultipleChoice.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.TFCamembertForMultipleChoice.call.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.29.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.TFCamembertForMultipleChoice.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.TFCamembertForMultipleChoice.call.labels",description:`<strong>labels</strong> (<code>tf.Tensor</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]</code>
where <code>num_choices</code> is the size of the second dimension of the input tensors. (See <code>input_ids</code> above)`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/camembert/modeling_tf_camembert.py#L1388",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.29.0/en/main_classes/output#transformers.modeling_tf_outputs.TFMultipleChoiceModelOutput"
>transformers.modeling_tf_outputs.TFMultipleChoiceModelOutput</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/v4.29.0/en/model_doc/camembert#transformers.CamembertConfig"
>CamembertConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>tf.Tensor</code> of shape <em>(batch_size, )</em>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Classification loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, num_choices)</code>) \u2014 <em>num_choices</em> is the second dimension of the input tensors. (see <em>input_ids</em> above).</p>
<p>Classification scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.29.0/en/main_classes/output#transformers.modeling_tf_outputs.TFMultipleChoiceModelOutput"
>transformers.modeling_tf_outputs.TFMultipleChoiceModelOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),In=new Je({props:{$$slots:{default:[IT]},$$scope:{ctx:x}}}),Sn=new Xe({props:{anchor:"transformers.TFCamembertForMultipleChoice.call.example",$$slots:{default:[ST]},$$scope:{ctx:x}}}),Za=new Ge({}),er=new se({props:{name:"class transformers.TFCamembertForTokenClassification",anchor:"transformers.TFCamembertForTokenClassification",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFCamembertForTokenClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.29.0/en/model_doc/camembert#transformers.CamembertConfig">CamembertConfig</a>) &#x2014; Model configuration class with all the parameters of the
model. Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.29.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/camembert/modeling_tf_camembert.py#L1273"}}),Rn=new Je({props:{$$slots:{default:[WT]},$$scope:{ctx:x}}}),sr=new se({props:{name:"call",anchor:"transformers.TFCamembertForTokenClassification.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:"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:"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:": typing.Optional[bool] = False"}],parametersDescription:[{anchor:"transformers.TFCamembertForTokenClassification.call.input_ids",description:`<strong>input_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.29.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.TFCamembertForTokenClassification.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>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.TFCamembertForTokenClassification.call.token_type_ids",description:`<strong>token_type_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</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.TFCamembertForTokenClassification.call.position_ids",description:`<strong>position_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</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.TFCamembertForTokenClassification.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>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.TFCamembertForTokenClassification.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.TFCamembertForTokenClassification.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.TFCamembertForTokenClassification.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.TFCamembertForTokenClassification.call.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.29.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.TFCamembertForTokenClassification.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.TFCamembertForTokenClassification.call.labels",description:`<strong>labels</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Labels for computing the token classification loss. Indices should be in <code>[0, ..., config.num_labels - 1]</code>.`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/camembert/modeling_tf_camembert.py#L1291",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.29.0/en/main_classes/output#transformers.modeling_tf_outputs.TFTokenClassifierOutput"
>transformers.modeling_tf_outputs.TFTokenClassifierOutput</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/v4.29.0/en/model_doc/camembert#transformers.CamembertConfig"
>CamembertConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>tf.Tensor</code> of shape <code>(n,)</code>, <em>optional</em>, where n is the number of unmasked labels, returned when <code>labels</code> is provided)  \u2014 Classification loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, config.num_labels)</code>) \u2014 Classification scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.29.0/en/main_classes/output#transformers.modeling_tf_outputs.TFTokenClassifierOutput"
>transformers.modeling_tf_outputs.TFTokenClassifierOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),Bn=new Je({props:{$$slots:{default:[RT]},$$scope:{ctx:x}}}),Un=new Xe({props:{anchor:"transformers.TFCamembertForTokenClassification.call.example",$$slots:{default:[BT]},$$scope:{ctx:x}}}),Kn=new Xe({props:{anchor:"transformers.TFCamembertForTokenClassification.call.example-2",$$slots:{default:[UT]},$$scope:{ctx:x}}}),ar=new Ge({}),rr=new se({props:{name:"class transformers.TFCamembertForQuestionAnswering",anchor:"transformers.TFCamembertForQuestionAnswering",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFCamembertForQuestionAnswering.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.29.0/en/model_doc/camembert#transformers.CamembertConfig">CamembertConfig</a>) &#x2014; Model configuration class with all the parameters of the
model. Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.29.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/camembert/modeling_tf_camembert.py#L1487"}}),Qn=new Je({props:{$$slots:{default:[KT]},$$scope:{ctx:x}}}),cr=new se({props:{name:"call",anchor:"transformers.TFCamembertForQuestionAnswering.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:"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:"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:": typing.Optional[bool] = False"}],parametersDescription:[{anchor:"transformers.TFCamembertForQuestionAnswering.call.input_ids",description:`<strong>input_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.29.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.TFCamembertForQuestionAnswering.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>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.TFCamembertForQuestionAnswering.call.token_type_ids",description:`<strong>token_type_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</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.TFCamembertForQuestionAnswering.call.position_ids",description:`<strong>position_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</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.TFCamembertForQuestionAnswering.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>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.TFCamembertForQuestionAnswering.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.TFCamembertForQuestionAnswering.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.TFCamembertForQuestionAnswering.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.TFCamembertForQuestionAnswering.call.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.29.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.TFCamembertForQuestionAnswering.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.TFCamembertForQuestionAnswering.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.TFCamembertForQuestionAnswering.call.end_positions",description:`<strong>end_positions</strong> (<code>tf.Tensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for position (index) of the end of the labelled span for computing the token classification loss.
Positions are clamped to the length of the sequence (<code>sequence_length</code>). Position outside of the sequence
are not taken into account for computing the loss.`,name:"end_positions"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/camembert/modeling_tf_camembert.py#L1500",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.29.0/en/main_classes/output#transformers.modeling_tf_outputs.TFQuestionAnsweringModelOutput"
>transformers.modeling_tf_outputs.TFQuestionAnsweringModelOutput</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/v4.29.0/en/model_doc/camembert#transformers.CamembertConfig"
>CamembertConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, )</code>, <em>optional</em>, returned when <code>start_positions</code> and <code>end_positions</code> are provided) \u2014 Total span extraction loss is the sum of a Cross-Entropy for the start and end positions.</p>
</li>
<li>
<p><strong>start_logits</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>) \u2014 Span-start scores (before SoftMax).</p>
</li>
<li>
<p><strong>end_logits</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>) \u2014 Span-end scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.29.0/en/main_classes/output#transformers.modeling_tf_outputs.TFQuestionAnsweringModelOutput"
>transformers.modeling_tf_outputs.TFQuestionAnsweringModelOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),Vn=new Je({props:{$$slots:{default:[HT]},$$scope:{ctx:x}}}),Jn=new Xe({props:{anchor:"transformers.TFCamembertForQuestionAnswering.call.example",$$slots:{default:[QT]},$$scope:{ctx:x}}}),Gn=new Xe({props:{anchor:"transformers.TFCamembertForQuestionAnswering.call.example-2",$$slots:{default:[VT]},$$scope:{ctx:x}}}),{c(){d=s("meta"),k=m(),h=s("h1"),u=s("a"),y=s("span"),T(l.$$.fragment),c=m(),q=s("span"),ke=o("CamemBERT"),pe=m(),I=s("h2"),ae=s("a"),Y=s("span"),T(v.$$.fragment),ye=m(),H=s("span"),ve=o("Overview"),he=m(),W=s("p"),Te=o("The CamemBERT model was proposed in "),ie=s("a"),V=o("CamemBERT: a Tasty French Language Model"),we=o(` by
Louis Martin, Benjamin Muller, Pedro Javier Ortiz Su\xE1rez, Yoann Dupont, Laurent Romary, \xC9ric Villemonte de la
Clergerie, Djam\xE9 Seddah, and Beno\xEEt Sagot. It is based on Facebook\u2019s RoBERTa model released in 2019. It is a model
trained on 138GB of French text.`),ue=m(),R=s("p"),Ce=o("The abstract from the paper is the following:"),fe=m(),B=s("p"),me=s("em"),$e=o(`Pretrained language models are now ubiquitous in Natural Language Processing. Despite their success, most available
models have either been trained on English data or on the concatenation of data in multiple languages. This makes
practical use of such models \u2014in all languages except English\u2014 very limited. Aiming to address this issue for French,
we release CamemBERT, a French version of the Bi-directional Encoders for Transformers (BERT). We measure the
performance of CamemBERT compared to multilingual models in multiple downstream tasks, namely part-of-speech tagging,
dependency parsing, named-entity recognition, and natural language inference. CamemBERT improves the state of the art
for most of the tasks considered. We release the pretrained model for CamemBERT hoping to foster research and
downstream applications for French NLP.`),te=m(),j=s("p"),L=o("Tips:"),ge=m(),U=s("ul"),le=s("li"),Fe=o("This implementation is the same as RoBERTa. Refer to the "),K=s("a"),Ee=o("documentation of RoBERTa"),Me=o(` for usage examples
as well as the information relative to the inputs and outputs.`),P=m(),oe=s("p"),J=o("This model was contributed by "),de=s("a"),ze=o("camembert"),G=o(". The original code can be found "),ce=s("a"),qe=o("here"),N=o("."),_e=m(),S=s("h2"),re=s("a"),Z=s("span"),T(A.$$.fragment),xe=m(),O=s("span"),je=o("Documentation resources"),be=m(),f=s("ul"),M=s("li"),Pe=s("a"),ne=o("Text classification task guide"),Re=m(),Ie=s("li"),z=s("a"),Be=o("Token classification task guide"),Ue=m(),Se=s("li"),Le=s("a"),Ke=o("Question answering task guide"),D=m(),Q=s("li"),Oe=s("a"),He=o("Causal language modeling task guide"),X=m(),We=s("li"),Ne=s("a"),Ae=o("Masked language modeling task guide"),Qe=m(),ee=s("li"),De=s("a"),_m=o("Multiple choice task guide"),Ad=m(),ro=s("h2"),Wo=s("a"),Ci=s("span"),T(ds.$$.fragment),bm=m(),$i=s("span"),km=o("CamembertConfig"),Pd=m(),$t=s("div"),T(cs.$$.fragment),ym=m(),Bt=s("p"),vm=o("This is the configuration class to store the configuration of a "),_r=s("a"),Tm=o("CamembertModel"),wm=o(" or a "),br=s("a"),Cm=o("TFCamembertModel"),$m=o(`. It is
used to instantiate a Camembert 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 Camembert
`),ms=s("a"),Fm=o("camembert-base"),Em=o(" architecture."),Mm=m(),io=s("p"),zm=o("Configuration objects inherit from "),kr=s("a"),qm=o("PretrainedConfig"),xm=o(` and can be used to control the model outputs. Read the
documentation from `),yr=s("a"),jm=o("PretrainedConfig"),Am=o(" for more information."),Pm=m(),T(Ro.$$.fragment),Ld=m(),lo=s("h2"),Bo=s("a"),Fi=s("span"),T(ps.$$.fragment),Lm=m(),Ei=s("span"),Om=o("CamembertTokenizer"),Od=m(),et=s("div"),T(hs.$$.fragment),Nm=m(),Ut=s("p"),Dm=o("Adapted from "),vr=s("a"),Im=o("RobertaTokenizer"),Sm=o(" and "),Tr=s("a"),Wm=o("XLNetTokenizer"),Rm=o(`. Construct a CamemBERT tokenizer. Based on
`),us=s("a"),Bm=o("SentencePiece"),Um=o("."),Km=m(),fs=s("p"),Hm=o("This tokenizer inherits from "),wr=s("a"),Qm=o("PreTrainedTokenizer"),Vm=o(` which contains most of the main methods. Users should refer to
this superclass for more information regarding those methods.`),Jm=m(),Kt=s("div"),T(gs.$$.fragment),Gm=m(),Mi=s("p"),Xm=o(`Build model inputs from a sequence or a pair of sequence for sequence classification tasks by concatenating and
adding special tokens. An CamemBERT sequence has the following format:`),Ym=m(),_s=s("ul"),Cr=s("li"),Zm=o("single sequence: "),zi=s("code"),ep=o("<s> X </s>"),tp=m(),$r=s("li"),op=o("pair of sequences: "),qi=s("code"),np=o("<s> A </s></s> B </s>"),sp=m(),Uo=s("div"),T(bs.$$.fragment),ap=m(),ks=s("p"),rp=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 `),xi=s("code"),ip=o("prepare_for_model"),lp=o(" method."),dp=m(),Ko=s("div"),T(ys.$$.fragment),cp=m(),ji=s("p"),mp=o(`Create a mask from the two sequences passed to be used in a sequence-pair classification task. CamemBERT, like
RoBERTa, does not make use of token type ids, therefore a list of zeros is returned.`),pp=m(),Fr=s("div"),T(vs.$$.fragment),Nd=m(),co=s("h2"),Ho=s("a"),Ai=s("span"),T(Ts.$$.fragment),hp=m(),Pi=s("span"),up=o("CamembertTokenizerFast"),Dd=m(),ct=s("div"),T(ws.$$.fragment),fp=m(),Ft=s("p"),gp=o("Construct a \u201Cfast\u201D CamemBERT tokenizer (backed by HuggingFace\u2019s "),Li=s("em"),_p=o("tokenizers"),bp=o(` library). Adapted from
`),Er=s("a"),kp=o("RobertaTokenizer"),yp=o(" and "),Mr=s("a"),vp=o("XLNetTokenizer"),Tp=o(`. Based on
`),Cs=s("a"),wp=o("BPE"),Cp=o("."),$p=m(),$s=s("p"),Fp=o("This tokenizer inherits from "),zr=s("a"),Ep=o("PreTrainedTokenizerFast"),Mp=o(` which contains most of the main methods. Users should
refer to this superclass for more information regarding those methods.`),zp=m(),Ht=s("div"),T(Fs.$$.fragment),qp=m(),Oi=s("p"),xp=o(`Build model inputs from a sequence or a pair of sequence for sequence classification tasks by concatenating and
adding special tokens. An CamemBERT sequence has the following format:`),jp=m(),Es=s("ul"),qr=s("li"),Ap=o("single sequence: "),Ni=s("code"),Pp=o("<s> X </s>"),Lp=m(),xr=s("li"),Op=o("pair of sequences: "),Di=s("code"),Np=o("<s> A </s></s> B </s>"),Dp=m(),Qo=s("div"),T(Ms.$$.fragment),Ip=m(),Ii=s("p"),Sp=o(`Create a mask from the two sequences passed to be used in a sequence-pair classification task. CamemBERT, like
RoBERTa, does not make use of token type ids, therefore a list of zeros is returned.`),Id=m(),mo=s("h2"),Vo=s("a"),Si=s("span"),T(zs.$$.fragment),Wp=m(),Wi=s("span"),Rp=o("CamembertModel"),Sd=m(),Ve=s("div"),T(qs.$$.fragment),Bp=m(),Ri=s("p"),Up=o("The bare CamemBERT Model transformer outputting raw hidden-states without any specific head on top."),Kp=m(),xs=s("p"),Hp=o("This model inherits from "),jr=s("a"),Qp=o("PreTrainedModel"),Vp=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=m(),js=s("p"),Gp=o("This model is also a PyTorch "),As=s("a"),Xp=o("torch.nn.Module"),Yp=o(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Zp=m(),Ps=s("p"),eh=o(`The model can behave as an encoder (with only self-attention) as well as a decoder, in which case a layer of
cross-attention is added between the self-attention layers, following the architecture described in `),Bi=s("em"),th=o(`Attention is
all you need`),oh=o(`_ by Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N. Gomez, Lukasz
Kaiser and Illia Polosukhin.`),nh=m(),tt=s("p"),sh=o("To behave as a decoder the model needs to be initialized with the "),Ui=s("code"),ah=o("is_decoder"),rh=o(` argument of the configuration set to
`),Ki=s("code"),ih=o("True"),lh=o(". To be used in a Seq2Seq model, the model needs to initialized with both "),Hi=s("code"),dh=o("is_decoder"),ch=o(` argument and
`),Qi=s("code"),mh=o("add_cross_attention"),ph=o(" set to "),Vi=s("code"),hh=o("True"),uh=o("; an "),Ji=s("code"),fh=o("encoder_hidden_states"),gh=o(" is then expected as an input to the forward pass."),_h=m(),Jo=s("p"),bh=o(".. _"),Gi=s("em"),kh=o("Attention is all you need"),yh=o(": "),Ls=s("a"),vh=o("https://arxiv.org/abs/1706.03762"),Th=m(),Et=s("div"),T(Os.$$.fragment),wh=m(),po=s("p"),Ch=o("The "),Ar=s("a"),$h=o("CamembertModel"),Fh=o(" forward method, overrides the "),Xi=s("code"),Eh=o("__call__"),Mh=o(" special method."),zh=m(),T(Go.$$.fragment),qh=m(),T(Xo.$$.fragment),Wd=m(),ho=s("h2"),Yo=s("a"),Yi=s("span"),T(Ns.$$.fragment),xh=m(),Zi=s("span"),jh=o("CamembertForCausalLM"),Rd=m(),mt=s("div"),T(Ds.$$.fragment),Ah=m(),Is=s("p"),Ph=o("CamemBERT Model with a "),el=s("code"),Lh=o("language modeling"),Oh=o(" head on top for CLM fine-tuning."),Nh=m(),Ss=s("p"),Dh=o("This model inherits from "),Pr=s("a"),Ih=o("PreTrainedModel"),Sh=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.)`),Wh=m(),Ws=s("p"),Rh=o("This model is also a PyTorch "),Rs=s("a"),Bh=o("torch.nn.Module"),Uh=o(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Kh=m(),Mt=s("div"),T(Bs.$$.fragment),Hh=m(),uo=s("p"),Qh=o("The "),Lr=s("a"),Vh=o("CamembertForCausalLM"),Jh=o(" forward method, overrides the "),tl=s("code"),Gh=o("__call__"),Xh=o(" special method."),Yh=m(),T(Zo.$$.fragment),Zh=m(),T(en.$$.fragment),Bd=m(),fo=s("h2"),tn=s("a"),ol=s("span"),T(Us.$$.fragment),eu=m(),nl=s("span"),tu=o("CamembertForMaskedLM"),Ud=m(),pt=s("div"),T(Ks.$$.fragment),ou=m(),Hs=s("p"),nu=o("CamemBERT Model with a "),sl=s("code"),su=o("language modeling"),au=o(" head on top."),ru=m(),Qs=s("p"),iu=o("This model inherits from "),Or=s("a"),lu=o("PreTrainedModel"),du=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.)`),cu=m(),Vs=s("p"),mu=o("This model is also a PyTorch "),Js=s("a"),pu=o("torch.nn.Module"),hu=o(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),uu=m(),zt=s("div"),T(Gs.$$.fragment),fu=m(),go=s("p"),gu=o("The "),Nr=s("a"),_u=o("CamembertForMaskedLM"),bu=o(" forward method, overrides the "),al=s("code"),ku=o("__call__"),yu=o(" special method."),vu=m(),T(on.$$.fragment),Tu=m(),T(nn.$$.fragment),Kd=m(),_o=s("h2"),sn=s("a"),rl=s("span"),T(Xs.$$.fragment),wu=m(),il=s("span"),Cu=o("CamembertForSequenceClassification"),Hd=m(),ht=s("div"),T(Ys.$$.fragment),$u=m(),ll=s("p"),Fu=o(`CamemBERT Model transformer with a sequence classification/regression head on top (a linear layer on top of the
pooled output) e.g. for GLUE tasks.`),Eu=m(),Zs=s("p"),Mu=o("This model inherits from "),Dr=s("a"),zu=o("PreTrainedModel"),qu=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.)`),xu=m(),ea=s("p"),ju=o("This model is also a PyTorch "),ta=s("a"),Au=o("torch.nn.Module"),Pu=o(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Lu=m(),bt=s("div"),T(oa.$$.fragment),Ou=m(),bo=s("p"),Nu=o("The "),Ir=s("a"),Du=o("CamembertForSequenceClassification"),Iu=o(" forward method, overrides the "),dl=s("code"),Su=o("__call__"),Wu=o(" special method."),Ru=m(),T(an.$$.fragment),Bu=m(),T(rn.$$.fragment),Uu=m(),T(ln.$$.fragment),Qd=m(),ko=s("h2"),dn=s("a"),cl=s("span"),T(na.$$.fragment),Ku=m(),ml=s("span"),Hu=o("CamembertForMultipleChoice"),Vd=m(),ut=s("div"),T(sa.$$.fragment),Qu=m(),pl=s("p"),Vu=o(`CamemBERT 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.`),Ju=m(),aa=s("p"),Gu=o("This model inherits from "),Sr=s("a"),Xu=o("PreTrainedModel"),Yu=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.)`),Zu=m(),ra=s("p"),ef=o("This model is also a PyTorch "),ia=s("a"),tf=o("torch.nn.Module"),of=o(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),nf=m(),qt=s("div"),T(la.$$.fragment),sf=m(),yo=s("p"),af=o("The "),Wr=s("a"),rf=o("CamembertForMultipleChoice"),lf=o(" forward method, overrides the "),hl=s("code"),df=o("__call__"),cf=o(" special method."),mf=m(),T(cn.$$.fragment),pf=m(),T(mn.$$.fragment),Jd=m(),vo=s("h2"),pn=s("a"),ul=s("span"),T(da.$$.fragment),hf=m(),fl=s("span"),uf=o("CamembertForTokenClassification"),Gd=m(),ft=s("div"),T(ca.$$.fragment),ff=m(),gl=s("p"),gf=o(`CamemBERT 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.`),_f=m(),ma=s("p"),bf=o("This model inherits from "),Rr=s("a"),kf=o("PreTrainedModel"),yf=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.)`),vf=m(),pa=s("p"),Tf=o("This model is also a PyTorch "),ha=s("a"),wf=o("torch.nn.Module"),Cf=o(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),$f=m(),xt=s("div"),T(ua.$$.fragment),Ff=m(),To=s("p"),Ef=o("The "),Br=s("a"),Mf=o("CamembertForTokenClassification"),zf=o(" forward method, overrides the "),_l=s("code"),qf=o("__call__"),xf=o(" special method."),jf=m(),T(hn.$$.fragment),Af=m(),T(un.$$.fragment),Xd=m(),wo=s("h2"),fn=s("a"),bl=s("span"),T(fa.$$.fragment),Pf=m(),kl=s("span"),Lf=o("CamembertForQuestionAnswering"),Yd=m(),gt=s("div"),T(ga.$$.fragment),Of=m(),gn=s("p"),Nf=o(`CamemBERT 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 `),yl=s("code"),Df=o("span start logits"),If=o(" and "),vl=s("code"),Sf=o("span end logits"),Wf=m(),_a=s("p"),Rf=o("This model inherits from "),Ur=s("a"),Bf=o("PreTrainedModel"),Uf=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.)`),Kf=m(),ba=s("p"),Hf=o("This model is also a PyTorch "),ka=s("a"),Qf=o("torch.nn.Module"),Vf=o(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Jf=m(),jt=s("div"),T(ya.$$.fragment),Gf=m(),Co=s("p"),Xf=o("The "),Kr=s("a"),Yf=o("CamembertForQuestionAnswering"),Zf=o(" forward method, overrides the "),Tl=s("code"),eg=o("__call__"),tg=o(" special method."),og=m(),T(_n.$$.fragment),ng=m(),T(bn.$$.fragment),Zd=m(),$o=s("h2"),kn=s("a"),wl=s("span"),T(va.$$.fragment),sg=m(),Cl=s("span"),ag=o("TFCamembertModel"),ec=m(),ot=s("div"),T(Ta.$$.fragment),rg=m(),$l=s("p"),ig=o("The bare CamemBERT Model transformer outputting raw hidden-states without any specific head on top."),lg=m(),wa=s("p"),dg=o("This model inherits from "),Hr=s("a"),cg=o("TFPreTrainedModel"),mg=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.)`),pg=m(),Ca=s("p"),hg=o("This model is also a "),$a=s("a"),ug=o("tf.keras.Model"),fg=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.`),gg=m(),T(yn.$$.fragment),_g=m(),At=s("div"),T(Fa.$$.fragment),bg=m(),Fo=s("p"),kg=o("The "),Qr=s("a"),yg=o("TFCamembertModel"),vg=o(" forward method, overrides the "),Fl=s("code"),Tg=o("__call__"),wg=o(" special method."),Cg=m(),T(vn.$$.fragment),$g=m(),T(Tn.$$.fragment),tc=m(),Eo=s("h2"),wn=s("a"),El=s("span"),T(Ea.$$.fragment),Fg=m(),Ml=s("span"),Eg=o("TFCamembertForCasualLM"),oc=m(),nt=s("div"),T(Ma.$$.fragment),Mg=m(),za=s("p"),zg=o("CamemBERT Model with a "),zl=s("code"),qg=o("language modeling"),xg=o(" head on top for CLM fine-tuning."),jg=m(),qa=s("p"),Ag=o("This model inherits from "),Vr=s("a"),Pg=o("TFPreTrainedModel"),Lg=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.)`),Og=m(),xa=s("p"),Ng=o("This model is also a "),ja=s("a"),Dg=o("tf.keras.Model"),Ig=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.`),Sg=m(),T(Cn.$$.fragment),Wg=m(),Pt=s("div"),T(Aa.$$.fragment),Rg=m(),Mo=s("p"),Bg=o("The "),Jr=s("a"),Ug=o("TFCamembertForCausalLM"),Kg=o(" forward method, overrides the "),ql=s("code"),Hg=o("__call__"),Qg=o(" special method."),Vg=m(),T($n.$$.fragment),Jg=m(),T(Fn.$$.fragment),nc=m(),zo=s("h2"),En=s("a"),xl=s("span"),T(Pa.$$.fragment),Gg=m(),jl=s("span"),Xg=o("TFCamembertForMaskedLM"),sc=m(),st=s("div"),T(La.$$.fragment),Yg=m(),Oa=s("p"),Zg=o("CamemBERT Model with a "),Al=s("code"),e_=o("language modeling"),t_=o(" head on top."),o_=m(),Na=s("p"),n_=o("This model inherits from "),Gr=s("a"),s_=o("TFPreTrainedModel"),a_=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.)`),r_=m(),Da=s("p"),i_=o("This model is also a "),Ia=s("a"),l_=o("tf.keras.Model"),d_=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.`),c_=m(),T(Mn.$$.fragment),m_=m(),kt=s("div"),T(Sa.$$.fragment),p_=m(),qo=s("p"),h_=o("The "),Xr=s("a"),u_=o("TFCamembertForMaskedLM"),f_=o(" forward method, overrides the "),Pl=s("code"),g_=o("__call__"),__=o(" special method."),b_=m(),T(zn.$$.fragment),k_=m(),T(qn.$$.fragment),y_=m(),T(xn.$$.fragment),ac=m(),xo=s("h2"),jn=s("a"),Ll=s("span"),T(Wa.$$.fragment),v_=m(),Ol=s("span"),T_=o("TFCamembertForSequenceClassification"),rc=m(),at=s("div"),T(Ra.$$.fragment),w_=m(),Nl=s("p"),C_=o(`CamemBERT Model transformer with a sequence classification/regression head on top (a linear layer on top of the
pooled output) e.g. for GLUE tasks.`),$_=m(),Ba=s("p"),F_=o("This model inherits from "),Yr=s("a"),E_=o("TFPreTrainedModel"),M_=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.)`),z_=m(),Ua=s("p"),q_=o("This model is also a "),Ka=s("a"),x_=o("tf.keras.Model"),j_=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.`),A_=m(),T(An.$$.fragment),P_=m(),yt=s("div"),T(Ha.$$.fragment),L_=m(),jo=s("p"),O_=o("The "),Zr=s("a"),N_=o("TFCamembertForSequenceClassification"),D_=o(" forward method, overrides the "),Dl=s("code"),I_=o("__call__"),S_=o(" special method."),W_=m(),T(Pn.$$.fragment),R_=m(),T(Ln.$$.fragment),B_=m(),T(On.$$.fragment),ic=m(),Ao=s("h2"),Nn=s("a"),Il=s("span"),T(Qa.$$.fragment),U_=m(),Sl=s("span"),K_=o("TFCamembertForMultipleChoice"),lc=m(),rt=s("div"),T(Va.$$.fragment),H_=m(),Wl=s("p"),Q_=o(`CamemBERT 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.`),V_=m(),Ja=s("p"),J_=o("This model inherits from "),ei=s("a"),G_=o("TFPreTrainedModel"),X_=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.)`),Y_=m(),Ga=s("p"),Z_=o("This model is also a "),Xa=s("a"),eb=o("tf.keras.Model"),tb=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.`),ob=m(),T(Dn.$$.fragment),nb=m(),Lt=s("div"),T(Ya.$$.fragment),sb=m(),Po=s("p"),ab=o("The "),ti=s("a"),rb=o("TFCamembertForMultipleChoice"),ib=o(" forward method, overrides the "),Rl=s("code"),lb=o("__call__"),db=o(" special method."),cb=m(),T(In.$$.fragment),mb=m(),T(Sn.$$.fragment),dc=m(),Lo=s("h2"),Wn=s("a"),Bl=s("span"),T(Za.$$.fragment),pb=m(),Ul=s("span"),hb=o("TFCamembertForTokenClassification"),cc=m(),it=s("div"),T(er.$$.fragment),ub=m(),Kl=s("p"),fb=o(`CamemBERT 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.`),gb=m(),tr=s("p"),_b=o("This model inherits from "),oi=s("a"),bb=o("TFPreTrainedModel"),kb=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.)`),yb=m(),or=s("p"),vb=o("This model is also a "),nr=s("a"),Tb=o("tf.keras.Model"),wb=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.`),Cb=m(),T(Rn.$$.fragment),$b=m(),vt=s("div"),T(sr.$$.fragment),Fb=m(),Oo=s("p"),Eb=o("The "),ni=s("a"),Mb=o("TFCamembertForTokenClassification"),zb=o(" forward method, overrides the "),Hl=s("code"),qb=o("__call__"),xb=o(" special method."),jb=m(),T(Bn.$$.fragment),Ab=m(),T(Un.$$.fragment),Pb=m(),T(Kn.$$.fragment),mc=m(),No=s("h2"),Hn=s("a"),Ql=s("span"),T(ar.$$.fragment),Lb=m(),Vl=s("span"),Ob=o("TFCamembertForQuestionAnswering"),pc=m(),lt=s("div"),T(rr.$$.fragment),Nb=m(),Do=s("p"),Db=o(`CamemBERT 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 `),Jl=s("code"),Ib=o("span start logits"),Sb=o(" and "),Gl=s("code"),Wb=o("span end logits"),Rb=o(")."),Bb=m(),ir=s("p"),Ub=o("This model inherits from "),si=s("a"),Kb=o("TFPreTrainedModel"),Hb=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.)`),Qb=m(),lr=s("p"),Vb=o("This model is also a "),dr=s("a"),Jb=o("tf.keras.Model"),Gb=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.`),Xb=m(),T(Qn.$$.fragment),Yb=m(),Tt=s("div"),T(cr.$$.fragment),Zb=m(),Io=s("p"),ek=o("The "),ai=s("a"),tk=o("TFCamembertForQuestionAnswering"),ok=o(" forward method, overrides the "),Xl=s("code"),nk=o("__call__"),sk=o(" special method."),ak=m(),T(Vn.$$.fragment),rk=m(),T(Jn.$$.fragment),ik=m(),T(Gn.$$.fragment),this.h()},l(i){const b=rT('[data-svelte="svelte-1phssyn"]',document.head);d=a(b,"META",{name:!0,content:!0}),b.forEach(t),k=p(i),h=a(i,"H1",{class:!0});var mr=r(h);u=a(mr,"A",{id:!0,class:!0,href:!0});var Yl=r(u);y=a(Yl,"SPAN",{});var Zl=r(y);w(l.$$.fragment,Zl),Zl.forEach(t),Yl.forEach(t),c=p(mr),q=a(mr,"SPAN",{});var ed=r(q);ke=n(ed,"CamemBERT"),ed.forEach(t),mr.forEach(t),pe=p(i),I=a(i,"H2",{class:!0});var pr=r(I);ae=a(pr,"A",{id:!0,class:!0,href:!0});var td=r(ae);Y=a(td,"SPAN",{});var od=r(Y);w(v.$$.fragment,od),od.forEach(t),td.forEach(t),ye=p(pr),H=a(pr,"SPAN",{});var nd=r(H);ve=n(nd,"Overview"),nd.forEach(t),pr.forEach(t),he=p(i),W=a(i,"P",{});var hr=r(W);Te=n(hr,"The CamemBERT model was proposed in "),ie=a(hr,"A",{href:!0,rel:!0});var sd=r(ie);V=n(sd,"CamemBERT: a Tasty French Language Model"),sd.forEach(t),we=n(hr,` by
Louis Martin, Benjamin Muller, Pedro Javier Ortiz Su\xE1rez, Yoann Dupont, Laurent Romary, \xC9ric Villemonte de la
Clergerie, Djam\xE9 Seddah, and Beno\xEEt Sagot. It is based on Facebook\u2019s RoBERTa model released in 2019. It is a model
trained on 138GB of French text.`),hr.forEach(t),ue=p(i),R=a(i,"P",{});var ad=r(R);Ce=n(ad,"The abstract from the paper is the following:"),ad.forEach(t),fe=p(i),B=a(i,"P",{});var rd=r(B);me=a(rd,"EM",{});var id=r(me);$e=n(id,`Pretrained language models are now ubiquitous in Natural Language Processing. Despite their success, most available
models have either been trained on English data or on the concatenation of data in multiple languages. This makes
practical use of such models \u2014in all languages except English\u2014 very limited. Aiming to address this issue for French,
we release CamemBERT, a French version of the Bi-directional Encoders for Transformers (BERT). We measure the
performance of CamemBERT compared to multilingual models in multiple downstream tasks, namely part-of-speech tagging,
dependency parsing, named-entity recognition, and natural language inference. CamemBERT improves the state of the art
for most of the tasks considered. We release the pretrained model for CamemBERT hoping to foster research and
downstream applications for French NLP.`),id.forEach(t),rd.forEach(t),te=p(i),j=a(i,"P",{});var ld=r(j);L=n(ld,"Tips:"),ld.forEach(t),ge=p(i),U=a(i,"UL",{});var dd=r(U);le=a(dd,"LI",{});var ur=r(le);Fe=n(ur,"This implementation is the same as RoBERTa. Refer to the "),K=a(ur,"A",{href:!0});var cd=r(K);Ee=n(cd,"documentation of RoBERTa"),cd.forEach(t),Me=n(ur,` for usage examples
as well as the information relative to the inputs and outputs.`),ur.forEach(t),dd.forEach(t),P=p(i),oe=a(i,"P",{});var So=r(oe);J=n(So,"This model was contributed by "),de=a(So,"A",{href:!0,rel:!0});var md=r(de);ze=n(md,"camembert"),md.forEach(t),G=n(So,". The original code can be found "),ce=a(So,"A",{href:!0,rel:!0});var pd=r(ce);qe=n(pd,"here"),pd.forEach(t),N=n(So,"."),So.forEach(t),_e=p(i),S=a(i,"H2",{class:!0});var fr=r(S);re=a(fr,"A",{id:!0,class:!0,href:!0});var hd=r(re);Z=a(hd,"SPAN",{});var ud=r(Z);w(A.$$.fragment,ud),ud.forEach(t),hd.forEach(t),xe=p(fr),O=a(fr,"SPAN",{});var fd=r(O);je=n(fd,"Documentation resources"),fd.forEach(t),fr.forEach(t),be=p(i),f=a(i,"UL",{});var _t=r(f);M=a(_t,"LI",{});var gd=r(M);Pe=a(gd,"A",{href:!0});var _d=r(Pe);ne=n(_d,"Text classification task guide"),_d.forEach(t),gd.forEach(t),Re=p(_t),Ie=a(_t,"LI",{});var bd=r(Ie);z=a(bd,"A",{href:!0});var kd=r(z);Be=n(kd,"Token classification task guide"),kd.forEach(t),bd.forEach(t),Ue=p(_t),Se=a(_t,"LI",{});var yd=r(Se);Le=a(yd,"A",{href:!0});var vd=r(Le);Ke=n(vd,"Question answering task guide"),vd.forEach(t),yd.forEach(t),D=p(_t),Q=a(_t,"LI",{});var Td=r(Q);Oe=a(Td,"A",{href:!0});var wd=r(Oe);He=n(wd,"Causal language modeling task guide"),wd.forEach(t),Td.forEach(t),X=p(_t),We=a(_t,"LI",{});var Cd=r(We);Ne=a(Cd,"A",{href:!0});var $d=r(Ne);Ae=n($d,"Masked language modeling task guide"),$d.forEach(t),Cd.forEach(t),Qe=p(_t),ee=a(_t,"LI",{});var Fd=r(ee);De=a(Fd,"A",{href:!0});var Ed=r(De);_m=n(Ed,"Multiple choice task guide"),Ed.forEach(t),Fd.forEach(t),_t.forEach(t),Ad=p(i),ro=a(i,"H2",{class:!0});var gr=r(ro);Wo=a(gr,"A",{id:!0,class:!0,href:!0});var Md=r(Wo);Ci=a(Md,"SPAN",{});var zd=r(Ci);w(ds.$$.fragment,zd),zd.forEach(t),Md.forEach(t),bm=p(gr),$i=a(gr,"SPAN",{});var qd=r($i);km=n(qd,"CamembertConfig"),qd.forEach(t),gr.forEach(t),Pd=p(i),$t=a(i,"DIV",{class:!0});var Xn=r($t);w(cs.$$.fragment,Xn),ym=p(Xn),Bt=a(Xn,"P",{});var Yn=r(Bt);vm=n(Yn,"This is the configuration class to store the configuration of a "),_r=a(Yn,"A",{href:!0});var pk=r(_r);Tm=n(pk,"CamembertModel"),pk.forEach(t),wm=n(Yn," or a "),br=a(Yn,"A",{href:!0});var hk=r(br);Cm=n(hk,"TFCamembertModel"),hk.forEach(t),$m=n(Yn,`. It is
used to instantiate a Camembert 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 Camembert
`),ms=a(Yn,"A",{href:!0,rel:!0});var uk=r(ms);Fm=n(uk,"camembert-base"),uk.forEach(t),Em=n(Yn," architecture."),Yn.forEach(t),Mm=p(Xn),io=a(Xn,"P",{});var ri=r(io);zm=n(ri,"Configuration objects inherit from "),kr=a(ri,"A",{href:!0});var fk=r(kr);qm=n(fk,"PretrainedConfig"),fk.forEach(t),xm=n(ri,` and can be used to control the model outputs. Read the
documentation from `),yr=a(ri,"A",{href:!0});var gk=r(yr);jm=n(gk,"PretrainedConfig"),gk.forEach(t),Am=n(ri," for more information."),ri.forEach(t),Pm=p(Xn),w(Ro.$$.fragment,Xn),Xn.forEach(t),Ld=p(i),lo=a(i,"H2",{class:!0});var uc=r(lo);Bo=a(uc,"A",{id:!0,class:!0,href:!0});var _k=r(Bo);Fi=a(_k,"SPAN",{});var bk=r(Fi);w(ps.$$.fragment,bk),bk.forEach(t),_k.forEach(t),Lm=p(uc),Ei=a(uc,"SPAN",{});var kk=r(Ei);Om=n(kk,"CamembertTokenizer"),kk.forEach(t),uc.forEach(t),Od=p(i),et=a(i,"DIV",{class:!0});var wt=r(et);w(hs.$$.fragment,wt),Nm=p(wt),Ut=a(wt,"P",{});var Zn=r(Ut);Dm=n(Zn,"Adapted from "),vr=a(Zn,"A",{href:!0});var yk=r(vr);Im=n(yk,"RobertaTokenizer"),yk.forEach(t),Sm=n(Zn," and "),Tr=a(Zn,"A",{href:!0});var vk=r(Tr);Wm=n(vk,"XLNetTokenizer"),vk.forEach(t),Rm=n(Zn,`. Construct a CamemBERT tokenizer. Based on
`),us=a(Zn,"A",{href:!0,rel:!0});var Tk=r(us);Bm=n(Tk,"SentencePiece"),Tk.forEach(t),Um=n(Zn,"."),Zn.forEach(t),Km=p(wt),fs=a(wt,"P",{});var fc=r(fs);Hm=n(fc,"This tokenizer inherits from "),wr=a(fc,"A",{href:!0});var wk=r(wr);Qm=n(wk,"PreTrainedTokenizer"),wk.forEach(t),Vm=n(fc,` which contains most of the main methods. Users should refer to
this superclass for more information regarding those methods.`),fc.forEach(t),Jm=p(wt),Kt=a(wt,"DIV",{class:!0});var ii=r(Kt);w(gs.$$.fragment,ii),Gm=p(ii),Mi=a(ii,"P",{});var Ck=r(Mi);Xm=n(Ck,`Build model inputs from a sequence or a pair of sequence for sequence classification tasks by concatenating and
adding special tokens. An CamemBERT sequence has the following format:`),Ck.forEach(t),Ym=p(ii),_s=a(ii,"UL",{});var gc=r(_s);Cr=a(gc,"LI",{});var lk=r(Cr);Zm=n(lk,"single sequence: "),zi=a(lk,"CODE",{});var $k=r(zi);ep=n($k,"<s> X </s>"),$k.forEach(t),lk.forEach(t),tp=p(gc),$r=a(gc,"LI",{});var dk=r($r);op=n(dk,"pair of sequences: "),qi=a(dk,"CODE",{});var Fk=r(qi);np=n(Fk,"<s> A </s></s> B </s>"),Fk.forEach(t),dk.forEach(t),gc.forEach(t),ii.forEach(t),sp=p(wt),Uo=a(wt,"DIV",{class:!0});var _c=r(Uo);w(bs.$$.fragment,_c),ap=p(_c),ks=a(_c,"P",{});var bc=r(ks);rp=n(bc,`Retrieve sequence ids from a token list that has no special tokens added. This method is called when adding
special tokens using the tokenizer `),xi=a(bc,"CODE",{});var Ek=r(xi);ip=n(Ek,"prepare_for_model"),Ek.forEach(t),lp=n(bc," method."),bc.forEach(t),_c.forEach(t),dp=p(wt),Ko=a(wt,"DIV",{class:!0});var kc=r(Ko);w(ys.$$.fragment,kc),cp=p(kc),ji=a(kc,"P",{});var Mk=r(ji);mp=n(Mk,`Create a mask from the two sequences passed to be used in a sequence-pair classification task. CamemBERT, like
RoBERTa, does not make use of token type ids, therefore a list of zeros is returned.`),Mk.forEach(t),kc.forEach(t),pp=p(wt),Fr=a(wt,"DIV",{class:!0});var zk=r(Fr);w(vs.$$.fragment,zk),zk.forEach(t),wt.forEach(t),Nd=p(i),co=a(i,"H2",{class:!0});var yc=r(co);Ho=a(yc,"A",{id:!0,class:!0,href:!0});var qk=r(Ho);Ai=a(qk,"SPAN",{});var xk=r(Ai);w(Ts.$$.fragment,xk),xk.forEach(t),qk.forEach(t),hp=p(yc),Pi=a(yc,"SPAN",{});var jk=r(Pi);up=n(jk,"CamembertTokenizerFast"),jk.forEach(t),yc.forEach(t),Dd=p(i),ct=a(i,"DIV",{class:!0});var Qt=r(ct);w(ws.$$.fragment,Qt),fp=p(Qt),Ft=a(Qt,"P",{});var Vt=r(Ft);gp=n(Vt,"Construct a \u201Cfast\u201D CamemBERT tokenizer (backed by HuggingFace\u2019s "),Li=a(Vt,"EM",{});var Ak=r(Li);_p=n(Ak,"tokenizers"),Ak.forEach(t),bp=n(Vt,` library). Adapted from
`),Er=a(Vt,"A",{href:!0});var Pk=r(Er);kp=n(Pk,"RobertaTokenizer"),Pk.forEach(t),yp=n(Vt," and "),Mr=a(Vt,"A",{href:!0});var Lk=r(Mr);vp=n(Lk,"XLNetTokenizer"),Lk.forEach(t),Tp=n(Vt,`. Based on
`),Cs=a(Vt,"A",{href:!0,rel:!0});var Ok=r(Cs);wp=n(Ok,"BPE"),Ok.forEach(t),Cp=n(Vt,"."),Vt.forEach(t),$p=p(Qt),$s=a(Qt,"P",{});var vc=r($s);Fp=n(vc,"This tokenizer inherits from "),zr=a(vc,"A",{href:!0});var Nk=r(zr);Ep=n(Nk,"PreTrainedTokenizerFast"),Nk.forEach(t),Mp=n(vc,` which contains most of the main methods. Users should
refer to this superclass for more information regarding those methods.`),vc.forEach(t),zp=p(Qt),Ht=a(Qt,"DIV",{class:!0});var li=r(Ht);w(Fs.$$.fragment,li),qp=p(li),Oi=a(li,"P",{});var Dk=r(Oi);xp=n(Dk,`Build model inputs from a sequence or a pair of sequence for sequence classification tasks by concatenating and
adding special tokens. An CamemBERT sequence has the following format:`),Dk.forEach(t),jp=p(li),Es=a(li,"UL",{});var Tc=r(Es);qr=a(Tc,"LI",{});var ck=r(qr);Ap=n(ck,"single sequence: "),Ni=a(ck,"CODE",{});var Ik=r(Ni);Pp=n(Ik,"<s> X </s>"),Ik.forEach(t),ck.forEach(t),Lp=p(Tc),xr=a(Tc,"LI",{});var mk=r(xr);Op=n(mk,"pair of sequences: "),Di=a(mk,"CODE",{});var Sk=r(Di);Np=n(Sk,"<s> A </s></s> B </s>"),Sk.forEach(t),mk.forEach(t),Tc.forEach(t),li.forEach(t),Dp=p(Qt),Qo=a(Qt,"DIV",{class:!0});var wc=r(Qo);w(Ms.$$.fragment,wc),Ip=p(wc),Ii=a(wc,"P",{});var Wk=r(Ii);Sp=n(Wk,`Create a mask from the two sequences passed to be used in a sequence-pair classification task. CamemBERT, like
RoBERTa, does not make use of token type ids, therefore a list of zeros is returned.`),Wk.forEach(t),wc.forEach(t),Qt.forEach(t),Id=p(i),mo=a(i,"H2",{class:!0});var Cc=r(mo);Vo=a(Cc,"A",{id:!0,class:!0,href:!0});var Rk=r(Vo);Si=a(Rk,"SPAN",{});var Bk=r(Si);w(zs.$$.fragment,Bk),Bk.forEach(t),Rk.forEach(t),Wp=p(Cc),Wi=a(Cc,"SPAN",{});var Uk=r(Wi);Rp=n(Uk,"CamembertModel"),Uk.forEach(t),Cc.forEach(t),Sd=p(i),Ve=a(i,"DIV",{class:!0});var dt=r(Ve);w(qs.$$.fragment,dt),Bp=p(dt),Ri=a(dt,"P",{});var Kk=r(Ri);Up=n(Kk,"The bare CamemBERT Model transformer outputting raw hidden-states without any specific head on top."),Kk.forEach(t),Kp=p(dt),xs=a(dt,"P",{});var $c=r(xs);Hp=n($c,"This model inherits from "),jr=a($c,"A",{href:!0});var Hk=r(jr);Qp=n(Hk,"PreTrainedModel"),Hk.forEach(t),Vp=n($c,`. 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.)`),$c.forEach(t),Jp=p(dt),js=a(dt,"P",{});var Fc=r(js);Gp=n(Fc,"This model is also a PyTorch "),As=a(Fc,"A",{href:!0,rel:!0});var Qk=r(As);Xp=n(Qk,"torch.nn.Module"),Qk.forEach(t),Yp=n(Fc,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Fc.forEach(t),Zp=p(dt),Ps=a(dt,"P",{});var Ec=r(Ps);eh=n(Ec,`The model can behave as an encoder (with only self-attention) as well as a decoder, in which case a layer of
cross-attention is added between the self-attention layers, following the architecture described in `),Bi=a(Ec,"EM",{});var Vk=r(Bi);th=n(Vk,`Attention is
all you need`),Vk.forEach(t),oh=n(Ec,`_ by Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N. Gomez, Lukasz
Kaiser and Illia Polosukhin.`),Ec.forEach(t),nh=p(dt),tt=a(dt,"P",{});var Ct=r(tt);sh=n(Ct,"To behave as a decoder the model needs to be initialized with the "),Ui=a(Ct,"CODE",{});var Jk=r(Ui);ah=n(Jk,"is_decoder"),Jk.forEach(t),rh=n(Ct,` argument of the configuration set to
`),Ki=a(Ct,"CODE",{});var Gk=r(Ki);ih=n(Gk,"True"),Gk.forEach(t),lh=n(Ct,". To be used in a Seq2Seq model, the model needs to initialized with both "),Hi=a(Ct,"CODE",{});var Xk=r(Hi);dh=n(Xk,"is_decoder"),Xk.forEach(t),ch=n(Ct,` argument and
`),Qi=a(Ct,"CODE",{});var Yk=r(Qi);mh=n(Yk,"add_cross_attention"),Yk.forEach(t),ph=n(Ct," set to "),Vi=a(Ct,"CODE",{});var Zk=r(Vi);hh=n(Zk,"True"),Zk.forEach(t),uh=n(Ct,"; an "),Ji=a(Ct,"CODE",{});var ey=r(Ji);fh=n(ey,"encoder_hidden_states"),ey.forEach(t),gh=n(Ct," is then expected as an input to the forward pass."),Ct.forEach(t),_h=p(dt),Jo=a(dt,"P",{});var xd=r(Jo);bh=n(xd,".. _"),Gi=a(xd,"EM",{});var ty=r(Gi);kh=n(ty,"Attention is all you need"),ty.forEach(t),yh=n(xd,": "),Ls=a(xd,"A",{href:!0,rel:!0});var oy=r(Ls);vh=n(oy,"https://arxiv.org/abs/1706.03762"),oy.forEach(t),xd.forEach(t),Th=p(dt),Et=a(dt,"DIV",{class:!0});var es=r(Et);w(Os.$$.fragment,es),wh=p(es),po=a(es,"P",{});var di=r(po);Ch=n(di,"The "),Ar=a(di,"A",{href:!0});var ny=r(Ar);$h=n(ny,"CamembertModel"),ny.forEach(t),Fh=n(di," forward method, overrides the "),Xi=a(di,"CODE",{});var sy=r(Xi);Eh=n(sy,"__call__"),sy.forEach(t),Mh=n(di," special method."),di.forEach(t),zh=p(es),w(Go.$$.fragment,es),qh=p(es),w(Xo.$$.fragment,es),es.forEach(t),dt.forEach(t),Wd=p(i),ho=a(i,"H2",{class:!0});var Mc=r(ho);Yo=a(Mc,"A",{id:!0,class:!0,href:!0});var ay=r(Yo);Yi=a(ay,"SPAN",{});var ry=r(Yi);w(Ns.$$.fragment,ry),ry.forEach(t),ay.forEach(t),xh=p(Mc),Zi=a(Mc,"SPAN",{});var iy=r(Zi);jh=n(iy,"CamembertForCausalLM"),iy.forEach(t),Mc.forEach(t),Rd=p(i),mt=a(i,"DIV",{class:!0});var Jt=r(mt);w(Ds.$$.fragment,Jt),Ah=p(Jt),Is=a(Jt,"P",{});var zc=r(Is);Ph=n(zc,"CamemBERT Model with a "),el=a(zc,"CODE",{});var ly=r(el);Lh=n(ly,"language modeling"),ly.forEach(t),Oh=n(zc," head on top for CLM fine-tuning."),zc.forEach(t),Nh=p(Jt),Ss=a(Jt,"P",{});var qc=r(Ss);Dh=n(qc,"This model inherits from "),Pr=a(qc,"A",{href:!0});var dy=r(Pr);Ih=n(dy,"PreTrainedModel"),dy.forEach(t),Sh=n(qc,`. 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.)`),qc.forEach(t),Wh=p(Jt),Ws=a(Jt,"P",{});var xc=r(Ws);Rh=n(xc,"This model is also a PyTorch "),Rs=a(xc,"A",{href:!0,rel:!0});var cy=r(Rs);Bh=n(cy,"torch.nn.Module"),cy.forEach(t),Uh=n(xc,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),xc.forEach(t),Kh=p(Jt),Mt=a(Jt,"DIV",{class:!0});var ts=r(Mt);w(Bs.$$.fragment,ts),Hh=p(ts),uo=a(ts,"P",{});var ci=r(uo);Qh=n(ci,"The "),Lr=a(ci,"A",{href:!0});var my=r(Lr);Vh=n(my,"CamembertForCausalLM"),my.forEach(t),Jh=n(ci," forward method, overrides the "),tl=a(ci,"CODE",{});var py=r(tl);Gh=n(py,"__call__"),py.forEach(t),Xh=n(ci," special method."),ci.forEach(t),Yh=p(ts),w(Zo.$$.fragment,ts),Zh=p(ts),w(en.$$.fragment,ts),ts.forEach(t),Jt.forEach(t),Bd=p(i),fo=a(i,"H2",{class:!0});var jc=r(fo);tn=a(jc,"A",{id:!0,class:!0,href:!0});var hy=r(tn);ol=a(hy,"SPAN",{});var uy=r(ol);w(Us.$$.fragment,uy),uy.forEach(t),hy.forEach(t),eu=p(jc),nl=a(jc,"SPAN",{});var fy=r(nl);tu=n(fy,"CamembertForMaskedLM"),fy.forEach(t),jc.forEach(t),Ud=p(i),pt=a(i,"DIV",{class:!0});var Gt=r(pt);w(Ks.$$.fragment,Gt),ou=p(Gt),Hs=a(Gt,"P",{});var Ac=r(Hs);nu=n(Ac,"CamemBERT Model with a "),sl=a(Ac,"CODE",{});var gy=r(sl);su=n(gy,"language modeling"),gy.forEach(t),au=n(Ac," head on top."),Ac.forEach(t),ru=p(Gt),Qs=a(Gt,"P",{});var Pc=r(Qs);iu=n(Pc,"This model inherits from "),Or=a(Pc,"A",{href:!0});var _y=r(Or);lu=n(_y,"PreTrainedModel"),_y.forEach(t),du=n(Pc,`. 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.)`),Pc.forEach(t),cu=p(Gt),Vs=a(Gt,"P",{});var Lc=r(Vs);mu=n(Lc,"This model is also a PyTorch "),Js=a(Lc,"A",{href:!0,rel:!0});var by=r(Js);pu=n(by,"torch.nn.Module"),by.forEach(t),hu=n(Lc,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Lc.forEach(t),uu=p(Gt),zt=a(Gt,"DIV",{class:!0});var os=r(zt);w(Gs.$$.fragment,os),fu=p(os),go=a(os,"P",{});var mi=r(go);gu=n(mi,"The "),Nr=a(mi,"A",{href:!0});var ky=r(Nr);_u=n(ky,"CamembertForMaskedLM"),ky.forEach(t),bu=n(mi," forward method, overrides the "),al=a(mi,"CODE",{});var yy=r(al);ku=n(yy,"__call__"),yy.forEach(t),yu=n(mi," special method."),mi.forEach(t),vu=p(os),w(on.$$.fragment,os),Tu=p(os),w(nn.$$.fragment,os),os.forEach(t),Gt.forEach(t),Kd=p(i),_o=a(i,"H2",{class:!0});var Oc=r(_o);sn=a(Oc,"A",{id:!0,class:!0,href:!0});var vy=r(sn);rl=a(vy,"SPAN",{});var Ty=r(rl);w(Xs.$$.fragment,Ty),Ty.forEach(t),vy.forEach(t),wu=p(Oc),il=a(Oc,"SPAN",{});var wy=r(il);Cu=n(wy,"CamembertForSequenceClassification"),wy.forEach(t),Oc.forEach(t),Hd=p(i),ht=a(i,"DIV",{class:!0});var Xt=r(ht);w(Ys.$$.fragment,Xt),$u=p(Xt),ll=a(Xt,"P",{});var Cy=r(ll);Fu=n(Cy,`CamemBERT Model transformer with a sequence classification/regression head on top (a linear layer on top of the
pooled output) e.g. for GLUE tasks.`),Cy.forEach(t),Eu=p(Xt),Zs=a(Xt,"P",{});var Nc=r(Zs);Mu=n(Nc,"This model inherits from "),Dr=a(Nc,"A",{href:!0});var $y=r(Dr);zu=n($y,"PreTrainedModel"),$y.forEach(t),qu=n(Nc,`. 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.)`),Nc.forEach(t),xu=p(Xt),ea=a(Xt,"P",{});var Dc=r(ea);ju=n(Dc,"This model is also a PyTorch "),ta=a(Dc,"A",{href:!0,rel:!0});var Fy=r(ta);Au=n(Fy,"torch.nn.Module"),Fy.forEach(t),Pu=n(Dc,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Dc.forEach(t),Lu=p(Xt),bt=a(Xt,"DIV",{class:!0});var Yt=r(bt);w(oa.$$.fragment,Yt),Ou=p(Yt),bo=a(Yt,"P",{});var pi=r(bo);Nu=n(pi,"The "),Ir=a(pi,"A",{href:!0});var Ey=r(Ir);Du=n(Ey,"CamembertForSequenceClassification"),Ey.forEach(t),Iu=n(pi," forward method, overrides the "),dl=a(pi,"CODE",{});var My=r(dl);Su=n(My,"__call__"),My.forEach(t),Wu=n(pi," special method."),pi.forEach(t),Ru=p(Yt),w(an.$$.fragment,Yt),Bu=p(Yt),w(rn.$$.fragment,Yt),Uu=p(Yt),w(ln.$$.fragment,Yt),Yt.forEach(t),Xt.forEach(t),Qd=p(i),ko=a(i,"H2",{class:!0});var Ic=r(ko);dn=a(Ic,"A",{id:!0,class:!0,href:!0});var zy=r(dn);cl=a(zy,"SPAN",{});var qy=r(cl);w(na.$$.fragment,qy),qy.forEach(t),zy.forEach(t),Ku=p(Ic),ml=a(Ic,"SPAN",{});var xy=r(ml);Hu=n(xy,"CamembertForMultipleChoice"),xy.forEach(t),Ic.forEach(t),Vd=p(i),ut=a(i,"DIV",{class:!0});var Zt=r(ut);w(sa.$$.fragment,Zt),Qu=p(Zt),pl=a(Zt,"P",{});var jy=r(pl);Vu=n(jy,`CamemBERT 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.`),jy.forEach(t),Ju=p(Zt),aa=a(Zt,"P",{});var Sc=r(aa);Gu=n(Sc,"This model inherits from "),Sr=a(Sc,"A",{href:!0});var Ay=r(Sr);Xu=n(Ay,"PreTrainedModel"),Ay.forEach(t),Yu=n(Sc,`. 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.)`),Sc.forEach(t),Zu=p(Zt),ra=a(Zt,"P",{});var Wc=r(ra);ef=n(Wc,"This model is also a PyTorch "),ia=a(Wc,"A",{href:!0,rel:!0});var Py=r(ia);tf=n(Py,"torch.nn.Module"),Py.forEach(t),of=n(Wc,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Wc.forEach(t),nf=p(Zt),qt=a(Zt,"DIV",{class:!0});var ns=r(qt);w(la.$$.fragment,ns),sf=p(ns),yo=a(ns,"P",{});var hi=r(yo);af=n(hi,"The "),Wr=a(hi,"A",{href:!0});var Ly=r(Wr);rf=n(Ly,"CamembertForMultipleChoice"),Ly.forEach(t),lf=n(hi," forward method, overrides the "),hl=a(hi,"CODE",{});var Oy=r(hl);df=n(Oy,"__call__"),Oy.forEach(t),cf=n(hi," special method."),hi.forEach(t),mf=p(ns),w(cn.$$.fragment,ns),pf=p(ns),w(mn.$$.fragment,ns),ns.forEach(t),Zt.forEach(t),Jd=p(i),vo=a(i,"H2",{class:!0});var Rc=r(vo);pn=a(Rc,"A",{id:!0,class:!0,href:!0});var Ny=r(pn);ul=a(Ny,"SPAN",{});var Dy=r(ul);w(da.$$.fragment,Dy),Dy.forEach(t),Ny.forEach(t),hf=p(Rc),fl=a(Rc,"SPAN",{});var Iy=r(fl);uf=n(Iy,"CamembertForTokenClassification"),Iy.forEach(t),Rc.forEach(t),Gd=p(i),ft=a(i,"DIV",{class:!0});var eo=r(ft);w(ca.$$.fragment,eo),ff=p(eo),gl=a(eo,"P",{});var Sy=r(gl);gf=n(Sy,`CamemBERT 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.`),Sy.forEach(t),_f=p(eo),ma=a(eo,"P",{});var Bc=r(ma);bf=n(Bc,"This model inherits from "),Rr=a(Bc,"A",{href:!0});var Wy=r(Rr);kf=n(Wy,"PreTrainedModel"),Wy.forEach(t),yf=n(Bc,`. 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.)`),Bc.forEach(t),vf=p(eo),pa=a(eo,"P",{});var Uc=r(pa);Tf=n(Uc,"This model is also a PyTorch "),ha=a(Uc,"A",{href:!0,rel:!0});var Ry=r(ha);wf=n(Ry,"torch.nn.Module"),Ry.forEach(t),Cf=n(Uc,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Uc.forEach(t),$f=p(eo),xt=a(eo,"DIV",{class:!0});var ss=r(xt);w(ua.$$.fragment,ss),Ff=p(ss),To=a(ss,"P",{});var ui=r(To);Ef=n(ui,"The "),Br=a(ui,"A",{href:!0});var By=r(Br);Mf=n(By,"CamembertForTokenClassification"),By.forEach(t),zf=n(ui," forward method, overrides the "),_l=a(ui,"CODE",{});var Uy=r(_l);qf=n(Uy,"__call__"),Uy.forEach(t),xf=n(ui," special method."),ui.forEach(t),jf=p(ss),w(hn.$$.fragment,ss),Af=p(ss),w(un.$$.fragment,ss),ss.forEach(t),eo.forEach(t),Xd=p(i),wo=a(i,"H2",{class:!0});var Kc=r(wo);fn=a(Kc,"A",{id:!0,class:!0,href:!0});var Ky=r(fn);bl=a(Ky,"SPAN",{});var Hy=r(bl);w(fa.$$.fragment,Hy),Hy.forEach(t),Ky.forEach(t),Pf=p(Kc),kl=a(Kc,"SPAN",{});var Qy=r(kl);Lf=n(Qy,"CamembertForQuestionAnswering"),Qy.forEach(t),Kc.forEach(t),Yd=p(i),gt=a(i,"DIV",{class:!0});var to=r(gt);w(ga.$$.fragment,to),Of=p(to),gn=a(to,"P",{});var jd=r(gn);Nf=n(jd,`CamemBERT 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 `),yl=a(jd,"CODE",{});var Vy=r(yl);Df=n(Vy,"span start logits"),Vy.forEach(t),If=n(jd," and "),vl=a(jd,"CODE",{});var Jy=r(vl);Sf=n(Jy,"span end logits"),Jy.forEach(t),jd.forEach(t),Wf=p(to),_a=a(to,"P",{});var Hc=r(_a);Rf=n(Hc,"This model inherits from "),Ur=a(Hc,"A",{href:!0});var Gy=r(Ur);Bf=n(Gy,"PreTrainedModel"),Gy.forEach(t),Uf=n(Hc,`. 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.)`),Hc.forEach(t),Kf=p(to),ba=a(to,"P",{});var Qc=r(ba);Hf=n(Qc,"This model is also a PyTorch "),ka=a(Qc,"A",{href:!0,rel:!0});var Xy=r(ka);Qf=n(Xy,"torch.nn.Module"),Xy.forEach(t),Vf=n(Qc,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Qc.forEach(t),Jf=p(to),jt=a(to,"DIV",{class:!0});var as=r(jt);w(ya.$$.fragment,as),Gf=p(as),Co=a(as,"P",{});var fi=r(Co);Xf=n(fi,"The "),Kr=a(fi,"A",{href:!0});var Yy=r(Kr);Yf=n(Yy,"CamembertForQuestionAnswering"),Yy.forEach(t),Zf=n(fi," forward method, overrides the "),Tl=a(fi,"CODE",{});var Zy=r(Tl);eg=n(Zy,"__call__"),Zy.forEach(t),tg=n(fi," special method."),fi.forEach(t),og=p(as),w(_n.$$.fragment,as),ng=p(as),w(bn.$$.fragment,as),as.forEach(t),to.forEach(t),Zd=p(i),$o=a(i,"H2",{class:!0});var Vc=r($o);kn=a(Vc,"A",{id:!0,class:!0,href:!0});var ev=r(kn);wl=a(ev,"SPAN",{});var tv=r(wl);w(va.$$.fragment,tv),tv.forEach(t),ev.forEach(t),sg=p(Vc),Cl=a(Vc,"SPAN",{});var ov=r(Cl);ag=n(ov,"TFCamembertModel"),ov.forEach(t),Vc.forEach(t),ec=p(i),ot=a(i,"DIV",{class:!0});var Ot=r(ot);w(Ta.$$.fragment,Ot),rg=p(Ot),$l=a(Ot,"P",{});var nv=r($l);ig=n(nv,"The bare CamemBERT Model transformer outputting raw hidden-states without any specific head on top."),nv.forEach(t),lg=p(Ot),wa=a(Ot,"P",{});var Jc=r(wa);dg=n(Jc,"This model inherits from "),Hr=a(Jc,"A",{href:!0});var sv=r(Hr);cg=n(sv,"TFPreTrainedModel"),sv.forEach(t),mg=n(Jc,`. 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.)`),Jc.forEach(t),pg=p(Ot),Ca=a(Ot,"P",{});var Gc=r(Ca);hg=n(Gc,"This model is also a "),$a=a(Gc,"A",{href:!0,rel:!0});var av=r($a);ug=n(av,"tf.keras.Model"),av.forEach(t),fg=n(Gc,` 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.`),Gc.forEach(t),gg=p(Ot),w(yn.$$.fragment,Ot),_g=p(Ot),At=a(Ot,"DIV",{class:!0});var rs=r(At);w(Fa.$$.fragment,rs),bg=p(rs),Fo=a(rs,"P",{});var gi=r(Fo);kg=n(gi,"The "),Qr=a(gi,"A",{href:!0});var rv=r(Qr);yg=n(rv,"TFCamembertModel"),rv.forEach(t),vg=n(gi," forward method, overrides the "),Fl=a(gi,"CODE",{});var iv=r(Fl);Tg=n(iv,"__call__"),iv.forEach(t),wg=n(gi," special method."),gi.forEach(t),Cg=p(rs),w(vn.$$.fragment,rs),$g=p(rs),w(Tn.$$.fragment,rs),rs.forEach(t),Ot.forEach(t),tc=p(i),Eo=a(i,"H2",{class:!0});var Xc=r(Eo);wn=a(Xc,"A",{id:!0,class:!0,href:!0});var lv=r(wn);El=a(lv,"SPAN",{});var dv=r(El);w(Ea.$$.fragment,dv),dv.forEach(t),lv.forEach(t),Fg=p(Xc),Ml=a(Xc,"SPAN",{});var cv=r(Ml);Eg=n(cv,"TFCamembertForCasualLM"),cv.forEach(t),Xc.forEach(t),oc=p(i),nt=a(i,"DIV",{class:!0});var Nt=r(nt);w(Ma.$$.fragment,Nt),Mg=p(Nt),za=a(Nt,"P",{});var Yc=r(za);zg=n(Yc,"CamemBERT Model with a "),zl=a(Yc,"CODE",{});var mv=r(zl);qg=n(mv,"language modeling"),mv.forEach(t),xg=n(Yc," head on top for CLM fine-tuning."),Yc.forEach(t),jg=p(Nt),qa=a(Nt,"P",{});var Zc=r(qa);Ag=n(Zc,"This model inherits from "),Vr=a(Zc,"A",{href:!0});var pv=r(Vr);Pg=n(pv,"TFPreTrainedModel"),pv.forEach(t),Lg=n(Zc,`. 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.)`),Zc.forEach(t),Og=p(Nt),xa=a(Nt,"P",{});var em=r(xa);Ng=n(em,"This model is also a "),ja=a(em,"A",{href:!0,rel:!0});var hv=r(ja);Dg=n(hv,"tf.keras.Model"),hv.forEach(t),Ig=n(em,` 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.`),em.forEach(t),Sg=p(Nt),w(Cn.$$.fragment,Nt),Wg=p(Nt),Pt=a(Nt,"DIV",{class:!0});var is=r(Pt);w(Aa.$$.fragment,is),Rg=p(is),Mo=a(is,"P",{});var _i=r(Mo);Bg=n(_i,"The "),Jr=a(_i,"A",{href:!0});var uv=r(Jr);Ug=n(uv,"TFCamembertForCausalLM"),uv.forEach(t),Kg=n(_i," forward method, overrides the "),ql=a(_i,"CODE",{});var fv=r(ql);Hg=n(fv,"__call__"),fv.forEach(t),Qg=n(_i," special method."),_i.forEach(t),Vg=p(is),w($n.$$.fragment,is),Jg=p(is),w(Fn.$$.fragment,is),is.forEach(t),Nt.forEach(t),nc=p(i),zo=a(i,"H2",{class:!0});var tm=r(zo);En=a(tm,"A",{id:!0,class:!0,href:!0});var gv=r(En);xl=a(gv,"SPAN",{});var _v=r(xl);w(Pa.$$.fragment,_v),_v.forEach(t),gv.forEach(t),Gg=p(tm),jl=a(tm,"SPAN",{});var bv=r(jl);Xg=n(bv,"TFCamembertForMaskedLM"),bv.forEach(t),tm.forEach(t),sc=p(i),st=a(i,"DIV",{class:!0});var Dt=r(st);w(La.$$.fragment,Dt),Yg=p(Dt),Oa=a(Dt,"P",{});var om=r(Oa);Zg=n(om,"CamemBERT Model with a "),Al=a(om,"CODE",{});var kv=r(Al);e_=n(kv,"language modeling"),kv.forEach(t),t_=n(om," head on top."),om.forEach(t),o_=p(Dt),Na=a(Dt,"P",{});var nm=r(Na);n_=n(nm,"This model inherits from "),Gr=a(nm,"A",{href:!0});var yv=r(Gr);s_=n(yv,"TFPreTrainedModel"),yv.forEach(t),a_=n(nm,`. 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.)`),nm.forEach(t),r_=p(Dt),Da=a(Dt,"P",{});var sm=r(Da);i_=n(sm,"This model is also a "),Ia=a(sm,"A",{href:!0,rel:!0});var vv=r(Ia);l_=n(vv,"tf.keras.Model"),vv.forEach(t),d_=n(sm,` 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.`),sm.forEach(t),c_=p(Dt),w(Mn.$$.fragment,Dt),m_=p(Dt),kt=a(Dt,"DIV",{class:!0});var oo=r(kt);w(Sa.$$.fragment,oo),p_=p(oo),qo=a(oo,"P",{});var bi=r(qo);h_=n(bi,"The "),Xr=a(bi,"A",{href:!0});var Tv=r(Xr);u_=n(Tv,"TFCamembertForMaskedLM"),Tv.forEach(t),f_=n(bi," forward method, overrides the "),Pl=a(bi,"CODE",{});var wv=r(Pl);g_=n(wv,"__call__"),wv.forEach(t),__=n(bi," special method."),bi.forEach(t),b_=p(oo),w(zn.$$.fragment,oo),k_=p(oo),w(qn.$$.fragment,oo),y_=p(oo),w(xn.$$.fragment,oo),oo.forEach(t),Dt.forEach(t),ac=p(i),xo=a(i,"H2",{class:!0});var am=r(xo);jn=a(am,"A",{id:!0,class:!0,href:!0});var Cv=r(jn);Ll=a(Cv,"SPAN",{});var $v=r(Ll);w(Wa.$$.fragment,$v),$v.forEach(t),Cv.forEach(t),v_=p(am),Ol=a(am,"SPAN",{});var Fv=r(Ol);T_=n(Fv,"TFCamembertForSequenceClassification"),Fv.forEach(t),am.forEach(t),rc=p(i),at=a(i,"DIV",{class:!0});var It=r(at);w(Ra.$$.fragment,It),w_=p(It),Nl=a(It,"P",{});var Ev=r(Nl);C_=n(Ev,`CamemBERT Model transformer with a sequence classification/regression head on top (a linear layer on top of the
pooled output) e.g. for GLUE tasks.`),Ev.forEach(t),$_=p(It),Ba=a(It,"P",{});var rm=r(Ba);F_=n(rm,"This model inherits from "),Yr=a(rm,"A",{href:!0});var Mv=r(Yr);E_=n(Mv,"TFPreTrainedModel"),Mv.forEach(t),M_=n(rm,`. 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.)`),rm.forEach(t),z_=p(It),Ua=a(It,"P",{});var im=r(Ua);q_=n(im,"This model is also a "),Ka=a(im,"A",{href:!0,rel:!0});var zv=r(Ka);x_=n(zv,"tf.keras.Model"),zv.forEach(t),j_=n(im,` 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.`),im.forEach(t),A_=p(It),w(An.$$.fragment,It),P_=p(It),yt=a(It,"DIV",{class:!0});var no=r(yt);w(Ha.$$.fragment,no),L_=p(no),jo=a(no,"P",{});var ki=r(jo);O_=n(ki,"The "),Zr=a(ki,"A",{href:!0});var qv=r(Zr);N_=n(qv,"TFCamembertForSequenceClassification"),qv.forEach(t),D_=n(ki," forward method, overrides the "),Dl=a(ki,"CODE",{});var xv=r(Dl);I_=n(xv,"__call__"),xv.forEach(t),S_=n(ki," special method."),ki.forEach(t),W_=p(no),w(Pn.$$.fragment,no),R_=p(no),w(Ln.$$.fragment,no),B_=p(no),w(On.$$.fragment,no),no.forEach(t),It.forEach(t),ic=p(i),Ao=a(i,"H2",{class:!0});var lm=r(Ao);Nn=a(lm,"A",{id:!0,class:!0,href:!0});var jv=r(Nn);Il=a(jv,"SPAN",{});var Av=r(Il);w(Qa.$$.fragment,Av),Av.forEach(t),jv.forEach(t),U_=p(lm),Sl=a(lm,"SPAN",{});var Pv=r(Sl);K_=n(Pv,"TFCamembertForMultipleChoice"),Pv.forEach(t),lm.forEach(t),lc=p(i),rt=a(i,"DIV",{class:!0});var St=r(rt);w(Va.$$.fragment,St),H_=p(St),Wl=a(St,"P",{});var Lv=r(Wl);Q_=n(Lv,`CamemBERT 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.`),Lv.forEach(t),V_=p(St),Ja=a(St,"P",{});var dm=r(Ja);J_=n(dm,"This model inherits from "),ei=a(dm,"A",{href:!0});var Ov=r(ei);G_=n(Ov,"TFPreTrainedModel"),Ov.forEach(t),X_=n(dm,`. 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.)`),dm.forEach(t),Y_=p(St),Ga=a(St,"P",{});var cm=r(Ga);Z_=n(cm,"This model is also a "),Xa=a(cm,"A",{href:!0,rel:!0});var Nv=r(Xa);eb=n(Nv,"tf.keras.Model"),Nv.forEach(t),tb=n(cm,` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),cm.forEach(t),ob=p(St),w(Dn.$$.fragment,St),nb=p(St),Lt=a(St,"DIV",{class:!0});var ls=r(Lt);w(Ya.$$.fragment,ls),sb=p(ls),Po=a(ls,"P",{});var yi=r(Po);ab=n(yi,"The "),ti=a(yi,"A",{href:!0});var Dv=r(ti);rb=n(Dv,"TFCamembertForMultipleChoice"),Dv.forEach(t),ib=n(yi," forward method, overrides the "),Rl=a(yi,"CODE",{});var Iv=r(Rl);lb=n(Iv,"__call__"),Iv.forEach(t),db=n(yi," special method."),yi.forEach(t),cb=p(ls),w(In.$$.fragment,ls),mb=p(ls),w(Sn.$$.fragment,ls),ls.forEach(t),St.forEach(t),dc=p(i),Lo=a(i,"H2",{class:!0});var mm=r(Lo);Wn=a(mm,"A",{id:!0,class:!0,href:!0});var Sv=r(Wn);Bl=a(Sv,"SPAN",{});var Wv=r(Bl);w(Za.$$.fragment,Wv),Wv.forEach(t),Sv.forEach(t),pb=p(mm),Ul=a(mm,"SPAN",{});var Rv=r(Ul);hb=n(Rv,"TFCamembertForTokenClassification"),Rv.forEach(t),mm.forEach(t),cc=p(i),it=a(i,"DIV",{class:!0});var Wt=r(it);w(er.$$.fragment,Wt),ub=p(Wt),Kl=a(Wt,"P",{});var Bv=r(Kl);fb=n(Bv,`CamemBERT 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.`),Bv.forEach(t),gb=p(Wt),tr=a(Wt,"P",{});var pm=r(tr);_b=n(pm,"This model inherits from "),oi=a(pm,"A",{href:!0});var Uv=r(oi);bb=n(Uv,"TFPreTrainedModel"),Uv.forEach(t),kb=n(pm,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),pm.forEach(t),yb=p(Wt),or=a(Wt,"P",{});var hm=r(or);vb=n(hm,"This model is also a "),nr=a(hm,"A",{href:!0,rel:!0});var Kv=r(nr);Tb=n(Kv,"tf.keras.Model"),Kv.forEach(t),wb=n(hm,` 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.`),hm.forEach(t),Cb=p(Wt),w(Rn.$$.fragment,Wt),$b=p(Wt),vt=a(Wt,"DIV",{class:!0});var so=r(vt);w(sr.$$.fragment,so),Fb=p(so),Oo=a(so,"P",{});var vi=r(Oo);Eb=n(vi,"The "),ni=a(vi,"A",{href:!0});var Hv=r(ni);Mb=n(Hv,"TFCamembertForTokenClassification"),Hv.forEach(t),zb=n(vi," forward method, overrides the "),Hl=a(vi,"CODE",{});var Qv=r(Hl);qb=n(Qv,"__call__"),Qv.forEach(t),xb=n(vi," special method."),vi.forEach(t),jb=p(so),w(Bn.$$.fragment,so),Ab=p(so),w(Un.$$.fragment,so),Pb=p(so),w(Kn.$$.fragment,so),so.forEach(t),Wt.forEach(t),mc=p(i),No=a(i,"H2",{class:!0});var um=r(No);Hn=a(um,"A",{id:!0,class:!0,href:!0});var Vv=r(Hn);Ql=a(Vv,"SPAN",{});var Jv=r(Ql);w(ar.$$.fragment,Jv),Jv.forEach(t),Vv.forEach(t),Lb=p(um),Vl=a(um,"SPAN",{});var Gv=r(Vl);Ob=n(Gv,"TFCamembertForQuestionAnswering"),Gv.forEach(t),um.forEach(t),pc=p(i),lt=a(i,"DIV",{class:!0});var Rt=r(lt);w(rr.$$.fragment,Rt),Nb=p(Rt),Do=a(Rt,"P",{});var Ti=r(Do);Db=n(Ti,`CamemBERT 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 `),Jl=a(Ti,"CODE",{});var Xv=r(Jl);Ib=n(Xv,"span start logits"),Xv.forEach(t),Sb=n(Ti," and "),Gl=a(Ti,"CODE",{});var Yv=r(Gl);Wb=n(Yv,"span end logits"),Yv.forEach(t),Rb=n(Ti,")."),Ti.forEach(t),Bb=p(Rt),ir=a(Rt,"P",{});var fm=r(ir);Ub=n(fm,"This model inherits from "),si=a(fm,"A",{href:!0});var Zv=r(si);Kb=n(Zv,"TFPreTrainedModel"),Zv.forEach(t),Hb=n(fm,`. 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.)`),fm.forEach(t),Qb=p(Rt),lr=a(Rt,"P",{});var gm=r(lr);Vb=n(gm,"This model is also a "),dr=a(gm,"A",{href:!0,rel:!0});var eT=r(dr);Jb=n(eT,"tf.keras.Model"),eT.forEach(t),Gb=n(gm,` 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.forEach(t),Xb=p(Rt),w(Qn.$$.fragment,Rt),Yb=p(Rt),Tt=a(Rt,"DIV",{class:!0});var ao=r(Tt);w(cr.$$.fragment,ao),Zb=p(ao),Io=a(ao,"P",{});var wi=r(Io);ek=n(wi,"The "),ai=a(wi,"A",{href:!0});var tT=r(ai);tk=n(tT,"TFCamembertForQuestionAnswering"),tT.forEach(t),ok=n(wi," forward method, overrides the "),Xl=a(wi,"CODE",{});var oT=r(Xl);nk=n(oT,"__call__"),oT.forEach(t),sk=n(wi," special method."),wi.forEach(t),ak=p(ao),w(Vn.$$.fragment,ao),rk=p(ao),w(Jn.$$.fragment,ao),ik=p(ao),w(Gn.$$.fragment,ao),ao.forEach(t),Rt.forEach(t),this.h()},h(){g(d,"name","hf:doc:metadata"),g(d,"content",JSON.stringify(GT)),g(u,"id","camembert"),g(u,"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(u,"href","#camembert"),g(h,"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(I,"class","relative group"),g(ie,"href","https://arxiv.org/abs/1911.03894"),g(ie,"rel","nofollow"),g(K,"href","roberta"),g(de,"href","https://huggingface.co/camembert"),g(de,"rel","nofollow"),g(ce,"href","https://camembert-model.fr/"),g(ce,"rel","nofollow"),g(re,"id","documentation-resources"),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","#documentation-resources"),g(S,"class","relative group"),g(Pe,"href","../tasks/sequence_classification"),g(z,"href","../tasks/token_classification"),g(Le,"href","../tasks/question_answering"),g(Oe,"href","../tasks/language_modeling"),g(Ne,"href","../tasks/masked_language_modeling"),g(De,"href","../tasks/multiple_choice"),g(Wo,"id","transformers.CamembertConfig"),g(Wo,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),g(Wo,"href","#transformers.CamembertConfig"),g(ro,"class","relative group"),g(_r,"href","/docs/transformers/v4.29.0/en/model_doc/camembert#transformers.CamembertModel"),g(br,"href","/docs/transformers/v4.29.0/en/model_doc/camembert#transformers.TFCamembertModel"),g(ms,"href","https://huggingface.co/camembert-base"),g(ms,"rel","nofollow"),g(kr,"href","/docs/transformers/v4.29.0/en/main_classes/configuration#transformers.PretrainedConfig"),g(yr,"href","/docs/transformers/v4.29.0/en/main_classes/configuration#transformers.PretrainedConfig"),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(Bo,"id","transformers.CamembertTokenizer"),g(Bo,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),g(Bo,"href","#transformers.CamembertTokenizer"),g(lo,"class","relative group"),g(vr,"href","/docs/transformers/v4.29.0/en/model_doc/roberta#transformers.RobertaTokenizer"),g(Tr,"href","/docs/transformers/v4.29.0/en/model_doc/xlnet#transformers.XLNetTokenizer"),g(us,"href","https://github.com/google/sentencepiece"),g(us,"rel","nofollow"),g(wr,"href","/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizer"),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(Uo,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),g(Ko,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),g(Fr,"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(Ho,"id","transformers.CamembertTokenizerFast"),g(Ho,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),g(Ho,"href","#transformers.CamembertTokenizerFast"),g(co,"class","relative group"),g(Er,"href","/docs/transformers/v4.29.0/en/model_doc/roberta#transformers.RobertaTokenizer"),g(Mr,"href","/docs/transformers/v4.29.0/en/model_doc/xlnet#transformers.XLNetTokenizer"),g(Cs,"href","https://huggingface.co/docs/tokenizers/python/latest/components.html?highlight=BPE#models"),g(Cs,"rel","nofollow"),g(zr,"href","/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast"),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(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(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(Vo,"id","transformers.CamembertModel"),g(Vo,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),g(Vo,"href","#transformers.CamembertModel"),g(mo,"class","relative group"),g(jr,"href","/docs/transformers/v4.29.0/en/main_classes/model#transformers.PreTrainedModel"),g(As,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),g(As,"rel","nofollow"),g(Ls,"href","https://arxiv.org/abs/1706.03762"),g(Ls,"rel","nofollow"),g(Ar,"href","/docs/transformers/v4.29.0/en/model_doc/camembert#transformers.CamembertModel"),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(Ve,"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.CamembertForCausalLM"),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.CamembertForCausalLM"),g(ho,"class","relative group"),g(Pr,"href","/docs/transformers/v4.29.0/en/main_classes/model#transformers.PreTrainedModel"),g(Rs,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),g(Rs,"rel","nofollow"),g(Lr,"href","/docs/transformers/v4.29.0/en/model_doc/camembert#transformers.CamembertForCausalLM"),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(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(tn,"id","transformers.CamembertForMaskedLM"),g(tn,"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(tn,"href","#transformers.CamembertForMaskedLM"),g(fo,"class","relative group"),g(Or,"href","/docs/transformers/v4.29.0/en/main_classes/model#transformers.PreTrainedModel"),g(Js,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),g(Js,"rel","nofollow"),g(Nr,"href","/docs/transformers/v4.29.0/en/model_doc/camembert#transformers.CamembertForMaskedLM"),g(zt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),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(sn,"id","transformers.CamembertForSequenceClassification"),g(sn,"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(sn,"href","#transformers.CamembertForSequenceClassification"),g(_o,"class","relative group"),g(Dr,"href","/docs/transformers/v4.29.0/en/main_classes/model#transformers.PreTrainedModel"),g(ta,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),g(ta,"rel","nofollow"),g(Ir,"href","/docs/transformers/v4.29.0/en/model_doc/camembert#transformers.CamembertForSequenceClassification"),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(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(dn,"id","transformers.CamembertForMultipleChoice"),g(dn,"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(dn,"href","#transformers.CamembertForMultipleChoice"),g(ko,"class","relative group"),g(Sr,"href","/docs/transformers/v4.29.0/en/main_classes/model#transformers.PreTrainedModel"),g(ia,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),g(ia,"rel","nofollow"),g(Wr,"href","/docs/transformers/v4.29.0/en/model_doc/camembert#transformers.CamembertForMultipleChoice"),g(qt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),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(pn,"id","transformers.CamembertForTokenClassification"),g(pn,"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(pn,"href","#transformers.CamembertForTokenClassification"),g(vo,"class","relative group"),g(Rr,"href","/docs/transformers/v4.29.0/en/main_classes/model#transformers.PreTrainedModel"),g(ha,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),g(ha,"rel","nofollow"),g(Br,"href","/docs/transformers/v4.29.0/en/model_doc/camembert#transformers.CamembertForTokenClassification"),g(xt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),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(fn,"id","transformers.CamembertForQuestionAnswering"),g(fn,"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(fn,"href","#transformers.CamembertForQuestionAnswering"),g(wo,"class","relative group"),g(Ur,"href","/docs/transformers/v4.29.0/en/main_classes/model#transformers.PreTrainedModel"),g(ka,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),g(ka,"rel","nofollow"),g(Kr,"href","/docs/transformers/v4.29.0/en/model_doc/camembert#transformers.CamembertForQuestionAnswering"),g(jt,"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(kn,"id","transformers.TFCamembertModel"),g(kn,"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(kn,"href","#transformers.TFCamembertModel"),g($o,"class","relative group"),g(Hr,"href","/docs/transformers/v4.29.0/en/main_classes/model#transformers.TFPreTrainedModel"),g($a,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),g($a,"rel","nofollow"),g(Qr,"href","/docs/transformers/v4.29.0/en/model_doc/camembert#transformers.TFCamembertModel"),g(At,"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(wn,"id","transformers.TFCamembertForCausalLM"),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.TFCamembertForCausalLM"),g(Eo,"class","relative group"),g(Vr,"href","/docs/transformers/v4.29.0/en/main_classes/model#transformers.TFPreTrainedModel"),g(ja,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),g(ja,"rel","nofollow"),g(Jr,"href","/docs/transformers/v4.29.0/en/model_doc/camembert#transformers.TFCamembertForCausalLM"),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(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(En,"id","transformers.TFCamembertForMaskedLM"),g(En,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),g(En,"href","#transformers.TFCamembertForMaskedLM"),g(zo,"class","relative group"),g(Gr,"href","/docs/transformers/v4.29.0/en/main_classes/model#transformers.TFPreTrainedModel"),g(Ia,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),g(Ia,"rel","nofollow"),g(Xr,"href","/docs/transformers/v4.29.0/en/model_doc/camembert#transformers.TFCamembertForMaskedLM"),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(st,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),g(jn,"id","transformers.TFCamembertForSequenceClassification"),g(jn,"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(jn,"href","#transformers.TFCamembertForSequenceClassification"),g(xo,"class","relative group"),g(Yr,"href","/docs/transformers/v4.29.0/en/main_classes/model#transformers.TFPreTrainedModel"),g(Ka,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),g(Ka,"rel","nofollow"),g(Zr,"href","/docs/transformers/v4.29.0/en/model_doc/camembert#transformers.TFCamembertForSequenceClassification"),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(at,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),g(Nn,"id","transformers.TFCamembertForMultipleChoice"),g(Nn,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),g(Nn,"href","#transformers.TFCamembertForMultipleChoice"),g(Ao,"class","relative group"),g(ei,"href","/docs/transformers/v4.29.0/en/main_classes/model#transformers.TFPreTrainedModel"),g(Xa,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),g(Xa,"rel","nofollow"),g(ti,"href","/docs/transformers/v4.29.0/en/model_doc/camembert#transformers.TFCamembertForMultipleChoice"),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(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(Wn,"id","transformers.TFCamembertForTokenClassification"),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.TFCamembertForTokenClassification"),g(Lo,"class","relative group"),g(oi,"href","/docs/transformers/v4.29.0/en/main_classes/model#transformers.TFPreTrainedModel"),g(nr,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),g(nr,"rel","nofollow"),g(ni,"href","/docs/transformers/v4.29.0/en/model_doc/camembert#transformers.TFCamembertForTokenClassification"),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(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(Hn,"id","transformers.TFCamembertForQuestionAnswering"),g(Hn,"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(Hn,"href","#transformers.TFCamembertForQuestionAnswering"),g(No,"class","relative group"),g(si,"href","/docs/transformers/v4.29.0/en/main_classes/model#transformers.TFPreTrainedModel"),g(dr,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),g(dr,"rel","nofollow"),g(ai,"href","/docs/transformers/v4.29.0/en/model_doc/camembert#transformers.TFCamembertForQuestionAnswering"),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(lt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(i,b){e(document.head,d),_(i,k,b),_(i,h,b),e(h,u),e(u,y),C(l,y,null),e(h,c),e(h,q),e(q,ke),_(i,pe,b),_(i,I,b),e(I,ae),e(ae,Y),C(v,Y,null),e(I,ye),e(I,H),e(H,ve),_(i,he,b),_(i,W,b),e(W,Te),e(W,ie),e(ie,V),e(W,we),_(i,ue,b),_(i,R,b),e(R,Ce),_(i,fe,b),_(i,B,b),e(B,me),e(me,$e),_(i,te,b),_(i,j,b),e(j,L),_(i,ge,b),_(i,U,b),e(U,le),e(le,Fe),e(le,K),e(K,Ee),e(le,Me),_(i,P,b),_(i,oe,b),e(oe,J),e(oe,de),e(de,ze),e(oe,G),e(oe,ce),e(ce,qe),e(oe,N),_(i,_e,b),_(i,S,b),e(S,re),e(re,Z),C(A,Z,null),e(S,xe),e(S,O),e(O,je),_(i,be,b),_(i,f,b),e(f,M),e(M,Pe),e(Pe,ne),e(f,Re),e(f,Ie),e(Ie,z),e(z,Be),e(f,Ue),e(f,Se),e(Se,Le),e(Le,Ke),e(f,D),e(f,Q),e(Q,Oe),e(Oe,He),e(f,X),e(f,We),e(We,Ne),e(Ne,Ae),e(f,Qe),e(f,ee),e(ee,De),e(De,_m),_(i,Ad,b),_(i,ro,b),e(ro,Wo),e(Wo,Ci),C(ds,Ci,null),e(ro,bm),e(ro,$i),e($i,km),_(i,Pd,b),_(i,$t,b),C(cs,$t,null),e($t,ym),e($t,Bt),e(Bt,vm),e(Bt,_r),e(_r,Tm),e(Bt,wm),e(Bt,br),e(br,Cm),e(Bt,$m),e(Bt,ms),e(ms,Fm),e(Bt,Em),e($t,Mm),e($t,io),e(io,zm),e(io,kr),e(kr,qm),e(io,xm),e(io,yr),e(yr,jm),e(io,Am),e($t,Pm),C(Ro,$t,null),_(i,Ld,b),_(i,lo,b),e(lo,Bo),e(Bo,Fi),C(ps,Fi,null),e(lo,Lm),e(lo,Ei),e(Ei,Om),_(i,Od,b),_(i,et,b),C(hs,et,null),e(et,Nm),e(et,Ut),e(Ut,Dm),e(Ut,vr),e(vr,Im),e(Ut,Sm),e(Ut,Tr),e(Tr,Wm),e(Ut,Rm),e(Ut,us),e(us,Bm),e(Ut,Um),e(et,Km),e(et,fs),e(fs,Hm),e(fs,wr),e(wr,Qm),e(fs,Vm),e(et,Jm),e(et,Kt),C(gs,Kt,null),e(Kt,Gm),e(Kt,Mi),e(Mi,Xm),e(Kt,Ym),e(Kt,_s),e(_s,Cr),e(Cr,Zm),e(Cr,zi),e(zi,ep),e(_s,tp),e(_s,$r),e($r,op),e($r,qi),e(qi,np),e(et,sp),e(et,Uo),C(bs,Uo,null),e(Uo,ap),e(Uo,ks),e(ks,rp),e(ks,xi),e(xi,ip),e(ks,lp),e(et,dp),e(et,Ko),C(ys,Ko,null),e(Ko,cp),e(Ko,ji),e(ji,mp),e(et,pp),e(et,Fr),C(vs,Fr,null),_(i,Nd,b),_(i,co,b),e(co,Ho),e(Ho,Ai),C(Ts,Ai,null),e(co,hp),e(co,Pi),e(Pi,up),_(i,Dd,b),_(i,ct,b),C(ws,ct,null),e(ct,fp),e(ct,Ft),e(Ft,gp),e(Ft,Li),e(Li,_p),e(Ft,bp),e(Ft,Er),e(Er,kp),e(Ft,yp),e(Ft,Mr),e(Mr,vp),e(Ft,Tp),e(Ft,Cs),e(Cs,wp),e(Ft,Cp),e(ct,$p),e(ct,$s),e($s,Fp),e($s,zr),e(zr,Ep),e($s,Mp),e(ct,zp),e(ct,Ht),C(Fs,Ht,null),e(Ht,qp),e(Ht,Oi),e(Oi,xp),e(Ht,jp),e(Ht,Es),e(Es,qr),e(qr,Ap),e(qr,Ni),e(Ni,Pp),e(Es,Lp),e(Es,xr),e(xr,Op),e(xr,Di),e(Di,Np),e(ct,Dp),e(ct,Qo),C(Ms,Qo,null),e(Qo,Ip),e(Qo,Ii),e(Ii,Sp),_(i,Id,b),_(i,mo,b),e(mo,Vo),e(Vo,Si),C(zs,Si,null),e(mo,Wp),e(mo,Wi),e(Wi,Rp),_(i,Sd,b),_(i,Ve,b),C(qs,Ve,null),e(Ve,Bp),e(Ve,Ri),e(Ri,Up),e(Ve,Kp),e(Ve,xs),e(xs,Hp),e(xs,jr),e(jr,Qp),e(xs,Vp),e(Ve,Jp),e(Ve,js),e(js,Gp),e(js,As),e(As,Xp),e(js,Yp),e(Ve,Zp),e(Ve,Ps),e(Ps,eh),e(Ps,Bi),e(Bi,th),e(Ps,oh),e(Ve,nh),e(Ve,tt),e(tt,sh),e(tt,Ui),e(Ui,ah),e(tt,rh),e(tt,Ki),e(Ki,ih),e(tt,lh),e(tt,Hi),e(Hi,dh),e(tt,ch),e(tt,Qi),e(Qi,mh),e(tt,ph),e(tt,Vi),e(Vi,hh),e(tt,uh),e(tt,Ji),e(Ji,fh),e(tt,gh),e(Ve,_h),e(Ve,Jo),e(Jo,bh),e(Jo,Gi),e(Gi,kh),e(Jo,yh),e(Jo,Ls),e(Ls,vh),e(Ve,Th),e(Ve,Et),C(Os,Et,null),e(Et,wh),e(Et,po),e(po,Ch),e(po,Ar),e(Ar,$h),e(po,Fh),e(po,Xi),e(Xi,Eh),e(po,Mh),e(Et,zh),C(Go,Et,null),e(Et,qh),C(Xo,Et,null),_(i,Wd,b),_(i,ho,b),e(ho,Yo),e(Yo,Yi),C(Ns,Yi,null),e(ho,xh),e(ho,Zi),e(Zi,jh),_(i,Rd,b),_(i,mt,b),C(Ds,mt,null),e(mt,Ah),e(mt,Is),e(Is,Ph),e(Is,el),e(el,Lh),e(Is,Oh),e(mt,Nh),e(mt,Ss),e(Ss,Dh),e(Ss,Pr),e(Pr,Ih),e(Ss,Sh),e(mt,Wh),e(mt,Ws),e(Ws,Rh),e(Ws,Rs),e(Rs,Bh),e(Ws,Uh),e(mt,Kh),e(mt,Mt),C(Bs,Mt,null),e(Mt,Hh),e(Mt,uo),e(uo,Qh),e(uo,Lr),e(Lr,Vh),e(uo,Jh),e(uo,tl),e(tl,Gh),e(uo,Xh),e(Mt,Yh),C(Zo,Mt,null),e(Mt,Zh),C(en,Mt,null),_(i,Bd,b),_(i,fo,b),e(fo,tn),e(tn,ol),C(Us,ol,null),e(fo,eu),e(fo,nl),e(nl,tu),_(i,Ud,b),_(i,pt,b),C(Ks,pt,null),e(pt,ou),e(pt,Hs),e(Hs,nu),e(Hs,sl),e(sl,su),e(Hs,au),e(pt,ru),e(pt,Qs),e(Qs,iu),e(Qs,Or),e(Or,lu),e(Qs,du),e(pt,cu),e(pt,Vs),e(Vs,mu),e(Vs,Js),e(Js,pu),e(Vs,hu),e(pt,uu),e(pt,zt),C(Gs,zt,null),e(zt,fu),e(zt,go),e(go,gu),e(go,Nr),e(Nr,_u),e(go,bu),e(go,al),e(al,ku),e(go,yu),e(zt,vu),C(on,zt,null),e(zt,Tu),C(nn,zt,null),_(i,Kd,b),_(i,_o,b),e(_o,sn),e(sn,rl),C(Xs,rl,null),e(_o,wu),e(_o,il),e(il,Cu),_(i,Hd,b),_(i,ht,b),C(Ys,ht,null),e(ht,$u),e(ht,ll),e(ll,Fu),e(ht,Eu),e(ht,Zs),e(Zs,Mu),e(Zs,Dr),e(Dr,zu),e(Zs,qu),e(ht,xu),e(ht,ea),e(ea,ju),e(ea,ta),e(ta,Au),e(ea,Pu),e(ht,Lu),e(ht,bt),C(oa,bt,null),e(bt,Ou),e(bt,bo),e(bo,Nu),e(bo,Ir),e(Ir,Du),e(bo,Iu),e(bo,dl),e(dl,Su),e(bo,Wu),e(bt,Ru),C(an,bt,null),e(bt,Bu),C(rn,bt,null),e(bt,Uu),C(ln,bt,null),_(i,Qd,b),_(i,ko,b),e(ko,dn),e(dn,cl),C(na,cl,null),e(ko,Ku),e(ko,ml),e(ml,Hu),_(i,Vd,b),_(i,ut,b),C(sa,ut,null),e(ut,Qu),e(ut,pl),e(pl,Vu),e(ut,Ju),e(ut,aa),e(aa,Gu),e(aa,Sr),e(Sr,Xu),e(aa,Yu),e(ut,Zu),e(ut,ra),e(ra,ef),e(ra,ia),e(ia,tf),e(ra,of),e(ut,nf),e(ut,qt),C(la,qt,null),e(qt,sf),e(qt,yo),e(yo,af),e(yo,Wr),e(Wr,rf),e(yo,lf),e(yo,hl),e(hl,df),e(yo,cf),e(qt,mf),C(cn,qt,null),e(qt,pf),C(mn,qt,null),_(i,Jd,b),_(i,vo,b),e(vo,pn),e(pn,ul),C(da,ul,null),e(vo,hf),e(vo,fl),e(fl,uf),_(i,Gd,b),_(i,ft,b),C(ca,ft,null),e(ft,ff),e(ft,gl),e(gl,gf),e(ft,_f),e(ft,ma),e(ma,bf),e(ma,Rr),e(Rr,kf),e(ma,yf),e(ft,vf),e(ft,pa),e(pa,Tf),e(pa,ha),e(ha,wf),e(pa,Cf),e(ft,$f),e(ft,xt),C(ua,xt,null),e(xt,Ff),e(xt,To),e(To,Ef),e(To,Br),e(Br,Mf),e(To,zf),e(To,_l),e(_l,qf),e(To,xf),e(xt,jf),C(hn,xt,null),e(xt,Af),C(un,xt,null),_(i,Xd,b),_(i,wo,b),e(wo,fn),e(fn,bl),C(fa,bl,null),e(wo,Pf),e(wo,kl),e(kl,Lf),_(i,Yd,b),_(i,gt,b),C(ga,gt,null),e(gt,Of),e(gt,gn),e(gn,Nf),e(gn,yl),e(yl,Df),e(gn,If),e(gn,vl),e(vl,Sf),e(gt,Wf),e(gt,_a),e(_a,Rf),e(_a,Ur),e(Ur,Bf),e(_a,Uf),e(gt,Kf),e(gt,ba),e(ba,Hf),e(ba,ka),e(ka,Qf),e(ba,Vf),e(gt,Jf),e(gt,jt),C(ya,jt,null),e(jt,Gf),e(jt,Co),e(Co,Xf),e(Co,Kr),e(Kr,Yf),e(Co,Zf),e(Co,Tl),e(Tl,eg),e(Co,tg),e(jt,og),C(_n,jt,null),e(jt,ng),C(bn,jt,null),_(i,Zd,b),_(i,$o,b),e($o,kn),e(kn,wl),C(va,wl,null),e($o,sg),e($o,Cl),e(Cl,ag),_(i,ec,b),_(i,ot,b),C(Ta,ot,null),e(ot,rg),e(ot,$l),e($l,ig),e(ot,lg),e(ot,wa),e(wa,dg),e(wa,Hr),e(Hr,cg),e(wa,mg),e(ot,pg),e(ot,Ca),e(Ca,hg),e(Ca,$a),e($a,ug),e(Ca,fg),e(ot,gg),C(yn,ot,null),e(ot,_g),e(ot,At),C(Fa,At,null),e(At,bg),e(At,Fo),e(Fo,kg),e(Fo,Qr),e(Qr,yg),e(Fo,vg),e(Fo,Fl),e(Fl,Tg),e(Fo,wg),e(At,Cg),C(vn,At,null),e(At,$g),C(Tn,At,null),_(i,tc,b),_(i,Eo,b),e(Eo,wn),e(wn,El),C(Ea,El,null),e(Eo,Fg),e(Eo,Ml),e(Ml,Eg),_(i,oc,b),_(i,nt,b),C(Ma,nt,null),e(nt,Mg),e(nt,za),e(za,zg),e(za,zl),e(zl,qg),e(za,xg),e(nt,jg),e(nt,qa),e(qa,Ag),e(qa,Vr),e(Vr,Pg),e(qa,Lg),e(nt,Og),e(nt,xa),e(xa,Ng),e(xa,ja),e(ja,Dg),e(xa,Ig),e(nt,Sg),C(Cn,nt,null),e(nt,Wg),e(nt,Pt),C(Aa,Pt,null),e(Pt,Rg),e(Pt,Mo),e(Mo,Bg),e(Mo,Jr),e(Jr,Ug),e(Mo,Kg),e(Mo,ql),e(ql,Hg),e(Mo,Qg),e(Pt,Vg),C($n,Pt,null),e(Pt,Jg),C(Fn,Pt,null),_(i,nc,b),_(i,zo,b),e(zo,En),e(En,xl),C(Pa,xl,null),e(zo,Gg),e(zo,jl),e(jl,Xg),_(i,sc,b),_(i,st,b),C(La,st,null),e(st,Yg),e(st,Oa),e(Oa,Zg),e(Oa,Al),e(Al,e_),e(Oa,t_),e(st,o_),e(st,Na),e(Na,n_),e(Na,Gr),e(Gr,s_),e(Na,a_),e(st,r_),e(st,Da),e(Da,i_),e(Da,Ia),e(Ia,l_),e(Da,d_),e(st,c_),C(Mn,st,null),e(st,m_),e(st,kt),C(Sa,kt,null),e(kt,p_),e(kt,qo),e(qo,h_),e(qo,Xr),e(Xr,u_),e(qo,f_),e(qo,Pl),e(Pl,g_),e(qo,__),e(kt,b_),C(zn,kt,null),e(kt,k_),C(qn,kt,null),e(kt,y_),C(xn,kt,null),_(i,ac,b),_(i,xo,b),e(xo,jn),e(jn,Ll),C(Wa,Ll,null),e(xo,v_),e(xo,Ol),e(Ol,T_),_(i,rc,b),_(i,at,b),C(Ra,at,null),e(at,w_),e(at,Nl),e(Nl,C_),e(at,$_),e(at,Ba),e(Ba,F_),e(Ba,Yr),e(Yr,E_),e(Ba,M_),e(at,z_),e(at,Ua),e(Ua,q_),e(Ua,Ka),e(Ka,x_),e(Ua,j_),e(at,A_),C(An,at,null),e(at,P_),e(at,yt),C(Ha,yt,null),e(yt,L_),e(yt,jo),e(jo,O_),e(jo,Zr),e(Zr,N_),e(jo,D_),e(jo,Dl),e(Dl,I_),e(jo,S_),e(yt,W_),C(Pn,yt,null),e(yt,R_),C(Ln,yt,null),e(yt,B_),C(On,yt,null),_(i,ic,b),_(i,Ao,b),e(Ao,Nn),e(Nn,Il),C(Qa,Il,null),e(Ao,U_),e(Ao,Sl),e(Sl,K_),_(i,lc,b),_(i,rt,b),C(Va,rt,null),e(rt,H_),e(rt,Wl),e(Wl,Q_),e(rt,V_),e(rt,Ja),e(Ja,J_),e(Ja,ei),e(ei,G_),e(Ja,X_),e(rt,Y_),e(rt,Ga),e(Ga,Z_),e(Ga,Xa),e(Xa,eb),e(Ga,tb),e(rt,ob),C(Dn,rt,null),e(rt,nb),e(rt,Lt),C(Ya,Lt,null),e(Lt,sb),e(Lt,Po),e(Po,ab),e(Po,ti),e(ti,rb),e(Po,ib),e(Po,Rl),e(Rl,lb),e(Po,db),e(Lt,cb),C(In,Lt,null),e(Lt,mb),C(Sn,Lt,null),_(i,dc,b),_(i,Lo,b),e(Lo,Wn),e(Wn,Bl),C(Za,Bl,null),e(Lo,pb),e(Lo,Ul),e(Ul,hb),_(i,cc,b),_(i,it,b),C(er,it,null),e(it,ub),e(it,Kl),e(Kl,fb),e(it,gb),e(it,tr),e(tr,_b),e(tr,oi),e(oi,bb),e(tr,kb),e(it,yb),e(it,or),e(or,vb),e(or,nr),e(nr,Tb),e(or,wb),e(it,Cb),C(Rn,it,null),e(it,$b),e(it,vt),C(sr,vt,null),e(vt,Fb),e(vt,Oo),e(Oo,Eb),e(Oo,ni),e(ni,Mb),e(Oo,zb),e(Oo,Hl),e(Hl,qb),e(Oo,xb),e(vt,jb),C(Bn,vt,null),e(vt,Ab),C(Un,vt,null),e(vt,Pb),C(Kn,vt,null),_(i,mc,b),_(i,No,b),e(No,Hn),e(Hn,Ql),C(ar,Ql,null),e(No,Lb),e(No,Vl),e(Vl,Ob),_(i,pc,b),_(i,lt,b),C(rr,lt,null),e(lt,Nb),e(lt,Do),e(Do,Db),e(Do,Jl),e(Jl,Ib),e(Do,Sb),e(Do,Gl),e(Gl,Wb),e(Do,Rb),e(lt,Bb),e(lt,ir),e(ir,Ub),e(ir,si),e(si,Kb),e(ir,Hb),e(lt,Qb),e(lt,lr),e(lr,Vb),e(lr,dr),e(dr,Jb),e(lr,Gb),e(lt,Xb),C(Qn,lt,null),e(lt,Yb),e(lt,Tt),C(cr,Tt,null),e(Tt,Zb),e(Tt,Io),e(Io,ek),e(Io,ai),e(ai,tk),e(Io,ok),e(Io,Xl),e(Xl,nk),e(Io,sk),e(Tt,ak),C(Vn,Tt,null),e(Tt,rk),C(Jn,Tt,null),e(Tt,ik),C(Gn,Tt,null),hc=!0},p(i,[b]){const mr={};b&2&&(mr.$$scope={dirty:b,ctx:i}),Ro.$set(mr);const Yl={};b&2&&(Yl.$$scope={dirty:b,ctx:i}),Go.$set(Yl);const Zl={};b&2&&(Zl.$$scope={dirty:b,ctx:i}),Xo.$set(Zl);const ed={};b&2&&(ed.$$scope={dirty:b,ctx:i}),Zo.$set(ed);const pr={};b&2&&(pr.$$scope={dirty:b,ctx:i}),en.$set(pr);const td={};b&2&&(td.$$scope={dirty:b,ctx:i}),on.$set(td);const od={};b&2&&(od.$$scope={dirty:b,ctx:i}),nn.$set(od);const nd={};b&2&&(nd.$$scope={dirty:b,ctx:i}),an.$set(nd);const hr={};b&2&&(hr.$$scope={dirty:b,ctx:i}),rn.$set(hr);const sd={};b&2&&(sd.$$scope={dirty:b,ctx:i}),ln.$set(sd);const ad={};b&2&&(ad.$$scope={dirty:b,ctx:i}),cn.$set(ad);const rd={};b&2&&(rd.$$scope={dirty:b,ctx:i}),mn.$set(rd);const id={};b&2&&(id.$$scope={dirty:b,ctx:i}),hn.$set(id);const ld={};b&2&&(ld.$$scope={dirty:b,ctx:i}),un.$set(ld);const dd={};b&2&&(dd.$$scope={dirty:b,ctx:i}),_n.$set(dd);const ur={};b&2&&(ur.$$scope={dirty:b,ctx:i}),bn.$set(ur);const cd={};b&2&&(cd.$$scope={dirty:b,ctx:i}),yn.$set(cd);const So={};b&2&&(So.$$scope={dirty:b,ctx:i}),vn.$set(So);const md={};b&2&&(md.$$scope={dirty:b,ctx:i}),Tn.$set(md);const pd={};b&2&&(pd.$$scope={dirty:b,ctx:i}),Cn.$set(pd);const fr={};b&2&&(fr.$$scope={dirty:b,ctx:i}),$n.$set(fr);const hd={};b&2&&(hd.$$scope={dirty:b,ctx:i}),Fn.$set(hd);const ud={};b&2&&(ud.$$scope={dirty:b,ctx:i}),Mn.$set(ud);const fd={};b&2&&(fd.$$scope={dirty:b,ctx:i}),zn.$set(fd);const _t={};b&2&&(_t.$$scope={dirty:b,ctx:i}),qn.$set(_t);const gd={};b&2&&(gd.$$scope={dirty:b,ctx:i}),xn.$set(gd);const _d={};b&2&&(_d.$$scope={dirty:b,ctx:i}),An.$set(_d);const bd={};b&2&&(bd.$$scope={dirty:b,ctx:i}),Pn.$set(bd);const kd={};b&2&&(kd.$$scope={dirty:b,ctx:i}),Ln.$set(kd);const yd={};b&2&&(yd.$$scope={dirty:b,ctx:i}),On.$set(yd);const vd={};b&2&&(vd.$$scope={dirty:b,ctx:i}),Dn.$set(vd);const Td={};b&2&&(Td.$$scope={dirty:b,ctx:i}),In.$set(Td);const wd={};b&2&&(wd.$$scope={dirty:b,ctx:i}),Sn.$set(wd);const Cd={};b&2&&(Cd.$$scope={dirty:b,ctx:i}),Rn.$set(Cd);const $d={};b&2&&($d.$$scope={dirty:b,ctx:i}),Bn.$set($d);const Fd={};b&2&&(Fd.$$scope={dirty:b,ctx:i}),Un.$set(Fd);const Ed={};b&2&&(Ed.$$scope={dirty:b,ctx:i}),Kn.$set(Ed);const gr={};b&2&&(gr.$$scope={dirty:b,ctx:i}),Qn.$set(gr);const Md={};b&2&&(Md.$$scope={dirty:b,ctx:i}),Vn.$set(Md);const zd={};b&2&&(zd.$$scope={dirty:b,ctx:i}),Jn.$set(zd);const qd={};b&2&&(qd.$$scope={dirty:b,ctx:i}),Gn.$set(qd)},i(i){hc||($(l.$$.fragment,i),$(v.$$.fragment,i),$(A.$$.fragment,i),$(ds.$$.fragment,i),$(cs.$$.fragment,i),$(Ro.$$.fragment,i),$(ps.$$.fragment,i),$(hs.$$.fragment,i),$(gs.$$.fragment,i),$(bs.$$.fragment,i),$(ys.$$.fragment,i),$(vs.$$.fragment,i),$(Ts.$$.fragment,i),$(ws.$$.fragment,i),$(Fs.$$.fragment,i),$(Ms.$$.fragment,i),$(zs.$$.fragment,i),$(qs.$$.fragment,i),$(Os.$$.fragment,i),$(Go.$$.fragment,i),$(Xo.$$.fragment,i),$(Ns.$$.fragment,i),$(Ds.$$.fragment,i),$(Bs.$$.fragment,i),$(Zo.$$.fragment,i),$(en.$$.fragment,i),$(Us.$$.fragment,i),$(Ks.$$.fragment,i),$(Gs.$$.fragment,i),$(on.$$.fragment,i),$(nn.$$.fragment,i),$(Xs.$$.fragment,i),$(Ys.$$.fragment,i),$(oa.$$.fragment,i),$(an.$$.fragment,i),$(rn.$$.fragment,i),$(ln.$$.fragment,i),$(na.$$.fragment,i),$(sa.$$.fragment,i),$(la.$$.fragment,i),$(cn.$$.fragment,i),$(mn.$$.fragment,i),$(da.$$.fragment,i),$(ca.$$.fragment,i),$(ua.$$.fragment,i),$(hn.$$.fragment,i),$(un.$$.fragment,i),$(fa.$$.fragment,i),$(ga.$$.fragment,i),$(ya.$$.fragment,i),$(_n.$$.fragment,i),$(bn.$$.fragment,i),$(va.$$.fragment,i),$(Ta.$$.fragment,i),$(yn.$$.fragment,i),$(Fa.$$.fragment,i),$(vn.$$.fragment,i),$(Tn.$$.fragment,i),$(Ea.$$.fragment,i),$(Ma.$$.fragment,i),$(Cn.$$.fragment,i),$(Aa.$$.fragment,i),$($n.$$.fragment,i),$(Fn.$$.fragment,i),$(Pa.$$.fragment,i),$(La.$$.fragment,i),$(Mn.$$.fragment,i),$(Sa.$$.fragment,i),$(zn.$$.fragment,i),$(qn.$$.fragment,i),$(xn.$$.fragment,i),$(Wa.$$.fragment,i),$(Ra.$$.fragment,i),$(An.$$.fragment,i),$(Ha.$$.fragment,i),$(Pn.$$.fragment,i),$(Ln.$$.fragment,i),$(On.$$.fragment,i),$(Qa.$$.fragment,i),$(Va.$$.fragment,i),$(Dn.$$.fragment,i),$(Ya.$$.fragment,i),$(In.$$.fragment,i),$(Sn.$$.fragment,i),$(Za.$$.fragment,i),$(er.$$.fragment,i),$(Rn.$$.fragment,i),$(sr.$$.fragment,i),$(Bn.$$.fragment,i),$(Un.$$.fragment,i),$(Kn.$$.fragment,i),$(ar.$$.fragment,i),$(rr.$$.fragment,i),$(Qn.$$.fragment,i),$(cr.$$.fragment,i),$(Vn.$$.fragment,i),$(Jn.$$.fragment,i),$(Gn.$$.fragment,i),hc=!0)},o(i){F(l.$$.fragment,i),F(v.$$.fragment,i),F(A.$$.fragment,i),F(ds.$$.fragment,i),F(cs.$$.fragment,i),F(Ro.$$.fragment,i),F(ps.$$.fragment,i),F(hs.$$.fragment,i),F(gs.$$.fragment,i),F(bs.$$.fragment,i),F(ys.$$.fragment,i),F(vs.$$.fragment,i),F(Ts.$$.fragment,i),F(ws.$$.fragment,i),F(Fs.$$.fragment,i),F(Ms.$$.fragment,i),F(zs.$$.fragment,i),F(qs.$$.fragment,i),F(Os.$$.fragment,i),F(Go.$$.fragment,i),F(Xo.$$.fragment,i),F(Ns.$$.fragment,i),F(Ds.$$.fragment,i),F(Bs.$$.fragment,i),F(Zo.$$.fragment,i),F(en.$$.fragment,i),F(Us.$$.fragment,i),F(Ks.$$.fragment,i),F(Gs.$$.fragment,i),F(on.$$.fragment,i),F(nn.$$.fragment,i),F(Xs.$$.fragment,i),F(Ys.$$.fragment,i),F(oa.$$.fragment,i),F(an.$$.fragment,i),F(rn.$$.fragment,i),F(ln.$$.fragment,i),F(na.$$.fragment,i),F(sa.$$.fragment,i),F(la.$$.fragment,i),F(cn.$$.fragment,i),F(mn.$$.fragment,i),F(da.$$.fragment,i),F(ca.$$.fragment,i),F(ua.$$.fragment,i),F(hn.$$.fragment,i),F(un.$$.fragment,i),F(fa.$$.fragment,i),F(ga.$$.fragment,i),F(ya.$$.fragment,i),F(_n.$$.fragment,i),F(bn.$$.fragment,i),F(va.$$.fragment,i),F(Ta.$$.fragment,i),F(yn.$$.fragment,i),F(Fa.$$.fragment,i),F(vn.$$.fragment,i),F(Tn.$$.fragment,i),F(Ea.$$.fragment,i),F(Ma.$$.fragment,i),F(Cn.$$.fragment,i),F(Aa.$$.fragment,i),F($n.$$.fragment,i),F(Fn.$$.fragment,i),F(Pa.$$.fragment,i),F(La.$$.fragment,i),F(Mn.$$.fragment,i),F(Sa.$$.fragment,i),F(zn.$$.fragment,i),F(qn.$$.fragment,i),F(xn.$$.fragment,i),F(Wa.$$.fragment,i),F(Ra.$$.fragment,i),F(An.$$.fragment,i),F(Ha.$$.fragment,i),F(Pn.$$.fragment,i),F(Ln.$$.fragment,i),F(On.$$.fragment,i),F(Qa.$$.fragment,i),F(Va.$$.fragment,i),F(Dn.$$.fragment,i),F(Ya.$$.fragment,i),F(In.$$.fragment,i),F(Sn.$$.fragment,i),F(Za.$$.fragment,i),F(er.$$.fragment,i),F(Rn.$$.fragment,i),F(sr.$$.fragment,i),F(Bn.$$.fragment,i),F(Un.$$.fragment,i),F(Kn.$$.fragment,i),F(ar.$$.fragment,i),F(rr.$$.fragment,i),F(Qn.$$.fragment,i),F(cr.$$.fragment,i),F(Vn.$$.fragment,i),F(Jn.$$.fragment,i),F(Gn.$$.fragment,i),hc=!1},d(i){t(d),i&&t(k),i&&t(h),E(l),i&&t(pe),i&&t(I),E(v),i&&t(he),i&&t(W),i&&t(ue),i&&t(R),i&&t(fe),i&&t(B),i&&t(te),i&&t(j),i&&t(ge),i&&t(U),i&&t(P),i&&t(oe),i&&t(_e),i&&t(S),E(A),i&&t(be),i&&t(f),i&&t(Ad),i&&t(ro),E(ds),i&&t(Pd),i&&t($t),E(cs),E(Ro),i&&t(Ld),i&&t(lo),E(ps),i&&t(Od),i&&t(et),E(hs),E(gs),E(bs),E(ys),E(vs),i&&t(Nd),i&&t(co),E(Ts),i&&t(Dd),i&&t(ct),E(ws),E(Fs),E(Ms),i&&t(Id),i&&t(mo),E(zs),i&&t(Sd),i&&t(Ve),E(qs),E(Os),E(Go),E(Xo),i&&t(Wd),i&&t(ho),E(Ns),i&&t(Rd),i&&t(mt),E(Ds),E(Bs),E(Zo),E(en),i&&t(Bd),i&&t(fo),E(Us),i&&t(Ud),i&&t(pt),E(Ks),E(Gs),E(on),E(nn),i&&t(Kd),i&&t(_o),E(Xs),i&&t(Hd),i&&t(ht),E(Ys),E(oa),E(an),E(rn),E(ln),i&&t(Qd),i&&t(ko),E(na),i&&t(Vd),i&&t(ut),E(sa),E(la),E(cn),E(mn),i&&t(Jd),i&&t(vo),E(da),i&&t(Gd),i&&t(ft),E(ca),E(ua),E(hn),E(un),i&&t(Xd),i&&t(wo),E(fa),i&&t(Yd),i&&t(gt),E(ga),E(ya),E(_n),E(bn),i&&t(Zd),i&&t($o),E(va),i&&t(ec),i&&t(ot),E(Ta),E(yn),E(Fa),E(vn),E(Tn),i&&t(tc),i&&t(Eo),E(Ea),i&&t(oc),i&&t(nt),E(Ma),E(Cn),E(Aa),E($n),E(Fn),i&&t(nc),i&&t(zo),E(Pa),i&&t(sc),i&&t(st),E(La),E(Mn),E(Sa),E(zn),E(qn),E(xn),i&&t(ac),i&&t(xo),E(Wa),i&&t(rc),i&&t(at),E(Ra),E(An),E(Ha),E(Pn),E(Ln),E(On),i&&t(ic),i&&t(Ao),E(Qa),i&&t(lc),i&&t(rt),E(Va),E(Dn),E(Ya),E(In),E(Sn),i&&t(dc),i&&t(Lo),E(Za),i&&t(cc),i&&t(it),E(er),E(Rn),E(sr),E(Bn),E(Un),E(Kn),i&&t(mc),i&&t(No),E(ar),i&&t(pc),i&&t(lt),E(rr),E(Qn),E(cr),E(Vn),E(Jn),E(Gn)}}}const GT={local:"camembert",sections:[{local:"overview",title:"Overview"},{local:"documentation-resources",title:"Documentation resources"},{local:"transformers.CamembertConfig",title:"CamembertConfig"},{local:"transformers.CamembertTokenizer",title:"CamembertTokenizer"},{local:"transformers.CamembertTokenizerFast",title:"CamembertTokenizerFast"},{local:"transformers.CamembertModel",title:"CamembertModel"},{local:"transformers.CamembertForCausalLM",title:"CamembertForCausalLM"},{local:"transformers.CamembertForMaskedLM",title:"CamembertForMaskedLM"},{local:"transformers.CamembertForSequenceClassification",title:"CamembertForSequenceClassification"},{local:"transformers.CamembertForMultipleChoice",title:"CamembertForMultipleChoice"},{local:"transformers.CamembertForTokenClassification",title:"CamembertForTokenClassification"},{local:"transformers.CamembertForQuestionAnswering",title:"CamembertForQuestionAnswering"},{local:"transformers.TFCamembertModel",title:"TFCamembertModel"},{local:"transformers.TFCamembertForCausalLM",title:"TFCamembertForCasualLM"},{local:"transformers.TFCamembertForMaskedLM",title:"TFCamembertForMaskedLM"},{local:"transformers.TFCamembertForSequenceClassification",title:"TFCamembertForSequenceClassification"},{local:"transformers.TFCamembertForMultipleChoice",title:"TFCamembertForMultipleChoice"},{local:"transformers.TFCamembertForTokenClassification",title:"TFCamembertForTokenClassification"},{local:"transformers.TFCamembertForQuestionAnswering",title:"TFCamembertForQuestionAnswering"}],title:"CamemBERT"};function XT(x){return iT(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class sw extends nT{constructor(d){super();sT(this,d,XT,JT,aT,{})}}export{sw as default,GT as metadata};
