import{S as AM,i as LM,s as OM,e as a,k as h,w as v,t as n,M as NM,c as r,d as t,m as u,a as i,x as w,h as s,b as f,G as e,g as k,y as T,q as $,o as F,B as x,v as IM,L as re}from"../../chunks/vendor-hf-doc-builder.js";import{T as fe}from"../../chunks/Tip-hf-doc-builder.js";import{D as O}from"../../chunks/Docstring-hf-doc-builder.js";import{C as ie}from"../../chunks/CodeBlock-hf-doc-builder.js";import{I as De}from"../../chunks/IconCopyLink-hf-doc-builder.js";import{E as ae}from"../../chunks/ExampleCodeBlock-hf-doc-builder.js";function DM(R){let d,g,c,m,_;return m=new ie({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"),g=n("Examples:"),c=h(),v(m.$$.fragment)},l(l){d=r(l,"P",{});var p=i(d);g=s(p,"Examples:"),p.forEach(t),c=u(l),w(m.$$.fragment,l)},m(l,p){k(l,d,p),e(d,g),k(l,c,p),T(m,l,p),_=!0},p:re,i(l){_||($(m.$$.fragment,l),_=!0)},o(l){F(m.$$.fragment,l),_=!1},d(l){l&&t(d),l&&t(c),x(m,l)}}}function SM(R){let d,g,c,m,_;return m=new ie({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"),g=n("be encoded differently whether it is at the beginning of the sentence (without space) or not:"),c=h(),v(m.$$.fragment)},l(l){d=r(l,"P",{});var p=i(d);g=s(p,"be encoded differently whether it is at the beginning of the sentence (without space) or not:"),p.forEach(t),c=u(l),w(m.$$.fragment,l)},m(l,p){k(l,d,p),e(d,g),k(l,c,p),T(m,l,p),_=!0},p:re,i(l){_||($(m.$$.fragment,l),_=!0)},o(l){F(m.$$.fragment,l),_=!1},d(l){l&&t(d),l&&t(c),x(m,l)}}}function BM(R){let d,g,c,m,_;return{c(){d=a("p"),g=n("When used with "),c=a("code"),m=n("is_split_into_words=True"),_=n(", this tokenizer will add a space before each word (even the first one).")},l(l){d=r(l,"P",{});var p=i(d);g=s(p,"When used with "),c=r(p,"CODE",{});var E=i(c);m=s(E,"is_split_into_words=True"),E.forEach(t),_=s(p,", this tokenizer will add a space before each word (even the first one)."),p.forEach(t)},m(l,p){k(l,d,p),e(d,g),e(d,c),e(c,m),e(d,_)},d(l){l&&t(d)}}}function WM(R){let d,g,c,m,_;return m=new ie({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"),g=n("be encoded differently whether it is at the beginning of the sentence (without space) or not:"),c=h(),v(m.$$.fragment)},l(l){d=r(l,"P",{});var p=i(d);g=s(p,"be encoded differently whether it is at the beginning of the sentence (without space) or not:"),p.forEach(t),c=u(l),w(m.$$.fragment,l)},m(l,p){k(l,d,p),e(d,g),k(l,c,p),T(m,l,p),_=!0},p:re,i(l){_||($(m.$$.fragment,l),_=!0)},o(l){F(m.$$.fragment,l),_=!1},d(l){l&&t(d),l&&t(c),x(m,l)}}}function UM(R){let d,g,c,m,_,l,p,E;return{c(){d=a("p"),g=n("When used with "),c=a("code"),m=n("is_split_into_words=True"),_=n(", this tokenizer needs to be instantiated with "),l=a("code"),p=n("add_prefix_space=True"),E=n(".")},l(le){d=r(le,"P",{});var Z=i(d);g=s(Z,"When used with "),c=r(Z,"CODE",{});var N=i(c);m=s(N,"is_split_into_words=True"),N.forEach(t),_=s(Z,", this tokenizer needs to be instantiated with "),l=r(Z,"CODE",{});var te=i(l);p=s(te,"add_prefix_space=True"),te.forEach(t),E=s(Z,"."),Z.forEach(t)},m(le,Z){k(le,d,Z),e(d,g),e(d,c),e(c,m),e(d,_),e(d,l),e(l,p),e(d,E)},d(le){le&&t(d)}}}function HM(R){let d,g,c,m,_;return{c(){d=a("p"),g=n("Although the recipe for forward pass needs to be defined within this function, one should call the "),c=a("code"),m=n("Module"),_=n(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){d=r(l,"P",{});var p=i(d);g=s(p,"Although the recipe for forward pass needs to be defined within this function, one should call the "),c=r(p,"CODE",{});var E=i(c);m=s(E,"Module"),E.forEach(t),_=s(p,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),p.forEach(t)},m(l,p){k(l,d,p),e(d,g),e(d,c),e(c,m),e(d,_)},d(l){l&&t(d)}}}function QM(R){let d,g,c,m,_;return m=new ie({props:{code:`from transformers import RobertaTokenizer, RobertaModel
import torch

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

tokenizer = RobertaTokenizer.from_pretrained("roberta-base")
config = RobertaConfig.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> RobertaTokenizer, RobertaForCausalLM, RobertaConfig
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch

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

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

tokenizer = RobertaTokenizer.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]`,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> RobertaTokenizer, RobertaForSequenceClassification

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = RobertaTokenizer.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>`}}),{c(){d=a("p"),g=n("Example of single-label classification:"),c=h(),v(m.$$.fragment)},l(l){d=r(l,"P",{});var p=i(d);g=s(p,"Example of single-label classification:"),p.forEach(t),c=u(l),w(m.$$.fragment,l)},m(l,p){k(l,d,p),e(d,g),k(l,c,p),T(m,l,p),_=!0},p:re,i(l){_||($(m.$$.fragment,l),_=!0)},o(l){F(m.$$.fragment,l),_=!1},d(l){l&&t(d),l&&t(c),x(m,l)}}}function ez(R){let d,g;return d=new ie({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 = RobertaForSequenceClassification.from_pretrained("cardiffnlp/twitter-roberta-base-emotion", num_labels=num_labels)\n\nlabels = torch.tensor([1])\nloss = model(**inputs, labels=labels).loss\nround(loss.item(), 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 = 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(){v(d.$$.fragment)},l(c){w(d.$$.fragment,c)},m(c,m){T(d,c,m),g=!0},p:re,i(c){g||($(d.$$.fragment,c),g=!0)},o(c){F(d.$$.fragment,c),g=!1},d(c){x(d,c)}}}function tz(R){let d,g,c,m,_;return m=new ie({props:{code:`import torch
from transformers import RobertaTokenizer, RobertaForSequenceClassification

tokenizer = RobertaTokenizer.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_id = logits.argmax().item()
model.config.id2label[predicted_class_id]`,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> RobertaTokenizer, RobertaForSequenceClassification

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = RobertaTokenizer.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_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>`}}),{c(){d=a("p"),g=n("Example of multi-label classification:"),c=h(),v(m.$$.fragment)},l(l){d=r(l,"P",{});var p=i(d);g=s(p,"Example of multi-label classification:"),p.forEach(t),c=u(l),w(m.$$.fragment,l)},m(l,p){k(l,d,p),e(d,g),k(l,c,p),T(m,l,p),_=!0},p:re,i(l){_||($(m.$$.fragment,l),_=!0)},o(l){F(m.$$.fragment,l),_=!1},d(l){l&&t(d),l&&t(c),x(m,l)}}}function oz(R){let d,g;return d=new ie({props:{code:`# 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.nn.functional.one_hot(torch.tensor([predicted_class_id]), num_classes=num_labels).to(
    torch.float
)
loss = model(**inputs, labels=labels).loss
loss.backward()`,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 = 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.nn.functional.one_hot(torch.tensor([predicted_class_id]), num_classes=num_labels).to(
<span class="hljs-meta">... </span>    torch.<span class="hljs-built_in">float</span>
<span class="hljs-meta">... </span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>loss = model(**inputs, labels=labels).loss
<span class="hljs-meta">&gt;&gt;&gt; </span>loss.backward()`}}),{c(){v(d.$$.fragment)},l(c){w(d.$$.fragment,c)},m(c,m){T(d,c,m),g=!0},p:re,i(c){g||($(d.$$.fragment,c),g=!0)},o(c){F(d.$$.fragment,c),g=!1},d(c){x(d,c)}}}function nz(R){let d,g,c,m,_;return{c(){d=a("p"),g=n("Although the recipe for forward pass needs to be defined within this function, one should call the "),c=a("code"),m=n("Module"),_=n(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){d=r(l,"P",{});var p=i(d);g=s(p,"Although the recipe for forward pass needs to be defined within this function, one should call the "),c=r(p,"CODE",{});var E=i(c);m=s(E,"Module"),E.forEach(t),_=s(p,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),p.forEach(t)},m(l,p){k(l,d,p),e(d,g),e(d,c),e(c,m),e(d,_)},d(l){l&&t(d)}}}function sz(R){let d,g,c,m,_;return m=new ie({props:{code:`from transformers import RobertaTokenizer, RobertaForMultipleChoice
import torch

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

tokenizer = RobertaTokenizer.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`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> RobertaTokenizer, 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 = RobertaTokenizer.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>]`}}),{c(){d=a("p"),g=n("Example:"),c=h(),v(m.$$.fragment)},l(l){d=r(l,"P",{});var p=i(d);g=s(p,"Example:"),p.forEach(t),c=u(l),w(m.$$.fragment,l)},m(l,p){k(l,d,p),e(d,g),k(l,c,p),T(m,l,p),_=!0},p:re,i(l){_||($(m.$$.fragment,l),_=!0)},o(l){F(m.$$.fragment,l),_=!1},d(l){l&&t(d),l&&t(c),x(m,l)}}}function iz(R){let d,g;return d=new ie({props:{code:`labels = predicted_token_class_ids
loss = model(**inputs, labels=labels).loss
round(loss.item(), 2)`,highlighted:`<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(){v(d.$$.fragment)},l(c){w(d.$$.fragment,c)},m(c,m){T(d,c,m),g=!0},p:re,i(c){g||($(d.$$.fragment,c),g=!0)},o(c){F(d.$$.fragment,c),g=!1},d(c){x(d,c)}}}function lz(R){let d,g,c,m,_;return{c(){d=a("p"),g=n("Although the recipe for forward pass needs to be defined within this function, one should call the "),c=a("code"),m=n("Module"),_=n(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){d=r(l,"P",{});var p=i(d);g=s(p,"Although the recipe for forward pass needs to be defined within this function, one should call the "),c=r(p,"CODE",{});var E=i(c);m=s(E,"Module"),E.forEach(t),_=s(p,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),p.forEach(t)},m(l,p){k(l,d,p),e(d,g),e(d,c),e(c,m),e(d,_)},d(l){l&&t(d)}}}function dz(R){let d,g,c,m,_;return m=new ie({props:{code:`from transformers import RobertaTokenizer, RobertaForQuestionAnswering
import torch

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

tokenizer = RobertaTokenizer.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> RobertaTokenizer, 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 = RobertaTokenizer.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"),g=n("Example:"),c=h(),v(m.$$.fragment)},l(l){d=r(l,"P",{});var p=i(d);g=s(p,"Example:"),p.forEach(t),c=u(l),w(m.$$.fragment,l)},m(l,p){k(l,d,p),e(d,g),k(l,c,p),T(m,l,p),_=!0},p:re,i(l){_||($(m.$$.fragment,l),_=!0)},o(l){F(m.$$.fragment,l),_=!1},d(l){l&&t(d),l&&t(c),x(m,l)}}}function mz(R){let d,g,c,m,_;return{c(){d=a("p"),g=n("Although the recipe for forward pass needs to be defined within this function, one should call the "),c=a("code"),m=n("Module"),_=n(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){d=r(l,"P",{});var p=i(d);g=s(p,"Although the recipe for forward pass needs to be defined within this function, one should call the "),c=r(p,"CODE",{});var E=i(c);m=s(E,"Module"),E.forEach(t),_=s(p,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),p.forEach(t)},m(l,p){k(l,d,p),e(d,g),e(d,c),e(c,m),e(d,_)},d(l){l&&t(d)}}}function fz(R){let d,g,c,m,_;return m=new ie({props:{code:`from transformers import RobertaTokenizer, TFRobertaForCausalLM
import tensorflow as tf

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

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

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

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

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

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

tokenizer = RobertaTokenizer.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> RobertaTokenizer, FlaxRobertaModel

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

tokenizer = RobertaTokenizer.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> RobertaTokenizer, FlaxRobertaForCausalLM

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

tokenizer = RobertaTokenizer.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> RobertaTokenizer, FlaxRobertaForMaskedLM

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

tokenizer = RobertaTokenizer.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> RobertaTokenizer, FlaxRobertaForSequenceClassification

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

tokenizer = RobertaTokenizer.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> RobertaTokenizer, FlaxRobertaForMultipleChoice

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

tokenizer = RobertaTokenizer.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> RobertaTokenizer, FlaxRobertaForTokenClassification

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

tokenizer = RobertaTokenizer.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> RobertaTokenizer, FlaxRobertaForQuestionAnswering

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = RobertaTokenizer.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"),g=n("Example:"),c=h(),v(m.$$.fragment)},l(l){d=r(l,"P",{});var p=i(d);g=s(p,"Example:"),p.forEach(t),c=u(l),w(m.$$.fragment,l)},m(l,p){k(l,d,p),e(d,g),k(l,c,p),T(m,l,p),_=!0},p:re,i(l){_||($(m.$$.fragment,l),_=!0)},o(l){F(m.$$.fragment,l),_=!1},d(l){l&&t(d),l&&t(c),x(m,l)}}}function Vz(R){let d,g,c,m,_,l,p,E,le,Z,N,te,oe,M,we,K,Te,ge,B,$e,pe,J,Fe,_e,U,xe,be,H,Re,ke,ee,j,P,ye,Q,Ee,ve,I,he,Me,C,ze,V,qe,ue,G,je,ne,D,me,X,Ce,se,A,Pe,L,Ae,Le,y,z,He,de,Xe,Je,q,Ye,Se,Ze,et,Be,S,Y,Ve,Oe,W,Qe,We,Ne,Ke,ce,Ge,yt,Oa,mg,co,fg,id,gg,_g,ld,bg,kg,Na,yg,vg,wg,Ao,Tg,dd,$g,Fg,cd,xg,Rg,Eg,Lo,Mg,pd,zg,qg,hd,jg,Cg,Pg,Ln,om,Oo,On,xc,Ia,Ag,Rc,Lg,nm,Ie,Da,Og,Ec,Ng,Ig,Mc,Dg,Sg,Nn,Bg,Sa,Wg,zc,Ug,Hg,Qg,In,Kg,Ba,Jg,ud,Vg,Gg,Xg,vo,Wa,Yg,qc,Zg,e_,Ua,md,t_,jc,o_,n_,fd,s_,Cc,a_,r_,Dn,Ha,i_,Qa,l_,Pc,d_,c_,p_,Sn,Ka,h_,Ac,u_,m_,gd,Ja,sm,No,Bn,Lc,Va,f_,Oc,g_,am,tt,Ga,__,Xa,b_,Nc,k_,y_,v_,Ic,w_,T_,Wn,$_,Ya,F_,Dc,x_,R_,E_,Un,M_,Za,z_,_d,q_,j_,C_,bd,er,rm,Io,Hn,Sc,tr,P_,Bc,A_,im,ot,or,L_,Wc,O_,N_,nr,I_,kd,D_,S_,B_,sr,W_,ar,U_,H_,Q_,rr,K_,Uc,J_,V_,G_,pt,X_,Hc,Y_,Z_,Qc,eb,tb,Kc,ob,nb,Jc,sb,ab,Vc,rb,ib,Gc,lb,db,cb,Qn,pb,Xc,hb,ub,ir,mb,fb,Ut,lr,gb,Do,_b,yd,bb,kb,Yc,yb,vb,wb,Kn,Tb,Jn,lm,So,Vn,Zc,dr,$b,ep,Fb,dm,vt,cr,xb,pr,Rb,tp,Eb,Mb,zb,hr,qb,vd,jb,Cb,Pb,ur,Ab,mr,Lb,Ob,Nb,Ht,fr,Ib,Bo,Db,wd,Sb,Bb,op,Wb,Ub,Hb,Gn,Qb,Xn,cm,Wo,Yn,np,gr,Kb,sp,Jb,pm,wt,_r,Vb,br,Gb,ap,Xb,Yb,Zb,kr,ek,Td,tk,ok,nk,yr,sk,vr,ak,rk,ik,Rt,wr,lk,Uo,dk,$d,ck,pk,rp,hk,uk,mk,Zn,fk,es,gk,ts,hm,Ho,os,ip,Tr,_k,lp,bk,um,Tt,$r,kk,dp,yk,vk,Fr,wk,Fd,Tk,$k,Fk,xr,xk,Rr,Rk,Ek,Mk,ct,Er,zk,Qo,qk,xd,jk,Ck,cp,Pk,Ak,Lk,ns,Ok,ss,Nk,as,Ik,rs,Dk,is,mm,Ko,ls,pp,Mr,Sk,hp,Bk,fm,$t,zr,Wk,up,Uk,Hk,qr,Qk,Rd,Kk,Jk,Vk,jr,Gk,Cr,Xk,Yk,Zk,Qt,Pr,ey,Jo,ty,Ed,oy,ny,mp,sy,ay,ry,ds,iy,cs,gm,Vo,ps,fp,Ar,ly,gp,dy,_m,Ft,Lr,cy,_p,py,hy,Or,uy,Md,my,fy,gy,Nr,_y,Ir,by,ky,yy,Et,Dr,vy,Go,wy,zd,Ty,$y,bp,Fy,xy,Ry,hs,Ey,us,My,ms,bm,Xo,fs,kp,Sr,zy,yp,qy,km,xt,Br,jy,Yo,Cy,vp,Py,Ay,wp,Ly,Oy,Ny,Wr,Iy,qd,Dy,Sy,By,Ur,Wy,Hr,Uy,Hy,Qy,Mt,Qr,Ky,Zo,Jy,jd,Vy,Gy,Tp,Xy,Yy,Zy,gs,ev,_s,tv,bs,ym,en,ks,$p,Kr,ov,Fp,nv,vm,ht,Jr,sv,xp,av,rv,Vr,iv,Cd,lv,dv,cv,Gr,pv,Xr,hv,uv,mv,ys,fv,Kt,Yr,gv,tn,_v,Pd,bv,kv,Rp,yv,vv,wv,vs,Tv,ws,wm,on,Ts,Ep,Zr,$v,Mp,Fv,Tm,nn,ei,xv,Jt,ti,Rv,sn,Ev,Ad,Mv,zv,zp,qv,jv,Cv,$s,Pv,Fs,$m,an,xs,qp,oi,Av,jp,Lv,Fm,ut,ni,Ov,si,Nv,Cp,Iv,Dv,Sv,ai,Bv,Ld,Wv,Uv,Hv,ri,Qv,ii,Kv,Jv,Vv,Rs,Gv,zt,li,Xv,rn,Yv,Od,Zv,ew,Pp,tw,ow,nw,Es,sw,Ms,aw,zs,xm,ln,qs,Ap,di,rw,Lp,iw,Rm,mt,ci,lw,Op,dw,cw,pi,pw,Nd,hw,uw,mw,hi,fw,ui,gw,_w,bw,js,kw,qt,mi,yw,dn,vw,Id,ww,Tw,Np,$w,Fw,xw,Cs,Rw,Ps,Ew,As,Em,cn,Ls,Ip,fi,Mw,Dp,zw,Mm,ft,gi,qw,Sp,jw,Cw,_i,Pw,Dd,Aw,Lw,Ow,bi,Nw,ki,Iw,Dw,Sw,Os,Bw,Vt,yi,Ww,pn,Uw,Sd,Hw,Qw,Bp,Kw,Jw,Vw,Ns,Gw,Is,zm,hn,Ds,Wp,vi,Xw,Up,Yw,qm,gt,wi,Zw,Hp,eT,tT,Ti,oT,Bd,nT,sT,aT,$i,rT,Fi,iT,lT,dT,Ss,cT,jt,xi,pT,un,hT,Wd,uT,mT,Qp,fT,gT,_T,Bs,bT,Ws,kT,Us,jm,mn,Hs,Kp,Ri,yT,Jp,vT,Cm,_t,Ei,wT,fn,TT,Vp,$T,FT,Gp,xT,RT,ET,Mi,MT,Ud,zT,qT,jT,zi,CT,qi,PT,AT,LT,Qs,OT,Ct,ji,NT,gn,IT,Hd,DT,ST,Xp,BT,WT,UT,Ks,HT,Js,QT,Vs,Pm,_n,Gs,Yp,Ci,KT,Zp,JT,Am,nt,Pi,VT,eh,GT,XT,Ai,YT,Qd,ZT,e1,t1,Li,o1,Oi,n1,s1,a1,th,r1,i1,po,oh,Ni,l1,d1,nh,Ii,c1,p1,sh,Di,h1,u1,ah,Si,m1,f1,Gt,Bi,g1,bn,_1,rh,b1,k1,ih,y1,v1,w1,Xs,T1,Ys,Lm,kn,Zs,lh,Wi,$1,dh,F1,Om,st,Ui,x1,ch,R1,E1,Hi,M1,Kd,z1,q1,j1,Qi,C1,Ki,P1,A1,L1,ph,O1,N1,ho,hh,Ji,I1,D1,uh,Vi,S1,B1,mh,Gi,W1,U1,fh,Xi,H1,Q1,Xt,Yi,K1,yn,J1,gh,V1,G1,_h,X1,Y1,Z1,ea,e$,ta,Nm,vn,oa,bh,Zi,t$,kh,o$,Im,at,el,n$,tl,s$,yh,a$,r$,i$,ol,l$,Jd,d$,c$,p$,nl,h$,sl,u$,m$,f$,vh,g$,_$,uo,wh,al,b$,k$,Th,rl,y$,v$,$h,il,w$,T$,Fh,ll,$$,F$,Yt,dl,x$,wn,R$,xh,E$,M$,Rh,z$,q$,j$,na,C$,sa,Dm,Tn,aa,Eh,cl,P$,Mh,A$,Sm,rt,pl,L$,zh,O$,N$,hl,I$,Vd,D$,S$,B$,ul,W$,ml,U$,H$,Q$,qh,K$,J$,mo,jh,fl,V$,G$,Ch,gl,X$,Y$,Ph,_l,Z$,e0,Ah,bl,t0,o0,Zt,kl,n0,$n,s0,Lh,a0,r0,Oh,i0,l0,d0,ra,c0,ia,Bm,Fn,la,Nh,yl,p0,Ih,h0,Wm,it,vl,u0,Dh,m0,f0,wl,g0,Gd,_0,b0,k0,Tl,y0,$l,v0,w0,T0,Sh,$0,F0,fo,Bh,Fl,x0,R0,Wh,xl,E0,M0,Uh,Rl,z0,q0,Hh,El,j0,C0,eo,Ml,P0,xn,A0,Qh,L0,O0,Kh,N0,I0,D0,da,S0,ca,Um,Rn,pa,Jh,zl,B0,Vh,W0,Hm,lt,ql,U0,Gh,H0,Q0,jl,K0,Xd,J0,V0,G0,Cl,X0,Pl,Y0,Z0,e2,Xh,t2,o2,go,Yh,Al,n2,s2,Zh,Ll,a2,r2,eu,Ol,i2,l2,tu,Nl,d2,c2,to,Il,p2,En,h2,ou,u2,m2,nu,f2,g2,_2,ha,b2,ua,Qm,Mn,ma,su,Dl,k2,au,y2,Km,dt,Sl,v2,zn,w2,ru,T2,$2,iu,F2,x2,R2,Bl,E2,Yd,M2,z2,q2,Wl,j2,Ul,C2,P2,A2,lu,L2,O2,_o,du,Hl,N2,I2,cu,Ql,D2,S2,pu,Kl,B2,W2,hu,Jl,U2,H2,oo,Vl,Q2,qn,K2,uu,J2,V2,mu,G2,X2,Y2,fa,Z2,ga,Jm;return l=new De({}),M=new De({}),We=new De({}),Oa=new O({props:{name:"class transformers.RobertaConfig",anchor:"transformers.RobertaConfig",parameters:[{name:"pad_token_id",val:" = 1"},{name:"bos_token_id",val:" = 0"},{name:"eos_token_id",val:" = 2"},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/vr_19907/src/transformers/models/roberta/configuration_roberta.py#L37"}}),Ln=new ae({props:{anchor:"transformers.RobertaConfig.example",$$slots:{default:[DM]},$$scope:{ctx:R}}}),Ia=new De({}),Da=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/vr_19907/src/transformers/models/roberta/tokenization_roberta.py#L107"}}),Nn=new ae({props:{anchor:"transformers.RobertaTokenizer.example",$$slots:{default:[SM]},$$scope:{ctx:R}}}),In=new fe({props:{$$slots:{default:[BM]},$$scope:{ctx:R}}}),Wa=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/vr_19907/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>
`}}),Ha=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/vr_19907/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>
`}}),Ka=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/vr_19907/src/transformers/models/roberta/tokenization_roberta.py#L396",returnDescription:`
<p>List of zeros.</p>
`,returnType:`
<p><code>List[int]</code></p>
`}}),Ja=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/vr_19907/src/transformers/models/roberta/tokenization_roberta.py#L315"}}),Va=new De({}),Ga=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/vr_19907/src/transformers/models/roberta/tokenization_roberta_fast.py#L76"}}),Wn=new ae({props:{anchor:"transformers.RobertaTokenizerFast.example",$$slots:{default:[WM]},$$scope:{ctx:R}}}),Un=new fe({props:{$$slots:{default:[UM]},$$scope:{ctx:R}}}),er=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/vr_19907/src/transformers/models/roberta/tokenization_roberta_fast.py#L279"}}),tr=new De({}),or=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/pr_19907/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/pr_19907/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/vr_19907/src/transformers/models/roberta/modeling_roberta.py#L691"}}),lr=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/pr_19907/en/model_doc/roberta#transformers.RobertaTokenizer">RobertaTokenizer</a>. See <a href="/docs/transformers/pr_19907/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_19907/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/pr_19907/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/vr_19907/src/transformers/models/roberta/modeling_roberta.py#L736",returnDescription:`
<p>A <a
  href="/docs/transformers/pr_19907/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/pr_19907/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/pr_19907/en/main_classes/output#transformers.modeling_outputs.BaseModelOutputWithPoolingAndCrossAttentions"
>transformers.modeling_outputs.BaseModelOutputWithPoolingAndCrossAttentions</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Kn=new fe({props:{$$slots:{default:[HM]},$$scope:{ctx:R}}}),Jn=new ae({props:{anchor:"transformers.RobertaModel.forward.example",$$slots:{default:[QM]},$$scope:{ctx:R}}}),dr=new De({}),cr=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/pr_19907/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/pr_19907/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/vr_19907/src/transformers/models/roberta/modeling_roberta.py#L877"}}),fr=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/pr_19907/en/model_doc/roberta#transformers.RobertaTokenizer">RobertaTokenizer</a>. See <a href="/docs/transformers/pr_19907/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_19907/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/pr_19907/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/vr_19907/src/transformers/models/roberta/modeling_roberta.py#L903",returnDescription:`
<p>A <a
  href="/docs/transformers/pr_19907/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/pr_19907/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/pr_19907/en/main_classes/output#transformers.modeling_outputs.CausalLMOutputWithCrossAttentions"
>transformers.modeling_outputs.CausalLMOutputWithCrossAttentions</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Gn=new fe({props:{$$slots:{default:[KM]},$$scope:{ctx:R}}}),Xn=new ae({props:{anchor:"transformers.RobertaForCausalLM.forward.example",$$slots:{default:[JM]},$$scope:{ctx:R}}}),gr=new De({}),_r=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/pr_19907/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/pr_19907/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/vr_19907/src/transformers/models/roberta/modeling_roberta.py#L1029"}}),wr=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/pr_19907/en/model_doc/roberta#transformers.RobertaTokenizer">RobertaTokenizer</a>. See <a href="/docs/transformers/pr_19907/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_19907/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/pr_19907/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/vr_19907/src/transformers/models/roberta/modeling_roberta.py#L1058",returnDescription:`
<p>A <a
  href="/docs/transformers/pr_19907/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/pr_19907/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/pr_19907/en/main_classes/output#transformers.modeling_outputs.MaskedLMOutput"
>transformers.modeling_outputs.MaskedLMOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Zn=new fe({props:{$$slots:{default:[VM]},$$scope:{ctx:R}}}),es=new ae({props:{anchor:"transformers.RobertaForMaskedLM.forward.example",$$slots:{default:[GM]},$$scope:{ctx:R}}}),ts=new ae({props:{anchor:"transformers.RobertaForMaskedLM.forward.example-2",$$slots:{default:[XM]},$$scope:{ctx:R}}}),Tr=new De({}),$r=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/pr_19907/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/pr_19907/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/vr_19907/src/transformers/models/roberta/modeling_roberta.py#L1164"}}),Er=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/pr_19907/en/model_doc/roberta#transformers.RobertaTokenizer">RobertaTokenizer</a>. See <a href="/docs/transformers/pr_19907/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_19907/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/pr_19907/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/vr_19907/src/transformers/models/roberta/modeling_roberta.py#L1178",returnDescription:`
<p>A <a
  href="/docs/transformers/pr_19907/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/pr_19907/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/pr_19907/en/main_classes/output#transformers.modeling_outputs.SequenceClassifierOutput"
>transformers.modeling_outputs.SequenceClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),ns=new fe({props:{$$slots:{default:[YM]},$$scope:{ctx:R}}}),ss=new ae({props:{anchor:"transformers.RobertaForSequenceClassification.forward.example",$$slots:{default:[ZM]},$$scope:{ctx:R}}}),as=new ae({props:{anchor:"transformers.RobertaForSequenceClassification.forward.example-2",$$slots:{default:[ez]},$$scope:{ctx:R}}}),rs=new ae({props:{anchor:"transformers.RobertaForSequenceClassification.forward.example-3",$$slots:{default:[tz]},$$scope:{ctx:R}}}),is=new ae({props:{anchor:"transformers.RobertaForSequenceClassification.forward.example-4",$$slots:{default:[oz]},$$scope:{ctx:R}}}),Mr=new De({}),zr=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/pr_19907/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/pr_19907/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/vr_19907/src/transformers/models/roberta/modeling_roberta.py#L1264"}}),Pr=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/pr_19907/en/model_doc/roberta#transformers.RobertaTokenizer">RobertaTokenizer</a>. See <a href="/docs/transformers/pr_19907/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_19907/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/pr_19907/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/vr_19907/src/transformers/models/roberta/modeling_roberta.py#L1277",returnDescription:`
<p>A <a
  href="/docs/transformers/pr_19907/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/pr_19907/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/pr_19907/en/main_classes/output#transformers.modeling_outputs.MultipleChoiceModelOutput"
>transformers.modeling_outputs.MultipleChoiceModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),ds=new fe({props:{$$slots:{default:[nz]},$$scope:{ctx:R}}}),cs=new ae({props:{anchor:"transformers.RobertaForMultipleChoice.forward.example",$$slots:{default:[sz]},$$scope:{ctx:R}}}),Ar=new De({}),Lr=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/pr_19907/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/pr_19907/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/vr_19907/src/transformers/models/roberta/modeling_roberta.py#L1357"}}),Dr=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/pr_19907/en/model_doc/roberta#transformers.RobertaTokenizer">RobertaTokenizer</a>. See <a href="/docs/transformers/pr_19907/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_19907/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/pr_19907/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/vr_19907/src/transformers/models/roberta/modeling_roberta.py#L1375",returnDescription:`
<p>A <a
  href="/docs/transformers/pr_19907/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/pr_19907/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/pr_19907/en/main_classes/output#transformers.modeling_outputs.TokenClassifierOutput"
