import{S as ij,i as lj,s as dj,e as a,k as c,w as y,t as o,M as cj,c as r,d as t,m as p,a as i,x as w,h as n,b as h,G as e,g as b,y as T,q as $,o as F,B as x,v as pj,L as re}from"../../chunks/vendor-hf-doc-builder.js";import{T as me}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";import{P as Eb}from"../../chunks/PipelineTag-hf-doc-builder.js";function hj(R){let d,_,u,m,k;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"),_=o("Examples:"),u=c(),y(m.$$.fragment)},l(l){d=r(l,"P",{});var f=i(d);_=n(f,"Examples:"),f.forEach(t),u=p(l),w(m.$$.fragment,l)},m(l,f){b(l,d,f),e(d,_),b(l,u,f),T(m,l,f),k=!0},p:re,i(l){k||($(m.$$.fragment,l),k=!0)},o(l){F(m.$$.fragment,l),k=!1},d(l){l&&t(d),l&&t(u),x(m,l)}}}function uj(R){let d,_,u,m,k;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"),_=o("be encoded differently whether it is at the beginning of the sentence (without space) or not:"),u=c(),y(m.$$.fragment)},l(l){d=r(l,"P",{});var f=i(d);_=n(f,"be encoded differently whether it is at the beginning of the sentence (without space) or not:"),f.forEach(t),u=p(l),w(m.$$.fragment,l)},m(l,f){b(l,d,f),e(d,_),b(l,u,f),T(m,l,f),k=!0},p:re,i(l){k||($(m.$$.fragment,l),k=!0)},o(l){F(m.$$.fragment,l),k=!1},d(l){l&&t(d),l&&t(u),x(m,l)}}}function fj(R){let d,_,u,m,k;return{c(){d=a("p"),_=o("When used with "),u=a("code"),m=o("is_split_into_words=True"),k=o(", this tokenizer will add a space before each word (even the first one).")},l(l){d=r(l,"P",{});var f=i(d);_=n(f,"When used with "),u=r(f,"CODE",{});var E=i(u);m=n(E,"is_split_into_words=True"),E.forEach(t),k=n(f,", this tokenizer will add a space before each word (even the first one)."),f.forEach(t)},m(l,f){b(l,d,f),e(d,_),e(d,u),e(u,m),e(d,k)},d(l){l&&t(d)}}}function mj(R){let d,_,u,m,k;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"),_=o("be encoded differently whether it is at the beginning of the sentence (without space) or not:"),u=c(),y(m.$$.fragment)},l(l){d=r(l,"P",{});var f=i(d);_=n(f,"be encoded differently whether it is at the beginning of the sentence (without space) or not:"),f.forEach(t),u=p(l),w(m.$$.fragment,l)},m(l,f){b(l,d,f),e(d,_),b(l,u,f),T(m,l,f),k=!0},p:re,i(l){k||($(m.$$.fragment,l),k=!0)},o(l){F(m.$$.fragment,l),k=!1},d(l){l&&t(d),l&&t(u),x(m,l)}}}function gj(R){let d,_,u,m,k,l,f,E;return{c(){d=a("p"),_=o("When used with "),u=a("code"),m=o("is_split_into_words=True"),k=o(", this tokenizer needs to be instantiated with "),l=a("code"),f=o("add_prefix_space=True"),E=o(".")},l(le){d=r(le,"P",{});var Z=i(d);_=n(Z,"When used with "),u=r(Z,"CODE",{});var N=i(u);m=n(N,"is_split_into_words=True"),N.forEach(t),k=n(Z,", this tokenizer needs to be instantiated with "),l=r(Z,"CODE",{});var te=i(l);f=n(te,"add_prefix_space=True"),te.forEach(t),E=n(Z,"."),Z.forEach(t)},m(le,Z){b(le,d,Z),e(d,_),e(d,u),e(u,m),e(d,k),e(d,l),e(l,f),e(d,E)},d(le){le&&t(d)}}}function _j(R){let d,_,u,m,k;return{c(){d=a("p"),_=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),u=a("code"),m=o("Module"),k=o(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){d=r(l,"P",{});var f=i(d);_=n(f,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=r(f,"CODE",{});var E=i(u);m=n(E,"Module"),E.forEach(t),k=n(f,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),f.forEach(t)},m(l,f){b(l,d,f),e(d,_),e(d,u),e(u,m),e(d,k)},d(l){l&&t(d)}}}function bj(R){let d,_,u,m,k;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"),_=o("Example:"),u=c(),y(m.$$.fragment)},l(l){d=r(l,"P",{});var f=i(d);_=n(f,"Example:"),f.forEach(t),u=p(l),w(m.$$.fragment,l)},m(l,f){b(l,d,f),e(d,_),b(l,u,f),T(m,l,f),k=!0},p:re,i(l){k||($(m.$$.fragment,l),k=!0)},o(l){F(m.$$.fragment,l),k=!1},d(l){l&&t(d),l&&t(u),x(m,l)}}}function kj(R){let d,_,u,m,k;return{c(){d=a("p"),_=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),u=a("code"),m=o("Module"),k=o(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){d=r(l,"P",{});var f=i(d);_=n(f,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=r(f,"CODE",{});var E=i(u);m=n(E,"Module"),E.forEach(t),k=n(f,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),f.forEach(t)},m(l,f){b(l,d,f),e(d,_),e(d,u),e(u,m),e(d,k)},d(l){l&&t(d)}}}function vj(R){let d,_,u,m,k;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"),_=o("Example:"),u=c(),y(m.$$.fragment)},l(l){d=r(l,"P",{});var f=i(d);_=n(f,"Example:"),f.forEach(t),u=p(l),w(m.$$.fragment,l)},m(l,f){b(l,d,f),e(d,_),b(l,u,f),T(m,l,f),k=!0},p:re,i(l){k||($(m.$$.fragment,l),k=!0)},o(l){F(m.$$.fragment,l),k=!1},d(l){l&&t(d),l&&t(u),x(m,l)}}}function yj(R){let d,_,u,m,k;return{c(){d=a("p"),_=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),u=a("code"),m=o("Module"),k=o(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){d=r(l,"P",{});var f=i(d);_=n(f,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=r(f,"CODE",{});var E=i(u);m=n(E,"Module"),E.forEach(t),k=n(f,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),f.forEach(t)},m(l,f){b(l,d,f),e(d,_),e(d,u),e(u,m),e(d,k)},d(l){l&&t(d)}}}function wj(R){let d,_,u,m,k;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"),_=o("Example:"),u=c(),y(m.$$.fragment)},l(l){d=r(l,"P",{});var f=i(d);_=n(f,"Example:"),f.forEach(t),u=p(l),w(m.$$.fragment,l)},m(l,f){b(l,d,f),e(d,_),b(l,u,f),T(m,l,f),k=!0},p:re,i(l){k||($(m.$$.fragment,l),k=!0)},o(l){F(m.$$.fragment,l),k=!1},d(l){l&&t(d),l&&t(u),x(m,l)}}}function Tj(R){let d,_;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(){y(d.$$.fragment)},l(u){w(d.$$.fragment,u)},m(u,m){T(d,u,m),_=!0},p:re,i(u){_||($(d.$$.fragment,u),_=!0)},o(u){F(d.$$.fragment,u),_=!1},d(u){x(d,u)}}}function $j(R){let d,_,u,m,k;return{c(){d=a("p"),_=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),u=a("code"),m=o("Module"),k=o(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){d=r(l,"P",{});var f=i(d);_=n(f,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=r(f,"CODE",{});var E=i(u);m=n(E,"Module"),E.forEach(t),k=n(f,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),f.forEach(t)},m(l,f){b(l,d,f),e(d,_),e(d,u),e(u,m),e(d,k)},d(l){l&&t(d)}}}function Fj(R){let d,_,u,m,k;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"),_=o("Example of single-label classification:"),u=c(),y(m.$$.fragment)},l(l){d=r(l,"P",{});var f=i(d);_=n(f,"Example of single-label classification:"),f.forEach(t),u=p(l),w(m.$$.fragment,l)},m(l,f){b(l,d,f),e(d,_),b(l,u,f),T(m,l,f),k=!0},p:re,i(l){k||($(m.$$.fragment,l),k=!0)},o(l){F(m.$$.fragment,l),k=!1},d(l){l&&t(d),l&&t(u),x(m,l)}}}function xj(R){let d,_;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(){y(d.$$.fragment)},l(u){w(d.$$.fragment,u)},m(u,m){T(d,u,m),_=!0},p:re,i(u){_||($(d.$$.fragment,u),_=!0)},o(u){F(d.$$.fragment,u),_=!1},d(u){x(d,u)}}}function Rj(R){let d,_,u,m,k;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"),_=o("Example of multi-label classification:"),u=c(),y(m.$$.fragment)},l(l){d=r(l,"P",{});var f=i(d);_=n(f,"Example of multi-label classification:"),f.forEach(t),u=p(l),w(m.$$.fragment,l)},m(l,f){b(l,d,f),e(d,_),b(l,u,f),T(m,l,f),k=!0},p:re,i(l){k||($(m.$$.fragment,l),k=!0)},o(l){F(m.$$.fragment,l),k=!1},d(l){l&&t(d),l&&t(u),x(m,l)}}}function Ej(R){let d,_;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(){y(d.$$.fragment)},l(u){w(d.$$.fragment,u)},m(u,m){T(d,u,m),_=!0},p:re,i(u){_||($(d.$$.fragment,u),_=!0)},o(u){F(d.$$.fragment,u),_=!1},d(u){x(d,u)}}}function Mj(R){let d,_,u,m,k;return{c(){d=a("p"),_=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),u=a("code"),m=o("Module"),k=o(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){d=r(l,"P",{});var f=i(d);_=n(f,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=r(f,"CODE",{});var E=i(u);m=n(E,"Module"),E.forEach(t),k=n(f,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),f.forEach(t)},m(l,f){b(l,d,f),e(d,_),e(d,u),e(u,m),e(d,k)},d(l){l&&t(d)}}}function zj(R){let d,_,u,m,k;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"),_=o("Example:"),u=c(),y(m.$$.fragment)},l(l){d=r(l,"P",{});var f=i(d);_=n(f,"Example:"),f.forEach(t),u=p(l),w(m.$$.fragment,l)},m(l,f){b(l,d,f),e(d,_),b(l,u,f),T(m,l,f),k=!0},p:re,i(l){k||($(m.$$.fragment,l),k=!0)},o(l){F(m.$$.fragment,l),k=!1},d(l){l&&t(d),l&&t(u),x(m,l)}}}function qj(R){let d,_,u,m,k;return{c(){d=a("p"),_=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),u=a("code"),m=o("Module"),k=o(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){d=r(l,"P",{});var f=i(d);_=n(f,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=r(f,"CODE",{});var E=i(u);m=n(E,"Module"),E.forEach(t),k=n(f,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),f.forEach(t)},m(l,f){b(l,d,f),e(d,_),e(d,u),e(u,m),e(d,k)},d(l){l&&t(d)}}}function Cj(R){let d,_,u,m,k;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"),_=o("Example:"),u=c(),y(m.$$.fragment)},l(l){d=r(l,"P",{});var f=i(d);_=n(f,"Example:"),f.forEach(t),u=p(l),w(m.$$.fragment,l)},m(l,f){b(l,d,f),e(d,_),b(l,u,f),T(m,l,f),k=!0},p:re,i(l){k||($(m.$$.fragment,l),k=!0)},o(l){F(m.$$.fragment,l),k=!1},d(l){l&&t(d),l&&t(u),x(m,l)}}}function jj(R){let d,_;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(){y(d.$$.fragment)},l(u){w(d.$$.fragment,u)},m(u,m){T(d,u,m),_=!0},p:re,i(u){_||($(d.$$.fragment,u),_=!0)},o(u){F(d.$$.fragment,u),_=!1},d(u){x(d,u)}}}function Pj(R){let d,_,u,m,k;return{c(){d=a("p"),_=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),u=a("code"),m=o("Module"),k=o(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){d=r(l,"P",{});var f=i(d);_=n(f,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=r(f,"CODE",{});var E=i(u);m=n(E,"Module"),E.forEach(t),k=n(f,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),f.forEach(t)},m(l,f){b(l,d,f),e(d,_),e(d,u),e(u,m),e(d,k)},d(l){l&&t(d)}}}function Aj(R){let d,_,u,m,k;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, skip_special_tokens=True)`,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, skip_special_tokens=<span class="hljs-literal">True</span>)
<span class="hljs-string">&#x27; puppet&#x27;</span>`}}),{c(){d=a("p"),_=o("Example:"),u=c(),y(m.$$.fragment)},l(l){d=r(l,"P",{});var f=i(d);_=n(f,"Example:"),f.forEach(t),u=p(l),w(m.$$.fragment,l)},m(l,f){b(l,d,f),e(d,_),b(l,u,f),T(m,l,f),k=!0},p:re,i(l){k||($(m.$$.fragment,l),k=!0)},o(l){F(m.$$.fragment,l),k=!1},d(l){l&&t(d),l&&t(u),x(m,l)}}}function Lj(R){let d,_;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(){y(d.$$.fragment)},l(u){w(d.$$.fragment,u)},m(u,m){T(d,u,m),_=!0},p:re,i(u){_||($(d.$$.fragment,u),_=!0)},o(u){F(d.$$.fragment,u),_=!1},d(u){x(d,u)}}}function Oj(R){let d,_,u,m,k,l,f,E,le,Z,N,te,oe,M,we,K,Te,ge,B,$e,pe,J,Fe,_e,U,xe,be,H,Re,ke,ee,C,P,ve,Q,Ee,ye,I,he,Me,j,ze,V,qe,ue,G,Ce,ne,D,fe,X,je,se,A,Pe,L,Ae,Le;return{c(){d=a("p"),_=o("TensorFlow models and layers in "),u=a("code"),m=o("transformers"),k=o(" accept two formats as input:"),l=c(),f=a("ul"),E=a("li"),le=o("having all inputs as keyword arguments (like PyTorch models), or"),Z=c(),N=a("li"),te=o("having all inputs as a list, tuple or dict in the first positional argument."),oe=c(),M=a("p"),we=o(`The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
and layers. Because of this support, when using methods like `),K=a("code"),Te=o("model.fit()"),ge=o(` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),B=a("code"),$e=o("model.fit()"),pe=o(` supports! If, however, you want to use the second
format outside of Keras methods like `),J=a("code"),Fe=o("fit()"),_e=o(" and "),U=a("code"),xe=o("predict()"),be=o(`, such as when creating your own layers or models with
the Keras `),H=a("code"),Re=o("Functional"),ke=o(` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),ee=c(),C=a("ul"),P=a("li"),ve=o("a single Tensor with "),Q=a("code"),Ee=o("input_ids"),ye=o(" only and nothing else: "),I=a("code"),he=o("model(input_ids)"),Me=c(),j=a("li"),ze=o(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),V=a("code"),qe=o("model([input_ids, attention_mask])"),ue=o(" or "),G=a("code"),Ce=o("model([input_ids, attention_mask, token_type_ids])"),ne=c(),D=a("li"),fe=o(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),X=a("code"),je=o('model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),se=c(),A=a("p"),Pe=o(`Note that when creating models and layers with
`),L=a("a"),Ae=o("subclassing"),Le=o(` then you don\u2019t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`),this.h()},l(v){d=r(v,"P",{});var z=i(d);_=n(z,"TensorFlow models and layers in "),u=r(z,"CODE",{});var Ue=i(u);m=n(Ue,"transformers"),Ue.forEach(t),k=n(z," accept two formats as input:"),z.forEach(t),l=p(v),f=r(v,"UL",{});var de=i(f);E=r(de,"LI",{});var Xe=i(E);le=n(Xe,"having all inputs as keyword arguments (like PyTorch models), or"),Xe.forEach(t),Z=p(de),N=r(de,"LI",{});var Ke=i(N);te=n(Ke,"having all inputs as a list, tuple or dict in the first positional argument."),Ke.forEach(t),de.forEach(t),oe=p(v),M=r(v,"P",{});var q=i(M);we=n(q,`The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
and layers. Because of this support, when using methods like `),K=r(q,"CODE",{});var Ye=i(K);Te=n(Ye,"model.fit()"),Ye.forEach(t),ge=n(q,` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),B=r(q,"CODE",{});var Se=i(B);$e=n(Se,"model.fit()"),Se.forEach(t),pe=n(q,` supports! If, however, you want to use the second
format outside of Keras methods like `),J=r(q,"CODE",{});var Ze=i(J);Fe=n(Ze,"fit()"),Ze.forEach(t),_e=n(q," and "),U=r(q,"CODE",{});var et=i(U);xe=n(et,"predict()"),et.forEach(t),be=n(q,`, such as when creating your own layers or models with
the Keras `),H=r(q,"CODE",{});var Be=i(H);Re=n(Be,"Functional"),Be.forEach(t),ke=n(q,` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),q.forEach(t),ee=p(v),C=r(v,"UL",{});var S=i(C);P=r(S,"LI",{});var Y=i(P);ve=n(Y,"a single Tensor with "),Q=r(Y,"CODE",{});var Je=i(Q);Ee=n(Je,"input_ids"),Je.forEach(t),ye=n(Y," only and nothing else: "),I=r(Y,"CODE",{});var Oe=i(I);he=n(Oe,"model(input_ids)"),Oe.forEach(t),Y.forEach(t),Me=p(S),j=r(S,"LI",{});var W=i(j);ze=n(W,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),V=r(W,"CODE",{});var He=i(V);qe=n(He,"model([input_ids, attention_mask])"),He.forEach(t),ue=n(W," or "),G=r(W,"CODE",{});var We=i(G);Ce=n(We,"model([input_ids, attention_mask, token_type_ids])"),We.forEach(t),W.forEach(t),ne=p(S),D=r(S,"LI",{});var Ne=i(D);fe=n(Ne,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),X=r(Ne,"CODE",{});var Qe=i(X);je=n(Qe,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),Qe.forEach(t),Ne.forEach(t),S.forEach(t),se=p(v),A=r(v,"P",{});var ce=i(A);Pe=n(ce,`Note that when creating models and layers with
`),L=r(ce,"A",{href:!0,rel:!0});var Ve=i(L);Ae=n(Ve,"subclassing"),Ve.forEach(t),Le=n(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(){h(L,"href","https://keras.io/guides/making_new_layers_and_models_via_subclassing/"),h(L,"rel","nofollow")},m(v,z){b(v,d,z),e(d,_),e(d,u),e(u,m),e(d,k),b(v,l,z),b(v,f,z),e(f,E),e(E,le),e(f,Z),e(f,N),e(N,te),b(v,oe,z),b(v,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),b(v,ee,z),b(v,C,z),e(C,P),e(P,ve),e(P,Q),e(Q,Ee),e(P,ye),e(P,I),e(I,he),e(C,Me),e(C,j),e(j,ze),e(j,V),e(V,qe),e(j,ue),e(j,G),e(G,Ce),e(C,ne),e(C,D),e(D,fe),e(D,X),e(X,je),b(v,se,z),b(v,A,z),e(A,Pe),e(A,L),e(L,Ae),e(A,Le)},d(v){v&&t(d),v&&t(l),v&&t(f),v&&t(oe),v&&t(M),v&&t(ee),v&&t(C),v&&t(se),v&&t(A)}}}function Nj(R){let d,_,u,m,k;return{c(){d=a("p"),_=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),u=a("code"),m=o("Module"),k=o(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){d=r(l,"P",{});var f=i(d);_=n(f,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=r(f,"CODE",{});var E=i(u);m=n(E,"Module"),E.forEach(t),k=n(f,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),f.forEach(t)},m(l,f){b(l,d,f),e(d,_),e(d,u),e(u,m),e(d,k)},d(l){l&&t(d)}}}function Ij(R){let d,_,u,m,k;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"),_=o("Example:"),u=c(),y(m.$$.fragment)},l(l){d=r(l,"P",{});var f=i(d);_=n(f,"Example:"),f.forEach(t),u=p(l),w(m.$$.fragment,l)},m(l,f){b(l,d,f),e(d,_),b(l,u,f),T(m,l,f),k=!0},p:re,i(l){k||($(m.$$.fragment,l),k=!0)},o(l){F(m.$$.fragment,l),k=!1},d(l){l&&t(d),l&&t(u),x(m,l)}}}function Dj(R){let d,_,u,m,k;return{c(){d=a("p"),_=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),u=a("code"),m=o("Module"),k=o(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){d=r(l,"P",{});var f=i(d);_=n(f,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=r(f,"CODE",{});var E=i(u);m=n(E,"Module"),E.forEach(t),k=n(f,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),f.forEach(t)},m(l,f){b(l,d,f),e(d,_),e(d,u),e(u,m),e(d,k)},d(l){l&&t(d)}}}function Sj(R){let d,_,u,m,k;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"),_=o("Example:"),u=c(),y(m.$$.fragment)},l(l){d=r(l,"P",{});var f=i(d);_=n(f,"Example:"),f.forEach(t),u=p(l),w(m.$$.fragment,l)},m(l,f){b(l,d,f),e(d,_),b(l,u,f),T(m,l,f),k=!0},p:re,i(l){k||($(m.$$.fragment,l),k=!0)},o(l){F(m.$$.fragment,l),k=!1},d(l){l&&t(d),l&&t(u),x(m,l)}}}function Bj(R){let d,_,u,m,k,l,f,E,le,Z,N,te,oe,M,we,K,Te,ge,B,$e,pe,J,Fe,_e,U,xe,be,H,Re,ke,ee,C,P,ve,Q,Ee,ye,I,he,Me,j,ze,V,qe,ue,G,Ce,ne,D,fe,X,je,se,A,Pe,L,Ae,Le;return{c(){d=a("p"),_=o("TensorFlow models and layers in "),u=a("code"),m=o("transformers"),k=o(" accept two formats as input:"),l=c(),f=a("ul"),E=a("li"),le=o("having all inputs as keyword arguments (like PyTorch models), or"),Z=c(),N=a("li"),te=o("having all inputs as a list, tuple or dict in the first positional argument."),oe=c(),M=a("p"),we=o(`The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
and layers. Because of this support, when using methods like `),K=a("code"),Te=o("model.fit()"),ge=o(` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),B=a("code"),$e=o("model.fit()"),pe=o(` supports! If, however, you want to use the second
format outside of Keras methods like `),J=a("code"),Fe=o("fit()"),_e=o(" and "),U=a("code"),xe=o("predict()"),be=o(`, such as when creating your own layers or models with
the Keras `),H=a("code"),Re=o("Functional"),ke=o(` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),ee=c(),C=a("ul"),P=a("li"),ve=o("a single Tensor with "),Q=a("code"),Ee=o("input_ids"),ye=o(" only and nothing else: "),I=a("code"),he=o("model(input_ids)"),Me=c(),j=a("li"),ze=o(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),V=a("code"),qe=o("model([input_ids, attention_mask])"),ue=o(" or "),G=a("code"),Ce=o("model([input_ids, attention_mask, token_type_ids])"),ne=c(),D=a("li"),fe=o(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),X=a("code"),je=o('model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),se=c(),A=a("p"),Pe=o(`Note that when creating models and layers with
`),L=a("a"),Ae=o("subclassing"),Le=o(` then you don\u2019t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`),this.h()},l(v){d=r(v,"P",{});var z=i(d);_=n(z,"TensorFlow models and layers in "),u=r(z,"CODE",{});var Ue=i(u);m=n(Ue,"transformers"),Ue.forEach(t),k=n(z," accept two formats as input:"),z.forEach(t),l=p(v),f=r(v,"UL",{});var de=i(f);E=r(de,"LI",{});var Xe=i(E);le=n(Xe,"having all inputs as keyword arguments (like PyTorch models), or"),Xe.forEach(t),Z=p(de),N=r(de,"LI",{});var Ke=i(N);te=n(Ke,"having all inputs as a list, tuple or dict in the first positional argument."),Ke.forEach(t),de.forEach(t),oe=p(v),M=r(v,"P",{});var q=i(M);we=n(q,`The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
and layers. Because of this support, when using methods like `),K=r(q,"CODE",{});var Ye=i(K);Te=n(Ye,"model.fit()"),Ye.forEach(t),ge=n(q,` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),B=r(q,"CODE",{});var Se=i(B);$e=n(Se,"model.fit()"),Se.forEach(t),pe=n(q,` supports! If, however, you want to use the second
format outside of Keras methods like `),J=r(q,"CODE",{});var Ze=i(J);Fe=n(Ze,"fit()"),Ze.forEach(t),_e=n(q," and "),U=r(q,"CODE",{});var et=i(U);xe=n(et,"predict()"),et.forEach(t),be=n(q,`, such as when creating your own layers or models with
the Keras `),H=r(q,"CODE",{});var Be=i(H);Re=n(Be,"Functional"),Be.forEach(t),ke=n(q,` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),q.forEach(t),ee=p(v),C=r(v,"UL",{});var S=i(C);P=r(S,"LI",{});var Y=i(P);ve=n(Y,"a single Tensor with "),Q=r(Y,"CODE",{});var Je=i(Q);Ee=n(Je,"input_ids"),Je.forEach(t),ye=n(Y," only and nothing else: "),I=r(Y,"CODE",{});var Oe=i(I);he=n(Oe,"model(input_ids)"),Oe.forEach(t),Y.forEach(t),Me=p(S),j=r(S,"LI",{});var W=i(j);ze=n(W,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),V=r(W,"CODE",{});var He=i(V);qe=n(He,"model([input_ids, attention_mask])"),He.forEach(t),ue=n(W," or "),G=r(W,"CODE",{});var We=i(G);Ce=n(We,"model([input_ids, attention_mask, token_type_ids])"),We.forEach(t),W.forEach(t),ne=p(S),D=r(S,"LI",{});var Ne=i(D);fe=n(Ne,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),X=r(Ne,"CODE",{});var Qe=i(X);je=n(Qe,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),Qe.forEach(t),Ne.forEach(t),S.forEach(t),se=p(v),A=r(v,"P",{});var ce=i(A);Pe=n(ce,`Note that when creating models and layers with
`),L=r(ce,"A",{href:!0,rel:!0});var Ve=i(L);Ae=n(Ve,"subclassing"),Ve.forEach(t),Le=n(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(){h(L,"href","https://keras.io/guides/making_new_layers_and_models_via_subclassing/"),h(L,"rel","nofollow")},m(v,z){b(v,d,z),e(d,_),e(d,u),e(u,m),e(d,k),b(v,l,z),b(v,f,z),e(f,E),e(E,le),e(f,Z),e(f,N),e(N,te),b(v,oe,z),b(v,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),b(v,ee,z),b(v,C,z),e(C,P),e(P,ve),e(P,Q),e(Q,Ee),e(P,ye),e(P,I),e(I,he),e(C,Me),e(C,j),e(j,ze),e(j,V),e(V,qe),e(j,ue),e(j,G),e(G,Ce),e(C,ne),e(C,D),e(D,fe),e(D,X),e(X,je),b(v,se,z),b(v,A,z),e(A,Pe),e(A,L),e(L,Ae),e(A,Le)},d(v){v&&t(d),v&&t(l),v&&t(f),v&&t(oe),v&&t(M),v&&t(ee),v&&t(C),v&&t(se),v&&t(A)}}}function Wj(R){let d,_,u,m,k;return{c(){d=a("p"),_=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),u=a("code"),m=o("Module"),k=o(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){d=r(l,"P",{});var f=i(d);_=n(f,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=r(f,"CODE",{});var E=i(u);m=n(E,"Module"),E.forEach(t),k=n(f,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),f.forEach(t)},m(l,f){b(l,d,f),e(d,_),e(d,u),e(u,m),e(d,k)},d(l){l&&t(d)}}}function Uj(R){let d,_,u,m,k;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"),_=o("Example:"),u=c(),y(m.$$.fragment)},l(l){d=r(l,"P",{});var f=i(d);_=n(f,"Example:"),f.forEach(t),u=p(l),w(m.$$.fragment,l)},m(l,f){b(l,d,f),e(d,_),b(l,u,f),T(m,l,f),k=!0},p:re,i(l){k||($(m.$$.fragment,l),k=!0)},o(l){F(m.$$.fragment,l),k=!1},d(l){l&&t(d),l&&t(u),x(m,l)}}}function Hj(R){let d,_;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(){y(d.$$.fragment)},l(u){w(d.$$.fragment,u)},m(u,m){T(d,u,m),_=!0},p:re,i(u){_||($(d.$$.fragment,u),_=!0)},o(u){F(d.$$.fragment,u),_=!1},d(u){x(d,u)}}}function Qj(R){let d,_,u,m,k,l,f,E,le,Z,N,te,oe,M,we,K,Te,ge,B,$e,pe,J,Fe,_e,U,xe,be,H,Re,ke,ee,C,P,ve,Q,Ee,ye,I,he,Me,j,ze,V,qe,ue,G,Ce,ne,D,fe,X,je,se,A,Pe,L,Ae,Le;return{c(){d=a("p"),_=o("TensorFlow models and layers in "),u=a("code"),m=o("transformers"),k=o(" accept two formats as input:"),l=c(),f=a("ul"),E=a("li"),le=o("having all inputs as keyword arguments (like PyTorch models), or"),Z=c(),N=a("li"),te=o("having all inputs as a list, tuple or dict in the first positional argument."),oe=c(),M=a("p"),we=o(`The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
and layers. Because of this support, when using methods like `),K=a("code"),Te=o("model.fit()"),ge=o(` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),B=a("code"),$e=o("model.fit()"),pe=o(` supports! If, however, you want to use the second
format outside of Keras methods like `),J=a("code"),Fe=o("fit()"),_e=o(" and "),U=a("code"),xe=o("predict()"),be=o(`, such as when creating your own layers or models with
the Keras `),H=a("code"),Re=o("Functional"),ke=o(` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),ee=c(),C=a("ul"),P=a("li"),ve=o("a single Tensor with "),Q=a("code"),Ee=o("input_ids"),ye=o(" only and nothing else: "),I=a("code"),he=o("model(input_ids)"),Me=c(),j=a("li"),ze=o(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),V=a("code"),qe=o("model([input_ids, attention_mask])"),ue=o(" or "),G=a("code"),Ce=o("model([input_ids, attention_mask, token_type_ids])"),ne=c(),D=a("li"),fe=o(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),X=a("code"),je=o('model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),se=c(),A=a("p"),Pe=o(`Note that when creating models and layers with
`),L=a("a"),Ae=o("subclassing"),Le=o(` then you don\u2019t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`),this.h()},l(v){d=r(v,"P",{});var z=i(d);_=n(z,"TensorFlow models and layers in "),u=r(z,"CODE",{});var Ue=i(u);m=n(Ue,"transformers"),Ue.forEach(t),k=n(z," accept two formats as input:"),z.forEach(t),l=p(v),f=r(v,"UL",{});var de=i(f);E=r(de,"LI",{});var Xe=i(E);le=n(Xe,"having all inputs as keyword arguments (like PyTorch models), or"),Xe.forEach(t),Z=p(de),N=r(de,"LI",{});var Ke=i(N);te=n(Ke,"having all inputs as a list, tuple or dict in the first positional argument."),Ke.forEach(t),de.forEach(t),oe=p(v),M=r(v,"P",{});var q=i(M);we=n(q,`The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
and layers. Because of this support, when using methods like `),K=r(q,"CODE",{});var Ye=i(K);Te=n(Ye,"model.fit()"),Ye.forEach(t),ge=n(q,` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),B=r(q,"CODE",{});var Se=i(B);$e=n(Se,"model.fit()"),Se.forEach(t),pe=n(q,` supports! If, however, you want to use the second
format outside of Keras methods like `),J=r(q,"CODE",{});var Ze=i(J);Fe=n(Ze,"fit()"),Ze.forEach(t),_e=n(q," and "),U=r(q,"CODE",{});var et=i(U);xe=n(et,"predict()"),et.forEach(t),be=n(q,`, such as when creating your own layers or models with
the Keras `),H=r(q,"CODE",{});var Be=i(H);Re=n(Be,"Functional"),Be.forEach(t),ke=n(q,` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),q.forEach(t),ee=p(v),C=r(v,"UL",{});var S=i(C);P=r(S,"LI",{});var Y=i(P);ve=n(Y,"a single Tensor with "),Q=r(Y,"CODE",{});var Je=i(Q);Ee=n(Je,"input_ids"),Je.forEach(t),ye=n(Y," only and nothing else: "),I=r(Y,"CODE",{});var Oe=i(I);he=n(Oe,"model(input_ids)"),Oe.forEach(t),Y.forEach(t),Me=p(S),j=r(S,"LI",{});var W=i(j);ze=n(W,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),V=r(W,"CODE",{});var He=i(V);qe=n(He,"model([input_ids, attention_mask])"),He.forEach(t),ue=n(W," or "),G=r(W,"CODE",{});var We=i(G);Ce=n(We,"model([input_ids, attention_mask, token_type_ids])"),We.forEach(t),W.forEach(t),ne=p(S),D=r(S,"LI",{});var Ne=i(D);fe=n(Ne,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),X=r(Ne,"CODE",{});var Qe=i(X);je=n(Qe,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),Qe.forEach(t),Ne.forEach(t),S.forEach(t),se=p(v),A=r(v,"P",{});var ce=i(A);Pe=n(ce,`Note that when creating models and layers with
`),L=r(ce,"A",{href:!0,rel:!0});var Ve=i(L);Ae=n(Ve,"subclassing"),Ve.forEach(t),Le=n(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(){h(L,"href","https://keras.io/guides/making_new_layers_and_models_via_subclassing/"),h(L,"rel","nofollow")},m(v,z){b(v,d,z),e(d,_),e(d,u),e(u,m),e(d,k),b(v,l,z),b(v,f,z),e(f,E),e(E,le),e(f,Z),e(f,N),e(N,te),b(v,oe,z),b(v,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),b(v,ee,z),b(v,C,z),e(C,P),e(P,ve),e(P,Q),e(Q,Ee),e(P,ye),e(P,I),e(I,he),e(C,Me),e(C,j),e(j,ze),e(j,V),e(V,qe),e(j,ue),e(j,G),e(G,Ce),e(C,ne),e(C,D),e(D,fe),e(D,X),e(X,je),b(v,se,z),b(v,A,z),e(A,Pe),e(A,L),e(L,Ae),e(A,Le)},d(v){v&&t(d),v&&t(l),v&&t(f),v&&t(oe),v&&t(M),v&&t(ee),v&&t(C),v&&t(se),v&&t(A)}}}function Kj(R){let d,_,u,m,k;return{c(){d=a("p"),_=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),u=a("code"),m=o("Module"),k=o(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){d=r(l,"P",{});var f=i(d);_=n(f,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=r(f,"CODE",{});var E=i(u);m=n(E,"Module"),E.forEach(t),k=n(f,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),f.forEach(t)},m(l,f){b(l,d,f),e(d,_),e(d,u),e(u,m),e(d,k)},d(l){l&&t(d)}}}function Jj(R){let d,_,u,m,k;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"),_=o("Example:"),u=c(),y(m.$$.fragment)},l(l){d=r(l,"P",{});var f=i(d);_=n(f,"Example:"),f.forEach(t),u=p(l),w(m.$$.fragment,l)},m(l,f){b(l,d,f),e(d,_),b(l,u,f),T(m,l,f),k=!0},p:re,i(l){k||($(m.$$.fragment,l),k=!0)},o(l){F(m.$$.fragment,l),k=!1},d(l){l&&t(d),l&&t(u),x(m,l)}}}function Vj(R){let d,_;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(){y(d.$$.fragment)},l(u){w(d.$$.fragment,u)},m(u,m){T(d,u,m),_=!0},p:re,i(u){_||($(d.$$.fragment,u),_=!0)},o(u){F(d.$$.fragment,u),_=!1},d(u){x(d,u)}}}function Gj(R){let d,_,u,m,k,l,f,E,le,Z,N,te,oe,M,we,K,Te,ge,B,$e,pe,J,Fe,_e,U,xe,be,H,Re,ke,ee,C,P,ve,Q,Ee,ye,I,he,Me,j,ze,V,qe,ue,G,Ce,ne,D,fe,X,je,se,A,Pe,L,Ae,Le;return{c(){d=a("p"),_=o("TensorFlow models and layers in "),u=a("code"),m=o("transformers"),k=o(" accept two formats as input:"),l=c(),f=a("ul"),E=a("li"),le=o("having all inputs as keyword arguments (like PyTorch models), or"),Z=c(),N=a("li"),te=o("having all inputs as a list, tuple or dict in the first positional argument."),oe=c(),M=a("p"),we=o(`The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
and layers. Because of this support, when using methods like `),K=a("code"),Te=o("model.fit()"),ge=o(` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),B=a("code"),$e=o("model.fit()"),pe=o(` supports! If, however, you want to use the second
format outside of Keras methods like `),J=a("code"),Fe=o("fit()"),_e=o(" and "),U=a("code"),xe=o("predict()"),be=o(`, such as when creating your own layers or models with
the Keras `),H=a("code"),Re=o("Functional"),ke=o(` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),ee=c(),C=a("ul"),P=a("li"),ve=o("a single Tensor with "),Q=a("code"),Ee=o("input_ids"),ye=o(" only and nothing else: "),I=a("code"),he=o("model(input_ids)"),Me=c(),j=a("li"),ze=o(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),V=a("code"),qe=o("model([input_ids, attention_mask])"),ue=o(" or "),G=a("code"),Ce=o("model([input_ids, attention_mask, token_type_ids])"),ne=c(),D=a("li"),fe=o(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),X=a("code"),je=o('model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),se=c(),A=a("p"),Pe=o(`Note that when creating models and layers with
`),L=a("a"),Ae=o("subclassing"),Le=o(` then you don\u2019t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`),this.h()},l(v){d=r(v,"P",{});var z=i(d);_=n(z,"TensorFlow models and layers in "),u=r(z,"CODE",{});var Ue=i(u);m=n(Ue,"transformers"),Ue.forEach(t),k=n(z," accept two formats as input:"),z.forEach(t),l=p(v),f=r(v,"UL",{});var de=i(f);E=r(de,"LI",{});var Xe=i(E);le=n(Xe,"having all inputs as keyword arguments (like PyTorch models), or"),Xe.forEach(t),Z=p(de),N=r(de,"LI",{});var Ke=i(N);te=n(Ke,"having all inputs as a list, tuple or dict in the first positional argument."),Ke.forEach(t),de.forEach(t),oe=p(v),M=r(v,"P",{});var q=i(M);we=n(q,`The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
and layers. Because of this support, when using methods like `),K=r(q,"CODE",{});var Ye=i(K);Te=n(Ye,"model.fit()"),Ye.forEach(t),ge=n(q,` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),B=r(q,"CODE",{});var Se=i(B);$e=n(Se,"model.fit()"),Se.forEach(t),pe=n(q,` supports! If, however, you want to use the second
format outside of Keras methods like `),J=r(q,"CODE",{});var Ze=i(J);Fe=n(Ze,"fit()"),Ze.forEach(t),_e=n(q," and "),U=r(q,"CODE",{});var et=i(U);xe=n(et,"predict()"),et.forEach(t),be=n(q,`, such as when creating your own layers or models with
the Keras `),H=r(q,"CODE",{});var Be=i(H);Re=n(Be,"Functional"),Be.forEach(t),ke=n(q,` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),q.forEach(t),ee=p(v),C=r(v,"UL",{});var S=i(C);P=r(S,"LI",{});var Y=i(P);ve=n(Y,"a single Tensor with "),Q=r(Y,"CODE",{});var Je=i(Q);Ee=n(Je,"input_ids"),Je.forEach(t),ye=n(Y," only and nothing else: "),I=r(Y,"CODE",{});var Oe=i(I);he=n(Oe,"model(input_ids)"),Oe.forEach(t),Y.forEach(t),Me=p(S),j=r(S,"LI",{});var W=i(j);ze=n(W,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),V=r(W,"CODE",{});var He=i(V);qe=n(He,"model([input_ids, attention_mask])"),He.forEach(t),ue=n(W," or "),G=r(W,"CODE",{});var We=i(G);Ce=n(We,"model([input_ids, attention_mask, token_type_ids])"),We.forEach(t),W.forEach(t),ne=p(S),D=r(S,"LI",{});var Ne=i(D);fe=n(Ne,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),X=r(Ne,"CODE",{});var Qe=i(X);je=n(Qe,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),Qe.forEach(t),Ne.forEach(t),S.forEach(t),se=p(v),A=r(v,"P",{});var ce=i(A);Pe=n(ce,`Note that when creating models and layers with
`),L=r(ce,"A",{href:!0,rel:!0});var Ve=i(L);Ae=n(Ve,"subclassing"),Ve.forEach(t),Le=n(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(){h(L,"href","https://keras.io/guides/making_new_layers_and_models_via_subclassing/"),h(L,"rel","nofollow")},m(v,z){b(v,d,z),e(d,_),e(d,u),e(u,m),e(d,k),b(v,l,z),b(v,f,z),e(f,E),e(E,le),e(f,Z),e(f,N),e(N,te),b(v,oe,z),b(v,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),b(v,ee,z),b(v,C,z),e(C,P),e(P,ve),e(P,Q),e(Q,Ee),e(P,ye),e(P,I),e(I,he),e(C,Me),e(C,j),e(j,ze),e(j,V),e(V,qe),e(j,ue),e(j,G),e(G,Ce),e(C,ne),e(C,D),e(D,fe),e(D,X),e(X,je),b(v,se,z),b(v,A,z),e(A,Pe),e(A,L),e(L,Ae),e(A,Le)},d(v){v&&t(d),v&&t(l),v&&t(f),v&&t(oe),v&&t(M),v&&t(ee),v&&t(C),v&&t(se),v&&t(A)}}}function Xj(R){let d,_,u,m,k;return{c(){d=a("p"),_=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),u=a("code"),m=o("Module"),k=o(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){d=r(l,"P",{});var f=i(d);_=n(f,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=r(f,"CODE",{});var E=i(u);m=n(E,"Module"),E.forEach(t),k=n(f,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),f.forEach(t)},m(l,f){b(l,d,f),e(d,_),e(d,u),e(u,m),e(d,k)},d(l){l&&t(d)}}}function Yj(R){let d,_,u,m,k;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"),_=o("Example:"),u=c(),y(m.$$.fragment)},l(l){d=r(l,"P",{});var f=i(d);_=n(f,"Example:"),f.forEach(t),u=p(l),w(m.$$.fragment,l)},m(l,f){b(l,d,f),e(d,_),b(l,u,f),T(m,l,f),k=!0},p:re,i(l){k||($(m.$$.fragment,l),k=!0)},o(l){F(m.$$.fragment,l),k=!1},d(l){l&&t(d),l&&t(u),x(m,l)}}}function Zj(R){let d,_,u,m,k,l,f,E,le,Z,N,te,oe,M,we,K,Te,ge,B,$e,pe,J,Fe,_e,U,xe,be,H,Re,ke,ee,C,P,ve,Q,Ee,ye,I,he,Me,j,ze,V,qe,ue,G,Ce,ne,D,fe,X,je,se,A,Pe,L,Ae,Le;return{c(){d=a("p"),_=o("TensorFlow models and layers in "),u=a("code"),m=o("transformers"),k=o(" accept two formats as input:"),l=c(),f=a("ul"),E=a("li"),le=o("having all inputs as keyword arguments (like PyTorch models), or"),Z=c(),N=a("li"),te=o("having all inputs as a list, tuple or dict in the first positional argument."),oe=c(),M=a("p"),we=o(`The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
and layers. Because of this support, when using methods like `),K=a("code"),Te=o("model.fit()"),ge=o(` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),B=a("code"),$e=o("model.fit()"),pe=o(` supports! If, however, you want to use the second
format outside of Keras methods like `),J=a("code"),Fe=o("fit()"),_e=o(" and "),U=a("code"),xe=o("predict()"),be=o(`, such as when creating your own layers or models with
the Keras `),H=a("code"),Re=o("Functional"),ke=o(` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),ee=c(),C=a("ul"),P=a("li"),ve=o("a single Tensor with "),Q=a("code"),Ee=o("input_ids"),ye=o(" only and nothing else: "),I=a("code"),he=o("model(input_ids)"),Me=c(),j=a("li"),ze=o(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),V=a("code"),qe=o("model([input_ids, attention_mask])"),ue=o(" or "),G=a("code"),Ce=o("model([input_ids, attention_mask, token_type_ids])"),ne=c(),D=a("li"),fe=o(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),X=a("code"),je=o('model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),se=c(),A=a("p"),Pe=o(`Note that when creating models and layers with
`),L=a("a"),Ae=o("subclassing"),Le=o(` then you don\u2019t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`),this.h()},l(v){d=r(v,"P",{});var z=i(d);_=n(z,"TensorFlow models and layers in "),u=r(z,"CODE",{});var Ue=i(u);m=n(Ue,"transformers"),Ue.forEach(t),k=n(z," accept two formats as input:"),z.forEach(t),l=p(v),f=r(v,"UL",{});var de=i(f);E=r(de,"LI",{});var Xe=i(E);le=n(Xe,"having all inputs as keyword arguments (like PyTorch models), or"),Xe.forEach(t),Z=p(de),N=r(de,"LI",{});var Ke=i(N);te=n(Ke,"having all inputs as a list, tuple or dict in the first positional argument."),Ke.forEach(t),de.forEach(t),oe=p(v),M=r(v,"P",{});var q=i(M);we=n(q,`The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
and layers. Because of this support, when using methods like `),K=r(q,"CODE",{});var Ye=i(K);Te=n(Ye,"model.fit()"),Ye.forEach(t),ge=n(q,` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),B=r(q,"CODE",{});var Se=i(B);$e=n(Se,"model.fit()"),Se.forEach(t),pe=n(q,` supports! If, however, you want to use the second
format outside of Keras methods like `),J=r(q,"CODE",{});var Ze=i(J);Fe=n(Ze,"fit()"),Ze.forEach(t),_e=n(q," and "),U=r(q,"CODE",{});var et=i(U);xe=n(et,"predict()"),et.forEach(t),be=n(q,`, such as when creating your own layers or models with
the Keras `),H=r(q,"CODE",{});var Be=i(H);Re=n(Be,"Functional"),Be.forEach(t),ke=n(q,` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),q.forEach(t),ee=p(v),C=r(v,"UL",{});var S=i(C);P=r(S,"LI",{});var Y=i(P);ve=n(Y,"a single Tensor with "),Q=r(Y,"CODE",{});var Je=i(Q);Ee=n(Je,"input_ids"),Je.forEach(t),ye=n(Y," only and nothing else: "),I=r(Y,"CODE",{});var Oe=i(I);he=n(Oe,"model(input_ids)"),Oe.forEach(t),Y.forEach(t),Me=p(S),j=r(S,"LI",{});var W=i(j);ze=n(W,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),V=r(W,"CODE",{});var He=i(V);qe=n(He,"model([input_ids, attention_mask])"),He.forEach(t),ue=n(W," or "),G=r(W,"CODE",{});var We=i(G);Ce=n(We,"model([input_ids, attention_mask, token_type_ids])"),We.forEach(t),W.forEach(t),ne=p(S),D=r(S,"LI",{});var Ne=i(D);fe=n(Ne,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),X=r(Ne,"CODE",{});var Qe=i(X);je=n(Qe,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),Qe.forEach(t),Ne.forEach(t),S.forEach(t),se=p(v),A=r(v,"P",{});var ce=i(A);Pe=n(ce,`Note that when creating models and layers with
`),L=r(ce,"A",{href:!0,rel:!0});var Ve=i(L);Ae=n(Ve,"subclassing"),Ve.forEach(t),Le=n(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(){h(L,"href","https://keras.io/guides/making_new_layers_and_models_via_subclassing/"),h(L,"rel","nofollow")},m(v,z){b(v,d,z),e(d,_),e(d,u),e(u,m),e(d,k),b(v,l,z),b(v,f,z),e(f,E),e(E,le),e(f,Z),e(f,N),e(N,te),b(v,oe,z),b(v,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),b(v,ee,z),b(v,C,z),e(C,P),e(P,ve),e(P,Q),e(Q,Ee),e(P,ye),e(P,I),e(I,he),e(C,Me),e(C,j),e(j,ze),e(j,V),e(V,qe),e(j,ue),e(j,G),e(G,Ce),e(C,ne),e(C,D),e(D,fe),e(D,X),e(X,je),b(v,se,z),b(v,A,z),e(A,Pe),e(A,L),e(L,Ae),e(A,Le)},d(v){v&&t(d),v&&t(l),v&&t(f),v&&t(oe),v&&t(M),v&&t(ee),v&&t(C),v&&t(se),v&&t(A)}}}function e3(R){let d,_,u,m,k;return{c(){d=a("p"),_=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),u=a("code"),m=o("Module"),k=o(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){d=r(l,"P",{});var f=i(d);_=n(f,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=r(f,"CODE",{});var E=i(u);m=n(E,"Module"),E.forEach(t),k=n(f,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),f.forEach(t)},m(l,f){b(l,d,f),e(d,_),e(d,u),e(u,m),e(d,k)},d(l){l&&t(d)}}}function t3(R){let d,_,u,m,k;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"),_=o("Example:"),u=c(),y(m.$$.fragment)},l(l){d=r(l,"P",{});var f=i(d);_=n(f,"Example:"),f.forEach(t),u=p(l),w(m.$$.fragment,l)},m(l,f){b(l,d,f),e(d,_),b(l,u,f),T(m,l,f),k=!0},p:re,i(l){k||($(m.$$.fragment,l),k=!0)},o(l){F(m.$$.fragment,l),k=!1},d(l){l&&t(d),l&&t(u),x(m,l)}}}function o3(R){let d,_;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(){y(d.$$.fragment)},l(u){w(d.$$.fragment,u)},m(u,m){T(d,u,m),_=!0},p:re,i(u){_||($(d.$$.fragment,u),_=!0)},o(u){F(d.$$.fragment,u),_=!1},d(u){x(d,u)}}}function n3(R){let d,_,u,m,k,l,f,E,le,Z,N,te,oe,M,we,K,Te,ge,B,$e,pe,J,Fe,_e,U,xe,be,H,Re,ke,ee,C,P,ve,Q,Ee,ye,I,he,Me,j,ze,V,qe,ue,G,Ce,ne,D,fe,X,je,se,A,Pe,L,Ae,Le;return{c(){d=a("p"),_=o("TensorFlow models and layers in "),u=a("code"),m=o("transformers"),k=o(" accept two formats as input:"),l=c(),f=a("ul"),E=a("li"),le=o("having all inputs as keyword arguments (like PyTorch models), or"),Z=c(),N=a("li"),te=o("having all inputs as a list, tuple or dict in the first positional argument."),oe=c(),M=a("p"),we=o(`The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
and layers. Because of this support, when using methods like `),K=a("code"),Te=o("model.fit()"),ge=o(` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),B=a("code"),$e=o("model.fit()"),pe=o(` supports! If, however, you want to use the second
format outside of Keras methods like `),J=a("code"),Fe=o("fit()"),_e=o(" and "),U=a("code"),xe=o("predict()"),be=o(`, such as when creating your own layers or models with
the Keras `),H=a("code"),Re=o("Functional"),ke=o(` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),ee=c(),C=a("ul"),P=a("li"),ve=o("a single Tensor with "),Q=a("code"),Ee=o("input_ids"),ye=o(" only and nothing else: "),I=a("code"),he=o("model(input_ids)"),Me=c(),j=a("li"),ze=o(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),V=a("code"),qe=o("model([input_ids, attention_mask])"),ue=o(" or "),G=a("code"),Ce=o("model([input_ids, attention_mask, token_type_ids])"),ne=c(),D=a("li"),fe=o(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),X=a("code"),je=o('model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),se=c(),A=a("p"),Pe=o(`Note that when creating models and layers with
`),L=a("a"),Ae=o("subclassing"),Le=o(` then you don\u2019t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`),this.h()},l(v){d=r(v,"P",{});var z=i(d);_=n(z,"TensorFlow models and layers in "),u=r(z,"CODE",{});var Ue=i(u);m=n(Ue,"transformers"),Ue.forEach(t),k=n(z," accept two formats as input:"),z.forEach(t),l=p(v),f=r(v,"UL",{});var de=i(f);E=r(de,"LI",{});var Xe=i(E);le=n(Xe,"having all inputs as keyword arguments (like PyTorch models), or"),Xe.forEach(t),Z=p(de),N=r(de,"LI",{});var Ke=i(N);te=n(Ke,"having all inputs as a list, tuple or dict in the first positional argument."),Ke.forEach(t),de.forEach(t),oe=p(v),M=r(v,"P",{});var q=i(M);we=n(q,`The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
and layers. Because of this support, when using methods like `),K=r(q,"CODE",{});var Ye=i(K);Te=n(Ye,"model.fit()"),Ye.forEach(t),ge=n(q,` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),B=r(q,"CODE",{});var Se=i(B);$e=n(Se,"model.fit()"),Se.forEach(t),pe=n(q,` supports! If, however, you want to use the second
format outside of Keras methods like `),J=r(q,"CODE",{});var Ze=i(J);Fe=n(Ze,"fit()"),Ze.forEach(t),_e=n(q," and "),U=r(q,"CODE",{});var et=i(U);xe=n(et,"predict()"),et.forEach(t),be=n(q,`, such as when creating your own layers or models with
the Keras `),H=r(q,"CODE",{});var Be=i(H);Re=n(Be,"Functional"),Be.forEach(t),ke=n(q,` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),q.forEach(t),ee=p(v),C=r(v,"UL",{});var S=i(C);P=r(S,"LI",{});var Y=i(P);ve=n(Y,"a single Tensor with "),Q=r(Y,"CODE",{});var Je=i(Q);Ee=n(Je,"input_ids"),Je.forEach(t),ye=n(Y," only and nothing else: "),I=r(Y,"CODE",{});var Oe=i(I);he=n(Oe,"model(input_ids)"),Oe.forEach(t),Y.forEach(t),Me=p(S),j=r(S,"LI",{});var W=i(j);ze=n(W,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),V=r(W,"CODE",{});var He=i(V);qe=n(He,"model([input_ids, attention_mask])"),He.forEach(t),ue=n(W," or "),G=r(W,"CODE",{});var We=i(G);Ce=n(We,"model([input_ids, attention_mask, token_type_ids])"),We.forEach(t),W.forEach(t),ne=p(S),D=r(S,"LI",{});var Ne=i(D);fe=n(Ne,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),X=r(Ne,"CODE",{});var Qe=i(X);je=n(Qe,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),Qe.forEach(t),Ne.forEach(t),S.forEach(t),se=p(v),A=r(v,"P",{});var ce=i(A);Pe=n(ce,`Note that when creating models and layers with
`),L=r(ce,"A",{href:!0,rel:!0});var Ve=i(L);Ae=n(Ve,"subclassing"),Ve.forEach(t),Le=n(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(){h(L,"href","https://keras.io/guides/making_new_layers_and_models_via_subclassing/"),h(L,"rel","nofollow")},m(v,z){b(v,d,z),e(d,_),e(d,u),e(u,m),e(d,k),b(v,l,z),b(v,f,z),e(f,E),e(E,le),e(f,Z),e(f,N),e(N,te),b(v,oe,z),b(v,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),b(v,ee,z),b(v,C,z),e(C,P),e(P,ve),e(P,Q),e(Q,Ee),e(P,ye),e(P,I),e(I,he),e(C,Me),e(C,j),e(j,ze),e(j,V),e(V,qe),e(j,ue),e(j,G),e(G,Ce),e(C,ne),e(C,D),e(D,fe),e(D,X),e(X,je),b(v,se,z),b(v,A,z),e(A,Pe),e(A,L),e(L,Ae),e(A,Le)},d(v){v&&t(d),v&&t(l),v&&t(f),v&&t(oe),v&&t(M),v&&t(ee),v&&t(C),v&&t(se),v&&t(A)}}}function s3(R){let d,_,u,m,k;return{c(){d=a("p"),_=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),u=a("code"),m=o("Module"),k=o(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){d=r(l,"P",{});var f=i(d);_=n(f,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=r(f,"CODE",{});var E=i(u);m=n(E,"Module"),E.forEach(t),k=n(f,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),f.forEach(t)},m(l,f){b(l,d,f),e(d,_),e(d,u),e(u,m),e(d,k)},d(l){l&&t(d)}}}function a3(R){let d,_,u,m,k;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"),_=o("Example:"),u=c(),y(m.$$.fragment)},l(l){d=r(l,"P",{});var f=i(d);_=n(f,"Example:"),f.forEach(t),u=p(l),w(m.$$.fragment,l)},m(l,f){b(l,d,f),e(d,_),b(l,u,f),T(m,l,f),k=!0},p:re,i(l){k||($(m.$$.fragment,l),k=!0)},o(l){F(m.$$.fragment,l),k=!1},d(l){l&&t(d),l&&t(u),x(m,l)}}}function r3(R){let d,_;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(){y(d.$$.fragment)},l(u){w(d.$$.fragment,u)},m(u,m){T(d,u,m),_=!0},p:re,i(u){_||($(d.$$.fragment,u),_=!0)},o(u){F(d.$$.fragment,u),_=!1},d(u){x(d,u)}}}function i3(R){let d,_,u,m,k;return{c(){d=a("p"),_=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),u=a("code"),m=o("Module"),k=o(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){d=r(l,"P",{});var f=i(d);_=n(f,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=r(f,"CODE",{});var E=i(u);m=n(E,"Module"),E.forEach(t),k=n(f,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),f.forEach(t)},m(l,f){b(l,d,f),e(d,_),e(d,u),e(u,m),e(d,k)},d(l){l&&t(d)}}}function l3(R){let d,_,u,m,k;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"),_=o("Example:"),u=c(),y(m.$$.fragment)},l(l){d=r(l,"P",{});var f=i(d);_=n(f,"Example:"),f.forEach(t),u=p(l),w(m.$$.fragment,l)},m(l,f){b(l,d,f),e(d,_),b(l,u,f),T(m,l,f),k=!0},p:re,i(l){k||($(m.$$.fragment,l),k=!0)},o(l){F(m.$$.fragment,l),k=!1},d(l){l&&t(d),l&&t(u),x(m,l)}}}function d3(R){let d,_,u,m,k;return{c(){d=a("p"),_=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),u=a("code"),m=o("Module"),k=o(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){d=r(l,"P",{});var f=i(d);_=n(f,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=r(f,"CODE",{});var E=i(u);m=n(E,"Module"),E.forEach(t),k=n(f,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),f.forEach(t)},m(l,f){b(l,d,f),e(d,_),e(d,u),e(u,m),e(d,k)},d(l){l&&t(d)}}}function c3(R){let d,_,u,m,k;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"),_=o("Example:"),u=c(),y(m.$$.fragment)},l(l){d=r(l,"P",{});var f=i(d);_=n(f,"Example:"),f.forEach(t),u=p(l),w(m.$$.fragment,l)},m(l,f){b(l,d,f),e(d,_),b(l,u,f),T(m,l,f),k=!0},p:re,i(l){k||($(m.$$.fragment,l),k=!0)},o(l){F(m.$$.fragment,l),k=!1},d(l){l&&t(d),l&&t(u),x(m,l)}}}function p3(R){let d,_,u,m,k;return{c(){d=a("p"),_=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),u=a("code"),m=o("Module"),k=o(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){d=r(l,"P",{});var f=i(d);_=n(f,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=r(f,"CODE",{});var E=i(u);m=n(E,"Module"),E.forEach(t),k=n(f,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),f.forEach(t)},m(l,f){b(l,d,f),e(d,_),e(d,u),e(u,m),e(d,k)},d(l){l&&t(d)}}}function h3(R){let d,_,u,m,k;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"),_=o("Example:"),u=c(),y(m.$$.fragment)},l(l){d=r(l,"P",{});var f=i(d);_=n(f,"Example:"),f.forEach(t),u=p(l),w(m.$$.fragment,l)},m(l,f){b(l,d,f),e(d,_),b(l,u,f),T(m,l,f),k=!0},p:re,i(l){k||($(m.$$.fragment,l),k=!0)},o(l){F(m.$$.fragment,l),k=!1},d(l){l&&t(d),l&&t(u),x(m,l)}}}function u3(R){let d,_,u,m,k;return{c(){d=a("p"),_=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),u=a("code"),m=o("Module"),k=o(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){d=r(l,"P",{});var f=i(d);_=n(f,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=r(f,"CODE",{});var E=i(u);m=n(E,"Module"),E.forEach(t),k=n(f,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),f.forEach(t)},m(l,f){b(l,d,f),e(d,_),e(d,u),e(u,m),e(d,k)},d(l){l&&t(d)}}}function f3(R){let d,_,u,m,k;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"),_=o("Example:"),u=c(),y(m.$$.fragment)},l(l){d=r(l,"P",{});var f=i(d);_=n(f,"Example:"),f.forEach(t),u=p(l),w(m.$$.fragment,l)},m(l,f){b(l,d,f),e(d,_),b(l,u,f),T(m,l,f),k=!0},p:re,i(l){k||($(m.$$.fragment,l),k=!0)},o(l){F(m.$$.fragment,l),k=!1},d(l){l&&t(d),l&&t(u),x(m,l)}}}function m3(R){let d,_,u,m,k;return{c(){d=a("p"),_=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),u=a("code"),m=o("Module"),k=o(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){d=r(l,"P",{});var f=i(d);_=n(f,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=r(f,"CODE",{});var E=i(u);m=n(E,"Module"),E.forEach(t),k=n(f,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),f.forEach(t)},m(l,f){b(l,d,f),e(d,_),e(d,u),e(u,m),e(d,k)},d(l){l&&t(d)}}}function g3(R){let d,_,u,m,k;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"),_=o("Example:"),u=c(),y(m.$$.fragment)},l(l){d=r(l,"P",{});var f=i(d);_=n(f,"Example:"),f.forEach(t),u=p(l),w(m.$$.fragment,l)},m(l,f){b(l,d,f),e(d,_),b(l,u,f),T(m,l,f),k=!0},p:re,i(l){k||($(m.$$.fragment,l),k=!0)},o(l){F(m.$$.fragment,l),k=!1},d(l){l&&t(d),l&&t(u),x(m,l)}}}function _3(R){let d,_,u,m,k;return{c(){d=a("p"),_=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),u=a("code"),m=o("Module"),k=o(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){d=r(l,"P",{});var f=i(d);_=n(f,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=r(f,"CODE",{});var E=i(u);m=n(E,"Module"),E.forEach(t),k=n(f,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),f.forEach(t)},m(l,f){b(l,d,f),e(d,_),e(d,u),e(u,m),e(d,k)},d(l){l&&t(d)}}}function b3(R){let d,_,u,m,k;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"),_=o("Example:"),u=c(),y(m.$$.fragment)},l(l){d=r(l,"P",{});var f=i(d);_=n(f,"Example:"),f.forEach(t),u=p(l),w(m.$$.fragment,l)},m(l,f){b(l,d,f),e(d,_),b(l,u,f),T(m,l,f),k=!0},p:re,i(l){k||($(m.$$.fragment,l),k=!0)},o(l){F(m.$$.fragment,l),k=!1},d(l){l&&t(d),l&&t(u),x(m,l)}}}function k3(R){let d,_,u,m,k;return{c(){d=a("p"),_=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),u=a("code"),m=o("Module"),k=o(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){d=r(l,"P",{});var f=i(d);_=n(f,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=r(f,"CODE",{});var E=i(u);m=n(E,"Module"),E.forEach(t),k=n(f,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),f.forEach(t)},m(l,f){b(l,d,f),e(d,_),e(d,u),e(u,m),e(d,k)},d(l){l&&t(d)}}}function v3(R){let d,_,u,m,k;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"),_=o("Example:"),u=c(),y(m.$$.fragment)},l(l){d=r(l,"P",{});var f=i(d);_=n(f,"Example:"),f.forEach(t),u=p(l),w(m.$$.fragment,l)},m(l,f){b(l,d,f),e(d,_),b(l,u,f),T(m,l,f),k=!0},p:re,i(l){k||($(m.$$.fragment,l),k=!0)},o(l){F(m.$$.fragment,l),k=!1},d(l){l&&t(d),l&&t(u),x(m,l)}}}function y3(R){let d,_,u,m,k,l,f,E,le,Z,N,te,oe,M,we,K,Te,ge,B,$e,pe,J,Fe,_e,U,xe,be,H,Re,ke,ee,C,P,ve,Q,Ee,ye,I,he,Me,j,ze,V,qe,ue,G,Ce,ne,D,fe,X,je,se,A,Pe,L,Ae,Le,v,z,Ue,de,Xe,Ke,q,Ye,Se,Ze,et,Be,S,Y,Je,Oe,W,He,We,Ne,Qe,ce,Ve,Mc,Mb,Vm,hr,Gm,bt,sn,zb,ur,qb,Cb,fr,jb,Pb,Ab,mr,Lb,gr,Ob,Nb,Ib,_r,Db,br,Sb,Bb,Wb,Fo,zc,Ub,Hb,kr,Qb,Kb,vr,Jb,Vb,Gb,xo,qc,Xb,Yb,yr,Zb,ek,wr,tk,ok,nk,Ro,Cc,sk,ak,Tr,rk,ik,$r,lk,dk,Xm,Fr,Ym,Kt,Eo,jc,ck,pk,xr,hk,uk,Rr,fk,mk,gk,Mo,Pc,_k,bk,Er,kk,vk,Mr,yk,wk,Tk,ss,Ac,$k,Fk,zr,xk,Rk,Ek,Lc,qr,Mk,zk,Zm,Cr,eg,Et,jr,qk,Pr,Ck,jk,Pk,zo,Oc,Ak,Lk,Ar,Ok,Nk,Lr,Ik,Dk,Sk,qo,Nc,Bk,Wk,Or,Uk,Hk,Nr,Qk,Kk,Jk,Co,Ic,Vk,Gk,Ir,Xk,Yk,Dr,Zk,ev,tv,Dc,Sr,ov,nv,tg,Br,og,Mt,Wr,sv,Ur,av,rv,iv,jo,Sc,lv,dv,Hr,cv,pv,Qr,hv,uv,fv,Po,Bc,mv,gv,Kr,_v,bv,Jr,kv,vv,yv,as,Wc,wv,Tv,Vr,$v,Fv,xv,Uc,Gr,Rv,Ev,ng,Hc,ph,Mv,sg,rs,Ao,Qc,zv,qv,Xr,Cv,jv,Yr,Pv,Av,Lv,Lo,Kc,Ov,Nv,Zr,Iv,Dv,ei,Sv,Bv,ag,an,is,hh,ti,Wv,uh,Uv,rg,Qt,oi,Hv,fo,Qv,Jc,Kv,Jv,Vc,Vv,Gv,ni,Xv,Yv,Zv,rn,ey,Gc,ty,oy,Xc,ny,sy,ay,ls,ig,ln,ds,fh,si,ry,mh,iy,lg,Ie,ai,ly,gh,dy,cy,_h,py,hy,cs,uy,ri,fy,bh,my,gy,_y,ps,by,ii,ky,Yc,vy,yy,wy,Oo,li,Ty,kh,$y,Fy,di,Zc,xy,vh,Ry,Ey,ep,My,yh,zy,qy,hs,ci,Cy,pi,jy,wh,Py,Ay,Ly,us,hi,Oy,Th,Ny,Iy,tp,ui,dg,dn,fs,$h,fi,Dy,Fh,Sy,cg,tt,mi,By,gi,Wy,xh,Uy,Hy,Qy,Rh,Ky,Jy,ms,Vy,_i,Gy,Eh,Xy,Yy,Zy,gs,ew,bi,tw,op,ow,nw,sw,np,ki,pg,cn,_s,Mh,vi,aw,zh,rw,hg,ot,yi,iw,qh,lw,dw,wi,cw,sp,pw,hw,uw,Ti,fw,$i,mw,gw,_w,Fi,bw,Ch,kw,vw,yw,pt,ww,jh,Tw,$w,Ph,Fw,xw,Ah,Rw,Ew,Lh,Mw,zw,Oh,qw,Cw,Nh,jw,Pw,Aw,bs,Lw,Ih,Ow,Nw,xi,Iw,Dw,Jt,Ri,Sw,pn,Bw,ap,Ww,Uw,Dh,Hw,Qw,Kw,ks,Jw,vs,ug,hn,ys,Sh,Ei,Vw,Bh,Gw,fg,yt,Mi,Xw,zi,Yw,Wh,Zw,eT,tT,qi,oT,rp,nT,sT,aT,Ci,rT,ji,iT,lT,dT,Vt,Pi,cT,un,pT,ip,hT,uT,Uh,fT,mT,gT,ws,_T,Ts,mg,fn,$s,Hh,Ai,bT,Qh,kT,gg,wt,Li,vT,Oi,yT,Kh,wT,TT,$T,Ni,FT,lp,xT,RT,ET,Ii,MT,Di,zT,qT,CT,zt,Si,jT,mn,PT,dp,AT,LT,Jh,OT,NT,IT,Fs,DT,xs,ST,Rs,_g,gn,Es,Vh,Bi,BT,Gh,WT,bg,Tt,Wi,UT,Xh,HT,QT,Ui,KT,cp,JT,VT,GT,Hi,XT,Qi,YT,ZT,e1,ct,Ki,t1,_n,o1,pp,n1,s1,Yh,a1,r1,i1,Ms,l1,zs,d1,qs,c1,Cs,p1,js,kg,bn,Ps,Zh,Ji,h1,eu,u1,vg,$t,Vi,f1,tu,m1,g1,Gi,_1,hp,b1,k1,v1,Xi,y1,Yi,w1,T1,$1,Gt,Zi,F1,kn,x1,up,R1,E1,ou,M1,z1,q1,As,C1,Ls,yg,vn,Os,nu,el,j1,su,P1,wg,Ft,tl,A1,au,L1,O1,ol,N1,fp,I1,D1,S1,nl,B1,sl,W1,U1,H1,qt,al,Q1,yn,K1,mp,J1,V1,ru,G1,X1,Y1,Ns,Z1,Is,e$,Ds,Tg,wn,Ss,iu,rl,t$,lu,o$,$g,xt,il,n$,Tn,s$,du,a$,r$,cu,i$,l$,d$,ll,c$,gp,p$,h$,u$,dl,f$,cl,m$,g$,_$,Ct,pl,b$,$n,k$,_p,v$,y$,pu,w$,T$,$$,Bs,F$,Ws,x$,Us,Fg,Fn,Hs,hu,hl,R$,uu,E$,xg,ht,ul,M$,fu,z$,q$,fl,C$,bp,j$,P$,A$,ml,L$,gl,O$,N$,I$,Qs,D$,Xt,_l,S$,xn,B$,kp,W$,U$,mu,H$,Q$,K$,Ks,J$,Js,Rg,Rn,Vs,gu,bl,V$,_u,G$,Eg,En,kl,X$,Yt,vl,Y$,Mn,Z$,vp,e2,t2,bu,o2,n2,s2,Gs,a2,Xs,Mg,zn,Ys,ku,yl,r2,vu,i2,zg,ut,wl,l2,Tl,d2,yu,c2,p2,h2,$l,u2,yp,f2,m2,g2,Fl,_2,xl,b2,k2,v2,Zs,y2,jt,Rl,w2,qn,T2,wp,$2,F2,wu,x2,R2,E2,ea,M2,ta,z2,oa,qg,Cn,na,Tu,El,q2,$u,C2,Cg,ft,Ml,j2,Fu,P2,A2,zl,L2,Tp,O2,N2,I2,ql,D2,Cl,S2,B2,W2,sa,U2,Pt,jl,H2,jn,Q2,$p,K2,J2,xu,V2,G2,X2,aa,Y2,ra,Z2,ia,jg,Pn,la,Ru,Pl,eF,Eu,tF,Pg,mt,Al,oF,Mu,nF,sF,Ll,aF,Fp,rF,iF,lF,Ol,dF,Nl,cF,pF,hF,da,uF,Zt,Il,fF,An,mF,xp,gF,_F,zu,bF,kF,vF,ca,yF,pa,Ag,Ln,ha,qu,Dl,wF,Cu,TF,Lg,gt,Sl,$F,ju,FF,xF,Bl,RF,Rp,EF,MF,zF,Wl,qF,Ul,CF,jF,PF,ua,AF,At,Hl,LF,On,OF,Ep,NF,IF,Pu,DF,SF,BF,fa,WF,ma,UF,ga,Og,Nn,_a,Au,Ql,HF,Lu,QF,Ng,_t,Kl,KF,In,JF,Ou,VF,GF,Nu,XF,YF,ZF,Jl,e0,Mp,t0,o0,n0,Vl,s0,Gl,a0,r0,i0,ba,l0,Lt,Xl,d0,Dn,c0,zp,p0,h0,Iu,u0,f0,m0,ka,g0,va,_0,ya,Ig,Sn,wa,Du,Yl,b0,Su,k0,Dg,nt,Zl,v0,Bu,y0,w0,ed,T0,qp,$0,F0,x0,td,R0,od,E0,M0,z0,Wu,q0,C0,mo,Uu,nd,j0,P0,Hu,sd,A0,L0,Qu,ad,O0,N0,Ku,rd,I0,D0,eo,id,S0,Bn,B0,Ju,W0,U0,Vu,H0,Q0,K0,Ta,J0,$a,Sg,Wn,Fa,Gu,ld,V0,Xu,G0,Bg,st,dd,X0,Yu,Y0,Z0,cd,ex,Cp,tx,ox,nx,pd,sx,hd,ax,rx,ix,Zu,lx,dx,go,ef,ud,cx,px,tf,fd,hx,ux,of,md,fx,mx,nf,gd,gx,_x,to,_d,bx,Un,kx,sf,vx,yx,af,wx,Tx,$x,xa,Fx,Ra,Wg,Hn,Ea,rf,bd,xx,lf,Rx,Ug,at,kd,Ex,vd,Mx,df,zx,qx,Cx,yd,jx,jp,Px,Ax,Lx,wd,Ox,Td,Nx,Ix,Dx,cf,Sx,Bx,_o,pf,$d,Wx,Ux,hf,Fd,Hx,Qx,uf,xd,Kx,Jx,ff,Rd,Vx,Gx,oo,Ed,Xx,Qn,Yx,mf,Zx,e4,gf,t4,o4,n4,Ma,s4,za,Hg,Kn,qa,_f,Md,a4,bf,r4,Qg,rt,zd,i4,kf,l4,d4,qd,c4,Pp,p4,h4,u4,Cd,f4,jd,m4,g4,_4,vf,b4,k4,bo,yf,Pd,v4,y4,wf,Ad,w4,T4,Tf,Ld,$4,F4,$f,Od,x4,R4,no,Nd,E4,Jn,M4,Ff,z4,q4,xf,C4,j4,P4,Ca,A4,ja,Kg,Vn,Pa,Rf,Id,L4,Ef,O4,Jg,it,Dd,N4,Mf,I4,D4,Sd,S4,Ap,B4,W4,U4,Bd,H4,Wd,Q4,K4,J4,zf,V4,G4,ko,qf,Ud,X4,Y4,Cf,Hd,Z4,eR,jf,Qd,tR,oR,Pf,Kd,nR,sR,so,Jd,aR,Gn,rR,Af,iR,lR,Lf,dR,cR,pR,Aa,hR,La,Vg,Xn,Oa,Of,Vd,uR,Nf,fR,Gg,lt,Gd,mR,If,gR,_R,Xd,bR,Lp,kR,vR,yR,Yd,wR,Zd,TR,$R,FR,Df,xR,RR,vo,Sf,ec,ER,MR,Bf,tc,zR,qR,Wf,oc,CR,jR,Uf,nc,PR,AR,ao,sc,LR,Yn,OR,Hf,NR,IR,Qf,DR,SR,BR,Na,WR,Ia,Xg,Zn,Da,Kf,ac,UR,Jf,HR,Yg,dt,rc,QR,es,KR,Vf,JR,VR,Gf,GR,XR,YR,ic,ZR,Op,eE,tE,oE,lc,nE,dc,sE,aE,rE,Xf,iE,lE,yo,Yf,cc,dE,cE,Zf,pc,pE,hE,em,hc,uE,fE,tm,uc,mE,gE,ro,fc,_E,ts,bE,om,kE,vE,nm,yE,wE,TE,Sa,$E,Ba,Zg;return l=new De({}),M=new De({}),We=new De({}),hr=new Eb({props:{pipeline:"text-classification"}}),Fr=new Eb({props:{pipeline:"token-classification"}}),Cr=new Eb({props:{pipeline:"fill-mask"}}),Br=new Eb({props:{pipeline:"question-answering"}}),ti=new De({}),oi=new O({props:{name:"class transformers.RobertaConfig",anchor:"transformers.RobertaConfig",parameters:[{name:"vocab_size",val:" = 30522"},{name:"hidden_size",val:" = 768"},{name:"num_hidden_layers",val:" = 12"},{name:"num_attention_heads",val:" = 12"},{name:"intermediate_size",val:" = 3072"},{name:"hidden_act",val:" = 'gelu'"},{name:"hidden_dropout_prob",val:" = 0.1"},{name:"attention_probs_dropout_prob",val:" = 0.1"},{name:"max_position_embeddings",val:" = 512"},{name:"type_vocab_size",val:" = 2"},{name:"initializer_range",val:" = 0.02"},{name:"layer_norm_eps",val:" = 1e-12"},{name:"pad_token_id",val:" = 1"},{name:"bos_token_id",val:" = 0"},{name:"eos_token_id",val:" = 2"},{name:"position_embedding_type",val:" = 'absolute'"},{name:"use_cache",val:" = True"},{name:"classifier_dropout",val:" = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.RobertaConfig.vocab_size",description:`<strong>vocab_size</strong> (<code>int</code>, <em>optional</em>, defaults to 30522) &#x2014;
Vocabulary size of the RoBERTa model. Defines the number of different tokens that can be represented by the
<code>inputs_ids</code> passed when calling <a href="/docs/transformers/v4.25.1/en/model_doc/roberta#transformers.RobertaModel">RobertaModel</a> or <a href="/docs/transformers/v4.25.1/en/model_doc/roberta#transformers.TFRobertaModel">TFRobertaModel</a>.`,name:"vocab_size"},{anchor:"transformers.RobertaConfig.hidden_size",description:`<strong>hidden_size</strong> (<code>int</code>, <em>optional</em>, defaults to 768) &#x2014;
Dimensionality of the encoder layers and the pooler layer.`,name:"hidden_size"},{anchor:"transformers.RobertaConfig.num_hidden_layers",description:`<strong>num_hidden_layers</strong> (<code>int</code>, <em>optional</em>, defaults to 12) &#x2014;
Number of hidden layers in the Transformer encoder.`,name:"num_hidden_layers"},{anchor:"transformers.RobertaConfig.num_attention_heads",description:`<strong>num_attention_heads</strong> (<code>int</code>, <em>optional</em>, defaults to 12) &#x2014;
Number of attention heads for each attention layer in the Transformer encoder.`,name:"num_attention_heads"},{anchor:"transformers.RobertaConfig.intermediate_size",description:`<strong>intermediate_size</strong> (<code>int</code>, <em>optional</em>, defaults to 3072) &#x2014;
Dimensionality of the &#x201C;intermediate&#x201D; (often named feed-forward) layer in the Transformer encoder.`,name:"intermediate_size"},{anchor:"transformers.RobertaConfig.hidden_act",description:`<strong>hidden_act</strong> (<code>str</code> or <code>Callable</code>, <em>optional</em>, defaults to <code>&quot;gelu&quot;</code>) &#x2014;
The non-linear activation function (function or string) in the encoder and pooler. If string, <code>&quot;gelu&quot;</code>,
<code>&quot;relu&quot;</code>, <code>&quot;silu&quot;</code> and <code>&quot;gelu_new&quot;</code> are supported.`,name:"hidden_act"},{anchor:"transformers.RobertaConfig.hidden_dropout_prob",description:`<strong>hidden_dropout_prob</strong> (<code>float</code>, <em>optional</em>, defaults to 0.1) &#x2014;
The dropout probability for all fully connected layers in the embeddings, encoder, and pooler.`,name:"hidden_dropout_prob"},{anchor:"transformers.RobertaConfig.attention_probs_dropout_prob",description:`<strong>attention_probs_dropout_prob</strong> (<code>float</code>, <em>optional</em>, defaults to 0.1) &#x2014;
The dropout ratio for the attention probabilities.`,name:"attention_probs_dropout_prob"},{anchor:"transformers.RobertaConfig.max_position_embeddings",description:`<strong>max_position_embeddings</strong> (<code>int</code>, <em>optional</em>, defaults to 512) &#x2014;
The maximum sequence length that this model might ever be used with. Typically set this to something large
just in case (e.g., 512 or 1024 or 2048).`,name:"max_position_embeddings"},{anchor:"transformers.RobertaConfig.type_vocab_size",description:`<strong>type_vocab_size</strong> (<code>int</code>, <em>optional</em>, defaults to 2) &#x2014;
The vocabulary size of the <code>token_type_ids</code> passed when calling <a href="/docs/transformers/v4.25.1/en/model_doc/roberta#transformers.RobertaModel">RobertaModel</a> or <a href="/docs/transformers/v4.25.1/en/model_doc/roberta#transformers.TFRobertaModel">TFRobertaModel</a>.`,name:"type_vocab_size"},{anchor:"transformers.RobertaConfig.initializer_range",description:`<strong>initializer_range</strong> (<code>float</code>, <em>optional</em>, defaults to 0.02) &#x2014;
The standard deviation of the truncated_normal_initializer for initializing all weight matrices.`,name:"initializer_range"},{anchor:"transformers.RobertaConfig.layer_norm_eps",description:`<strong>layer_norm_eps</strong> (<code>float</code>, <em>optional</em>, defaults to 1e-12) &#x2014;
The epsilon used by the layer normalization layers.`,name:"layer_norm_eps"},{anchor:"transformers.RobertaConfig.position_embedding_type",description:`<strong>position_embedding_type</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;absolute&quot;</code>) &#x2014;
Type of position embedding. Choose one of <code>&quot;absolute&quot;</code>, <code>&quot;relative_key&quot;</code>, <code>&quot;relative_key_query&quot;</code>. For
positional embeddings use <code>&quot;absolute&quot;</code>. For more information on <code>&quot;relative_key&quot;</code>, please refer to
<a href="https://arxiv.org/abs/1803.02155" rel="nofollow">Self-Attention with Relative Position Representations (Shaw et al.)</a>.
For more information on <code>&quot;relative_key_query&quot;</code>, please refer to <em>Method 4</em> in <a href="https://arxiv.org/abs/2009.13658" rel="nofollow">Improve Transformer Models
with Better Relative Position Embeddings (Huang et al.)</a>.`,name:"position_embedding_type"},{anchor:"transformers.RobertaConfig.use_cache",description:`<strong>use_cache</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not the model should return the last key/values attentions (not used by all models). Only
relevant if <code>config.is_decoder=True</code>.`,name:"use_cache"},{anchor:"transformers.RobertaConfig.classifier_dropout",description:`<strong>classifier_dropout</strong> (<code>float</code>, <em>optional</em>) &#x2014;
The dropout ratio for the classification head.`,name:"classifier_dropout"}],source:"https://github.com/huggingface/transformers/blob/v4.25.1/src/transformers/models/roberta/configuration_roberta.py#L37"}}),ls=new ae({props:{anchor:"transformers.RobertaConfig.example",$$slots:{default:[hj]},$$scope:{ctx:R}}}),si=new De({}),ai=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/v4.25.1/src/transformers/models/roberta/tokenization_roberta.py#L107"}}),cs=new ae({props:{anchor:"transformers.RobertaTokenizer.example",$$slots:{default:[uj]},$$scope:{ctx:R}}}),ps=new me({props:{$$slots:{default:[fj]},$$scope:{ctx:R}}}),li=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/v4.25.1/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>
`}}),ci=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/v4.25.1/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>
`}}),hi=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/v4.25.1/src/transformers/models/roberta/tokenization_roberta.py#L396",returnDescription:`
<p>List of zeros.</p>
`,returnType:`
<p><code>List[int]</code></p>
`}}),ui=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/v4.25.1/src/transformers/models/roberta/tokenization_roberta.py#L315"}}),fi=new De({}),mi=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/v4.25.1/src/transformers/models/roberta/tokenization_roberta_fast.py#L76"}}),ms=new ae({props:{anchor:"transformers.RobertaTokenizerFast.example",$$slots:{default:[mj]},$$scope:{ctx:R}}}),gs=new me({props:{$$slots:{default:[gj]},$$scope:{ctx:R}}}),ki=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/v4.25.1/src/transformers/models/roberta/tokenization_roberta_fast.py#L279"}}),vi=new De({}),yi=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/v4.25.1/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/v4.25.1/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.25.1/src/transformers/models/roberta/modeling_roberta.py#L698"}}),Ri=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/v4.25.1/en/model_doc/roberta#transformers.RobertaTokenizer">RobertaTokenizer</a>. See <a href="/docs/transformers/v4.25.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.25.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.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/v4.25.1/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/v4.25.1/src/transformers/models/roberta/modeling_roberta.py#L743",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.25.1/en/main_classes/output#transformers.modeling_outputs.BaseModelOutputWithPoolingAndCrossAttentions"
>transformers.modeling_outputs.BaseModelOutputWithPoolingAndCrossAttentions</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.25.1/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/v4.25.1/en/main_classes/output#transformers.modeling_outputs.BaseModelOutputWithPoolingAndCrossAttentions"
>transformers.modeling_outputs.BaseModelOutputWithPoolingAndCrossAttentions</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),ks=new me({props:{$$slots:{default:[_j]},$$scope:{ctx:R}}}),vs=new ae({props:{anchor:"transformers.RobertaModel.forward.example",$$slots:{default:[bj]},$$scope:{ctx:R}}}),Ei=new De({}),Mi=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/v4.25.1/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/v4.25.1/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.25.1/src/transformers/models/roberta/modeling_roberta.py#L884"}}),Pi=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/v4.25.1/en/model_doc/roberta#transformers.RobertaTokenizer">RobertaTokenizer</a>. See <a href="/docs/transformers/v4.25.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.25.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.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/v4.25.1/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/v4.25.1/src/transformers/models/roberta/modeling_roberta.py#L910",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.25.1/en/main_classes/output#transformers.modeling_outputs.CausalLMOutputWithCrossAttentions"
>transformers.modeling_outputs.CausalLMOutputWithCrossAttentions</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.25.1/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/v4.25.1/en/main_classes/output#transformers.modeling_outputs.CausalLMOutputWithCrossAttentions"
>transformers.modeling_outputs.CausalLMOutputWithCrossAttentions</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),ws=new me({props:{$$slots:{default:[kj]},$$scope:{ctx:R}}}),Ts=new ae({props:{anchor:"transformers.RobertaForCausalLM.forward.example",$$slots:{default:[vj]},$$scope:{ctx:R}}}),Ai=new De({}),Li=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/v4.25.1/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/v4.25.1/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.25.1/src/transformers/models/roberta/modeling_roberta.py#L1036"}}),Si=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/v4.25.1/en/model_doc/roberta#transformers.RobertaTokenizer">RobertaTokenizer</a>. See <a href="/docs/transformers/v4.25.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.25.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.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/v4.25.1/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/v4.25.1/src/transformers/models/roberta/modeling_roberta.py#L1065",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.25.1/en/main_classes/output#transformers.modeling_outputs.MaskedLMOutput"
>transformers.modeling_outputs.MaskedLMOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.25.1/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/v4.25.1/en/main_classes/output#transformers.modeling_outputs.MaskedLMOutput"
>transformers.modeling_outputs.MaskedLMOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Fs=new me({props:{$$slots:{default:[yj]},$$scope:{ctx:R}}}),xs=new ae({props:{anchor:"transformers.RobertaForMaskedLM.forward.example",$$slots:{default:[wj]},$$scope:{ctx:R}}}),Rs=new ae({props:{anchor:"transformers.RobertaForMaskedLM.forward.example-2",$$slots:{default:[Tj]},$$scope:{ctx:R}}}),Bi=new De({}),Wi=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/v4.25.1/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/v4.25.1/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.25.1/src/transformers/models/roberta/modeling_roberta.py#L1171"}}),Ki=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/v4.25.1/en/model_doc/roberta#transformers.RobertaTokenizer">RobertaTokenizer</a>. See <a href="/docs/transformers/v4.25.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.25.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.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/v4.25.1/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/v4.25.1/src/transformers/models/roberta/modeling_roberta.py#L1185",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.25.1/en/main_classes/output#transformers.modeling_outputs.SequenceClassifierOutput"
>transformers.modeling_outputs.SequenceClassifierOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.25.1/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/v4.25.1/en/main_classes/output#transformers.modeling_outputs.SequenceClassifierOutput"
>transformers.modeling_outputs.SequenceClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Ms=new me({props:{$$slots:{default:[$j]},$$scope:{ctx:R}}}),zs=new ae({props:{anchor:"transformers.RobertaForSequenceClassification.forward.example",$$slots:{default:[Fj]},$$scope:{ctx:R}}}),qs=new ae({props:{anchor:"transformers.RobertaForSequenceClassification.forward.example-2",$$slots:{default:[xj]},$$scope:{ctx:R}}}),Cs=new ae({props:{anchor:"transformers.RobertaForSequenceClassification.forward.example-3",$$slots:{default:[Rj]},$$scope:{ctx:R}}}),js=new ae({props:{anchor:"transformers.RobertaForSequenceClassification.forward.example-4",$$slots:{default:[Ej]},$$scope:{ctx:R}}}),Ji=new De({}),Vi=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/v4.25.1/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/v4.25.1/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.25.1/src/transformers/models/roberta/modeling_roberta.py#L1271"}}),Zi=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/v4.25.1/en/model_doc/roberta#transformers.RobertaTokenizer">RobertaTokenizer</a>. See <a href="/docs/transformers/v4.25.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.25.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.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/v4.25.1/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/v4.25.1/src/transformers/models/roberta/modeling_roberta.py#L1284",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.25.1/en/main_classes/output#transformers.modeling_outputs.MultipleChoiceModelOutput"
>transformers.modeling_outputs.MultipleChoiceModelOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.25.1/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/v4.25.1/en/main_classes/output#transformers.modeling_outputs.MultipleChoiceModelOutput"
>transformers.modeling_outputs.MultipleChoiceModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),As=new me({props:{$$slots:{default:[Mj]},$$scope:{ctx:R}}}),Ls=new ae({props:{anchor:"transformers.RobertaForMultipleChoice.forward.example",$$slots:{default:[zj]},$$scope:{ctx:R}}}),el=new De({}),tl=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/v4.25.1/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/v4.25.1/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.25.1/src/transformers/models/roberta/modeling_roberta.py#L1364"}}),al=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/v4.25.1/en/model_doc/roberta#transformers.RobertaTokenizer">RobertaTokenizer</a>. See <a href="/docs/transformers/v4.25.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.25.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.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/v4.25.1/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/v4.25.1/src/transformers/models/roberta/modeling_roberta.py#L1382",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.25.1/en/main_classes/output#transformers.modeling_outputs.TokenClassifierOutput"
>transformers.modeling_outputs.TokenClassifierOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.25.1/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/v4.25.1/en/main_classes/output#transformers.modeling_outputs.TokenClassifierOutput"
>transformers.modeling_outputs.TokenClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Ns=new me({props:{$$slots:{default:[qj]},$$scope:{ctx:R}}}),Is=new ae({props:{anchor:"transformers.RobertaForTokenClassification.forward.example",$$slots:{default:[Cj]},$$scope:{ctx:R}}}),Ds=new ae({props:{anchor:"transformers.RobertaForTokenClassification.forward.example-2",$$slots:{default:[jj]},$$scope:{ctx:R}}}),rl=new De({}),il=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/v4.25.1/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/v4.25.1/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.25.1/src/transformers/models/roberta/modeling_roberta.py#L1473"}}),pl=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/v4.25.1/en/model_doc/roberta#transformers.RobertaTokenizer">RobertaTokenizer</a>. See <a href="/docs/transformers/v4.25.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.25.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.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/v4.25.1/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/v4.25.1/src/transformers/models/roberta/modeling_roberta.py#L1487",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.25.1/en/main_classes/output#transformers.modeling_outputs.QuestionAnsweringModelOutput"
>transformers.modeling_outputs.QuestionAnsweringModelOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.25.1/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/v4.25.1/en/main_classes/output#transformers.modeling_outputs.QuestionAnsweringModelOutput"
>transformers.modeling_outputs.QuestionAnsweringModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Bs=new me({props:{$$slots:{default:[Pj]},$$scope:{ctx:R}}}),Ws=new ae({props:{anchor:"transformers.RobertaForQuestionAnswering.forward.example",$$slots:{default:[Aj]},$$scope:{ctx:R}}}),Us=new ae({props:{anchor:"transformers.RobertaForQuestionAnswering.forward.example-2",$$slots:{default:[Lj]},$$scope:{ctx:R}}}),hl=new De({}),ul=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/v4.25.1/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/v4.25.1/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.25.1/src/transformers/models/roberta/modeling_tf_roberta.py#L924"}}),Qs=new me({props:{$$slots:{default:[Oj]},$$scope:{ctx:R}}}),_l=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/v4.25.1/en/model_doc/roberta#transformers.RobertaTokenizer">RobertaTokenizer</a>. See <a href="/docs/transformers/v4.25.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/v4.25.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.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/v4.25.1/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.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/v4.25.1/src/transformers/models/roberta/modeling_tf_roberta.py#L929",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.25.1/en/main_classes/output#transformers.modeling_tf_outputs.TFBaseModelOutputWithPoolingAndCrossAttentions"
>transformers.modeling_tf_outputs.TFBaseModelOutputWithPoolingAndCrossAttentions</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/v4.25.1/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/v4.25.1/en/main_classes/output#transformers.modeling_tf_outputs.TFBaseModelOutputWithPoolingAndCrossAttentions"
>transformers.modeling_tf_outputs.TFBaseModelOutputWithPoolingAndCrossAttentions</a> or <code>tuple(tf.Tensor)</code></p>
`}}),Ks=new me({props:{$$slots:{default:[Nj]},$$scope:{ctx:R}}}),Js=new ae({props:{anchor:"transformers.TFRobertaModel.call.example",$$slots:{default:[Ij]},$$scope:{ctx:R}}}),bl=new De({}),kl=new O({props:{name:"class transformers.TFRobertaForCausalLM",anchor:"transformers.TFRobertaForCausalLM",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/v4.25.1/src/transformers/models/roberta/modeling_tf_roberta.py#L1153"}}),vl=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/v4.25.1/en/model_doc/roberta#transformers.RobertaTokenizer">RobertaTokenizer</a>. See <a href="/docs/transformers/v4.25.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/v4.25.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.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/v4.25.1/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.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/v4.25.1/src/transformers/models/roberta/modeling_tf_roberta.py#L1186",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.25.1/en/main_classes/output#transformers.modeling_tf_outputs.TFCausalLMOutputWithCrossAttentions"
>transformers.modeling_tf_outputs.TFCausalLMOutputWithCrossAttentions</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/v4.25.1/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/v4.25.1/en/main_classes/output#transformers.modeling_tf_outputs.TFCausalLMOutputWithCrossAttentions"
>transformers.modeling_tf_outputs.TFCausalLMOutputWithCrossAttentions</a> or <code>tuple(tf.Tensor)</code></p>
`}}),Gs=new me({props:{$$slots:{default:[Dj]},$$scope:{ctx:R}}}),Xs=new ae({props:{anchor:"transformers.TFRobertaForCausalLM.call.example",$$slots:{default:[Sj]},$$scope:{ctx:R}}}),yl=new De({}),wl=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/v4.25.1/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/v4.25.1/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.25.1/src/transformers/models/roberta/modeling_tf_roberta.py#L1068"}}),Zs=new me({props:{$$slots:{default:[Bj]},$$scope:{ctx:R}}}),Rl=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/v4.25.1/en/model_doc/roberta#transformers.RobertaTokenizer">RobertaTokenizer</a>. See <a href="/docs/transformers/v4.25.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/v4.25.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.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/v4.25.1/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.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/v4.25.1/src/transformers/models/roberta/modeling_tf_roberta.py#L1085",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.25.1/en/main_classes/output#transformers.modeling_tf_outputs.TFMaskedLMOutput"
>transformers.modeling_tf_outputs.TFMaskedLMOutput</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/v4.25.1/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/v4.25.1/en/main_classes/output#transformers.modeling_tf_outputs.TFMaskedLMOutput"
>transformers.modeling_tf_outputs.TFMaskedLMOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),ea=new me({props:{$$slots:{default:[Wj]},$$scope:{ctx:R}}}),ta=new ae({props:{anchor:"transformers.TFRobertaForMaskedLM.call.example",$$slots:{default:[Uj]},$$scope:{ctx:R}}}),oa=new ae({props:{anchor:"transformers.TFRobertaForMaskedLM.call.example-2",$$slots:{default:[Hj]},$$scope:{ctx:R}}}),El=new De({}),Ml=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/v4.25.1/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/v4.25.1/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.25.1/src/transformers/models/roberta/modeling_tf_roberta.py#L1333"}}),sa=new me({props:{$$slots:{default:[Qj]},$$scope:{ctx:R}}}),jl=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/v4.25.1/en/model_doc/roberta#transformers.RobertaTokenizer">RobertaTokenizer</a>. See <a href="/docs/transformers/v4.25.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/v4.25.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.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/v4.25.1/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.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/v4.25.1/src/transformers/models/roberta/modeling_tf_roberta.py#L1344",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.25.1/en/main_classes/output#transformers.modeling_tf_outputs.TFSequenceClassifierOutput"
>transformers.modeling_tf_outputs.TFSequenceClassifierOutput</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/v4.25.1/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/v4.25.1/en/main_classes/output#transformers.modeling_tf_outputs.TFSequenceClassifierOutput"
>transformers.modeling_tf_outputs.TFSequenceClassifierOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),aa=new me({props:{$$slots:{default:[Kj]},$$scope:{ctx:R}}}),ra=new ae({props:{anchor:"transformers.TFRobertaForSequenceClassification.call.example",$$slots:{default:[Jj]},$$scope:{ctx:R}}}),ia=new ae({props:{anchor:"transformers.TFRobertaForSequenceClassification.call.example-2",$$slots:{default:[Vj]},$$scope:{ctx:R}}}),Pl=new De({}),Al=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/v4.25.1/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/v4.25.1/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.25.1/src/transformers/models/roberta/modeling_tf_roberta.py#L1417"}}),da=new me({props:{$$slots:{default:[Gj]},$$scope:{ctx:R}}}),Il=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/v4.25.1/en/model_doc/roberta#transformers.RobertaTokenizer">RobertaTokenizer</a>. See <a href="/docs/transformers/v4.25.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/v4.25.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.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/v4.25.1/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.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/v4.25.1/src/transformers/models/roberta/modeling_tf_roberta.py#L1441",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.25.1/en/main_classes/output#transformers.modeling_tf_outputs.TFMultipleChoiceModelOutput"
>transformers.modeling_tf_outputs.TFMultipleChoiceModelOutput</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/v4.25.1/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/v4.25.1/en/main_classes/output#transformers.modeling_tf_outputs.TFMultipleChoiceModelOutput"
>transformers.modeling_tf_outputs.TFMultipleChoiceModelOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),ca=new me({props:{$$slots:{default:[Xj]},$$scope:{ctx:R}}}),pa=new ae({props:{anchor:"transformers.TFRobertaForMultipleChoice.call.example",$$slots:{default:[Yj]},$$scope:{ctx:R}}}),Dl=new De({}),Sl=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/v4.25.1/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/v4.25.1/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.25.1/src/transformers/models/roberta/modeling_tf_roberta.py#L1538"}}),ua=new me({props:{$$slots:{default:[Zj]},$$scope:{ctx:R}}}),Hl=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/v4.25.1/en/model_doc/roberta#transformers.RobertaTokenizer">RobertaTokenizer</a>. See <a href="/docs/transformers/v4.25.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/v4.25.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.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/v4.25.1/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.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/v4.25.1/src/transformers/models/roberta/modeling_tf_roberta.py#L1556",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.25.1/en/main_classes/output#transformers.modeling_tf_outputs.TFTokenClassifierOutput"
>transformers.modeling_tf_outputs.TFTokenClassifierOutput</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/v4.25.1/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/v4.25.1/en/main_classes/output#transformers.modeling_tf_outputs.TFTokenClassifierOutput"
>transformers.modeling_tf_outputs.TFTokenClassifierOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),fa=new me({props:{$$slots:{default:[e3]},$$scope:{ctx:R}}}),ma=new ae({props:{anchor:"transformers.TFRobertaForTokenClassification.call.example",$$slots:{default:[t3]},$$scope:{ctx:R}}}),ga=new ae({props:{anchor:"transformers.TFRobertaForTokenClassification.call.example-2",$$slots:{default:[o3]},$$scope:{ctx:R}}}),Ql=new De({}),Kl=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/v4.25.1/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/v4.25.1/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.25.1/src/transformers/models/roberta/modeling_tf_roberta.py#L1629"}}),ba=new me({props:{$$slots:{default:[n3]},$$scope:{ctx:R}}}),Xl=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/v4.25.1/en/model_doc/roberta#transformers.RobertaTokenizer">RobertaTokenizer</a>. See <a href="/docs/transformers/v4.25.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/v4.25.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.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/v4.25.1/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.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/v4.25.1/src/transformers/models/roberta/modeling_tf_roberta.py#L1642",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.25.1/en/main_classes/output#transformers.modeling_tf_outputs.TFQuestionAnsweringModelOutput"
>transformers.modeling_tf_outputs.TFQuestionAnsweringModelOutput</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/v4.25.1/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/v4.25.1/en/main_classes/output#transformers.modeling_tf_outputs.TFQuestionAnsweringModelOutput"
>transformers.modeling_tf_outputs.TFQuestionAnsweringModelOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),ka=new me({props:{$$slots:{default:[s3]},$$scope:{ctx:R}}}),va=new ae({props:{anchor:"transformers.TFRobertaForQuestionAnswering.call.example",$$slots:{default:[a3]},$$scope:{ctx:R}}}),ya=new ae({props:{anchor:"transformers.TFRobertaForQuestionAnswering.call.example-2",$$slots:{default:[r3]},$$scope:{ctx:R}}}),Yl=new De({}),Zl=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/v4.25.1/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/v4.25.1/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/v4.25.1/src/transformers/models/roberta/modeling_flax_roberta.py#L992"}}),id=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/v4.25.1/en/model_doc/bert#transformers.BertTokenizer">BertTokenizer</a>. See <a href="/docs/transformers/v4.25.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.25.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.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/v4.25.1/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.25.1/src/transformers/models/roberta/modeling_flax_roberta.py#L818",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.25.1/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/v4.25.1/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/v4.25.1/en/main_classes/output#transformers.modeling_flax_outputs.FlaxBaseModelOutputWithPooling"
>transformers.modeling_flax_outputs.FlaxBaseModelOutputWithPooling</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Ta=new me({props:{$$slots:{default:[i3]},$$scope:{ctx:R}}}),$a=new ae({props:{anchor:"transformers.FlaxRobertaModel.__call__.example",$$slots:{default:[l3]},$$scope:{ctx:R}}}),ld=new De({}),dd=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/v4.25.1/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/v4.25.1/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/v4.25.1/src/transformers/models/roberta/modeling_flax_roberta.py#L1461"}}),_d=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/v4.25.1/en/model_doc/bert#transformers.BertTokenizer">BertTokenizer</a>. See <a href="/docs/transformers/v4.25.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.25.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.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/v4.25.1/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.25.1/src/transformers/models/roberta/modeling_flax_roberta.py#L818",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.25.1/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/v4.25.1/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/v4.25.1/en/main_classes/output#transformers.modeling_flax_outputs.FlaxCausalLMOutputWithCrossAttentions"
>transformers.modeling_flax_outputs.FlaxCausalLMOutputWithCrossAttentions</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),xa=new me({props:{$$slots:{default:[d3]},$$scope:{ctx:R}}}),Ra=new ae({props:{anchor:"transformers.FlaxRobertaForCausalLM.__call__.example",$$slots:{default:[c3]},$$scope:{ctx:R}}}),bd=new De({}),kd=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/v4.25.1/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/v4.25.1/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/v4.25.1/src/transformers/models/roberta/modeling_flax_roberta.py#L1060"}}),Ed=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/v4.25.1/en/model_doc/bert#transformers.BertTokenizer">BertTokenizer</a>. See <a href="/docs/transformers/v4.25.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.25.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.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/v4.25.1/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.25.1/src/transformers/models/roberta/modeling_flax_roberta.py#L818",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.25.1/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/v4.25.1/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/v4.25.1/en/main_classes/output#transformers.modeling_flax_outputs.FlaxBaseModelOutputWithPooling"
>transformers.modeling_flax_outputs.FlaxBaseModelOutputWithPooling</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Ma=new me({props:{$$slots:{default:[p3]},$$scope:{ctx:R}}}),za=new ae({props:{anchor:"transformers.FlaxRobertaForMaskedLM.__call__.example",$$slots:{default:[h3]},$$scope:{ctx:R}}}),Md=new De({}),zd=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/v4.25.1/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/v4.25.1/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/v4.25.1/src/transformers/models/roberta/modeling_flax_roberta.py#L1133"}}),Nd=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/v4.25.1/en/model_doc/bert#transformers.BertTokenizer">BertTokenizer</a>. See <a href="/docs/transformers/v4.25.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.25.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.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/v4.25.1/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.25.1/src/transformers/models/roberta/modeling_flax_roberta.py#L818",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.25.1/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/v4.25.1/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/v4.25.1/en/main_classes/output#transformers.modeling_flax_outputs.FlaxSequenceClassifierOutput"
>transformers.modeling_flax_outputs.FlaxSequenceClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Ca=new me({props:{$$slots:{default:[u3]},$$scope:{ctx:R}}}),ja=new ae({props:{anchor:"transformers.FlaxRobertaForSequenceClassification.__call__.example",$$slots:{default:[f3]},$$scope:{ctx:R}}}),Id=new De({}),Dd=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/v4.25.1/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/v4.25.1/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/v4.25.1/src/transformers/models/roberta/modeling_flax_roberta.py#L1215"}}),Jd=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/v4.25.1/en/model_doc/bert#transformers.BertTokenizer">BertTokenizer</a>. See <a href="/docs/transformers/v4.25.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.25.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.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/v4.25.1/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.25.1/src/transformers/models/roberta/modeling_flax_roberta.py#L818",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.25.1/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/v4.25.1/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/v4.25.1/en/main_classes/output#transformers.modeling_flax_outputs.FlaxMultipleChoiceModelOutput"
>transformers.modeling_flax_outputs.FlaxMultipleChoiceModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Aa=new me({props:{$$slots:{default:[m3]},$$scope:{ctx:R}}}),La=new ae({props:{anchor:"transformers.FlaxRobertaForMultipleChoice.__call__.example",$$slots:{default:[g3]},$$scope:{ctx:R}}}),Vd=new De({}),Gd=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/v4.25.1/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/v4.25.1/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/v4.25.1/src/transformers/models/roberta/modeling_flax_roberta.py#L1298"}}),sc=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/v4.25.1/en/model_doc/bert#transformers.BertTokenizer">BertTokenizer</a>. See <a href="/docs/transformers/v4.25.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.25.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.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/v4.25.1/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.25.1/src/transformers/models/roberta/modeling_flax_roberta.py#L818",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.25.1/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/v4.25.1/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/v4.25.1/en/main_classes/output#transformers.modeling_flax_outputs.FlaxTokenClassifierOutput"
>transformers.modeling_flax_outputs.FlaxTokenClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Na=new me({props:{$$slots:{default:[_3]},$$scope:{ctx:R}}}),Ia=new ae({props:{anchor:"transformers.FlaxRobertaForTokenClassification.__call__.example",$$slots:{default:[b3]},$$scope:{ctx:R}}}),ac=new De({}),rc=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/v4.25.1/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/v4.25.1/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/v4.25.1/src/transformers/models/roberta/modeling_flax_roberta.py#L1376"}}),fc=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/v4.25.1/en/model_doc/bert#transformers.BertTokenizer">BertTokenizer</a>. See <a href="/docs/transformers/v4.25.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.25.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.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/v4.25.1/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.25.1/src/transformers/models/roberta/modeling_flax_roberta.py#L818",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.25.1/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/v4.25.1/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/v4.25.1/en/main_classes/output#transformers.modeling_flax_outputs.FlaxQuestionAnsweringModelOutput"
>transformers.modeling_flax_outputs.FlaxQuestionAnsweringModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Sa=new me({props:{$$slots:{default:[k3]},$$scope:{ctx:R}}}),Ba=new ae({props:{anchor:"transformers.FlaxRobertaForQuestionAnswering.__call__.example",$$slots:{default:[v3]},$$scope:{ctx:R}}}),{c(){d=a("meta"),_=c(),u=a("h1"),m=a("a"),k=a("span"),y(l.$$.fragment),f=c(),E=a("span"),le=o("RoBERTa"),Z=c(),N=a("h2"),te=a("a"),oe=a("span"),y(M.$$.fragment),we=c(),K=a("span"),Te=o("Overview"),ge=c(),B=a("p"),$e=o("The RoBERTa model was proposed in "),pe=a("a"),J=o("RoBERTa: A Robustly Optimized BERT Pretraining Approach"),Fe=o(` by Yinhan Liu, Myle Ott, Naman Goyal, Jingfei Du, Mandar Joshi, Danqi Chen, Omer
Levy, Mike Lewis, Luke Zettlemoyer, Veselin Stoyanov. It is based on Google\u2019s BERT model released in 2018.`),_e=c(),U=a("p"),xe=o(`It builds on BERT and modifies key hyperparameters, removing the next-sentence pretraining objective and training with
much larger mini-batches and learning rates.`),be=c(),H=a("p"),Re=o("The abstract from the paper is the following:"),ke=c(),ee=a("p"),C=a("em"),P=o(`Language model pretraining has led to significant performance gains but careful comparison between different
approaches is challenging. Training is computationally expensive, often done on private datasets of different sizes,
and, as we will show, hyperparameter choices have significant impact on the final results. We present a replication
study of BERT pretraining (Devlin et al., 2019) that carefully measures the impact of many key hyperparameters and
training data size. We find that BERT was significantly undertrained, and can match or exceed the performance of every
model published after it. Our best model achieves state-of-the-art results on GLUE, RACE and SQuAD. These results
highlight the importance of previously overlooked design choices, and raise questions about the source of recently
reported improvements. We release our models and code.`),ve=c(),Q=a("p"),Ee=o("Tips:"),ye=c(),I=a("ul"),he=a("li"),Me=o("This implementation is the same as "),j=a("a"),ze=o("BertModel"),V=o(` with a tiny embeddings tweak as well as a setup
for Roberta pretrained models.`),qe=c(),ue=a("li"),G=o(`RoBERTa has the same architecture as BERT, but uses a byte-level BPE as a tokenizer (same as GPT-2) and uses a
different pretraining scheme.`),Ce=c(),ne=a("li"),D=o("RoBERTa doesn\u2019t have "),fe=a("code"),X=o("token_type_ids"),je=o(`, you don\u2019t need to indicate which token belongs to which segment. Just
separate your segments with the separation token `),se=a("code"),A=o("tokenizer.sep_token"),Pe=o(" (or "),L=a("code"),Ae=o("</s>"),Le=o(")"),v=c(),z=a("li"),Ue=a("a"),de=o("CamemBERT"),Xe=o(" is a wrapper around RoBERTa. Refer to this page for usage examples."),Ke=c(),q=a("p"),Ye=o("This model was contributed by "),Se=a("a"),Ze=o("julien-c"),et=o(". The original code can be found "),Be=a("a"),S=o("here"),Y=o("."),Je=c(),Oe=a("h2"),W=a("a"),He=a("span"),y(We.$$.fragment),Ne=c(),Qe=a("span"),ce=o("Resources"),Ve=c(),Mc=a("p"),Mb=o("A list of official Hugging Face and community (indicated by \u{1F30E}) resources to help you get started with RoBERTa. If you\u2019re interested in submitting a resource to be included here, please feel free to open a Pull Request and we\u2019ll review it! The resource should ideally demonstrate something new instead of duplicating an existing resource."),Vm=c(),y(hr.$$.fragment),Gm=c(),bt=a("ul"),sn=a("li"),zb=o("A blog on "),ur=a("a"),qb=o("Getting Started with Sentiment Analysis on Twitter"),Cb=o(" using RoBERTa and the "),fr=a("a"),jb=o("Inference API"),Pb=o("."),Ab=c(),mr=a("li"),Lb=o("A blog on "),gr=a("a"),Ob=o("Opinion Classification with Kili and Hugging Face AutoTrain"),Nb=o(" using RoBERTa."),Ib=c(),_r=a("li"),Db=o("A notebook on how to "),br=a("a"),Sb=o("finetune RoBERTa for sentiment analysis"),Bb=o(". \u{1F30E}"),Wb=c(),Fo=a("li"),zc=a("a"),Ub=o("RobertaForSequenceClassification"),Hb=o(" is supported by this "),kr=a("a"),Qb=o("example script"),Kb=o(" and "),vr=a("a"),Jb=o("notebook"),Vb=o("."),Gb=c(),xo=a("li"),qc=a("a"),Xb=o("TFRobertaForSequenceClassification"),Yb=o(" is supported by this "),yr=a("a"),Zb=o("example script"),ek=o(" and "),wr=a("a"),tk=o("notebook"),ok=o("."),nk=c(),Ro=a("li"),Cc=a("a"),sk=o("FlaxRobertaForSequenceClassification"),ak=o(" is supported by this "),Tr=a("a"),rk=o("example script"),ik=o(" and "),$r=a("a"),lk=o("notebook"),dk=o("."),Xm=c(),y(Fr.$$.fragment),Ym=c(),Kt=a("ul"),Eo=a("li"),jc=a("a"),ck=o("RobertaForTokenClassification"),pk=o(" is supported by this "),xr=a("a"),hk=o("example script"),uk=o(" and "),Rr=a("a"),fk=o("notebook"),mk=o("."),gk=c(),Mo=a("li"),Pc=a("a"),_k=o("TFRobertaForTokenClassification"),bk=o(" is supported by this "),Er=a("a"),kk=o("example script"),vk=o(" and "),Mr=a("a"),yk=o("notebook"),wk=o("."),Tk=c(),ss=a("li"),Ac=a("a"),$k=o("FlaxRobertaForTokenClassification"),Fk=o(" is supported by this "),zr=a("a"),xk=o("example script"),Rk=o("."),Ek=c(),Lc=a("li"),qr=a("a"),Mk=o("Token classification"),zk=o(" chapter of the \u{1F917} Hugging Face Course."),Zm=c(),y(Cr.$$.fragment),eg=c(),Et=a("ul"),jr=a("li"),qk=o("A blog on "),Pr=a("a"),Ck=o("How to train a new language model from scratch using Transformers and Tokenizers"),jk=o(" with RoBERTa."),Pk=c(),zo=a("li"),Oc=a("a"),Ak=o("RobertaForMaskedLM"),Lk=o(" is supported by this "),Ar=a("a"),Ok=o("example script"),Nk=o(" and "),Lr=a("a"),Ik=o("notebook"),Dk=o("."),Sk=c(),qo=a("li"),Nc=a("a"),Bk=o("TFRobertaForMaskedLM"),Wk=o(" is supported by this "),Or=a("a"),Uk=o("example script"),Hk=o(" and "),Nr=a("a"),Qk=o("notebook"),Kk=o("."),Jk=c(),Co=a("li"),Ic=a("a"),Vk=o("FlaxRobertaForMaskedLM"),Gk=o(" is supported by this "),Ir=a("a"),Xk=o("example script"),Yk=o(" and "),Dr=a("a"),Zk=o("notebook"),ev=o("."),tv=c(),Dc=a("li"),Sr=a("a"),ov=o("Masked language modeling"),nv=o(" chapter of the \u{1F917} Hugging Face Course."),tg=c(),y(Br.$$.fragment),og=c(),Mt=a("ul"),Wr=a("li"),sv=o("A blog on "),Ur=a("a"),av=o("Accelerated Inference with Optimum and Transformers Pipelines"),rv=o(" with RoBERTa for question answering."),iv=c(),jo=a("li"),Sc=a("a"),lv=o("RobertaForQuestionAnswering"),dv=o(" is supported by this "),Hr=a("a"),cv=o("example script"),pv=o(" and "),Qr=a("a"),hv=o("notebook"),uv=o("."),fv=c(),Po=a("li"),Bc=a("a"),mv=o("TFRobertaForQuestionAnswering"),gv=o(" is supported by this "),Kr=a("a"),_v=o("example script"),bv=o(" and "),Jr=a("a"),kv=o("notebook"),vv=o("."),yv=c(),as=a("li"),Wc=a("a"),wv=o("FlaxRobertaForQuestionAnswering"),Tv=o(" is supported by this "),Vr=a("a"),$v=o("example script"),Fv=o("."),xv=c(),Uc=a("li"),Gr=a("a"),Rv=o("Question answering"),Ev=o(" chapter of the \u{1F917} Hugging Face Course."),ng=c(),Hc=a("p"),ph=a("strong"),Mv=o("Multiple choice"),sg=c(),rs=a("ul"),Ao=a("li"),Qc=a("a"),zv=o("RobertaForMultipleChoice"),qv=o(" is supported by this "),Xr=a("a"),Cv=o("example script"),jv=o(" and "),Yr=a("a"),Pv=o("notebook"),Av=o("."),Lv=c(),Lo=a("li"),Kc=a("a"),Ov=o("TFRobertaForMultipleChoice"),Nv=o(" is supported by this "),Zr=a("a"),Iv=o("example script"),Dv=o(" and "),ei=a("a"),Sv=o("notebook"),Bv=o("."),ag=c(),an=a("h2"),is=a("a"),hh=a("span"),y(ti.$$.fragment),Wv=c(),uh=a("span"),Uv=o("RobertaConfig"),rg=c(),Qt=a("div"),y(oi.$$.fragment),Hv=c(),fo=a("p"),Qv=o("This is the configuration class to store the configuration of a "),Jc=a("a"),Kv=o("RobertaModel"),Jv=o(" or a "),Vc=a("a"),Vv=o("TFRobertaModel"),Gv=o(`. It is
used to instantiate a RoBERTa model according to the specified arguments, defining the model architecture.
Instantiating a configuration with the defaults will yield a similar configuration to that of the RoBERTa
`),ni=a("a"),Xv=o("roberta-base"),Yv=o(" architecture."),Zv=c(),rn=a("p"),ey=o("Configuration objects inherit from "),Gc=a("a"),ty=o("PretrainedConfig"),oy=o(` and can be used to control the model outputs. Read the
documentation from `),Xc=a("a"),ny=o("PretrainedConfig"),sy=o(" for more information."),ay=c(),y(ls.$$.fragment),ig=c(),ln=a("h2"),ds=a("a"),fh=a("span"),y(si.$$.fragment),ry=c(),mh=a("span"),iy=o("RobertaTokenizer"),lg=c(),Ie=a("div"),y(ai.$$.fragment),ly=c(),gh=a("p"),dy=o("Constructs a RoBERTa tokenizer, derived from the GPT-2 tokenizer, using byte-level Byte-Pair-Encoding."),cy=c(),_h=a("p"),py=o("This tokenizer has been trained to treat spaces like parts of the tokens (a bit like sentencepiece) so a word will"),hy=c(),y(cs.$$.fragment),uy=c(),ri=a("p"),fy=o("You can get around that behavior by passing "),bh=a("code"),my=o("add_prefix_space=True"),gy=o(` when instantiating this tokenizer or when you
call it on some text, but since the model was not pretrained this way, it might yield a decrease in performance.`),_y=c(),y(ps.$$.fragment),by=c(),ii=a("p"),ky=o("This tokenizer inherits from "),Yc=a("a"),vy=o("PreTrainedTokenizer"),yy=o(` which contains most of the main methods. Users should refer to
this superclass for more information regarding those methods.`),wy=c(),Oo=a("div"),y(li.$$.fragment),Ty=c(),kh=a("p"),$y=o(`Build model inputs from a sequence or a pair of sequence for sequence classification tasks by concatenating and
adding special tokens. A RoBERTa sequence has the following format:`),Fy=c(),di=a("ul"),Zc=a("li"),xy=o("single sequence: "),vh=a("code"),Ry=o("<s> X </s>"),Ey=c(),ep=a("li"),My=o("pair of sequences: "),yh=a("code"),zy=o("<s> A </s></s> B </s>"),qy=c(),hs=a("div"),y(ci.$$.fragment),Cy=c(),pi=a("p"),jy=o(`Retrieve sequence ids from a token list that has no special tokens added. This method is called when adding
special tokens using the tokenizer `),wh=a("code"),Py=o("prepare_for_model"),Ay=o(" method."),Ly=c(),us=a("div"),y(hi.$$.fragment),Oy=c(),Th=a("p"),Ny=o(`Create a mask from the two sequences passed to be used in a sequence-pair classification task. RoBERTa does not
make use of token type ids, therefore a list of zeros is returned.`),Iy=c(),tp=a("div"),y(ui.$$.fragment),dg=c(),dn=a("h2"),fs=a("a"),$h=a("span"),y(fi.$$.fragment),Dy=c(),Fh=a("span"),Sy=o("RobertaTokenizerFast"),cg=c(),tt=a("div"),y(mi.$$.fragment),By=c(),gi=a("p"),Wy=o("Construct a \u201Cfast\u201D RoBERTa tokenizer (backed by HuggingFace\u2019s "),xh=a("em"),Uy=o("tokenizers"),Hy=o(` library), derived from the GPT-2
tokenizer, using byte-level Byte-Pair-Encoding.`),Qy=c(),Rh=a("p"),Ky=o("This tokenizer has been trained to treat spaces like parts of the tokens (a bit like sentencepiece) so a word will"),Jy=c(),y(ms.$$.fragment),Vy=c(),_i=a("p"),Gy=o("You can get around that behavior by passing "),Eh=a("code"),Xy=o("add_prefix_space=True"),Yy=o(` when instantiating this tokenizer or when you
call it on some text, but since the model was not pretrained this way, it might yield a decrease in performance.`),Zy=c(),y(gs.$$.fragment),ew=c(),bi=a("p"),tw=o("This tokenizer inherits from "),op=a("a"),ow=o("PreTrainedTokenizerFast"),nw=o(` which contains most of the main methods. Users should
refer to this superclass for more information regarding those methods.`),sw=c(),np=a("div"),y(ki.$$.fragment),pg=c(),cn=a("h2"),_s=a("a"),Mh=a("span"),y(vi.$$.fragment),aw=c(),zh=a("span"),rw=o("RobertaModel"),hg=c(),ot=a("div"),y(yi.$$.fragment),iw=c(),qh=a("p"),lw=o("The bare RoBERTa Model transformer outputting raw hidden-states without any specific head on top."),dw=c(),wi=a("p"),cw=o("This model inherits from "),sp=a("a"),pw=o("PreTrainedModel"),hw=o(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),uw=c(),Ti=a("p"),fw=o("This model is also a PyTorch "),$i=a("a"),mw=o("torch.nn.Module"),gw=o(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),_w=c(),Fi=a("p"),bw=o(`The model can behave as an encoder (with only self-attention) as well as a decoder, in which case a layer of
cross-attention is added between the self-attention layers, following the architecture described in `),Ch=a("em"),kw=o(`Attention is
all you need`),vw=o(`_ by Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N. Gomez, Lukasz
Kaiser and Illia Polosukhin.`),yw=c(),pt=a("p"),ww=o("To behave as an decoder the model needs to be initialized with the "),jh=a("code"),Tw=o("is_decoder"),$w=o(` argument of the configuration set
to `),Ph=a("code"),Fw=o("True"),xw=o(". To be used in a Seq2Seq model, the model needs to initialized with both "),Ah=a("code"),Rw=o("is_decoder"),Ew=o(` argument and
`),Lh=a("code"),Mw=o("add_cross_attention"),zw=o(" set to "),Oh=a("code"),qw=o("True"),Cw=o("; an "),Nh=a("code"),jw=o("encoder_hidden_states"),Pw=o(" is then expected as an input to the forward pass."),Aw=c(),bs=a("p"),Lw=o(".. _"),Ih=a("em"),Ow=o("Attention is all you need"),Nw=o(": "),xi=a("a"),Iw=o("https://arxiv.org/abs/1706.03762"),Dw=c(),Jt=a("div"),y(Ri.$$.fragment),Sw=c(),pn=a("p"),Bw=o("The "),ap=a("a"),Ww=o("RobertaModel"),Uw=o(" forward method, overrides the "),Dh=a("code"),Hw=o("__call__"),Qw=o(" special method."),Kw=c(),y(ks.$$.fragment),Jw=c(),y(vs.$$.fragment),ug=c(),hn=a("h2"),ys=a("a"),Sh=a("span"),y(Ei.$$.fragment),Vw=c(),Bh=a("span"),Gw=o("RobertaForCausalLM"),fg=c(),yt=a("div"),y(Mi.$$.fragment),Xw=c(),zi=a("p"),Yw=o("RoBERTa Model with a "),Wh=a("code"),Zw=o("language modeling"),eT=o(" head on top for CLM fine-tuning."),tT=c(),qi=a("p"),oT=o("This model inherits from "),rp=a("a"),nT=o("PreTrainedModel"),sT=o(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),aT=c(),Ci=a("p"),rT=o("This model is also a PyTorch "),ji=a("a"),iT=o("torch.nn.Module"),lT=o(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),dT=c(),Vt=a("div"),y(Pi.$$.fragment),cT=c(),un=a("p"),pT=o("The "),ip=a("a"),hT=o("RobertaForCausalLM"),uT=o(" forward method, overrides the "),Uh=a("code"),fT=o("__call__"),mT=o(" special method."),gT=c(),y(ws.$$.fragment),_T=c(),y(Ts.$$.fragment),mg=c(),fn=a("h2"),$s=a("a"),Hh=a("span"),y(Ai.$$.fragment),bT=c(),Qh=a("span"),kT=o("RobertaForMaskedLM"),gg=c(),wt=a("div"),y(Li.$$.fragment),vT=c(),Oi=a("p"),yT=o("RoBERTa Model with a "),Kh=a("code"),wT=o("language modeling"),TT=o(" head on top."),$T=c(),Ni=a("p"),FT=o("This model inherits from "),lp=a("a"),xT=o("PreTrainedModel"),RT=o(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),ET=c(),Ii=a("p"),MT=o("This model is also a PyTorch "),Di=a("a"),zT=o("torch.nn.Module"),qT=o(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),CT=c(),zt=a("div"),y(Si.$$.fragment),jT=c(),mn=a("p"),PT=o("The "),dp=a("a"),AT=o("RobertaForMaskedLM"),LT=o(" forward method, overrides the "),Jh=a("code"),OT=o("__call__"),NT=o(" special method."),IT=c(),y(Fs.$$.fragment),DT=c(),y(xs.$$.fragment),ST=c(),y(Rs.$$.fragment),_g=c(),gn=a("h2"),Es=a("a"),Vh=a("span"),y(Bi.$$.fragment),BT=c(),Gh=a("span"),WT=o("RobertaForSequenceClassification"),bg=c(),Tt=a("div"),y(Wi.$$.fragment),UT=c(),Xh=a("p"),HT=o(`RoBERTa Model transformer with a sequence classification/regression head on top (a linear layer on top of the
pooled output) e.g. for GLUE tasks.`),QT=c(),Ui=a("p"),KT=o("This model inherits from "),cp=a("a"),JT=o("PreTrainedModel"),VT=o(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),GT=c(),Hi=a("p"),XT=o("This model is also a PyTorch "),Qi=a("a"),YT=o("torch.nn.Module"),ZT=o(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),e1=c(),ct=a("div"),y(Ki.$$.fragment),t1=c(),_n=a("p"),o1=o("The "),pp=a("a"),n1=o("RobertaForSequenceClassification"),s1=o(" forward method, overrides the "),Yh=a("code"),a1=o("__call__"),r1=o(" special method."),i1=c(),y(Ms.$$.fragment),l1=c(),y(zs.$$.fragment),d1=c(),y(qs.$$.fragment),c1=c(),y(Cs.$$.fragment),p1=c(),y(js.$$.fragment),kg=c(),bn=a("h2"),Ps=a("a"),Zh=a("span"),y(Ji.$$.fragment),h1=c(),eu=a("span"),u1=o("RobertaForMultipleChoice"),vg=c(),$t=a("div"),y(Vi.$$.fragment),f1=c(),tu=a("p"),m1=o(`Roberta Model with a multiple choice classification head on top (a linear layer on top of the pooled output and a
softmax) e.g. for RocStories/SWAG tasks.`),g1=c(),Gi=a("p"),_1=o("This model inherits from "),hp=a("a"),b1=o("PreTrainedModel"),k1=o(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),v1=c(),Xi=a("p"),y1=o("This model is also a PyTorch "),Yi=a("a"),w1=o("torch.nn.Module"),T1=o(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),$1=c(),Gt=a("div"),y(Zi.$$.fragment),F1=c(),kn=a("p"),x1=o("The "),up=a("a"),R1=o("RobertaForMultipleChoice"),E1=o(" forward method, overrides the "),ou=a("code"),M1=o("__call__"),z1=o(" special method."),q1=c(),y(As.$$.fragment),C1=c(),y(Ls.$$.fragment),yg=c(),vn=a("h2"),Os=a("a"),nu=a("span"),y(el.$$.fragment),j1=c(),su=a("span"),P1=o("RobertaForTokenClassification"),wg=c(),Ft=a("div"),y(tl.$$.fragment),A1=c(),au=a("p"),L1=o(`Roberta Model with a token classification head on top (a linear layer on top of the hidden-states output) e.g. for
Named-Entity-Recognition (NER) tasks.`),O1=c(),ol=a("p"),N1=o("This model inherits from "),fp=a("a"),I1=o("PreTrainedModel"),D1=o(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),S1=c(),nl=a("p"),B1=o("This model is also a PyTorch "),sl=a("a"),W1=o("torch.nn.Module"),U1=o(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),H1=c(),qt=a("div"),y(al.$$.fragment),Q1=c(),yn=a("p"),K1=o("The "),mp=a("a"),J1=o("RobertaForTokenClassification"),V1=o(" forward method, overrides the "),ru=a("code"),G1=o("__call__"),X1=o(" special method."),Y1=c(),y(Ns.$$.fragment),Z1=c(),y(Is.$$.fragment),e$=c(),y(Ds.$$.fragment),Tg=c(),wn=a("h2"),Ss=a("a"),iu=a("span"),y(rl.$$.fragment),t$=c(),lu=a("span"),o$=o("RobertaForQuestionAnswering"),$g=c(),xt=a("div"),y(il.$$.fragment),n$=c(),Tn=a("p"),s$=o(`Roberta Model with a span classification head on top for extractive question-answering tasks like SQuAD (a linear
layers on top of the hidden-states output to compute `),du=a("code"),a$=o("span start logits"),r$=o(" and "),cu=a("code"),i$=o("span end logits"),l$=o(")."),d$=c(),ll=a("p"),c$=o("This model inherits from "),gp=a("a"),p$=o("PreTrainedModel"),h$=o(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),u$=c(),dl=a("p"),f$=o("This model is also a PyTorch "),cl=a("a"),m$=o("torch.nn.Module"),g$=o(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),_$=c(),Ct=a("div"),y(pl.$$.fragment),b$=c(),$n=a("p"),k$=o("The "),_p=a("a"),v$=o("RobertaForQuestionAnswering"),y$=o(" forward method, overrides the "),pu=a("code"),w$=o("__call__"),T$=o(" special method."),$$=c(),y(Bs.$$.fragment),F$=c(),y(Ws.$$.fragment),x$=c(),y(Us.$$.fragment),Fg=c(),Fn=a("h2"),Hs=a("a"),hu=a("span"),y(hl.$$.fragment),R$=c(),uu=a("span"),E$=o("TFRobertaModel"),xg=c(),ht=a("div"),y(ul.$$.fragment),M$=c(),fu=a("p"),z$=o("The bare RoBERTa Model transformer outputting raw hidden-states without any specific head on top."),q$=c(),fl=a("p"),C$=o("This model inherits from "),bp=a("a"),j$=o("TFPreTrainedModel"),P$=o(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),A$=c(),ml=a("p"),L$=o("This model is also a "),gl=a("a"),O$=o("tf.keras.Model"),N$=o(` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),I$=c(),y(Qs.$$.fragment),D$=c(),Xt=a("div"),y(_l.$$.fragment),S$=c(),xn=a("p"),B$=o("The "),kp=a("a"),W$=o("TFRobertaModel"),U$=o(" forward method, overrides the "),mu=a("code"),H$=o("__call__"),Q$=o(" special method."),K$=c(),y(Ks.$$.fragment),J$=c(),y(Js.$$.fragment),Rg=c(),Rn=a("h2"),Vs=a("a"),gu=a("span"),y(bl.$$.fragment),V$=c(),_u=a("span"),G$=o("TFRobertaForCausalLM"),Eg=c(),En=a("div"),y(kl.$$.fragment),X$=c(),Yt=a("div"),y(vl.$$.fragment),Y$=c(),Mn=a("p"),Z$=o("The "),vp=a("a"),e2=o("TFRobertaForCausalLM"),t2=o(" forward method, overrides the "),bu=a("code"),o2=o("__call__"),n2=o(" special method."),s2=c(),y(Gs.$$.fragment),a2=c(),y(Xs.$$.fragment),Mg=c(),zn=a("h2"),Ys=a("a"),ku=a("span"),y(yl.$$.fragment),r2=c(),vu=a("span"),i2=o("TFRobertaForMaskedLM"),zg=c(),ut=a("div"),y(wl.$$.fragment),l2=c(),Tl=a("p"),d2=o("RoBERTa Model with a "),yu=a("code"),c2=o("language modeling"),p2=o(" head on top."),h2=c(),$l=a("p"),u2=o("This model inherits from "),yp=a("a"),f2=o("TFPreTrainedModel"),m2=o(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),g2=c(),Fl=a("p"),_2=o("This model is also a "),xl=a("a"),b2=o("tf.keras.Model"),k2=o(` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),v2=c(),y(Zs.$$.fragment),y2=c(),jt=a("div"),y(Rl.$$.fragment),w2=c(),qn=a("p"),T2=o("The "),wp=a("a"),$2=o("TFRobertaForMaskedLM"),F2=o(" forward method, overrides the "),wu=a("code"),x2=o("__call__"),R2=o(" special method."),E2=c(),y(ea.$$.fragment),M2=c(),y(ta.$$.fragment),z2=c(),y(oa.$$.fragment),qg=c(),Cn=a("h2"),na=a("a"),Tu=a("span"),y(El.$$.fragment),q2=c(),$u=a("span"),C2=o("TFRobertaForSequenceClassification"),Cg=c(),ft=a("div"),y(Ml.$$.fragment),j2=c(),Fu=a("p"),P2=o(`RoBERTa Model transformer with a sequence classification/regression head on top (a linear layer on top of the
pooled output) e.g. for GLUE tasks.`),A2=c(),zl=a("p"),L2=o("This model inherits from "),Tp=a("a"),O2=o("TFPreTrainedModel"),N2=o(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),I2=c(),ql=a("p"),D2=o("This model is also a "),Cl=a("a"),S2=o("tf.keras.Model"),B2=o(` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),W2=c(),y(sa.$$.fragment),U2=c(),Pt=a("div"),y(jl.$$.fragment),H2=c(),jn=a("p"),Q2=o("The "),$p=a("a"),K2=o("TFRobertaForSequenceClassification"),J2=o(" forward method, overrides the "),xu=a("code"),V2=o("__call__"),G2=o(" special method."),X2=c(),y(aa.$$.fragment),Y2=c(),y(ra.$$.fragment),Z2=c(),y(ia.$$.fragment),jg=c(),Pn=a("h2"),la=a("a"),Ru=a("span"),y(Pl.$$.fragment),eF=c(),Eu=a("span"),tF=o("TFRobertaForMultipleChoice"),Pg=c(),mt=a("div"),y(Al.$$.fragment),oF=c(),Mu=a("p"),nF=o(`Roberta Model with a multiple choice classification head on top (a linear layer on top of the pooled output and a
softmax) e.g. for RocStories/SWAG tasks.`),sF=c(),Ll=a("p"),aF=o("This model inherits from "),Fp=a("a"),rF=o("TFPreTrainedModel"),iF=o(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),lF=c(),Ol=a("p"),dF=o("This model is also a "),Nl=a("a"),cF=o("tf.keras.Model"),pF=o(` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),hF=c(),y(da.$$.fragment),uF=c(),Zt=a("div"),y(Il.$$.fragment),fF=c(),An=a("p"),mF=o("The "),xp=a("a"),gF=o("TFRobertaForMultipleChoice"),_F=o(" forward method, overrides the "),zu=a("code"),bF=o("__call__"),kF=o(" special method."),vF=c(),y(ca.$$.fragment),yF=c(),y(pa.$$.fragment),Ag=c(),Ln=a("h2"),ha=a("a"),qu=a("span"),y(Dl.$$.fragment),wF=c(),Cu=a("span"),TF=o("TFRobertaForTokenClassification"),Lg=c(),gt=a("div"),y(Sl.$$.fragment),$F=c(),ju=a("p"),FF=o(`RoBERTa Model with a token classification head on top (a linear layer on top of the hidden-states output) e.g. for
Named-Entity-Recognition (NER) tasks.`),xF=c(),Bl=a("p"),RF=o("This model inherits from "),Rp=a("a"),EF=o("TFPreTrainedModel"),MF=o(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),zF=c(),Wl=a("p"),qF=o("This model is also a "),Ul=a("a"),CF=o("tf.keras.Model"),jF=o(` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),PF=c(),y(ua.$$.fragment),AF=c(),At=a("div"),y(Hl.$$.fragment),LF=c(),On=a("p"),OF=o("The "),Ep=a("a"),NF=o("TFRobertaForTokenClassification"),IF=o(" forward method, overrides the "),Pu=a("code"),DF=o("__call__"),SF=o(" special method."),BF=c(),y(fa.$$.fragment),WF=c(),y(ma.$$.fragment),UF=c(),y(ga.$$.fragment),Og=c(),Nn=a("h2"),_a=a("a"),Au=a("span"),y(Ql.$$.fragment),HF=c(),Lu=a("span"),QF=o("TFRobertaForQuestionAnswering"),Ng=c(),_t=a("div"),y(Kl.$$.fragment),KF=c(),In=a("p"),JF=o(`RoBERTa Model with a span classification head on top for extractive question-answering tasks like SQuAD (a linear
layers on top of the hidden-states output to compute `),Ou=a("code"),VF=o("span start logits"),GF=o(" and "),Nu=a("code"),XF=o("span end logits"),YF=o(")."),ZF=c(),Jl=a("p"),e0=o("This model inherits from "),Mp=a("a"),t0=o("TFPreTrainedModel"),o0=o(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),n0=c(),Vl=a("p"),s0=o("This model is also a "),Gl=a("a"),a0=o("tf.keras.Model"),r0=o(` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),i0=c(),y(ba.$$.fragment),l0=c(),Lt=a("div"),y(Xl.$$.fragment),d0=c(),Dn=a("p"),c0=o("The "),zp=a("a"),p0=o("TFRobertaForQuestionAnswering"),h0=o(" forward method, overrides the "),Iu=a("code"),u0=o("__call__"),f0=o(" special method."),m0=c(),y(ka.$$.fragment),g0=c(),y(va.$$.fragment),_0=c(),y(ya.$$.fragment),Ig=c(),Sn=a("h2"),wa=a("a"),Du=a("span"),y(Yl.$$.fragment),b0=c(),Su=a("span"),k0=o("FlaxRobertaModel"),Dg=c(),nt=a("div"),y(Zl.$$.fragment),v0=c(),Bu=a("p"),y0=o("The bare RoBERTa Model transformer outputting raw hidden-states without any specific head on top."),w0=c(),ed=a("p"),T0=o("This model inherits from "),qp=a("a"),$0=o("FlaxPreTrainedModel"),F0=o(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading, saving and converting weights from PyTorch models)`),x0=c(),td=a("p"),R0=o("This model is also a Flax Linen "),od=a("a"),E0=o("flax.linen.Module"),M0=o(`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),z0=c(),Wu=a("p"),q0=o("Finally, this model supports inherent JAX features such as:"),C0=c(),mo=a("ul"),Uu=a("li"),nd=a("a"),j0=o("Just-In-Time (JIT) compilation"),P0=c(),Hu=a("li"),sd=a("a"),A0=o("Automatic Differentiation"),L0=c(),Qu=a("li"),ad=a("a"),O0=o("Vectorization"),N0=c(),Ku=a("li"),rd=a("a"),I0=o("Parallelization"),D0=c(),eo=a("div"),y(id.$$.fragment),S0=c(),Bn=a("p"),B0=o("The "),Ju=a("code"),W0=o("FlaxRobertaPreTrainedModel"),U0=o(" forward method, overrides the "),Vu=a("code"),H0=o("__call__"),Q0=o(" special method."),K0=c(),y(Ta.$$.fragment),J0=c(),y($a.$$.fragment),Sg=c(),Wn=a("h2"),Fa=a("a"),Gu=a("span"),y(ld.$$.fragment),V0=c(),Xu=a("span"),G0=o("FlaxRobertaForCausalLM"),Bg=c(),st=a("div"),y(dd.$$.fragment),X0=c(),Yu=a("p"),Y0=o(`Roberta Model with a language modeling head on top (a linear layer on top of the hidden-states output) e.g for
autoregressive tasks.`),Z0=c(),cd=a("p"),ex=o("This model inherits from "),Cp=a("a"),tx=o("FlaxPreTrainedModel"),ox=o(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading, saving and converting weights from PyTorch models)`),nx=c(),pd=a("p"),sx=o("This model is also a Flax Linen "),hd=a("a"),ax=o("flax.linen.Module"),rx=o(`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),ix=c(),Zu=a("p"),lx=o("Finally, this model supports inherent JAX features such as:"),dx=c(),go=a("ul"),ef=a("li"),ud=a("a"),cx=o("Just-In-Time (JIT) compilation"),px=c(),tf=a("li"),fd=a("a"),hx=o("Automatic Differentiation"),ux=c(),of=a("li"),md=a("a"),fx=o("Vectorization"),mx=c(),nf=a("li"),gd=a("a"),gx=o("Parallelization"),_x=c(),to=a("div"),y(_d.$$.fragment),bx=c(),Un=a("p"),kx=o("The "),sf=a("code"),vx=o("FlaxRobertaPreTrainedModel"),yx=o(" forward method, overrides the "),af=a("code"),wx=o("__call__"),Tx=o(" special method."),$x=c(),y(xa.$$.fragment),Fx=c(),y(Ra.$$.fragment),Wg=c(),Hn=a("h2"),Ea=a("a"),rf=a("span"),y(bd.$$.fragment),xx=c(),lf=a("span"),Rx=o("FlaxRobertaForMaskedLM"),Ug=c(),at=a("div"),y(kd.$$.fragment),Ex=c(),vd=a("p"),Mx=o("RoBERTa Model with a "),df=a("code"),zx=o("language modeling"),qx=o(" head on top."),Cx=c(),yd=a("p"),jx=o("This model inherits from "),jp=a("a"),Px=o("FlaxPreTrainedModel"),Ax=o(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading, saving and converting weights from PyTorch models)`),Lx=c(),wd=a("p"),Ox=o("This model is also a Flax Linen "),Td=a("a"),Nx=o("flax.linen.Module"),Ix=o(`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),Dx=c(),cf=a("p"),Sx=o("Finally, this model supports inherent JAX features such as:"),Bx=c(),_o=a("ul"),pf=a("li"),$d=a("a"),Wx=o("Just-In-Time (JIT) compilation"),Ux=c(),hf=a("li"),Fd=a("a"),Hx=o("Automatic Differentiation"),Qx=c(),uf=a("li"),xd=a("a"),Kx=o("Vectorization"),Jx=c(),ff=a("li"),Rd=a("a"),Vx=o("Parallelization"),Gx=c(),oo=a("div"),y(Ed.$$.fragment),Xx=c(),Qn=a("p"),Yx=o("The "),mf=a("code"),Zx=o("FlaxRobertaPreTrainedModel"),e4=o(" forward method, overrides the "),gf=a("code"),t4=o("__call__"),o4=o(" special method."),n4=c(),y(Ma.$$.fragment),s4=c(),y(za.$$.fragment),Hg=c(),Kn=a("h2"),qa=a("a"),_f=a("span"),y(Md.$$.fragment),a4=c(),bf=a("span"),r4=o("FlaxRobertaForSequenceClassification"),Qg=c(),rt=a("div"),y(zd.$$.fragment),i4=c(),kf=a("p"),l4=o(`Roberta Model transformer with a sequence classification/regression head on top (a linear layer on top of the
pooled output) e.g. for GLUE tasks.`),d4=c(),qd=a("p"),c4=o("This model inherits from "),Pp=a("a"),p4=o("FlaxPreTrainedModel"),h4=o(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading, saving and converting weights from PyTorch models)`),u4=c(),Cd=a("p"),f4=o("This model is also a Flax Linen "),jd=a("a"),m4=o("flax.linen.Module"),g4=o(`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),_4=c(),vf=a("p"),b4=o("Finally, this model supports inherent JAX features such as:"),k4=c(),bo=a("ul"),yf=a("li"),Pd=a("a"),v4=o("Just-In-Time (JIT) compilation"),y4=c(),wf=a("li"),Ad=a("a"),w4=o("Automatic Differentiation"),T4=c(),Tf=a("li"),Ld=a("a"),$4=o("Vectorization"),F4=c(),$f=a("li"),Od=a("a"),x4=o("Parallelization"),R4=c(),no=a("div"),y(Nd.$$.fragment),E4=c(),Jn=a("p"),M4=o("The "),Ff=a("code"),z4=o("FlaxRobertaPreTrainedModel"),q4=o(" forward method, overrides the "),xf=a("code"),C4=o("__call__"),j4=o(" special method."),P4=c(),y(Ca.$$.fragment),A4=c(),y(ja.$$.fragment),Kg=c(),Vn=a("h2"),Pa=a("a"),Rf=a("span"),y(Id.$$.fragment),L4=c(),Ef=a("span"),O4=o("FlaxRobertaForMultipleChoice"),Jg=c(),it=a("div"),y(Dd.$$.fragment),N4=c(),Mf=a("p"),I4=o(`Roberta Model with a multiple choice classification head on top (a linear layer on top of the pooled output and a
softmax) e.g. for RocStories/SWAG tasks.`),D4=c(),Sd=a("p"),S4=o("This model inherits from "),Ap=a("a"),B4=o("FlaxPreTrainedModel"),W4=o(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading, saving and converting weights from PyTorch models)`),U4=c(),Bd=a("p"),H4=o("This model is also a Flax Linen "),Wd=a("a"),Q4=o("flax.linen.Module"),K4=o(`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),J4=c(),zf=a("p"),V4=o("Finally, this model supports inherent JAX features such as:"),G4=c(),ko=a("ul"),qf=a("li"),Ud=a("a"),X4=o("Just-In-Time (JIT) compilation"),Y4=c(),Cf=a("li"),Hd=a("a"),Z4=o("Automatic Differentiation"),eR=c(),jf=a("li"),Qd=a("a"),tR=o("Vectorization"),oR=c(),Pf=a("li"),Kd=a("a"),nR=o("Parallelization"),sR=c(),so=a("div"),y(Jd.$$.fragment),aR=c(),Gn=a("p"),rR=o("The "),Af=a("code"),iR=o("FlaxRobertaPreTrainedModel"),lR=o(" forward method, overrides the "),Lf=a("code"),dR=o("__call__"),cR=o(" special method."),pR=c(),y(Aa.$$.fragment),hR=c(),y(La.$$.fragment),Vg=c(),Xn=a("h2"),Oa=a("a"),Of=a("span"),y(Vd.$$.fragment),uR=c(),Nf=a("span"),fR=o("FlaxRobertaForTokenClassification"),Gg=c(),lt=a("div"),y(Gd.$$.fragment),mR=c(),If=a("p"),gR=o(`Roberta Model with a token classification head on top (a linear layer on top of the hidden-states output) e.g. for
Named-Entity-Recognition (NER) tasks.`),_R=c(),Xd=a("p"),bR=o("This model inherits from "),Lp=a("a"),kR=o("FlaxPreTrainedModel"),vR=o(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading, saving and converting weights from PyTorch models)`),yR=c(),Yd=a("p"),wR=o("This model is also a Flax Linen "),Zd=a("a"),TR=o("flax.linen.Module"),$R=o(`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),FR=c(),Df=a("p"),xR=o("Finally, this model supports inherent JAX features such as:"),RR=c(),vo=a("ul"),Sf=a("li"),ec=a("a"),ER=o("Just-In-Time (JIT) compilation"),MR=c(),Bf=a("li"),tc=a("a"),zR=o("Automatic Differentiation"),qR=c(),Wf=a("li"),oc=a("a"),CR=o("Vectorization"),jR=c(),Uf=a("li"),nc=a("a"),PR=o("Parallelization"),AR=c(),ao=a("div"),y(sc.$$.fragment),LR=c(),Yn=a("p"),OR=o("The "),Hf=a("code"),NR=o("FlaxRobertaPreTrainedModel"),IR=o(" forward method, overrides the "),Qf=a("code"),DR=o("__call__"),SR=o(" special method."),BR=c(),y(Na.$$.fragment),WR=c(),y(Ia.$$.fragment),Xg=c(),Zn=a("h2"),Da=a("a"),Kf=a("span"),y(ac.$$.fragment),UR=c(),Jf=a("span"),HR=o("FlaxRobertaForQuestionAnswering"),Yg=c(),dt=a("div"),y(rc.$$.fragment),QR=c(),es=a("p"),KR=o(`Roberta Model with a span classification head on top for extractive question-answering tasks like SQuAD (a linear
layers on top of the hidden-states output to compute `),Vf=a("code"),JR=o("span start logits"),VR=o(" and "),Gf=a("code"),GR=o("span end logits"),XR=o(")."),YR=c(),ic=a("p"),ZR=o("This model inherits from "),Op=a("a"),eE=o("FlaxPreTrainedModel"),tE=o(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading, saving and converting weights from PyTorch models)`),oE=c(),lc=a("p"),nE=o("This model is also a Flax Linen "),dc=a("a"),sE=o("flax.linen.Module"),aE=o(`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),rE=c(),Xf=a("p"),iE=o("Finally, this model supports inherent JAX features such as:"),lE=c(),yo=a("ul"),Yf=a("li"),cc=a("a"),dE=o("Just-In-Time (JIT) compilation"),cE=c(),Zf=a("li"),pc=a("a"),pE=o("Automatic Differentiation"),hE=c(),em=a("li"),hc=a("a"),uE=o("Vectorization"),fE=c(),tm=a("li"),uc=a("a"),mE=o("Parallelization"),gE=c(),ro=a("div"),y(fc.$$.fragment),_E=c(),ts=a("p"),bE=o("The "),om=a("code"),kE=o("FlaxRobertaPreTrainedModel"),vE=o(" forward method, overrides the "),nm=a("code"),yE=o("__call__"),wE=o(" special method."),TE=c(),y(Sa.$$.fragment),$E=c(),y(Ba.$$.fragment),this.h()},l(s){const g=cj('[data-svelte="svelte-1phssyn"]',document.head);d=r(g,"META",{name:!0,content:!0}),g.forEach(t),_=p(s),u=r(s,"H1",{class:!0});var mc=i(u);m=r(mc,"A",{id:!0,class:!0,href:!0});var sm=i(m);k=r(sm,"SPAN",{});var am=i(k);w(l.$$.fragment,am),am.forEach(t),sm.forEach(t),f=p(mc),E=r(mc,"SPAN",{});var rm=i(E);le=n(rm,"RoBERTa"),rm.forEach(t),mc.forEach(t),Z=p(s),N=r(s,"H2",{class:!0});var gc=i(N);te=r(gc,"A",{id:!0,class:!0,href:!0});var im=i(te);oe=r(im,"SPAN",{});var lm=i(oe);w(M.$$.fragment,lm),lm.forEach(t),im.forEach(t),we=p(gc),K=r(gc,"SPAN",{});var dm=i(K);Te=n(dm,"Overview"),dm.forEach(t),gc.forEach(t),ge=p(s),B=r(s,"P",{});var _c=i(B);$e=n(_c,"The RoBERTa model was proposed in "),pe=r(_c,"A",{href:!0,rel:!0});var cm=i(pe);J=n(cm,"RoBERTa: A Robustly Optimized BERT Pretraining Approach"),cm.forEach(t),Fe=n(_c,` 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.`),_c.forEach(t),_e=p(s),U=r(s,"P",{});var pm=i(U);xe=n(pm,`It builds on BERT and modifies key hyperparameters, removing the next-sentence pretraining objective and training with
much larger mini-batches and learning rates.`),pm.forEach(t),be=p(s),H=r(s,"P",{});var hm=i(H);Re=n(hm,"The abstract from the paper is the following:"),hm.forEach(t),ke=p(s),ee=r(s,"P",{});var um=i(ee);C=r(um,"EM",{});var fm=i(C);P=n(fm,`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.`),fm.forEach(t),um.forEach(t),ve=p(s),Q=r(s,"P",{});var mm=i(Q);Ee=n(mm,"Tips:"),mm.forEach(t),ye=p(s),I=r(s,"UL",{});var wo=i(I);he=r(wo,"LI",{});var bc=i(he);Me=n(bc,"This implementation is the same as "),j=r(bc,"A",{href:!0});var gm=i(j);ze=n(gm,"BertModel"),gm.forEach(t),V=n(bc,` with a tiny embeddings tweak as well as a setup
for Roberta pretrained models.`),bc.forEach(t),qe=p(wo),ue=r(wo,"LI",{});var _m=i(ue);G=n(_m,`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.`),_m.forEach(t),Ce=p(wo),ne=r(wo,"LI",{});var To=i(ne);D=n(To,"RoBERTa doesn\u2019t have "),fe=r(To,"CODE",{});var bm=i(fe);X=n(bm,"token_type_ids"),bm.forEach(t),je=n(To,`, you don\u2019t need to indicate which token belongs to which segment. Just
separate your segments with the separation token `),se=r(To,"CODE",{});var km=i(se);A=n(km,"tokenizer.sep_token"),km.forEach(t),Pe=n(To," (or "),L=r(To,"CODE",{});var vm=i(L);Ae=n(vm,"</s>"),vm.forEach(t),Le=n(To,")"),To.forEach(t),v=p(wo),z=r(wo,"LI",{});var Np=i(z);Ue=r(Np,"A",{href:!0});var ym=i(Ue);de=n(ym,"CamemBERT"),ym.forEach(t),Xe=n(Np," is a wrapper around RoBERTa. Refer to this page for usage examples."),Np.forEach(t),wo.forEach(t),Ke=p(s),q=r(s,"P",{});var os=i(q);Ye=n(os,"This model was contributed by "),Se=r(os,"A",{href:!0,rel:!0});var wm=i(Se);Ze=n(wm,"julien-c"),wm.forEach(t),et=n(os,". The original code can be found "),Be=r(os,"A",{href:!0,rel:!0});var Tm=i(Be);S=n(Tm,"here"),Tm.forEach(t),Y=n(os,"."),os.forEach(t),Je=p(s),Oe=r(s,"H2",{class:!0});var kc=i(Oe);W=r(kc,"A",{id:!0,class:!0,href:!0});var $m=i(W);He=r($m,"SPAN",{});var Fm=i(He);w(We.$$.fragment,Fm),Fm.forEach(t),$m.forEach(t),Ne=p(kc),Qe=r(kc,"SPAN",{});var xm=i(Qe);ce=n(xm,"Resources"),xm.forEach(t),kc.forEach(t),Ve=p(s),Mc=r(s,"P",{});var Rm=i(Mc);Mb=n(Rm,"A list of official Hugging Face and community (indicated by \u{1F30E}) resources to help you get started with RoBERTa. If you\u2019re interested in submitting a resource to be included here, please feel free to open a Pull Request and we\u2019ll review it! The resource should ideally demonstrate something new instead of duplicating an existing resource."),Rm.forEach(t),Vm=p(s),w(hr.$$.fragment,s),Gm=p(s),bt=r(s,"UL",{});var Rt=i(bt);sn=r(Rt,"LI",{});var ns=i(sn);zb=n(ns,"A blog on "),ur=r(ns,"A",{href:!0,rel:!0});var Em=i(ur);qb=n(Em,"Getting Started with Sentiment Analysis on Twitter"),Em.forEach(t),Cb=n(ns," using RoBERTa and the "),fr=r(ns,"A",{href:!0,rel:!0});var Mm=i(fr);jb=n(Mm,"Inference API"),Mm.forEach(t),Pb=n(ns,"."),ns.forEach(t),Ab=p(Rt),mr=r(Rt,"LI",{});var vc=i(mr);Lb=n(vc,"A blog on "),gr=r(vc,"A",{href:!0,rel:!0});var zm=i(gr);Ob=n(zm,"Opinion Classification with Kili and Hugging Face AutoTrain"),zm.forEach(t),Nb=n(vc," using RoBERTa."),vc.forEach(t),Ib=p(Rt),_r=r(Rt,"LI",{});var yc=i(_r);Db=n(yc,"A notebook on how to "),br=r(yc,"A",{href:!0,rel:!0});var qm=i(br);Sb=n(qm,"finetune RoBERTa for sentiment analysis"),qm.forEach(t),Bb=n(yc,". \u{1F30E}"),yc.forEach(t),Wb=p(Rt),Fo=r(Rt,"LI",{});var No=i(Fo);zc=r(No,"A",{href:!0});var Cm=i(zc);Ub=n(Cm,"RobertaForSequenceClassification"),Cm.forEach(t),Hb=n(No," is supported by this "),kr=r(No,"A",{href:!0,rel:!0});var jm=i(kr);Qb=n(jm,"example script"),jm.forEach(t),Kb=n(No," and "),vr=r(No,"A",{href:!0,rel:!0});var Pm=i(vr);Jb=n(Pm,"notebook"),Pm.forEach(t),Vb=n(No,"."),No.forEach(t),Gb=p(Rt),xo=r(Rt,"LI",{});var Io=i(xo);qc=r(Io,"A",{href:!0});var Am=i(qc);Xb=n(Am,"TFRobertaForSequenceClassification"),Am.forEach(t),Yb=n(Io," is supported by this "),yr=r(Io,"A",{href:!0,rel:!0});var Lm=i(yr);Zb=n(Lm,"example script"),Lm.forEach(t),ek=n(Io," and "),wr=r(Io,"A",{href:!0,rel:!0});var Om=i(wr);tk=n(Om,"notebook"),Om.forEach(t),ok=n(Io,"."),Io.forEach(t),nk=p(Rt),Ro=r(Rt,"LI",{});var Do=i(Ro);Cc=r(Do,"A",{href:!0});var Nm=i(Cc);sk=n(Nm,"FlaxRobertaForSequenceClassification"),Nm.forEach(t),ak=n(Do," is supported by this "),Tr=r(Do,"A",{href:!0,rel:!0});var Im=i(Tr);rk=n(Im,"example script"),Im.forEach(t),ik=n(Do," and "),$r=r(Do,"A",{href:!0,rel:!0});var Dm=i($r);lk=n(Dm,"notebook"),Dm.forEach(t),dk=n(Do,"."),Do.forEach(t),Rt.forEach(t),Xm=p(s),w(Fr.$$.fragment,s),Ym=p(s),Kt=r(s,"UL",{});var $o=i(Kt);Eo=r($o,"LI",{});var So=i(Eo);jc=r(So,"A",{href:!0});var Sm=i(jc);ck=n(Sm,"RobertaForTokenClassification"),Sm.forEach(t),pk=n(So," is supported by this "),xr=r(So,"A",{href:!0,rel:!0});var Bm=i(xr);hk=n(Bm,"example script"),Bm.forEach(t),uk=n(So," and "),Rr=r(So,"A",{href:!0,rel:!0});var Wm=i(Rr);fk=n(Wm,"notebook"),Wm.forEach(t),mk=n(So,"."),So.forEach(t),gk=p($o),Mo=r($o,"LI",{});var Bo=i(Mo);Pc=r(Bo,"A",{href:!0});var Um=i(Pc);_k=n(Um,"TFRobertaForTokenClassification"),Um.forEach(t),bk=n(Bo," is supported by this "),Er=r(Bo,"A",{href:!0,rel:!0});var Hm=i(Er);kk=n(Hm,"example script"),Hm.forEach(t),vk=n(Bo," and "),Mr=r(Bo,"A",{href:!0,rel:!0});var Qm=i(Mr);yk=n(Qm,"notebook"),Qm.forEach(t),wk=n(Bo,"."),Bo.forEach(t),Tk=p($o),ss=r($o,"LI",{});var Wa=i(ss);Ac=r(Wa,"A",{href:!0});var zE=i(Ac);$k=n(zE,"FlaxRobertaForTokenClassification"),zE.forEach(t),Fk=n(Wa," is supported by this "),zr=r(Wa,"A",{href:!0,rel:!0});var qE=i(zr);xk=n(qE,"example script"),qE.forEach(t),Rk=n(Wa,"."),Wa.forEach(t),Ek=p($o),Lc=r($o,"LI",{});var FE=i(Lc);qr=r(FE,"A",{href:!0,rel:!0});var CE=i(qr);Mk=n(CE,"Token classification"),CE.forEach(t),zk=n(FE," chapter of the \u{1F917} Hugging Face Course."),FE.forEach(t),$o.forEach(t),Zm=p(s),w(Cr.$$.fragment,s),eg=p(s),Et=r(s,"UL",{});var Wo=i(Et);jr=r(Wo,"LI",{});var e_=i(jr);qk=n(e_,"A blog on "),Pr=r(e_,"A",{href:!0,rel:!0});var jE=i(Pr);Ck=n(jE,"How to train a new language model from scratch using Transformers and Tokenizers"),jE.forEach(t),jk=n(e_," with RoBERTa."),e_.forEach(t),Pk=p(Wo),zo=r(Wo,"LI",{});var wc=i(zo);Oc=r(wc,"A",{href:!0});var PE=i(Oc);Ak=n(PE,"RobertaForMaskedLM"),PE.forEach(t),Lk=n(wc," is supported by this "),Ar=r(wc,"A",{href:!0,rel:!0});var AE=i(Ar);Ok=n(AE,"example script"),AE.forEach(t),Nk=n(wc," and "),Lr=r(wc,"A",{href:!0,rel:!0});var LE=i(Lr);Ik=n(LE,"notebook"),LE.forEach(t),Dk=n(wc,"."),wc.forEach(t),Sk=p(Wo),qo=r(Wo,"LI",{});var Tc=i(qo);Nc=r(Tc,"A",{href:!0});var OE=i(Nc);Bk=n(OE,"TFRobertaForMaskedLM"),OE.forEach(t),Wk=n(Tc," is supported by this "),Or=r(Tc,"A",{href:!0,rel:!0});var NE=i(Or);Uk=n(NE,"example script"),NE.forEach(t),Hk=n(Tc," and "),Nr=r(Tc,"A",{href:!0,rel:!0});var IE=i(Nr);Qk=n(IE,"notebook"),IE.forEach(t),Kk=n(Tc,"."),Tc.forEach(t),Jk=p(Wo),Co=r(Wo,"LI",{});var $c=i(Co);Ic=r($c,"A",{href:!0});var DE=i(Ic);Vk=n(DE,"FlaxRobertaForMaskedLM"),DE.forEach(t),Gk=n($c," is supported by this "),Ir=r($c,"A",{href:!0,rel:!0});var SE=i(Ir);Xk=n(SE,"example script"),SE.forEach(t),Yk=n($c," and "),Dr=r($c,"A",{href:!0,rel:!0});var BE=i(Dr);Zk=n(BE,"notebook"),BE.forEach(t),ev=n($c,"."),$c.forEach(t),tv=p(Wo),Dc=r(Wo,"LI",{});var xE=i(Dc);Sr=r(xE,"A",{href:!0,rel:!0});var WE=i(Sr);ov=n(WE,"Masked language modeling"),WE.forEach(t),nv=n(xE," chapter of the \u{1F917} Hugging Face Course."),xE.forEach(t),Wo.forEach(t),tg=p(s),w(Br.$$.fragment,s),og=p(s),Mt=r(s,"UL",{});var Uo=i(Mt);Wr=r(Uo,"LI",{});var t_=i(Wr);sv=n(t_,"A blog on "),Ur=r(t_,"A",{href:!0,rel:!0});var UE=i(Ur);av=n(UE,"Accelerated Inference with Optimum and Transformers Pipelines"),UE.forEach(t),rv=n(t_," with RoBERTa for question answering."),t_.forEach(t),iv=p(Uo),jo=r(Uo,"LI",{});var Fc=i(jo);Sc=r(Fc,"A",{href:!0});var HE=i(Sc);lv=n(HE,"RobertaForQuestionAnswering"),HE.forEach(t),dv=n(Fc," is supported by this "),Hr=r(Fc,"A",{href:!0,rel:!0});var QE=i(Hr);cv=n(QE,"example script"),QE.forEach(t),pv=n(Fc," and "),Qr=r(Fc,"A",{href:!0,rel:!0});var KE=i(Qr);hv=n(KE,"notebook"),KE.forEach(t),uv=n(Fc,"."),Fc.forEach(t),fv=p(Uo),Po=r(Uo,"LI",{});var xc=i(Po);Bc=r(xc,"A",{href:!0});var JE=i(Bc);mv=n(JE,"TFRobertaForQuestionAnswering"),JE.forEach(t),gv=n(xc," is supported by this "),Kr=r(xc,"A",{href:!0,rel:!0});var VE=i(Kr);_v=n(VE,"example script"),VE.forEach(t),bv=n(xc," and "),Jr=r(xc,"A",{href:!0,rel:!0});var GE=i(Jr);kv=n(GE,"notebook"),GE.forEach(t),vv=n(xc,"."),xc.forEach(t),yv=p(Uo),as=r(Uo,"LI",{});var Km=i(as);Wc=r(Km,"A",{href:!0});var XE=i(Wc);wv=n(XE,"FlaxRobertaForQuestionAnswering"),XE.forEach(t),Tv=n(Km," is supported by this "),Vr=r(Km,"A",{href:!0,rel:!0});var YE=i(Vr);$v=n(YE,"example script"),YE.forEach(t),Fv=n(Km,"."),Km.forEach(t),xv=p(Uo),Uc=r(Uo,"LI",{});var RE=i(Uc);Gr=r(RE,"A",{href:!0,rel:!0});var ZE=i(Gr);Rv=n(ZE,"Question answering"),ZE.forEach(t),Ev=n(RE," chapter of the \u{1F917} Hugging Face Course."),RE.forEach(t),Uo.forEach(t),ng=p(s),Hc=r(s,"P",{});var eM=i(Hc);ph=r(eM,"STRONG",{});var tM=i(ph);Mv=n(tM,"Multiple choice"),tM.forEach(t),eM.forEach(t),sg=p(s),rs=r(s,"UL",{});var o_=i(rs);Ao=r(o_,"LI",{});var Rc=i(Ao);Qc=r(Rc,"A",{href:!0});var oM=i(Qc);zv=n(oM,"RobertaForMultipleChoice"),oM.forEach(t),qv=n(Rc," is supported by this "),Xr=r(Rc,"A",{href:!0,rel:!0});var nM=i(Xr);Cv=n(nM,"example script"),nM.forEach(t),jv=n(Rc," and "),Yr=r(Rc,"A",{href:!0,rel:!0});var sM=i(Yr);Pv=n(sM,"notebook"),sM.forEach(t),Av=n(Rc,"."),Rc.forEach(t),Lv=p(o_),Lo=r(o_,"LI",{});var Ec=i(Lo);Kc=r(Ec,"A",{href:!0});var aM=i(Kc);Ov=n(aM,"TFRobertaForMultipleChoice"),aM.forEach(t),Nv=n(Ec," is supported by this "),Zr=r(Ec,"A",{href:!0,rel:!0});var rM=i(Zr);Iv=n(rM,"example script"),rM.forEach(t),Dv=n(Ec," and "),ei=r(Ec,"A",{href:!0,rel:!0});var iM=i(ei);Sv=n(iM,"notebook"),iM.forEach(t),Bv=n(Ec,"."),Ec.forEach(t),o_.forEach(t),ag=p(s),an=r(s,"H2",{class:!0});var n_=i(an);is=r(n_,"A",{id:!0,class:!0,href:!0});var lM=i(is);hh=r(lM,"SPAN",{});var dM=i(hh);w(ti.$$.fragment,dM),dM.forEach(t),lM.forEach(t),Wv=p(n_),uh=r(n_,"SPAN",{});var cM=i(uh);Uv=n(cM,"RobertaConfig"),cM.forEach(t),n_.forEach(t),rg=p(s),Qt=r(s,"DIV",{class:!0});var Ua=i(Qt);w(oi.$$.fragment,Ua),Hv=p(Ua),fo=r(Ua,"P",{});var Ha=i(fo);Qv=n(Ha,"This is the configuration class to store the configuration of a "),Jc=r(Ha,"A",{href:!0});var pM=i(Jc);Kv=n(pM,"RobertaModel"),pM.forEach(t),Jv=n(Ha," or a "),Vc=r(Ha,"A",{href:!0});var hM=i(Vc);Vv=n(hM,"TFRobertaModel"),hM.forEach(t),Gv=n(Ha,`. 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
`),ni=r(Ha,"A",{href:!0,rel:!0});var uM=i(ni);Xv=n(uM,"roberta-base"),uM.forEach(t),Yv=n(Ha," architecture."),Ha.forEach(t),Zv=p(Ua),rn=r(Ua,"P",{});var Ip=i(rn);ey=n(Ip,"Configuration objects inherit from "),Gc=r(Ip,"A",{href:!0});var fM=i(Gc);ty=n(fM,"PretrainedConfig"),fM.forEach(t),oy=n(Ip,` and can be used to control the model outputs. Read the
documentation from `),Xc=r(Ip,"A",{href:!0});var mM=i(Xc);ny=n(mM,"PretrainedConfig"),mM.forEach(t),sy=n(Ip," for more information."),Ip.forEach(t),ay=p(Ua),w(ls.$$.fragment,Ua),Ua.forEach(t),ig=p(s),ln=r(s,"H2",{class:!0});var s_=i(ln);ds=r(s_,"A",{id:!0,class:!0,href:!0});var gM=i(ds);fh=r(gM,"SPAN",{});var _M=i(fh);w(si.$$.fragment,_M),_M.forEach(t),gM.forEach(t),ry=p(s_),mh=r(s_,"SPAN",{});var bM=i(mh);iy=n(bM,"RobertaTokenizer"),bM.forEach(t),s_.forEach(t),lg=p(s),Ie=r(s,"DIV",{class:!0});var Ge=i(Ie);w(ai.$$.fragment,Ge),ly=p(Ge),gh=r(Ge,"P",{});var kM=i(gh);dy=n(kM,"Constructs a RoBERTa tokenizer, derived from the GPT-2 tokenizer, using byte-level Byte-Pair-Encoding."),kM.forEach(t),cy=p(Ge),_h=r(Ge,"P",{});var vM=i(_h);py=n(vM,"This tokenizer has been trained to treat spaces like parts of the tokens (a bit like sentencepiece) so a word will"),vM.forEach(t),hy=p(Ge),w(cs.$$.fragment,Ge),uy=p(Ge),ri=r(Ge,"P",{});var a_=i(ri);fy=n(a_,"You can get around that behavior by passing "),bh=r(a_,"CODE",{});var yM=i(bh);my=n(yM,"add_prefix_space=True"),yM.forEach(t),gy=n(a_,` when instantiating this tokenizer or when you
call it on some text, but since the model was not pretrained this way, it might yield a decrease in performance.`),a_.forEach(t),_y=p(Ge),w(ps.$$.fragment,Ge),by=p(Ge),ii=r(Ge,"P",{});var r_=i(ii);ky=n(r_,"This tokenizer inherits from "),Yc=r(r_,"A",{href:!0});var wM=i(Yc);vy=n(wM,"PreTrainedTokenizer"),wM.forEach(t),yy=n(r_,` which contains most of the main methods. Users should refer to
this superclass for more information regarding those methods.`),r_.forEach(t),wy=p(Ge),Oo=r(Ge,"DIV",{class:!0});var Dp=i(Oo);w(li.$$.fragment,Dp),Ty=p(Dp),kh=r(Dp,"P",{});var TM=i(kh);$y=n(TM,`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:`),TM.forEach(t),Fy=p(Dp),di=r(Dp,"UL",{});var i_=i(di);Zc=r(i_,"LI",{});var EE=i(Zc);xy=n(EE,"single sequence: "),vh=r(EE,"CODE",{});var $M=i(vh);Ry=n($M,"<s> X </s>"),$M.forEach(t),EE.forEach(t),Ey=p(i_),ep=r(i_,"LI",{});var ME=i(ep);My=n(ME,"pair of sequences: "),yh=r(ME,"CODE",{});var FM=i(yh);zy=n(FM,"<s> A </s></s> B </s>"),FM.forEach(t),ME.forEach(t),i_.forEach(t),Dp.forEach(t),qy=p(Ge),hs=r(Ge,"DIV",{class:!0});var l_=i(hs);w(ci.$$.fragment,l_),Cy=p(l_),pi=r(l_,"P",{});var d_=i(pi);jy=n(d_,`Retrieve sequence ids from a token list that has no special tokens added. This method is called when adding
special tokens using the tokenizer `),wh=r(d_,"CODE",{});var xM=i(wh);Py=n(xM,"prepare_for_model"),xM.forEach(t),Ay=n(d_," method."),d_.forEach(t),l_.forEach(t),Ly=p(Ge),us=r(Ge,"DIV",{class:!0});var c_=i(us);w(hi.$$.fragment,c_),Oy=p(c_),Th=r(c_,"P",{});var RM=i(Th);Ny=n(RM,`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.`),RM.forEach(t),c_.forEach(t),Iy=p(Ge),tp=r(Ge,"DIV",{class:!0});var EM=i(tp);w(ui.$$.fragment,EM),EM.forEach(t),Ge.forEach(t),dg=p(s),dn=r(s,"H2",{class:!0});var p_=i(dn);fs=r(p_,"A",{id:!0,class:!0,href:!0});var MM=i(fs);$h=r(MM,"SPAN",{});var zM=i($h);w(fi.$$.fragment,zM),zM.forEach(t),MM.forEach(t),Dy=p(p_),Fh=r(p_,"SPAN",{});var qM=i(Fh);Sy=n(qM,"RobertaTokenizerFast"),qM.forEach(t),p_.forEach(t),cg=p(s),tt=r(s,"DIV",{class:!0});var kt=i(tt);w(mi.$$.fragment,kt),By=p(kt),gi=r(kt,"P",{});var h_=i(gi);Wy=n(h_,"Construct a \u201Cfast\u201D RoBERTa tokenizer (backed by HuggingFace\u2019s "),xh=r(h_,"EM",{});var CM=i(xh);Uy=n(CM,"tokenizers"),CM.forEach(t),Hy=n(h_,` library), derived from the GPT-2
tokenizer, using byte-level Byte-Pair-Encoding.`),h_.forEach(t),Qy=p(kt),Rh=r(kt,"P",{});var jM=i(Rh);Ky=n(jM,"This tokenizer has been trained to treat spaces like parts of the tokens (a bit like sentencepiece) so a word will"),jM.forEach(t),Jy=p(kt),w(ms.$$.fragment,kt),Vy=p(kt),_i=r(kt,"P",{});var u_=i(_i);Gy=n(u_,"You can get around that behavior by passing "),Eh=r(u_,"CODE",{});var PM=i(Eh);Xy=n(PM,"add_prefix_space=True"),PM.forEach(t),Yy=n(u_,` 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.`),u_.forEach(t),Zy=p(kt),w(gs.$$.fragment,kt),ew=p(kt),bi=r(kt,"P",{});var f_=i(bi);tw=n(f_,"This tokenizer inherits from "),op=r(f_,"A",{href:!0});var AM=i(op);ow=n(AM,"PreTrainedTokenizerFast"),AM.forEach(t),nw=n(f_,` which contains most of the main methods. Users should
refer to this superclass for more information regarding those methods.`),f_.forEach(t),sw=p(kt),np=r(kt,"DIV",{class:!0});var LM=i(np);w(ki.$$.fragment,LM),LM.forEach(t),kt.forEach(t),pg=p(s),cn=r(s,"H2",{class:!0});var m_=i(cn);_s=r(m_,"A",{id:!0,class:!0,href:!0});var OM=i(_s);Mh=r(OM,"SPAN",{});var NM=i(Mh);w(vi.$$.fragment,NM),NM.forEach(t),OM.forEach(t),aw=p(m_),zh=r(m_,"SPAN",{});var IM=i(zh);rw=n(IM,"RobertaModel"),IM.forEach(t),m_.forEach(t),hg=p(s),ot=r(s,"DIV",{class:!0});var vt=i(ot);w(yi.$$.fragment,vt),iw=p(vt),qh=r(vt,"P",{});var DM=i(qh);lw=n(DM,"The bare RoBERTa Model transformer outputting raw hidden-states without any specific head on top."),DM.forEach(t),dw=p(vt),wi=r(vt,"P",{});var g_=i(wi);cw=n(g_,"This model inherits from "),sp=r(g_,"A",{href:!0});var SM=i(sp);pw=n(SM,"PreTrainedModel"),SM.forEach(t),hw=n(g_,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),g_.forEach(t),uw=p(vt),Ti=r(vt,"P",{});var __=i(Ti);fw=n(__,"This model is also a PyTorch "),$i=r(__,"A",{href:!0,rel:!0});var BM=i($i);mw=n(BM,"torch.nn.Module"),BM.forEach(t),gw=n(__,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),__.forEach(t),_w=p(vt),Fi=r(vt,"P",{});var b_=i(Fi);bw=n(b_,`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 `),Ch=r(b_,"EM",{});var WM=i(Ch);kw=n(WM,`Attention is
all you need`),WM.forEach(t),vw=n(b_,`_ by Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N. Gomez, Lukasz
Kaiser and Illia Polosukhin.`),b_.forEach(t),yw=p(vt),pt=r(vt,"P",{});var Ot=i(pt);ww=n(Ot,"To behave as an decoder the model needs to be initialized with the "),jh=r(Ot,"CODE",{});var UM=i(jh);Tw=n(UM,"is_decoder"),UM.forEach(t),$w=n(Ot,` argument of the configuration set
to `),Ph=r(Ot,"CODE",{});var HM=i(Ph);Fw=n(HM,"True"),HM.forEach(t),xw=n(Ot,". To be used in a Seq2Seq model, the model needs to initialized with both "),Ah=r(Ot,"CODE",{});var QM=i(Ah);Rw=n(QM,"is_decoder"),QM.forEach(t),Ew=n(Ot,` argument and
`),Lh=r(Ot,"CODE",{});var KM=i(Lh);Mw=n(KM,"add_cross_attention"),KM.forEach(t),zw=n(Ot," set to "),Oh=r(Ot,"CODE",{});var JM=i(Oh);qw=n(JM,"True"),JM.forEach(t),Cw=n(Ot,"; an "),Nh=r(Ot,"CODE",{});var VM=i(Nh);jw=n(VM,"encoder_hidden_states"),VM.forEach(t),Pw=n(Ot," is then expected as an input to the forward pass."),Ot.forEach(t),Aw=p(vt),bs=r(vt,"P",{});var Jm=i(bs);Lw=n(Jm,".. _"),Ih=r(Jm,"EM",{});var GM=i(Ih);Ow=n(GM,"Attention is all you need"),GM.forEach(t),Nw=n(Jm,": "),xi=r(Jm,"A",{href:!0,rel:!0});var XM=i(xi);Iw=n(XM,"https://arxiv.org/abs/1706.03762"),XM.forEach(t),Jm.forEach(t),Dw=p(vt),Jt=r(vt,"DIV",{class:!0});var Qa=i(Jt);w(Ri.$$.fragment,Qa),Sw=p(Qa),pn=r(Qa,"P",{});var Sp=i(pn);Bw=n(Sp,"The "),ap=r(Sp,"A",{href:!0});var YM=i(ap);Ww=n(YM,"RobertaModel"),YM.forEach(t),Uw=n(Sp," forward method, overrides the "),Dh=r(Sp,"CODE",{});var ZM=i(Dh);Hw=n(ZM,"__call__"),ZM.forEach(t),Qw=n(Sp," special method."),Sp.forEach(t),Kw=p(Qa),w(ks.$$.fragment,Qa),Jw=p(Qa),w(vs.$$.fragment,Qa),Qa.forEach(t),vt.forEach(t),ug=p(s),hn=r(s,"H2",{class:!0});var k_=i(hn);ys=r(k_,"A",{id:!0,class:!0,href:!0});var e5=i(ys);Sh=r(e5,"SPAN",{});var t5=i(Sh);w(Ei.$$.fragment,t5),t5.forEach(t),e5.forEach(t),Vw=p(k_),Bh=r(k_,"SPAN",{});var o5=i(Bh);Gw=n(o5,"RobertaForCausalLM"),o5.forEach(t),k_.forEach(t),fg=p(s),yt=r(s,"DIV",{class:!0});var Ho=i(yt);w(Mi.$$.fragment,Ho),Xw=p(Ho),zi=r(Ho,"P",{});var v_=i(zi);Yw=n(v_,"RoBERTa Model with a "),Wh=r(v_,"CODE",{});var n5=i(Wh);Zw=n(n5,"language modeling"),n5.forEach(t),eT=n(v_," head on top for CLM fine-tuning."),v_.forEach(t),tT=p(Ho),qi=r(Ho,"P",{});var y_=i(qi);oT=n(y_,"This model inherits from "),rp=r(y_,"A",{href:!0});var s5=i(rp);nT=n(s5,"PreTrainedModel"),s5.forEach(t),sT=n(y_,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),y_.forEach(t),aT=p(Ho),Ci=r(Ho,"P",{});var w_=i(Ci);rT=n(w_,"This model is also a PyTorch "),ji=r(w_,"A",{href:!0,rel:!0});var a5=i(ji);iT=n(a5,"torch.nn.Module"),a5.forEach(t),lT=n(w_,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),w_.forEach(t),dT=p(Ho),Vt=r(Ho,"DIV",{class:!0});var Ka=i(Vt);w(Pi.$$.fragment,Ka),cT=p(Ka),un=r(Ka,"P",{});var Bp=i(un);pT=n(Bp,"The "),ip=r(Bp,"A",{href:!0});var r5=i(ip);hT=n(r5,"RobertaForCausalLM"),r5.forEach(t),uT=n(Bp," forward method, overrides the "),Uh=r(Bp,"CODE",{});var i5=i(Uh);fT=n(i5,"__call__"),i5.forEach(t),mT=n(Bp," special method."),Bp.forEach(t),gT=p(Ka),w(ws.$$.fragment,Ka),_T=p(Ka),w(Ts.$$.fragment,Ka),Ka.forEach(t),Ho.forEach(t),mg=p(s),fn=r(s,"H2",{class:!0});var T_=i(fn);$s=r(T_,"A",{id:!0,class:!0,href:!0});var l5=i($s);Hh=r(l5,"SPAN",{});var d5=i(Hh);w(Ai.$$.fragment,d5),d5.forEach(t),l5.forEach(t),bT=p(T_),Qh=r(T_,"SPAN",{});var c5=i(Qh);kT=n(c5,"RobertaForMaskedLM"),c5.forEach(t),T_.forEach(t),gg=p(s),wt=r(s,"DIV",{class:!0});var Qo=i(wt);w(Li.$$.fragment,Qo),vT=p(Qo),Oi=r(Qo,"P",{});var $_=i(Oi);yT=n($_,"RoBERTa Model with a "),Kh=r($_,"CODE",{});var p5=i(Kh);wT=n(p5,"language modeling"),p5.forEach(t),TT=n($_," head on top."),$_.forEach(t),$T=p(Qo),Ni=r(Qo,"P",{});var F_=i(Ni);FT=n(F_,"This model inherits from "),lp=r(F_,"A",{href:!0});var h5=i(lp);xT=n(h5,"PreTrainedModel"),h5.forEach(t),RT=n(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),ET=p(Qo),Ii=r(Qo,"P",{});var x_=i(Ii);MT=n(x_,"This model is also a PyTorch "),Di=r(x_,"A",{href:!0,rel:!0});var u5=i(Di);zT=n(u5,"torch.nn.Module"),u5.forEach(t),qT=n(x_,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),x_.forEach(t),CT=p(Qo),zt=r(Qo,"DIV",{class:!0});var Ko=i(zt);w(Si.$$.fragment,Ko),jT=p(Ko),mn=r(Ko,"P",{});var Wp=i(mn);PT=n(Wp,"The "),dp=r(Wp,"A",{href:!0});var f5=i(dp);AT=n(f5,"RobertaForMaskedLM"),f5.forEach(t),LT=n(Wp," forward method, overrides the "),Jh=r(Wp,"CODE",{});var m5=i(Jh);OT=n(m5,"__call__"),m5.forEach(t),NT=n(Wp," special method."),Wp.forEach(t),IT=p(Ko),w(Fs.$$.fragment,Ko),DT=p(Ko),w(xs.$$.fragment,Ko),ST=p(Ko),w(Rs.$$.fragment,Ko),Ko.forEach(t),Qo.forEach(t),_g=p(s),gn=r(s,"H2",{class:!0});var R_=i(gn);Es=r(R_,"A",{id:!0,class:!0,href:!0});var g5=i(Es);Vh=r(g5,"SPAN",{});var _5=i(Vh);w(Bi.$$.fragment,_5),_5.forEach(t),g5.forEach(t),BT=p(R_),Gh=r(R_,"SPAN",{});var b5=i(Gh);WT=n(b5,"RobertaForSequenceClassification"),b5.forEach(t),R_.forEach(t),bg=p(s),Tt=r(s,"DIV",{class:!0});var Jo=i(Tt);w(Wi.$$.fragment,Jo),UT=p(Jo),Xh=r(Jo,"P",{});var k5=i(Xh);HT=n(k5,`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.`),k5.forEach(t),QT=p(Jo),Ui=r(Jo,"P",{});var E_=i(Ui);KT=n(E_,"This model inherits from "),cp=r(E_,"A",{href:!0});var v5=i(cp);JT=n(v5,"PreTrainedModel"),v5.forEach(t),VT=n(E_,`. 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.)`),E_.forEach(t),GT=p(Jo),Hi=r(Jo,"P",{});var M_=i(Hi);XT=n(M_,"This model is also a PyTorch "),Qi=r(M_,"A",{href:!0,rel:!0});var y5=i(Qi);YT=n(y5,"torch.nn.Module"),y5.forEach(t),ZT=n(M_,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),M_.forEach(t),e1=p(Jo),ct=r(Jo,"DIV",{class:!0});var Nt=i(ct);w(Ki.$$.fragment,Nt),t1=p(Nt),_n=r(Nt,"P",{});var Up=i(_n);o1=n(Up,"The "),pp=r(Up,"A",{href:!0});var w5=i(pp);n1=n(w5,"RobertaForSequenceClassification"),w5.forEach(t),s1=n(Up," forward method, overrides the "),Yh=r(Up,"CODE",{});var T5=i(Yh);a1=n(T5,"__call__"),T5.forEach(t),r1=n(Up," special method."),Up.forEach(t),i1=p(Nt),w(Ms.$$.fragment,Nt),l1=p(Nt),w(zs.$$.fragment,Nt),d1=p(Nt),w(qs.$$.fragment,Nt),c1=p(Nt),w(Cs.$$.fragment,Nt),p1=p(Nt),w(js.$$.fragment,Nt),Nt.forEach(t),Jo.forEach(t),kg=p(s),bn=r(s,"H2",{class:!0});var z_=i(bn);Ps=r(z_,"A",{id:!0,class:!0,href:!0});var $5=i(Ps);Zh=r($5,"SPAN",{});var F5=i(Zh);w(Ji.$$.fragment,F5),F5.forEach(t),$5.forEach(t),h1=p(z_),eu=r(z_,"SPAN",{});var x5=i(eu);u1=n(x5,"RobertaForMultipleChoice"),x5.forEach(t),z_.forEach(t),vg=p(s),$t=r(s,"DIV",{class:!0});var Vo=i($t);w(Vi.$$.fragment,Vo),f1=p(Vo),tu=r(Vo,"P",{});var R5=i(tu);m1=n(R5,`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.`),R5.forEach(t),g1=p(Vo),Gi=r(Vo,"P",{});var q_=i(Gi);_1=n(q_,"This model inherits from "),hp=r(q_,"A",{href:!0});var E5=i(hp);b1=n(E5,"PreTrainedModel"),E5.forEach(t),k1=n(q_,`. 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.)`),q_.forEach(t),v1=p(Vo),Xi=r(Vo,"P",{});var C_=i(Xi);y1=n(C_,"This model is also a PyTorch "),Yi=r(C_,"A",{href:!0,rel:!0});var M5=i(Yi);w1=n(M5,"torch.nn.Module"),M5.forEach(t),T1=n(C_,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),C_.forEach(t),$1=p(Vo),Gt=r(Vo,"DIV",{class:!0});var Ja=i(Gt);w(Zi.$$.fragment,Ja),F1=p(Ja),kn=r(Ja,"P",{});var Hp=i(kn);x1=n(Hp,"The "),up=r(Hp,"A",{href:!0});var z5=i(up);R1=n(z5,"RobertaForMultipleChoice"),z5.forEach(t),E1=n(Hp," forward method, overrides the "),ou=r(Hp,"CODE",{});var q5=i(ou);M1=n(q5,"__call__"),q5.forEach(t),z1=n(Hp," special method."),Hp.forEach(t),q1=p(Ja),w(As.$$.fragment,Ja),C1=p(Ja),w(Ls.$$.fragment,Ja),Ja.forEach(t),Vo.forEach(t),yg=p(s),vn=r(s,"H2",{class:!0});var j_=i(vn);Os=r(j_,"A",{id:!0,class:!0,href:!0});var C5=i(Os);nu=r(C5,"SPAN",{});var j5=i(nu);w(el.$$.fragment,j5),j5.forEach(t),C5.forEach(t),j1=p(j_),su=r(j_,"SPAN",{});var P5=i(su);P1=n(P5,"RobertaForTokenClassification"),P5.forEach(t),j_.forEach(t),wg=p(s),Ft=r(s,"DIV",{class:!0});var Go=i(Ft);w(tl.$$.fragment,Go),A1=p(Go),au=r(Go,"P",{});var A5=i(au);L1=n(A5,`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.`),A5.forEach(t),O1=p(Go),ol=r(Go,"P",{});var P_=i(ol);N1=n(P_,"This model inherits from "),fp=r(P_,"A",{href:!0});var L5=i(fp);I1=n(L5,"PreTrainedModel"),L5.forEach(t),D1=n(P_,`. 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.)`),P_.forEach(t),S1=p(Go),nl=r(Go,"P",{});var A_=i(nl);B1=n(A_,"This model is also a PyTorch "),sl=r(A_,"A",{href:!0,rel:!0});var O5=i(sl);W1=n(O5,"torch.nn.Module"),O5.forEach(t),U1=n(A_,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),A_.forEach(t),H1=p(Go),qt=r(Go,"DIV",{class:!0});var Xo=i(qt);w(al.$$.fragment,Xo),Q1=p(Xo),yn=r(Xo,"P",{});var Qp=i(yn);K1=n(Qp,"The "),mp=r(Qp,"A",{href:!0});var N5=i(mp);J1=n(N5,"RobertaForTokenClassification"),N5.forEach(t),V1=n(Qp," forward method, overrides the "),ru=r(Qp,"CODE",{});var I5=i(ru);G1=n(I5,"__call__"),I5.forEach(t),X1=n(Qp," special method."),Qp.forEach(t),Y1=p(Xo),w(Ns.$$.fragment,Xo),Z1=p(Xo),w(Is.$$.fragment,Xo),e$=p(Xo),w(Ds.$$.fragment,Xo),Xo.forEach(t),Go.forEach(t),Tg=p(s),wn=r(s,"H2",{class:!0});var L_=i(wn);Ss=r(L_,"A",{id:!0,class:!0,href:!0});var D5=i(Ss);iu=r(D5,"SPAN",{});var S5=i(iu);w(rl.$$.fragment,S5),S5.forEach(t),D5.forEach(t),t$=p(L_),lu=r(L_,"SPAN",{});var B5=i(lu);o$=n(B5,"RobertaForQuestionAnswering"),B5.forEach(t),L_.forEach(t),$g=p(s),xt=r(s,"DIV",{class:!0});var Yo=i(xt);w(il.$$.fragment,Yo),n$=p(Yo),Tn=r(Yo,"P",{});var Kp=i(Tn);s$=n(Kp,`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 `),du=r(Kp,"CODE",{});var W5=i(du);a$=n(W5,"span start logits"),W5.forEach(t),r$=n(Kp," and "),cu=r(Kp,"CODE",{});var U5=i(cu);i$=n(U5,"span end logits"),U5.forEach(t),l$=n(Kp,")."),Kp.forEach(t),d$=p(Yo),ll=r(Yo,"P",{});var O_=i(ll);c$=n(O_,"This model inherits from "),gp=r(O_,"A",{href:!0});var H5=i(gp);p$=n(H5,"PreTrainedModel"),H5.forEach(t),h$=n(O_,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),O_.forEach(t),u$=p(Yo),dl=r(Yo,"P",{});var N_=i(dl);f$=n(N_,"This model is also a PyTorch "),cl=r(N_,"A",{href:!0,rel:!0});var Q5=i(cl);m$=n(Q5,"torch.nn.Module"),Q5.forEach(t),g$=n(N_,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),N_.forEach(t),_$=p(Yo),Ct=r(Yo,"DIV",{class:!0});var Zo=i(Ct);w(pl.$$.fragment,Zo),b$=p(Zo),$n=r(Zo,"P",{});var Jp=i($n);k$=n(Jp,"The "),_p=r(Jp,"A",{href:!0});var K5=i(_p);v$=n(K5,"RobertaForQuestionAnswering"),K5.forEach(t),y$=n(Jp," forward method, overrides the "),pu=r(Jp,"CODE",{});var J5=i(pu);w$=n(J5,"__call__"),J5.forEach(t),T$=n(Jp," special method."),Jp.forEach(t),$$=p(Zo),w(Bs.$$.fragment,Zo),F$=p(Zo),w(Ws.$$.fragment,Zo),x$=p(Zo),w(Us.$$.fragment,Zo),Zo.forEach(t),Yo.forEach(t),Fg=p(s),Fn=r(s,"H2",{class:!0});var I_=i(Fn);Hs=r(I_,"A",{id:!0,class:!0,href:!0});var V5=i(Hs);hu=r(V5,"SPAN",{});var G5=i(hu);w(hl.$$.fragment,G5),G5.forEach(t),V5.forEach(t),R$=p(I_),uu=r(I_,"SPAN",{});var X5=i(uu);E$=n(X5,"TFRobertaModel"),X5.forEach(t),I_.forEach(t),xg=p(s),ht=r(s,"DIV",{class:!0});var io=i(ht);w(ul.$$.fragment,io),M$=p(io),fu=r(io,"P",{});var Y5=i(fu);z$=n(Y5,"The bare RoBERTa Model transformer outputting raw hidden-states without any specific head on top."),Y5.forEach(t),q$=p(io),fl=r(io,"P",{});var D_=i(fl);C$=n(D_,"This model inherits from "),bp=r(D_,"A",{href:!0});var Z5=i(bp);j$=n(Z5,"TFPreTrainedModel"),Z5.forEach(t),P$=n(D_,`. 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.)`),D_.forEach(t),A$=p(io),ml=r(io,"P",{});var S_=i(ml);L$=n(S_,"This model is also a "),gl=r(S_,"A",{href:!0,rel:!0});var ez=i(gl);O$=n(ez,"tf.keras.Model"),ez.forEach(t),N$=n(S_,` 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.`),S_.forEach(t),I$=p(io),w(Qs.$$.fragment,io),D$=p(io),Xt=r(io,"DIV",{class:!0});var Va=i(Xt);w(_l.$$.fragment,Va),S$=p(Va),xn=r(Va,"P",{});var Vp=i(xn);B$=n(Vp,"The "),kp=r(Vp,"A",{href:!0});var tz=i(kp);W$=n(tz,"TFRobertaModel"),tz.forEach(t),U$=n(Vp," forward method, overrides the "),mu=r(Vp,"CODE",{});var oz=i(mu);H$=n(oz,"__call__"),oz.forEach(t),Q$=n(Vp," special method."),Vp.forEach(t),K$=p(Va),w(Ks.$$.fragment,Va),J$=p(Va),w(Js.$$.fragment,Va),Va.forEach(t),io.forEach(t),Rg=p(s),Rn=r(s,"H2",{class:!0});var B_=i(Rn);Vs=r(B_,"A",{id:!0,class:!0,href:!0});var nz=i(Vs);gu=r(nz,"SPAN",{});var sz=i(gu);w(bl.$$.fragment,sz),sz.forEach(t),nz.forEach(t),V$=p(B_),_u=r(B_,"SPAN",{});var az=i(_u);G$=n(az,"TFRobertaForCausalLM"),az.forEach(t),B_.forEach(t),Eg=p(s),En=r(s,"DIV",{class:!0});var W_=i(En);w(kl.$$.fragment,W_),X$=p(W_),Yt=r(W_,"DIV",{class:!0});var Ga=i(Yt);w(vl.$$.fragment,Ga),Y$=p(Ga),Mn=r(Ga,"P",{});var Gp=i(Mn);Z$=n(Gp,"The "),vp=r(Gp,"A",{href:!0});var rz=i(vp);e2=n(rz,"TFRobertaForCausalLM"),rz.forEach(t),t2=n(Gp," forward method, overrides the "),bu=r(Gp,"CODE",{});var iz=i(bu);o2=n(iz,"__call__"),iz.forEach(t),n2=n(Gp," special method."),Gp.forEach(t),s2=p(Ga),w(Gs.$$.fragment,Ga),a2=p(Ga),w(Xs.$$.fragment,Ga),Ga.forEach(t),W_.forEach(t),Mg=p(s),zn=r(s,"H2",{class:!0});var U_=i(zn);Ys=r(U_,"A",{id:!0,class:!0,href:!0});var lz=i(Ys);ku=r(lz,"SPAN",{});var dz=i(ku);w(yl.$$.fragment,dz),dz.forEach(t),lz.forEach(t),r2=p(U_),vu=r(U_,"SPAN",{});var cz=i(vu);i2=n(cz,"TFRobertaForMaskedLM"),cz.forEach(t),U_.forEach(t),zg=p(s),ut=r(s,"DIV",{class:!0});var lo=i(ut);w(wl.$$.fragment,lo),l2=p(lo),Tl=r(lo,"P",{});var H_=i(Tl);d2=n(H_,"RoBERTa Model with a "),yu=r(H_,"CODE",{});var pz=i(yu);c2=n(pz,"language modeling"),pz.forEach(t),p2=n(H_," head on top."),H_.forEach(t),h2=p(lo),$l=r(lo,"P",{});var Q_=i($l);u2=n(Q_,"This model inherits from "),yp=r(Q_,"A",{href:!0});var hz=i(yp);f2=n(hz,"TFPreTrainedModel"),hz.forEach(t),m2=n(Q_,`. 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.)`),Q_.forEach(t),g2=p(lo),Fl=r(lo,"P",{});var K_=i(Fl);_2=n(K_,"This model is also a "),xl=r(K_,"A",{href:!0,rel:!0});var uz=i(xl);b2=n(uz,"tf.keras.Model"),uz.forEach(t),k2=n(K_,` 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.`),K_.forEach(t),v2=p(lo),w(Zs.$$.fragment,lo),y2=p(lo),jt=r(lo,"DIV",{class:!0});var en=i(jt);w(Rl.$$.fragment,en),w2=p(en),qn=r(en,"P",{});var Xp=i(qn);T2=n(Xp,"The "),wp=r(Xp,"A",{href:!0});var fz=i(wp);$2=n(fz,"TFRobertaForMaskedLM"),fz.forEach(t),F2=n(Xp," forward method, overrides the "),wu=r(Xp,"CODE",{});var mz=i(wu);x2=n(mz,"__call__"),mz.forEach(t),R2=n(Xp," special method."),Xp.forEach(t),E2=p(en),w(ea.$$.fragment,en),M2=p(en),w(ta.$$.fragment,en),z2=p(en),w(oa.$$.fragment,en),en.forEach(t),lo.forEach(t),qg=p(s),Cn=r(s,"H2",{class:!0});var J_=i(Cn);na=r(J_,"A",{id:!0,class:!0,href:!0});var gz=i(na);Tu=r(gz,"SPAN",{});var _z=i(Tu);w(El.$$.fragment,_z),_z.forEach(t),gz.forEach(t),q2=p(J_),$u=r(J_,"SPAN",{});var bz=i($u);C2=n(bz,"TFRobertaForSequenceClassification"),bz.forEach(t),J_.forEach(t),Cg=p(s),ft=r(s,"DIV",{class:!0});var co=i(ft);w(Ml.$$.fragment,co),j2=p(co),Fu=r(co,"P",{});var kz=i(Fu);P2=n(kz,`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.`),kz.forEach(t),A2=p(co),zl=r(co,"P",{});var V_=i(zl);L2=n(V_,"This model inherits from "),Tp=r(V_,"A",{href:!0});var vz=i(Tp);O2=n(vz,"TFPreTrainedModel"),vz.forEach(t),N2=n(V_,`. 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.)`),V_.forEach(t),I2=p(co),ql=r(co,"P",{});var G_=i(ql);D2=n(G_,"This model is also a "),Cl=r(G_,"A",{href:!0,rel:!0});var yz=i(Cl);S2=n(yz,"tf.keras.Model"),yz.forEach(t),B2=n(G_,` 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.`),G_.forEach(t),W2=p(co),w(sa.$$.fragment,co),U2=p(co),Pt=r(co,"DIV",{class:!0});var tn=i(Pt);w(jl.$$.fragment,tn),H2=p(tn),jn=r(tn,"P",{});var Yp=i(jn);Q2=n(Yp,"The "),$p=r(Yp,"A",{href:!0});var wz=i($p);K2=n(wz,"TFRobertaForSequenceClassification"),wz.forEach(t),J2=n(Yp," forward method, overrides the "),xu=r(Yp,"CODE",{});var Tz=i(xu);V2=n(Tz,"__call__"),Tz.forEach(t),G2=n(Yp," special method."),Yp.forEach(t),X2=p(tn),w(aa.$$.fragment,tn),Y2=p(tn),w(ra.$$.fragment,tn),Z2=p(tn),w(ia.$$.fragment,tn),tn.forEach(t),co.forEach(t),jg=p(s),Pn=r(s,"H2",{class:!0});var X_=i(Pn);la=r(X_,"A",{id:!0,class:!0,href:!0});var $z=i(la);Ru=r($z,"SPAN",{});var Fz=i(Ru);w(Pl.$$.fragment,Fz),Fz.forEach(t),$z.forEach(t),eF=p(X_),Eu=r(X_,"SPAN",{});var xz=i(Eu);tF=n(xz,"TFRobertaForMultipleChoice"),xz.forEach(t),X_.forEach(t),Pg=p(s),mt=r(s,"DIV",{class:!0});var po=i(mt);w(Al.$$.fragment,po),oF=p(po),Mu=r(po,"P",{});var Rz=i(Mu);nF=n(Rz,`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.`),Rz.forEach(t),sF=p(po),Ll=r(po,"P",{});var Y_=i(Ll);aF=n(Y_,"This model inherits from "),Fp=r(Y_,"A",{href:!0});var Ez=i(Fp);rF=n(Ez,"TFPreTrainedModel"),Ez.forEach(t),iF=n(Y_,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),Y_.forEach(t),lF=p(po),Ol=r(po,"P",{});var Z_=i(Ol);dF=n(Z_,"This model is also a "),Nl=r(Z_,"A",{href:!0,rel:!0});var Mz=i(Nl);cF=n(Mz,"tf.keras.Model"),Mz.forEach(t),pF=n(Z_,` 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.`),Z_.forEach(t),hF=p(po),w(da.$$.fragment,po),uF=p(po),Zt=r(po,"DIV",{class:!0});var Xa=i(Zt);w(Il.$$.fragment,Xa),fF=p(Xa),An=r(Xa,"P",{});var Zp=i(An);mF=n(Zp,"The "),xp=r(Zp,"A",{href:!0});var zz=i(xp);gF=n(zz,"TFRobertaForMultipleChoice"),zz.forEach(t),_F=n(Zp," forward method, overrides the "),zu=r(Zp,"CODE",{});var qz=i(zu);bF=n(qz,"__call__"),qz.forEach(t),kF=n(Zp," special method."),Zp.forEach(t),vF=p(Xa),w(ca.$$.fragment,Xa),yF=p(Xa),w(pa.$$.fragment,Xa),Xa.forEach(t),po.forEach(t),Ag=p(s),Ln=r(s,"H2",{class:!0});var eb=i(Ln);ha=r(eb,"A",{id:!0,class:!0,href:!0});var Cz=i(ha);qu=r(Cz,"SPAN",{});var jz=i(qu);w(Dl.$$.fragment,jz),jz.forEach(t),Cz.forEach(t),wF=p(eb),Cu=r(eb,"SPAN",{});var Pz=i(Cu);TF=n(Pz,"TFRobertaForTokenClassification"),Pz.forEach(t),eb.forEach(t),Lg=p(s),gt=r(s,"DIV",{class:!0});var ho=i(gt);w(Sl.$$.fragment,ho),$F=p(ho),ju=r(ho,"P",{});var Az=i(ju);FF=n(Az,`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.`),Az.forEach(t),xF=p(ho),Bl=r(ho,"P",{});var tb=i(Bl);RF=n(tb,"This model inherits from "),Rp=r(tb,"A",{href:!0});var Lz=i(Rp);EF=n(Lz,"TFPreTrainedModel"),Lz.forEach(t),MF=n(tb,`. 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.)`),tb.forEach(t),zF=p(ho),Wl=r(ho,"P",{});var ob=i(Wl);qF=n(ob,"This model is also a "),Ul=r(ob,"A",{href:!0,rel:!0});var Oz=i(Ul);CF=n(Oz,"tf.keras.Model"),Oz.forEach(t),jF=n(ob,` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),ob.forEach(t),PF=p(ho),w(ua.$$.fragment,ho),AF=p(ho),At=r(ho,"DIV",{class:!0});var on=i(At);w(Hl.$$.fragment,on),LF=p(on),On=r(on,"P",{});var eh=i(On);OF=n(eh,"The "),Ep=r(eh,"A",{href:!0});var Nz=i(Ep);NF=n(Nz,"TFRobertaForTokenClassification"),Nz.forEach(t),IF=n(eh," forward method, overrides the "),Pu=r(eh,"CODE",{});var Iz=i(Pu);DF=n(Iz,"__call__"),Iz.forEach(t),SF=n(eh," special method."),eh.forEach(t),BF=p(on),w(fa.$$.fragment,on),WF=p(on),w(ma.$$.fragment,on),UF=p(on),w(ga.$$.fragment,on),on.forEach(t),ho.forEach(t),Og=p(s),Nn=r(s,"H2",{class:!0});var nb=i(Nn);_a=r(nb,"A",{id:!0,class:!0,href:!0});var Dz=i(_a);Au=r(Dz,"SPAN",{});var Sz=i(Au);w(Ql.$$.fragment,Sz),Sz.forEach(t),Dz.forEach(t),HF=p(nb),Lu=r(nb,"SPAN",{});var Bz=i(Lu);QF=n(Bz,"TFRobertaForQuestionAnswering"),Bz.forEach(t),nb.forEach(t),Ng=p(s),_t=r(s,"DIV",{class:!0});var uo=i(_t);w(Kl.$$.fragment,uo),KF=p(uo),In=r(uo,"P",{});var th=i(In);JF=n(th,`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 `),Ou=r(th,"CODE",{});var Wz=i(Ou);VF=n(Wz,"span start logits"),Wz.forEach(t),GF=n(th," and "),Nu=r(th,"CODE",{});var Uz=i(Nu);XF=n(Uz,"span end logits"),Uz.forEach(t),YF=n(th,")."),th.forEach(t),ZF=p(uo),Jl=r(uo,"P",{});var sb=i(Jl);e0=n(sb,"This model inherits from "),Mp=r(sb,"A",{href:!0});var Hz=i(Mp);t0=n(Hz,"TFPreTrainedModel"),Hz.forEach(t),o0=n(sb,`. 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.)`),sb.forEach(t),n0=p(uo),Vl=r(uo,"P",{});var ab=i(Vl);s0=n(ab,"This model is also a "),Gl=r(ab,"A",{href:!0,rel:!0});var Qz=i(Gl);a0=n(Qz,"tf.keras.Model"),Qz.forEach(t),r0=n(ab,` 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.`),ab.forEach(t),i0=p(uo),w(ba.$$.fragment,uo),l0=p(uo),Lt=r(uo,"DIV",{class:!0});var nn=i(Lt);w(Xl.$$.fragment,nn),d0=p(nn),Dn=r(nn,"P",{});var oh=i(Dn);c0=n(oh,"The "),zp=r(oh,"A",{href:!0});var Kz=i(zp);p0=n(Kz,"TFRobertaForQuestionAnswering"),Kz.forEach(t),h0=n(oh," forward method, overrides the "),Iu=r(oh,"CODE",{});var Jz=i(Iu);u0=n(Jz,"__call__"),Jz.forEach(t),f0=n(oh," special method."),oh.forEach(t),m0=p(nn),w(ka.$$.fragment,nn),g0=p(nn),w(va.$$.fragment,nn),_0=p(nn),w(ya.$$.fragment,nn),nn.forEach(t),uo.forEach(t),Ig=p(s),Sn=r(s,"H2",{class:!0});var rb=i(Sn);wa=r(rb,"A",{id:!0,class:!0,href:!0});var Vz=i(wa);Du=r(Vz,"SPAN",{});var Gz=i(Du);w(Yl.$$.fragment,Gz),Gz.forEach(t),Vz.forEach(t),b0=p(rb),Su=r(rb,"SPAN",{});var Xz=i(Su);k0=n(Xz,"FlaxRobertaModel"),Xz.forEach(t),rb.forEach(t),Dg=p(s),nt=r(s,"DIV",{class:!0});var It=i(nt);w(Zl.$$.fragment,It),v0=p(It),Bu=r(It,"P",{});var Yz=i(Bu);y0=n(Yz,"The bare RoBERTa Model transformer outputting raw hidden-states without any specific head on top."),Yz.forEach(t),w0=p(It),ed=r(It,"P",{});var ib=i(ed);T0=n(ib,"This model inherits from "),qp=r(ib,"A",{href:!0});var Zz=i(qp);$0=n(Zz,"FlaxPreTrainedModel"),Zz.forEach(t),F0=n(ib,`. 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)`),ib.forEach(t),x0=p(It),td=r(It,"P",{});var lb=i(td);R0=n(lb,"This model is also a Flax Linen "),od=r(lb,"A",{href:!0,rel:!0});var eq=i(od);E0=n(eq,"flax.linen.Module"),eq.forEach(t),M0=n(lb,`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),lb.forEach(t),z0=p(It),Wu=r(It,"P",{});var tq=i(Wu);q0=n(tq,"Finally, this model supports inherent JAX features such as:"),tq.forEach(t),C0=p(It),mo=r(It,"UL",{});var Ya=i(mo);Uu=r(Ya,"LI",{});var oq=i(Uu);nd=r(oq,"A",{href:!0,rel:!0});var nq=i(nd);j0=n(nq,"Just-In-Time (JIT) compilation"),nq.forEach(t),oq.forEach(t),P0=p(Ya),Hu=r(Ya,"LI",{});var sq=i(Hu);sd=r(sq,"A",{href:!0,rel:!0});var aq=i(sd);A0=n(aq,"Automatic Differentiation"),aq.forEach(t),sq.forEach(t),L0=p(Ya),Qu=r(Ya,"LI",{});var rq=i(Qu);ad=r(rq,"A",{href:!0,rel:!0});var iq=i(ad);O0=n(iq,"Vectorization"),iq.forEach(t),rq.forEach(t),N0=p(Ya),Ku=r(Ya,"LI",{});var lq=i(Ku);rd=r(lq,"A",{href:!0,rel:!0});var dq=i(rd);I0=n(dq,"Parallelization"),dq.forEach(t),lq.forEach(t),Ya.forEach(t),D0=p(It),eo=r(It,"DIV",{class:!0});var Za=i(eo);w(id.$$.fragment,Za),S0=p(Za),Bn=r(Za,"P",{});var nh=i(Bn);B0=n(nh,"The "),Ju=r(nh,"CODE",{});var cq=i(Ju);W0=n(cq,"FlaxRobertaPreTrainedModel"),cq.forEach(t),U0=n(nh," forward method, overrides the "),Vu=r(nh,"CODE",{});var pq=i(Vu);H0=n(pq,"__call__"),pq.forEach(t),Q0=n(nh," special method."),nh.forEach(t),K0=p(Za),w(Ta.$$.fragment,Za),J0=p(Za),w($a.$$.fragment,Za),Za.forEach(t),It.forEach(t),Sg=p(s),Wn=r(s,"H2",{class:!0});var db=i(Wn);Fa=r(db,"A",{id:!0,class:!0,href:!0});var hq=i(Fa);Gu=r(hq,"SPAN",{});var uq=i(Gu);w(ld.$$.fragment,uq),uq.forEach(t),hq.forEach(t),V0=p(db),Xu=r(db,"SPAN",{});var fq=i(Xu);G0=n(fq,"FlaxRobertaForCausalLM"),fq.forEach(t),db.forEach(t),Bg=p(s),st=r(s,"DIV",{class:!0});var Dt=i(st);w(dd.$$.fragment,Dt),X0=p(Dt),Yu=r(Dt,"P",{});var mq=i(Yu);Y0=n(mq,`Roberta Model with a language modeling head on top (a linear layer on top of the hidden-states output) e.g for
autoregressive tasks.`),mq.forEach(t),Z0=p(Dt),cd=r(Dt,"P",{});var cb=i(cd);ex=n(cb,"This model inherits from "),Cp=r(cb,"A",{href:!0});var gq=i(Cp);tx=n(gq,"FlaxPreTrainedModel"),gq.forEach(t),ox=n(cb,`. 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)`),cb.forEach(t),nx=p(Dt),pd=r(Dt,"P",{});var pb=i(pd);sx=n(pb,"This model is also a Flax Linen "),hd=r(pb,"A",{href:!0,rel:!0});var _q=i(hd);ax=n(_q,"flax.linen.Module"),_q.forEach(t),rx=n(pb,`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),pb.forEach(t),ix=p(Dt),Zu=r(Dt,"P",{});var bq=i(Zu);lx=n(bq,"Finally, this model supports inherent JAX features such as:"),bq.forEach(t),dx=p(Dt),go=r(Dt,"UL",{});var er=i(go);ef=r(er,"LI",{});var kq=i(ef);ud=r(kq,"A",{href:!0,rel:!0});var vq=i(ud);cx=n(vq,"Just-In-Time (JIT) compilation"),vq.forEach(t),kq.forEach(t),px=p(er),tf=r(er,"LI",{});var yq=i(tf);fd=r(yq,"A",{href:!0,rel:!0});var wq=i(fd);hx=n(wq,"Automatic Differentiation"),wq.forEach(t),yq.forEach(t),ux=p(er),of=r(er,"LI",{});var Tq=i(of);md=r(Tq,"A",{href:!0,rel:!0});var $q=i(md);fx=n($q,"Vectorization"),$q.forEach(t),Tq.forEach(t),mx=p(er),nf=r(er,"LI",{});var Fq=i(nf);gd=r(Fq,"A",{href:!0,rel:!0});var xq=i(gd);gx=n(xq,"Parallelization"),xq.forEach(t),Fq.forEach(t),er.forEach(t),_x=p(Dt),to=r(Dt,"DIV",{class:!0});var tr=i(to);w(_d.$$.fragment,tr),bx=p(tr),Un=r(tr,"P",{});var sh=i(Un);kx=n(sh,"The "),sf=r(sh,"CODE",{});var Rq=i(sf);vx=n(Rq,"FlaxRobertaPreTrainedModel"),Rq.forEach(t),yx=n(sh," forward method, overrides the "),af=r(sh,"CODE",{});var Eq=i(af);wx=n(Eq,"__call__"),Eq.forEach(t),Tx=n(sh," special method."),sh.forEach(t),$x=p(tr),w(xa.$$.fragment,tr),Fx=p(tr),w(Ra.$$.fragment,tr),tr.forEach(t),Dt.forEach(t),Wg=p(s),Hn=r(s,"H2",{class:!0});var hb=i(Hn);Ea=r(hb,"A",{id:!0,class:!0,href:!0});var Mq=i(Ea);rf=r(Mq,"SPAN",{});var zq=i(rf);w(bd.$$.fragment,zq),zq.forEach(t),Mq.forEach(t),xx=p(hb),lf=r(hb,"SPAN",{});var qq=i(lf);Rx=n(qq,"FlaxRobertaForMaskedLM"),qq.forEach(t),hb.forEach(t),Ug=p(s),at=r(s,"DIV",{class:!0});var St=i(at);w(kd.$$.fragment,St),Ex=p(St),vd=r(St,"P",{});var ub=i(vd);Mx=n(ub,"RoBERTa Model with a "),df=r(ub,"CODE",{});var Cq=i(df);zx=n(Cq,"language modeling"),Cq.forEach(t),qx=n(ub," head on top."),ub.forEach(t),Cx=p(St),yd=r(St,"P",{});var fb=i(yd);jx=n(fb,"This model inherits from "),jp=r(fb,"A",{href:!0});var jq=i(jp);Px=n(jq,"FlaxPreTrainedModel"),jq.forEach(t),Ax=n(fb,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading, saving and converting weights from PyTorch models)`),fb.forEach(t),Lx=p(St),wd=r(St,"P",{});var mb=i(wd);Ox=n(mb,"This model is also a Flax Linen "),Td=r(mb,"A",{href:!0,rel:!0});var Pq=i(Td);Nx=n(Pq,"flax.linen.Module"),Pq.forEach(t),Ix=n(mb,`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),mb.forEach(t),Dx=p(St),cf=r(St,"P",{});var Aq=i(cf);Sx=n(Aq,"Finally, this model supports inherent JAX features such as:"),Aq.forEach(t),Bx=p(St),_o=r(St,"UL",{});var or=i(_o);pf=r(or,"LI",{});var Lq=i(pf);$d=r(Lq,"A",{href:!0,rel:!0});var Oq=i($d);Wx=n(Oq,"Just-In-Time (JIT) compilation"),Oq.forEach(t),Lq.forEach(t),Ux=p(or),hf=r(or,"LI",{});var Nq=i(hf);Fd=r(Nq,"A",{href:!0,rel:!0});var Iq=i(Fd);Hx=n(Iq,"Automatic Differentiation"),Iq.forEach(t),Nq.forEach(t),Qx=p(or),uf=r(or,"LI",{});var Dq=i(uf);xd=r(Dq,"A",{href:!0,rel:!0});var Sq=i(xd);Kx=n(Sq,"Vectorization"),Sq.forEach(t),Dq.forEach(t),Jx=p(or),ff=r(or,"LI",{});var Bq=i(ff);Rd=r(Bq,"A",{href:!0,rel:!0});var Wq=i(Rd);Vx=n(Wq,"Parallelization"),Wq.forEach(t),Bq.forEach(t),or.forEach(t),Gx=p(St),oo=r(St,"DIV",{class:!0});var nr=i(oo);w(Ed.$$.fragment,nr),Xx=p(nr),Qn=r(nr,"P",{});var ah=i(Qn);Yx=n(ah,"The "),mf=r(ah,"CODE",{});var Uq=i(mf);Zx=n(Uq,"FlaxRobertaPreTrainedModel"),Uq.forEach(t),e4=n(ah," forward method, overrides the "),gf=r(ah,"CODE",{});var Hq=i(gf);t4=n(Hq,"__call__"),Hq.forEach(t),o4=n(ah," special method."),ah.forEach(t),n4=p(nr),w(Ma.$$.fragment,nr),s4=p(nr),w(za.$$.fragment,nr),nr.forEach(t),St.forEach(t),Hg=p(s),Kn=r(s,"H2",{class:!0});var gb=i(Kn);qa=r(gb,"A",{id:!0,class:!0,href:!0});var Qq=i(qa);_f=r(Qq,"SPAN",{});var Kq=i(_f);w(Md.$$.fragment,Kq),Kq.forEach(t),Qq.forEach(t),a4=p(gb),bf=r(gb,"SPAN",{});var Jq=i(bf);r4=n(Jq,"FlaxRobertaForSequenceClassification"),Jq.forEach(t),gb.forEach(t),Qg=p(s),rt=r(s,"DIV",{class:!0});var Bt=i(rt);w(zd.$$.fragment,Bt),i4=p(Bt),kf=r(Bt,"P",{});var Vq=i(kf);l4=n(Vq,`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.`),Vq.forEach(t),d4=p(Bt),qd=r(Bt,"P",{});var _b=i(qd);c4=n(_b,"This model inherits from "),Pp=r(_b,"A",{href:!0});var Gq=i(Pp);p4=n(Gq,"FlaxPreTrainedModel"),Gq.forEach(t),h4=n(_b,`. 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.forEach(t),u4=p(Bt),Cd=r(Bt,"P",{});var bb=i(Cd);f4=n(bb,"This model is also a Flax Linen "),jd=r(bb,"A",{href:!0,rel:!0});var Xq=i(jd);m4=n(Xq,"flax.linen.Module"),Xq.forEach(t),g4=n(bb,`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),bb.forEach(t),_4=p(Bt),vf=r(Bt,"P",{});var Yq=i(vf);b4=n(Yq,"Finally, this model supports inherent JAX features such as:"),Yq.forEach(t),k4=p(Bt),bo=r(Bt,"UL",{});var sr=i(bo);yf=r(sr,"LI",{});var Zq=i(yf);Pd=r(Zq,"A",{href:!0,rel:!0});var eC=i(Pd);v4=n(eC,"Just-In-Time (JIT) compilation"),eC.forEach(t),Zq.forEach(t),y4=p(sr),wf=r(sr,"LI",{});var tC=i(wf);Ad=r(tC,"A",{href:!0,rel:!0});var oC=i(Ad);w4=n(oC,"Automatic Differentiation"),oC.forEach(t),tC.forEach(t),T4=p(sr),Tf=r(sr,"LI",{});var nC=i(Tf);Ld=r(nC,"A",{href:!0,rel:!0});var sC=i(Ld);$4=n(sC,"Vectorization"),sC.forEach(t),nC.forEach(t),F4=p(sr),$f=r(sr,"LI",{});var aC=i($f);Od=r(aC,"A",{href:!0,rel:!0});var rC=i(Od);x4=n(rC,"Parallelization"),rC.forEach(t),aC.forEach(t),sr.forEach(t),R4=p(Bt),no=r(Bt,"DIV",{class:!0});var ar=i(no);w(Nd.$$.fragment,ar),E4=p(ar),Jn=r(ar,"P",{});var rh=i(Jn);M4=n(rh,"The "),Ff=r(rh,"CODE",{});var iC=i(Ff);z4=n(iC,"FlaxRobertaPreTrainedModel"),iC.forEach(t),q4=n(rh," forward method, overrides the "),xf=r(rh,"CODE",{});var lC=i(xf);C4=n(lC,"__call__"),lC.forEach(t),j4=n(rh," special method."),rh.forEach(t),P4=p(ar),w(Ca.$$.fragment,ar),A4=p(ar),w(ja.$$.fragment,ar),ar.forEach(t),Bt.forEach(t),Kg=p(s),Vn=r(s,"H2",{class:!0});var kb=i(Vn);Pa=r(kb,"A",{id:!0,class:!0,href:!0});var dC=i(Pa);Rf=r(dC,"SPAN",{});var cC=i(Rf);w(Id.$$.fragment,cC),cC.forEach(t),dC.forEach(t),L4=p(kb),Ef=r(kb,"SPAN",{});var pC=i(Ef);O4=n(pC,"FlaxRobertaForMultipleChoice"),pC.forEach(t),kb.forEach(t),Jg=p(s),it=r(s,"DIV",{class:!0});var Wt=i(it);w(Dd.$$.fragment,Wt),N4=p(Wt),Mf=r(Wt,"P",{});var hC=i(Mf);I4=n(hC,`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.`),hC.forEach(t),D4=p(Wt),Sd=r(Wt,"P",{});var vb=i(Sd);S4=n(vb,"This model inherits from "),Ap=r(vb,"A",{href:!0});var uC=i(Ap);B4=n(uC,"FlaxPreTrainedModel"),uC.forEach(t),W4=n(vb,`. 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)`),vb.forEach(t),U4=p(Wt),Bd=r(Wt,"P",{});var yb=i(Bd);H4=n(yb,"This model is also a Flax Linen "),Wd=r(yb,"A",{href:!0,rel:!0});var fC=i(Wd);Q4=n(fC,"flax.linen.Module"),fC.forEach(t),K4=n(yb,`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),yb.forEach(t),J4=p(Wt),zf=r(Wt,"P",{});var mC=i(zf);V4=n(mC,"Finally, this model supports inherent JAX features such as:"),mC.forEach(t),G4=p(Wt),ko=r(Wt,"UL",{});var rr=i(ko);qf=r(rr,"LI",{});var gC=i(qf);Ud=r(gC,"A",{href:!0,rel:!0});var _C=i(Ud);X4=n(_C,"Just-In-Time (JIT) compilation"),_C.forEach(t),gC.forEach(t),Y4=p(rr),Cf=r(rr,"LI",{});var bC=i(Cf);Hd=r(bC,"A",{href:!0,rel:!0});var kC=i(Hd);Z4=n(kC,"Automatic Differentiation"),kC.forEach(t),bC.forEach(t),eR=p(rr),jf=r(rr,"LI",{});var vC=i(jf);Qd=r(vC,"A",{href:!0,rel:!0});var yC=i(Qd);tR=n(yC,"Vectorization"),yC.forEach(t),vC.forEach(t),oR=p(rr),Pf=r(rr,"LI",{});var wC=i(Pf);Kd=r(wC,"A",{href:!0,rel:!0});var TC=i(Kd);nR=n(TC,"Parallelization"),TC.forEach(t),wC.forEach(t),rr.forEach(t),sR=p(Wt),so=r(Wt,"DIV",{class:!0});var ir=i(so);w(Jd.$$.fragment,ir),aR=p(ir),Gn=r(ir,"P",{});var ih=i(Gn);rR=n(ih,"The "),Af=r(ih,"CODE",{});var $C=i(Af);iR=n($C,"FlaxRobertaPreTrainedModel"),$C.forEach(t),lR=n(ih," forward method, overrides the "),Lf=r(ih,"CODE",{});var FC=i(Lf);dR=n(FC,"__call__"),FC.forEach(t),cR=n(ih," special method."),ih.forEach(t),pR=p(ir),w(Aa.$$.fragment,ir),hR=p(ir),w(La.$$.fragment,ir),ir.forEach(t),Wt.forEach(t),Vg=p(s),Xn=r(s,"H2",{class:!0});var wb=i(Xn);Oa=r(wb,"A",{id:!0,class:!0,href:!0});var xC=i(Oa);Of=r(xC,"SPAN",{});var RC=i(Of);w(Vd.$$.fragment,RC),RC.forEach(t),xC.forEach(t),uR=p(wb),Nf=r(wb,"SPAN",{});var EC=i(Nf);fR=n(EC,"FlaxRobertaForTokenClassification"),EC.forEach(t),wb.forEach(t),Gg=p(s),lt=r(s,"DIV",{class:!0});var Ut=i(lt);w(Gd.$$.fragment,Ut),mR=p(Ut),If=r(Ut,"P",{});var MC=i(If);gR=n(MC,`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.`),MC.forEach(t),_R=p(Ut),Xd=r(Ut,"P",{});var Tb=i(Xd);bR=n(Tb,"This model inherits from "),Lp=r(Tb,"A",{href:!0});var zC=i(Lp);kR=n(zC,"FlaxPreTrainedModel"),zC.forEach(t),vR=n(Tb,`. 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)`),Tb.forEach(t),yR=p(Ut),Yd=r(Ut,"P",{});var $b=i(Yd);wR=n($b,"This model is also a Flax Linen "),Zd=r($b,"A",{href:!0,rel:!0});var qC=i(Zd);TR=n(qC,"flax.linen.Module"),qC.forEach(t),$R=n($b,`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),$b.forEach(t),FR=p(Ut),Df=r(Ut,"P",{});var CC=i(Df);xR=n(CC,"Finally, this model supports inherent JAX features such as:"),CC.forEach(t),RR=p(Ut),vo=r(Ut,"UL",{});var lr=i(vo);Sf=r(lr,"LI",{});var jC=i(Sf);ec=r(jC,"A",{href:!0,rel:!0});var PC=i(ec);ER=n(PC,"Just-In-Time (JIT) compilation"),PC.forEach(t),jC.forEach(t),MR=p(lr),Bf=r(lr,"LI",{});var AC=i(Bf);tc=r(AC,"A",{href:!0,rel:!0});var LC=i(tc);zR=n(LC,"Automatic Differentiation"),LC.forEach(t),AC.forEach(t),qR=p(lr),Wf=r(lr,"LI",{});var OC=i(Wf);oc=r(OC,"A",{href:!0,rel:!0});var NC=i(oc);CR=n(NC,"Vectorization"),NC.forEach(t),OC.forEach(t),jR=p(lr),Uf=r(lr,"LI",{});var IC=i(Uf);nc=r(IC,"A",{href:!0,rel:!0});var DC=i(nc);PR=n(DC,"Parallelization"),DC.forEach(t),IC.forEach(t),lr.forEach(t),AR=p(Ut),ao=r(Ut,"DIV",{class:!0});var dr=i(ao);w(sc.$$.fragment,dr),LR=p(dr),Yn=r(dr,"P",{});var lh=i(Yn);OR=n(lh,"The "),Hf=r(lh,"CODE",{});var SC=i(Hf);NR=n(SC,"FlaxRobertaPreTrainedModel"),SC.forEach(t),IR=n(lh," forward method, overrides the "),Qf=r(lh,"CODE",{});var BC=i(Qf);DR=n(BC,"__call__"),BC.forEach(t),SR=n(lh," special method."),lh.forEach(t),BR=p(dr),w(Na.$$.fragment,dr),WR=p(dr),w(Ia.$$.fragment,dr),dr.forEach(t),Ut.forEach(t),Xg=p(s),Zn=r(s,"H2",{class:!0});var Fb=i(Zn);Da=r(Fb,"A",{id:!0,class:!0,href:!0});var WC=i(Da);Kf=r(WC,"SPAN",{});var UC=i(Kf);w(ac.$$.fragment,UC),UC.forEach(t),WC.forEach(t),UR=p(Fb),Jf=r(Fb,"SPAN",{});var HC=i(Jf);HR=n(HC,"FlaxRobertaForQuestionAnswering"),HC.forEach(t),Fb.forEach(t),Yg=p(s),dt=r(s,"DIV",{class:!0});var Ht=i(dt);w(rc.$$.fragment,Ht),QR=p(Ht),es=r(Ht,"P",{});var dh=i(es);KR=n(dh,`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 `),Vf=r(dh,"CODE",{});var QC=i(Vf);JR=n(QC,"span start logits"),QC.forEach(t),VR=n(dh," and "),Gf=r(dh,"CODE",{});var KC=i(Gf);GR=n(KC,"span end logits"),KC.forEach(t),XR=n(dh,")."),dh.forEach(t),YR=p(Ht),ic=r(Ht,"P",{});var xb=i(ic);ZR=n(xb,"This model inherits from "),Op=r(xb,"A",{href:!0});var JC=i(Op);eE=n(JC,"FlaxPreTrainedModel"),JC.forEach(t),tE=n(xb,`. 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)`),xb.forEach(t),oE=p(Ht),lc=r(Ht,"P",{});var Rb=i(lc);nE=n(Rb,"This model is also a Flax Linen "),dc=r(Rb,"A",{href:!0,rel:!0});var VC=i(dc);sE=n(VC,"flax.linen.Module"),VC.forEach(t),aE=n(Rb,`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),Rb.forEach(t),rE=p(Ht),Xf=r(Ht,"P",{});var GC=i(Xf);iE=n(GC,"Finally, this model supports inherent JAX features such as:"),GC.forEach(t),lE=p(Ht),yo=r(Ht,"UL",{});var cr=i(yo);Yf=r(cr,"LI",{});var XC=i(Yf);cc=r(XC,"A",{href:!0,rel:!0});var YC=i(cc);dE=n(YC,"Just-In-Time (JIT) compilation"),YC.forEach(t),XC.forEach(t),cE=p(cr),Zf=r(cr,"LI",{});var ZC=i(Zf);pc=r(ZC,"A",{href:!0,rel:!0});var ej=i(pc);pE=n(ej,"Automatic Differentiation"),ej.forEach(t),ZC.forEach(t),hE=p(cr),em=r(cr,"LI",{});var tj=i(em);hc=r(tj,"A",{href:!0,rel:!0});var oj=i(hc);uE=n(oj,"Vectorization"),oj.forEach(t),tj.forEach(t),fE=p(cr),tm=r(cr,"LI",{});var nj=i(tm);uc=r(nj,"A",{href:!0,rel:!0});var sj=i(uc);mE=n(sj,"Parallelization"),sj.forEach(t),nj.forEach(t),cr.forEach(t),gE=p(Ht),ro=r(Ht,"DIV",{class:!0});var pr=i(ro);w(fc.$$.fragment,pr),_E=p(pr),ts=r(pr,"P",{});var ch=i(ts);bE=n(ch,"The "),om=r(ch,"CODE",{});var aj=i(om);kE=n(aj,"FlaxRobertaPreTrainedModel"),aj.forEach(t),vE=n(ch," forward method, overrides the "),nm=r(ch,"CODE",{});var rj=i(nm);yE=n(rj,"__call__"),rj.forEach(t),wE=n(ch," special method."),ch.forEach(t),TE=p(pr),w(Sa.$$.fragment,pr),$E=p(pr),w(Ba.$$.fragment,pr),pr.forEach(t),Ht.forEach(t),this.h()},h(){h(d,"name","hf:doc:metadata"),h(d,"content",JSON.stringify(w3)),h(m,"id","roberta"),h(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"),h(m,"href","#roberta"),h(u,"class","relative group"),h(te,"id","overview"),h(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"),h(te,"href","#overview"),h(N,"class","relative group"),h(pe,"href","https://arxiv.org/abs/1907.11692"),h(pe,"rel","nofollow"),h(j,"href","/docs/transformers/v4.25.1/en/model_doc/bert#transformers.BertModel"),h(Ue,"href","camembert"),h(Se,"href","https://huggingface.co/julien-c"),h(Se,"rel","nofollow"),h(Be,"href","https://github.com/pytorch/fairseq/tree/master/examples/roberta"),h(Be,"rel","nofollow"),h(W,"id","resources"),h(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"),h(W,"href","#resources"),h(Oe,"class","relative group"),h(ur,"href","https://huggingface.co/blog/sentiment-analysis-twitter"),h(ur,"rel","nofollow"),h(fr,"href","https://huggingface.co/inference-api"),h(fr,"rel","nofollow"),h(gr,"href","https://huggingface.co/blog/opinion-classification-with-kili"),h(gr,"rel","nofollow"),h(br,"href","https://colab.research.google.com/github/DhavalTaunk08/NLP_scripts/blob/master/sentiment_analysis_using_roberta.ipynb"),h(br,"rel","nofollow"),h(zc,"href","/docs/transformers/v4.25.1/en/model_doc/roberta#transformers.RobertaForSequenceClassification"),h(kr,"href","https://github.com/huggingface/transformers/tree/main/examples/pytorch/text-classification"),h(kr,"rel","nofollow"),h(vr,"href","https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/text_classification.ipynb"),h(vr,"rel","nofollow"),h(qc,"href","/docs/transformers/v4.25.1/en/model_doc/roberta#transformers.TFRobertaForSequenceClassification"),h(yr,"href","https://github.com/huggingface/transformers/tree/main/examples/tensorflow/text-classification"),h(yr,"rel","nofollow"),h(wr,"href","https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/text_classification-tf.ipynb"),h(wr,"rel","nofollow"),h(Cc,"href","/docs/transformers/v4.25.1/en/model_doc/roberta#transformers.FlaxRobertaForSequenceClassification"),h(Tr,"href","https://github.com/huggingface/transformers/tree/main/examples/flax/text-classification"),h(Tr,"rel","nofollow"),h($r,"href","https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/text_classification_flax.ipynb"),h($r,"rel","nofollow"),h(jc,"href","/docs/transformers/v4.25.1/en/model_doc/roberta#transformers.RobertaForTokenClassification"),h(xr,"href","https://github.com/huggingface/transformers/tree/main/examples/pytorch/token-classification"),h(xr,"rel","nofollow"),h(Rr,"href","https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/token_classification.ipynb"),h(Rr,"rel","nofollow"),h(Pc,"href","/docs/transformers/v4.25.1/en/model_doc/roberta#transformers.TFRobertaForTokenClassification"),h(Er,"href","https://github.com/huggingface/transformers/tree/main/examples/tensorflow/token-classification"),h(Er,"rel","nofollow"),h(Mr,"href","https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/token_classification-tf.ipynb"),h(Mr,"rel","nofollow"),h(Ac,"href","/docs/transformers/v4.25.1/en/model_doc/roberta#transformers.FlaxRobertaForTokenClassification"),h(zr,"href","https://github.com/huggingface/transformers/tree/main/examples/flax/token-classification"),h(zr,"rel","nofollow"),h(qr,"href","https://huggingface.co/course/chapter7/2?fw=pt"),h(qr,"rel","nofollow"),h(Pr,"href","https://huggingface.co/blog/how-to-train"),h(Pr,"rel","nofollow"),h(Oc,"href","/docs/transformers/v4.25.1/en/model_doc/roberta#transformers.RobertaForMaskedLM"),h(Ar,"href","https://github.com/huggingface/transformers/tree/main/examples/pytorch/language-modeling#robertabertdistilbert-and-masked-language-modeling"),h(Ar,"rel","nofollow"),h(Lr,"href","https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/language_modeling.ipynb"),h(Lr,"rel","nofollow"),h(Nc,"href","/docs/transformers/v4.25.1/en/model_doc/roberta#transformers.TFRobertaForMaskedLM"),h(Or,"href","https://github.com/huggingface/transformers/tree/main/examples/tensorflow/language-modeling#run_mlmpy"),h(Or,"rel","nofollow"),h(Nr,"href","https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/language_modeling-tf.ipynb"),h(Nr,"rel","nofollow"),h(Ic,"href","/docs/transformers/v4.25.1/en/model_doc/roberta#transformers.FlaxRobertaForMaskedLM"),h(Ir,"href","https://github.com/huggingface/transformers/tree/main/examples/flax/language-modeling#masked-language-modeling"),h(Ir,"rel","nofollow"),h(Dr,"href","https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/masked_language_modeling_flax.ipynb"),h(Dr,"rel","nofollow"),h(Sr,"href","https://huggingface.co/course/chapter7/3?fw=pt"),h(Sr,"rel","nofollow"),h(Ur,"href","https://huggingface.co/blog/optimum-inference"),h(Ur,"rel","nofollow"),h(Sc,"href","/docs/transformers/v4.25.1/en/model_doc/roberta#transformers.RobertaForQuestionAnswering"),h(Hr,"href","https://github.com/huggingface/transformers/tree/main/examples/pytorch/question-answering"),h(Hr,"rel","nofollow"),h(Qr,"href","https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/question_answering.ipynb"),h(Qr,"rel","nofollow"),h(Bc,"href","/docs/transformers/v4.25.1/en/model_doc/roberta#transformers.TFRobertaForQuestionAnswering"),h(Kr,"href","https://github.com/huggingface/transformers/tree/main/examples/tensorflow/question-answering"),h(Kr,"rel","nofollow"),h(Jr,"href","https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/question_answering-tf.ipynb"),h(Jr,"rel","nofollow"),h(Wc,"href","/docs/transformers/v4.25.1/en/model_doc/roberta#transformers.FlaxRobertaForQuestionAnswering"),h(Vr,"href","https://github.com/huggingface/transformers/tree/main/examples/flax/question-answering"),h(Vr,"rel","nofollow"),h(Gr,"href","https://huggingface.co/course/chapter7/7?fw=pt"),h(Gr,"rel","nofollow"),h(Qc,"href","/docs/transformers/v4.25.1/en/model_doc/roberta#transformers.RobertaForMultipleChoice"),h(Xr,"href","https://github.com/huggingface/transformers/tree/main/examples/pytorch/multiple-choice"),h(Xr,"rel","nofollow"),h(Yr,"href","https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/multiple_choice.ipynb"),h(Yr,"rel","nofollow"),h(Kc,"href","/docs/transformers/v4.25.1/en/model_doc/roberta#transformers.TFRobertaForMultipleChoice"),h(Zr,"href","https://github.com/huggingface/transformers/tree/main/examples/tensorflow/multiple-choice"),h(Zr,"rel","nofollow"),h(ei,"href","https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/multiple_choice-tf.ipynb"),h(ei,"rel","nofollow"),h(is,"id","transformers.RobertaConfig"),h(is,"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"),h(is,"href","#transformers.RobertaConfig"),h(an,"class","relative group"),h(Jc,"href","/docs/transformers/v4.25.1/en/model_doc/roberta#transformers.RobertaModel"),h(Vc,"href","/docs/transformers/v4.25.1/en/model_doc/roberta#transformers.TFRobertaModel"),h(ni,"href","https://huggingface.co/roberta-base"),h(ni,"rel","nofollow"),h(Gc,"href","/docs/transformers/v4.25.1/en/main_classes/configuration#transformers.PretrainedConfig"),h(Xc,"href","/docs/transformers/v4.25.1/en/main_classes/configuration#transformers.PretrainedConfig"),h(Qt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(ds,"id","transformers.RobertaTokenizer"),h(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"),h(ds,"href","#transformers.RobertaTokenizer"),h(ln,"class","relative group"),h(Yc,"href","/docs/transformers/v4.25.1/en/main_classes/tokenizer#transformers.PreTrainedTokenizer"),h(Oo,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(hs,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(us,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(tp,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(Ie,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(fs,"id","transformers.RobertaTokenizerFast"),h(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"),h(fs,"href","#transformers.RobertaTokenizerFast"),h(dn,"class","relative group"),h(op,"href","/docs/transformers/v4.25.1/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast"),h(np,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(tt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(_s,"id","transformers.RobertaModel"),h(_s,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),h(_s,"href","#transformers.RobertaModel"),h(cn,"class","relative group"),h(sp,"href","/docs/transformers/v4.25.1/en/main_classes/model#transformers.PreTrainedModel"),h($i,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),h($i,"rel","nofollow"),h(xi,"href","https://arxiv.org/abs/1706.03762"),h(xi,"rel","nofollow"),h(ap,"href","/docs/transformers/v4.25.1/en/model_doc/roberta#transformers.RobertaModel"),h(Jt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(ot,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(ys,"id","transformers.RobertaForCausalLM"),h(ys,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),h(ys,"href","#transformers.RobertaForCausalLM"),h(hn,"class","relative group"),h(rp,"href","/docs/transformers/v4.25.1/en/main_classes/model#transformers.PreTrainedModel"),h(ji,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),h(ji,"rel","nofollow"),h(ip,"href","/docs/transformers/v4.25.1/en/model_doc/roberta#transformers.RobertaForCausalLM"),h(Vt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(yt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h($s,"id","transformers.RobertaForMaskedLM"),h($s,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),h($s,"href","#transformers.RobertaForMaskedLM"),h(fn,"class","relative group"),h(lp,"href","/docs/transformers/v4.25.1/en/main_classes/model#transformers.PreTrainedModel"),h(Di,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),h(Di,"rel","nofollow"),h(dp,"href","/docs/transformers/v4.25.1/en/model_doc/roberta#transformers.RobertaForMaskedLM"),h(zt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(wt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(Es,"id","transformers.RobertaForSequenceClassification"),h(Es,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),h(Es,"href","#transformers.RobertaForSequenceClassification"),h(gn,"class","relative group"),h(cp,"href","/docs/transformers/v4.25.1/en/main_classes/model#transformers.PreTrainedModel"),h(Qi,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),h(Qi,"rel","nofollow"),h(pp,"href","/docs/transformers/v4.25.1/en/model_doc/roberta#transformers.RobertaForSequenceClassification"),h(ct,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(Tt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(Ps,"id","transformers.RobertaForMultipleChoice"),h(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"),h(Ps,"href","#transformers.RobertaForMultipleChoice"),h(bn,"class","relative group"),h(hp,"href","/docs/transformers/v4.25.1/en/main_classes/model#transformers.PreTrainedModel"),h(Yi,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),h(Yi,"rel","nofollow"),h(up,"href","/docs/transformers/v4.25.1/en/model_doc/roberta#transformers.RobertaForMultipleChoice"),h(Gt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h($t,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(Os,"id","transformers.RobertaForTokenClassification"),h(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"),h(Os,"href","#transformers.RobertaForTokenClassification"),h(vn,"class","relative group"),h(fp,"href","/docs/transformers/v4.25.1/en/main_classes/model#transformers.PreTrainedModel"),h(sl,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),h(sl,"rel","nofollow"),h(mp,"href","/docs/transformers/v4.25.1/en/model_doc/roberta#transformers.RobertaForTokenClassification"),h(qt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(Ft,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(Ss,"id","transformers.RobertaForQuestionAnswering"),h(Ss,"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"),h(Ss,"href","#transformers.RobertaForQuestionAnswering"),h(wn,"class","relative group"),h(gp,"href","/docs/transformers/v4.25.1/en/main_classes/model#transformers.PreTrainedModel"),h(cl,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),h(cl,"rel","nofollow"),h(_p,"href","/docs/transformers/v4.25.1/en/model_doc/roberta#transformers.RobertaForQuestionAnswering"),h(Ct,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(xt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(Hs,"id","transformers.TFRobertaModel"),h(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"),h(Hs,"href","#transformers.TFRobertaModel"),h(Fn,"class","relative group"),h(bp,"href","/docs/transformers/v4.25.1/en/main_classes/model#transformers.TFPreTrainedModel"),h(gl,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),h(gl,"rel","nofollow"),h(kp,"href","/docs/transformers/v4.25.1/en/model_doc/roberta#transformers.TFRobertaModel"),h(Xt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(ht,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(Vs,"id","transformers.TFRobertaForCausalLM"),h(Vs,"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"),h(Vs,"href","#transformers.TFRobertaForCausalLM"),h(Rn,"class","relative group"),h(vp,"href","/docs/transformers/v4.25.1/en/model_doc/roberta#transformers.TFRobertaForCausalLM"),h(Yt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(En,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(Ys,"id","transformers.TFRobertaForMaskedLM"),h(Ys,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),h(Ys,"href","#transformers.TFRobertaForMaskedLM"),h(zn,"class","relative group"),h(yp,"href","/docs/transformers/v4.25.1/en/main_classes/model#transformers.TFPreTrainedModel"),h(xl,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),h(xl,"rel","nofollow"),h(wp,"href","/docs/transformers/v4.25.1/en/model_doc/roberta#transformers.TFRobertaForMaskedLM"),h(jt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(ut,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(na,"id","transformers.TFRobertaForSequenceClassification"),h(na,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),h(na,"href","#transformers.TFRobertaForSequenceClassification"),h(Cn,"class","relative group"),h(Tp,"href","/docs/transformers/v4.25.1/en/main_classes/model#transformers.TFPreTrainedModel"),h(Cl,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),h(Cl,"rel","nofollow"),h($p,"href","/docs/transformers/v4.25.1/en/model_doc/roberta#transformers.TFRobertaForSequenceClassification"),h(Pt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(ft,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(la,"id","transformers.TFRobertaForMultipleChoice"),h(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"),h(la,"href","#transformers.TFRobertaForMultipleChoice"),h(Pn,"class","relative group"),h(Fp,"href","/docs/transformers/v4.25.1/en/main_classes/model#transformers.TFPreTrainedModel"),h(Nl,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),h(Nl,"rel","nofollow"),h(xp,"href","/docs/transformers/v4.25.1/en/model_doc/roberta#transformers.TFRobertaForMultipleChoice"),h(Zt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(mt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(ha,"id","transformers.TFRobertaForTokenClassification"),h(ha,"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"),h(ha,"href","#transformers.TFRobertaForTokenClassification"),h(Ln,"class","relative group"),h(Rp,"href","/docs/transformers/v4.25.1/en/main_classes/model#transformers.TFPreTrainedModel"),h(Ul,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),h(Ul,"rel","nofollow"),h(Ep,"href","/docs/transformers/v4.25.1/en/model_doc/roberta#transformers.TFRobertaForTokenClassification"),h(At,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(gt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(_a,"id","transformers.TFRobertaForQuestionAnswering"),h(_a,"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"),h(_a,"href","#transformers.TFRobertaForQuestionAnswering"),h(Nn,"class","relative group"),h(Mp,"href","/docs/transformers/v4.25.1/en/main_classes/model#transformers.TFPreTrainedModel"),h(Gl,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),h(Gl,"rel","nofollow"),h(zp,"href","/docs/transformers/v4.25.1/en/model_doc/roberta#transformers.TFRobertaForQuestionAnswering"),h(Lt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(_t,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(wa,"id","transformers.FlaxRobertaModel"),h(wa,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),h(wa,"href","#transformers.FlaxRobertaModel"),h(Sn,"class","relative group"),h(qp,"href","/docs/transformers/v4.25.1/en/main_classes/model#transformers.FlaxPreTrainedModel"),h(od,"href","https://flax.readthedocs.io/en/latest/flax.linen.html#module"),h(od,"rel","nofollow"),h(nd,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),h(nd,"rel","nofollow"),h(sd,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),h(sd,"rel","nofollow"),h(ad,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),h(ad,"rel","nofollow"),h(rd,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),h(rd,"rel","nofollow"),h(eo,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(nt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(Fa,"id","transformers.FlaxRobertaForCausalLM"),h(Fa,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),h(Fa,"href","#transformers.FlaxRobertaForCausalLM"),h(Wn,"class","relative group"),h(Cp,"href","/docs/transformers/v4.25.1/en/main_classes/model#transformers.FlaxPreTrainedModel"),h(hd,"href","https://flax.readthedocs.io/en/latest/flax.linen.html#module"),h(hd,"rel","nofollow"),h(ud,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),h(ud,"rel","nofollow"),h(fd,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),h(fd,"rel","nofollow"),h(md,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),h(md,"rel","nofollow"),h(gd,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),h(gd,"rel","nofollow"),h(to,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(st,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(Ea,"id","transformers.FlaxRobertaForMaskedLM"),h(Ea,"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"),h(Ea,"href","#transformers.FlaxRobertaForMaskedLM"),h(Hn,"class","relative group"),h(jp,"href","/docs/transformers/v4.25.1/en/main_classes/model#transformers.FlaxPreTrainedModel"),h(Td,"href","https://flax.readthedocs.io/en/latest/flax.linen.html#module"),h(Td,"rel","nofollow"),h($d,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),h($d,"rel","nofollow"),h(Fd,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),h(Fd,"rel","nofollow"),h(xd,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),h(xd,"rel","nofollow"),h(Rd,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),h(Rd,"rel","nofollow"),h(oo,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(at,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(qa,"id","transformers.FlaxRobertaForSequenceClassification"),h(qa,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),h(qa,"href","#transformers.FlaxRobertaForSequenceClassification"),h(Kn,"class","relative group"),h(Pp,"href","/docs/transformers/v4.25.1/en/main_classes/model#transformers.FlaxPreTrainedModel"),h(jd,"href","https://flax.readthedocs.io/en/latest/flax.linen.html#module"),h(jd,"rel","nofollow"),h(Pd,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),h(Pd,"rel","nofollow"),h(Ad,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),h(Ad,"rel","nofollow"),h(Ld,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),h(Ld,"rel","nofollow"),h(Od,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),h(Od,"rel","nofollow"),h(no,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(rt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(Pa,"id","transformers.FlaxRobertaForMultipleChoice"),h(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"),h(Pa,"href","#transformers.FlaxRobertaForMultipleChoice"),h(Vn,"class","relative group"),h(Ap,"href","/docs/transformers/v4.25.1/en/main_classes/model#transformers.FlaxPreTrainedModel"),h(Wd,"href","https://flax.readthedocs.io/en/latest/flax.linen.html#module"),h(Wd,"rel","nofollow"),h(Ud,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),h(Ud,"rel","nofollow"),h(Hd,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),h(Hd,"rel","nofollow"),h(Qd,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),h(Qd,"rel","nofollow"),h(Kd,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),h(Kd,"rel","nofollow"),h(so,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(it,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(Oa,"id","transformers.FlaxRobertaForTokenClassification"),h(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"),h(Oa,"href","#transformers.FlaxRobertaForTokenClassification"),h(Xn,"class","relative group"),h(Lp,"href","/docs/transformers/v4.25.1/en/main_classes/model#transformers.FlaxPreTrainedModel"),h(Zd,"href","https://flax.readthedocs.io/en/latest/flax.linen.html#module"),h(Zd,"rel","nofollow"),h(ec,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),h(ec,"rel","nofollow"),h(tc,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),h(tc,"rel","nofollow"),h(oc,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),h(oc,"rel","nofollow"),h(nc,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),h(nc,"rel","nofollow"),h(ao,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(lt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(Da,"id","transformers.FlaxRobertaForQuestionAnswering"),h(Da,"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"),h(Da,"href","#transformers.FlaxRobertaForQuestionAnswering"),h(Zn,"class","relative group"),h(Op,"href","/docs/transformers/v4.25.1/en/main_classes/model#transformers.FlaxPreTrainedModel"),h(dc,"href","https://flax.readthedocs.io/en/latest/flax.linen.html#module"),h(dc,"rel","nofollow"),h(cc,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),h(cc,"rel","nofollow"),h(pc,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),h(pc,"rel","nofollow"),h(hc,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),h(hc,"rel","nofollow"),h(uc,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),h(uc,"rel","nofollow"),h(ro,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(dt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(s,g){e(document.head,d),b(s,_,g),b(s,u,g),e(u,m),e(m,k),T(l,k,null),e(u,f),e(u,E),e(E,le),b(s,Z,g),b(s,N,g),e(N,te),e(te,oe),T(M,oe,null),e(N,we),e(N,K),e(K,Te),b(s,ge,g),b(s,B,g),e(B,$e),e(B,pe),e(pe,J),e(B,Fe),b(s,_e,g),b(s,U,g),e(U,xe),b(s,be,g),b(s,H,g),e(H,Re),b(s,ke,g),b(s,ee,g),e(ee,C),e(C,P),b(s,ve,g),b(s,Q,g),e(Q,Ee),b(s,ye,g),b(s,I,g),e(I,he),e(he,Me),e(he,j),e(j,ze),e(he,V),e(I,qe),e(I,ue),e(ue,G),e(I,Ce),e(I,ne),e(ne,D),e(ne,fe),e(fe,X),e(ne,je),e(ne,se),e(se,A),e(ne,Pe),e(ne,L),e(L,Ae),e(ne,Le),e(I,v),e(I,z),e(z,Ue),e(Ue,de),e(z,Xe),b(s,Ke,g),b(s,q,g),e(q,Ye),e(q,Se),e(Se,Ze),e(q,et),e(q,Be),e(Be,S),e(q,Y),b(s,Je,g),b(s,Oe,g),e(Oe,W),e(W,He),T(We,He,null),e(Oe,Ne),e(Oe,Qe),e(Qe,ce),b(s,Ve,g),b(s,Mc,g),e(Mc,Mb),b(s,Vm,g),T(hr,s,g),b(s,Gm,g),b(s,bt,g),e(bt,sn),e(sn,zb),e(sn,ur),e(ur,qb),e(sn,Cb),e(sn,fr),e(fr,jb),e(sn,Pb),e(bt,Ab),e(bt,mr),e(mr,Lb),e(mr,gr),e(gr,Ob),e(mr,Nb),e(bt,Ib),e(bt,_r),e(_r,Db),e(_r,br),e(br,Sb),e(_r,Bb),e(bt,Wb),e(bt,Fo),e(Fo,zc),e(zc,Ub),e(Fo,Hb),e(Fo,kr),e(kr,Qb),e(Fo,Kb),e(Fo,vr),e(vr,Jb),e(Fo,Vb),e(bt,Gb),e(bt,xo),e(xo,qc),e(qc,Xb),e(xo,Yb),e(xo,yr),e(yr,Zb),e(xo,ek),e(xo,wr),e(wr,tk),e(xo,ok),e(bt,nk),e(bt,Ro),e(Ro,Cc),e(Cc,sk),e(Ro,ak),e(Ro,Tr),e(Tr,rk),e(Ro,ik),e(Ro,$r),e($r,lk),e(Ro,dk),b(s,Xm,g),T(Fr,s,g),b(s,Ym,g),b(s,Kt,g),e(Kt,Eo),e(Eo,jc),e(jc,ck),e(Eo,pk),e(Eo,xr),e(xr,hk),e(Eo,uk),e(Eo,Rr),e(Rr,fk),e(Eo,mk),e(Kt,gk),e(Kt,Mo),e(Mo,Pc),e(Pc,_k),e(Mo,bk),e(Mo,Er),e(Er,kk),e(Mo,vk),e(Mo,Mr),e(Mr,yk),e(Mo,wk),e(Kt,Tk),e(Kt,ss),e(ss,Ac),e(Ac,$k),e(ss,Fk),e(ss,zr),e(zr,xk),e(ss,Rk),e(Kt,Ek),e(Kt,Lc),e(Lc,qr),e(qr,Mk),e(Lc,zk),b(s,Zm,g),T(Cr,s,g),b(s,eg,g),b(s,Et,g),e(Et,jr),e(jr,qk),e(jr,Pr),e(Pr,Ck),e(jr,jk),e(Et,Pk),e(Et,zo),e(zo,Oc),e(Oc,Ak),e(zo,Lk),e(zo,Ar),e(Ar,Ok),e(zo,Nk),e(zo,Lr),e(Lr,Ik),e(zo,Dk),e(Et,Sk),e(Et,qo),e(qo,Nc),e(Nc,Bk),e(qo,Wk),e(qo,Or),e(Or,Uk),e(qo,Hk),e(qo,Nr),e(Nr,Qk),e(qo,Kk),e(Et,Jk),e(Et,Co),e(Co,Ic),e(Ic,Vk),e(Co,Gk),e(Co,Ir),e(Ir,Xk),e(Co,Yk),e(Co,Dr),e(Dr,Zk),e(Co,ev),e(Et,tv),e(Et,Dc),e(Dc,Sr),e(Sr,ov),e(Dc,nv),b(s,tg,g),T(Br,s,g),b(s,og,g),b(s,Mt,g),e(Mt,Wr),e(Wr,sv),e(Wr,Ur),e(Ur,av),e(Wr,rv),e(Mt,iv),e(Mt,jo),e(jo,Sc),e(Sc,lv),e(jo,dv),e(jo,Hr),e(Hr,cv),e(jo,pv),e(jo,Qr),e(Qr,hv),e(jo,uv),e(Mt,fv),e(Mt,Po),e(Po,Bc),e(Bc,mv),e(Po,gv),e(Po,Kr),e(Kr,_v),e(Po,bv),e(Po,Jr),e(Jr,kv),e(Po,vv),e(Mt,yv),e(Mt,as),e(as,Wc),e(Wc,wv),e(as,Tv),e(as,Vr),e(Vr,$v),e(as,Fv),e(Mt,xv),e(Mt,Uc),e(Uc,Gr),e(Gr,Rv),e(Uc,Ev),b(s,ng,g),b(s,Hc,g),e(Hc,ph),e(ph,Mv),b(s,sg,g),b(s,rs,g),e(rs,Ao),e(Ao,Qc),e(Qc,zv),e(Ao,qv),e(Ao,Xr),e(Xr,Cv),e(Ao,jv),e(Ao,Yr),e(Yr,Pv),e(Ao,Av),e(rs,Lv),e(rs,Lo),e(Lo,Kc),e(Kc,Ov),e(Lo,Nv),e(Lo,Zr),e(Zr,Iv),e(Lo,Dv),e(Lo,ei),e(ei,Sv),e(Lo,Bv),b(s,ag,g),b(s,an,g),e(an,is),e(is,hh),T(ti,hh,null),e(an,Wv),e(an,uh),e(uh,Uv),b(s,rg,g),b(s,Qt,g),T(oi,Qt,null),e(Qt,Hv),e(Qt,fo),e(fo,Qv),e(fo,Jc),e(Jc,Kv),e(fo,Jv),e(fo,Vc),e(Vc,Vv),e(fo,Gv),e(fo,ni),e(ni,Xv),e(fo,Yv),e(Qt,Zv),e(Qt,rn),e(rn,ey),e(rn,Gc),e(Gc,ty),e(rn,oy),e(rn,Xc),e(Xc,ny),e(rn,sy),e(Qt,ay),T(ls,Qt,null),b(s,ig,g),b(s,ln,g),e(ln,ds),e(ds,fh),T(si,fh,null),e(ln,ry),e(ln,mh),e(mh,iy),b(s,lg,g),b(s,Ie,g),T(ai,Ie,null),e(Ie,ly),e(Ie,gh),e(gh,dy),e(Ie,cy),e(Ie,_h),e(_h,py),e(Ie,hy),T(cs,Ie,null),e(Ie,uy),e(Ie,ri),e(ri,fy),e(ri,bh),e(bh,my),e(ri,gy),e(Ie,_y),T(ps,Ie,null),e(Ie,by),e(Ie,ii),e(ii,ky),e(ii,Yc),e(Yc,vy),e(ii,yy),e(Ie,wy),e(Ie,Oo),T(li,Oo,null),e(Oo,Ty),e(Oo,kh),e(kh,$y),e(Oo,Fy),e(Oo,di),e(di,Zc),e(Zc,xy),e(Zc,vh),e(vh,Ry),e(di,Ey),e(di,ep),e(ep,My),e(ep,yh),e(yh,zy),e(Ie,qy),e(Ie,hs),T(ci,hs,null),e(hs,Cy),e(hs,pi),e(pi,jy),e(pi,wh),e(wh,Py),e(pi,Ay),e(Ie,Ly),e(Ie,us),T(hi,us,null),e(us,Oy),e(us,Th),e(Th,Ny),e(Ie,Iy),e(Ie,tp),T(ui,tp,null),b(s,dg,g),b(s,dn,g),e(dn,fs),e(fs,$h),T(fi,$h,null),e(dn,Dy),e(dn,Fh),e(Fh,Sy),b(s,cg,g),b(s,tt,g),T(mi,tt,null),e(tt,By),e(tt,gi),e(gi,Wy),e(gi,xh),e(xh,Uy),e(gi,Hy),e(tt,Qy),e(tt,Rh),e(Rh,Ky),e(tt,Jy),T(ms,tt,null),e(tt,Vy),e(tt,_i),e(_i,Gy),e(_i,Eh),e(Eh,Xy),e(_i,Yy),e(tt,Zy),T(gs,tt,null),e(tt,ew),e(tt,bi),e(bi,tw),e(bi,op),e(op,ow),e(bi,nw),e(tt,sw),e(tt,np),T(ki,np,null),b(s,pg,g),b(s,cn,g),e(cn,_s),e(_s,Mh),T(vi,Mh,null),e(cn,aw),e(cn,zh),e(zh,rw),b(s,hg,g),b(s,ot,g),T(yi,ot,null),e(ot,iw),e(ot,qh),e(qh,lw),e(ot,dw),e(ot,wi),e(wi,cw),e(wi,sp),e(sp,pw),e(wi,hw),e(ot,uw),e(ot,Ti),e(Ti,fw),e(Ti,$i),e($i,mw),e(Ti,gw),e(ot,_w),e(ot,Fi),e(Fi,bw),e(Fi,Ch),e(Ch,kw),e(Fi,vw),e(ot,yw),e(ot,pt),e(pt,ww),e(pt,jh),e(jh,Tw),e(pt,$w),e(pt,Ph),e(Ph,Fw),e(pt,xw),e(pt,Ah),e(Ah,Rw),e(pt,Ew),e(pt,Lh),e(Lh,Mw),e(pt,zw),e(pt,Oh),e(Oh,qw),e(pt,Cw),e(pt,Nh),e(Nh,jw),e(pt,Pw),e(ot,Aw),e(ot,bs),e(bs,Lw),e(bs,Ih),e(Ih,Ow),e(bs,Nw),e(bs,xi),e(xi,Iw),e(ot,Dw),e(ot,Jt),T(Ri,Jt,null),e(Jt,Sw),e(Jt,pn),e(pn,Bw),e(pn,ap),e(ap,Ww),e(pn,Uw),e(pn,Dh),e(Dh,Hw),e(pn,Qw),e(Jt,Kw),T(ks,Jt,null),e(Jt,Jw),T(vs,Jt,null),b(s,ug,g),b(s,hn,g),e(hn,ys),e(ys,Sh),T(Ei,Sh,null),e(hn,Vw),e(hn,Bh),e(Bh,Gw),b(s,fg,g),b(s,yt,g),T(Mi,yt,null),e(yt,Xw),e(yt,zi),e(zi,Yw),e(zi,Wh),e(Wh,Zw),e(zi,eT),e(yt,tT),e(yt,qi),e(qi,oT),e(qi,rp),e(rp,nT),e(qi,sT),e(yt,aT),e(yt,Ci),e(Ci,rT),e(Ci,ji),e(ji,iT),e(Ci,lT),e(yt,dT),e(yt,Vt),T(Pi,Vt,null),e(Vt,cT),e(Vt,un),e(un,pT),e(un,ip),e(ip,hT),e(un,uT),e(un,Uh),e(Uh,fT),e(un,mT),e(Vt,gT),T(ws,Vt,null),e(Vt,_T),T(Ts,Vt,null),b(s,mg,g),b(s,fn,g),e(fn,$s),e($s,Hh),T(Ai,Hh,null),e(fn,bT),e(fn,Qh),e(Qh,kT),b(s,gg,g),b(s,wt,g),T(Li,wt,null),e(wt,vT),e(wt,Oi),e(Oi,yT),e(Oi,Kh),e(Kh,wT),e(Oi,TT),e(wt,$T),e(wt,Ni),e(Ni,FT),e(Ni,lp),e(lp,xT),e(Ni,RT),e(wt,ET),e(wt,Ii),e(Ii,MT),e(Ii,Di),e(Di,zT),e(Ii,qT),e(wt,CT),e(wt,zt),T(Si,zt,null),e(zt,jT),e(zt,mn),e(mn,PT),e(mn,dp),e(dp,AT),e(mn,LT),e(mn,Jh),e(Jh,OT),e(mn,NT),e(zt,IT),T(Fs,zt,null),e(zt,DT),T(xs,zt,null),e(zt,ST),T(Rs,zt,null),b(s,_g,g),b(s,gn,g),e(gn,Es),e(Es,Vh),T(Bi,Vh,null),e(gn,BT),e(gn,Gh),e(Gh,WT),b(s,bg,g),b(s,Tt,g),T(Wi,Tt,null),e(Tt,UT),e(Tt,Xh),e(Xh,HT),e(Tt,QT),e(Tt,Ui),e(Ui,KT),e(Ui,cp),e(cp,JT),e(Ui,VT),e(Tt,GT),e(Tt,Hi),e(Hi,XT),e(Hi,Qi),e(Qi,YT),e(Hi,ZT),e(Tt,e1),e(Tt,ct),T(Ki,ct,null),e(ct,t1),e(ct,_n),e(_n,o1),e(_n,pp),e(pp,n1),e(_n,s1),e(_n,Yh),e(Yh,a1),e(_n,r1),e(ct,i1),T(Ms,ct,null),e(ct,l1),T(zs,ct,null),e(ct,d1),T(qs,ct,null),e(ct,c1),T(Cs,ct,null),e(ct,p1),T(js,ct,null),b(s,kg,g),b(s,bn,g),e(bn,Ps),e(Ps,Zh),T(Ji,Zh,null),e(bn,h1),e(bn,eu),e(eu,u1),b(s,vg,g),b(s,$t,g),T(Vi,$t,null),e($t,f1),e($t,tu),e(tu,m1),e($t,g1),e($t,Gi),e(Gi,_1),e(Gi,hp),e(hp,b1),e(Gi,k1),e($t,v1),e($t,Xi),e(Xi,y1),e(Xi,Yi),e(Yi,w1),e(Xi,T1),e($t,$1),e($t,Gt),T(Zi,Gt,null),e(Gt,F1),e(Gt,kn),e(kn,x1),e(kn,up),e(up,R1),e(kn,E1),e(kn,ou),e(ou,M1),e(kn,z1),e(Gt,q1),T(As,Gt,null),e(Gt,C1),T(Ls,Gt,null),b(s,yg,g),b(s,vn,g),e(vn,Os),e(Os,nu),T(el,nu,null),e(vn,j1),e(vn,su),e(su,P1),b(s,wg,g),b(s,Ft,g),T(tl,Ft,null),e(Ft,A1),e(Ft,au),e(au,L1),e(Ft,O1),e(Ft,ol),e(ol,N1),e(ol,fp),e(fp,I1),e(ol,D1),e(Ft,S1),e(Ft,nl),e(nl,B1),e(nl,sl),e(sl,W1),e(nl,U1),e(Ft,H1),e(Ft,qt),T(al,qt,null),e(qt,Q1),e(qt,yn),e(yn,K1),e(yn,mp),e(mp,J1),e(yn,V1),e(yn,ru),e(ru,G1),e(yn,X1),e(qt,Y1),T(Ns,qt,null),e(qt,Z1),T(Is,qt,null),e(qt,e$),T(Ds,qt,null),b(s,Tg,g),b(s,wn,g),e(wn,Ss),e(Ss,iu),T(rl,iu,null),e(wn,t$),e(wn,lu),e(lu,o$),b(s,$g,g),b(s,xt,g),T(il,xt,null),e(xt,n$),e(xt,Tn),e(Tn,s$),e(Tn,du),e(du,a$),e(Tn,r$),e(Tn,cu),e(cu,i$),e(Tn,l$),e(xt,d$),e(xt,ll),e(ll,c$),e(ll,gp),e(gp,p$),e(ll,h$),e(xt,u$),e(xt,dl),e(dl,f$),e(dl,cl),e(cl,m$),e(dl,g$),e(xt,_$),e(xt,Ct),T(pl,Ct,null),e(Ct,b$),e(Ct,$n),e($n,k$),e($n,_p),e(_p,v$),e($n,y$),e($n,pu),e(pu,w$),e($n,T$),e(Ct,$$),T(Bs,Ct,null),e(Ct,F$),T(Ws,Ct,null),e(Ct,x$),T(Us,Ct,null),b(s,Fg,g),b(s,Fn,g),e(Fn,Hs),e(Hs,hu),T(hl,hu,null),e(Fn,R$),e(Fn,uu),e(uu,E$),b(s,xg,g),b(s,ht,g),T(ul,ht,null),e(ht,M$),e(ht,fu),e(fu,z$),e(ht,q$),e(ht,fl),e(fl,C$),e(fl,bp),e(bp,j$),e(fl,P$),e(ht,A$),e(ht,ml),e(ml,L$),e(ml,gl),e(gl,O$),e(ml,N$),e(ht,I$),T(Qs,ht,null),e(ht,D$),e(ht,Xt),T(_l,Xt,null),e(Xt,S$),e(Xt,xn),e(xn,B$),e(xn,kp),e(kp,W$),e(xn,U$),e(xn,mu),e(mu,H$),e(xn,Q$),e(Xt,K$),T(Ks,Xt,null),e(Xt,J$),T(Js,Xt,null),b(s,Rg,g),b(s,Rn,g),e(Rn,Vs),e(Vs,gu),T(bl,gu,null),e(Rn,V$),e(Rn,_u),e(_u,G$),b(s,Eg,g),b(s,En,g),T(kl,En,null),e(En,X$),e(En,Yt),T(vl,Yt,null),e(Yt,Y$),e(Yt,Mn),e(Mn,Z$),e(Mn,vp),e(vp,e2),e(Mn,t2),e(Mn,bu),e(bu,o2),e(Mn,n2),e(Yt,s2),T(Gs,Yt,null),e(Yt,a2),T(Xs,Yt,null),b(s,Mg,g),b(s,zn,g),e(zn,Ys),e(Ys,ku),T(yl,ku,null),e(zn,r2),e(zn,vu),e(vu,i2),b(s,zg,g),b(s,ut,g),T(wl,ut,null),e(ut,l2),e(ut,Tl),e(Tl,d2),e(Tl,yu),e(yu,c2),e(Tl,p2),e(ut,h2),e(ut,$l),e($l,u2),e($l,yp),e(yp,f2),e($l,m2),e(ut,g2),e(ut,Fl),e(Fl,_2),e(Fl,xl),e(xl,b2),e(Fl,k2),e(ut,v2),T(Zs,ut,null),e(ut,y2),e(ut,jt),T(Rl,jt,null),e(jt,w2),e(jt,qn),e(qn,T2),e(qn,wp),e(wp,$2),e(qn,F2),e(qn,wu),e(wu,x2),e(qn,R2),e(jt,E2),T(ea,jt,null),e(jt,M2),T(ta,jt,null),e(jt,z2),T(oa,jt,null),b(s,qg,g),b(s,Cn,g),e(Cn,na),e(na,Tu),T(El,Tu,null),e(Cn,q2),e(Cn,$u),e($u,C2),b(s,Cg,g),b(s,ft,g),T(Ml,ft,null),e(ft,j2),e(ft,Fu),e(Fu,P2),e(ft,A2),e(ft,zl),e(zl,L2),e(zl,Tp),e(Tp,O2),e(zl,N2),e(ft,I2),e(ft,ql),e(ql,D2),e(ql,Cl),e(Cl,S2),e(ql,B2),e(ft,W2),T(sa,ft,null),e(ft,U2),e(ft,Pt),T(jl,Pt,null),e(Pt,H2),e(Pt,jn),e(jn,Q2),e(jn,$p),e($p,K2),e(jn,J2),e(jn,xu),e(xu,V2),e(jn,G2),e(Pt,X2),T(aa,Pt,null),e(Pt,Y2),T(ra,Pt,null),e(Pt,Z2),T(ia,Pt,null),b(s,jg,g),b(s,Pn,g),e(Pn,la),e(la,Ru),T(Pl,Ru,null),e(Pn,eF),e(Pn,Eu),e(Eu,tF),b(s,Pg,g),b(s,mt,g),T(Al,mt,null),e(mt,oF),e(mt,Mu),e(Mu,nF),e(mt,sF),e(mt,Ll),e(Ll,aF),e(Ll,Fp),e(Fp,rF),e(Ll,iF),e(mt,lF),e(mt,Ol),e(Ol,dF),e(Ol,Nl),e(Nl,cF),e(Ol,pF),e(mt,hF),T(da,mt,null),e(mt,uF),e(mt,Zt),T(Il,Zt,null),e(Zt,fF),e(Zt,An),e(An,mF),e(An,xp),e(xp,gF),e(An,_F),e(An,zu),e(zu,bF),e(An,kF),e(Zt,vF),T(ca,Zt,null),e(Zt,yF),T(pa,Zt,null),b(s,Ag,g),b(s,Ln,g),e(Ln,ha),e(ha,qu),T(Dl,qu,null),e(Ln,wF),e(Ln,Cu),e(Cu,TF),b(s,Lg,g),b(s,gt,g),T(Sl,gt,null),e(gt,$F),e(gt,ju),e(ju,FF),e(gt,xF),e(gt,Bl),e(Bl,RF),e(Bl,Rp),e(Rp,EF),e(Bl,MF),e(gt,zF),e(gt,Wl),e(Wl,qF),e(Wl,Ul),e(Ul,CF),e(Wl,jF),e(gt,PF),T(ua,gt,null),e(gt,AF),e(gt,At),T(Hl,At,null),e(At,LF),e(At,On),e(On,OF),e(On,Ep),e(Ep,NF),e(On,IF),e(On,Pu),e(Pu,DF),e(On,SF),e(At,BF),T(fa,At,null),e(At,WF),T(ma,At,null),e(At,UF),T(ga,At,null),b(s,Og,g),b(s,Nn,g),e(Nn,_a),e(_a,Au),T(Ql,Au,null),e(Nn,HF),e(Nn,Lu),e(Lu,QF),b(s,Ng,g),b(s,_t,g),T(Kl,_t,null),e(_t,KF),e(_t,In),e(In,JF),e(In,Ou),e(Ou,VF),e(In,GF),e(In,Nu),e(Nu,XF),e(In,YF),e(_t,ZF),e(_t,Jl),e(Jl,e0),e(Jl,Mp),e(Mp,t0),e(Jl,o0),e(_t,n0),e(_t,Vl),e(Vl,s0),e(Vl,Gl),e(Gl,a0),e(Vl,r0),e(_t,i0),T(ba,_t,null),e(_t,l0),e(_t,Lt),T(Xl,Lt,null),e(Lt,d0),e(Lt,Dn),e(Dn,c0),e(Dn,zp),e(zp,p0),e(Dn,h0),e(Dn,Iu),e(Iu,u0),e(Dn,f0),e(Lt,m0),T(ka,Lt,null),e(Lt,g0),T(va,Lt,null),e(Lt,_0),T(ya,Lt,null),b(s,Ig,g),b(s,Sn,g),e(Sn,wa),e(wa,Du),T(Yl,Du,null),e(Sn,b0),e(Sn,Su),e(Su,k0),b(s,Dg,g),b(s,nt,g),T(Zl,nt,null),e(nt,v0),e(nt,Bu),e(Bu,y0),e(nt,w0),e(nt,ed),e(ed,T0),e(ed,qp),e(qp,$0),e(ed,F0),e(nt,x0),e(nt,td),e(td,R0),e(td,od),e(od,E0),e(td,M0),e(nt,z0),e(nt,Wu),e(Wu,q0),e(nt,C0),e(nt,mo),e(mo,Uu),e(Uu,nd),e(nd,j0),e(mo,P0),e(mo,Hu),e(Hu,sd),e(sd,A0),e(mo,L0),e(mo,Qu),e(Qu,ad),e(ad,O0),e(mo,N0),e(mo,Ku),e(Ku,rd),e(rd,I0),e(nt,D0),e(nt,eo),T(id,eo,null),e(eo,S0),e(eo,Bn),e(Bn,B0),e(Bn,Ju),e(Ju,W0),e(Bn,U0),e(Bn,Vu),e(Vu,H0),e(Bn,Q0),e(eo,K0),T(Ta,eo,null),e(eo,J0),T($a,eo,null),b(s,Sg,g),b(s,Wn,g),e(Wn,Fa),e(Fa,Gu),T(ld,Gu,null),e(Wn,V0),e(Wn,Xu),e(Xu,G0),b(s,Bg,g),b(s,st,g),T(dd,st,null),e(st,X0),e(st,Yu),e(Yu,Y0),e(st,Z0),e(st,cd),e(cd,ex),e(cd,Cp),e(Cp,tx),e(cd,ox),e(st,nx),e(st,pd),e(pd,sx),e(pd,hd),e(hd,ax),e(pd,rx),e(st,ix),e(st,Zu),e(Zu,lx),e(st,dx),e(st,go),e(go,ef),e(ef,ud),e(ud,cx),e(go,px),e(go,tf),e(tf,fd),e(fd,hx),e(go,ux),e(go,of),e(of,md),e(md,fx),e(go,mx),e(go,nf),e(nf,gd),e(gd,gx),e(st,_x),e(st,to),T(_d,to,null),e(to,bx),e(to,Un),e(Un,kx),e(Un,sf),e(sf,vx),e(Un,yx),e(Un,af),e(af,wx),e(Un,Tx),e(to,$x),T(xa,to,null),e(to,Fx),T(Ra,to,null),b(s,Wg,g),b(s,Hn,g),e(Hn,Ea),e(Ea,rf),T(bd,rf,null),e(Hn,xx),e(Hn,lf),e(lf,Rx),b(s,Ug,g),b(s,at,g),T(kd,at,null),e(at,Ex),e(at,vd),e(vd,Mx),e(vd,df),e(df,zx),e(vd,qx),e(at,Cx),e(at,yd),e(yd,jx),e(yd,jp),e(jp,Px),e(yd,Ax),e(at,Lx),e(at,wd),e(wd,Ox),e(wd,Td),e(Td,Nx),e(wd,Ix),e(at,Dx),e(at,cf),e(cf,Sx),e(at,Bx),e(at,_o),e(_o,pf),e(pf,$d),e($d,Wx),e(_o,Ux),e(_o,hf),e(hf,Fd),e(Fd,Hx),e(_o,Qx),e(_o,uf),e(uf,xd),e(xd,Kx),e(_o,Jx),e(_o,ff),e(ff,Rd),e(Rd,Vx),e(at,Gx),e(at,oo),T(Ed,oo,null),e(oo,Xx),e(oo,Qn),e(Qn,Yx),e(Qn,mf),e(mf,Zx),e(Qn,e4),e(Qn,gf),e(gf,t4),e(Qn,o4),e(oo,n4),T(Ma,oo,null),e(oo,s4),T(za,oo,null),b(s,Hg,g),b(s,Kn,g),e(Kn,qa),e(qa,_f),T(Md,_f,null),e(Kn,a4),e(Kn,bf),e(bf,r4),b(s,Qg,g),b(s,rt,g),T(zd,rt,null),e(rt,i4),e(rt,kf),e(kf,l4),e(rt,d4),e(rt,qd),e(qd,c4),e(qd,Pp),e(Pp,p4),e(qd,h4),e(rt,u4),e(rt,Cd),e(Cd,f4),e(Cd,jd),e(jd,m4),e(Cd,g4),e(rt,_4),e(rt,vf),e(vf,b4),e(rt,k4),e(rt,bo),e(bo,yf),e(yf,Pd),e(Pd,v4),e(bo,y4),e(bo,wf),e(wf,Ad),e(Ad,w4),e(bo,T4),e(bo,Tf),e(Tf,Ld),e(Ld,$4),e(bo,F4),e(bo,$f),e($f,Od),e(Od,x4),e(rt,R4),e(rt,no),T(Nd,no,null),e(no,E4),e(no,Jn),e(Jn,M4),e(Jn,Ff),e(Ff,z4),e(Jn,q4),e(Jn,xf),e(xf,C4),e(Jn,j4),e(no,P4),T(Ca,no,null),e(no,A4),T(ja,no,null),b(s,Kg,g),b(s,Vn,g),e(Vn,Pa),e(Pa,Rf),T(Id,Rf,null),e(Vn,L4),e(Vn,Ef),e(Ef,O4),b(s,Jg,g),b(s,it,g),T(Dd,it,null),e(it,N4),e(it,Mf),e(Mf,I4),e(it,D4),e(it,Sd),e(Sd,S4),e(Sd,Ap),e(Ap,B4),e(Sd,W4),e(it,U4),e(it,Bd),e(Bd,H4),e(Bd,Wd),e(Wd,Q4),e(Bd,K4),e(it,J4),e(it,zf),e(zf,V4),e(it,G4),e(it,ko),e(ko,qf),e(qf,Ud),e(Ud,X4),e(ko,Y4),e(ko,Cf),e(Cf,Hd),e(Hd,Z4),e(ko,eR),e(ko,jf),e(jf,Qd),e(Qd,tR),e(ko,oR),e(ko,Pf),e(Pf,Kd),e(Kd,nR),e(it,sR),e(it,so),T(Jd,so,null),e(so,aR),e(so,Gn),e(Gn,rR),e(Gn,Af),e(Af,iR),e(Gn,lR),e(Gn,Lf),e(Lf,dR),e(Gn,cR),e(so,pR),T(Aa,so,null),e(so,hR),T(La,so,null),b(s,Vg,g),b(s,Xn,g),e(Xn,Oa),e(Oa,Of),T(Vd,Of,null),e(Xn,uR),e(Xn,Nf),e(Nf,fR),b(s,Gg,g),b(s,lt,g),T(Gd,lt,null),e(lt,mR),e(lt,If),e(If,gR),e(lt,_R),e(lt,Xd),e(Xd,bR),e(Xd,Lp),e(Lp,kR),e(Xd,vR),e(lt,yR),e(lt,Yd),e(Yd,wR),e(Yd,Zd),e(Zd,TR),e(Yd,$R),e(lt,FR),e(lt,Df),e(Df,xR),e(lt,RR),e(lt,vo),e(vo,Sf),e(Sf,ec),e(ec,ER),e(vo,MR),e(vo,Bf),e(Bf,tc),e(tc,zR),e(vo,qR),e(vo,Wf),e(Wf,oc),e(oc,CR),e(vo,jR),e(vo,Uf),e(Uf,nc),e(nc,PR),e(lt,AR),e(lt,ao),T(sc,ao,null),e(ao,LR),e(ao,Yn),e(Yn,OR),e(Yn,Hf),e(Hf,NR),e(Yn,IR),e(Yn,Qf),e(Qf,DR),e(Yn,SR),e(ao,BR),T(Na,ao,null),e(ao,WR),T(Ia,ao,null),b(s,Xg,g),b(s,Zn,g),e(Zn,Da),e(Da,Kf),T(ac,Kf,null),e(Zn,UR),e(Zn,Jf),e(Jf,HR),b(s,Yg,g),b(s,dt,g),T(rc,dt,null),e(dt,QR),e(dt,es),e(es,KR),e(es,Vf),e(Vf,JR),e(es,VR),e(es,Gf),e(Gf,GR),e(es,XR),e(dt,YR),e(dt,ic),e(ic,ZR),e(ic,Op),e(Op,eE),e(ic,tE),e(dt,oE),e(dt,lc),e(lc,nE),e(lc,dc),e(dc,sE),e(lc,aE),e(dt,rE),e(dt,Xf),e(Xf,iE),e(dt,lE),e(dt,yo),e(yo,Yf),e(Yf,cc),e(cc,dE),e(yo,cE),e(yo,Zf),e(Zf,pc),e(pc,pE),e(yo,hE),e(yo,em),e(em,hc),e(hc,uE),e(yo,fE),e(yo,tm),e(tm,uc),e(uc,mE),e(dt,gE),e(dt,ro),T(fc,ro,null),e(ro,_E),e(ro,ts),e(ts,bE),e(ts,om),e(om,kE),e(ts,vE),e(ts,nm),e(nm,yE),e(ts,wE),e(ro,TE),T(Sa,ro,null),e(ro,$E),T(Ba,ro,null),Zg=!0},p(s,[g]){const mc={};g&2&&(mc.$$scope={dirty:g,ctx:s}),ls.$set(mc);const sm={};g&2&&(sm.$$scope={dirty:g,ctx:s}),cs.$set(sm);const am={};g&2&&(am.$$scope={dirty:g,ctx:s}),ps.$set(am);const rm={};g&2&&(rm.$$scope={dirty:g,ctx:s}),ms.$set(rm);const gc={};g&2&&(gc.$$scope={dirty:g,ctx:s}),gs.$set(gc);const im={};g&2&&(im.$$scope={dirty:g,ctx:s}),ks.$set(im);const lm={};g&2&&(lm.$$scope={dirty:g,ctx:s}),vs.$set(lm);const dm={};g&2&&(dm.$$scope={dirty:g,ctx:s}),ws.$set(dm);const _c={};g&2&&(_c.$$scope={dirty:g,ctx:s}),Ts.$set(_c);const cm={};g&2&&(cm.$$scope={dirty:g,ctx:s}),Fs.$set(cm);const pm={};g&2&&(pm.$$scope={dirty:g,ctx:s}),xs.$set(pm);const hm={};g&2&&(hm.$$scope={dirty:g,ctx:s}),Rs.$set(hm);const um={};g&2&&(um.$$scope={dirty:g,ctx:s}),Ms.$set(um);const fm={};g&2&&(fm.$$scope={dirty:g,ctx:s}),zs.$set(fm);const mm={};g&2&&(mm.$$scope={dirty:g,ctx:s}),qs.$set(mm);const wo={};g&2&&(wo.$$scope={dirty:g,ctx:s}),Cs.$set(wo);const bc={};g&2&&(bc.$$scope={dirty:g,ctx:s}),js.$set(bc);const gm={};g&2&&(gm.$$scope={dirty:g,ctx:s}),As.$set(gm);const _m={};g&2&&(_m.$$scope={dirty:g,ctx:s}),Ls.$set(_m);const To={};g&2&&(To.$$scope={dirty:g,ctx:s}),Ns.$set(To);const bm={};g&2&&(bm.$$scope={dirty:g,ctx:s}),Is.$set(bm);const km={};g&2&&(km.$$scope={dirty:g,ctx:s}),Ds.$set(km);const vm={};g&2&&(vm.$$scope={dirty:g,ctx:s}),Bs.$set(vm);const Np={};g&2&&(Np.$$scope={dirty:g,ctx:s}),Ws.$set(Np);const ym={};g&2&&(ym.$$scope={dirty:g,ctx:s}),Us.$set(ym);const os={};g&2&&(os.$$scope={dirty:g,ctx:s}),Qs.$set(os);const wm={};g&2&&(wm.$$scope={dirty:g,ctx:s}),Ks.$set(wm);const Tm={};g&2&&(Tm.$$scope={dirty:g,ctx:s}),Js.$set(Tm);const kc={};g&2&&(kc.$$scope={dirty:g,ctx:s}),Gs.$set(kc);const $m={};g&2&&($m.$$scope={dirty:g,ctx:s}),Xs.$set($m);const Fm={};g&2&&(Fm.$$scope={dirty:g,ctx:s}),Zs.$set(Fm);const xm={};g&2&&(xm.$$scope={dirty:g,ctx:s}),ea.$set(xm);const Rm={};g&2&&(Rm.$$scope={dirty:g,ctx:s}),ta.$set(Rm);const Rt={};g&2&&(Rt.$$scope={dirty:g,ctx:s}),oa.$set(Rt);const ns={};g&2&&(ns.$$scope={dirty:g,ctx:s}),sa.$set(ns);const Em={};g&2&&(Em.$$scope={dirty:g,ctx:s}),aa.$set(Em);const Mm={};g&2&&(Mm.$$scope={dirty:g,ctx:s}),ra.$set(Mm);const vc={};g&2&&(vc.$$scope={dirty:g,ctx:s}),ia.$set(vc);const zm={};g&2&&(zm.$$scope={dirty:g,ctx:s}),da.$set(zm);const yc={};g&2&&(yc.$$scope={dirty:g,ctx:s}),ca.$set(yc);const qm={};g&2&&(qm.$$scope={dirty:g,ctx:s}),pa.$set(qm);const No={};g&2&&(No.$$scope={dirty:g,ctx:s}),ua.$set(No);const Cm={};g&2&&(Cm.$$scope={dirty:g,ctx:s}),fa.$set(Cm);const jm={};g&2&&(jm.$$scope={dirty:g,ctx:s}),ma.$set(jm);const Pm={};g&2&&(Pm.$$scope={dirty:g,ctx:s}),ga.$set(Pm);const Io={};g&2&&(Io.$$scope={dirty:g,ctx:s}),ba.$set(Io);const Am={};g&2&&(Am.$$scope={dirty:g,ctx:s}),ka.$set(Am);const Lm={};g&2&&(Lm.$$scope={dirty:g,ctx:s}),va.$set(Lm);const Om={};g&2&&(Om.$$scope={dirty:g,ctx:s}),ya.$set(Om);const Do={};g&2&&(Do.$$scope={dirty:g,ctx:s}),Ta.$set(Do);const Nm={};g&2&&(Nm.$$scope={dirty:g,ctx:s}),$a.$set(Nm);const Im={};g&2&&(Im.$$scope={dirty:g,ctx:s}),xa.$set(Im);const Dm={};g&2&&(Dm.$$scope={dirty:g,ctx:s}),Ra.$set(Dm);const $o={};g&2&&($o.$$scope={dirty:g,ctx:s}),Ma.$set($o);const So={};g&2&&(So.$$scope={dirty:g,ctx:s}),za.$set(So);const Sm={};g&2&&(Sm.$$scope={dirty:g,ctx:s}),Ca.$set(Sm);const Bm={};g&2&&(Bm.$$scope={dirty:g,ctx:s}),ja.$set(Bm);const Wm={};g&2&&(Wm.$$scope={dirty:g,ctx:s}),Aa.$set(Wm);const Bo={};g&2&&(Bo.$$scope={dirty:g,ctx:s}),La.$set(Bo);const Um={};g&2&&(Um.$$scope={dirty:g,ctx:s}),Na.$set(Um);const Hm={};g&2&&(Hm.$$scope={dirty:g,ctx:s}),Ia.$set(Hm);const Qm={};g&2&&(Qm.$$scope={dirty:g,ctx:s}),Sa.$set(Qm);const Wa={};g&2&&(Wa.$$scope={dirty:g,ctx:s}),Ba.$set(Wa)},i(s){Zg||($(l.$$.fragment,s),$(M.$$.fragment,s),$(We.$$.fragment,s),$(hr.$$.fragment,s),$(Fr.$$.fragment,s),$(Cr.$$.fragment,s),$(Br.$$.fragment,s),$(ti.$$.fragment,s),$(oi.$$.fragment,s),$(ls.$$.fragment,s),$(si.$$.fragment,s),$(ai.$$.fragment,s),$(cs.$$.fragment,s),$(ps.$$.fragment,s),$(li.$$.fragment,s),$(ci.$$.fragment,s),$(hi.$$.fragment,s),$(ui.$$.fragment,s),$(fi.$$.fragment,s),$(mi.$$.fragment,s),$(ms.$$.fragment,s),$(gs.$$.fragment,s),$(ki.$$.fragment,s),$(vi.$$.fragment,s),$(yi.$$.fragment,s),$(Ri.$$.fragment,s),$(ks.$$.fragment,s),$(vs.$$.fragment,s),$(Ei.$$.fragment,s),$(Mi.$$.fragment,s),$(Pi.$$.fragment,s),$(ws.$$.fragment,s),$(Ts.$$.fragment,s),$(Ai.$$.fragment,s),$(Li.$$.fragment,s),$(Si.$$.fragment,s),$(Fs.$$.fragment,s),$(xs.$$.fragment,s),$(Rs.$$.fragment,s),$(Bi.$$.fragment,s),$(Wi.$$.fragment,s),$(Ki.$$.fragment,s),$(Ms.$$.fragment,s),$(zs.$$.fragment,s),$(qs.$$.fragment,s),$(Cs.$$.fragment,s),$(js.$$.fragment,s),$(Ji.$$.fragment,s),$(Vi.$$.fragment,s),$(Zi.$$.fragment,s),$(As.$$.fragment,s),$(Ls.$$.fragment,s),$(el.$$.fragment,s),$(tl.$$.fragment,s),$(al.$$.fragment,s),$(Ns.$$.fragment,s),$(Is.$$.fragment,s),$(Ds.$$.fragment,s),$(rl.$$.fragment,s),$(il.$$.fragment,s),$(pl.$$.fragment,s),$(Bs.$$.fragment,s),$(Ws.$$.fragment,s),$(Us.$$.fragment,s),$(hl.$$.fragment,s),$(ul.$$.fragment,s),$(Qs.$$.fragment,s),$(_l.$$.fragment,s),$(Ks.$$.fragment,s),$(Js.$$.fragment,s),$(bl.$$.fragment,s),$(kl.$$.fragment,s),$(vl.$$.fragment,s),$(Gs.$$.fragment,s),$(Xs.$$.fragment,s),$(yl.$$.fragment,s),$(wl.$$.fragment,s),$(Zs.$$.fragment,s),$(Rl.$$.fragment,s),$(ea.$$.fragment,s),$(ta.$$.fragment,s),$(oa.$$.fragment,s),$(El.$$.fragment,s),$(Ml.$$.fragment,s),$(sa.$$.fragment,s),$(jl.$$.fragment,s),$(aa.$$.fragment,s),$(ra.$$.fragment,s),$(ia.$$.fragment,s),$(Pl.$$.fragment,s),$(Al.$$.fragment,s),$(da.$$.fragment,s),$(Il.$$.fragment,s),$(ca.$$.fragment,s),$(pa.$$.fragment,s),$(Dl.$$.fragment,s),$(Sl.$$.fragment,s),$(ua.$$.fragment,s),$(Hl.$$.fragment,s),$(fa.$$.fragment,s),$(ma.$$.fragment,s),$(ga.$$.fragment,s),$(Ql.$$.fragment,s),$(Kl.$$.fragment,s),$(ba.$$.fragment,s),$(Xl.$$.fragment,s),$(ka.$$.fragment,s),$(va.$$.fragment,s),$(ya.$$.fragment,s),$(Yl.$$.fragment,s),$(Zl.$$.fragment,s),$(id.$$.fragment,s),$(Ta.$$.fragment,s),$($a.$$.fragment,s),$(ld.$$.fragment,s),$(dd.$$.fragment,s),$(_d.$$.fragment,s),$(xa.$$.fragment,s),$(Ra.$$.fragment,s),$(bd.$$.fragment,s),$(kd.$$.fragment,s),$(Ed.$$.fragment,s),$(Ma.$$.fragment,s),$(za.$$.fragment,s),$(Md.$$.fragment,s),$(zd.$$.fragment,s),$(Nd.$$.fragment,s),$(Ca.$$.fragment,s),$(ja.$$.fragment,s),$(Id.$$.fragment,s),$(Dd.$$.fragment,s),$(Jd.$$.fragment,s),$(Aa.$$.fragment,s),$(La.$$.fragment,s),$(Vd.$$.fragment,s),$(Gd.$$.fragment,s),$(sc.$$.fragment,s),$(Na.$$.fragment,s),$(Ia.$$.fragment,s),$(ac.$$.fragment,s),$(rc.$$.fragment,s),$(fc.$$.fragment,s),$(Sa.$$.fragment,s),$(Ba.$$.fragment,s),Zg=!0)},o(s){F(l.$$.fragment,s),F(M.$$.fragment,s),F(We.$$.fragment,s),F(hr.$$.fragment,s),F(Fr.$$.fragment,s),F(Cr.$$.fragment,s),F(Br.$$.fragment,s),F(ti.$$.fragment,s),F(oi.$$.fragment,s),F(ls.$$.fragment,s),F(si.$$.fragment,s),F(ai.$$.fragment,s),F(cs.$$.fragment,s),F(ps.$$.fragment,s),F(li.$$.fragment,s),F(ci.$$.fragment,s),F(hi.$$.fragment,s),F(ui.$$.fragment,s),F(fi.$$.fragment,s),F(mi.$$.fragment,s),F(ms.$$.fragment,s),F(gs.$$.fragment,s),F(ki.$$.fragment,s),F(vi.$$.fragment,s),F(yi.$$.fragment,s),F(Ri.$$.fragment,s),F(ks.$$.fragment,s),F(vs.$$.fragment,s),F(Ei.$$.fragment,s),F(Mi.$$.fragment,s),F(Pi.$$.fragment,s),F(ws.$$.fragment,s),F(Ts.$$.fragment,s),F(Ai.$$.fragment,s),F(Li.$$.fragment,s),F(Si.$$.fragment,s),F(Fs.$$.fragment,s),F(xs.$$.fragment,s),F(Rs.$$.fragment,s),F(Bi.$$.fragment,s),F(Wi.$$.fragment,s),F(Ki.$$.fragment,s),F(Ms.$$.fragment,s),F(zs.$$.fragment,s),F(qs.$$.fragment,s),F(Cs.$$.fragment,s),F(js.$$.fragment,s),F(Ji.$$.fragment,s),F(Vi.$$.fragment,s),F(Zi.$$.fragment,s),F(As.$$.fragment,s),F(Ls.$$.fragment,s),F(el.$$.fragment,s),F(tl.$$.fragment,s),F(al.$$.fragment,s),F(Ns.$$.fragment,s),F(Is.$$.fragment,s),F(Ds.$$.fragment,s),F(rl.$$.fragment,s),F(il.$$.fragment,s),F(pl.$$.fragment,s),F(Bs.$$.fragment,s),F(Ws.$$.fragment,s),F(Us.$$.fragment,s),F(hl.$$.fragment,s),F(ul.$$.fragment,s),F(Qs.$$.fragment,s),F(_l.$$.fragment,s),F(Ks.$$.fragment,s),F(Js.$$.fragment,s),F(bl.$$.fragment,s),F(kl.$$.fragment,s),F(vl.$$.fragment,s),F(Gs.$$.fragment,s),F(Xs.$$.fragment,s),F(yl.$$.fragment,s),F(wl.$$.fragment,s),F(Zs.$$.fragment,s),F(Rl.$$.fragment,s),F(ea.$$.fragment,s),F(ta.$$.fragment,s),F(oa.$$.fragment,s),F(El.$$.fragment,s),F(Ml.$$.fragment,s),F(sa.$$.fragment,s),F(jl.$$.fragment,s),F(aa.$$.fragment,s),F(ra.$$.fragment,s),F(ia.$$.fragment,s),F(Pl.$$.fragment,s),F(Al.$$.fragment,s),F(da.$$.fragment,s),F(Il.$$.fragment,s),F(ca.$$.fragment,s),F(pa.$$.fragment,s),F(Dl.$$.fragment,s),F(Sl.$$.fragment,s),F(ua.$$.fragment,s),F(Hl.$$.fragment,s),F(fa.$$.fragment,s),F(ma.$$.fragment,s),F(ga.$$.fragment,s),F(Ql.$$.fragment,s),F(Kl.$$.fragment,s),F(ba.$$.fragment,s),F(Xl.$$.fragment,s),F(ka.$$.fragment,s),F(va.$$.fragment,s),F(ya.$$.fragment,s),F(Yl.$$.fragment,s),F(Zl.$$.fragment,s),F(id.$$.fragment,s),F(Ta.$$.fragment,s),F($a.$$.fragment,s),F(ld.$$.fragment,s),F(dd.$$.fragment,s),F(_d.$$.fragment,s),F(xa.$$.fragment,s),F(Ra.$$.fragment,s),F(bd.$$.fragment,s),F(kd.$$.fragment,s),F(Ed.$$.fragment,s),F(Ma.$$.fragment,s),F(za.$$.fragment,s),F(Md.$$.fragment,s),F(zd.$$.fragment,s),F(Nd.$$.fragment,s),F(Ca.$$.fragment,s),F(ja.$$.fragment,s),F(Id.$$.fragment,s),F(Dd.$$.fragment,s),F(Jd.$$.fragment,s),F(Aa.$$.fragment,s),F(La.$$.fragment,s),F(Vd.$$.fragment,s),F(Gd.$$.fragment,s),F(sc.$$.fragment,s),F(Na.$$.fragment,s),F(Ia.$$.fragment,s),F(ac.$$.fragment,s),F(rc.$$.fragment,s),F(fc.$$.fragment,s),F(Sa.$$.fragment,s),F(Ba.$$.fragment,s),Zg=!1},d(s){t(d),s&&t(_),s&&t(u),x(l),s&&t(Z),s&&t(N),x(M),s&&t(ge),s&&t(B),s&&t(_e),s&&t(U),s&&t(be),s&&t(H),s&&t(ke),s&&t(ee),s&&t(ve),s&&t(Q),s&&t(ye),s&&t(I),s&&t(Ke),s&&t(q),s&&t(Je),s&&t(Oe),x(We),s&&t(Ve),s&&t(Mc),s&&t(Vm),x(hr,s),s&&t(Gm),s&&t(bt),s&&t(Xm),x(Fr,s),s&&t(Ym),s&&t(Kt),s&&t(Zm),x(Cr,s),s&&t(eg),s&&t(Et),s&&t(tg),x(Br,s),s&&t(og),s&&t(Mt),s&&t(ng),s&&t(Hc),s&&t(sg),s&&t(rs),s&&t(ag),s&&t(an),x(ti),s&&t(rg),s&&t(Qt),x(oi),x(ls),s&&t(ig),s&&t(ln),x(si),s&&t(lg),s&&t(Ie),x(ai),x(cs),x(ps),x(li),x(ci),x(hi),x(ui),s&&t(dg),s&&t(dn),x(fi),s&&t(cg),s&&t(tt),x(mi),x(ms),x(gs),x(ki),s&&t(pg),s&&t(cn),x(vi),s&&t(hg),s&&t(ot),x(yi),x(Ri),x(ks),x(vs),s&&t(ug),s&&t(hn),x(Ei),s&&t(fg),s&&t(yt),x(Mi),x(Pi),x(ws),x(Ts),s&&t(mg),s&&t(fn),x(Ai),s&&t(gg),s&&t(wt),x(Li),x(Si),x(Fs),x(xs),x(Rs),s&&t(_g),s&&t(gn),x(Bi),s&&t(bg),s&&t(Tt),x(Wi),x(Ki),x(Ms),x(zs),x(qs),x(Cs),x(js),s&&t(kg),s&&t(bn),x(Ji),s&&t(vg),s&&t($t),x(Vi),x(Zi),x(As),x(Ls),s&&t(yg),s&&t(vn),x(el),s&&t(wg),s&&t(Ft),x(tl),x(al),x(Ns),x(Is),x(Ds),s&&t(Tg),s&&t(wn),x(rl),s&&t($g),s&&t(xt),x(il),x(pl),x(Bs),x(Ws),x(Us),s&&t(Fg),s&&t(Fn),x(hl),s&&t(xg),s&&t(ht),x(ul),x(Qs),x(_l),x(Ks),x(Js),s&&t(Rg),s&&t(Rn),x(bl),s&&t(Eg),s&&t(En),x(kl),x(vl),x(Gs),x(Xs),s&&t(Mg),s&&t(zn),x(yl),s&&t(zg),s&&t(ut),x(wl),x(Zs),x(Rl),x(ea),x(ta),x(oa),s&&t(qg),s&&t(Cn),x(El),s&&t(Cg),s&&t(ft),x(Ml),x(sa),x(jl),x(aa),x(ra),x(ia),s&&t(jg),s&&t(Pn),x(Pl),s&&t(Pg),s&&t(mt),x(Al),x(da),x(Il),x(ca),x(pa),s&&t(Ag),s&&t(Ln),x(Dl),s&&t(Lg),s&&t(gt),x(Sl),x(ua),x(Hl),x(fa),x(ma),x(ga),s&&t(Og),s&&t(Nn),x(Ql),s&&t(Ng),s&&t(_t),x(Kl),x(ba),x(Xl),x(ka),x(va),x(ya),s&&t(Ig),s&&t(Sn),x(Yl),s&&t(Dg),s&&t(nt),x(Zl),x(id),x(Ta),x($a),s&&t(Sg),s&&t(Wn),x(ld),s&&t(Bg),s&&t(st),x(dd),x(_d),x(xa),x(Ra),s&&t(Wg),s&&t(Hn),x(bd),s&&t(Ug),s&&t(at),x(kd),x(Ed),x(Ma),x(za),s&&t(Hg),s&&t(Kn),x(Md),s&&t(Qg),s&&t(rt),x(zd),x(Nd),x(Ca),x(ja),s&&t(Kg),s&&t(Vn),x(Id),s&&t(Jg),s&&t(it),x(Dd),x(Jd),x(Aa),x(La),s&&t(Vg),s&&t(Xn),x(Vd),s&&t(Gg),s&&t(lt),x(Gd),x(sc),x(Na),x(Ia),s&&t(Xg),s&&t(Zn),x(ac),s&&t(Yg),s&&t(dt),x(rc),x(fc),x(Sa),x(Ba)}}}const w3={local:"roberta",sections:[{local:"overview",title:"Overview"},{local:"resources",title:"Resources"},{local:"transformers.RobertaConfig",title:"RobertaConfig"},{local:"transformers.RobertaTokenizer",title:"RobertaTokenizer"},{local:"transformers.RobertaTokenizerFast",title:"RobertaTokenizerFast"},{local:"transformers.RobertaModel",title:"RobertaModel"},{local:"transformers.RobertaForCausalLM",title:"RobertaForCausalLM"},{local:"transformers.RobertaForMaskedLM",title:"RobertaForMaskedLM"},{local:"transformers.RobertaForSequenceClassification",title:"RobertaForSequenceClassification"},{local:"transformers.RobertaForMultipleChoice",title:"RobertaForMultipleChoice"},{local:"transformers.RobertaForTokenClassification",title:"RobertaForTokenClassification"},{local:"transformers.RobertaForQuestionAnswering",title:"RobertaForQuestionAnswering"},{local:"transformers.TFRobertaModel",title:"TFRobertaModel"},{local:"transformers.TFRobertaForCausalLM",title:"TFRobertaForCausalLM"},{local:"transformers.TFRobertaForMaskedLM",title:"TFRobertaForMaskedLM"},{local:"transformers.TFRobertaForSequenceClassification",title:"TFRobertaForSequenceClassification"},{local:"transformers.TFRobertaForMultipleChoice",title:"TFRobertaForMultipleChoice"},{local:"transformers.TFRobertaForTokenClassification",title:"TFRobertaForTokenClassification"},{local:"transformers.TFRobertaForQuestionAnswering",title:"TFRobertaForQuestionAnswering"},{local:"transformers.FlaxRobertaModel",title:"FlaxRobertaModel"},{local:"transformers.FlaxRobertaForCausalLM",title:"FlaxRobertaForCausalLM"},{local:"transformers.FlaxRobertaForMaskedLM",title:"FlaxRobertaForMaskedLM"},{local:"transformers.FlaxRobertaForSequenceClassification",title:"FlaxRobertaForSequenceClassification"},{local:"transformers.FlaxRobertaForMultipleChoice",title:"FlaxRobertaForMultipleChoice"},{local:"transformers.FlaxRobertaForTokenClassification",title:"FlaxRobertaForTokenClassification"},{local:"transformers.FlaxRobertaForQuestionAnswering",title:"FlaxRobertaForQuestionAnswering"}],title:"RoBERTa"};function T3(R){return pj(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class q3 extends ij{constructor(d){super();lj(this,d,T3,y3,dj,{})}}export{q3 as default,w3 as metadata};
