import{S as RI,i as EI,s as xI,e as s,k as p,w as T,t as o,M as jI,c as a,d as t,m as h,a as r,x as k,h as n,b as c,N as Mx,G as e,g,y as w,q as M,o as $,B as F,v as JI,L as Me}from"../../chunks/vendor-hf-doc-builder.js";import{T as ke}from"../../chunks/Tip-hf-doc-builder.js";import{D as W}from"../../chunks/Docstring-hf-doc-builder.js";import{C as $e}from"../../chunks/CodeBlock-hf-doc-builder.js";import{I as Ze}from"../../chunks/IconCopyLink-hf-doc-builder.js";import{E as we}from"../../chunks/ExampleCodeBlock-hf-doc-builder.js";import{P as Kb}from"../../chunks/PipelineTag-hf-doc-builder.js";function zI(R){let d,y,m,f,b;return f=new $e({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMFJvYmVydGFDb25maWclMkMlMjBSb2JlcnRhTW9kZWwlMEElMEElMjMlMjBJbml0aWFsaXppbmclMjBhJTIwUm9CRVJUYSUyMGNvbmZpZ3VyYXRpb24lMEFjb25maWd1cmF0aW9uJTIwJTNEJTIwUm9iZXJ0YUNvbmZpZygpJTBBJTBBJTIzJTIwSW5pdGlhbGl6aW5nJTIwYSUyMG1vZGVsJTIwKHdpdGglMjByYW5kb20lMjB3ZWlnaHRzKSUyMGZyb20lMjB0aGUlMjBjb25maWd1cmF0aW9uJTBBbW9kZWwlMjAlM0QlMjBSb2JlcnRhTW9kZWwoY29uZmlndXJhdGlvbiklMEElMEElMjMlMjBBY2Nlc3NpbmclMjB0aGUlMjBtb2RlbCUyMGNvbmZpZ3VyYXRpb24lMEFjb25maWd1cmF0aW9uJTIwJTNEJTIwbW9kZWwuY29uZmln",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=s("p"),y=o("Examples:"),m=p(),T(f.$$.fragment)},l(i){d=a(i,"P",{});var u=r(d);y=n(u,"Examples:"),u.forEach(t),m=h(i),k(f.$$.fragment,i)},m(i,u){g(i,d,u),e(d,y),g(i,m,u),w(f,i,u),b=!0},p:Me,i(i){b||(M(f.$$.fragment,i),b=!0)},o(i){$(f.$$.fragment,i),b=!1},d(i){i&&t(d),i&&t(m),F(f,i)}}}function CI(R){let d,y,m,f,b;return f=new $e({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMFJvYmVydGFUb2tlbml6ZXIlMEElMEF0b2tlbml6ZXIlMjAlM0QlMjBSb2JlcnRhVG9rZW5pemVyLmZyb21fcHJldHJhaW5lZCglMjJyb2JlcnRhLWJhc2UlMjIpJTBBdG9rZW5pemVyKCUyMkhlbGxvJTIwd29ybGQlMjIpJTVCJTIyaW5wdXRfaWRzJTIyJTVEJTBBJTBBdG9rZW5pemVyKCUyMiUyMEhlbGxvJTIwd29ybGQlMjIpJTVCJTIyaW5wdXRfaWRzJTIyJTVE",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> RobertaTokenizer

<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>tokenizer(<span class="hljs-string">&quot;Hello world&quot;</span>)[<span class="hljs-string">&quot;input_ids&quot;</span>]
[<span class="hljs-number">0</span>, <span class="hljs-number">31414</span>, <span class="hljs-number">232</span>, <span class="hljs-number">2</span>]

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer(<span class="hljs-string">&quot; Hello world&quot;</span>)[<span class="hljs-string">&quot;input_ids&quot;</span>]
[<span class="hljs-number">0</span>, <span class="hljs-number">20920</span>, <span class="hljs-number">232</span>, <span class="hljs-number">2</span>]`}}),{c(){d=s("p"),y=o("be encoded differently whether it is at the beginning of the sentence (without space) or not:"),m=p(),T(f.$$.fragment)},l(i){d=a(i,"P",{});var u=r(d);y=n(u,"be encoded differently whether it is at the beginning of the sentence (without space) or not:"),u.forEach(t),m=h(i),k(f.$$.fragment,i)},m(i,u){g(i,d,u),e(d,y),g(i,m,u),w(f,i,u),b=!0},p:Me,i(i){b||(M(f.$$.fragment,i),b=!0)},o(i){$(f.$$.fragment,i),b=!1},d(i){i&&t(d),i&&t(m),F(f,i)}}}function II(R){let d,y,m,f,b;return{c(){d=s("p"),y=o("When used with "),m=s("code"),f=o("is_split_into_words=True"),b=o(", this tokenizer will add a space before each word (even the first one).")},l(i){d=a(i,"P",{});var u=r(d);y=n(u,"When used with "),m=a(u,"CODE",{});var E=r(m);f=n(E,"is_split_into_words=True"),E.forEach(t),b=n(u,", this tokenizer will add a space before each word (even the first one)."),u.forEach(t)},m(i,u){g(i,d,u),e(d,y),e(d,m),e(m,f),e(d,b)},d(i){i&&t(d)}}}function UI(R){let d,y,m,f,b;return f=new $e({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMFJvYmVydGFUb2tlbml6ZXJGYXN0JTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwUm9iZXJ0YVRva2VuaXplckZhc3QuZnJvbV9wcmV0cmFpbmVkKCUyMnJvYmVydGEtYmFzZSUyMiklMEF0b2tlbml6ZXIoJTIySGVsbG8lMjB3b3JsZCUyMiklNUIlMjJpbnB1dF9pZHMlMjIlNUQlMEElMEF0b2tlbml6ZXIoJTIyJTIwSGVsbG8lMjB3b3JsZCUyMiklNUIlMjJpbnB1dF9pZHMlMjIlNUQ=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> RobertaTokenizerFast

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = RobertaTokenizerFast.from_pretrained(<span class="hljs-string">&quot;roberta-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer(<span class="hljs-string">&quot;Hello world&quot;</span>)[<span class="hljs-string">&quot;input_ids&quot;</span>]
[<span class="hljs-number">0</span>, <span class="hljs-number">31414</span>, <span class="hljs-number">232</span>, <span class="hljs-number">2</span>]

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer(<span class="hljs-string">&quot; Hello world&quot;</span>)[<span class="hljs-string">&quot;input_ids&quot;</span>]
[<span class="hljs-number">0</span>, <span class="hljs-number">20920</span>, <span class="hljs-number">232</span>, <span class="hljs-number">2</span>]`}}),{c(){d=s("p"),y=o("be encoded differently whether it is at the beginning of the sentence (without space) or not:"),m=p(),T(f.$$.fragment)},l(i){d=a(i,"P",{});var u=r(d);y=n(u,"be encoded differently whether it is at the beginning of the sentence (without space) or not:"),u.forEach(t),m=h(i),k(f.$$.fragment,i)},m(i,u){g(i,d,u),e(d,y),g(i,m,u),w(f,i,u),b=!0},p:Me,i(i){b||(M(f.$$.fragment,i),b=!0)},o(i){$(f.$$.fragment,i),b=!1},d(i){i&&t(d),i&&t(m),F(f,i)}}}function qI(R){let d,y,m,f,b,i,u,E;return{c(){d=s("p"),y=o("When used with "),m=s("code"),f=o("is_split_into_words=True"),b=o(", this tokenizer needs to be instantiated with "),i=s("code"),u=o("add_prefix_space=True"),E=o(".")},l(ae){d=a(ae,"P",{});var K=r(d);y=n(K,"When used with "),m=a(K,"CODE",{});var N=r(m);f=n(N,"is_split_into_words=True"),N.forEach(t),b=n(K,", this tokenizer needs to be instantiated with "),i=a(K,"CODE",{});var re=r(i);u=n(re,"add_prefix_space=True"),re.forEach(t),E=n(K,"."),K.forEach(t)},m(ae,K){g(ae,d,K),e(d,y),e(d,m),e(m,f),e(d,b),e(d,i),e(i,u),e(d,E)},d(ae){ae&&t(d)}}}function NI(R){let d,y,m,f,b;return{c(){d=s("p"),y=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),m=s("code"),f=o("Module"),b=o(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(i){d=a(i,"P",{});var u=r(d);y=n(u,"Although the recipe for forward pass needs to be defined within this function, one should call the "),m=a(u,"CODE",{});var E=r(m);f=n(E,"Module"),E.forEach(t),b=n(u,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),u.forEach(t)},m(i,u){g(i,d,u),e(d,y),e(d,m),e(m,f),e(d,b)},d(i){i&&t(d)}}}function WI(R){let d,y,m,f,b;return f=new $e({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBSb2JlcnRhTW9kZWwlMEFpbXBvcnQlMjB0b3JjaCUwQSUwQXRva2VuaXplciUyMCUzRCUyMEF1dG9Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMnJvYmVydGEtYmFzZSUyMiklMEFtb2RlbCUyMCUzRCUyMFJvYmVydGFNb2RlbC5mcm9tX3ByZXRyYWluZWQoJTIycm9iZXJ0YS1iYXNlJTIyKSUwQSUwQWlucHV0cyUyMCUzRCUyMHRva2VuaXplciglMjJIZWxsbyUyQyUyMG15JTIwZG9nJTIwaXMlMjBjdXRlJTIyJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMiklMEFvdXRwdXRzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMpJTBBJTBBbGFzdF9oaWRkZW5fc3RhdGVzJTIwJTNEJTIwb3V0cHV0cy5sYXN0X2hpZGRlbl9zdGF0ZQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, RobertaModel
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch

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

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(<span class="hljs-string">&quot;Hello, my dog is cute&quot;</span>, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs)

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

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;roberta-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>config = AutoConfig.from_pretrained(<span class="hljs-string">&quot;roberta-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>config.is_decoder = <span class="hljs-literal">True</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = RobertaForCausalLM.from_pretrained(<span class="hljs-string">&quot;roberta-base&quot;</span>, config=config)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(<span class="hljs-string">&quot;Hello, my dog is cute&quot;</span>, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs)

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

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

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(<span class="hljs-string">&quot;The capital of France is &lt;mask&gt;.&quot;</span>, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">with</span> torch.no_grad():
<span class="hljs-meta">... </span>    logits = model(**inputs).logits

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># retrieve index of &lt;mask&gt;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>mask_token_index = (inputs.input_ids == tokenizer.mask_token_id)[<span class="hljs-number">0</span>].nonzero(as_tuple=<span class="hljs-literal">True</span>)[<span class="hljs-number">0</span>]

<span class="hljs-meta">&gt;&gt;&gt; </span>predicted_token_id = logits[<span class="hljs-number">0</span>, mask_token_index].argmax(axis=-<span class="hljs-number">1</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer.decode(predicted_token_id)
<span class="hljs-string">&#x27; Paris&#x27;</span>

<span class="hljs-meta">&gt;&gt;&gt; </span>labels = tokenizer(<span class="hljs-string">&quot;The capital of France is Paris.&quot;</span>, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)[<span class="hljs-string">&quot;input_ids&quot;</span>]
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># mask labels of non-&lt;mask&gt; tokens</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>labels = torch.where(inputs.input_ids == tokenizer.mask_token_id, labels, -<span class="hljs-number">100</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs, labels=labels)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">round</span>(outputs.loss.item(), <span class="hljs-number">2</span>)
<span class="hljs-number">0.1</span>`}}),{c(){d=s("p"),y=o("Example:"),m=p(),T(f.$$.fragment)},l(i){d=a(i,"P",{});var u=r(d);y=n(u,"Example:"),u.forEach(t),m=h(i),k(f.$$.fragment,i)},m(i,u){g(i,d,u),e(d,y),g(i,m,u),w(f,i,u),b=!0},p:Me,i(i){b||(M(f.$$.fragment,i),b=!0)},o(i){$(f.$$.fragment,i),b=!1},d(i){i&&t(d),i&&t(m),F(f,i)}}}function VI(R){let d,y,m,f,b;return{c(){d=s("p"),y=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),m=s("code"),f=o("Module"),b=o(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(i){d=a(i,"P",{});var u=r(d);y=n(u,"Although the recipe for forward pass needs to be defined within this function, one should call the "),m=a(u,"CODE",{});var E=r(m);f=n(E,"Module"),E.forEach(t),b=n(u,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),u.forEach(t)},m(i,u){g(i,d,u),e(d,y),e(d,m),e(m,f),e(d,b)},d(i){i&&t(d)}}}function SI(R){let d,y,m,f,b;return f=new $e({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwQXV0b1Rva2VuaXplciUyQyUyMFJvYmVydGFGb3JTZXF1ZW5jZUNsYXNzaWZpY2F0aW9uJTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIyY2FyZGlmZm5scCUyRnR3aXR0ZXItcm9iZXJ0YS1iYXNlLWVtb3Rpb24lMjIpJTBBbW9kZWwlMjAlM0QlMjBSb2JlcnRhRm9yU2VxdWVuY2VDbGFzc2lmaWNhdGlvbi5mcm9tX3ByZXRyYWluZWQoJTIyY2FyZGlmZm5scCUyRnR3aXR0ZXItcm9iZXJ0YS1iYXNlLWVtb3Rpb24lMjIpJTBBJTBBaW5wdXRzJTIwJTNEJTIwdG9rZW5pemVyKCUyMkhlbGxvJTJDJTIwbXklMjBkb2clMjBpcyUyMGN1dGUlMjIlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKSUwQSUwQXdpdGglMjB0b3JjaC5ub19ncmFkKCklM0ElMEElMjAlMjAlMjAlMjBsb2dpdHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cykubG9naXRzJTBBJTBBcHJlZGljdGVkX2NsYXNzX2lkJTIwJTNEJTIwbG9naXRzLmFyZ21heCgpLml0ZW0oKSUwQW1vZGVsLmNvbmZpZy5pZDJsYWJlbCU1QnByZWRpY3RlZF9jbGFzc19pZCU1RCUwQSUwQSUyMyUyMFRvJTIwdHJhaW4lMjBhJTIwbW9kZWwlMjBvbiUyMCU2MG51bV9sYWJlbHMlNjAlMjBjbGFzc2VzJTJDJTIweW91JTIwY2FuJTIwcGFzcyUyMCU2MG51bV9sYWJlbHMlM0RudW1fbGFiZWxzJTYwJTIwdG8lMjAlNjAuZnJvbV9wcmV0cmFpbmVkKC4uLiklNjAlMEFudW1fbGFiZWxzJTIwJTNEJTIwbGVuKG1vZGVsLmNvbmZpZy5pZDJsYWJlbCklMEFtb2RlbCUyMCUzRCUyMFJvYmVydGFGb3JTZXF1ZW5jZUNsYXNzaWZpY2F0aW9uLmZyb21fcHJldHJhaW5lZCglMjJjYXJkaWZmbmxwJTJGdHdpdHRlci1yb2JlcnRhLWJhc2UtZW1vdGlvbiUyMiUyQyUyMG51bV9sYWJlbHMlM0RudW1fbGFiZWxzKSUwQSUwQWxhYmVscyUyMCUzRCUyMHRvcmNoLnRlbnNvciglNUIxJTVEKSUwQWxvc3MlMjAlM0QlMjBtb2RlbCgqKmlucHV0cyUyQyUyMGxhYmVscyUzRGxhYmVscykubG9zcyUwQXJvdW5kKGxvc3MuaXRlbSgpJTJDJTIwMik=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, RobertaForSequenceClassification

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

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(<span class="hljs-string">&quot;Hello, my dog is cute&quot;</span>, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">with</span> torch.no_grad():
<span class="hljs-meta">... </span>    logits = model(**inputs).logits

<span class="hljs-meta">&gt;&gt;&gt; </span>predicted_class_id = logits.argmax().item()
<span class="hljs-meta">&gt;&gt;&gt; </span>model.config.id2label[predicted_class_id]
<span class="hljs-string">&#x27;optimism&#x27;</span>

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># To train a model on \`num_labels\` classes, you can pass \`num_labels=num_labels\` to \`.from_pretrained(...)\`</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>num_labels = <span class="hljs-built_in">len</span>(model.config.id2label)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = RobertaForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;cardiffnlp/twitter-roberta-base-emotion&quot;</span>, num_labels=num_labels)

<span class="hljs-meta">&gt;&gt;&gt; </span>labels = torch.tensor([<span class="hljs-number">1</span>])
<span class="hljs-meta">&gt;&gt;&gt; </span>loss = model(**inputs, labels=labels).loss
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">round</span>(loss.item(), <span class="hljs-number">2</span>)
<span class="hljs-number">0.08</span>`}}),{c(){d=s("p"),y=o("Example of single-label classification:"),m=p(),T(f.$$.fragment)},l(i){d=a(i,"P",{});var u=r(d);y=n(u,"Example of single-label classification:"),u.forEach(t),m=h(i),k(f.$$.fragment,i)},m(i,u){g(i,d,u),e(d,y),g(i,m,u),w(f,i,u),b=!0},p:Me,i(i){b||(M(f.$$.fragment,i),b=!0)},o(i){$(f.$$.fragment,i),b=!1},d(i){i&&t(d),i&&t(m),F(f,i)}}}function PI(R){let d,y,m,f,b;return f=new $e({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwQXV0b1Rva2VuaXplciUyQyUyMFJvYmVydGFGb3JTZXF1ZW5jZUNsYXNzaWZpY2F0aW9uJTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIyY2FyZGlmZm5scCUyRnR3aXR0ZXItcm9iZXJ0YS1iYXNlLWVtb3Rpb24lMjIpJTBBbW9kZWwlMjAlM0QlMjBSb2JlcnRhRm9yU2VxdWVuY2VDbGFzc2lmaWNhdGlvbi5mcm9tX3ByZXRyYWluZWQoJTIyY2FyZGlmZm5scCUyRnR3aXR0ZXItcm9iZXJ0YS1iYXNlLWVtb3Rpb24lMjIlMkMlMjBwcm9ibGVtX3R5cGUlM0QlMjJtdWx0aV9sYWJlbF9jbGFzc2lmaWNhdGlvbiUyMiklMEElMEFpbnB1dHMlMjAlM0QlMjB0b2tlbml6ZXIoJTIySGVsbG8lMkMlMjBteSUyMGRvZyUyMGlzJTIwY3V0ZSUyMiUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIycHQlMjIpJTBBJTBBd2l0aCUyMHRvcmNoLm5vX2dyYWQoKSUzQSUwQSUyMCUyMCUyMCUyMGxvZ2l0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzKS5sb2dpdHMlMEElMEFwcmVkaWN0ZWRfY2xhc3NfaWRzJTIwJTNEJTIwdG9yY2guYXJhbmdlKDAlMkMlMjBsb2dpdHMuc2hhcGUlNUItMSU1RCklNUJ0b3JjaC5zaWdtb2lkKGxvZ2l0cykuc3F1ZWV6ZShkaW0lM0QwKSUyMCUzRSUyMDAuNSU1RCUwQSUwQSUyMyUyMFRvJTIwdHJhaW4lMjBhJTIwbW9kZWwlMjBvbiUyMCU2MG51bV9sYWJlbHMlNjAlMjBjbGFzc2VzJTJDJTIweW91JTIwY2FuJTIwcGFzcyUyMCU2MG51bV9sYWJlbHMlM0RudW1fbGFiZWxzJTYwJTIwdG8lMjAlNjAuZnJvbV9wcmV0cmFpbmVkKC4uLiklNjAlMEFudW1fbGFiZWxzJTIwJTNEJTIwbGVuKG1vZGVsLmNvbmZpZy5pZDJsYWJlbCklMEFtb2RlbCUyMCUzRCUyMFJvYmVydGFGb3JTZXF1ZW5jZUNsYXNzaWZpY2F0aW9uLmZyb21fcHJldHJhaW5lZCglMEElMjAlMjAlMjAlMjAlMjJjYXJkaWZmbmxwJTJGdHdpdHRlci1yb2JlcnRhLWJhc2UtZW1vdGlvbiUyMiUyQyUyMG51bV9sYWJlbHMlM0RudW1fbGFiZWxzJTJDJTIwcHJvYmxlbV90eXBlJTNEJTIybXVsdGlfbGFiZWxfY2xhc3NpZmljYXRpb24lMjIlMEEpJTBBJTBBbGFiZWxzJTIwJTNEJTIwdG9yY2guc3VtKCUwQSUyMCUyMCUyMCUyMHRvcmNoLm5uLmZ1bmN0aW9uYWwub25lX2hvdChwcmVkaWN0ZWRfY2xhc3NfaWRzJTVCTm9uZSUyQyUyMCUzQSU1RC5jbG9uZSgpJTJDJTIwbnVtX2NsYXNzZXMlM0RudW1fbGFiZWxzKSUyQyUyMGRpbSUzRDElMEEpLnRvKHRvcmNoLmZsb2F0KSUwQWxvc3MlMjAlM0QlMjBtb2RlbCgqKmlucHV0cyUyQyUyMGxhYmVscyUzRGxhYmVscykubG9zcw==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, RobertaForSequenceClassification

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;cardiffnlp/twitter-roberta-base-emotion&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = RobertaForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;cardiffnlp/twitter-roberta-base-emotion&quot;</span>, problem_type=<span class="hljs-string">&quot;multi_label_classification&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(<span class="hljs-string">&quot;Hello, my dog is cute&quot;</span>, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">with</span> torch.no_grad():
<span class="hljs-meta">... </span>    logits = model(**inputs).logits

<span class="hljs-meta">&gt;&gt;&gt; </span>predicted_class_ids = torch.arange(<span class="hljs-number">0</span>, logits.shape[-<span class="hljs-number">1</span>])[torch.sigmoid(logits).squeeze(dim=<span class="hljs-number">0</span>) &gt; <span class="hljs-number">0.5</span>]

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># To train a model on \`num_labels\` classes, you can pass \`num_labels=num_labels\` to \`.from_pretrained(...)\`</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>num_labels = <span class="hljs-built_in">len</span>(model.config.id2label)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = RobertaForSequenceClassification.from_pretrained(
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;cardiffnlp/twitter-roberta-base-emotion&quot;</span>, num_labels=num_labels, problem_type=<span class="hljs-string">&quot;multi_label_classification&quot;</span>
<span class="hljs-meta">... </span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>labels = torch.<span class="hljs-built_in">sum</span>(
<span class="hljs-meta">... </span>    torch.nn.functional.one_hot(predicted_class_ids[<span class="hljs-literal">None</span>, :].clone(), num_classes=num_labels), dim=<span class="hljs-number">1</span>
<span class="hljs-meta">... </span>).to(torch.<span class="hljs-built_in">float</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>loss = model(**inputs, labels=labels).loss`}}),{c(){d=s("p"),y=o("Example of multi-label classification:"),m=p(),T(f.$$.fragment)},l(i){d=a(i,"P",{});var u=r(d);y=n(u,"Example of multi-label classification:"),u.forEach(t),m=h(i),k(f.$$.fragment,i)},m(i,u){g(i,d,u),e(d,y),g(i,m,u),w(f,i,u),b=!0},p:Me,i(i){b||(M(f.$$.fragment,i),b=!0)},o(i){$(f.$$.fragment,i),b=!1},d(i){i&&t(d),i&&t(m),F(f,i)}}}function XI(R){let d,y,m,f,b;return{c(){d=s("p"),y=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),m=s("code"),f=o("Module"),b=o(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(i){d=a(i,"P",{});var u=r(d);y=n(u,"Although the recipe for forward pass needs to be defined within this function, one should call the "),m=a(u,"CODE",{});var E=r(m);f=n(E,"Module"),E.forEach(t),b=n(u,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),u.forEach(t)},m(i,u){g(i,d,u),e(d,y),e(d,m),e(m,f),e(d,b)},d(i){i&&t(d)}}}function LI(R){let d,y,m,f,b;return f=new $e({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBSb2JlcnRhRm9yTXVsdGlwbGVDaG9pY2UlMEFpbXBvcnQlMjB0b3JjaCUwQSUwQXRva2VuaXplciUyMCUzRCUyMEF1dG9Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMnJvYmVydGEtYmFzZSUyMiklMEFtb2RlbCUyMCUzRCUyMFJvYmVydGFGb3JNdWx0aXBsZUNob2ljZS5mcm9tX3ByZXRyYWluZWQoJTIycm9iZXJ0YS1iYXNlJTIyKSUwQSUwQXByb21wdCUyMCUzRCUyMCUyMkluJTIwSXRhbHklMkMlMjBwaXp6YSUyMHNlcnZlZCUyMGluJTIwZm9ybWFsJTIwc2V0dGluZ3MlMkMlMjBzdWNoJTIwYXMlMjBhdCUyMGElMjByZXN0YXVyYW50JTJDJTIwaXMlMjBwcmVzZW50ZWQlMjB1bnNsaWNlZC4lMjIlMEFjaG9pY2UwJTIwJTNEJTIwJTIySXQlMjBpcyUyMGVhdGVuJTIwd2l0aCUyMGElMjBmb3JrJTIwYW5kJTIwYSUyMGtuaWZlLiUyMiUwQWNob2ljZTElMjAlM0QlMjAlMjJJdCUyMGlzJTIwZWF0ZW4lMjB3aGlsZSUyMGhlbGQlMjBpbiUyMHRoZSUyMGhhbmQuJTIyJTBBbGFiZWxzJTIwJTNEJTIwdG9yY2gudGVuc29yKDApLnVuc3F1ZWV6ZSgwKSUyMCUyMCUyMyUyMGNob2ljZTAlMjBpcyUyMGNvcnJlY3QlMjAoYWNjb3JkaW5nJTIwdG8lMjBXaWtpcGVkaWElMjAlM0IpKSUyQyUyMGJhdGNoJTIwc2l6ZSUyMDElMEElMEFlbmNvZGluZyUyMCUzRCUyMHRva2VuaXplciglNUJwcm9tcHQlMkMlMjBwcm9tcHQlNUQlMkMlMjAlNUJjaG9pY2UwJTJDJTIwY2hvaWNlMSU1RCUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIycHQlMjIlMkMlMjBwYWRkaW5nJTNEVHJ1ZSklMEFvdXRwdXRzJTIwJTNEJTIwbW9kZWwoKiolN0JrJTNBJTIwdi51bnNxdWVlemUoMCklMjBmb3IlMjBrJTJDJTIwdiUyMGluJTIwZW5jb2RpbmcuaXRlbXMoKSU3RCUyQyUyMGxhYmVscyUzRGxhYmVscyklMjAlMjAlMjMlMjBiYXRjaCUyMHNpemUlMjBpcyUyMDElMEElMEElMjMlMjB0aGUlMjBsaW5lYXIlMjBjbGFzc2lmaWVyJTIwc3RpbGwlMjBuZWVkcyUyMHRvJTIwYmUlMjB0cmFpbmVkJTBBbG9zcyUyMCUzRCUyMG91dHB1dHMubG9zcyUwQWxvZ2l0cyUyMCUzRCUyMG91dHB1dHMubG9naXRz",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, RobertaForMultipleChoice
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch

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

<span class="hljs-meta">&gt;&gt;&gt; </span>prompt = <span class="hljs-string">&quot;In Italy, pizza served in formal settings, such as at a restaurant, is presented unsliced.&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>choice0 = <span class="hljs-string">&quot;It is eaten with a fork and a knife.&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>choice1 = <span class="hljs-string">&quot;It is eaten while held in the hand.&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>labels = torch.tensor(<span class="hljs-number">0</span>).unsqueeze(<span class="hljs-number">0</span>)  <span class="hljs-comment"># choice0 is correct (according to Wikipedia ;)), batch size 1</span>

<span class="hljs-meta">&gt;&gt;&gt; </span>encoding = tokenizer([prompt, prompt], [choice0, choice1], return_tensors=<span class="hljs-string">&quot;pt&quot;</span>, padding=<span class="hljs-literal">True</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**{k: v.unsqueeze(<span class="hljs-number">0</span>) <span class="hljs-keyword">for</span> k, v <span class="hljs-keyword">in</span> encoding.items()}, labels=labels)  <span class="hljs-comment"># batch size is 1</span>

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># the linear classifier still needs to be trained</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>loss = outputs.loss
<span class="hljs-meta">&gt;&gt;&gt; </span>logits = outputs.logits`}}),{c(){d=s("p"),y=o("Example:"),m=p(),T(f.$$.fragment)},l(i){d=a(i,"P",{});var u=r(d);y=n(u,"Example:"),u.forEach(t),m=h(i),k(f.$$.fragment,i)},m(i,u){g(i,d,u),e(d,y),g(i,m,u),w(f,i,u),b=!0},p:Me,i(i){b||(M(f.$$.fragment,i),b=!0)},o(i){$(f.$$.fragment,i),b=!1},d(i){i&&t(d),i&&t(m),F(f,i)}}}function QI(R){let d,y,m,f,b;return{c(){d=s("p"),y=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),m=s("code"),f=o("Module"),b=o(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(i){d=a(i,"P",{});var u=r(d);y=n(u,"Although the recipe for forward pass needs to be defined within this function, one should call the "),m=a(u,"CODE",{});var E=r(m);f=n(E,"Module"),E.forEach(t),b=n(u,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),u.forEach(t)},m(i,u){g(i,d,u),e(d,y),e(d,m),e(m,f),e(d,b)},d(i){i&&t(d)}}}function OI(R){let d,y,m,f,b;return f=new $e({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBSb2JlcnRhRm9yVG9rZW5DbGFzc2lmaWNhdGlvbiUwQWltcG9ydCUyMHRvcmNoJTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIySmVhbi1CYXB0aXN0ZSUyRnJvYmVydGEtbGFyZ2UtbmVyLWVuZ2xpc2glMjIpJTBBbW9kZWwlMjAlM0QlMjBSb2JlcnRhRm9yVG9rZW5DbGFzc2lmaWNhdGlvbi5mcm9tX3ByZXRyYWluZWQoJTIySmVhbi1CYXB0aXN0ZSUyRnJvYmVydGEtbGFyZ2UtbmVyLWVuZ2xpc2glMjIpJTBBJTBBaW5wdXRzJTIwJTNEJTIwdG9rZW5pemVyKCUwQSUyMCUyMCUyMCUyMCUyMkh1Z2dpbmdGYWNlJTIwaXMlMjBhJTIwY29tcGFueSUyMGJhc2VkJTIwaW4lMjBQYXJpcyUyMGFuZCUyME5ldyUyMFlvcmslMjIlMkMlMjBhZGRfc3BlY2lhbF90b2tlbnMlM0RGYWxzZSUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIycHQlMjIlMEEpJTBBJTBBd2l0aCUyMHRvcmNoLm5vX2dyYWQoKSUzQSUwQSUyMCUyMCUyMCUyMGxvZ2l0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzKS5sb2dpdHMlMEElMEFwcmVkaWN0ZWRfdG9rZW5fY2xhc3NfaWRzJTIwJTNEJTIwbG9naXRzLmFyZ21heCgtMSklMEElMEElMjMlMjBOb3RlJTIwdGhhdCUyMHRva2VucyUyMGFyZSUyMGNsYXNzaWZpZWQlMjByYXRoZXIlMjB0aGVuJTIwaW5wdXQlMjB3b3JkcyUyMHdoaWNoJTIwbWVhbnMlMjB0aGF0JTBBJTIzJTIwdGhlcmUlMjBtaWdodCUyMGJlJTIwbW9yZSUyMHByZWRpY3RlZCUyMHRva2VuJTIwY2xhc3NlcyUyMHRoYW4lMjB3b3Jkcy4lMEElMjMlMjBNdWx0aXBsZSUyMHRva2VuJTIwY2xhc3NlcyUyMG1pZ2h0JTIwYWNjb3VudCUyMGZvciUyMHRoZSUyMHNhbWUlMjB3b3JkJTBBcHJlZGljdGVkX3Rva2Vuc19jbGFzc2VzJTIwJTNEJTIwJTVCbW9kZWwuY29uZmlnLmlkMmxhYmVsJTVCdC5pdGVtKCklNUQlMjBmb3IlMjB0JTIwaW4lMjBwcmVkaWN0ZWRfdG9rZW5fY2xhc3NfaWRzJTVCMCU1RCU1RCUwQXByZWRpY3RlZF90b2tlbnNfY2xhc3NlcyUwQSUwQWxhYmVscyUyMCUzRCUyMHByZWRpY3RlZF90b2tlbl9jbGFzc19pZHMlMEFsb3NzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMlMkMlMjBsYWJlbHMlM0RsYWJlbHMpLmxvc3MlMEFyb3VuZChsb3NzLml0ZW0oKSUyQyUyMDIp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, RobertaForTokenClassification
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;Jean-Baptiste/roberta-large-ner-english&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = RobertaForTokenClassification.from_pretrained(<span class="hljs-string">&quot;Jean-Baptiste/roberta-large-ner-english&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;HuggingFace is a company based in Paris and New York&quot;</span>, add_special_tokens=<span class="hljs-literal">False</span>, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>
<span class="hljs-meta">... </span>)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">with</span> torch.no_grad():
<span class="hljs-meta">... </span>    logits = model(**inputs).logits

<span class="hljs-meta">&gt;&gt;&gt; </span>predicted_token_class_ids = logits.argmax(-<span class="hljs-number">1</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Note that tokens are classified rather then input words which means that</span>
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># there might be more predicted token classes than words.</span>
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Multiple token classes might account for the same word</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>predicted_tokens_classes = [model.config.id2label[t.item()] <span class="hljs-keyword">for</span> t <span class="hljs-keyword">in</span> predicted_token_class_ids[<span class="hljs-number">0</span>]]
<span class="hljs-meta">&gt;&gt;&gt; </span>predicted_tokens_classes
[<span class="hljs-string">&#x27;O&#x27;</span>, <span class="hljs-string">&#x27;ORG&#x27;</span>, <span class="hljs-string">&#x27;ORG&#x27;</span>, <span class="hljs-string">&#x27;O&#x27;</span>, <span class="hljs-string">&#x27;O&#x27;</span>, <span class="hljs-string">&#x27;O&#x27;</span>, <span class="hljs-string">&#x27;O&#x27;</span>, <span class="hljs-string">&#x27;O&#x27;</span>, <span class="hljs-string">&#x27;LOC&#x27;</span>, <span class="hljs-string">&#x27;O&#x27;</span>, <span class="hljs-string">&#x27;LOC&#x27;</span>, <span class="hljs-string">&#x27;LOC&#x27;</span>]

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

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

<span class="hljs-meta">&gt;&gt;&gt; </span>question, text = <span class="hljs-string">&quot;Who was Jim Henson?&quot;</span>, <span class="hljs-string">&quot;Jim Henson was a nice puppet&quot;</span>

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(question, text, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">with</span> torch.no_grad():
<span class="hljs-meta">... </span>    outputs = model(**inputs)

<span class="hljs-meta">&gt;&gt;&gt; </span>answer_start_index = outputs.start_logits.argmax()
<span class="hljs-meta">&gt;&gt;&gt; </span>answer_end_index = outputs.end_logits.argmax()

<span class="hljs-meta">&gt;&gt;&gt; </span>predict_answer_tokens = inputs.input_ids[<span class="hljs-number">0</span>, answer_start_index : answer_end_index + <span class="hljs-number">1</span>]
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer.decode(predict_answer_tokens, skip_special_tokens=<span class="hljs-literal">True</span>)
<span class="hljs-string">&#x27; puppet&#x27;</span>

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># target is &quot;nice puppet&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>target_start_index = torch.tensor([<span class="hljs-number">14</span>])
<span class="hljs-meta">&gt;&gt;&gt; </span>target_end_index = torch.tensor([<span class="hljs-number">15</span>])

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

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

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(<span class="hljs-string">&quot;Hello, my dog is cute&quot;</span>, return_tensors=<span class="hljs-string">&quot;tf&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(inputs)

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

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

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

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

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(<span class="hljs-string">&quot;The capital of France is &lt;mask&gt;.&quot;</span>, return_tensors=<span class="hljs-string">&quot;tf&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>logits = model(**inputs).logits

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># retrieve index of &lt;mask&gt;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>mask_token_index = tf.where((inputs.input_ids == tokenizer.mask_token_id)[<span class="hljs-number">0</span>])
<span class="hljs-meta">&gt;&gt;&gt; </span>selected_logits = tf.gather_nd(logits[<span class="hljs-number">0</span>], indices=mask_token_index)

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

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

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

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(<span class="hljs-string">&quot;Hello, my dog is cute&quot;</span>, return_tensors=<span class="hljs-string">&quot;tf&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>logits = model(**inputs).logits

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

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

<span class="hljs-meta">&gt;&gt;&gt; </span>prompt = <span class="hljs-string">&quot;In Italy, pizza served in formal settings, such as at a restaurant, is presented unsliced.&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>choice0 = <span class="hljs-string">&quot;It is eaten with a fork and a knife.&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>choice1 = <span class="hljs-string">&quot;It is eaten while held in the hand.&quot;</span>

<span class="hljs-meta">&gt;&gt;&gt; </span>encoding = tokenizer([prompt, prompt], [choice0, choice1], return_tensors=<span class="hljs-string">&quot;tf&quot;</span>, padding=<span class="hljs-literal">True</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = {k: tf.expand_dims(v, <span class="hljs-number">0</span>) <span class="hljs-keyword">for</span> k, v <span class="hljs-keyword">in</span> encoding.items()}
<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(inputs)  <span class="hljs-comment"># batch size is 1</span>

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

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;ydshieh/roberta-large-ner-english&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFRobertaForTokenClassification.from_pretrained(<span class="hljs-string">&quot;ydshieh/roberta-large-ner-english&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;HuggingFace is a company based in Paris and New York&quot;</span>, add_special_tokens=<span class="hljs-literal">False</span>, return_tensors=<span class="hljs-string">&quot;tf&quot;</span>
<span class="hljs-meta">... </span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>logits = model(**inputs).logits
<span class="hljs-meta">&gt;&gt;&gt; </span>predicted_token_class_ids = tf.math.argmax(logits, axis=-<span class="hljs-number">1</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Note that tokens are classified rather then input words which means that</span>
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># there might be more predicted token classes than words.</span>
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Multiple token classes might account for the same word</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>predicted_tokens_classes = [model.config.id2label[t] <span class="hljs-keyword">for</span> t <span class="hljs-keyword">in</span> predicted_token_class_ids[<span class="hljs-number">0</span>].numpy().tolist()]
<span class="hljs-meta">&gt;&gt;&gt; </span>predicted_tokens_classes
[<span class="hljs-string">&#x27;O&#x27;</span>, <span class="hljs-string">&#x27;ORG&#x27;</span>, <span class="hljs-string">&#x27;ORG&#x27;</span>, <span class="hljs-string">&#x27;O&#x27;</span>, <span class="hljs-string">&#x27;O&#x27;</span>, <span class="hljs-string">&#x27;O&#x27;</span>, <span class="hljs-string">&#x27;O&#x27;</span>, <span class="hljs-string">&#x27;O&#x27;</span>, <span class="hljs-string">&#x27;LOC&#x27;</span>, <span class="hljs-string">&#x27;O&#x27;</span>, <span class="hljs-string">&#x27;LOC&#x27;</span>, <span class="hljs-string">&#x27;LOC&#x27;</span>]`}}),{c(){d=s("p"),y=o("Example:"),m=p(),T(f.$$.fragment)},l(i){d=a(i,"P",{});var u=r(d);y=n(u,"Example:"),u.forEach(t),m=h(i),k(f.$$.fragment,i)},m(i,u){g(i,d,u),e(d,y),g(i,m,u),w(f,i,u),b=!0},p:Me,i(i){b||(M(f.$$.fragment,i),b=!0)},o(i){$(f.$$.fragment,i),b=!1},d(i){i&&t(d),i&&t(m),F(f,i)}}}function _U(R){let d,y;return d=new $e({props:{code:"bGFiZWxzJTIwJTNEJTIwcHJlZGljdGVkX3Rva2VuX2NsYXNzX2lkcyUwQWxvc3MlMjAlM0QlMjB0Zi5tYXRoLnJlZHVjZV9tZWFuKG1vZGVsKCoqaW5wdXRzJTJDJTIwbGFiZWxzJTNEbGFiZWxzKS5sb3NzKSUwQXJvdW5kKGZsb2F0KGxvc3MpJTJDJTIwMik=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span>labels = predicted_token_class_ids
<span class="hljs-meta">&gt;&gt;&gt; </span>loss = tf.math.reduce_mean(model(**inputs, labels=labels).loss)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">round</span>(<span class="hljs-built_in">float</span>(loss), <span class="hljs-number">2</span>)
<span class="hljs-number">0.01</span>`}}),{c(){T(d.$$.fragment)},l(m){k(d.$$.fragment,m)},m(m,f){w(d,m,f),y=!0},p:Me,i(m){y||(M(d.$$.fragment,m),y=!0)},o(m){$(d.$$.fragment,m),y=!1},d(m){F(d,m)}}}function bU(R){let d,y,m,f,b,i,u,E,ae,K,N,re,ee,x,xe,G,pe,Ae,Q,he,ue,H,Fe,le,B,_e,ie,O,be,je,ne,z,U,de,D,Je,ce,Y,ze,Re,I,Ce,X,me,Ie,L,fe,ye,Z,Ee,V,Ue,se,C,ve,q,qe,ge;return{c(){d=s("p"),y=o("TensorFlow models and layers in "),m=s("code"),f=o("transformers"),b=o(" accept two formats as input:"),i=p(),u=s("ul"),E=s("li"),ae=o("having all inputs as keyword arguments (like PyTorch models), or"),K=p(),N=s("li"),re=o("having all inputs as a list, tuple or dict in the first positional argument."),ee=p(),x=s("p"),xe=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 `),G=s("code"),pe=o("model.fit()"),Ae=o(` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),Q=s("code"),he=o("model.fit()"),ue=o(` supports! If, however, you want to use the second
format outside of Keras methods like `),H=s("code"),Fe=o("fit()"),le=o(" and "),B=s("code"),_e=o("predict()"),ie=o(`, such as when creating your own layers or models with
the Keras `),O=s("code"),be=o("Functional"),je=o(` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),ne=p(),z=s("ul"),U=s("li"),de=o("a single Tensor with "),D=s("code"),Je=o("input_ids"),ce=o(" only and nothing else: "),Y=s("code"),ze=o("model(input_ids)"),Re=p(),I=s("li"),Ce=o(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),X=s("code"),me=o("model([input_ids, attention_mask])"),Ie=o(" or "),L=s("code"),fe=o("model([input_ids, attention_mask, token_type_ids])"),ye=p(),Z=s("li"),Ee=o(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),V=s("code"),Ue=o('model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),se=p(),C=s("p"),ve=o(`Note that when creating models and layers with
`),q=s("a"),qe=o("subclassing"),ge=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=a(v,"P",{});var j=r(d);y=n(j,"TensorFlow models and layers in "),m=a(j,"CODE",{});var Xe=r(m);f=n(Xe,"transformers"),Xe.forEach(t),b=n(j," accept two formats as input:"),j.forEach(t),i=h(v),u=a(v,"UL",{});var te=r(u);E=a(te,"LI",{});var Ge=r(E);ae=n(Ge,"having all inputs as keyword arguments (like PyTorch models), or"),Ge.forEach(t),K=h(te),N=a(te,"LI",{});var Le=r(N);re=n(Le,"having all inputs as a list, tuple or dict in the first positional argument."),Le.forEach(t),te.forEach(t),ee=h(v),x=a(v,"P",{});var J=r(x);xe=n(J,`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 `),G=a(J,"CODE",{});var Ve=r(G);pe=n(Ve,"model.fit()"),Ve.forEach(t),Ae=n(J,` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),Q=a(J,"CODE",{});var Te=r(Q);he=n(Te,"model.fit()"),Te.forEach(t),ue=n(J,` supports! If, however, you want to use the second
format outside of Keras methods like `),H=a(J,"CODE",{});var Qe=r(H);Fe=n(Qe,"fit()"),Qe.forEach(t),le=n(J," and "),B=a(J,"CODE",{});var Se=r(B);_e=n(Se,"predict()"),Se.forEach(t),ie=n(J,`, such as when creating your own layers or models with
the Keras `),O=a(J,"CODE",{});var Oe=r(O);be=n(Oe,"Functional"),Oe.forEach(t),je=n(J,` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),J.forEach(t),ne=h(v),z=a(v,"UL",{});var A=r(z);U=a(A,"LI",{});var S=r(U);de=n(S,"a single Tensor with "),D=a(S,"CODE",{});var De=r(D);Je=n(De,"input_ids"),De.forEach(t),ce=n(S," only and nothing else: "),Y=a(S,"CODE",{});var Ye=r(Y);ze=n(Ye,"model(input_ids)"),Ye.forEach(t),S.forEach(t),Re=h(A),I=a(A,"LI",{});var P=r(I);Ce=n(P,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),X=a(P,"CODE",{});var He=r(X);me=n(He,"model([input_ids, attention_mask])"),He.forEach(t),Ie=n(P," or "),L=a(P,"CODE",{});var Ke=r(L);fe=n(Ke,"model([input_ids, attention_mask, token_type_ids])"),Ke.forEach(t),P.forEach(t),ye=h(A),Z=a(A,"LI",{});var Ne=r(Z);Ee=n(Ne,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),V=a(Ne,"CODE",{});var Be=r(V);Ue=n(Be,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),Be.forEach(t),Ne.forEach(t),A.forEach(t),se=h(v),C=a(v,"P",{});var oe=r(C);ve=n(oe,`Note that when creating models and layers with
`),q=a(oe,"A",{href:!0,rel:!0});var et=r(q);qe=n(et,"subclassing"),et.forEach(t),ge=n(oe,` then you don\u2019t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`),oe.forEach(t),this.h()},h(){c(q,"href","https://keras.io/guides/making_new_layers_and_models_via_subclassing/"),c(q,"rel","nofollow")},m(v,j){g(v,d,j),e(d,y),e(d,m),e(m,f),e(d,b),g(v,i,j),g(v,u,j),e(u,E),e(E,ae),e(u,K),e(u,N),e(N,re),g(v,ee,j),g(v,x,j),e(x,xe),e(x,G),e(G,pe),e(x,Ae),e(x,Q),e(Q,he),e(x,ue),e(x,H),e(H,Fe),e(x,le),e(x,B),e(B,_e),e(x,ie),e(x,O),e(O,be),e(x,je),g(v,ne,j),g(v,z,j),e(z,U),e(U,de),e(U,D),e(D,Je),e(U,ce),e(U,Y),e(Y,ze),e(z,Re),e(z,I),e(I,Ce),e(I,X),e(X,me),e(I,Ie),e(I,L),e(L,fe),e(z,ye),e(z,Z),e(Z,Ee),e(Z,V),e(V,Ue),g(v,se,j),g(v,C,j),e(C,ve),e(C,q),e(q,qe),e(C,ge)},d(v){v&&t(d),v&&t(i),v&&t(u),v&&t(ee),v&&t(x),v&&t(ne),v&&t(z),v&&t(se),v&&t(C)}}}function yU(R){let d,y,m,f,b;return{c(){d=s("p"),y=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),m=s("code"),f=o("Module"),b=o(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(i){d=a(i,"P",{});var u=r(d);y=n(u,"Although the recipe for forward pass needs to be defined within this function, one should call the "),m=a(u,"CODE",{});var E=r(m);f=n(E,"Module"),E.forEach(t),b=n(u,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),u.forEach(t)},m(i,u){g(i,d,u),e(d,y),e(d,m),e(m,f),e(d,b)},d(i){i&&t(d)}}}function vU(R){let d,y,m,f,b;return f=new $e({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBURlJvYmVydGFGb3JRdWVzdGlvbkFuc3dlcmluZyUwQWltcG9ydCUyMHRlbnNvcmZsb3clMjBhcyUyMHRmJTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIyeWRzaGllaCUyRnJvYmVydGEtYmFzZS1zcXVhZDIlMjIpJTBBbW9kZWwlMjAlM0QlMjBURlJvYmVydGFGb3JRdWVzdGlvbkFuc3dlcmluZy5mcm9tX3ByZXRyYWluZWQoJTIyeWRzaGllaCUyRnJvYmVydGEtYmFzZS1zcXVhZDIlMjIpJTBBJTBBcXVlc3Rpb24lMkMlMjB0ZXh0JTIwJTNEJTIwJTIyV2hvJTIwd2FzJTIwSmltJTIwSGVuc29uJTNGJTIyJTJDJTIwJTIySmltJTIwSGVuc29uJTIwd2FzJTIwYSUyMG5pY2UlMjBwdXBwZXQlMjIlMEElMEFpbnB1dHMlMjAlM0QlMjB0b2tlbml6ZXIocXVlc3Rpb24lMkMlMjB0ZXh0JTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJ0ZiUyMiklMEFvdXRwdXRzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMpJTBBJTBBYW5zd2VyX3N0YXJ0X2luZGV4JTIwJTNEJTIwaW50KHRmLm1hdGguYXJnbWF4KG91dHB1dHMuc3RhcnRfbG9naXRzJTJDJTIwYXhpcyUzRC0xKSU1QjAlNUQpJTBBYW5zd2VyX2VuZF9pbmRleCUyMCUzRCUyMGludCh0Zi5tYXRoLmFyZ21heChvdXRwdXRzLmVuZF9sb2dpdHMlMkMlMjBheGlzJTNELTEpJTVCMCU1RCklMEElMEFwcmVkaWN0X2Fuc3dlcl90b2tlbnMlMjAlM0QlMjBpbnB1dHMuaW5wdXRfaWRzJTVCMCUyQyUyMGFuc3dlcl9zdGFydF9pbmRleCUyMCUzQSUyMGFuc3dlcl9lbmRfaW5kZXglMjAlMkIlMjAxJTVEJTBBdG9rZW5pemVyLmRlY29kZShwcmVkaWN0X2Fuc3dlcl90b2tlbnMp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, TFRobertaForQuestionAnswering
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> tensorflow <span class="hljs-keyword">as</span> tf

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

<span class="hljs-meta">&gt;&gt;&gt; </span>question, text = <span class="hljs-string">&quot;Who was Jim Henson?&quot;</span>, <span class="hljs-string">&quot;Jim Henson was a nice puppet&quot;</span>

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(question, text, return_tensors=<span class="hljs-string">&quot;tf&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs)

<span class="hljs-meta">&gt;&gt;&gt; </span>answer_start_index = <span class="hljs-built_in">int</span>(tf.math.argmax(outputs.start_logits, axis=-<span class="hljs-number">1</span>)[<span class="hljs-number">0</span>])
<span class="hljs-meta">&gt;&gt;&gt; </span>answer_end_index = <span class="hljs-built_in">int</span>(tf.math.argmax(outputs.end_logits, axis=-<span class="hljs-number">1</span>)[<span class="hljs-number">0</span>])

<span class="hljs-meta">&gt;&gt;&gt; </span>predict_answer_tokens = inputs.input_ids[<span class="hljs-number">0</span>, answer_start_index : answer_end_index + <span class="hljs-number">1</span>]
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer.decode(predict_answer_tokens)
<span class="hljs-string">&#x27; puppet&#x27;</span>`}}),{c(){d=s("p"),y=o("Example:"),m=p(),T(f.$$.fragment)},l(i){d=a(i,"P",{});var u=r(d);y=n(u,"Example:"),u.forEach(t),m=h(i),k(f.$$.fragment,i)},m(i,u){g(i,d,u),e(d,y),g(i,m,u),w(f,i,u),b=!0},p:Me,i(i){b||(M(f.$$.fragment,i),b=!0)},o(i){$(f.$$.fragment,i),b=!1},d(i){i&&t(d),i&&t(m),F(f,i)}}}function TU(R){let d,y;return d=new $e({props:{code:"JTIzJTIwdGFyZ2V0JTIwaXMlMjAlMjJuaWNlJTIwcHVwcGV0JTIyJTBBdGFyZ2V0X3N0YXJ0X2luZGV4JTIwJTNEJTIwdGYuY29uc3RhbnQoJTVCMTQlNUQpJTBBdGFyZ2V0X2VuZF9pbmRleCUyMCUzRCUyMHRmLmNvbnN0YW50KCU1QjE1JTVEKSUwQSUwQW91dHB1dHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cyUyQyUyMHN0YXJ0X3Bvc2l0aW9ucyUzRHRhcmdldF9zdGFydF9pbmRleCUyQyUyMGVuZF9wb3NpdGlvbnMlM0R0YXJnZXRfZW5kX2luZGV4KSUwQWxvc3MlMjAlM0QlMjB0Zi5tYXRoLnJlZHVjZV9tZWFuKG91dHB1dHMubG9zcyklMEFyb3VuZChmbG9hdChsb3NzKSUyQyUyMDIp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># target is &quot;nice puppet&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>target_start_index = tf.constant([<span class="hljs-number">14</span>])
<span class="hljs-meta">&gt;&gt;&gt; </span>target_end_index = tf.constant([<span class="hljs-number">15</span>])

<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs, start_positions=target_start_index, end_positions=target_end_index)
<span class="hljs-meta">&gt;&gt;&gt; </span>loss = tf.math.reduce_mean(outputs.loss)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">round</span>(<span class="hljs-built_in">float</span>(loss), <span class="hljs-number">2</span>)
<span class="hljs-number">0.86</span>`}}),{c(){T(d.$$.fragment)},l(m){k(d.$$.fragment,m)},m(m,f){w(d,m,f),y=!0},p:Me,i(m){y||(M(d.$$.fragment,m),y=!0)},o(m){$(d.$$.fragment,m),y=!1},d(m){F(d,m)}}}function kU(R){let d,y,m,f,b;return{c(){d=s("p"),y=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),m=s("code"),f=o("Module"),b=o(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(i){d=a(i,"P",{});var u=r(d);y=n(u,"Although the recipe for forward pass needs to be defined within this function, one should call the "),m=a(u,"CODE",{});var E=r(m);f=n(E,"Module"),E.forEach(t),b=n(u,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),u.forEach(t)},m(i,u){g(i,d,u),e(d,y),e(d,m),e(m,f),e(d,b)},d(i){i&&t(d)}}}function wU(R){let d,y,m,f,b;return f=new $e({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBGbGF4Um9iZXJ0YU1vZGVsJTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIycm9iZXJ0YS1iYXNlJTIyKSUwQW1vZGVsJTIwJTNEJTIwRmxheFJvYmVydGFNb2RlbC5mcm9tX3ByZXRyYWluZWQoJTIycm9iZXJ0YS1iYXNlJTIyKSUwQSUwQWlucHV0cyUyMCUzRCUyMHRva2VuaXplciglMjJIZWxsbyUyQyUyMG15JTIwZG9nJTIwaXMlMjBjdXRlJTIyJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJqYXglMjIpJTBBb3V0cHV0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzKSUwQSUwQWxhc3RfaGlkZGVuX3N0YXRlcyUyMCUzRCUyMG91dHB1dHMubGFzdF9oaWRkZW5fc3RhdGU=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, FlaxRobertaModel

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

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(<span class="hljs-string">&quot;Hello, my dog is cute&quot;</span>, return_tensors=<span class="hljs-string">&quot;jax&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs)

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

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

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(<span class="hljs-string">&quot;Hello, my dog is cute&quot;</span>, return_tensors=<span class="hljs-string">&quot;np&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs)

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

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

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

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

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

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(<span class="hljs-string">&quot;Hello, my dog is cute&quot;</span>, return_tensors=<span class="hljs-string">&quot;jax&quot;</span>)

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

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

<span class="hljs-meta">&gt;&gt;&gt; </span>prompt = <span class="hljs-string">&quot;In Italy, pizza served in formal settings, such as at a restaurant, is presented unsliced.&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>choice0 = <span class="hljs-string">&quot;It is eaten with a fork and a knife.&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>choice1 = <span class="hljs-string">&quot;It is eaten while held in the hand.&quot;</span>

<span class="hljs-meta">&gt;&gt;&gt; </span>encoding = tokenizer([prompt, prompt], [choice0, choice1], return_tensors=<span class="hljs-string">&quot;jax&quot;</span>, padding=<span class="hljs-literal">True</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**{k: v[<span class="hljs-literal">None</span>, :] <span class="hljs-keyword">for</span> k, v <span class="hljs-keyword">in</span> encoding.items()})

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

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

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(<span class="hljs-string">&quot;Hello, my dog is cute&quot;</span>, return_tensors=<span class="hljs-string">&quot;jax&quot;</span>)

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

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

<span class="hljs-meta">&gt;&gt;&gt; </span>question, text = <span class="hljs-string">&quot;Who was Jim Henson?&quot;</span>, <span class="hljs-string">&quot;Jim Henson was a nice puppet&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(question, text, return_tensors=<span class="hljs-string">&quot;jax&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs)
<span class="hljs-meta">&gt;&gt;&gt; </span>start_scores = outputs.start_logits
<span class="hljs-meta">&gt;&gt;&gt; </span>end_scores = outputs.end_logits`}}),{c(){d=s("p"),y=o("Example:"),m=p(),T(f.$$.fragment)},l(i){d=a(i,"P",{});var u=r(d);y=n(u,"Example:"),u.forEach(t),m=h(i),k(f.$$.fragment,i)},m(i,u){g(i,d,u),e(d,y),g(i,m,u),w(f,i,u),b=!0},p:Me,i(i){b||(M(f.$$.fragment,i),b=!0)},o(i){$(f.$$.fragment,i),b=!1},d(i){i&&t(d),i&&t(m),F(f,i)}}}function qU(R){let d,y,m,f,b,i,u,E,ae,K,N,re,ee,x,xe,G,pe,Ae,Q,he,ue,H,Fe,le,B,_e,ie,O,be,je,ne,z,U,de,D,Je,ce,Y,ze,Re,I,Ce,X,me,Ie,L,fe,ye,Z,Ee,V,Ue,se,C,ve,q,qe,ge,v,j,Xe,te,Ge,Le,J,Ve,Te,Qe,Se,Oe,A,S,De,Ye,P,He,Ke,Ne,Be,oe,et,ey,go,wh,ty,oy,Mh,ny,sy,$h,ay,ry,Fh,ly,iy,Rh,Cc,Ic,dy,cy,bg,Ro,py,dr,hy,uy,cr,my,fy,yg,tn,ss,Eh,pr,gy,xh,_y,vg,Uc,by,Tg,hr,kg,ct,on,yy,ur,vy,Ty,mr,ky,wy,My,fr,$y,gr,Fy,Ry,Ey,_r,xy,br,jy,Jy,zy,Eo,qc,Cy,Iy,yr,Uy,qy,vr,Ny,Wy,Zy,xo,Nc,Ay,By,Tr,Gy,Vy,kr,Sy,Py,Xy,jo,Wc,Ly,Qy,wr,Oy,Dy,Mr,Yy,Hy,Ky,jh,Zc,ev,wg,$r,Mg,xt,Jo,Ac,tv,ov,Fr,nv,sv,Rr,av,rv,lv,zo,Bc,iv,dv,Er,cv,pv,xr,hv,uv,mv,as,Gc,fv,gv,jr,_v,bv,yv,Vc,Jr,vv,Tv,kv,Jh,Sc,wv,$g,zr,Fg,yt,Cr,Mv,Ir,$v,Fv,Rv,Co,Pc,Ev,xv,Ur,jv,Jv,qr,zv,Cv,Iv,Io,Xc,Uv,qv,Nr,Nv,Wv,Wr,Zv,Av,Bv,Uo,Lc,Gv,Vv,Zr,Sv,Pv,Ar,Xv,Lv,Qv,Qc,Br,Ov,Dv,Yv,zh,Oc,Hv,Rg,Gr,Eg,vt,Vr,Kv,Sr,eT,tT,oT,qo,Dc,nT,sT,Pr,aT,rT,Xr,lT,iT,dT,No,Yc,cT,pT,Lr,hT,uT,Qr,mT,fT,gT,rs,Hc,_T,bT,Or,yT,vT,TT,Kc,Dr,kT,wT,MT,Ch,ep,$T,xg,tp,Ih,FT,jg,Wo,Zo,op,RT,ET,Yr,xT,jT,Hr,JT,zT,CT,Ao,np,IT,UT,Kr,qT,NT,el,WT,ZT,AT,Uh,sp,BT,Jg,nn,ls,qh,tl,GT,Nh,VT,zg,Vt,ol,ST,_o,PT,ap,XT,LT,rp,QT,OT,nl,DT,YT,HT,sn,KT,lp,ek,tk,ip,ok,nk,sk,is,Cg,an,ds,Wh,sl,ak,Zh,rk,Ig,We,al,lk,Ah,ik,dk,Bh,ck,pk,cs,hk,rl,uk,Gh,mk,fk,gk,ps,_k,ll,bk,dp,yk,vk,Tk,Bo,il,kk,Vh,wk,Mk,dl,cp,$k,Sh,Fk,Rk,pp,Ek,Ph,xk,jk,hs,cl,Jk,pl,zk,Xh,Ck,Ik,Uk,us,hl,qk,Lh,Nk,Wk,hp,ul,Ug,rn,ms,Qh,ml,Zk,Oh,Ak,qg,tt,fl,Bk,gl,Gk,Dh,Vk,Sk,Pk,Yh,Xk,Lk,fs,Qk,_l,Ok,Hh,Dk,Yk,Hk,gs,Kk,bl,ew,up,tw,ow,nw,mp,yl,Ng,ln,_s,Kh,vl,sw,eu,aw,Wg,ot,Tl,rw,tu,lw,iw,kl,dw,fp,cw,pw,hw,wl,uw,Ml,mw,fw,gw,$l,_w,ou,bw,yw,vw,pt,Tw,nu,kw,ww,su,Mw,$w,au,Fw,Rw,ru,Ew,xw,lu,jw,Jw,iu,zw,Cw,Iw,bs,Uw,du,qw,Nw,Fl,Ww,Zw,Pt,Rl,Aw,dn,Bw,gp,Gw,Vw,cu,Sw,Pw,Xw,ys,Lw,vs,Zg,cn,Ts,pu,El,Qw,hu,Ow,Ag,wt,xl,Dw,jl,Yw,uu,Hw,Kw,eM,Jl,tM,_p,oM,nM,sM,zl,aM,Cl,rM,lM,iM,Xt,Il,dM,pn,cM,bp,pM,hM,mu,uM,mM,fM,ks,gM,ws,Bg,hn,Ms,fu,Ul,_M,gu,bM,Gg,Mt,ql,yM,Nl,vM,_u,TM,kM,wM,Wl,MM,yp,$M,FM,RM,Zl,EM,Al,xM,jM,JM,Lt,Bl,zM,un,CM,vp,IM,UM,bu,qM,NM,WM,$s,ZM,Fs,Vg,mn,Rs,yu,Gl,AM,vu,BM,Sg,$t,Vl,GM,Tu,VM,SM,Sl,PM,Tp,XM,LM,QM,Pl,OM,Xl,DM,YM,HM,jt,Ll,KM,fn,e2,kp,t2,o2,ku,n2,s2,a2,Es,r2,xs,l2,js,Pg,gn,Js,wu,Ql,i2,Mu,d2,Xg,Ft,Ol,c2,$u,p2,h2,Dl,u2,wp,m2,f2,g2,Yl,_2,Hl,b2,y2,v2,Qt,Kl,T2,_n,k2,Mp,w2,M2,Fu,$2,F2,R2,zs,E2,Cs,Lg,bn,Is,Ru,ei,x2,Eu,j2,Qg,Rt,ti,J2,xu,z2,C2,oi,I2,$p,U2,q2,N2,ni,W2,si,Z2,A2,B2,Ot,ai,G2,yn,V2,Fp,S2,P2,ju,X2,L2,Q2,Us,O2,qs,Og,vn,Ns,Ju,ri,D2,zu,Y2,Dg,Et,li,H2,Tn,K2,Cu,e1,t1,Iu,o1,n1,s1,ii,a1,Rp,r1,l1,i1,di,d1,ci,c1,p1,h1,Dt,pi,u1,kn,m1,Ep,f1,g1,Uu,_1,b1,y1,Ws,v1,Zs,Yg,wn,As,qu,hi,T1,Nu,k1,Hg,ht,ui,w1,Wu,M1,$1,mi,F1,xp,R1,E1,x1,fi,j1,gi,J1,z1,C1,Bs,I1,Yt,_i,U1,Mn,q1,jp,N1,W1,Zu,Z1,A1,B1,Gs,G1,Vs,Kg,$n,Ss,Au,bi,V1,Bu,S1,e_,Fn,yi,P1,Ht,vi,X1,Rn,L1,Jp,Q1,O1,Gu,D1,Y1,H1,Ps,K1,Xs,t_,En,Ls,Vu,Ti,e0,Su,t0,o_,ut,ki,o0,wi,n0,Pu,s0,a0,r0,Mi,l0,zp,i0,d0,c0,$i,p0,Fi,h0,u0,m0,Qs,f0,Jt,Ri,g0,xn,_0,Cp,b0,y0,Xu,v0,T0,k0,Os,w0,Ds,M0,Ys,n_,jn,Hs,Lu,Ei,$0,Qu,F0,s_,mt,xi,R0,Ou,E0,x0,ji,j0,Ip,J0,z0,C0,Ji,I0,zi,U0,q0,N0,Ks,W0,zt,Ci,Z0,Jn,A0,Up,B0,G0,Du,V0,S0,P0,ea,X0,ta,L0,oa,a_,zn,na,Yu,Ii,Q0,Hu,O0,r_,ft,Ui,D0,Ku,Y0,H0,qi,K0,qp,e$,t$,o$,Ni,n$,Wi,s$,a$,r$,sa,l$,Kt,Zi,i$,Cn,d$,Np,c$,p$,em,h$,u$,m$,aa,f$,ra,l_,In,la,tm,Ai,g$,om,_$,i_,gt,Bi,b$,nm,y$,v$,Gi,T$,Wp,k$,w$,M$,Vi,$$,Si,F$,R$,E$,ia,x$,Ct,Pi,j$,Un,J$,Zp,z$,C$,sm,I$,U$,q$,da,N$,ca,W$,pa,d_,qn,ha,am,Xi,Z$,rm,A$,c_,_t,Li,B$,Nn,G$,lm,V$,S$,im,P$,X$,L$,Qi,Q$,Ap,O$,D$,Y$,Oi,H$,Di,K$,eF,tF,ua,oF,It,Yi,nF,Wn,sF,Bp,aF,rF,dm,lF,iF,dF,ma,cF,fa,pF,ga,p_,Zn,_a,cm,Hi,hF,pm,uF,h_,nt,Ki,mF,hm,fF,gF,ed,_F,Gp,bF,yF,vF,td,TF,od,kF,wF,MF,um,$F,FF,bo,mm,nd,RF,EF,fm,sd,xF,jF,gm,ad,JF,zF,_m,rd,CF,IF,eo,ld,UF,An,qF,bm,NF,WF,ym,ZF,AF,BF,ba,GF,ya,u_,Bn,va,vm,id,VF,Tm,SF,m_,st,dd,PF,km,XF,LF,cd,QF,Vp,OF,DF,YF,pd,HF,hd,KF,eR,tR,wm,oR,nR,yo,Mm,ud,sR,aR,$m,md,rR,lR,Fm,fd,iR,dR,Rm,gd,cR,pR,to,_d,hR,Gn,uR,Em,mR,fR,xm,gR,_R,bR,Ta,yR,ka,f_,Vn,wa,jm,bd,vR,Jm,TR,g_,at,yd,kR,vd,wR,zm,MR,$R,FR,Td,RR,Sp,ER,xR,jR,kd,JR,wd,zR,CR,IR,Cm,UR,qR,vo,Im,Md,NR,WR,Um,$d,ZR,AR,qm,Fd,BR,GR,Nm,Rd,VR,SR,oo,Ed,PR,Sn,XR,Wm,LR,QR,Zm,OR,DR,YR,Ma,HR,$a,__,Pn,Fa,Am,xd,KR,Bm,eE,b_,rt,jd,tE,Gm,oE,nE,Jd,sE,Pp,aE,rE,lE,zd,iE,Cd,dE,cE,pE,Vm,hE,uE,To,Sm,Id,mE,fE,Pm,Ud,gE,_E,Xm,qd,bE,yE,Lm,Nd,vE,TE,no,Wd,kE,Xn,wE,Qm,ME,$E,Om,FE,RE,EE,Ra,xE,Ea,y_,Ln,xa,Dm,Zd,jE,Ym,JE,v_,lt,Ad,zE,Hm,CE,IE,Bd,UE,Xp,qE,NE,WE,Gd,ZE,Vd,AE,BE,GE,Km,VE,SE,ko,ef,Sd,PE,XE,tf,Pd,LE,QE,of,Xd,OE,DE,nf,Ld,YE,HE,so,Qd,KE,Qn,e4,sf,t4,o4,af,n4,s4,a4,ja,r4,Ja,T_,On,za,rf,Od,l4,lf,i4,k_,it,Dd,d4,df,c4,p4,Yd,h4,Lp,u4,m4,f4,Hd,g4,Kd,_4,b4,y4,cf,v4,T4,wo,pf,ec,k4,w4,hf,tc,M4,$4,uf,oc,F4,R4,mf,nc,E4,x4,ao,sc,j4,Dn,J4,ff,z4,C4,gf,I4,U4,q4,Ca,N4,Ia,w_,Yn,Ua,_f,ac,W4,bf,Z4,M_,dt,rc,A4,Hn,B4,yf,G4,V4,vf,S4,P4,X4,lc,L4,Qp,Q4,O4,D4,ic,Y4,dc,H4,K4,ex,Tf,tx,ox,Mo,kf,cc,nx,sx,wf,pc,ax,rx,Mf,hc,lx,ix,$f,uc,dx,cx,ro,mc,px,Kn,hx,Ff,ux,mx,Rf,fx,gx,_x,qa,bx,Na,$_;return i=new Ze({}),ie=new Ze({}),pr=new Ze({}),hr=new Kb({props:{pipeline:"text-classification"}}),$r=new Kb({props:{pipeline:"token-classification"}}),zr=new Kb({props:{pipeline:"fill-mask"}}),Gr=new Kb({props:{pipeline:"question-answering"}}),tl=new Ze({}),ol=new W({props:{name:"class transformers.RobertaConfig",anchor:"transformers.RobertaConfig",parameters:[{name:"vocab_size",val:" = 50265"},{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 50265) &#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.32.0/en/model_doc/roberta#transformers.RobertaModel">RobertaModel</a> or <a href="/docs/transformers/v4.32.0/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.32.0/en/model_doc/roberta#transformers.RobertaModel">RobertaModel</a> or <a href="/docs/transformers/v4.32.0/en/model_doc/roberta#transformers.TFRobertaModel">TFRobertaModel</a>.`,name:"type_vocab_size"},{anchor:"transformers.RobertaConfig.initializer_range",description:`<strong>initializer_range</strong> (<code>float</code>, <em>optional</em>, defaults to 0.02) &#x2014;
The standard deviation of the truncated_normal_initializer for initializing all weight matrices.`,name:"initializer_range"},{anchor:"transformers.RobertaConfig.layer_norm_eps",description:`<strong>layer_norm_eps</strong> (<code>float</code>, <em>optional</em>, defaults to 1e-12) &#x2014;
The epsilon used by the layer normalization layers.`,name:"layer_norm_eps"},{anchor:"transformers.RobertaConfig.position_embedding_type",description:`<strong>position_embedding_type</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;absolute&quot;</code>) &#x2014;
Type of position embedding. Choose one of <code>&quot;absolute&quot;</code>, <code>&quot;relative_key&quot;</code>, <code>&quot;relative_key_query&quot;</code>. For
positional embeddings use <code>&quot;absolute&quot;</code>. For more information on <code>&quot;relative_key&quot;</code>, please refer to
<a href="https://arxiv.org/abs/1803.02155" rel="nofollow">Self-Attention with Relative Position Representations (Shaw et al.)</a>.
For more information on <code>&quot;relative_key_query&quot;</code>, please refer to <em>Method 4</em> in <a href="https://arxiv.org/abs/2009.13658" rel="nofollow">Improve Transformer Models
with Better Relative Position Embeddings (Huang et al.)</a>.`,name:"position_embedding_type"},{anchor:"transformers.RobertaConfig.is_decoder",description:`<strong>is_decoder</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether the model is used as a decoder or not. If <code>False</code>, the model is used as an encoder.`,name:"is_decoder"},{anchor:"transformers.RobertaConfig.use_cache",description:`<strong>use_cache</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not the model should return the last key/values attentions (not used by all models). Only
relevant if <code>config.is_decoder=True</code>.`,name:"use_cache"},{anchor:"transformers.RobertaConfig.classifier_dropout",description:`<strong>classifier_dropout</strong> (<code>float</code>, <em>optional</em>) &#x2014;
The dropout ratio for the classification head.`,name:"classifier_dropout"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/roberta/configuration_roberta.py#L37"}}),is=new we({props:{anchor:"transformers.RobertaConfig.example",$$slots:{default:[zI]},$$scope:{ctx:R}}}),sl=new Ze({}),al=new W({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.32.0/src/transformers/models/roberta/tokenization_roberta.py#L107"}}),cs=new we({props:{anchor:"transformers.RobertaTokenizer.example",$$slots:{default:[CI]},$$scope:{ctx:R}}}),ps=new ke({props:{$$slots:{default:[II]},$$scope:{ctx:R}}}),il=new W({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.32.0/src/transformers/models/roberta/tokenization_roberta.py#L346",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>
`}}),cl=new W({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.32.0/src/transformers/models/roberta/tokenization_roberta.py#L371",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>
`}}),hl=new W({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.32.0/src/transformers/models/roberta/tokenization_roberta.py#L398",returnDescription:`
<p>List of zeros.</p>
`,returnType:`
<p><code>List[int]</code></p>
`}}),ul=new W({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.32.0/src/transformers/models/roberta/tokenization_roberta.py#L317"}}),ml=new Ze({}),fl=new W({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.32.0/src/transformers/models/roberta/tokenization_roberta_fast.py#L76"}}),fs=new we({props:{anchor:"transformers.RobertaTokenizerFast.example",$$slots:{default:[UI]},$$scope:{ctx:R}}}),gs=new ke({props:{$$slots:{default:[qI]},$$scope:{ctx:R}}}),yl=new W({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.32.0/src/transformers/models/roberta/tokenization_roberta_fast.py#L281"}}),vl=new Ze({}),Tl=new W({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.32.0/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.32.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/roberta/modeling_roberta.py#L691"}}),Rl=new W({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.32.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.32.0/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.32.0/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.32.0/src/transformers/models/roberta/modeling_roberta.py#L734",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.32.0/en/main_classes/output#transformers.modeling_outputs.BaseModelOutputWithPoolingAndCrossAttentions"
>transformers.modeling_outputs.BaseModelOutputWithPoolingAndCrossAttentions</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.32.0/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.32.0/en/main_classes/output#transformers.modeling_outputs.BaseModelOutputWithPoolingAndCrossAttentions"
>transformers.modeling_outputs.BaseModelOutputWithPoolingAndCrossAttentions</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),ys=new ke({props:{$$slots:{default:[NI]},$$scope:{ctx:R}}}),vs=new we({props:{anchor:"transformers.RobertaModel.forward.example",$$slots:{default:[WI]},$$scope:{ctx:R}}}),El=new Ze({}),xl=new W({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.32.0/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.32.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/roberta/modeling_roberta.py#L875"}}),Il=new W({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.32.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.32.0/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.32.0/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.32.0/src/transformers/models/roberta/modeling_roberta.py#L896",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.32.0/en/main_classes/output#transformers.modeling_outputs.CausalLMOutputWithCrossAttentions"
>transformers.modeling_outputs.CausalLMOutputWithCrossAttentions</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.32.0/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.32.0/en/main_classes/output#transformers.modeling_outputs.CausalLMOutputWithCrossAttentions"
>transformers.modeling_outputs.CausalLMOutputWithCrossAttentions</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),ks=new ke({props:{$$slots:{default:[ZI]},$$scope:{ctx:R}}}),ws=new we({props:{anchor:"transformers.RobertaForCausalLM.forward.example",$$slots:{default:[AI]},$$scope:{ctx:R}}}),Ul=new Ze({}),ql=new W({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.32.0/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.32.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/roberta/modeling_roberta.py#L1024"}}),Bl=new W({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.32.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.32.0/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.32.0/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.32.0/src/transformers/models/roberta/modeling_roberta.py#L1048",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.32.0/en/main_classes/output#transformers.modeling_outputs.MaskedLMOutput"
>transformers.modeling_outputs.MaskedLMOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.32.0/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.32.0/en/main_classes/output#transformers.modeling_outputs.MaskedLMOutput"
>transformers.modeling_outputs.MaskedLMOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),$s=new ke({props:{$$slots:{default:[BI]},$$scope:{ctx:R}}}),Fs=new we({props:{anchor:"transformers.RobertaForMaskedLM.forward.example",$$slots:{default:[GI]},$$scope:{ctx:R}}}),Gl=new Ze({}),Vl=new W({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.32.0/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.32.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/roberta/modeling_roberta.py#L1155"}}),Ll=new W({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.32.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.32.0/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.32.0/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.32.0/src/transformers/models/roberta/modeling_roberta.py#L1167",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.32.0/en/main_classes/output#transformers.modeling_outputs.SequenceClassifierOutput"
>transformers.modeling_outputs.SequenceClassifierOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.32.0/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.32.0/en/main_classes/output#transformers.modeling_outputs.SequenceClassifierOutput"
>transformers.modeling_outputs.SequenceClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Es=new ke({props:{$$slots:{default:[VI]},$$scope:{ctx:R}}}),xs=new we({props:{anchor:"transformers.RobertaForSequenceClassification.forward.example",$$slots:{default:[SI]},$$scope:{ctx:R}}}),js=new we({props:{anchor:"transformers.RobertaForSequenceClassification.forward.example-2",$$slots:{default:[PI]},$$scope:{ctx:R}}}),Ql=new Ze({}),Ol=new W({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.32.0/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.32.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/roberta/modeling_roberta.py#L1254"}}),Kl=new W({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.32.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.32.0/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.32.0/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.32.0/src/transformers/models/roberta/modeling_roberta.py#L1265",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.32.0/en/main_classes/output#transformers.modeling_outputs.MultipleChoiceModelOutput"
>transformers.modeling_outputs.MultipleChoiceModelOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.32.0/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.32.0/en/main_classes/output#transformers.modeling_outputs.MultipleChoiceModelOutput"
>transformers.modeling_outputs.MultipleChoiceModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),zs=new ke({props:{$$slots:{default:[XI]},$$scope:{ctx:R}}}),Cs=new we({props:{anchor:"transformers.RobertaForMultipleChoice.forward.example",$$slots:{default:[LI]},$$scope:{ctx:R}}}),ei=new Ze({}),ti=new W({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.32.0/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.32.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/roberta/modeling_roberta.py#L1346"}}),ai=new W({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.32.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.32.0/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.32.0/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.32.0/src/transformers/models/roberta/modeling_roberta.py#L1361",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.32.0/en/main_classes/output#transformers.modeling_outputs.TokenClassifierOutput"
>transformers.modeling_outputs.TokenClassifierOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.32.0/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.32.0/en/main_classes/output#transformers.modeling_outputs.TokenClassifierOutput"
>transformers.modeling_outputs.TokenClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Us=new ke({props:{$$slots:{default:[QI]},$$scope:{ctx:R}}}),qs=new we({props:{anchor:"transformers.RobertaForTokenClassification.forward.example",$$slots:{default:[OI]},$$scope:{ctx:R}}}),ri=new Ze({}),li=new W({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.32.0/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.32.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/roberta/modeling_roberta.py#L1453"}}),pi=new W({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.32.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.32.0/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.32.0/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.32.0/src/transformers/models/roberta/modeling_roberta.py#L1464",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.32.0/en/main_classes/output#transformers.modeling_outputs.QuestionAnsweringModelOutput"
>transformers.modeling_outputs.QuestionAnsweringModelOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.32.0/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.32.0/en/main_classes/output#transformers.modeling_outputs.QuestionAnsweringModelOutput"
>transformers.modeling_outputs.QuestionAnsweringModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Ws=new ke({props:{$$slots:{default:[DI]},$$scope:{ctx:R}}}),Zs=new we({props:{anchor:"transformers.RobertaForQuestionAnswering.forward.example",$$slots:{default:[YI]},$$scope:{ctx:R}}}),hi=new Ze({}),ui=new W({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.32.0/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.32.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/roberta/modeling_tf_roberta.py#L881"}}),Bs=new ke({props:{$$slots:{default:[HI]},$$scope:{ctx:R}}}),_i=new W({props:{name:"call",anchor:"transformers.TFRobertaModel.call",parameters:[{name:"input_ids",val:": TFModelInputType | None = None"},{name:"attention_mask",val:": np.ndarray | tf.Tensor | None = None"},{name:"token_type_ids",val:": np.ndarray | tf.Tensor | None = None"},{name:"position_ids",val:": np.ndarray | tf.Tensor | None = None"},{name:"head_mask",val:": np.ndarray | tf.Tensor | None = None"},{name:"inputs_embeds",val:": np.ndarray | tf.Tensor | None = None"},{name:"encoder_hidden_states",val:": np.ndarray | tf.Tensor | None = None"},{name:"encoder_attention_mask",val:": np.ndarray | tf.Tensor | None = None"},{name:"past_key_values",val:": Optional[Tuple[Tuple[Union[np.ndarray, tf.Tensor]]]] = None"},{name:"use_cache",val:": Optional[bool] = None"},{name:"output_attentions",val:": Optional[bool] = None"},{name:"output_hidden_states",val:": Optional[bool] = None"},{name:"return_dict",val:": Optional[bool] = None"},{name:"training",val:": 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.32.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/v4.32.0/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.32.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.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.32.0/src/transformers/models/roberta/modeling_tf_roberta.py#L886",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.32.0/en/main_classes/output#transformers.modeling_tf_outputs.TFBaseModelOutputWithPoolingAndCrossAttentions"
>transformers.modeling_tf_outputs.TFBaseModelOutputWithPoolingAndCrossAttentions</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/v4.32.0/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.32.0/en/main_classes/output#transformers.modeling_tf_outputs.TFBaseModelOutputWithPoolingAndCrossAttentions"
>transformers.modeling_tf_outputs.TFBaseModelOutputWithPoolingAndCrossAttentions</a> or <code>tuple(tf.Tensor)</code></p>
`}}),Gs=new ke({props:{$$slots:{default:[KI]},$$scope:{ctx:R}}}),Vs=new we({props:{anchor:"transformers.TFRobertaModel.call.example",$$slots:{default:[eU]},$$scope:{ctx:R}}}),bi=new Ze({}),yi=new W({props:{name:"class transformers.TFRobertaForCausalLM",anchor:"transformers.TFRobertaForCausalLM",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/roberta/modeling_tf_roberta.py#L1080"}}),vi=new W({props:{name:"call",anchor:"transformers.TFRobertaForCausalLM.call",parameters:[{name:"input_ids",val:": TFModelInputType | None = None"},{name:"attention_mask",val:": np.ndarray | tf.Tensor | None = None"},{name:"token_type_ids",val:": np.ndarray | tf.Tensor | None = None"},{name:"position_ids",val:": np.ndarray | tf.Tensor | None = None"},{name:"head_mask",val:": np.ndarray | tf.Tensor | None = None"},{name:"inputs_embeds",val:": np.ndarray | tf.Tensor | None = None"},{name:"encoder_hidden_states",val:": np.ndarray | tf.Tensor | None = None"},{name:"encoder_attention_mask",val:": np.ndarray | tf.Tensor | None = None"},{name:"past_key_values",val:": Optional[Tuple[Tuple[Union[np.ndarray, tf.Tensor]]]] = None"},{name:"use_cache",val:": Optional[bool] = None"},{name:"output_attentions",val:": Optional[bool] = None"},{name:"output_hidden_states",val:": Optional[bool] = None"},{name:"return_dict",val:": Optional[bool] = None"},{name:"labels",val:": np.ndarray | tf.Tensor | None = None"},{name:"training",val:": 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.32.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/v4.32.0/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.32.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.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.32.0/src/transformers/models/roberta/modeling_tf_roberta.py#L1113",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.32.0/en/main_classes/output#transformers.modeling_tf_outputs.TFCausalLMOutputWithCrossAttentions"
>transformers.modeling_tf_outputs.TFCausalLMOutputWithCrossAttentions</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/v4.32.0/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.32.0/en/main_classes/output#transformers.modeling_tf_outputs.TFCausalLMOutputWithCrossAttentions"
>transformers.modeling_tf_outputs.TFCausalLMOutputWithCrossAttentions</a> or <code>tuple(tf.Tensor)</code></p>
`}}),Ps=new ke({props:{$$slots:{default:[tU]},$$scope:{ctx:R}}}),Xs=new we({props:{anchor:"transformers.TFRobertaForCausalLM.call.example",$$slots:{default:[oU]},$$scope:{ctx:R}}}),Ti=new Ze({}),ki=new W({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.32.0/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.32.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/roberta/modeling_tf_roberta.py#L1003"}}),Qs=new ke({props:{$$slots:{default:[nU]},$$scope:{ctx:R}}}),Ri=new W({props:{name:"call",anchor:"transformers.TFRobertaForMaskedLM.call",parameters:[{name:"input_ids",val:": TFModelInputType | None = None"},{name:"attention_mask",val:": np.ndarray | tf.Tensor | None = None"},{name:"token_type_ids",val:": np.ndarray | tf.Tensor | None = None"},{name:"position_ids",val:": np.ndarray | tf.Tensor | None = None"},{name:"head_mask",val:": np.ndarray | tf.Tensor | None = None"},{name:"inputs_embeds",val:": np.ndarray | tf.Tensor | None = None"},{name:"output_attentions",val:": Optional[bool] = None"},{name:"output_hidden_states",val:": Optional[bool] = None"},{name:"return_dict",val:": Optional[bool] = None"},{name:"labels",val:": np.ndarray | tf.Tensor | None = None"},{name:"training",val:": 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.32.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/v4.32.0/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.32.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.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.32.0/src/transformers/models/roberta/modeling_tf_roberta.py#L1020",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.32.0/en/main_classes/output#transformers.modeling_tf_outputs.TFMaskedLMOutput"
>transformers.modeling_tf_outputs.TFMaskedLMOutput</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/v4.32.0/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.32.0/en/main_classes/output#transformers.modeling_tf_outputs.TFMaskedLMOutput"
>transformers.modeling_tf_outputs.TFMaskedLMOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),Os=new ke({props:{$$slots:{default:[sU]},$$scope:{ctx:R}}}),Ds=new we({props:{anchor:"transformers.TFRobertaForMaskedLM.call.example",$$slots:{default:[aU]},$$scope:{ctx:R}}}),Ys=new we({props:{anchor:"transformers.TFRobertaForMaskedLM.call.example-2",$$slots:{default:[rU]},$$scope:{ctx:R}}}),Ei=new Ze({}),xi=new W({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.32.0/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.32.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/roberta/modeling_tf_roberta.py#L1237"}}),Ks=new ke({props:{$$slots:{default:[lU]},$$scope:{ctx:R}}}),Ci=new W({props:{name:"call",anchor:"transformers.TFRobertaForSequenceClassification.call",parameters:[{name:"input_ids",val:": TFModelInputType | None = None"},{name:"attention_mask",val:": np.ndarray | tf.Tensor | None = None"},{name:"token_type_ids",val:": np.ndarray | tf.Tensor | None = None"},{name:"position_ids",val:": np.ndarray | tf.Tensor | None = None"},{name:"head_mask",val:": np.ndarray | tf.Tensor | None = None"},{name:"inputs_embeds",val:": np.ndarray | tf.Tensor | None = None"},{name:"output_attentions",val:": Optional[bool] = None"},{name:"output_hidden_states",val:": Optional[bool] = None"},{name:"return_dict",val:": Optional[bool] = None"},{name:"labels",val:": np.ndarray | tf.Tensor | None = None"},{name:"training",val:": 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.32.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/v4.32.0/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.32.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.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.32.0/src/transformers/models/roberta/modeling_tf_roberta.py#L1248",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.32.0/en/main_classes/output#transformers.modeling_tf_outputs.TFSequenceClassifierOutput"
>transformers.modeling_tf_outputs.TFSequenceClassifierOutput</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/v4.32.0/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.32.0/en/main_classes/output#transformers.modeling_tf_outputs.TFSequenceClassifierOutput"
>transformers.modeling_tf_outputs.TFSequenceClassifierOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),ea=new ke({props:{$$slots:{default:[iU]},$$scope:{ctx:R}}}),ta=new we({props:{anchor:"transformers.TFRobertaForSequenceClassification.call.example",$$slots:{default:[dU]},$$scope:{ctx:R}}}),oa=new we({props:{anchor:"transformers.TFRobertaForSequenceClassification.call.example-2",$$slots:{default:[cU]},$$scope:{ctx:R}}}),Ii=new Ze({}),Ui=new W({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.32.0/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.32.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/roberta/modeling_tf_roberta.py#L1313"}}),sa=new ke({props:{$$slots:{default:[pU]},$$scope:{ctx:R}}}),Zi=new W({props:{name:"call",anchor:"transformers.TFRobertaForMultipleChoice.call",parameters:[{name:"input_ids",val:": TFModelInputType | None = None"},{name:"attention_mask",val:": np.ndarray | tf.Tensor | None = None"},{name:"token_type_ids",val:": np.ndarray | tf.Tensor | None = None"},{name:"position_ids",val:": np.ndarray | tf.Tensor | None = None"},{name:"head_mask",val:": np.ndarray | tf.Tensor | None = None"},{name:"inputs_embeds",val:": np.ndarray | tf.Tensor | None = None"},{name:"output_attentions",val:": Optional[bool] = None"},{name:"output_hidden_states",val:": Optional[bool] = None"},{name:"return_dict",val:": Optional[bool] = None"},{name:"labels",val:": np.ndarray | tf.Tensor | None = None"},{name:"training",val:": 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.32.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/v4.32.0/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.32.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.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.32.0/src/transformers/models/roberta/modeling_tf_roberta.py#L1327",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.32.0/en/main_classes/output#transformers.modeling_tf_outputs.TFMultipleChoiceModelOutput"
>transformers.modeling_tf_outputs.TFMultipleChoiceModelOutput</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/v4.32.0/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.32.0/en/main_classes/output#transformers.modeling_tf_outputs.TFMultipleChoiceModelOutput"
>transformers.modeling_tf_outputs.TFMultipleChoiceModelOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),aa=new ke({props:{$$slots:{default:[hU]},$$scope:{ctx:R}}}),ra=new we({props:{anchor:"transformers.TFRobertaForMultipleChoice.call.example",$$slots:{default:[uU]},$$scope:{ctx:R}}}),Ai=new Ze({}),Bi=new W({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.32.0/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.32.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/roberta/modeling_tf_roberta.py#L1403"}}),ia=new ke({props:{$$slots:{default:[mU]},$$scope:{ctx:R}}}),Pi=new W({props:{name:"call",anchor:"transformers.TFRobertaForTokenClassification.call",parameters:[{name:"input_ids",val:": TFModelInputType | None = None"},{name:"attention_mask",val:": np.ndarray | tf.Tensor | None = None"},{name:"token_type_ids",val:": np.ndarray | tf.Tensor | None = None"},{name:"position_ids",val:": np.ndarray | tf.Tensor | None = None"},{name:"head_mask",val:": np.ndarray | tf.Tensor | None = None"},{name:"inputs_embeds",val:": np.ndarray | tf.Tensor | None = None"},{name:"output_attentions",val:": Optional[bool] = None"},{name:"output_hidden_states",val:": Optional[bool] = None"},{name:"return_dict",val:": Optional[bool] = None"},{name:"labels",val:": np.ndarray | tf.Tensor | None = None"},{name:"training",val:": 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.32.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/v4.32.0/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.32.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.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.32.0/src/transformers/models/roberta/modeling_tf_roberta.py#L1421",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.32.0/en/main_classes/output#transformers.modeling_tf_outputs.TFTokenClassifierOutput"
>transformers.modeling_tf_outputs.TFTokenClassifierOutput</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/v4.32.0/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.32.0/en/main_classes/output#transformers.modeling_tf_outputs.TFTokenClassifierOutput"
>transformers.modeling_tf_outputs.TFTokenClassifierOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),da=new ke({props:{$$slots:{default:[fU]},$$scope:{ctx:R}}}),ca=new we({props:{anchor:"transformers.TFRobertaForTokenClassification.call.example",$$slots:{default:[gU]},$$scope:{ctx:R}}}),pa=new we({props:{anchor:"transformers.TFRobertaForTokenClassification.call.example-2",$$slots:{default:[_U]},$$scope:{ctx:R}}}),Xi=new Ze({}),Li=new W({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.32.0/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.32.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/roberta/modeling_tf_roberta.py#L1486"}}),ua=new ke({props:{$$slots:{default:[bU]},$$scope:{ctx:R}}}),Yi=new W({props:{name:"call",anchor:"transformers.TFRobertaForQuestionAnswering.call",parameters:[{name:"input_ids",val:": TFModelInputType | None = None"},{name:"attention_mask",val:": np.ndarray | tf.Tensor | None = None"},{name:"token_type_ids",val:": np.ndarray | tf.Tensor | None = None"},{name:"position_ids",val:": np.ndarray | tf.Tensor | None = None"},{name:"head_mask",val:": np.ndarray | tf.Tensor | None = None"},{name:"inputs_embeds",val:": np.ndarray | tf.Tensor | None = None"},{name:"output_attentions",val:": Optional[bool] = None"},{name:"output_hidden_states",val:": Optional[bool] = None"},{name:"return_dict",val:": Optional[bool] = None"},{name:"start_positions",val:": np.ndarray | tf.Tensor | None = None"},{name:"end_positions",val:": np.ndarray | tf.Tensor | None = None"},{name:"training",val:": 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.32.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/v4.32.0/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.32.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.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.32.0/src/transformers/models/roberta/modeling_tf_roberta.py#L1499",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.32.0/en/main_classes/output#transformers.modeling_tf_outputs.TFQuestionAnsweringModelOutput"
>transformers.modeling_tf_outputs.TFQuestionAnsweringModelOutput</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/v4.32.0/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.32.0/en/main_classes/output#transformers.modeling_tf_outputs.TFQuestionAnsweringModelOutput"
>transformers.modeling_tf_outputs.TFQuestionAnsweringModelOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),ma=new ke({props:{$$slots:{default:[yU]},$$scope:{ctx:R}}}),fa=new we({props:{anchor:"transformers.TFRobertaForQuestionAnswering.call.example",$$slots:{default:[vU]},$$scope:{ctx:R}}}),ga=new we({props:{anchor:"transformers.TFRobertaForQuestionAnswering.call.example-2",$$slots:{default:[TU]},$$scope:{ctx:R}}}),Hi=new Ze({}),Ki=new W({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.32.0/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.32.0/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.32.0/src/transformers/models/roberta/modeling_flax_roberta.py#L990"}}),ld=new W({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.32.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.32.0/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.32.0/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.32.0/src/transformers/models/roberta/modeling_flax_roberta.py#L816",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.32.0/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.32.0/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.32.0/en/main_classes/output#transformers.modeling_flax_outputs.FlaxBaseModelOutputWithPooling"
>transformers.modeling_flax_outputs.FlaxBaseModelOutputWithPooling</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),ba=new ke({props:{$$slots:{default:[kU]},$$scope:{ctx:R}}}),ya=new we({props:{anchor:"transformers.FlaxRobertaModel.__call__.example",$$slots:{default:[wU]},$$scope:{ctx:R}}}),id=new Ze({}),dd=new W({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.32.0/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.32.0/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.32.0/src/transformers/models/roberta/modeling_flax_roberta.py#L1452"}}),_d=new W({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.32.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.32.0/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.32.0/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.32.0/src/transformers/models/roberta/modeling_flax_roberta.py#L816",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.32.0/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.32.0/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.32.0/en/main_classes/output#transformers.modeling_flax_outputs.FlaxCausalLMOutputWithCrossAttentions"
>transformers.modeling_flax_outputs.FlaxCausalLMOutputWithCrossAttentions</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Ta=new ke({props:{$$slots:{default:[MU]},$$scope:{ctx:R}}}),ka=new we({props:{anchor:"transformers.FlaxRobertaForCausalLM.__call__.example",$$slots:{default:[$U]},$$scope:{ctx:R}}}),bd=new Ze({}),yd=new W({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.32.0/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.32.0/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.32.0/src/transformers/models/roberta/modeling_flax_roberta.py#L1056"}}),Ed=new W({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.32.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.32.0/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.32.0/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.32.0/src/transformers/models/roberta/modeling_flax_roberta.py#L816",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.32.0/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.32.0/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.32.0/en/main_classes/output#transformers.modeling_flax_outputs.FlaxBaseModelOutputWithPooling"
>transformers.modeling_flax_outputs.FlaxBaseModelOutputWithPooling</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Ma=new ke({props:{$$slots:{default:[FU]},$$scope:{ctx:R}}}),$a=new we({props:{anchor:"transformers.FlaxRobertaForMaskedLM.__call__.example",$$slots:{default:[RU]},$$scope:{ctx:R}}}),xd=new Ze({}),jd=new W({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.32.0/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.32.0/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.32.0/src/transformers/models/roberta/modeling_flax_roberta.py#L1128"}}),Wd=new W({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.32.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.32.0/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.32.0/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.32.0/src/transformers/models/roberta/modeling_flax_roberta.py#L816",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.32.0/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.32.0/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.32.0/en/main_classes/output#transformers.modeling_flax_outputs.FlaxSequenceClassifierOutput"
>transformers.modeling_flax_outputs.FlaxSequenceClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Ra=new ke({props:{$$slots:{default:[EU]},$$scope:{ctx:R}}}),Ea=new we({props:{anchor:"transformers.FlaxRobertaForSequenceClassification.__call__.example",$$slots:{default:[xU]},$$scope:{ctx:R}}}),Zd=new Ze({}),Ad=new W({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.32.0/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.32.0/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.32.0/src/transformers/models/roberta/modeling_flax_roberta.py#L1209"}}),Qd=new W({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.32.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.32.0/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.32.0/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.32.0/src/transformers/models/roberta/modeling_flax_roberta.py#L816",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.32.0/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.32.0/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.32.0/en/main_classes/output#transformers.modeling_flax_outputs.FlaxMultipleChoiceModelOutput"
>transformers.modeling_flax_outputs.FlaxMultipleChoiceModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),ja=new ke({props:{$$slots:{default:[jU]},$$scope:{ctx:R}}}),Ja=new we({props:{anchor:"transformers.FlaxRobertaForMultipleChoice.__call__.example",$$slots:{default:[JU]},$$scope:{ctx:R}}}),Od=new Ze({}),Dd=new W({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.32.0/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.32.0/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.32.0/src/transformers/models/roberta/modeling_flax_roberta.py#L1291"}}),sc=new W({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.32.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.32.0/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.32.0/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.32.0/src/transformers/models/roberta/modeling_flax_roberta.py#L816",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.32.0/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.32.0/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.32.0/en/main_classes/output#transformers.modeling_flax_outputs.FlaxTokenClassifierOutput"
>transformers.modeling_flax_outputs.FlaxTokenClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Ca=new ke({props:{$$slots:{default:[zU]},$$scope:{ctx:R}}}),Ia=new we({props:{anchor:"transformers.FlaxRobertaForTokenClassification.__call__.example",$$slots:{default:[CU]},$$scope:{ctx:R}}}),ac=new Ze({}),rc=new W({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.32.0/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.32.0/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.32.0/src/transformers/models/roberta/modeling_flax_roberta.py#L1368"}}),mc=new W({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.32.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.32.0/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.32.0/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.32.0/src/transformers/models/roberta/modeling_flax_roberta.py#L816",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.32.0/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.32.0/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.32.0/en/main_classes/output#transformers.modeling_flax_outputs.FlaxQuestionAnsweringModelOutput"
>transformers.modeling_flax_outputs.FlaxQuestionAnsweringModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),qa=new ke({props:{$$slots:{default:[IU]},$$scope:{ctx:R}}}),Na=new we({props:{anchor:"transformers.FlaxRobertaForQuestionAnswering.__call__.example",$$slots:{default:[UU]},$$scope:{ctx:R}}}),{c(){d=s("meta"),y=p(),m=s("h1"),f=s("a"),b=s("span"),T(i.$$.fragment),u=p(),E=s("span"),ae=o("RoBERTa"),K=p(),N=s("div"),re=s("a"),ee=s("img"),xe=p(),G=s("a"),pe=s("img"),Q=p(),he=s("a"),ue=s("img"),Fe=p(),le=s("h2"),B=s("a"),_e=s("span"),T(ie.$$.fragment),O=p(),be=s("span"),je=o("Overview"),ne=p(),z=s("p"),U=o("The RoBERTa model was proposed in "),de=s("a"),D=o("RoBERTa: A Robustly Optimized BERT Pretraining Approach"),Je=o(" by Yinhan Liu, "),ce=s("a"),Y=o("Myle Ott"),ze=o(`, 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.`),Re=p(),I=s("p"),Ce=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.`),X=p(),me=s("p"),Ie=o("The abstract from the paper is the following:"),L=p(),fe=s("p"),ye=s("em"),Z=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.`),Ee=p(),V=s("p"),Ue=o("Tips:"),se=p(),C=s("ul"),ve=s("li"),q=s("p"),qe=o("This implementation is the same as "),ge=s("a"),v=o("BertModel"),j=o(` with a tiny embeddings tweak as well as a setup
for Roberta pretrained models.`),Xe=p(),te=s("li"),Ge=s("p"),Le=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.`),J=p(),Ve=s("li"),Te=s("p"),Qe=o("RoBERTa doesn\u2019t have "),Se=s("code"),Oe=o("token_type_ids"),A=o(`, you don\u2019t need to indicate which token belongs to which segment. Just
separate your segments with the separation token `),S=s("code"),De=o("tokenizer.sep_token"),Ye=o(" (or "),P=s("code"),He=o("</s>"),Ke=o(")"),Ne=p(),Be=s("li"),oe=s("p"),et=o("Same as BERT with better pretraining tricks:"),ey=p(),go=s("ul"),wh=s("li"),ty=o("dynamic masking: tokens are masked differently at each epoch, whereas BERT does it once and for all"),oy=p(),Mh=s("li"),ny=o("together to reach 512 tokens (so the sentences are in an order than may span several documents)"),sy=p(),$h=s("li"),ay=o("train with larger batches"),ry=p(),Fh=s("li"),ly=o("use BPE with bytes as a subunit and not characters (because of unicode characters)"),iy=p(),Rh=s("li"),Cc=s("p"),Ic=s("a"),dy=o("CamemBERT"),cy=o(" is a wrapper around RoBERTa. Refer to this page for usage examples."),bg=p(),Ro=s("p"),py=o("This model was contributed by "),dr=s("a"),hy=o("julien-c"),uy=o(". The original code can be found "),cr=s("a"),my=o("here"),fy=o("."),yg=p(),tn=s("h2"),ss=s("a"),Eh=s("span"),T(pr.$$.fragment),gy=p(),xh=s("span"),_y=o("Resources"),vg=p(),Uc=s("p"),by=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."),Tg=p(),T(hr.$$.fragment),kg=p(),ct=s("ul"),on=s("li"),yy=o("A blog on "),ur=s("a"),vy=o("Getting Started with Sentiment Analysis on Twitter"),Ty=o(" using RoBERTa and the "),mr=s("a"),ky=o("Inference API"),wy=o("."),My=p(),fr=s("li"),$y=o("A blog on "),gr=s("a"),Fy=o("Opinion Classification with Kili and Hugging Face AutoTrain"),Ry=o(" using RoBERTa."),Ey=p(),_r=s("li"),xy=o("A notebook on how to "),br=s("a"),jy=o("finetune RoBERTa for sentiment analysis"),Jy=o(". \u{1F30E}"),zy=p(),Eo=s("li"),qc=s("a"),Cy=o("RobertaForSequenceClassification"),Iy=o(" is supported by this "),yr=s("a"),Uy=o("example script"),qy=o(" and "),vr=s("a"),Ny=o("notebook"),Wy=o("."),Zy=p(),xo=s("li"),Nc=s("a"),Ay=o("TFRobertaForSequenceClassification"),By=o(" is supported by this "),Tr=s("a"),Gy=o("example script"),Vy=o(" and "),kr=s("a"),Sy=o("notebook"),Py=o("."),Xy=p(),jo=s("li"),Wc=s("a"),Ly=o("FlaxRobertaForSequenceClassification"),Qy=o(" is supported by this "),wr=s("a"),Oy=o("example script"),Dy=o(" and "),Mr=s("a"),Yy=o("notebook"),Hy=o("."),Ky=p(),jh=s("li"),Zc=s("a"),ev=o("Text classification task guide"),wg=p(),T($r.$$.fragment),Mg=p(),xt=s("ul"),Jo=s("li"),Ac=s("a"),tv=o("RobertaForTokenClassification"),ov=o(" is supported by this "),Fr=s("a"),nv=o("example script"),sv=o(" and "),Rr=s("a"),av=o("notebook"),rv=o("."),lv=p(),zo=s("li"),Bc=s("a"),iv=o("TFRobertaForTokenClassification"),dv=o(" is supported by this "),Er=s("a"),cv=o("example script"),pv=o(" and "),xr=s("a"),hv=o("notebook"),uv=o("."),mv=p(),as=s("li"),Gc=s("a"),fv=o("FlaxRobertaForTokenClassification"),gv=o(" is supported by this "),jr=s("a"),_v=o("example script"),bv=o("."),yv=p(),Vc=s("li"),Jr=s("a"),vv=o("Token classification"),Tv=o(" chapter of the \u{1F917} Hugging Face Course."),kv=p(),Jh=s("li"),Sc=s("a"),wv=o("Token classification task guide"),$g=p(),T(zr.$$.fragment),Fg=p(),yt=s("ul"),Cr=s("li"),Mv=o("A blog on "),Ir=s("a"),$v=o("How to train a new language model from scratch using Transformers and Tokenizers"),Fv=o(" with RoBERTa."),Rv=p(),Co=s("li"),Pc=s("a"),Ev=o("RobertaForMaskedLM"),xv=o(" is supported by this "),Ur=s("a"),jv=o("example script"),Jv=o(" and "),qr=s("a"),zv=o("notebook"),Cv=o("."),Iv=p(),Io=s("li"),Xc=s("a"),Uv=o("TFRobertaForMaskedLM"),qv=o(" is supported by this "),Nr=s("a"),Nv=o("example script"),Wv=o(" and "),Wr=s("a"),Zv=o("notebook"),Av=o("."),Bv=p(),Uo=s("li"),Lc=s("a"),Gv=o("FlaxRobertaForMaskedLM"),Vv=o(" is supported by this "),Zr=s("a"),Sv=o("example script"),Pv=o(" and "),Ar=s("a"),Xv=o("notebook"),Lv=o("."),Qv=p(),Qc=s("li"),Br=s("a"),Ov=o("Masked language modeling"),Dv=o(" chapter of the \u{1F917} Hugging Face Course."),Yv=p(),zh=s("li"),Oc=s("a"),Hv=o("Masked language modeling task guide"),Rg=p(),T(Gr.$$.fragment),Eg=p(),vt=s("ul"),Vr=s("li"),Kv=o("A blog on "),Sr=s("a"),eT=o("Accelerated Inference with Optimum and Transformers Pipelines"),tT=o(" with RoBERTa for question answering."),oT=p(),qo=s("li"),Dc=s("a"),nT=o("RobertaForQuestionAnswering"),sT=o(" is supported by this "),Pr=s("a"),aT=o("example script"),rT=o(" and "),Xr=s("a"),lT=o("notebook"),iT=o("."),dT=p(),No=s("li"),Yc=s("a"),cT=o("TFRobertaForQuestionAnswering"),pT=o(" is supported by this "),Lr=s("a"),hT=o("example script"),uT=o(" and "),Qr=s("a"),mT=o("notebook"),fT=o("."),gT=p(),rs=s("li"),Hc=s("a"),_T=o("FlaxRobertaForQuestionAnswering"),bT=o(" is supported by this "),Or=s("a"),yT=o("example script"),vT=o("."),TT=p(),Kc=s("li"),Dr=s("a"),kT=o("Question answering"),wT=o(" chapter of the \u{1F917} Hugging Face Course."),MT=p(),Ch=s("li"),ep=s("a"),$T=o("Question answering task guide"),xg=p(),tp=s("p"),Ih=s("strong"),FT=o("Multiple choice"),jg=p(),Wo=s("ul"),Zo=s("li"),op=s("a"),RT=o("RobertaForMultipleChoice"),ET=o(" is supported by this "),Yr=s("a"),xT=o("example script"),jT=o(" and "),Hr=s("a"),JT=o("notebook"),zT=o("."),CT=p(),Ao=s("li"),np=s("a"),IT=o("TFRobertaForMultipleChoice"),UT=o(" is supported by this "),Kr=s("a"),qT=o("example script"),NT=o(" and "),el=s("a"),WT=o("notebook"),ZT=o("."),AT=p(),Uh=s("li"),sp=s("a"),BT=o("Multiple choice task guide"),Jg=p(),nn=s("h2"),ls=s("a"),qh=s("span"),T(tl.$$.fragment),GT=p(),Nh=s("span"),VT=o("RobertaConfig"),zg=p(),Vt=s("div"),T(ol.$$.fragment),ST=p(),_o=s("p"),PT=o("This is the configuration class to store the configuration of a "),ap=s("a"),XT=o("RobertaModel"),LT=o(" or a "),rp=s("a"),QT=o("TFRobertaModel"),OT=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
`),nl=s("a"),DT=o("roberta-base"),YT=o(" architecture."),HT=p(),sn=s("p"),KT=o("Configuration objects inherit from "),lp=s("a"),ek=o("PretrainedConfig"),tk=o(` and can be used to control the model outputs. Read the
documentation from `),ip=s("a"),ok=o("PretrainedConfig"),nk=o(" for more information."),sk=p(),T(is.$$.fragment),Cg=p(),an=s("h2"),ds=s("a"),Wh=s("span"),T(sl.$$.fragment),ak=p(),Zh=s("span"),rk=o("RobertaTokenizer"),Ig=p(),We=s("div"),T(al.$$.fragment),lk=p(),Ah=s("p"),ik=o("Constructs a RoBERTa tokenizer, derived from the GPT-2 tokenizer, using byte-level Byte-Pair-Encoding."),dk=p(),Bh=s("p"),ck=o("This tokenizer has been trained to treat spaces like parts of the tokens (a bit like sentencepiece) so a word will"),pk=p(),T(cs.$$.fragment),hk=p(),rl=s("p"),uk=o("You can get around that behavior by passing "),Gh=s("code"),mk=o("add_prefix_space=True"),fk=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.`),gk=p(),T(ps.$$.fragment),_k=p(),ll=s("p"),bk=o("This tokenizer inherits from "),dp=s("a"),yk=o("PreTrainedTokenizer"),vk=o(` which contains most of the main methods. Users should refer to
this superclass for more information regarding those methods.`),Tk=p(),Bo=s("div"),T(il.$$.fragment),kk=p(),Vh=s("p"),wk=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:`),Mk=p(),dl=s("ul"),cp=s("li"),$k=o("single sequence: "),Sh=s("code"),Fk=o("<s> X </s>"),Rk=p(),pp=s("li"),Ek=o("pair of sequences: "),Ph=s("code"),xk=o("<s> A </s></s> B </s>"),jk=p(),hs=s("div"),T(cl.$$.fragment),Jk=p(),pl=s("p"),zk=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 `),Xh=s("code"),Ck=o("prepare_for_model"),Ik=o(" method."),Uk=p(),us=s("div"),T(hl.$$.fragment),qk=p(),Lh=s("p"),Nk=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.`),Wk=p(),hp=s("div"),T(ul.$$.fragment),Ug=p(),rn=s("h2"),ms=s("a"),Qh=s("span"),T(ml.$$.fragment),Zk=p(),Oh=s("span"),Ak=o("RobertaTokenizerFast"),qg=p(),tt=s("div"),T(fl.$$.fragment),Bk=p(),gl=s("p"),Gk=o("Construct a \u201Cfast\u201D RoBERTa tokenizer (backed by HuggingFace\u2019s "),Dh=s("em"),Vk=o("tokenizers"),Sk=o(` library), derived from the GPT-2
tokenizer, using byte-level Byte-Pair-Encoding.`),Pk=p(),Yh=s("p"),Xk=o("This tokenizer has been trained to treat spaces like parts of the tokens (a bit like sentencepiece) so a word will"),Lk=p(),T(fs.$$.fragment),Qk=p(),_l=s("p"),Ok=o("You can get around that behavior by passing "),Hh=s("code"),Dk=o("add_prefix_space=True"),Yk=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.`),Hk=p(),T(gs.$$.fragment),Kk=p(),bl=s("p"),ew=o("This tokenizer inherits from "),up=s("a"),tw=o("PreTrainedTokenizerFast"),ow=o(` which contains most of the main methods. Users should
refer to this superclass for more information regarding those methods.`),nw=p(),mp=s("div"),T(yl.$$.fragment),Ng=p(),ln=s("h2"),_s=s("a"),Kh=s("span"),T(vl.$$.fragment),sw=p(),eu=s("span"),aw=o("RobertaModel"),Wg=p(),ot=s("div"),T(Tl.$$.fragment),rw=p(),tu=s("p"),lw=o("The bare RoBERTa Model transformer outputting raw hidden-states without any specific head on top."),iw=p(),kl=s("p"),dw=o("This model inherits from "),fp=s("a"),cw=o("PreTrainedModel"),pw=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.)`),hw=p(),wl=s("p"),uw=o("This model is also a PyTorch "),Ml=s("a"),mw=o("torch.nn.Module"),fw=o(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),gw=p(),$l=s("p"),_w=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 `),ou=s("em"),bw=o(`Attention is
all you need`),yw=o(`_ by Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N. Gomez, Lukasz
Kaiser and Illia Polosukhin.`),vw=p(),pt=s("p"),Tw=o("To behave as an decoder the model needs to be initialized with the "),nu=s("code"),kw=o("is_decoder"),ww=o(` argument of the configuration set
to `),su=s("code"),Mw=o("True"),$w=o(". To be used in a Seq2Seq model, the model needs to initialized with both "),au=s("code"),Fw=o("is_decoder"),Rw=o(` argument and
`),ru=s("code"),Ew=o("add_cross_attention"),xw=o(" set to "),lu=s("code"),jw=o("True"),Jw=o("; an "),iu=s("code"),zw=o("encoder_hidden_states"),Cw=o(" is then expected as an input to the forward pass."),Iw=p(),bs=s("p"),Uw=o(".. _"),du=s("em"),qw=o("Attention is all you need"),Nw=o(": "),Fl=s("a"),Ww=o("https://arxiv.org/abs/1706.03762"),Zw=p(),Pt=s("div"),T(Rl.$$.fragment),Aw=p(),dn=s("p"),Bw=o("The "),gp=s("a"),Gw=o("RobertaModel"),Vw=o(" forward method, overrides the "),cu=s("code"),Sw=o("__call__"),Pw=o(" special method."),Xw=p(),T(ys.$$.fragment),Lw=p(),T(vs.$$.fragment),Zg=p(),cn=s("h2"),Ts=s("a"),pu=s("span"),T(El.$$.fragment),Qw=p(),hu=s("span"),Ow=o("RobertaForCausalLM"),Ag=p(),wt=s("div"),T(xl.$$.fragment),Dw=p(),jl=s("p"),Yw=o("RoBERTa Model with a "),uu=s("code"),Hw=o("language modeling"),Kw=o(" head on top for CLM fine-tuning."),eM=p(),Jl=s("p"),tM=o("This model inherits from "),_p=s("a"),oM=o("PreTrainedModel"),nM=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.)`),sM=p(),zl=s("p"),aM=o("This model is also a PyTorch "),Cl=s("a"),rM=o("torch.nn.Module"),lM=o(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),iM=p(),Xt=s("div"),T(Il.$$.fragment),dM=p(),pn=s("p"),cM=o("The "),bp=s("a"),pM=o("RobertaForCausalLM"),hM=o(" forward method, overrides the "),mu=s("code"),uM=o("__call__"),mM=o(" special method."),fM=p(),T(ks.$$.fragment),gM=p(),T(ws.$$.fragment),Bg=p(),hn=s("h2"),Ms=s("a"),fu=s("span"),T(Ul.$$.fragment),_M=p(),gu=s("span"),bM=o("RobertaForMaskedLM"),Gg=p(),Mt=s("div"),T(ql.$$.fragment),yM=p(),Nl=s("p"),vM=o("RoBERTa Model with a "),_u=s("code"),TM=o("language modeling"),kM=o(" head on top."),wM=p(),Wl=s("p"),MM=o("This model inherits from "),yp=s("a"),$M=o("PreTrainedModel"),FM=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.)`),RM=p(),Zl=s("p"),EM=o("This model is also a PyTorch "),Al=s("a"),xM=o("torch.nn.Module"),jM=o(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),JM=p(),Lt=s("div"),T(Bl.$$.fragment),zM=p(),un=s("p"),CM=o("The "),vp=s("a"),IM=o("RobertaForMaskedLM"),UM=o(" forward method, overrides the "),bu=s("code"),qM=o("__call__"),NM=o(" special method."),WM=p(),T($s.$$.fragment),ZM=p(),T(Fs.$$.fragment),Vg=p(),mn=s("h2"),Rs=s("a"),yu=s("span"),T(Gl.$$.fragment),AM=p(),vu=s("span"),BM=o("RobertaForSequenceClassification"),Sg=p(),$t=s("div"),T(Vl.$$.fragment),GM=p(),Tu=s("p"),VM=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.`),SM=p(),Sl=s("p"),PM=o("This model inherits from "),Tp=s("a"),XM=o("PreTrainedModel"),LM=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.)`),QM=p(),Pl=s("p"),OM=o("This model is also a PyTorch "),Xl=s("a"),DM=o("torch.nn.Module"),YM=o(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),HM=p(),jt=s("div"),T(Ll.$$.fragment),KM=p(),fn=s("p"),e2=o("The "),kp=s("a"),t2=o("RobertaForSequenceClassification"),o2=o(" forward method, overrides the "),ku=s("code"),n2=o("__call__"),s2=o(" special method."),a2=p(),T(Es.$$.fragment),r2=p(),T(xs.$$.fragment),l2=p(),T(js.$$.fragment),Pg=p(),gn=s("h2"),Js=s("a"),wu=s("span"),T(Ql.$$.fragment),i2=p(),Mu=s("span"),d2=o("RobertaForMultipleChoice"),Xg=p(),Ft=s("div"),T(Ol.$$.fragment),c2=p(),$u=s("p"),p2=o(`Roberta Model with a multiple choice classification head on top (a linear layer on top of the pooled output and a
softmax) e.g. for RocStories/SWAG tasks.`),h2=p(),Dl=s("p"),u2=o("This model inherits from "),wp=s("a"),m2=o("PreTrainedModel"),f2=o(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),g2=p(),Yl=s("p"),_2=o("This model is also a PyTorch "),Hl=s("a"),b2=o("torch.nn.Module"),y2=o(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),v2=p(),Qt=s("div"),T(Kl.$$.fragment),T2=p(),_n=s("p"),k2=o("The "),Mp=s("a"),w2=o("RobertaForMultipleChoice"),M2=o(" forward method, overrides the "),Fu=s("code"),$2=o("__call__"),F2=o(" special method."),R2=p(),T(zs.$$.fragment),E2=p(),T(Cs.$$.fragment),Lg=p(),bn=s("h2"),Is=s("a"),Ru=s("span"),T(ei.$$.fragment),x2=p(),Eu=s("span"),j2=o("RobertaForTokenClassification"),Qg=p(),Rt=s("div"),T(ti.$$.fragment),J2=p(),xu=s("p"),z2=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.`),C2=p(),oi=s("p"),I2=o("This model inherits from "),$p=s("a"),U2=o("PreTrainedModel"),q2=o(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),N2=p(),ni=s("p"),W2=o("This model is also a PyTorch "),si=s("a"),Z2=o("torch.nn.Module"),A2=o(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),B2=p(),Ot=s("div"),T(ai.$$.fragment),G2=p(),yn=s("p"),V2=o("The "),Fp=s("a"),S2=o("RobertaForTokenClassification"),P2=o(" forward method, overrides the "),ju=s("code"),X2=o("__call__"),L2=o(" special method."),Q2=p(),T(Us.$$.fragment),O2=p(),T(qs.$$.fragment),Og=p(),vn=s("h2"),Ns=s("a"),Ju=s("span"),T(ri.$$.fragment),D2=p(),zu=s("span"),Y2=o("RobertaForQuestionAnswering"),Dg=p(),Et=s("div"),T(li.$$.fragment),H2=p(),Tn=s("p"),K2=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 `),Cu=s("code"),e1=o("span start logits"),t1=o(" and "),Iu=s("code"),o1=o("span end logits"),n1=o(")."),s1=p(),ii=s("p"),a1=o("This model inherits from "),Rp=s("a"),r1=o("PreTrainedModel"),l1=o(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),i1=p(),di=s("p"),d1=o("This model is also a PyTorch "),ci=s("a"),c1=o("torch.nn.Module"),p1=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=p(),Dt=s("div"),T(pi.$$.fragment),u1=p(),kn=s("p"),m1=o("The "),Ep=s("a"),f1=o("RobertaForQuestionAnswering"),g1=o(" forward method, overrides the "),Uu=s("code"),_1=o("__call__"),b1=o(" special method."),y1=p(),T(Ws.$$.fragment),v1=p(),T(Zs.$$.fragment),Yg=p(),wn=s("h2"),As=s("a"),qu=s("span"),T(hi.$$.fragment),T1=p(),Nu=s("span"),k1=o("TFRobertaModel"),Hg=p(),ht=s("div"),T(ui.$$.fragment),w1=p(),Wu=s("p"),M1=o("The bare RoBERTa Model transformer outputting raw hidden-states without any specific head on top."),$1=p(),mi=s("p"),F1=o("This model inherits from "),xp=s("a"),R1=o("TFPreTrainedModel"),E1=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.)`),x1=p(),fi=s("p"),j1=o("This model is also a "),gi=s("a"),J1=o("tf.keras.Model"),z1=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.`),C1=p(),T(Bs.$$.fragment),I1=p(),Yt=s("div"),T(_i.$$.fragment),U1=p(),Mn=s("p"),q1=o("The "),jp=s("a"),N1=o("TFRobertaModel"),W1=o(" forward method, overrides the "),Zu=s("code"),Z1=o("__call__"),A1=o(" special method."),B1=p(),T(Gs.$$.fragment),G1=p(),T(Vs.$$.fragment),Kg=p(),$n=s("h2"),Ss=s("a"),Au=s("span"),T(bi.$$.fragment),V1=p(),Bu=s("span"),S1=o("TFRobertaForCausalLM"),e_=p(),Fn=s("div"),T(yi.$$.fragment),P1=p(),Ht=s("div"),T(vi.$$.fragment),X1=p(),Rn=s("p"),L1=o("The "),Jp=s("a"),Q1=o("TFRobertaForCausalLM"),O1=o(" forward method, overrides the "),Gu=s("code"),D1=o("__call__"),Y1=o(" special method."),H1=p(),T(Ps.$$.fragment),K1=p(),T(Xs.$$.fragment),t_=p(),En=s("h2"),Ls=s("a"),Vu=s("span"),T(Ti.$$.fragment),e0=p(),Su=s("span"),t0=o("TFRobertaForMaskedLM"),o_=p(),ut=s("div"),T(ki.$$.fragment),o0=p(),wi=s("p"),n0=o("RoBERTa Model with a "),Pu=s("code"),s0=o("language modeling"),a0=o(" head on top."),r0=p(),Mi=s("p"),l0=o("This model inherits from "),zp=s("a"),i0=o("TFPreTrainedModel"),d0=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.)`),c0=p(),$i=s("p"),p0=o("This model is also a "),Fi=s("a"),h0=o("tf.keras.Model"),u0=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.`),m0=p(),T(Qs.$$.fragment),f0=p(),Jt=s("div"),T(Ri.$$.fragment),g0=p(),xn=s("p"),_0=o("The "),Cp=s("a"),b0=o("TFRobertaForMaskedLM"),y0=o(" forward method, overrides the "),Xu=s("code"),v0=o("__call__"),T0=o(" special method."),k0=p(),T(Os.$$.fragment),w0=p(),T(Ds.$$.fragment),M0=p(),T(Ys.$$.fragment),n_=p(),jn=s("h2"),Hs=s("a"),Lu=s("span"),T(Ei.$$.fragment),$0=p(),Qu=s("span"),F0=o("TFRobertaForSequenceClassification"),s_=p(),mt=s("div"),T(xi.$$.fragment),R0=p(),Ou=s("p"),E0=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.`),x0=p(),ji=s("p"),j0=o("This model inherits from "),Ip=s("a"),J0=o("TFPreTrainedModel"),z0=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.)`),C0=p(),Ji=s("p"),I0=o("This model is also a "),zi=s("a"),U0=o("tf.keras.Model"),q0=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.`),N0=p(),T(Ks.$$.fragment),W0=p(),zt=s("div"),T(Ci.$$.fragment),Z0=p(),Jn=s("p"),A0=o("The "),Up=s("a"),B0=o("TFRobertaForSequenceClassification"),G0=o(" forward method, overrides the "),Du=s("code"),V0=o("__call__"),S0=o(" special method."),P0=p(),T(ea.$$.fragment),X0=p(),T(ta.$$.fragment),L0=p(),T(oa.$$.fragment),a_=p(),zn=s("h2"),na=s("a"),Yu=s("span"),T(Ii.$$.fragment),Q0=p(),Hu=s("span"),O0=o("TFRobertaForMultipleChoice"),r_=p(),ft=s("div"),T(Ui.$$.fragment),D0=p(),Ku=s("p"),Y0=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.`),H0=p(),qi=s("p"),K0=o("This model inherits from "),qp=s("a"),e$=o("TFPreTrainedModel"),t$=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$=p(),Ni=s("p"),n$=o("This model is also a "),Wi=s("a"),s$=o("tf.keras.Model"),a$=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.`),r$=p(),T(sa.$$.fragment),l$=p(),Kt=s("div"),T(Zi.$$.fragment),i$=p(),Cn=s("p"),d$=o("The "),Np=s("a"),c$=o("TFRobertaForMultipleChoice"),p$=o(" forward method, overrides the "),em=s("code"),h$=o("__call__"),u$=o(" special method."),m$=p(),T(aa.$$.fragment),f$=p(),T(ra.$$.fragment),l_=p(),In=s("h2"),la=s("a"),tm=s("span"),T(Ai.$$.fragment),g$=p(),om=s("span"),_$=o("TFRobertaForTokenClassification"),i_=p(),gt=s("div"),T(Bi.$$.fragment),b$=p(),nm=s("p"),y$=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.`),v$=p(),Gi=s("p"),T$=o("This model inherits from "),Wp=s("a"),k$=o("TFPreTrainedModel"),w$=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.)`),M$=p(),Vi=s("p"),$$=o("This model is also a "),Si=s("a"),F$=o("tf.keras.Model"),R$=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.`),E$=p(),T(ia.$$.fragment),x$=p(),Ct=s("div"),T(Pi.$$.fragment),j$=p(),Un=s("p"),J$=o("The "),Zp=s("a"),z$=o("TFRobertaForTokenClassification"),C$=o(" forward method, overrides the "),sm=s("code"),I$=o("__call__"),U$=o(" special method."),q$=p(),T(da.$$.fragment),N$=p(),T(ca.$$.fragment),W$=p(),T(pa.$$.fragment),d_=p(),qn=s("h2"),ha=s("a"),am=s("span"),T(Xi.$$.fragment),Z$=p(),rm=s("span"),A$=o("TFRobertaForQuestionAnswering"),c_=p(),_t=s("div"),T(Li.$$.fragment),B$=p(),Nn=s("p"),G$=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 `),lm=s("code"),V$=o("span start logits"),S$=o(" and "),im=s("code"),P$=o("span end logits"),X$=o(")."),L$=p(),Qi=s("p"),Q$=o("This model inherits from "),Ap=s("a"),O$=o("TFPreTrainedModel"),D$=o(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),Y$=p(),Oi=s("p"),H$=o("This model is also a "),Di=s("a"),K$=o("tf.keras.Model"),eF=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.`),tF=p(),T(ua.$$.fragment),oF=p(),It=s("div"),T(Yi.$$.fragment),nF=p(),Wn=s("p"),sF=o("The "),Bp=s("a"),aF=o("TFRobertaForQuestionAnswering"),rF=o(" forward method, overrides the "),dm=s("code"),lF=o("__call__"),iF=o(" special method."),dF=p(),T(ma.$$.fragment),cF=p(),T(fa.$$.fragment),pF=p(),T(ga.$$.fragment),p_=p(),Zn=s("h2"),_a=s("a"),cm=s("span"),T(Hi.$$.fragment),hF=p(),pm=s("span"),uF=o("FlaxRobertaModel"),h_=p(),nt=s("div"),T(Ki.$$.fragment),mF=p(),hm=s("p"),fF=o("The bare RoBERTa Model transformer outputting raw hidden-states without any specific head on top."),gF=p(),ed=s("p"),_F=o("This model inherits from "),Gp=s("a"),bF=o("FlaxPreTrainedModel"),yF=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)`),vF=p(),td=s("p"),TF=o("This model is also a Flax Linen "),od=s("a"),kF=o("flax.linen.Module"),wF=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.`),MF=p(),um=s("p"),$F=o("Finally, this model supports inherent JAX features such as:"),FF=p(),bo=s("ul"),mm=s("li"),nd=s("a"),RF=o("Just-In-Time (JIT) compilation"),EF=p(),fm=s("li"),sd=s("a"),xF=o("Automatic Differentiation"),jF=p(),gm=s("li"),ad=s("a"),JF=o("Vectorization"),zF=p(),_m=s("li"),rd=s("a"),CF=o("Parallelization"),IF=p(),eo=s("div"),T(ld.$$.fragment),UF=p(),An=s("p"),qF=o("The "),bm=s("code"),NF=o("FlaxRobertaPreTrainedModel"),WF=o(" forward method, overrides the "),ym=s("code"),ZF=o("__call__"),AF=o(" special method."),BF=p(),T(ba.$$.fragment),GF=p(),T(ya.$$.fragment),u_=p(),Bn=s("h2"),va=s("a"),vm=s("span"),T(id.$$.fragment),VF=p(),Tm=s("span"),SF=o("FlaxRobertaForCausalLM"),m_=p(),st=s("div"),T(dd.$$.fragment),PF=p(),km=s("p"),XF=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.`),LF=p(),cd=s("p"),QF=o("This model inherits from "),Vp=s("a"),OF=o("FlaxPreTrainedModel"),DF=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)`),YF=p(),pd=s("p"),HF=o("This model is also a Flax Linen "),hd=s("a"),KF=o("flax.linen.Module"),eR=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.`),tR=p(),wm=s("p"),oR=o("Finally, this model supports inherent JAX features such as:"),nR=p(),yo=s("ul"),Mm=s("li"),ud=s("a"),sR=o("Just-In-Time (JIT) compilation"),aR=p(),$m=s("li"),md=s("a"),rR=o("Automatic Differentiation"),lR=p(),Fm=s("li"),fd=s("a"),iR=o("Vectorization"),dR=p(),Rm=s("li"),gd=s("a"),cR=o("Parallelization"),pR=p(),to=s("div"),T(_d.$$.fragment),hR=p(),Gn=s("p"),uR=o("The "),Em=s("code"),mR=o("FlaxRobertaPreTrainedModel"),fR=o(" forward method, overrides the "),xm=s("code"),gR=o("__call__"),_R=o(" special method."),bR=p(),T(Ta.$$.fragment),yR=p(),T(ka.$$.fragment),f_=p(),Vn=s("h2"),wa=s("a"),jm=s("span"),T(bd.$$.fragment),vR=p(),Jm=s("span"),TR=o("FlaxRobertaForMaskedLM"),g_=p(),at=s("div"),T(yd.$$.fragment),kR=p(),vd=s("p"),wR=o("RoBERTa Model with a "),zm=s("code"),MR=o("language modeling"),$R=o(" head on top."),FR=p(),Td=s("p"),RR=o("This model inherits from "),Sp=s("a"),ER=o("FlaxPreTrainedModel"),xR=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)`),jR=p(),kd=s("p"),JR=o("This model is also a Flax Linen "),wd=s("a"),zR=o("flax.linen.Module"),CR=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.`),IR=p(),Cm=s("p"),UR=o("Finally, this model supports inherent JAX features such as:"),qR=p(),vo=s("ul"),Im=s("li"),Md=s("a"),NR=o("Just-In-Time (JIT) compilation"),WR=p(),Um=s("li"),$d=s("a"),ZR=o("Automatic Differentiation"),AR=p(),qm=s("li"),Fd=s("a"),BR=o("Vectorization"),GR=p(),Nm=s("li"),Rd=s("a"),VR=o("Parallelization"),SR=p(),oo=s("div"),T(Ed.$$.fragment),PR=p(),Sn=s("p"),XR=o("The "),Wm=s("code"),LR=o("FlaxRobertaPreTrainedModel"),QR=o(" forward method, overrides the "),Zm=s("code"),OR=o("__call__"),DR=o(" special method."),YR=p(),T(Ma.$$.fragment),HR=p(),T($a.$$.fragment),__=p(),Pn=s("h2"),Fa=s("a"),Am=s("span"),T(xd.$$.fragment),KR=p(),Bm=s("span"),eE=o("FlaxRobertaForSequenceClassification"),b_=p(),rt=s("div"),T(jd.$$.fragment),tE=p(),Gm=s("p"),oE=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.`),nE=p(),Jd=s("p"),sE=o("This model inherits from "),Pp=s("a"),aE=o("FlaxPreTrainedModel"),rE=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)`),lE=p(),zd=s("p"),iE=o("This model is also a Flax Linen "),Cd=s("a"),dE=o("flax.linen.Module"),cE=o(`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),pE=p(),Vm=s("p"),hE=o("Finally, this model supports inherent JAX features such as:"),uE=p(),To=s("ul"),Sm=s("li"),Id=s("a"),mE=o("Just-In-Time (JIT) compilation"),fE=p(),Pm=s("li"),Ud=s("a"),gE=o("Automatic Differentiation"),_E=p(),Xm=s("li"),qd=s("a"),bE=o("Vectorization"),yE=p(),Lm=s("li"),Nd=s("a"),vE=o("Parallelization"),TE=p(),no=s("div"),T(Wd.$$.fragment),kE=p(),Xn=s("p"),wE=o("The "),Qm=s("code"),ME=o("FlaxRobertaPreTrainedModel"),$E=o(" forward method, overrides the "),Om=s("code"),FE=o("__call__"),RE=o(" special method."),EE=p(),T(Ra.$$.fragment),xE=p(),T(Ea.$$.fragment),y_=p(),Ln=s("h2"),xa=s("a"),Dm=s("span"),T(Zd.$$.fragment),jE=p(),Ym=s("span"),JE=o("FlaxRobertaForMultipleChoice"),v_=p(),lt=s("div"),T(Ad.$$.fragment),zE=p(),Hm=s("p"),CE=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.`),IE=p(),Bd=s("p"),UE=o("This model inherits from "),Xp=s("a"),qE=o("FlaxPreTrainedModel"),NE=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)`),WE=p(),Gd=s("p"),ZE=o("This model is also a Flax Linen "),Vd=s("a"),AE=o("flax.linen.Module"),BE=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.`),GE=p(),Km=s("p"),VE=o("Finally, this model supports inherent JAX features such as:"),SE=p(),ko=s("ul"),ef=s("li"),Sd=s("a"),PE=o("Just-In-Time (JIT) compilation"),XE=p(),tf=s("li"),Pd=s("a"),LE=o("Automatic Differentiation"),QE=p(),of=s("li"),Xd=s("a"),OE=o("Vectorization"),DE=p(),nf=s("li"),Ld=s("a"),YE=o("Parallelization"),HE=p(),so=s("div"),T(Qd.$$.fragment),KE=p(),Qn=s("p"),e4=o("The "),sf=s("code"),t4=o("FlaxRobertaPreTrainedModel"),o4=o(" forward method, overrides the "),af=s("code"),n4=o("__call__"),s4=o(" special method."),a4=p(),T(ja.$$.fragment),r4=p(),T(Ja.$$.fragment),T_=p(),On=s("h2"),za=s("a"),rf=s("span"),T(Od.$$.fragment),l4=p(),lf=s("span"),i4=o("FlaxRobertaForTokenClassification"),k_=p(),it=s("div"),T(Dd.$$.fragment),d4=p(),df=s("p"),c4=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.`),p4=p(),Yd=s("p"),h4=o("This model inherits from "),Lp=s("a"),u4=o("FlaxPreTrainedModel"),m4=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)`),f4=p(),Hd=s("p"),g4=o("This model is also a Flax Linen "),Kd=s("a"),_4=o("flax.linen.Module"),b4=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.`),y4=p(),cf=s("p"),v4=o("Finally, this model supports inherent JAX features such as:"),T4=p(),wo=s("ul"),pf=s("li"),ec=s("a"),k4=o("Just-In-Time (JIT) compilation"),w4=p(),hf=s("li"),tc=s("a"),M4=o("Automatic Differentiation"),$4=p(),uf=s("li"),oc=s("a"),F4=o("Vectorization"),R4=p(),mf=s("li"),nc=s("a"),E4=o("Parallelization"),x4=p(),ao=s("div"),T(sc.$$.fragment),j4=p(),Dn=s("p"),J4=o("The "),ff=s("code"),z4=o("FlaxRobertaPreTrainedModel"),C4=o(" forward method, overrides the "),gf=s("code"),I4=o("__call__"),U4=o(" special method."),q4=p(),T(Ca.$$.fragment),N4=p(),T(Ia.$$.fragment),w_=p(),Yn=s("h2"),Ua=s("a"),_f=s("span"),T(ac.$$.fragment),W4=p(),bf=s("span"),Z4=o("FlaxRobertaForQuestionAnswering"),M_=p(),dt=s("div"),T(rc.$$.fragment),A4=p(),Hn=s("p"),B4=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 `),yf=s("code"),G4=o("span start logits"),V4=o(" and "),vf=s("code"),S4=o("span end logits"),P4=o(")."),X4=p(),lc=s("p"),L4=o("This model inherits from "),Qp=s("a"),Q4=o("FlaxPreTrainedModel"),O4=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)`),D4=p(),ic=s("p"),Y4=o("This model is also a Flax Linen "),dc=s("a"),H4=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.`),ex=p(),Tf=s("p"),tx=o("Finally, this model supports inherent JAX features such as:"),ox=p(),Mo=s("ul"),kf=s("li"),cc=s("a"),nx=o("Just-In-Time (JIT) compilation"),sx=p(),wf=s("li"),pc=s("a"),ax=o("Automatic Differentiation"),rx=p(),Mf=s("li"),hc=s("a"),lx=o("Vectorization"),ix=p(),$f=s("li"),uc=s("a"),dx=o("Parallelization"),cx=p(),ro=s("div"),T(mc.$$.fragment),px=p(),Kn=s("p"),hx=o("The "),Ff=s("code"),ux=o("FlaxRobertaPreTrainedModel"),mx=o(" forward method, overrides the "),Rf=s("code"),fx=o("__call__"),gx=o(" special method."),_x=p(),T(qa.$$.fragment),bx=p(),T(Na.$$.fragment),this.h()},l(l){const _=jI('[data-svelte="svelte-1phssyn"]',document.head);d=a(_,"META",{name:!0,content:!0}),_.forEach(t),y=h(l),m=a(l,"H1",{class:!0});var fc=r(m);f=a(fc,"A",{id:!0,class:!0,href:!0});var Ef=r(f);b=a(Ef,"SPAN",{});var xf=r(b);k(i.$$.fragment,xf),xf.forEach(t),Ef.forEach(t),u=h(fc),E=a(fc,"SPAN",{});var jf=r(E);ae=n(jf,"RoBERTa"),jf.forEach(t),fc.forEach(t),K=h(l),N=a(l,"DIV",{class:!0});var es=r(N);re=a(es,"A",{href:!0});var Jf=r(re);ee=a(Jf,"IMG",{alt:!0,src:!0}),Jf.forEach(t),xe=h(es),G=a(es,"A",{href:!0});var zf=r(G);pe=a(zf,"IMG",{alt:!0,src:!0}),zf.forEach(t),Q=h(es),he=a(es,"A",{href:!0});var Cf=r(he);ue=a(Cf,"IMG",{alt:!0,src:!0}),Cf.forEach(t),es.forEach(t),Fe=h(l),le=a(l,"H2",{class:!0});var gc=r(le);B=a(gc,"A",{id:!0,class:!0,href:!0});var If=r(B);_e=a(If,"SPAN",{});var Uf=r(_e);k(ie.$$.fragment,Uf),Uf.forEach(t),If.forEach(t),O=h(gc),be=a(gc,"SPAN",{});var qf=r(be);je=n(qf,"Overview"),qf.forEach(t),gc.forEach(t),ne=h(l),z=a(l,"P",{});var ts=r(z);U=n(ts,"The RoBERTa model was proposed in "),de=a(ts,"A",{href:!0,rel:!0});var Nf=r(de);D=n(Nf,"RoBERTa: A Robustly Optimized BERT Pretraining Approach"),Nf.forEach(t),Je=n(ts," by Yinhan Liu, "),ce=a(ts,"A",{href:!0,rel:!0});var Wf=r(ce);Y=n(Wf,"Myle Ott"),Wf.forEach(t),ze=n(ts,`, 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.`),ts.forEach(t),Re=h(l),I=a(l,"P",{});var Zf=r(I);Ce=n(Zf,`It builds on BERT and modifies key hyperparameters, removing the next-sentence pretraining objective and training with
much larger mini-batches and learning rates.`),Zf.forEach(t),X=h(l),me=a(l,"P",{});var Af=r(me);Ie=n(Af,"The abstract from the paper is the following:"),Af.forEach(t),L=h(l),fe=a(l,"P",{});var Bf=r(fe);ye=a(Bf,"EM",{});var Gf=r(ye);Z=n(Gf,`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.`),Gf.forEach(t),Bf.forEach(t),Ee=h(l),V=a(l,"P",{});var Vf=r(V);Ue=n(Vf,"Tips:"),Vf.forEach(t),se=h(l),C=a(l,"UL",{});var St=r(C);ve=a(St,"LI",{});var Sf=r(ve);q=a(Sf,"P",{});var _c=r(q);qe=n(_c,"This implementation is the same as "),ge=a(_c,"A",{href:!0});var Pf=r(ge);v=n(Pf,"BertModel"),Pf.forEach(t),j=n(_c,` with a tiny embeddings tweak as well as a setup
for Roberta pretrained models.`),_c.forEach(t),Sf.forEach(t),Xe=h(St),te=a(St,"LI",{});var Xf=r(te);Ge=a(Xf,"P",{});var Lf=r(Ge);Le=n(Lf,`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.`),Lf.forEach(t),Xf.forEach(t),J=h(St),Ve=a(St,"LI",{});var Qf=r(Ve);Te=a(Qf,"P",{});var $o=r(Te);Qe=n($o,"RoBERTa doesn\u2019t have "),Se=a($o,"CODE",{});var Of=r(Se);Oe=n(Of,"token_type_ids"),Of.forEach(t),A=n($o,`, you don\u2019t need to indicate which token belongs to which segment. Just
separate your segments with the separation token `),S=a($o,"CODE",{});var Df=r(S);De=n(Df,"tokenizer.sep_token"),Df.forEach(t),Ye=n($o," (or "),P=a($o,"CODE",{});var Yf=r(P);He=n(Yf,"</s>"),Yf.forEach(t),Ke=n($o,")"),$o.forEach(t),Qf.forEach(t),Ne=h(St),Be=a(St,"LI",{});var bc=r(Be);oe=a(bc,"P",{});var Hf=r(oe);et=n(Hf,"Same as BERT with better pretraining tricks:"),Hf.forEach(t),ey=h(bc),go=a(bc,"UL",{});var Fo=r(go);wh=a(Fo,"LI",{});var Kf=r(wh);ty=n(Kf,"dynamic masking: tokens are masked differently at each epoch, whereas BERT does it once and for all"),Kf.forEach(t),oy=h(Fo),Mh=a(Fo,"LI",{});var eg=r(Mh);ny=n(eg,"together to reach 512 tokens (so the sentences are in an order than may span several documents)"),eg.forEach(t),sy=h(Fo),$h=a(Fo,"LI",{});var tg=r($h);ay=n(tg,"train with larger batches"),tg.forEach(t),ry=h(Fo),Fh=a(Fo,"LI",{});var og=r(Fh);ly=n(og,"use BPE with bytes as a subunit and not characters (because of unicode characters)"),og.forEach(t),Fo.forEach(t),bc.forEach(t),iy=h(St),Rh=a(St,"LI",{});var ng=r(Rh);Cc=a(ng,"P",{});var Op=r(Cc);Ic=a(Op,"A",{href:!0});var sg=r(Ic);dy=n(sg,"CamemBERT"),sg.forEach(t),cy=n(Op," is a wrapper around RoBERTa. Refer to this page for usage examples."),Op.forEach(t),ng.forEach(t),St.forEach(t),bg=h(l),Ro=a(l,"P",{});var os=r(Ro);py=n(os,"This model was contributed by "),dr=a(os,"A",{href:!0,rel:!0});var ag=r(dr);hy=n(ag,"julien-c"),ag.forEach(t),uy=n(os,". The original code can be found "),cr=a(os,"A",{href:!0,rel:!0});var rg=r(cr);my=n(rg,"here"),rg.forEach(t),fy=n(os,"."),os.forEach(t),yg=h(l),tn=a(l,"H2",{class:!0});var yc=r(tn);ss=a(yc,"A",{id:!0,class:!0,href:!0});var lg=r(ss);Eh=a(lg,"SPAN",{});var ig=r(Eh);k(pr.$$.fragment,ig),ig.forEach(t),lg.forEach(t),gy=h(yc),xh=a(yc,"SPAN",{});var dg=r(xh);_y=n(dg,"Resources"),dg.forEach(t),yc.forEach(t),vg=h(l),Uc=a(l,"P",{});var cg=r(Uc);by=n(cg,"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."),cg.forEach(t),Tg=h(l),k(hr.$$.fragment,l),kg=h(l),ct=a(l,"UL",{});var bt=r(ct);on=a(bt,"LI",{});var ns=r(on);yy=n(ns,"A blog on "),ur=a(ns,"A",{href:!0,rel:!0});var pg=r(ur);vy=n(pg,"Getting Started with Sentiment Analysis on Twitter"),pg.forEach(t),Ty=n(ns," using RoBERTa and the "),mr=a(ns,"A",{href:!0,rel:!0});var hg=r(mr);ky=n(hg,"Inference API"),hg.forEach(t),wy=n(ns,"."),ns.forEach(t),My=h(bt),fr=a(bt,"LI",{});var vc=r(fr);$y=n(vc,"A blog on "),gr=a(vc,"A",{href:!0,rel:!0});var ug=r(gr);Fy=n(ug,"Opinion Classification with Kili and Hugging Face AutoTrain"),ug.forEach(t),Ry=n(vc," using RoBERTa."),vc.forEach(t),Ey=h(bt),_r=a(bt,"LI",{});var Tc=r(_r);xy=n(Tc,"A notebook on how to "),br=a(Tc,"A",{href:!0,rel:!0});var mg=r(br);jy=n(mg,"finetune RoBERTa for sentiment analysis"),mg.forEach(t),Jy=n(Tc,". \u{1F30E}"),Tc.forEach(t),zy=h(bt),Eo=a(bt,"LI",{});var Go=r(Eo);qc=a(Go,"A",{href:!0});var $x=r(qc);Cy=n($x,"RobertaForSequenceClassification"),$x.forEach(t),Iy=n(Go," is supported by this "),yr=a(Go,"A",{href:!0,rel:!0});var Fx=r(yr);Uy=n(Fx,"example script"),Fx.forEach(t),qy=n(Go," and "),vr=a(Go,"A",{href:!0,rel:!0});var Rx=r(vr);Ny=n(Rx,"notebook"),Rx.forEach(t),Wy=n(Go,"."),Go.forEach(t),Zy=h(bt),xo=a(bt,"LI",{});var kc=r(xo);Nc=a(kc,"A",{href:!0});var Ex=r(Nc);Ay=n(Ex,"TFRobertaForSequenceClassification"),Ex.forEach(t),By=n(kc," is supported by this "),Tr=a(kc,"A",{href:!0,rel:!0});var xx=r(Tr);Gy=n(xx,"example script"),xx.forEach(t),Vy=n(kc," and "),kr=a(kc,"A",{href:!0,rel:!0});var jx=r(kr);Sy=n(jx,"notebook"),jx.forEach(t),Py=n(kc,"."),kc.forEach(t),Xy=h(bt),jo=a(bt,"LI",{});var wc=r(jo);Wc=a(wc,"A",{href:!0});var Jx=r(Wc);Ly=n(Jx,"FlaxRobertaForSequenceClassification"),Jx.forEach(t),Qy=n(wc," is supported by this "),wr=a(wc,"A",{href:!0,rel:!0});var zx=r(wr);Oy=n(zx,"example script"),zx.forEach(t),Dy=n(wc," and "),Mr=a(wc,"A",{href:!0,rel:!0});var Cx=r(Mr);Yy=n(Cx,"notebook"),Cx.forEach(t),Hy=n(wc,"."),wc.forEach(t),Ky=h(bt),jh=a(bt,"LI",{});var Ix=r(jh);Zc=a(Ix,"A",{href:!0});var Ux=r(Zc);ev=n(Ux,"Text classification task guide"),Ux.forEach(t),Ix.forEach(t),bt.forEach(t),wg=h(l),k($r.$$.fragment,l),Mg=h(l),xt=a(l,"UL",{});var Vo=r(xt);Jo=a(Vo,"LI",{});var Mc=r(Jo);Ac=a(Mc,"A",{href:!0});var qx=r(Ac);tv=n(qx,"RobertaForTokenClassification"),qx.forEach(t),ov=n(Mc," is supported by this "),Fr=a(Mc,"A",{href:!0,rel:!0});var Nx=r(Fr);nv=n(Nx,"example script"),Nx.forEach(t),sv=n(Mc," and "),Rr=a(Mc,"A",{href:!0,rel:!0});var Wx=r(Rr);av=n(Wx,"notebook"),Wx.forEach(t),rv=n(Mc,"."),Mc.forEach(t),lv=h(Vo),zo=a(Vo,"LI",{});var $c=r(zo);Bc=a($c,"A",{href:!0});var Zx=r(Bc);iv=n(Zx,"TFRobertaForTokenClassification"),Zx.forEach(t),dv=n($c," is supported by this "),Er=a($c,"A",{href:!0,rel:!0});var Ax=r(Er);cv=n(Ax,"example script"),Ax.forEach(t),pv=n($c," and "),xr=a($c,"A",{href:!0,rel:!0});var Bx=r(xr);hv=n(Bx,"notebook"),Bx.forEach(t),uv=n($c,"."),$c.forEach(t),mv=h(Vo),as=a(Vo,"LI",{});var fg=r(as);Gc=a(fg,"A",{href:!0});var Gx=r(Gc);fv=n(Gx,"FlaxRobertaForTokenClassification"),Gx.forEach(t),gv=n(fg," is supported by this "),jr=a(fg,"A",{href:!0,rel:!0});var Vx=r(jr);_v=n(Vx,"example script"),Vx.forEach(t),bv=n(fg,"."),fg.forEach(t),yv=h(Vo),Vc=a(Vo,"LI",{});var yx=r(Vc);Jr=a(yx,"A",{href:!0,rel:!0});var Sx=r(Jr);vv=n(Sx,"Token classification"),Sx.forEach(t),Tv=n(yx," chapter of the \u{1F917} Hugging Face Course."),yx.forEach(t),kv=h(Vo),Jh=a(Vo,"LI",{});var Px=r(Jh);Sc=a(Px,"A",{href:!0});var Xx=r(Sc);wv=n(Xx,"Token classification task guide"),Xx.forEach(t),Px.forEach(t),Vo.forEach(t),$g=h(l),k(zr.$$.fragment,l),Fg=h(l),yt=a(l,"UL",{});var lo=r(yt);Cr=a(lo,"LI",{});var F_=r(Cr);Mv=n(F_,"A blog on "),Ir=a(F_,"A",{href:!0,rel:!0});var Lx=r(Ir);$v=n(Lx,"How to train a new language model from scratch using Transformers and Tokenizers"),Lx.forEach(t),Fv=n(F_," with RoBERTa."),F_.forEach(t),Rv=h(lo),Co=a(lo,"LI",{});var Fc=r(Co);Pc=a(Fc,"A",{href:!0});var Qx=r(Pc);Ev=n(Qx,"RobertaForMaskedLM"),Qx.forEach(t),xv=n(Fc," is supported by this "),Ur=a(Fc,"A",{href:!0,rel:!0});var Ox=r(Ur);jv=n(Ox,"example script"),Ox.forEach(t),Jv=n(Fc," and "),qr=a(Fc,"A",{href:!0,rel:!0});var Dx=r(qr);zv=n(Dx,"notebook"),Dx.forEach(t),Cv=n(Fc,"."),Fc.forEach(t),Iv=h(lo),Io=a(lo,"LI",{});var Rc=r(Io);Xc=a(Rc,"A",{href:!0});var Yx=r(Xc);Uv=n(Yx,"TFRobertaForMaskedLM"),Yx.forEach(t),qv=n(Rc," is supported by this "),Nr=a(Rc,"A",{href:!0,rel:!0});var Hx=r(Nr);Nv=n(Hx,"example script"),Hx.forEach(t),Wv=n(Rc," and "),Wr=a(Rc,"A",{href:!0,rel:!0});var Kx=r(Wr);Zv=n(Kx,"notebook"),Kx.forEach(t),Av=n(Rc,"."),Rc.forEach(t),Bv=h(lo),Uo=a(lo,"LI",{});var Ec=r(Uo);Lc=a(Ec,"A",{href:!0});var ej=r(Lc);Gv=n(ej,"FlaxRobertaForMaskedLM"),ej.forEach(t),Vv=n(Ec," is supported by this "),Zr=a(Ec,"A",{href:!0,rel:!0});var tj=r(Zr);Sv=n(tj,"example script"),tj.forEach(t),Pv=n(Ec," and "),Ar=a(Ec,"A",{href:!0,rel:!0});var oj=r(Ar);Xv=n(oj,"notebook"),oj.forEach(t),Lv=n(Ec,"."),Ec.forEach(t),Qv=h(lo),Qc=a(lo,"LI",{});var vx=r(Qc);Br=a(vx,"A",{href:!0,rel:!0});var nj=r(Br);Ov=n(nj,"Masked language modeling"),nj.forEach(t),Dv=n(vx," chapter of the \u{1F917} Hugging Face Course."),vx.forEach(t),Yv=h(lo),zh=a(lo,"LI",{});var sj=r(zh);Oc=a(sj,"A",{href:!0});var aj=r(Oc);Hv=n(aj,"Masked language modeling task guide"),aj.forEach(t),sj.forEach(t),lo.forEach(t),Rg=h(l),k(Gr.$$.fragment,l),Eg=h(l),vt=a(l,"UL",{});var io=r(vt);Vr=a(io,"LI",{});var R_=r(Vr);Kv=n(R_,"A blog on "),Sr=a(R_,"A",{href:!0,rel:!0});var rj=r(Sr);eT=n(rj,"Accelerated Inference with Optimum and Transformers Pipelines"),rj.forEach(t),tT=n(R_," with RoBERTa for question answering."),R_.forEach(t),oT=h(io),qo=a(io,"LI",{});var xc=r(qo);Dc=a(xc,"A",{href:!0});var lj=r(Dc);nT=n(lj,"RobertaForQuestionAnswering"),lj.forEach(t),sT=n(xc," is supported by this "),Pr=a(xc,"A",{href:!0,rel:!0});var ij=r(Pr);aT=n(ij,"example script"),ij.forEach(t),rT=n(xc," and "),Xr=a(xc,"A",{href:!0,rel:!0});var dj=r(Xr);lT=n(dj,"notebook"),dj.forEach(t),iT=n(xc,"."),xc.forEach(t),dT=h(io),No=a(io,"LI",{});var jc=r(No);Yc=a(jc,"A",{href:!0});var cj=r(Yc);cT=n(cj,"TFRobertaForQuestionAnswering"),cj.forEach(t),pT=n(jc," is supported by this "),Lr=a(jc,"A",{href:!0,rel:!0});var pj=r(Lr);hT=n(pj,"example script"),pj.forEach(t),uT=n(jc," and "),Qr=a(jc,"A",{href:!0,rel:!0});var hj=r(Qr);mT=n(hj,"notebook"),hj.forEach(t),fT=n(jc,"."),jc.forEach(t),gT=h(io),rs=a(io,"LI",{});var gg=r(rs);Hc=a(gg,"A",{href:!0});var uj=r(Hc);_T=n(uj,"FlaxRobertaForQuestionAnswering"),uj.forEach(t),bT=n(gg," is supported by this "),Or=a(gg,"A",{href:!0,rel:!0});var mj=r(Or);yT=n(mj,"example script"),mj.forEach(t),vT=n(gg,"."),gg.forEach(t),TT=h(io),Kc=a(io,"LI",{});var Tx=r(Kc);Dr=a(Tx,"A",{href:!0,rel:!0});var fj=r(Dr);kT=n(fj,"Question answering"),fj.forEach(t),wT=n(Tx," chapter of the \u{1F917} Hugging Face Course."),Tx.forEach(t),MT=h(io),Ch=a(io,"LI",{});var gj=r(Ch);ep=a(gj,"A",{href:!0});var _j=r(ep);$T=n(_j,"Question answering task guide"),_j.forEach(t),gj.forEach(t),io.forEach(t),xg=h(l),tp=a(l,"P",{});var bj=r(tp);Ih=a(bj,"STRONG",{});var yj=r(Ih);FT=n(yj,"Multiple choice"),yj.forEach(t),bj.forEach(t),jg=h(l),Wo=a(l,"UL",{});var Dp=r(Wo);Zo=a(Dp,"LI",{});var Jc=r(Zo);op=a(Jc,"A",{href:!0});var vj=r(op);RT=n(vj,"RobertaForMultipleChoice"),vj.forEach(t),ET=n(Jc," is supported by this "),Yr=a(Jc,"A",{href:!0,rel:!0});var Tj=r(Yr);xT=n(Tj,"example script"),Tj.forEach(t),jT=n(Jc," and "),Hr=a(Jc,"A",{href:!0,rel:!0});var kj=r(Hr);JT=n(kj,"notebook"),kj.forEach(t),zT=n(Jc,"."),Jc.forEach(t),CT=h(Dp),Ao=a(Dp,"LI",{});var zc=r(Ao);np=a(zc,"A",{href:!0});var wj=r(np);IT=n(wj,"TFRobertaForMultipleChoice"),wj.forEach(t),UT=n(zc," is supported by this "),Kr=a(zc,"A",{href:!0,rel:!0});var Mj=r(Kr);qT=n(Mj,"example script"),Mj.forEach(t),NT=n(zc," and "),el=a(zc,"A",{href:!0,rel:!0});var $j=r(el);WT=n($j,"notebook"),$j.forEach(t),ZT=n(zc,"."),zc.forEach(t),AT=h(Dp),Uh=a(Dp,"LI",{});var Fj=r(Uh);sp=a(Fj,"A",{href:!0});var Rj=r(sp);BT=n(Rj,"Multiple choice task guide"),Rj.forEach(t),Fj.forEach(t),Dp.forEach(t),Jg=h(l),nn=a(l,"H2",{class:!0});var E_=r(nn);ls=a(E_,"A",{id:!0,class:!0,href:!0});var Ej=r(ls);qh=a(Ej,"SPAN",{});var xj=r(qh);k(tl.$$.fragment,xj),xj.forEach(t),Ej.forEach(t),GT=h(E_),Nh=a(E_,"SPAN",{});var jj=r(Nh);VT=n(jj,"RobertaConfig"),jj.forEach(t),E_.forEach(t),zg=h(l),Vt=a(l,"DIV",{class:!0});var Wa=r(Vt);k(ol.$$.fragment,Wa),ST=h(Wa),_o=a(Wa,"P",{});var Za=r(_o);PT=n(Za,"This is the configuration class to store the configuration of a "),ap=a(Za,"A",{href:!0});var Jj=r(ap);XT=n(Jj,"RobertaModel"),Jj.forEach(t),LT=n(Za," or a "),rp=a(Za,"A",{href:!0});var zj=r(rp);QT=n(zj,"TFRobertaModel"),zj.forEach(t),OT=n(Za,`. 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
`),nl=a(Za,"A",{href:!0,rel:!0});var Cj=r(nl);DT=n(Cj,"roberta-base"),Cj.forEach(t),YT=n(Za," architecture."),Za.forEach(t),HT=h(Wa),sn=a(Wa,"P",{});var Yp=r(sn);KT=n(Yp,"Configuration objects inherit from "),lp=a(Yp,"A",{href:!0});var Ij=r(lp);ek=n(Ij,"PretrainedConfig"),Ij.forEach(t),tk=n(Yp,` and can be used to control the model outputs. Read the
documentation from `),ip=a(Yp,"A",{href:!0});var Uj=r(ip);ok=n(Uj,"PretrainedConfig"),Uj.forEach(t),nk=n(Yp," for more information."),Yp.forEach(t),sk=h(Wa),k(is.$$.fragment,Wa),Wa.forEach(t),Cg=h(l),an=a(l,"H2",{class:!0});var x_=r(an);ds=a(x_,"A",{id:!0,class:!0,href:!0});var qj=r(ds);Wh=a(qj,"SPAN",{});var Nj=r(Wh);k(sl.$$.fragment,Nj),Nj.forEach(t),qj.forEach(t),ak=h(x_),Zh=a(x_,"SPAN",{});var Wj=r(Zh);rk=n(Wj,"RobertaTokenizer"),Wj.forEach(t),x_.forEach(t),Ig=h(l),We=a(l,"DIV",{class:!0});var Pe=r(We);k(al.$$.fragment,Pe),lk=h(Pe),Ah=a(Pe,"P",{});var Zj=r(Ah);ik=n(Zj,"Constructs a RoBERTa tokenizer, derived from the GPT-2 tokenizer, using byte-level Byte-Pair-Encoding."),Zj.forEach(t),dk=h(Pe),Bh=a(Pe,"P",{});var Aj=r(Bh);ck=n(Aj,"This tokenizer has been trained to treat spaces like parts of the tokens (a bit like sentencepiece) so a word will"),Aj.forEach(t),pk=h(Pe),k(cs.$$.fragment,Pe),hk=h(Pe),rl=a(Pe,"P",{});var j_=r(rl);uk=n(j_,"You can get around that behavior by passing "),Gh=a(j_,"CODE",{});var Bj=r(Gh);mk=n(Bj,"add_prefix_space=True"),Bj.forEach(t),fk=n(j_,` 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.`),j_.forEach(t),gk=h(Pe),k(ps.$$.fragment,Pe),_k=h(Pe),ll=a(Pe,"P",{});var J_=r(ll);bk=n(J_,"This tokenizer inherits from "),dp=a(J_,"A",{href:!0});var Gj=r(dp);yk=n(Gj,"PreTrainedTokenizer"),Gj.forEach(t),vk=n(J_,` which contains most of the main methods. Users should refer to
this superclass for more information regarding those methods.`),J_.forEach(t),Tk=h(Pe),Bo=a(Pe,"DIV",{class:!0});var Hp=r(Bo);k(il.$$.fragment,Hp),kk=h(Hp),Vh=a(Hp,"P",{});var Vj=r(Vh);wk=n(Vj,`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:`),Vj.forEach(t),Mk=h(Hp),dl=a(Hp,"UL",{});var z_=r(dl);cp=a(z_,"LI",{});var kx=r(cp);$k=n(kx,"single sequence: "),Sh=a(kx,"CODE",{});var Sj=r(Sh);Fk=n(Sj,"<s> X </s>"),Sj.forEach(t),kx.forEach(t),Rk=h(z_),pp=a(z_,"LI",{});var wx=r(pp);Ek=n(wx,"pair of sequences: "),Ph=a(wx,"CODE",{});var Pj=r(Ph);xk=n(Pj,"<s> A </s></s> B </s>"),Pj.forEach(t),wx.forEach(t),z_.forEach(t),Hp.forEach(t),jk=h(Pe),hs=a(Pe,"DIV",{class:!0});var C_=r(hs);k(cl.$$.fragment,C_),Jk=h(C_),pl=a(C_,"P",{});var I_=r(pl);zk=n(I_,`Retrieve sequence ids from a token list that has no special tokens added. This method is called when adding
special tokens using the tokenizer `),Xh=a(I_,"CODE",{});var Xj=r(Xh);Ck=n(Xj,"prepare_for_model"),Xj.forEach(t),Ik=n(I_," method."),I_.forEach(t),C_.forEach(t),Uk=h(Pe),us=a(Pe,"DIV",{class:!0});var U_=r(us);k(hl.$$.fragment,U_),qk=h(U_),Lh=a(U_,"P",{});var Lj=r(Lh);Nk=n(Lj,`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.`),Lj.forEach(t),U_.forEach(t),Wk=h(Pe),hp=a(Pe,"DIV",{class:!0});var Qj=r(hp);k(ul.$$.fragment,Qj),Qj.forEach(t),Pe.forEach(t),Ug=h(l),rn=a(l,"H2",{class:!0});var q_=r(rn);ms=a(q_,"A",{id:!0,class:!0,href:!0});var Oj=r(ms);Qh=a(Oj,"SPAN",{});var Dj=r(Qh);k(ml.$$.fragment,Dj),Dj.forEach(t),Oj.forEach(t),Zk=h(q_),Oh=a(q_,"SPAN",{});var Yj=r(Oh);Ak=n(Yj,"RobertaTokenizerFast"),Yj.forEach(t),q_.forEach(t),qg=h(l),tt=a(l,"DIV",{class:!0});var Tt=r(tt);k(fl.$$.fragment,Tt),Bk=h(Tt),gl=a(Tt,"P",{});var N_=r(gl);Gk=n(N_,"Construct a \u201Cfast\u201D RoBERTa tokenizer (backed by HuggingFace\u2019s "),Dh=a(N_,"EM",{});var Hj=r(Dh);Vk=n(Hj,"tokenizers"),Hj.forEach(t),Sk=n(N_,` library), derived from the GPT-2
tokenizer, using byte-level Byte-Pair-Encoding.`),N_.forEach(t),Pk=h(Tt),Yh=a(Tt,"P",{});var Kj=r(Yh);Xk=n(Kj,"This tokenizer has been trained to treat spaces like parts of the tokens (a bit like sentencepiece) so a word will"),Kj.forEach(t),Lk=h(Tt),k(fs.$$.fragment,Tt),Qk=h(Tt),_l=a(Tt,"P",{});var W_=r(_l);Ok=n(W_,"You can get around that behavior by passing "),Hh=a(W_,"CODE",{});var e3=r(Hh);Dk=n(e3,"add_prefix_space=True"),e3.forEach(t),Yk=n(W_,` 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.`),W_.forEach(t),Hk=h(Tt),k(gs.$$.fragment,Tt),Kk=h(Tt),bl=a(Tt,"P",{});var Z_=r(bl);ew=n(Z_,"This tokenizer inherits from "),up=a(Z_,"A",{href:!0});var t3=r(up);tw=n(t3,"PreTrainedTokenizerFast"),t3.forEach(t),ow=n(Z_,` which contains most of the main methods. Users should
refer to this superclass for more information regarding those methods.`),Z_.forEach(t),nw=h(Tt),mp=a(Tt,"DIV",{class:!0});var o3=r(mp);k(yl.$$.fragment,o3),o3.forEach(t),Tt.forEach(t),Ng=h(l),ln=a(l,"H2",{class:!0});var A_=r(ln);_s=a(A_,"A",{id:!0,class:!0,href:!0});var n3=r(_s);Kh=a(n3,"SPAN",{});var s3=r(Kh);k(vl.$$.fragment,s3),s3.forEach(t),n3.forEach(t),sw=h(A_),eu=a(A_,"SPAN",{});var a3=r(eu);aw=n(a3,"RobertaModel"),a3.forEach(t),A_.forEach(t),Wg=h(l),ot=a(l,"DIV",{class:!0});var kt=r(ot);k(Tl.$$.fragment,kt),rw=h(kt),tu=a(kt,"P",{});var r3=r(tu);lw=n(r3,"The bare RoBERTa Model transformer outputting raw hidden-states without any specific head on top."),r3.forEach(t),iw=h(kt),kl=a(kt,"P",{});var B_=r(kl);dw=n(B_,"This model inherits from "),fp=a(B_,"A",{href:!0});var l3=r(fp);cw=n(l3,"PreTrainedModel"),l3.forEach(t),pw=n(B_,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),B_.forEach(t),hw=h(kt),wl=a(kt,"P",{});var G_=r(wl);uw=n(G_,"This model is also a PyTorch "),Ml=a(G_,"A",{href:!0,rel:!0});var i3=r(Ml);mw=n(i3,"torch.nn.Module"),i3.forEach(t),fw=n(G_,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),G_.forEach(t),gw=h(kt),$l=a(kt,"P",{});var V_=r($l);_w=n(V_,`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 `),ou=a(V_,"EM",{});var d3=r(ou);bw=n(d3,`Attention is
all you need`),d3.forEach(t),yw=n(V_,`_ by Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N. Gomez, Lukasz
Kaiser and Illia Polosukhin.`),V_.forEach(t),vw=h(kt),pt=a(kt,"P",{});var Ut=r(pt);Tw=n(Ut,"To behave as an decoder the model needs to be initialized with the "),nu=a(Ut,"CODE",{});var c3=r(nu);kw=n(c3,"is_decoder"),c3.forEach(t),ww=n(Ut,` argument of the configuration set
to `),su=a(Ut,"CODE",{});var p3=r(su);Mw=n(p3,"True"),p3.forEach(t),$w=n(Ut,". To be used in a Seq2Seq model, the model needs to initialized with both "),au=a(Ut,"CODE",{});var h3=r(au);Fw=n(h3,"is_decoder"),h3.forEach(t),Rw=n(Ut,` argument and
`),ru=a(Ut,"CODE",{});var u3=r(ru);Ew=n(u3,"add_cross_attention"),u3.forEach(t),xw=n(Ut," set to "),lu=a(Ut,"CODE",{});var m3=r(lu);jw=n(m3,"True"),m3.forEach(t),Jw=n(Ut,"; an "),iu=a(Ut,"CODE",{});var f3=r(iu);zw=n(f3,"encoder_hidden_states"),f3.forEach(t),Cw=n(Ut," is then expected as an input to the forward pass."),Ut.forEach(t),Iw=h(kt),bs=a(kt,"P",{});var _g=r(bs);Uw=n(_g,".. _"),du=a(_g,"EM",{});var g3=r(du);qw=n(g3,"Attention is all you need"),g3.forEach(t),Nw=n(_g,": "),Fl=a(_g,"A",{href:!0,rel:!0});var _3=r(Fl);Ww=n(_3,"https://arxiv.org/abs/1706.03762"),_3.forEach(t),_g.forEach(t),Zw=h(kt),Pt=a(kt,"DIV",{class:!0});var Aa=r(Pt);k(Rl.$$.fragment,Aa),Aw=h(Aa),dn=a(Aa,"P",{});var Kp=r(dn);Bw=n(Kp,"The "),gp=a(Kp,"A",{href:!0});var b3=r(gp);Gw=n(b3,"RobertaModel"),b3.forEach(t),Vw=n(Kp," forward method, overrides the "),cu=a(Kp,"CODE",{});var y3=r(cu);Sw=n(y3,"__call__"),y3.forEach(t),Pw=n(Kp," special method."),Kp.forEach(t),Xw=h(Aa),k(ys.$$.fragment,Aa),Lw=h(Aa),k(vs.$$.fragment,Aa),Aa.forEach(t),kt.forEach(t),Zg=h(l),cn=a(l,"H2",{class:!0});var S_=r(cn);Ts=a(S_,"A",{id:!0,class:!0,href:!0});var v3=r(Ts);pu=a(v3,"SPAN",{});var T3=r(pu);k(El.$$.fragment,T3),T3.forEach(t),v3.forEach(t),Qw=h(S_),hu=a(S_,"SPAN",{});var k3=r(hu);Ow=n(k3,"RobertaForCausalLM"),k3.forEach(t),S_.forEach(t),Ag=h(l),wt=a(l,"DIV",{class:!0});var So=r(wt);k(xl.$$.fragment,So),Dw=h(So),jl=a(So,"P",{});var P_=r(jl);Yw=n(P_,"RoBERTa Model with a "),uu=a(P_,"CODE",{});var w3=r(uu);Hw=n(w3,"language modeling"),w3.forEach(t),Kw=n(P_," head on top for CLM fine-tuning."),P_.forEach(t),eM=h(So),Jl=a(So,"P",{});var X_=r(Jl);tM=n(X_,"This model inherits from "),_p=a(X_,"A",{href:!0});var M3=r(_p);oM=n(M3,"PreTrainedModel"),M3.forEach(t),nM=n(X_,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),X_.forEach(t),sM=h(So),zl=a(So,"P",{});var L_=r(zl);aM=n(L_,"This model is also a PyTorch "),Cl=a(L_,"A",{href:!0,rel:!0});var $3=r(Cl);rM=n($3,"torch.nn.Module"),$3.forEach(t),lM=n(L_,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),L_.forEach(t),iM=h(So),Xt=a(So,"DIV",{class:!0});var Ba=r(Xt);k(Il.$$.fragment,Ba),dM=h(Ba),pn=a(Ba,"P",{});var eh=r(pn);cM=n(eh,"The "),bp=a(eh,"A",{href:!0});var F3=r(bp);pM=n(F3,"RobertaForCausalLM"),F3.forEach(t),hM=n(eh," forward method, overrides the "),mu=a(eh,"CODE",{});var R3=r(mu);uM=n(R3,"__call__"),R3.forEach(t),mM=n(eh," special method."),eh.forEach(t),fM=h(Ba),k(ks.$$.fragment,Ba),gM=h(Ba),k(ws.$$.fragment,Ba),Ba.forEach(t),So.forEach(t),Bg=h(l),hn=a(l,"H2",{class:!0});var Q_=r(hn);Ms=a(Q_,"A",{id:!0,class:!0,href:!0});var E3=r(Ms);fu=a(E3,"SPAN",{});var x3=r(fu);k(Ul.$$.fragment,x3),x3.forEach(t),E3.forEach(t),_M=h(Q_),gu=a(Q_,"SPAN",{});var j3=r(gu);bM=n(j3,"RobertaForMaskedLM"),j3.forEach(t),Q_.forEach(t),Gg=h(l),Mt=a(l,"DIV",{class:!0});var Po=r(Mt);k(ql.$$.fragment,Po),yM=h(Po),Nl=a(Po,"P",{});var O_=r(Nl);vM=n(O_,"RoBERTa Model with a "),_u=a(O_,"CODE",{});var J3=r(_u);TM=n(J3,"language modeling"),J3.forEach(t),kM=n(O_," head on top."),O_.forEach(t),wM=h(Po),Wl=a(Po,"P",{});var D_=r(Wl);MM=n(D_,"This model inherits from "),yp=a(D_,"A",{href:!0});var z3=r(yp);$M=n(z3,"PreTrainedModel"),z3.forEach(t),FM=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),RM=h(Po),Zl=a(Po,"P",{});var Y_=r(Zl);EM=n(Y_,"This model is also a PyTorch "),Al=a(Y_,"A",{href:!0,rel:!0});var C3=r(Al);xM=n(C3,"torch.nn.Module"),C3.forEach(t),jM=n(Y_,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Y_.forEach(t),JM=h(Po),Lt=a(Po,"DIV",{class:!0});var Ga=r(Lt);k(Bl.$$.fragment,Ga),zM=h(Ga),un=a(Ga,"P",{});var th=r(un);CM=n(th,"The "),vp=a(th,"A",{href:!0});var I3=r(vp);IM=n(I3,"RobertaForMaskedLM"),I3.forEach(t),UM=n(th," forward method, overrides the "),bu=a(th,"CODE",{});var U3=r(bu);qM=n(U3,"__call__"),U3.forEach(t),NM=n(th," special method."),th.forEach(t),WM=h(Ga),k($s.$$.fragment,Ga),ZM=h(Ga),k(Fs.$$.fragment,Ga),Ga.forEach(t),Po.forEach(t),Vg=h(l),mn=a(l,"H2",{class:!0});var H_=r(mn);Rs=a(H_,"A",{id:!0,class:!0,href:!0});var q3=r(Rs);yu=a(q3,"SPAN",{});var N3=r(yu);k(Gl.$$.fragment,N3),N3.forEach(t),q3.forEach(t),AM=h(H_),vu=a(H_,"SPAN",{});var W3=r(vu);BM=n(W3,"RobertaForSequenceClassification"),W3.forEach(t),H_.forEach(t),Sg=h(l),$t=a(l,"DIV",{class:!0});var Xo=r($t);k(Vl.$$.fragment,Xo),GM=h(Xo),Tu=a(Xo,"P",{});var Z3=r(Tu);VM=n(Z3,`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.`),Z3.forEach(t),SM=h(Xo),Sl=a(Xo,"P",{});var K_=r(Sl);PM=n(K_,"This model inherits from "),Tp=a(K_,"A",{href:!0});var A3=r(Tp);XM=n(A3,"PreTrainedModel"),A3.forEach(t),LM=n(K_,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),K_.forEach(t),QM=h(Xo),Pl=a(Xo,"P",{});var eb=r(Pl);OM=n(eb,"This model is also a PyTorch "),Xl=a(eb,"A",{href:!0,rel:!0});var B3=r(Xl);DM=n(B3,"torch.nn.Module"),B3.forEach(t),YM=n(eb,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),eb.forEach(t),HM=h(Xo),jt=a(Xo,"DIV",{class:!0});var Lo=r(jt);k(Ll.$$.fragment,Lo),KM=h(Lo),fn=a(Lo,"P",{});var oh=r(fn);e2=n(oh,"The "),kp=a(oh,"A",{href:!0});var G3=r(kp);t2=n(G3,"RobertaForSequenceClassification"),G3.forEach(t),o2=n(oh," forward method, overrides the "),ku=a(oh,"CODE",{});var V3=r(ku);n2=n(V3,"__call__"),V3.forEach(t),s2=n(oh," special method."),oh.forEach(t),a2=h(Lo),k(Es.$$.fragment,Lo),r2=h(Lo),k(xs.$$.fragment,Lo),l2=h(Lo),k(js.$$.fragment,Lo),Lo.forEach(t),Xo.forEach(t),Pg=h(l),gn=a(l,"H2",{class:!0});var tb=r(gn);Js=a(tb,"A",{id:!0,class:!0,href:!0});var S3=r(Js);wu=a(S3,"SPAN",{});var P3=r(wu);k(Ql.$$.fragment,P3),P3.forEach(t),S3.forEach(t),i2=h(tb),Mu=a(tb,"SPAN",{});var X3=r(Mu);d2=n(X3,"RobertaForMultipleChoice"),X3.forEach(t),tb.forEach(t),Xg=h(l),Ft=a(l,"DIV",{class:!0});var Qo=r(Ft);k(Ol.$$.fragment,Qo),c2=h(Qo),$u=a(Qo,"P",{});var L3=r($u);p2=n(L3,`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.`),L3.forEach(t),h2=h(Qo),Dl=a(Qo,"P",{});var ob=r(Dl);u2=n(ob,"This model inherits from "),wp=a(ob,"A",{href:!0});var Q3=r(wp);m2=n(Q3,"PreTrainedModel"),Q3.forEach(t),f2=n(ob,`. 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.)`),ob.forEach(t),g2=h(Qo),Yl=a(Qo,"P",{});var nb=r(Yl);_2=n(nb,"This model is also a PyTorch "),Hl=a(nb,"A",{href:!0,rel:!0});var O3=r(Hl);b2=n(O3,"torch.nn.Module"),O3.forEach(t),y2=n(nb,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),nb.forEach(t),v2=h(Qo),Qt=a(Qo,"DIV",{class:!0});var Va=r(Qt);k(Kl.$$.fragment,Va),T2=h(Va),_n=a(Va,"P",{});var nh=r(_n);k2=n(nh,"The "),Mp=a(nh,"A",{href:!0});var D3=r(Mp);w2=n(D3,"RobertaForMultipleChoice"),D3.forEach(t),M2=n(nh," forward method, overrides the "),Fu=a(nh,"CODE",{});var Y3=r(Fu);$2=n(Y3,"__call__"),Y3.forEach(t),F2=n(nh," special method."),nh.forEach(t),R2=h(Va),k(zs.$$.fragment,Va),E2=h(Va),k(Cs.$$.fragment,Va),Va.forEach(t),Qo.forEach(t),Lg=h(l),bn=a(l,"H2",{class:!0});var sb=r(bn);Is=a(sb,"A",{id:!0,class:!0,href:!0});var H3=r(Is);Ru=a(H3,"SPAN",{});var K3=r(Ru);k(ei.$$.fragment,K3),K3.forEach(t),H3.forEach(t),x2=h(sb),Eu=a(sb,"SPAN",{});var eJ=r(Eu);j2=n(eJ,"RobertaForTokenClassification"),eJ.forEach(t),sb.forEach(t),Qg=h(l),Rt=a(l,"DIV",{class:!0});var Oo=r(Rt);k(ti.$$.fragment,Oo),J2=h(Oo),xu=a(Oo,"P",{});var tJ=r(xu);z2=n(tJ,`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.`),tJ.forEach(t),C2=h(Oo),oi=a(Oo,"P",{});var ab=r(oi);I2=n(ab,"This model inherits from "),$p=a(ab,"A",{href:!0});var oJ=r($p);U2=n(oJ,"PreTrainedModel"),oJ.forEach(t),q2=n(ab,`. 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.)`),ab.forEach(t),N2=h(Oo),ni=a(Oo,"P",{});var rb=r(ni);W2=n(rb,"This model is also a PyTorch "),si=a(rb,"A",{href:!0,rel:!0});var nJ=r(si);Z2=n(nJ,"torch.nn.Module"),nJ.forEach(t),A2=n(rb,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),rb.forEach(t),B2=h(Oo),Ot=a(Oo,"DIV",{class:!0});var Sa=r(Ot);k(ai.$$.fragment,Sa),G2=h(Sa),yn=a(Sa,"P",{});var sh=r(yn);V2=n(sh,"The "),Fp=a(sh,"A",{href:!0});var sJ=r(Fp);S2=n(sJ,"RobertaForTokenClassification"),sJ.forEach(t),P2=n(sh," forward method, overrides the "),ju=a(sh,"CODE",{});var aJ=r(ju);X2=n(aJ,"__call__"),aJ.forEach(t),L2=n(sh," special method."),sh.forEach(t),Q2=h(Sa),k(Us.$$.fragment,Sa),O2=h(Sa),k(qs.$$.fragment,Sa),Sa.forEach(t),Oo.forEach(t),Og=h(l),vn=a(l,"H2",{class:!0});var lb=r(vn);Ns=a(lb,"A",{id:!0,class:!0,href:!0});var rJ=r(Ns);Ju=a(rJ,"SPAN",{});var lJ=r(Ju);k(ri.$$.fragment,lJ),lJ.forEach(t),rJ.forEach(t),D2=h(lb),zu=a(lb,"SPAN",{});var iJ=r(zu);Y2=n(iJ,"RobertaForQuestionAnswering"),iJ.forEach(t),lb.forEach(t),Dg=h(l),Et=a(l,"DIV",{class:!0});var Do=r(Et);k(li.$$.fragment,Do),H2=h(Do),Tn=a(Do,"P",{});var ah=r(Tn);K2=n(ah,`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 `),Cu=a(ah,"CODE",{});var dJ=r(Cu);e1=n(dJ,"span start logits"),dJ.forEach(t),t1=n(ah," and "),Iu=a(ah,"CODE",{});var cJ=r(Iu);o1=n(cJ,"span end logits"),cJ.forEach(t),n1=n(ah,")."),ah.forEach(t),s1=h(Do),ii=a(Do,"P",{});var ib=r(ii);a1=n(ib,"This model inherits from "),Rp=a(ib,"A",{href:!0});var pJ=r(Rp);r1=n(pJ,"PreTrainedModel"),pJ.forEach(t),l1=n(ib,`. 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.)`),ib.forEach(t),i1=h(Do),di=a(Do,"P",{});var db=r(di);d1=n(db,"This model is also a PyTorch "),ci=a(db,"A",{href:!0,rel:!0});var hJ=r(ci);c1=n(hJ,"torch.nn.Module"),hJ.forEach(t),p1=n(db,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),db.forEach(t),h1=h(Do),Dt=a(Do,"DIV",{class:!0});var Pa=r(Dt);k(pi.$$.fragment,Pa),u1=h(Pa),kn=a(Pa,"P",{});var rh=r(kn);m1=n(rh,"The "),Ep=a(rh,"A",{href:!0});var uJ=r(Ep);f1=n(uJ,"RobertaForQuestionAnswering"),uJ.forEach(t),g1=n(rh," forward method, overrides the "),Uu=a(rh,"CODE",{});var mJ=r(Uu);_1=n(mJ,"__call__"),mJ.forEach(t),b1=n(rh," special method."),rh.forEach(t),y1=h(Pa),k(Ws.$$.fragment,Pa),v1=h(Pa),k(Zs.$$.fragment,Pa),Pa.forEach(t),Do.forEach(t),Yg=h(l),wn=a(l,"H2",{class:!0});var cb=r(wn);As=a(cb,"A",{id:!0,class:!0,href:!0});var fJ=r(As);qu=a(fJ,"SPAN",{});var gJ=r(qu);k(hi.$$.fragment,gJ),gJ.forEach(t),fJ.forEach(t),T1=h(cb),Nu=a(cb,"SPAN",{});var _J=r(Nu);k1=n(_J,"TFRobertaModel"),_J.forEach(t),cb.forEach(t),Hg=h(l),ht=a(l,"DIV",{class:!0});var co=r(ht);k(ui.$$.fragment,co),w1=h(co),Wu=a(co,"P",{});var bJ=r(Wu);M1=n(bJ,"The bare RoBERTa Model transformer outputting raw hidden-states without any specific head on top."),bJ.forEach(t),$1=h(co),mi=a(co,"P",{});var pb=r(mi);F1=n(pb,"This model inherits from "),xp=a(pb,"A",{href:!0});var yJ=r(xp);R1=n(yJ,"TFPreTrainedModel"),yJ.forEach(t),E1=n(pb,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),pb.forEach(t),x1=h(co),fi=a(co,"P",{});var hb=r(fi);j1=n(hb,"This model is also a "),gi=a(hb,"A",{href:!0,rel:!0});var vJ=r(gi);J1=n(vJ,"tf.keras.Model"),vJ.forEach(t),z1=n(hb,` 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.`),hb.forEach(t),C1=h(co),k(Bs.$$.fragment,co),I1=h(co),Yt=a(co,"DIV",{class:!0});var Xa=r(Yt);k(_i.$$.fragment,Xa),U1=h(Xa),Mn=a(Xa,"P",{});var lh=r(Mn);q1=n(lh,"The "),jp=a(lh,"A",{href:!0});var TJ=r(jp);N1=n(TJ,"TFRobertaModel"),TJ.forEach(t),W1=n(lh," forward method, overrides the "),Zu=a(lh,"CODE",{});var kJ=r(Zu);Z1=n(kJ,"__call__"),kJ.forEach(t),A1=n(lh," special method."),lh.forEach(t),B1=h(Xa),k(Gs.$$.fragment,Xa),G1=h(Xa),k(Vs.$$.fragment,Xa),Xa.forEach(t),co.forEach(t),Kg=h(l),$n=a(l,"H2",{class:!0});var ub=r($n);Ss=a(ub,"A",{id:!0,class:!0,href:!0});var wJ=r(Ss);Au=a(wJ,"SPAN",{});var MJ=r(Au);k(bi.$$.fragment,MJ),MJ.forEach(t),wJ.forEach(t),V1=h(ub),Bu=a(ub,"SPAN",{});var $J=r(Bu);S1=n($J,"TFRobertaForCausalLM"),$J.forEach(t),ub.forEach(t),e_=h(l),Fn=a(l,"DIV",{class:!0});var mb=r(Fn);k(yi.$$.fragment,mb),P1=h(mb),Ht=a(mb,"DIV",{class:!0});var La=r(Ht);k(vi.$$.fragment,La),X1=h(La),Rn=a(La,"P",{});var ih=r(Rn);L1=n(ih,"The "),Jp=a(ih,"A",{href:!0});var FJ=r(Jp);Q1=n(FJ,"TFRobertaForCausalLM"),FJ.forEach(t),O1=n(ih," forward method, overrides the "),Gu=a(ih,"CODE",{});var RJ=r(Gu);D1=n(RJ,"__call__"),RJ.forEach(t),Y1=n(ih," special method."),ih.forEach(t),H1=h(La),k(Ps.$$.fragment,La),K1=h(La),k(Xs.$$.fragment,La),La.forEach(t),mb.forEach(t),t_=h(l),En=a(l,"H2",{class:!0});var fb=r(En);Ls=a(fb,"A",{id:!0,class:!0,href:!0});var EJ=r(Ls);Vu=a(EJ,"SPAN",{});var xJ=r(Vu);k(Ti.$$.fragment,xJ),xJ.forEach(t),EJ.forEach(t),e0=h(fb),Su=a(fb,"SPAN",{});var jJ=r(Su);t0=n(jJ,"TFRobertaForMaskedLM"),jJ.forEach(t),fb.forEach(t),o_=h(l),ut=a(l,"DIV",{class:!0});var po=r(ut);k(ki.$$.fragment,po),o0=h(po),wi=a(po,"P",{});var gb=r(wi);n0=n(gb,"RoBERTa Model with a "),Pu=a(gb,"CODE",{});var JJ=r(Pu);s0=n(JJ,"language modeling"),JJ.forEach(t),a0=n(gb," head on top."),gb.forEach(t),r0=h(po),Mi=a(po,"P",{});var _b=r(Mi);l0=n(_b,"This model inherits from "),zp=a(_b,"A",{href:!0});var zJ=r(zp);i0=n(zJ,"TFPreTrainedModel"),zJ.forEach(t),d0=n(_b,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),_b.forEach(t),c0=h(po),$i=a(po,"P",{});var bb=r($i);p0=n(bb,"This model is also a "),Fi=a(bb,"A",{href:!0,rel:!0});var CJ=r(Fi);h0=n(CJ,"tf.keras.Model"),CJ.forEach(t),u0=n(bb,` 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.`),bb.forEach(t),m0=h(po),k(Qs.$$.fragment,po),f0=h(po),Jt=a(po,"DIV",{class:!0});var Yo=r(Jt);k(Ri.$$.fragment,Yo),g0=h(Yo),xn=a(Yo,"P",{});var dh=r(xn);_0=n(dh,"The "),Cp=a(dh,"A",{href:!0});var IJ=r(Cp);b0=n(IJ,"TFRobertaForMaskedLM"),IJ.forEach(t),y0=n(dh," forward method, overrides the "),Xu=a(dh,"CODE",{});var UJ=r(Xu);v0=n(UJ,"__call__"),UJ.forEach(t),T0=n(dh," special method."),dh.forEach(t),k0=h(Yo),k(Os.$$.fragment,Yo),w0=h(Yo),k(Ds.$$.fragment,Yo),M0=h(Yo),k(Ys.$$.fragment,Yo),Yo.forEach(t),po.forEach(t),n_=h(l),jn=a(l,"H2",{class:!0});var yb=r(jn);Hs=a(yb,"A",{id:!0,class:!0,href:!0});var qJ=r(Hs);Lu=a(qJ,"SPAN",{});var NJ=r(Lu);k(Ei.$$.fragment,NJ),NJ.forEach(t),qJ.forEach(t),$0=h(yb),Qu=a(yb,"SPAN",{});var WJ=r(Qu);F0=n(WJ,"TFRobertaForSequenceClassification"),WJ.forEach(t),yb.forEach(t),s_=h(l),mt=a(l,"DIV",{class:!0});var ho=r(mt);k(xi.$$.fragment,ho),R0=h(ho),Ou=a(ho,"P",{});var ZJ=r(Ou);E0=n(ZJ,`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.`),ZJ.forEach(t),x0=h(ho),ji=a(ho,"P",{});var vb=r(ji);j0=n(vb,"This model inherits from "),Ip=a(vb,"A",{href:!0});var AJ=r(Ip);J0=n(AJ,"TFPreTrainedModel"),AJ.forEach(t),z0=n(vb,`. 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.)`),vb.forEach(t),C0=h(ho),Ji=a(ho,"P",{});var Tb=r(Ji);I0=n(Tb,"This model is also a "),zi=a(Tb,"A",{href:!0,rel:!0});var BJ=r(zi);U0=n(BJ,"tf.keras.Model"),BJ.forEach(t),q0=n(Tb,` 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.`),Tb.forEach(t),N0=h(ho),k(Ks.$$.fragment,ho),W0=h(ho),zt=a(ho,"DIV",{class:!0});var Ho=r(zt);k(Ci.$$.fragment,Ho),Z0=h(Ho),Jn=a(Ho,"P",{});var ch=r(Jn);A0=n(ch,"The "),Up=a(ch,"A",{href:!0});var GJ=r(Up);B0=n(GJ,"TFRobertaForSequenceClassification"),GJ.forEach(t),G0=n(ch," forward method, overrides the "),Du=a(ch,"CODE",{});var VJ=r(Du);V0=n(VJ,"__call__"),VJ.forEach(t),S0=n(ch," special method."),ch.forEach(t),P0=h(Ho),k(ea.$$.fragment,Ho),X0=h(Ho),k(ta.$$.fragment,Ho),L0=h(Ho),k(oa.$$.fragment,Ho),Ho.forEach(t),ho.forEach(t),a_=h(l),zn=a(l,"H2",{class:!0});var kb=r(zn);na=a(kb,"A",{id:!0,class:!0,href:!0});var SJ=r(na);Yu=a(SJ,"SPAN",{});var PJ=r(Yu);k(Ii.$$.fragment,PJ),PJ.forEach(t),SJ.forEach(t),Q0=h(kb),Hu=a(kb,"SPAN",{});var XJ=r(Hu);O0=n(XJ,"TFRobertaForMultipleChoice"),XJ.forEach(t),kb.forEach(t),r_=h(l),ft=a(l,"DIV",{class:!0});var uo=r(ft);k(Ui.$$.fragment,uo),D0=h(uo),Ku=a(uo,"P",{});var LJ=r(Ku);Y0=n(LJ,`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.`),LJ.forEach(t),H0=h(uo),qi=a(uo,"P",{});var wb=r(qi);K0=n(wb,"This model inherits from "),qp=a(wb,"A",{href:!0});var QJ=r(qp);e$=n(QJ,"TFPreTrainedModel"),QJ.forEach(t),t$=n(wb,`. 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.)`),wb.forEach(t),o$=h(uo),Ni=a(uo,"P",{});var Mb=r(Ni);n$=n(Mb,"This model is also a "),Wi=a(Mb,"A",{href:!0,rel:!0});var OJ=r(Wi);s$=n(OJ,"tf.keras.Model"),OJ.forEach(t),a$=n(Mb,` 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.`),Mb.forEach(t),r$=h(uo),k(sa.$$.fragment,uo),l$=h(uo),Kt=a(uo,"DIV",{class:!0});var Qa=r(Kt);k(Zi.$$.fragment,Qa),i$=h(Qa),Cn=a(Qa,"P",{});var ph=r(Cn);d$=n(ph,"The "),Np=a(ph,"A",{href:!0});var DJ=r(Np);c$=n(DJ,"TFRobertaForMultipleChoice"),DJ.forEach(t),p$=n(ph," forward method, overrides the "),em=a(ph,"CODE",{});var YJ=r(em);h$=n(YJ,"__call__"),YJ.forEach(t),u$=n(ph," special method."),ph.forEach(t),m$=h(Qa),k(aa.$$.fragment,Qa),f$=h(Qa),k(ra.$$.fragment,Qa),Qa.forEach(t),uo.forEach(t),l_=h(l),In=a(l,"H2",{class:!0});var $b=r(In);la=a($b,"A",{id:!0,class:!0,href:!0});var HJ=r(la);tm=a(HJ,"SPAN",{});var KJ=r(tm);k(Ai.$$.fragment,KJ),KJ.forEach(t),HJ.forEach(t),g$=h($b),om=a($b,"SPAN",{});var ez=r(om);_$=n(ez,"TFRobertaForTokenClassification"),ez.forEach(t),$b.forEach(t),i_=h(l),gt=a(l,"DIV",{class:!0});var mo=r(gt);k(Bi.$$.fragment,mo),b$=h(mo),nm=a(mo,"P",{});var tz=r(nm);y$=n(tz,`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.`),tz.forEach(t),v$=h(mo),Gi=a(mo,"P",{});var Fb=r(Gi);T$=n(Fb,"This model inherits from "),Wp=a(Fb,"A",{href:!0});var oz=r(Wp);k$=n(oz,"TFPreTrainedModel"),oz.forEach(t),w$=n(Fb,`. 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.)`),Fb.forEach(t),M$=h(mo),Vi=a(mo,"P",{});var Rb=r(Vi);$$=n(Rb,"This model is also a "),Si=a(Rb,"A",{href:!0,rel:!0});var nz=r(Si);F$=n(nz,"tf.keras.Model"),nz.forEach(t),R$=n(Rb,` 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.`),Rb.forEach(t),E$=h(mo),k(ia.$$.fragment,mo),x$=h(mo),Ct=a(mo,"DIV",{class:!0});var Ko=r(Ct);k(Pi.$$.fragment,Ko),j$=h(Ko),Un=a(Ko,"P",{});var hh=r(Un);J$=n(hh,"The "),Zp=a(hh,"A",{href:!0});var sz=r(Zp);z$=n(sz,"TFRobertaForTokenClassification"),sz.forEach(t),C$=n(hh," forward method, overrides the "),sm=a(hh,"CODE",{});var az=r(sm);I$=n(az,"__call__"),az.forEach(t),U$=n(hh," special method."),hh.forEach(t),q$=h(Ko),k(da.$$.fragment,Ko),N$=h(Ko),k(ca.$$.fragment,Ko),W$=h(Ko),k(pa.$$.fragment,Ko),Ko.forEach(t),mo.forEach(t),d_=h(l),qn=a(l,"H2",{class:!0});var Eb=r(qn);ha=a(Eb,"A",{id:!0,class:!0,href:!0});var rz=r(ha);am=a(rz,"SPAN",{});var lz=r(am);k(Xi.$$.fragment,lz),lz.forEach(t),rz.forEach(t),Z$=h(Eb),rm=a(Eb,"SPAN",{});var iz=r(rm);A$=n(iz,"TFRobertaForQuestionAnswering"),iz.forEach(t),Eb.forEach(t),c_=h(l),_t=a(l,"DIV",{class:!0});var fo=r(_t);k(Li.$$.fragment,fo),B$=h(fo),Nn=a(fo,"P",{});var uh=r(Nn);G$=n(uh,`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 `),lm=a(uh,"CODE",{});var dz=r(lm);V$=n(dz,"span start logits"),dz.forEach(t),S$=n(uh," and "),im=a(uh,"CODE",{});var cz=r(im);P$=n(cz,"span end logits"),cz.forEach(t),X$=n(uh,")."),uh.forEach(t),L$=h(fo),Qi=a(fo,"P",{});var xb=r(Qi);Q$=n(xb,"This model inherits from "),Ap=a(xb,"A",{href:!0});var pz=r(Ap);O$=n(pz,"TFPreTrainedModel"),pz.forEach(t),D$=n(xb,`. 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.)`),xb.forEach(t),Y$=h(fo),Oi=a(fo,"P",{});var jb=r(Oi);H$=n(jb,"This model is also a "),Di=a(jb,"A",{href:!0,rel:!0});var hz=r(Di);K$=n(hz,"tf.keras.Model"),hz.forEach(t),eF=n(jb,` 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.`),jb.forEach(t),tF=h(fo),k(ua.$$.fragment,fo),oF=h(fo),It=a(fo,"DIV",{class:!0});var en=r(It);k(Yi.$$.fragment,en),nF=h(en),Wn=a(en,"P",{});var mh=r(Wn);sF=n(mh,"The "),Bp=a(mh,"A",{href:!0});var uz=r(Bp);aF=n(uz,"TFRobertaForQuestionAnswering"),uz.forEach(t),rF=n(mh," forward method, overrides the "),dm=a(mh,"CODE",{});var mz=r(dm);lF=n(mz,"__call__"),mz.forEach(t),iF=n(mh," special method."),mh.forEach(t),dF=h(en),k(ma.$$.fragment,en),cF=h(en),k(fa.$$.fragment,en),pF=h(en),k(ga.$$.fragment,en),en.forEach(t),fo.forEach(t),p_=h(l),Zn=a(l,"H2",{class:!0});var Jb=r(Zn);_a=a(Jb,"A",{id:!0,class:!0,href:!0});var fz=r(_a);cm=a(fz,"SPAN",{});var gz=r(cm);k(Hi.$$.fragment,gz),gz.forEach(t),fz.forEach(t),hF=h(Jb),pm=a(Jb,"SPAN",{});var _z=r(pm);uF=n(_z,"FlaxRobertaModel"),_z.forEach(t),Jb.forEach(t),h_=h(l),nt=a(l,"DIV",{class:!0});var qt=r(nt);k(Ki.$$.fragment,qt),mF=h(qt),hm=a(qt,"P",{});var bz=r(hm);fF=n(bz,"The bare RoBERTa Model transformer outputting raw hidden-states without any specific head on top."),bz.forEach(t),gF=h(qt),ed=a(qt,"P",{});var zb=r(ed);_F=n(zb,"This model inherits from "),Gp=a(zb,"A",{href:!0});var yz=r(Gp);bF=n(yz,"FlaxPreTrainedModel"),yz.forEach(t),yF=n(zb,`. 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)`),zb.forEach(t),vF=h(qt),td=a(qt,"P",{});var Cb=r(td);TF=n(Cb,"This model is also a Flax Linen "),od=a(Cb,"A",{href:!0,rel:!0});var vz=r(od);kF=n(vz,"flax.linen.Module"),vz.forEach(t),wF=n(Cb,`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),Cb.forEach(t),MF=h(qt),um=a(qt,"P",{});var Tz=r(um);$F=n(Tz,"Finally, this model supports inherent JAX features such as:"),Tz.forEach(t),FF=h(qt),bo=a(qt,"UL",{});var Oa=r(bo);mm=a(Oa,"LI",{});var kz=r(mm);nd=a(kz,"A",{href:!0,rel:!0});var wz=r(nd);RF=n(wz,"Just-In-Time (JIT) compilation"),wz.forEach(t),kz.forEach(t),EF=h(Oa),fm=a(Oa,"LI",{});var Mz=r(fm);sd=a(Mz,"A",{href:!0,rel:!0});var $z=r(sd);xF=n($z,"Automatic Differentiation"),$z.forEach(t),Mz.forEach(t),jF=h(Oa),gm=a(Oa,"LI",{});var Fz=r(gm);ad=a(Fz,"A",{href:!0,rel:!0});var Rz=r(ad);JF=n(Rz,"Vectorization"),Rz.forEach(t),Fz.forEach(t),zF=h(Oa),_m=a(Oa,"LI",{});var Ez=r(_m);rd=a(Ez,"A",{href:!0,rel:!0});var xz=r(rd);CF=n(xz,"Parallelization"),xz.forEach(t),Ez.forEach(t),Oa.forEach(t),IF=h(qt),eo=a(qt,"DIV",{class:!0});var Da=r(eo);k(ld.$$.fragment,Da),UF=h(Da),An=a(Da,"P",{});var fh=r(An);qF=n(fh,"The "),bm=a(fh,"CODE",{});var jz=r(bm);NF=n(jz,"FlaxRobertaPreTrainedModel"),jz.forEach(t),WF=n(fh," forward method, overrides the "),ym=a(fh,"CODE",{});var Jz=r(ym);ZF=n(Jz,"__call__"),Jz.forEach(t),AF=n(fh," special method."),fh.forEach(t),BF=h(Da),k(ba.$$.fragment,Da),GF=h(Da),k(ya.$$.fragment,Da),Da.forEach(t),qt.forEach(t),u_=h(l),Bn=a(l,"H2",{class:!0});var Ib=r(Bn);va=a(Ib,"A",{id:!0,class:!0,href:!0});var zz=r(va);vm=a(zz,"SPAN",{});var Cz=r(vm);k(id.$$.fragment,Cz),Cz.forEach(t),zz.forEach(t),VF=h(Ib),Tm=a(Ib,"SPAN",{});var Iz=r(Tm);SF=n(Iz,"FlaxRobertaForCausalLM"),Iz.forEach(t),Ib.forEach(t),m_=h(l),st=a(l,"DIV",{class:!0});var Nt=r(st);k(dd.$$.fragment,Nt),PF=h(Nt),km=a(Nt,"P",{});var Uz=r(km);XF=n(Uz,`Roberta Model with a language modeling head on top (a linear layer on top of the hidden-states output) e.g for
autoregressive tasks.`),Uz.forEach(t),LF=h(Nt),cd=a(Nt,"P",{});var Ub=r(cd);QF=n(Ub,"This model inherits from "),Vp=a(Ub,"A",{href:!0});var qz=r(Vp);OF=n(qz,"FlaxPreTrainedModel"),qz.forEach(t),DF=n(Ub,`. 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)`),Ub.forEach(t),YF=h(Nt),pd=a(Nt,"P",{});var qb=r(pd);HF=n(qb,"This model is also a Flax Linen "),hd=a(qb,"A",{href:!0,rel:!0});var Nz=r(hd);KF=n(Nz,"flax.linen.Module"),Nz.forEach(t),eR=n(qb,`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),qb.forEach(t),tR=h(Nt),wm=a(Nt,"P",{});var Wz=r(wm);oR=n(Wz,"Finally, this model supports inherent JAX features such as:"),Wz.forEach(t),nR=h(Nt),yo=a(Nt,"UL",{});var Ya=r(yo);Mm=a(Ya,"LI",{});var Zz=r(Mm);ud=a(Zz,"A",{href:!0,rel:!0});var Az=r(ud);sR=n(Az,"Just-In-Time (JIT) compilation"),Az.forEach(t),Zz.forEach(t),aR=h(Ya),$m=a(Ya,"LI",{});var Bz=r($m);md=a(Bz,"A",{href:!0,rel:!0});var Gz=r(md);rR=n(Gz,"Automatic Differentiation"),Gz.forEach(t),Bz.forEach(t),lR=h(Ya),Fm=a(Ya,"LI",{});var Vz=r(Fm);fd=a(Vz,"A",{href:!0,rel:!0});var Sz=r(fd);iR=n(Sz,"Vectorization"),Sz.forEach(t),Vz.forEach(t),dR=h(Ya),Rm=a(Ya,"LI",{});var Pz=r(Rm);gd=a(Pz,"A",{href:!0,rel:!0});var Xz=r(gd);cR=n(Xz,"Parallelization"),Xz.forEach(t),Pz.forEach(t),Ya.forEach(t),pR=h(Nt),to=a(Nt,"DIV",{class:!0});var Ha=r(to);k(_d.$$.fragment,Ha),hR=h(Ha),Gn=a(Ha,"P",{});var gh=r(Gn);uR=n(gh,"The "),Em=a(gh,"CODE",{});var Lz=r(Em);mR=n(Lz,"FlaxRobertaPreTrainedModel"),Lz.forEach(t),fR=n(gh," forward method, overrides the "),xm=a(gh,"CODE",{});var Qz=r(xm);gR=n(Qz,"__call__"),Qz.forEach(t),_R=n(gh," special method."),gh.forEach(t),bR=h(Ha),k(Ta.$$.fragment,Ha),yR=h(Ha),k(ka.$$.fragment,Ha),Ha.forEach(t),Nt.forEach(t),f_=h(l),Vn=a(l,"H2",{class:!0});var Nb=r(Vn);wa=a(Nb,"A",{id:!0,class:!0,href:!0});var Oz=r(wa);jm=a(Oz,"SPAN",{});var Dz=r(jm);k(bd.$$.fragment,Dz),Dz.forEach(t),Oz.forEach(t),vR=h(Nb),Jm=a(Nb,"SPAN",{});var Yz=r(Jm);TR=n(Yz,"FlaxRobertaForMaskedLM"),Yz.forEach(t),Nb.forEach(t),g_=h(l),at=a(l,"DIV",{class:!0});var Wt=r(at);k(yd.$$.fragment,Wt),kR=h(Wt),vd=a(Wt,"P",{});var Wb=r(vd);wR=n(Wb,"RoBERTa Model with a "),zm=a(Wb,"CODE",{});var Hz=r(zm);MR=n(Hz,"language modeling"),Hz.forEach(t),$R=n(Wb," head on top."),Wb.forEach(t),FR=h(Wt),Td=a(Wt,"P",{});var Zb=r(Td);RR=n(Zb,"This model inherits from "),Sp=a(Zb,"A",{href:!0});var Kz=r(Sp);ER=n(Kz,"FlaxPreTrainedModel"),Kz.forEach(t),xR=n(Zb,`. 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)`),Zb.forEach(t),jR=h(Wt),kd=a(Wt,"P",{});var Ab=r(kd);JR=n(Ab,"This model is also a Flax Linen "),wd=a(Ab,"A",{href:!0,rel:!0});var eC=r(wd);zR=n(eC,"flax.linen.Module"),eC.forEach(t),CR=n(Ab,`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),Ab.forEach(t),IR=h(Wt),Cm=a(Wt,"P",{});var tC=r(Cm);UR=n(tC,"Finally, this model supports inherent JAX features such as:"),tC.forEach(t),qR=h(Wt),vo=a(Wt,"UL",{});var Ka=r(vo);Im=a(Ka,"LI",{});var oC=r(Im);Md=a(oC,"A",{href:!0,rel:!0});var nC=r(Md);NR=n(nC,"Just-In-Time (JIT) compilation"),nC.forEach(t),oC.forEach(t),WR=h(Ka),Um=a(Ka,"LI",{});var sC=r(Um);$d=a(sC,"A",{href:!0,rel:!0});var aC=r($d);ZR=n(aC,"Automatic Differentiation"),aC.forEach(t),sC.forEach(t),AR=h(Ka),qm=a(Ka,"LI",{});var rC=r(qm);Fd=a(rC,"A",{href:!0,rel:!0});var lC=r(Fd);BR=n(lC,"Vectorization"),lC.forEach(t),rC.forEach(t),GR=h(Ka),Nm=a(Ka,"LI",{});var iC=r(Nm);Rd=a(iC,"A",{href:!0,rel:!0});var dC=r(Rd);VR=n(dC,"Parallelization"),dC.forEach(t),iC.forEach(t),Ka.forEach(t),SR=h(Wt),oo=a(Wt,"DIV",{class:!0});var er=r(oo);k(Ed.$$.fragment,er),PR=h(er),Sn=a(er,"P",{});var _h=r(Sn);XR=n(_h,"The "),Wm=a(_h,"CODE",{});var cC=r(Wm);LR=n(cC,"FlaxRobertaPreTrainedModel"),cC.forEach(t),QR=n(_h," forward method, overrides the "),Zm=a(_h,"CODE",{});var pC=r(Zm);OR=n(pC,"__call__"),pC.forEach(t),DR=n(_h," special method."),_h.forEach(t),YR=h(er),k(Ma.$$.fragment,er),HR=h(er),k($a.$$.fragment,er),er.forEach(t),Wt.forEach(t),__=h(l),Pn=a(l,"H2",{class:!0});var Bb=r(Pn);Fa=a(Bb,"A",{id:!0,class:!0,href:!0});var hC=r(Fa);Am=a(hC,"SPAN",{});var uC=r(Am);k(xd.$$.fragment,uC),uC.forEach(t),hC.forEach(t),KR=h(Bb),Bm=a(Bb,"SPAN",{});var mC=r(Bm);eE=n(mC,"FlaxRobertaForSequenceClassification"),mC.forEach(t),Bb.forEach(t),b_=h(l),rt=a(l,"DIV",{class:!0});var Zt=r(rt);k(jd.$$.fragment,Zt),tE=h(Zt),Gm=a(Zt,"P",{});var fC=r(Gm);oE=n(fC,`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.`),fC.forEach(t),nE=h(Zt),Jd=a(Zt,"P",{});var Gb=r(Jd);sE=n(Gb,"This model inherits from "),Pp=a(Gb,"A",{href:!0});var gC=r(Pp);aE=n(gC,"FlaxPreTrainedModel"),gC.forEach(t),rE=n(Gb,`. 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)`),Gb.forEach(t),lE=h(Zt),zd=a(Zt,"P",{});var Vb=r(zd);iE=n(Vb,"This model is also a Flax Linen "),Cd=a(Vb,"A",{href:!0,rel:!0});var _C=r(Cd);dE=n(_C,"flax.linen.Module"),_C.forEach(t),cE=n(Vb,`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),Vb.forEach(t),pE=h(Zt),Vm=a(Zt,"P",{});var bC=r(Vm);hE=n(bC,"Finally, this model supports inherent JAX features such as:"),bC.forEach(t),uE=h(Zt),To=a(Zt,"UL",{});var tr=r(To);Sm=a(tr,"LI",{});var yC=r(Sm);Id=a(yC,"A",{href:!0,rel:!0});var vC=r(Id);mE=n(vC,"Just-In-Time (JIT) compilation"),vC.forEach(t),yC.forEach(t),fE=h(tr),Pm=a(tr,"LI",{});var TC=r(Pm);Ud=a(TC,"A",{href:!0,rel:!0});var kC=r(Ud);gE=n(kC,"Automatic Differentiation"),kC.forEach(t),TC.forEach(t),_E=h(tr),Xm=a(tr,"LI",{});var wC=r(Xm);qd=a(wC,"A",{href:!0,rel:!0});var MC=r(qd);bE=n(MC,"Vectorization"),MC.forEach(t),wC.forEach(t),yE=h(tr),Lm=a(tr,"LI",{});var $C=r(Lm);Nd=a($C,"A",{href:!0,rel:!0});var FC=r(Nd);vE=n(FC,"Parallelization"),FC.forEach(t),$C.forEach(t),tr.forEach(t),TE=h(Zt),no=a(Zt,"DIV",{class:!0});var or=r(no);k(Wd.$$.fragment,or),kE=h(or),Xn=a(or,"P",{});var bh=r(Xn);wE=n(bh,"The "),Qm=a(bh,"CODE",{});var RC=r(Qm);ME=n(RC,"FlaxRobertaPreTrainedModel"),RC.forEach(t),$E=n(bh," forward method, overrides the "),Om=a(bh,"CODE",{});var EC=r(Om);FE=n(EC,"__call__"),EC.forEach(t),RE=n(bh," special method."),bh.forEach(t),EE=h(or),k(Ra.$$.fragment,or),xE=h(or),k(Ea.$$.fragment,or),or.forEach(t),Zt.forEach(t),y_=h(l),Ln=a(l,"H2",{class:!0});var Sb=r(Ln);xa=a(Sb,"A",{id:!0,class:!0,href:!0});var xC=r(xa);Dm=a(xC,"SPAN",{});var jC=r(Dm);k(Zd.$$.fragment,jC),jC.forEach(t),xC.forEach(t),jE=h(Sb),Ym=a(Sb,"SPAN",{});var JC=r(Ym);JE=n(JC,"FlaxRobertaForMultipleChoice"),JC.forEach(t),Sb.forEach(t),v_=h(l),lt=a(l,"DIV",{class:!0});var At=r(lt);k(Ad.$$.fragment,At),zE=h(At),Hm=a(At,"P",{});var zC=r(Hm);CE=n(zC,`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.`),zC.forEach(t),IE=h(At),Bd=a(At,"P",{});var Pb=r(Bd);UE=n(Pb,"This model inherits from "),Xp=a(Pb,"A",{href:!0});var CC=r(Xp);qE=n(CC,"FlaxPreTrainedModel"),CC.forEach(t),NE=n(Pb,`. 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)`),Pb.forEach(t),WE=h(At),Gd=a(At,"P",{});var Xb=r(Gd);ZE=n(Xb,"This model is also a Flax Linen "),Vd=a(Xb,"A",{href:!0,rel:!0});var IC=r(Vd);AE=n(IC,"flax.linen.Module"),IC.forEach(t),BE=n(Xb,`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),Xb.forEach(t),GE=h(At),Km=a(At,"P",{});var UC=r(Km);VE=n(UC,"Finally, this model supports inherent JAX features such as:"),UC.forEach(t),SE=h(At),ko=a(At,"UL",{});var nr=r(ko);ef=a(nr,"LI",{});var qC=r(ef);Sd=a(qC,"A",{href:!0,rel:!0});var NC=r(Sd);PE=n(NC,"Just-In-Time (JIT) compilation"),NC.forEach(t),qC.forEach(t),XE=h(nr),tf=a(nr,"LI",{});var WC=r(tf);Pd=a(WC,"A",{href:!0,rel:!0});var ZC=r(Pd);LE=n(ZC,"Automatic Differentiation"),ZC.forEach(t),WC.forEach(t),QE=h(nr),of=a(nr,"LI",{});var AC=r(of);Xd=a(AC,"A",{href:!0,rel:!0});var BC=r(Xd);OE=n(BC,"Vectorization"),BC.forEach(t),AC.forEach(t),DE=h(nr),nf=a(nr,"LI",{});var GC=r(nf);Ld=a(GC,"A",{href:!0,rel:!0});var VC=r(Ld);YE=n(VC,"Parallelization"),VC.forEach(t),GC.forEach(t),nr.forEach(t),HE=h(At),so=a(At,"DIV",{class:!0});var sr=r(so);k(Qd.$$.fragment,sr),KE=h(sr),Qn=a(sr,"P",{});var yh=r(Qn);e4=n(yh,"The "),sf=a(yh,"CODE",{});var SC=r(sf);t4=n(SC,"FlaxRobertaPreTrainedModel"),SC.forEach(t),o4=n(yh," forward method, overrides the "),af=a(yh,"CODE",{});var PC=r(af);n4=n(PC,"__call__"),PC.forEach(t),s4=n(yh," special method."),yh.forEach(t),a4=h(sr),k(ja.$$.fragment,sr),r4=h(sr),k(Ja.$$.fragment,sr),sr.forEach(t),At.forEach(t),T_=h(l),On=a(l,"H2",{class:!0});var Lb=r(On);za=a(Lb,"A",{id:!0,class:!0,href:!0});var XC=r(za);rf=a(XC,"SPAN",{});var LC=r(rf);k(Od.$$.fragment,LC),LC.forEach(t),XC.forEach(t),l4=h(Lb),lf=a(Lb,"SPAN",{});var QC=r(lf);i4=n(QC,"FlaxRobertaForTokenClassification"),QC.forEach(t),Lb.forEach(t),k_=h(l),it=a(l,"DIV",{class:!0});var Bt=r(it);k(Dd.$$.fragment,Bt),d4=h(Bt),df=a(Bt,"P",{});var OC=r(df);c4=n(OC,`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.`),OC.forEach(t),p4=h(Bt),Yd=a(Bt,"P",{});var Qb=r(Yd);h4=n(Qb,"This model inherits from "),Lp=a(Qb,"A",{href:!0});var DC=r(Lp);u4=n(DC,"FlaxPreTrainedModel"),DC.forEach(t),m4=n(Qb,`. 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)`),Qb.forEach(t),f4=h(Bt),Hd=a(Bt,"P",{});var Ob=r(Hd);g4=n(Ob,"This model is also a Flax Linen "),Kd=a(Ob,"A",{href:!0,rel:!0});var YC=r(Kd);_4=n(YC,"flax.linen.Module"),YC.forEach(t),b4=n(Ob,`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),Ob.forEach(t),y4=h(Bt),cf=a(Bt,"P",{});var HC=r(cf);v4=n(HC,"Finally, this model supports inherent JAX features such as:"),HC.forEach(t),T4=h(Bt),wo=a(Bt,"UL",{});var ar=r(wo);pf=a(ar,"LI",{});var KC=r(pf);ec=a(KC,"A",{href:!0,rel:!0});var eI=r(ec);k4=n(eI,"Just-In-Time (JIT) compilation"),eI.forEach(t),KC.forEach(t),w4=h(ar),hf=a(ar,"LI",{});var tI=r(hf);tc=a(tI,"A",{href:!0,rel:!0});var oI=r(tc);M4=n(oI,"Automatic Differentiation"),oI.forEach(t),tI.forEach(t),$4=h(ar),uf=a(ar,"LI",{});var nI=r(uf);oc=a(nI,"A",{href:!0,rel:!0});var sI=r(oc);F4=n(sI,"Vectorization"),sI.forEach(t),nI.forEach(t),R4=h(ar),mf=a(ar,"LI",{});var aI=r(mf);nc=a(aI,"A",{href:!0,rel:!0});var rI=r(nc);E4=n(rI,"Parallelization"),rI.forEach(t),aI.forEach(t),ar.forEach(t),x4=h(Bt),ao=a(Bt,"DIV",{class:!0});var rr=r(ao);k(sc.$$.fragment,rr),j4=h(rr),Dn=a(rr,"P",{});var vh=r(Dn);J4=n(vh,"The "),ff=a(vh,"CODE",{});var lI=r(ff);z4=n(lI,"FlaxRobertaPreTrainedModel"),lI.forEach(t),C4=n(vh," forward method, overrides the "),gf=a(vh,"CODE",{});var iI=r(gf);I4=n(iI,"__call__"),iI.forEach(t),U4=n(vh," special method."),vh.forEach(t),q4=h(rr),k(Ca.$$.fragment,rr),N4=h(rr),k(Ia.$$.fragment,rr),rr.forEach(t),Bt.forEach(t),w_=h(l),Yn=a(l,"H2",{class:!0});var Db=r(Yn);Ua=a(Db,"A",{id:!0,class:!0,href:!0});var dI=r(Ua);_f=a(dI,"SPAN",{});var cI=r(_f);k(ac.$$.fragment,cI),cI.forEach(t),dI.forEach(t),W4=h(Db),bf=a(Db,"SPAN",{});var pI=r(bf);Z4=n(pI,"FlaxRobertaForQuestionAnswering"),pI.forEach(t),Db.forEach(t),M_=h(l),dt=a(l,"DIV",{class:!0});var Gt=r(dt);k(rc.$$.fragment,Gt),A4=h(Gt),Hn=a(Gt,"P",{});var Th=r(Hn);B4=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 `),yf=a(Th,"CODE",{});var hI=r(yf);G4=n(hI,"span start logits"),hI.forEach(t),V4=n(Th," and "),vf=a(Th,"CODE",{});var uI=r(vf);S4=n(uI,"span end logits"),uI.forEach(t),P4=n(Th,")."),Th.forEach(t),X4=h(Gt),lc=a(Gt,"P",{});var Yb=r(lc);L4=n(Yb,"This model inherits from "),Qp=a(Yb,"A",{href:!0});var mI=r(Qp);Q4=n(mI,"FlaxPreTrainedModel"),mI.forEach(t),O4=n(Yb,`. 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)`),Yb.forEach(t),D4=h(Gt),ic=a(Gt,"P",{});var Hb=r(ic);Y4=n(Hb,"This model is also a Flax Linen "),dc=a(Hb,"A",{href:!0,rel:!0});var fI=r(dc);H4=n(fI,"flax.linen.Module"),fI.forEach(t),K4=n(Hb,`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),Hb.forEach(t),ex=h(Gt),Tf=a(Gt,"P",{});var gI=r(Tf);tx=n(gI,"Finally, this model supports inherent JAX features such as:"),gI.forEach(t),ox=h(Gt),Mo=a(Gt,"UL",{});var lr=r(Mo);kf=a(lr,"LI",{});var _I=r(kf);cc=a(_I,"A",{href:!0,rel:!0});var bI=r(cc);nx=n(bI,"Just-In-Time (JIT) compilation"),bI.forEach(t),_I.forEach(t),sx=h(lr),wf=a(lr,"LI",{});var yI=r(wf);pc=a(yI,"A",{href:!0,rel:!0});var vI=r(pc);ax=n(vI,"Automatic Differentiation"),vI.forEach(t),yI.forEach(t),rx=h(lr),Mf=a(lr,"LI",{});var TI=r(Mf);hc=a(TI,"A",{href:!0,rel:!0});var kI=r(hc);lx=n(kI,"Vectorization"),kI.forEach(t),TI.forEach(t),ix=h(lr),$f=a(lr,"LI",{});var wI=r($f);uc=a(wI,"A",{href:!0,rel:!0});var MI=r(uc);dx=n(MI,"Parallelization"),MI.forEach(t),wI.forEach(t),lr.forEach(t),cx=h(Gt),ro=a(Gt,"DIV",{class:!0});var ir=r(ro);k(mc.$$.fragment,ir),px=h(ir),Kn=a(ir,"P",{});var kh=r(Kn);hx=n(kh,"The "),Ff=a(kh,"CODE",{});var $I=r(Ff);ux=n($I,"FlaxRobertaPreTrainedModel"),$I.forEach(t),mx=n(kh," forward method, overrides the "),Rf=a(kh,"CODE",{});var FI=r(Rf);fx=n(FI,"__call__"),FI.forEach(t),gx=n(kh," special method."),kh.forEach(t),_x=h(ir),k(qa.$$.fragment,ir),bx=h(ir),k(Na.$$.fragment,ir),ir.forEach(t),Gt.forEach(t),this.h()},h(){c(d,"name","hf:doc:metadata"),c(d,"content",JSON.stringify(NU)),c(f,"id","roberta"),c(f,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(f,"href","#roberta"),c(m,"class","relative group"),c(ee,"alt","Models"),Mx(ee.src,x="https://img.shields.io/badge/All_model_pages-roberta-blueviolet")||c(ee,"src",x),c(re,"href","https://huggingface.co/models?filter=roberta"),c(pe,"alt","Spaces"),Mx(pe.src,Ae="https://img.shields.io/badge/%F0%9F%A4%97%20Hugging%20Face-Spaces-blue")||c(pe,"src",Ae),c(G,"href","https://huggingface.co/spaces/docs-demos/roberta-base"),c(ue,"alt","Paper page"),Mx(ue.src,H="https://img.shields.io/badge/Paper%20page-1907.11692-green")||c(ue,"src",H),c(he,"href","https://huggingface.co/papers/1907.11692"),c(N,"class","flex flex-wrap space-x-1"),c(B,"id","overview"),c(B,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(B,"href","#overview"),c(le,"class","relative group"),c(de,"href","https://arxiv.org/abs/1907.11692"),c(de,"rel","nofollow"),c(ce,"href","https://huggingface.co/myleott"),c(ce,"rel","nofollow"),c(ge,"href","/docs/transformers/v4.32.0/en/model_doc/bert#transformers.BertModel"),c(Ic,"href","camembert"),c(dr,"href","https://huggingface.co/julien-c"),c(dr,"rel","nofollow"),c(cr,"href","https://github.com/pytorch/fairseq/tree/master/examples/roberta"),c(cr,"rel","nofollow"),c(ss,"id","resources"),c(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"),c(ss,"href","#resources"),c(tn,"class","relative group"),c(ur,"href","https://huggingface.co/blog/sentiment-analysis-twitter"),c(ur,"rel","nofollow"),c(mr,"href","https://huggingface.co/inference-api"),c(mr,"rel","nofollow"),c(gr,"href","https://huggingface.co/blog/opinion-classification-with-kili"),c(gr,"rel","nofollow"),c(br,"href","https://colab.research.google.com/github/DhavalTaunk08/NLP_scripts/blob/master/sentiment_analysis_using_roberta.ipynb"),c(br,"rel","nofollow"),c(qc,"href","/docs/transformers/v4.32.0/en/model_doc/roberta#transformers.RobertaForSequenceClassification"),c(yr,"href","https://github.com/huggingface/transformers/tree/main/examples/pytorch/text-classification"),c(yr,"rel","nofollow"),c(vr,"href","https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/text_classification.ipynb"),c(vr,"rel","nofollow"),c(Nc,"href","/docs/transformers/v4.32.0/en/model_doc/roberta#transformers.TFRobertaForSequenceClassification"),c(Tr,"href","https://github.com/huggingface/transformers/tree/main/examples/tensorflow/text-classification"),c(Tr,"rel","nofollow"),c(kr,"href","https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/text_classification-tf.ipynb"),c(kr,"rel","nofollow"),c(Wc,"href","/docs/transformers/v4.32.0/en/model_doc/roberta#transformers.FlaxRobertaForSequenceClassification"),c(wr,"href","https://github.com/huggingface/transformers/tree/main/examples/flax/text-classification"),c(wr,"rel","nofollow"),c(Mr,"href","https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/text_classification_flax.ipynb"),c(Mr,"rel","nofollow"),c(Zc,"href","../tasks/sequence_classification"),c(Ac,"href","/docs/transformers/v4.32.0/en/model_doc/roberta#transformers.RobertaForTokenClassification"),c(Fr,"href","https://github.com/huggingface/transformers/tree/main/examples/pytorch/token-classification"),c(Fr,"rel","nofollow"),c(Rr,"href","https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/token_classification.ipynb"),c(Rr,"rel","nofollow"),c(Bc,"href","/docs/transformers/v4.32.0/en/model_doc/roberta#transformers.TFRobertaForTokenClassification"),c(Er,"href","https://github.com/huggingface/transformers/tree/main/examples/tensorflow/token-classification"),c(Er,"rel","nofollow"),c(xr,"href","https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/token_classification-tf.ipynb"),c(xr,"rel","nofollow"),c(Gc,"href","/docs/transformers/v4.32.0/en/model_doc/roberta#transformers.FlaxRobertaForTokenClassification"),c(jr,"href","https://github.com/huggingface/transformers/tree/main/examples/flax/token-classification"),c(jr,"rel","nofollow"),c(Jr,"href","https://huggingface.co/course/chapter7/2?fw=pt"),c(Jr,"rel","nofollow"),c(Sc,"href","../tasks/token_classification"),c(Ir,"href","https://huggingface.co/blog/how-to-train"),c(Ir,"rel","nofollow"),c(Pc,"href","/docs/transformers/v4.32.0/en/model_doc/roberta#transformers.RobertaForMaskedLM"),c(Ur,"href","https://github.com/huggingface/transformers/tree/main/examples/pytorch/language-modeling#robertabertdistilbert-and-masked-language-modeling"),c(Ur,"rel","nofollow"),c(qr,"href","https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/language_modeling.ipynb"),c(qr,"rel","nofollow"),c(Xc,"href","/docs/transformers/v4.32.0/en/model_doc/roberta#transformers.TFRobertaForMaskedLM"),c(Nr,"href","https://github.com/huggingface/transformers/tree/main/examples/tensorflow/language-modeling#run_mlmpy"),c(Nr,"rel","nofollow"),c(Wr,"href","https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/language_modeling-tf.ipynb"),c(Wr,"rel","nofollow"),c(Lc,"href","/docs/transformers/v4.32.0/en/model_doc/roberta#transformers.FlaxRobertaForMaskedLM"),c(Zr,"href","https://github.com/huggingface/transformers/tree/main/examples/flax/language-modeling#masked-language-modeling"),c(Zr,"rel","nofollow"),c(Ar,"href","https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/masked_language_modeling_flax.ipynb"),c(Ar,"rel","nofollow"),c(Br,"href","https://huggingface.co/course/chapter7/3?fw=pt"),c(Br,"rel","nofollow"),c(Oc,"href","../tasks/masked_language_modeling"),c(Sr,"href","https://huggingface.co/blog/optimum-inference"),c(Sr,"rel","nofollow"),c(Dc,"href","/docs/transformers/v4.32.0/en/model_doc/roberta#transformers.RobertaForQuestionAnswering"),c(Pr,"href","https://github.com/huggingface/transformers/tree/main/examples/pytorch/question-answering"),c(Pr,"rel","nofollow"),c(Xr,"href","https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/question_answering.ipynb"),c(Xr,"rel","nofollow"),c(Yc,"href","/docs/transformers/v4.32.0/en/model_doc/roberta#transformers.TFRobertaForQuestionAnswering"),c(Lr,"href","https://github.com/huggingface/transformers/tree/main/examples/tensorflow/question-answering"),c(Lr,"rel","nofollow"),c(Qr,"href","https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/question_answering-tf.ipynb"),c(Qr,"rel","nofollow"),c(Hc,"href","/docs/transformers/v4.32.0/en/model_doc/roberta#transformers.FlaxRobertaForQuestionAnswering"),c(Or,"href","https://github.com/huggingface/transformers/tree/main/examples/flax/question-answering"),c(Or,"rel","nofollow"),c(Dr,"href","https://huggingface.co/course/chapter7/7?fw=pt"),c(Dr,"rel","nofollow"),c(ep,"href","../tasks/question_answering"),c(op,"href","/docs/transformers/v4.32.0/en/model_doc/roberta#transformers.RobertaForMultipleChoice"),c(Yr,"href","https://github.com/huggingface/transformers/tree/main/examples/pytorch/multiple-choice"),c(Yr,"rel","nofollow"),c(Hr,"href","https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/multiple_choice.ipynb"),c(Hr,"rel","nofollow"),c(np,"href","/docs/transformers/v4.32.0/en/model_doc/roberta#transformers.TFRobertaForMultipleChoice"),c(Kr,"href","https://github.com/huggingface/transformers/tree/main/examples/tensorflow/multiple-choice"),c(Kr,"rel","nofollow"),c(el,"href","https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/multiple_choice-tf.ipynb"),c(el,"rel","nofollow"),c(sp,"href","../tasks/multiple_choice"),c(ls,"id","transformers.RobertaConfig"),c(ls,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(ls,"href","#transformers.RobertaConfig"),c(nn,"class","relative group"),c(ap,"href","/docs/transformers/v4.32.0/en/model_doc/roberta#transformers.RobertaModel"),c(rp,"href","/docs/transformers/v4.32.0/en/model_doc/roberta#transformers.TFRobertaModel"),c(nl,"href","https://huggingface.co/roberta-base"),c(nl,"rel","nofollow"),c(lp,"href","/docs/transformers/v4.32.0/en/main_classes/configuration#transformers.PretrainedConfig"),c(ip,"href","/docs/transformers/v4.32.0/en/main_classes/configuration#transformers.PretrainedConfig"),c(Vt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(ds,"id","transformers.RobertaTokenizer"),c(ds,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(ds,"href","#transformers.RobertaTokenizer"),c(an,"class","relative group"),c(dp,"href","/docs/transformers/v4.32.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizer"),c(Bo,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(hs,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(us,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(hp,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(We,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(ms,"id","transformers.RobertaTokenizerFast"),c(ms,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(ms,"href","#transformers.RobertaTokenizerFast"),c(rn,"class","relative group"),c(up,"href","/docs/transformers/v4.32.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast"),c(mp,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(tt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(_s,"id","transformers.RobertaModel"),c(_s,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(_s,"href","#transformers.RobertaModel"),c(ln,"class","relative group"),c(fp,"href","/docs/transformers/v4.32.0/en/main_classes/model#transformers.PreTrainedModel"),c(Ml,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),c(Ml,"rel","nofollow"),c(Fl,"href","https://arxiv.org/abs/1706.03762"),c(Fl,"rel","nofollow"),c(gp,"href","/docs/transformers/v4.32.0/en/model_doc/roberta#transformers.RobertaModel"),c(Pt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(ot,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(Ts,"id","transformers.RobertaForCausalLM"),c(Ts,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(Ts,"href","#transformers.RobertaForCausalLM"),c(cn,"class","relative group"),c(_p,"href","/docs/transformers/v4.32.0/en/main_classes/model#transformers.PreTrainedModel"),c(Cl,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),c(Cl,"rel","nofollow"),c(bp,"href","/docs/transformers/v4.32.0/en/model_doc/roberta#transformers.RobertaForCausalLM"),c(Xt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(wt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(Ms,"id","transformers.RobertaForMaskedLM"),c(Ms,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(Ms,"href","#transformers.RobertaForMaskedLM"),c(hn,"class","relative group"),c(yp,"href","/docs/transformers/v4.32.0/en/main_classes/model#transformers.PreTrainedModel"),c(Al,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),c(Al,"rel","nofollow"),c(vp,"href","/docs/transformers/v4.32.0/en/model_doc/roberta#transformers.RobertaForMaskedLM"),c(Lt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(Mt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(Rs,"id","transformers.RobertaForSequenceClassification"),c(Rs,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(Rs,"href","#transformers.RobertaForSequenceClassification"),c(mn,"class","relative group"),c(Tp,"href","/docs/transformers/v4.32.0/en/main_classes/model#transformers.PreTrainedModel"),c(Xl,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),c(Xl,"rel","nofollow"),c(kp,"href","/docs/transformers/v4.32.0/en/model_doc/roberta#transformers.RobertaForSequenceClassification"),c(jt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c($t,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(Js,"id","transformers.RobertaForMultipleChoice"),c(Js,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(Js,"href","#transformers.RobertaForMultipleChoice"),c(gn,"class","relative group"),c(wp,"href","/docs/transformers/v4.32.0/en/main_classes/model#transformers.PreTrainedModel"),c(Hl,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),c(Hl,"rel","nofollow"),c(Mp,"href","/docs/transformers/v4.32.0/en/model_doc/roberta#transformers.RobertaForMultipleChoice"),c(Qt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(Ft,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(Is,"id","transformers.RobertaForTokenClassification"),c(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"),c(Is,"href","#transformers.RobertaForTokenClassification"),c(bn,"class","relative group"),c($p,"href","/docs/transformers/v4.32.0/en/main_classes/model#transformers.PreTrainedModel"),c(si,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),c(si,"rel","nofollow"),c(Fp,"href","/docs/transformers/v4.32.0/en/model_doc/roberta#transformers.RobertaForTokenClassification"),c(Ot,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(Rt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(Ns,"id","transformers.RobertaForQuestionAnswering"),c(Ns,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(Ns,"href","#transformers.RobertaForQuestionAnswering"),c(vn,"class","relative group"),c(Rp,"href","/docs/transformers/v4.32.0/en/main_classes/model#transformers.PreTrainedModel"),c(ci,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),c(ci,"rel","nofollow"),c(Ep,"href","/docs/transformers/v4.32.0/en/model_doc/roberta#transformers.RobertaForQuestionAnswering"),c(Dt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(Et,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(As,"id","transformers.TFRobertaModel"),c(As,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(As,"href","#transformers.TFRobertaModel"),c(wn,"class","relative group"),c(xp,"href","/docs/transformers/v4.32.0/en/main_classes/model#transformers.TFPreTrainedModel"),c(gi,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),c(gi,"rel","nofollow"),c(jp,"href","/docs/transformers/v4.32.0/en/model_doc/roberta#transformers.TFRobertaModel"),c(Yt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(ht,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(Ss,"id","transformers.TFRobertaForCausalLM"),c(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"),c(Ss,"href","#transformers.TFRobertaForCausalLM"),c($n,"class","relative group"),c(Jp,"href","/docs/transformers/v4.32.0/en/model_doc/roberta#transformers.TFRobertaForCausalLM"),c(Ht,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(Fn,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(Ls,"id","transformers.TFRobertaForMaskedLM"),c(Ls,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(Ls,"href","#transformers.TFRobertaForMaskedLM"),c(En,"class","relative group"),c(zp,"href","/docs/transformers/v4.32.0/en/main_classes/model#transformers.TFPreTrainedModel"),c(Fi,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),c(Fi,"rel","nofollow"),c(Cp,"href","/docs/transformers/v4.32.0/en/model_doc/roberta#transformers.TFRobertaForMaskedLM"),c(Jt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(ut,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(Hs,"id","transformers.TFRobertaForSequenceClassification"),c(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"),c(Hs,"href","#transformers.TFRobertaForSequenceClassification"),c(jn,"class","relative group"),c(Ip,"href","/docs/transformers/v4.32.0/en/main_classes/model#transformers.TFPreTrainedModel"),c(zi,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),c(zi,"rel","nofollow"),c(Up,"href","/docs/transformers/v4.32.0/en/model_doc/roberta#transformers.TFRobertaForSequenceClassification"),c(zt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(mt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(na,"id","transformers.TFRobertaForMultipleChoice"),c(na,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(na,"href","#transformers.TFRobertaForMultipleChoice"),c(zn,"class","relative group"),c(qp,"href","/docs/transformers/v4.32.0/en/main_classes/model#transformers.TFPreTrainedModel"),c(Wi,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),c(Wi,"rel","nofollow"),c(Np,"href","/docs/transformers/v4.32.0/en/model_doc/roberta#transformers.TFRobertaForMultipleChoice"),c(Kt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(ft,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(la,"id","transformers.TFRobertaForTokenClassification"),c(la,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(la,"href","#transformers.TFRobertaForTokenClassification"),c(In,"class","relative group"),c(Wp,"href","/docs/transformers/v4.32.0/en/main_classes/model#transformers.TFPreTrainedModel"),c(Si,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),c(Si,"rel","nofollow"),c(Zp,"href","/docs/transformers/v4.32.0/en/model_doc/roberta#transformers.TFRobertaForTokenClassification"),c(Ct,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(gt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(ha,"id","transformers.TFRobertaForQuestionAnswering"),c(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"),c(ha,"href","#transformers.TFRobertaForQuestionAnswering"),c(qn,"class","relative group"),c(Ap,"href","/docs/transformers/v4.32.0/en/main_classes/model#transformers.TFPreTrainedModel"),c(Di,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),c(Di,"rel","nofollow"),c(Bp,"href","/docs/transformers/v4.32.0/en/model_doc/roberta#transformers.TFRobertaForQuestionAnswering"),c(It,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(_t,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(_a,"id","transformers.FlaxRobertaModel"),c(_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"),c(_a,"href","#transformers.FlaxRobertaModel"),c(Zn,"class","relative group"),c(Gp,"href","/docs/transformers/v4.32.0/en/main_classes/model#transformers.FlaxPreTrainedModel"),c(od,"href","https://flax.readthedocs.io/en/latest/flax.linen.html#module"),c(od,"rel","nofollow"),c(nd,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),c(nd,"rel","nofollow"),c(sd,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),c(sd,"rel","nofollow"),c(ad,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),c(ad,"rel","nofollow"),c(rd,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),c(rd,"rel","nofollow"),c(eo,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(nt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(va,"id","transformers.FlaxRobertaForCausalLM"),c(va,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(va,"href","#transformers.FlaxRobertaForCausalLM"),c(Bn,"class","relative group"),c(Vp,"href","/docs/transformers/v4.32.0/en/main_classes/model#transformers.FlaxPreTrainedModel"),c(hd,"href","https://flax.readthedocs.io/en/latest/flax.linen.html#module"),c(hd,"rel","nofollow"),c(ud,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),c(ud,"rel","nofollow"),c(md,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),c(md,"rel","nofollow"),c(fd,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),c(fd,"rel","nofollow"),c(gd,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),c(gd,"rel","nofollow"),c(to,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(st,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(wa,"id","transformers.FlaxRobertaForMaskedLM"),c(wa,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(wa,"href","#transformers.FlaxRobertaForMaskedLM"),c(Vn,"class","relative group"),c(Sp,"href","/docs/transformers/v4.32.0/en/main_classes/model#transformers.FlaxPreTrainedModel"),c(wd,"href","https://flax.readthedocs.io/en/latest/flax.linen.html#module"),c(wd,"rel","nofollow"),c(Md,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),c(Md,"rel","nofollow"),c($d,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),c($d,"rel","nofollow"),c(Fd,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),c(Fd,"rel","nofollow"),c(Rd,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),c(Rd,"rel","nofollow"),c(oo,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(at,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(Fa,"id","transformers.FlaxRobertaForSequenceClassification"),c(Fa,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(Fa,"href","#transformers.FlaxRobertaForSequenceClassification"),c(Pn,"class","relative group"),c(Pp,"href","/docs/transformers/v4.32.0/en/main_classes/model#transformers.FlaxPreTrainedModel"),c(Cd,"href","https://flax.readthedocs.io/en/latest/flax.linen.html#module"),c(Cd,"rel","nofollow"),c(Id,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),c(Id,"rel","nofollow"),c(Ud,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),c(Ud,"rel","nofollow"),c(qd,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),c(qd,"rel","nofollow"),c(Nd,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),c(Nd,"rel","nofollow"),c(no,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(rt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(xa,"id","transformers.FlaxRobertaForMultipleChoice"),c(xa,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(xa,"href","#transformers.FlaxRobertaForMultipleChoice"),c(Ln,"class","relative group"),c(Xp,"href","/docs/transformers/v4.32.0/en/main_classes/model#transformers.FlaxPreTrainedModel"),c(Vd,"href","https://flax.readthedocs.io/en/latest/flax.linen.html#module"),c(Vd,"rel","nofollow"),c(Sd,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),c(Sd,"rel","nofollow"),c(Pd,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),c(Pd,"rel","nofollow"),c(Xd,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),c(Xd,"rel","nofollow"),c(Ld,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),c(Ld,"rel","nofollow"),c(so,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(lt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(za,"id","transformers.FlaxRobertaForTokenClassification"),c(za,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(za,"href","#transformers.FlaxRobertaForTokenClassification"),c(On,"class","relative group"),c(Lp,"href","/docs/transformers/v4.32.0/en/main_classes/model#transformers.FlaxPreTrainedModel"),c(Kd,"href","https://flax.readthedocs.io/en/latest/flax.linen.html#module"),c(Kd,"rel","nofollow"),c(ec,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),c(ec,"rel","nofollow"),c(tc,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),c(tc,"rel","nofollow"),c(oc,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),c(oc,"rel","nofollow"),c(nc,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),c(nc,"rel","nofollow"),c(ao,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(it,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(Ua,"id","transformers.FlaxRobertaForQuestionAnswering"),c(Ua,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(Ua,"href","#transformers.FlaxRobertaForQuestionAnswering"),c(Yn,"class","relative group"),c(Qp,"href","/docs/transformers/v4.32.0/en/main_classes/model#transformers.FlaxPreTrainedModel"),c(dc,"href","https://flax.readthedocs.io/en/latest/flax.linen.html#module"),c(dc,"rel","nofollow"),c(cc,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),c(cc,"rel","nofollow"),c(pc,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),c(pc,"rel","nofollow"),c(hc,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),c(hc,"rel","nofollow"),c(uc,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),c(uc,"rel","nofollow"),c(ro,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(dt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(l,_){e(document.head,d),g(l,y,_),g(l,m,_),e(m,f),e(f,b),w(i,b,null),e(m,u),e(m,E),e(E,ae),g(l,K,_),g(l,N,_),e(N,re),e(re,ee),e(N,xe),e(N,G),e(G,pe),e(N,Q),e(N,he),e(he,ue),g(l,Fe,_),g(l,le,_),e(le,B),e(B,_e),w(ie,_e,null),e(le,O),e(le,be),e(be,je),g(l,ne,_),g(l,z,_),e(z,U),e(z,de),e(de,D),e(z,Je),e(z,ce),e(ce,Y),e(z,ze),g(l,Re,_),g(l,I,_),e(I,Ce),g(l,X,_),g(l,me,_),e(me,Ie),g(l,L,_),g(l,fe,_),e(fe,ye),e(ye,Z),g(l,Ee,_),g(l,V,_),e(V,Ue),g(l,se,_),g(l,C,_),e(C,ve),e(ve,q),e(q,qe),e(q,ge),e(ge,v),e(q,j),e(C,Xe),e(C,te),e(te,Ge),e(Ge,Le),e(C,J),e(C,Ve),e(Ve,Te),e(Te,Qe),e(Te,Se),e(Se,Oe),e(Te,A),e(Te,S),e(S,De),e(Te,Ye),e(Te,P),e(P,He),e(Te,Ke),e(C,Ne),e(C,Be),e(Be,oe),e(oe,et),e(Be,ey),e(Be,go),e(go,wh),e(wh,ty),e(go,oy),e(go,Mh),e(Mh,ny),e(go,sy),e(go,$h),e($h,ay),e(go,ry),e(go,Fh),e(Fh,ly),e(C,iy),e(C,Rh),e(Rh,Cc),e(Cc,Ic),e(Ic,dy),e(Cc,cy),g(l,bg,_),g(l,Ro,_),e(Ro,py),e(Ro,dr),e(dr,hy),e(Ro,uy),e(Ro,cr),e(cr,my),e(Ro,fy),g(l,yg,_),g(l,tn,_),e(tn,ss),e(ss,Eh),w(pr,Eh,null),e(tn,gy),e(tn,xh),e(xh,_y),g(l,vg,_),g(l,Uc,_),e(Uc,by),g(l,Tg,_),w(hr,l,_),g(l,kg,_),g(l,ct,_),e(ct,on),e(on,yy),e(on,ur),e(ur,vy),e(on,Ty),e(on,mr),e(mr,ky),e(on,wy),e(ct,My),e(ct,fr),e(fr,$y),e(fr,gr),e(gr,Fy),e(fr,Ry),e(ct,Ey),e(ct,_r),e(_r,xy),e(_r,br),e(br,jy),e(_r,Jy),e(ct,zy),e(ct,Eo),e(Eo,qc),e(qc,Cy),e(Eo,Iy),e(Eo,yr),e(yr,Uy),e(Eo,qy),e(Eo,vr),e(vr,Ny),e(Eo,Wy),e(ct,Zy),e(ct,xo),e(xo,Nc),e(Nc,Ay),e(xo,By),e(xo,Tr),e(Tr,Gy),e(xo,Vy),e(xo,kr),e(kr,Sy),e(xo,Py),e(ct,Xy),e(ct,jo),e(jo,Wc),e(Wc,Ly),e(jo,Qy),e(jo,wr),e(wr,Oy),e(jo,Dy),e(jo,Mr),e(Mr,Yy),e(jo,Hy),e(ct,Ky),e(ct,jh),e(jh,Zc),e(Zc,ev),g(l,wg,_),w($r,l,_),g(l,Mg,_),g(l,xt,_),e(xt,Jo),e(Jo,Ac),e(Ac,tv),e(Jo,ov),e(Jo,Fr),e(Fr,nv),e(Jo,sv),e(Jo,Rr),e(Rr,av),e(Jo,rv),e(xt,lv),e(xt,zo),e(zo,Bc),e(Bc,iv),e(zo,dv),e(zo,Er),e(Er,cv),e(zo,pv),e(zo,xr),e(xr,hv),e(zo,uv),e(xt,mv),e(xt,as),e(as,Gc),e(Gc,fv),e(as,gv),e(as,jr),e(jr,_v),e(as,bv),e(xt,yv),e(xt,Vc),e(Vc,Jr),e(Jr,vv),e(Vc,Tv),e(xt,kv),e(xt,Jh),e(Jh,Sc),e(Sc,wv),g(l,$g,_),w(zr,l,_),g(l,Fg,_),g(l,yt,_),e(yt,Cr),e(Cr,Mv),e(Cr,Ir),e(Ir,$v),e(Cr,Fv),e(yt,Rv),e(yt,Co),e(Co,Pc),e(Pc,Ev),e(Co,xv),e(Co,Ur),e(Ur,jv),e(Co,Jv),e(Co,qr),e(qr,zv),e(Co,Cv),e(yt,Iv),e(yt,Io),e(Io,Xc),e(Xc,Uv),e(Io,qv),e(Io,Nr),e(Nr,Nv),e(Io,Wv),e(Io,Wr),e(Wr,Zv),e(Io,Av),e(yt,Bv),e(yt,Uo),e(Uo,Lc),e(Lc,Gv),e(Uo,Vv),e(Uo,Zr),e(Zr,Sv),e(Uo,Pv),e(Uo,Ar),e(Ar,Xv),e(Uo,Lv),e(yt,Qv),e(yt,Qc),e(Qc,Br),e(Br,Ov),e(Qc,Dv),e(yt,Yv),e(yt,zh),e(zh,Oc),e(Oc,Hv),g(l,Rg,_),w(Gr,l,_),g(l,Eg,_),g(l,vt,_),e(vt,Vr),e(Vr,Kv),e(Vr,Sr),e(Sr,eT),e(Vr,tT),e(vt,oT),e(vt,qo),e(qo,Dc),e(Dc,nT),e(qo,sT),e(qo,Pr),e(Pr,aT),e(qo,rT),e(qo,Xr),e(Xr,lT),e(qo,iT),e(vt,dT),e(vt,No),e(No,Yc),e(Yc,cT),e(No,pT),e(No,Lr),e(Lr,hT),e(No,uT),e(No,Qr),e(Qr,mT),e(No,fT),e(vt,gT),e(vt,rs),e(rs,Hc),e(Hc,_T),e(rs,bT),e(rs,Or),e(Or,yT),e(rs,vT),e(vt,TT),e(vt,Kc),e(Kc,Dr),e(Dr,kT),e(Kc,wT),e(vt,MT),e(vt,Ch),e(Ch,ep),e(ep,$T),g(l,xg,_),g(l,tp,_),e(tp,Ih),e(Ih,FT),g(l,jg,_),g(l,Wo,_),e(Wo,Zo),e(Zo,op),e(op,RT),e(Zo,ET),e(Zo,Yr),e(Yr,xT),e(Zo,jT),e(Zo,Hr),e(Hr,JT),e(Zo,zT),e(Wo,CT),e(Wo,Ao),e(Ao,np),e(np,IT),e(Ao,UT),e(Ao,Kr),e(Kr,qT),e(Ao,NT),e(Ao,el),e(el,WT),e(Ao,ZT),e(Wo,AT),e(Wo,Uh),e(Uh,sp),e(sp,BT),g(l,Jg,_),g(l,nn,_),e(nn,ls),e(ls,qh),w(tl,qh,null),e(nn,GT),e(nn,Nh),e(Nh,VT),g(l,zg,_),g(l,Vt,_),w(ol,Vt,null),e(Vt,ST),e(Vt,_o),e(_o,PT),e(_o,ap),e(ap,XT),e(_o,LT),e(_o,rp),e(rp,QT),e(_o,OT),e(_o,nl),e(nl,DT),e(_o,YT),e(Vt,HT),e(Vt,sn),e(sn,KT),e(sn,lp),e(lp,ek),e(sn,tk),e(sn,ip),e(ip,ok),e(sn,nk),e(Vt,sk),w(is,Vt,null),g(l,Cg,_),g(l,an,_),e(an,ds),e(ds,Wh),w(sl,Wh,null),e(an,ak),e(an,Zh),e(Zh,rk),g(l,Ig,_),g(l,We,_),w(al,We,null),e(We,lk),e(We,Ah),e(Ah,ik),e(We,dk),e(We,Bh),e(Bh,ck),e(We,pk),w(cs,We,null),e(We,hk),e(We,rl),e(rl,uk),e(rl,Gh),e(Gh,mk),e(rl,fk),e(We,gk),w(ps,We,null),e(We,_k),e(We,ll),e(ll,bk),e(ll,dp),e(dp,yk),e(ll,vk),e(We,Tk),e(We,Bo),w(il,Bo,null),e(Bo,kk),e(Bo,Vh),e(Vh,wk),e(Bo,Mk),e(Bo,dl),e(dl,cp),e(cp,$k),e(cp,Sh),e(Sh,Fk),e(dl,Rk),e(dl,pp),e(pp,Ek),e(pp,Ph),e(Ph,xk),e(We,jk),e(We,hs),w(cl,hs,null),e(hs,Jk),e(hs,pl),e(pl,zk),e(pl,Xh),e(Xh,Ck),e(pl,Ik),e(We,Uk),e(We,us),w(hl,us,null),e(us,qk),e(us,Lh),e(Lh,Nk),e(We,Wk),e(We,hp),w(ul,hp,null),g(l,Ug,_),g(l,rn,_),e(rn,ms),e(ms,Qh),w(ml,Qh,null),e(rn,Zk),e(rn,Oh),e(Oh,Ak),g(l,qg,_),g(l,tt,_),w(fl,tt,null),e(tt,Bk),e(tt,gl),e(gl,Gk),e(gl,Dh),e(Dh,Vk),e(gl,Sk),e(tt,Pk),e(tt,Yh),e(Yh,Xk),e(tt,Lk),w(fs,tt,null),e(tt,Qk),e(tt,_l),e(_l,Ok),e(_l,Hh),e(Hh,Dk),e(_l,Yk),e(tt,Hk),w(gs,tt,null),e(tt,Kk),e(tt,bl),e(bl,ew),e(bl,up),e(up,tw),e(bl,ow),e(tt,nw),e(tt,mp),w(yl,mp,null),g(l,Ng,_),g(l,ln,_),e(ln,_s),e(_s,Kh),w(vl,Kh,null),e(ln,sw),e(ln,eu),e(eu,aw),g(l,Wg,_),g(l,ot,_),w(Tl,ot,null),e(ot,rw),e(ot,tu),e(tu,lw),e(ot,iw),e(ot,kl),e(kl,dw),e(kl,fp),e(fp,cw),e(kl,pw),e(ot,hw),e(ot,wl),e(wl,uw),e(wl,Ml),e(Ml,mw),e(wl,fw),e(ot,gw),e(ot,$l),e($l,_w),e($l,ou),e(ou,bw),e($l,yw),e(ot,vw),e(ot,pt),e(pt,Tw),e(pt,nu),e(nu,kw),e(pt,ww),e(pt,su),e(su,Mw),e(pt,$w),e(pt,au),e(au,Fw),e(pt,Rw),e(pt,ru),e(ru,Ew),e(pt,xw),e(pt,lu),e(lu,jw),e(pt,Jw),e(pt,iu),e(iu,zw),e(pt,Cw),e(ot,Iw),e(ot,bs),e(bs,Uw),e(bs,du),e(du,qw),e(bs,Nw),e(bs,Fl),e(Fl,Ww),e(ot,Zw),e(ot,Pt),w(Rl,Pt,null),e(Pt,Aw),e(Pt,dn),e(dn,Bw),e(dn,gp),e(gp,Gw),e(dn,Vw),e(dn,cu),e(cu,Sw),e(dn,Pw),e(Pt,Xw),w(ys,Pt,null),e(Pt,Lw),w(vs,Pt,null),g(l,Zg,_),g(l,cn,_),e(cn,Ts),e(Ts,pu),w(El,pu,null),e(cn,Qw),e(cn,hu),e(hu,Ow),g(l,Ag,_),g(l,wt,_),w(xl,wt,null),e(wt,Dw),e(wt,jl),e(jl,Yw),e(jl,uu),e(uu,Hw),e(jl,Kw),e(wt,eM),e(wt,Jl),e(Jl,tM),e(Jl,_p),e(_p,oM),e(Jl,nM),e(wt,sM),e(wt,zl),e(zl,aM),e(zl,Cl),e(Cl,rM),e(zl,lM),e(wt,iM),e(wt,Xt),w(Il,Xt,null),e(Xt,dM),e(Xt,pn),e(pn,cM),e(pn,bp),e(bp,pM),e(pn,hM),e(pn,mu),e(mu,uM),e(pn,mM),e(Xt,fM),w(ks,Xt,null),e(Xt,gM),w(ws,Xt,null),g(l,Bg,_),g(l,hn,_),e(hn,Ms),e(Ms,fu),w(Ul,fu,null),e(hn,_M),e(hn,gu),e(gu,bM),g(l,Gg,_),g(l,Mt,_),w(ql,Mt,null),e(Mt,yM),e(Mt,Nl),e(Nl,vM),e(Nl,_u),e(_u,TM),e(Nl,kM),e(Mt,wM),e(Mt,Wl),e(Wl,MM),e(Wl,yp),e(yp,$M),e(Wl,FM),e(Mt,RM),e(Mt,Zl),e(Zl,EM),e(Zl,Al),e(Al,xM),e(Zl,jM),e(Mt,JM),e(Mt,Lt),w(Bl,Lt,null),e(Lt,zM),e(Lt,un),e(un,CM),e(un,vp),e(vp,IM),e(un,UM),e(un,bu),e(bu,qM),e(un,NM),e(Lt,WM),w($s,Lt,null),e(Lt,ZM),w(Fs,Lt,null),g(l,Vg,_),g(l,mn,_),e(mn,Rs),e(Rs,yu),w(Gl,yu,null),e(mn,AM),e(mn,vu),e(vu,BM),g(l,Sg,_),g(l,$t,_),w(Vl,$t,null),e($t,GM),e($t,Tu),e(Tu,VM),e($t,SM),e($t,Sl),e(Sl,PM),e(Sl,Tp),e(Tp,XM),e(Sl,LM),e($t,QM),e($t,Pl),e(Pl,OM),e(Pl,Xl),e(Xl,DM),e(Pl,YM),e($t,HM),e($t,jt),w(Ll,jt,null),e(jt,KM),e(jt,fn),e(fn,e2),e(fn,kp),e(kp,t2),e(fn,o2),e(fn,ku),e(ku,n2),e(fn,s2),e(jt,a2),w(Es,jt,null),e(jt,r2),w(xs,jt,null),e(jt,l2),w(js,jt,null),g(l,Pg,_),g(l,gn,_),e(gn,Js),e(Js,wu),w(Ql,wu,null),e(gn,i2),e(gn,Mu),e(Mu,d2),g(l,Xg,_),g(l,Ft,_),w(Ol,Ft,null),e(Ft,c2),e(Ft,$u),e($u,p2),e(Ft,h2),e(Ft,Dl),e(Dl,u2),e(Dl,wp),e(wp,m2),e(Dl,f2),e(Ft,g2),e(Ft,Yl),e(Yl,_2),e(Yl,Hl),e(Hl,b2),e(Yl,y2),e(Ft,v2),e(Ft,Qt),w(Kl,Qt,null),e(Qt,T2),e(Qt,_n),e(_n,k2),e(_n,Mp),e(Mp,w2),e(_n,M2),e(_n,Fu),e(Fu,$2),e(_n,F2),e(Qt,R2),w(zs,Qt,null),e(Qt,E2),w(Cs,Qt,null),g(l,Lg,_),g(l,bn,_),e(bn,Is),e(Is,Ru),w(ei,Ru,null),e(bn,x2),e(bn,Eu),e(Eu,j2),g(l,Qg,_),g(l,Rt,_),w(ti,Rt,null),e(Rt,J2),e(Rt,xu),e(xu,z2),e(Rt,C2),e(Rt,oi),e(oi,I2),e(oi,$p),e($p,U2),e(oi,q2),e(Rt,N2),e(Rt,ni),e(ni,W2),e(ni,si),e(si,Z2),e(ni,A2),e(Rt,B2),e(Rt,Ot),w(ai,Ot,null),e(Ot,G2),e(Ot,yn),e(yn,V2),e(yn,Fp),e(Fp,S2),e(yn,P2),e(yn,ju),e(ju,X2),e(yn,L2),e(Ot,Q2),w(Us,Ot,null),e(Ot,O2),w(qs,Ot,null),g(l,Og,_),g(l,vn,_),e(vn,Ns),e(Ns,Ju),w(ri,Ju,null),e(vn,D2),e(vn,zu),e(zu,Y2),g(l,Dg,_),g(l,Et,_),w(li,Et,null),e(Et,H2),e(Et,Tn),e(Tn,K2),e(Tn,Cu),e(Cu,e1),e(Tn,t1),e(Tn,Iu),e(Iu,o1),e(Tn,n1),e(Et,s1),e(Et,ii),e(ii,a1),e(ii,Rp),e(Rp,r1),e(ii,l1),e(Et,i1),e(Et,di),e(di,d1),e(di,ci),e(ci,c1),e(di,p1),e(Et,h1),e(Et,Dt),w(pi,Dt,null),e(Dt,u1),e(Dt,kn),e(kn,m1),e(kn,Ep),e(Ep,f1),e(kn,g1),e(kn,Uu),e(Uu,_1),e(kn,b1),e(Dt,y1),w(Ws,Dt,null),e(Dt,v1),w(Zs,Dt,null),g(l,Yg,_),g(l,wn,_),e(wn,As),e(As,qu),w(hi,qu,null),e(wn,T1),e(wn,Nu),e(Nu,k1),g(l,Hg,_),g(l,ht,_),w(ui,ht,null),e(ht,w1),e(ht,Wu),e(Wu,M1),e(ht,$1),e(ht,mi),e(mi,F1),e(mi,xp),e(xp,R1),e(mi,E1),e(ht,x1),e(ht,fi),e(fi,j1),e(fi,gi),e(gi,J1),e(fi,z1),e(ht,C1),w(Bs,ht,null),e(ht,I1),e(ht,Yt),w(_i,Yt,null),e(Yt,U1),e(Yt,Mn),e(Mn,q1),e(Mn,jp),e(jp,N1),e(Mn,W1),e(Mn,Zu),e(Zu,Z1),e(Mn,A1),e(Yt,B1),w(Gs,Yt,null),e(Yt,G1),w(Vs,Yt,null),g(l,Kg,_),g(l,$n,_),e($n,Ss),e(Ss,Au),w(bi,Au,null),e($n,V1),e($n,Bu),e(Bu,S1),g(l,e_,_),g(l,Fn,_),w(yi,Fn,null),e(Fn,P1),e(Fn,Ht),w(vi,Ht,null),e(Ht,X1),e(Ht,Rn),e(Rn,L1),e(Rn,Jp),e(Jp,Q1),e(Rn,O1),e(Rn,Gu),e(Gu,D1),e(Rn,Y1),e(Ht,H1),w(Ps,Ht,null),e(Ht,K1),w(Xs,Ht,null),g(l,t_,_),g(l,En,_),e(En,Ls),e(Ls,Vu),w(Ti,Vu,null),e(En,e0),e(En,Su),e(Su,t0),g(l,o_,_),g(l,ut,_),w(ki,ut,null),e(ut,o0),e(ut,wi),e(wi,n0),e(wi,Pu),e(Pu,s0),e(wi,a0),e(ut,r0),e(ut,Mi),e(Mi,l0),e(Mi,zp),e(zp,i0),e(Mi,d0),e(ut,c0),e(ut,$i),e($i,p0),e($i,Fi),e(Fi,h0),e($i,u0),e(ut,m0),w(Qs,ut,null),e(ut,f0),e(ut,Jt),w(Ri,Jt,null),e(Jt,g0),e(Jt,xn),e(xn,_0),e(xn,Cp),e(Cp,b0),e(xn,y0),e(xn,Xu),e(Xu,v0),e(xn,T0),e(Jt,k0),w(Os,Jt,null),e(Jt,w0),w(Ds,Jt,null),e(Jt,M0),w(Ys,Jt,null),g(l,n_,_),g(l,jn,_),e(jn,Hs),e(Hs,Lu),w(Ei,Lu,null),e(jn,$0),e(jn,Qu),e(Qu,F0),g(l,s_,_),g(l,mt,_),w(xi,mt,null),e(mt,R0),e(mt,Ou),e(Ou,E0),e(mt,x0),e(mt,ji),e(ji,j0),e(ji,Ip),e(Ip,J0),e(ji,z0),e(mt,C0),e(mt,Ji),e(Ji,I0),e(Ji,zi),e(zi,U0),e(Ji,q0),e(mt,N0),w(Ks,mt,null),e(mt,W0),e(mt,zt),w(Ci,zt,null),e(zt,Z0),e(zt,Jn),e(Jn,A0),e(Jn,Up),e(Up,B0),e(Jn,G0),e(Jn,Du),e(Du,V0),e(Jn,S0),e(zt,P0),w(ea,zt,null),e(zt,X0),w(ta,zt,null),e(zt,L0),w(oa,zt,null),g(l,a_,_),g(l,zn,_),e(zn,na),e(na,Yu),w(Ii,Yu,null),e(zn,Q0),e(zn,Hu),e(Hu,O0),g(l,r_,_),g(l,ft,_),w(Ui,ft,null),e(ft,D0),e(ft,Ku),e(Ku,Y0),e(ft,H0),e(ft,qi),e(qi,K0),e(qi,qp),e(qp,e$),e(qi,t$),e(ft,o$),e(ft,Ni),e(Ni,n$),e(Ni,Wi),e(Wi,s$),e(Ni,a$),e(ft,r$),w(sa,ft,null),e(ft,l$),e(ft,Kt),w(Zi,Kt,null),e(Kt,i$),e(Kt,Cn),e(Cn,d$),e(Cn,Np),e(Np,c$),e(Cn,p$),e(Cn,em),e(em,h$),e(Cn,u$),e(Kt,m$),w(aa,Kt,null),e(Kt,f$),w(ra,Kt,null),g(l,l_,_),g(l,In,_),e(In,la),e(la,tm),w(Ai,tm,null),e(In,g$),e(In,om),e(om,_$),g(l,i_,_),g(l,gt,_),w(Bi,gt,null),e(gt,b$),e(gt,nm),e(nm,y$),e(gt,v$),e(gt,Gi),e(Gi,T$),e(Gi,Wp),e(Wp,k$),e(Gi,w$),e(gt,M$),e(gt,Vi),e(Vi,$$),e(Vi,Si),e(Si,F$),e(Vi,R$),e(gt,E$),w(ia,gt,null),e(gt,x$),e(gt,Ct),w(Pi,Ct,null),e(Ct,j$),e(Ct,Un),e(Un,J$),e(Un,Zp),e(Zp,z$),e(Un,C$),e(Un,sm),e(sm,I$),e(Un,U$),e(Ct,q$),w(da,Ct,null),e(Ct,N$),w(ca,Ct,null),e(Ct,W$),w(pa,Ct,null),g(l,d_,_),g(l,qn,_),e(qn,ha),e(ha,am),w(Xi,am,null),e(qn,Z$),e(qn,rm),e(rm,A$),g(l,c_,_),g(l,_t,_),w(Li,_t,null),e(_t,B$),e(_t,Nn),e(Nn,G$),e(Nn,lm),e(lm,V$),e(Nn,S$),e(Nn,im),e(im,P$),e(Nn,X$),e(_t,L$),e(_t,Qi),e(Qi,Q$),e(Qi,Ap),e(Ap,O$),e(Qi,D$),e(_t,Y$),e(_t,Oi),e(Oi,H$),e(Oi,Di),e(Di,K$),e(Oi,eF),e(_t,tF),w(ua,_t,null),e(_t,oF),e(_t,It),w(Yi,It,null),e(It,nF),e(It,Wn),e(Wn,sF),e(Wn,Bp),e(Bp,aF),e(Wn,rF),e(Wn,dm),e(dm,lF),e(Wn,iF),e(It,dF),w(ma,It,null),e(It,cF),w(fa,It,null),e(It,pF),w(ga,It,null),g(l,p_,_),g(l,Zn,_),e(Zn,_a),e(_a,cm),w(Hi,cm,null),e(Zn,hF),e(Zn,pm),e(pm,uF),g(l,h_,_),g(l,nt,_),w(Ki,nt,null),e(nt,mF),e(nt,hm),e(hm,fF),e(nt,gF),e(nt,ed),e(ed,_F),e(ed,Gp),e(Gp,bF),e(ed,yF),e(nt,vF),e(nt,td),e(td,TF),e(td,od),e(od,kF),e(td,wF),e(nt,MF),e(nt,um),e(um,$F),e(nt,FF),e(nt,bo),e(bo,mm),e(mm,nd),e(nd,RF),e(bo,EF),e(bo,fm),e(fm,sd),e(sd,xF),e(bo,jF),e(bo,gm),e(gm,ad),e(ad,JF),e(bo,zF),e(bo,_m),e(_m,rd),e(rd,CF),e(nt,IF),e(nt,eo),w(ld,eo,null),e(eo,UF),e(eo,An),e(An,qF),e(An,bm),e(bm,NF),e(An,WF),e(An,ym),e(ym,ZF),e(An,AF),e(eo,BF),w(ba,eo,null),e(eo,GF),w(ya,eo,null),g(l,u_,_),g(l,Bn,_),e(Bn,va),e(va,vm),w(id,vm,null),e(Bn,VF),e(Bn,Tm),e(Tm,SF),g(l,m_,_),g(l,st,_),w(dd,st,null),e(st,PF),e(st,km),e(km,XF),e(st,LF),e(st,cd),e(cd,QF),e(cd,Vp),e(Vp,OF),e(cd,DF),e(st,YF),e(st,pd),e(pd,HF),e(pd,hd),e(hd,KF),e(pd,eR),e(st,tR),e(st,wm),e(wm,oR),e(st,nR),e(st,yo),e(yo,Mm),e(Mm,ud),e(ud,sR),e(yo,aR),e(yo,$m),e($m,md),e(md,rR),e(yo,lR),e(yo,Fm),e(Fm,fd),e(fd,iR),e(yo,dR),e(yo,Rm),e(Rm,gd),e(gd,cR),e(st,pR),e(st,to),w(_d,to,null),e(to,hR),e(to,Gn),e(Gn,uR),e(Gn,Em),e(Em,mR),e(Gn,fR),e(Gn,xm),e(xm,gR),e(Gn,_R),e(to,bR),w(Ta,to,null),e(to,yR),w(ka,to,null),g(l,f_,_),g(l,Vn,_),e(Vn,wa),e(wa,jm),w(bd,jm,null),e(Vn,vR),e(Vn,Jm),e(Jm,TR),g(l,g_,_),g(l,at,_),w(yd,at,null),e(at,kR),e(at,vd),e(vd,wR),e(vd,zm),e(zm,MR),e(vd,$R),e(at,FR),e(at,Td),e(Td,RR),e(Td,Sp),e(Sp,ER),e(Td,xR),e(at,jR),e(at,kd),e(kd,JR),e(kd,wd),e(wd,zR),e(kd,CR),e(at,IR),e(at,Cm),e(Cm,UR),e(at,qR),e(at,vo),e(vo,Im),e(Im,Md),e(Md,NR),e(vo,WR),e(vo,Um),e(Um,$d),e($d,ZR),e(vo,AR),e(vo,qm),e(qm,Fd),e(Fd,BR),e(vo,GR),e(vo,Nm),e(Nm,Rd),e(Rd,VR),e(at,SR),e(at,oo),w(Ed,oo,null),e(oo,PR),e(oo,Sn),e(Sn,XR),e(Sn,Wm),e(Wm,LR),e(Sn,QR),e(Sn,Zm),e(Zm,OR),e(Sn,DR),e(oo,YR),w(Ma,oo,null),e(oo,HR),w($a,oo,null),g(l,__,_),g(l,Pn,_),e(Pn,Fa),e(Fa,Am),w(xd,Am,null),e(Pn,KR),e(Pn,Bm),e(Bm,eE),g(l,b_,_),g(l,rt,_),w(jd,rt,null),e(rt,tE),e(rt,Gm),e(Gm,oE),e(rt,nE),e(rt,Jd),e(Jd,sE),e(Jd,Pp),e(Pp,aE),e(Jd,rE),e(rt,lE),e(rt,zd),e(zd,iE),e(zd,Cd),e(Cd,dE),e(zd,cE),e(rt,pE),e(rt,Vm),e(Vm,hE),e(rt,uE),e(rt,To),e(To,Sm),e(Sm,Id),e(Id,mE),e(To,fE),e(To,Pm),e(Pm,Ud),e(Ud,gE),e(To,_E),e(To,Xm),e(Xm,qd),e(qd,bE),e(To,yE),e(To,Lm),e(Lm,Nd),e(Nd,vE),e(rt,TE),e(rt,no),w(Wd,no,null),e(no,kE),e(no,Xn),e(Xn,wE),e(Xn,Qm),e(Qm,ME),e(Xn,$E),e(Xn,Om),e(Om,FE),e(Xn,RE),e(no,EE),w(Ra,no,null),e(no,xE),w(Ea,no,null),g(l,y_,_),g(l,Ln,_),e(Ln,xa),e(xa,Dm),w(Zd,Dm,null),e(Ln,jE),e(Ln,Ym),e(Ym,JE),g(l,v_,_),g(l,lt,_),w(Ad,lt,null),e(lt,zE),e(lt,Hm),e(Hm,CE),e(lt,IE),e(lt,Bd),e(Bd,UE),e(Bd,Xp),e(Xp,qE),e(Bd,NE),e(lt,WE),e(lt,Gd),e(Gd,ZE),e(Gd,Vd),e(Vd,AE),e(Gd,BE),e(lt,GE),e(lt,Km),e(Km,VE),e(lt,SE),e(lt,ko),e(ko,ef),e(ef,Sd),e(Sd,PE),e(ko,XE),e(ko,tf),e(tf,Pd),e(Pd,LE),e(ko,QE),e(ko,of),e(of,Xd),e(Xd,OE),e(ko,DE),e(ko,nf),e(nf,Ld),e(Ld,YE),e(lt,HE),e(lt,so),w(Qd,so,null),e(so,KE),e(so,Qn),e(Qn,e4),e(Qn,sf),e(sf,t4),e(Qn,o4),e(Qn,af),e(af,n4),e(Qn,s4),e(so,a4),w(ja,so,null),e(so,r4),w(Ja,so,null),g(l,T_,_),g(l,On,_),e(On,za),e(za,rf),w(Od,rf,null),e(On,l4),e(On,lf),e(lf,i4),g(l,k_,_),g(l,it,_),w(Dd,it,null),e(it,d4),e(it,df),e(df,c4),e(it,p4),e(it,Yd),e(Yd,h4),e(Yd,Lp),e(Lp,u4),e(Yd,m4),e(it,f4),e(it,Hd),e(Hd,g4),e(Hd,Kd),e(Kd,_4),e(Hd,b4),e(it,y4),e(it,cf),e(cf,v4),e(it,T4),e(it,wo),e(wo,pf),e(pf,ec),e(ec,k4),e(wo,w4),e(wo,hf),e(hf,tc),e(tc,M4),e(wo,$4),e(wo,uf),e(uf,oc),e(oc,F4),e(wo,R4),e(wo,mf),e(mf,nc),e(nc,E4),e(it,x4),e(it,ao),w(sc,ao,null),e(ao,j4),e(ao,Dn),e(Dn,J4),e(Dn,ff),e(ff,z4),e(Dn,C4),e(Dn,gf),e(gf,I4),e(Dn,U4),e(ao,q4),w(Ca,ao,null),e(ao,N4),w(Ia,ao,null),g(l,w_,_),g(l,Yn,_),e(Yn,Ua),e(Ua,_f),w(ac,_f,null),e(Yn,W4),e(Yn,bf),e(bf,Z4),g(l,M_,_),g(l,dt,_),w(rc,dt,null),e(dt,A4),e(dt,Hn),e(Hn,B4),e(Hn,yf),e(yf,G4),e(Hn,V4),e(Hn,vf),e(vf,S4),e(Hn,P4),e(dt,X4),e(dt,lc),e(lc,L4),e(lc,Qp),e(Qp,Q4),e(lc,O4),e(dt,D4),e(dt,ic),e(ic,Y4),e(ic,dc),e(dc,H4),e(ic,K4),e(dt,ex),e(dt,Tf),e(Tf,tx),e(dt,ox),e(dt,Mo),e(Mo,kf),e(kf,cc),e(cc,nx),e(Mo,sx),e(Mo,wf),e(wf,pc),e(pc,ax),e(Mo,rx),e(Mo,Mf),e(Mf,hc),e(hc,lx),e(Mo,ix),e(Mo,$f),e($f,uc),e(uc,dx),e(dt,cx),e(dt,ro),w(mc,ro,null),e(ro,px),e(ro,Kn),e(Kn,hx),e(Kn,Ff),e(Ff,ux),e(Kn,mx),e(Kn,Rf),e(Rf,fx),e(Kn,gx),e(ro,_x),w(qa,ro,null),e(ro,bx),w(Na,ro,null),$_=!0},p(l,[_]){const fc={};_&2&&(fc.$$scope={dirty:_,ctx:l}),is.$set(fc);const Ef={};_&2&&(Ef.$$scope={dirty:_,ctx:l}),cs.$set(Ef);const xf={};_&2&&(xf.$$scope={dirty:_,ctx:l}),ps.$set(xf);const jf={};_&2&&(jf.$$scope={dirty:_,ctx:l}),fs.$set(jf);const es={};_&2&&(es.$$scope={dirty:_,ctx:l}),gs.$set(es);const Jf={};_&2&&(Jf.$$scope={dirty:_,ctx:l}),ys.$set(Jf);const zf={};_&2&&(zf.$$scope={dirty:_,ctx:l}),vs.$set(zf);const Cf={};_&2&&(Cf.$$scope={dirty:_,ctx:l}),ks.$set(Cf);const gc={};_&2&&(gc.$$scope={dirty:_,ctx:l}),ws.$set(gc);const If={};_&2&&(If.$$scope={dirty:_,ctx:l}),$s.$set(If);const Uf={};_&2&&(Uf.$$scope={dirty:_,ctx:l}),Fs.$set(Uf);const qf={};_&2&&(qf.$$scope={dirty:_,ctx:l}),Es.$set(qf);const ts={};_&2&&(ts.$$scope={dirty:_,ctx:l}),xs.$set(ts);const Nf={};_&2&&(Nf.$$scope={dirty:_,ctx:l}),js.$set(Nf);const Wf={};_&2&&(Wf.$$scope={dirty:_,ctx:l}),zs.$set(Wf);const Zf={};_&2&&(Zf.$$scope={dirty:_,ctx:l}),Cs.$set(Zf);const Af={};_&2&&(Af.$$scope={dirty:_,ctx:l}),Us.$set(Af);const Bf={};_&2&&(Bf.$$scope={dirty:_,ctx:l}),qs.$set(Bf);const Gf={};_&2&&(Gf.$$scope={dirty:_,ctx:l}),Ws.$set(Gf);const Vf={};_&2&&(Vf.$$scope={dirty:_,ctx:l}),Zs.$set(Vf);const St={};_&2&&(St.$$scope={dirty:_,ctx:l}),Bs.$set(St);const Sf={};_&2&&(Sf.$$scope={dirty:_,ctx:l}),Gs.$set(Sf);const _c={};_&2&&(_c.$$scope={dirty:_,ctx:l}),Vs.$set(_c);const Pf={};_&2&&(Pf.$$scope={dirty:_,ctx:l}),Ps.$set(Pf);const Xf={};_&2&&(Xf.$$scope={dirty:_,ctx:l}),Xs.$set(Xf);const Lf={};_&2&&(Lf.$$scope={dirty:_,ctx:l}),Qs.$set(Lf);const Qf={};_&2&&(Qf.$$scope={dirty:_,ctx:l}),Os.$set(Qf);const $o={};_&2&&($o.$$scope={dirty:_,ctx:l}),Ds.$set($o);const Of={};_&2&&(Of.$$scope={dirty:_,ctx:l}),Ys.$set(Of);const Df={};_&2&&(Df.$$scope={dirty:_,ctx:l}),Ks.$set(Df);const Yf={};_&2&&(Yf.$$scope={dirty:_,ctx:l}),ea.$set(Yf);const bc={};_&2&&(bc.$$scope={dirty:_,ctx:l}),ta.$set(bc);const Hf={};_&2&&(Hf.$$scope={dirty:_,ctx:l}),oa.$set(Hf);const Fo={};_&2&&(Fo.$$scope={dirty:_,ctx:l}),sa.$set(Fo);const Kf={};_&2&&(Kf.$$scope={dirty:_,ctx:l}),aa.$set(Kf);const eg={};_&2&&(eg.$$scope={dirty:_,ctx:l}),ra.$set(eg);const tg={};_&2&&(tg.$$scope={dirty:_,ctx:l}),ia.$set(tg);const og={};_&2&&(og.$$scope={dirty:_,ctx:l}),da.$set(og);const ng={};_&2&&(ng.$$scope={dirty:_,ctx:l}),ca.$set(ng);const Op={};_&2&&(Op.$$scope={dirty:_,ctx:l}),pa.$set(Op);const sg={};_&2&&(sg.$$scope={dirty:_,ctx:l}),ua.$set(sg);const os={};_&2&&(os.$$scope={dirty:_,ctx:l}),ma.$set(os);const ag={};_&2&&(ag.$$scope={dirty:_,ctx:l}),fa.$set(ag);const rg={};_&2&&(rg.$$scope={dirty:_,ctx:l}),ga.$set(rg);const yc={};_&2&&(yc.$$scope={dirty:_,ctx:l}),ba.$set(yc);const lg={};_&2&&(lg.$$scope={dirty:_,ctx:l}),ya.$set(lg);const ig={};_&2&&(ig.$$scope={dirty:_,ctx:l}),Ta.$set(ig);const dg={};_&2&&(dg.$$scope={dirty:_,ctx:l}),ka.$set(dg);const cg={};_&2&&(cg.$$scope={dirty:_,ctx:l}),Ma.$set(cg);const bt={};_&2&&(bt.$$scope={dirty:_,ctx:l}),$a.$set(bt);const ns={};_&2&&(ns.$$scope={dirty:_,ctx:l}),Ra.$set(ns);const pg={};_&2&&(pg.$$scope={dirty:_,ctx:l}),Ea.$set(pg);const hg={};_&2&&(hg.$$scope={dirty:_,ctx:l}),ja.$set(hg);const vc={};_&2&&(vc.$$scope={dirty:_,ctx:l}),Ja.$set(vc);const ug={};_&2&&(ug.$$scope={dirty:_,ctx:l}),Ca.$set(ug);const Tc={};_&2&&(Tc.$$scope={dirty:_,ctx:l}),Ia.$set(Tc);const mg={};_&2&&(mg.$$scope={dirty:_,ctx:l}),qa.$set(mg);const Go={};_&2&&(Go.$$scope={dirty:_,ctx:l}),Na.$set(Go)},i(l){$_||(M(i.$$.fragment,l),M(ie.$$.fragment,l),M(pr.$$.fragment,l),M(hr.$$.fragment,l),M($r.$$.fragment,l),M(zr.$$.fragment,l),M(Gr.$$.fragment,l),M(tl.$$.fragment,l),M(ol.$$.fragment,l),M(is.$$.fragment,l),M(sl.$$.fragment,l),M(al.$$.fragment,l),M(cs.$$.fragment,l),M(ps.$$.fragment,l),M(il.$$.fragment,l),M(cl.$$.fragment,l),M(hl.$$.fragment,l),M(ul.$$.fragment,l),M(ml.$$.fragment,l),M(fl.$$.fragment,l),M(fs.$$.fragment,l),M(gs.$$.fragment,l),M(yl.$$.fragment,l),M(vl.$$.fragment,l),M(Tl.$$.fragment,l),M(Rl.$$.fragment,l),M(ys.$$.fragment,l),M(vs.$$.fragment,l),M(El.$$.fragment,l),M(xl.$$.fragment,l),M(Il.$$.fragment,l),M(ks.$$.fragment,l),M(ws.$$.fragment,l),M(Ul.$$.fragment,l),M(ql.$$.fragment,l),M(Bl.$$.fragment,l),M($s.$$.fragment,l),M(Fs.$$.fragment,l),M(Gl.$$.fragment,l),M(Vl.$$.fragment,l),M(Ll.$$.fragment,l),M(Es.$$.fragment,l),M(xs.$$.fragment,l),M(js.$$.fragment,l),M(Ql.$$.fragment,l),M(Ol.$$.fragment,l),M(Kl.$$.fragment,l),M(zs.$$.fragment,l),M(Cs.$$.fragment,l),M(ei.$$.fragment,l),M(ti.$$.fragment,l),M(ai.$$.fragment,l),M(Us.$$.fragment,l),M(qs.$$.fragment,l),M(ri.$$.fragment,l),M(li.$$.fragment,l),M(pi.$$.fragment,l),M(Ws.$$.fragment,l),M(Zs.$$.fragment,l),M(hi.$$.fragment,l),M(ui.$$.fragment,l),M(Bs.$$.fragment,l),M(_i.$$.fragment,l),M(Gs.$$.fragment,l),M(Vs.$$.fragment,l),M(bi.$$.fragment,l),M(yi.$$.fragment,l),M(vi.$$.fragment,l),M(Ps.$$.fragment,l),M(Xs.$$.fragment,l),M(Ti.$$.fragment,l),M(ki.$$.fragment,l),M(Qs.$$.fragment,l),M(Ri.$$.fragment,l),M(Os.$$.fragment,l),M(Ds.$$.fragment,l),M(Ys.$$.fragment,l),M(Ei.$$.fragment,l),M(xi.$$.fragment,l),M(Ks.$$.fragment,l),M(Ci.$$.fragment,l),M(ea.$$.fragment,l),M(ta.$$.fragment,l),M(oa.$$.fragment,l),M(Ii.$$.fragment,l),M(Ui.$$.fragment,l),M(sa.$$.fragment,l),M(Zi.$$.fragment,l),M(aa.$$.fragment,l),M(ra.$$.fragment,l),M(Ai.$$.fragment,l),M(Bi.$$.fragment,l),M(ia.$$.fragment,l),M(Pi.$$.fragment,l),M(da.$$.fragment,l),M(ca.$$.fragment,l),M(pa.$$.fragment,l),M(Xi.$$.fragment,l),M(Li.$$.fragment,l),M(ua.$$.fragment,l),M(Yi.$$.fragment,l),M(ma.$$.fragment,l),M(fa.$$.fragment,l),M(ga.$$.fragment,l),M(Hi.$$.fragment,l),M(Ki.$$.fragment,l),M(ld.$$.fragment,l),M(ba.$$.fragment,l),M(ya.$$.fragment,l),M(id.$$.fragment,l),M(dd.$$.fragment,l),M(_d.$$.fragment,l),M(Ta.$$.fragment,l),M(ka.$$.fragment,l),M(bd.$$.fragment,l),M(yd.$$.fragment,l),M(Ed.$$.fragment,l),M(Ma.$$.fragment,l),M($a.$$.fragment,l),M(xd.$$.fragment,l),M(jd.$$.fragment,l),M(Wd.$$.fragment,l),M(Ra.$$.fragment,l),M(Ea.$$.fragment,l),M(Zd.$$.fragment,l),M(Ad.$$.fragment,l),M(Qd.$$.fragment,l),M(ja.$$.fragment,l),M(Ja.$$.fragment,l),M(Od.$$.fragment,l),M(Dd.$$.fragment,l),M(sc.$$.fragment,l),M(Ca.$$.fragment,l),M(Ia.$$.fragment,l),M(ac.$$.fragment,l),M(rc.$$.fragment,l),M(mc.$$.fragment,l),M(qa.$$.fragment,l),M(Na.$$.fragment,l),$_=!0)},o(l){$(i.$$.fragment,l),$(ie.$$.fragment,l),$(pr.$$.fragment,l),$(hr.$$.fragment,l),$($r.$$.fragment,l),$(zr.$$.fragment,l),$(Gr.$$.fragment,l),$(tl.$$.fragment,l),$(ol.$$.fragment,l),$(is.$$.fragment,l),$(sl.$$.fragment,l),$(al.$$.fragment,l),$(cs.$$.fragment,l),$(ps.$$.fragment,l),$(il.$$.fragment,l),$(cl.$$.fragment,l),$(hl.$$.fragment,l),$(ul.$$.fragment,l),$(ml.$$.fragment,l),$(fl.$$.fragment,l),$(fs.$$.fragment,l),$(gs.$$.fragment,l),$(yl.$$.fragment,l),$(vl.$$.fragment,l),$(Tl.$$.fragment,l),$(Rl.$$.fragment,l),$(ys.$$.fragment,l),$(vs.$$.fragment,l),$(El.$$.fragment,l),$(xl.$$.fragment,l),$(Il.$$.fragment,l),$(ks.$$.fragment,l),$(ws.$$.fragment,l),$(Ul.$$.fragment,l),$(ql.$$.fragment,l),$(Bl.$$.fragment,l),$($s.$$.fragment,l),$(Fs.$$.fragment,l),$(Gl.$$.fragment,l),$(Vl.$$.fragment,l),$(Ll.$$.fragment,l),$(Es.$$.fragment,l),$(xs.$$.fragment,l),$(js.$$.fragment,l),$(Ql.$$.fragment,l),$(Ol.$$.fragment,l),$(Kl.$$.fragment,l),$(zs.$$.fragment,l),$(Cs.$$.fragment,l),$(ei.$$.fragment,l),$(ti.$$.fragment,l),$(ai.$$.fragment,l),$(Us.$$.fragment,l),$(qs.$$.fragment,l),$(ri.$$.fragment,l),$(li.$$.fragment,l),$(pi.$$.fragment,l),$(Ws.$$.fragment,l),$(Zs.$$.fragment,l),$(hi.$$.fragment,l),$(ui.$$.fragment,l),$(Bs.$$.fragment,l),$(_i.$$.fragment,l),$(Gs.$$.fragment,l),$(Vs.$$.fragment,l),$(bi.$$.fragment,l),$(yi.$$.fragment,l),$(vi.$$.fragment,l),$(Ps.$$.fragment,l),$(Xs.$$.fragment,l),$(Ti.$$.fragment,l),$(ki.$$.fragment,l),$(Qs.$$.fragment,l),$(Ri.$$.fragment,l),$(Os.$$.fragment,l),$(Ds.$$.fragment,l),$(Ys.$$.fragment,l),$(Ei.$$.fragment,l),$(xi.$$.fragment,l),$(Ks.$$.fragment,l),$(Ci.$$.fragment,l),$(ea.$$.fragment,l),$(ta.$$.fragment,l),$(oa.$$.fragment,l),$(Ii.$$.fragment,l),$(Ui.$$.fragment,l),$(sa.$$.fragment,l),$(Zi.$$.fragment,l),$(aa.$$.fragment,l),$(ra.$$.fragment,l),$(Ai.$$.fragment,l),$(Bi.$$.fragment,l),$(ia.$$.fragment,l),$(Pi.$$.fragment,l),$(da.$$.fragment,l),$(ca.$$.fragment,l),$(pa.$$.fragment,l),$(Xi.$$.fragment,l),$(Li.$$.fragment,l),$(ua.$$.fragment,l),$(Yi.$$.fragment,l),$(ma.$$.fragment,l),$(fa.$$.fragment,l),$(ga.$$.fragment,l),$(Hi.$$.fragment,l),$(Ki.$$.fragment,l),$(ld.$$.fragment,l),$(ba.$$.fragment,l),$(ya.$$.fragment,l),$(id.$$.fragment,l),$(dd.$$.fragment,l),$(_d.$$.fragment,l),$(Ta.$$.fragment,l),$(ka.$$.fragment,l),$(bd.$$.fragment,l),$(yd.$$.fragment,l),$(Ed.$$.fragment,l),$(Ma.$$.fragment,l),$($a.$$.fragment,l),$(xd.$$.fragment,l),$(jd.$$.fragment,l),$(Wd.$$.fragment,l),$(Ra.$$.fragment,l),$(Ea.$$.fragment,l),$(Zd.$$.fragment,l),$(Ad.$$.fragment,l),$(Qd.$$.fragment,l),$(ja.$$.fragment,l),$(Ja.$$.fragment,l),$(Od.$$.fragment,l),$(Dd.$$.fragment,l),$(sc.$$.fragment,l),$(Ca.$$.fragment,l),$(Ia.$$.fragment,l),$(ac.$$.fragment,l),$(rc.$$.fragment,l),$(mc.$$.fragment,l),$(qa.$$.fragment,l),$(Na.$$.fragment,l),$_=!1},d(l){t(d),l&&t(y),l&&t(m),F(i),l&&t(K),l&&t(N),l&&t(Fe),l&&t(le),F(ie),l&&t(ne),l&&t(z),l&&t(Re),l&&t(I),l&&t(X),l&&t(me),l&&t(L),l&&t(fe),l&&t(Ee),l&&t(V),l&&t(se),l&&t(C),l&&t(bg),l&&t(Ro),l&&t(yg),l&&t(tn),F(pr),l&&t(vg),l&&t(Uc),l&&t(Tg),F(hr,l),l&&t(kg),l&&t(ct),l&&t(wg),F($r,l),l&&t(Mg),l&&t(xt),l&&t($g),F(zr,l),l&&t(Fg),l&&t(yt),l&&t(Rg),F(Gr,l),l&&t(Eg),l&&t(vt),l&&t(xg),l&&t(tp),l&&t(jg),l&&t(Wo),l&&t(Jg),l&&t(nn),F(tl),l&&t(zg),l&&t(Vt),F(ol),F(is),l&&t(Cg),l&&t(an),F(sl),l&&t(Ig),l&&t(We),F(al),F(cs),F(ps),F(il),F(cl),F(hl),F(ul),l&&t(Ug),l&&t(rn),F(ml),l&&t(qg),l&&t(tt),F(fl),F(fs),F(gs),F(yl),l&&t(Ng),l&&t(ln),F(vl),l&&t(Wg),l&&t(ot),F(Tl),F(Rl),F(ys),F(vs),l&&t(Zg),l&&t(cn),F(El),l&&t(Ag),l&&t(wt),F(xl),F(Il),F(ks),F(ws),l&&t(Bg),l&&t(hn),F(Ul),l&&t(Gg),l&&t(Mt),F(ql),F(Bl),F($s),F(Fs),l&&t(Vg),l&&t(mn),F(Gl),l&&t(Sg),l&&t($t),F(Vl),F(Ll),F(Es),F(xs),F(js),l&&t(Pg),l&&t(gn),F(Ql),l&&t(Xg),l&&t(Ft),F(Ol),F(Kl),F(zs),F(Cs),l&&t(Lg),l&&t(bn),F(ei),l&&t(Qg),l&&t(Rt),F(ti),F(ai),F(Us),F(qs),l&&t(Og),l&&t(vn),F(ri),l&&t(Dg),l&&t(Et),F(li),F(pi),F(Ws),F(Zs),l&&t(Yg),l&&t(wn),F(hi),l&&t(Hg),l&&t(ht),F(ui),F(Bs),F(_i),F(Gs),F(Vs),l&&t(Kg),l&&t($n),F(bi),l&&t(e_),l&&t(Fn),F(yi),F(vi),F(Ps),F(Xs),l&&t(t_),l&&t(En),F(Ti),l&&t(o_),l&&t(ut),F(ki),F(Qs),F(Ri),F(Os),F(Ds),F(Ys),l&&t(n_),l&&t(jn),F(Ei),l&&t(s_),l&&t(mt),F(xi),F(Ks),F(Ci),F(ea),F(ta),F(oa),l&&t(a_),l&&t(zn),F(Ii),l&&t(r_),l&&t(ft),F(Ui),F(sa),F(Zi),F(aa),F(ra),l&&t(l_),l&&t(In),F(Ai),l&&t(i_),l&&t(gt),F(Bi),F(ia),F(Pi),F(da),F(ca),F(pa),l&&t(d_),l&&t(qn),F(Xi),l&&t(c_),l&&t(_t),F(Li),F(ua),F(Yi),F(ma),F(fa),F(ga),l&&t(p_),l&&t(Zn),F(Hi),l&&t(h_),l&&t(nt),F(Ki),F(ld),F(ba),F(ya),l&&t(u_),l&&t(Bn),F(id),l&&t(m_),l&&t(st),F(dd),F(_d),F(Ta),F(ka),l&&t(f_),l&&t(Vn),F(bd),l&&t(g_),l&&t(at),F(yd),F(Ed),F(Ma),F($a),l&&t(__),l&&t(Pn),F(xd),l&&t(b_),l&&t(rt),F(jd),F(Wd),F(Ra),F(Ea),l&&t(y_),l&&t(Ln),F(Zd),l&&t(v_),l&&t(lt),F(Ad),F(Qd),F(ja),F(Ja),l&&t(T_),l&&t(On),F(Od),l&&t(k_),l&&t(it),F(Dd),F(sc),F(Ca),F(Ia),l&&t(w_),l&&t(Yn),F(ac),l&&t(M_),l&&t(dt),F(rc),F(mc),F(qa),F(Na)}}}const NU={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 WU(R){return JI(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class XU extends RI{constructor(d){super();EI(this,d,WU,qU,xI,{})}}export{XU as default,NU as metadata};