>transformers.modeling_outputs.TokenClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),hs=new fe({props:{$$slots:{default:[az]},$$scope:{ctx:R}}}),us=new ae({props:{anchor:"transformers.RobertaForTokenClassification.forward.example",$$slots:{default:[rz]},$$scope:{ctx:R}}}),ms=new ae({props:{anchor:"transformers.RobertaForTokenClassification.forward.example-2",$$slots:{default:[iz]},$$scope:{ctx:R}}}),Sr=new De({}),Br=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/pr_19907/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/pr_19907/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/vr_19907/src/transformers/models/roberta/modeling_roberta.py#L1466"}}),Qr=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/pr_19907/en/model_doc/roberta#transformers.RobertaTokenizer">RobertaTokenizer</a>. See <a href="/docs/transformers/pr_19907/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_19907/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/pr_19907/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/vr_19907/src/transformers/models/roberta/modeling_roberta.py#L1480",returnDescription:`
<p>A <a
  href="/docs/transformers/pr_19907/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/pr_19907/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/pr_19907/en/main_classes/output#transformers.modeling_outputs.QuestionAnsweringModelOutput"
>transformers.modeling_outputs.QuestionAnsweringModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),gs=new fe({props:{$$slots:{default:[lz]},$$scope:{ctx:R}}}),_s=new ae({props:{anchor:"transformers.RobertaForQuestionAnswering.forward.example",$$slots:{default:[dz]},$$scope:{ctx:R}}}),bs=new ae({props:{anchor:"transformers.RobertaForQuestionAnswering.forward.example-2",$$slots:{default:[cz]},$$scope:{ctx:R}}}),Kr=new De({}),Jr=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/pr_19907/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/pr_19907/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/vr_19907/src/transformers/models/roberta/modeling_tf_roberta.py#L924"}}),ys=new fe({props:{$$slots:{default:[pz]},$$scope:{ctx:R}}}),Yr=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[tensorflow.python.keras.engine.keras_tensor.KerasTensor], typing.Dict[str, tensorflow.python.framework.ops.Tensor], typing.Dict[str, numpy.ndarray], typing.Dict[str, tensorflow.python.keras.engine.keras_tensor.KerasTensor], tensorflow.python.framework.ops.Tensor, numpy.ndarray, tensorflow.python.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/pr_19907/en/model_doc/roberta#transformers.RobertaTokenizer">RobertaTokenizer</a>. See <a href="/docs/transformers/pr_19907/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/pr_19907/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/pr_19907/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/vr_19907/src/transformers/models/roberta/modeling_tf_roberta.py#L929",returnDescription:`
<p>A <a
  href="/docs/transformers/pr_19907/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/pr_19907/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/pr_19907/en/main_classes/output#transformers.modeling_tf_outputs.TFBaseModelOutputWithPoolingAndCrossAttentions"
>transformers.modeling_tf_outputs.TFBaseModelOutputWithPoolingAndCrossAttentions</a> or <code>tuple(tf.Tensor)</code></p>
`}}),vs=new fe({props:{$$slots:{default:[hz]},$$scope:{ctx:R}}}),ws=new ae({props:{anchor:"transformers.TFRobertaModel.call.example",$$slots:{default:[uz]},$$scope:{ctx:R}}}),Zr=new De({}),ei=new O({props:{name:"class transformers.TFRobertaForCausalLM",anchor:"transformers.TFRobertaForCausalLM",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/vr_19907/src/transformers/models/roberta/modeling_tf_roberta.py#L1153"}}),ti=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[tensorflow.python.keras.engine.keras_tensor.KerasTensor], typing.Dict[str, tensorflow.python.framework.ops.Tensor], typing.Dict[str, numpy.ndarray], typing.Dict[str, tensorflow.python.keras.engine.keras_tensor.KerasTensor], tensorflow.python.framework.ops.Tensor, numpy.ndarray, tensorflow.python.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/pr_19907/en/model_doc/roberta#transformers.RobertaTokenizer">RobertaTokenizer</a>. See <a href="/docs/transformers/pr_19907/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/pr_19907/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/pr_19907/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/vr_19907/src/transformers/models/roberta/modeling_tf_roberta.py#L1186",returnDescription:`
<p>A <a
  href="/docs/transformers/pr_19907/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/pr_19907/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/pr_19907/en/main_classes/output#transformers.modeling_tf_outputs.TFCausalLMOutputWithCrossAttentions"
>transformers.modeling_tf_outputs.TFCausalLMOutputWithCrossAttentions</a> or <code>tuple(tf.Tensor)</code></p>
`}}),$s=new fe({props:{$$slots:{default:[mz]},$$scope:{ctx:R}}}),Fs=new ae({props:{anchor:"transformers.TFRobertaForCausalLM.call.example",$$slots:{default:[fz]},$$scope:{ctx:R}}}),oi=new De({}),ni=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/pr_19907/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/pr_19907/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/vr_19907/src/transformers/models/roberta/modeling_tf_roberta.py#L1068"}}),Rs=new fe({props:{$$slots:{default:[gz]},$$scope:{ctx:R}}}),li=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[tensorflow.python.keras.engine.keras_tensor.KerasTensor], typing.Dict[str, tensorflow.python.framework.ops.Tensor], typing.Dict[str, numpy.ndarray], typing.Dict[str, tensorflow.python.keras.engine.keras_tensor.KerasTensor], tensorflow.python.framework.ops.Tensor, numpy.ndarray, tensorflow.python.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/pr_19907/en/model_doc/roberta#transformers.RobertaTokenizer">RobertaTokenizer</a>. See <a href="/docs/transformers/pr_19907/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/pr_19907/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/pr_19907/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/vr_19907/src/transformers/models/roberta/modeling_tf_roberta.py#L1085",returnDescription:`
<p>A <a
  href="/docs/transformers/pr_19907/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/pr_19907/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/pr_19907/en/main_classes/output#transformers.modeling_tf_outputs.TFMaskedLMOutput"
>transformers.modeling_tf_outputs.TFMaskedLMOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),Es=new fe({props:{$$slots:{default:[_z]},$$scope:{ctx:R}}}),Ms=new ae({props:{anchor:"transformers.TFRobertaForMaskedLM.call.example",$$slots:{default:[bz]},$$scope:{ctx:R}}}),zs=new ae({props:{anchor:"transformers.TFRobertaForMaskedLM.call.example-2",$$slots:{default:[kz]},$$scope:{ctx:R}}}),di=new De({}),ci=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/pr_19907/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/pr_19907/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/vr_19907/src/transformers/models/roberta/modeling_tf_roberta.py#L1333"}}),js=new fe({props:{$$slots:{default:[yz]},$$scope:{ctx:R}}}),mi=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[tensorflow.python.keras.engine.keras_tensor.KerasTensor], typing.Dict[str, tensorflow.python.framework.ops.Tensor], typing.Dict[str, numpy.ndarray], typing.Dict[str, tensorflow.python.keras.engine.keras_tensor.KerasTensor], tensorflow.python.framework.ops.Tensor, numpy.ndarray, tensorflow.python.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/pr_19907/en/model_doc/roberta#transformers.RobertaTokenizer">RobertaTokenizer</a>. See <a href="/docs/transformers/pr_19907/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/pr_19907/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/pr_19907/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/vr_19907/src/transformers/models/roberta/modeling_tf_roberta.py#L1344",returnDescription:`
<p>A <a
  href="/docs/transformers/pr_19907/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/pr_19907/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/pr_19907/en/main_classes/output#transformers.modeling_tf_outputs.TFSequenceClassifierOutput"
>transformers.modeling_tf_outputs.TFSequenceClassifierOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),Cs=new fe({props:{$$slots:{default:[vz]},$$scope:{ctx:R}}}),Ps=new ae({props:{anchor:"transformers.TFRobertaForSequenceClassification.call.example",$$slots:{default:[wz]},$$scope:{ctx:R}}}),As=new ae({props:{anchor:"transformers.TFRobertaForSequenceClassification.call.example-2",$$slots:{default:[Tz]},$$scope:{ctx:R}}}),fi=new De({}),gi=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/pr_19907/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/pr_19907/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/vr_19907/src/transformers/models/roberta/modeling_tf_roberta.py#L1417"}}),Os=new fe({props:{$$slots:{default:[$z]},$$scope:{ctx:R}}}),yi=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[tensorflow.python.keras.engine.keras_tensor.KerasTensor], typing.Dict[str, tensorflow.python.framework.ops.Tensor], typing.Dict[str, numpy.ndarray], typing.Dict[str, tensorflow.python.keras.engine.keras_tensor.KerasTensor], tensorflow.python.framework.ops.Tensor, numpy.ndarray, tensorflow.python.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/pr_19907/en/model_doc/roberta#transformers.RobertaTokenizer">RobertaTokenizer</a>. See <a href="/docs/transformers/pr_19907/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/pr_19907/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/pr_19907/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/vr_19907/src/transformers/models/roberta/modeling_tf_roberta.py#L1441",returnDescription:`
<p>A <a
  href="/docs/transformers/pr_19907/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/pr_19907/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/pr_19907/en/main_classes/output#transformers.modeling_tf_outputs.TFMultipleChoiceModelOutput"
>transformers.modeling_tf_outputs.TFMultipleChoiceModelOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),Ns=new fe({props:{$$slots:{default:[Fz]},$$scope:{ctx:R}}}),Is=new ae({props:{anchor:"transformers.TFRobertaForMultipleChoice.call.example",$$slots:{default:[xz]},$$scope:{ctx:R}}}),vi=new De({}),wi=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/pr_19907/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/pr_19907/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/vr_19907/src/transformers/models/roberta/modeling_tf_roberta.py#L1538"}}),Ss=new fe({props:{$$slots:{default:[Rz]},$$scope:{ctx:R}}}),xi=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[tensorflow.python.keras.engine.keras_tensor.KerasTensor], typing.Dict[str, tensorflow.python.framework.ops.Tensor], typing.Dict[str, numpy.ndarray], typing.Dict[str, tensorflow.python.keras.engine.keras_tensor.KerasTensor], tensorflow.python.framework.ops.Tensor, numpy.ndarray, tensorflow.python.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/pr_19907/en/model_doc/roberta#transformers.RobertaTokenizer">RobertaTokenizer</a>. See <a href="/docs/transformers/pr_19907/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/pr_19907/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/pr_19907/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/vr_19907/src/transformers/models/roberta/modeling_tf_roberta.py#L1556",returnDescription:`
<p>A <a
  href="/docs/transformers/pr_19907/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/pr_19907/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/pr_19907/en/main_classes/output#transformers.modeling_tf_outputs.TFTokenClassifierOutput"
>transformers.modeling_tf_outputs.TFTokenClassifierOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),Bs=new fe({props:{$$slots:{default:[Ez]},$$scope:{ctx:R}}}),Ws=new ae({props:{anchor:"transformers.TFRobertaForTokenClassification.call.example",$$slots:{default:[Mz]},$$scope:{ctx:R}}}),Us=new ae({props:{anchor:"transformers.TFRobertaForTokenClassification.call.example-2",$$slots:{default:[zz]},$$scope:{ctx:R}}}),Ri=new De({}),Ei=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/pr_19907/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/pr_19907/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/vr_19907/src/transformers/models/roberta/modeling_tf_roberta.py#L1629"}}),Qs=new fe({props:{$$slots:{default:[qz]},$$scope:{ctx:R}}}),ji=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[tensorflow.python.keras.engine.keras_tensor.KerasTensor], typing.Dict[str, tensorflow.python.framework.ops.Tensor], typing.Dict[str, numpy.ndarray], typing.Dict[str, tensorflow.python.keras.engine.keras_tensor.KerasTensor], tensorflow.python.framework.ops.Tensor, numpy.ndarray, tensorflow.python.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/pr_19907/en/model_doc/roberta#transformers.RobertaTokenizer">RobertaTokenizer</a>. See <a href="/docs/transformers/pr_19907/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/pr_19907/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/pr_19907/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/vr_19907/src/transformers/models/roberta/modeling_tf_roberta.py#L1642",returnDescription:`
<p>A <a
  href="/docs/transformers/pr_19907/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/pr_19907/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/pr_19907/en/main_classes/output#transformers.modeling_tf_outputs.TFQuestionAnsweringModelOutput"
>transformers.modeling_tf_outputs.TFQuestionAnsweringModelOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),Ks=new fe({props:{$$slots:{default:[jz]},$$scope:{ctx:R}}}),Js=new ae({props:{anchor:"transformers.TFRobertaForQuestionAnswering.call.example",$$slots:{default:[Cz]},$$scope:{ctx:R}}}),Vs=new ae({props:{anchor:"transformers.TFRobertaForQuestionAnswering.call.example-2",$$slots:{default:[Pz]},$$scope:{ctx:R}}}),Ci=new De({}),Pi=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/pr_19907/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/pr_19907/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/vr_19907/src/transformers/models/roberta/modeling_flax_roberta.py#L989"}}),Bi=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/pr_19907/en/model_doc/bert#transformers.BertTokenizer">BertTokenizer</a>. See <a href="/docs/transformers/pr_19907/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_19907/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/pr_19907/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/vr_19907/src/transformers/models/roberta/modeling_flax_roberta.py#L815",returnDescription:`
<p>A <a
  href="/docs/transformers/pr_19907/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/pr_19907/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/pr_19907/en/main_classes/output#transformers.modeling_flax_outputs.FlaxBaseModelOutputWithPooling"
>transformers.modeling_flax_outputs.FlaxBaseModelOutputWithPooling</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Xs=new fe({props:{$$slots:{default:[Az]},$$scope:{ctx:R}}}),Ys=new ae({props:{anchor:"transformers.FlaxRobertaModel.__call__.example",$$slots:{default:[Lz]},$$scope:{ctx:R}}}),Wi=new De({}),Ui=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/pr_19907/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/pr_19907/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/vr_19907/src/transformers/models/roberta/modeling_flax_roberta.py#L1458"}}),Yi=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/pr_19907/en/model_doc/bert#transformers.BertTokenizer">BertTokenizer</a>. See <a href="/docs/transformers/pr_19907/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_19907/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/pr_19907/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/vr_19907/src/transformers/models/roberta/modeling_flax_roberta.py#L815",returnDescription:`
<p>A <a
  href="/docs/transformers/pr_19907/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/pr_19907/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/pr_19907/en/main_classes/output#transformers.modeling_flax_outputs.FlaxCausalLMOutputWithCrossAttentions"
>transformers.modeling_flax_outputs.FlaxCausalLMOutputWithCrossAttentions</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),ea=new fe({props:{$$slots:{default:[Oz]},$$scope:{ctx:R}}}),ta=new ae({props:{anchor:"transformers.FlaxRobertaForCausalLM.__call__.example",$$slots:{default:[Nz]},$$scope:{ctx:R}}}),Zi=new De({}),el=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/pr_19907/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/pr_19907/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/vr_19907/src/transformers/models/roberta/modeling_flax_roberta.py#L1057"}}),dl=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/pr_19907/en/model_doc/bert#transformers.BertTokenizer">BertTokenizer</a>. See <a href="/docs/transformers/pr_19907/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_19907/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/pr_19907/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/vr_19907/src/transformers/models/roberta/modeling_flax_roberta.py#L815",returnDescription:`
<p>A <a
  href="/docs/transformers/pr_19907/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/pr_19907/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/pr_19907/en/main_classes/output#transformers.modeling_flax_outputs.FlaxBaseModelOutputWithPooling"
>transformers.modeling_flax_outputs.FlaxBaseModelOutputWithPooling</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),na=new fe({props:{$$slots:{default:[Iz]},$$scope:{ctx:R}}}),sa=new ae({props:{anchor:"transformers.FlaxRobertaForMaskedLM.__call__.example",$$slots:{default:[Dz]},$$scope:{ctx:R}}}),cl=new De({}),pl=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/pr_19907/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/pr_19907/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/vr_19907/src/transformers/models/roberta/modeling_flax_roberta.py#L1130"}}),kl=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/pr_19907/en/model_doc/bert#transformers.BertTokenizer">BertTokenizer</a>. See <a href="/docs/transformers/pr_19907/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_19907/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/pr_19907/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/vr_19907/src/transformers/models/roberta/modeling_flax_roberta.py#L815",returnDescription:`
<p>A <a
  href="/docs/transformers/pr_19907/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/pr_19907/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/pr_19907/en/main_classes/output#transformers.modeling_flax_outputs.FlaxSequenceClassifierOutput"
>transformers.modeling_flax_outputs.FlaxSequenceClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),ra=new fe({props:{$$slots:{default:[Sz]},$$scope:{ctx:R}}}),ia=new ae({props:{anchor:"transformers.FlaxRobertaForSequenceClassification.__call__.example",$$slots:{default:[Bz]},$$scope:{ctx:R}}}),yl=new De({}),vl=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/pr_19907/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/pr_19907/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/vr_19907/src/transformers/models/roberta/modeling_flax_roberta.py#L1212"}}),Ml=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/pr_19907/en/model_doc/bert#transformers.BertTokenizer">BertTokenizer</a>. See <a href="/docs/transformers/pr_19907/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_19907/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/pr_19907/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/vr_19907/src/transformers/models/roberta/modeling_flax_roberta.py#L815",returnDescription:`
<p>A <a
  href="/docs/transformers/pr_19907/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/pr_19907/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/pr_19907/en/main_classes/output#transformers.modeling_flax_outputs.FlaxMultipleChoiceModelOutput"
>transformers.modeling_flax_outputs.FlaxMultipleChoiceModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),da=new fe({props:{$$slots:{default:[Wz]},$$scope:{ctx:R}}}),ca=new ae({props:{anchor:"transformers.FlaxRobertaForMultipleChoice.__call__.example",$$slots:{default:[Uz]},$$scope:{ctx:R}}}),zl=new De({}),ql=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/pr_19907/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/pr_19907/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/vr_19907/src/transformers/models/roberta/modeling_flax_roberta.py#L1295"}}),Il=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/pr_19907/en/model_doc/bert#transformers.BertTokenizer">BertTokenizer</a>. See <a href="/docs/transformers/pr_19907/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_19907/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/pr_19907/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/vr_19907/src/transformers/models/roberta/modeling_flax_roberta.py#L815",returnDescription:`
<p>A <a
  href="/docs/transformers/pr_19907/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/pr_19907/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/pr_19907/en/main_classes/output#transformers.modeling_flax_outputs.FlaxTokenClassifierOutput"
>transformers.modeling_flax_outputs.FlaxTokenClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),ha=new fe({props:{$$slots:{default:[Hz]},$$scope:{ctx:R}}}),ua=new ae({props:{anchor:"transformers.FlaxRobertaForTokenClassification.__call__.example",$$slots:{default:[Qz]},$$scope:{ctx:R}}}),Dl=new De({}),Sl=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/pr_19907/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/pr_19907/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/vr_19907/src/transformers/models/roberta/modeling_flax_roberta.py#L1373"}}),Vl=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/pr_19907/en/model_doc/bert#transformers.BertTokenizer">BertTokenizer</a>. See <a href="/docs/transformers/pr_19907/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_19907/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/pr_19907/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/vr_19907/src/transformers/models/roberta/modeling_flax_roberta.py#L815",returnDescription:`
<p>A <a
  href="/docs/transformers/pr_19907/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/pr_19907/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/pr_19907/en/main_classes/output#transformers.modeling_flax_outputs.FlaxQuestionAnsweringModelOutput"
