import{S as Xj,i as Yj,s as Zj,e as a,k as p,w as v,t as o,M as e3,c as r,d as t,m as h,a as i,x as w,h as n,b as c,G as e,g,y as T,q as $,o as F,B as x,v as t3,L as me}from"../../chunks/vendor-hf-doc-builder.js";import{T as he}from"../../chunks/Tip-hf-doc-builder.js";import{D as O}from"../../chunks/Docstring-hf-doc-builder.js";import{C as fe}from"../../chunks/CodeBlock-hf-doc-builder.js";import{I as De}from"../../chunks/IconCopyLink-hf-doc-builder.js";import{E as ue}from"../../chunks/ExampleCodeBlock-hf-doc-builder.js";import{P as yb}from"../../chunks/PipelineTag-hf-doc-builder.js";function o3(E){let d,k,m,f,b;return f=new fe({props:{code:`from transformers import RobertaConfig, RobertaModel

# Initializing a RoBERTa configuration
configuration = RobertaConfig()

# Initializing a model (with random weights) from the configuration
model = RobertaModel(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> RobertaConfig, RobertaModel

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a RoBERTa configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = RobertaConfig()

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a model (with random weights) from the configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = RobertaModel(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=a("p"),k=o("Examples:"),m=p(),v(f.$$.fragment)},l(l){d=r(l,"P",{});var u=i(d);k=n(u,"Examples:"),u.forEach(t),m=h(l),w(f.$$.fragment,l)},m(l,u){g(l,d,u),e(d,k),g(l,m,u),T(f,l,u),b=!0},p:me,i(l){b||($(f.$$.fragment,l),b=!0)},o(l){F(f.$$.fragment,l),b=!1},d(l){l&&t(d),l&&t(m),x(f,l)}}}function n3(E){let d,k,m,f,b;return f=new fe({props:{code:`from transformers import RobertaTokenizer
tokenizer = RobertaTokenizer.from_pretrained("roberta-base")
tokenizer("Hello world")['input_ids']
tokenizer(" Hello world")['input_ids']`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt;</span> <span class="language-python"><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> RobertaTokenizer</span>
<span class="hljs-meta">&gt;&gt;&gt;</span> <span class="language-python">tokenizer = RobertaTokenizer.from_pretrained(<span class="hljs-string">&quot;roberta-base&quot;</span>)</span>
<span class="hljs-meta">&gt;&gt;&gt;</span> <span class="language-python">tokenizer(<span class="hljs-string">&quot;Hello world&quot;</span>)[<span class="hljs-string">&#x27;input_ids&#x27;</span>]</span>
[0, 31414, 232, 328, 2]
<span class="hljs-meta">&gt;&gt;&gt;</span> <span class="language-python">tokenizer(<span class="hljs-string">&quot; Hello world&quot;</span>)[<span class="hljs-string">&#x27;input_ids&#x27;</span>]</span>
[0, 20920, 232, 2]`}}),{c(){d=a("p"),k=o("be encoded differently whether it is at the beginning of the sentence (without space) or not:"),m=p(),v(f.$$.fragment)},l(l){d=r(l,"P",{});var u=i(d);k=n(u,"be encoded differently whether it is at the beginning of the sentence (without space) or not:"),u.forEach(t),m=h(l),w(f.$$.fragment,l)},m(l,u){g(l,d,u),e(d,k),g(l,m,u),T(f,l,u),b=!0},p:me,i(l){b||($(f.$$.fragment,l),b=!0)},o(l){F(f.$$.fragment,l),b=!1},d(l){l&&t(d),l&&t(m),x(f,l)}}}function s3(E){let d,k,m,f,b;return{c(){d=a("p"),k=o("When used with "),m=a("code"),f=o("is_split_into_words=True"),b=o(", this tokenizer will add a space before each word (even the first one).")},l(l){d=r(l,"P",{});var u=i(d);k=n(u,"When used with "),m=r(u,"CODE",{});var R=i(m);f=n(R,"is_split_into_words=True"),R.forEach(t),b=n(u,", this tokenizer will add a space before each word (even the first one)."),u.forEach(t)},m(l,u){g(l,d,u),e(d,k),e(d,m),e(m,f),e(d,b)},d(l){l&&t(d)}}}function a3(E){let d,k,m,f,b;return f=new fe({props:{code:`from transformers import RobertaTokenizerFast
tokenizer = RobertaTokenizerFast.from_pretrained("roberta-base")
tokenizer("Hello world")['input_ids']
tokenizer(" Hello world")['input_ids']`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt;</span> <span class="language-python"><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> RobertaTokenizerFast</span>
<span class="hljs-meta">&gt;&gt;&gt;</span> <span class="language-python">tokenizer = RobertaTokenizerFast.from_pretrained(<span class="hljs-string">&quot;roberta-base&quot;</span>)</span>
<span class="hljs-meta">&gt;&gt;&gt;</span> <span class="language-python">tokenizer(<span class="hljs-string">&quot;Hello world&quot;</span>)[<span class="hljs-string">&#x27;input_ids&#x27;</span>]</span>
[0, 31414, 232, 328, 2]
<span class="hljs-meta">&gt;&gt;&gt;</span> <span class="language-python">tokenizer(<span class="hljs-string">&quot; Hello world&quot;</span>)[<span class="hljs-string">&#x27;input_ids&#x27;</span>]</span>
[0, 20920, 232, 2]`}}),{c(){d=a("p"),k=o("be encoded differently whether it is at the beginning of the sentence (without space) or not:"),m=p(),v(f.$$.fragment)},l(l){d=r(l,"P",{});var u=i(d);k=n(u,"be encoded differently whether it is at the beginning of the sentence (without space) or not:"),u.forEach(t),m=h(l),w(f.$$.fragment,l)},m(l,u){g(l,d,u),e(d,k),g(l,m,u),T(f,l,u),b=!0},p:me,i(l){b||($(f.$$.fragment,l),b=!0)},o(l){F(f.$$.fragment,l),b=!1},d(l){l&&t(d),l&&t(m),x(f,l)}}}function r3(E){let d,k,m,f,b,l,u,R;return{c(){d=a("p"),k=o("When used with "),m=a("code"),f=o("is_split_into_words=True"),b=o(", this tokenizer needs to be instantiated with "),l=a("code"),u=o("add_prefix_space=True"),R=o(".")},l(ae){d=r(ae,"P",{});var Z=i(d);k=n(Z,"When used with "),m=r(Z,"CODE",{});var N=i(m);f=n(N,"is_split_into_words=True"),N.forEach(t),b=n(Z,", this tokenizer needs to be instantiated with "),l=r(Z,"CODE",{});var te=i(l);u=n(te,"add_prefix_space=True"),te.forEach(t),R=n(Z,"."),Z.forEach(t)},m(ae,Z){g(ae,d,Z),e(d,k),e(d,m),e(m,f),e(d,b),e(d,l),e(l,u),e(d,R)},d(ae){ae&&t(d)}}}function i3(E){let d,k,m,f,b;return{c(){d=a("p"),k=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),m=a("code"),f=o("Module"),b=o(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){d=r(l,"P",{});var u=i(d);k=n(u,"Although the recipe for forward pass needs to be defined within this function, one should call the "),m=r(u,"CODE",{});var R=i(m);f=n(R,"Module"),R.forEach(t),b=n(u,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),u.forEach(t)},m(l,u){g(l,d,u),e(d,k),e(d,m),e(m,f),e(d,b)},d(l){l&&t(d)}}}function l3(E){let d,k,m,f,b;return f=new fe({props:{code:`from transformers import AutoTokenizer, RobertaModel
import torch

tokenizer = AutoTokenizer.from_pretrained("roberta-base")
model = RobertaModel.from_pretrained("roberta-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, RobertaModel
<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;roberta-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = RobertaModel.from_pretrained(<span class="hljs-string">&quot;roberta-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=a("p"),k=o("Example:"),m=p(),v(f.$$.fragment)},l(l){d=r(l,"P",{});var u=i(d);k=n(u,"Example:"),u.forEach(t),m=h(l),w(f.$$.fragment,l)},m(l,u){g(l,d,u),e(d,k),g(l,m,u),T(f,l,u),b=!0},p:me,i(l){b||($(f.$$.fragment,l),b=!0)},o(l){F(f.$$.fragment,l),b=!1},d(l){l&&t(d),l&&t(m),x(f,l)}}}function d3(E){let d,k,m,f,b;return{c(){d=a("p"),k=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),m=a("code"),f=o("Module"),b=o(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){d=r(l,"P",{});var u=i(d);k=n(u,"Although the recipe for forward pass needs to be defined within this function, one should call the "),m=r(u,"CODE",{});var R=i(m);f=n(R,"Module"),R.forEach(t),b=n(u,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),u.forEach(t)},m(l,u){g(l,d,u),e(d,k),e(d,m),e(m,f),e(d,b)},d(l){l&&t(d)}}}function c3(E){let d,k,m,f,b;return f=new fe({props:{code:`from transformers import AutoTokenizer, RobertaForCausalLM, AutoConfig
import torch

tokenizer = AutoTokenizer.from_pretrained("roberta-base")
config = AutoConfig.from_pretrained("roberta-base")
config.is_decoder = True
model = RobertaForCausalLM.from_pretrained("roberta-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, RobertaForCausalLM, 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;roberta-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>config = AutoConfig.from_pretrained(<span class="hljs-string">&quot;roberta-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 = RobertaForCausalLM.from_pretrained(<span class="hljs-string">&quot;roberta-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=a("p"),k=o("Example:"),m=p(),v(f.$$.fragment)},l(l){d=r(l,"P",{});var u=i(d);k=n(u,"Example:"),u.forEach(t),m=h(l),w(f.$$.fragment,l)},m(l,u){g(l,d,u),e(d,k),g(l,m,u),T(f,l,u),b=!0},p:me,i(l){b||($(f.$$.fragment,l),b=!0)},o(l){F(f.$$.fragment,l),b=!1},d(l){l&&t(d),l&&t(m),x(f,l)}}}function p3(E){let d,k,m,f,b;return{c(){d=a("p"),k=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),m=a("code"),f=o("Module"),b=o(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){d=r(l,"P",{});var u=i(d);k=n(u,"Although the recipe for forward pass needs to be defined within this function, one should call the "),m=r(u,"CODE",{});var R=i(m);f=n(R,"Module"),R.forEach(t),b=n(u,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),u.forEach(t)},m(l,u){g(l,d,u),e(d,k),e(d,m),e(m,f),e(d,b)},d(l){l&&t(d)}}}function h3(E){let d,k,m,f,b;return f=new fe({props:{code:`from transformers import AutoTokenizer, RobertaForMaskedLM
import torch

tokenizer = AutoTokenizer.from_pretrained("roberta-base")
model = RobertaForMaskedLM.from_pretrained("roberta-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, RobertaForMaskedLM
<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;roberta-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = RobertaForMaskedLM.from_pretrained(<span class="hljs-string">&quot;roberta-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=a("p"),k=o("Example:"),m=p(),v(f.$$.fragment)},l(l){d=r(l,"P",{});var u=i(d);k=n(u,"Example:"),u.forEach(t),m=h(l),w(f.$$.fragment,l)},m(l,u){g(l,d,u),e(d,k),g(l,m,u),T(f,l,u),b=!0},p:me,i(l){b||($(f.$$.fragment,l),b=!0)},o(l){F(f.$$.fragment,l),b=!1},d(l){l&&t(d),l&&t(m),x(f,l)}}}function u3(E){let d,k,m,f,b;return{c(){d=a("p"),k=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),m=a("code"),f=o("Module"),b=o(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){d=r(l,"P",{});var u=i(d);k=n(u,"Although the recipe for forward pass needs to be defined within this function, one should call the "),m=r(u,"CODE",{});var R=i(m);f=n(R,"Module"),R.forEach(t),b=n(u,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),u.forEach(t)},m(l,u){g(l,d,u),e(d,k),e(d,m),e(m,f),e(d,b)},d(l){l&&t(d)}}}function m3(E){let d,k,m,f,b;return f=new fe({props:{code:`import torch
from transformers import AutoTokenizer, RobertaForSequenceClassification

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

<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 = RobertaForSequenceClassification.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 = RobertaForSequenceClassification.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=a("p"),k=o("Example of single-label classification:"),m=p(),v(f.$$.fragment)},l(l){d=r(l,"P",{});var u=i(d);k=n(u,"Example of single-label classification:"),u.forEach(t),m=h(l),w(f.$$.fragment,l)},m(l,u){g(l,d,u),e(d,k),g(l,m,u),T(f,l,u),b=!0},p:me,i(l){b||($(f.$$.fragment,l),b=!0)},o(l){F(f.$$.fragment,l),b=!1},d(l){l&&t(d),l&&t(m),x(f,l)}}}function f3(E){let d,k,m,f,b;return f=new fe({props:{code:`import torch
from transformers import AutoTokenizer, RobertaForSequenceClassification

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

<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 = RobertaForSequenceClassification.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 = RobertaForSequenceClassification.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=a("p"),k=o("Example of multi-label classification:"),m=p(),v(f.$$.fragment)},l(l){d=r(l,"P",{});var u=i(d);k=n(u,"Example of multi-label classification:"),u.forEach(t),m=h(l),w(f.$$.fragment,l)},m(l,u){g(l,d,u),e(d,k),g(l,m,u),T(f,l,u),b=!0},p:me,i(l){b||($(f.$$.fragment,l),b=!0)},o(l){F(f.$$.fragment,l),b=!1},d(l){l&&t(d),l&&t(m),x(f,l)}}}function g3(E){let d,k,m,f,b;return{c(){d=a("p"),k=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),m=a("code"),f=o("Module"),b=o(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){d=r(l,"P",{});var u=i(d);k=n(u,"Although the recipe for forward pass needs to be defined within this function, one should call the "),m=r(u,"CODE",{});var R=i(m);f=n(R,"Module"),R.forEach(t),b=n(u,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),u.forEach(t)},m(l,u){g(l,d,u),e(d,k),e(d,m),e(m,f),e(d,b)},d(l){l&&t(d)}}}function _3(E){let d,k,m,f,b;return f=new fe({props:{code:`from transformers import AutoTokenizer, RobertaForMultipleChoice
import torch

tokenizer = AutoTokenizer.from_pretrained("roberta-base")
model = RobertaForMultipleChoice.from_pretrained("roberta-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, RobertaForMultipleChoice
<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;roberta-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = RobertaForMultipleChoice.from_pretrained(<span class="hljs-string">&quot;roberta-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=a("p"),k=o("Example:"),m=p(),v(f.$$.fragment)},l(l){d=r(l,"P",{});var u=i(d);k=n(u,"Example:"),u.forEach(t),m=h(l),w(f.$$.fragment,l)},m(l,u){g(l,d,u),e(d,k),g(l,m,u),T(f,l,u),b=!0},p:me,i(l){b||($(f.$$.fragment,l),b=!0)},o(l){F(f.$$.fragment,l),b=!1},d(l){l&&t(d),l&&t(m),x(f,l)}}}function b3(E){let d,k,m,f,b;return{c(){d=a("p"),k=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),m=a("code"),f=o("Module"),b=o(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){d=r(l,"P",{});var u=i(d);k=n(u,"Although the recipe for forward pass needs to be defined within this function, one should call the "),m=r(u,"CODE",{});var R=i(m);f=n(R,"Module"),R.forEach(t),b=n(u,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),u.forEach(t)},m(l,u){g(l,d,u),e(d,k),e(d,m),e(m,f),e(d,b)},d(l){l&&t(d)}}}function k3(E){let d,k,m,f,b;return f=new fe({props:{code:`from transformers import AutoTokenizer, RobertaForTokenClassification
import torch

tokenizer = AutoTokenizer.from_pretrained("Jean-Baptiste/roberta-large-ner-english")
model = RobertaForTokenClassification.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, RobertaForTokenClassification
<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 = RobertaForTokenClassification.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=a("p"),k=o("Example:"),m=p(),v(f.$$.fragment)},l(l){d=r(l,"P",{});var u=i(d);k=n(u,"Example:"),u.forEach(t),m=h(l),w(f.$$.fragment,l)},m(l,u){g(l,d,u),e(d,k),g(l,m,u),T(f,l,u),b=!0},p:me,i(l){b||($(f.$$.fragment,l),b=!0)},o(l){F(f.$$.fragment,l),b=!1},d(l){l&&t(d),l&&t(m),x(f,l)}}}function y3(E){let d,k,m,f,b;return{c(){d=a("p"),k=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),m=a("code"),f=o("Module"),b=o(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){d=r(l,"P",{});var u=i(d);k=n(u,"Although the recipe for forward pass needs to be defined within this function, one should call the "),m=r(u,"CODE",{});var R=i(m);f=n(R,"Module"),R.forEach(t),b=n(u,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),u.forEach(t)},m(l,u){g(l,d,u),e(d,k),e(d,m),e(m,f),e(d,b)},d(l){l&&t(d)}}}function v3(E){let d,k,m,f,b;return f=new fe({props:{code:`from transformers import AutoTokenizer, RobertaForQuestionAnswering
import torch

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

tokenizer = AutoTokenizer.from_pretrained("roberta-base")
model = TFRobertaModel.from_pretrained("roberta-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, TFRobertaModel
<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;roberta-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFRobertaModel.from_pretrained(<span class="hljs-string">&quot;roberta-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=a("p"),k=o("Example:"),m=p(),v(f.$$.fragment)},l(l){d=r(l,"P",{});var u=i(d);k=n(u,"Example:"),u.forEach(t),m=h(l),w(f.$$.fragment,l)},m(l,u){g(l,d,u),e(d,k),g(l,m,u),T(f,l,u),b=!0},p:me,i(l){b||($(f.$$.fragment,l),b=!0)},o(l){F(f.$$.fragment,l),b=!1},d(l){l&&t(d),l&&t(m),x(f,l)}}}function F3(E){let d,k,m,f,b;return{c(){d=a("p"),k=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),m=a("code"),f=o("Module"),b=o(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){d=r(l,"P",{});var u=i(d);k=n(u,"Although the recipe for forward pass needs to be defined within this function, one should call the "),m=r(u,"CODE",{});var R=i(m);f=n(R,"Module"),R.forEach(t),b=n(u,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),u.forEach(t)},m(l,u){g(l,d,u),e(d,k),e(d,m),e(m,f),e(d,b)},d(l){l&&t(d)}}}function x3(E){let d,k,m,f,b;return f=new fe({props:{code:`from transformers import AutoTokenizer, TFRobertaForCausalLM
import tensorflow as tf

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

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

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

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

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

tokenizer = AutoTokenizer.from_pretrained("ydshieh/roberta-base-squad2")
model = TFRobertaForQuestionAnswering.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, TFRobertaForQuestionAnswering
<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 = TFRobertaForQuestionAnswering.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=a("p"),k=o("Example:"),m=p(),v(f.$$.fragment)},l(l){d=r(l,"P",{});var u=i(d);k=n(u,"Example:"),u.forEach(t),m=h(l),w(f.$$.fragment,l)},m(l,u){g(l,d,u),e(d,k),g(l,m,u),T(f,l,u),b=!0},p:me,i(l){b||($(f.$$.fragment,l),b=!0)},o(l){F(f.$$.fragment,l),b=!1},d(l){l&&t(d),l&&t(m),x(f,l)}}}function H3(E){let d,k;return d=new fe({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(){v(d.$$.fragment)},l(m){w(d.$$.fragment,m)},m(m,f){T(d,m,f),k=!0},p:me,i(m){k||($(d.$$.fragment,m),k=!0)},o(m){F(d.$$.fragment,m),k=!1},d(m){x(d,m)}}}function Q3(E){let d,k,m,f,b;return{c(){d=a("p"),k=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),m=a("code"),f=o("Module"),b=o(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){d=r(l,"P",{});var u=i(d);k=n(u,"Although the recipe for forward pass needs to be defined within this function, one should call the "),m=r(u,"CODE",{});var R=i(m);f=n(R,"Module"),R.forEach(t),b=n(u,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),u.forEach(t)},m(l,u){g(l,d,u),e(d,k),e(d,m),e(m,f),e(d,b)},d(l){l&&t(d)}}}function K3(E){let d,k,m,f,b;return f=new fe({props:{code:`from transformers import AutoTokenizer, FlaxRobertaModel

tokenizer = AutoTokenizer.from_pretrained("roberta-base")
model = FlaxRobertaModel.from_pretrained("roberta-base")

inputs = tokenizer("Hello, my dog is cute", return_tensors="jax")
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, FlaxRobertaModel

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;roberta-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = FlaxRobertaModel.from_pretrained(<span class="hljs-string">&quot;roberta-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;jax&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs)

<span class="hljs-meta">&gt;&gt;&gt; </span>last_hidden_states = outputs.last_hidden_state`}}),{c(){d=a("p"),k=o("Example:"),m=p(),v(f.$$.fragment)},l(l){d=r(l,"P",{});var u=i(d);k=n(u,"Example:"),u.forEach(t),m=h(l),w(f.$$.fragment,l)},m(l,u){g(l,d,u),e(d,k),g(l,m,u),T(f,l,u),b=!0},p:me,i(l){b||($(f.$$.fragment,l),b=!0)},o(l){F(f.$$.fragment,l),b=!1},d(l){l&&t(d),l&&t(m),x(f,l)}}}function J3(E){let d,k,m,f,b;return{c(){d=a("p"),k=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),m=a("code"),f=o("Module"),b=o(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){d=r(l,"P",{});var u=i(d);k=n(u,"Although the recipe for forward pass needs to be defined within this function, one should call the "),m=r(u,"CODE",{});var R=i(m);f=n(R,"Module"),R.forEach(t),b=n(u,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),u.forEach(t)},m(l,u){g(l,d,u),e(d,k),e(d,m),e(m,f),e(d,b)},d(l){l&&t(d)}}}function V3(E){let d,k,m,f,b;return f=new fe({props:{code:`from transformers import AutoTokenizer, FlaxRobertaForCausalLM

tokenizer = AutoTokenizer.from_pretrained("roberta-base")
model = FlaxRobertaForCausalLM.from_pretrained("roberta-base")

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

# retrieve logts for next token
next_token_logits = outputs.logits[:, -1]`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, FlaxRobertaForCausalLM

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;roberta-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = FlaxRobertaForCausalLM.from_pretrained(<span class="hljs-string">&quot;roberta-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;np&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># retrieve logts for next token</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>next_token_logits = outputs.logits[:, -<span class="hljs-number">1</span>]`}}),{c(){d=a("p"),k=o("Example:"),m=p(),v(f.$$.fragment)},l(l){d=r(l,"P",{});var u=i(d);k=n(u,"Example:"),u.forEach(t),m=h(l),w(f.$$.fragment,l)},m(l,u){g(l,d,u),e(d,k),g(l,m,u),T(f,l,u),b=!0},p:me,i(l){b||($(f.$$.fragment,l),b=!0)},o(l){F(f.$$.fragment,l),b=!1},d(l){l&&t(d),l&&t(m),x(f,l)}}}function G3(E){let d,k,m,f,b;return{c(){d=a("p"),k=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),m=a("code"),f=o("Module"),b=o(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){d=r(l,"P",{});var u=i(d);k=n(u,"Although the recipe for forward pass needs to be defined within this function, one should call the "),m=r(u,"CODE",{});var R=i(m);f=n(R,"Module"),R.forEach(t),b=n(u,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),u.forEach(t)},m(l,u){g(l,d,u),e(d,k),e(d,m),e(m,f),e(d,b)},d(l){l&&t(d)}}}function X3(E){let d,k,m,f,b;return f=new fe({props:{code:`from transformers import AutoTokenizer, FlaxRobertaForMaskedLM

tokenizer = AutoTokenizer.from_pretrained("roberta-base")
model = FlaxRobertaForMaskedLM.from_pretrained("roberta-base")

inputs = tokenizer("The capital of France is [MASK].", return_tensors="jax")

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, FlaxRobertaForMaskedLM

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;roberta-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = FlaxRobertaForMaskedLM.from_pretrained(<span class="hljs-string">&quot;roberta-base&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(<span class="hljs-string">&quot;The capital of France is [MASK].&quot;</span>, return_tensors=<span class="hljs-string">&quot;jax&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs)
<span class="hljs-meta">&gt;&gt;&gt; </span>logits = outputs.logits`}}),{c(){d=a("p"),k=o("Example:"),m=p(),v(f.$$.fragment)},l(l){d=r(l,"P",{});var u=i(d);k=n(u,"Example:"),u.forEach(t),m=h(l),w(f.$$.fragment,l)},m(l,u){g(l,d,u),e(d,k),g(l,m,u),T(f,l,u),b=!0},p:me,i(l){b||($(f.$$.fragment,l),b=!0)},o(l){F(f.$$.fragment,l),b=!1},d(l){l&&t(d),l&&t(m),x(f,l)}}}function Y3(E){let d,k,m,f,b;return{c(){d=a("p"),k=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),m=a("code"),f=o("Module"),b=o(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){d=r(l,"P",{});var u=i(d);k=n(u,"Although the recipe for forward pass needs to be defined within this function, one should call the "),m=r(u,"CODE",{});var R=i(m);f=n(R,"Module"),R.forEach(t),b=n(u,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),u.forEach(t)},m(l,u){g(l,d,u),e(d,k),e(d,m),e(m,f),e(d,b)},d(l){l&&t(d)}}}function Z3(E){let d,k,m,f,b;return f=new fe({props:{code:`from transformers import AutoTokenizer, FlaxRobertaForSequenceClassification

tokenizer = AutoTokenizer.from_pretrained("roberta-base")
model = FlaxRobertaForSequenceClassification.from_pretrained("roberta-base")

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

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, FlaxRobertaForSequenceClassification

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;roberta-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = FlaxRobertaForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;roberta-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;jax&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs)
<span class="hljs-meta">&gt;&gt;&gt; </span>logits = outputs.logits`}}),{c(){d=a("p"),k=o("Example:"),m=p(),v(f.$$.fragment)},l(l){d=r(l,"P",{});var u=i(d);k=n(u,"Example:"),u.forEach(t),m=h(l),w(f.$$.fragment,l)},m(l,u){g(l,d,u),e(d,k),g(l,m,u),T(f,l,u),b=!0},p:me,i(l){b||($(f.$$.fragment,l),b=!0)},o(l){F(f.$$.fragment,l),b=!1},d(l){l&&t(d),l&&t(m),x(f,l)}}}function eA(E){let d,k,m,f,b;return{c(){d=a("p"),k=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),m=a("code"),f=o("Module"),b=o(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){d=r(l,"P",{});var u=i(d);k=n(u,"Although the recipe for forward pass needs to be defined within this function, one should call the "),m=r(u,"CODE",{});var R=i(m);f=n(R,"Module"),R.forEach(t),b=n(u,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),u.forEach(t)},m(l,u){g(l,d,u),e(d,k),e(d,m),e(m,f),e(d,b)},d(l){l&&t(d)}}}function tA(E){let d,k,m,f,b;return f=new fe({props:{code:`from transformers import AutoTokenizer, FlaxRobertaForMultipleChoice

tokenizer = AutoTokenizer.from_pretrained("roberta-base")
model = FlaxRobertaForMultipleChoice.from_pretrained("roberta-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="jax", padding=True)
outputs = model(**{k: v[None, :] for k, v in encoding.items()})

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, FlaxRobertaForMultipleChoice

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;roberta-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = FlaxRobertaForMultipleChoice.from_pretrained(<span class="hljs-string">&quot;roberta-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;jax&quot;</span>, padding=<span class="hljs-literal">True</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**{k: v[<span class="hljs-literal">None</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>logits = outputs.logits`}}),{c(){d=a("p"),k=o("Example:"),m=p(),v(f.$$.fragment)},l(l){d=r(l,"P",{});var u=i(d);k=n(u,"Example:"),u.forEach(t),m=h(l),w(f.$$.fragment,l)},m(l,u){g(l,d,u),e(d,k),g(l,m,u),T(f,l,u),b=!0},p:me,i(l){b||($(f.$$.fragment,l),b=!0)},o(l){F(f.$$.fragment,l),b=!1},d(l){l&&t(d),l&&t(m),x(f,l)}}}function oA(E){let d,k,m,f,b;return{c(){d=a("p"),k=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),m=a("code"),f=o("Module"),b=o(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){d=r(l,"P",{});var u=i(d);k=n(u,"Although the recipe for forward pass needs to be defined within this function, one should call the "),m=r(u,"CODE",{});var R=i(m);f=n(R,"Module"),R.forEach(t),b=n(u,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),u.forEach(t)},m(l,u){g(l,d,u),e(d,k),e(d,m),e(m,f),e(d,b)},d(l){l&&t(d)}}}function nA(E){let d,k,m,f,b;return f=new fe({props:{code:`from transformers import AutoTokenizer, FlaxRobertaForTokenClassification

tokenizer = AutoTokenizer.from_pretrained("roberta-base")
model = FlaxRobertaForTokenClassification.from_pretrained("roberta-base")

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

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, FlaxRobertaForTokenClassification

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;roberta-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = FlaxRobertaForTokenClassification.from_pretrained(<span class="hljs-string">&quot;roberta-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;jax&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs)
<span class="hljs-meta">&gt;&gt;&gt; </span>logits = outputs.logits`}}),{c(){d=a("p"),k=o("Example:"),m=p(),v(f.$$.fragment)},l(l){d=r(l,"P",{});var u=i(d);k=n(u,"Example:"),u.forEach(t),m=h(l),w(f.$$.fragment,l)},m(l,u){g(l,d,u),e(d,k),g(l,m,u),T(f,l,u),b=!0},p:me,i(l){b||($(f.$$.fragment,l),b=!0)},o(l){F(f.$$.fragment,l),b=!1},d(l){l&&t(d),l&&t(m),x(f,l)}}}function sA(E){let d,k,m,f,b;return{c(){d=a("p"),k=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),m=a("code"),f=o("Module"),b=o(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){d=r(l,"P",{});var u=i(d);k=n(u,"Although the recipe for forward pass needs to be defined within this function, one should call the "),m=r(u,"CODE",{});var R=i(m);f=n(R,"Module"),R.forEach(t),b=n(u,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),u.forEach(t)},m(l,u){g(l,d,u),e(d,k),e(d,m),e(m,f),e(d,b)},d(l){l&&t(d)}}}function aA(E){let d,k,m,f,b;return f=new fe({props:{code:`from transformers import AutoTokenizer, FlaxRobertaForQuestionAnswering

tokenizer = AutoTokenizer.from_pretrained("roberta-base")
model = FlaxRobertaForQuestionAnswering.from_pretrained("roberta-base")

question, text = "Who was Jim Henson?", "Jim Henson was a nice puppet"
inputs = tokenizer(question, text, return_tensors="jax")

outputs = model(**inputs)
start_scores = outputs.start_logits
end_scores = outputs.end_logits`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, FlaxRobertaForQuestionAnswering

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;roberta-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = FlaxRobertaForQuestionAnswering.from_pretrained(<span class="hljs-string">&quot;roberta-base&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;jax&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs)
<span class="hljs-meta">&gt;&gt;&gt; </span>start_scores = outputs.start_logits
<span class="hljs-meta">&gt;&gt;&gt; </span>end_scores = outputs.end_logits`}}),{c(){d=a("p"),k=o("Example:"),m=p(),v(f.$$.fragment)},l(l){d=r(l,"P",{});var u=i(d);k=n(u,"Example:"),u.forEach(t),m=h(l),w(f.$$.fragment,l)},m(l,u){g(l,d,u),e(d,k),g(l,m,u),T(f,l,u),b=!0},p:me,i(l){b||($(f.$$.fragment,l),b=!0)},o(l){F(f.$$.fragment,l),b=!1},d(l){l&&t(d),l&&t(m),x(f,l)}}}function rA(E){let d,k,m,f,b,l,u,R,ae,Z,N,te,oe,M,we,K,Te,ge,W,$e,le,J,Fe,_e,U,xe,be,H,Ee,ke,ee,C,A,ye,Q,Re,ve,I,de,Me,j,ze,V,qe,ce,G,Ce,ne,D,pe,X,je,se,P,Ae,L,Pe,Le,y,z,Ue,re,Xe,Ke,q,Ye,Se,Ze,et,We,S,Y,Je,Oe,B,He,Be,Ne,Qe,ie,Ve,Tc,vb,Sf,ar,Wf,_t,en,wb,rr,Tb,$b,ir,Fb,xb,Eb,lr,Rb,dr,Mb,zb,qb,cr,Cb,pr,jb,Ab,Pb,$o,$c,Lb,Ob,hr,Nb,Ib,ur,Db,Sb,Wb,Fo,Fc,Bb,Ub,mr,Hb,Qb,fr,Kb,Jb,Vb,xo,xc,Gb,Xb,gr,Yb,Zb,_r,ek,tk,Bf,br,Uf,Bt,Eo,Ec,ok,nk,kr,sk,ak,yr,rk,ik,lk,Ro,Rc,dk,ck,vr,pk,hk,wr,uk,mk,fk,es,Mc,gk,_k,Tr,bk,kk,yk,zc,$r,vk,wk,Hf,Fr,Qf,Et,xr,Tk,Er,$k,Fk,xk,Mo,qc,Ek,Rk,Rr,Mk,zk,Mr,qk,Ck,jk,zo,Cc,Ak,Pk,zr,Lk,Ok,qr,Nk,Ik,Dk,qo,jc,Sk,Wk,Cr,Bk,Uk,jr,Hk,Qk,Kk,Ac,Ar,Jk,Vk,Kf,Pr,Jf,Rt,Lr,Gk,Or,Xk,Yk,Zk,Co,Pc,ey,ty,Nr,oy,ny,Ir,sy,ay,ry,jo,Lc,iy,ly,Dr,dy,cy,Sr,py,hy,uy,ts,Oc,my,fy,Wr,gy,_y,by,Nc,Br,ky,yy,Vf,Ic,ah,vy,Gf,os,Ao,Dc,wy,Ty,Ur,$y,Fy,Hr,xy,Ey,Ry,Po,Sc,My,zy,Qr,qy,Cy,Kr,jy,Ay,Xf,tn,ns,rh,Jr,Py,ih,Ly,Yf,Wt,Vr,Oy,uo,Ny,Wc,Iy,Dy,Bc,Sy,Wy,Gr,By,Uy,Hy,on,Qy,Uc,Ky,Jy,Hc,Vy,Gy,Xy,ss,Zf,nn,as,lh,Xr,Yy,dh,Zy,eg,Ie,Yr,ev,ch,tv,ov,ph,nv,sv,rs,av,Zr,rv,hh,iv,lv,dv,is,cv,ei,pv,Qc,hv,uv,mv,Lo,ti,fv,uh,gv,_v,oi,Kc,bv,mh,kv,yv,Jc,vv,fh,wv,Tv,ls,ni,$v,si,Fv,gh,xv,Ev,Rv,ds,ai,Mv,_h,zv,qv,Vc,ri,tg,sn,cs,bh,ii,Cv,kh,jv,og,tt,li,Av,di,Pv,yh,Lv,Ov,Nv,vh,Iv,Dv,ps,Sv,ci,Wv,wh,Bv,Uv,Hv,hs,Qv,pi,Kv,Gc,Jv,Vv,Gv,Xc,hi,ng,an,us,Th,ui,Xv,$h,Yv,sg,ot,mi,Zv,Fh,ew,tw,fi,ow,Yc,nw,sw,aw,gi,rw,_i,iw,lw,dw,bi,cw,xh,pw,hw,uw,ct,mw,Eh,fw,gw,Rh,_w,bw,Mh,kw,yw,zh,vw,ww,qh,Tw,$w,Ch,Fw,xw,Ew,ms,Rw,jh,Mw,zw,ki,qw,Cw,Ut,yi,jw,rn,Aw,Zc,Pw,Lw,Ah,Ow,Nw,Iw,fs,Dw,gs,ag,ln,_s,Ph,vi,Sw,Lh,Ww,rg,yt,wi,Bw,Ti,Uw,Oh,Hw,Qw,Kw,$i,Jw,ep,Vw,Gw,Xw,Fi,Yw,xi,Zw,eT,tT,Ht,Ei,oT,dn,nT,tp,sT,aT,Nh,rT,iT,lT,bs,dT,ks,ig,cn,ys,Ih,Ri,cT,Dh,pT,lg,vt,Mi,hT,zi,uT,Sh,mT,fT,gT,qi,_T,op,bT,kT,yT,Ci,vT,ji,wT,TT,$T,Qt,Ai,FT,pn,xT,np,ET,RT,Wh,MT,zT,qT,vs,CT,ws,dg,hn,Ts,Bh,Pi,jT,Uh,AT,cg,wt,Li,PT,Hh,LT,OT,Oi,NT,sp,IT,DT,ST,Ni,WT,Ii,BT,UT,HT,Mt,Di,QT,un,KT,ap,JT,VT,Qh,GT,XT,YT,$s,ZT,Fs,e1,xs,pg,mn,Es,Kh,Si,t1,Jh,o1,hg,Tt,Wi,n1,Vh,s1,a1,Bi,r1,rp,i1,l1,d1,Ui,c1,Hi,p1,h1,u1,Kt,Qi,m1,fn,f1,ip,g1,_1,Gh,b1,k1,y1,Rs,v1,Ms,ug,gn,zs,Xh,Ki,w1,Yh,T1,mg,$t,Ji,$1,Zh,F1,x1,Vi,E1,lp,R1,M1,z1,Gi,q1,Xi,C1,j1,A1,Jt,Yi,P1,_n,L1,dp,O1,N1,eu,I1,D1,S1,qs,W1,Cs,fg,bn,js,tu,Zi,B1,ou,U1,gg,Ft,el,H1,kn,Q1,nu,K1,J1,su,V1,G1,X1,tl,Y1,cp,Z1,e$,t$,ol,o$,nl,n$,s$,a$,Vt,sl,r$,yn,i$,pp,l$,d$,au,c$,p$,h$,As,u$,Ps,_g,vn,Ls,ru,al,m$,iu,f$,bg,pt,rl,g$,lu,_$,b$,il,k$,hp,y$,v$,w$,ll,T$,dl,$$,F$,x$,Os,E$,Gt,cl,R$,wn,M$,up,z$,q$,du,C$,j$,A$,Ns,P$,Is,kg,Tn,Ds,cu,pl,L$,pu,O$,yg,$n,hl,N$,Xt,ul,I$,Fn,D$,mp,S$,W$,hu,B$,U$,H$,Ss,Q$,Ws,vg,xn,Bs,uu,ml,K$,mu,J$,wg,ht,fl,V$,gl,G$,fu,X$,Y$,Z$,_l,e2,fp,t2,o2,n2,bl,s2,kl,a2,r2,i2,Us,l2,zt,yl,d2,En,c2,gp,p2,h2,gu,u2,m2,f2,Hs,g2,Qs,_2,Ks,Tg,Rn,Js,_u,vl,b2,bu,k2,$g,ut,wl,y2,ku,v2,w2,Tl,T2,_p,$2,F2,x2,$l,E2,Fl,R2,M2,z2,Vs,q2,qt,xl,C2,Mn,j2,bp,A2,P2,yu,L2,O2,N2,Gs,I2,Xs,D2,Ys,Fg,zn,Zs,vu,El,S2,wu,W2,xg,mt,Rl,B2,Tu,U2,H2,Ml,Q2,kp,K2,J2,V2,zl,G2,ql,X2,Y2,Z2,ea,eF,Yt,Cl,tF,qn,oF,yp,nF,sF,$u,aF,rF,iF,ta,lF,oa,Eg,Cn,na,Fu,jl,dF,xu,cF,Rg,ft,Al,pF,Eu,hF,uF,Pl,mF,vp,fF,gF,_F,Ll,bF,Ol,kF,yF,vF,sa,wF,Ct,Nl,TF,jn,$F,wp,FF,xF,Ru,EF,RF,MF,aa,zF,ra,qF,ia,Mg,An,la,Mu,Il,CF,zu,jF,zg,gt,Dl,AF,Pn,PF,qu,LF,OF,Cu,NF,IF,DF,Sl,SF,Tp,WF,BF,UF,Wl,HF,Bl,QF,KF,JF,da,VF,jt,Ul,GF,Ln,XF,$p,YF,ZF,ju,e0,t0,o0,ca,n0,pa,s0,ha,qg,On,ua,Au,Hl,a0,Pu,r0,Cg,nt,Ql,i0,Lu,l0,d0,Kl,c0,Fp,p0,h0,u0,Jl,m0,Vl,f0,g0,_0,Ou,b0,k0,mo,Nu,Gl,y0,v0,Iu,Xl,w0,T0,Du,Yl,$0,F0,Su,Zl,x0,E0,Zt,ed,R0,Nn,M0,Wu,z0,q0,Bu,C0,j0,A0,ma,P0,fa,jg,In,ga,Uu,td,L0,Hu,O0,Ag,st,od,N0,Qu,I0,D0,nd,S0,xp,W0,B0,U0,sd,H0,ad,Q0,K0,J0,Ku,V0,G0,fo,Ju,rd,X0,Y0,Vu,id,Z0,ex,Gu,ld,tx,ox,Xu,dd,nx,sx,eo,cd,ax,Dn,rx,Yu,ix,lx,Zu,dx,cx,px,_a,hx,ba,Pg,Sn,ka,em,pd,ux,tm,mx,Lg,at,hd,fx,ud,gx,om,_x,bx,kx,md,yx,Ep,vx,wx,Tx,fd,$x,gd,Fx,xx,Ex,nm,Rx,Mx,go,sm,_d,zx,qx,am,bd,Cx,jx,rm,kd,Ax,Px,im,yd,Lx,Ox,to,vd,Nx,Wn,Ix,lm,Dx,Sx,dm,Wx,Bx,Ux,ya,Hx,va,Og,Bn,wa,cm,wd,Qx,pm,Kx,Ng,rt,Td,Jx,hm,Vx,Gx,$d,Xx,Rp,Yx,Zx,eE,Fd,tE,xd,oE,nE,sE,um,aE,rE,_o,mm,Ed,iE,lE,fm,Rd,dE,cE,gm,Md,pE,hE,_m,zd,uE,mE,oo,qd,fE,Un,gE,bm,_E,bE,km,kE,yE,vE,Ta,wE,$a,Ig,Hn,Fa,ym,Cd,TE,vm,$E,Dg,it,jd,FE,wm,xE,EE,Ad,RE,Mp,ME,zE,qE,Pd,CE,Ld,jE,AE,PE,Tm,LE,OE,bo,$m,Od,NE,IE,Fm,Nd,DE,SE,xm,Id,WE,BE,Em,Dd,UE,HE,no,Sd,QE,Qn,KE,Rm,JE,VE,Mm,GE,XE,YE,xa,ZE,Ea,Sg,Kn,Ra,zm,Wd,eR,qm,tR,Wg,lt,Bd,oR,Cm,nR,sR,Ud,aR,zp,rR,iR,lR,Hd,dR,Qd,cR,pR,hR,jm,uR,mR,ko,Am,Kd,fR,gR,Pm,Jd,_R,bR,Lm,Vd,kR,yR,Om,Gd,vR,wR,so,Xd,TR,Jn,$R,Nm,FR,xR,Im,ER,RR,MR,Ma,zR,za,Bg,Vn,qa,Dm,Yd,qR,Sm,CR,Ug,dt,Zd,jR,Gn,AR,Wm,PR,LR,Bm,OR,NR,IR,ec,DR,qp,SR,WR,BR,tc,UR,oc,HR,QR,KR,Um,JR,VR,yo,Hm,nc,GR,XR,Qm,sc,YR,ZR,Km,ac,eM,tM,Jm,rc,oM,nM,ao,ic,sM,Xn,aM,Vm,rM,iM,Gm,lM,dM,cM,Ca,pM,ja,Hg;return l=new De({}),M=new De({}),Be=new De({}),ar=new yb({props:{pipeline:"text-classification"}}),br=new yb({props:{pipeline:"token-classification"}}),Fr=new yb({props:{pipeline:"fill-mask"}}),Pr=new yb({props:{pipeline:"question-answering"}}),Jr=new De({}),Vr=new O({props:{name:"class transformers.RobertaConfig",anchor:"transformers.RobertaConfig",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.RobertaConfig.vocab_size",description:`<strong>vocab_size</strong> (<code>int</code>, <em>optional</em>, defaults to 30522) &#x2014;
Vocabulary size of the RoBERTa model. Defines the number of different tokens that can be represented by the
<code>inputs_ids</code> passed when calling <a href="/docs/transformers/main/en/model_doc/roberta#transformers.RobertaModel">RobertaModel</a> or <a href="/docs/transformers/main/en/model_doc/roberta#transformers.TFRobertaModel">TFRobertaModel</a>.`,name:"vocab_size"},{anchor:"transformers.RobertaConfig.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.RobertaConfig.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.RobertaConfig.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.RobertaConfig.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.RobertaConfig.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.RobertaConfig.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.RobertaConfig.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.RobertaConfig.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.RobertaConfig.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/main/en/model_doc/roberta#transformers.RobertaModel">RobertaModel</a> or <a href="/docs/transformers/main/en/model_doc/roberta#transformers.TFRobertaModel">TFRobertaModel</a>.`,name:"type_vocab_size"},{anchor:"transformers.RobertaConfig.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.RobertaConfig.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.RobertaConfig.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.RobertaConfig.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.RobertaConfig.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.RobertaConfig.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/main/src/transformers/models/roberta/configuration_roberta.py#L37"}}),ss=new ue({props:{anchor:"transformers.RobertaConfig.example",$$slots:{default:[o3]},$$scope:{ctx:E}}}),Xr=new De({}),Yr=new O({props:{name:"class transformers.RobertaTokenizer",anchor:"transformers.RobertaTokenizer",parameters:[{name:"vocab_file",val:""},{name:"merges_file",val:""},{name:"errors",val:" = 'replace'"},{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:"add_prefix_space",val:" = False"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.RobertaTokenizer.vocab_file",description:`<strong>vocab_file</strong> (<code>str</code>) &#x2014;
Path to the vocabulary file.`,name:"vocab_file"},{anchor:"transformers.RobertaTokenizer.merges_file",description:`<strong>merges_file</strong> (<code>str</code>) &#x2014;
Path to the merges file.`,name:"merges_file"},{anchor:"transformers.RobertaTokenizer.errors",description:`<strong>errors</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;replace&quot;</code>) &#x2014;
Paradigm to follow when decoding bytes to UTF-8. See
<a href="https://docs.python.org/3/library/stdtypes.html#bytes.decode" rel="nofollow">bytes.decode</a> for more information.`,name:"errors"},{anchor:"transformers.RobertaTokenizer.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.RobertaTokenizer.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.RobertaTokenizer.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.RobertaTokenizer.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.RobertaTokenizer.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.RobertaTokenizer.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.RobertaTokenizer.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.RobertaTokenizer.add_prefix_space",description:`<strong>add_prefix_space</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to add an initial space to the input. This allows to treat the leading word just as any
other word. (RoBERTa tokenizer detect beginning of words by the preceding space).`,name:"add_prefix_space"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/roberta/tokenization_roberta.py#L107"}}),rs=new ue({props:{anchor:"transformers.RobertaTokenizer.example",$$slots:{default:[n3]},$$scope:{ctx:E}}}),is=new he({props:{$$slots:{default:[s3]},$$scope:{ctx:E}}}),ti=new O({props:{name:"build_inputs_with_special_tokens",anchor:"transformers.RobertaTokenizer.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.RobertaTokenizer.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.RobertaTokenizer.build_inputs_with_special_tokens.token_ids_1",description:`<strong>token_ids_1</strong> (<code>List[int]</code>, <em>optional</em>) &#x2014;
Optional second list of IDs for sequence pairs.`,name:"token_ids_1"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/roberta/tokenization_roberta.py#L344",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>
`}}),ni=new O({props:{name:"get_special_tokens_mask",anchor:"transformers.RobertaTokenizer.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.RobertaTokenizer.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.RobertaTokenizer.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.RobertaTokenizer.get_special_tokens_mask.already_has_special_tokens",description:`<strong>already_has_special_tokens</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not the token list is already formatted with special tokens for the model.`,name:"already_has_special_tokens"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/roberta/tokenization_roberta.py#L369",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>
`}}),ai=new O({props:{name:"create_token_type_ids_from_sequences",anchor:"transformers.RobertaTokenizer.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.RobertaTokenizer.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.RobertaTokenizer.create_token_type_ids_from_sequences.token_ids_1",description:`<strong>token_ids_1</strong> (<code>List[int]</code>, <em>optional</em>) &#x2014;
Optional second list of IDs for sequence pairs.`,name:"token_ids_1"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/roberta/tokenization_roberta.py#L396",returnDescription:`
<p>List of zeros.</p>
`,returnType:`
<p><code>List[int]</code></p>
`}}),ri=new O({props:{name:"save_vocabulary",anchor:"transformers.RobertaTokenizer.save_vocabulary",parameters:[{name:"save_directory",val:": str"},{name:"filename_prefix",val:": typing.Optional[str] = None"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/roberta/tokenization_roberta.py#L315"}}),ii=new De({}),li=new O({props:{name:"class transformers.RobertaTokenizerFast",anchor:"transformers.RobertaTokenizerFast",parameters:[{name:"vocab_file",val:" = None"},{name:"merges_file",val:" = None"},{name:"tokenizer_file",val:" = None"},{name:"errors",val:" = 'replace'"},{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:"add_prefix_space",val:" = False"},{name:"trim_offsets",val:" = True"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.RobertaTokenizerFast.vocab_file",description:`<strong>vocab_file</strong> (<code>str</code>) &#x2014;
Path to the vocabulary file.`,name:"vocab_file"},{anchor:"transformers.RobertaTokenizerFast.merges_file",description:`<strong>merges_file</strong> (<code>str</code>) &#x2014;
Path to the merges file.`,name:"merges_file"},{anchor:"transformers.RobertaTokenizerFast.errors",description:`<strong>errors</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;replace&quot;</code>) &#x2014;
Paradigm to follow when decoding bytes to UTF-8. See
<a href="https://docs.python.org/3/library/stdtypes.html#bytes.decode" rel="nofollow">bytes.decode</a> for more information.`,name:"errors"},{anchor:"transformers.RobertaTokenizerFast.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.RobertaTokenizerFast.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.RobertaTokenizerFast.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.RobertaTokenizerFast.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.RobertaTokenizerFast.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.RobertaTokenizerFast.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.RobertaTokenizerFast.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.RobertaTokenizerFast.add_prefix_space",description:`<strong>add_prefix_space</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to add an initial space to the input. This allows to treat the leading word just as any
other word. (RoBERTa tokenizer detect beginning of words by the preceding space).`,name:"add_prefix_space"},{anchor:"transformers.RobertaTokenizerFast.trim_offsets",description:`<strong>trim_offsets</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether the post processing step should trim offsets to avoid including whitespaces.`,name:"trim_offsets"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/roberta/tokenization_roberta_fast.py#L76"}}),ps=new ue({props:{anchor:"transformers.RobertaTokenizerFast.example",$$slots:{default:[a3]},$$scope:{ctx:E}}}),hs=new he({props:{$$slots:{default:[r3]},$$scope:{ctx:E}}}),hi=new O({props:{name:"build_inputs_with_special_tokens",anchor:"transformers.RobertaTokenizerFast.build_inputs_with_special_tokens",parameters:[{name:"token_ids_0",val:""},{name:"token_ids_1",val:" = None"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/roberta/tokenization_roberta_fast.py#L279"}}),ui=new De({}),mi=new O({props:{name:"class transformers.RobertaModel",anchor:"transformers.RobertaModel",parameters:[{name:"config",val:""},{name:"add_pooling_layer",val:" = True"}],parametersDescription:[{anchor:"transformers.RobertaModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/roberta#transformers.RobertaConfig">RobertaConfig</a>) &#x2014; Model configuration class with all the parameters of the
model. Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/roberta/modeling_roberta.py#L697"}}),yi=new O({props:{name:"forward",anchor:"transformers.RobertaModel.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.RobertaModel.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.RobertaModel.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.RobertaModel.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.
This parameter can only be used when the model is initialized with <code>type_vocab_size</code> parameter with value<blockquote>
<p>= 2. All the value in this tensor should be always &lt; type_vocab_size.</p>
</blockquote></li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.RobertaModel.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.RobertaModel.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.RobertaModel.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.RobertaModel.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.RobertaModel.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.RobertaModel.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.RobertaModel.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.RobertaModel.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.RobertaModel.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.RobertaModel.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/main/src/transformers/models/roberta/modeling_roberta.py#L742",returnDescription:`
<p>A <a
  href="/docs/transformers/main/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/main/en/model_doc/roberta#transformers.RobertaConfig"
>RobertaConfig</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/main/en/main_classes/output#transformers.modeling_outputs.BaseModelOutputWithPoolingAndCrossAttentions"
>transformers.modeling_outputs.BaseModelOutputWithPoolingAndCrossAttentions</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),fs=new he({props:{$$slots:{default:[i3]},$$scope:{ctx:E}}}),gs=new ue({props:{anchor:"transformers.RobertaModel.forward.example",$$slots:{default:[l3]},$$scope:{ctx:E}}}),vi=new De({}),wi=new O({props:{name:"class transformers.RobertaForCausalLM",anchor:"transformers.RobertaForCausalLM",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.RobertaForCausalLM.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/roberta#transformers.RobertaConfig">RobertaConfig</a>) &#x2014; Model configuration class with all the parameters of the
model. Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/roberta/modeling_roberta.py#L882"}}),Ei=new O({props:{name:"forward",anchor:"transformers.RobertaForCausalLM.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.RobertaForCausalLM.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.RobertaForCausalLM.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.RobertaForCausalLM.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.
This parameter can only be used when the model is initialized with <code>type_vocab_size</code> parameter with value<blockquote>
<p>= 2. All the value in this tensor should be always &lt; type_vocab_size.</p>
</blockquote></li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.RobertaForCausalLM.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.RobertaForCausalLM.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.RobertaForCausalLM.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.RobertaForCausalLM.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.RobertaForCausalLM.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.RobertaForCausalLM.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.RobertaForCausalLM.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.RobertaForCausalLM.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.RobertaForCausalLM.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.RobertaForCausalLM.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.RobertaForCausalLM.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/main/src/transformers/models/roberta/modeling_roberta.py#L908",returnDescription:`
<p>A <a
  href="/docs/transformers/main/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/main/en/model_doc/roberta#transformers.RobertaConfig"
>RobertaConfig</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/main/en/main_classes/output#transformers.modeling_outputs.CausalLMOutputWithCrossAttentions"
>transformers.modeling_outputs.CausalLMOutputWithCrossAttentions</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),bs=new he({props:{$$slots:{default:[d3]},$$scope:{ctx:E}}}),ks=new ue({props:{anchor:"transformers.RobertaForCausalLM.forward.example",$$slots:{default:[c3]},$$scope:{ctx:E}}}),Ri=new De({}),Mi=new O({props:{name:"class transformers.RobertaForMaskedLM",anchor:"transformers.RobertaForMaskedLM",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.RobertaForMaskedLM.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/roberta#transformers.RobertaConfig">RobertaConfig</a>) &#x2014; Model configuration class with all the parameters of the
model. Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/roberta/modeling_roberta.py#L1034"}}),Ai=new O({props:{name:"forward",anchor:"transformers.RobertaForMaskedLM.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.RobertaForMaskedLM.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.RobertaForMaskedLM.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.RobertaForMaskedLM.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.
This parameter can only be used when the model is initialized with <code>type_vocab_size</code> parameter with value<blockquote>
<p>= 2. All the value in this tensor should be always &lt; type_vocab_size.</p>
</blockquote></li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.RobertaForMaskedLM.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.RobertaForMaskedLM.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.RobertaForMaskedLM.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.RobertaForMaskedLM.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.RobertaForMaskedLM.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.RobertaForMaskedLM.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.RobertaForMaskedLM.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.RobertaForMaskedLM.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/main/src/transformers/models/roberta/modeling_roberta.py#L1063",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.MaskedLMOutput"
>transformers.modeling_outputs.MaskedLMOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/main/en/model_doc/roberta#transformers.RobertaConfig"
>RobertaConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Masked language modeling (MLM) loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, config.vocab_size)</code>) \u2014 Prediction scores of the language modeling head (scores for each vocabulary token before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.MaskedLMOutput"
>transformers.modeling_outputs.MaskedLMOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),vs=new he({props:{$$slots:{default:[p3]},$$scope:{ctx:E}}}),ws=new ue({props:{anchor:"transformers.RobertaForMaskedLM.forward.example",$$slots:{default:[h3]},$$scope:{ctx:E}}}),Pi=new De({}),Li=new O({props:{name:"class transformers.RobertaForSequenceClassification",anchor:"transformers.RobertaForSequenceClassification",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.RobertaForSequenceClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/roberta#transformers.RobertaConfig">RobertaConfig</a>) &#x2014; Model configuration class with all the parameters of the
model. Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/roberta/modeling_roberta.py#L1168"}}),Di=new O({props:{name:"forward",anchor:"transformers.RobertaForSequenceClassification.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.RobertaForSequenceClassification.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.RobertaForSequenceClassification.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.RobertaForSequenceClassification.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.
This parameter can only be used when the model is initialized with <code>type_vocab_size</code> parameter with value<blockquote>
<p>= 2. All the value in this tensor should be always &lt; type_vocab_size.</p>
</blockquote></li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.RobertaForSequenceClassification.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.RobertaForSequenceClassification.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.RobertaForSequenceClassification.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.RobertaForSequenceClassification.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.RobertaForSequenceClassification.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.RobertaForSequenceClassification.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.RobertaForSequenceClassification.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for computing the sequence classification/regression loss. Indices should be in <code>[0, ..., config.num_labels - 1]</code>. If <code>config.num_labels == 1</code> a regression loss is computed (Mean-Square loss), If
<code>config.num_labels &gt; 1</code> a classification loss is computed (Cross-Entropy).`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/roberta/modeling_roberta.py#L1182",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.SequenceClassifierOutput"
>transformers.modeling_outputs.SequenceClassifierOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/main/en/model_doc/roberta#transformers.RobertaConfig"
>RobertaConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Classification (or regression if config.num_labels==1) loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, config.num_labels)</code>) \u2014 Classification (or regression if config.num_labels==1) scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.SequenceClassifierOutput"
>transformers.modeling_outputs.SequenceClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),$s=new he({props:{$$slots:{default:[u3]},$$scope:{ctx:E}}}),Fs=new ue({props:{anchor:"transformers.RobertaForSequenceClassification.forward.example",$$slots:{default:[m3]},$$scope:{ctx:E}}}),xs=new ue({props:{anchor:"transformers.RobertaForSequenceClassification.forward.example-2",$$slots:{default:[f3]},$$scope:{ctx:E}}}),Si=new De({}),Wi=new O({props:{name:"class transformers.RobertaForMultipleChoice",anchor:"transformers.RobertaForMultipleChoice",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.RobertaForMultipleChoice.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/roberta#transformers.RobertaConfig">RobertaConfig</a>) &#x2014; Model configuration class with all the parameters of the
model. Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/roberta/modeling_roberta.py#L1267"}}),Qi=new O({props:{name:"forward",anchor:"transformers.RobertaForMultipleChoice.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.RobertaForMultipleChoice.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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.RobertaForMultipleChoice.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.RobertaForMultipleChoice.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.
This parameter can only be used when the model is initialized with <code>type_vocab_size</code> parameter with value<blockquote>
<p>= 2. All the value in this tensor should be always &lt; type_vocab_size.</p>
</blockquote></li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.RobertaForMultipleChoice.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.RobertaForMultipleChoice.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.RobertaForMultipleChoice.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.RobertaForMultipleChoice.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.RobertaForMultipleChoice.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.RobertaForMultipleChoice.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.RobertaForMultipleChoice.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for computing the multiple choice classification loss. Indices should be in <code>[0, ..., num_choices-1]</code> where <code>num_choices</code> is the size of the second dimension of the input tensors. (See
<code>input_ids</code> above)`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/roberta/modeling_roberta.py#L1280",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.MultipleChoiceModelOutput"
>transformers.modeling_outputs.MultipleChoiceModelOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/main/en/model_doc/roberta#transformers.RobertaConfig"
>RobertaConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <em>(1,)</em>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Classification loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_choices)</code>) \u2014 <em>num_choices</em> is the second dimension of the input tensors. (see <em>input_ids</em> above).</p>
<p>Classification scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.MultipleChoiceModelOutput"
>transformers.modeling_outputs.MultipleChoiceModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Rs=new he({props:{$$slots:{default:[g3]},$$scope:{ctx:E}}}),Ms=new ue({props:{anchor:"transformers.RobertaForMultipleChoice.forward.example",$$slots:{default:[_3]},$$scope:{ctx:E}}}),Ki=new De({}),Ji=new O({props:{name:"class transformers.RobertaForTokenClassification",anchor:"transformers.RobertaForTokenClassification",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.RobertaForTokenClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/roberta#transformers.RobertaConfig">RobertaConfig</a>) &#x2014; Model configuration class with all the parameters of the
model. Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/roberta/modeling_roberta.py#L1359"}}),Yi=new O({props:{name:"forward",anchor:"transformers.RobertaForTokenClassification.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.RobertaForTokenClassification.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.RobertaForTokenClassification.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.RobertaForTokenClassification.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.
This parameter can only be used when the model is initialized with <code>type_vocab_size</code> parameter with value<blockquote>
<p>= 2. All the value in this tensor should be always &lt; type_vocab_size.</p>
</blockquote></li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.RobertaForTokenClassification.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.RobertaForTokenClassification.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.RobertaForTokenClassification.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.RobertaForTokenClassification.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.RobertaForTokenClassification.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.RobertaForTokenClassification.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.RobertaForTokenClassification.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Labels for computing the token classification loss. Indices should be in <code>[0, ..., config.num_labels - 1]</code>.`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/roberta/modeling_roberta.py#L1377",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.TokenClassifierOutput"
>transformers.modeling_outputs.TokenClassifierOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/main/en/model_doc/roberta#transformers.RobertaConfig"
>RobertaConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided)  \u2014 Classification loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, config.num_labels)</code>) \u2014 Classification scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.TokenClassifierOutput"
>transformers.modeling_outputs.TokenClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),qs=new he({props:{$$slots:{default:[b3]},$$scope:{ctx:E}}}),Cs=new ue({props:{anchor:"transformers.RobertaForTokenClassification.forward.example",$$slots:{default:[k3]},$$scope:{ctx:E}}}),Zi=new De({}),el=new O({props:{name:"class transformers.RobertaForQuestionAnswering",anchor:"transformers.RobertaForQuestionAnswering",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.RobertaForQuestionAnswering.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/roberta#transformers.RobertaConfig">RobertaConfig</a>) &#x2014; Model configuration class with all the parameters of the
model. Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/roberta/modeling_roberta.py#L1467"}}),sl=new O({props:{name:"forward",anchor:"transformers.RobertaForQuestionAnswering.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.RobertaForQuestionAnswering.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.RobertaForQuestionAnswering.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.RobertaForQuestionAnswering.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.
This parameter can only be used when the model is initialized with <code>type_vocab_size</code> parameter with value<blockquote>
<p>= 2. All the value in this tensor should be always &lt; type_vocab_size.</p>
</blockquote></li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.RobertaForQuestionAnswering.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.RobertaForQuestionAnswering.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.RobertaForQuestionAnswering.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.RobertaForQuestionAnswering.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.RobertaForQuestionAnswering.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.RobertaForQuestionAnswering.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.RobertaForQuestionAnswering.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.RobertaForQuestionAnswering.forward.end_positions",description:`<strong>end_positions</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for position (index) of the end of the labelled span for computing the token classification loss.
Positions are clamped to the length of the sequence (<code>sequence_length</code>). Position outside of the sequence
are not taken into account for computing the loss.`,name:"end_positions"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/roberta/modeling_roberta.py#L1481",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.QuestionAnsweringModelOutput"
>transformers.modeling_outputs.QuestionAnsweringModelOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/main/en/model_doc/roberta#transformers.RobertaConfig"
>RobertaConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Total span extraction loss is the sum of a Cross-Entropy for the start and end positions.</p>
</li>
<li>
<p><strong>start_logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>) \u2014 Span-start scores (before SoftMax).</p>
</li>
<li>
<p><strong>end_logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>) \u2014 Span-end scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.QuestionAnsweringModelOutput"
>transformers.modeling_outputs.QuestionAnsweringModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),As=new he({props:{$$slots:{default:[y3]},$$scope:{ctx:E}}}),Ps=new ue({props:{anchor:"transformers.RobertaForQuestionAnswering.forward.example",$$slots:{default:[v3]},$$scope:{ctx:E}}}),al=new De({}),rl=new O({props:{name:"class transformers.TFRobertaModel",anchor:"transformers.TFRobertaModel",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFRobertaModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/roberta#transformers.RobertaConfig">RobertaConfig</a>) &#x2014; Model configuration class with all the parameters of the
model. Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/roberta/modeling_tf_roberta.py#L922"}}),Os=new he({props:{$$slots:{default:[w3]},$$scope:{ctx:E}}}),cl=new O({props:{name:"call",anchor:"transformers.TFRobertaModel.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.TFRobertaModel.call.input_ids",description:`<strong>input_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.TFRobertaModel.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.TFRobertaModel.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.TFRobertaModel.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.TFRobertaModel.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.TFRobertaModel.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.TFRobertaModel.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.TFRobertaModel.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.TFRobertaModel.call.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.TFRobertaModel.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.TFRobertaModel.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.TFRobertaModel.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.TFRobertaModel.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.TFRobertaModel.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/main/src/transformers/models/roberta/modeling_tf_roberta.py#L927",returnDescription:`
<p>A <a
  href="/docs/transformers/main/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/main/en/model_doc/roberta#transformers.RobertaConfig"
>RobertaConfig</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/main/en/main_classes/output#transformers.modeling_tf_outputs.TFBaseModelOutputWithPoolingAndCrossAttentions"
>transformers.modeling_tf_outputs.TFBaseModelOutputWithPoolingAndCrossAttentions</a> or <code>tuple(tf.Tensor)</code></p>
`}}),Ns=new he({props:{$$slots:{default:[T3]},$$scope:{ctx:E}}}),Is=new ue({props:{anchor:"transformers.TFRobertaModel.call.example",$$slots:{default:[$3]},$$scope:{ctx:E}}}),pl=new De({}),hl=new O({props:{name:"class transformers.TFRobertaForCausalLM",anchor:"transformers.TFRobertaForCausalLM",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/roberta/modeling_tf_roberta.py#L1149"}}),ul=new O({props:{name:"call",anchor:"transformers.TFRobertaForCausalLM.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.TFRobertaForCausalLM.call.input_ids",description:`<strong>input_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.TFRobertaForCausalLM.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.TFRobertaForCausalLM.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.TFRobertaForCausalLM.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.TFRobertaForCausalLM.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.TFRobertaForCausalLM.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.TFRobertaForCausalLM.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.TFRobertaForCausalLM.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.TFRobertaForCausalLM.call.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.TFRobertaForCausalLM.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.TFRobertaForCausalLM.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.TFRobertaForCausalLM.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.TFRobertaForCausalLM.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.TFRobertaForCausalLM.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.TFRobertaForCausalLM.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/main/src/transformers/models/roberta/modeling_tf_roberta.py#L1182",returnDescription:`
<p>A <a
  href="/docs/transformers/main/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/main/en/model_doc/roberta#transformers.RobertaConfig"
>RobertaConfig</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/main/en/main_classes/output#transformers.modeling_tf_outputs.TFCausalLMOutputWithCrossAttentions"
>transformers.modeling_tf_outputs.TFCausalLMOutputWithCrossAttentions</a> or <code>tuple(tf.Tensor)</code></p>
`}}),Ss=new he({props:{$$slots:{default:[F3]},$$scope:{ctx:E}}}),Ws=new ue({props:{anchor:"transformers.TFRobertaForCausalLM.call.example",$$slots:{default:[x3]},$$scope:{ctx:E}}}),ml=new De({}),fl=new O({props:{name:"class transformers.TFRobertaForMaskedLM",anchor:"transformers.TFRobertaForMaskedLM",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFRobertaForMaskedLM.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/roberta#transformers.RobertaConfig">RobertaConfig</a>) &#x2014; Model configuration class with all the parameters of the
model. Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/roberta/modeling_tf_roberta.py#L1065"}}),Us=new he({props:{$$slots:{default:[E3]},$$scope:{ctx:E}}}),yl=new O({props:{name:"call",anchor:"transformers.TFRobertaForMaskedLM.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.TFRobertaForMaskedLM.call.input_ids",description:`<strong>input_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.TFRobertaForMaskedLM.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.TFRobertaForMaskedLM.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.TFRobertaForMaskedLM.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.TFRobertaForMaskedLM.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.TFRobertaForMaskedLM.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.TFRobertaForMaskedLM.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.TFRobertaForMaskedLM.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.TFRobertaForMaskedLM.call.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.TFRobertaForMaskedLM.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.TFRobertaForMaskedLM.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/main/src/transformers/models/roberta/modeling_tf_roberta.py#L1082",returnDescription:`
<p>A <a
  href="/docs/transformers/main/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/main/en/model_doc/roberta#transformers.RobertaConfig"
>RobertaConfig</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/main/en/main_classes/output#transformers.modeling_tf_outputs.TFMaskedLMOutput"
>transformers.modeling_tf_outputs.TFMaskedLMOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),Hs=new he({props:{$$slots:{default:[R3]},$$scope:{ctx:E}}}),Qs=new ue({props:{anchor:"transformers.TFRobertaForMaskedLM.call.example",$$slots:{default:[M3]},$$scope:{ctx:E}}}),Ks=new ue({props:{anchor:"transformers.TFRobertaForMaskedLM.call.example-2",$$slots:{default:[z3]},$$scope:{ctx:E}}}),vl=new De({}),wl=new O({props:{name:"class transformers.TFRobertaForSequenceClassification",anchor:"transformers.TFRobertaForSequenceClassification",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFRobertaForSequenceClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/roberta#transformers.RobertaConfig">RobertaConfig</a>) &#x2014; Model configuration class with all the parameters of the
model. Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/roberta/modeling_tf_roberta.py#L1320"}}),Vs=new he({props:{$$slots:{default:[q3]},$$scope:{ctx:E}}}),xl=new O({props:{name:"call",anchor:"transformers.TFRobertaForSequenceClassification.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.TFRobertaForSequenceClassification.call.input_ids",description:`<strong>input_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.TFRobertaForSequenceClassification.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.TFRobertaForSequenceClassification.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.TFRobertaForSequenceClassification.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.TFRobertaForSequenceClassification.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.TFRobertaForSequenceClassification.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.TFRobertaForSequenceClassification.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.TFRobertaForSequenceClassification.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.TFRobertaForSequenceClassification.call.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.TFRobertaForSequenceClassification.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.TFRobertaForSequenceClassification.call.labels",description:`<strong>labels</strong> (<code>tf.Tensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for computing the sequence classification/regression loss. Indices should be in <code>[0, ..., config.num_labels - 1]</code>. If <code>config.num_labels == 1</code> a regression loss is computed (Mean-Square loss), If
<code>config.num_labels &gt; 1</code> a classification loss is computed (Cross-Entropy).`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/roberta/modeling_tf_roberta.py#L1331",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_tf_outputs.TFSequenceClassifierOutput"
>transformers.modeling_tf_outputs.TFSequenceClassifierOutput</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/main/en/model_doc/roberta#transformers.RobertaConfig"
>RobertaConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, )</code>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Classification (or regression if config.num_labels==1) loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, config.num_labels)</code>) \u2014 Classification (or regression if config.num_labels==1) scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_tf_outputs.TFSequenceClassifierOutput"
>transformers.modeling_tf_outputs.TFSequenceClassifierOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),Gs=new he({props:{$$slots:{default:[C3]},$$scope:{ctx:E}}}),Xs=new ue({props:{anchor:"transformers.TFRobertaForSequenceClassification.call.example",$$slots:{default:[j3]},$$scope:{ctx:E}}}),Ys=new ue({props:{anchor:"transformers.TFRobertaForSequenceClassification.call.example-2",$$slots:{default:[A3]},$$scope:{ctx:E}}}),El=new De({}),Rl=new O({props:{name:"class transformers.TFRobertaForMultipleChoice",anchor:"transformers.TFRobertaForMultipleChoice",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFRobertaForMultipleChoice.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/roberta#transformers.RobertaConfig">RobertaConfig</a>) &#x2014; Model configuration class with all the parameters of the
model. Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/roberta/modeling_tf_roberta.py#L1403"}}),ea=new he({props:{$$slots:{default:[P3]},$$scope:{ctx:E}}}),Cl=new O({props:{name:"call",anchor:"transformers.TFRobertaForMultipleChoice.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.TFRobertaForMultipleChoice.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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.TFRobertaForMultipleChoice.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.TFRobertaForMultipleChoice.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.TFRobertaForMultipleChoice.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.TFRobertaForMultipleChoice.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.TFRobertaForMultipleChoice.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.TFRobertaForMultipleChoice.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.TFRobertaForMultipleChoice.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.TFRobertaForMultipleChoice.call.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.TFRobertaForMultipleChoice.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.TFRobertaForMultipleChoice.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/main/src/transformers/models/roberta/modeling_tf_roberta.py#L1427",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_tf_outputs.TFMultipleChoiceModelOutput"
>transformers.modeling_tf_outputs.TFMultipleChoiceModelOutput</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/main/en/model_doc/roberta#transformers.RobertaConfig"
>RobertaConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>tf.Tensor</code> of shape <em>(batch_size, )</em>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Classification loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, num_choices)</code>) \u2014 <em>num_choices</em> is the second dimension of the input tensors. (see <em>input_ids</em> above).</p>
<p>Classification scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_tf_outputs.TFMultipleChoiceModelOutput"
>transformers.modeling_tf_outputs.TFMultipleChoiceModelOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),ta=new he({props:{$$slots:{default:[L3]},$$scope:{ctx:E}}}),oa=new ue({props:{anchor:"transformers.TFRobertaForMultipleChoice.call.example",$$slots:{default:[O3]},$$scope:{ctx:E}}}),jl=new De({}),Al=new O({props:{name:"class transformers.TFRobertaForTokenClassification",anchor:"transformers.TFRobertaForTokenClassification",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFRobertaForTokenClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/roberta#transformers.RobertaConfig">RobertaConfig</a>) &#x2014; Model configuration class with all the parameters of the
model. Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/roberta/modeling_tf_roberta.py#L1523"}}),sa=new he({props:{$$slots:{default:[N3]},$$scope:{ctx:E}}}),Nl=new O({props:{name:"call",anchor:"transformers.TFRobertaForTokenClassification.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.TFRobertaForTokenClassification.call.input_ids",description:`<strong>input_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.TFRobertaForTokenClassification.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.TFRobertaForTokenClassification.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.TFRobertaForTokenClassification.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.TFRobertaForTokenClassification.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.TFRobertaForTokenClassification.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.TFRobertaForTokenClassification.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.TFRobertaForTokenClassification.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.TFRobertaForTokenClassification.call.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.TFRobertaForTokenClassification.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.TFRobertaForTokenClassification.call.labels",description:`<strong>labels</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Labels for computing the token classification loss. Indices should be in <code>[0, ..., config.num_labels - 1]</code>.`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/roberta/modeling_tf_roberta.py#L1541",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_tf_outputs.TFTokenClassifierOutput"
>transformers.modeling_tf_outputs.TFTokenClassifierOutput</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/main/en/model_doc/roberta#transformers.RobertaConfig"
>RobertaConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>tf.Tensor</code> of shape <code>(n,)</code>, <em>optional</em>, where n is the number of unmasked labels, returned when <code>labels</code> is provided)  \u2014 Classification loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, config.num_labels)</code>) \u2014 Classification scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_tf_outputs.TFTokenClassifierOutput"
>transformers.modeling_tf_outputs.TFTokenClassifierOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),aa=new he({props:{$$slots:{default:[I3]},$$scope:{ctx:E}}}),ra=new ue({props:{anchor:"transformers.TFRobertaForTokenClassification.call.example",$$slots:{default:[D3]},$$scope:{ctx:E}}}),ia=new ue({props:{anchor:"transformers.TFRobertaForTokenClassification.call.example-2",$$slots:{default:[S3]},$$scope:{ctx:E}}}),Il=new De({}),Dl=new O({props:{name:"class transformers.TFRobertaForQuestionAnswering",anchor:"transformers.TFRobertaForQuestionAnswering",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFRobertaForQuestionAnswering.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/roberta#transformers.RobertaConfig">RobertaConfig</a>) &#x2014; Model configuration class with all the parameters of the
model. Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/roberta/modeling_tf_roberta.py#L1613"}}),da=new he({props:{$$slots:{default:[W3]},$$scope:{ctx:E}}}),Ul=new O({props:{name:"call",anchor:"transformers.TFRobertaForQuestionAnswering.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.TFRobertaForQuestionAnswering.call.input_ids",description:`<strong>input_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.TFRobertaForQuestionAnswering.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.TFRobertaForQuestionAnswering.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.TFRobertaForQuestionAnswering.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.TFRobertaForQuestionAnswering.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.TFRobertaForQuestionAnswering.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.TFRobertaForQuestionAnswering.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.TFRobertaForQuestionAnswering.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.TFRobertaForQuestionAnswering.call.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.TFRobertaForQuestionAnswering.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.TFRobertaForQuestionAnswering.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.TFRobertaForQuestionAnswering.call.end_positions",description:`<strong>end_positions</strong> (<code>tf.Tensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for position (index) of the end of the labelled span for computing the token classification loss.
Positions are clamped to the length of the sequence (<code>sequence_length</code>). Position outside of the sequence
are not taken into account for computing the loss.`,name:"end_positions"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/roberta/modeling_tf_roberta.py#L1626",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_tf_outputs.TFQuestionAnsweringModelOutput"
>transformers.modeling_tf_outputs.TFQuestionAnsweringModelOutput</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/main/en/model_doc/roberta#transformers.RobertaConfig"
>RobertaConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, )</code>, <em>optional</em>, returned when <code>start_positions</code> and <code>end_positions</code> are provided) \u2014 Total span extraction loss is the sum of a Cross-Entropy for the start and end positions.</p>
</li>
<li>
<p><strong>start_logits</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>) \u2014 Span-start scores (before SoftMax).</p>
</li>
<li>
<p><strong>end_logits</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>) \u2014 Span-end scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_tf_outputs.TFQuestionAnsweringModelOutput"
>transformers.modeling_tf_outputs.TFQuestionAnsweringModelOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),ca=new he({props:{$$slots:{default:[B3]},$$scope:{ctx:E}}}),pa=new ue({props:{anchor:"transformers.TFRobertaForQuestionAnswering.call.example",$$slots:{default:[U3]},$$scope:{ctx:E}}}),ha=new ue({props:{anchor:"transformers.TFRobertaForQuestionAnswering.call.example-2",$$slots:{default:[H3]},$$scope:{ctx:E}}}),Hl=new De({}),Ql=new O({props:{name:"class transformers.FlaxRobertaModel",anchor:"transformers.FlaxRobertaModel",parameters:[{name:"config",val:": RobertaConfig"},{name:"input_shape",val:": typing.Tuple = (1, 1)"},{name:"seed",val:": int = 0"},{name:"dtype",val:": dtype = <class 'jax.numpy.float32'>"},{name:"_do_init",val:": bool = True"},{name:"gradient_checkpointing",val:": bool = False"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.FlaxRobertaModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/roberta#transformers.RobertaConfig">RobertaConfig</a>) &#x2014; Model configuration class with all the parameters of the
model. Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/main/en/main_classes/model#transformers.FlaxPreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/roberta/modeling_flax_roberta.py#L991"}}),ed=new O({props:{name:"__call__",anchor:"transformers.FlaxRobertaModel.__call__",parameters:[{name:"input_ids",val:""},{name:"attention_mask",val:" = None"},{name:"token_type_ids",val:" = None"},{name:"position_ids",val:" = None"},{name:"head_mask",val:" = None"},{name:"encoder_hidden_states",val:" = None"},{name:"encoder_attention_mask",val:" = None"},{name:"params",val:": dict = None"},{name:"dropout_rng",val:": PRNGKey = None"},{name:"train",val:": bool = False"},{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:"past_key_values",val:": dict = None"}],parametersDescription:[{anchor:"transformers.FlaxRobertaModel.__call__.input_ids",description:`<strong>input_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.FlaxRobertaModel.__call__.attention_mask",description:`<strong>attention_mask</strong> (<code>numpy.ndarray</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.FlaxRobertaModel.__call__.token_type_ids",description:`<strong>token_type_ids</strong> (<code>numpy.ndarray</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.FlaxRobertaModel.__call__.position_ids",description:`<strong>position_ids</strong> (<code>numpy.ndarray</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>.`,name:"position_ids"},{anchor:"transformers.FlaxRobertaModel.__call__.head_mask",description:`<strong>head_mask</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <code>optional) -- Mask to nullify selected heads of the attention modules. Mask values selected in </code>[0, 1]\`:</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.FlaxRobertaModel.__call__.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/roberta/modeling_flax_roberta.py#L817",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_flax_outputs.FlaxBaseModelOutputWithPooling"
>transformers.modeling_flax_outputs.FlaxBaseModelOutputWithPooling</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/main/en/model_doc/roberta#transformers.RobertaConfig"
>RobertaConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>last_hidden_state</strong> (<code>jnp.ndarray</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>jnp.ndarray</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>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(jnp.ndarray)</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>jnp.ndarray</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(jnp.ndarray)</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>jnp.ndarray</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_flax_outputs.FlaxBaseModelOutputWithPooling"
>transformers.modeling_flax_outputs.FlaxBaseModelOutputWithPooling</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),ma=new he({props:{$$slots:{default:[Q3]},$$scope:{ctx:E}}}),fa=new ue({props:{anchor:"transformers.FlaxRobertaModel.__call__.example",$$slots:{default:[K3]},$$scope:{ctx:E}}}),td=new De({}),od=new O({props:{name:"class transformers.FlaxRobertaForCausalLM",anchor:"transformers.FlaxRobertaForCausalLM",parameters:[{name:"config",val:": RobertaConfig"},{name:"input_shape",val:": typing.Tuple = (1, 1)"},{name:"seed",val:": int = 0"},{name:"dtype",val:": dtype = <class 'jax.numpy.float32'>"},{name:"_do_init",val:": bool = True"},{name:"gradient_checkpointing",val:": bool = False"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.FlaxRobertaForCausalLM.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/roberta#transformers.RobertaConfig">RobertaConfig</a>) &#x2014; Model configuration class with all the parameters of the
model. Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/main/en/main_classes/model#transformers.FlaxPreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/roberta/modeling_flax_roberta.py#L1453"}}),cd=new O({props:{name:"__call__",anchor:"transformers.FlaxRobertaForCausalLM.__call__",parameters:[{name:"input_ids",val:""},{name:"attention_mask",val:" = None"},{name:"token_type_ids",val:" = None"},{name:"position_ids",val:" = None"},{name:"head_mask",val:" = None"},{name:"encoder_hidden_states",val:" = None"},{name:"encoder_attention_mask",val:" = None"},{name:"params",val:": dict = None"},{name:"dropout_rng",val:": PRNGKey = None"},{name:"train",val:": bool = False"},{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:"past_key_values",val:": dict = None"}],parametersDescription:[{anchor:"transformers.FlaxRobertaForCausalLM.__call__.input_ids",description:`<strong>input_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.FlaxRobertaForCausalLM.__call__.attention_mask",description:`<strong>attention_mask</strong> (<code>numpy.ndarray</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.FlaxRobertaForCausalLM.__call__.token_type_ids",description:`<strong>token_type_ids</strong> (<code>numpy.ndarray</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.FlaxRobertaForCausalLM.__call__.position_ids",description:`<strong>position_ids</strong> (<code>numpy.ndarray</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>.`,name:"position_ids"},{anchor:"transformers.FlaxRobertaForCausalLM.__call__.head_mask",description:`<strong>head_mask</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <code>optional) -- Mask to nullify selected heads of the attention modules. Mask values selected in </code>[0, 1]\`:</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.FlaxRobertaForCausalLM.__call__.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/roberta/modeling_flax_roberta.py#L817",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_flax_outputs.FlaxCausalLMOutputWithCrossAttentions"
>transformers.modeling_flax_outputs.FlaxCausalLMOutputWithCrossAttentions</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/main/en/model_doc/roberta#transformers.RobertaConfig"
>RobertaConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>logits</strong> (<code>jnp.ndarray</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(jnp.ndarray)</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>jnp.ndarray</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(jnp.ndarray)</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>jnp.ndarray</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(jnp.ndarray)</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>jnp.ndarray</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(jnp.ndarray))</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>jnp.ndarray</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/main/en/main_classes/output#transformers.modeling_flax_outputs.FlaxCausalLMOutputWithCrossAttentions"
>transformers.modeling_flax_outputs.FlaxCausalLMOutputWithCrossAttentions</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),_a=new he({props:{$$slots:{default:[J3]},$$scope:{ctx:E}}}),ba=new ue({props:{anchor:"transformers.FlaxRobertaForCausalLM.__call__.example",$$slots:{default:[V3]},$$scope:{ctx:E}}}),pd=new De({}),hd=new O({props:{name:"class transformers.FlaxRobertaForMaskedLM",anchor:"transformers.FlaxRobertaForMaskedLM",parameters:[{name:"config",val:": RobertaConfig"},{name:"input_shape",val:": typing.Tuple = (1, 1)"},{name:"seed",val:": int = 0"},{name:"dtype",val:": dtype = <class 'jax.numpy.float32'>"},{name:"_do_init",val:": bool = True"},{name:"gradient_checkpointing",val:": bool = False"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.FlaxRobertaForMaskedLM.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/roberta#transformers.RobertaConfig">RobertaConfig</a>) &#x2014; Model configuration class with all the parameters of the
model. Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/main/en/main_classes/model#transformers.FlaxPreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/roberta/modeling_flax_roberta.py#L1057"}}),vd=new O({props:{name:"__call__",anchor:"transformers.FlaxRobertaForMaskedLM.__call__",parameters:[{name:"input_ids",val:""},{name:"attention_mask",val:" = None"},{name:"token_type_ids",val:" = None"},{name:"position_ids",val:" = None"},{name:"head_mask",val:" = None"},{name:"encoder_hidden_states",val:" = None"},{name:"encoder_attention_mask",val:" = None"},{name:"params",val:": dict = None"},{name:"dropout_rng",val:": PRNGKey = None"},{name:"train",val:": bool = False"},{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:"past_key_values",val:": dict = None"}],parametersDescription:[{anchor:"transformers.FlaxRobertaForMaskedLM.__call__.input_ids",description:`<strong>input_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.FlaxRobertaForMaskedLM.__call__.attention_mask",description:`<strong>attention_mask</strong> (<code>numpy.ndarray</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.FlaxRobertaForMaskedLM.__call__.token_type_ids",description:`<strong>token_type_ids</strong> (<code>numpy.ndarray</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.FlaxRobertaForMaskedLM.__call__.position_ids",description:`<strong>position_ids</strong> (<code>numpy.ndarray</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>.`,name:"position_ids"},{anchor:"transformers.FlaxRobertaForMaskedLM.__call__.head_mask",description:`<strong>head_mask</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <code>optional) -- Mask to nullify selected heads of the attention modules. Mask values selected in </code>[0, 1]\`:</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.FlaxRobertaForMaskedLM.__call__.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/roberta/modeling_flax_roberta.py#L817",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_flax_outputs.FlaxBaseModelOutputWithPooling"
>transformers.modeling_flax_outputs.FlaxBaseModelOutputWithPooling</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/main/en/model_doc/roberta#transformers.RobertaConfig"
>RobertaConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>last_hidden_state</strong> (<code>jnp.ndarray</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>jnp.ndarray</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>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(jnp.ndarray)</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>jnp.ndarray</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(jnp.ndarray)</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>jnp.ndarray</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_flax_outputs.FlaxBaseModelOutputWithPooling"
>transformers.modeling_flax_outputs.FlaxBaseModelOutputWithPooling</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),ya=new he({props:{$$slots:{default:[G3]},$$scope:{ctx:E}}}),va=new ue({props:{anchor:"transformers.FlaxRobertaForMaskedLM.__call__.example",$$slots:{default:[X3]},$$scope:{ctx:E}}}),wd=new De({}),Td=new O({props:{name:"class transformers.FlaxRobertaForSequenceClassification",anchor:"transformers.FlaxRobertaForSequenceClassification",parameters:[{name:"config",val:": RobertaConfig"},{name:"input_shape",val:": typing.Tuple = (1, 1)"},{name:"seed",val:": int = 0"},{name:"dtype",val:": dtype = <class 'jax.numpy.float32'>"},{name:"_do_init",val:": bool = True"},{name:"gradient_checkpointing",val:": bool = False"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.FlaxRobertaForSequenceClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/roberta#transformers.RobertaConfig">RobertaConfig</a>) &#x2014; Model configuration class with all the parameters of the
model. Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/main/en/main_classes/model#transformers.FlaxPreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/roberta/modeling_flax_roberta.py#L1129"}}),qd=new O({props:{name:"__call__",anchor:"transformers.FlaxRobertaForSequenceClassification.__call__",parameters:[{name:"input_ids",val:""},{name:"attention_mask",val:" = None"},{name:"token_type_ids",val:" = None"},{name:"position_ids",val:" = None"},{name:"head_mask",val:" = None"},{name:"encoder_hidden_states",val:" = None"},{name:"encoder_attention_mask",val:" = None"},{name:"params",val:": dict = None"},{name:"dropout_rng",val:": PRNGKey = None"},{name:"train",val:": bool = False"},{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:"past_key_values",val:": dict = None"}],parametersDescription:[{anchor:"transformers.FlaxRobertaForSequenceClassification.__call__.input_ids",description:`<strong>input_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.FlaxRobertaForSequenceClassification.__call__.attention_mask",description:`<strong>attention_mask</strong> (<code>numpy.ndarray</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.FlaxRobertaForSequenceClassification.__call__.token_type_ids",description:`<strong>token_type_ids</strong> (<code>numpy.ndarray</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.FlaxRobertaForSequenceClassification.__call__.position_ids",description:`<strong>position_ids</strong> (<code>numpy.ndarray</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>.`,name:"position_ids"},{anchor:"transformers.FlaxRobertaForSequenceClassification.__call__.head_mask",description:`<strong>head_mask</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <code>optional) -- Mask to nullify selected heads of the attention modules. Mask values selected in </code>[0, 1]\`:</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.FlaxRobertaForSequenceClassification.__call__.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/roberta/modeling_flax_roberta.py#L817",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_flax_outputs.FlaxSequenceClassifierOutput"
>transformers.modeling_flax_outputs.FlaxSequenceClassifierOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/main/en/model_doc/roberta#transformers.RobertaConfig"
>RobertaConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>logits</strong> (<code>jnp.ndarray</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(jnp.ndarray)</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>jnp.ndarray</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(jnp.ndarray)</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>jnp.ndarray</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_flax_outputs.FlaxSequenceClassifierOutput"
>transformers.modeling_flax_outputs.FlaxSequenceClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Ta=new he({props:{$$slots:{default:[Y3]},$$scope:{ctx:E}}}),$a=new ue({props:{anchor:"transformers.FlaxRobertaForSequenceClassification.__call__.example",$$slots:{default:[Z3]},$$scope:{ctx:E}}}),Cd=new De({}),jd=new O({props:{name:"class transformers.FlaxRobertaForMultipleChoice",anchor:"transformers.FlaxRobertaForMultipleChoice",parameters:[{name:"config",val:": RobertaConfig"},{name:"input_shape",val:": typing.Tuple = (1, 1)"},{name:"seed",val:": int = 0"},{name:"dtype",val:": dtype = <class 'jax.numpy.float32'>"},{name:"_do_init",val:": bool = True"},{name:"gradient_checkpointing",val:": bool = False"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.FlaxRobertaForMultipleChoice.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/roberta#transformers.RobertaConfig">RobertaConfig</a>) &#x2014; Model configuration class with all the parameters of the
model. Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/main/en/main_classes/model#transformers.FlaxPreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/roberta/modeling_flax_roberta.py#L1210"}}),Sd=new O({props:{name:"__call__",anchor:"transformers.FlaxRobertaForMultipleChoice.__call__",parameters:[{name:"input_ids",val:""},{name:"attention_mask",val:" = None"},{name:"token_type_ids",val:" = None"},{name:"position_ids",val:" = None"},{name:"head_mask",val:" = None"},{name:"encoder_hidden_states",val:" = None"},{name:"encoder_attention_mask",val:" = None"},{name:"params",val:": dict = None"},{name:"dropout_rng",val:": PRNGKey = None"},{name:"train",val:": bool = False"},{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:"past_key_values",val:": dict = None"}],parametersDescription:[{anchor:"transformers.FlaxRobertaForMultipleChoice.__call__.input_ids",description:`<strong>input_ids</strong> (<code>numpy.ndarray</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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.FlaxRobertaForMultipleChoice.__call__.attention_mask",description:`<strong>attention_mask</strong> (<code>numpy.ndarray</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.FlaxRobertaForMultipleChoice.__call__.token_type_ids",description:`<strong>token_type_ids</strong> (<code>numpy.ndarray</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.FlaxRobertaForMultipleChoice.__call__.position_ids",description:`<strong>position_ids</strong> (<code>numpy.ndarray</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>.`,name:"position_ids"},{anchor:"transformers.FlaxRobertaForMultipleChoice.__call__.head_mask",description:`<strong>head_mask</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, num_choices, sequence_length)</code>, <code>optional) -- Mask to nullify selected heads of the attention modules. Mask values selected in </code>[0, 1]\`:</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.FlaxRobertaForMultipleChoice.__call__.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/roberta/modeling_flax_roberta.py#L817",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_flax_outputs.FlaxMultipleChoiceModelOutput"
>transformers.modeling_flax_outputs.FlaxMultipleChoiceModelOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/main/en/model_doc/roberta#transformers.RobertaConfig"
>RobertaConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>logits</strong> (<code>jnp.ndarray</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(jnp.ndarray)</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>jnp.ndarray</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(jnp.ndarray)</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>jnp.ndarray</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_flax_outputs.FlaxMultipleChoiceModelOutput"
>transformers.modeling_flax_outputs.FlaxMultipleChoiceModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),xa=new he({props:{$$slots:{default:[eA]},$$scope:{ctx:E}}}),Ea=new ue({props:{anchor:"transformers.FlaxRobertaForMultipleChoice.__call__.example",$$slots:{default:[tA]},$$scope:{ctx:E}}}),Wd=new De({}),Bd=new O({props:{name:"class transformers.FlaxRobertaForTokenClassification",anchor:"transformers.FlaxRobertaForTokenClassification",parameters:[{name:"config",val:": RobertaConfig"},{name:"input_shape",val:": typing.Tuple = (1, 1)"},{name:"seed",val:": int = 0"},{name:"dtype",val:": dtype = <class 'jax.numpy.float32'>"},{name:"_do_init",val:": bool = True"},{name:"gradient_checkpointing",val:": bool = False"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.FlaxRobertaForTokenClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/roberta#transformers.RobertaConfig">RobertaConfig</a>) &#x2014; Model configuration class with all the parameters of the
model. Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/main/en/main_classes/model#transformers.FlaxPreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/roberta/modeling_flax_roberta.py#L1292"}}),Xd=new O({props:{name:"__call__",anchor:"transformers.FlaxRobertaForTokenClassification.__call__",parameters:[{name:"input_ids",val:""},{name:"attention_mask",val:" = None"},{name:"token_type_ids",val:" = None"},{name:"position_ids",val:" = None"},{name:"head_mask",val:" = None"},{name:"encoder_hidden_states",val:" = None"},{name:"encoder_attention_mask",val:" = None"},{name:"params",val:": dict = None"},{name:"dropout_rng",val:": PRNGKey = None"},{name:"train",val:": bool = False"},{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:"past_key_values",val:": dict = None"}],parametersDescription:[{anchor:"transformers.FlaxRobertaForTokenClassification.__call__.input_ids",description:`<strong>input_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.FlaxRobertaForTokenClassification.__call__.attention_mask",description:`<strong>attention_mask</strong> (<code>numpy.ndarray</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.FlaxRobertaForTokenClassification.__call__.token_type_ids",description:`<strong>token_type_ids</strong> (<code>numpy.ndarray</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.FlaxRobertaForTokenClassification.__call__.position_ids",description:`<strong>position_ids</strong> (<code>numpy.ndarray</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>.`,name:"position_ids"},{anchor:"transformers.FlaxRobertaForTokenClassification.__call__.head_mask",description:`<strong>head_mask</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <code>optional) -- Mask to nullify selected heads of the attention modules. Mask values selected in </code>[0, 1]\`:</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.FlaxRobertaForTokenClassification.__call__.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/roberta/modeling_flax_roberta.py#L817",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_flax_outputs.FlaxTokenClassifierOutput"
>transformers.modeling_flax_outputs.FlaxTokenClassifierOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/main/en/model_doc/roberta#transformers.RobertaConfig"
>RobertaConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>logits</strong> (<code>jnp.ndarray</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(jnp.ndarray)</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>jnp.ndarray</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(jnp.ndarray)</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>jnp.ndarray</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_flax_outputs.FlaxTokenClassifierOutput"
>transformers.modeling_flax_outputs.FlaxTokenClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Ma=new he({props:{$$slots:{default:[oA]},$$scope:{ctx:E}}}),za=new ue({props:{anchor:"transformers.FlaxRobertaForTokenClassification.__call__.example",$$slots:{default:[nA]},$$scope:{ctx:E}}}),Yd=new De({}),Zd=new O({props:{name:"class transformers.FlaxRobertaForQuestionAnswering",anchor:"transformers.FlaxRobertaForQuestionAnswering",parameters:[{name:"config",val:": RobertaConfig"},{name:"input_shape",val:": typing.Tuple = (1, 1)"},{name:"seed",val:": int = 0"},{name:"dtype",val:": dtype = <class 'jax.numpy.float32'>"},{name:"_do_init",val:": bool = True"},{name:"gradient_checkpointing",val:": bool = False"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.FlaxRobertaForQuestionAnswering.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/roberta#transformers.RobertaConfig">RobertaConfig</a>) &#x2014; Model configuration class with all the parameters of the
model. Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/main/en/main_classes/model#transformers.FlaxPreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/roberta/modeling_flax_roberta.py#L1369"}}),ic=new O({props:{name:"__call__",anchor:"transformers.FlaxRobertaForQuestionAnswering.__call__",parameters:[{name:"input_ids",val:""},{name:"attention_mask",val:" = None"},{name:"token_type_ids",val:" = None"},{name:"position_ids",val:" = None"},{name:"head_mask",val:" = None"},{name:"encoder_hidden_states",val:" = None"},{name:"encoder_attention_mask",val:" = None"},{name:"params",val:": dict = None"},{name:"dropout_rng",val:": PRNGKey = None"},{name:"train",val:": bool = False"},{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:"past_key_values",val:": dict = None"}],parametersDescription:[{anchor:"transformers.FlaxRobertaForQuestionAnswering.__call__.input_ids",description:`<strong>input_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.FlaxRobertaForQuestionAnswering.__call__.attention_mask",description:`<strong>attention_mask</strong> (<code>numpy.ndarray</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.FlaxRobertaForQuestionAnswering.__call__.token_type_ids",description:`<strong>token_type_ids</strong> (<code>numpy.ndarray</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.FlaxRobertaForQuestionAnswering.__call__.position_ids",description:`<strong>position_ids</strong> (<code>numpy.ndarray</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>.`,name:"position_ids"},{anchor:"transformers.FlaxRobertaForQuestionAnswering.__call__.head_mask",description:`<strong>head_mask</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <code>optional) -- Mask to nullify selected heads of the attention modules. Mask values selected in </code>[0, 1]\`:</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.FlaxRobertaForQuestionAnswering.__call__.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/roberta/modeling_flax_roberta.py#L817",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_flax_outputs.FlaxQuestionAnsweringModelOutput"
>transformers.modeling_flax_outputs.FlaxQuestionAnsweringModelOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/main/en/model_doc/roberta#transformers.RobertaConfig"
>RobertaConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>start_logits</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, sequence_length)</code>) \u2014 Span-start scores (before SoftMax).</p>
</li>
<li>
<p><strong>end_logits</strong> (<code>jnp.ndarray</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(jnp.ndarray)</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>jnp.ndarray</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(jnp.ndarray)</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>jnp.ndarray</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_flax_outputs.FlaxQuestionAnsweringModelOutput"
>transformers.modeling_flax_outputs.FlaxQuestionAnsweringModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Ca=new he({props:{$$slots:{default:[sA]},$$scope:{ctx:E}}}),ja=new ue({props:{anchor:"transformers.FlaxRobertaForQuestionAnswering.__call__.example",$$slots:{default:[aA]},$$scope:{ctx:E}}}),{c(){d=a("meta"),k=p(),m=a("h1"),f=a("a"),b=a("span"),v(l.$$.fragment),u=p(),R=a("span"),ae=o("RoBERTa"),Z=p(),N=a("h2"),te=a("a"),oe=a("span"),v(M.$$.fragment),we=p(),K=a("span"),Te=o("Overview"),ge=p(),W=a("p"),$e=o("The RoBERTa model was proposed in "),le=a("a"),J=o("RoBERTa: A Robustly Optimized BERT Pretraining Approach"),Fe=o(` by Yinhan Liu, Myle Ott, Naman Goyal, Jingfei Du, Mandar Joshi, Danqi Chen, Omer
Levy, Mike Lewis, Luke Zettlemoyer, Veselin Stoyanov. It is based on Google\u2019s BERT model released in 2018.`),_e=p(),U=a("p"),xe=o(`It builds on BERT and modifies key hyperparameters, removing the next-sentence pretraining objective and training with
much larger mini-batches and learning rates.`),be=p(),H=a("p"),Ee=o("The abstract from the paper is the following:"),ke=p(),ee=a("p"),C=a("em"),A=o(`Language model pretraining has led to significant performance gains but careful comparison between different
approaches is challenging. Training is computationally expensive, often done on private datasets of different sizes,
and, as we will show, hyperparameter choices have significant impact on the final results. We present a replication
study of BERT pretraining (Devlin et al., 2019) that carefully measures the impact of many key hyperparameters and
training data size. We find that BERT was significantly undertrained, and can match or exceed the performance of every
model published after it. Our best model achieves state-of-the-art results on GLUE, RACE and SQuAD. These results
highlight the importance of previously overlooked design choices, and raise questions about the source of recently
reported improvements. We release our models and code.`),ye=p(),Q=a("p"),Re=o("Tips:"),ve=p(),I=a("ul"),de=a("li"),Me=o("This implementation is the same as "),j=a("a"),ze=o("BertModel"),V=o(` with a tiny embeddings tweak as well as a setup
for Roberta pretrained models.`),qe=p(),ce=a("li"),G=o(`RoBERTa has the same architecture as BERT, but uses a byte-level BPE as a tokenizer (same as GPT-2) and uses a
different pretraining scheme.`),Ce=p(),ne=a("li"),D=o("RoBERTa doesn\u2019t have "),pe=a("code"),X=o("token_type_ids"),je=o(`, you don\u2019t need to indicate which token belongs to which segment. Just
separate your segments with the separation token `),se=a("code"),P=o("tokenizer.sep_token"),Ae=o(" (or "),L=a("code"),Pe=o("</s>"),Le=o(")"),y=p(),z=a("li"),Ue=a("a"),re=o("CamemBERT"),Xe=o(" is a wrapper around RoBERTa. Refer to this page for usage examples."),Ke=p(),q=a("p"),Ye=o("This model was contributed by "),Se=a("a"),Ze=o("julien-c"),et=o(". The original code can be found "),We=a("a"),S=o("here"),Y=o("."),Je=p(),Oe=a("h2"),B=a("a"),He=a("span"),v(Be.$$.fragment),Ne=p(),Qe=a("span"),ie=o("Resources"),Ve=p(),Tc=a("p"),vb=o("A list of official Hugging Face and community (indicated by \u{1F30E}) resources to help you get started with RoBERTa. If you\u2019re interested in submitting a resource to be included here, please feel free to open a Pull Request and we\u2019ll review it! The resource should ideally demonstrate something new instead of duplicating an existing resource."),Sf=p(),v(ar.$$.fragment),Wf=p(),_t=a("ul"),en=a("li"),wb=o("A blog on "),rr=a("a"),Tb=o("Getting Started with Sentiment Analysis on Twitter"),$b=o(" using RoBERTa and the "),ir=a("a"),Fb=o("Inference API"),xb=o("."),Eb=p(),lr=a("li"),Rb=o("A blog on "),dr=a("a"),Mb=o("Opinion Classification with Kili and Hugging Face AutoTrain"),zb=o(" using RoBERTa."),qb=p(),cr=a("li"),Cb=o("A notebook on how to "),pr=a("a"),jb=o("finetune RoBERTa for sentiment analysis"),Ab=o(". \u{1F30E}"),Pb=p(),$o=a("li"),$c=a("a"),Lb=o("RobertaForSequenceClassification"),Ob=o(" is supported by this "),hr=a("a"),Nb=o("example script"),Ib=o(" and "),ur=a("a"),Db=o("notebook"),Sb=o("."),Wb=p(),Fo=a("li"),Fc=a("a"),Bb=o("TFRobertaForSequenceClassification"),Ub=o(" is supported by this "),mr=a("a"),Hb=o("example script"),Qb=o(" and "),fr=a("a"),Kb=o("notebook"),Jb=o("."),Vb=p(),xo=a("li"),xc=a("a"),Gb=o("FlaxRobertaForSequenceClassification"),Xb=o(" is supported by this "),gr=a("a"),Yb=o("example script"),Zb=o(" and "),_r=a("a"),ek=o("notebook"),tk=o("."),Bf=p(),v(br.$$.fragment),Uf=p(),Bt=a("ul"),Eo=a("li"),Ec=a("a"),ok=o("RobertaForTokenClassification"),nk=o(" is supported by this "),kr=a("a"),sk=o("example script"),ak=o(" and "),yr=a("a"),rk=o("notebook"),ik=o("."),lk=p(),Ro=a("li"),Rc=a("a"),dk=o("TFRobertaForTokenClassification"),ck=o(" is supported by this "),vr=a("a"),pk=o("example script"),hk=o(" and "),wr=a("a"),uk=o("notebook"),mk=o("."),fk=p(),es=a("li"),Mc=a("a"),gk=o("FlaxRobertaForTokenClassification"),_k=o(" is supported by this "),Tr=a("a"),bk=o("example script"),kk=o("."),yk=p(),zc=a("li"),$r=a("a"),vk=o("Token classification"),wk=o(" chapter of the \u{1F917} Hugging Face Course."),Hf=p(),v(Fr.$$.fragment),Qf=p(),Et=a("ul"),xr=a("li"),Tk=o("A blog on "),Er=a("a"),$k=o("How to train a new language model from scratch using Transformers and Tokenizers"),Fk=o(" with RoBERTa."),xk=p(),Mo=a("li"),qc=a("a"),Ek=o("RobertaForMaskedLM"),Rk=o(" is supported by this "),Rr=a("a"),Mk=o("example script"),zk=o(" and "),Mr=a("a"),qk=o("notebook"),Ck=o("."),jk=p(),zo=a("li"),Cc=a("a"),Ak=o("TFRobertaForMaskedLM"),Pk=o(" is supported by this "),zr=a("a"),Lk=o("example script"),Ok=o(" and "),qr=a("a"),Nk=o("notebook"),Ik=o("."),Dk=p(),qo=a("li"),jc=a("a"),Sk=o("FlaxRobertaForMaskedLM"),Wk=o(" is supported by this "),Cr=a("a"),Bk=o("example script"),Uk=o(" and "),jr=a("a"),Hk=o("notebook"),Qk=o("."),Kk=p(),Ac=a("li"),Ar=a("a"),Jk=o("Masked language modeling"),Vk=o(" chapter of the \u{1F917} Hugging Face Course."),Kf=p(),v(Pr.$$.fragment),Jf=p(),Rt=a("ul"),Lr=a("li"),Gk=o("A blog on "),Or=a("a"),Xk=o("Accelerated Inference with Optimum and Transformers Pipelines"),Yk=o(" with RoBERTa for question answering."),Zk=p(),Co=a("li"),Pc=a("a"),ey=o("RobertaForQuestionAnswering"),ty=o(" is supported by this "),Nr=a("a"),oy=o("example script"),ny=o(" and "),Ir=a("a"),sy=o("notebook"),ay=o("."),ry=p(),jo=a("li"),Lc=a("a"),iy=o("TFRobertaForQuestionAnswering"),ly=o(" is supported by this "),Dr=a("a"),dy=o("example script"),cy=o(" and "),Sr=a("a"),py=o("notebook"),hy=o("."),uy=p(),ts=a("li"),Oc=a("a"),my=o("FlaxRobertaForQuestionAnswering"),fy=o(" is supported by this "),Wr=a("a"),gy=o("example script"),_y=o("."),by=p(),Nc=a("li"),Br=a("a"),ky=o("Question answering"),yy=o(" chapter of the \u{1F917} Hugging Face Course."),Vf=p(),Ic=a("p"),ah=a("strong"),vy=o("Multiple choice"),Gf=p(),os=a("ul"),Ao=a("li"),Dc=a("a"),wy=o("RobertaForMultipleChoice"),Ty=o(" is supported by this "),Ur=a("a"),$y=o("example script"),Fy=o(" and "),Hr=a("a"),xy=o("notebook"),Ey=o("."),Ry=p(),Po=a("li"),Sc=a("a"),My=o("TFRobertaForMultipleChoice"),zy=o(" is supported by this "),Qr=a("a"),qy=o("example script"),Cy=o(" and "),Kr=a("a"),jy=o("notebook"),Ay=o("."),Xf=p(),tn=a("h2"),ns=a("a"),rh=a("span"),v(Jr.$$.fragment),Py=p(),ih=a("span"),Ly=o("RobertaConfig"),Yf=p(),Wt=a("div"),v(Vr.$$.fragment),Oy=p(),uo=a("p"),Ny=o("This is the configuration class to store the configuration of a "),Wc=a("a"),Iy=o("RobertaModel"),Dy=o(" or a "),Bc=a("a"),Sy=o("TFRobertaModel"),Wy=o(`. It is
used to instantiate a RoBERTa 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 RoBERTa
`),Gr=a("a"),By=o("roberta-base"),Uy=o(" architecture."),Hy=p(),on=a("p"),Qy=o("Configuration objects inherit from "),Uc=a("a"),Ky=o("PretrainedConfig"),Jy=o(` and can be used to control the model outputs. Read the
documentation from `),Hc=a("a"),Vy=o("PretrainedConfig"),Gy=o(" for more information."),Xy=p(),v(ss.$$.fragment),Zf=p(),nn=a("h2"),as=a("a"),lh=a("span"),v(Xr.$$.fragment),Yy=p(),dh=a("span"),Zy=o("RobertaTokenizer"),eg=p(),Ie=a("div"),v(Yr.$$.fragment),ev=p(),ch=a("p"),tv=o("Constructs a RoBERTa tokenizer, derived from the GPT-2 tokenizer, using byte-level Byte-Pair-Encoding."),ov=p(),ph=a("p"),nv=o("This tokenizer has been trained to treat spaces like parts of the tokens (a bit like sentencepiece) so a word will"),sv=p(),v(rs.$$.fragment),av=p(),Zr=a("p"),rv=o("You can get around that behavior by passing "),hh=a("code"),iv=o("add_prefix_space=True"),lv=o(` when instantiating this tokenizer or when you
call it on some text, but since the model was not pretrained this way, it might yield a decrease in performance.`),dv=p(),v(is.$$.fragment),cv=p(),ei=a("p"),pv=o("This tokenizer inherits from "),Qc=a("a"),hv=o("PreTrainedTokenizer"),uv=o(` which contains most of the main methods. Users should refer to
this superclass for more information regarding those methods.`),mv=p(),Lo=a("div"),v(ti.$$.fragment),fv=p(),uh=a("p"),gv=o(`Build model inputs from a sequence or a pair of sequence for sequence classification tasks by concatenating and
adding special tokens. A RoBERTa sequence has the following format:`),_v=p(),oi=a("ul"),Kc=a("li"),bv=o("single sequence: "),mh=a("code"),kv=o("<s> X </s>"),yv=p(),Jc=a("li"),vv=o("pair of sequences: "),fh=a("code"),wv=o("<s> A </s></s> B </s>"),Tv=p(),ls=a("div"),v(ni.$$.fragment),$v=p(),si=a("p"),Fv=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 `),gh=a("code"),xv=o("prepare_for_model"),Ev=o(" method."),Rv=p(),ds=a("div"),v(ai.$$.fragment),Mv=p(),_h=a("p"),zv=o(`Create a mask from the two sequences passed to be used in a sequence-pair classification task. RoBERTa does not
make use of token type ids, therefore a list of zeros is returned.`),qv=p(),Vc=a("div"),v(ri.$$.fragment),tg=p(),sn=a("h2"),cs=a("a"),bh=a("span"),v(ii.$$.fragment),Cv=p(),kh=a("span"),jv=o("RobertaTokenizerFast"),og=p(),tt=a("div"),v(li.$$.fragment),Av=p(),di=a("p"),Pv=o("Construct a \u201Cfast\u201D RoBERTa tokenizer (backed by HuggingFace\u2019s "),yh=a("em"),Lv=o("tokenizers"),Ov=o(` library), derived from the GPT-2
tokenizer, using byte-level Byte-Pair-Encoding.`),Nv=p(),vh=a("p"),Iv=o("This tokenizer has been trained to treat spaces like parts of the tokens (a bit like sentencepiece) so a word will"),Dv=p(),v(ps.$$.fragment),Sv=p(),ci=a("p"),Wv=o("You can get around that behavior by passing "),wh=a("code"),Bv=o("add_prefix_space=True"),Uv=o(` when instantiating this tokenizer or when you
call it on some text, but since the model was not pretrained this way, it might yield a decrease in performance.`),Hv=p(),v(hs.$$.fragment),Qv=p(),pi=a("p"),Kv=o("This tokenizer inherits from "),Gc=a("a"),Jv=o("PreTrainedTokenizerFast"),Vv=o(` which contains most of the main methods. Users should
refer to this superclass for more information regarding those methods.`),Gv=p(),Xc=a("div"),v(hi.$$.fragment),ng=p(),an=a("h2"),us=a("a"),Th=a("span"),v(ui.$$.fragment),Xv=p(),$h=a("span"),Yv=o("RobertaModel"),sg=p(),ot=a("div"),v(mi.$$.fragment),Zv=p(),Fh=a("p"),ew=o("The bare RoBERTa Model transformer outputting raw hidden-states without any specific head on top."),tw=p(),fi=a("p"),ow=o("This model inherits from "),Yc=a("a"),nw=o("PreTrainedModel"),sw=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.)`),aw=p(),gi=a("p"),rw=o("This model is also a PyTorch "),_i=a("a"),iw=o("torch.nn.Module"),lw=o(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),dw=p(),bi=a("p"),cw=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 `),xh=a("em"),pw=o(`Attention is
all you need`),hw=o(`_ by Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N. Gomez, Lukasz
Kaiser and Illia Polosukhin.`),uw=p(),ct=a("p"),mw=o("To behave as an decoder the model needs to be initialized with the "),Eh=a("code"),fw=o("is_decoder"),gw=o(` argument of the configuration set
to `),Rh=a("code"),_w=o("True"),bw=o(". To be used in a Seq2Seq model, the model needs to initialized with both "),Mh=a("code"),kw=o("is_decoder"),yw=o(` argument and
`),zh=a("code"),vw=o("add_cross_attention"),ww=o(" set to "),qh=a("code"),Tw=o("True"),$w=o("; an "),Ch=a("code"),Fw=o("encoder_hidden_states"),xw=o(" is then expected as an input to the forward pass."),Ew=p(),ms=a("p"),Rw=o(".. _"),jh=a("em"),Mw=o("Attention is all you need"),zw=o(": "),ki=a("a"),qw=o("https://arxiv.org/abs/1706.03762"),Cw=p(),Ut=a("div"),v(yi.$$.fragment),jw=p(),rn=a("p"),Aw=o("The "),Zc=a("a"),Pw=o("RobertaModel"),Lw=o(" forward method, overrides the "),Ah=a("code"),Ow=o("__call__"),Nw=o(" special method."),Iw=p(),v(fs.$$.fragment),Dw=p(),v(gs.$$.fragment),ag=p(),ln=a("h2"),_s=a("a"),Ph=a("span"),v(vi.$$.fragment),Sw=p(),Lh=a("span"),Ww=o("RobertaForCausalLM"),rg=p(),yt=a("div"),v(wi.$$.fragment),Bw=p(),Ti=a("p"),Uw=o("RoBERTa Model with a "),Oh=a("code"),Hw=o("language modeling"),Qw=o(" head on top for CLM fine-tuning."),Kw=p(),$i=a("p"),Jw=o("This model inherits from "),ep=a("a"),Vw=o("PreTrainedModel"),Gw=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.)`),Xw=p(),Fi=a("p"),Yw=o("This model is also a PyTorch "),xi=a("a"),Zw=o("torch.nn.Module"),eT=o(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),tT=p(),Ht=a("div"),v(Ei.$$.fragment),oT=p(),dn=a("p"),nT=o("The "),tp=a("a"),sT=o("RobertaForCausalLM"),aT=o(" forward method, overrides the "),Nh=a("code"),rT=o("__call__"),iT=o(" special method."),lT=p(),v(bs.$$.fragment),dT=p(),v(ks.$$.fragment),ig=p(),cn=a("h2"),ys=a("a"),Ih=a("span"),v(Ri.$$.fragment),cT=p(),Dh=a("span"),pT=o("RobertaForMaskedLM"),lg=p(),vt=a("div"),v(Mi.$$.fragment),hT=p(),zi=a("p"),uT=o("RoBERTa Model with a "),Sh=a("code"),mT=o("language modeling"),fT=o(" head on top."),gT=p(),qi=a("p"),_T=o("This model inherits from "),op=a("a"),bT=o("PreTrainedModel"),kT=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.)`),yT=p(),Ci=a("p"),vT=o("This model is also a PyTorch "),ji=a("a"),wT=o("torch.nn.Module"),TT=o(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),$T=p(),Qt=a("div"),v(Ai.$$.fragment),FT=p(),pn=a("p"),xT=o("The "),np=a("a"),ET=o("RobertaForMaskedLM"),RT=o(" forward method, overrides the "),Wh=a("code"),MT=o("__call__"),zT=o(" special method."),qT=p(),v(vs.$$.fragment),CT=p(),v(ws.$$.fragment),dg=p(),hn=a("h2"),Ts=a("a"),Bh=a("span"),v(Pi.$$.fragment),jT=p(),Uh=a("span"),AT=o("RobertaForSequenceClassification"),cg=p(),wt=a("div"),v(Li.$$.fragment),PT=p(),Hh=a("p"),LT=o(`RoBERTa Model transformer with a sequence classification/regression head on top (a linear layer on top of the
pooled output) e.g. for GLUE tasks.`),OT=p(),Oi=a("p"),NT=o("This model inherits from "),sp=a("a"),IT=o("PreTrainedModel"),DT=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.)`),ST=p(),Ni=a("p"),WT=o("This model is also a PyTorch "),Ii=a("a"),BT=o("torch.nn.Module"),UT=o(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),HT=p(),Mt=a("div"),v(Di.$$.fragment),QT=p(),un=a("p"),KT=o("The "),ap=a("a"),JT=o("RobertaForSequenceClassification"),VT=o(" forward method, overrides the "),Qh=a("code"),GT=o("__call__"),XT=o(" special method."),YT=p(),v($s.$$.fragment),ZT=p(),v(Fs.$$.fragment),e1=p(),v(xs.$$.fragment),pg=p(),mn=a("h2"),Es=a("a"),Kh=a("span"),v(Si.$$.fragment),t1=p(),Jh=a("span"),o1=o("RobertaForMultipleChoice"),hg=p(),Tt=a("div"),v(Wi.$$.fragment),n1=p(),Vh=a("p"),s1=o(`Roberta 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.`),a1=p(),Bi=a("p"),r1=o("This model inherits from "),rp=a("a"),i1=o("PreTrainedModel"),l1=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.)`),d1=p(),Ui=a("p"),c1=o("This model is also a PyTorch "),Hi=a("a"),p1=o("torch.nn.Module"),h1=o(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),u1=p(),Kt=a("div"),v(Qi.$$.fragment),m1=p(),fn=a("p"),f1=o("The "),ip=a("a"),g1=o("RobertaForMultipleChoice"),_1=o(" forward method, overrides the "),Gh=a("code"),b1=o("__call__"),k1=o(" special method."),y1=p(),v(Rs.$$.fragment),v1=p(),v(Ms.$$.fragment),ug=p(),gn=a("h2"),zs=a("a"),Xh=a("span"),v(Ki.$$.fragment),w1=p(),Yh=a("span"),T1=o("RobertaForTokenClassification"),mg=p(),$t=a("div"),v(Ji.$$.fragment),$1=p(),Zh=a("p"),F1=o(`Roberta 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.`),x1=p(),Vi=a("p"),E1=o("This model inherits from "),lp=a("a"),R1=o("PreTrainedModel"),M1=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.)`),z1=p(),Gi=a("p"),q1=o("This model is also a PyTorch "),Xi=a("a"),C1=o("torch.nn.Module"),j1=o(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),A1=p(),Jt=a("div"),v(Yi.$$.fragment),P1=p(),_n=a("p"),L1=o("The "),dp=a("a"),O1=o("RobertaForTokenClassification"),N1=o(" forward method, overrides the "),eu=a("code"),I1=o("__call__"),D1=o(" special method."),S1=p(),v(qs.$$.fragment),W1=p(),v(Cs.$$.fragment),fg=p(),bn=a("h2"),js=a("a"),tu=a("span"),v(Zi.$$.fragment),B1=p(),ou=a("span"),U1=o("RobertaForQuestionAnswering"),gg=p(),Ft=a("div"),v(el.$$.fragment),H1=p(),kn=a("p"),Q1=o(`Roberta 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 `),nu=a("code"),K1=o("span start logits"),J1=o(" and "),su=a("code"),V1=o("span end logits"),G1=o(")."),X1=p(),tl=a("p"),Y1=o("This model inherits from "),cp=a("a"),Z1=o("PreTrainedModel"),e$=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.)`),t$=p(),ol=a("p"),o$=o("This model is also a PyTorch "),nl=a("a"),n$=o("torch.nn.Module"),s$=o(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),a$=p(),Vt=a("div"),v(sl.$$.fragment),r$=p(),yn=a("p"),i$=o("The "),pp=a("a"),l$=o("RobertaForQuestionAnswering"),d$=o(" forward method, overrides the "),au=a("code"),c$=o("__call__"),p$=o(" special method."),h$=p(),v(As.$$.fragment),u$=p(),v(Ps.$$.fragment),_g=p(),vn=a("h2"),Ls=a("a"),ru=a("span"),v(al.$$.fragment),m$=p(),iu=a("span"),f$=o("TFRobertaModel"),bg=p(),pt=a("div"),v(rl.$$.fragment),g$=p(),lu=a("p"),_$=o("The bare RoBERTa Model transformer outputting raw hidden-states without any specific head on top."),b$=p(),il=a("p"),k$=o("This model inherits from "),hp=a("a"),y$=o("TFPreTrainedModel"),v$=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.)`),w$=p(),ll=a("p"),T$=o("This model is also a "),dl=a("a"),$$=o("tf.keras.Model"),F$=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.`),x$=p(),v(Os.$$.fragment),E$=p(),Gt=a("div"),v(cl.$$.fragment),R$=p(),wn=a("p"),M$=o("The "),up=a("a"),z$=o("TFRobertaModel"),q$=o(" forward method, overrides the "),du=a("code"),C$=o("__call__"),j$=o(" special method."),A$=p(),v(Ns.$$.fragment),P$=p(),v(Is.$$.fragment),kg=p(),Tn=a("h2"),Ds=a("a"),cu=a("span"),v(pl.$$.fragment),L$=p(),pu=a("span"),O$=o("TFRobertaForCausalLM"),yg=p(),$n=a("div"),v(hl.$$.fragment),N$=p(),Xt=a("div"),v(ul.$$.fragment),I$=p(),Fn=a("p"),D$=o("The "),mp=a("a"),S$=o("TFRobertaForCausalLM"),W$=o(" forward method, overrides the "),hu=a("code"),B$=o("__call__"),U$=o(" special method."),H$=p(),v(Ss.$$.fragment),Q$=p(),v(Ws.$$.fragment),vg=p(),xn=a("h2"),Bs=a("a"),uu=a("span"),v(ml.$$.fragment),K$=p(),mu=a("span"),J$=o("TFRobertaForMaskedLM"),wg=p(),ht=a("div"),v(fl.$$.fragment),V$=p(),gl=a("p"),G$=o("RoBERTa Model with a "),fu=a("code"),X$=o("language modeling"),Y$=o(" head on top."),Z$=p(),_l=a("p"),e2=o("This model inherits from "),fp=a("a"),t2=o("TFPreTrainedModel"),o2=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.)`),n2=p(),bl=a("p"),s2=o("This model is also a "),kl=a("a"),a2=o("tf.keras.Model"),r2=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.`),i2=p(),v(Us.$$.fragment),l2=p(),zt=a("div"),v(yl.$$.fragment),d2=p(),En=a("p"),c2=o("The "),gp=a("a"),p2=o("TFRobertaForMaskedLM"),h2=o(" forward method, overrides the "),gu=a("code"),u2=o("__call__"),m2=o(" special method."),f2=p(),v(Hs.$$.fragment),g2=p(),v(Qs.$$.fragment),_2=p(),v(Ks.$$.fragment),Tg=p(),Rn=a("h2"),Js=a("a"),_u=a("span"),v(vl.$$.fragment),b2=p(),bu=a("span"),k2=o("TFRobertaForSequenceClassification"),$g=p(),ut=a("div"),v(wl.$$.fragment),y2=p(),ku=a("p"),v2=o(`RoBERTa Model transformer with a sequence classification/regression head on top (a linear layer on top of the
pooled output) e.g. for GLUE tasks.`),w2=p(),Tl=a("p"),T2=o("This model inherits from "),_p=a("a"),$2=o("TFPreTrainedModel"),F2=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.)`),x2=p(),$l=a("p"),E2=o("This model is also a "),Fl=a("a"),R2=o("tf.keras.Model"),M2=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.`),z2=p(),v(Vs.$$.fragment),q2=p(),qt=a("div"),v(xl.$$.fragment),C2=p(),Mn=a("p"),j2=o("The "),bp=a("a"),A2=o("TFRobertaForSequenceClassification"),P2=o(" forward method, overrides the "),yu=a("code"),L2=o("__call__"),O2=o(" special method."),N2=p(),v(Gs.$$.fragment),I2=p(),v(Xs.$$.fragment),D2=p(),v(Ys.$$.fragment),Fg=p(),zn=a("h2"),Zs=a("a"),vu=a("span"),v(El.$$.fragment),S2=p(),wu=a("span"),W2=o("TFRobertaForMultipleChoice"),xg=p(),mt=a("div"),v(Rl.$$.fragment),B2=p(),Tu=a("p"),U2=o(`Roberta 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.`),H2=p(),Ml=a("p"),Q2=o("This model inherits from "),kp=a("a"),K2=o("TFPreTrainedModel"),J2=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.)`),V2=p(),zl=a("p"),G2=o("This model is also a "),ql=a("a"),X2=o("tf.keras.Model"),Y2=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.`),Z2=p(),v(ea.$$.fragment),eF=p(),Yt=a("div"),v(Cl.$$.fragment),tF=p(),qn=a("p"),oF=o("The "),yp=a("a"),nF=o("TFRobertaForMultipleChoice"),sF=o(" forward method, overrides the "),$u=a("code"),aF=o("__call__"),rF=o(" special method."),iF=p(),v(ta.$$.fragment),lF=p(),v(oa.$$.fragment),Eg=p(),Cn=a("h2"),na=a("a"),Fu=a("span"),v(jl.$$.fragment),dF=p(),xu=a("span"),cF=o("TFRobertaForTokenClassification"),Rg=p(),ft=a("div"),v(Al.$$.fragment),pF=p(),Eu=a("p"),hF=o(`RoBERTa 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.`),uF=p(),Pl=a("p"),mF=o("This model inherits from "),vp=a("a"),fF=o("TFPreTrainedModel"),gF=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.)`),_F=p(),Ll=a("p"),bF=o("This model is also a "),Ol=a("a"),kF=o("tf.keras.Model"),yF=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.`),vF=p(),v(sa.$$.fragment),wF=p(),Ct=a("div"),v(Nl.$$.fragment),TF=p(),jn=a("p"),$F=o("The "),wp=a("a"),FF=o("TFRobertaForTokenClassification"),xF=o(" forward method, overrides the "),Ru=a("code"),EF=o("__call__"),RF=o(" special method."),MF=p(),v(aa.$$.fragment),zF=p(),v(ra.$$.fragment),qF=p(),v(ia.$$.fragment),Mg=p(),An=a("h2"),la=a("a"),Mu=a("span"),v(Il.$$.fragment),CF=p(),zu=a("span"),jF=o("TFRobertaForQuestionAnswering"),zg=p(),gt=a("div"),v(Dl.$$.fragment),AF=p(),Pn=a("p"),PF=o(`RoBERTa 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 `),qu=a("code"),LF=o("span start logits"),OF=o(" and "),Cu=a("code"),NF=o("span end logits"),IF=o(")."),DF=p(),Sl=a("p"),SF=o("This model inherits from "),Tp=a("a"),WF=o("TFPreTrainedModel"),BF=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.)`),UF=p(),Wl=a("p"),HF=o("This model is also a "),Bl=a("a"),QF=o("tf.keras.Model"),KF=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.`),JF=p(),v(da.$$.fragment),VF=p(),jt=a("div"),v(Ul.$$.fragment),GF=p(),Ln=a("p"),XF=o("The "),$p=a("a"),YF=o("TFRobertaForQuestionAnswering"),ZF=o(" forward method, overrides the "),ju=a("code"),e0=o("__call__"),t0=o(" special method."),o0=p(),v(ca.$$.fragment),n0=p(),v(pa.$$.fragment),s0=p(),v(ha.$$.fragment),qg=p(),On=a("h2"),ua=a("a"),Au=a("span"),v(Hl.$$.fragment),a0=p(),Pu=a("span"),r0=o("FlaxRobertaModel"),Cg=p(),nt=a("div"),v(Ql.$$.fragment),i0=p(),Lu=a("p"),l0=o("The bare RoBERTa Model transformer outputting raw hidden-states without any specific head on top."),d0=p(),Kl=a("p"),c0=o("This model inherits from "),Fp=a("a"),p0=o("FlaxPreTrainedModel"),h0=o(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading, saving and converting weights from PyTorch models)`),u0=p(),Jl=a("p"),m0=o("This model is also a Flax Linen "),Vl=a("a"),f0=o("flax.linen.Module"),g0=o(`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),_0=p(),Ou=a("p"),b0=o("Finally, this model supports inherent JAX features such as:"),k0=p(),mo=a("ul"),Nu=a("li"),Gl=a("a"),y0=o("Just-In-Time (JIT) compilation"),v0=p(),Iu=a("li"),Xl=a("a"),w0=o("Automatic Differentiation"),T0=p(),Du=a("li"),Yl=a("a"),$0=o("Vectorization"),F0=p(),Su=a("li"),Zl=a("a"),x0=o("Parallelization"),E0=p(),Zt=a("div"),v(ed.$$.fragment),R0=p(),Nn=a("p"),M0=o("The "),Wu=a("code"),z0=o("FlaxRobertaPreTrainedModel"),q0=o(" forward method, overrides the "),Bu=a("code"),C0=o("__call__"),j0=o(" special method."),A0=p(),v(ma.$$.fragment),P0=p(),v(fa.$$.fragment),jg=p(),In=a("h2"),ga=a("a"),Uu=a("span"),v(td.$$.fragment),L0=p(),Hu=a("span"),O0=o("FlaxRobertaForCausalLM"),Ag=p(),st=a("div"),v(od.$$.fragment),N0=p(),Qu=a("p"),I0=o(`Roberta Model with a language modeling head on top (a linear layer on top of the hidden-states output) e.g for
autoregressive tasks.`),D0=p(),nd=a("p"),S0=o("This model inherits from "),xp=a("a"),W0=o("FlaxPreTrainedModel"),B0=o(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading, saving and converting weights from PyTorch models)`),U0=p(),sd=a("p"),H0=o("This model is also a Flax Linen "),ad=a("a"),Q0=o("flax.linen.Module"),K0=o(`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),J0=p(),Ku=a("p"),V0=o("Finally, this model supports inherent JAX features such as:"),G0=p(),fo=a("ul"),Ju=a("li"),rd=a("a"),X0=o("Just-In-Time (JIT) compilation"),Y0=p(),Vu=a("li"),id=a("a"),Z0=o("Automatic Differentiation"),ex=p(),Gu=a("li"),ld=a("a"),tx=o("Vectorization"),ox=p(),Xu=a("li"),dd=a("a"),nx=o("Parallelization"),sx=p(),eo=a("div"),v(cd.$$.fragment),ax=p(),Dn=a("p"),rx=o("The "),Yu=a("code"),ix=o("FlaxRobertaPreTrainedModel"),lx=o(" forward method, overrides the "),Zu=a("code"),dx=o("__call__"),cx=o(" special method."),px=p(),v(_a.$$.fragment),hx=p(),v(ba.$$.fragment),Pg=p(),Sn=a("h2"),ka=a("a"),em=a("span"),v(pd.$$.fragment),ux=p(),tm=a("span"),mx=o("FlaxRobertaForMaskedLM"),Lg=p(),at=a("div"),v(hd.$$.fragment),fx=p(),ud=a("p"),gx=o("RoBERTa Model with a "),om=a("code"),_x=o("language modeling"),bx=o(" head on top."),kx=p(),md=a("p"),yx=o("This model inherits from "),Ep=a("a"),vx=o("FlaxPreTrainedModel"),wx=o(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading, saving and converting weights from PyTorch models)`),Tx=p(),fd=a("p"),$x=o("This model is also a Flax Linen "),gd=a("a"),Fx=o("flax.linen.Module"),xx=o(`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),Ex=p(),nm=a("p"),Rx=o("Finally, this model supports inherent JAX features such as:"),Mx=p(),go=a("ul"),sm=a("li"),_d=a("a"),zx=o("Just-In-Time (JIT) compilation"),qx=p(),am=a("li"),bd=a("a"),Cx=o("Automatic Differentiation"),jx=p(),rm=a("li"),kd=a("a"),Ax=o("Vectorization"),Px=p(),im=a("li"),yd=a("a"),Lx=o("Parallelization"),Ox=p(),to=a("div"),v(vd.$$.fragment),Nx=p(),Wn=a("p"),Ix=o("The "),lm=a("code"),Dx=o("FlaxRobertaPreTrainedModel"),Sx=o(" forward method, overrides the "),dm=a("code"),Wx=o("__call__"),Bx=o(" special method."),Ux=p(),v(ya.$$.fragment),Hx=p(),v(va.$$.fragment),Og=p(),Bn=a("h2"),wa=a("a"),cm=a("span"),v(wd.$$.fragment),Qx=p(),pm=a("span"),Kx=o("FlaxRobertaForSequenceClassification"),Ng=p(),rt=a("div"),v(Td.$$.fragment),Jx=p(),hm=a("p"),Vx=o(`Roberta Model transformer with a sequence classification/regression head on top (a linear layer on top of the
pooled output) e.g. for GLUE tasks.`),Gx=p(),$d=a("p"),Xx=o("This model inherits from "),Rp=a("a"),Yx=o("FlaxPreTrainedModel"),Zx=o(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading, saving and converting weights from PyTorch models)`),eE=p(),Fd=a("p"),tE=o("This model is also a Flax Linen "),xd=a("a"),oE=o("flax.linen.Module"),nE=o(`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),sE=p(),um=a("p"),aE=o("Finally, this model supports inherent JAX features such as:"),rE=p(),_o=a("ul"),mm=a("li"),Ed=a("a"),iE=o("Just-In-Time (JIT) compilation"),lE=p(),fm=a("li"),Rd=a("a"),dE=o("Automatic Differentiation"),cE=p(),gm=a("li"),Md=a("a"),pE=o("Vectorization"),hE=p(),_m=a("li"),zd=a("a"),uE=o("Parallelization"),mE=p(),oo=a("div"),v(qd.$$.fragment),fE=p(),Un=a("p"),gE=o("The "),bm=a("code"),_E=o("FlaxRobertaPreTrainedModel"),bE=o(" forward method, overrides the "),km=a("code"),kE=o("__call__"),yE=o(" special method."),vE=p(),v(Ta.$$.fragment),wE=p(),v($a.$$.fragment),Ig=p(),Hn=a("h2"),Fa=a("a"),ym=a("span"),v(Cd.$$.fragment),TE=p(),vm=a("span"),$E=o("FlaxRobertaForMultipleChoice"),Dg=p(),it=a("div"),v(jd.$$.fragment),FE=p(),wm=a("p"),xE=o(`Roberta 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.`),EE=p(),Ad=a("p"),RE=o("This model inherits from "),Mp=a("a"),ME=o("FlaxPreTrainedModel"),zE=o(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading, saving and converting weights from PyTorch models)`),qE=p(),Pd=a("p"),CE=o("This model is also a Flax Linen "),Ld=a("a"),jE=o("flax.linen.Module"),AE=o(`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),PE=p(),Tm=a("p"),LE=o("Finally, this model supports inherent JAX features such as:"),OE=p(),bo=a("ul"),$m=a("li"),Od=a("a"),NE=o("Just-In-Time (JIT) compilation"),IE=p(),Fm=a("li"),Nd=a("a"),DE=o("Automatic Differentiation"),SE=p(),xm=a("li"),Id=a("a"),WE=o("Vectorization"),BE=p(),Em=a("li"),Dd=a("a"),UE=o("Parallelization"),HE=p(),no=a("div"),v(Sd.$$.fragment),QE=p(),Qn=a("p"),KE=o("The "),Rm=a("code"),JE=o("FlaxRobertaPreTrainedModel"),VE=o(" forward method, overrides the "),Mm=a("code"),GE=o("__call__"),XE=o(" special method."),YE=p(),v(xa.$$.fragment),ZE=p(),v(Ea.$$.fragment),Sg=p(),Kn=a("h2"),Ra=a("a"),zm=a("span"),v(Wd.$$.fragment),eR=p(),qm=a("span"),tR=o("FlaxRobertaForTokenClassification"),Wg=p(),lt=a("div"),v(Bd.$$.fragment),oR=p(),Cm=a("p"),nR=o(`Roberta 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.`),sR=p(),Ud=a("p"),aR=o("This model inherits from "),zp=a("a"),rR=o("FlaxPreTrainedModel"),iR=o(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading, saving and converting weights from PyTorch models)`),lR=p(),Hd=a("p"),dR=o("This model is also a Flax Linen "),Qd=a("a"),cR=o("flax.linen.Module"),pR=o(`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),hR=p(),jm=a("p"),uR=o("Finally, this model supports inherent JAX features such as:"),mR=p(),ko=a("ul"),Am=a("li"),Kd=a("a"),fR=o("Just-In-Time (JIT) compilation"),gR=p(),Pm=a("li"),Jd=a("a"),_R=o("Automatic Differentiation"),bR=p(),Lm=a("li"),Vd=a("a"),kR=o("Vectorization"),yR=p(),Om=a("li"),Gd=a("a"),vR=o("Parallelization"),wR=p(),so=a("div"),v(Xd.$$.fragment),TR=p(),Jn=a("p"),$R=o("The "),Nm=a("code"),FR=o("FlaxRobertaPreTrainedModel"),xR=o(" forward method, overrides the "),Im=a("code"),ER=o("__call__"),RR=o(" special method."),MR=p(),v(Ma.$$.fragment),zR=p(),v(za.$$.fragment),Bg=p(),Vn=a("h2"),qa=a("a"),Dm=a("span"),v(Yd.$$.fragment),qR=p(),Sm=a("span"),CR=o("FlaxRobertaForQuestionAnswering"),Ug=p(),dt=a("div"),v(Zd.$$.fragment),jR=p(),Gn=a("p"),AR=o(`Roberta 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 `),Wm=a("code"),PR=o("span start logits"),LR=o(" and "),Bm=a("code"),OR=o("span end logits"),NR=o(")."),IR=p(),ec=a("p"),DR=o("This model inherits from "),qp=a("a"),SR=o("FlaxPreTrainedModel"),WR=o(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading, saving and converting weights from PyTorch models)`),BR=p(),tc=a("p"),UR=o("This model is also a Flax Linen "),oc=a("a"),HR=o("flax.linen.Module"),QR=o(`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),KR=p(),Um=a("p"),JR=o("Finally, this model supports inherent JAX features such as:"),VR=p(),yo=a("ul"),Hm=a("li"),nc=a("a"),GR=o("Just-In-Time (JIT) compilation"),XR=p(),Qm=a("li"),sc=a("a"),YR=o("Automatic Differentiation"),ZR=p(),Km=a("li"),ac=a("a"),eM=o("Vectorization"),tM=p(),Jm=a("li"),rc=a("a"),oM=o("Parallelization"),nM=p(),ao=a("div"),v(ic.$$.fragment),sM=p(),Xn=a("p"),aM=o("The "),Vm=a("code"),rM=o("FlaxRobertaPreTrainedModel"),iM=o(" forward method, overrides the "),Gm=a("code"),lM=o("__call__"),dM=o(" special method."),cM=p(),v(Ca.$$.fragment),pM=p(),v(ja.$$.fragment),this.h()},l(s){const _=e3('[data-svelte="svelte-1phssyn"]',document.head);d=r(_,"META",{name:!0,content:!0}),_.forEach(t),k=h(s),m=r(s,"H1",{class:!0});var lc=i(m);f=r(lc,"A",{id:!0,class:!0,href:!0});var Xm=i(f);b=r(Xm,"SPAN",{});var Ym=i(b);w(l.$$.fragment,Ym),Ym.forEach(t),Xm.forEach(t),u=h(lc),R=r(lc,"SPAN",{});var Zm=i(R);ae=n(Zm,"RoBERTa"),Zm.forEach(t),lc.forEach(t),Z=h(s),N=r(s,"H2",{class:!0});var dc=i(N);te=r(dc,"A",{id:!0,class:!0,href:!0});var ef=i(te);oe=r(ef,"SPAN",{});var tf=i(oe);w(M.$$.fragment,tf),tf.forEach(t),ef.forEach(t),we=h(dc),K=r(dc,"SPAN",{});var of=i(K);Te=n(of,"Overview"),of.forEach(t),dc.forEach(t),ge=h(s),W=r(s,"P",{});var cc=i(W);$e=n(cc,"The RoBERTa model was proposed in "),le=r(cc,"A",{href:!0,rel:!0});var nf=i(le);J=n(nf,"RoBERTa: A Robustly Optimized BERT Pretraining Approach"),nf.forEach(t),Fe=n(cc,` by Yinhan Liu, Myle Ott, Naman Goyal, Jingfei Du, Mandar Joshi, Danqi Chen, Omer
Levy, Mike Lewis, Luke Zettlemoyer, Veselin Stoyanov. It is based on Google\u2019s BERT model released in 2018.`),cc.forEach(t),_e=h(s),U=r(s,"P",{});var sf=i(U);xe=n(sf,`It builds on BERT and modifies key hyperparameters, removing the next-sentence pretraining objective and training with
much larger mini-batches and learning rates.`),sf.forEach(t),be=h(s),H=r(s,"P",{});var af=i(H);Ee=n(af,"The abstract from the paper is the following:"),af.forEach(t),ke=h(s),ee=r(s,"P",{});var rf=i(ee);C=r(rf,"EM",{});var lf=i(C);A=n(lf,`Language model pretraining has led to significant performance gains but careful comparison between different
approaches is challenging. Training is computationally expensive, often done on private datasets of different sizes,
and, as we will show, hyperparameter choices have significant impact on the final results. We present a replication
study of BERT pretraining (Devlin et al., 2019) that carefully measures the impact of many key hyperparameters and
training data size. We find that BERT was significantly undertrained, and can match or exceed the performance of every
model published after it. Our best model achieves state-of-the-art results on GLUE, RACE and SQuAD. These results
highlight the importance of previously overlooked design choices, and raise questions about the source of recently
reported improvements. We release our models and code.`),lf.forEach(t),rf.forEach(t),ye=h(s),Q=r(s,"P",{});var df=i(Q);Re=n(df,"Tips:"),df.forEach(t),ve=h(s),I=r(s,"UL",{});var vo=i(I);de=r(vo,"LI",{});var pc=i(de);Me=n(pc,"This implementation is the same as "),j=r(pc,"A",{href:!0});var cf=i(j);ze=n(cf,"BertModel"),cf.forEach(t),V=n(pc,` with a tiny embeddings tweak as well as a setup
for Roberta pretrained models.`),pc.forEach(t),qe=h(vo),ce=r(vo,"LI",{});var pf=i(ce);G=n(pf,`RoBERTa has the same architecture as BERT, but uses a byte-level BPE as a tokenizer (same as GPT-2) and uses a
different pretraining scheme.`),pf.forEach(t),Ce=h(vo),ne=r(vo,"LI",{});var wo=i(ne);D=n(wo,"RoBERTa doesn\u2019t have "),pe=r(wo,"CODE",{});var hf=i(pe);X=n(hf,"token_type_ids"),hf.forEach(t),je=n(wo,`, you don\u2019t need to indicate which token belongs to which segment. Just
separate your segments with the separation token `),se=r(wo,"CODE",{});var uf=i(se);P=n(uf,"tokenizer.sep_token"),uf.forEach(t),Ae=n(wo," (or "),L=r(wo,"CODE",{});var mf=i(L);Pe=n(mf,"</s>"),mf.forEach(t),Le=n(wo,")"),wo.forEach(t),y=h(vo),z=r(vo,"LI",{});var Cp=i(z);Ue=r(Cp,"A",{href:!0});var ff=i(Ue);re=n(ff,"CamemBERT"),ff.forEach(t),Xe=n(Cp," is a wrapper around RoBERTa. Refer to this page for usage examples."),Cp.forEach(t),vo.forEach(t),Ke=h(s),q=r(s,"P",{});var Yn=i(q);Ye=n(Yn,"This model was contributed by "),Se=r(Yn,"A",{href:!0,rel:!0});var gf=i(Se);Ze=n(gf,"julien-c"),gf.forEach(t),et=n(Yn,". The original code can be found "),We=r(Yn,"A",{href:!0,rel:!0});var _f=i(We);S=n(_f,"here"),_f.forEach(t),Y=n(Yn,"."),Yn.forEach(t),Je=h(s),Oe=r(s,"H2",{class:!0});var hc=i(Oe);B=r(hc,"A",{id:!0,class:!0,href:!0});var bf=i(B);He=r(bf,"SPAN",{});var kf=i(He);w(Be.$$.fragment,kf),kf.forEach(t),bf.forEach(t),Ne=h(hc),Qe=r(hc,"SPAN",{});var yf=i(Qe);ie=n(yf,"Resources"),yf.forEach(t),hc.forEach(t),Ve=h(s),Tc=r(s,"P",{});var vf=i(Tc);vb=n(vf,"A list of official Hugging Face and community (indicated by \u{1F30E}) resources to help you get started with RoBERTa. If you\u2019re interested in submitting a resource to be included here, please feel free to open a Pull Request and we\u2019ll review it! The resource should ideally demonstrate something new instead of duplicating an existing resource."),vf.forEach(t),Sf=h(s),w(ar.$$.fragment,s),Wf=h(s),_t=r(s,"UL",{});var xt=i(_t);en=r(xt,"LI",{});var Zn=i(en);wb=n(Zn,"A blog on "),rr=r(Zn,"A",{href:!0,rel:!0});var wf=i(rr);Tb=n(wf,"Getting Started with Sentiment Analysis on Twitter"),wf.forEach(t),$b=n(Zn," using RoBERTa and the "),ir=r(Zn,"A",{href:!0,rel:!0});var Tf=i(ir);Fb=n(Tf,"Inference API"),Tf.forEach(t),xb=n(Zn,"."),Zn.forEach(t),Eb=h(xt),lr=r(xt,"LI",{});var uc=i(lr);Rb=n(uc,"A blog on "),dr=r(uc,"A",{href:!0,rel:!0});var $f=i(dr);Mb=n($f,"Opinion Classification with Kili and Hugging Face AutoTrain"),$f.forEach(t),zb=n(uc," using RoBERTa."),uc.forEach(t),qb=h(xt),cr=r(xt,"LI",{});var mc=i(cr);Cb=n(mc,"A notebook on how to "),pr=r(mc,"A",{href:!0,rel:!0});var Ff=i(pr);jb=n(Ff,"finetune RoBERTa for sentiment analysis"),Ff.forEach(t),Ab=n(mc,". \u{1F30E}"),mc.forEach(t),Pb=h(xt),$o=r(xt,"LI",{});var Oo=i($o);$c=r(Oo,"A",{href:!0});var xf=i($c);Lb=n(xf,"RobertaForSequenceClassification"),xf.forEach(t),Ob=n(Oo," is supported by this "),hr=r(Oo,"A",{href:!0,rel:!0});var Ef=i(hr);Nb=n(Ef,"example script"),Ef.forEach(t),Ib=n(Oo," and "),ur=r(Oo,"A",{href:!0,rel:!0});var Rf=i(ur);Db=n(Rf,"notebook"),Rf.forEach(t),Sb=n(Oo,"."),Oo.forEach(t),Wb=h(xt),Fo=r(xt,"LI",{});var No=i(Fo);Fc=r(No,"A",{href:!0});var Mf=i(Fc);Bb=n(Mf,"TFRobertaForSequenceClassification"),Mf.forEach(t),Ub=n(No," is supported by this "),mr=r(No,"A",{href:!0,rel:!0});var zf=i(mr);Hb=n(zf,"example script"),zf.forEach(t),Qb=n(No," and "),fr=r(No,"A",{href:!0,rel:!0});var qf=i(fr);Kb=n(qf,"notebook"),qf.forEach(t),Jb=n(No,"."),No.forEach(t),Vb=h(xt),xo=r(xt,"LI",{});var Io=i(xo);xc=r(Io,"A",{href:!0});var Cf=i(xc);Gb=n(Cf,"FlaxRobertaForSequenceClassification"),Cf.forEach(t),Xb=n(Io," is supported by this "),gr=r(Io,"A",{href:!0,rel:!0});var jf=i(gr);Yb=n(jf,"example script"),jf.forEach(t),Zb=n(Io," and "),_r=r(Io,"A",{href:!0,rel:!0});var Af=i(_r);ek=n(Af,"notebook"),Af.forEach(t),tk=n(Io,"."),Io.forEach(t),xt.forEach(t),Bf=h(s),w(br.$$.fragment,s),Uf=h(s),Bt=r(s,"UL",{});var To=i(Bt);Eo=r(To,"LI",{});var Do=i(Eo);Ec=r(Do,"A",{href:!0});var Pf=i(Ec);ok=n(Pf,"RobertaForTokenClassification"),Pf.forEach(t),nk=n(Do," is supported by this "),kr=r(Do,"A",{href:!0,rel:!0});var Lf=i(kr);sk=n(Lf,"example script"),Lf.forEach(t),ak=n(Do," and "),yr=r(Do,"A",{href:!0,rel:!0});var Of=i(yr);rk=n(Of,"notebook"),Of.forEach(t),ik=n(Do,"."),Do.forEach(t),lk=h(To),Ro=r(To,"LI",{});var fc=i(Ro);Rc=r(fc,"A",{href:!0});var _M=i(Rc);dk=n(_M,"TFRobertaForTokenClassification"),_M.forEach(t),ck=n(fc," is supported by this "),vr=r(fc,"A",{href:!0,rel:!0});var bM=i(vr);pk=n(bM,"example script"),bM.forEach(t),hk=n(fc," and "),wr=r(fc,"A",{href:!0,rel:!0});var kM=i(wr);uk=n(kM,"notebook"),kM.forEach(t),mk=n(fc,"."),fc.forEach(t),fk=h(To),es=r(To,"LI",{});var Nf=i(es);Mc=r(Nf,"A",{href:!0});var yM=i(Mc);gk=n(yM,"FlaxRobertaForTokenClassification"),yM.forEach(t),_k=n(Nf," is supported by this "),Tr=r(Nf,"A",{href:!0,rel:!0});var vM=i(Tr);bk=n(vM,"example script"),vM.forEach(t),kk=n(Nf,"."),Nf.forEach(t),yk=h(To),zc=r(To,"LI",{});var hM=i(zc);$r=r(hM,"A",{href:!0,rel:!0});var wM=i($r);vk=n(wM,"Token classification"),wM.forEach(t),wk=n(hM," chapter of the \u{1F917} Hugging Face Course."),hM.forEach(t),To.forEach(t),Hf=h(s),w(Fr.$$.fragment,s),Qf=h(s),Et=r(s,"UL",{});var So=i(Et);xr=r(So,"LI",{});var Qg=i(xr);Tk=n(Qg,"A blog on "),Er=r(Qg,"A",{href:!0,rel:!0});var TM=i(Er);$k=n(TM,"How to train a new language model from scratch using Transformers and Tokenizers"),TM.forEach(t),Fk=n(Qg," with RoBERTa."),Qg.forEach(t),xk=h(So),Mo=r(So,"LI",{});var gc=i(Mo);qc=r(gc,"A",{href:!0});var $M=i(qc);Ek=n($M,"RobertaForMaskedLM"),$M.forEach(t),Rk=n(gc," is supported by this "),Rr=r(gc,"A",{href:!0,rel:!0});var FM=i(Rr);Mk=n(FM,"example script"),FM.forEach(t),zk=n(gc," and "),Mr=r(gc,"A",{href:!0,rel:!0});var xM=i(Mr);qk=n(xM,"notebook"),xM.forEach(t),Ck=n(gc,"."),gc.forEach(t),jk=h(So),zo=r(So,"LI",{});var _c=i(zo);Cc=r(_c,"A",{href:!0});var EM=i(Cc);Ak=n(EM,"TFRobertaForMaskedLM"),EM.forEach(t),Pk=n(_c," is supported by this "),zr=r(_c,"A",{href:!0,rel:!0});var RM=i(zr);Lk=n(RM,"example script"),RM.forEach(t),Ok=n(_c," and "),qr=r(_c,"A",{href:!0,rel:!0});var MM=i(qr);Nk=n(MM,"notebook"),MM.forEach(t),Ik=n(_c,"."),_c.forEach(t),Dk=h(So),qo=r(So,"LI",{});var bc=i(qo);jc=r(bc,"A",{href:!0});var zM=i(jc);Sk=n(zM,"FlaxRobertaForMaskedLM"),zM.forEach(t),Wk=n(bc," is supported by this "),Cr=r(bc,"A",{href:!0,rel:!0});var qM=i(Cr);Bk=n(qM,"example script"),qM.forEach(t),Uk=n(bc," and "),jr=r(bc,"A",{href:!0,rel:!0});var CM=i(jr);Hk=n(CM,"notebook"),CM.forEach(t),Qk=n(bc,"."),bc.forEach(t),Kk=h(So),Ac=r(So,"LI",{});var uM=i(Ac);Ar=r(uM,"A",{href:!0,rel:!0});var jM=i(Ar);Jk=n(jM,"Masked language modeling"),jM.forEach(t),Vk=n(uM," chapter of the \u{1F917} Hugging Face Course."),uM.forEach(t),So.forEach(t),Kf=h(s),w(Pr.$$.fragment,s),Jf=h(s),Rt=r(s,"UL",{});var Wo=i(Rt);Lr=r(Wo,"LI",{});var Kg=i(Lr);Gk=n(Kg,"A blog on "),Or=r(Kg,"A",{href:!0,rel:!0});var AM=i(Or);Xk=n(AM,"Accelerated Inference with Optimum and Transformers Pipelines"),AM.forEach(t),Yk=n(Kg," with RoBERTa for question answering."),Kg.forEach(t),Zk=h(Wo),Co=r(Wo,"LI",{});var kc=i(Co);Pc=r(kc,"A",{href:!0});var PM=i(Pc);ey=n(PM,"RobertaForQuestionAnswering"),PM.forEach(t),ty=n(kc," is supported by this "),Nr=r(kc,"A",{href:!0,rel:!0});var LM=i(Nr);oy=n(LM,"example script"),LM.forEach(t),ny=n(kc," and "),Ir=r(kc,"A",{href:!0,rel:!0});var OM=i(Ir);sy=n(OM,"notebook"),OM.forEach(t),ay=n(kc,"."),kc.forEach(t),ry=h(Wo),jo=r(Wo,"LI",{});var yc=i(jo);Lc=r(yc,"A",{href:!0});var NM=i(Lc);iy=n(NM,"TFRobertaForQuestionAnswering"),NM.forEach(t),ly=n(yc," is supported by this "),Dr=r(yc,"A",{href:!0,rel:!0});var IM=i(Dr);dy=n(IM,"example script"),IM.forEach(t),cy=n(yc," and "),Sr=r(yc,"A",{href:!0,rel:!0});var DM=i(Sr);py=n(DM,"notebook"),DM.forEach(t),hy=n(yc,"."),yc.forEach(t),uy=h(Wo),ts=r(Wo,"LI",{});var If=i(ts);Oc=r(If,"A",{href:!0});var SM=i(Oc);my=n(SM,"FlaxRobertaForQuestionAnswering"),SM.forEach(t),fy=n(If," is supported by this "),Wr=r(If,"A",{href:!0,rel:!0});var WM=i(Wr);gy=n(WM,"example script"),WM.forEach(t),_y=n(If,"."),If.forEach(t),by=h(Wo),Nc=r(Wo,"LI",{});var mM=i(Nc);Br=r(mM,"A",{href:!0,rel:!0});var BM=i(Br);ky=n(BM,"Question answering"),BM.forEach(t),yy=n(mM," chapter of the \u{1F917} Hugging Face Course."),mM.forEach(t),Wo.forEach(t),Vf=h(s),Ic=r(s,"P",{});var UM=i(Ic);ah=r(UM,"STRONG",{});var HM=i(ah);vy=n(HM,"Multiple choice"),HM.forEach(t),UM.forEach(t),Gf=h(s),os=r(s,"UL",{});var Jg=i(os);Ao=r(Jg,"LI",{});var vc=i(Ao);Dc=r(vc,"A",{href:!0});var QM=i(Dc);wy=n(QM,"RobertaForMultipleChoice"),QM.forEach(t),Ty=n(vc," is supported by this "),Ur=r(vc,"A",{href:!0,rel:!0});var KM=i(Ur);$y=n(KM,"example script"),KM.forEach(t),Fy=n(vc," and "),Hr=r(vc,"A",{href:!0,rel:!0});var JM=i(Hr);xy=n(JM,"notebook"),JM.forEach(t),Ey=n(vc,"."),vc.forEach(t),Ry=h(Jg),Po=r(Jg,"LI",{});var wc=i(Po);Sc=r(wc,"A",{href:!0});var VM=i(Sc);My=n(VM,"TFRobertaForMultipleChoice"),VM.forEach(t),zy=n(wc," is supported by this "),Qr=r(wc,"A",{href:!0,rel:!0});var GM=i(Qr);qy=n(GM,"example script"),GM.forEach(t),Cy=n(wc," and "),Kr=r(wc,"A",{href:!0,rel:!0});var XM=i(Kr);jy=n(XM,"notebook"),XM.forEach(t),Ay=n(wc,"."),wc.forEach(t),Jg.forEach(t),Xf=h(s),tn=r(s,"H2",{class:!0});var Vg=i(tn);ns=r(Vg,"A",{id:!0,class:!0,href:!0});var YM=i(ns);rh=r(YM,"SPAN",{});var ZM=i(rh);w(Jr.$$.fragment,ZM),ZM.forEach(t),YM.forEach(t),Py=h(Vg),ih=r(Vg,"SPAN",{});var ez=i(ih);Ly=n(ez,"RobertaConfig"),ez.forEach(t),Vg.forEach(t),Yf=h(s),Wt=r(s,"DIV",{class:!0});var Aa=i(Wt);w(Vr.$$.fragment,Aa),Oy=h(Aa),uo=r(Aa,"P",{});var Pa=i(uo);Ny=n(Pa,"This is the configuration class to store the configuration of a "),Wc=r(Pa,"A",{href:!0});var tz=i(Wc);Iy=n(tz,"RobertaModel"),tz.forEach(t),Dy=n(Pa," or a "),Bc=r(Pa,"A",{href:!0});var oz=i(Bc);Sy=n(oz,"TFRobertaModel"),oz.forEach(t),Wy=n(Pa,`. It is
used to instantiate a RoBERTa 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 RoBERTa
`),Gr=r(Pa,"A",{href:!0,rel:!0});var nz=i(Gr);By=n(nz,"roberta-base"),nz.forEach(t),Uy=n(Pa," architecture."),Pa.forEach(t),Hy=h(Aa),on=r(Aa,"P",{});var jp=i(on);Qy=n(jp,"Configuration objects inherit from "),Uc=r(jp,"A",{href:!0});var sz=i(Uc);Ky=n(sz,"PretrainedConfig"),sz.forEach(t),Jy=n(jp,` and can be used to control the model outputs. Read the
documentation from `),Hc=r(jp,"A",{href:!0});var az=i(Hc);Vy=n(az,"PretrainedConfig"),az.forEach(t),Gy=n(jp," for more information."),jp.forEach(t),Xy=h(Aa),w(ss.$$.fragment,Aa),Aa.forEach(t),Zf=h(s),nn=r(s,"H2",{class:!0});var Gg=i(nn);as=r(Gg,"A",{id:!0,class:!0,href:!0});var rz=i(as);lh=r(rz,"SPAN",{});var iz=i(lh);w(Xr.$$.fragment,iz),iz.forEach(t),rz.forEach(t),Yy=h(Gg),dh=r(Gg,"SPAN",{});var lz=i(dh);Zy=n(lz,"RobertaTokenizer"),lz.forEach(t),Gg.forEach(t),eg=h(s),Ie=r(s,"DIV",{class:!0});var Ge=i(Ie);w(Yr.$$.fragment,Ge),ev=h(Ge),ch=r(Ge,"P",{});var dz=i(ch);tv=n(dz,"Constructs a RoBERTa tokenizer, derived from the GPT-2 tokenizer, using byte-level Byte-Pair-Encoding."),dz.forEach(t),ov=h(Ge),ph=r(Ge,"P",{});var cz=i(ph);nv=n(cz,"This tokenizer has been trained to treat spaces like parts of the tokens (a bit like sentencepiece) so a word will"),cz.forEach(t),sv=h(Ge),w(rs.$$.fragment,Ge),av=h(Ge),Zr=r(Ge,"P",{});var Xg=i(Zr);rv=n(Xg,"You can get around that behavior by passing "),hh=r(Xg,"CODE",{});var pz=i(hh);iv=n(pz,"add_prefix_space=True"),pz.forEach(t),lv=n(Xg,` when instantiating this tokenizer or when you
call it on some text, but since the model was not pretrained this way, it might yield a decrease in performance.`),Xg.forEach(t),dv=h(Ge),w(is.$$.fragment,Ge),cv=h(Ge),ei=r(Ge,"P",{});var Yg=i(ei);pv=n(Yg,"This tokenizer inherits from "),Qc=r(Yg,"A",{href:!0});var hz=i(Qc);hv=n(hz,"PreTrainedTokenizer"),hz.forEach(t),uv=n(Yg,` which contains most of the main methods. Users should refer to
this superclass for more information regarding those methods.`),Yg.forEach(t),mv=h(Ge),Lo=r(Ge,"DIV",{class:!0});var Ap=i(Lo);w(ti.$$.fragment,Ap),fv=h(Ap),uh=r(Ap,"P",{});var uz=i(uh);gv=n(uz,`Build model inputs from a sequence or a pair of sequence for sequence classification tasks by concatenating and
adding special tokens. A RoBERTa sequence has the following format:`),uz.forEach(t),_v=h(Ap),oi=r(Ap,"UL",{});var Zg=i(oi);Kc=r(Zg,"LI",{});var fM=i(Kc);bv=n(fM,"single sequence: "),mh=r(fM,"CODE",{});var mz=i(mh);kv=n(mz,"<s> X </s>"),mz.forEach(t),fM.forEach(t),yv=h(Zg),Jc=r(Zg,"LI",{});var gM=i(Jc);vv=n(gM,"pair of sequences: "),fh=r(gM,"CODE",{});var fz=i(fh);wv=n(fz,"<s> A </s></s> B </s>"),fz.forEach(t),gM.forEach(t),Zg.forEach(t),Ap.forEach(t),Tv=h(Ge),ls=r(Ge,"DIV",{class:!0});var e_=i(ls);w(ni.$$.fragment,e_),$v=h(e_),si=r(e_,"P",{});var t_=i(si);Fv=n(t_,`Retrieve sequence ids from a token list that has no special tokens added. This method is called when adding
special tokens using the tokenizer `),gh=r(t_,"CODE",{});var gz=i(gh);xv=n(gz,"prepare_for_model"),gz.forEach(t),Ev=n(t_," method."),t_.forEach(t),e_.forEach(t),Rv=h(Ge),ds=r(Ge,"DIV",{class:!0});var o_=i(ds);w(ai.$$.fragment,o_),Mv=h(o_),_h=r(o_,"P",{});var _z=i(_h);zv=n(_z,`Create a mask from the two sequences passed to be used in a sequence-pair classification task. RoBERTa does not
make use of token type ids, therefore a list of zeros is returned.`),_z.forEach(t),o_.forEach(t),qv=h(Ge),Vc=r(Ge,"DIV",{class:!0});var bz=i(Vc);w(ri.$$.fragment,bz),bz.forEach(t),Ge.forEach(t),tg=h(s),sn=r(s,"H2",{class:!0});var n_=i(sn);cs=r(n_,"A",{id:!0,class:!0,href:!0});var kz=i(cs);bh=r(kz,"SPAN",{});var yz=i(bh);w(ii.$$.fragment,yz),yz.forEach(t),kz.forEach(t),Cv=h(n_),kh=r(n_,"SPAN",{});var vz=i(kh);jv=n(vz,"RobertaTokenizerFast"),vz.forEach(t),n_.forEach(t),og=h(s),tt=r(s,"DIV",{class:!0});var bt=i(tt);w(li.$$.fragment,bt),Av=h(bt),di=r(bt,"P",{});var s_=i(di);Pv=n(s_,"Construct a \u201Cfast\u201D RoBERTa tokenizer (backed by HuggingFace\u2019s "),yh=r(s_,"EM",{});var wz=i(yh);Lv=n(wz,"tokenizers"),wz.forEach(t),Ov=n(s_,` library), derived from the GPT-2
tokenizer, using byte-level Byte-Pair-Encoding.`),s_.forEach(t),Nv=h(bt),vh=r(bt,"P",{});var Tz=i(vh);Iv=n(Tz,"This tokenizer has been trained to treat spaces like parts of the tokens (a bit like sentencepiece) so a word will"),Tz.forEach(t),Dv=h(bt),w(ps.$$.fragment,bt),Sv=h(bt),ci=r(bt,"P",{});var a_=i(ci);Wv=n(a_,"You can get around that behavior by passing "),wh=r(a_,"CODE",{});var $z=i(wh);Bv=n($z,"add_prefix_space=True"),$z.forEach(t),Uv=n(a_,` when instantiating this tokenizer or when you
call it on some text, but since the model was not pretrained this way, it might yield a decrease in performance.`),a_.forEach(t),Hv=h(bt),w(hs.$$.fragment,bt),Qv=h(bt),pi=r(bt,"P",{});var r_=i(pi);Kv=n(r_,"This tokenizer inherits from "),Gc=r(r_,"A",{href:!0});var Fz=i(Gc);Jv=n(Fz,"PreTrainedTokenizerFast"),Fz.forEach(t),Vv=n(r_,` which contains most of the main methods. Users should
refer to this superclass for more information regarding those methods.`),r_.forEach(t),Gv=h(bt),Xc=r(bt,"DIV",{class:!0});var xz=i(Xc);w(hi.$$.fragment,xz),xz.forEach(t),bt.forEach(t),ng=h(s),an=r(s,"H2",{class:!0});var i_=i(an);us=r(i_,"A",{id:!0,class:!0,href:!0});var Ez=i(us);Th=r(Ez,"SPAN",{});var Rz=i(Th);w(ui.$$.fragment,Rz),Rz.forEach(t),Ez.forEach(t),Xv=h(i_),$h=r(i_,"SPAN",{});var Mz=i($h);Yv=n(Mz,"RobertaModel"),Mz.forEach(t),i_.forEach(t),sg=h(s),ot=r(s,"DIV",{class:!0});var kt=i(ot);w(mi.$$.fragment,kt),Zv=h(kt),Fh=r(kt,"P",{});var zz=i(Fh);ew=n(zz,"The bare RoBERTa Model transformer outputting raw hidden-states without any specific head on top."),zz.forEach(t),tw=h(kt),fi=r(kt,"P",{});var l_=i(fi);ow=n(l_,"This model inherits from "),Yc=r(l_,"A",{href:!0});var qz=i(Yc);nw=n(qz,"PreTrainedModel"),qz.forEach(t),sw=n(l_,`. 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.)`),l_.forEach(t),aw=h(kt),gi=r(kt,"P",{});var d_=i(gi);rw=n(d_,"This model is also a PyTorch "),_i=r(d_,"A",{href:!0,rel:!0});var Cz=i(_i);iw=n(Cz,"torch.nn.Module"),Cz.forEach(t),lw=n(d_,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),d_.forEach(t),dw=h(kt),bi=r(kt,"P",{});var c_=i(bi);cw=n(c_,`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 `),xh=r(c_,"EM",{});var jz=i(xh);pw=n(jz,`Attention is
all you need`),jz.forEach(t),hw=n(c_,`_ by Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N. Gomez, Lukasz
Kaiser and Illia Polosukhin.`),c_.forEach(t),uw=h(kt),ct=r(kt,"P",{});var At=i(ct);mw=n(At,"To behave as an decoder the model needs to be initialized with the "),Eh=r(At,"CODE",{});var Az=i(Eh);fw=n(Az,"is_decoder"),Az.forEach(t),gw=n(At,` argument of the configuration set
to `),Rh=r(At,"CODE",{});var Pz=i(Rh);_w=n(Pz,"True"),Pz.forEach(t),bw=n(At,". To be used in a Seq2Seq model, the model needs to initialized with both "),Mh=r(At,"CODE",{});var Lz=i(Mh);kw=n(Lz,"is_decoder"),Lz.forEach(t),yw=n(At,` argument and
`),zh=r(At,"CODE",{});var Oz=i(zh);vw=n(Oz,"add_cross_attention"),Oz.forEach(t),ww=n(At," set to "),qh=r(At,"CODE",{});var Nz=i(qh);Tw=n(Nz,"True"),Nz.forEach(t),$w=n(At,"; an "),Ch=r(At,"CODE",{});var Iz=i(Ch);Fw=n(Iz,"encoder_hidden_states"),Iz.forEach(t),xw=n(At," is then expected as an input to the forward pass."),At.forEach(t),Ew=h(kt),ms=r(kt,"P",{});var Df=i(ms);Rw=n(Df,".. _"),jh=r(Df,"EM",{});var Dz=i(jh);Mw=n(Dz,"Attention is all you need"),Dz.forEach(t),zw=n(Df,": "),ki=r(Df,"A",{href:!0,rel:!0});var Sz=i(ki);qw=n(Sz,"https://arxiv.org/abs/1706.03762"),Sz.forEach(t),Df.forEach(t),Cw=h(kt),Ut=r(kt,"DIV",{class:!0});var La=i(Ut);w(yi.$$.fragment,La),jw=h(La),rn=r(La,"P",{});var Pp=i(rn);Aw=n(Pp,"The "),Zc=r(Pp,"A",{href:!0});var Wz=i(Zc);Pw=n(Wz,"RobertaModel"),Wz.forEach(t),Lw=n(Pp," forward method, overrides the "),Ah=r(Pp,"CODE",{});var Bz=i(Ah);Ow=n(Bz,"__call__"),Bz.forEach(t),Nw=n(Pp," special method."),Pp.forEach(t),Iw=h(La),w(fs.$$.fragment,La),Dw=h(La),w(gs.$$.fragment,La),La.forEach(t),kt.forEach(t),ag=h(s),ln=r(s,"H2",{class:!0});var p_=i(ln);_s=r(p_,"A",{id:!0,class:!0,href:!0});var Uz=i(_s);Ph=r(Uz,"SPAN",{});var Hz=i(Ph);w(vi.$$.fragment,Hz),Hz.forEach(t),Uz.forEach(t),Sw=h(p_),Lh=r(p_,"SPAN",{});var Qz=i(Lh);Ww=n(Qz,"RobertaForCausalLM"),Qz.forEach(t),p_.forEach(t),rg=h(s),yt=r(s,"DIV",{class:!0});var Bo=i(yt);w(wi.$$.fragment,Bo),Bw=h(Bo),Ti=r(Bo,"P",{});var h_=i(Ti);Uw=n(h_,"RoBERTa Model with a "),Oh=r(h_,"CODE",{});var Kz=i(Oh);Hw=n(Kz,"language modeling"),Kz.forEach(t),Qw=n(h_," head on top for CLM fine-tuning."),h_.forEach(t),Kw=h(Bo),$i=r(Bo,"P",{});var u_=i($i);Jw=n(u_,"This model inherits from "),ep=r(u_,"A",{href:!0});var Jz=i(ep);Vw=n(Jz,"PreTrainedModel"),Jz.forEach(t),Gw=n(u_,`. 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.)`),u_.forEach(t),Xw=h(Bo),Fi=r(Bo,"P",{});var m_=i(Fi);Yw=n(m_,"This model is also a PyTorch "),xi=r(m_,"A",{href:!0,rel:!0});var Vz=i(xi);Zw=n(Vz,"torch.nn.Module"),Vz.forEach(t),eT=n(m_,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),m_.forEach(t),tT=h(Bo),Ht=r(Bo,"DIV",{class:!0});var Oa=i(Ht);w(Ei.$$.fragment,Oa),oT=h(Oa),dn=r(Oa,"P",{});var Lp=i(dn);nT=n(Lp,"The "),tp=r(Lp,"A",{href:!0});var Gz=i(tp);sT=n(Gz,"RobertaForCausalLM"),Gz.forEach(t),aT=n(Lp," forward method, overrides the "),Nh=r(Lp,"CODE",{});var Xz=i(Nh);rT=n(Xz,"__call__"),Xz.forEach(t),iT=n(Lp," special method."),Lp.forEach(t),lT=h(Oa),w(bs.$$.fragment,Oa),dT=h(Oa),w(ks.$$.fragment,Oa),Oa.forEach(t),Bo.forEach(t),ig=h(s),cn=r(s,"H2",{class:!0});var f_=i(cn);ys=r(f_,"A",{id:!0,class:!0,href:!0});var Yz=i(ys);Ih=r(Yz,"SPAN",{});var Zz=i(Ih);w(Ri.$$.fragment,Zz),Zz.forEach(t),Yz.forEach(t),cT=h(f_),Dh=r(f_,"SPAN",{});var e4=i(Dh);pT=n(e4,"RobertaForMaskedLM"),e4.forEach(t),f_.forEach(t),lg=h(s),vt=r(s,"DIV",{class:!0});var Uo=i(vt);w(Mi.$$.fragment,Uo),hT=h(Uo),zi=r(Uo,"P",{});var g_=i(zi);uT=n(g_,"RoBERTa Model with a "),Sh=r(g_,"CODE",{});var t4=i(Sh);mT=n(t4,"language modeling"),t4.forEach(t),fT=n(g_," head on top."),g_.forEach(t),gT=h(Uo),qi=r(Uo,"P",{});var __=i(qi);_T=n(__,"This model inherits from "),op=r(__,"A",{href:!0});var o4=i(op);bT=n(o4,"PreTrainedModel"),o4.forEach(t),kT=n(__,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),__.forEach(t),yT=h(Uo),Ci=r(Uo,"P",{});var b_=i(Ci);vT=n(b_,"This model is also a PyTorch "),ji=r(b_,"A",{href:!0,rel:!0});var n4=i(ji);wT=n(n4,"torch.nn.Module"),n4.forEach(t),TT=n(b_,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),b_.forEach(t),$T=h(Uo),Qt=r(Uo,"DIV",{class:!0});var Na=i(Qt);w(Ai.$$.fragment,Na),FT=h(Na),pn=r(Na,"P",{});var Op=i(pn);xT=n(Op,"The "),np=r(Op,"A",{href:!0});var s4=i(np);ET=n(s4,"RobertaForMaskedLM"),s4.forEach(t),RT=n(Op," forward method, overrides the "),Wh=r(Op,"CODE",{});var a4=i(Wh);MT=n(a4,"__call__"),a4.forEach(t),zT=n(Op," special method."),Op.forEach(t),qT=h(Na),w(vs.$$.fragment,Na),CT=h(Na),w(ws.$$.fragment,Na),Na.forEach(t),Uo.forEach(t),dg=h(s),hn=r(s,"H2",{class:!0});var k_=i(hn);Ts=r(k_,"A",{id:!0,class:!0,href:!0});var r4=i(Ts);Bh=r(r4,"SPAN",{});var i4=i(Bh);w(Pi.$$.fragment,i4),i4.forEach(t),r4.forEach(t),jT=h(k_),Uh=r(k_,"SPAN",{});var l4=i(Uh);AT=n(l4,"RobertaForSequenceClassification"),l4.forEach(t),k_.forEach(t),cg=h(s),wt=r(s,"DIV",{class:!0});var Ho=i(wt);w(Li.$$.fragment,Ho),PT=h(Ho),Hh=r(Ho,"P",{});var d4=i(Hh);LT=n(d4,`RoBERTa Model transformer with a sequence classification/regression head on top (a linear layer on top of the
pooled output) e.g. for GLUE tasks.`),d4.forEach(t),OT=h(Ho),Oi=r(Ho,"P",{});var y_=i(Oi);NT=n(y_,"This model inherits from "),sp=r(y_,"A",{href:!0});var c4=i(sp);IT=n(c4,"PreTrainedModel"),c4.forEach(t),DT=n(y_,`. 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_.forEach(t),ST=h(Ho),Ni=r(Ho,"P",{});var v_=i(Ni);WT=n(v_,"This model is also a PyTorch "),Ii=r(v_,"A",{href:!0,rel:!0});var p4=i(Ii);BT=n(p4,"torch.nn.Module"),p4.forEach(t),UT=n(v_,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),v_.forEach(t),HT=h(Ho),Mt=r(Ho,"DIV",{class:!0});var Qo=i(Mt);w(Di.$$.fragment,Qo),QT=h(Qo),un=r(Qo,"P",{});var Np=i(un);KT=n(Np,"The "),ap=r(Np,"A",{href:!0});var h4=i(ap);JT=n(h4,"RobertaForSequenceClassification"),h4.forEach(t),VT=n(Np," forward method, overrides the "),Qh=r(Np,"CODE",{});var u4=i(Qh);GT=n(u4,"__call__"),u4.forEach(t),XT=n(Np," special method."),Np.forEach(t),YT=h(Qo),w($s.$$.fragment,Qo),ZT=h(Qo),w(Fs.$$.fragment,Qo),e1=h(Qo),w(xs.$$.fragment,Qo),Qo.forEach(t),Ho.forEach(t),pg=h(s),mn=r(s,"H2",{class:!0});var w_=i(mn);Es=r(w_,"A",{id:!0,class:!0,href:!0});var m4=i(Es);Kh=r(m4,"SPAN",{});var f4=i(Kh);w(Si.$$.fragment,f4),f4.forEach(t),m4.forEach(t),t1=h(w_),Jh=r(w_,"SPAN",{});var g4=i(Jh);o1=n(g4,"RobertaForMultipleChoice"),g4.forEach(t),w_.forEach(t),hg=h(s),Tt=r(s,"DIV",{class:!0});var Ko=i(Tt);w(Wi.$$.fragment,Ko),n1=h(Ko),Vh=r(Ko,"P",{});var _4=i(Vh);s1=n(_4,`Roberta 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.`),_4.forEach(t),a1=h(Ko),Bi=r(Ko,"P",{});var T_=i(Bi);r1=n(T_,"This model inherits from "),rp=r(T_,"A",{href:!0});var b4=i(rp);i1=n(b4,"PreTrainedModel"),b4.forEach(t),l1=n(T_,`. 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.)`),T_.forEach(t),d1=h(Ko),Ui=r(Ko,"P",{});var $_=i(Ui);c1=n($_,"This model is also a PyTorch "),Hi=r($_,"A",{href:!0,rel:!0});var k4=i(Hi);p1=n(k4,"torch.nn.Module"),k4.forEach(t),h1=n($_,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),$_.forEach(t),u1=h(Ko),Kt=r(Ko,"DIV",{class:!0});var Ia=i(Kt);w(Qi.$$.fragment,Ia),m1=h(Ia),fn=r(Ia,"P",{});var Ip=i(fn);f1=n(Ip,"The "),ip=r(Ip,"A",{href:!0});var y4=i(ip);g1=n(y4,"RobertaForMultipleChoice"),y4.forEach(t),_1=n(Ip," forward method, overrides the "),Gh=r(Ip,"CODE",{});var v4=i(Gh);b1=n(v4,"__call__"),v4.forEach(t),k1=n(Ip," special method."),Ip.forEach(t),y1=h(Ia),w(Rs.$$.fragment,Ia),v1=h(Ia),w(Ms.$$.fragment,Ia),Ia.forEach(t),Ko.forEach(t),ug=h(s),gn=r(s,"H2",{class:!0});var F_=i(gn);zs=r(F_,"A",{id:!0,class:!0,href:!0});var w4=i(zs);Xh=r(w4,"SPAN",{});var T4=i(Xh);w(Ki.$$.fragment,T4),T4.forEach(t),w4.forEach(t),w1=h(F_),Yh=r(F_,"SPAN",{});var $4=i(Yh);T1=n($4,"RobertaForTokenClassification"),$4.forEach(t),F_.forEach(t),mg=h(s),$t=r(s,"DIV",{class:!0});var Jo=i($t);w(Ji.$$.fragment,Jo),$1=h(Jo),Zh=r(Jo,"P",{});var F4=i(Zh);F1=n(F4,`Roberta 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.`),F4.forEach(t),x1=h(Jo),Vi=r(Jo,"P",{});var x_=i(Vi);E1=n(x_,"This model inherits from "),lp=r(x_,"A",{href:!0});var x4=i(lp);R1=n(x4,"PreTrainedModel"),x4.forEach(t),M1=n(x_,`. 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.)`),x_.forEach(t),z1=h(Jo),Gi=r(Jo,"P",{});var E_=i(Gi);q1=n(E_,"This model is also a PyTorch "),Xi=r(E_,"A",{href:!0,rel:!0});var E4=i(Xi);C1=n(E4,"torch.nn.Module"),E4.forEach(t),j1=n(E_,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),E_.forEach(t),A1=h(Jo),Jt=r(Jo,"DIV",{class:!0});var Da=i(Jt);w(Yi.$$.fragment,Da),P1=h(Da),_n=r(Da,"P",{});var Dp=i(_n);L1=n(Dp,"The "),dp=r(Dp,"A",{href:!0});var R4=i(dp);O1=n(R4,"RobertaForTokenClassification"),R4.forEach(t),N1=n(Dp," forward method, overrides the "),eu=r(Dp,"CODE",{});var M4=i(eu);I1=n(M4,"__call__"),M4.forEach(t),D1=n(Dp," special method."),Dp.forEach(t),S1=h(Da),w(qs.$$.fragment,Da),W1=h(Da),w(Cs.$$.fragment,Da),Da.forEach(t),Jo.forEach(t),fg=h(s),bn=r(s,"H2",{class:!0});var R_=i(bn);js=r(R_,"A",{id:!0,class:!0,href:!0});var z4=i(js);tu=r(z4,"SPAN",{});var q4=i(tu);w(Zi.$$.fragment,q4),q4.forEach(t),z4.forEach(t),B1=h(R_),ou=r(R_,"SPAN",{});var C4=i(ou);U1=n(C4,"RobertaForQuestionAnswering"),C4.forEach(t),R_.forEach(t),gg=h(s),Ft=r(s,"DIV",{class:!0});var Vo=i(Ft);w(el.$$.fragment,Vo),H1=h(Vo),kn=r(Vo,"P",{});var Sp=i(kn);Q1=n(Sp,`Roberta 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 `),nu=r(Sp,"CODE",{});var j4=i(nu);K1=n(j4,"span start logits"),j4.forEach(t),J1=n(Sp," and "),su=r(Sp,"CODE",{});var A4=i(su);V1=n(A4,"span end logits"),A4.forEach(t),G1=n(Sp,")."),Sp.forEach(t),X1=h(Vo),tl=r(Vo,"P",{});var M_=i(tl);Y1=n(M_,"This model inherits from "),cp=r(M_,"A",{href:!0});var P4=i(cp);Z1=n(P4,"PreTrainedModel"),P4.forEach(t),e$=n(M_,`. 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.)`),M_.forEach(t),t$=h(Vo),ol=r(Vo,"P",{});var z_=i(ol);o$=n(z_,"This model is also a PyTorch "),nl=r(z_,"A",{href:!0,rel:!0});var L4=i(nl);n$=n(L4,"torch.nn.Module"),L4.forEach(t),s$=n(z_,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),z_.forEach(t),a$=h(Vo),Vt=r(Vo,"DIV",{class:!0});var Sa=i(Vt);w(sl.$$.fragment,Sa),r$=h(Sa),yn=r(Sa,"P",{});var Wp=i(yn);i$=n(Wp,"The "),pp=r(Wp,"A",{href:!0});var O4=i(pp);l$=n(O4,"RobertaForQuestionAnswering"),O4.forEach(t),d$=n(Wp," forward method, overrides the "),au=r(Wp,"CODE",{});var N4=i(au);c$=n(N4,"__call__"),N4.forEach(t),p$=n(Wp," special method."),Wp.forEach(t),h$=h(Sa),w(As.$$.fragment,Sa),u$=h(Sa),w(Ps.$$.fragment,Sa),Sa.forEach(t),Vo.forEach(t),_g=h(s),vn=r(s,"H2",{class:!0});var q_=i(vn);Ls=r(q_,"A",{id:!0,class:!0,href:!0});var I4=i(Ls);ru=r(I4,"SPAN",{});var D4=i(ru);w(al.$$.fragment,D4),D4.forEach(t),I4.forEach(t),m$=h(q_),iu=r(q_,"SPAN",{});var S4=i(iu);f$=n(S4,"TFRobertaModel"),S4.forEach(t),q_.forEach(t),bg=h(s),pt=r(s,"DIV",{class:!0});var ro=i(pt);w(rl.$$.fragment,ro),g$=h(ro),lu=r(ro,"P",{});var W4=i(lu);_$=n(W4,"The bare RoBERTa Model transformer outputting raw hidden-states without any specific head on top."),W4.forEach(t),b$=h(ro),il=r(ro,"P",{});var C_=i(il);k$=n(C_,"This model inherits from "),hp=r(C_,"A",{href:!0});var B4=i(hp);y$=n(B4,"TFPreTrainedModel"),B4.forEach(t),v$=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),w$=h(ro),ll=r(ro,"P",{});var j_=i(ll);T$=n(j_,"This model is also a "),dl=r(j_,"A",{href:!0,rel:!0});var U4=i(dl);$$=n(U4,"tf.keras.Model"),U4.forEach(t),F$=n(j_,` 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.`),j_.forEach(t),x$=h(ro),w(Os.$$.fragment,ro),E$=h(ro),Gt=r(ro,"DIV",{class:!0});var Wa=i(Gt);w(cl.$$.fragment,Wa),R$=h(Wa),wn=r(Wa,"P",{});var Bp=i(wn);M$=n(Bp,"The "),up=r(Bp,"A",{href:!0});var H4=i(up);z$=n(H4,"TFRobertaModel"),H4.forEach(t),q$=n(Bp," forward method, overrides the "),du=r(Bp,"CODE",{});var Q4=i(du);C$=n(Q4,"__call__"),Q4.forEach(t),j$=n(Bp," special method."),Bp.forEach(t),A$=h(Wa),w(Ns.$$.fragment,Wa),P$=h(Wa),w(Is.$$.fragment,Wa),Wa.forEach(t),ro.forEach(t),kg=h(s),Tn=r(s,"H2",{class:!0});var A_=i(Tn);Ds=r(A_,"A",{id:!0,class:!0,href:!0});var K4=i(Ds);cu=r(K4,"SPAN",{});var J4=i(cu);w(pl.$$.fragment,J4),J4.forEach(t),K4.forEach(t),L$=h(A_),pu=r(A_,"SPAN",{});var V4=i(pu);O$=n(V4,"TFRobertaForCausalLM"),V4.forEach(t),A_.forEach(t),yg=h(s),$n=r(s,"DIV",{class:!0});var P_=i($n);w(hl.$$.fragment,P_),N$=h(P_),Xt=r(P_,"DIV",{class:!0});var Ba=i(Xt);w(ul.$$.fragment,Ba),I$=h(Ba),Fn=r(Ba,"P",{});var Up=i(Fn);D$=n(Up,"The "),mp=r(Up,"A",{href:!0});var G4=i(mp);S$=n(G4,"TFRobertaForCausalLM"),G4.forEach(t),W$=n(Up," forward method, overrides the "),hu=r(Up,"CODE",{});var X4=i(hu);B$=n(X4,"__call__"),X4.forEach(t),U$=n(Up," special method."),Up.forEach(t),H$=h(Ba),w(Ss.$$.fragment,Ba),Q$=h(Ba),w(Ws.$$.fragment,Ba),Ba.forEach(t),P_.forEach(t),vg=h(s),xn=r(s,"H2",{class:!0});var L_=i(xn);Bs=r(L_,"A",{id:!0,class:!0,href:!0});var Y4=i(Bs);uu=r(Y4,"SPAN",{});var Z4=i(uu);w(ml.$$.fragment,Z4),Z4.forEach(t),Y4.forEach(t),K$=h(L_),mu=r(L_,"SPAN",{});var eq=i(mu);J$=n(eq,"TFRobertaForMaskedLM"),eq.forEach(t),L_.forEach(t),wg=h(s),ht=r(s,"DIV",{class:!0});var io=i(ht);w(fl.$$.fragment,io),V$=h(io),gl=r(io,"P",{});var O_=i(gl);G$=n(O_,"RoBERTa Model with a "),fu=r(O_,"CODE",{});var tq=i(fu);X$=n(tq,"language modeling"),tq.forEach(t),Y$=n(O_," head on top."),O_.forEach(t),Z$=h(io),_l=r(io,"P",{});var N_=i(_l);e2=n(N_,"This model inherits from "),fp=r(N_,"A",{href:!0});var oq=i(fp);t2=n(oq,"TFPreTrainedModel"),oq.forEach(t),o2=n(N_,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),N_.forEach(t),n2=h(io),bl=r(io,"P",{});var I_=i(bl);s2=n(I_,"This model is also a "),kl=r(I_,"A",{href:!0,rel:!0});var nq=i(kl);a2=n(nq,"tf.keras.Model"),nq.forEach(t),r2=n(I_,` 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.`),I_.forEach(t),i2=h(io),w(Us.$$.fragment,io),l2=h(io),zt=r(io,"DIV",{class:!0});var Go=i(zt);w(yl.$$.fragment,Go),d2=h(Go),En=r(Go,"P",{});var Hp=i(En);c2=n(Hp,"The "),gp=r(Hp,"A",{href:!0});var sq=i(gp);p2=n(sq,"TFRobertaForMaskedLM"),sq.forEach(t),h2=n(Hp," forward method, overrides the "),gu=r(Hp,"CODE",{});var aq=i(gu);u2=n(aq,"__call__"),aq.forEach(t),m2=n(Hp," special method."),Hp.forEach(t),f2=h(Go),w(Hs.$$.fragment,Go),g2=h(Go),w(Qs.$$.fragment,Go),_2=h(Go),w(Ks.$$.fragment,Go),Go.forEach(t),io.forEach(t),Tg=h(s),Rn=r(s,"H2",{class:!0});var D_=i(Rn);Js=r(D_,"A",{id:!0,class:!0,href:!0});var rq=i(Js);_u=r(rq,"SPAN",{});var iq=i(_u);w(vl.$$.fragment,iq),iq.forEach(t),rq.forEach(t),b2=h(D_),bu=r(D_,"SPAN",{});var lq=i(bu);k2=n(lq,"TFRobertaForSequenceClassification"),lq.forEach(t),D_.forEach(t),$g=h(s),ut=r(s,"DIV",{class:!0});var lo=i(ut);w(wl.$$.fragment,lo),y2=h(lo),ku=r(lo,"P",{});var dq=i(ku);v2=n(dq,`RoBERTa Model transformer with a sequence classification/regression head on top (a linear layer on top of the
pooled output) e.g. for GLUE tasks.`),dq.forEach(t),w2=h(lo),Tl=r(lo,"P",{});var S_=i(Tl);T2=n(S_,"This model inherits from "),_p=r(S_,"A",{href:!0});var cq=i(_p);$2=n(cq,"TFPreTrainedModel"),cq.forEach(t),F2=n(S_,`. 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.)`),S_.forEach(t),x2=h(lo),$l=r(lo,"P",{});var W_=i($l);E2=n(W_,"This model is also a "),Fl=r(W_,"A",{href:!0,rel:!0});var pq=i(Fl);R2=n(pq,"tf.keras.Model"),pq.forEach(t),M2=n(W_,` 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.`),W_.forEach(t),z2=h(lo),w(Vs.$$.fragment,lo),q2=h(lo),qt=r(lo,"DIV",{class:!0});var Xo=i(qt);w(xl.$$.fragment,Xo),C2=h(Xo),Mn=r(Xo,"P",{});var Qp=i(Mn);j2=n(Qp,"The "),bp=r(Qp,"A",{href:!0});var hq=i(bp);A2=n(hq,"TFRobertaForSequenceClassification"),hq.forEach(t),P2=n(Qp," forward method, overrides the "),yu=r(Qp,"CODE",{});var uq=i(yu);L2=n(uq,"__call__"),uq.forEach(t),O2=n(Qp," special method."),Qp.forEach(t),N2=h(Xo),w(Gs.$$.fragment,Xo),I2=h(Xo),w(Xs.$$.fragment,Xo),D2=h(Xo),w(Ys.$$.fragment,Xo),Xo.forEach(t),lo.forEach(t),Fg=h(s),zn=r(s,"H2",{class:!0});var B_=i(zn);Zs=r(B_,"A",{id:!0,class:!0,href:!0});var mq=i(Zs);vu=r(mq,"SPAN",{});var fq=i(vu);w(El.$$.fragment,fq),fq.forEach(t),mq.forEach(t),S2=h(B_),wu=r(B_,"SPAN",{});var gq=i(wu);W2=n(gq,"TFRobertaForMultipleChoice"),gq.forEach(t),B_.forEach(t),xg=h(s),mt=r(s,"DIV",{class:!0});var co=i(mt);w(Rl.$$.fragment,co),B2=h(co),Tu=r(co,"P",{});var _q=i(Tu);U2=n(_q,`Roberta 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.`),_q.forEach(t),H2=h(co),Ml=r(co,"P",{});var U_=i(Ml);Q2=n(U_,"This model inherits from "),kp=r(U_,"A",{href:!0});var bq=i(kp);K2=n(bq,"TFPreTrainedModel"),bq.forEach(t),J2=n(U_,`. 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.)`),U_.forEach(t),V2=h(co),zl=r(co,"P",{});var H_=i(zl);G2=n(H_,"This model is also a "),ql=r(H_,"A",{href:!0,rel:!0});var kq=i(ql);X2=n(kq,"tf.keras.Model"),kq.forEach(t),Y2=n(H_,` 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.`),H_.forEach(t),Z2=h(co),w(ea.$$.fragment,co),eF=h(co),Yt=r(co,"DIV",{class:!0});var Ua=i(Yt);w(Cl.$$.fragment,Ua),tF=h(Ua),qn=r(Ua,"P",{});var Kp=i(qn);oF=n(Kp,"The "),yp=r(Kp,"A",{href:!0});var yq=i(yp);nF=n(yq,"TFRobertaForMultipleChoice"),yq.forEach(t),sF=n(Kp," forward method, overrides the "),$u=r(Kp,"CODE",{});var vq=i($u);aF=n(vq,"__call__"),vq.forEach(t),rF=n(Kp," special method."),Kp.forEach(t),iF=h(Ua),w(ta.$$.fragment,Ua),lF=h(Ua),w(oa.$$.fragment,Ua),Ua.forEach(t),co.forEach(t),Eg=h(s),Cn=r(s,"H2",{class:!0});var Q_=i(Cn);na=r(Q_,"A",{id:!0,class:!0,href:!0});var wq=i(na);Fu=r(wq,"SPAN",{});var Tq=i(Fu);w(jl.$$.fragment,Tq),Tq.forEach(t),wq.forEach(t),dF=h(Q_),xu=r(Q_,"SPAN",{});var $q=i(xu);cF=n($q,"TFRobertaForTokenClassification"),$q.forEach(t),Q_.forEach(t),Rg=h(s),ft=r(s,"DIV",{class:!0});var po=i(ft);w(Al.$$.fragment,po),pF=h(po),Eu=r(po,"P",{});var Fq=i(Eu);hF=n(Fq,`RoBERTa 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.`),Fq.forEach(t),uF=h(po),Pl=r(po,"P",{});var K_=i(Pl);mF=n(K_,"This model inherits from "),vp=r(K_,"A",{href:!0});var xq=i(vp);fF=n(xq,"TFPreTrainedModel"),xq.forEach(t),gF=n(K_,`. 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.)`),K_.forEach(t),_F=h(po),Ll=r(po,"P",{});var J_=i(Ll);bF=n(J_,"This model is also a "),Ol=r(J_,"A",{href:!0,rel:!0});var Eq=i(Ol);kF=n(Eq,"tf.keras.Model"),Eq.forEach(t),yF=n(J_,` 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.`),J_.forEach(t),vF=h(po),w(sa.$$.fragment,po),wF=h(po),Ct=r(po,"DIV",{class:!0});var Yo=i(Ct);w(Nl.$$.fragment,Yo),TF=h(Yo),jn=r(Yo,"P",{});var Jp=i(jn);$F=n(Jp,"The "),wp=r(Jp,"A",{href:!0});var Rq=i(wp);FF=n(Rq,"TFRobertaForTokenClassification"),Rq.forEach(t),xF=n(Jp," forward method, overrides the "),Ru=r(Jp,"CODE",{});var Mq=i(Ru);EF=n(Mq,"__call__"),Mq.forEach(t),RF=n(Jp," special method."),Jp.forEach(t),MF=h(Yo),w(aa.$$.fragment,Yo),zF=h(Yo),w(ra.$$.fragment,Yo),qF=h(Yo),w(ia.$$.fragment,Yo),Yo.forEach(t),po.forEach(t),Mg=h(s),An=r(s,"H2",{class:!0});var V_=i(An);la=r(V_,"A",{id:!0,class:!0,href:!0});var zq=i(la);Mu=r(zq,"SPAN",{});var qq=i(Mu);w(Il.$$.fragment,qq),qq.forEach(t),zq.forEach(t),CF=h(V_),zu=r(V_,"SPAN",{});var Cq=i(zu);jF=n(Cq,"TFRobertaForQuestionAnswering"),Cq.forEach(t),V_.forEach(t),zg=h(s),gt=r(s,"DIV",{class:!0});var ho=i(gt);w(Dl.$$.fragment,ho),AF=h(ho),Pn=r(ho,"P",{});var Vp=i(Pn);PF=n(Vp,`RoBERTa 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 `),qu=r(Vp,"CODE",{});var jq=i(qu);LF=n(jq,"span start logits"),jq.forEach(t),OF=n(Vp," and "),Cu=r(Vp,"CODE",{});var Aq=i(Cu);NF=n(Aq,"span end logits"),Aq.forEach(t),IF=n(Vp,")."),Vp.forEach(t),DF=h(ho),Sl=r(ho,"P",{});var G_=i(Sl);SF=n(G_,"This model inherits from "),Tp=r(G_,"A",{href:!0});var Pq=i(Tp);WF=n(Pq,"TFPreTrainedModel"),Pq.forEach(t),BF=n(G_,`. 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.)`),G_.forEach(t),UF=h(ho),Wl=r(ho,"P",{});var X_=i(Wl);HF=n(X_,"This model is also a "),Bl=r(X_,"A",{href:!0,rel:!0});var Lq=i(Bl);QF=n(Lq,"tf.keras.Model"),Lq.forEach(t),KF=n(X_,` 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.`),X_.forEach(t),JF=h(ho),w(da.$$.fragment,ho),VF=h(ho),jt=r(ho,"DIV",{class:!0});var Zo=i(jt);w(Ul.$$.fragment,Zo),GF=h(Zo),Ln=r(Zo,"P",{});var Gp=i(Ln);XF=n(Gp,"The "),$p=r(Gp,"A",{href:!0});var Oq=i($p);YF=n(Oq,"TFRobertaForQuestionAnswering"),Oq.forEach(t),ZF=n(Gp," forward method, overrides the "),ju=r(Gp,"CODE",{});var Nq=i(ju);e0=n(Nq,"__call__"),Nq.forEach(t),t0=n(Gp," special method."),Gp.forEach(t),o0=h(Zo),w(ca.$$.fragment,Zo),n0=h(Zo),w(pa.$$.fragment,Zo),s0=h(Zo),w(ha.$$.fragment,Zo),Zo.forEach(t),ho.forEach(t),qg=h(s),On=r(s,"H2",{class:!0});var Y_=i(On);ua=r(Y_,"A",{id:!0,class:!0,href:!0});var Iq=i(ua);Au=r(Iq,"SPAN",{});var Dq=i(Au);w(Hl.$$.fragment,Dq),Dq.forEach(t),Iq.forEach(t),a0=h(Y_),Pu=r(Y_,"SPAN",{});var Sq=i(Pu);r0=n(Sq,"FlaxRobertaModel"),Sq.forEach(t),Y_.forEach(t),Cg=h(s),nt=r(s,"DIV",{class:!0});var Pt=i(nt);w(Ql.$$.fragment,Pt),i0=h(Pt),Lu=r(Pt,"P",{});var Wq=i(Lu);l0=n(Wq,"The bare RoBERTa Model transformer outputting raw hidden-states without any specific head on top."),Wq.forEach(t),d0=h(Pt),Kl=r(Pt,"P",{});var Z_=i(Kl);c0=n(Z_,"This model inherits from "),Fp=r(Z_,"A",{href:!0});var Bq=i(Fp);p0=n(Bq,"FlaxPreTrainedModel"),Bq.forEach(t),h0=n(Z_,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading, saving and converting weights from PyTorch models)`),Z_.forEach(t),u0=h(Pt),Jl=r(Pt,"P",{});var eb=i(Jl);m0=n(eb,"This model is also a Flax Linen "),Vl=r(eb,"A",{href:!0,rel:!0});var Uq=i(Vl);f0=n(Uq,"flax.linen.Module"),Uq.forEach(t),g0=n(eb,`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),eb.forEach(t),_0=h(Pt),Ou=r(Pt,"P",{});var Hq=i(Ou);b0=n(Hq,"Finally, this model supports inherent JAX features such as:"),Hq.forEach(t),k0=h(Pt),mo=r(Pt,"UL",{});var Ha=i(mo);Nu=r(Ha,"LI",{});var Qq=i(Nu);Gl=r(Qq,"A",{href:!0,rel:!0});var Kq=i(Gl);y0=n(Kq,"Just-In-Time (JIT) compilation"),Kq.forEach(t),Qq.forEach(t),v0=h(Ha),Iu=r(Ha,"LI",{});var Jq=i(Iu);Xl=r(Jq,"A",{href:!0,rel:!0});var Vq=i(Xl);w0=n(Vq,"Automatic Differentiation"),Vq.forEach(t),Jq.forEach(t),T0=h(Ha),Du=r(Ha,"LI",{});var Gq=i(Du);Yl=r(Gq,"A",{href:!0,rel:!0});var Xq=i(Yl);$0=n(Xq,"Vectorization"),Xq.forEach(t),Gq.forEach(t),F0=h(Ha),Su=r(Ha,"LI",{});var Yq=i(Su);Zl=r(Yq,"A",{href:!0,rel:!0});var Zq=i(Zl);x0=n(Zq,"Parallelization"),Zq.forEach(t),Yq.forEach(t),Ha.forEach(t),E0=h(Pt),Zt=r(Pt,"DIV",{class:!0});var Qa=i(Zt);w(ed.$$.fragment,Qa),R0=h(Qa),Nn=r(Qa,"P",{});var Xp=i(Nn);M0=n(Xp,"The "),Wu=r(Xp,"CODE",{});var eC=i(Wu);z0=n(eC,"FlaxRobertaPreTrainedModel"),eC.forEach(t),q0=n(Xp," forward method, overrides the "),Bu=r(Xp,"CODE",{});var tC=i(Bu);C0=n(tC,"__call__"),tC.forEach(t),j0=n(Xp," special method."),Xp.forEach(t),A0=h(Qa),w(ma.$$.fragment,Qa),P0=h(Qa),w(fa.$$.fragment,Qa),Qa.forEach(t),Pt.forEach(t),jg=h(s),In=r(s,"H2",{class:!0});var tb=i(In);ga=r(tb,"A",{id:!0,class:!0,href:!0});var oC=i(ga);Uu=r(oC,"SPAN",{});var nC=i(Uu);w(td.$$.fragment,nC),nC.forEach(t),oC.forEach(t),L0=h(tb),Hu=r(tb,"SPAN",{});var sC=i(Hu);O0=n(sC,"FlaxRobertaForCausalLM"),sC.forEach(t),tb.forEach(t),Ag=h(s),st=r(s,"DIV",{class:!0});var Lt=i(st);w(od.$$.fragment,Lt),N0=h(Lt),Qu=r(Lt,"P",{});var aC=i(Qu);I0=n(aC,`Roberta Model with a language modeling head on top (a linear layer on top of the hidden-states output) e.g for
autoregressive tasks.`),aC.forEach(t),D0=h(Lt),nd=r(Lt,"P",{});var ob=i(nd);S0=n(ob,"This model inherits from "),xp=r(ob,"A",{href:!0});var rC=i(xp);W0=n(rC,"FlaxPreTrainedModel"),rC.forEach(t),B0=n(ob,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading, saving and converting weights from PyTorch models)`),ob.forEach(t),U0=h(Lt),sd=r(Lt,"P",{});var nb=i(sd);H0=n(nb,"This model is also a Flax Linen "),ad=r(nb,"A",{href:!0,rel:!0});var iC=i(ad);Q0=n(iC,"flax.linen.Module"),iC.forEach(t),K0=n(nb,`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),nb.forEach(t),J0=h(Lt),Ku=r(Lt,"P",{});var lC=i(Ku);V0=n(lC,"Finally, this model supports inherent JAX features such as:"),lC.forEach(t),G0=h(Lt),fo=r(Lt,"UL",{});var Ka=i(fo);Ju=r(Ka,"LI",{});var dC=i(Ju);rd=r(dC,"A",{href:!0,rel:!0});var cC=i(rd);X0=n(cC,"Just-In-Time (JIT) compilation"),cC.forEach(t),dC.forEach(t),Y0=h(Ka),Vu=r(Ka,"LI",{});var pC=i(Vu);id=r(pC,"A",{href:!0,rel:!0});var hC=i(id);Z0=n(hC,"Automatic Differentiation"),hC.forEach(t),pC.forEach(t),ex=h(Ka),Gu=r(Ka,"LI",{});var uC=i(Gu);ld=r(uC,"A",{href:!0,rel:!0});var mC=i(ld);tx=n(mC,"Vectorization"),mC.forEach(t),uC.forEach(t),ox=h(Ka),Xu=r(Ka,"LI",{});var fC=i(Xu);dd=r(fC,"A",{href:!0,rel:!0});var gC=i(dd);nx=n(gC,"Parallelization"),gC.forEach(t),fC.forEach(t),Ka.forEach(t),sx=h(Lt),eo=r(Lt,"DIV",{class:!0});var Ja=i(eo);w(cd.$$.fragment,Ja),ax=h(Ja),Dn=r(Ja,"P",{});var Yp=i(Dn);rx=n(Yp,"The "),Yu=r(Yp,"CODE",{});var _C=i(Yu);ix=n(_C,"FlaxRobertaPreTrainedModel"),_C.forEach(t),lx=n(Yp," forward method, overrides the "),Zu=r(Yp,"CODE",{});var bC=i(Zu);dx=n(bC,"__call__"),bC.forEach(t),cx=n(Yp," special method."),Yp.forEach(t),px=h(Ja),w(_a.$$.fragment,Ja),hx=h(Ja),w(ba.$$.fragment,Ja),Ja.forEach(t),Lt.forEach(t),Pg=h(s),Sn=r(s,"H2",{class:!0});var sb=i(Sn);ka=r(sb,"A",{id:!0,class:!0,href:!0});var kC=i(ka);em=r(kC,"SPAN",{});var yC=i(em);w(pd.$$.fragment,yC),yC.forEach(t),kC.forEach(t),ux=h(sb),tm=r(sb,"SPAN",{});var vC=i(tm);mx=n(vC,"FlaxRobertaForMaskedLM"),vC.forEach(t),sb.forEach(t),Lg=h(s),at=r(s,"DIV",{class:!0});var Ot=i(at);w(hd.$$.fragment,Ot),fx=h(Ot),ud=r(Ot,"P",{});var ab=i(ud);gx=n(ab,"RoBERTa Model with a "),om=r(ab,"CODE",{});var wC=i(om);_x=n(wC,"language modeling"),wC.forEach(t),bx=n(ab," head on top."),ab.forEach(t),kx=h(Ot),md=r(Ot,"P",{});var rb=i(md);yx=n(rb,"This model inherits from "),Ep=r(rb,"A",{href:!0});var TC=i(Ep);vx=n(TC,"FlaxPreTrainedModel"),TC.forEach(t),wx=n(rb,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading, saving and converting weights from PyTorch models)`),rb.forEach(t),Tx=h(Ot),fd=r(Ot,"P",{});var ib=i(fd);$x=n(ib,"This model is also a Flax Linen "),gd=r(ib,"A",{href:!0,rel:!0});var $C=i(gd);Fx=n($C,"flax.linen.Module"),$C.forEach(t),xx=n(ib,`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),ib.forEach(t),Ex=h(Ot),nm=r(Ot,"P",{});var FC=i(nm);Rx=n(FC,"Finally, this model supports inherent JAX features such as:"),FC.forEach(t),Mx=h(Ot),go=r(Ot,"UL",{});var Va=i(go);sm=r(Va,"LI",{});var xC=i(sm);_d=r(xC,"A",{href:!0,rel:!0});var EC=i(_d);zx=n(EC,"Just-In-Time (JIT) compilation"),EC.forEach(t),xC.forEach(t),qx=h(Va),am=r(Va,"LI",{});var RC=i(am);bd=r(RC,"A",{href:!0,rel:!0});var MC=i(bd);Cx=n(MC,"Automatic Differentiation"),MC.forEach(t),RC.forEach(t),jx=h(Va),rm=r(Va,"LI",{});var zC=i(rm);kd=r(zC,"A",{href:!0,rel:!0});var qC=i(kd);Ax=n(qC,"Vectorization"),qC.forEach(t),zC.forEach(t),Px=h(Va),im=r(Va,"LI",{});var CC=i(im);yd=r(CC,"A",{href:!0,rel:!0});var jC=i(yd);Lx=n(jC,"Parallelization"),jC.forEach(t),CC.forEach(t),Va.forEach(t),Ox=h(Ot),to=r(Ot,"DIV",{class:!0});var Ga=i(to);w(vd.$$.fragment,Ga),Nx=h(Ga),Wn=r(Ga,"P",{});var Zp=i(Wn);Ix=n(Zp,"The "),lm=r(Zp,"CODE",{});var AC=i(lm);Dx=n(AC,"FlaxRobertaPreTrainedModel"),AC.forEach(t),Sx=n(Zp," forward method, overrides the "),dm=r(Zp,"CODE",{});var PC=i(dm);Wx=n(PC,"__call__"),PC.forEach(t),Bx=n(Zp," special method."),Zp.forEach(t),Ux=h(Ga),w(ya.$$.fragment,Ga),Hx=h(Ga),w(va.$$.fragment,Ga),Ga.forEach(t),Ot.forEach(t),Og=h(s),Bn=r(s,"H2",{class:!0});var lb=i(Bn);wa=r(lb,"A",{id:!0,class:!0,href:!0});var LC=i(wa);cm=r(LC,"SPAN",{});var OC=i(cm);w(wd.$$.fragment,OC),OC.forEach(t),LC.forEach(t),Qx=h(lb),pm=r(lb,"SPAN",{});var NC=i(pm);Kx=n(NC,"FlaxRobertaForSequenceClassification"),NC.forEach(t),lb.forEach(t),Ng=h(s),rt=r(s,"DIV",{class:!0});var Nt=i(rt);w(Td.$$.fragment,Nt),Jx=h(Nt),hm=r(Nt,"P",{});var IC=i(hm);Vx=n(IC,`Roberta Model transformer with a sequence classification/regression head on top (a linear layer on top of the
pooled output) e.g. for GLUE tasks.`),IC.forEach(t),Gx=h(Nt),$d=r(Nt,"P",{});var db=i($d);Xx=n(db,"This model inherits from "),Rp=r(db,"A",{href:!0});var DC=i(Rp);Yx=n(DC,"FlaxPreTrainedModel"),DC.forEach(t),Zx=n(db,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading, saving and converting weights from PyTorch models)`),db.forEach(t),eE=h(Nt),Fd=r(Nt,"P",{});var cb=i(Fd);tE=n(cb,"This model is also a Flax Linen "),xd=r(cb,"A",{href:!0,rel:!0});var SC=i(xd);oE=n(SC,"flax.linen.Module"),SC.forEach(t),nE=n(cb,`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),cb.forEach(t),sE=h(Nt),um=r(Nt,"P",{});var WC=i(um);aE=n(WC,"Finally, this model supports inherent JAX features such as:"),WC.forEach(t),rE=h(Nt),_o=r(Nt,"UL",{});var Xa=i(_o);mm=r(Xa,"LI",{});var BC=i(mm);Ed=r(BC,"A",{href:!0,rel:!0});var UC=i(Ed);iE=n(UC,"Just-In-Time (JIT) compilation"),UC.forEach(t),BC.forEach(t),lE=h(Xa),fm=r(Xa,"LI",{});var HC=i(fm);Rd=r(HC,"A",{href:!0,rel:!0});var QC=i(Rd);dE=n(QC,"Automatic Differentiation"),QC.forEach(t),HC.forEach(t),cE=h(Xa),gm=r(Xa,"LI",{});var KC=i(gm);Md=r(KC,"A",{href:!0,rel:!0});var JC=i(Md);pE=n(JC,"Vectorization"),JC.forEach(t),KC.forEach(t),hE=h(Xa),_m=r(Xa,"LI",{});var VC=i(_m);zd=r(VC,"A",{href:!0,rel:!0});var GC=i(zd);uE=n(GC,"Parallelization"),GC.forEach(t),VC.forEach(t),Xa.forEach(t),mE=h(Nt),oo=r(Nt,"DIV",{class:!0});var Ya=i(oo);w(qd.$$.fragment,Ya),fE=h(Ya),Un=r(Ya,"P",{});var eh=i(Un);gE=n(eh,"The "),bm=r(eh,"CODE",{});var XC=i(bm);_E=n(XC,"FlaxRobertaPreTrainedModel"),XC.forEach(t),bE=n(eh," forward method, overrides the "),km=r(eh,"CODE",{});var YC=i(km);kE=n(YC,"__call__"),YC.forEach(t),yE=n(eh," special method."),eh.forEach(t),vE=h(Ya),w(Ta.$$.fragment,Ya),wE=h(Ya),w($a.$$.fragment,Ya),Ya.forEach(t),Nt.forEach(t),Ig=h(s),Hn=r(s,"H2",{class:!0});var pb=i(Hn);Fa=r(pb,"A",{id:!0,class:!0,href:!0});var ZC=i(Fa);ym=r(ZC,"SPAN",{});var ej=i(ym);w(Cd.$$.fragment,ej),ej.forEach(t),ZC.forEach(t),TE=h(pb),vm=r(pb,"SPAN",{});var tj=i(vm);$E=n(tj,"FlaxRobertaForMultipleChoice"),tj.forEach(t),pb.forEach(t),Dg=h(s),it=r(s,"DIV",{class:!0});var It=i(it);w(jd.$$.fragment,It),FE=h(It),wm=r(It,"P",{});var oj=i(wm);xE=n(oj,`Roberta 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.`),oj.forEach(t),EE=h(It),Ad=r(It,"P",{});var hb=i(Ad);RE=n(hb,"This model inherits from "),Mp=r(hb,"A",{href:!0});var nj=i(Mp);ME=n(nj,"FlaxPreTrainedModel"),nj.forEach(t),zE=n(hb,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading, saving and converting weights from PyTorch models)`),hb.forEach(t),qE=h(It),Pd=r(It,"P",{});var ub=i(Pd);CE=n(ub,"This model is also a Flax Linen "),Ld=r(ub,"A",{href:!0,rel:!0});var sj=i(Ld);jE=n(sj,"flax.linen.Module"),sj.forEach(t),AE=n(ub,`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),ub.forEach(t),PE=h(It),Tm=r(It,"P",{});var aj=i(Tm);LE=n(aj,"Finally, this model supports inherent JAX features such as:"),aj.forEach(t),OE=h(It),bo=r(It,"UL",{});var Za=i(bo);$m=r(Za,"LI",{});var rj=i($m);Od=r(rj,"A",{href:!0,rel:!0});var ij=i(Od);NE=n(ij,"Just-In-Time (JIT) compilation"),ij.forEach(t),rj.forEach(t),IE=h(Za),Fm=r(Za,"LI",{});var lj=i(Fm);Nd=r(lj,"A",{href:!0,rel:!0});var dj=i(Nd);DE=n(dj,"Automatic Differentiation"),dj.forEach(t),lj.forEach(t),SE=h(Za),xm=r(Za,"LI",{});var cj=i(xm);Id=r(cj,"A",{href:!0,rel:!0});var pj=i(Id);WE=n(pj,"Vectorization"),pj.forEach(t),cj.forEach(t),BE=h(Za),Em=r(Za,"LI",{});var hj=i(Em);Dd=r(hj,"A",{href:!0,rel:!0});var uj=i(Dd);UE=n(uj,"Parallelization"),uj.forEach(t),hj.forEach(t),Za.forEach(t),HE=h(It),no=r(It,"DIV",{class:!0});var er=i(no);w(Sd.$$.fragment,er),QE=h(er),Qn=r(er,"P",{});var th=i(Qn);KE=n(th,"The "),Rm=r(th,"CODE",{});var mj=i(Rm);JE=n(mj,"FlaxRobertaPreTrainedModel"),mj.forEach(t),VE=n(th," forward method, overrides the "),Mm=r(th,"CODE",{});var fj=i(Mm);GE=n(fj,"__call__"),fj.forEach(t),XE=n(th," special method."),th.forEach(t),YE=h(er),w(xa.$$.fragment,er),ZE=h(er),w(Ea.$$.fragment,er),er.forEach(t),It.forEach(t),Sg=h(s),Kn=r(s,"H2",{class:!0});var mb=i(Kn);Ra=r(mb,"A",{id:!0,class:!0,href:!0});var gj=i(Ra);zm=r(gj,"SPAN",{});var _j=i(zm);w(Wd.$$.fragment,_j),_j.forEach(t),gj.forEach(t),eR=h(mb),qm=r(mb,"SPAN",{});var bj=i(qm);tR=n(bj,"FlaxRobertaForTokenClassification"),bj.forEach(t),mb.forEach(t),Wg=h(s),lt=r(s,"DIV",{class:!0});var Dt=i(lt);w(Bd.$$.fragment,Dt),oR=h(Dt),Cm=r(Dt,"P",{});var kj=i(Cm);nR=n(kj,`Roberta 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.`),kj.forEach(t),sR=h(Dt),Ud=r(Dt,"P",{});var fb=i(Ud);aR=n(fb,"This model inherits from "),zp=r(fb,"A",{href:!0});var yj=i(zp);rR=n(yj,"FlaxPreTrainedModel"),yj.forEach(t),iR=n(fb,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading, saving and converting weights from PyTorch models)`),fb.forEach(t),lR=h(Dt),Hd=r(Dt,"P",{});var gb=i(Hd);dR=n(gb,"This model is also a Flax Linen "),Qd=r(gb,"A",{href:!0,rel:!0});var vj=i(Qd);cR=n(vj,"flax.linen.Module"),vj.forEach(t),pR=n(gb,`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),gb.forEach(t),hR=h(Dt),jm=r(Dt,"P",{});var wj=i(jm);uR=n(wj,"Finally, this model supports inherent JAX features such as:"),wj.forEach(t),mR=h(Dt),ko=r(Dt,"UL",{});var tr=i(ko);Am=r(tr,"LI",{});var Tj=i(Am);Kd=r(Tj,"A",{href:!0,rel:!0});var $j=i(Kd);fR=n($j,"Just-In-Time (JIT) compilation"),$j.forEach(t),Tj.forEach(t),gR=h(tr),Pm=r(tr,"LI",{});var Fj=i(Pm);Jd=r(Fj,"A",{href:!0,rel:!0});var xj=i(Jd);_R=n(xj,"Automatic Differentiation"),xj.forEach(t),Fj.forEach(t),bR=h(tr),Lm=r(tr,"LI",{});var Ej=i(Lm);Vd=r(Ej,"A",{href:!0,rel:!0});var Rj=i(Vd);kR=n(Rj,"Vectorization"),Rj.forEach(t),Ej.forEach(t),yR=h(tr),Om=r(tr,"LI",{});var Mj=i(Om);Gd=r(Mj,"A",{href:!0,rel:!0});var zj=i(Gd);vR=n(zj,"Parallelization"),zj.forEach(t),Mj.forEach(t),tr.forEach(t),wR=h(Dt),so=r(Dt,"DIV",{class:!0});var or=i(so);w(Xd.$$.fragment,or),TR=h(or),Jn=r(or,"P",{});var oh=i(Jn);$R=n(oh,"The "),Nm=r(oh,"CODE",{});var qj=i(Nm);FR=n(qj,"FlaxRobertaPreTrainedModel"),qj.forEach(t),xR=n(oh," forward method, overrides the "),Im=r(oh,"CODE",{});var Cj=i(Im);ER=n(Cj,"__call__"),Cj.forEach(t),RR=n(oh," special method."),oh.forEach(t),MR=h(or),w(Ma.$$.fragment,or),zR=h(or),w(za.$$.fragment,or),or.forEach(t),Dt.forEach(t),Bg=h(s),Vn=r(s,"H2",{class:!0});var _b=i(Vn);qa=r(_b,"A",{id:!0,class:!0,href:!0});var jj=i(qa);Dm=r(jj,"SPAN",{});var Aj=i(Dm);w(Yd.$$.fragment,Aj),Aj.forEach(t),jj.forEach(t),qR=h(_b),Sm=r(_b,"SPAN",{});var Pj=i(Sm);CR=n(Pj,"FlaxRobertaForQuestionAnswering"),Pj.forEach(t),_b.forEach(t),Ug=h(s),dt=r(s,"DIV",{class:!0});var St=i(dt);w(Zd.$$.fragment,St),jR=h(St),Gn=r(St,"P",{});var nh=i(Gn);AR=n(nh,`Roberta 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 `),Wm=r(nh,"CODE",{});var Lj=i(Wm);PR=n(Lj,"span start logits"),Lj.forEach(t),LR=n(nh," and "),Bm=r(nh,"CODE",{});var Oj=i(Bm);OR=n(Oj,"span end logits"),Oj.forEach(t),NR=n(nh,")."),nh.forEach(t),IR=h(St),ec=r(St,"P",{});var bb=i(ec);DR=n(bb,"This model inherits from "),qp=r(bb,"A",{href:!0});var Nj=i(qp);SR=n(Nj,"FlaxPreTrainedModel"),Nj.forEach(t),WR=n(bb,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading, saving and converting weights from PyTorch models)`),bb.forEach(t),BR=h(St),tc=r(St,"P",{});var kb=i(tc);UR=n(kb,"This model is also a Flax Linen "),oc=r(kb,"A",{href:!0,rel:!0});var Ij=i(oc);HR=n(Ij,"flax.linen.Module"),Ij.forEach(t),QR=n(kb,`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),kb.forEach(t),KR=h(St),Um=r(St,"P",{});var Dj=i(Um);JR=n(Dj,"Finally, this model supports inherent JAX features such as:"),Dj.forEach(t),VR=h(St),yo=r(St,"UL",{});var nr=i(yo);Hm=r(nr,"LI",{});var Sj=i(Hm);nc=r(Sj,"A",{href:!0,rel:!0});var Wj=i(nc);GR=n(Wj,"Just-In-Time (JIT) compilation"),Wj.forEach(t),Sj.forEach(t),XR=h(nr),Qm=r(nr,"LI",{});var Bj=i(Qm);sc=r(Bj,"A",{href:!0,rel:!0});var Uj=i(sc);YR=n(Uj,"Automatic Differentiation"),Uj.forEach(t),Bj.forEach(t),ZR=h(nr),Km=r(nr,"LI",{});var Hj=i(Km);ac=r(Hj,"A",{href:!0,rel:!0});var Qj=i(ac);eM=n(Qj,"Vectorization"),Qj.forEach(t),Hj.forEach(t),tM=h(nr),Jm=r(nr,"LI",{});var Kj=i(Jm);rc=r(Kj,"A",{href:!0,rel:!0});var Jj=i(rc);oM=n(Jj,"Parallelization"),Jj.forEach(t),Kj.forEach(t),nr.forEach(t),nM=h(St),ao=r(St,"DIV",{class:!0});var sr=i(ao);w(ic.$$.fragment,sr),sM=h(sr),Xn=r(sr,"P",{});var sh=i(Xn);aM=n(sh,"The "),Vm=r(sh,"CODE",{});var Vj=i(Vm);rM=n(Vj,"FlaxRobertaPreTrainedModel"),Vj.forEach(t),iM=n(sh," forward method, overrides the "),Gm=r(sh,"CODE",{});var Gj=i(Gm);lM=n(Gj,"__call__"),Gj.forEach(t),dM=n(sh," special method."),sh.forEach(t),cM=h(sr),w(Ca.$$.fragment,sr),pM=h(sr),w(ja.$$.fragment,sr),sr.forEach(t),St.forEach(t),this.h()},h(){c(d,"name","hf:doc:metadata"),c(d,"content",JSON.stringify(iA)),c(f,"id","roberta"),c(f,"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"),c(f,"href","#roberta"),c(m,"class","relative group"),c(te,"id","overview"),c(te,"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"),c(te,"href","#overview"),c(N,"class","relative group"),c(le,"href","https://arxiv.org/abs/1907.11692"),c(le,"rel","nofollow"),c(j,"href","/docs/transformers/main/en/model_doc/bert#transformers.BertModel"),c(Ue,"href","camembert"),c(Se,"href","https://huggingface.co/julien-c"),c(Se,"rel","nofollow"),c(We,"href","https://github.com/pytorch/fairseq/tree/master/examples/roberta"),c(We,"rel","nofollow"),c(B,"id","resources"),c(B,"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"),c(B,"href","#resources"),c(Oe,"class","relative group"),c(rr,"href","https://huggingface.co/blog/sentiment-analysis-twitter"),c(rr,"rel","nofollow"),c(ir,"href","https://huggingface.co/inference-api"),c(ir,"rel","nofollow"),c(dr,"href","https://huggingface.co/blog/opinion-classification-with-kili"),c(dr,"rel","nofollow"),c(pr,"href","https://colab.research.google.com/github/DhavalTaunk08/NLP_scripts/blob/master/sentiment_analysis_using_roberta.ipynb"),c(pr,"rel","nofollow"),c($c,"href","/docs/transformers/main/en/model_doc/roberta#transformers.RobertaForSequenceClassification"),c(hr,"href","https://github.com/huggingface/transformers/tree/main/examples/pytorch/text-classification"),c(hr,"rel","nofollow"),c(ur,"href","https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/text_classification.ipynb"),c(ur,"rel","nofollow"),c(Fc,"href","/docs/transformers/main/en/model_doc/roberta#transformers.TFRobertaForSequenceClassification"),c(mr,"href","https://github.com/huggingface/transformers/tree/main/examples/tensorflow/text-classification"),c(mr,"rel","nofollow"),c(fr,"href","https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/text_classification-tf.ipynb"),c(fr,"rel","nofollow"),c(xc,"href","/docs/transformers/main/en/model_doc/roberta#transformers.FlaxRobertaForSequenceClassification"),c(gr,"href","https://github.com/huggingface/transformers/tree/main/examples/flax/text-classification"),c(gr,"rel","nofollow"),c(_r,"href","https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/text_classification_flax.ipynb"),c(_r,"rel","nofollow"),c(Ec,"href","/docs/transformers/main/en/model_doc/roberta#transformers.RobertaForTokenClassification"),c(kr,"href","https://github.com/huggingface/transformers/tree/main/examples/pytorch/token-classification"),c(kr,"rel","nofollow"),c(yr,"href","https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/token_classification.ipynb"),c(yr,"rel","nofollow"),c(Rc,"href","/docs/transformers/main/en/model_doc/roberta#transformers.TFRobertaForTokenClassification"),c(vr,"href","https://github.com/huggingface/transformers/tree/main/examples/tensorflow/token-classification"),c(vr,"rel","nofollow"),c(wr,"href","https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/token_classification-tf.ipynb"),c(wr,"rel","nofollow"),c(Mc,"href","/docs/transformers/main/en/model_doc/roberta#transformers.FlaxRobertaForTokenClassification"),c(Tr,"href","https://github.com/huggingface/transformers/tree/main/examples/flax/token-classification"),c(Tr,"rel","nofollow"),c($r,"href","https://huggingface.co/course/chapter7/2?fw=pt"),c($r,"rel","nofollow"),c(Er,"href","https://huggingface.co/blog/how-to-train"),c(Er,"rel","nofollow"),c(qc,"href","/docs/transformers/main/en/model_doc/roberta#transformers.RobertaForMaskedLM"),c(Rr,"href","https://github.com/huggingface/transformers/tree/main/examples/pytorch/language-modeling#robertabertdistilbert-and-masked-language-modeling"),c(Rr,"rel","nofollow"),c(Mr,"href","https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/language_modeling.ipynb"),c(Mr,"rel","nofollow"),c(Cc,"href","/docs/transformers/main/en/model_doc/roberta#transformers.TFRobertaForMaskedLM"),c(zr,"href","https://github.com/huggingface/transformers/tree/main/examples/tensorflow/language-modeling#run_mlmpy"),c(zr,"rel","nofollow"),c(qr,"href","https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/language_modeling-tf.ipynb"),c(qr,"rel","nofollow"),c(jc,"href","/docs/transformers/main/en/model_doc/roberta#transformers.FlaxRobertaForMaskedLM"),c(Cr,"href","https://github.com/huggingface/transformers/tree/main/examples/flax/language-modeling#masked-language-modeling"),c(Cr,"rel","nofollow"),c(jr,"href","https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/masked_language_modeling_flax.ipynb"),c(jr,"rel","nofollow"),c(Ar,"href","https://huggingface.co/course/chapter7/3?fw=pt"),c(Ar,"rel","nofollow"),c(Or,"href","https://huggingface.co/blog/optimum-inference"),c(Or,"rel","nofollow"),c(Pc,"href","/docs/transformers/main/en/model_doc/roberta#transformers.RobertaForQuestionAnswering"),c(Nr,"href","https://github.com/huggingface/transformers/tree/main/examples/pytorch/question-answering"),c(Nr,"rel","nofollow"),c(Ir,"href","https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/question_answering.ipynb"),c(Ir,"rel","nofollow"),c(Lc,"href","/docs/transformers/main/en/model_doc/roberta#transformers.TFRobertaForQuestionAnswering"),c(Dr,"href","https://github.com/huggingface/transformers/tree/main/examples/tensorflow/question-answering"),c(Dr,"rel","nofollow"),c(Sr,"href","https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/question_answering-tf.ipynb"),c(Sr,"rel","nofollow"),c(Oc,"href","/docs/transformers/main/en/model_doc/roberta#transformers.FlaxRobertaForQuestionAnswering"),c(Wr,"href","https://github.com/huggingface/transformers/tree/main/examples/flax/question-answering"),c(Wr,"rel","nofollow"),c(Br,"href","https://huggingface.co/course/chapter7/7?fw=pt"),c(Br,"rel","nofollow"),c(Dc,"href","/docs/transformers/main/en/model_doc/roberta#transformers.RobertaForMultipleChoice"),c(Ur,"href","https://github.com/huggingface/transformers/tree/main/examples/pytorch/multiple-choice"),c(Ur,"rel","nofollow"),c(Hr,"href","https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/multiple_choice.ipynb"),c(Hr,"rel","nofollow"),c(Sc,"href","/docs/transformers/main/en/model_doc/roberta#transformers.TFRobertaForMultipleChoice"),c(Qr,"href","https://github.com/huggingface/transformers/tree/main/examples/tensorflow/multiple-choice"),c(Qr,"rel","nofollow"),c(Kr,"href","https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/multiple_choice-tf.ipynb"),c(Kr,"rel","nofollow"),c(ns,"id","transformers.RobertaConfig"),c(ns,"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"),c(ns,"href","#transformers.RobertaConfig"),c(tn,"class","relative group"),c(Wc,"href","/docs/transformers/main/en/model_doc/roberta#transformers.RobertaModel"),c(Bc,"href","/docs/transformers/main/en/model_doc/roberta#transformers.TFRobertaModel"),c(Gr,"href","https://huggingface.co/roberta-base"),c(Gr,"rel","nofollow"),c(Uc,"href","/docs/transformers/main/en/main_classes/configuration#transformers.PretrainedConfig"),c(Hc,"href","/docs/transformers/main/en/main_classes/configuration#transformers.PretrainedConfig"),c(Wt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(as,"id","transformers.RobertaTokenizer"),c(as,"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"),c(as,"href","#transformers.RobertaTokenizer"),c(nn,"class","relative group"),c(Qc,"href","/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizer"),c(Lo,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(ls,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(ds,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(Vc,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(Ie,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(cs,"id","transformers.RobertaTokenizerFast"),c(cs,"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"),c(cs,"href","#transformers.RobertaTokenizerFast"),c(sn,"class","relative group"),c(Gc,"href","/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast"),c(Xc,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(tt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(us,"id","transformers.RobertaModel"),c(us,"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"),c(us,"href","#transformers.RobertaModel"),c(an,"class","relative group"),c(Yc,"href","/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel"),c(_i,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),c(_i,"rel","nofollow"),c(ki,"href","https://arxiv.org/abs/1706.03762"),c(ki,"rel","nofollow"),c(Zc,"href","/docs/transformers/main/en/model_doc/roberta#transformers.RobertaModel"),c(Ut,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(ot,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(_s,"id","transformers.RobertaForCausalLM"),c(_s,"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"),c(_s,"href","#transformers.RobertaForCausalLM"),c(ln,"class","relative group"),c(ep,"href","/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel"),c(xi,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),c(xi,"rel","nofollow"),c(tp,"href","/docs/transformers/main/en/model_doc/roberta#transformers.RobertaForCausalLM"),c(Ht,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(yt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(ys,"id","transformers.RobertaForMaskedLM"),c(ys,"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"),c(ys,"href","#transformers.RobertaForMaskedLM"),c(cn,"class","relative group"),c(op,"href","/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel"),c(ji,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),c(ji,"rel","nofollow"),c(np,"href","/docs/transformers/main/en/model_doc/roberta#transformers.RobertaForMaskedLM"),c(Qt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(vt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(Ts,"id","transformers.RobertaForSequenceClassification"),c(Ts,"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"),c(Ts,"href","#transformers.RobertaForSequenceClassification"),c(hn,"class","relative group"),c(sp,"href","/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel"),c(Ii,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),c(Ii,"rel","nofollow"),c(ap,"href","/docs/transformers/main/en/model_doc/roberta#transformers.RobertaForSequenceClassification"),c(Mt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(wt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(Es,"id","transformers.RobertaForMultipleChoice"),c(Es,"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"),c(Es,"href","#transformers.RobertaForMultipleChoice"),c(mn,"class","relative group"),c(rp,"href","/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel"),c(Hi,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),c(Hi,"rel","nofollow"),c(ip,"href","/docs/transformers/main/en/model_doc/roberta#transformers.RobertaForMultipleChoice"),c(Kt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(Tt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(zs,"id","transformers.RobertaForTokenClassification"),c(zs,"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"),c(zs,"href","#transformers.RobertaForTokenClassification"),c(gn,"class","relative group"),c(lp,"href","/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel"),c(Xi,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),c(Xi,"rel","nofollow"),c(dp,"href","/docs/transformers/main/en/model_doc/roberta#transformers.RobertaForTokenClassification"),c(Jt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c($t,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(js,"id","transformers.RobertaForQuestionAnswering"),c(js,"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"),c(js,"href","#transformers.RobertaForQuestionAnswering"),c(bn,"class","relative group"),c(cp,"href","/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel"),c(nl,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),c(nl,"rel","nofollow"),c(pp,"href","/docs/transformers/main/en/model_doc/roberta#transformers.RobertaForQuestionAnswering"),c(Vt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(Ft,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(Ls,"id","transformers.TFRobertaModel"),c(Ls,"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"),c(Ls,"href","#transformers.TFRobertaModel"),c(vn,"class","relative group"),c(hp,"href","/docs/transformers/main/en/main_classes/model#transformers.TFPreTrainedModel"),c(dl,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),c(dl,"rel","nofollow"),c(up,"href","/docs/transformers/main/en/model_doc/roberta#transformers.TFRobertaModel"),c(Gt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(pt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(Ds,"id","transformers.TFRobertaForCausalLM"),c(Ds,"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"),c(Ds,"href","#transformers.TFRobertaForCausalLM"),c(Tn,"class","relative group"),c(mp,"href","/docs/transformers/main/en/model_doc/roberta#transformers.TFRobertaForCausalLM"),c(Xt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c($n,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(Bs,"id","transformers.TFRobertaForMaskedLM"),c(Bs,"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"),c(Bs,"href","#transformers.TFRobertaForMaskedLM"),c(xn,"class","relative group"),c(fp,"href","/docs/transformers/main/en/main_classes/model#transformers.TFPreTrainedModel"),c(kl,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),c(kl,"rel","nofollow"),c(gp,"href","/docs/transformers/main/en/model_doc/roberta#transformers.TFRobertaForMaskedLM"),c(zt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(ht,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(Js,"id","transformers.TFRobertaForSequenceClassification"),c(Js,"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"),c(Js,"href","#transformers.TFRobertaForSequenceClassification"),c(Rn,"class","relative group"),c(_p,"href","/docs/transformers/main/en/main_classes/model#transformers.TFPreTrainedModel"),c(Fl,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),c(Fl,"rel","nofollow"),c(bp,"href","/docs/transformers/main/en/model_doc/roberta#transformers.TFRobertaForSequenceClassification"),c(qt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(ut,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(Zs,"id","transformers.TFRobertaForMultipleChoice"),c(Zs,"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"),c(Zs,"href","#transformers.TFRobertaForMultipleChoice"),c(zn,"class","relative group"),c(kp,"href","/docs/transformers/main/en/main_classes/model#transformers.TFPreTrainedModel"),c(ql,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),c(ql,"rel","nofollow"),c(yp,"href","/docs/transformers/main/en/model_doc/roberta#transformers.TFRobertaForMultipleChoice"),c(Yt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(mt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(na,"id","transformers.TFRobertaForTokenClassification"),c(na,"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"),c(na,"href","#transformers.TFRobertaForTokenClassification"),c(Cn,"class","relative group"),c(vp,"href","/docs/transformers/main/en/main_classes/model#transformers.TFPreTrainedModel"),c(Ol,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),c(Ol,"rel","nofollow"),c(wp,"href","/docs/transformers/main/en/model_doc/roberta#transformers.TFRobertaForTokenClassification"),c(Ct,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(ft,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(la,"id","transformers.TFRobertaForQuestionAnswering"),c(la,"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"),c(la,"href","#transformers.TFRobertaForQuestionAnswering"),c(An,"class","relative group"),c(Tp,"href","/docs/transformers/main/en/main_classes/model#transformers.TFPreTrainedModel"),c(Bl,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),c(Bl,"rel","nofollow"),c($p,"href","/docs/transformers/main/en/model_doc/roberta#transformers.TFRobertaForQuestionAnswering"),c(jt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(gt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(ua,"id","transformers.FlaxRobertaModel"),c(ua,"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"),c(ua,"href","#transformers.FlaxRobertaModel"),c(On,"class","relative group"),c(Fp,"href","/docs/transformers/main/en/main_classes/model#transformers.FlaxPreTrainedModel"),c(Vl,"href","https://flax.readthedocs.io/en/latest/flax.linen.html#module"),c(Vl,"rel","nofollow"),c(Gl,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),c(Gl,"rel","nofollow"),c(Xl,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),c(Xl,"rel","nofollow"),c(Yl,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),c(Yl,"rel","nofollow"),c(Zl,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),c(Zl,"rel","nofollow"),c(Zt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(nt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(ga,"id","transformers.FlaxRobertaForCausalLM"),c(ga,"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"),c(ga,"href","#transformers.FlaxRobertaForCausalLM"),c(In,"class","relative group"),c(xp,"href","/docs/transformers/main/en/main_classes/model#transformers.FlaxPreTrainedModel"),c(ad,"href","https://flax.readthedocs.io/en/latest/flax.linen.html#module"),c(ad,"rel","nofollow"),c(rd,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),c(rd,"rel","nofollow"),c(id,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),c(id,"rel","nofollow"),c(ld,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),c(ld,"rel","nofollow"),c(dd,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),c(dd,"rel","nofollow"),c(eo,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(st,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(ka,"id","transformers.FlaxRobertaForMaskedLM"),c(ka,"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"),c(ka,"href","#transformers.FlaxRobertaForMaskedLM"),c(Sn,"class","relative group"),c(Ep,"href","/docs/transformers/main/en/main_classes/model#transformers.FlaxPreTrainedModel"),c(gd,"href","https://flax.readthedocs.io/en/latest/flax.linen.html#module"),c(gd,"rel","nofollow"),c(_d,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),c(_d,"rel","nofollow"),c(bd,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),c(bd,"rel","nofollow"),c(kd,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),c(kd,"rel","nofollow"),c(yd,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),c(yd,"rel","nofollow"),c(to,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(at,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(wa,"id","transformers.FlaxRobertaForSequenceClassification"),c(wa,"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"),c(wa,"href","#transformers.FlaxRobertaForSequenceClassification"),c(Bn,"class","relative group"),c(Rp,"href","/docs/transformers/main/en/main_classes/model#transformers.FlaxPreTrainedModel"),c(xd,"href","https://flax.readthedocs.io/en/latest/flax.linen.html#module"),c(xd,"rel","nofollow"),c(Ed,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),c(Ed,"rel","nofollow"),c(Rd,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),c(Rd,"rel","nofollow"),c(Md,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),c(Md,"rel","nofollow"),c(zd,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),c(zd,"rel","nofollow"),c(oo,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(rt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(Fa,"id","transformers.FlaxRobertaForMultipleChoice"),c(Fa,"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"),c(Fa,"href","#transformers.FlaxRobertaForMultipleChoice"),c(Hn,"class","relative group"),c(Mp,"href","/docs/transformers/main/en/main_classes/model#transformers.FlaxPreTrainedModel"),c(Ld,"href","https://flax.readthedocs.io/en/latest/flax.linen.html#module"),c(Ld,"rel","nofollow"),c(Od,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),c(Od,"rel","nofollow"),c(Nd,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),c(Nd,"rel","nofollow"),c(Id,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),c(Id,"rel","nofollow"),c(Dd,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),c(Dd,"rel","nofollow"),c(no,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(it,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(Ra,"id","transformers.FlaxRobertaForTokenClassification"),c(Ra,"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"),c(Ra,"href","#transformers.FlaxRobertaForTokenClassification"),c(Kn,"class","relative group"),c(zp,"href","/docs/transformers/main/en/main_classes/model#transformers.FlaxPreTrainedModel"),c(Qd,"href","https://flax.readthedocs.io/en/latest/flax.linen.html#module"),c(Qd,"rel","nofollow"),c(Kd,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),c(Kd,"rel","nofollow"),c(Jd,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),c(Jd,"rel","nofollow"),c(Vd,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),c(Vd,"rel","nofollow"),c(Gd,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),c(Gd,"rel","nofollow"),c(so,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(lt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(qa,"id","transformers.FlaxRobertaForQuestionAnswering"),c(qa,"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"),c(qa,"href","#transformers.FlaxRobertaForQuestionAnswering"),c(Vn,"class","relative group"),c(qp,"href","/docs/transformers/main/en/main_classes/model#transformers.FlaxPreTrainedModel"),c(oc,"href","https://flax.readthedocs.io/en/latest/flax.linen.html#module"),c(oc,"rel","nofollow"),c(nc,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),c(nc,"rel","nofollow"),c(sc,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),c(sc,"rel","nofollow"),c(ac,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),c(ac,"rel","nofollow"),c(rc,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),c(rc,"rel","nofollow"),c(ao,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(dt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(s,_){e(document.head,d),g(s,k,_),g(s,m,_),e(m,f),e(f,b),T(l,b,null),e(m,u),e(m,R),e(R,ae),g(s,Z,_),g(s,N,_),e(N,te),e(te,oe),T(M,oe,null),e(N,we),e(N,K),e(K,Te),g(s,ge,_),g(s,W,_),e(W,$e),e(W,le),e(le,J),e(W,Fe),g(s,_e,_),g(s,U,_),e(U,xe),g(s,be,_),g(s,H,_),e(H,Ee),g(s,ke,_),g(s,ee,_),e(ee,C),e(C,A),g(s,ye,_),g(s,Q,_),e(Q,Re),g(s,ve,_),g(s,I,_),e(I,de),e(de,Me),e(de,j),e(j,ze),e(de,V),e(I,qe),e(I,ce),e(ce,G),e(I,Ce),e(I,ne),e(ne,D),e(ne,pe),e(pe,X),e(ne,je),e(ne,se),e(se,P),e(ne,Ae),e(ne,L),e(L,Pe),e(ne,Le),e(I,y),e(I,z),e(z,Ue),e(Ue,re),e(z,Xe),g(s,Ke,_),g(s,q,_),e(q,Ye),e(q,Se),e(Se,Ze),e(q,et),e(q,We),e(We,S),e(q,Y),g(s,Je,_),g(s,Oe,_),e(Oe,B),e(B,He),T(Be,He,null),e(Oe,Ne),e(Oe,Qe),e(Qe,ie),g(s,Ve,_),g(s,Tc,_),e(Tc,vb),g(s,Sf,_),T(ar,s,_),g(s,Wf,_),g(s,_t,_),e(_t,en),e(en,wb),e(en,rr),e(rr,Tb),e(en,$b),e(en,ir),e(ir,Fb),e(en,xb),e(_t,Eb),e(_t,lr),e(lr,Rb),e(lr,dr),e(dr,Mb),e(lr,zb),e(_t,qb),e(_t,cr),e(cr,Cb),e(cr,pr),e(pr,jb),e(cr,Ab),e(_t,Pb),e(_t,$o),e($o,$c),e($c,Lb),e($o,Ob),e($o,hr),e(hr,Nb),e($o,Ib),e($o,ur),e(ur,Db),e($o,Sb),e(_t,Wb),e(_t,Fo),e(Fo,Fc),e(Fc,Bb),e(Fo,Ub),e(Fo,mr),e(mr,Hb),e(Fo,Qb),e(Fo,fr),e(fr,Kb),e(Fo,Jb),e(_t,Vb),e(_t,xo),e(xo,xc),e(xc,Gb),e(xo,Xb),e(xo,gr),e(gr,Yb),e(xo,Zb),e(xo,_r),e(_r,ek),e(xo,tk),g(s,Bf,_),T(br,s,_),g(s,Uf,_),g(s,Bt,_),e(Bt,Eo),e(Eo,Ec),e(Ec,ok),e(Eo,nk),e(Eo,kr),e(kr,sk),e(Eo,ak),e(Eo,yr),e(yr,rk),e(Eo,ik),e(Bt,lk),e(Bt,Ro),e(Ro,Rc),e(Rc,dk),e(Ro,ck),e(Ro,vr),e(vr,pk),e(Ro,hk),e(Ro,wr),e(wr,uk),e(Ro,mk),e(Bt,fk),e(Bt,es),e(es,Mc),e(Mc,gk),e(es,_k),e(es,Tr),e(Tr,bk),e(es,kk),e(Bt,yk),e(Bt,zc),e(zc,$r),e($r,vk),e(zc,wk),g(s,Hf,_),T(Fr,s,_),g(s,Qf,_),g(s,Et,_),e(Et,xr),e(xr,Tk),e(xr,Er),e(Er,$k),e(xr,Fk),e(Et,xk),e(Et,Mo),e(Mo,qc),e(qc,Ek),e(Mo,Rk),e(Mo,Rr),e(Rr,Mk),e(Mo,zk),e(Mo,Mr),e(Mr,qk),e(Mo,Ck),e(Et,jk),e(Et,zo),e(zo,Cc),e(Cc,Ak),e(zo,Pk),e(zo,zr),e(zr,Lk),e(zo,Ok),e(zo,qr),e(qr,Nk),e(zo,Ik),e(Et,Dk),e(Et,qo),e(qo,jc),e(jc,Sk),e(qo,Wk),e(qo,Cr),e(Cr,Bk),e(qo,Uk),e(qo,jr),e(jr,Hk),e(qo,Qk),e(Et,Kk),e(Et,Ac),e(Ac,Ar),e(Ar,Jk),e(Ac,Vk),g(s,Kf,_),T(Pr,s,_),g(s,Jf,_),g(s,Rt,_),e(Rt,Lr),e(Lr,Gk),e(Lr,Or),e(Or,Xk),e(Lr,Yk),e(Rt,Zk),e(Rt,Co),e(Co,Pc),e(Pc,ey),e(Co,ty),e(Co,Nr),e(Nr,oy),e(Co,ny),e(Co,Ir),e(Ir,sy),e(Co,ay),e(Rt,ry),e(Rt,jo),e(jo,Lc),e(Lc,iy),e(jo,ly),e(jo,Dr),e(Dr,dy),e(jo,cy),e(jo,Sr),e(Sr,py),e(jo,hy),e(Rt,uy),e(Rt,ts),e(ts,Oc),e(Oc,my),e(ts,fy),e(ts,Wr),e(Wr,gy),e(ts,_y),e(Rt,by),e(Rt,Nc),e(Nc,Br),e(Br,ky),e(Nc,yy),g(s,Vf,_),g(s,Ic,_),e(Ic,ah),e(ah,vy),g(s,Gf,_),g(s,os,_),e(os,Ao),e(Ao,Dc),e(Dc,wy),e(Ao,Ty),e(Ao,Ur),e(Ur,$y),e(Ao,Fy),e(Ao,Hr),e(Hr,xy),e(Ao,Ey),e(os,Ry),e(os,Po),e(Po,Sc),e(Sc,My),e(Po,zy),e(Po,Qr),e(Qr,qy),e(Po,Cy),e(Po,Kr),e(Kr,jy),e(Po,Ay),g(s,Xf,_),g(s,tn,_),e(tn,ns),e(ns,rh),T(Jr,rh,null),e(tn,Py),e(tn,ih),e(ih,Ly),g(s,Yf,_),g(s,Wt,_),T(Vr,Wt,null),e(Wt,Oy),e(Wt,uo),e(uo,Ny),e(uo,Wc),e(Wc,Iy),e(uo,Dy),e(uo,Bc),e(Bc,Sy),e(uo,Wy),e(uo,Gr),e(Gr,By),e(uo,Uy),e(Wt,Hy),e(Wt,on),e(on,Qy),e(on,Uc),e(Uc,Ky),e(on,Jy),e(on,Hc),e(Hc,Vy),e(on,Gy),e(Wt,Xy),T(ss,Wt,null),g(s,Zf,_),g(s,nn,_),e(nn,as),e(as,lh),T(Xr,lh,null),e(nn,Yy),e(nn,dh),e(dh,Zy),g(s,eg,_),g(s,Ie,_),T(Yr,Ie,null),e(Ie,ev),e(Ie,ch),e(ch,tv),e(Ie,ov),e(Ie,ph),e(ph,nv),e(Ie,sv),T(rs,Ie,null),e(Ie,av),e(Ie,Zr),e(Zr,rv),e(Zr,hh),e(hh,iv),e(Zr,lv),e(Ie,dv),T(is,Ie,null),e(Ie,cv),e(Ie,ei),e(ei,pv),e(ei,Qc),e(Qc,hv),e(ei,uv),e(Ie,mv),e(Ie,Lo),T(ti,Lo,null),e(Lo,fv),e(Lo,uh),e(uh,gv),e(Lo,_v),e(Lo,oi),e(oi,Kc),e(Kc,bv),e(Kc,mh),e(mh,kv),e(oi,yv),e(oi,Jc),e(Jc,vv),e(Jc,fh),e(fh,wv),e(Ie,Tv),e(Ie,ls),T(ni,ls,null),e(ls,$v),e(ls,si),e(si,Fv),e(si,gh),e(gh,xv),e(si,Ev),e(Ie,Rv),e(Ie,ds),T(ai,ds,null),e(ds,Mv),e(ds,_h),e(_h,zv),e(Ie,qv),e(Ie,Vc),T(ri,Vc,null),g(s,tg,_),g(s,sn,_),e(sn,cs),e(cs,bh),T(ii,bh,null),e(sn,Cv),e(sn,kh),e(kh,jv),g(s,og,_),g(s,tt,_),T(li,tt,null),e(tt,Av),e(tt,di),e(di,Pv),e(di,yh),e(yh,Lv),e(di,Ov),e(tt,Nv),e(tt,vh),e(vh,Iv),e(tt,Dv),T(ps,tt,null),e(tt,Sv),e(tt,ci),e(ci,Wv),e(ci,wh),e(wh,Bv),e(ci,Uv),e(tt,Hv),T(hs,tt,null),e(tt,Qv),e(tt,pi),e(pi,Kv),e(pi,Gc),e(Gc,Jv),e(pi,Vv),e(tt,Gv),e(tt,Xc),T(hi,Xc,null),g(s,ng,_),g(s,an,_),e(an,us),e(us,Th),T(ui,Th,null),e(an,Xv),e(an,$h),e($h,Yv),g(s,sg,_),g(s,ot,_),T(mi,ot,null),e(ot,Zv),e(ot,Fh),e(Fh,ew),e(ot,tw),e(ot,fi),e(fi,ow),e(fi,Yc),e(Yc,nw),e(fi,sw),e(ot,aw),e(ot,gi),e(gi,rw),e(gi,_i),e(_i,iw),e(gi,lw),e(ot,dw),e(ot,bi),e(bi,cw),e(bi,xh),e(xh,pw),e(bi,hw),e(ot,uw),e(ot,ct),e(ct,mw),e(ct,Eh),e(Eh,fw),e(ct,gw),e(ct,Rh),e(Rh,_w),e(ct,bw),e(ct,Mh),e(Mh,kw),e(ct,yw),e(ct,zh),e(zh,vw),e(ct,ww),e(ct,qh),e(qh,Tw),e(ct,$w),e(ct,Ch),e(Ch,Fw),e(ct,xw),e(ot,Ew),e(ot,ms),e(ms,Rw),e(ms,jh),e(jh,Mw),e(ms,zw),e(ms,ki),e(ki,qw),e(ot,Cw),e(ot,Ut),T(yi,Ut,null),e(Ut,jw),e(Ut,rn),e(rn,Aw),e(rn,Zc),e(Zc,Pw),e(rn,Lw),e(rn,Ah),e(Ah,Ow),e(rn,Nw),e(Ut,Iw),T(fs,Ut,null),e(Ut,Dw),T(gs,Ut,null),g(s,ag,_),g(s,ln,_),e(ln,_s),e(_s,Ph),T(vi,Ph,null),e(ln,Sw),e(ln,Lh),e(Lh,Ww),g(s,rg,_),g(s,yt,_),T(wi,yt,null),e(yt,Bw),e(yt,Ti),e(Ti,Uw),e(Ti,Oh),e(Oh,Hw),e(Ti,Qw),e(yt,Kw),e(yt,$i),e($i,Jw),e($i,ep),e(ep,Vw),e($i,Gw),e(yt,Xw),e(yt,Fi),e(Fi,Yw),e(Fi,xi),e(xi,Zw),e(Fi,eT),e(yt,tT),e(yt,Ht),T(Ei,Ht,null),e(Ht,oT),e(Ht,dn),e(dn,nT),e(dn,tp),e(tp,sT),e(dn,aT),e(dn,Nh),e(Nh,rT),e(dn,iT),e(Ht,lT),T(bs,Ht,null),e(Ht,dT),T(ks,Ht,null),g(s,ig,_),g(s,cn,_),e(cn,ys),e(ys,Ih),T(Ri,Ih,null),e(cn,cT),e(cn,Dh),e(Dh,pT),g(s,lg,_),g(s,vt,_),T(Mi,vt,null),e(vt,hT),e(vt,zi),e(zi,uT),e(zi,Sh),e(Sh,mT),e(zi,fT),e(vt,gT),e(vt,qi),e(qi,_T),e(qi,op),e(op,bT),e(qi,kT),e(vt,yT),e(vt,Ci),e(Ci,vT),e(Ci,ji),e(ji,wT),e(Ci,TT),e(vt,$T),e(vt,Qt),T(Ai,Qt,null),e(Qt,FT),e(Qt,pn),e(pn,xT),e(pn,np),e(np,ET),e(pn,RT),e(pn,Wh),e(Wh,MT),e(pn,zT),e(Qt,qT),T(vs,Qt,null),e(Qt,CT),T(ws,Qt,null),g(s,dg,_),g(s,hn,_),e(hn,Ts),e(Ts,Bh),T(Pi,Bh,null),e(hn,jT),e(hn,Uh),e(Uh,AT),g(s,cg,_),g(s,wt,_),T(Li,wt,null),e(wt,PT),e(wt,Hh),e(Hh,LT),e(wt,OT),e(wt,Oi),e(Oi,NT),e(Oi,sp),e(sp,IT),e(Oi,DT),e(wt,ST),e(wt,Ni),e(Ni,WT),e(Ni,Ii),e(Ii,BT),e(Ni,UT),e(wt,HT),e(wt,Mt),T(Di,Mt,null),e(Mt,QT),e(Mt,un),e(un,KT),e(un,ap),e(ap,JT),e(un,VT),e(un,Qh),e(Qh,GT),e(un,XT),e(Mt,YT),T($s,Mt,null),e(Mt,ZT),T(Fs,Mt,null),e(Mt,e1),T(xs,Mt,null),g(s,pg,_),g(s,mn,_),e(mn,Es),e(Es,Kh),T(Si,Kh,null),e(mn,t1),e(mn,Jh),e(Jh,o1),g(s,hg,_),g(s,Tt,_),T(Wi,Tt,null),e(Tt,n1),e(Tt,Vh),e(Vh,s1),e(Tt,a1),e(Tt,Bi),e(Bi,r1),e(Bi,rp),e(rp,i1),e(Bi,l1),e(Tt,d1),e(Tt,Ui),e(Ui,c1),e(Ui,Hi),e(Hi,p1),e(Ui,h1),e(Tt,u1),e(Tt,Kt),T(Qi,Kt,null),e(Kt,m1),e(Kt,fn),e(fn,f1),e(fn,ip),e(ip,g1),e(fn,_1),e(fn,Gh),e(Gh,b1),e(fn,k1),e(Kt,y1),T(Rs,Kt,null),e(Kt,v1),T(Ms,Kt,null),g(s,ug,_),g(s,gn,_),e(gn,zs),e(zs,Xh),T(Ki,Xh,null),e(gn,w1),e(gn,Yh),e(Yh,T1),g(s,mg,_),g(s,$t,_),T(Ji,$t,null),e($t,$1),e($t,Zh),e(Zh,F1),e($t,x1),e($t,Vi),e(Vi,E1),e(Vi,lp),e(lp,R1),e(Vi,M1),e($t,z1),e($t,Gi),e(Gi,q1),e(Gi,Xi),e(Xi,C1),e(Gi,j1),e($t,A1),e($t,Jt),T(Yi,Jt,null),e(Jt,P1),e(Jt,_n),e(_n,L1),e(_n,dp),e(dp,O1),e(_n,N1),e(_n,eu),e(eu,I1),e(_n,D1),e(Jt,S1),T(qs,Jt,null),e(Jt,W1),T(Cs,Jt,null),g(s,fg,_),g(s,bn,_),e(bn,js),e(js,tu),T(Zi,tu,null),e(bn,B1),e(bn,ou),e(ou,U1),g(s,gg,_),g(s,Ft,_),T(el,Ft,null),e(Ft,H1),e(Ft,kn),e(kn,Q1),e(kn,nu),e(nu,K1),e(kn,J1),e(kn,su),e(su,V1),e(kn,G1),e(Ft,X1),e(Ft,tl),e(tl,Y1),e(tl,cp),e(cp,Z1),e(tl,e$),e(Ft,t$),e(Ft,ol),e(ol,o$),e(ol,nl),e(nl,n$),e(ol,s$),e(Ft,a$),e(Ft,Vt),T(sl,Vt,null),e(Vt,r$),e(Vt,yn),e(yn,i$),e(yn,pp),e(pp,l$),e(yn,d$),e(yn,au),e(au,c$),e(yn,p$),e(Vt,h$),T(As,Vt,null),e(Vt,u$),T(Ps,Vt,null),g(s,_g,_),g(s,vn,_),e(vn,Ls),e(Ls,ru),T(al,ru,null),e(vn,m$),e(vn,iu),e(iu,f$),g(s,bg,_),g(s,pt,_),T(rl,pt,null),e(pt,g$),e(pt,lu),e(lu,_$),e(pt,b$),e(pt,il),e(il,k$),e(il,hp),e(hp,y$),e(il,v$),e(pt,w$),e(pt,ll),e(ll,T$),e(ll,dl),e(dl,$$),e(ll,F$),e(pt,x$),T(Os,pt,null),e(pt,E$),e(pt,Gt),T(cl,Gt,null),e(Gt,R$),e(Gt,wn),e(wn,M$),e(wn,up),e(up,z$),e(wn,q$),e(wn,du),e(du,C$),e(wn,j$),e(Gt,A$),T(Ns,Gt,null),e(Gt,P$),T(Is,Gt,null),g(s,kg,_),g(s,Tn,_),e(Tn,Ds),e(Ds,cu),T(pl,cu,null),e(Tn,L$),e(Tn,pu),e(pu,O$),g(s,yg,_),g(s,$n,_),T(hl,$n,null),e($n,N$),e($n,Xt),T(ul,Xt,null),e(Xt,I$),e(Xt,Fn),e(Fn,D$),e(Fn,mp),e(mp,S$),e(Fn,W$),e(Fn,hu),e(hu,B$),e(Fn,U$),e(Xt,H$),T(Ss,Xt,null),e(Xt,Q$),T(Ws,Xt,null),g(s,vg,_),g(s,xn,_),e(xn,Bs),e(Bs,uu),T(ml,uu,null),e(xn,K$),e(xn,mu),e(mu,J$),g(s,wg,_),g(s,ht,_),T(fl,ht,null),e(ht,V$),e(ht,gl),e(gl,G$),e(gl,fu),e(fu,X$),e(gl,Y$),e(ht,Z$),e(ht,_l),e(_l,e2),e(_l,fp),e(fp,t2),e(_l,o2),e(ht,n2),e(ht,bl),e(bl,s2),e(bl,kl),e(kl,a2),e(bl,r2),e(ht,i2),T(Us,ht,null),e(ht,l2),e(ht,zt),T(yl,zt,null),e(zt,d2),e(zt,En),e(En,c2),e(En,gp),e(gp,p2),e(En,h2),e(En,gu),e(gu,u2),e(En,m2),e(zt,f2),T(Hs,zt,null),e(zt,g2),T(Qs,zt,null),e(zt,_2),T(Ks,zt,null),g(s,Tg,_),g(s,Rn,_),e(Rn,Js),e(Js,_u),T(vl,_u,null),e(Rn,b2),e(Rn,bu),e(bu,k2),g(s,$g,_),g(s,ut,_),T(wl,ut,null),e(ut,y2),e(ut,ku),e(ku,v2),e(ut,w2),e(ut,Tl),e(Tl,T2),e(Tl,_p),e(_p,$2),e(Tl,F2),e(ut,x2),e(ut,$l),e($l,E2),e($l,Fl),e(Fl,R2),e($l,M2),e(ut,z2),T(Vs,ut,null),e(ut,q2),e(ut,qt),T(xl,qt,null),e(qt,C2),e(qt,Mn),e(Mn,j2),e(Mn,bp),e(bp,A2),e(Mn,P2),e(Mn,yu),e(yu,L2),e(Mn,O2),e(qt,N2),T(Gs,qt,null),e(qt,I2),T(Xs,qt,null),e(qt,D2),T(Ys,qt,null),g(s,Fg,_),g(s,zn,_),e(zn,Zs),e(Zs,vu),T(El,vu,null),e(zn,S2),e(zn,wu),e(wu,W2),g(s,xg,_),g(s,mt,_),T(Rl,mt,null),e(mt,B2),e(mt,Tu),e(Tu,U2),e(mt,H2),e(mt,Ml),e(Ml,Q2),e(Ml,kp),e(kp,K2),e(Ml,J2),e(mt,V2),e(mt,zl),e(zl,G2),e(zl,ql),e(ql,X2),e(zl,Y2),e(mt,Z2),T(ea,mt,null),e(mt,eF),e(mt,Yt),T(Cl,Yt,null),e(Yt,tF),e(Yt,qn),e(qn,oF),e(qn,yp),e(yp,nF),e(qn,sF),e(qn,$u),e($u,aF),e(qn,rF),e(Yt,iF),T(ta,Yt,null),e(Yt,lF),T(oa,Yt,null),g(s,Eg,_),g(s,Cn,_),e(Cn,na),e(na,Fu),T(jl,Fu,null),e(Cn,dF),e(Cn,xu),e(xu,cF),g(s,Rg,_),g(s,ft,_),T(Al,ft,null),e(ft,pF),e(ft,Eu),e(Eu,hF),e(ft,uF),e(ft,Pl),e(Pl,mF),e(Pl,vp),e(vp,fF),e(Pl,gF),e(ft,_F),e(ft,Ll),e(Ll,bF),e(Ll,Ol),e(Ol,kF),e(Ll,yF),e(ft,vF),T(sa,ft,null),e(ft,wF),e(ft,Ct),T(Nl,Ct,null),e(Ct,TF),e(Ct,jn),e(jn,$F),e(jn,wp),e(wp,FF),e(jn,xF),e(jn,Ru),e(Ru,EF),e(jn,RF),e(Ct,MF),T(aa,Ct,null),e(Ct,zF),T(ra,Ct,null),e(Ct,qF),T(ia,Ct,null),g(s,Mg,_),g(s,An,_),e(An,la),e(la,Mu),T(Il,Mu,null),e(An,CF),e(An,zu),e(zu,jF),g(s,zg,_),g(s,gt,_),T(Dl,gt,null),e(gt,AF),e(gt,Pn),e(Pn,PF),e(Pn,qu),e(qu,LF),e(Pn,OF),e(Pn,Cu),e(Cu,NF),e(Pn,IF),e(gt,DF),e(gt,Sl),e(Sl,SF),e(Sl,Tp),e(Tp,WF),e(Sl,BF),e(gt,UF),e(gt,Wl),e(Wl,HF),e(Wl,Bl),e(Bl,QF),e(Wl,KF),e(gt,JF),T(da,gt,null),e(gt,VF),e(gt,jt),T(Ul,jt,null),e(jt,GF),e(jt,Ln),e(Ln,XF),e(Ln,$p),e($p,YF),e(Ln,ZF),e(Ln,ju),e(ju,e0),e(Ln,t0),e(jt,o0),T(ca,jt,null),e(jt,n0),T(pa,jt,null),e(jt,s0),T(ha,jt,null),g(s,qg,_),g(s,On,_),e(On,ua),e(ua,Au),T(Hl,Au,null),e(On,a0),e(On,Pu),e(Pu,r0),g(s,Cg,_),g(s,nt,_),T(Ql,nt,null),e(nt,i0),e(nt,Lu),e(Lu,l0),e(nt,d0),e(nt,Kl),e(Kl,c0),e(Kl,Fp),e(Fp,p0),e(Kl,h0),e(nt,u0),e(nt,Jl),e(Jl,m0),e(Jl,Vl),e(Vl,f0),e(Jl,g0),e(nt,_0),e(nt,Ou),e(Ou,b0),e(nt,k0),e(nt,mo),e(mo,Nu),e(Nu,Gl),e(Gl,y0),e(mo,v0),e(mo,Iu),e(Iu,Xl),e(Xl,w0),e(mo,T0),e(mo,Du),e(Du,Yl),e(Yl,$0),e(mo,F0),e(mo,Su),e(Su,Zl),e(Zl,x0),e(nt,E0),e(nt,Zt),T(ed,Zt,null),e(Zt,R0),e(Zt,Nn),e(Nn,M0),e(Nn,Wu),e(Wu,z0),e(Nn,q0),e(Nn,Bu),e(Bu,C0),e(Nn,j0),e(Zt,A0),T(ma,Zt,null),e(Zt,P0),T(fa,Zt,null),g(s,jg,_),g(s,In,_),e(In,ga),e(ga,Uu),T(td,Uu,null),e(In,L0),e(In,Hu),e(Hu,O0),g(s,Ag,_),g(s,st,_),T(od,st,null),e(st,N0),e(st,Qu),e(Qu,I0),e(st,D0),e(st,nd),e(nd,S0),e(nd,xp),e(xp,W0),e(nd,B0),e(st,U0),e(st,sd),e(sd,H0),e(sd,ad),e(ad,Q0),e(sd,K0),e(st,J0),e(st,Ku),e(Ku,V0),e(st,G0),e(st,fo),e(fo,Ju),e(Ju,rd),e(rd,X0),e(fo,Y0),e(fo,Vu),e(Vu,id),e(id,Z0),e(fo,ex),e(fo,Gu),e(Gu,ld),e(ld,tx),e(fo,ox),e(fo,Xu),e(Xu,dd),e(dd,nx),e(st,sx),e(st,eo),T(cd,eo,null),e(eo,ax),e(eo,Dn),e(Dn,rx),e(Dn,Yu),e(Yu,ix),e(Dn,lx),e(Dn,Zu),e(Zu,dx),e(Dn,cx),e(eo,px),T(_a,eo,null),e(eo,hx),T(ba,eo,null),g(s,Pg,_),g(s,Sn,_),e(Sn,ka),e(ka,em),T(pd,em,null),e(Sn,ux),e(Sn,tm),e(tm,mx),g(s,Lg,_),g(s,at,_),T(hd,at,null),e(at,fx),e(at,ud),e(ud,gx),e(ud,om),e(om,_x),e(ud,bx),e(at,kx),e(at,md),e(md,yx),e(md,Ep),e(Ep,vx),e(md,wx),e(at,Tx),e(at,fd),e(fd,$x),e(fd,gd),e(gd,Fx),e(fd,xx),e(at,Ex),e(at,nm),e(nm,Rx),e(at,Mx),e(at,go),e(go,sm),e(sm,_d),e(_d,zx),e(go,qx),e(go,am),e(am,bd),e(bd,Cx),e(go,jx),e(go,rm),e(rm,kd),e(kd,Ax),e(go,Px),e(go,im),e(im,yd),e(yd,Lx),e(at,Ox),e(at,to),T(vd,to,null),e(to,Nx),e(to,Wn),e(Wn,Ix),e(Wn,lm),e(lm,Dx),e(Wn,Sx),e(Wn,dm),e(dm,Wx),e(Wn,Bx),e(to,Ux),T(ya,to,null),e(to,Hx),T(va,to,null),g(s,Og,_),g(s,Bn,_),e(Bn,wa),e(wa,cm),T(wd,cm,null),e(Bn,Qx),e(Bn,pm),e(pm,Kx),g(s,Ng,_),g(s,rt,_),T(Td,rt,null),e(rt,Jx),e(rt,hm),e(hm,Vx),e(rt,Gx),e(rt,$d),e($d,Xx),e($d,Rp),e(Rp,Yx),e($d,Zx),e(rt,eE),e(rt,Fd),e(Fd,tE),e(Fd,xd),e(xd,oE),e(Fd,nE),e(rt,sE),e(rt,um),e(um,aE),e(rt,rE),e(rt,_o),e(_o,mm),e(mm,Ed),e(Ed,iE),e(_o,lE),e(_o,fm),e(fm,Rd),e(Rd,dE),e(_o,cE),e(_o,gm),e(gm,Md),e(Md,pE),e(_o,hE),e(_o,_m),e(_m,zd),e(zd,uE),e(rt,mE),e(rt,oo),T(qd,oo,null),e(oo,fE),e(oo,Un),e(Un,gE),e(Un,bm),e(bm,_E),e(Un,bE),e(Un,km),e(km,kE),e(Un,yE),e(oo,vE),T(Ta,oo,null),e(oo,wE),T($a,oo,null),g(s,Ig,_),g(s,Hn,_),e(Hn,Fa),e(Fa,ym),T(Cd,ym,null),e(Hn,TE),e(Hn,vm),e(vm,$E),g(s,Dg,_),g(s,it,_),T(jd,it,null),e(it,FE),e(it,wm),e(wm,xE),e(it,EE),e(it,Ad),e(Ad,RE),e(Ad,Mp),e(Mp,ME),e(Ad,zE),e(it,qE),e(it,Pd),e(Pd,CE),e(Pd,Ld),e(Ld,jE),e(Pd,AE),e(it,PE),e(it,Tm),e(Tm,LE),e(it,OE),e(it,bo),e(bo,$m),e($m,Od),e(Od,NE),e(bo,IE),e(bo,Fm),e(Fm,Nd),e(Nd,DE),e(bo,SE),e(bo,xm),e(xm,Id),e(Id,WE),e(bo,BE),e(bo,Em),e(Em,Dd),e(Dd,UE),e(it,HE),e(it,no),T(Sd,no,null),e(no,QE),e(no,Qn),e(Qn,KE),e(Qn,Rm),e(Rm,JE),e(Qn,VE),e(Qn,Mm),e(Mm,GE),e(Qn,XE),e(no,YE),T(xa,no,null),e(no,ZE),T(Ea,no,null),g(s,Sg,_),g(s,Kn,_),e(Kn,Ra),e(Ra,zm),T(Wd,zm,null),e(Kn,eR),e(Kn,qm),e(qm,tR),g(s,Wg,_),g(s,lt,_),T(Bd,lt,null),e(lt,oR),e(lt,Cm),e(Cm,nR),e(lt,sR),e(lt,Ud),e(Ud,aR),e(Ud,zp),e(zp,rR),e(Ud,iR),e(lt,lR),e(lt,Hd),e(Hd,dR),e(Hd,Qd),e(Qd,cR),e(Hd,pR),e(lt,hR),e(lt,jm),e(jm,uR),e(lt,mR),e(lt,ko),e(ko,Am),e(Am,Kd),e(Kd,fR),e(ko,gR),e(ko,Pm),e(Pm,Jd),e(Jd,_R),e(ko,bR),e(ko,Lm),e(Lm,Vd),e(Vd,kR),e(ko,yR),e(ko,Om),e(Om,Gd),e(Gd,vR),e(lt,wR),e(lt,so),T(Xd,so,null),e(so,TR),e(so,Jn),e(Jn,$R),e(Jn,Nm),e(Nm,FR),e(Jn,xR),e(Jn,Im),e(Im,ER),e(Jn,RR),e(so,MR),T(Ma,so,null),e(so,zR),T(za,so,null),g(s,Bg,_),g(s,Vn,_),e(Vn,qa),e(qa,Dm),T(Yd,Dm,null),e(Vn,qR),e(Vn,Sm),e(Sm,CR),g(s,Ug,_),g(s,dt,_),T(Zd,dt,null),e(dt,jR),e(dt,Gn),e(Gn,AR),e(Gn,Wm),e(Wm,PR),e(Gn,LR),e(Gn,Bm),e(Bm,OR),e(Gn,NR),e(dt,IR),e(dt,ec),e(ec,DR),e(ec,qp),e(qp,SR),e(ec,WR),e(dt,BR),e(dt,tc),e(tc,UR),e(tc,oc),e(oc,HR),e(tc,QR),e(dt,KR),e(dt,Um),e(Um,JR),e(dt,VR),e(dt,yo),e(yo,Hm),e(Hm,nc),e(nc,GR),e(yo,XR),e(yo,Qm),e(Qm,sc),e(sc,YR),e(yo,ZR),e(yo,Km),e(Km,ac),e(ac,eM),e(yo,tM),e(yo,Jm),e(Jm,rc),e(rc,oM),e(dt,nM),e(dt,ao),T(ic,ao,null),e(ao,sM),e(ao,Xn),e(Xn,aM),e(Xn,Vm),e(Vm,rM),e(Xn,iM),e(Xn,Gm),e(Gm,lM),e(Xn,dM),e(ao,cM),T(Ca,ao,null),e(ao,pM),T(ja,ao,null),Hg=!0},p(s,[_]){const lc={};_&2&&(lc.$$scope={dirty:_,ctx:s}),ss.$set(lc);const Xm={};_&2&&(Xm.$$scope={dirty:_,ctx:s}),rs.$set(Xm);const Ym={};_&2&&(Ym.$$scope={dirty:_,ctx:s}),is.$set(Ym);const Zm={};_&2&&(Zm.$$scope={dirty:_,ctx:s}),ps.$set(Zm);const dc={};_&2&&(dc.$$scope={dirty:_,ctx:s}),hs.$set(dc);const ef={};_&2&&(ef.$$scope={dirty:_,ctx:s}),fs.$set(ef);const tf={};_&2&&(tf.$$scope={dirty:_,ctx:s}),gs.$set(tf);const of={};_&2&&(of.$$scope={dirty:_,ctx:s}),bs.$set(of);const cc={};_&2&&(cc.$$scope={dirty:_,ctx:s}),ks.$set(cc);const nf={};_&2&&(nf.$$scope={dirty:_,ctx:s}),vs.$set(nf);const sf={};_&2&&(sf.$$scope={dirty:_,ctx:s}),ws.$set(sf);const af={};_&2&&(af.$$scope={dirty:_,ctx:s}),$s.$set(af);const rf={};_&2&&(rf.$$scope={dirty:_,ctx:s}),Fs.$set(rf);const lf={};_&2&&(lf.$$scope={dirty:_,ctx:s}),xs.$set(lf);const df={};_&2&&(df.$$scope={dirty:_,ctx:s}),Rs.$set(df);const vo={};_&2&&(vo.$$scope={dirty:_,ctx:s}),Ms.$set(vo);const pc={};_&2&&(pc.$$scope={dirty:_,ctx:s}),qs.$set(pc);const cf={};_&2&&(cf.$$scope={dirty:_,ctx:s}),Cs.$set(cf);const pf={};_&2&&(pf.$$scope={dirty:_,ctx:s}),As.$set(pf);const wo={};_&2&&(wo.$$scope={dirty:_,ctx:s}),Ps.$set(wo);const hf={};_&2&&(hf.$$scope={dirty:_,ctx:s}),Os.$set(hf);const uf={};_&2&&(uf.$$scope={dirty:_,ctx:s}),Ns.$set(uf);const mf={};_&2&&(mf.$$scope={dirty:_,ctx:s}),Is.$set(mf);const Cp={};_&2&&(Cp.$$scope={dirty:_,ctx:s}),Ss.$set(Cp);const ff={};_&2&&(ff.$$scope={dirty:_,ctx:s}),Ws.$set(ff);const Yn={};_&2&&(Yn.$$scope={dirty:_,ctx:s}),Us.$set(Yn);const gf={};_&2&&(gf.$$scope={dirty:_,ctx:s}),Hs.$set(gf);const _f={};_&2&&(_f.$$scope={dirty:_,ctx:s}),Qs.$set(_f);const hc={};_&2&&(hc.$$scope={dirty:_,ctx:s}),Ks.$set(hc);const bf={};_&2&&(bf.$$scope={dirty:_,ctx:s}),Vs.$set(bf);const kf={};_&2&&(kf.$$scope={dirty:_,ctx:s}),Gs.$set(kf);const yf={};_&2&&(yf.$$scope={dirty:_,ctx:s}),Xs.$set(yf);const vf={};_&2&&(vf.$$scope={dirty:_,ctx:s}),Ys.$set(vf);const xt={};_&2&&(xt.$$scope={dirty:_,ctx:s}),ea.$set(xt);const Zn={};_&2&&(Zn.$$scope={dirty:_,ctx:s}),ta.$set(Zn);const wf={};_&2&&(wf.$$scope={dirty:_,ctx:s}),oa.$set(wf);const Tf={};_&2&&(Tf.$$scope={dirty:_,ctx:s}),sa.$set(Tf);const uc={};_&2&&(uc.$$scope={dirty:_,ctx:s}),aa.$set(uc);const $f={};_&2&&($f.$$scope={dirty:_,ctx:s}),ra.$set($f);const mc={};_&2&&(mc.$$scope={dirty:_,ctx:s}),ia.$set(mc);const Ff={};_&2&&(Ff.$$scope={dirty:_,ctx:s}),da.$set(Ff);const Oo={};_&2&&(Oo.$$scope={dirty:_,ctx:s}),ca.$set(Oo);const xf={};_&2&&(xf.$$scope={dirty:_,ctx:s}),pa.$set(xf);const Ef={};_&2&&(Ef.$$scope={dirty:_,ctx:s}),ha.$set(Ef);const Rf={};_&2&&(Rf.$$scope={dirty:_,ctx:s}),ma.$set(Rf);const No={};_&2&&(No.$$scope={dirty:_,ctx:s}),fa.$set(No);const Mf={};_&2&&(Mf.$$scope={dirty:_,ctx:s}),_a.$set(Mf);const zf={};_&2&&(zf.$$scope={dirty:_,ctx:s}),ba.$set(zf);const qf={};_&2&&(qf.$$scope={dirty:_,ctx:s}),ya.$set(qf);const Io={};_&2&&(Io.$$scope={dirty:_,ctx:s}),va.$set(Io);const Cf={};_&2&&(Cf.$$scope={dirty:_,ctx:s}),Ta.$set(Cf);const jf={};_&2&&(jf.$$scope={dirty:_,ctx:s}),$a.$set(jf);const Af={};_&2&&(Af.$$scope={dirty:_,ctx:s}),xa.$set(Af);const To={};_&2&&(To.$$scope={dirty:_,ctx:s}),Ea.$set(To);const Do={};_&2&&(Do.$$scope={dirty:_,ctx:s}),Ma.$set(Do);const Pf={};_&2&&(Pf.$$scope={dirty:_,ctx:s}),za.$set(Pf);const Lf={};_&2&&(Lf.$$scope={dirty:_,ctx:s}),Ca.$set(Lf);const Of={};_&2&&(Of.$$scope={dirty:_,ctx:s}),ja.$set(Of)},i(s){Hg||($(l.$$.fragment,s),$(M.$$.fragment,s),$(Be.$$.fragment,s),$(ar.$$.fragment,s),$(br.$$.fragment,s),$(Fr.$$.fragment,s),$(Pr.$$.fragment,s),$(Jr.$$.fragment,s),$(Vr.$$.fragment,s),$(ss.$$.fragment,s),$(Xr.$$.fragment,s),$(Yr.$$.fragment,s),$(rs.$$.fragment,s),$(is.$$.fragment,s),$(ti.$$.fragment,s),$(ni.$$.fragment,s),$(ai.$$.fragment,s),$(ri.$$.fragment,s),$(ii.$$.fragment,s),$(li.$$.fragment,s),$(ps.$$.fragment,s),$(hs.$$.fragment,s),$(hi.$$.fragment,s),$(ui.$$.fragment,s),$(mi.$$.fragment,s),$(yi.$$.fragment,s),$(fs.$$.fragment,s),$(gs.$$.fragment,s),$(vi.$$.fragment,s),$(wi.$$.fragment,s),$(Ei.$$.fragment,s),$(bs.$$.fragment,s),$(ks.$$.fragment,s),$(Ri.$$.fragment,s),$(Mi.$$.fragment,s),$(Ai.$$.fragment,s),$(vs.$$.fragment,s),$(ws.$$.fragment,s),$(Pi.$$.fragment,s),$(Li.$$.fragment,s),$(Di.$$.fragment,s),$($s.$$.fragment,s),$(Fs.$$.fragment,s),$(xs.$$.fragment,s),$(Si.$$.fragment,s),$(Wi.$$.fragment,s),$(Qi.$$.fragment,s),$(Rs.$$.fragment,s),$(Ms.$$.fragment,s),$(Ki.$$.fragment,s),$(Ji.$$.fragment,s),$(Yi.$$.fragment,s),$(qs.$$.fragment,s),$(Cs.$$.fragment,s),$(Zi.$$.fragment,s),$(el.$$.fragment,s),$(sl.$$.fragment,s),$(As.$$.fragment,s),$(Ps.$$.fragment,s),$(al.$$.fragment,s),$(rl.$$.fragment,s),$(Os.$$.fragment,s),$(cl.$$.fragment,s),$(Ns.$$.fragment,s),$(Is.$$.fragment,s),$(pl.$$.fragment,s),$(hl.$$.fragment,s),$(ul.$$.fragment,s),$(Ss.$$.fragment,s),$(Ws.$$.fragment,s),$(ml.$$.fragment,s),$(fl.$$.fragment,s),$(Us.$$.fragment,s),$(yl.$$.fragment,s),$(Hs.$$.fragment,s),$(Qs.$$.fragment,s),$(Ks.$$.fragment,s),$(vl.$$.fragment,s),$(wl.$$.fragment,s),$(Vs.$$.fragment,s),$(xl.$$.fragment,s),$(Gs.$$.fragment,s),$(Xs.$$.fragment,s),$(Ys.$$.fragment,s),$(El.$$.fragment,s),$(Rl.$$.fragment,s),$(ea.$$.fragment,s),$(Cl.$$.fragment,s),$(ta.$$.fragment,s),$(oa.$$.fragment,s),$(jl.$$.fragment,s),$(Al.$$.fragment,s),$(sa.$$.fragment,s),$(Nl.$$.fragment,s),$(aa.$$.fragment,s),$(ra.$$.fragment,s),$(ia.$$.fragment,s),$(Il.$$.fragment,s),$(Dl.$$.fragment,s),$(da.$$.fragment,s),$(Ul.$$.fragment,s),$(ca.$$.fragment,s),$(pa.$$.fragment,s),$(ha.$$.fragment,s),$(Hl.$$.fragment,s),$(Ql.$$.fragment,s),$(ed.$$.fragment,s),$(ma.$$.fragment,s),$(fa.$$.fragment,s),$(td.$$.fragment,s),$(od.$$.fragment,s),$(cd.$$.fragment,s),$(_a.$$.fragment,s),$(ba.$$.fragment,s),$(pd.$$.fragment,s),$(hd.$$.fragment,s),$(vd.$$.fragment,s),$(ya.$$.fragment,s),$(va.$$.fragment,s),$(wd.$$.fragment,s),$(Td.$$.fragment,s),$(qd.$$.fragment,s),$(Ta.$$.fragment,s),$($a.$$.fragment,s),$(Cd.$$.fragment,s),$(jd.$$.fragment,s),$(Sd.$$.fragment,s),$(xa.$$.fragment,s),$(Ea.$$.fragment,s),$(Wd.$$.fragment,s),$(Bd.$$.fragment,s),$(Xd.$$.fragment,s),$(Ma.$$.fragment,s),$(za.$$.fragment,s),$(Yd.$$.fragment,s),$(Zd.$$.fragment,s),$(ic.$$.fragment,s),$(Ca.$$.fragment,s),$(ja.$$.fragment,s),Hg=!0)},o(s){F(l.$$.fragment,s),F(M.$$.fragment,s),F(Be.$$.fragment,s),F(ar.$$.fragment,s),F(br.$$.fragment,s),F(Fr.$$.fragment,s),F(Pr.$$.fragment,s),F(Jr.$$.fragment,s),F(Vr.$$.fragment,s),F(ss.$$.fragment,s),F(Xr.$$.fragment,s),F(Yr.$$.fragment,s),F(rs.$$.fragment,s),F(is.$$.fragment,s),F(ti.$$.fragment,s),F(ni.$$.fragment,s),F(ai.$$.fragment,s),F(ri.$$.fragment,s),F(ii.$$.fragment,s),F(li.$$.fragment,s),F(ps.$$.fragment,s),F(hs.$$.fragment,s),F(hi.$$.fragment,s),F(ui.$$.fragment,s),F(mi.$$.fragment,s),F(yi.$$.fragment,s),F(fs.$$.fragment,s),F(gs.$$.fragment,s),F(vi.$$.fragment,s),F(wi.$$.fragment,s),F(Ei.$$.fragment,s),F(bs.$$.fragment,s),F(ks.$$.fragment,s),F(Ri.$$.fragment,s),F(Mi.$$.fragment,s),F(Ai.$$.fragment,s),F(vs.$$.fragment,s),F(ws.$$.fragment,s),F(Pi.$$.fragment,s),F(Li.$$.fragment,s),F(Di.$$.fragment,s),F($s.$$.fragment,s),F(Fs.$$.fragment,s),F(xs.$$.fragment,s),F(Si.$$.fragment,s),F(Wi.$$.fragment,s),F(Qi.$$.fragment,s),F(Rs.$$.fragment,s),F(Ms.$$.fragment,s),F(Ki.$$.fragment,s),F(Ji.$$.fragment,s),F(Yi.$$.fragment,s),F(qs.$$.fragment,s),F(Cs.$$.fragment,s),F(Zi.$$.fragment,s),F(el.$$.fragment,s),F(sl.$$.fragment,s),F(As.$$.fragment,s),F(Ps.$$.fragment,s),F(al.$$.fragment,s),F(rl.$$.fragment,s),F(Os.$$.fragment,s),F(cl.$$.fragment,s),F(Ns.$$.fragment,s),F(Is.$$.fragment,s),F(pl.$$.fragment,s),F(hl.$$.fragment,s),F(ul.$$.fragment,s),F(Ss.$$.fragment,s),F(Ws.$$.fragment,s),F(ml.$$.fragment,s),F(fl.$$.fragment,s),F(Us.$$.fragment,s),F(yl.$$.fragment,s),F(Hs.$$.fragment,s),F(Qs.$$.fragment,s),F(Ks.$$.fragment,s),F(vl.$$.fragment,s),F(wl.$$.fragment,s),F(Vs.$$.fragment,s),F(xl.$$.fragment,s),F(Gs.$$.fragment,s),F(Xs.$$.fragment,s),F(Ys.$$.fragment,s),F(El.$$.fragment,s),F(Rl.$$.fragment,s),F(ea.$$.fragment,s),F(Cl.$$.fragment,s),F(ta.$$.fragment,s),F(oa.$$.fragment,s),F(jl.$$.fragment,s),F(Al.$$.fragment,s),F(sa.$$.fragment,s),F(Nl.$$.fragment,s),F(aa.$$.fragment,s),F(ra.$$.fragment,s),F(ia.$$.fragment,s),F(Il.$$.fragment,s),F(Dl.$$.fragment,s),F(da.$$.fragment,s),F(Ul.$$.fragment,s),F(ca.$$.fragment,s),F(pa.$$.fragment,s),F(ha.$$.fragment,s),F(Hl.$$.fragment,s),F(Ql.$$.fragment,s),F(ed.$$.fragment,s),F(ma.$$.fragment,s),F(fa.$$.fragment,s),F(td.$$.fragment,s),F(od.$$.fragment,s),F(cd.$$.fragment,s),F(_a.$$.fragment,s),F(ba.$$.fragment,s),F(pd.$$.fragment,s),F(hd.$$.fragment,s),F(vd.$$.fragment,s),F(ya.$$.fragment,s),F(va.$$.fragment,s),F(wd.$$.fragment,s),F(Td.$$.fragment,s),F(qd.$$.fragment,s),F(Ta.$$.fragment,s),F($a.$$.fragment,s),F(Cd.$$.fragment,s),F(jd.$$.fragment,s),F(Sd.$$.fragment,s),F(xa.$$.fragment,s),F(Ea.$$.fragment,s),F(Wd.$$.fragment,s),F(Bd.$$.fragment,s),F(Xd.$$.fragment,s),F(Ma.$$.fragment,s),F(za.$$.fragment,s),F(Yd.$$.fragment,s),F(Zd.$$.fragment,s),F(ic.$$.fragment,s),F(Ca.$$.fragment,s),F(ja.$$.fragment,s),Hg=!1},d(s){t(d),s&&t(k),s&&t(m),x(l),s&&t(Z),s&&t(N),x(M),s&&t(ge),s&&t(W),s&&t(_e),s&&t(U),s&&t(be),s&&t(H),s&&t(ke),s&&t(ee),s&&t(ye),s&&t(Q),s&&t(ve),s&&t(I),s&&t(Ke),s&&t(q),s&&t(Je),s&&t(Oe),x(Be),s&&t(Ve),s&&t(Tc),s&&t(Sf),x(ar,s),s&&t(Wf),s&&t(_t),s&&t(Bf),x(br,s),s&&t(Uf),s&&t(Bt),s&&t(Hf),x(Fr,s),s&&t(Qf),s&&t(Et),s&&t(Kf),x(Pr,s),s&&t(Jf),s&&t(Rt),s&&t(Vf),s&&t(Ic),s&&t(Gf),s&&t(os),s&&t(Xf),s&&t(tn),x(Jr),s&&t(Yf),s&&t(Wt),x(Vr),x(ss),s&&t(Zf),s&&t(nn),x(Xr),s&&t(eg),s&&t(Ie),x(Yr),x(rs),x(is),x(ti),x(ni),x(ai),x(ri),s&&t(tg),s&&t(sn),x(ii),s&&t(og),s&&t(tt),x(li),x(ps),x(hs),x(hi),s&&t(ng),s&&t(an),x(ui),s&&t(sg),s&&t(ot),x(mi),x(yi),x(fs),x(gs),s&&t(ag),s&&t(ln),x(vi),s&&t(rg),s&&t(yt),x(wi),x(Ei),x(bs),x(ks),s&&t(ig),s&&t(cn),x(Ri),s&&t(lg),s&&t(vt),x(Mi),x(Ai),x(vs),x(ws),s&&t(dg),s&&t(hn),x(Pi),s&&t(cg),s&&t(wt),x(Li),x(Di),x($s),x(Fs),x(xs),s&&t(pg),s&&t(mn),x(Si),s&&t(hg),s&&t(Tt),x(Wi),x(Qi),x(Rs),x(Ms),s&&t(ug),s&&t(gn),x(Ki),s&&t(mg),s&&t($t),x(Ji),x(Yi),x(qs),x(Cs),s&&t(fg),s&&t(bn),x(Zi),s&&t(gg),s&&t(Ft),x(el),x(sl),x(As),x(Ps),s&&t(_g),s&&t(vn),x(al),s&&t(bg),s&&t(pt),x(rl),x(Os),x(cl),x(Ns),x(Is),s&&t(kg),s&&t(Tn),x(pl),s&&t(yg),s&&t($n),x(hl),x(ul),x(Ss),x(Ws),s&&t(vg),s&&t(xn),x(ml),s&&t(wg),s&&t(ht),x(fl),x(Us),x(yl),x(Hs),x(Qs),x(Ks),s&&t(Tg),s&&t(Rn),x(vl),s&&t($g),s&&t(ut),x(wl),x(Vs),x(xl),x(Gs),x(Xs),x(Ys),s&&t(Fg),s&&t(zn),x(El),s&&t(xg),s&&t(mt),x(Rl),x(ea),x(Cl),x(ta),x(oa),s&&t(Eg),s&&t(Cn),x(jl),s&&t(Rg),s&&t(ft),x(Al),x(sa),x(Nl),x(aa),x(ra),x(ia),s&&t(Mg),s&&t(An),x(Il),s&&t(zg),s&&t(gt),x(Dl),x(da),x(Ul),x(ca),x(pa),x(ha),s&&t(qg),s&&t(On),x(Hl),s&&t(Cg),s&&t(nt),x(Ql),x(ed),x(ma),x(fa),s&&t(jg),s&&t(In),x(td),s&&t(Ag),s&&t(st),x(od),x(cd),x(_a),x(ba),s&&t(Pg),s&&t(Sn),x(pd),s&&t(Lg),s&&t(at),x(hd),x(vd),x(ya),x(va),s&&t(Og),s&&t(Bn),x(wd),s&&t(Ng),s&&t(rt),x(Td),x(qd),x(Ta),x($a),s&&t(Ig),s&&t(Hn),x(Cd),s&&t(Dg),s&&t(it),x(jd),x(Sd),x(xa),x(Ea),s&&t(Sg),s&&t(Kn),x(Wd),s&&t(Wg),s&&t(lt),x(Bd),x(Xd),x(Ma),x(za),s&&t(Bg),s&&t(Vn),x(Yd),s&&t(Ug),s&&t(dt),x(Zd),x(ic),x(Ca),x(ja)}}}const iA={local:"roberta",sections:[{local:"overview",title:"Overview"},{local:"resources",title:"Resources"},{local:"transformers.RobertaConfig",title:"RobertaConfig"},{local:"transformers.RobertaTokenizer",title:"RobertaTokenizer"},{local:"transformers.RobertaTokenizerFast",title:"RobertaTokenizerFast"},{local:"transformers.RobertaModel",title:"RobertaModel"},{local:"transformers.RobertaForCausalLM",title:"RobertaForCausalLM"},{local:"transformers.RobertaForMaskedLM",title:"RobertaForMaskedLM"},{local:"transformers.RobertaForSequenceClassification",title:"RobertaForSequenceClassification"},{local:"transformers.RobertaForMultipleChoice",title:"RobertaForMultipleChoice"},{local:"transformers.RobertaForTokenClassification",title:"RobertaForTokenClassification"},{local:"transformers.RobertaForQuestionAnswering",title:"RobertaForQuestionAnswering"},{local:"transformers.TFRobertaModel",title:"TFRobertaModel"},{local:"transformers.TFRobertaForCausalLM",title:"TFRobertaForCausalLM"},{local:"transformers.TFRobertaForMaskedLM",title:"TFRobertaForMaskedLM"},{local:"transformers.TFRobertaForSequenceClassification",title:"TFRobertaForSequenceClassification"},{local:"transformers.TFRobertaForMultipleChoice",title:"TFRobertaForMultipleChoice"},{local:"transformers.TFRobertaForTokenClassification",title:"TFRobertaForTokenClassification"},{local:"transformers.TFRobertaForQuestionAnswering",title:"TFRobertaForQuestionAnswering"},{local:"transformers.FlaxRobertaModel",title:"FlaxRobertaModel"},{local:"transformers.FlaxRobertaForCausalLM",title:"FlaxRobertaForCausalLM"},{local:"transformers.FlaxRobertaForMaskedLM",title:"FlaxRobertaForMaskedLM"},{local:"transformers.FlaxRobertaForSequenceClassification",title:"FlaxRobertaForSequenceClassification"},{local:"transformers.FlaxRobertaForMultipleChoice",title:"FlaxRobertaForMultipleChoice"},{local:"transformers.FlaxRobertaForTokenClassification",title:"FlaxRobertaForTokenClassification"},{local:"transformers.FlaxRobertaForQuestionAnswering",title:"FlaxRobertaForQuestionAnswering"}],title:"RoBERTa"};function lA(E){return t3(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class gA extends Xj{constructor(d){super();Yj(this,d,lA,rA,Zj,{})}}export{gA as default,iA as metadata};