>transformers.modeling_flax_outputs.FlaxQuestionAnsweringModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),fa=new fe({props:{$$slots:{default:[Kz]},$$scope:{ctx:R}}}),ga=new ae({props:{anchor:"transformers.FlaxRobertaForQuestionAnswering.__call__.example",$$slots:{default:[Jz]},$$scope:{ctx:R}}}),{c(){d=a("meta"),g=h(),c=a("h1"),m=a("a"),_=a("span"),v(l.$$.fragment),p=h(),E=a("span"),le=n("RoBERTa"),Z=h(),N=a("h2"),te=a("a"),oe=a("span"),v(M.$$.fragment),we=h(),K=a("span"),Te=n("Overview"),ge=h(),B=a("p"),$e=n("The RoBERTa model was proposed in "),pe=a("a"),J=n("RoBERTa: A Robustly Optimized BERT Pretraining Approach"),Fe=n(` 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=h(),U=a("p"),xe=n(`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=h(),H=a("p"),Re=n("The abstract from the paper is the following:"),ke=h(),ee=a("p"),j=a("em"),P=n(`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=h(),Q=a("p"),Ee=n("Tips:"),ve=h(),I=a("ul"),he=a("li"),Me=n("This implementation is the same as "),C=a("a"),ze=n("BertModel"),V=n(` with a tiny embeddings tweak as well as a setup
for Roberta pretrained models.`),qe=h(),ue=a("li"),G=n(`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.`),je=h(),ne=a("li"),D=n("RoBERTa doesn\u2019t have "),me=a("code"),X=n("token_type_ids"),Ce=n(`, you don\u2019t need to indicate which token belongs to which segment. Just
separate your segments with the separation token `),se=a("code"),A=n("tokenizer.sep_token"),Pe=n(" (or "),L=a("code"),Ae=n("</s>"),Le=n(")"),y=h(),z=a("li"),He=a("a"),de=n("CamemBERT"),Xe=n(" is a wrapper around RoBERTa. Refer to this page for usage examples."),Je=h(),q=a("p"),Ye=n("This model was contributed by "),Se=a("a"),Ze=n("julien-c"),et=n(". The original code can be found "),Be=a("a"),S=n("here"),Y=n("."),Ve=h(),Oe=a("h2"),W=a("a"),Qe=a("span"),v(We.$$.fragment),Ne=h(),Ke=a("span"),ce=n("RobertaConfig"),Ge=h(),yt=a("div"),v(Oa.$$.fragment),mg=h(),co=a("p"),fg=n("This is the configuration class to store the configuration of a "),id=a("a"),gg=n("RobertaModel"),_g=n(" or a "),ld=a("a"),bg=n("TFRobertaModel"),kg=n(`. 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
`),Na=a("a"),yg=n("roberta-base"),vg=n(" architecture."),wg=h(),Ao=a("p"),Tg=n("Configuration objects inherit from "),dd=a("a"),$g=n("PretrainedConfig"),Fg=n(` and can be used to control the model outputs. Read the
documentation from `),cd=a("a"),xg=n("PretrainedConfig"),Rg=n(" for more information."),Eg=h(),Lo=a("p"),Mg=n("The "),pd=a("a"),zg=n("RobertaConfig"),qg=n(" class directly inherits "),hd=a("a"),jg=n("BertConfig"),Cg=n(`. It reuses the same defaults. Please check the parent
class for more information.`),Pg=h(),v(Ln.$$.fragment),om=h(),Oo=a("h2"),On=a("a"),xc=a("span"),v(Ia.$$.fragment),Ag=h(),Rc=a("span"),Lg=n("RobertaTokenizer"),nm=h(),Ie=a("div"),v(Da.$$.fragment),Og=h(),Ec=a("p"),Ng=n("Constructs a RoBERTa tokenizer, derived from the GPT-2 tokenizer, using byte-level Byte-Pair-Encoding."),Ig=h(),Mc=a("p"),Dg=n("This tokenizer has been trained to treat spaces like parts of the tokens (a bit like sentencepiece) so a word will"),Sg=h(),v(Nn.$$.fragment),Bg=h(),Sa=a("p"),Wg=n("You can get around that behavior by passing "),zc=a("code"),Ug=n("add_prefix_space=True"),Hg=n(` 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.`),Qg=h(),v(In.$$.fragment),Kg=h(),Ba=a("p"),Jg=n("This tokenizer inherits from "),ud=a("a"),Vg=n("PreTrainedTokenizer"),Gg=n(` which contains most of the main methods. Users should refer to
this superclass for more information regarding those methods.`),Xg=h(),vo=a("div"),v(Wa.$$.fragment),Yg=h(),qc=a("p"),Zg=n(`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:`),e_=h(),Ua=a("ul"),md=a("li"),t_=n("single sequence: "),jc=a("code"),o_=n("<s> X </s>"),n_=h(),fd=a("li"),s_=n("pair of sequences: "),Cc=a("code"),a_=n("<s> A </s></s> B </s>"),r_=h(),Dn=a("div"),v(Ha.$$.fragment),i_=h(),Qa=a("p"),l_=n(`Retrieve sequence ids from a token list that has no special tokens added. This method is called when adding
special tokens using the tokenizer `),Pc=a("code"),d_=n("prepare_for_model"),c_=n(" method."),p_=h(),Sn=a("div"),v(Ka.$$.fragment),h_=h(),Ac=a("p"),u_=n(`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.`),m_=h(),gd=a("div"),v(Ja.$$.fragment),sm=h(),No=a("h2"),Bn=a("a"),Lc=a("span"),v(Va.$$.fragment),f_=h(),Oc=a("span"),g_=n("RobertaTokenizerFast"),am=h(),tt=a("div"),v(Ga.$$.fragment),__=h(),Xa=a("p"),b_=n("Construct a \u201Cfast\u201D RoBERTa tokenizer (backed by HuggingFace\u2019s "),Nc=a("em"),k_=n("tokenizers"),y_=n(` library), derived from the GPT-2
tokenizer, using byte-level Byte-Pair-Encoding.`),v_=h(),Ic=a("p"),w_=n("This tokenizer has been trained to treat spaces like parts of the tokens (a bit like sentencepiece) so a word will"),T_=h(),v(Wn.$$.fragment),$_=h(),Ya=a("p"),F_=n("You can get around that behavior by passing "),Dc=a("code"),x_=n("add_prefix_space=True"),R_=n(` 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.`),E_=h(),v(Un.$$.fragment),M_=h(),Za=a("p"),z_=n("This tokenizer inherits from "),_d=a("a"),q_=n("PreTrainedTokenizerFast"),j_=n(` which contains most of the main methods. Users should
refer to this superclass for more information regarding those methods.`),C_=h(),bd=a("div"),v(er.$$.fragment),rm=h(),Io=a("h2"),Hn=a("a"),Sc=a("span"),v(tr.$$.fragment),P_=h(),Bc=a("span"),A_=n("RobertaModel"),im=h(),ot=a("div"),v(or.$$.fragment),L_=h(),Wc=a("p"),O_=n("The bare RoBERTa Model transformer outputting raw hidden-states without any specific head on top."),N_=h(),nr=a("p"),I_=n("This model inherits from "),kd=a("a"),D_=n("PreTrainedModel"),S_=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.)`),B_=h(),sr=a("p"),W_=n("This model is also a PyTorch "),ar=a("a"),U_=n("torch.nn.Module"),H_=n(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Q_=h(),rr=a("p"),K_=n(`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 `),Uc=a("em"),J_=n(`Attention is
all you need`),V_=n(`_ by Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N. Gomez, Lukasz
Kaiser and Illia Polosukhin.`),G_=h(),pt=a("p"),X_=n("To behave as an decoder the model needs to be initialized with the "),Hc=a("code"),Y_=n("is_decoder"),Z_=n(` argument of the configuration set
to `),Qc=a("code"),eb=n("True"),tb=n(". To be used in a Seq2Seq model, the model needs to initialized with both "),Kc=a("code"),ob=n("is_decoder"),nb=n(` argument and
`),Jc=a("code"),sb=n("add_cross_attention"),ab=n(" set to "),Vc=a("code"),rb=n("True"),ib=n("; an "),Gc=a("code"),lb=n("encoder_hidden_states"),db=n(" is then expected as an input to the forward pass."),cb=h(),Qn=a("p"),pb=n(".. _"),Xc=a("em"),hb=n("Attention is all you need"),ub=n(": "),ir=a("a"),mb=n("https://arxiv.org/abs/1706.03762"),fb=h(),Ut=a("div"),v(lr.$$.fragment),gb=h(),Do=a("p"),_b=n("The "),yd=a("a"),bb=n("RobertaModel"),kb=n(" forward method, overrides the "),Yc=a("code"),yb=n("__call__"),vb=n(" special method."),wb=h(),v(Kn.$$.fragment),Tb=h(),v(Jn.$$.fragment),lm=h(),So=a("h2"),Vn=a("a"),Zc=a("span"),v(dr.$$.fragment),$b=h(),ep=a("span"),Fb=n("RobertaForCausalLM"),dm=h(),vt=a("div"),v(cr.$$.fragment),xb=h(),pr=a("p"),Rb=n("RoBERTa Model with a "),tp=a("code"),Eb=n("language modeling"),Mb=n(" head on top for CLM fine-tuning."),zb=h(),hr=a("p"),qb=n("This model inherits from "),vd=a("a"),jb=n("PreTrainedModel"),Cb=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.)`),Pb=h(),ur=a("p"),Ab=n("This model is also a PyTorch "),mr=a("a"),Lb=n("torch.nn.Module"),Ob=n(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Nb=h(),Ht=a("div"),v(fr.$$.fragment),Ib=h(),Bo=a("p"),Db=n("The "),wd=a("a"),Sb=n("RobertaForCausalLM"),Bb=n(" forward method, overrides the "),op=a("code"),Wb=n("__call__"),Ub=n(" special method."),Hb=h(),v(Gn.$$.fragment),Qb=h(),v(Xn.$$.fragment),cm=h(),Wo=a("h2"),Yn=a("a"),np=a("span"),v(gr.$$.fragment),Kb=h(),sp=a("span"),Jb=n("RobertaForMaskedLM"),pm=h(),wt=a("div"),v(_r.$$.fragment),Vb=h(),br=a("p"),Gb=n("RoBERTa Model with a "),ap=a("code"),Xb=n("language modeling"),Yb=n(" head on top."),Zb=h(),kr=a("p"),ek=n("This model inherits from "),Td=a("a"),tk=n("PreTrainedModel"),ok=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.)`),nk=h(),yr=a("p"),sk=n("This model is also a PyTorch "),vr=a("a"),ak=n("torch.nn.Module"),rk=n(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),ik=h(),Rt=a("div"),v(wr.$$.fragment),lk=h(),Uo=a("p"),dk=n("The "),$d=a("a"),ck=n("RobertaForMaskedLM"),pk=n(" forward method, overrides the "),rp=a("code"),hk=n("__call__"),uk=n(" special method."),mk=h(),v(Zn.$$.fragment),fk=h(),v(es.$$.fragment),gk=h(),v(ts.$$.fragment),hm=h(),Ho=a("h2"),os=a("a"),ip=a("span"),v(Tr.$$.fragment),_k=h(),lp=a("span"),bk=n("RobertaForSequenceClassification"),um=h(),Tt=a("div"),v($r.$$.fragment),kk=h(),dp=a("p"),yk=n(`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.`),vk=h(),Fr=a("p"),wk=n("This model inherits from "),Fd=a("a"),Tk=n("PreTrainedModel"),$k=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.)`),Fk=h(),xr=a("p"),xk=n("This model is also a PyTorch "),Rr=a("a"),Rk=n("torch.nn.Module"),Ek=n(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Mk=h(),ct=a("div"),v(Er.$$.fragment),zk=h(),Qo=a("p"),qk=n("The "),xd=a("a"),jk=n("RobertaForSequenceClassification"),Ck=n(" forward method, overrides the "),cp=a("code"),Pk=n("__call__"),Ak=n(" special method."),Lk=h(),v(ns.$$.fragment),Ok=h(),v(ss.$$.fragment),Nk=h(),v(as.$$.fragment),Ik=h(),v(rs.$$.fragment),Dk=h(),v(is.$$.fragment),mm=h(),Ko=a("h2"),ls=a("a"),pp=a("span"),v(Mr.$$.fragment),Sk=h(),hp=a("span"),Bk=n("RobertaForMultipleChoice"),fm=h(),$t=a("div"),v(zr.$$.fragment),Wk=h(),up=a("p"),Uk=n(`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.`),Hk=h(),qr=a("p"),Qk=n("This model inherits from "),Rd=a("a"),Kk=n("PreTrainedModel"),Jk=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.)`),Vk=h(),jr=a("p"),Gk=n("This model is also a PyTorch "),Cr=a("a"),Xk=n("torch.nn.Module"),Yk=n(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Zk=h(),Qt=a("div"),v(Pr.$$.fragment),ey=h(),Jo=a("p"),ty=n("The "),Ed=a("a"),oy=n("RobertaForMultipleChoice"),ny=n(" forward method, overrides the "),mp=a("code"),sy=n("__call__"),ay=n(" special method."),ry=h(),v(ds.$$.fragment),iy=h(),v(cs.$$.fragment),gm=h(),Vo=a("h2"),ps=a("a"),fp=a("span"),v(Ar.$$.fragment),ly=h(),gp=a("span"),dy=n("RobertaForTokenClassification"),_m=h(),Ft=a("div"),v(Lr.$$.fragment),cy=h(),_p=a("p"),py=n(`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.`),hy=h(),Or=a("p"),uy=n("This model inherits from "),Md=a("a"),my=n("PreTrainedModel"),fy=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.)`),gy=h(),Nr=a("p"),_y=n("This model is also a PyTorch "),Ir=a("a"),by=n("torch.nn.Module"),ky=n(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),yy=h(),Et=a("div"),v(Dr.$$.fragment),vy=h(),Go=a("p"),wy=n("The "),zd=a("a"),Ty=n("RobertaForTokenClassification"),$y=n(" forward method, overrides the "),bp=a("code"),Fy=n("__call__"),xy=n(" special method."),Ry=h(),v(hs.$$.fragment),Ey=h(),v(us.$$.fragment),My=h(),v(ms.$$.fragment),bm=h(),Xo=a("h2"),fs=a("a"),kp=a("span"),v(Sr.$$.fragment),zy=h(),yp=a("span"),qy=n("RobertaForQuestionAnswering"),km=h(),xt=a("div"),v(Br.$$.fragment),jy=h(),Yo=a("p"),Cy=n(`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 `),vp=a("code"),Py=n("span start logits"),Ay=n(" and "),wp=a("code"),Ly=n("span end logits"),Oy=n(")."),Ny=h(),Wr=a("p"),Iy=n("This model inherits from "),qd=a("a"),Dy=n("PreTrainedModel"),Sy=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.)`),By=h(),Ur=a("p"),Wy=n("This model is also a PyTorch "),Hr=a("a"),Uy=n("torch.nn.Module"),Hy=n(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Qy=h(),Mt=a("div"),v(Qr.$$.fragment),Ky=h(),Zo=a("p"),Jy=n("The "),jd=a("a"),Vy=n("RobertaForQuestionAnswering"),Gy=n(" forward method, overrides the "),Tp=a("code"),Xy=n("__call__"),Yy=n(" special method."),Zy=h(),v(gs.$$.fragment),ev=h(),v(_s.$$.fragment),tv=h(),v(bs.$$.fragment),ym=h(),en=a("h2"),ks=a("a"),$p=a("span"),v(Kr.$$.fragment),ov=h(),Fp=a("span"),nv=n("TFRobertaModel"),vm=h(),ht=a("div"),v(Jr.$$.fragment),sv=h(),xp=a("p"),av=n("The bare RoBERTa Model transformer outputting raw hidden-states without any specific head on top."),rv=h(),Vr=a("p"),iv=n("This model inherits from "),Cd=a("a"),lv=n("TFPreTrainedModel"),dv=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.)`),cv=h(),Gr=a("p"),pv=n("This model is also a "),Xr=a("a"),hv=n("tf.keras.Model"),uv=n(` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),mv=h(),v(ys.$$.fragment),fv=h(),Kt=a("div"),v(Yr.$$.fragment),gv=h(),tn=a("p"),_v=n("The "),Pd=a("a"),bv=n("TFRobertaModel"),kv=n(" forward method, overrides the "),Rp=a("code"),yv=n("__call__"),vv=n(" special method."),wv=h(),v(vs.$$.fragment),Tv=h(),v(ws.$$.fragment),wm=h(),on=a("h2"),Ts=a("a"),Ep=a("span"),v(Zr.$$.fragment),$v=h(),Mp=a("span"),Fv=n("TFRobertaForCausalLM"),Tm=h(),nn=a("div"),v(ei.$$.fragment),xv=h(),Jt=a("div"),v(ti.$$.fragment),Rv=h(),sn=a("p"),Ev=n("The "),Ad=a("a"),Mv=n("TFRobertaForCausalLM"),zv=n(" forward method, overrides the "),zp=a("code"),qv=n("__call__"),jv=n(" special method."),Cv=h(),v($s.$$.fragment),Pv=h(),v(Fs.$$.fragment),$m=h(),an=a("h2"),xs=a("a"),qp=a("span"),v(oi.$$.fragment),Av=h(),jp=a("span"),Lv=n("TFRobertaForMaskedLM"),Fm=h(),ut=a("div"),v(ni.$$.fragment),Ov=h(),si=a("p"),Nv=n("RoBERTa Model with a "),Cp=a("code"),Iv=n("language modeling"),Dv=n(" head on top."),Sv=h(),ai=a("p"),Bv=n("This model inherits from "),Ld=a("a"),Wv=n("TFPreTrainedModel"),Uv=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.)`),Hv=h(),ri=a("p"),Qv=n("This model is also a "),ii=a("a"),Kv=n("tf.keras.Model"),Jv=n(` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),Vv=h(),v(Rs.$$.fragment),Gv=h(),zt=a("div"),v(li.$$.fragment),Xv=h(),rn=a("p"),Yv=n("The "),Od=a("a"),Zv=n("TFRobertaForMaskedLM"),ew=n(" forward method, overrides the "),Pp=a("code"),tw=n("__call__"),ow=n(" special method."),nw=h(),v(Es.$$.fragment),sw=h(),v(Ms.$$.fragment),aw=h(),v(zs.$$.fragment),xm=h(),ln=a("h2"),qs=a("a"),Ap=a("span"),v(di.$$.fragment),rw=h(),Lp=a("span"),iw=n("TFRobertaForSequenceClassification"),Rm=h(),mt=a("div"),v(ci.$$.fragment),lw=h(),Op=a("p"),dw=n(`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.`),cw=h(),pi=a("p"),pw=n("This model inherits from "),Nd=a("a"),hw=n("TFPreTrainedModel"),uw=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.)`),mw=h(),hi=a("p"),fw=n("This model is also a "),ui=a("a"),gw=n("tf.keras.Model"),_w=n(` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),bw=h(),v(js.$$.fragment),kw=h(),qt=a("div"),v(mi.$$.fragment),yw=h(),dn=a("p"),vw=n("The "),Id=a("a"),ww=n("TFRobertaForSequenceClassification"),Tw=n(" forward method, overrides the "),Np=a("code"),$w=n("__call__"),Fw=n(" special method."),xw=h(),v(Cs.$$.fragment),Rw=h(),v(Ps.$$.fragment),Ew=h(),v(As.$$.fragment),Em=h(),cn=a("h2"),Ls=a("a"),Ip=a("span"),v(fi.$$.fragment),Mw=h(),Dp=a("span"),zw=n("TFRobertaForMultipleChoice"),Mm=h(),ft=a("div"),v(gi.$$.fragment),qw=h(),Sp=a("p"),jw=n(`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.`),Cw=h(),_i=a("p"),Pw=n("This model inherits from "),Dd=a("a"),Aw=n("TFPreTrainedModel"),Lw=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.)`),Ow=h(),bi=a("p"),Nw=n("This model is also a "),ki=a("a"),Iw=n("tf.keras.Model"),Dw=n(` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),Sw=h(),v(Os.$$.fragment),Bw=h(),Vt=a("div"),v(yi.$$.fragment),Ww=h(),pn=a("p"),Uw=n("The "),Sd=a("a"),Hw=n("TFRobertaForMultipleChoice"),Qw=n(" forward method, overrides the "),Bp=a("code"),Kw=n("__call__"),Jw=n(" special method."),Vw=h(),v(Ns.$$.fragment),Gw=h(),v(Is.$$.fragment),zm=h(),hn=a("h2"),Ds=a("a"),Wp=a("span"),v(vi.$$.fragment),Xw=h(),Up=a("span"),Yw=n("TFRobertaForTokenClassification"),qm=h(),gt=a("div"),v(wi.$$.fragment),Zw=h(),Hp=a("p"),eT=n(`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.`),tT=h(),Ti=a("p"),oT=n("This model inherits from "),Bd=a("a"),nT=n("TFPreTrainedModel"),sT=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.)`),aT=h(),$i=a("p"),rT=n("This model is also a "),Fi=a("a"),iT=n("tf.keras.Model"),lT=n(` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),dT=h(),v(Ss.$$.fragment),cT=h(),jt=a("div"),v(xi.$$.fragment),pT=h(),un=a("p"),hT=n("The "),Wd=a("a"),uT=n("TFRobertaForTokenClassification"),mT=n(" forward method, overrides the "),Qp=a("code"),fT=n("__call__"),gT=n(" special method."),_T=h(),v(Bs.$$.fragment),bT=h(),v(Ws.$$.fragment),kT=h(),v(Us.$$.fragment),jm=h(),mn=a("h2"),Hs=a("a"),Kp=a("span"),v(Ri.$$.fragment),yT=h(),Jp=a("span"),vT=n("TFRobertaForQuestionAnswering"),Cm=h(),_t=a("div"),v(Ei.$$.fragment),wT=h(),fn=a("p"),TT=n(`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 `),Vp=a("code"),$T=n("span start logits"),FT=n(" and "),Gp=a("code"),xT=n("span end logits"),RT=n(")."),ET=h(),Mi=a("p"),MT=n("This model inherits from "),Ud=a("a"),zT=n("TFPreTrainedModel"),qT=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.)`),jT=h(),zi=a("p"),CT=n("This model is also a "),qi=a("a"),PT=n("tf.keras.Model"),AT=n(` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),LT=h(),v(Qs.$$.fragment),OT=h(),Ct=a("div"),v(ji.$$.fragment),NT=h(),gn=a("p"),IT=n("The "),Hd=a("a"),DT=n("TFRobertaForQuestionAnswering"),ST=n(" forward method, overrides the "),Xp=a("code"),BT=n("__call__"),WT=n(" special method."),UT=h(),v(Ks.$$.fragment),HT=h(),v(Js.$$.fragment),QT=h(),v(Vs.$$.fragment),Pm=h(),_n=a("h2"),Gs=a("a"),Yp=a("span"),v(Ci.$$.fragment),KT=h(),Zp=a("span"),JT=n("FlaxRobertaModel"),Am=h(),nt=a("div"),v(Pi.$$.fragment),VT=h(),eh=a("p"),GT=n("The bare RoBERTa Model transformer outputting raw hidden-states without any specific head on top."),XT=h(),Ai=a("p"),YT=n("This model inherits from "),Qd=a("a"),ZT=n("FlaxPreTrainedModel"),e1=n(`. 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)`),t1=h(),Li=a("p"),o1=n("This model is also a Flax Linen "),Oi=a("a"),n1=n("flax.linen.Module"),s1=n(`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),a1=h(),th=a("p"),r1=n("Finally, this model supports inherent JAX features such as:"),i1=h(),po=a("ul"),oh=a("li"),Ni=a("a"),l1=n("Just-In-Time (JIT) compilation"),d1=h(),nh=a("li"),Ii=a("a"),c1=n("Automatic Differentiation"),p1=h(),sh=a("li"),Di=a("a"),h1=n("Vectorization"),u1=h(),ah=a("li"),Si=a("a"),m1=n("Parallelization"),f1=h(),Gt=a("div"),v(Bi.$$.fragment),g1=h(),bn=a("p"),_1=n("The "),rh=a("code"),b1=n("FlaxRobertaPreTrainedModel"),k1=n(" forward method, overrides the "),ih=a("code"),y1=n("__call__"),v1=n(" special method."),w1=h(),v(Xs.$$.fragment),T1=h(),v(Ys.$$.fragment),Lm=h(),kn=a("h2"),Zs=a("a"),lh=a("span"),v(Wi.$$.fragment),$1=h(),dh=a("span"),F1=n("FlaxRobertaForCausalLM"),Om=h(),st=a("div"),v(Ui.$$.fragment),x1=h(),ch=a("p"),R1=n(`Roberta Model with a language modeling head on top (a linear layer on top of the hidden-states output) e.g for
autoregressive tasks.`),E1=h(),Hi=a("p"),M1=n("This model inherits from "),Kd=a("a"),z1=n("FlaxPreTrainedModel"),q1=n(`. 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)`),j1=h(),Qi=a("p"),C1=n("This model is also a Flax Linen "),Ki=a("a"),P1=n("flax.linen.Module"),A1=n(`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),L1=h(),ph=a("p"),O1=n("Finally, this model supports inherent JAX features such as:"),N1=h(),ho=a("ul"),hh=a("li"),Ji=a("a"),I1=n("Just-In-Time (JIT) compilation"),D1=h(),uh=a("li"),Vi=a("a"),S1=n("Automatic Differentiation"),B1=h(),mh=a("li"),Gi=a("a"),W1=n("Vectorization"),U1=h(),fh=a("li"),Xi=a("a"),H1=n("Parallelization"),Q1=h(),Xt=a("div"),v(Yi.$$.fragment),K1=h(),yn=a("p"),J1=n("The "),gh=a("code"),V1=n("FlaxRobertaPreTrainedModel"),G1=n(" forward method, overrides the "),_h=a("code"),X1=n("__call__"),Y1=n(" special method."),Z1=h(),v(ea.$$.fragment),e$=h(),v(ta.$$.fragment),Nm=h(),vn=a("h2"),oa=a("a"),bh=a("span"),v(Zi.$$.fragment),t$=h(),kh=a("span"),o$=n("FlaxRobertaForMaskedLM"),Im=h(),at=a("div"),v(el.$$.fragment),n$=h(),tl=a("p"),s$=n("RoBERTa Model with a "),yh=a("code"),a$=n("language modeling"),r$=n(" head on top."),i$=h(),ol=a("p"),l$=n("This model inherits from "),Jd=a("a"),d$=n("FlaxPreTrainedModel"),c$=n(`. 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)`),p$=h(),nl=a("p"),h$=n("This model is also a Flax Linen "),sl=a("a"),u$=n("flax.linen.Module"),m$=n(`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),f$=h(),vh=a("p"),g$=n("Finally, this model supports inherent JAX features such as:"),_$=h(),uo=a("ul"),wh=a("li"),al=a("a"),b$=n("Just-In-Time (JIT) compilation"),k$=h(),Th=a("li"),rl=a("a"),y$=n("Automatic Differentiation"),v$=h(),$h=a("li"),il=a("a"),w$=n("Vectorization"),T$=h(),Fh=a("li"),ll=a("a"),$$=n("Parallelization"),F$=h(),Yt=a("div"),v(dl.$$.fragment),x$=h(),wn=a("p"),R$=n("The "),xh=a("code"),E$=n("FlaxRobertaPreTrainedModel"),M$=n(" forward method, overrides the "),Rh=a("code"),z$=n("__call__"),q$=n(" special method."),j$=h(),v(na.$$.fragment),C$=h(),v(sa.$$.fragment),Dm=h(),Tn=a("h2"),aa=a("a"),Eh=a("span"),v(cl.$$.fragment),P$=h(),Mh=a("span"),A$=n("FlaxRobertaForSequenceClassification"),Sm=h(),rt=a("div"),v(pl.$$.fragment),L$=h(),zh=a("p"),O$=n(`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.`),N$=h(),hl=a("p"),I$=n("This model inherits from "),Vd=a("a"),D$=n("FlaxPreTrainedModel"),S$=n(`. 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)`),B$=h(),ul=a("p"),W$=n("This model is also a Flax Linen "),ml=a("a"),U$=n("flax.linen.Module"),H$=n(`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),Q$=h(),qh=a("p"),K$=n("Finally, this model supports inherent JAX features such as:"),J$=h(),mo=a("ul"),jh=a("li"),fl=a("a"),V$=n("Just-In-Time (JIT) compilation"),G$=h(),Ch=a("li"),gl=a("a"),X$=n("Automatic Differentiation"),Y$=h(),Ph=a("li"),_l=a("a"),Z$=n("Vectorization"),e0=h(),Ah=a("li"),bl=a("a"),t0=n("Parallelization"),o0=h(),Zt=a("div"),v(kl.$$.fragment),n0=h(),$n=a("p"),s0=n("The "),Lh=a("code"),a0=n("FlaxRobertaPreTrainedModel"),r0=n(" forward method, overrides the "),Oh=a("code"),i0=n("__call__"),l0=n(" special method."),d0=h(),v(ra.$$.fragment),c0=h(),v(ia.$$.fragment),Bm=h(),Fn=a("h2"),la=a("a"),Nh=a("span"),v(yl.$$.fragment),p0=h(),Ih=a("span"),h0=n("FlaxRobertaForMultipleChoice"),Wm=h(),it=a("div"),v(vl.$$.fragment),u0=h(),Dh=a("p"),m0=n(`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.`),f0=h(),wl=a("p"),g0=n("This model inherits from "),Gd=a("a"),_0=n("FlaxPreTrainedModel"),b0=n(`. 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)`),k0=h(),Tl=a("p"),y0=n("This model is also a Flax Linen "),$l=a("a"),v0=n("flax.linen.Module"),w0=n(`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),T0=h(),Sh=a("p"),$0=n("Finally, this model supports inherent JAX features such as:"),F0=h(),fo=a("ul"),Bh=a("li"),Fl=a("a"),x0=n("Just-In-Time (JIT) compilation"),R0=h(),Wh=a("li"),xl=a("a"),E0=n("Automatic Differentiation"),M0=h(),Uh=a("li"),Rl=a("a"),z0=n("Vectorization"),q0=h(),Hh=a("li"),El=a("a"),j0=n("Parallelization"),C0=h(),eo=a("div"),v(Ml.$$.fragment),P0=h(),xn=a("p"),A0=n("The "),Qh=a("code"),L0=n("FlaxRobertaPreTrainedModel"),O0=n(" forward method, overrides the "),Kh=a("code"),N0=n("__call__"),I0=n(" special method."),D0=h(),v(da.$$.fragment),S0=h(),v(ca.$$.fragment),Um=h(),Rn=a("h2"),pa=a("a"),Jh=a("span"),v(zl.$$.fragment),B0=h(),Vh=a("span"),W0=n("FlaxRobertaForTokenClassification"),Hm=h(),lt=a("div"),v(ql.$$.fragment),U0=h(),Gh=a("p"),H0=n(`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.`),Q0=h(),jl=a("p"),K0=n("This model inherits from "),Xd=a("a"),J0=n("FlaxPreTrainedModel"),V0=n(`. 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)`),G0=h(),Cl=a("p"),X0=n("This model is also a Flax Linen "),Pl=a("a"),Y0=n("flax.linen.Module"),Z0=n(`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),e2=h(),Xh=a("p"),t2=n("Finally, this model supports inherent JAX features such as:"),o2=h(),go=a("ul"),Yh=a("li"),Al=a("a"),n2=n("Just-In-Time (JIT) compilation"),s2=h(),Zh=a("li"),Ll=a("a"),a2=n("Automatic Differentiation"),r2=h(),eu=a("li"),Ol=a("a"),i2=n("Vectorization"),l2=h(),tu=a("li"),Nl=a("a"),d2=n("Parallelization"),c2=h(),to=a("div"),v(Il.$$.fragment),p2=h(),En=a("p"),h2=n("The "),ou=a("code"),u2=n("FlaxRobertaPreTrainedModel"),m2=n(" forward method, overrides the "),nu=a("code"),f2=n("__call__"),g2=n(" special method."),_2=h(),v(ha.$$.fragment),b2=h(),v(ua.$$.fragment),Qm=h(),Mn=a("h2"),ma=a("a"),su=a("span"),v(Dl.$$.fragment),k2=h(),au=a("span"),y2=n("FlaxRobertaForQuestionAnswering"),Km=h(),dt=a("div"),v(Sl.$$.fragment),v2=h(),zn=a("p"),w2=n(`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 `),ru=a("code"),T2=n("span start logits"),$2=n(" and "),iu=a("code"),F2=n("span end logits"),x2=n(")."),R2=h(),Bl=a("p"),E2=n("This model inherits from "),Yd=a("a"),M2=n("FlaxPreTrainedModel"),z2=n(`. 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)`),q2=h(),Wl=a("p"),j2=n("This model is also a Flax Linen "),Ul=a("a"),C2=n("flax.linen.Module"),P2=n(`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),A2=h(),lu=a("p"),L2=n("Finally, this model supports inherent JAX features such as:"),O2=h(),_o=a("ul"),du=a("li"),Hl=a("a"),N2=n("Just-In-Time (JIT) compilation"),I2=h(),cu=a("li"),Ql=a("a"),D2=n("Automatic Differentiation"),S2=h(),pu=a("li"),Kl=a("a"),B2=n("Vectorization"),W2=h(),hu=a("li"),Jl=a("a"),U2=n("Parallelization"),H2=h(),oo=a("div"),v(Vl.$$.fragment),Q2=h(),qn=a("p"),K2=n("The "),uu=a("code"),J2=n("FlaxRobertaPreTrainedModel"),V2=n(" forward method, overrides the "),mu=a("code"),G2=n("__call__"),X2=n(" special method."),Y2=h(),v(fa.$$.fragment),Z2=h(),v(ga.$$.fragment),this.h()},l(o){const b=NM('[data-svelte="svelte-1phssyn"]',document.head);d=r(b,"META",{name:!0,content:!0}),b.forEach(t),g=u(o),c=r(o,"H1",{class:!0});var Gl=i(c);m=r(Gl,"A",{id:!0,class:!0,href:!0});var fu=i(m);_=r(fu,"SPAN",{});var gu=i(_);w(l.$$.fragment,gu),gu.forEach(t),fu.forEach(t),p=u(Gl),E=r(Gl,"SPAN",{});var _u=i(E);le=s(_u,"RoBERTa"),_u.forEach(t),Gl.forEach(t),Z=u(o),N=r(o,"H2",{class:!0});var Xl=i(N);te=r(Xl,"A",{id:!0,class:!0,href:!0});var bu=i(te);oe=r(bu,"SPAN",{});var ku=i(oe);w(M.$$.fragment,ku),ku.forEach(t),bu.forEach(t),we=u(Xl),K=r(Xl,"SPAN",{});var yu=i(K);Te=s(yu,"Overview"),yu.forEach(t),Xl.forEach(t),ge=u(o),B=r(o,"P",{});var Yl=i(B);$e=s(Yl,"The RoBERTa model was proposed in "),pe=r(Yl,"A",{href:!0,rel:!0});var vu=i(pe);J=s(vu,"RoBERTa: A Robustly Optimized BERT Pretraining Approach"),vu.forEach(t),Fe=s(Yl,` 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.`),Yl.forEach(t),_e=u(o),U=r(o,"P",{});var wu=i(U);xe=s(wu,`It builds on BERT and modifies key hyperparameters, removing the next-sentence pretraining objective and training with
much larger mini-batches and learning rates.`),wu.forEach(t),be=u(o),H=r(o,"P",{});var Tu=i(H);Re=s(Tu,"The abstract from the paper is the following:"),Tu.forEach(t),ke=u(o),ee=r(o,"P",{});var $u=i(ee);j=r($u,"EM",{});var Fu=i(j);P=s(Fu,`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.`),Fu.forEach(t),$u.forEach(t),ye=u(o),Q=r(o,"P",{});var xu=i(Q);Ee=s(xu,"Tips:"),xu.forEach(t),ve=u(o),I=r(o,"UL",{});var bo=i(I);he=r(bo,"LI",{});var Zl=i(he);Me=s(Zl,"This implementation is the same as "),C=r(Zl,"A",{href:!0});var Ru=i(C);ze=s(Ru,"BertModel"),Ru.forEach(t),V=s(Zl,` with a tiny embeddings tweak as well as a setup
for Roberta pretrained models.`),Zl.forEach(t),qe=u(bo),ue=r(bo,"LI",{});var Eu=i(ue);G=s(Eu,`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.`),Eu.forEach(t),je=u(bo),ne=r(bo,"LI",{});var ko=i(ne);D=s(ko,"RoBERTa doesn\u2019t have "),me=r(ko,"CODE",{});var Mu=i(me);X=s(Mu,"token_type_ids"),Mu.forEach(t),Ce=s(ko,`, you don\u2019t need to indicate which token belongs to which segment. Just
separate your segments with the separation token `),se=r(ko,"CODE",{});var zu=i(se);A=s(zu,"tokenizer.sep_token"),zu.forEach(t),Pe=s(ko," (or "),L=r(ko,"CODE",{});var qu=i(L);Ae=s(qu,"</s>"),qu.forEach(t),Le=s(ko,")"),ko.forEach(t),y=u(bo),z=r(bo,"LI",{});var Zd=i(z);He=r(Zd,"A",{href:!0});var ju=i(He);de=s(ju,"CamemBERT"),ju.forEach(t),Xe=s(Zd," is a wrapper around RoBERTa. Refer to this page for usage examples."),Zd.forEach(t),bo.forEach(t),Je=u(o),q=r(o,"P",{});var jn=i(q);Ye=s(jn,"This model was contributed by "),Se=r(jn,"A",{href:!0,rel:!0});var Cu=i(Se);Ze=s(Cu,"julien-c"),Cu.forEach(t),et=s(jn,". The original code can be found "),Be=r(jn,"A",{href:!0,rel:!0});var Pu=i(Be);S=s(Pu,"here"),Pu.forEach(t),Y=s(jn,"."),jn.forEach(t),Ve=u(o),Oe=r(o,"H2",{class:!0});var ed=i(Oe);W=r(ed,"A",{id:!0,class:!0,href:!0});var Au=i(W);Qe=r(Au,"SPAN",{});var Lu=i(Qe);w(We.$$.fragment,Lu),Lu.forEach(t),Au.forEach(t),Ne=u(ed),Ke=r(ed,"SPAN",{});var Ou=i(Ke);ce=s(Ou,"RobertaConfig"),Ou.forEach(t),ed.forEach(t),Ge=u(o),yt=r(o,"DIV",{class:!0});var Wt=i(yt);w(Oa.$$.fragment,Wt),mg=u(Wt),co=r(Wt,"P",{});var yo=i(co);fg=s(yo,"This is the configuration class to store the configuration of a "),id=r(yo,"A",{href:!0});var Nu=i(id);gg=s(Nu,"RobertaModel"),Nu.forEach(t),_g=s(yo," or a "),ld=r(yo,"A",{href:!0});var Iu=i(ld);bg=s(Iu,"TFRobertaModel"),Iu.forEach(t),kg=s(yo,`. 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
`),Na=r(yo,"A",{href:!0,rel:!0});var Du=i(Na);yg=s(Du,"roberta-base"),Du.forEach(t),vg=s(yo," architecture."),yo.forEach(t),wg=u(Wt),Ao=r(Wt,"P",{});var Cn=i(Ao);Tg=s(Cn,"Configuration objects inherit from "),dd=r(Cn,"A",{href:!0});var Su=i(dd);$g=s(Su,"PretrainedConfig"),Su.forEach(t),Fg=s(Cn,` and can be used to control the model outputs. Read the
documentation from `),cd=r(Cn,"A",{href:!0});var Bu=i(cd);xg=s(Bu,"PretrainedConfig"),Bu.forEach(t),Rg=s(Cn," for more information."),Cn.forEach(t),Eg=u(Wt),Lo=r(Wt,"P",{});var Pn=i(Lo);Mg=s(Pn,"The "),pd=r(Pn,"A",{href:!0});var Wu=i(pd);zg=s(Wu,"RobertaConfig"),Wu.forEach(t),qg=s(Pn," class directly inherits "),hd=r(Pn,"A",{href:!0});var Uu=i(hd);jg=s(Uu,"BertConfig"),Uu.forEach(t),Cg=s(Pn,`. It reuses the same defaults. Please check the parent
class for more information.`),Pn.forEach(t),Pg=u(Wt),w(Ln.$$.fragment,Wt),Wt.forEach(t),om=u(o),Oo=r(o,"H2",{class:!0});var td=i(Oo);On=r(td,"A",{id:!0,class:!0,href:!0});var Hu=i(On);xc=r(Hu,"SPAN",{});var Qu=i(xc);w(Ia.$$.fragment,Qu),Qu.forEach(t),Hu.forEach(t),Ag=u(td),Rc=r(td,"SPAN",{});var Ku=i(Rc);Lg=s(Ku,"RobertaTokenizer"),Ku.forEach(t),td.forEach(t),nm=u(o),Ie=r(o,"DIV",{class:!0});var Ue=i(Ie);w(Da.$$.fragment,Ue),Og=u(Ue),Ec=r(Ue,"P",{});var Ju=i(Ec);Ng=s(Ju,"Constructs a RoBERTa tokenizer, derived from the GPT-2 tokenizer, using byte-level Byte-Pair-Encoding."),Ju.forEach(t),Ig=u(Ue),Mc=r(Ue,"P",{});var Vu=i(Mc);Dg=s(Vu,"This tokenizer has been trained to treat spaces like parts of the tokens (a bit like sentencepiece) so a word will"),Vu.forEach(t),Sg=u(Ue),w(Nn.$$.fragment,Ue),Bg=u(Ue),Sa=r(Ue,"P",{});var od=i(Sa);Wg=s(od,"You can get around that behavior by passing "),zc=r(od,"CODE",{});var Gu=i(zc);Ug=s(Gu,"add_prefix_space=True"),Gu.forEach(t),Hg=s(od,` 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.`),od.forEach(t),Qg=u(Ue),w(In.$$.fragment,Ue),Kg=u(Ue),Ba=r(Ue,"P",{});var nd=i(Ba);Jg=s(nd,"This tokenizer inherits from "),ud=r(nd,"A",{href:!0});var Xu=i(ud);Vg=s(Xu,"PreTrainedTokenizer"),Xu.forEach(t),Gg=s(nd,` which contains most of the main methods. Users should refer to
this superclass for more information regarding those methods.`),nd.forEach(t),Xg=u(Ue),vo=r(Ue,"DIV",{class:!0});var An=i(vo);w(Wa.$$.fragment,An),Yg=u(An),qc=r(An,"P",{});var Yu=i(qc);Zg=s(Yu,`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:`),Yu.forEach(t),e_=u(An),Ua=r(An,"UL",{});var sd=i(Ua);md=r(sd,"LI",{});var ec=i(md);t_=s(ec,"single sequence: "),jc=r(ec,"CODE",{});var Zu=i(jc);o_=s(Zu,"<s> X </s>"),Zu.forEach(t),ec.forEach(t),n_=u(sd),fd=r(sd,"LI",{});var tc=i(fd);s_=s(tc,"pair of sequences: "),Cc=r(tc,"CODE",{});var em=i(Cc);a_=s(em,"<s> A </s></s> B </s>"),em.forEach(t),tc.forEach(t),sd.forEach(t),An.forEach(t),r_=u(Ue),Dn=r(Ue,"DIV",{class:!0});var ad=i(Dn);w(Ha.$$.fragment,ad),i_=u(ad),Qa=r(ad,"P",{});var rd=i(Qa);l_=s(rd,`Retrieve sequence ids from a token list that has no special tokens added. This method is called when adding
special tokens using the tokenizer `),Pc=r(rd,"CODE",{});var eF=i(Pc);d_=s(eF,"prepare_for_model"),eF.forEach(t),c_=s(rd," method."),rd.forEach(t),ad.forEach(t),p_=u(Ue),Sn=r(Ue,"DIV",{class:!0});var Vm=i(Sn);w(Ka.$$.fragment,Vm),h_=u(Vm),Ac=r(Vm,"P",{});var tF=i(Ac);u_=s(tF,`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.`),tF.forEach(t),Vm.forEach(t),m_=u(Ue),gd=r(Ue,"DIV",{class:!0});var oF=i(gd);w(Ja.$$.fragment,oF),oF.forEach(t),Ue.forEach(t),sm=u(o),No=r(o,"H2",{class:!0});var Gm=i(No);Bn=r(Gm,"A",{id:!0,class:!0,href:!0});var nF=i(Bn);Lc=r(nF,"SPAN",{});var sF=i(Lc);w(Va.$$.fragment,sF),sF.forEach(t),nF.forEach(t),f_=u(Gm),Oc=r(Gm,"SPAN",{});var aF=i(Oc);g_=s(aF,"RobertaTokenizerFast"),aF.forEach(t),Gm.forEach(t),am=u(o),tt=r(o,"DIV",{class:!0});var bt=i(tt);w(Ga.$$.fragment,bt),__=u(bt),Xa=r(bt,"P",{});var Xm=i(Xa);b_=s(Xm,"Construct a \u201Cfast\u201D RoBERTa tokenizer (backed by HuggingFace\u2019s "),Nc=r(Xm,"EM",{});var rF=i(Nc);k_=s(rF,"tokenizers"),rF.forEach(t),y_=s(Xm,` library), derived from the GPT-2
tokenizer, using byte-level Byte-Pair-Encoding.`),Xm.forEach(t),v_=u(bt),Ic=r(bt,"P",{});var iF=i(Ic);w_=s(iF,"This tokenizer has been trained to treat spaces like parts of the tokens (a bit like sentencepiece) so a word will"),iF.forEach(t),T_=u(bt),w(Wn.$$.fragment,bt),$_=u(bt),Ya=r(bt,"P",{});var Ym=i(Ya);F_=s(Ym,"You can get around that behavior by passing "),Dc=r(Ym,"CODE",{});var lF=i(Dc);x_=s(lF,"add_prefix_space=True"),lF.forEach(t),R_=s(Ym,` 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.`),Ym.forEach(t),E_=u(bt),w(Un.$$.fragment,bt),M_=u(bt),Za=r(bt,"P",{});var Zm=i(Za);z_=s(Zm,"This tokenizer inherits from "),_d=r(Zm,"A",{href:!0});var dF=i(_d);q_=s(dF,"PreTrainedTokenizerFast"),dF.forEach(t),j_=s(Zm,` which contains most of the main methods. Users should
refer to this superclass for more information regarding those methods.`),Zm.forEach(t),C_=u(bt),bd=r(bt,"DIV",{class:!0});var cF=i(bd);w(er.$$.fragment,cF),cF.forEach(t),bt.forEach(t),rm=u(o),Io=r(o,"H2",{class:!0});var ef=i(Io);Hn=r(ef,"A",{id:!0,class:!0,href:!0});var pF=i(Hn);Sc=r(pF,"SPAN",{});var hF=i(Sc);w(tr.$$.fragment,hF),hF.forEach(t),pF.forEach(t),P_=u(ef),Bc=r(ef,"SPAN",{});var uF=i(Bc);A_=s(uF,"RobertaModel"),uF.forEach(t),ef.forEach(t),im=u(o),ot=r(o,"DIV",{class:!0});var kt=i(ot);w(or.$$.fragment,kt),L_=u(kt),Wc=r(kt,"P",{});var mF=i(Wc);O_=s(mF,"The bare RoBERTa Model transformer outputting raw hidden-states without any specific head on top."),mF.forEach(t),N_=u(kt),nr=r(kt,"P",{});var tf=i(nr);I_=s(tf,"This model inherits from "),kd=r(tf,"A",{href:!0});var fF=i(kd);D_=s(fF,"PreTrainedModel"),fF.forEach(t),S_=s(tf,`. 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.)`),tf.forEach(t),B_=u(kt),sr=r(kt,"P",{});var of=i(sr);W_=s(of,"This model is also a PyTorch "),ar=r(of,"A",{href:!0,rel:!0});var gF=i(ar);U_=s(gF,"torch.nn.Module"),gF.forEach(t),H_=s(of,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),of.forEach(t),Q_=u(kt),rr=r(kt,"P",{});var nf=i(rr);K_=s(nf,`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 `),Uc=r(nf,"EM",{});var _F=i(Uc);J_=s(_F,`Attention is
all you need`),_F.forEach(t),V_=s(nf,`_ by Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N. Gomez, Lukasz
Kaiser and Illia Polosukhin.`),nf.forEach(t),G_=u(kt),pt=r(kt,"P",{});var Pt=i(pt);X_=s(Pt,"To behave as an decoder the model needs to be initialized with the "),Hc=r(Pt,"CODE",{});var bF=i(Hc);Y_=s(bF,"is_decoder"),bF.forEach(t),Z_=s(Pt,` argument of the configuration set
to `),Qc=r(Pt,"CODE",{});var kF=i(Qc);eb=s(kF,"True"),kF.forEach(t),tb=s(Pt,". To be used in a Seq2Seq model, the model needs to initialized with both "),Kc=r(Pt,"CODE",{});var yF=i(Kc);ob=s(yF,"is_decoder"),yF.forEach(t),nb=s(Pt,` argument and
`),Jc=r(Pt,"CODE",{});var vF=i(Jc);sb=s(vF,"add_cross_attention"),vF.forEach(t),ab=s(Pt," set to "),Vc=r(Pt,"CODE",{});var wF=i(Vc);rb=s(wF,"True"),wF.forEach(t),ib=s(Pt,"; an "),Gc=r(Pt,"CODE",{});var TF=i(Gc);lb=s(TF,"encoder_hidden_states"),TF.forEach(t),db=s(Pt," is then expected as an input to the forward pass."),Pt.forEach(t),cb=u(kt),Qn=r(kt,"P",{});var tm=i(Qn);pb=s(tm,".. _"),Xc=r(tm,"EM",{});var $F=i(Xc);hb=s($F,"Attention is all you need"),$F.forEach(t),ub=s(tm,": "),ir=r(tm,"A",{href:!0,rel:!0});var FF=i(ir);mb=s(FF,"https://arxiv.org/abs/1706.03762"),FF.forEach(t),tm.forEach(t),fb=u(kt),Ut=r(kt,"DIV",{class:!0});var _a=i(Ut);w(lr.$$.fragment,_a),gb=u(_a),Do=r(_a,"P",{});var oc=i(Do);_b=s(oc,"The "),yd=r(oc,"A",{href:!0});var xF=i(yd);bb=s(xF,"RobertaModel"),xF.forEach(t),kb=s(oc," forward method, overrides the "),Yc=r(oc,"CODE",{});var RF=i(Yc);yb=s(RF,"__call__"),RF.forEach(t),vb=s(oc," special method."),oc.forEach(t),wb=u(_a),w(Kn.$$.fragment,_a),Tb=u(_a),w(Jn.$$.fragment,_a),_a.forEach(t),kt.forEach(t),lm=u(o),So=r(o,"H2",{class:!0});var sf=i(So);Vn=r(sf,"A",{id:!0,class:!0,href:!0});var EF=i(Vn);Zc=r(EF,"SPAN",{});var MF=i(Zc);w(dr.$$.fragment,MF),MF.forEach(t),EF.forEach(t),$b=u(sf),ep=r(sf,"SPAN",{});var zF=i(ep);Fb=s(zF,"RobertaForCausalLM"),zF.forEach(t),sf.forEach(t),dm=u(o),vt=r(o,"DIV",{class:!0});var wo=i(vt);w(cr.$$.fragment,wo),xb=u(wo),pr=r(wo,"P",{});var af=i(pr);Rb=s(af,"RoBERTa Model with a "),tp=r(af,"CODE",{});var qF=i(tp);Eb=s(qF,"language modeling"),qF.forEach(t),Mb=s(af," head on top for CLM fine-tuning."),af.forEach(t),zb=u(wo),hr=r(wo,"P",{});var rf=i(hr);qb=s(rf,"This model inherits from "),vd=r(rf,"A",{href:!0});var jF=i(vd);jb=s(jF,"PreTrainedModel"),jF.forEach(t),Cb=s(rf,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),rf.forEach(t),Pb=u(wo),ur=r(wo,"P",{});var lf=i(ur);Ab=s(lf,"This model is also a PyTorch "),mr=r(lf,"A",{href:!0,rel:!0});var CF=i(mr);Lb=s(CF,"torch.nn.Module"),CF.forEach(t),Ob=s(lf,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),lf.forEach(t),Nb=u(wo),Ht=r(wo,"DIV",{class:!0});var ba=i(Ht);w(fr.$$.fragment,ba),Ib=u(ba),Bo=r(ba,"P",{});var nc=i(Bo);Db=s(nc,"The "),wd=r(nc,"A",{href:!0});var PF=i(wd);Sb=s(PF,"RobertaForCausalLM"),PF.forEach(t),Bb=s(nc," forward method, overrides the "),op=r(nc,"CODE",{});var AF=i(op);Wb=s(AF,"__call__"),AF.forEach(t),Ub=s(nc," special method."),nc.forEach(t),Hb=u(ba),w(Gn.$$.fragment,ba),Qb=u(ba),w(Xn.$$.fragment,ba),ba.forEach(t),wo.forEach(t),cm=u(o),Wo=r(o,"H2",{class:!0});var df=i(Wo);Yn=r(df,"A",{id:!0,class:!0,href:!0});var LF=i(Yn);np=r(LF,"SPAN",{});var OF=i(np);w(gr.$$.fragment,OF),OF.forEach(t),LF.forEach(t),Kb=u(df),sp=r(df,"SPAN",{});var NF=i(sp);Jb=s(NF,"RobertaForMaskedLM"),NF.forEach(t),df.forEach(t),pm=u(o),wt=r(o,"DIV",{class:!0});var To=i(wt);w(_r.$$.fragment,To),Vb=u(To),br=r(To,"P",{});var cf=i(br);Gb=s(cf,"RoBERTa Model with a "),ap=r(cf,"CODE",{});var IF=i(ap);Xb=s(IF,"language modeling"),IF.forEach(t),Yb=s(cf," head on top."),cf.forEach(t),Zb=u(To),kr=r(To,"P",{});var pf=i(kr);ek=s(pf,"This model inherits from "),Td=r(pf,"A",{href:!0});var DF=i(Td);tk=s(DF,"PreTrainedModel"),DF.forEach(t),ok=s(pf,`. 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.)`),pf.forEach(t),nk=u(To),yr=r(To,"P",{});var hf=i(yr);sk=s(hf,"This model is also a PyTorch "),vr=r(hf,"A",{href:!0,rel:!0});var SF=i(vr);ak=s(SF,"torch.nn.Module"),SF.forEach(t),rk=s(hf,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),hf.forEach(t),ik=u(To),Rt=r(To,"DIV",{class:!0});var $o=i(Rt);w(wr.$$.fragment,$o),lk=u($o),Uo=r($o,"P",{});var sc=i(Uo);dk=s(sc,"The "),$d=r(sc,"A",{href:!0});var BF=i($d);ck=s(BF,"RobertaForMaskedLM"),BF.forEach(t),pk=s(sc," forward method, overrides the "),rp=r(sc,"CODE",{});var WF=i(rp);hk=s(WF,"__call__"),WF.forEach(t),uk=s(sc," special method."),sc.forEach(t),mk=u($o),w(Zn.$$.fragment,$o),fk=u($o),w(es.$$.fragment,$o),gk=u($o),w(ts.$$.fragment,$o),$o.forEach(t),To.forEach(t),hm=u(o),Ho=r(o,"H2",{class:!0});var uf=i(Ho);os=r(uf,"A",{id:!0,class:!0,href:!0});var UF=i(os);ip=r(UF,"SPAN",{});var HF=i(ip);w(Tr.$$.fragment,HF),HF.forEach(t),UF.forEach(t),_k=u(uf),lp=r(uf,"SPAN",{});var QF=i(lp);bk=s(QF,"RobertaForSequenceClassification"),QF.forEach(t),uf.forEach(t),um=u(o),Tt=r(o,"DIV",{class:!0});var Fo=i(Tt);w($r.$$.fragment,Fo),kk=u(Fo),dp=r(Fo,"P",{});var KF=i(dp);yk=s(KF,`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.`),KF.forEach(t),vk=u(Fo),Fr=r(Fo,"P",{});var mf=i(Fr);wk=s(mf,"This model inherits from "),Fd=r(mf,"A",{href:!0});var JF=i(Fd);Tk=s(JF,"PreTrainedModel"),JF.forEach(t),$k=s(mf,`. 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.)`),mf.forEach(t),Fk=u(Fo),xr=r(Fo,"P",{});var ff=i(xr);xk=s(ff,"This model is also a PyTorch "),Rr=r(ff,"A",{href:!0,rel:!0});var VF=i(Rr);Rk=s(VF,"torch.nn.Module"),VF.forEach(t),Ek=s(ff,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),ff.forEach(t),Mk=u(Fo),ct=r(Fo,"DIV",{class:!0});var At=i(ct);w(Er.$$.fragment,At),zk=u(At),Qo=r(At,"P",{});var ac=i(Qo);qk=s(ac,"The "),xd=r(ac,"A",{href:!0});var GF=i(xd);jk=s(GF,"RobertaForSequenceClassification"),GF.forEach(t),Ck=s(ac," forward method, overrides the "),cp=r(ac,"CODE",{});var XF=i(cp);Pk=s(XF,"__call__"),XF.forEach(t),Ak=s(ac," special method."),ac.forEach(t),Lk=u(At),w(ns.$$.fragment,At),Ok=u(At),w(ss.$$.fragment,At),Nk=u(At),w(as.$$.fragment,At),Ik=u(At),w(rs.$$.fragment,At),Dk=u(At),w(is.$$.fragment,At),At.forEach(t),Fo.forEach(t),mm=u(o),Ko=r(o,"H2",{class:!0});var gf=i(Ko);ls=r(gf,"A",{id:!0,class:!0,href:!0});var YF=i(ls);pp=r(YF,"SPAN",{});var ZF=i(pp);w(Mr.$$.fragment,ZF),ZF.forEach(t),YF.forEach(t),Sk=u(gf),hp=r(gf,"SPAN",{});var ex=i(hp);Bk=s(ex,"RobertaForMultipleChoice"),ex.forEach(t),gf.forEach(t),fm=u(o),$t=r(o,"DIV",{class:!0});var xo=i($t);w(zr.$$.fragment,xo),Wk=u(xo),up=r(xo,"P",{});var tx=i(up);Uk=s(tx,`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.`),tx.forEach(t),Hk=u(xo),qr=r(xo,"P",{});var _f=i(qr);Qk=s(_f,"This model inherits from "),Rd=r(_f,"A",{href:!0});var ox=i(Rd);Kk=s(ox,"PreTrainedModel"),ox.forEach(t),Jk=s(_f,`. 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.forEach(t),Vk=u(xo),jr=r(xo,"P",{});var bf=i(jr);Gk=s(bf,"This model is also a PyTorch "),Cr=r(bf,"A",{href:!0,rel:!0});var nx=i(Cr);Xk=s(nx,"torch.nn.Module"),nx.forEach(t),Yk=s(bf,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),bf.forEach(t),Zk=u(xo),Qt=r(xo,"DIV",{class:!0});var ka=i(Qt);w(Pr.$$.fragment,ka),ey=u(ka),Jo=r(ka,"P",{});var rc=i(Jo);ty=s(rc,"The "),Ed=r(rc,"A",{href:!0});var sx=i(Ed);oy=s(sx,"RobertaForMultipleChoice"),sx.forEach(t),ny=s(rc," forward method, overrides the "),mp=r(rc,"CODE",{});var ax=i(mp);sy=s(ax,"__call__"),ax.forEach(t),ay=s(rc," special method."),rc.forEach(t),ry=u(ka),w(ds.$$.fragment,ka),iy=u(ka),w(cs.$$.fragment,ka),ka.forEach(t),xo.forEach(t),gm=u(o),Vo=r(o,"H2",{class:!0});var kf=i(Vo);ps=r(kf,"A",{id:!0,class:!0,href:!0});var rx=i(ps);fp=r(rx,"SPAN",{});var ix=i(fp);w(Ar.$$.fragment,ix),ix.forEach(t),rx.forEach(t),ly=u(kf),gp=r(kf,"SPAN",{});var lx=i(gp);dy=s(lx,"RobertaForTokenClassification"),lx.forEach(t),kf.forEach(t),_m=u(o),Ft=r(o,"DIV",{class:!0});var Ro=i(Ft);w(Lr.$$.fragment,Ro),cy=u(Ro),_p=r(Ro,"P",{});var dx=i(_p);py=s(dx,`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.`),dx.forEach(t),hy=u(Ro),Or=r(Ro,"P",{});var yf=i(Or);uy=s(yf,"This model inherits from "),Md=r(yf,"A",{href:!0});var cx=i(Md);my=s(cx,"PreTrainedModel"),cx.forEach(t),fy=s(yf,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),yf.forEach(t),gy=u(Ro),Nr=r(Ro,"P",{});var vf=i(Nr);_y=s(vf,"This model is also a PyTorch "),Ir=r(vf,"A",{href:!0,rel:!0});var px=i(Ir);by=s(px,"torch.nn.Module"),px.forEach(t),ky=s(vf,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),vf.forEach(t),yy=u(Ro),Et=r(Ro,"DIV",{class:!0});var Eo=i(Et);w(Dr.$$.fragment,Eo),vy=u(Eo),Go=r(Eo,"P",{});var ic=i(Go);wy=s(ic,"The "),zd=r(ic,"A",{href:!0});var hx=i(zd);Ty=s(hx,"RobertaForTokenClassification"),hx.forEach(t),$y=s(ic," forward method, overrides the "),bp=r(ic,"CODE",{});var ux=i(bp);Fy=s(ux,"__call__"),ux.forEach(t),xy=s(ic," special method."),ic.forEach(t),Ry=u(Eo),w(hs.$$.fragment,Eo),Ey=u(Eo),w(us.$$.fragment,Eo),My=u(Eo),w(ms.$$.fragment,Eo),Eo.forEach(t),Ro.forEach(t),bm=u(o),Xo=r(o,"H2",{class:!0});var wf=i(Xo);fs=r(wf,"A",{id:!0,class:!0,href:!0});var mx=i(fs);kp=r(mx,"SPAN",{});var fx=i(kp);w(Sr.$$.fragment,fx),fx.forEach(t),mx.forEach(t),zy=u(wf),yp=r(wf,"SPAN",{});var gx=i(yp);qy=s(gx,"RobertaForQuestionAnswering"),gx.forEach(t),wf.forEach(t),km=u(o),xt=r(o,"DIV",{class:!0});var Mo=i(xt);w(Br.$$.fragment,Mo),jy=u(Mo),Yo=r(Mo,"P",{});var lc=i(Yo);Cy=s(lc,`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 `),vp=r(lc,"CODE",{});var _x=i(vp);Py=s(_x,"span start logits"),_x.forEach(t),Ay=s(lc," and "),wp=r(lc,"CODE",{});var bx=i(wp);Ly=s(bx,"span end logits"),bx.forEach(t),Oy=s(lc,")."),lc.forEach(t),Ny=u(Mo),Wr=r(Mo,"P",{});var Tf=i(Wr);Iy=s(Tf,"This model inherits from "),qd=r(Tf,"A",{href:!0});var kx=i(qd);Dy=s(kx,"PreTrainedModel"),kx.forEach(t),Sy=s(Tf,`. 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.)`),Tf.forEach(t),By=u(Mo),Ur=r(Mo,"P",{});var $f=i(Ur);Wy=s($f,"This model is also a PyTorch "),Hr=r($f,"A",{href:!0,rel:!0});var yx=i(Hr);Uy=s(yx,"torch.nn.Module"),yx.forEach(t),Hy=s($f,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),$f.forEach(t),Qy=u(Mo),Mt=r(Mo,"DIV",{class:!0});var zo=i(Mt);w(Qr.$$.fragment,zo),Ky=u(zo),Zo=r(zo,"P",{});var dc=i(Zo);Jy=s(dc,"The "),jd=r(dc,"A",{href:!0});var vx=i(jd);Vy=s(vx,"RobertaForQuestionAnswering"),vx.forEach(t),Gy=s(dc," forward method, overrides the "),Tp=r(dc,"CODE",{});var wx=i(Tp);Xy=s(wx,"__call__"),wx.forEach(t),Yy=s(dc," special method."),dc.forEach(t),Zy=u(zo),w(gs.$$.fragment,zo),ev=u(zo),w(_s.$$.fragment,zo),tv=u(zo),w(bs.$$.fragment,zo),zo.forEach(t),Mo.forEach(t),ym=u(o),en=r(o,"H2",{class:!0});var Ff=i(en);ks=r(Ff,"A",{id:!0,class:!0,href:!0});var Tx=i(ks);$p=r(Tx,"SPAN",{});var $x=i($p);w(Kr.$$.fragment,$x),$x.forEach(t),Tx.forEach(t),ov=u(Ff),Fp=r(Ff,"SPAN",{});var Fx=i(Fp);nv=s(Fx,"TFRobertaModel"),Fx.forEach(t),Ff.forEach(t),vm=u(o),ht=r(o,"DIV",{class:!0});var no=i(ht);w(Jr.$$.fragment,no),sv=u(no),xp=r(no,"P",{});var xx=i(xp);av=s(xx,"The bare RoBERTa Model transformer outputting raw hidden-states without any specific head on top."),xx.forEach(t),rv=u(no),Vr=r(no,"P",{});var xf=i(Vr);iv=s(xf,"This model inherits from "),Cd=r(xf,"A",{href:!0});var Rx=i(Cd);lv=s(Rx,"TFPreTrainedModel"),Rx.forEach(t),dv=s(xf,`. 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.)`),xf.forEach(t),cv=u(no),Gr=r(no,"P",{});var Rf=i(Gr);pv=s(Rf,"This model is also a "),Xr=r(Rf,"A",{href:!0,rel:!0});var Ex=i(Xr);hv=s(Ex,"tf.keras.Model"),Ex.forEach(t),uv=s(Rf,` 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.`),Rf.forEach(t),mv=u(no),w(ys.$$.fragment,no),fv=u(no),Kt=r(no,"DIV",{class:!0});var ya=i(Kt);w(Yr.$$.fragment,ya),gv=u(ya),tn=r(ya,"P",{});var cc=i(tn);_v=s(cc,"The "),Pd=r(cc,"A",{href:!0});var Mx=i(Pd);bv=s(Mx,"TFRobertaModel"),Mx.forEach(t),kv=s(cc," forward method, overrides the "),Rp=r(cc,"CODE",{});var zx=i(Rp);yv=s(zx,"__call__"),zx.forEach(t),vv=s(cc," special method."),cc.forEach(t),wv=u(ya),w(vs.$$.fragment,ya),Tv=u(ya),w(ws.$$.fragment,ya),ya.forEach(t),no.forEach(t),wm=u(o),on=r(o,"H2",{class:!0});var Ef=i(on);Ts=r(Ef,"A",{id:!0,class:!0,href:!0});var qx=i(Ts);Ep=r(qx,"SPAN",{});var jx=i(Ep);w(Zr.$$.fragment,jx),jx.forEach(t),qx.forEach(t),$v=u(Ef),Mp=r(Ef,"SPAN",{});var Cx=i(Mp);Fv=s(Cx,"TFRobertaForCausalLM"),Cx.forEach(t),Ef.forEach(t),Tm=u(o),nn=r(o,"DIV",{class:!0});var Mf=i(nn);w(ei.$$.fragment,Mf),xv=u(Mf),Jt=r(Mf,"DIV",{class:!0});var va=i(Jt);w(ti.$$.fragment,va),Rv=u(va),sn=r(va,"P",{});var pc=i(sn);Ev=s(pc,"The "),Ad=r(pc,"A",{href:!0});var Px=i(Ad);Mv=s(Px,"TFRobertaForCausalLM"),Px.forEach(t),zv=s(pc," forward method, overrides the "),zp=r(pc,"CODE",{});var Ax=i(zp);qv=s(Ax,"__call__"),Ax.forEach(t),jv=s(pc," special method."),pc.forEach(t),Cv=u(va),w($s.$$.fragment,va),Pv=u(va),w(Fs.$$.fragment,va),va.forEach(t),Mf.forEach(t),$m=u(o),an=r(o,"H2",{class:!0});var zf=i(an);xs=r(zf,"A",{id:!0,class:!0,href:!0});var Lx=i(xs);qp=r(Lx,"SPAN",{});var Ox=i(qp);w(oi.$$.fragment,Ox),Ox.forEach(t),Lx.forEach(t),Av=u(zf),jp=r(zf,"SPAN",{});var Nx=i(jp);Lv=s(Nx,"TFRobertaForMaskedLM"),Nx.forEach(t),zf.forEach(t),Fm=u(o),ut=r(o,"DIV",{class:!0});var so=i(ut);w(ni.$$.fragment,so),Ov=u(so),si=r(so,"P",{});var qf=i(si);Nv=s(qf,"RoBERTa Model with a "),Cp=r(qf,"CODE",{});var Ix=i(Cp);Iv=s(Ix,"language modeling"),Ix.forEach(t),Dv=s(qf," head on top."),qf.forEach(t),Sv=u(so),ai=r(so,"P",{});var jf=i(ai);Bv=s(jf,"This model inherits from "),Ld=r(jf,"A",{href:!0});var Dx=i(Ld);Wv=s(Dx,"TFPreTrainedModel"),Dx.forEach(t),Uv=s(jf,`. 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.)`),jf.forEach(t),Hv=u(so),ri=r(so,"P",{});var Cf=i(ri);Qv=s(Cf,"This model is also a "),ii=r(Cf,"A",{href:!0,rel:!0});var Sx=i(ii);Kv=s(Sx,"tf.keras.Model"),Sx.forEach(t),Jv=s(Cf,` 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.`),Cf.forEach(t),Vv=u(so),w(Rs.$$.fragment,so),Gv=u(so),zt=r(so,"DIV",{class:!0});var qo=i(zt);w(li.$$.fragment,qo),Xv=u(qo),rn=r(qo,"P",{});var hc=i(rn);Yv=s(hc,"The "),Od=r(hc,"A",{href:!0});var Bx=i(Od);Zv=s(Bx,"TFRobertaForMaskedLM"),Bx.forEach(t),ew=s(hc," forward method, overrides the "),Pp=r(hc,"CODE",{});var Wx=i(Pp);tw=s(Wx,"__call__"),Wx.forEach(t),ow=s(hc," special method."),hc.forEach(t),nw=u(qo),w(Es.$$.fragment,qo),sw=u(qo),w(Ms.$$.fragment,qo),aw=u(qo),w(zs.$$.fragment,qo),qo.forEach(t),so.forEach(t),xm=u(o),ln=r(o,"H2",{class:!0});var Pf=i(ln);qs=r(Pf,"A",{id:!0,class:!0,href:!0});var Ux=i(qs);Ap=r(Ux,"SPAN",{});var Hx=i(Ap);w(di.$$.fragment,Hx),Hx.forEach(t),Ux.forEach(t),rw=u(Pf),Lp=r(Pf,"SPAN",{});var Qx=i(Lp);iw=s(Qx,"TFRobertaForSequenceClassification"),Qx.forEach(t),Pf.forEach(t),Rm=u(o),mt=r(o,"DIV",{class:!0});var ao=i(mt);w(ci.$$.fragment,ao),lw=u(ao),Op=r(ao,"P",{});var Kx=i(Op);dw=s(Kx,`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.`),Kx.forEach(t),cw=u(ao),pi=r(ao,"P",{});var Af=i(pi);pw=s(Af,"This model inherits from "),Nd=r(Af,"A",{href:!0});var Jx=i(Nd);hw=s(Jx,"TFPreTrainedModel"),Jx.forEach(t),uw=s(Af,`. 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.)`),Af.forEach(t),mw=u(ao),hi=r(ao,"P",{});var Lf=i(hi);fw=s(Lf,"This model is also a "),ui=r(Lf,"A",{href:!0,rel:!0});var Vx=i(ui);gw=s(Vx,"tf.keras.Model"),Vx.forEach(t),_w=s(Lf,` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),Lf.forEach(t),bw=u(ao),w(js.$$.fragment,ao),kw=u(ao),qt=r(ao,"DIV",{class:!0});var jo=i(qt);w(mi.$$.fragment,jo),yw=u(jo),dn=r(jo,"P",{});var uc=i(dn);vw=s(uc,"The "),Id=r(uc,"A",{href:!0});var Gx=i(Id);ww=s(Gx,"TFRobertaForSequenceClassification"),Gx.forEach(t),Tw=s(uc," forward method, overrides the "),Np=r(uc,"CODE",{});var Xx=i(Np);$w=s(Xx,"__call__"),Xx.forEach(t),Fw=s(uc," special method."),uc.forEach(t),xw=u(jo),w(Cs.$$.fragment,jo),Rw=u(jo),w(Ps.$$.fragment,jo),Ew=u(jo),w(As.$$.fragment,jo),jo.forEach(t),ao.forEach(t),Em=u(o),cn=r(o,"H2",{class:!0});var Of=i(cn);Ls=r(Of,"A",{id:!0,class:!0,href:!0});var Yx=i(Ls);Ip=r(Yx,"SPAN",{});var Zx=i(Ip);w(fi.$$.fragment,Zx),Zx.forEach(t),Yx.forEach(t),Mw=u(Of),Dp=r(Of,"SPAN",{});var eR=i(Dp);zw=s(eR,"TFRobertaForMultipleChoice"),eR.forEach(t),Of.forEach(t),Mm=u(o),ft=r(o,"DIV",{class:!0});var ro=i(ft);w(gi.$$.fragment,ro),qw=u(ro),Sp=r(ro,"P",{});var tR=i(Sp);jw=s(tR,`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.`),tR.forEach(t),Cw=u(ro),_i=r(ro,"P",{});var Nf=i(_i);Pw=s(Nf,"This model inherits from "),Dd=r(Nf,"A",{href:!0});var oR=i(Dd);Aw=s(oR,"TFPreTrainedModel"),oR.forEach(t),Lw=s(Nf,`. 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.)`),Nf.forEach(t),Ow=u(ro),bi=r(ro,"P",{});var If=i(bi);Nw=s(If,"This model is also a "),ki=r(If,"A",{href:!0,rel:!0});var nR=i(ki);Iw=s(nR,"tf.keras.Model"),nR.forEach(t),Dw=s(If,` 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.`),If.forEach(t),Sw=u(ro),w(Os.$$.fragment,ro),Bw=u(ro),Vt=r(ro,"DIV",{class:!0});var wa=i(Vt);w(yi.$$.fragment,wa),Ww=u(wa),pn=r(wa,"P",{});var mc=i(pn);Uw=s(mc,"The "),Sd=r(mc,"A",{href:!0});var sR=i(Sd);Hw=s(sR,"TFRobertaForMultipleChoice"),sR.forEach(t),Qw=s(mc," forward method, overrides the "),Bp=r(mc,"CODE",{});var aR=i(Bp);Kw=s(aR,"__call__"),aR.forEach(t),Jw=s(mc," special method."),mc.forEach(t),Vw=u(wa),w(Ns.$$.fragment,wa),Gw=u(wa),w(Is.$$.fragment,wa),wa.forEach(t),ro.forEach(t),zm=u(o),hn=r(o,"H2",{class:!0});var Df=i(hn);Ds=r(Df,"A",{id:!0,class:!0,href:!0});var rR=i(Ds);Wp=r(rR,"SPAN",{});var iR=i(Wp);w(vi.$$.fragment,iR),iR.forEach(t),rR.forEach(t),Xw=u(Df),Up=r(Df,"SPAN",{});var lR=i(Up);Yw=s(lR,"TFRobertaForTokenClassification"),lR.forEach(t),Df.forEach(t),qm=u(o),gt=r(o,"DIV",{class:!0});var io=i(gt);w(wi.$$.fragment,io),Zw=u(io),Hp=r(io,"P",{});var dR=i(Hp);eT=s(dR,`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.`),dR.forEach(t),tT=u(io),Ti=r(io,"P",{});var Sf=i(Ti);oT=s(Sf,"This model inherits from "),Bd=r(Sf,"A",{href:!0});var cR=i(Bd);nT=s(cR,"TFPreTrainedModel"),cR.forEach(t),sT=s(Sf,`. 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.)`),Sf.forEach(t),aT=u(io),$i=r(io,"P",{});var Bf=i($i);rT=s(Bf,"This model is also a "),Fi=r(Bf,"A",{href:!0,rel:!0});var pR=i(Fi);iT=s(pR,"tf.keras.Model"),pR.forEach(t),lT=s(Bf,` 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.`),Bf.forEach(t),dT=u(io),w(Ss.$$.fragment,io),cT=u(io),jt=r(io,"DIV",{class:!0});var Co=i(jt);w(xi.$$.fragment,Co),pT=u(Co),un=r(Co,"P",{});var fc=i(un);hT=s(fc,"The "),Wd=r(fc,"A",{href:!0});var hR=i(Wd);uT=s(hR,"TFRobertaForTokenClassification"),hR.forEach(t),mT=s(fc," forward method, overrides the "),Qp=r(fc,"CODE",{});var uR=i(Qp);fT=s(uR,"__call__"),uR.forEach(t),gT=s(fc," special method."),fc.forEach(t),_T=u(Co),w(Bs.$$.fragment,Co),bT=u(Co),w(Ws.$$.fragment,Co),kT=u(Co),w(Us.$$.fragment,Co),Co.forEach(t),io.forEach(t),jm=u(o),mn=r(o,"H2",{class:!0});var Wf=i(mn);Hs=r(Wf,"A",{id:!0,class:!0,href:!0});var mR=i(Hs);Kp=r(mR,"SPAN",{});var fR=i(Kp);w(Ri.$$.fragment,fR),fR.forEach(t),mR.forEach(t),yT=u(Wf),Jp=r(Wf,"SPAN",{});var gR=i(Jp);vT=s(gR,"TFRobertaForQuestionAnswering"),gR.forEach(t),Wf.forEach(t),Cm=u(o),_t=r(o,"DIV",{class:!0});var lo=i(_t);w(Ei.$$.fragment,lo),wT=u(lo),fn=r(lo,"P",{});var gc=i(fn);TT=s(gc,`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 `),Vp=r(gc,"CODE",{});var _R=i(Vp);$T=s(_R,"span start logits"),_R.forEach(t),FT=s(gc," and "),Gp=r(gc,"CODE",{});var bR=i(Gp);xT=s(bR,"span end logits"),bR.forEach(t),RT=s(gc,")."),gc.forEach(t),ET=u(lo),Mi=r(lo,"P",{});var Uf=i(Mi);MT=s(Uf,"This model inherits from "),Ud=r(Uf,"A",{href:!0});var kR=i(Ud);zT=s(kR,"TFPreTrainedModel"),kR.forEach(t),qT=s(Uf,`. 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.forEach(t),jT=u(lo),zi=r(lo,"P",{});var Hf=i(zi);CT=s(Hf,"This model is also a "),qi=r(Hf,"A",{href:!0,rel:!0});var yR=i(qi);PT=s(yR,"tf.keras.Model"),yR.forEach(t),AT=s(Hf,` 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.`),Hf.forEach(t),LT=u(lo),w(Qs.$$.fragment,lo),OT=u(lo),Ct=r(lo,"DIV",{class:!0});var Po=i(Ct);w(ji.$$.fragment,Po),NT=u(Po),gn=r(Po,"P",{});var _c=i(gn);IT=s(_c,"The "),Hd=r(_c,"A",{href:!0});var vR=i(Hd);DT=s(vR,"TFRobertaForQuestionAnswering"),vR.forEach(t),ST=s(_c," forward method, overrides the "),Xp=r(_c,"CODE",{});var wR=i(Xp);BT=s(wR,"__call__"),wR.forEach(t),WT=s(_c," special method."),_c.forEach(t),UT=u(Po),w(Ks.$$.fragment,Po),HT=u(Po),w(Js.$$.fragment,Po),QT=u(Po),w(Vs.$$.fragment,Po),Po.forEach(t),lo.forEach(t),Pm=u(o),_n=r(o,"H2",{class:!0});var Qf=i(_n);Gs=r(Qf,"A",{id:!0,class:!0,href:!0});var TR=i(Gs);Yp=r(TR,"SPAN",{});var $R=i(Yp);w(Ci.$$.fragment,$R),$R.forEach(t),TR.forEach(t),KT=u(Qf),Zp=r(Qf,"SPAN",{});var FR=i(Zp);JT=s(FR,"FlaxRobertaModel"),FR.forEach(t),Qf.forEach(t),Am=u(o),nt=r(o,"DIV",{class:!0});var Lt=i(nt);w(Pi.$$.fragment,Lt),VT=u(Lt),eh=r(Lt,"P",{});var xR=i(eh);GT=s(xR,"The bare RoBERTa Model transformer outputting raw hidden-states without any specific head on top."),xR.forEach(t),XT=u(Lt),Ai=r(Lt,"P",{});var Kf=i(Ai);YT=s(Kf,"This model inherits from "),Qd=r(Kf,"A",{href:!0});var RR=i(Qd);ZT=s(RR,"FlaxPreTrainedModel"),RR.forEach(t),e1=s(Kf,`. 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)`),Kf.forEach(t),t1=u(Lt),Li=r(Lt,"P",{});var Jf=i(Li);o1=s(Jf,"This model is also a Flax Linen "),Oi=r(Jf,"A",{href:!0,rel:!0});var ER=i(Oi);n1=s(ER,"flax.linen.Module"),ER.forEach(t),s1=s(Jf,`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),Jf.forEach(t),a1=u(Lt),th=r(Lt,"P",{});var MR=i(th);r1=s(MR,"Finally, this model supports inherent JAX features such as:"),MR.forEach(t),i1=u(Lt),po=r(Lt,"UL",{});var Ta=i(po);oh=r(Ta,"LI",{});var zR=i(oh);Ni=r(zR,"A",{href:!0,rel:!0});var qR=i(Ni);l1=s(qR,"Just-In-Time (JIT) compilation"),qR.forEach(t),zR.forEach(t),d1=u(Ta),nh=r(Ta,"LI",{});var jR=i(nh);Ii=r(jR,"A",{href:!0,rel:!0});var CR=i(Ii);c1=s(CR,"Automatic Differentiation"),CR.forEach(t),jR.forEach(t),p1=u(Ta),sh=r(Ta,"LI",{});var PR=i(sh);Di=r(PR,"A",{href:!0,rel:!0});var AR=i(Di);h1=s(AR,"Vectorization"),AR.forEach(t),PR.forEach(t),u1=u(Ta),ah=r(Ta,"LI",{});var LR=i(ah);Si=r(LR,"A",{href:!0,rel:!0});var OR=i(Si);m1=s(OR,"Parallelization"),OR.forEach(t),LR.forEach(t),Ta.forEach(t),f1=u(Lt),Gt=r(Lt,"DIV",{class:!0});var $a=i(Gt);w(Bi.$$.fragment,$a),g1=u($a),bn=r($a,"P",{});var bc=i(bn);_1=s(bc,"The "),rh=r(bc,"CODE",{});var NR=i(rh);b1=s(NR,"FlaxRobertaPreTrainedModel"),NR.forEach(t),k1=s(bc," forward method, overrides the "),ih=r(bc,"CODE",{});var IR=i(ih);y1=s(IR,"__call__"),IR.forEach(t),v1=s(bc," special method."),bc.forEach(t),w1=u($a),w(Xs.$$.fragment,$a),T1=u($a),w(Ys.$$.fragment,$a),$a.forEach(t),Lt.forEach(t),Lm=u(o),kn=r(o,"H2",{class:!0});var Vf=i(kn);Zs=r(Vf,"A",{id:!0,class:!0,href:!0});var DR=i(Zs);lh=r(DR,"SPAN",{});var SR=i(lh);w(Wi.$$.fragment,SR),SR.forEach(t),DR.forEach(t),$1=u(Vf),dh=r(Vf,"SPAN",{});var BR=i(dh);F1=s(BR,"FlaxRobertaForCausalLM"),BR.forEach(t),Vf.forEach(t),Om=u(o),st=r(o,"DIV",{class:!0});var Ot=i(st);w(Ui.$$.fragment,Ot),x1=u(Ot),ch=r(Ot,"P",{});var WR=i(ch);R1=s(WR,`Roberta Model with a language modeling head on top (a linear layer on top of the hidden-states output) e.g for
autoregressive tasks.`),WR.forEach(t),E1=u(Ot),Hi=r(Ot,"P",{});var Gf=i(Hi);M1=s(Gf,"This model inherits from "),Kd=r(Gf,"A",{href:!0});var UR=i(Kd);z1=s(UR,"FlaxPreTrainedModel"),UR.forEach(t),q1=s(Gf,`. 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)`),Gf.forEach(t),j1=u(Ot),Qi=r(Ot,"P",{});var Xf=i(Qi);C1=s(Xf,"This model is also a Flax Linen "),Ki=r(Xf,"A",{href:!0,rel:!0});var HR=i(Ki);P1=s(HR,"flax.linen.Module"),HR.forEach(t),A1=s(Xf,`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),Xf.forEach(t),L1=u(Ot),ph=r(Ot,"P",{});var QR=i(ph);O1=s(QR,"Finally, this model supports inherent JAX features such as:"),QR.forEach(t),N1=u(Ot),ho=r(Ot,"UL",{});var Fa=i(ho);hh=r(Fa,"LI",{});var KR=i(hh);Ji=r(KR,"A",{href:!0,rel:!0});var JR=i(Ji);I1=s(JR,"Just-In-Time (JIT) compilation"),JR.forEach(t),KR.forEach(t),D1=u(Fa),uh=r(Fa,"LI",{});var VR=i(uh);Vi=r(VR,"A",{href:!0,rel:!0});var GR=i(Vi);S1=s(GR,"Automatic Differentiation"),GR.forEach(t),VR.forEach(t),B1=u(Fa),mh=r(Fa,"LI",{});var XR=i(mh);Gi=r(XR,"A",{href:!0,rel:!0});var YR=i(Gi);W1=s(YR,"Vectorization"),YR.forEach(t),XR.forEach(t),U1=u(Fa),fh=r(Fa,"LI",{});var ZR=i(fh);Xi=r(ZR,"A",{href:!0,rel:!0});var eE=i(Xi);H1=s(eE,"Parallelization"),eE.forEach(t),ZR.forEach(t),Fa.forEach(t),Q1=u(Ot),Xt=r(Ot,"DIV",{class:!0});var xa=i(Xt);w(Yi.$$.fragment,xa),K1=u(xa),yn=r(xa,"P",{});var kc=i(yn);J1=s(kc,"The "),gh=r(kc,"CODE",{});var tE=i(gh);V1=s(tE,"FlaxRobertaPreTrainedModel"),tE.forEach(t),G1=s(kc," forward method, overrides the "),_h=r(kc,"CODE",{});var oE=i(_h);X1=s(oE,"__call__"),oE.forEach(t),Y1=s(kc," special method."),kc.forEach(t),Z1=u(xa),w(ea.$$.fragment,xa),e$=u(xa),w(ta.$$.fragment,xa),xa.forEach(t),Ot.forEach(t),Nm=u(o),vn=r(o,"H2",{class:!0});var Yf=i(vn);oa=r(Yf,"A",{id:!0,class:!0,href:!0});var nE=i(oa);bh=r(nE,"SPAN",{});var sE=i(bh);w(Zi.$$.fragment,sE),sE.forEach(t),nE.forEach(t),t$=u(Yf),kh=r(Yf,"SPAN",{});var aE=i(kh);o$=s(aE,"FlaxRobertaForMaskedLM"),aE.forEach(t),Yf.forEach(t),Im=u(o),at=r(o,"DIV",{class:!0});var Nt=i(at);w(el.$$.fragment,Nt),n$=u(Nt),tl=r(Nt,"P",{});var Zf=i(tl);s$=s(Zf,"RoBERTa Model with a "),yh=r(Zf,"CODE",{});var rE=i(yh);a$=s(rE,"language modeling"),rE.forEach(t),r$=s(Zf," head on top."),Zf.forEach(t),i$=u(Nt),ol=r(Nt,"P",{});var eg=i(ol);l$=s(eg,"This model inherits from "),Jd=r(eg,"A",{href:!0});var iE=i(Jd);d$=s(iE,"FlaxPreTrainedModel"),iE.forEach(t),c$=s(eg,`. 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)`),eg.forEach(t),p$=u(Nt),nl=r(Nt,"P",{});var tg=i(nl);h$=s(tg,"This model is also a Flax Linen "),sl=r(tg,"A",{href:!0,rel:!0});var lE=i(sl);u$=s(lE,"flax.linen.Module"),lE.forEach(t),m$=s(tg,`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),tg.forEach(t),f$=u(Nt),vh=r(Nt,"P",{});var dE=i(vh);g$=s(dE,"Finally, this model supports inherent JAX features such as:"),dE.forEach(t),_$=u(Nt),uo=r(Nt,"UL",{});var Ra=i(uo);wh=r(Ra,"LI",{});var cE=i(wh);al=r(cE,"A",{href:!0,rel:!0});var pE=i(al);b$=s(pE,"Just-In-Time (JIT) compilation"),pE.forEach(t),cE.forEach(t),k$=u(Ra),Th=r(Ra,"LI",{});var hE=i(Th);rl=r(hE,"A",{href:!0,rel:!0});var uE=i(rl);y$=s(uE,"Automatic Differentiation"),uE.forEach(t),hE.forEach(t),v$=u(Ra),$h=r(Ra,"LI",{});var mE=i($h);il=r(mE,"A",{href:!0,rel:!0});var fE=i(il);w$=s(fE,"Vectorization"),fE.forEach(t),mE.forEach(t),T$=u(Ra),Fh=r(Ra,"LI",{});var gE=i(Fh);ll=r(gE,"A",{href:!0,rel:!0});var _E=i(ll);$$=s(_E,"Parallelization"),_E.forEach(t),gE.forEach(t),Ra.forEach(t),F$=u(Nt),Yt=r(Nt,"DIV",{class:!0});var Ea=i(Yt);w(dl.$$.fragment,Ea),x$=u(Ea),wn=r(Ea,"P",{});var yc=i(wn);R$=s(yc,"The "),xh=r(yc,"CODE",{});var bE=i(xh);E$=s(bE,"FlaxRobertaPreTrainedModel"),bE.forEach(t),M$=s(yc," forward method, overrides the "),Rh=r(yc,"CODE",{});var kE=i(Rh);z$=s(kE,"__call__"),kE.forEach(t),q$=s(yc," special method."),yc.forEach(t),j$=u(Ea),w(na.$$.fragment,Ea),C$=u(Ea),w(sa.$$.fragment,Ea),Ea.forEach(t),Nt.forEach(t),Dm=u(o),Tn=r(o,"H2",{class:!0});var og=i(Tn);aa=r(og,"A",{id:!0,class:!0,href:!0});var yE=i(aa);Eh=r(yE,"SPAN",{});var vE=i(Eh);w(cl.$$.fragment,vE),vE.forEach(t),yE.forEach(t),P$=u(og),Mh=r(og,"SPAN",{});var wE=i(Mh);A$=s(wE,"FlaxRobertaForSequenceClassification"),wE.forEach(t),og.forEach(t),Sm=u(o),rt=r(o,"DIV",{class:!0});var It=i(rt);w(pl.$$.fragment,It),L$=u(It),zh=r(It,"P",{});var TE=i(zh);O$=s(TE,`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.`),TE.forEach(t),N$=u(It),hl=r(It,"P",{});var ng=i(hl);I$=s(ng,"This model inherits from "),Vd=r(ng,"A",{href:!0});var $E=i(Vd);D$=s($E,"FlaxPreTrainedModel"),$E.forEach(t),S$=s(ng,`. 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)`),ng.forEach(t),B$=u(It),ul=r(It,"P",{});var sg=i(ul);W$=s(sg,"This model is also a Flax Linen "),ml=r(sg,"A",{href:!0,rel:!0});var FE=i(ml);U$=s(FE,"flax.linen.Module"),FE.forEach(t),H$=s(sg,`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),sg.forEach(t),Q$=u(It),qh=r(It,"P",{});var xE=i(qh);K$=s(xE,"Finally, this model supports inherent JAX features such as:"),xE.forEach(t),J$=u(It),mo=r(It,"UL",{});var Ma=i(mo);jh=r(Ma,"LI",{});var RE=i(jh);fl=r(RE,"A",{href:!0,rel:!0});var EE=i(fl);V$=s(EE,"Just-In-Time (JIT) compilation"),EE.forEach(t),RE.forEach(t),G$=u(Ma),Ch=r(Ma,"LI",{});var ME=i(Ch);gl=r(ME,"A",{href:!0,rel:!0});var zE=i(gl);X$=s(zE,"Automatic Differentiation"),zE.forEach(t),ME.forEach(t),Y$=u(Ma),Ph=r(Ma,"LI",{});var qE=i(Ph);_l=r(qE,"A",{href:!0,rel:!0});var jE=i(_l);Z$=s(jE,"Vectorization"),jE.forEach(t),qE.forEach(t),e0=u(Ma),Ah=r(Ma,"LI",{});var CE=i(Ah);bl=r(CE,"A",{href:!0,rel:!0});var PE=i(bl);t0=s(PE,"Parallelization"),PE.forEach(t),CE.forEach(t),Ma.forEach(t),o0=u(It),Zt=r(It,"DIV",{class:!0});var za=i(Zt);w(kl.$$.fragment,za),n0=u(za),$n=r(za,"P",{});var vc=i($n);s0=s(vc,"The "),Lh=r(vc,"CODE",{});var AE=i(Lh);a0=s(AE,"FlaxRobertaPreTrainedModel"),AE.forEach(t),r0=s(vc," forward method, overrides the "),Oh=r(vc,"CODE",{});var LE=i(Oh);i0=s(LE,"__call__"),LE.forEach(t),l0=s(vc," special method."),vc.forEach(t),d0=u(za),w(ra.$$.fragment,za),c0=u(za),w(ia.$$.fragment,za),za.forEach(t),It.forEach(t),Bm=u(o),Fn=r(o,"H2",{class:!0});var ag=i(Fn);la=r(ag,"A",{id:!0,class:!0,href:!0});var OE=i(la);Nh=r(OE,"SPAN",{});var NE=i(Nh);w(yl.$$.fragment,NE),NE.forEach(t),OE.forEach(t),p0=u(ag),Ih=r(ag,"SPAN",{});var IE=i(Ih);h0=s(IE,"FlaxRobertaForMultipleChoice"),IE.forEach(t),ag.forEach(t),Wm=u(o),it=r(o,"DIV",{class:!0});var Dt=i(it);w(vl.$$.fragment,Dt),u0=u(Dt),Dh=r(Dt,"P",{});var DE=i(Dh);m0=s(DE,`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.`),DE.forEach(t),f0=u(Dt),wl=r(Dt,"P",{});var rg=i(wl);g0=s(rg,"This model inherits from "),Gd=r(rg,"A",{href:!0});var SE=i(Gd);_0=s(SE,"FlaxPreTrainedModel"),SE.forEach(t),b0=s(rg,`. 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)`),rg.forEach(t),k0=u(Dt),Tl=r(Dt,"P",{});var ig=i(Tl);y0=s(ig,"This model is also a Flax Linen "),$l=r(ig,"A",{href:!0,rel:!0});var BE=i($l);v0=s(BE,"flax.linen.Module"),BE.forEach(t),w0=s(ig,`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),ig.forEach(t),T0=u(Dt),Sh=r(Dt,"P",{});var WE=i(Sh);$0=s(WE,"Finally, this model supports inherent JAX features such as:"),WE.forEach(t),F0=u(Dt),fo=r(Dt,"UL",{});var qa=i(fo);Bh=r(qa,"LI",{});var UE=i(Bh);Fl=r(UE,"A",{href:!0,rel:!0});var HE=i(Fl);x0=s(HE,"Just-In-Time (JIT) compilation"),HE.forEach(t),UE.forEach(t),R0=u(qa),Wh=r(qa,"LI",{});var QE=i(Wh);xl=r(QE,"A",{href:!0,rel:!0});var KE=i(xl);E0=s(KE,"Automatic Differentiation"),KE.forEach(t),QE.forEach(t),M0=u(qa),Uh=r(qa,"LI",{});var JE=i(Uh);Rl=r(JE,"A",{href:!0,rel:!0});var VE=i(Rl);z0=s(VE,"Vectorization"),VE.forEach(t),JE.forEach(t),q0=u(qa),Hh=r(qa,"LI",{});var GE=i(Hh);El=r(GE,"A",{href:!0,rel:!0});var XE=i(El);j0=s(XE,"Parallelization"),XE.forEach(t),GE.forEach(t),qa.forEach(t),C0=u(Dt),eo=r(Dt,"DIV",{class:!0});var ja=i(eo);w(Ml.$$.fragment,ja),P0=u(ja),xn=r(ja,"P",{});var wc=i(xn);A0=s(wc,"The "),Qh=r(wc,"CODE",{});var YE=i(Qh);L0=s(YE,"FlaxRobertaPreTrainedModel"),YE.forEach(t),O0=s(wc," forward method, overrides the "),Kh=r(wc,"CODE",{});var ZE=i(Kh);N0=s(ZE,"__call__"),ZE.forEach(t),I0=s(wc," special method."),wc.forEach(t),D0=u(ja),w(da.$$.fragment,ja),S0=u(ja),w(ca.$$.fragment,ja),ja.forEach(t),Dt.forEach(t),Um=u(o),Rn=r(o,"H2",{class:!0});var lg=i(Rn);pa=r(lg,"A",{id:!0,class:!0,href:!0});var eM=i(pa);Jh=r(eM,"SPAN",{});var tM=i(Jh);w(zl.$$.fragment,tM),tM.forEach(t),eM.forEach(t),B0=u(lg),Vh=r(lg,"SPAN",{});var oM=i(Vh);W0=s(oM,"FlaxRobertaForTokenClassification"),oM.forEach(t),lg.forEach(t),Hm=u(o),lt=r(o,"DIV",{class:!0});var St=i(lt);w(ql.$$.fragment,St),U0=u(St),Gh=r(St,"P",{});var nM=i(Gh);H0=s(nM,`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.`),nM.forEach(t),Q0=u(St),jl=r(St,"P",{});var dg=i(jl);K0=s(dg,"This model inherits from "),Xd=r(dg,"A",{href:!0});var sM=i(Xd);J0=s(sM,"FlaxPreTrainedModel"),sM.forEach(t),V0=s(dg,`. 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)`),dg.forEach(t),G0=u(St),Cl=r(St,"P",{});var cg=i(Cl);X0=s(cg,"This model is also a Flax Linen "),Pl=r(cg,"A",{href:!0,rel:!0});var aM=i(Pl);Y0=s(aM,"flax.linen.Module"),aM.forEach(t),Z0=s(cg,`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),cg.forEach(t),e2=u(St),Xh=r(St,"P",{});var rM=i(Xh);t2=s(rM,"Finally, this model supports inherent JAX features such as:"),rM.forEach(t),o2=u(St),go=r(St,"UL",{});var Ca=i(go);Yh=r(Ca,"LI",{});var iM=i(Yh);Al=r(iM,"A",{href:!0,rel:!0});var lM=i(Al);n2=s(lM,"Just-In-Time (JIT) compilation"),lM.forEach(t),iM.forEach(t),s2=u(Ca),Zh=r(Ca,"LI",{});var dM=i(Zh);Ll=r(dM,"A",{href:!0,rel:!0});var cM=i(Ll);a2=s(cM,"Automatic Differentiation"),cM.forEach(t),dM.forEach(t),r2=u(Ca),eu=r(Ca,"LI",{});var pM=i(eu);Ol=r(pM,"A",{href:!0,rel:!0});var hM=i(Ol);i2=s(hM,"Vectorization"),hM.forEach(t),pM.forEach(t),l2=u(Ca),tu=r(Ca,"LI",{});var uM=i(tu);Nl=r(uM,"A",{href:!0,rel:!0});var mM=i(Nl);d2=s(mM,"Parallelization"),mM.forEach(t),uM.forEach(t),Ca.forEach(t),c2=u(St),to=r(St,"DIV",{class:!0});var Pa=i(to);w(Il.$$.fragment,Pa),p2=u(Pa),En=r(Pa,"P",{});var Tc=i(En);h2=s(Tc,"The "),ou=r(Tc,"CODE",{});var fM=i(ou);u2=s(fM,"FlaxRobertaPreTrainedModel"),fM.forEach(t),m2=s(Tc," forward method, overrides the "),nu=r(Tc,"CODE",{});var gM=i(nu);f2=s(gM,"__call__"),gM.forEach(t),g2=s(Tc," special method."),Tc.forEach(t),_2=u(Pa),w(ha.$$.fragment,Pa),b2=u(Pa),w(ua.$$.fragment,Pa),Pa.forEach(t),St.forEach(t),Qm=u(o),Mn=r(o,"H2",{class:!0});var pg=i(Mn);ma=r(pg,"A",{id:!0,class:!0,href:!0});var _M=i(ma);su=r(_M,"SPAN",{});var bM=i(su);w(Dl.$$.fragment,bM),bM.forEach(t),_M.forEach(t),k2=u(pg),au=r(pg,"SPAN",{});var kM=i(au);y2=s(kM,"FlaxRobertaForQuestionAnswering"),kM.forEach(t),pg.forEach(t),Km=u(o),dt=r(o,"DIV",{class:!0});var Bt=i(dt);w(Sl.$$.fragment,Bt),v2=u(Bt),zn=r(Bt,"P",{});var $c=i(zn);w2=s($c,`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 `),ru=r($c,"CODE",{});var yM=i(ru);T2=s(yM,"span start logits"),yM.forEach(t),$2=s($c," and "),iu=r($c,"CODE",{});var vM=i(iu);F2=s(vM,"span end logits"),vM.forEach(t),x2=s($c,")."),$c.forEach(t),R2=u(Bt),Bl=r(Bt,"P",{});var hg=i(Bl);E2=s(hg,"This model inherits from "),Yd=r(hg,"A",{href:!0});var wM=i(Yd);M2=s(wM,"FlaxPreTrainedModel"),wM.forEach(t),z2=s(hg,`. 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)`),hg.forEach(t),q2=u(Bt),Wl=r(Bt,"P",{});var ug=i(Wl);j2=s(ug,"This model is also a Flax Linen "),Ul=r(ug,"A",{href:!0,rel:!0});var TM=i(Ul);C2=s(TM,"flax.linen.Module"),TM.forEach(t),P2=s(ug,`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),ug.forEach(t),A2=u(Bt),lu=r(Bt,"P",{});var $M=i(lu);L2=s($M,"Finally, this model supports inherent JAX features such as:"),$M.forEach(t),O2=u(Bt),_o=r(Bt,"UL",{});var Aa=i(_o);du=r(Aa,"LI",{});var FM=i(du);Hl=r(FM,"A",{href:!0,rel:!0});var xM=i(Hl);N2=s(xM,"Just-In-Time (JIT) compilation"),xM.forEach(t),FM.forEach(t),I2=u(Aa),cu=r(Aa,"LI",{});var RM=i(cu);Ql=r(RM,"A",{href:!0,rel:!0});var EM=i(Ql);D2=s(EM,"Automatic Differentiation"),EM.forEach(t),RM.forEach(t),S2=u(Aa),pu=r(Aa,"LI",{});var MM=i(pu);Kl=r(MM,"A",{href:!0,rel:!0});var zM=i(Kl);B2=s(zM,"Vectorization"),zM.forEach(t),MM.forEach(t),W2=u(Aa),hu=r(Aa,"LI",{});var qM=i(hu);Jl=r(qM,"A",{href:!0,rel:!0});var jM=i(Jl);U2=s(jM,"Parallelization"),jM.forEach(t),qM.forEach(t),Aa.forEach(t),H2=u(Bt),oo=r(Bt,"DIV",{class:!0});var La=i(oo);w(Vl.$$.fragment,La),Q2=u(La),qn=r(La,"P",{});var Fc=i(qn);K2=s(Fc,"The "),uu=r(Fc,"CODE",{});var CM=i(uu);J2=s(CM,"FlaxRobertaPreTrainedModel"),CM.forEach(t),V2=s(Fc," forward method, overrides the "),mu=r(Fc,"CODE",{});var PM=i(mu);G2=s(PM,"__call__"),PM.forEach(t),X2=s(Fc," special method."),Fc.forEach(t),Y2=u(La),w(fa.$$.fragment,La),Z2=u(La),w(ga.$$.fragment,La),La.forEach(t),Bt.forEach(t),this.h()},h(){f(d,"name","hf:doc:metadata"),f(d,"content",JSON.stringify(Gz)),f(m,"id","roberta"),f(m,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),f(m,"href","#roberta"),f(c,"class","relative group"),f(te,"id","overview"),f(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"),f(te,"href","#overview"),f(N,"class","relative group"),f(pe,"href","https://arxiv.org/abs/1907.11692"),f(pe,"rel","nofollow"),f(C,"href","/docs/transformers/pr_19907/en/model_doc/bert#transformers.BertModel"),f(He,"href","camembert"),f(Se,"href","https://huggingface.co/julien-c"),f(Se,"rel","nofollow"),f(Be,"href","https://github.com/pytorch/fairseq/tree/master/examples/roberta"),f(Be,"rel","nofollow"),f(W,"id","transformers.RobertaConfig"),f(W,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),f(W,"href","#transformers.RobertaConfig"),f(Oe,"class","relative group"),f(id,"href","/docs/transformers/pr_19907/en/model_doc/roberta#transformers.RobertaModel"),f(ld,"href","/docs/transformers/pr_19907/en/model_doc/roberta#transformers.TFRobertaModel"),f(Na,"href","https://huggingface.co/roberta-base"),f(Na,"rel","nofollow"),f(dd,"href","/docs/transformers/pr_19907/en/main_classes/configuration#transformers.PretrainedConfig"),f(cd,"href","/docs/transformers/pr_19907/en/main_classes/configuration#transformers.PretrainedConfig"),f(pd,"href","/docs/transformers/pr_19907/en/model_doc/roberta#transformers.RobertaConfig"),f(hd,"href","/docs/transformers/pr_19907/en/model_doc/bert#transformers.BertConfig"),f(yt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(On,"id","transformers.RobertaTokenizer"),f(On,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),f(On,"href","#transformers.RobertaTokenizer"),f(Oo,"class","relative group"),f(ud,"href","/docs/transformers/pr_19907/en/main_classes/tokenizer#transformers.PreTrainedTokenizer"),f(vo,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(Dn,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(Sn,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(gd,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(Ie,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(Bn,"id","transformers.RobertaTokenizerFast"),f(Bn,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),f(Bn,"href","#transformers.RobertaTokenizerFast"),f(No,"class","relative group"),f(_d,"href","/docs/transformers/pr_19907/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast"),f(bd,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(tt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(Hn,"id","transformers.RobertaModel"),f(Hn,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),f(Hn,"href","#transformers.RobertaModel"),f(Io,"class","relative group"),f(kd,"href","/docs/transformers/pr_19907/en/main_classes/model#transformers.PreTrainedModel"),f(ar,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),f(ar,"rel","nofollow"),f(ir,"href","https://arxiv.org/abs/1706.03762"),f(ir,"rel","nofollow"),f(yd,"href","/docs/transformers/pr_19907/en/model_doc/roberta#transformers.RobertaModel"),f(Ut,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(ot,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(Vn,"id","transformers.RobertaForCausalLM"),f(Vn,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),f(Vn,"href","#transformers.RobertaForCausalLM"),f(So,"class","relative group"),f(vd,"href","/docs/transformers/pr_19907/en/main_classes/model#transformers.PreTrainedModel"),f(mr,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),f(mr,"rel","nofollow"),f(wd,"href","/docs/transformers/pr_19907/en/model_doc/roberta#transformers.RobertaForCausalLM"),f(Ht,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(vt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(Yn,"id","transformers.RobertaForMaskedLM"),f(Yn,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),f(Yn,"href","#transformers.RobertaForMaskedLM"),f(Wo,"class","relative group"),f(Td,"href","/docs/transformers/pr_19907/en/main_classes/model#transformers.PreTrainedModel"),f(vr,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),f(vr,"rel","nofollow"),f($d,"href","/docs/transformers/pr_19907/en/model_doc/roberta#transformers.RobertaForMaskedLM"),f(Rt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(wt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(os,"id","transformers.RobertaForSequenceClassification"),f(os,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),f(os,"href","#transformers.RobertaForSequenceClassification"),f(Ho,"class","relative group"),f(Fd,"href","/docs/transformers/pr_19907/en/main_classes/model#transformers.PreTrainedModel"),f(Rr,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),f(Rr,"rel","nofollow"),f(xd,"href","/docs/transformers/pr_19907/en/model_doc/roberta#transformers.RobertaForSequenceClassification"),f(ct,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(Tt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(ls,"id","transformers.RobertaForMultipleChoice"),f(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"),f(ls,"href","#transformers.RobertaForMultipleChoice"),f(Ko,"class","relative group"),f(Rd,"href","/docs/transformers/pr_19907/en/main_classes/model#transformers.PreTrainedModel"),f(Cr,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),f(Cr,"rel","nofollow"),f(Ed,"href","/docs/transformers/pr_19907/en/model_doc/roberta#transformers.RobertaForMultipleChoice"),f(Qt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f($t,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(ps,"id","transformers.RobertaForTokenClassification"),f(ps,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),f(ps,"href","#transformers.RobertaForTokenClassification"),f(Vo,"class","relative group"),f(Md,"href","/docs/transformers/pr_19907/en/main_classes/model#transformers.PreTrainedModel"),f(Ir,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),f(Ir,"rel","nofollow"),f(zd,"href","/docs/transformers/pr_19907/en/model_doc/roberta#transformers.RobertaForTokenClassification"),f(Et,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(Ft,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(fs,"id","transformers.RobertaForQuestionAnswering"),f(fs,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),f(fs,"href","#transformers.RobertaForQuestionAnswering"),f(Xo,"class","relative group"),f(qd,"href","/docs/transformers/pr_19907/en/main_classes/model#transformers.PreTrainedModel"),f(Hr,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),f(Hr,"rel","nofollow"),f(jd,"href","/docs/transformers/pr_19907/en/model_doc/roberta#transformers.RobertaForQuestionAnswering"),f(Mt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(xt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(ks,"id","transformers.TFRobertaModel"),f(ks,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),f(ks,"href","#transformers.TFRobertaModel"),f(en,"class","relative group"),f(Cd,"href","/docs/transformers/pr_19907/en/main_classes/model#transformers.TFPreTrainedModel"),f(Xr,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),f(Xr,"rel","nofollow"),f(Pd,"href","/docs/transformers/pr_19907/en/model_doc/roberta#transformers.TFRobertaModel"),f(Kt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(ht,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(Ts,"id","transformers.TFRobertaForCausalLM"),f(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"),f(Ts,"href","#transformers.TFRobertaForCausalLM"),f(on,"class","relative group"),f(Ad,"href","/docs/transformers/pr_19907/en/model_doc/roberta#transformers.TFRobertaForCausalLM"),f(Jt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(nn,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(xs,"id","transformers.TFRobertaForMaskedLM"),f(xs,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),f(xs,"href","#transformers.TFRobertaForMaskedLM"),f(an,"class","relative group"),f(Ld,"href","/docs/transformers/pr_19907/en/main_classes/model#transformers.TFPreTrainedModel"),f(ii,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),f(ii,"rel","nofollow"),f(Od,"href","/docs/transformers/pr_19907/en/model_doc/roberta#transformers.TFRobertaForMaskedLM"),f(zt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(ut,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(qs,"id","transformers.TFRobertaForSequenceClassification"),f(qs,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),f(qs,"href","#transformers.TFRobertaForSequenceClassification"),f(ln,"class","relative group"),f(Nd,"href","/docs/transformers/pr_19907/en/main_classes/model#transformers.TFPreTrainedModel"),f(ui,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),f(ui,"rel","nofollow"),f(Id,"href","/docs/transformers/pr_19907/en/model_doc/roberta#transformers.TFRobertaForSequenceClassification"),f(qt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(mt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(Ls,"id","transformers.TFRobertaForMultipleChoice"),f(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"),f(Ls,"href","#transformers.TFRobertaForMultipleChoice"),f(cn,"class","relative group"),f(Dd,"href","/docs/transformers/pr_19907/en/main_classes/model#transformers.TFPreTrainedModel"),f(ki,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),f(ki,"rel","nofollow"),f(Sd,"href","/docs/transformers/pr_19907/en/model_doc/roberta#transformers.TFRobertaForMultipleChoice"),f(Vt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(ft,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(Ds,"id","transformers.TFRobertaForTokenClassification"),f(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"),f(Ds,"href","#transformers.TFRobertaForTokenClassification"),f(hn,"class","relative group"),f(Bd,"href","/docs/transformers/pr_19907/en/main_classes/model#transformers.TFPreTrainedModel"),f(Fi,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),f(Fi,"rel","nofollow"),f(Wd,"href","/docs/transformers/pr_19907/en/model_doc/roberta#transformers.TFRobertaForTokenClassification"),f(jt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(gt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(Hs,"id","transformers.TFRobertaForQuestionAnswering"),f(Hs,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),f(Hs,"href","#transformers.TFRobertaForQuestionAnswering"),f(mn,"class","relative group"),f(Ud,"href","/docs/transformers/pr_19907/en/main_classes/model#transformers.TFPreTrainedModel"),f(qi,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),f(qi,"rel","nofollow"),f(Hd,"href","/docs/transformers/pr_19907/en/model_doc/roberta#transformers.TFRobertaForQuestionAnswering"),f(Ct,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(_t,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(Gs,"id","transformers.FlaxRobertaModel"),f(Gs,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),f(Gs,"href","#transformers.FlaxRobertaModel"),f(_n,"class","relative group"),f(Qd,"href","/docs/transformers/pr_19907/en/main_classes/model#transformers.FlaxPreTrainedModel"),f(Oi,"href","https://flax.readthedocs.io/en/latest/flax.linen.html#module"),f(Oi,"rel","nofollow"),f(Ni,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),f(Ni,"rel","nofollow"),f(Ii,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),f(Ii,"rel","nofollow"),f(Di,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),f(Di,"rel","nofollow"),f(Si,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),f(Si,"rel","nofollow"),f(Gt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(nt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(Zs,"id","transformers.FlaxRobertaForCausalLM"),f(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"),f(Zs,"href","#transformers.FlaxRobertaForCausalLM"),f(kn,"class","relative group"),f(Kd,"href","/docs/transformers/pr_19907/en/main_classes/model#transformers.FlaxPreTrainedModel"),f(Ki,"href","https://flax.readthedocs.io/en/latest/flax.linen.html#module"),f(Ki,"rel","nofollow"),f(Ji,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),f(Ji,"rel","nofollow"),f(Vi,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),f(Vi,"rel","nofollow"),f(Gi,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),f(Gi,"rel","nofollow"),f(Xi,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),f(Xi,"rel","nofollow"),f(Xt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(st,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(oa,"id","transformers.FlaxRobertaForMaskedLM"),f(oa,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),f(oa,"href","#transformers.FlaxRobertaForMaskedLM"),f(vn,"class","relative group"),f(Jd,"href","/docs/transformers/pr_19907/en/main_classes/model#transformers.FlaxPreTrainedModel"),f(sl,"href","https://flax.readthedocs.io/en/latest/flax.linen.html#module"),f(sl,"rel","nofollow"),f(al,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),f(al,"rel","nofollow"),f(rl,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),f(rl,"rel","nofollow"),f(il,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),f(il,"rel","nofollow"),f(ll,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),f(ll,"rel","nofollow"),f(Yt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(at,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(aa,"id","transformers.FlaxRobertaForSequenceClassification"),f(aa,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),f(aa,"href","#transformers.FlaxRobertaForSequenceClassification"),f(Tn,"class","relative group"),f(Vd,"href","/docs/transformers/pr_19907/en/main_classes/model#transformers.FlaxPreTrainedModel"),f(ml,"href","https://flax.readthedocs.io/en/latest/flax.linen.html#module"),f(ml,"rel","nofollow"),f(fl,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),f(fl,"rel","nofollow"),f(gl,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),f(gl,"rel","nofollow"),f(_l,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),f(_l,"rel","nofollow"),f(bl,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),f(bl,"rel","nofollow"),f(Zt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(rt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(la,"id","transformers.FlaxRobertaForMultipleChoice"),f(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"),f(la,"href","#transformers.FlaxRobertaForMultipleChoice"),f(Fn,"class","relative group"),f(Gd,"href","/docs/transformers/pr_19907/en/main_classes/model#transformers.FlaxPreTrainedModel"),f($l,"href","https://flax.readthedocs.io/en/latest/flax.linen.html#module"),f($l,"rel","nofollow"),f(Fl,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),f(Fl,"rel","nofollow"),f(xl,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),f(xl,"rel","nofollow"),f(Rl,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),f(Rl,"rel","nofollow"),f(El,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),f(El,"rel","nofollow"),f(eo,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(it,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(pa,"id","transformers.FlaxRobertaForTokenClassification"),f(pa,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),f(pa,"href","#transformers.FlaxRobertaForTokenClassification"),f(Rn,"class","relative group"),f(Xd,"href","/docs/transformers/pr_19907/en/main_classes/model#transformers.FlaxPreTrainedModel"),f(Pl,"href","https://flax.readthedocs.io/en/latest/flax.linen.html#module"),f(Pl,"rel","nofollow"),f(Al,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),f(Al,"rel","nofollow"),f(Ll,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),f(Ll,"rel","nofollow"),f(Ol,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),f(Ol,"rel","nofollow"),f(Nl,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),f(Nl,"rel","nofollow"),f(to,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(lt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(ma,"id","transformers.FlaxRobertaForQuestionAnswering"),f(ma,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),f(ma,"href","#transformers.FlaxRobertaForQuestionAnswering"),f(Mn,"class","relative group"),f(Yd,"href","/docs/transformers/pr_19907/en/main_classes/model#transformers.FlaxPreTrainedModel"),f(Ul,"href","https://flax.readthedocs.io/en/latest/flax.linen.html#module"),f(Ul,"rel","nofollow"),f(Hl,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),f(Hl,"rel","nofollow"),f(Ql,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),f(Ql,"rel","nofollow"),f(Kl,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),f(Kl,"rel","nofollow"),f(Jl,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),f(Jl,"rel","nofollow"),f(oo,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(dt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(o,b){e(document.head,d),k(o,g,b),k(o,c,b),e(c,m),e(m,_),T(l,_,null),e(c,p),e(c,E),e(E,le),k(o,Z,b),k(o,N,b),e(N,te),e(te,oe),T(M,oe,null),e(N,we),e(N,K),e(K,Te),k(o,ge,b),k(o,B,b),e(B,$e),e(B,pe),e(pe,J),e(B,Fe),k(o,_e,b),k(o,U,b),e(U,xe),k(o,be,b),k(o,H,b),e(H,Re),k(o,ke,b),k(o,ee,b),e(ee,j),e(j,P),k(o,ye,b),k(o,Q,b),e(Q,Ee),k(o,ve,b),k(o,I,b),e(I,he),e(he,Me),e(he,C),e(C,ze),e(he,V),e(I,qe),e(I,ue),e(ue,G),e(I,je),e(I,ne),e(ne,D),e(ne,me),e(me,X),e(ne,Ce),e(ne,se),e(se,A),e(ne,Pe),e(ne,L),e(L,Ae),e(ne,Le),e(I,y),e(I,z),e(z,He),e(He,de),e(z,Xe),k(o,Je,b),k(o,q,b),e(q,Ye),e(q,Se),e(Se,Ze),e(q,et),e(q,Be),e(Be,S),e(q,Y),k(o,Ve,b),k(o,Oe,b),e(Oe,W),e(W,Qe),T(We,Qe,null),e(Oe,Ne),e(Oe,Ke),e(Ke,ce),k(o,Ge,b),k(o,yt,b),T(Oa,yt,null),e(yt,mg),e(yt,co),e(co,fg),e(co,id),e(id,gg),e(co,_g),e(co,ld),e(ld,bg),e(co,kg),e(co,Na),e(Na,yg),e(co,vg),e(yt,wg),e(yt,Ao),e(Ao,Tg),e(Ao,dd),e(dd,$g),e(Ao,Fg),e(Ao,cd),e(cd,xg),e(Ao,Rg),e(yt,Eg),e(yt,Lo),e(Lo,Mg),e(Lo,pd),e(pd,zg),e(Lo,qg),e(Lo,hd),e(hd,jg),e(Lo,Cg),e(yt,Pg),T(Ln,yt,null),k(o,om,b),k(o,Oo,b),e(Oo,On),e(On,xc),T(Ia,xc,null),e(Oo,Ag),e(Oo,Rc),e(Rc,Lg),k(o,nm,b),k(o,Ie,b),T(Da,Ie,null),e(Ie,Og),e(Ie,Ec),e(Ec,Ng),e(Ie,Ig),e(Ie,Mc),e(Mc,Dg),e(Ie,Sg),T(Nn,Ie,null),e(Ie,Bg),e(Ie,Sa),e(Sa,Wg),e(Sa,zc),e(zc,Ug),e(Sa,Hg),e(Ie,Qg),T(In,Ie,null),e(Ie,Kg),e(Ie,Ba),e(Ba,Jg),e(Ba,ud),e(ud,Vg),e(Ba,Gg),e(Ie,Xg),e(Ie,vo),T(Wa,vo,null),e(vo,Yg),e(vo,qc),e(qc,Zg),e(vo,e_),e(vo,Ua),e(Ua,md),e(md,t_),e(md,jc),e(jc,o_),e(Ua,n_),e(Ua,fd),e(fd,s_),e(fd,Cc),e(Cc,a_),e(Ie,r_),e(Ie,Dn),T(Ha,Dn,null),e(Dn,i_),e(Dn,Qa),e(Qa,l_),e(Qa,Pc),e(Pc,d_),e(Qa,c_),e(Ie,p_),e(Ie,Sn),T(Ka,Sn,null),e(Sn,h_),e(Sn,Ac),e(Ac,u_),e(Ie,m_),e(Ie,gd),T(Ja,gd,null),k(o,sm,b),k(o,No,b),e(No,Bn),e(Bn,Lc),T(Va,Lc,null),e(No,f_),e(No,Oc),e(Oc,g_),k(o,am,b),k(o,tt,b),T(Ga,tt,null),e(tt,__),e(tt,Xa),e(Xa,b_),e(Xa,Nc),e(Nc,k_),e(Xa,y_),e(tt,v_),e(tt,Ic),e(Ic,w_),e(tt,T_),T(Wn,tt,null),e(tt,$_),e(tt,Ya),e(Ya,F_),e(Ya,Dc),e(Dc,x_),e(Ya,R_),e(tt,E_),T(Un,tt,null),e(tt,M_),e(tt,Za),e(Za,z_),e(Za,_d),e(_d,q_),e(Za,j_),e(tt,C_),e(tt,bd),T(er,bd,null),k(o,rm,b),k(o,Io,b),e(Io,Hn),e(Hn,Sc),T(tr,Sc,null),e(Io,P_),e(Io,Bc),e(Bc,A_),k(o,im,b),k(o,ot,b),T(or,ot,null),e(ot,L_),e(ot,Wc),e(Wc,O_),e(ot,N_),e(ot,nr),e(nr,I_),e(nr,kd),e(kd,D_),e(nr,S_),e(ot,B_),e(ot,sr),e(sr,W_),e(sr,ar),e(ar,U_),e(sr,H_),e(ot,Q_),e(ot,rr),e(rr,K_),e(rr,Uc),e(Uc,J_),e(rr,V_),e(ot,G_),e(ot,pt),e(pt,X_),e(pt,Hc),e(Hc,Y_),e(pt,Z_),e(pt,Qc),e(Qc,eb),e(pt,tb),e(pt,Kc),e(Kc,ob),e(pt,nb),e(pt,Jc),e(Jc,sb),e(pt,ab),e(pt,Vc),e(Vc,rb),e(pt,ib),e(pt,Gc),e(Gc,lb),e(pt,db),e(ot,cb),e(ot,Qn),e(Qn,pb),e(Qn,Xc),e(Xc,hb),e(Qn,ub),e(Qn,ir),e(ir,mb),e(ot,fb),e(ot,Ut),T(lr,Ut,null),e(Ut,gb),e(Ut,Do),e(Do,_b),e(Do,yd),e(yd,bb),e(Do,kb),e(Do,Yc),e(Yc,yb),e(Do,vb),e(Ut,wb),T(Kn,Ut,null),e(Ut,Tb),T(Jn,Ut,null),k(o,lm,b),k(o,So,b),e(So,Vn),e(Vn,Zc),T(dr,Zc,null),e(So,$b),e(So,ep),e(ep,Fb),k(o,dm,b),k(o,vt,b),T(cr,vt,null),e(vt,xb),e(vt,pr),e(pr,Rb),e(pr,tp),e(tp,Eb),e(pr,Mb),e(vt,zb),e(vt,hr),e(hr,qb),e(hr,vd),e(vd,jb),e(hr,Cb),e(vt,Pb),e(vt,ur),e(ur,Ab),e(ur,mr),e(mr,Lb),e(ur,Ob),e(vt,Nb),e(vt,Ht),T(fr,Ht,null),e(Ht,Ib),e(Ht,Bo),e(Bo,Db),e(Bo,wd),e(wd,Sb),e(Bo,Bb),e(Bo,op),e(op,Wb),e(Bo,Ub),e(Ht,Hb),T(Gn,Ht,null),e(Ht,Qb),T(Xn,Ht,null),k(o,cm,b),k(o,Wo,b),e(Wo,Yn),e(Yn,np),T(gr,np,null),e(Wo,Kb),e(Wo,sp),e(sp,Jb),k(o,pm,b),k(o,wt,b),T(_r,wt,null),e(wt,Vb),e(wt,br),e(br,Gb),e(br,ap),e(ap,Xb),e(br,Yb),e(wt,Zb),e(wt,kr),e(kr,ek),e(kr,Td),e(Td,tk),e(kr,ok),e(wt,nk),e(wt,yr),e(yr,sk),e(yr,vr),e(vr,ak),e(yr,rk),e(wt,ik),e(wt,Rt),T(wr,Rt,null),e(Rt,lk),e(Rt,Uo),e(Uo,dk),e(Uo,$d),e($d,ck),e(Uo,pk),e(Uo,rp),e(rp,hk),e(Uo,uk),e(Rt,mk),T(Zn,Rt,null),e(Rt,fk),T(es,Rt,null),e(Rt,gk),T(ts,Rt,null),k(o,hm,b),k(o,Ho,b),e(Ho,os),e(os,ip),T(Tr,ip,null),e(Ho,_k),e(Ho,lp),e(lp,bk),k(o,um,b),k(o,Tt,b),T($r,Tt,null),e(Tt,kk),e(Tt,dp),e(dp,yk),e(Tt,vk),e(Tt,Fr),e(Fr,wk),e(Fr,Fd),e(Fd,Tk),e(Fr,$k),e(Tt,Fk),e(Tt,xr),e(xr,xk),e(xr,Rr),e(Rr,Rk),e(xr,Ek),e(Tt,Mk),e(Tt,ct),T(Er,ct,null),e(ct,zk),e(ct,Qo),e(Qo,qk),e(Qo,xd),e(xd,jk),e(Qo,Ck),e(Qo,cp),e(cp,Pk),e(Qo,Ak),e(ct,Lk),T(ns,ct,null),e(ct,Ok),T(ss,ct,null),e(ct,Nk),T(as,ct,null),e(ct,Ik),T(rs,ct,null),e(ct,Dk),T(is,ct,null),k(o,mm,b),k(o,Ko,b),e(Ko,ls),e(ls,pp),T(Mr,pp,null),e(Ko,Sk),e(Ko,hp),e(hp,Bk),k(o,fm,b),k(o,$t,b),T(zr,$t,null),e($t,Wk),e($t,up),e(up,Uk),e($t,Hk),e($t,qr),e(qr,Qk),e(qr,Rd),e(Rd,Kk),e(qr,Jk),e($t,Vk),e($t,jr),e(jr,Gk),e(jr,Cr),e(Cr,Xk),e(jr,Yk),e($t,Zk),e($t,Qt),T(Pr,Qt,null),e(Qt,ey),e(Qt,Jo),e(Jo,ty),e(Jo,Ed),e(Ed,oy),e(Jo,ny),e(Jo,mp),e(mp,sy),e(Jo,ay),e(Qt,ry),T(ds,Qt,null),e(Qt,iy),T(cs,Qt,null),k(o,gm,b),k(o,Vo,b),e(Vo,ps),e(ps,fp),T(Ar,fp,null),e(Vo,ly),e(Vo,gp),e(gp,dy),k(o,_m,b),k(o,Ft,b),T(Lr,Ft,null),e(Ft,cy),e(Ft,_p),e(_p,py),e(Ft,hy),e(Ft,Or),e(Or,uy),e(Or,Md),e(Md,my),e(Or,fy),e(Ft,gy),e(Ft,Nr),e(Nr,_y),e(Nr,Ir),e(Ir,by),e(Nr,ky),e(Ft,yy),e(Ft,Et),T(Dr,Et,null),e(Et,vy),e(Et,Go),e(Go,wy),e(Go,zd),e(zd,Ty),e(Go,$y),e(Go,bp),e(bp,Fy),e(Go,xy),e(Et,Ry),T(hs,Et,null),e(Et,Ey),T(us,Et,null),e(Et,My),T(ms,Et,null),k(o,bm,b),k(o,Xo,b),e(Xo,fs),e(fs,kp),T(Sr,kp,null),e(Xo,zy),e(Xo,yp),e(yp,qy),k(o,km,b),k(o,xt,b),T(Br,xt,null),e(xt,jy),e(xt,Yo),e(Yo,Cy),e(Yo,vp),e(vp,Py),e(Yo,Ay),e(Yo,wp),e(wp,Ly),e(Yo,Oy),e(xt,Ny),e(xt,Wr),e(Wr,Iy),e(Wr,qd),e(qd,Dy),e(Wr,Sy),e(xt,By),e(xt,Ur),e(Ur,Wy),e(Ur,Hr),e(Hr,Uy),e(Ur,Hy),e(xt,Qy),e(xt,Mt),T(Qr,Mt,null),e(Mt,Ky),e(Mt,Zo),e(Zo,Jy),e(Zo,jd),e(jd,Vy),e(Zo,Gy),e(Zo,Tp),e(Tp,Xy),e(Zo,Yy),e(Mt,Zy),T(gs,Mt,null),e(Mt,ev),T(_s,Mt,null),e(Mt,tv),T(bs,Mt,null),k(o,ym,b),k(o,en,b),e(en,ks),e(ks,$p),T(Kr,$p,null),e(en,ov),e(en,Fp),e(Fp,nv),k(o,vm,b),k(o,ht,b),T(Jr,ht,null),e(ht,sv),e(ht,xp),e(xp,av),e(ht,rv),e(ht,Vr),e(Vr,iv),e(Vr,Cd),e(Cd,lv),e(Vr,dv),e(ht,cv),e(ht,Gr),e(Gr,pv),e(Gr,Xr),e(Xr,hv),e(Gr,uv),e(ht,mv),T(ys,ht,null),e(ht,fv),e(ht,Kt),T(Yr,Kt,null),e(Kt,gv),e(Kt,tn),e(tn,_v),e(tn,Pd),e(Pd,bv),e(tn,kv),e(tn,Rp),e(Rp,yv),e(tn,vv),e(Kt,wv),T(vs,Kt,null),e(Kt,Tv),T(ws,Kt,null),k(o,wm,b),k(o,on,b),e(on,Ts),e(Ts,Ep),T(Zr,Ep,null),e(on,$v),e(on,Mp),e(Mp,Fv),k(o,Tm,b),k(o,nn,b),T(ei,nn,null),e(nn,xv),e(nn,Jt),T(ti,Jt,null),e(Jt,Rv),e(Jt,sn),e(sn,Ev),e(sn,Ad),e(Ad,Mv),e(sn,zv),e(sn,zp),e(zp,qv),e(sn,jv),e(Jt,Cv),T($s,Jt,null),e(Jt,Pv),T(Fs,Jt,null),k(o,$m,b),k(o,an,b),e(an,xs),e(xs,qp),T(oi,qp,null),e(an,Av),e(an,jp),e(jp,Lv),k(o,Fm,b),k(o,ut,b),T(ni,ut,null),e(ut,Ov),e(ut,si),e(si,Nv),e(si,Cp),e(Cp,Iv),e(si,Dv),e(ut,Sv),e(ut,ai),e(ai,Bv),e(ai,Ld),e(Ld,Wv),e(ai,Uv),e(ut,Hv),e(ut,ri),e(ri,Qv),e(ri,ii),e(ii,Kv),e(ri,Jv),e(ut,Vv),T(Rs,ut,null),e(ut,Gv),e(ut,zt),T(li,zt,null),e(zt,Xv),e(zt,rn),e(rn,Yv),e(rn,Od),e(Od,Zv),e(rn,ew),e(rn,Pp),e(Pp,tw),e(rn,ow),e(zt,nw),T(Es,zt,null),e(zt,sw),T(Ms,zt,null),e(zt,aw),T(zs,zt,null),k(o,xm,b),k(o,ln,b),e(ln,qs),e(qs,Ap),T(di,Ap,null),e(ln,rw),e(ln,Lp),e(Lp,iw),k(o,Rm,b),k(o,mt,b),T(ci,mt,null),e(mt,lw),e(mt,Op),e(Op,dw),e(mt,cw),e(mt,pi),e(pi,pw),e(pi,Nd),e(Nd,hw),e(pi,uw),e(mt,mw),e(mt,hi),e(hi,fw),e(hi,ui),e(ui,gw),e(hi,_w),e(mt,bw),T(js,mt,null),e(mt,kw),e(mt,qt),T(mi,qt,null),e(qt,yw),e(qt,dn),e(dn,vw),e(dn,Id),e(Id,ww),e(dn,Tw),e(dn,Np),e(Np,$w),e(dn,Fw),e(qt,xw),T(Cs,qt,null),e(qt,Rw),T(Ps,qt,null),e(qt,Ew),T(As,qt,null),k(o,Em,b),k(o,cn,b),e(cn,Ls),e(Ls,Ip),T(fi,Ip,null),e(cn,Mw),e(cn,Dp),e(Dp,zw),k(o,Mm,b),k(o,ft,b),T(gi,ft,null),e(ft,qw),e(ft,Sp),e(Sp,jw),e(ft,Cw),e(ft,_i),e(_i,Pw),e(_i,Dd),e(Dd,Aw),e(_i,Lw),e(ft,Ow),e(ft,bi),e(bi,Nw),e(bi,ki),e(ki,Iw),e(bi,Dw),e(ft,Sw),T(Os,ft,null),e(ft,Bw),e(ft,Vt),T(yi,Vt,null),e(Vt,Ww),e(Vt,pn),e(pn,Uw),e(pn,Sd),e(Sd,Hw),e(pn,Qw),e(pn,Bp),e(Bp,Kw),e(pn,Jw),e(Vt,Vw),T(Ns,Vt,null),e(Vt,Gw),T(Is,Vt,null),k(o,zm,b),k(o,hn,b),e(hn,Ds),e(Ds,Wp),T(vi,Wp,null),e(hn,Xw),e(hn,Up),e(Up,Yw),k(o,qm,b),k(o,gt,b),T(wi,gt,null),e(gt,Zw),e(gt,Hp),e(Hp,eT),e(gt,tT),e(gt,Ti),e(Ti,oT),e(Ti,Bd),e(Bd,nT),e(Ti,sT),e(gt,aT),e(gt,$i),e($i,rT),e($i,Fi),e(Fi,iT),e($i,lT),e(gt,dT),T(Ss,gt,null),e(gt,cT),e(gt,jt),T(xi,jt,null),e(jt,pT),e(jt,un),e(un,hT),e(un,Wd),e(Wd,uT),e(un,mT),e(un,Qp),e(Qp,fT),e(un,gT),e(jt,_T),T(Bs,jt,null),e(jt,bT),T(Ws,jt,null),e(jt,kT),T(Us,jt,null),k(o,jm,b),k(o,mn,b),e(mn,Hs),e(Hs,Kp),T(Ri,Kp,null),e(mn,yT),e(mn,Jp),e(Jp,vT),k(o,Cm,b),k(o,_t,b),T(Ei,_t,null),e(_t,wT),e(_t,fn),e(fn,TT),e(fn,Vp),e(Vp,$T),e(fn,FT),e(fn,Gp),e(Gp,xT),e(fn,RT),e(_t,ET),e(_t,Mi),e(Mi,MT),e(Mi,Ud),e(Ud,zT),e(Mi,qT),e(_t,jT),e(_t,zi),e(zi,CT),e(zi,qi),e(qi,PT),e(zi,AT),e(_t,LT),T(Qs,_t,null),e(_t,OT),e(_t,Ct),T(ji,Ct,null),e(Ct,NT),e(Ct,gn),e(gn,IT),e(gn,Hd),e(Hd,DT),e(gn,ST),e(gn,Xp),e(Xp,BT),e(gn,WT),e(Ct,UT),T(Ks,Ct,null),e(Ct,HT),T(Js,Ct,null),e(Ct,QT),T(Vs,Ct,null),k(o,Pm,b),k(o,_n,b),e(_n,Gs),e(Gs,Yp),T(Ci,Yp,null),e(_n,KT),e(_n,Zp),e(Zp,JT),k(o,Am,b),k(o,nt,b),T(Pi,nt,null),e(nt,VT),e(nt,eh),e(eh,GT),e(nt,XT),e(nt,Ai),e(Ai,YT),e(Ai,Qd),e(Qd,ZT),e(Ai,e1),e(nt,t1),e(nt,Li),e(Li,o1),e(Li,Oi),e(Oi,n1),e(Li,s1),e(nt,a1),e(nt,th),e(th,r1),e(nt,i1),e(nt,po),e(po,oh),e(oh,Ni),e(Ni,l1),e(po,d1),e(po,nh),e(nh,Ii),e(Ii,c1),e(po,p1),e(po,sh),e(sh,Di),e(Di,h1),e(po,u1),e(po,ah),e(ah,Si),e(Si,m1),e(nt,f1),e(nt,Gt),T(Bi,Gt,null),e(Gt,g1),e(Gt,bn),e(bn,_1),e(bn,rh),e(rh,b1),e(bn,k1),e(bn,ih),e(ih,y1),e(bn,v1),e(Gt,w1),T(Xs,Gt,null),e(Gt,T1),T(Ys,Gt,null),k(o,Lm,b),k(o,kn,b),e(kn,Zs),e(Zs,lh),T(Wi,lh,null),e(kn,$1),e(kn,dh),e(dh,F1),k(o,Om,b),k(o,st,b),T(Ui,st,null),e(st,x1),e(st,ch),e(ch,R1),e(st,E1),e(st,Hi),e(Hi,M1),e(Hi,Kd),e(Kd,z1),e(Hi,q1),e(st,j1),e(st,Qi),e(Qi,C1),e(Qi,Ki),e(Ki,P1),e(Qi,A1),e(st,L1),e(st,ph),e(ph,O1),e(st,N1),e(st,ho),e(ho,hh),e(hh,Ji),e(Ji,I1),e(ho,D1),e(ho,uh),e(uh,Vi),e(Vi,S1),e(ho,B1),e(ho,mh),e(mh,Gi),e(Gi,W1),e(ho,U1),e(ho,fh),e(fh,Xi),e(Xi,H1),e(st,Q1),e(st,Xt),T(Yi,Xt,null),e(Xt,K1),e(Xt,yn),e(yn,J1),e(yn,gh),e(gh,V1),e(yn,G1),e(yn,_h),e(_h,X1),e(yn,Y1),e(Xt,Z1),T(ea,Xt,null),e(Xt,e$),T(ta,Xt,null),k(o,Nm,b),k(o,vn,b),e(vn,oa),e(oa,bh),T(Zi,bh,null),e(vn,t$),e(vn,kh),e(kh,o$),k(o,Im,b),k(o,at,b),T(el,at,null),e(at,n$),e(at,tl),e(tl,s$),e(tl,yh),e(yh,a$),e(tl,r$),e(at,i$),e(at,ol),e(ol,l$),e(ol,Jd),e(Jd,d$),e(ol,c$),e(at,p$),e(at,nl),e(nl,h$),e(nl,sl),e(sl,u$),e(nl,m$),e(at,f$),e(at,vh),e(vh,g$),e(at,_$),e(at,uo),e(uo,wh),e(wh,al),e(al,b$),e(uo,k$),e(uo,Th),e(Th,rl),e(rl,y$),e(uo,v$),e(uo,$h),e($h,il),e(il,w$),e(uo,T$),e(uo,Fh),e(Fh,ll),e(ll,$$),e(at,F$),e(at,Yt),T(dl,Yt,null),e(Yt,x$),e(Yt,wn),e(wn,R$),e(wn,xh),e(xh,E$),e(wn,M$),e(wn,Rh),e(Rh,z$),e(wn,q$),e(Yt,j$),T(na,Yt,null),e(Yt,C$),T(sa,Yt,null),k(o,Dm,b),k(o,Tn,b),e(Tn,aa),e(aa,Eh),T(cl,Eh,null),e(Tn,P$),e(Tn,Mh),e(Mh,A$),k(o,Sm,b),k(o,rt,b),T(pl,rt,null),e(rt,L$),e(rt,zh),e(zh,O$),e(rt,N$),e(rt,hl),e(hl,I$),e(hl,Vd),e(Vd,D$),e(hl,S$),e(rt,B$),e(rt,ul),e(ul,W$),e(ul,ml),e(ml,U$),e(ul,H$),e(rt,Q$),e(rt,qh),e(qh,K$),e(rt,J$),e(rt,mo),e(mo,jh),e(jh,fl),e(fl,V$),e(mo,G$),e(mo,Ch),e(Ch,gl),e(gl,X$),e(mo,Y$),e(mo,Ph),e(Ph,_l),e(_l,Z$),e(mo,e0),e(mo,Ah),e(Ah,bl),e(bl,t0),e(rt,o0),e(rt,Zt),T(kl,Zt,null),e(Zt,n0),e(Zt,$n),e($n,s0),e($n,Lh),e(Lh,a0),e($n,r0),e($n,Oh),e(Oh,i0),e($n,l0),e(Zt,d0),T(ra,Zt,null),e(Zt,c0),T(ia,Zt,null),k(o,Bm,b),k(o,Fn,b),e(Fn,la),e(la,Nh),T(yl,Nh,null),e(Fn,p0),e(Fn,Ih),e(Ih,h0),k(o,Wm,b),k(o,it,b),T(vl,it,null),e(it,u0),e(it,Dh),e(Dh,m0),e(it,f0),e(it,wl),e(wl,g0),e(wl,Gd),e(Gd,_0),e(wl,b0),e(it,k0),e(it,Tl),e(Tl,y0),e(Tl,$l),e($l,v0),e(Tl,w0),e(it,T0),e(it,Sh),e(Sh,$0),e(it,F0),e(it,fo),e(fo,Bh),e(Bh,Fl),e(Fl,x0),e(fo,R0),e(fo,Wh),e(Wh,xl),e(xl,E0),e(fo,M0),e(fo,Uh),e(Uh,Rl),e(Rl,z0),e(fo,q0),e(fo,Hh),e(Hh,El),e(El,j0),e(it,C0),e(it,eo),T(Ml,eo,null),e(eo,P0),e(eo,xn),e(xn,A0),e(xn,Qh),e(Qh,L0),e(xn,O0),e(xn,Kh),e(Kh,N0),e(xn,I0),e(eo,D0),T(da,eo,null),e(eo,S0),T(ca,eo,null),k(o,Um,b),k(o,Rn,b),e(Rn,pa),e(pa,Jh),T(zl,Jh,null),e(Rn,B0),e(Rn,Vh),e(Vh,W0),k(o,Hm,b),k(o,lt,b),T(ql,lt,null),e(lt,U0),e(lt,Gh),e(Gh,H0),e(lt,Q0),e(lt,jl),e(jl,K0),e(jl,Xd),e(Xd,J0),e(jl,V0),e(lt,G0),e(lt,Cl),e(Cl,X0),e(Cl,Pl),e(Pl,Y0),e(Cl,Z0),e(lt,e2),e(lt,Xh),e(Xh,t2),e(lt,o2),e(lt,go),e(go,Yh),e(Yh,Al),e(Al,n2),e(go,s2),e(go,Zh),e(Zh,Ll),e(Ll,a2),e(go,r2),e(go,eu),e(eu,Ol),e(Ol,i2),e(go,l2),e(go,tu),e(tu,Nl),e(Nl,d2),e(lt,c2),e(lt,to),T(Il,to,null),e(to,p2),e(to,En),e(En,h2),e(En,ou),e(ou,u2),e(En,m2),e(En,nu),e(nu,f2),e(En,g2),e(to,_2),T(ha,to,null),e(to,b2),T(ua,to,null),k(o,Qm,b),k(o,Mn,b),e(Mn,ma),e(ma,su),T(Dl,su,null),e(Mn,k2),e(Mn,au),e(au,y2),k(o,Km,b),k(o,dt,b),T(Sl,dt,null),e(dt,v2),e(dt,zn),e(zn,w2),e(zn,ru),e(ru,T2),e(zn,$2),e(zn,iu),e(iu,F2),e(zn,x2),e(dt,R2),e(dt,Bl),e(Bl,E2),e(Bl,Yd),e(Yd,M2),e(Bl,z2),e(dt,q2),e(dt,Wl),e(Wl,j2),e(Wl,Ul),e(Ul,C2),e(Wl,P2),e(dt,A2),e(dt,lu),e(lu,L2),e(dt,O2),e(dt,_o),e(_o,du),e(du,Hl),e(Hl,N2),e(_o,I2),e(_o,cu),e(cu,Ql),e(Ql,D2),e(_o,S2),e(_o,pu),e(pu,Kl),e(Kl,B2),e(_o,W2),e(_o,hu),e(hu,Jl),e(Jl,U2),e(dt,H2),e(dt,oo),T(Vl,oo,null),e(oo,Q2),e(oo,qn),e(qn,K2),e(qn,uu),e(uu,J2),e(qn,V2),e(qn,mu),e(mu,G2),e(qn,X2),e(oo,Y2),T(fa,oo,null),e(oo,Z2),T(ga,oo,null),Jm=!0},p(o,[b]){const Gl={};b&2&&(Gl.$$scope={dirty:b,ctx:o}),Ln.$set(Gl);const fu={};b&2&&(fu.$$scope={dirty:b,ctx:o}),Nn.$set(fu);const gu={};b&2&&(gu.$$scope={dirty:b,ctx:o}),In.$set(gu);const _u={};b&2&&(_u.$$scope={dirty:b,ctx:o}),Wn.$set(_u);const Xl={};b&2&&(Xl.$$scope={dirty:b,ctx:o}),Un.$set(Xl);const bu={};b&2&&(bu.$$scope={dirty:b,ctx:o}),Kn.$set(bu);const ku={};b&2&&(ku.$$scope={dirty:b,ctx:o}),Jn.$set(ku);const yu={};b&2&&(yu.$$scope={dirty:b,ctx:o}),Gn.$set(yu);const Yl={};b&2&&(Yl.$$scope={dirty:b,ctx:o}),Xn.$set(Yl);const vu={};b&2&&(vu.$$scope={dirty:b,ctx:o}),Zn.$set(vu);const wu={};b&2&&(wu.$$scope={dirty:b,ctx:o}),es.$set(wu);const Tu={};b&2&&(Tu.$$scope={dirty:b,ctx:o}),ts.$set(Tu);const $u={};b&2&&($u.$$scope={dirty:b,ctx:o}),ns.$set($u);const Fu={};b&2&&(Fu.$$scope={dirty:b,ctx:o}),ss.$set(Fu);const xu={};b&2&&(xu.$$scope={dirty:b,ctx:o}),as.$set(xu);const bo={};b&2&&(bo.$$scope={dirty:b,ctx:o}),rs.$set(bo);const Zl={};b&2&&(Zl.$$scope={dirty:b,ctx:o}),is.$set(Zl);const Ru={};b&2&&(Ru.$$scope={dirty:b,ctx:o}),ds.$set(Ru);const Eu={};b&2&&(Eu.$$scope={dirty:b,ctx:o}),cs.$set(Eu);const ko={};b&2&&(ko.$$scope={dirty:b,ctx:o}),hs.$set(ko);const Mu={};b&2&&(Mu.$$scope={dirty:b,ctx:o}),us.$set(Mu);const zu={};b&2&&(zu.$$scope={dirty:b,ctx:o}),ms.$set(zu);const qu={};b&2&&(qu.$$scope={dirty:b,ctx:o}),gs.$set(qu);const Zd={};b&2&&(Zd.$$scope={dirty:b,ctx:o}),_s.$set(Zd);const ju={};b&2&&(ju.$$scope={dirty:b,ctx:o}),bs.$set(ju);const jn={};b&2&&(jn.$$scope={dirty:b,ctx:o}),ys.$set(jn);const Cu={};b&2&&(Cu.$$scope={dirty:b,ctx:o}),vs.$set(Cu);const Pu={};b&2&&(Pu.$$scope={dirty:b,ctx:o}),ws.$set(Pu);const ed={};b&2&&(ed.$$scope={dirty:b,ctx:o}),$s.$set(ed);const Au={};b&2&&(Au.$$scope={dirty:b,ctx:o}),Fs.$set(Au);const Lu={};b&2&&(Lu.$$scope={dirty:b,ctx:o}),Rs.$set(Lu);const Ou={};b&2&&(Ou.$$scope={dirty:b,ctx:o}),Es.$set(Ou);const Wt={};b&2&&(Wt.$$scope={dirty:b,ctx:o}),Ms.$set(Wt);const yo={};b&2&&(yo.$$scope={dirty:b,ctx:o}),zs.$set(yo);const Nu={};b&2&&(Nu.$$scope={dirty:b,ctx:o}),js.$set(Nu);const Iu={};b&2&&(Iu.$$scope={dirty:b,ctx:o}),Cs.$set(Iu);const Du={};b&2&&(Du.$$scope={dirty:b,ctx:o}),Ps.$set(Du);const Cn={};b&2&&(Cn.$$scope={dirty:b,ctx:o}),As.$set(Cn);const Su={};b&2&&(Su.$$scope={dirty:b,ctx:o}),Os.$set(Su);const Bu={};b&2&&(Bu.$$scope={dirty:b,ctx:o}),Ns.$set(Bu);const Pn={};b&2&&(Pn.$$scope={dirty:b,ctx:o}),Is.$set(Pn);const Wu={};b&2&&(Wu.$$scope={dirty:b,ctx:o}),Ss.$set(Wu);const Uu={};b&2&&(Uu.$$scope={dirty:b,ctx:o}),Bs.$set(Uu);const td={};b&2&&(td.$$scope={dirty:b,ctx:o}),Ws.$set(td);const Hu={};b&2&&(Hu.$$scope={dirty:b,ctx:o}),Us.$set(Hu);const Qu={};b&2&&(Qu.$$scope={dirty:b,ctx:o}),Qs.$set(Qu);const Ku={};b&2&&(Ku.$$scope={dirty:b,ctx:o}),Ks.$set(Ku);const Ue={};b&2&&(Ue.$$scope={dirty:b,ctx:o}),Js.$set(Ue);const Ju={};b&2&&(Ju.$$scope={dirty:b,ctx:o}),Vs.$set(Ju);const Vu={};b&2&&(Vu.$$scope={dirty:b,ctx:o}),Xs.$set(Vu);const od={};b&2&&(od.$$scope={dirty:b,ctx:o}),Ys.$set(od);const Gu={};b&2&&(Gu.$$scope={dirty:b,ctx:o}),ea.$set(Gu);const nd={};b&2&&(nd.$$scope={dirty:b,ctx:o}),ta.$set(nd);const Xu={};b&2&&(Xu.$$scope={dirty:b,ctx:o}),na.$set(Xu);const An={};b&2&&(An.$$scope={dirty:b,ctx:o}),sa.$set(An);const Yu={};b&2&&(Yu.$$scope={dirty:b,ctx:o}),ra.$set(Yu);const sd={};b&2&&(sd.$$scope={dirty:b,ctx:o}),ia.$set(sd);const ec={};b&2&&(ec.$$scope={dirty:b,ctx:o}),da.$set(ec);const Zu={};b&2&&(Zu.$$scope={dirty:b,ctx:o}),ca.$set(Zu);const tc={};b&2&&(tc.$$scope={dirty:b,ctx:o}),ha.$set(tc);const em={};b&2&&(em.$$scope={dirty:b,ctx:o}),ua.$set(em);const ad={};b&2&&(ad.$$scope={dirty:b,ctx:o}),fa.$set(ad);const rd={};b&2&&(rd.$$scope={dirty:b,ctx:o}),ga.$set(rd)},i(o){Jm||($(l.$$.fragment,o),$(M.$$.fragment,o),$(We.$$.fragment,o),$(Oa.$$.fragment,o),$(Ln.$$.fragment,o),$(Ia.$$.fragment,o),$(Da.$$.fragment,o),$(Nn.$$.fragment,o),$(In.$$.fragment,o),$(Wa.$$.fragment,o),$(Ha.$$.fragment,o),$(Ka.$$.fragment,o),$(Ja.$$.fragment,o),$(Va.$$.fragment,o),$(Ga.$$.fragment,o),$(Wn.$$.fragment,o),$(Un.$$.fragment,o),$(er.$$.fragment,o),$(tr.$$.fragment,o),$(or.$$.fragment,o),$(lr.$$.fragment,o),$(Kn.$$.fragment,o),$(Jn.$$.fragment,o),$(dr.$$.fragment,o),$(cr.$$.fragment,o),$(fr.$$.fragment,o),$(Gn.$$.fragment,o),$(Xn.$$.fragment,o),$(gr.$$.fragment,o),$(_r.$$.fragment,o),$(wr.$$.fragment,o),$(Zn.$$.fragment,o),$(es.$$.fragment,o),$(ts.$$.fragment,o),$(Tr.$$.fragment,o),$($r.$$.fragment,o),$(Er.$$.fragment,o),$(ns.$$.fragment,o),$(ss.$$.fragment,o),$(as.$$.fragment,o),$(rs.$$.fragment,o),$(is.$$.fragment,o),$(Mr.$$.fragment,o),$(zr.$$.fragment,o),$(Pr.$$.fragment,o),$(ds.$$.fragment,o),$(cs.$$.fragment,o),$(Ar.$$.fragment,o),$(Lr.$$.fragment,o),$(Dr.$$.fragment,o),$(hs.$$.fragment,o),$(us.$$.fragment,o),$(ms.$$.fragment,o),$(Sr.$$.fragment,o),$(Br.$$.fragment,o),$(Qr.$$.fragment,o),$(gs.$$.fragment,o),$(_s.$$.fragment,o),$(bs.$$.fragment,o),$(Kr.$$.fragment,o),$(Jr.$$.fragment,o),$(ys.$$.fragment,o),$(Yr.$$.fragment,o),$(vs.$$.fragment,o),$(ws.$$.fragment,o),$(Zr.$$.fragment,o),$(ei.$$.fragment,o),$(ti.$$.fragment,o),$($s.$$.fragment,o),$(Fs.$$.fragment,o),$(oi.$$.fragment,o),$(ni.$$.fragment,o),$(Rs.$$.fragment,o),$(li.$$.fragment,o),$(Es.$$.fragment,o),$(Ms.$$.fragment,o),$(zs.$$.fragment,o),$(di.$$.fragment,o),$(ci.$$.fragment,o),$(js.$$.fragment,o),$(mi.$$.fragment,o),$(Cs.$$.fragment,o),$(Ps.$$.fragment,o),$(As.$$.fragment,o),$(fi.$$.fragment,o),$(gi.$$.fragment,o),$(Os.$$.fragment,o),$(yi.$$.fragment,o),$(Ns.$$.fragment,o),$(Is.$$.fragment,o),$(vi.$$.fragment,o),$(wi.$$.fragment,o),$(Ss.$$.fragment,o),$(xi.$$.fragment,o),$(Bs.$$.fragment,o),$(Ws.$$.fragment,o),$(Us.$$.fragment,o),$(Ri.$$.fragment,o),$(Ei.$$.fragment,o),$(Qs.$$.fragment,o),$(ji.$$.fragment,o),$(Ks.$$.fragment,o),$(Js.$$.fragment,o),$(Vs.$$.fragment,o),$(Ci.$$.fragment,o),$(Pi.$$.fragment,o),$(Bi.$$.fragment,o),$(Xs.$$.fragment,o),$(Ys.$$.fragment,o),$(Wi.$$.fragment,o),$(Ui.$$.fragment,o),$(Yi.$$.fragment,o),$(ea.$$.fragment,o),$(ta.$$.fragment,o),$(Zi.$$.fragment,o),$(el.$$.fragment,o),$(dl.$$.fragment,o),$(na.$$.fragment,o),$(sa.$$.fragment,o),$(cl.$$.fragment,o),$(pl.$$.fragment,o),$(kl.$$.fragment,o),$(ra.$$.fragment,o),$(ia.$$.fragment,o),$(yl.$$.fragment,o),$(vl.$$.fragment,o),$(Ml.$$.fragment,o),$(da.$$.fragment,o),$(ca.$$.fragment,o),$(zl.$$.fragment,o),$(ql.$$.fragment,o),$(Il.$$.fragment,o),$(ha.$$.fragment,o),$(ua.$$.fragment,o),$(Dl.$$.fragment,o),$(Sl.$$.fragment,o),$(Vl.$$.fragment,o),$(fa.$$.fragment,o),$(ga.$$.fragment,o),Jm=!0)},o(o){F(l.$$.fragment,o),F(M.$$.fragment,o),F(We.$$.fragment,o),F(Oa.$$.fragment,o),F(Ln.$$.fragment,o),F(Ia.$$.fragment,o),F(Da.$$.fragment,o),F(Nn.$$.fragment,o),F(In.$$.fragment,o),F(Wa.$$.fragment,o),F(Ha.$$.fragment,o),F(Ka.$$.fragment,o),F(Ja.$$.fragment,o),F(Va.$$.fragment,o),F(Ga.$$.fragment,o),F(Wn.$$.fragment,o),F(Un.$$.fragment,o),F(er.$$.fragment,o),F(tr.$$.fragment,o),F(or.$$.fragment,o),F(lr.$$.fragment,o),F(Kn.$$.fragment,o),F(Jn.$$.fragment,o),F(dr.$$.fragment,o),F(cr.$$.fragment,o),F(fr.$$.fragment,o),F(Gn.$$.fragment,o),F(Xn.$$.fragment,o),F(gr.$$.fragment,o),F(_r.$$.fragment,o),F(wr.$$.fragment,o),F(Zn.$$.fragment,o),F(es.$$.fragment,o),F(ts.$$.fragment,o),F(Tr.$$.fragment,o),F($r.$$.fragment,o),F(Er.$$.fragment,o),F(ns.$$.fragment,o),F(ss.$$.fragment,o),F(as.$$.fragment,o),F(rs.$$.fragment,o),F(is.$$.fragment,o),F(Mr.$$.fragment,o),F(zr.$$.fragment,o),F(Pr.$$.fragment,o),F(ds.$$.fragment,o),F(cs.$$.fragment,o),F(Ar.$$.fragment,o),F(Lr.$$.fragment,o),F(Dr.$$.fragment,o),F(hs.$$.fragment,o),F(us.$$.fragment,o),F(ms.$$.fragment,o),F(Sr.$$.fragment,o),F(Br.$$.fragment,o),F(Qr.$$.fragment,o),F(gs.$$.fragment,o),F(_s.$$.fragment,o),F(bs.$$.fragment,o),F(Kr.$$.fragment,o),F(Jr.$$.fragment,o),F(ys.$$.fragment,o),F(Yr.$$.fragment,o),F(vs.$$.fragment,o),F(ws.$$.fragment,o),F(Zr.$$.fragment,o),F(ei.$$.fragment,o),F(ti.$$.fragment,o),F($s.$$.fragment,o),F(Fs.$$.fragment,o),F(oi.$$.fragment,o),F(ni.$$.fragment,o),F(Rs.$$.fragment,o),F(li.$$.fragment,o),F(Es.$$.fragment,o),F(Ms.$$.fragment,o),F(zs.$$.fragment,o),F(di.$$.fragment,o),F(ci.$$.fragment,o),F(js.$$.fragment,o),F(mi.$$.fragment,o),F(Cs.$$.fragment,o),F(Ps.$$.fragment,o),F(As.$$.fragment,o),F(fi.$$.fragment,o),F(gi.$$.fragment,o),F(Os.$$.fragment,o),F(yi.$$.fragment,o),F(Ns.$$.fragment,o),F(Is.$$.fragment,o),F(vi.$$.fragment,o),F(wi.$$.fragment,o),F(Ss.$$.fragment,o),F(xi.$$.fragment,o),F(Bs.$$.fragment,o),F(Ws.$$.fragment,o),F(Us.$$.fragment,o),F(Ri.$$.fragment,o),F(Ei.$$.fragment,o),F(Qs.$$.fragment,o),F(ji.$$.fragment,o),F(Ks.$$.fragment,o),F(Js.$$.fragment,o),F(Vs.$$.fragment,o),F(Ci.$$.fragment,o),F(Pi.$$.fragment,o),F(Bi.$$.fragment,o),F(Xs.$$.fragment,o),F(Ys.$$.fragment,o),F(Wi.$$.fragment,o),F(Ui.$$.fragment,o),F(Yi.$$.fragment,o),F(ea.$$.fragment,o),F(ta.$$.fragment,o),F(Zi.$$.fragment,o),F(el.$$.fragment,o),F(dl.$$.fragment,o),F(na.$$.fragment,o),F(sa.$$.fragment,o),F(cl.$$.fragment,o),F(pl.$$.fragment,o),F(kl.$$.fragment,o),F(ra.$$.fragment,o),F(ia.$$.fragment,o),F(yl.$$.fragment,o),F(vl.$$.fragment,o),F(Ml.$$.fragment,o),F(da.$$.fragment,o),F(ca.$$.fragment,o),F(zl.$$.fragment,o),F(ql.$$.fragment,o),F(Il.$$.fragment,o),F(ha.$$.fragment,o),F(ua.$$.fragment,o),F(Dl.$$.fragment,o),F(Sl.$$.fragment,o),F(Vl.$$.fragment,o),F(fa.$$.fragment,o),F(ga.$$.fragment,o),Jm=!1},d(o){t(d),o&&t(g),o&&t(c),x(l),o&&t(Z),o&&t(N),x(M),o&&t(ge),o&&t(B),o&&t(_e),o&&t(U),o&&t(be),o&&t(H),o&&t(ke),o&&t(ee),o&&t(ye),o&&t(Q),o&&t(ve),o&&t(I),o&&t(Je),o&&t(q),o&&t(Ve),o&&t(Oe),x(We),o&&t(Ge),o&&t(yt),x(Oa),x(Ln),o&&t(om),o&&t(Oo),x(Ia),o&&t(nm),o&&t(Ie),x(Da),x(Nn),x(In),x(Wa),x(Ha),x(Ka),x(Ja),o&&t(sm),o&&t(No),x(Va),o&&t(am),o&&t(tt),x(Ga),x(Wn),x(Un),x(er),o&&t(rm),o&&t(Io),x(tr),o&&t(im),o&&t(ot),x(or),x(lr),x(Kn),x(Jn),o&&t(lm),o&&t(So),x(dr),o&&t(dm),o&&t(vt),x(cr),x(fr),x(Gn),x(Xn),o&&t(cm),o&&t(Wo),x(gr),o&&t(pm),o&&t(wt),x(_r),x(wr),x(Zn),x(es),x(ts),o&&t(hm),o&&t(Ho),x(Tr),o&&t(um),o&&t(Tt),x($r),x(Er),x(ns),x(ss),x(as),x(rs),x(is),o&&t(mm),o&&t(Ko),x(Mr),o&&t(fm),o&&t($t),x(zr),x(Pr),x(ds),x(cs),o&&t(gm),o&&t(Vo),x(Ar),o&&t(_m),o&&t(Ft),x(Lr),x(Dr),x(hs),x(us),x(ms),o&&t(bm),o&&t(Xo),x(Sr),o&&t(km),o&&t(xt),x(Br),x(Qr),x(gs),x(_s),x(bs),o&&t(ym),o&&t(en),x(Kr),o&&t(vm),o&&t(ht),x(Jr),x(ys),x(Yr),x(vs),x(ws),o&&t(wm),o&&t(on),x(Zr),o&&t(Tm),o&&t(nn),x(ei),x(ti),x($s),x(Fs),o&&t($m),o&&t(an),x(oi),o&&t(Fm),o&&t(ut),x(ni),x(Rs),x(li),x(Es),x(Ms),x(zs),o&&t(xm),o&&t(ln),x(di),o&&t(Rm),o&&t(mt),x(ci),x(js),x(mi),x(Cs),x(Ps),x(As),o&&t(Em),o&&t(cn),x(fi),o&&t(Mm),o&&t(ft),x(gi),x(Os),x(yi),x(Ns),x(Is),o&&t(zm),o&&t(hn),x(vi),o&&t(qm),o&&t(gt),x(wi),x(Ss),x(xi),x(Bs),x(Ws),x(Us),o&&t(jm),o&&t(mn),x(Ri),o&&t(Cm),o&&t(_t),x(Ei),x(Qs),x(ji),x(Ks),x(Js),x(Vs),o&&t(Pm),o&&t(_n),x(Ci),o&&t(Am),o&&t(nt),x(Pi),x(Bi),x(Xs),x(Ys),o&&t(Lm),o&&t(kn),x(Wi),o&&t(Om),o&&t(st),x(Ui),x(Yi),x(ea),x(ta),o&&t(Nm),o&&t(vn),x(Zi),o&&t(Im),o&&t(at),x(el),x(dl),x(na),x(sa),o&&t(Dm),o&&t(Tn),x(cl),o&&t(Sm),o&&t(rt),x(pl),x(kl),x(ra),x(ia),o&&t(Bm),o&&t(Fn),x(yl),o&&t(Wm),o&&t(it),x(vl),x(Ml),x(da),x(ca),o&&t(Um),o&&t(Rn),x(zl),o&&t(Hm),o&&t(lt),x(ql),x(Il),x(ha),x(ua),o&&t(Qm),o&&t(Mn),x(Dl),o&&t(Km),o&&t(dt),x(Sl),x(Vl),x(fa),x(ga)}}}const Gz={local:"roberta",sections:[{local:"overview",title:"Overview"},{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 Xz(R){return IM(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class s9 extends AM{constructor(d){super();LM(this,d,Xz,Vz,OM,{})}}export{s9 as default,Gz as metadata};
