import{S as R3,i as E3,s as x3,e as s,k as p,w as k,t as o,M as j3,c as a,d as t,m as h,a as r,x as v,h as n,b as c,N as Mj,G as e,g,y as w,q as M,o as $,B as F,v as J3,L as Me}from"../../chunks/vendor-hf-doc-builder.js";import{T as ve}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 z3(R){let d,y,u,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:"),u=p(),k(f.$$.fragment)},l(l){d=a(l,"P",{});var m=r(d);y=n(m,"Examples:"),m.forEach(t),u=h(l),v(f.$$.fragment,l)},m(l,m){g(l,d,m),e(d,y),g(l,u,m),w(f,l,m),b=!0},p:Me,i(l){b||(M(f.$$.fragment,l),b=!0)},o(l){$(f.$$.fragment,l),b=!1},d(l){l&&t(d),l&&t(u),F(f,l)}}}function C3(R){let d,y,u,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:"),u=p(),k(f.$$.fragment)},l(l){d=a(l,"P",{});var m=r(d);y=n(m,"be encoded differently whether it is at the beginning of the sentence (without space) or not:"),m.forEach(t),u=h(l),v(f.$$.fragment,l)},m(l,m){g(l,d,m),e(d,y),g(l,u,m),w(f,l,m),b=!0},p:Me,i(l){b||(M(f.$$.fragment,l),b=!0)},o(l){$(f.$$.fragment,l),b=!1},d(l){l&&t(d),l&&t(u),F(f,l)}}}function I3(R){let d,y,u,f,b;return{c(){d=s("p"),y=o("When used with "),u=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(l){d=a(l,"P",{});var m=r(d);y=n(m,"When used with "),u=a(m,"CODE",{});var E=r(u);f=n(E,"is_split_into_words=True"),E.forEach(t),b=n(m,", this tokenizer will add a space before each word (even the first one)."),m.forEach(t)},m(l,m){g(l,d,m),e(d,y),e(d,u),e(u,f),e(d,b)},d(l){l&&t(d)}}}function U3(R){let d,y,u,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:"),u=p(),k(f.$$.fragment)},l(l){d=a(l,"P",{});var m=r(d);y=n(m,"be encoded differently whether it is at the beginning of the sentence (without space) or not:"),m.forEach(t),u=h(l),v(f.$$.fragment,l)},m(l,m){g(l,d,m),e(d,y),g(l,u,m),w(f,l,m),b=!0},p:Me,i(l){b||(M(f.$$.fragment,l),b=!0)},o(l){$(f.$$.fragment,l),b=!1},d(l){l&&t(d),l&&t(u),F(f,l)}}}function q3(R){let d,y,u,f,b,l,m,E;return{c(){d=s("p"),y=o("When used with "),u=s("code"),f=o("is_split_into_words=True"),b=o(", this tokenizer needs to be instantiated with "),l=s("code"),m=o("add_prefix_space=True"),E=o(".")},l(ae){d=a(ae,"P",{});var K=r(d);y=n(K,"When used with "),u=a(K,"CODE",{});var N=r(u);f=n(N,"is_split_into_words=True"),N.forEach(t),b=n(K,", this tokenizer needs to be instantiated with "),l=a(K,"CODE",{});var re=r(l);m=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,u),e(u,f),e(d,b),e(d,l),e(l,m),e(d,E)},d(ae){ae&&t(d)}}}function N3(R){let d,y,u,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 "),u=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(l){d=a(l,"P",{});var m=r(d);y=n(m,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=a(m,"CODE",{});var E=r(u);f=n(E,"Module"),E.forEach(t),b=n(m,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),m.forEach(t)},m(l,m){g(l,d,m),e(d,y),e(d,u),e(u,f),e(d,b)},d(l){l&&t(d)}}}function W3(R){let d,y,u,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:"),u=p(),k(f.$$.fragment)},l(l){d=a(l,"P",{});var m=r(d);y=n(m,"Example:"),m.forEach(t),u=h(l),v(f.$$.fragment,l)},m(l,m){g(l,d,m),e(d,y),g(l,u,m),w(f,l,m),b=!0},p:Me,i(l){b||(M(f.$$.fragment,l),b=!0)},o(l){$(f.$$.fragment,l),b=!1},d(l){l&&t(d),l&&t(u),F(f,l)}}}function Z3(R){let d,y,u,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 "),u=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(l){d=a(l,"P",{});var m=r(d);y=n(m,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=a(m,"CODE",{});var E=r(u);f=n(E,"Module"),E.forEach(t),b=n(m,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),m.forEach(t)},m(l,m){g(l,d,m),e(d,y),e(d,u),e(u,f),e(d,b)},d(l){l&&t(d)}}}function A3(R){let d,y,u,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:"),u=p(),k(f.$$.fragment)},l(l){d=a(l,"P",{});var m=r(d);y=n(m,"Example:"),m.forEach(t),u=h(l),v(f.$$.fragment,l)},m(l,m){g(l,d,m),e(d,y),g(l,u,m),w(f,l,m),b=!0},p:Me,i(l){b||(M(f.$$.fragment,l),b=!0)},o(l){$(f.$$.fragment,l),b=!1},d(l){l&&t(d),l&&t(u),F(f,l)}}}function B3(R){let d,y,u,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 "),u=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(l){d=a(l,"P",{});var m=r(d);y=n(m,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=a(m,"CODE",{});var E=r(u);f=n(E,"Module"),E.forEach(t),b=n(m,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),m.forEach(t)},m(l,m){g(l,d,m),e(d,y),e(d,u),e(u,f),e(d,b)},d(l){l&&t(d)}}}function G3(R){let d,y,u,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:"),u=p(),k(f.$$.fragment)},l(l){d=a(l,"P",{});var m=r(d);y=n(m,"Example:"),m.forEach(t),u=h(l),v(f.$$.fragment,l)},m(l,m){g(l,d,m),e(d,y),g(l,u,m),w(f,l,m),b=!0},p:Me,i(l){b||(M(f.$$.fragment,l),b=!0)},o(l){$(f.$$.fragment,l),b=!1},d(l){l&&t(d),l&&t(u),F(f,l)}}}function V3(R){let d,y,u,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 "),u=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(l){d=a(l,"P",{});var m=r(d);y=n(m,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=a(m,"CODE",{});var E=r(u);f=n(E,"Module"),E.forEach(t),b=n(m,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),m.forEach(t)},m(l,m){g(l,d,m),e(d,y),e(d,u),e(u,f),e(d,b)},d(l){l&&t(d)}}}function S3(R){let d,y,u,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:"),u=p(),k(f.$$.fragment)},l(l){d=a(l,"P",{});var m=r(d);y=n(m,"Example of single-label classification:"),m.forEach(t),u=h(l),v(f.$$.fragment,l)},m(l,m){g(l,d,m),e(d,y),g(l,u,m),w(f,l,m),b=!0},p:Me,i(l){b||(M(f.$$.fragment,l),b=!0)},o(l){$(f.$$.fragment,l),b=!1},d(l){l&&t(d),l&&t(u),F(f,l)}}}function P3(R){let d,y,u,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:"),u=p(),k(f.$$.fragment)},l(l){d=a(l,"P",{});var m=r(d);y=n(m,"Example of multi-label classification:"),m.forEach(t),u=h(l),v(f.$$.fragment,l)},m(l,m){g(l,d,m),e(d,y),g(l,u,m),w(f,l,m),b=!0},p:Me,i(l){b||(M(f.$$.fragment,l),b=!0)},o(l){$(f.$$.fragment,l),b=!1},d(l){l&&t(d),l&&t(u),F(f,l)}}}function X3(R){let d,y,u,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 "),u=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(l){d=a(l,"P",{});var m=r(d);y=n(m,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=a(m,"CODE",{});var E=r(u);f=n(E,"Module"),E.forEach(t),b=n(m,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),m.forEach(t)},m(l,m){g(l,d,m),e(d,y),e(d,u),e(u,f),e(d,b)},d(l){l&&t(d)}}}function L3(R){let d,y,u,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:"),u=p(),k(f.$$.fragment)},l(l){d=a(l,"P",{});var m=r(d);y=n(m,"Example:"),m.forEach(t),u=h(l),v(f.$$.fragment,l)},m(l,m){g(l,d,m),e(d,y),g(l,u,m),w(f,l,m),b=!0},p:Me,i(l){b||(M(f.$$.fragment,l),b=!0)},o(l){$(f.$$.fragment,l),b=!1},d(l){l&&t(d),l&&t(u),F(f,l)}}}function Q3(R){let d,y,u,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 "),u=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(l){d=a(l,"P",{});var m=r(d);y=n(m,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=a(m,"CODE",{});var E=r(u);f=n(E,"Module"),E.forEach(t),b=n(m,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),m.forEach(t)},m(l,m){g(l,d,m),e(d,y),e(d,u),e(u,f),e(d,b)},d(l){l&&t(d)}}}function O3(R){let d,y,u,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:"),u=p(),k(f.$$.fragment)},l(l){d=a(l,"P",{});var m=r(d);y=n(m,"Example:"),m.forEach(t),u=h(l),v(f.$$.fragment,l)},m(l,m){g(l,d,m),e(d,y),g(l,u,m),w(f,l,m),b=!0},p:Me,i(l){b||(M(f.$$.fragment,l),b=!0)},o(l){$(f.$$.fragment,l),b=!1},d(l){l&&t(d),l&&t(u),F(f,l)}}}function D3(R){let d,y,u,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 "),u=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(l){d=a(l,"P",{});var m=r(d);y=n(m,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=a(m,"CODE",{});var E=r(u);f=n(E,"Module"),E.forEach(t),b=n(m,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),m.forEach(t)},m(l,m){g(l,d,m),e(d,y),e(d,u),e(u,f),e(d,b)},d(l){l&&t(d)}}}function Y3(R){let d,y,u,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:"),u=p(),k(f.$$.fragment)},l(l){d=a(l,"P",{});var m=r(d);y=n(m,"Example:"),m.forEach(t),u=h(l),v(f.$$.fragment,l)},m(l,m){g(l,d,m),e(d,y),g(l,u,m),w(f,l,m),b=!0},p:Me,i(l){b||(M(f.$$.fragment,l),b=!0)},o(l){$(f.$$.fragment,l),b=!1},d(l){l&&t(d),l&&t(u),F(f,l)}}}function H3(R){let d,y,u,f,b,l,m,E,ae,K,N,re,ee,x,xe,G,pe,Ae,Q,he,me,H,Fe,ie,B,_e,le,O,be,je,ne,z,U,de,D,Je,ce,Y,ze,Re,I,Ce,X,ue,Ie,L,fe,ye,Z,Ee,V,Ue,se,C,Te,q,qe,ge;return{c(){d=s("p"),y=o("TensorFlow models and layers in "),u=s("code"),f=o("transformers"),b=o(" accept two formats as input:"),l=p(),m=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()"),me=o(` supports! If, however, you want to use the second
format outside of Keras methods like `),H=s("code"),Fe=o("fit()"),ie=o(" and "),B=s("code"),_e=o("predict()"),le=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"),ue=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"),Te=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(T){d=a(T,"P",{});var j=r(d);y=n(j,"TensorFlow models and layers in "),u=a(j,"CODE",{});var Xe=r(u);f=n(Xe,"transformers"),Xe.forEach(t),b=n(j," accept two formats as input:"),j.forEach(t),l=h(T),m=a(T,"UL",{});var te=r(m);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(T),x=a(T,"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 ke=r(Q);he=n(ke,"model.fit()"),ke.forEach(t),me=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),ie=n(J," and "),B=a(J,"CODE",{});var Se=r(B);_e=n(Se,"predict()"),Se.forEach(t),le=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(T),z=a(T,"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);ue=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(T),C=a(T,"P",{});var oe=r(C);Te=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(T,j){g(T,d,j),e(d,y),e(d,u),e(u,f),e(d,b),g(T,l,j),g(T,m,j),e(m,E),e(E,ae),e(m,K),e(m,N),e(N,re),g(T,ee,j),g(T,x,j),e(x,xe),e(x,G),e(G,pe),e(x,Ae),e(x,Q),e(Q,he),e(x,me),e(x,H),e(H,Fe),e(x,ie),e(x,B),e(B,_e),e(x,le),e(x,O),e(O,be),e(x,je),g(T,ne,j),g(T,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,ue),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(T,se,j),g(T,C,j),e(C,Te),e(C,q),e(q,qe),e(C,ge)},d(T){T&&t(d),T&&t(l),T&&t(m),T&&t(ee),T&&t(x),T&&t(ne),T&&t(z),T&&t(se),T&&t(C)}}}function K3(R){let d,y,u,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 "),u=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(l){d=a(l,"P",{});var m=r(d);y=n(m,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=a(m,"CODE",{});var E=r(u);f=n(E,"Module"),E.forEach(t),b=n(m,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),m.forEach(t)},m(l,m){g(l,d,m),e(d,y),e(d,u),e(u,f),e(d,b)},d(l){l&&t(d)}}}function eU(R){let d,y,u,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:"),u=p(),k(f.$$.fragment)},l(l){d=a(l,"P",{});var m=r(d);y=n(m,"Example:"),m.forEach(t),u=h(l),v(f.$$.fragment,l)},m(l,m){g(l,d,m),e(d,y),g(l,u,m),w(f,l,m),b=!0},p:Me,i(l){b||(M(f.$$.fragment,l),b=!0)},o(l){$(f.$$.fragment,l),b=!1},d(l){l&&t(d),l&&t(u),F(f,l)}}}function tU(R){let d,y,u,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 "),u=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(l){d=a(l,"P",{});var m=r(d);y=n(m,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=a(m,"CODE",{});var E=r(u);f=n(E,"Module"),E.forEach(t),b=n(m,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),m.forEach(t)},m(l,m){g(l,d,m),e(d,y),e(d,u),e(u,f),e(d,b)},d(l){l&&t(d)}}}function oU(R){let d,y,u,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:"),u=p(),k(f.$$.fragment)},l(l){d=a(l,"P",{});var m=r(d);y=n(m,"Example:"),m.forEach(t),u=h(l),v(f.$$.fragment,l)},m(l,m){g(l,d,m),e(d,y),g(l,u,m),w(f,l,m),b=!0},p:Me,i(l){b||(M(f.$$.fragment,l),b=!0)},o(l){$(f.$$.fragment,l),b=!1},d(l){l&&t(d),l&&t(u),F(f,l)}}}function nU(R){let d,y,u,f,b,l,m,E,ae,K,N,re,ee,x,xe,G,pe,Ae,Q,he,me,H,Fe,ie,B,_e,le,O,be,je,ne,z,U,de,D,Je,ce,Y,ze,Re,I,Ce,X,ue,Ie,L,fe,ye,Z,Ee,V,Ue,se,C,Te,q,qe,ge;return{c(){d=s("p"),y=o("TensorFlow models and layers in "),u=s("code"),f=o("transformers"),b=o(" accept two formats as input:"),l=p(),m=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()"),me=o(` supports! If, however, you want to use the second
format outside of Keras methods like `),H=s("code"),Fe=o("fit()"),ie=o(" and "),B=s("code"),_e=o("predict()"),le=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"),ue=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"),Te=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(T){d=a(T,"P",{});var j=r(d);y=n(j,"TensorFlow models and layers in "),u=a(j,"CODE",{});var Xe=r(u);f=n(Xe,"transformers"),Xe.forEach(t),b=n(j," accept two formats as input:"),j.forEach(t),l=h(T),m=a(T,"UL",{});var te=r(m);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(T),x=a(T,"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 ke=r(Q);he=n(ke,"model.fit()"),ke.forEach(t),me=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),ie=n(J," and "),B=a(J,"CODE",{});var Se=r(B);_e=n(Se,"predict()"),Se.forEach(t),le=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(T),z=a(T,"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);ue=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(T),C=a(T,"P",{});var oe=r(C);Te=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(T,j){g(T,d,j),e(d,y),e(d,u),e(u,f),e(d,b),g(T,l,j),g(T,m,j),e(m,E),e(E,ae),e(m,K),e(m,N),e(N,re),g(T,ee,j),g(T,x,j),e(x,xe),e(x,G),e(G,pe),e(x,Ae),e(x,Q),e(Q,he),e(x,me),e(x,H),e(H,Fe),e(x,ie),e(x,B),e(B,_e),e(x,le),e(x,O),e(O,be),e(x,je),g(T,ne,j),g(T,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,ue),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(T,se,j),g(T,C,j),e(C,Te),e(C,q),e(q,qe),e(C,ge)},d(T){T&&t(d),T&&t(l),T&&t(m),T&&t(ee),T&&t(x),T&&t(ne),T&&t(z),T&&t(se),T&&t(C)}}}function sU(R){let d,y,u,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 "),u=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(l){d=a(l,"P",{});var m=r(d);y=n(m,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=a(m,"CODE",{});var E=r(u);f=n(E,"Module"),E.forEach(t),b=n(m,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),m.forEach(t)},m(l,m){g(l,d,m),e(d,y),e(d,u),e(u,f),e(d,b)},d(l){l&&t(d)}}}function aU(R){let d,y,u,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:"),u=p(),k(f.$$.fragment)},l(l){d=a(l,"P",{});var m=r(d);y=n(m,"Example:"),m.forEach(t),u=h(l),v(f.$$.fragment,l)},m(l,m){g(l,d,m),e(d,y),g(l,u,m),w(f,l,m),b=!0},p:Me,i(l){b||(M(f.$$.fragment,l),b=!0)},o(l){$(f.$$.fragment,l),b=!1},d(l){l&&t(d),l&&t(u),F(f,l)}}}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(){k(d.$$.fragment)},l(u){v(d.$$.fragment,u)},m(u,f){w(d,u,f),y=!0},p:Me,i(u){y||(M(d.$$.fragment,u),y=!0)},o(u){$(d.$$.fragment,u),y=!1},d(u){F(d,u)}}}function iU(R){let d,y,u,f,b,l,m,E,ae,K,N,re,ee,x,xe,G,pe,Ae,Q,he,me,H,Fe,ie,B,_e,le,O,be,je,ne,z,U,de,D,Je,ce,Y,ze,Re,I,Ce,X,ue,Ie,L,fe,ye,Z,Ee,V,Ue,se,C,Te,q,qe,ge;return{c(){d=s("p"),y=o("TensorFlow models and layers in "),u=s("code"),f=o("transformers"),b=o(" accept two formats as input:"),l=p(),m=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()"),me=o(` supports! If, however, you want to use the second
format outside of Keras methods like `),H=s("code"),Fe=o("fit()"),ie=o(" and "),B=s("code"),_e=o("predict()"),le=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"),ue=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"),Te=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(T){d=a(T,"P",{});var j=r(d);y=n(j,"TensorFlow models and layers in "),u=a(j,"CODE",{});var Xe=r(u);f=n(Xe,"transformers"),Xe.forEach(t),b=n(j," accept two formats as input:"),j.forEach(t),l=h(T),m=a(T,"UL",{});var te=r(m);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(T),x=a(T,"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 ke=r(Q);he=n(ke,"model.fit()"),ke.forEach(t),me=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),ie=n(J," and "),B=a(J,"CODE",{});var Se=r(B);_e=n(Se,"predict()"),Se.forEach(t),le=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(T),z=a(T,"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);ue=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(T),C=a(T,"P",{});var oe=r(C);Te=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(T,j){g(T,d,j),e(d,y),e(d,u),e(u,f),e(d,b),g(T,l,j),g(T,m,j),e(m,E),e(E,ae),e(m,K),e(m,N),e(N,re),g(T,ee,j),g(T,x,j),e(x,xe),e(x,G),e(G,pe),e(x,Ae),e(x,Q),e(Q,he),e(x,me),e(x,H),e(H,Fe),e(x,ie),e(x,B),e(B,_e),e(x,le),e(x,O),e(O,be),e(x,je),g(T,ne,j),g(T,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,ue),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(T,se,j),g(T,C,j),e(C,Te),e(C,q),e(q,qe),e(C,ge)},d(T){T&&t(d),T&&t(l),T&&t(m),T&&t(ee),T&&t(x),T&&t(ne),T&&t(z),T&&t(se),T&&t(C)}}}function lU(R){let d,y,u,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 "),u=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(l){d=a(l,"P",{});var m=r(d);y=n(m,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=a(m,"CODE",{});var E=r(u);f=n(E,"Module"),E.forEach(t),b=n(m,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),m.forEach(t)},m(l,m){g(l,d,m),e(d,y),e(d,u),e(u,f),e(d,b)},d(l){l&&t(d)}}}function dU(R){let d,y,u,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:"),u=p(),k(f.$$.fragment)},l(l){d=a(l,"P",{});var m=r(d);y=n(m,"Example:"),m.forEach(t),u=h(l),v(f.$$.fragment,l)},m(l,m){g(l,d,m),e(d,y),g(l,u,m),w(f,l,m),b=!0},p:Me,i(l){b||(M(f.$$.fragment,l),b=!0)},o(l){$(f.$$.fragment,l),b=!1},d(l){l&&t(d),l&&t(u),F(f,l)}}}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(){k(d.$$.fragment)},l(u){v(d.$$.fragment,u)},m(u,f){w(d,u,f),y=!0},p:Me,i(u){y||(M(d.$$.fragment,u),y=!0)},o(u){$(d.$$.fragment,u),y=!1},d(u){F(d,u)}}}function pU(R){let d,y,u,f,b,l,m,E,ae,K,N,re,ee,x,xe,G,pe,Ae,Q,he,me,H,Fe,ie,B,_e,le,O,be,je,ne,z,U,de,D,Je,ce,Y,ze,Re,I,Ce,X,ue,Ie,L,fe,ye,Z,Ee,V,Ue,se,C,Te,q,qe,ge;return{c(){d=s("p"),y=o("TensorFlow models and layers in "),u=s("code"),f=o("transformers"),b=o(" accept two formats as input:"),l=p(),m=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()"),me=o(` supports! If, however, you want to use the second
format outside of Keras methods like `),H=s("code"),Fe=o("fit()"),ie=o(" and "),B=s("code"),_e=o("predict()"),le=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"),ue=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"),Te=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(T){d=a(T,"P",{});var j=r(d);y=n(j,"TensorFlow models and layers in "),u=a(j,"CODE",{});var Xe=r(u);f=n(Xe,"transformers"),Xe.forEach(t),b=n(j," accept two formats as input:"),j.forEach(t),l=h(T),m=a(T,"UL",{});var te=r(m);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(T),x=a(T,"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 ke=r(Q);he=n(ke,"model.fit()"),ke.forEach(t),me=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),ie=n(J," and "),B=a(J,"CODE",{});var Se=r(B);_e=n(Se,"predict()"),Se.forEach(t),le=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(T),z=a(T,"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);ue=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(T),C=a(T,"P",{});var oe=r(C);Te=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(T,j){g(T,d,j),e(d,y),e(d,u),e(u,f),e(d,b),g(T,l,j),g(T,m,j),e(m,E),e(E,ae),e(m,K),e(m,N),e(N,re),g(T,ee,j),g(T,x,j),e(x,xe),e(x,G),e(G,pe),e(x,Ae),e(x,Q),e(Q,he),e(x,me),e(x,H),e(H,Fe),e(x,ie),e(x,B),e(B,_e),e(x,le),e(x,O),e(O,be),e(x,je),g(T,ne,j),g(T,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,ue),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(T,se,j),g(T,C,j),e(C,Te),e(C,q),e(q,qe),e(C,ge)},d(T){T&&t(d),T&&t(l),T&&t(m),T&&t(ee),T&&t(x),T&&t(ne),T&&t(z),T&&t(se),T&&t(C)}}}function hU(R){let d,y,u,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 "),u=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(l){d=a(l,"P",{});var m=r(d);y=n(m,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=a(m,"CODE",{});var E=r(u);f=n(E,"Module"),E.forEach(t),b=n(m,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),m.forEach(t)},m(l,m){g(l,d,m),e(d,y),e(d,u),e(u,f),e(d,b)},d(l){l&&t(d)}}}function mU(R){let d,y,u,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:"),u=p(),k(f.$$.fragment)},l(l){d=a(l,"P",{});var m=r(d);y=n(m,"Example:"),m.forEach(t),u=h(l),v(f.$$.fragment,l)},m(l,m){g(l,d,m),e(d,y),g(l,u,m),w(f,l,m),b=!0},p:Me,i(l){b||(M(f.$$.fragment,l),b=!0)},o(l){$(f.$$.fragment,l),b=!1},d(l){l&&t(d),l&&t(u),F(f,l)}}}function uU(R){let d,y,u,f,b,l,m,E,ae,K,N,re,ee,x,xe,G,pe,Ae,Q,he,me,H,Fe,ie,B,_e,le,O,be,je,ne,z,U,de,D,Je,ce,Y,ze,Re,I,Ce,X,ue,Ie,L,fe,ye,Z,Ee,V,Ue,se,C,Te,q,qe,ge;return{c(){d=s("p"),y=o("TensorFlow models and layers in "),u=s("code"),f=o("transformers"),b=o(" accept two formats as input:"),l=p(),m=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()"),me=o(` supports! If, however, you want to use the second
format outside of Keras methods like `),H=s("code"),Fe=o("fit()"),ie=o(" and "),B=s("code"),_e=o("predict()"),le=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"),ue=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"),Te=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(T){d=a(T,"P",{});var j=r(d);y=n(j,"TensorFlow models and layers in "),u=a(j,"CODE",{});var Xe=r(u);f=n(Xe,"transformers"),Xe.forEach(t),b=n(j," accept two formats as input:"),j.forEach(t),l=h(T),m=a(T,"UL",{});var te=r(m);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(T),x=a(T,"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 ke=r(Q);he=n(ke,"model.fit()"),ke.forEach(t),me=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),ie=n(J," and "),B=a(J,"CODE",{});var Se=r(B);_e=n(Se,"predict()"),Se.forEach(t),le=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(T),z=a(T,"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);ue=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(T),C=a(T,"P",{});var oe=r(C);Te=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(T,j){g(T,d,j),e(d,y),e(d,u),e(u,f),e(d,b),g(T,l,j),g(T,m,j),e(m,E),e(E,ae),e(m,K),e(m,N),e(N,re),g(T,ee,j),g(T,x,j),e(x,xe),e(x,G),e(G,pe),e(x,Ae),e(x,Q),e(Q,he),e(x,me),e(x,H),e(H,Fe),e(x,ie),e(x,B),e(B,_e),e(x,le),e(x,O),e(O,be),e(x,je),g(T,ne,j),g(T,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,ue),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(T,se,j),g(T,C,j),e(C,Te),e(C,q),e(q,qe),e(C,ge)},d(T){T&&t(d),T&&t(l),T&&t(m),T&&t(ee),T&&t(x),T&&t(ne),T&&t(z),T&&t(se),T&&t(C)}}}function fU(R){let d,y,u,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 "),u=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(l){d=a(l,"P",{});var m=r(d);y=n(m,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=a(m,"CODE",{});var E=r(u);f=n(E,"Module"),E.forEach(t),b=n(m,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),m.forEach(t)},m(l,m){g(l,d,m),e(d,y),e(d,u),e(u,f),e(d,b)},d(l){l&&t(d)}}}function gU(R){let d,y,u,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:"),u=p(),k(f.$$.fragment)},l(l){d=a(l,"P",{});var m=r(d);y=n(m,"Example:"),m.forEach(t),u=h(l),v(f.$$.fragment,l)},m(l,m){g(l,d,m),e(d,y),g(l,u,m),w(f,l,m),b=!0},p:Me,i(l){b||(M(f.$$.fragment,l),b=!0)},o(l){$(f.$$.fragment,l),b=!1},d(l){l&&t(d),l&&t(u),F(f,l)}}}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(){k(d.$$.fragment)},l(u){v(d.$$.fragment,u)},m(u,f){w(d,u,f),y=!0},p:Me,i(u){y||(M(d.$$.fragment,u),y=!0)},o(u){$(d.$$.fragment,u),y=!1},d(u){F(d,u)}}}function bU(R){let d,y,u,f,b,l,m,E,ae,K,N,re,ee,x,xe,G,pe,Ae,Q,he,me,H,Fe,ie,B,_e,le,O,be,je,ne,z,U,de,D,Je,ce,Y,ze,Re,I,Ce,X,ue,Ie,L,fe,ye,Z,Ee,V,Ue,se,C,Te,q,qe,ge;return{c(){d=s("p"),y=o("TensorFlow models and layers in "),u=s("code"),f=o("transformers"),b=o(" accept two formats as input:"),l=p(),m=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()"),me=o(` supports! If, however, you want to use the second
format outside of Keras methods like `),H=s("code"),Fe=o("fit()"),ie=o(" and "),B=s("code"),_e=o("predict()"),le=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"),ue=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"),Te=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(T){d=a(T,"P",{});var j=r(d);y=n(j,"TensorFlow models and layers in "),u=a(j,"CODE",{});var Xe=r(u);f=n(Xe,"transformers"),Xe.forEach(t),b=n(j," accept two formats as input:"),j.forEach(t),l=h(T),m=a(T,"UL",{});var te=r(m);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(T),x=a(T,"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 ke=r(Q);he=n(ke,"model.fit()"),ke.forEach(t),me=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),ie=n(J," and "),B=a(J,"CODE",{});var Se=r(B);_e=n(Se,"predict()"),Se.forEach(t),le=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(T),z=a(T,"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);ue=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(T),C=a(T,"P",{});var oe=r(C);Te=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(T,j){g(T,d,j),e(d,y),e(d,u),e(u,f),e(d,b),g(T,l,j),g(T,m,j),e(m,E),e(E,ae),e(m,K),e(m,N),e(N,re),g(T,ee,j),g(T,x,j),e(x,xe),e(x,G),e(G,pe),e(x,Ae),e(x,Q),e(Q,he),e(x,me),e(x,H),e(H,Fe),e(x,ie),e(x,B),e(B,_e),e(x,le),e(x,O),e(O,be),e(x,je),g(T,ne,j),g(T,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,ue),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(T,se,j),g(T,C,j),e(C,Te),e(C,q),e(q,qe),e(C,ge)},d(T){T&&t(d),T&&t(l),T&&t(m),T&&t(ee),T&&t(x),T&&t(ne),T&&t(z),T&&t(se),T&&t(C)}}}function yU(R){let d,y,u,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 "),u=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(l){d=a(l,"P",{});var m=r(d);y=n(m,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=a(m,"CODE",{});var E=r(u);f=n(E,"Module"),E.forEach(t),b=n(m,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),m.forEach(t)},m(l,m){g(l,d,m),e(d,y),e(d,u),e(u,f),e(d,b)},d(l){l&&t(d)}}}function TU(R){let d,y,u,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:"),u=p(),k(f.$$.fragment)},l(l){d=a(l,"P",{});var m=r(d);y=n(m,"Example:"),m.forEach(t),u=h(l),v(f.$$.fragment,l)},m(l,m){g(l,d,m),e(d,y),g(l,u,m),w(f,l,m),b=!0},p:Me,i(l){b||(M(f.$$.fragment,l),b=!0)},o(l){$(f.$$.fragment,l),b=!1},d(l){l&&t(d),l&&t(u),F(f,l)}}}function kU(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(){k(d.$$.fragment)},l(u){v(d.$$.fragment,u)},m(u,f){w(d,u,f),y=!0},p:Me,i(u){y||(M(d.$$.fragment,u),y=!0)},o(u){$(d.$$.fragment,u),y=!1},d(u){F(d,u)}}}function vU(R){let d,y,u,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 "),u=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(l){d=a(l,"P",{});var m=r(d);y=n(m,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=a(m,"CODE",{});var E=r(u);f=n(E,"Module"),E.forEach(t),b=n(m,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),m.forEach(t)},m(l,m){g(l,d,m),e(d,y),e(d,u),e(u,f),e(d,b)},d(l){l&&t(d)}}}function wU(R){let d,y,u,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:"),u=p(),k(f.$$.fragment)},l(l){d=a(l,"P",{});var m=r(d);y=n(m,"Example:"),m.forEach(t),u=h(l),v(f.$$.fragment,l)},m(l,m){g(l,d,m),e(d,y),g(l,u,m),w(f,l,m),b=!0},p:Me,i(l){b||(M(f.$$.fragment,l),b=!0)},o(l){$(f.$$.fragment,l),b=!1},d(l){l&&t(d),l&&t(u),F(f,l)}}}function MU(R){let d,y,u,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 "),u=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(l){d=a(l,"P",{});var m=r(d);y=n(m,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=a(m,"CODE",{});var E=r(u);f=n(E,"Module"),E.forEach(t),b=n(m,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),m.forEach(t)},m(l,m){g(l,d,m),e(d,y),e(d,u),e(u,f),e(d,b)},d(l){l&&t(d)}}}function $U(R){let d,y,u,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:"),u=p(),k(f.$$.fragment)},l(l){d=a(l,"P",{});var m=r(d);y=n(m,"Example:"),m.forEach(t),u=h(l),v(f.$$.fragment,l)},m(l,m){g(l,d,m),e(d,y),g(l,u,m),w(f,l,m),b=!0},p:Me,i(l){b||(M(f.$$.fragment,l),b=!0)},o(l){$(f.$$.fragment,l),b=!1},d(l){l&&t(d),l&&t(u),F(f,l)}}}function FU(R){let d,y,u,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 "),u=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(l){d=a(l,"P",{});var m=r(d);y=n(m,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=a(m,"CODE",{});var E=r(u);f=n(E,"Module"),E.forEach(t),b=n(m,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),m.forEach(t)},m(l,m){g(l,d,m),e(d,y),e(d,u),e(u,f),e(d,b)},d(l){l&&t(d)}}}function RU(R){let d,y,u,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:"),u=p(),k(f.$$.fragment)},l(l){d=a(l,"P",{});var m=r(d);y=n(m,"Example:"),m.forEach(t),u=h(l),v(f.$$.fragment,l)},m(l,m){g(l,d,m),e(d,y),g(l,u,m),w(f,l,m),b=!0},p:Me,i(l){b||(M(f.$$.fragment,l),b=!0)},o(l){$(f.$$.fragment,l),b=!1},d(l){l&&t(d),l&&t(u),F(f,l)}}}function EU(R){let d,y,u,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 "),u=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(l){d=a(l,"P",{});var m=r(d);y=n(m,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=a(m,"CODE",{});var E=r(u);f=n(E,"Module"),E.forEach(t),b=n(m,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),m.forEach(t)},m(l,m){g(l,d,m),e(d,y),e(d,u),e(u,f),e(d,b)},d(l){l&&t(d)}}}function xU(R){let d,y,u,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:"),u=p(),k(f.$$.fragment)},l(l){d=a(l,"P",{});var m=r(d);y=n(m,"Example:"),m.forEach(t),u=h(l),v(f.$$.fragment,l)},m(l,m){g(l,d,m),e(d,y),g(l,u,m),w(f,l,m),b=!0},p:Me,i(l){b||(M(f.$$.fragment,l),b=!0)},o(l){$(f.$$.fragment,l),b=!1},d(l){l&&t(d),l&&t(u),F(f,l)}}}function jU(R){let d,y,u,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 "),u=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(l){d=a(l,"P",{});var m=r(d);y=n(m,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=a(m,"CODE",{});var E=r(u);f=n(E,"Module"),E.forEach(t),b=n(m,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),m.forEach(t)},m(l,m){g(l,d,m),e(d,y),e(d,u),e(u,f),e(d,b)},d(l){l&&t(d)}}}function JU(R){let d,y,u,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:"),u=p(),k(f.$$.fragment)},l(l){d=a(l,"P",{});var m=r(d);y=n(m,"Example:"),m.forEach(t),u=h(l),v(f.$$.fragment,l)},m(l,m){g(l,d,m),e(d,y),g(l,u,m),w(f,l,m),b=!0},p:Me,i(l){b||(M(f.$$.fragment,l),b=!0)},o(l){$(f.$$.fragment,l),b=!1},d(l){l&&t(d),l&&t(u),F(f,l)}}}function zU(R){let d,y,u,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 "),u=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(l){d=a(l,"P",{});var m=r(d);y=n(m,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=a(m,"CODE",{});var E=r(u);f=n(E,"Module"),E.forEach(t),b=n(m,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),m.forEach(t)},m(l,m){g(l,d,m),e(d,y),e(d,u),e(u,f),e(d,b)},d(l){l&&t(d)}}}function CU(R){let d,y,u,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:"),u=p(),k(f.$$.fragment)},l(l){d=a(l,"P",{});var m=r(d);y=n(m,"Example:"),m.forEach(t),u=h(l),v(f.$$.fragment,l)},m(l,m){g(l,d,m),e(d,y),g(l,u,m),w(f,l,m),b=!0},p:Me,i(l){b||(M(f.$$.fragment,l),b=!0)},o(l){$(f.$$.fragment,l),b=!1},d(l){l&&t(d),l&&t(u),F(f,l)}}}function IU(R){let d,y,u,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 "),u=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(l){d=a(l,"P",{});var m=r(d);y=n(m,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=a(m,"CODE",{});var E=r(u);f=n(E,"Module"),E.forEach(t),b=n(m,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),m.forEach(t)},m(l,m){g(l,d,m),e(d,y),e(d,u),e(u,f),e(d,b)},d(l){l&&t(d)}}}function UU(R){let d,y,u,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:"),u=p(),k(f.$$.fragment)},l(l){d=a(l,"P",{});var m=r(d);y=n(m,"Example:"),m.forEach(t),u=h(l),v(f.$$.fragment,l)},m(l,m){g(l,d,m),e(d,y),g(l,u,m),w(f,l,m),b=!0},p:Me,i(l){b||(M(f.$$.fragment,l),b=!0)},o(l){$(f.$$.fragment,l),b=!1},d(l){l&&t(d),l&&t(u),F(f,l)}}}function qU(R){let d,y,u,f,b,l,m,E,ae,K,N,re,ee,x,xe,G,pe,Ae,Q,he,me,H,Fe,ie,B,_e,le,O,be,je,ne,z,U,de,D,Je,ce,Y,ze,Re,I,Ce,X,ue,Ie,L,fe,ye,Z,Ee,V,Ue,se,C,Te,q,qe,ge,T,j,Xe,te,Ge,Le,J,Ve,ke,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,iy,ly,Rh,Cc,Ic,dy,cy,bg,Ro,py,dr,hy,my,cr,uy,fy,yg,tn,ss,Eh,pr,gy,xh,_y,Tg,Uc,by,kg,hr,vg,ct,on,yy,mr,Ty,ky,ur,vy,wy,My,fr,$y,gr,Fy,Ry,Ey,_r,xy,br,jy,Jy,zy,Eo,qc,Cy,Iy,yr,Uy,qy,Tr,Ny,Wy,Zy,xo,Nc,Ay,By,kr,Gy,Vy,vr,Sy,Py,Xy,jo,Wc,Ly,Qy,wr,Oy,Dy,Mr,Yy,Hy,Ky,jh,Zc,eT,wg,$r,Mg,xt,Jo,Ac,tT,oT,Fr,nT,sT,Rr,aT,rT,iT,zo,Bc,lT,dT,Er,cT,pT,xr,hT,mT,uT,as,Gc,fT,gT,jr,_T,bT,yT,Vc,Jr,TT,kT,vT,Jh,Sc,wT,$g,zr,Fg,yt,Cr,MT,Ir,$T,FT,RT,Co,Pc,ET,xT,Ur,jT,JT,qr,zT,CT,IT,Io,Xc,UT,qT,Nr,NT,WT,Wr,ZT,AT,BT,Uo,Lc,GT,VT,Zr,ST,PT,Ar,XT,LT,QT,Qc,Br,OT,DT,YT,zh,Oc,HT,Rg,Gr,Eg,Tt,Vr,KT,Sr,ek,tk,ok,qo,Dc,nk,sk,Pr,ak,rk,Xr,ik,lk,dk,No,Yc,ck,pk,Lr,hk,mk,Qr,uk,fk,gk,rs,Hc,_k,bk,Or,yk,Tk,kk,Kc,Dr,vk,wk,Mk,Ch,ep,$k,xg,tp,Ih,Fk,jg,Wo,Zo,op,Rk,Ek,Yr,xk,jk,Hr,Jk,zk,Ck,Ao,np,Ik,Uk,Kr,qk,Nk,ei,Wk,Zk,Ak,Uh,sp,Bk,Jg,nn,is,qh,ti,Gk,Nh,Vk,zg,Vt,oi,Sk,_o,Pk,ap,Xk,Lk,rp,Qk,Ok,ni,Dk,Yk,Hk,sn,Kk,ip,ev,tv,lp,ov,nv,sv,ls,Cg,an,ds,Wh,si,av,Zh,rv,Ig,We,ai,iv,Ah,lv,dv,Bh,cv,pv,cs,hv,ri,mv,Gh,uv,fv,gv,ps,_v,ii,bv,dp,yv,Tv,kv,Bo,li,vv,Vh,wv,Mv,di,cp,$v,Sh,Fv,Rv,pp,Ev,Ph,xv,jv,hs,ci,Jv,pi,zv,Xh,Cv,Iv,Uv,ms,hi,qv,Lh,Nv,Wv,hp,mi,Ug,rn,us,Qh,ui,Zv,Oh,Av,qg,tt,fi,Bv,gi,Gv,Dh,Vv,Sv,Pv,Yh,Xv,Lv,fs,Qv,_i,Ov,Hh,Dv,Yv,Hv,gs,Kv,bi,ew,mp,tw,ow,nw,up,yi,Ng,ln,_s,Kh,Ti,sw,em,aw,Wg,ot,ki,rw,tm,iw,lw,vi,dw,fp,cw,pw,hw,wi,mw,Mi,uw,fw,gw,$i,_w,om,bw,yw,Tw,pt,kw,nm,vw,ww,sm,Mw,$w,am,Fw,Rw,rm,Ew,xw,im,jw,Jw,lm,zw,Cw,Iw,bs,Uw,dm,qw,Nw,Fi,Ww,Zw,Pt,Ri,Aw,dn,Bw,gp,Gw,Vw,cm,Sw,Pw,Xw,ys,Lw,Ts,Zg,cn,ks,pm,Ei,Qw,hm,Ow,Ag,wt,xi,Dw,ji,Yw,mm,Hw,Kw,eM,Ji,tM,_p,oM,nM,sM,zi,aM,Ci,rM,iM,lM,Xt,Ii,dM,pn,cM,bp,pM,hM,um,mM,uM,fM,vs,gM,ws,Bg,hn,Ms,fm,Ui,_M,gm,bM,Gg,Mt,qi,yM,Ni,TM,_m,kM,vM,wM,Wi,MM,yp,$M,FM,RM,Zi,EM,Ai,xM,jM,JM,Lt,Bi,zM,mn,CM,Tp,IM,UM,bm,qM,NM,WM,$s,ZM,Fs,Vg,un,Rs,ym,Gi,AM,Tm,BM,Sg,$t,Vi,GM,km,VM,SM,Si,PM,kp,XM,LM,QM,Pi,OM,Xi,DM,YM,HM,jt,Li,KM,fn,e1,vp,t1,o1,vm,n1,s1,a1,Es,r1,xs,i1,js,Pg,gn,Js,wm,Qi,l1,Mm,d1,Xg,Ft,Oi,c1,$m,p1,h1,Di,m1,wp,u1,f1,g1,Yi,_1,Hi,b1,y1,T1,Qt,Ki,k1,_n,v1,Mp,w1,M1,Fm,$1,F1,R1,zs,E1,Cs,Lg,bn,Is,Rm,el,x1,Em,j1,Qg,Rt,tl,J1,xm,z1,C1,ol,I1,$p,U1,q1,N1,nl,W1,sl,Z1,A1,B1,Ot,al,G1,yn,V1,Fp,S1,P1,jm,X1,L1,Q1,Us,O1,qs,Og,Tn,Ns,Jm,rl,D1,zm,Y1,Dg,Et,il,H1,kn,K1,Cm,e2,t2,Im,o2,n2,s2,ll,a2,Rp,r2,i2,l2,dl,d2,cl,c2,p2,h2,Dt,pl,m2,vn,u2,Ep,f2,g2,Um,_2,b2,y2,Ws,T2,Zs,Yg,wn,As,qm,hl,k2,Nm,v2,Hg,ht,ml,w2,Wm,M2,$2,ul,F2,xp,R2,E2,x2,fl,j2,gl,J2,z2,C2,Bs,I2,Yt,_l,U2,Mn,q2,jp,N2,W2,Zm,Z2,A2,B2,Gs,G2,Vs,Kg,$n,Ss,Am,bl,V2,Bm,S2,e_,Fn,yl,P2,Ht,Tl,X2,Rn,L2,Jp,Q2,O2,Gm,D2,Y2,H2,Ps,K2,Xs,t_,En,Ls,Vm,kl,e0,Sm,t0,o_,mt,vl,o0,wl,n0,Pm,s0,a0,r0,Ml,i0,zp,l0,d0,c0,$l,p0,Fl,h0,m0,u0,Qs,f0,Jt,Rl,g0,xn,_0,Cp,b0,y0,Xm,T0,k0,v0,Os,w0,Ds,M0,Ys,n_,jn,Hs,Lm,El,$0,Qm,F0,s_,ut,xl,R0,Om,E0,x0,jl,j0,Ip,J0,z0,C0,Jl,I0,zl,U0,q0,N0,Ks,W0,zt,Cl,Z0,Jn,A0,Up,B0,G0,Dm,V0,S0,P0,ea,X0,ta,L0,oa,a_,zn,na,Ym,Il,Q0,Hm,O0,r_,ft,Ul,D0,Km,Y0,H0,ql,K0,qp,e$,t$,o$,Nl,n$,Wl,s$,a$,r$,sa,i$,Kt,Zl,l$,Cn,d$,Np,c$,p$,eu,h$,m$,u$,aa,f$,ra,i_,In,ia,tu,Al,g$,ou,_$,l_,gt,Bl,b$,nu,y$,T$,Gl,k$,Wp,v$,w$,M$,Vl,$$,Sl,F$,R$,E$,la,x$,Ct,Pl,j$,Un,J$,Zp,z$,C$,su,I$,U$,q$,da,N$,ca,W$,pa,d_,qn,ha,au,Xl,Z$,ru,A$,c_,_t,Ll,B$,Nn,G$,iu,V$,S$,lu,P$,X$,L$,Ql,Q$,Ap,O$,D$,Y$,Ol,H$,Dl,K$,eF,tF,ma,oF,It,Yl,nF,Wn,sF,Bp,aF,rF,du,iF,lF,dF,ua,cF,fa,pF,ga,p_,Zn,_a,cu,Hl,hF,pu,mF,h_,nt,Kl,uF,hu,fF,gF,ed,_F,Gp,bF,yF,TF,td,kF,od,vF,wF,MF,mu,$F,FF,bo,uu,nd,RF,EF,fu,sd,xF,jF,gu,ad,JF,zF,_u,rd,CF,IF,eo,id,UF,An,qF,bu,NF,WF,yu,ZF,AF,BF,ba,GF,ya,m_,Bn,Ta,Tu,ld,VF,ku,SF,u_,st,dd,PF,vu,XF,LF,cd,QF,Vp,OF,DF,YF,pd,HF,hd,KF,eR,tR,wu,oR,nR,yo,Mu,md,sR,aR,$u,ud,rR,iR,Fu,fd,lR,dR,Ru,gd,cR,pR,to,_d,hR,Gn,mR,Eu,uR,fR,xu,gR,_R,bR,ka,yR,va,f_,Vn,wa,ju,bd,TR,Ju,kR,g_,at,yd,vR,Td,wR,zu,MR,$R,FR,kd,RR,Sp,ER,xR,jR,vd,JR,wd,zR,CR,IR,Cu,UR,qR,To,Iu,Md,NR,WR,Uu,$d,ZR,AR,qu,Fd,BR,GR,Nu,Rd,VR,SR,oo,Ed,PR,Sn,XR,Wu,LR,QR,Zu,OR,DR,YR,Ma,HR,$a,__,Pn,Fa,Au,xd,KR,Bu,eE,b_,rt,jd,tE,Gu,oE,nE,Jd,sE,Pp,aE,rE,iE,zd,lE,Cd,dE,cE,pE,Vu,hE,mE,ko,Su,Id,uE,fE,Pu,Ud,gE,_E,Xu,qd,bE,yE,Lu,Nd,TE,kE,no,Wd,vE,Xn,wE,Qu,ME,$E,Ou,FE,RE,EE,Ra,xE,Ea,y_,Ln,xa,Du,Zd,jE,Yu,JE,T_,it,Ad,zE,Hu,CE,IE,Bd,UE,Xp,qE,NE,WE,Gd,ZE,Vd,AE,BE,GE,Ku,VE,SE,vo,ef,Sd,PE,XE,tf,Pd,LE,QE,of,Xd,OE,DE,nf,Ld,YE,HE,so,Qd,KE,Qn,ex,sf,tx,ox,af,nx,sx,ax,ja,rx,Ja,k_,On,za,rf,Od,ix,lf,lx,v_,lt,Dd,dx,df,cx,px,Yd,hx,Lp,mx,ux,fx,Hd,gx,Kd,_x,bx,yx,cf,Tx,kx,wo,pf,ec,vx,wx,hf,tc,Mx,$x,mf,oc,Fx,Rx,uf,nc,Ex,xx,ao,sc,jx,Dn,Jx,ff,zx,Cx,gf,Ix,Ux,qx,Ca,Nx,Ia,w_,Yn,Ua,_f,ac,Wx,bf,Zx,M_,dt,rc,Ax,Hn,Bx,yf,Gx,Vx,Tf,Sx,Px,Xx,ic,Lx,Qp,Qx,Ox,Dx,lc,Yx,dc,Hx,Kx,ej,kf,tj,oj,Mo,vf,cc,nj,sj,wf,pc,aj,rj,Mf,hc,ij,lj,$f,mc,dj,cj,ro,uc,pj,Kn,hj,Ff,mj,uj,Rf,fj,gj,_j,qa,bj,Na,$_;return l=new Ze({}),le=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"}}),ti=new Ze({}),oi=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/main/en/model_doc/roberta#transformers.RobertaModel">RobertaModel</a> or <a href="/docs/transformers/main/en/model_doc/roberta#transformers.TFRobertaModel">TFRobertaModel</a>.`,name:"vocab_size"},{anchor:"transformers.RobertaConfig.hidden_size",description:`<strong>hidden_size</strong> (<code>int</code>, <em>optional</em>, defaults to 768) &#x2014;
Dimensionality of the encoder layers and the pooler layer.`,name:"hidden_size"},{anchor:"transformers.RobertaConfig.num_hidden_layers",description:`<strong>num_hidden_layers</strong> (<code>int</code>, <em>optional</em>, defaults to 12) &#x2014;
Number of hidden layers in the Transformer encoder.`,name:"num_hidden_layers"},{anchor:"transformers.RobertaConfig.num_attention_heads",description:`<strong>num_attention_heads</strong> (<code>int</code>, <em>optional</em>, defaults to 12) &#x2014;
Number of attention heads for each attention layer in the Transformer encoder.`,name:"num_attention_heads"},{anchor:"transformers.RobertaConfig.intermediate_size",description:`<strong>intermediate_size</strong> (<code>int</code>, <em>optional</em>, defaults to 3072) &#x2014;
Dimensionality of the &#x201C;intermediate&#x201D; (often named feed-forward) layer in the Transformer encoder.`,name:"intermediate_size"},{anchor:"transformers.RobertaConfig.hidden_act",description:`<strong>hidden_act</strong> (<code>str</code> or <code>Callable</code>, <em>optional</em>, defaults to <code>&quot;gelu&quot;</code>) &#x2014;
The non-linear activation function (function or string) in the encoder and pooler. If string, <code>&quot;gelu&quot;</code>,
<code>&quot;relu&quot;</code>, <code>&quot;silu&quot;</code> and <code>&quot;gelu_new&quot;</code> are supported.`,name:"hidden_act"},{anchor:"transformers.RobertaConfig.hidden_dropout_prob",description:`<strong>hidden_dropout_prob</strong> (<code>float</code>, <em>optional</em>, defaults to 0.1) &#x2014;
The dropout probability for all fully connected layers in the embeddings, encoder, and pooler.`,name:"hidden_dropout_prob"},{anchor:"transformers.RobertaConfig.attention_probs_dropout_prob",description:`<strong>attention_probs_dropout_prob</strong> (<code>float</code>, <em>optional</em>, defaults to 0.1) &#x2014;
The dropout ratio for the attention probabilities.`,name:"attention_probs_dropout_prob"},{anchor:"transformers.RobertaConfig.max_position_embeddings",description:`<strong>max_position_embeddings</strong> (<code>int</code>, <em>optional</em>, defaults to 512) &#x2014;
The maximum sequence length that this model might ever be used with. Typically set this to something large
just in case (e.g., 512 or 1024 or 2048).`,name:"max_position_embeddings"},{anchor:"transformers.RobertaConfig.type_vocab_size",description:`<strong>type_vocab_size</strong> (<code>int</code>, <em>optional</em>, defaults to 2) &#x2014;
The vocabulary size of the <code>token_type_ids</code> passed when calling <a href="/docs/transformers/main/en/model_doc/roberta#transformers.RobertaModel">RobertaModel</a> or <a href="/docs/transformers/main/en/model_doc/roberta#transformers.TFRobertaModel">TFRobertaModel</a>.`,name:"type_vocab_size"},{anchor:"transformers.RobertaConfig.initializer_range",description:`<strong>initializer_range</strong> (<code>float</code>, <em>optional</em>, defaults to 0.02) &#x2014;
The standard deviation of the truncated_normal_initializer for initializing all weight matrices.`,name:"initializer_range"},{anchor:"transformers.RobertaConfig.layer_norm_eps",description:`<strong>layer_norm_eps</strong> (<code>float</code>, <em>optional</em>, defaults to 1e-12) &#x2014;
The epsilon used by the layer normalization layers.`,name:"layer_norm_eps"},{anchor:"transformers.RobertaConfig.position_embedding_type",description:`<strong>position_embedding_type</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;absolute&quot;</code>) &#x2014;
Type of position embedding. Choose one of <code>&quot;absolute&quot;</code>, <code>&quot;relative_key&quot;</code>, <code>&quot;relative_key_query&quot;</code>. For
positional embeddings use <code>&quot;absolute&quot;</code>. For more information on <code>&quot;relative_key&quot;</code>, please refer to
<a href="https://arxiv.org/abs/1803.02155" rel="nofollow">Self-Attention with Relative Position Representations (Shaw et al.)</a>.
For more information on <code>&quot;relative_key_query&quot;</code>, please refer to <em>Method 4</em> in <a href="https://arxiv.org/abs/2009.13658" rel="nofollow">Improve Transformer Models
with Better Relative Position Embeddings (Huang et al.)</a>.`,name:"position_embedding_type"},{anchor:"transformers.RobertaConfig.is_decoder",description:`<strong>is_decoder</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether the model is used as a decoder or not. If <code>False</code>, the model is used as an encoder.`,name:"is_decoder"},{anchor:"transformers.RobertaConfig.use_cache",description:`<strong>use_cache</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not the model should return the last key/values attentions (not used by all models). Only
relevant if <code>config.is_decoder=True</code>.`,name:"use_cache"},{anchor:"transformers.RobertaConfig.classifier_dropout",description:`<strong>classifier_dropout</strong> (<code>float</code>, <em>optional</em>) &#x2014;
The dropout ratio for the classification head.`,name:"classifier_dropout"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/roberta/configuration_roberta.py#L37"}}),ls=new we({props:{anchor:"transformers.RobertaConfig.example",$$slots:{default:[z3]},$$scope:{ctx:R}}}),si=new Ze({}),ai=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/main/src/transformers/models/roberta/tokenization_roberta.py#L107"}}),cs=new we({props:{anchor:"transformers.RobertaTokenizer.example",$$slots:{default:[C3]},$$scope:{ctx:R}}}),ps=new ve({props:{$$slots:{default:[I3]},$$scope:{ctx:R}}}),li=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/main/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>
`}}),ci=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/main/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>
`}}),hi=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/main/src/transformers/models/roberta/tokenization_roberta.py#L398",returnDescription:`
<p>List of zeros.</p>
`,returnType:`
<p><code>List[int]</code></p>
`}}),mi=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/main/src/transformers/models/roberta/tokenization_roberta.py#L317"}}),ui=new Ze({}),fi=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/main/src/transformers/models/roberta/tokenization_roberta_fast.py#L76"}}),fs=new we({props:{anchor:"transformers.RobertaTokenizerFast.example",$$slots:{default:[U3]},$$scope:{ctx:R}}}),gs=new ve({props:{$$slots:{default:[q3]},$$scope:{ctx:R}}}),yi=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/main/src/transformers/models/roberta/tokenization_roberta_fast.py#L281"}}),Ti=new Ze({}),ki=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/main/en/model_doc/roberta#transformers.RobertaConfig">RobertaConfig</a>) &#x2014; Model configuration class with all the parameters of the
model. Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/roberta/modeling_roberta.py#L691"}}),Ri=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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.RobertaModel.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.RobertaModel.forward.token_type_ids",description:`<strong>token_type_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0,1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.
This parameter can only be used when the model is initialized with <code>type_vocab_size</code> parameter with value<blockquote>
<p>= 2. All the value in this tensor should be always &lt; type_vocab_size.</p>
</blockquote></li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.RobertaModel.forward.position_ids",description:`<strong>position_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.RobertaModel.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.RobertaModel.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.RobertaModel.forward.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.RobertaModel.forward.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.RobertaModel.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.RobertaModel.forward.encoder_hidden_states",description:`<strong>encoder_hidden_states</strong>  (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Sequence of hidden-states at the output of the last layer of the encoder. Used in the cross-attention if
the model is configured as a decoder.`,name:"encoder_hidden_states"},{anchor:"transformers.RobertaModel.forward.encoder_attention_mask",description:`<strong>encoder_attention_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on the padding token indices of the encoder input. This mask is used in
the cross-attention if the model is configured as a decoder. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>`,name:"encoder_attention_mask"},{anchor:"transformers.RobertaModel.forward.past_key_values",description:`<strong>past_key_values</strong> (<code>tuple(tuple(torch.FloatTensor))</code> of length <code>config.n_layers</code> with each tuple having 4 tensors of shape <code>(batch_size, num_heads, sequence_length - 1, embed_size_per_head)</code>) &#x2014;
Contains precomputed key and value hidden states of the attention blocks. Can be used to speed up decoding.</p>
<p>If <code>past_key_values</code> are used, the user can optionally input only the last <code>decoder_input_ids</code> (those that
don&#x2019;t have their past key value states given to this model) of shape <code>(batch_size, 1)</code> instead of all
<code>decoder_input_ids</code> of shape <code>(batch_size, sequence_length)</code>.`,name:"past_key_values"},{anchor:"transformers.RobertaModel.forward.use_cache",description:`<strong>use_cache</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
If set to <code>True</code>, <code>past_key_values</code> key value states are returned and can be used to speed up decoding (see
<code>past_key_values</code>).`,name:"use_cache"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/roberta/modeling_roberta.py#L734",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.BaseModelOutputWithPoolingAndCrossAttentions"
>transformers.modeling_outputs.BaseModelOutputWithPoolingAndCrossAttentions</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/main/en/model_doc/roberta#transformers.RobertaConfig"
>RobertaConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>last_hidden_state</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>) \u2014 Sequence of hidden-states at the output of the last layer of the model.</p>
</li>
<li>
<p><strong>pooler_output</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, hidden_size)</code>) \u2014 Last layer hidden-state of the first token of the sequence (classification token) after further processing
through the layers used for the auxiliary pretraining task. E.g. for BERT-family of models, this returns
the classification token after processing through a linear layer and a tanh activation function. The linear
layer weights are trained from the next sentence prediction (classification) objective during pretraining.</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
<li>
<p><strong>cross_attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> and <code>config.add_cross_attention=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights of the decoder\u2019s cross-attention layer, after the attention softmax, used to compute the
weighted average in the cross-attention heads.</p>
</li>
<li>
<p><strong>past_key_values</strong> (<code>tuple(tuple(torch.FloatTensor))</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) \u2014 Tuple of <code>tuple(torch.FloatTensor)</code> of length <code>config.n_layers</code>, with each tuple having 2 tensors of shape
<code>(batch_size, num_heads, sequence_length, embed_size_per_head)</code>) and optionally if
<code>config.is_encoder_decoder=True</code> 2 additional tensors of shape <code>(batch_size, num_heads, encoder_sequence_length, embed_size_per_head)</code>.</p>
<p>Contains pre-computed hidden-states (key and values in the self-attention blocks and optionally if
<code>config.is_encoder_decoder=True</code> in the cross-attention blocks) that can be used (see <code>past_key_values</code>
input) to speed up sequential decoding.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.BaseModelOutputWithPoolingAndCrossAttentions"
>transformers.modeling_outputs.BaseModelOutputWithPoolingAndCrossAttentions</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),ys=new ve({props:{$$slots:{default:[N3]},$$scope:{ctx:R}}}),Ts=new we({props:{anchor:"transformers.RobertaModel.forward.example",$$slots:{default:[W3]},$$scope:{ctx:R}}}),Ei=new Ze({}),xi=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/main/en/model_doc/roberta#transformers.RobertaConfig">RobertaConfig</a>) &#x2014; Model configuration class with all the parameters of the
model. Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/roberta/modeling_roberta.py#L875"}}),Ii=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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.RobertaForCausalLM.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.RobertaForCausalLM.forward.token_type_ids",description:`<strong>token_type_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0,1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.
This parameter can only be used when the model is initialized with <code>type_vocab_size</code> parameter with value<blockquote>
<p>= 2. All the value in this tensor should be always &lt; type_vocab_size.</p>
</blockquote></li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.RobertaForCausalLM.forward.position_ids",description:`<strong>position_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.RobertaForCausalLM.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.RobertaForCausalLM.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.RobertaForCausalLM.forward.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.RobertaForCausalLM.forward.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.RobertaForCausalLM.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.RobertaForCausalLM.forward.encoder_hidden_states",description:`<strong>encoder_hidden_states</strong>  (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Sequence of hidden-states at the output of the last layer of the encoder. Used in the cross-attention if
the model is configured as a decoder.`,name:"encoder_hidden_states"},{anchor:"transformers.RobertaForCausalLM.forward.encoder_attention_mask",description:`<strong>encoder_attention_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on the padding token indices of the encoder input. This mask is used in
the cross-attention if the model is configured as a decoder. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>`,name:"encoder_attention_mask"},{anchor:"transformers.RobertaForCausalLM.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Labels for computing the left-to-right language modeling loss (next word prediction). Indices should be in
<code>[-100, 0, ..., config.vocab_size]</code> (see <code>input_ids</code> docstring) Tokens with indices set to <code>-100</code> are
ignored (masked), the loss is only computed for the tokens with labels in <code>[0, ..., config.vocab_size]</code>`,name:"labels"},{anchor:"transformers.RobertaForCausalLM.forward.past_key_values",description:`<strong>past_key_values</strong> (<code>tuple(tuple(torch.FloatTensor))</code> of length <code>config.n_layers</code> with each tuple having 4 tensors of shape <code>(batch_size, num_heads, sequence_length - 1, embed_size_per_head)</code>) &#x2014;
Contains precomputed key and value hidden states of the attention blocks. Can be used to speed up decoding.</p>
<p>If <code>past_key_values</code> are used, the user can optionally input only the last <code>decoder_input_ids</code> (those that
don&#x2019;t have their past key value states given to this model) of shape <code>(batch_size, 1)</code> instead of all
<code>decoder_input_ids</code> of shape <code>(batch_size, sequence_length)</code>.`,name:"past_key_values"},{anchor:"transformers.RobertaForCausalLM.forward.use_cache",description:`<strong>use_cache</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
If set to <code>True</code>, <code>past_key_values</code> key value states are returned and can be used to speed up decoding (see
<code>past_key_values</code>).`,name:"use_cache"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/roberta/modeling_roberta.py#L896",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.CausalLMOutputWithCrossAttentions"
>transformers.modeling_outputs.CausalLMOutputWithCrossAttentions</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/main/en/model_doc/roberta#transformers.RobertaConfig"
>RobertaConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Language modeling loss (for next-token prediction).</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, config.vocab_size)</code>) \u2014 Prediction scores of the language modeling head (scores for each vocabulary token before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
<li>
<p><strong>cross_attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Cross attentions weights after the attention softmax, used to compute the weighted average in the
cross-attention heads.</p>
</li>
<li>
<p><strong>past_key_values</strong> (<code>tuple(tuple(torch.FloatTensor))</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> tuples of length <code>config.n_layers</code>, with each tuple containing the cached key,
value states of the self-attention and the cross-attention layers if model is used in encoder-decoder
setting. Only relevant if <code>config.is_decoder = True</code>.</p>
<p>Contains pre-computed hidden-states (key and values in the attention blocks) that can be used (see
<code>past_key_values</code> input) to speed up sequential decoding.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.CausalLMOutputWithCrossAttentions"
>transformers.modeling_outputs.CausalLMOutputWithCrossAttentions</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),vs=new ve({props:{$$slots:{default:[Z3]},$$scope:{ctx:R}}}),ws=new we({props:{anchor:"transformers.RobertaForCausalLM.forward.example",$$slots:{default:[A3]},$$scope:{ctx:R}}}),Ui=new Ze({}),qi=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/main/en/model_doc/roberta#transformers.RobertaConfig">RobertaConfig</a>) &#x2014; Model configuration class with all the parameters of the
model. Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/roberta/modeling_roberta.py#L1024"}}),Bi=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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.RobertaForMaskedLM.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.RobertaForMaskedLM.forward.token_type_ids",description:`<strong>token_type_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0,1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.
This parameter can only be used when the model is initialized with <code>type_vocab_size</code> parameter with value<blockquote>
<p>= 2. All the value in this tensor should be always &lt; type_vocab_size.</p>
</blockquote></li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.RobertaForMaskedLM.forward.position_ids",description:`<strong>position_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.RobertaForMaskedLM.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.RobertaForMaskedLM.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.RobertaForMaskedLM.forward.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.RobertaForMaskedLM.forward.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.RobertaForMaskedLM.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.RobertaForMaskedLM.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Labels for computing the masked language modeling loss. Indices should be in <code>[-100, 0, ..., config.vocab_size]</code> (see <code>input_ids</code> docstring) Tokens with indices set to <code>-100</code> are ignored (masked), the
loss is only computed for the tokens with labels in <code>[0, ..., config.vocab_size]</code>`,name:"labels"},{anchor:"transformers.RobertaForMaskedLM.forward.kwargs",description:`<strong>kwargs</strong> (<code>Dict[str, any]</code>, optional, defaults to <em>{}</em>) &#x2014;
Used to hide legacy arguments that have been deprecated.`,name:"kwargs"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/roberta/modeling_roberta.py#L1048",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.MaskedLMOutput"
>transformers.modeling_outputs.MaskedLMOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/main/en/model_doc/roberta#transformers.RobertaConfig"
>RobertaConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Masked language modeling (MLM) loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, config.vocab_size)</code>) \u2014 Prediction scores of the language modeling head (scores for each vocabulary token before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.MaskedLMOutput"
>transformers.modeling_outputs.MaskedLMOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),$s=new ve({props:{$$slots:{default:[B3]},$$scope:{ctx:R}}}),Fs=new we({props:{anchor:"transformers.RobertaForMaskedLM.forward.example",$$slots:{default:[G3]},$$scope:{ctx:R}}}),Gi=new Ze({}),Vi=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/main/en/model_doc/roberta#transformers.RobertaConfig">RobertaConfig</a>) &#x2014; Model configuration class with all the parameters of the
model. Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/roberta/modeling_roberta.py#L1155"}}),Li=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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.RobertaForSequenceClassification.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.RobertaForSequenceClassification.forward.token_type_ids",description:`<strong>token_type_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0,1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.
This parameter can only be used when the model is initialized with <code>type_vocab_size</code> parameter with value<blockquote>
<p>= 2. All the value in this tensor should be always &lt; type_vocab_size.</p>
</blockquote></li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.RobertaForSequenceClassification.forward.position_ids",description:`<strong>position_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.RobertaForSequenceClassification.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.RobertaForSequenceClassification.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.RobertaForSequenceClassification.forward.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.RobertaForSequenceClassification.forward.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.RobertaForSequenceClassification.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.RobertaForSequenceClassification.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for computing the sequence classification/regression loss. Indices should be in <code>[0, ..., config.num_labels - 1]</code>. If <code>config.num_labels == 1</code> a regression loss is computed (Mean-Square loss), If
<code>config.num_labels &gt; 1</code> a classification loss is computed (Cross-Entropy).`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/roberta/modeling_roberta.py#L1167",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.SequenceClassifierOutput"
>transformers.modeling_outputs.SequenceClassifierOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/main/en/model_doc/roberta#transformers.RobertaConfig"
>RobertaConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Classification (or regression if config.num_labels==1) loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, config.num_labels)</code>) \u2014 Classification (or regression if config.num_labels==1) scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.SequenceClassifierOutput"
>transformers.modeling_outputs.SequenceClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Es=new ve({props:{$$slots:{default:[V3]},$$scope:{ctx:R}}}),xs=new we({props:{anchor:"transformers.RobertaForSequenceClassification.forward.example",$$slots:{default:[S3]},$$scope:{ctx:R}}}),js=new we({props:{anchor:"transformers.RobertaForSequenceClassification.forward.example-2",$$slots:{default:[P3]},$$scope:{ctx:R}}}),Qi=new Ze({}),Oi=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/main/en/model_doc/roberta#transformers.RobertaConfig">RobertaConfig</a>) &#x2014; Model configuration class with all the parameters of the
model. Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/roberta/modeling_roberta.py#L1254"}}),Ki=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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.RobertaForMultipleChoice.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_choices, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.RobertaForMultipleChoice.forward.token_type_ids",description:`<strong>token_type_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, num_choices, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0,1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.
This parameter can only be used when the model is initialized with <code>type_vocab_size</code> parameter with value<blockquote>
<p>= 2. All the value in this tensor should be always &lt; type_vocab_size.</p>
</blockquote></li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.RobertaForMultipleChoice.forward.position_ids",description:`<strong>position_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, num_choices, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.RobertaForMultipleChoice.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.RobertaForMultipleChoice.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_choices, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.RobertaForMultipleChoice.forward.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.RobertaForMultipleChoice.forward.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.RobertaForMultipleChoice.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.RobertaForMultipleChoice.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for computing the multiple choice classification loss. Indices should be in <code>[0, ..., num_choices-1]</code> where <code>num_choices</code> is the size of the second dimension of the input tensors. (See
<code>input_ids</code> above)`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/roberta/modeling_roberta.py#L1265",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.MultipleChoiceModelOutput"
>transformers.modeling_outputs.MultipleChoiceModelOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/main/en/model_doc/roberta#transformers.RobertaConfig"
>RobertaConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <em>(1,)</em>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Classification loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_choices)</code>) \u2014 <em>num_choices</em> is the second dimension of the input tensors. (see <em>input_ids</em> above).</p>
<p>Classification scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.MultipleChoiceModelOutput"
>transformers.modeling_outputs.MultipleChoiceModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),zs=new ve({props:{$$slots:{default:[X3]},$$scope:{ctx:R}}}),Cs=new we({props:{anchor:"transformers.RobertaForMultipleChoice.forward.example",$$slots:{default:[L3]},$$scope:{ctx:R}}}),el=new Ze({}),tl=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/main/en/model_doc/roberta#transformers.RobertaConfig">RobertaConfig</a>) &#x2014; Model configuration class with all the parameters of the
model. Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/roberta/modeling_roberta.py#L1346"}}),al=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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.RobertaForTokenClassification.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.RobertaForTokenClassification.forward.token_type_ids",description:`<strong>token_type_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0,1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.
This parameter can only be used when the model is initialized with <code>type_vocab_size</code> parameter with value<blockquote>
<p>= 2. All the value in this tensor should be always &lt; type_vocab_size.</p>
</blockquote></li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.RobertaForTokenClassification.forward.position_ids",description:`<strong>position_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.RobertaForTokenClassification.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.RobertaForTokenClassification.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.RobertaForTokenClassification.forward.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.RobertaForTokenClassification.forward.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.RobertaForTokenClassification.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.RobertaForTokenClassification.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Labels for computing the token classification loss. Indices should be in <code>[0, ..., config.num_labels - 1]</code>.`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/roberta/modeling_roberta.py#L1361",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.TokenClassifierOutput"
>transformers.modeling_outputs.TokenClassifierOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/main/en/model_doc/roberta#transformers.RobertaConfig"
>RobertaConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided)  \u2014 Classification loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, config.num_labels)</code>) \u2014 Classification scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.TokenClassifierOutput"
>transformers.modeling_outputs.TokenClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Us=new ve({props:{$$slots:{default:[Q3]},$$scope:{ctx:R}}}),qs=new we({props:{anchor:"transformers.RobertaForTokenClassification.forward.example",$$slots:{default:[O3]},$$scope:{ctx:R}}}),rl=new Ze({}),il=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/main/en/model_doc/roberta#transformers.RobertaConfig">RobertaConfig</a>) &#x2014; Model configuration class with all the parameters of the
model. Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/roberta/modeling_roberta.py#L1453"}}),pl=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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.RobertaForQuestionAnswering.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.RobertaForQuestionAnswering.forward.token_type_ids",description:`<strong>token_type_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0,1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.
This parameter can only be used when the model is initialized with <code>type_vocab_size</code> parameter with value<blockquote>
<p>= 2. All the value in this tensor should be always &lt; type_vocab_size.</p>
</blockquote></li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.RobertaForQuestionAnswering.forward.position_ids",description:`<strong>position_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.RobertaForQuestionAnswering.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.RobertaForQuestionAnswering.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.RobertaForQuestionAnswering.forward.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.RobertaForQuestionAnswering.forward.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.RobertaForQuestionAnswering.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.RobertaForQuestionAnswering.forward.start_positions",description:`<strong>start_positions</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for position (index) of the start of the labelled span for computing the token classification loss.
Positions are clamped to the length of the sequence (<code>sequence_length</code>). Position outside of the sequence
are not taken into account for computing the loss.`,name:"start_positions"},{anchor:"transformers.RobertaForQuestionAnswering.forward.end_positions",description:`<strong>end_positions</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for position (index) of the end of the labelled span for computing the token classification loss.
Positions are clamped to the length of the sequence (<code>sequence_length</code>). Position outside of the sequence
are not taken into account for computing the loss.`,name:"end_positions"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/roberta/modeling_roberta.py#L1464",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.QuestionAnsweringModelOutput"
>transformers.modeling_outputs.QuestionAnsweringModelOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/main/en/model_doc/roberta#transformers.RobertaConfig"
>RobertaConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Total span extraction loss is the sum of a Cross-Entropy for the start and end positions.</p>
</li>
<li>
<p><strong>start_logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>) \u2014 Span-start scores (before SoftMax).</p>
</li>
<li>
<p><strong>end_logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>) \u2014 Span-end scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.QuestionAnsweringModelOutput"
>transformers.modeling_outputs.QuestionAnsweringModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Ws=new ve({props:{$$slots:{default:[D3]},$$scope:{ctx:R}}}),Zs=new we({props:{anchor:"transformers.RobertaForQuestionAnswering.forward.example",$$slots:{default:[Y3]},$$scope:{ctx:R}}}),hl=new Ze({}),ml=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/main/en/model_doc/roberta#transformers.RobertaConfig">RobertaConfig</a>) &#x2014; Model configuration class with all the parameters of the
model. Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/roberta/modeling_tf_roberta.py#L881"}}),Bs=new ve({props:{$$slots:{default:[H3]},$$scope:{ctx:R}}}),_l=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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.TFRobertaModel.call.attention_mask",description:`<strong>attention_mask</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.TFRobertaModel.call.token_type_ids",description:`<strong>token_type_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.TFRobertaModel.call.position_ids",description:`<strong>position_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.TFRobertaModel.call.head_mask",description:`<strong>head_mask</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.TFRobertaModel.call.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.TFRobertaModel.call.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail. This argument can be used only in eager mode, in graph mode the value in the
config will be used instead.`,name:"output_attentions"},{anchor:"transformers.TFRobertaModel.call.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail. This argument can be used only in eager mode, in graph mode the value in the config will be
used instead.`,name:"output_hidden_states"},{anchor:"transformers.TFRobertaModel.call.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.TFRobertaModel.call.training",description:`<strong>training</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to use the model in training mode (some modules like dropout modules have different
behaviors between training and evaluation).`,name:"training"},{anchor:"transformers.TFRobertaModel.call.encoder_hidden_states",description:`<strong>encoder_hidden_states</strong>  (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Sequence of hidden-states at the output of the last layer of the encoder. Used in the cross-attention if
the model is configured as a decoder.`,name:"encoder_hidden_states"},{anchor:"transformers.TFRobertaModel.call.encoder_attention_mask",description:`<strong>encoder_attention_mask</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on the padding token indices of the encoder input. This mask is used in
the cross-attention if the model is configured as a decoder. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>`,name:"encoder_attention_mask"},{anchor:"transformers.TFRobertaModel.call.past_key_values",description:`<strong>past_key_values</strong> (<code>Tuple[Tuple[tf.Tensor]]</code> of length <code>config.n_layers</code>) &#x2014;
contains precomputed key and value hidden states of the attention blocks. Can be used to speed up decoding.
If <code>past_key_values</code> are used, the user can optionally input only the last <code>decoder_input_ids</code> (those that
don&#x2019;t have their past key value states given to this model) of shape <code>(batch_size, 1)</code> instead of all
<code>decoder_input_ids</code> of shape <code>(batch_size, sequence_length)</code>.`,name:"past_key_values"},{anchor:"transformers.TFRobertaModel.call.use_cache",description:`<strong>use_cache</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
If set to <code>True</code>, <code>past_key_values</code> key value states are returned and can be used to speed up decoding (see
<code>past_key_values</code>). Set to <code>False</code> during training, <code>True</code> during generation`,name:"use_cache"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/roberta/modeling_tf_roberta.py#L886",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_tf_outputs.TFBaseModelOutputWithPoolingAndCrossAttentions"
>transformers.modeling_tf_outputs.TFBaseModelOutputWithPoolingAndCrossAttentions</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/main/en/model_doc/roberta#transformers.RobertaConfig"
>RobertaConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>last_hidden_state</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>) \u2014 Sequence of hidden-states at the output of the last layer of the model.</p>
</li>
<li>
<p><strong>pooler_output</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, hidden_size)</code>) \u2014 Last layer hidden-state of the first token of the sequence (classification token) further processed by a
Linear layer and a Tanh activation function. The Linear layer weights are trained from the next sentence
prediction (classification) objective during pretraining.</p>
<p>This output is usually <em>not</em> a good summary of the semantic content of the input, you\u2019re often better with
averaging or pooling the sequence of hidden-states for the whole input sequence.</p>
</li>
<li>
<p><strong>past_key_values</strong> (<code>List[tf.Tensor]</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) \u2014 List of <code>tf.Tensor</code> of length <code>config.n_layers</code>, with each tensor of shape <code>(2, batch_size, num_heads, sequence_length, embed_size_per_head)</code>).</p>
<p>Contains pre-computed hidden-states (key and values in the attention blocks) that can be used (see
<code>past_key_values</code> input) to speed up sequential decoding.</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
<li>
<p><strong>cross_attentions</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights of the decoder\u2019s cross-attention layer, after the attention softmax, used to compute the
weighted average in the cross-attention heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_tf_outputs.TFBaseModelOutputWithPoolingAndCrossAttentions"
>transformers.modeling_tf_outputs.TFBaseModelOutputWithPoolingAndCrossAttentions</a> or <code>tuple(tf.Tensor)</code></p>
`}}),Gs=new ve({props:{$$slots:{default:[K3]},$$scope:{ctx:R}}}),Vs=new we({props:{anchor:"transformers.TFRobertaModel.call.example",$$slots:{default:[eU]},$$scope:{ctx:R}}}),bl=new Ze({}),yl=new W({props:{name:"class transformers.TFRobertaForCausalLM",anchor:"transformers.TFRobertaForCausalLM",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/roberta/modeling_tf_roberta.py#L1080"}}),Tl=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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.TFRobertaForCausalLM.call.attention_mask",description:`<strong>attention_mask</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.TFRobertaForCausalLM.call.token_type_ids",description:`<strong>token_type_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.TFRobertaForCausalLM.call.position_ids",description:`<strong>position_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.TFRobertaForCausalLM.call.head_mask",description:`<strong>head_mask</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.TFRobertaForCausalLM.call.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.TFRobertaForCausalLM.call.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail. This argument can be used only in eager mode, in graph mode the value in the
config will be used instead.`,name:"output_attentions"},{anchor:"transformers.TFRobertaForCausalLM.call.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail. This argument can be used only in eager mode, in graph mode the value in the config will be
used instead.`,name:"output_hidden_states"},{anchor:"transformers.TFRobertaForCausalLM.call.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.TFRobertaForCausalLM.call.training",description:`<strong>training</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to use the model in training mode (some modules like dropout modules have different
behaviors between training and evaluation).`,name:"training"},{anchor:"transformers.TFRobertaForCausalLM.call.encoder_hidden_states",description:`<strong>encoder_hidden_states</strong>  (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Sequence of hidden-states at the output of the last layer of the encoder. Used in the cross-attention if
the model is configured as a decoder.`,name:"encoder_hidden_states"},{anchor:"transformers.TFRobertaForCausalLM.call.encoder_attention_mask",description:`<strong>encoder_attention_mask</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on the padding token indices of the encoder input. This mask is used in
the cross-attention if the model is configured as a decoder. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>`,name:"encoder_attention_mask"},{anchor:"transformers.TFRobertaForCausalLM.call.past_key_values",description:`<strong>past_key_values</strong> (<code>Tuple[Tuple[tf.Tensor]]</code> of length <code>config.n_layers</code>) &#x2014;
contains precomputed key and value hidden states of the attention blocks. Can be used to speed up decoding.
If <code>past_key_values</code> are used, the user can optionally input only the last <code>decoder_input_ids</code> (those that
don&#x2019;t have their past key value states given to this model) of shape <code>(batch_size, 1)</code> instead of all
<code>decoder_input_ids</code> of shape <code>(batch_size, sequence_length)</code>.`,name:"past_key_values"},{anchor:"transformers.TFRobertaForCausalLM.call.use_cache",description:`<strong>use_cache</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
If set to <code>True</code>, <code>past_key_values</code> key value states are returned and can be used to speed up decoding (see
<code>past_key_values</code>). Set to <code>False</code> during training, <code>True</code> during generation`,name:"use_cache"},{anchor:"transformers.TFRobertaForCausalLM.call.labels",description:`<strong>labels</strong> (<code>tf.Tensor</code> or <code>np.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Labels for computing the cross entropy classification loss. Indices should be in <code>[0, ..., config.vocab_size - 1]</code>.`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/roberta/modeling_tf_roberta.py#L1113",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_tf_outputs.TFCausalLMOutputWithCrossAttentions"
>transformers.modeling_tf_outputs.TFCausalLMOutputWithCrossAttentions</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/main/en/model_doc/roberta#transformers.RobertaConfig"
>RobertaConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>tf.Tensor</code> of shape <code>(n,)</code>, <em>optional</em>, where n is the number of non-masked labels, returned when <code>labels</code> is provided) \u2014 Language modeling loss (for next-token prediction).</p>
</li>
<li>
<p><strong>logits</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, config.vocab_size)</code>) \u2014 Prediction scores of the language modeling head (scores for each vocabulary token before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
<li>
<p><strong>cross_attentions</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights of the decoder\u2019s cross-attention layer, after the attention softmax, used to compute the
weighted average in the cross-attention heads.</p>
</li>
<li>
<p><strong>past_key_values</strong> (<code>List[tf.Tensor]</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) \u2014 List of <code>tf.Tensor</code> of length <code>config.n_layers</code>, with each tensor of shape <code>(2, batch_size, num_heads, sequence_length, embed_size_per_head)</code>).</p>
<p>Contains pre-computed hidden-states (key and values in the attention blocks) that can be used (see
<code>past_key_values</code> input) to speed up sequential decoding.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_tf_outputs.TFCausalLMOutputWithCrossAttentions"
>transformers.modeling_tf_outputs.TFCausalLMOutputWithCrossAttentions</a> or <code>tuple(tf.Tensor)</code></p>
`}}),Ps=new ve({props:{$$slots:{default:[tU]},$$scope:{ctx:R}}}),Xs=new we({props:{anchor:"transformers.TFRobertaForCausalLM.call.example",$$slots:{default:[oU]},$$scope:{ctx:R}}}),kl=new Ze({}),vl=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/main/en/model_doc/roberta#transformers.RobertaConfig">RobertaConfig</a>) &#x2014; Model configuration class with all the parameters of the
model. Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/roberta/modeling_tf_roberta.py#L1003"}}),Qs=new ve({props:{$$slots:{default:[nU]},$$scope:{ctx:R}}}),Rl=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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.TFRobertaForMaskedLM.call.attention_mask",description:`<strong>attention_mask</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.TFRobertaForMaskedLM.call.token_type_ids",description:`<strong>token_type_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.TFRobertaForMaskedLM.call.position_ids",description:`<strong>position_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.TFRobertaForMaskedLM.call.head_mask",description:`<strong>head_mask</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.TFRobertaForMaskedLM.call.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.TFRobertaForMaskedLM.call.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail. This argument can be used only in eager mode, in graph mode the value in the
config will be used instead.`,name:"output_attentions"},{anchor:"transformers.TFRobertaForMaskedLM.call.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail. This argument can be used only in eager mode, in graph mode the value in the config will be
used instead.`,name:"output_hidden_states"},{anchor:"transformers.TFRobertaForMaskedLM.call.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.TFRobertaForMaskedLM.call.training",description:`<strong>training</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to use the model in training mode (some modules like dropout modules have different
behaviors between training and evaluation).`,name:"training"},{anchor:"transformers.TFRobertaForMaskedLM.call.labels",description:`<strong>labels</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Labels for computing the masked language modeling loss. Indices should be in <code>[-100, 0, ..., config.vocab_size]</code> (see <code>input_ids</code> docstring) Tokens with indices set to <code>-100</code> are ignored (masked), the
loss is only computed for the tokens with labels in <code>[0, ..., config.vocab_size]</code>`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/roberta/modeling_tf_roberta.py#L1020",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_tf_outputs.TFMaskedLMOutput"
>transformers.modeling_tf_outputs.TFMaskedLMOutput</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/main/en/model_doc/roberta#transformers.RobertaConfig"
>RobertaConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>tf.Tensor</code> of shape <code>(n,)</code>, <em>optional</em>, where n is the number of non-masked labels, returned when <code>labels</code> is provided) \u2014 Masked language modeling (MLM) loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, config.vocab_size)</code>) \u2014 Prediction scores of the language modeling head (scores for each vocabulary token before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_tf_outputs.TFMaskedLMOutput"
>transformers.modeling_tf_outputs.TFMaskedLMOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),Os=new ve({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}}}),El=new Ze({}),xl=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/main/en/model_doc/roberta#transformers.RobertaConfig">RobertaConfig</a>) &#x2014; Model configuration class with all the parameters of the
model. Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/roberta/modeling_tf_roberta.py#L1237"}}),Ks=new ve({props:{$$slots:{default:[iU]},$$scope:{ctx:R}}}),Cl=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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.TFRobertaForSequenceClassification.call.attention_mask",description:`<strong>attention_mask</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.TFRobertaForSequenceClassification.call.token_type_ids",description:`<strong>token_type_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.TFRobertaForSequenceClassification.call.position_ids",description:`<strong>position_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.TFRobertaForSequenceClassification.call.head_mask",description:`<strong>head_mask</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.TFRobertaForSequenceClassification.call.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.TFRobertaForSequenceClassification.call.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail. This argument can be used only in eager mode, in graph mode the value in the
config will be used instead.`,name:"output_attentions"},{anchor:"transformers.TFRobertaForSequenceClassification.call.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail. This argument can be used only in eager mode, in graph mode the value in the config will be
used instead.`,name:"output_hidden_states"},{anchor:"transformers.TFRobertaForSequenceClassification.call.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.TFRobertaForSequenceClassification.call.training",description:`<strong>training</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to use the model in training mode (some modules like dropout modules have different
behaviors between training and evaluation).`,name:"training"},{anchor:"transformers.TFRobertaForSequenceClassification.call.labels",description:`<strong>labels</strong> (<code>tf.Tensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for computing the sequence classification/regression loss. Indices should be in <code>[0, ..., config.num_labels - 1]</code>. If <code>config.num_labels == 1</code> a regression loss is computed (Mean-Square loss), If
<code>config.num_labels &gt; 1</code> a classification loss is computed (Cross-Entropy).`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/roberta/modeling_tf_roberta.py#L1248",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_tf_outputs.TFSequenceClassifierOutput"
>transformers.modeling_tf_outputs.TFSequenceClassifierOutput</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/main/en/model_doc/roberta#transformers.RobertaConfig"
>RobertaConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, )</code>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Classification (or regression if config.num_labels==1) loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, config.num_labels)</code>) \u2014 Classification (or regression if config.num_labels==1) scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_tf_outputs.TFSequenceClassifierOutput"
>transformers.modeling_tf_outputs.TFSequenceClassifierOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),ea=new ve({props:{$$slots:{default:[lU]},$$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}}}),Il=new Ze({}),Ul=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/main/en/model_doc/roberta#transformers.RobertaConfig">RobertaConfig</a>) &#x2014; Model configuration class with all the parameters of the
model. Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/roberta/modeling_tf_roberta.py#L1313"}}),sa=new ve({props:{$$slots:{default:[pU]},$$scope:{ctx:R}}}),Zl=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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.TFRobertaForMultipleChoice.call.attention_mask",description:`<strong>attention_mask</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, num_choices, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.TFRobertaForMultipleChoice.call.token_type_ids",description:`<strong>token_type_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, num_choices, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.TFRobertaForMultipleChoice.call.position_ids",description:`<strong>position_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, num_choices, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.TFRobertaForMultipleChoice.call.head_mask",description:`<strong>head_mask</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.TFRobertaForMultipleChoice.call.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, num_choices, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.TFRobertaForMultipleChoice.call.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail. This argument can be used only in eager mode, in graph mode the value in the
config will be used instead.`,name:"output_attentions"},{anchor:"transformers.TFRobertaForMultipleChoice.call.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail. This argument can be used only in eager mode, in graph mode the value in the config will be
used instead.`,name:"output_hidden_states"},{anchor:"transformers.TFRobertaForMultipleChoice.call.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.TFRobertaForMultipleChoice.call.training",description:`<strong>training</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to use the model in training mode (some modules like dropout modules have different
behaviors between training and evaluation).`,name:"training"},{anchor:"transformers.TFRobertaForMultipleChoice.call.labels",description:`<strong>labels</strong> (<code>tf.Tensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for computing the multiple choice classification loss. Indices should be in <code>[0, ..., num_choices]</code>
where <code>num_choices</code> is the size of the second dimension of the input tensors. (See <code>input_ids</code> above)`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/roberta/modeling_tf_roberta.py#L1327",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_tf_outputs.TFMultipleChoiceModelOutput"
>transformers.modeling_tf_outputs.TFMultipleChoiceModelOutput</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/main/en/model_doc/roberta#transformers.RobertaConfig"
>RobertaConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>tf.Tensor</code> of shape <em>(batch_size, )</em>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Classification loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, num_choices)</code>) \u2014 <em>num_choices</em> is the second dimension of the input tensors. (see <em>input_ids</em> above).</p>
<p>Classification scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_tf_outputs.TFMultipleChoiceModelOutput"
>transformers.modeling_tf_outputs.TFMultipleChoiceModelOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),aa=new ve({props:{$$slots:{default:[hU]},$$scope:{ctx:R}}}),ra=new we({props:{anchor:"transformers.TFRobertaForMultipleChoice.call.example",$$slots:{default:[mU]},$$scope:{ctx:R}}}),Al=new Ze({}),Bl=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/main/en/model_doc/roberta#transformers.RobertaConfig">RobertaConfig</a>) &#x2014; Model configuration class with all the parameters of the
model. Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/roberta/modeling_tf_roberta.py#L1403"}}),la=new ve({props:{$$slots:{default:[uU]},$$scope:{ctx:R}}}),Pl=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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.TFRobertaForTokenClassification.call.attention_mask",description:`<strong>attention_mask</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.TFRobertaForTokenClassification.call.token_type_ids",description:`<strong>token_type_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.TFRobertaForTokenClassification.call.position_ids",description:`<strong>position_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.TFRobertaForTokenClassification.call.head_mask",description:`<strong>head_mask</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.TFRobertaForTokenClassification.call.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.TFRobertaForTokenClassification.call.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail. This argument can be used only in eager mode, in graph mode the value in the
config will be used instead.`,name:"output_attentions"},{anchor:"transformers.TFRobertaForTokenClassification.call.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail. This argument can be used only in eager mode, in graph mode the value in the config will be
used instead.`,name:"output_hidden_states"},{anchor:"transformers.TFRobertaForTokenClassification.call.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.TFRobertaForTokenClassification.call.training",description:`<strong>training</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to use the model in training mode (some modules like dropout modules have different
behaviors between training and evaluation).`,name:"training"},{anchor:"transformers.TFRobertaForTokenClassification.call.labels",description:`<strong>labels</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Labels for computing the token classification loss. Indices should be in <code>[0, ..., config.num_labels - 1]</code>.`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/roberta/modeling_tf_roberta.py#L1421",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_tf_outputs.TFTokenClassifierOutput"
>transformers.modeling_tf_outputs.TFTokenClassifierOutput</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/main/en/model_doc/roberta#transformers.RobertaConfig"
>RobertaConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>tf.Tensor</code> of shape <code>(n,)</code>, <em>optional</em>, where n is the number of unmasked labels, returned when <code>labels</code> is provided)  \u2014 Classification loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, config.num_labels)</code>) \u2014 Classification scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_tf_outputs.TFTokenClassifierOutput"
>transformers.modeling_tf_outputs.TFTokenClassifierOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),da=new ve({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}}}),Xl=new Ze({}),Ll=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/main/en/model_doc/roberta#transformers.RobertaConfig">RobertaConfig</a>) &#x2014; Model configuration class with all the parameters of the
model. Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/roberta/modeling_tf_roberta.py#L1486"}}),ma=new ve({props:{$$slots:{default:[bU]},$$scope:{ctx:R}}}),Yl=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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.TFRobertaForQuestionAnswering.call.attention_mask",description:`<strong>attention_mask</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.TFRobertaForQuestionAnswering.call.token_type_ids",description:`<strong>token_type_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.TFRobertaForQuestionAnswering.call.position_ids",description:`<strong>position_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.TFRobertaForQuestionAnswering.call.head_mask",description:`<strong>head_mask</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.TFRobertaForQuestionAnswering.call.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.TFRobertaForQuestionAnswering.call.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail. This argument can be used only in eager mode, in graph mode the value in the
config will be used instead.`,name:"output_attentions"},{anchor:"transformers.TFRobertaForQuestionAnswering.call.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail. This argument can be used only in eager mode, in graph mode the value in the config will be
used instead.`,name:"output_hidden_states"},{anchor:"transformers.TFRobertaForQuestionAnswering.call.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.TFRobertaForQuestionAnswering.call.training",description:`<strong>training</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to use the model in training mode (some modules like dropout modules have different
behaviors between training and evaluation).`,name:"training"},{anchor:"transformers.TFRobertaForQuestionAnswering.call.start_positions",description:`<strong>start_positions</strong> (<code>tf.Tensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for position (index) of the start of the labelled span for computing the token classification loss.
Positions are clamped to the length of the sequence (<code>sequence_length</code>). Position outside of the sequence
are not taken into account for computing the loss.`,name:"start_positions"},{anchor:"transformers.TFRobertaForQuestionAnswering.call.end_positions",description:`<strong>end_positions</strong> (<code>tf.Tensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for position (index) of the end of the labelled span for computing the token classification loss.
Positions are clamped to the length of the sequence (<code>sequence_length</code>). Position outside of the sequence
are not taken into account for computing the loss.`,name:"end_positions"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/roberta/modeling_tf_roberta.py#L1499",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_tf_outputs.TFQuestionAnsweringModelOutput"
>transformers.modeling_tf_outputs.TFQuestionAnsweringModelOutput</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/main/en/model_doc/roberta#transformers.RobertaConfig"
>RobertaConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, )</code>, <em>optional</em>, returned when <code>start_positions</code> and <code>end_positions</code> are provided) \u2014 Total span extraction loss is the sum of a Cross-Entropy for the start and end positions.</p>
</li>
<li>
<p><strong>start_logits</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>) \u2014 Span-start scores (before SoftMax).</p>
</li>
<li>
<p><strong>end_logits</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>) \u2014 Span-end scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_tf_outputs.TFQuestionAnsweringModelOutput"
>transformers.modeling_tf_outputs.TFQuestionAnsweringModelOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),ua=new ve({props:{$$slots:{default:[yU]},$$scope:{ctx:R}}}),fa=new we({props:{anchor:"transformers.TFRobertaForQuestionAnswering.call.example",$$slots:{default:[TU]},$$scope:{ctx:R}}}),ga=new we({props:{anchor:"transformers.TFRobertaForQuestionAnswering.call.example-2",$$slots:{default:[kU]},$$scope:{ctx:R}}}),Hl=new Ze({}),Kl=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/main/en/model_doc/roberta#transformers.RobertaConfig">RobertaConfig</a>) &#x2014; Model configuration class with all the parameters of the
model. Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/main/en/main_classes/model#transformers.FlaxPreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/roberta/modeling_flax_roberta.py#L990"}}),id=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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.FlaxRobertaModel.__call__.attention_mask",description:`<strong>attention_mask</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.FlaxRobertaModel.__call__.token_type_ids",description:`<strong>token_type_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.FlaxRobertaModel.__call__.position_ids",description:`<strong>position_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.`,name:"position_ids"},{anchor:"transformers.FlaxRobertaModel.__call__.head_mask",description:`<strong>head_mask</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <code>optional) -- Mask to nullify selected heads of the attention modules. Mask values selected in </code>[0, 1]\`:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.FlaxRobertaModel.__call__.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/roberta/modeling_flax_roberta.py#L816",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_flax_outputs.FlaxBaseModelOutputWithPooling"
>transformers.modeling_flax_outputs.FlaxBaseModelOutputWithPooling</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/main/en/model_doc/roberta#transformers.RobertaConfig"
>RobertaConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>last_hidden_state</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>) \u2014 Sequence of hidden-states at the output of the last layer of the model.</p>
</li>
<li>
<p><strong>pooler_output</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, hidden_size)</code>) \u2014 Last layer hidden-state of the first token of the sequence (classification token) further processed by a
Linear layer and a Tanh activation function. The Linear layer weights are trained from the next sentence
prediction (classification) objective during pretraining.</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_flax_outputs.FlaxBaseModelOutputWithPooling"
>transformers.modeling_flax_outputs.FlaxBaseModelOutputWithPooling</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),ba=new ve({props:{$$slots:{default:[vU]},$$scope:{ctx:R}}}),ya=new we({props:{anchor:"transformers.FlaxRobertaModel.__call__.example",$$slots:{default:[wU]},$$scope:{ctx:R}}}),ld=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/main/en/model_doc/roberta#transformers.RobertaConfig">RobertaConfig</a>) &#x2014; Model configuration class with all the parameters of the
model. Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/main/en/main_classes/model#transformers.FlaxPreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/roberta/modeling_flax_roberta.py#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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.FlaxRobertaForCausalLM.__call__.attention_mask",description:`<strong>attention_mask</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.FlaxRobertaForCausalLM.__call__.token_type_ids",description:`<strong>token_type_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.FlaxRobertaForCausalLM.__call__.position_ids",description:`<strong>position_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.`,name:"position_ids"},{anchor:"transformers.FlaxRobertaForCausalLM.__call__.head_mask",description:`<strong>head_mask</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <code>optional) -- Mask to nullify selected heads of the attention modules. Mask values selected in </code>[0, 1]\`:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.FlaxRobertaForCausalLM.__call__.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/roberta/modeling_flax_roberta.py#L816",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_flax_outputs.FlaxCausalLMOutputWithCrossAttentions"
>transformers.modeling_flax_outputs.FlaxCausalLMOutputWithCrossAttentions</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/main/en/model_doc/roberta#transformers.RobertaConfig"
>RobertaConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>logits</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, sequence_length, config.vocab_size)</code>) \u2014 Prediction scores of the language modeling head (scores for each vocabulary token before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
<li>
<p><strong>cross_attentions</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Cross attentions weights after the attention softmax, used to compute the weighted average in the
cross-attention heads.</p>
</li>
<li>
<p><strong>past_key_values</strong> (<code>tuple(tuple(jnp.ndarray))</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> tuples of length <code>config.n_layers</code>, with each tuple containing the cached key, value
states of the self-attention and the cross-attention layers if model is used in encoder-decoder setting.
Only relevant if <code>config.is_decoder = True</code>.</p>
<p>Contains pre-computed hidden-states (key and values in the attention blocks) that can be used (see
<code>past_key_values</code> input) to speed up sequential decoding.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_flax_outputs.FlaxCausalLMOutputWithCrossAttentions"
>transformers.modeling_flax_outputs.FlaxCausalLMOutputWithCrossAttentions</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),ka=new ve({props:{$$slots:{default:[MU]},$$scope:{ctx:R}}}),va=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/main/en/model_doc/roberta#transformers.RobertaConfig">RobertaConfig</a>) &#x2014; Model configuration class with all the parameters of the
model. Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/main/en/main_classes/model#transformers.FlaxPreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/roberta/modeling_flax_roberta.py#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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.FlaxRobertaForMaskedLM.__call__.attention_mask",description:`<strong>attention_mask</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.FlaxRobertaForMaskedLM.__call__.token_type_ids",description:`<strong>token_type_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.FlaxRobertaForMaskedLM.__call__.position_ids",description:`<strong>position_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.`,name:"position_ids"},{anchor:"transformers.FlaxRobertaForMaskedLM.__call__.head_mask",description:`<strong>head_mask</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <code>optional) -- Mask to nullify selected heads of the attention modules. Mask values selected in </code>[0, 1]\`:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.FlaxRobertaForMaskedLM.__call__.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/roberta/modeling_flax_roberta.py#L816",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_flax_outputs.FlaxBaseModelOutputWithPooling"
>transformers.modeling_flax_outputs.FlaxBaseModelOutputWithPooling</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/main/en/model_doc/roberta#transformers.RobertaConfig"
>RobertaConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>last_hidden_state</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>) \u2014 Sequence of hidden-states at the output of the last layer of the model.</p>
</li>
<li>
<p><strong>pooler_output</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, hidden_size)</code>) \u2014 Last layer hidden-state of the first token of the sequence (classification token) further processed by a
Linear layer and a Tanh activation function. The Linear layer weights are trained from the next sentence
prediction (classification) objective during pretraining.</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_flax_outputs.FlaxBaseModelOutputWithPooling"
>transformers.modeling_flax_outputs.FlaxBaseModelOutputWithPooling</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Ma=new ve({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/main/en/model_doc/roberta#transformers.RobertaConfig">RobertaConfig</a>) &#x2014; Model configuration class with all the parameters of the
model. Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/main/en/main_classes/model#transformers.FlaxPreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/roberta/modeling_flax_roberta.py#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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.FlaxRobertaForSequenceClassification.__call__.attention_mask",description:`<strong>attention_mask</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.FlaxRobertaForSequenceClassification.__call__.token_type_ids",description:`<strong>token_type_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.FlaxRobertaForSequenceClassification.__call__.position_ids",description:`<strong>position_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.`,name:"position_ids"},{anchor:"transformers.FlaxRobertaForSequenceClassification.__call__.head_mask",description:`<strong>head_mask</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <code>optional) -- Mask to nullify selected heads of the attention modules. Mask values selected in </code>[0, 1]\`:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.FlaxRobertaForSequenceClassification.__call__.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/roberta/modeling_flax_roberta.py#L816",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_flax_outputs.FlaxSequenceClassifierOutput"
>transformers.modeling_flax_outputs.FlaxSequenceClassifierOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/main/en/model_doc/roberta#transformers.RobertaConfig"
>RobertaConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>logits</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, config.num_labels)</code>) \u2014 Classification (or regression if config.num_labels==1) scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_flax_outputs.FlaxSequenceClassifierOutput"
>transformers.modeling_flax_outputs.FlaxSequenceClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Ra=new ve({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/main/en/model_doc/roberta#transformers.RobertaConfig">RobertaConfig</a>) &#x2014; Model configuration class with all the parameters of the
model. Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/main/en/main_classes/model#transformers.FlaxPreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/roberta/modeling_flax_roberta.py#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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.FlaxRobertaForMultipleChoice.__call__.attention_mask",description:`<strong>attention_mask</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, num_choices, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.FlaxRobertaForMultipleChoice.__call__.token_type_ids",description:`<strong>token_type_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, num_choices, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.FlaxRobertaForMultipleChoice.__call__.position_ids",description:`<strong>position_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, num_choices, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.`,name:"position_ids"},{anchor:"transformers.FlaxRobertaForMultipleChoice.__call__.head_mask",description:`<strong>head_mask</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, num_choices, sequence_length)</code>, <code>optional) -- Mask to nullify selected heads of the attention modules. Mask values selected in </code>[0, 1]\`:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.FlaxRobertaForMultipleChoice.__call__.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/roberta/modeling_flax_roberta.py#L816",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_flax_outputs.FlaxMultipleChoiceModelOutput"
>transformers.modeling_flax_outputs.FlaxMultipleChoiceModelOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/main/en/model_doc/roberta#transformers.RobertaConfig"
>RobertaConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>logits</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, num_choices)</code>) \u2014 <em>num_choices</em> is the second dimension of the input tensors. (see <em>input_ids</em> above).</p>
<p>Classification scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_flax_outputs.FlaxMultipleChoiceModelOutput"
>transformers.modeling_flax_outputs.FlaxMultipleChoiceModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),ja=new ve({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/main/en/model_doc/roberta#transformers.RobertaConfig">RobertaConfig</a>) &#x2014; Model configuration class with all the parameters of the
model. Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/main/en/main_classes/model#transformers.FlaxPreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/roberta/modeling_flax_roberta.py#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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.FlaxRobertaForTokenClassification.__call__.attention_mask",description:`<strong>attention_mask</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.FlaxRobertaForTokenClassification.__call__.token_type_ids",description:`<strong>token_type_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.FlaxRobertaForTokenClassification.__call__.position_ids",description:`<strong>position_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.`,name:"position_ids"},{anchor:"transformers.FlaxRobertaForTokenClassification.__call__.head_mask",description:`<strong>head_mask</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <code>optional) -- Mask to nullify selected heads of the attention modules. Mask values selected in </code>[0, 1]\`:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.FlaxRobertaForTokenClassification.__call__.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/roberta/modeling_flax_roberta.py#L816",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_flax_outputs.FlaxTokenClassifierOutput"
>transformers.modeling_flax_outputs.FlaxTokenClassifierOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/main/en/model_doc/roberta#transformers.RobertaConfig"
>RobertaConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>logits</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, sequence_length, config.num_labels)</code>) \u2014 Classification scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_flax_outputs.FlaxTokenClassifierOutput"
>transformers.modeling_flax_outputs.FlaxTokenClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Ca=new ve({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/main/en/model_doc/roberta#transformers.RobertaConfig">RobertaConfig</a>) &#x2014; Model configuration class with all the parameters of the
model. Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/main/en/main_classes/model#transformers.FlaxPreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/roberta/modeling_flax_roberta.py#L1368"}}),uc=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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.FlaxRobertaForQuestionAnswering.__call__.attention_mask",description:`<strong>attention_mask</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.FlaxRobertaForQuestionAnswering.__call__.token_type_ids",description:`<strong>token_type_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.FlaxRobertaForQuestionAnswering.__call__.position_ids",description:`<strong>position_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.`,name:"position_ids"},{anchor:"transformers.FlaxRobertaForQuestionAnswering.__call__.head_mask",description:`<strong>head_mask</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <code>optional) -- Mask to nullify selected heads of the attention modules. Mask values selected in </code>[0, 1]\`:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.FlaxRobertaForQuestionAnswering.__call__.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/roberta/modeling_flax_roberta.py#L816",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_flax_outputs.FlaxQuestionAnsweringModelOutput"
>transformers.modeling_flax_outputs.FlaxQuestionAnsweringModelOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/main/en/model_doc/roberta#transformers.RobertaConfig"
>RobertaConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>start_logits</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, sequence_length)</code>) \u2014 Span-start scores (before SoftMax).</p>
</li>
<li>
<p><strong>end_logits</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, sequence_length)</code>) \u2014 Span-end scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_flax_outputs.FlaxQuestionAnsweringModelOutput"
>transformers.modeling_flax_outputs.FlaxQuestionAnsweringModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),qa=new ve({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(),u=s("h1"),f=s("a"),b=s("span"),k(l.$$.fragment),m=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"),me=s("img"),Fe=p(),ie=s("h2"),B=s("a"),_e=s("span"),k(le.$$.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(),ue=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"),Te=s("li"),q=s("p"),qe=o("This implementation is the same as "),ge=s("a"),T=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"),ke=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"),iy=o("use BPE with bytes as a subunit and not characters (because of unicode characters)"),ly=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"),my=o(". The original code can be found "),cr=s("a"),uy=o("here"),fy=o("."),yg=p(),tn=s("h2"),ss=s("a"),Eh=s("span"),k(pr.$$.fragment),gy=p(),xh=s("span"),_y=o("Resources"),Tg=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."),kg=p(),k(hr.$$.fragment),vg=p(),ct=s("ul"),on=s("li"),yy=o("A blog on "),mr=s("a"),Ty=o("Getting Started with Sentiment Analysis on Twitter"),ky=o(" using RoBERTa and the "),ur=s("a"),vy=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 "),Tr=s("a"),Ny=o("notebook"),Wy=o("."),Zy=p(),xo=s("li"),Nc=s("a"),Ay=o("TFRobertaForSequenceClassification"),By=o(" is supported by this "),kr=s("a"),Gy=o("example script"),Vy=o(" and "),vr=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"),eT=o("Text classification task guide"),wg=p(),k($r.$$.fragment),Mg=p(),xt=s("ul"),Jo=s("li"),Ac=s("a"),tT=o("RobertaForTokenClassification"),oT=o(" is supported by this "),Fr=s("a"),nT=o("example script"),sT=o(" and "),Rr=s("a"),aT=o("notebook"),rT=o("."),iT=p(),zo=s("li"),Bc=s("a"),lT=o("TFRobertaForTokenClassification"),dT=o(" is supported by this "),Er=s("a"),cT=o("example script"),pT=o(" and "),xr=s("a"),hT=o("notebook"),mT=o("."),uT=p(),as=s("li"),Gc=s("a"),fT=o("FlaxRobertaForTokenClassification"),gT=o(" is supported by this "),jr=s("a"),_T=o("example script"),bT=o("."),yT=p(),Vc=s("li"),Jr=s("a"),TT=o("Token classification"),kT=o(" chapter of the \u{1F917} Hugging Face Course."),vT=p(),Jh=s("li"),Sc=s("a"),wT=o("Token classification task guide"),$g=p(),k(zr.$$.fragment),Fg=p(),yt=s("ul"),Cr=s("li"),MT=o("A blog on "),Ir=s("a"),$T=o("How to train a new language model from scratch using Transformers and Tokenizers"),FT=o(" with RoBERTa."),RT=p(),Co=s("li"),Pc=s("a"),ET=o("RobertaForMaskedLM"),xT=o(" is supported by this "),Ur=s("a"),jT=o("example script"),JT=o(" and "),qr=s("a"),zT=o("notebook"),CT=o("."),IT=p(),Io=s("li"),Xc=s("a"),UT=o("TFRobertaForMaskedLM"),qT=o(" is supported by this "),Nr=s("a"),NT=o("example script"),WT=o(" and "),Wr=s("a"),ZT=o("notebook"),AT=o("."),BT=p(),Uo=s("li"),Lc=s("a"),GT=o("FlaxRobertaForMaskedLM"),VT=o(" is supported by this "),Zr=s("a"),ST=o("example script"),PT=o(" and "),Ar=s("a"),XT=o("notebook"),LT=o("."),QT=p(),Qc=s("li"),Br=s("a"),OT=o("Masked language modeling"),DT=o(" chapter of the \u{1F917} Hugging Face Course."),YT=p(),zh=s("li"),Oc=s("a"),HT=o("Masked language modeling task guide"),Rg=p(),k(Gr.$$.fragment),Eg=p(),Tt=s("ul"),Vr=s("li"),KT=o("A blog on "),Sr=s("a"),ek=o("Accelerated Inference with Optimum and Transformers Pipelines"),tk=o(" with RoBERTa for question answering."),ok=p(),qo=s("li"),Dc=s("a"),nk=o("RobertaForQuestionAnswering"),sk=o(" is supported by this "),Pr=s("a"),ak=o("example script"),rk=o(" and "),Xr=s("a"),ik=o("notebook"),lk=o("."),dk=p(),No=s("li"),Yc=s("a"),ck=o("TFRobertaForQuestionAnswering"),pk=o(" is supported by this "),Lr=s("a"),hk=o("example script"),mk=o(" and "),Qr=s("a"),uk=o("notebook"),fk=o("."),gk=p(),rs=s("li"),Hc=s("a"),_k=o("FlaxRobertaForQuestionAnswering"),bk=o(" is supported by this "),Or=s("a"),yk=o("example script"),Tk=o("."),kk=p(),Kc=s("li"),Dr=s("a"),vk=o("Question answering"),wk=o(" chapter of the \u{1F917} Hugging Face Course."),Mk=p(),Ch=s("li"),ep=s("a"),$k=o("Question answering task guide"),xg=p(),tp=s("p"),Ih=s("strong"),Fk=o("Multiple choice"),jg=p(),Wo=s("ul"),Zo=s("li"),op=s("a"),Rk=o("RobertaForMultipleChoice"),Ek=o(" is supported by this "),Yr=s("a"),xk=o("example script"),jk=o(" and "),Hr=s("a"),Jk=o("notebook"),zk=o("."),Ck=p(),Ao=s("li"),np=s("a"),Ik=o("TFRobertaForMultipleChoice"),Uk=o(" is supported by this "),Kr=s("a"),qk=o("example script"),Nk=o(" and "),ei=s("a"),Wk=o("notebook"),Zk=o("."),Ak=p(),Uh=s("li"),sp=s("a"),Bk=o("Multiple choice task guide"),Jg=p(),nn=s("h2"),is=s("a"),qh=s("span"),k(ti.$$.fragment),Gk=p(),Nh=s("span"),Vk=o("RobertaConfig"),zg=p(),Vt=s("div"),k(oi.$$.fragment),Sk=p(),_o=s("p"),Pk=o("This is the configuration class to store the configuration of a "),ap=s("a"),Xk=o("RobertaModel"),Lk=o(" or a "),rp=s("a"),Qk=o("TFRobertaModel"),Ok=o(`. It is
used to instantiate a RoBERTa model according to the specified arguments, defining the model architecture.
Instantiating a configuration with the defaults will yield a similar configuration to that of the RoBERTa
`),ni=s("a"),Dk=o("roberta-base"),Yk=o(" architecture."),Hk=p(),sn=s("p"),Kk=o("Configuration objects inherit from "),ip=s("a"),ev=o("PretrainedConfig"),tv=o(` and can be used to control the model outputs. Read the
documentation from `),lp=s("a"),ov=o("PretrainedConfig"),nv=o(" for more information."),sv=p(),k(ls.$$.fragment),Cg=p(),an=s("h2"),ds=s("a"),Wh=s("span"),k(si.$$.fragment),av=p(),Zh=s("span"),rv=o("RobertaTokenizer"),Ig=p(),We=s("div"),k(ai.$$.fragment),iv=p(),Ah=s("p"),lv=o("Constructs a RoBERTa tokenizer, derived from the GPT-2 tokenizer, using byte-level Byte-Pair-Encoding."),dv=p(),Bh=s("p"),cv=o("This tokenizer has been trained to treat spaces like parts of the tokens (a bit like sentencepiece) so a word will"),pv=p(),k(cs.$$.fragment),hv=p(),ri=s("p"),mv=o("You can get around that behavior by passing "),Gh=s("code"),uv=o("add_prefix_space=True"),fv=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.`),gv=p(),k(ps.$$.fragment),_v=p(),ii=s("p"),bv=o("This tokenizer inherits from "),dp=s("a"),yv=o("PreTrainedTokenizer"),Tv=o(` which contains most of the main methods. Users should refer to
this superclass for more information regarding those methods.`),kv=p(),Bo=s("div"),k(li.$$.fragment),vv=p(),Vh=s("p"),wv=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:`),Mv=p(),di=s("ul"),cp=s("li"),$v=o("single sequence: "),Sh=s("code"),Fv=o("<s> X </s>"),Rv=p(),pp=s("li"),Ev=o("pair of sequences: "),Ph=s("code"),xv=o("<s> A </s></s> B </s>"),jv=p(),hs=s("div"),k(ci.$$.fragment),Jv=p(),pi=s("p"),zv=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"),Cv=o("prepare_for_model"),Iv=o(" method."),Uv=p(),ms=s("div"),k(hi.$$.fragment),qv=p(),Lh=s("p"),Nv=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.`),Wv=p(),hp=s("div"),k(mi.$$.fragment),Ug=p(),rn=s("h2"),us=s("a"),Qh=s("span"),k(ui.$$.fragment),Zv=p(),Oh=s("span"),Av=o("RobertaTokenizerFast"),qg=p(),tt=s("div"),k(fi.$$.fragment),Bv=p(),gi=s("p"),Gv=o("Construct a \u201Cfast\u201D RoBERTa tokenizer (backed by HuggingFace\u2019s "),Dh=s("em"),Vv=o("tokenizers"),Sv=o(` library), derived from the GPT-2
tokenizer, using byte-level Byte-Pair-Encoding.`),Pv=p(),Yh=s("p"),Xv=o("This tokenizer has been trained to treat spaces like parts of the tokens (a bit like sentencepiece) so a word will"),Lv=p(),k(fs.$$.fragment),Qv=p(),_i=s("p"),Ov=o("You can get around that behavior by passing "),Hh=s("code"),Dv=o("add_prefix_space=True"),Yv=o(` when instantiating this tokenizer or when you
call it on some text, but since the model was not pretrained this way, it might yield a decrease in performance.`),Hv=p(),k(gs.$$.fragment),Kv=p(),bi=s("p"),ew=o("This tokenizer inherits from "),mp=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(),up=s("div"),k(yi.$$.fragment),Ng=p(),ln=s("h2"),_s=s("a"),Kh=s("span"),k(Ti.$$.fragment),sw=p(),em=s("span"),aw=o("RobertaModel"),Wg=p(),ot=s("div"),k(ki.$$.fragment),rw=p(),tm=s("p"),iw=o("The bare RoBERTa Model transformer outputting raw hidden-states without any specific head on top."),lw=p(),vi=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(),wi=s("p"),mw=o("This model is also a PyTorch "),Mi=s("a"),uw=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(),$i=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 `),om=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.`),Tw=p(),pt=s("p"),kw=o("To behave as an decoder the model needs to be initialized with the "),nm=s("code"),vw=o("is_decoder"),ww=o(` argument of the configuration set
to `),sm=s("code"),Mw=o("True"),$w=o(". To be used in a Seq2Seq model, the model needs to initialized with both "),am=s("code"),Fw=o("is_decoder"),Rw=o(` argument and
`),rm=s("code"),Ew=o("add_cross_attention"),xw=o(" set to "),im=s("code"),jw=o("True"),Jw=o("; an "),lm=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(".. _"),dm=s("em"),qw=o("Attention is all you need"),Nw=o(": "),Fi=s("a"),Ww=o("https://arxiv.org/abs/1706.03762"),Zw=p(),Pt=s("div"),k(Ri.$$.fragment),Aw=p(),dn=s("p"),Bw=o("The "),gp=s("a"),Gw=o("RobertaModel"),Vw=o(" forward method, overrides the "),cm=s("code"),Sw=o("__call__"),Pw=o(" special method."),Xw=p(),k(ys.$$.fragment),Lw=p(),k(Ts.$$.fragment),Zg=p(),cn=s("h2"),ks=s("a"),pm=s("span"),k(Ei.$$.fragment),Qw=p(),hm=s("span"),Ow=o("RobertaForCausalLM"),Ag=p(),wt=s("div"),k(xi.$$.fragment),Dw=p(),ji=s("p"),Yw=o("RoBERTa Model with a "),mm=s("code"),Hw=o("language modeling"),Kw=o(" head on top for CLM fine-tuning."),eM=p(),Ji=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(),zi=s("p"),aM=o("This model is also a PyTorch "),Ci=s("a"),rM=o("torch.nn.Module"),iM=o(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),lM=p(),Xt=s("div"),k(Ii.$$.fragment),dM=p(),pn=s("p"),cM=o("The "),bp=s("a"),pM=o("RobertaForCausalLM"),hM=o(" forward method, overrides the "),um=s("code"),mM=o("__call__"),uM=o(" special method."),fM=p(),k(vs.$$.fragment),gM=p(),k(ws.$$.fragment),Bg=p(),hn=s("h2"),Ms=s("a"),fm=s("span"),k(Ui.$$.fragment),_M=p(),gm=s("span"),bM=o("RobertaForMaskedLM"),Gg=p(),Mt=s("div"),k(qi.$$.fragment),yM=p(),Ni=s("p"),TM=o("RoBERTa Model with a "),_m=s("code"),kM=o("language modeling"),vM=o(" head on top."),wM=p(),Wi=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(),Zi=s("p"),EM=o("This model is also a PyTorch "),Ai=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"),k(Bi.$$.fragment),zM=p(),mn=s("p"),CM=o("The "),Tp=s("a"),IM=o("RobertaForMaskedLM"),UM=o(" forward method, overrides the "),bm=s("code"),qM=o("__call__"),NM=o(" special method."),WM=p(),k($s.$$.fragment),ZM=p(),k(Fs.$$.fragment),Vg=p(),un=s("h2"),Rs=s("a"),ym=s("span"),k(Gi.$$.fragment),AM=p(),Tm=s("span"),BM=o("RobertaForSequenceClassification"),Sg=p(),$t=s("div"),k(Vi.$$.fragment),GM=p(),km=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(),Si=s("p"),PM=o("This model inherits from "),kp=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(),Pi=s("p"),OM=o("This model is also a PyTorch "),Xi=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"),k(Li.$$.fragment),KM=p(),fn=s("p"),e1=o("The "),vp=s("a"),t1=o("RobertaForSequenceClassification"),o1=o(" forward method, overrides the "),vm=s("code"),n1=o("__call__"),s1=o(" special method."),a1=p(),k(Es.$$.fragment),r1=p(),k(xs.$$.fragment),i1=p(),k(js.$$.fragment),Pg=p(),gn=s("h2"),Js=s("a"),wm=s("span"),k(Qi.$$.fragment),l1=p(),Mm=s("span"),d1=o("RobertaForMultipleChoice"),Xg=p(),Ft=s("div"),k(Oi.$$.fragment),c1=p(),$m=s("p"),p1=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.`),h1=p(),Di=s("p"),m1=o("This model inherits from "),wp=s("a"),u1=o("PreTrainedModel"),f1=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.)`),g1=p(),Yi=s("p"),_1=o("This model is also a PyTorch "),Hi=s("a"),b1=o("torch.nn.Module"),y1=o(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),T1=p(),Qt=s("div"),k(Ki.$$.fragment),k1=p(),_n=s("p"),v1=o("The "),Mp=s("a"),w1=o("RobertaForMultipleChoice"),M1=o(" forward method, overrides the "),Fm=s("code"),$1=o("__call__"),F1=o(" special method."),R1=p(),k(zs.$$.fragment),E1=p(),k(Cs.$$.fragment),Lg=p(),bn=s("h2"),Is=s("a"),Rm=s("span"),k(el.$$.fragment),x1=p(),Em=s("span"),j1=o("RobertaForTokenClassification"),Qg=p(),Rt=s("div"),k(tl.$$.fragment),J1=p(),xm=s("p"),z1=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.`),C1=p(),ol=s("p"),I1=o("This model inherits from "),$p=s("a"),U1=o("PreTrainedModel"),q1=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.)`),N1=p(),nl=s("p"),W1=o("This model is also a PyTorch "),sl=s("a"),Z1=o("torch.nn.Module"),A1=o(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),B1=p(),Ot=s("div"),k(al.$$.fragment),G1=p(),yn=s("p"),V1=o("The "),Fp=s("a"),S1=o("RobertaForTokenClassification"),P1=o(" forward method, overrides the "),jm=s("code"),X1=o("__call__"),L1=o(" special method."),Q1=p(),k(Us.$$.fragment),O1=p(),k(qs.$$.fragment),Og=p(),Tn=s("h2"),Ns=s("a"),Jm=s("span"),k(rl.$$.fragment),D1=p(),zm=s("span"),Y1=o("RobertaForQuestionAnswering"),Dg=p(),Et=s("div"),k(il.$$.fragment),H1=p(),kn=s("p"),K1=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 `),Cm=s("code"),e2=o("span start logits"),t2=o(" and "),Im=s("code"),o2=o("span end logits"),n2=o(")."),s2=p(),ll=s("p"),a2=o("This model inherits from "),Rp=s("a"),r2=o("PreTrainedModel"),i2=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.)`),l2=p(),dl=s("p"),d2=o("This model is also a PyTorch "),cl=s("a"),c2=o("torch.nn.Module"),p2=o(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),h2=p(),Dt=s("div"),k(pl.$$.fragment),m2=p(),vn=s("p"),u2=o("The "),Ep=s("a"),f2=o("RobertaForQuestionAnswering"),g2=o(" forward method, overrides the "),Um=s("code"),_2=o("__call__"),b2=o(" special method."),y2=p(),k(Ws.$$.fragment),T2=p(),k(Zs.$$.fragment),Yg=p(),wn=s("h2"),As=s("a"),qm=s("span"),k(hl.$$.fragment),k2=p(),Nm=s("span"),v2=o("TFRobertaModel"),Hg=p(),ht=s("div"),k(ml.$$.fragment),w2=p(),Wm=s("p"),M2=o("The bare RoBERTa Model transformer outputting raw hidden-states without any specific head on top."),$2=p(),ul=s("p"),F2=o("This model inherits from "),xp=s("a"),R2=o("TFPreTrainedModel"),E2=o(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),x2=p(),fl=s("p"),j2=o("This model is also a "),gl=s("a"),J2=o("tf.keras.Model"),z2=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.`),C2=p(),k(Bs.$$.fragment),I2=p(),Yt=s("div"),k(_l.$$.fragment),U2=p(),Mn=s("p"),q2=o("The "),jp=s("a"),N2=o("TFRobertaModel"),W2=o(" forward method, overrides the "),Zm=s("code"),Z2=o("__call__"),A2=o(" special method."),B2=p(),k(Gs.$$.fragment),G2=p(),k(Vs.$$.fragment),Kg=p(),$n=s("h2"),Ss=s("a"),Am=s("span"),k(bl.$$.fragment),V2=p(),Bm=s("span"),S2=o("TFRobertaForCausalLM"),e_=p(),Fn=s("div"),k(yl.$$.fragment),P2=p(),Ht=s("div"),k(Tl.$$.fragment),X2=p(),Rn=s("p"),L2=o("The "),Jp=s("a"),Q2=o("TFRobertaForCausalLM"),O2=o(" forward method, overrides the "),Gm=s("code"),D2=o("__call__"),Y2=o(" special method."),H2=p(),k(Ps.$$.fragment),K2=p(),k(Xs.$$.fragment),t_=p(),En=s("h2"),Ls=s("a"),Vm=s("span"),k(kl.$$.fragment),e0=p(),Sm=s("span"),t0=o("TFRobertaForMaskedLM"),o_=p(),mt=s("div"),k(vl.$$.fragment),o0=p(),wl=s("p"),n0=o("RoBERTa Model with a "),Pm=s("code"),s0=o("language modeling"),a0=o(" head on top."),r0=p(),Ml=s("p"),i0=o("This model inherits from "),zp=s("a"),l0=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(),$l=s("p"),p0=o("This model is also a "),Fl=s("a"),h0=o("tf.keras.Model"),m0=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.`),u0=p(),k(Qs.$$.fragment),f0=p(),Jt=s("div"),k(Rl.$$.fragment),g0=p(),xn=s("p"),_0=o("The "),Cp=s("a"),b0=o("TFRobertaForMaskedLM"),y0=o(" forward method, overrides the "),Xm=s("code"),T0=o("__call__"),k0=o(" special method."),v0=p(),k(Os.$$.fragment),w0=p(),k(Ds.$$.fragment),M0=p(),k(Ys.$$.fragment),n_=p(),jn=s("h2"),Hs=s("a"),Lm=s("span"),k(El.$$.fragment),$0=p(),Qm=s("span"),F0=o("TFRobertaForSequenceClassification"),s_=p(),ut=s("div"),k(xl.$$.fragment),R0=p(),Om=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(),jl=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(),Jl=s("p"),I0=o("This model is also a "),zl=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(),k(Ks.$$.fragment),W0=p(),zt=s("div"),k(Cl.$$.fragment),Z0=p(),Jn=s("p"),A0=o("The "),Up=s("a"),B0=o("TFRobertaForSequenceClassification"),G0=o(" forward method, overrides the "),Dm=s("code"),V0=o("__call__"),S0=o(" special method."),P0=p(),k(ea.$$.fragment),X0=p(),k(ta.$$.fragment),L0=p(),k(oa.$$.fragment),a_=p(),zn=s("h2"),na=s("a"),Ym=s("span"),k(Il.$$.fragment),Q0=p(),Hm=s("span"),O0=o("TFRobertaForMultipleChoice"),r_=p(),ft=s("div"),k(Ul.$$.fragment),D0=p(),Km=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(),ql=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(),Nl=s("p"),n$=o("This model is also a "),Wl=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(),k(sa.$$.fragment),i$=p(),Kt=s("div"),k(Zl.$$.fragment),l$=p(),Cn=s("p"),d$=o("The "),Np=s("a"),c$=o("TFRobertaForMultipleChoice"),p$=o(" forward method, overrides the "),eu=s("code"),h$=o("__call__"),m$=o(" special method."),u$=p(),k(aa.$$.fragment),f$=p(),k(ra.$$.fragment),i_=p(),In=s("h2"),ia=s("a"),tu=s("span"),k(Al.$$.fragment),g$=p(),ou=s("span"),_$=o("TFRobertaForTokenClassification"),l_=p(),gt=s("div"),k(Bl.$$.fragment),b$=p(),nu=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.`),T$=p(),Gl=s("p"),k$=o("This model inherits from "),Wp=s("a"),v$=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(),Vl=s("p"),$$=o("This model is also a "),Sl=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(),k(la.$$.fragment),x$=p(),Ct=s("div"),k(Pl.$$.fragment),j$=p(),Un=s("p"),J$=o("The "),Zp=s("a"),z$=o("TFRobertaForTokenClassification"),C$=o(" forward method, overrides the "),su=s("code"),I$=o("__call__"),U$=o(" special method."),q$=p(),k(da.$$.fragment),N$=p(),k(ca.$$.fragment),W$=p(),k(pa.$$.fragment),d_=p(),qn=s("h2"),ha=s("a"),au=s("span"),k(Xl.$$.fragment),Z$=p(),ru=s("span"),A$=o("TFRobertaForQuestionAnswering"),c_=p(),_t=s("div"),k(Ll.$$.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 `),iu=s("code"),V$=o("span start logits"),S$=o(" and "),lu=s("code"),P$=o("span end logits"),X$=o(")."),L$=p(),Ql=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(),Ol=s("p"),H$=o("This model is also a "),Dl=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(),k(ma.$$.fragment),oF=p(),It=s("div"),k(Yl.$$.fragment),nF=p(),Wn=s("p"),sF=o("The "),Bp=s("a"),aF=o("TFRobertaForQuestionAnswering"),rF=o(" forward method, overrides the "),du=s("code"),iF=o("__call__"),lF=o(" special method."),dF=p(),k(ua.$$.fragment),cF=p(),k(fa.$$.fragment),pF=p(),k(ga.$$.fragment),p_=p(),Zn=s("h2"),_a=s("a"),cu=s("span"),k(Hl.$$.fragment),hF=p(),pu=s("span"),mF=o("FlaxRobertaModel"),h_=p(),nt=s("div"),k(Kl.$$.fragment),uF=p(),hu=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)`),TF=p(),td=s("p"),kF=o("This model is also a Flax Linen "),od=s("a"),vF=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(),mu=s("p"),$F=o("Finally, this model supports inherent JAX features such as:"),FF=p(),bo=s("ul"),uu=s("li"),nd=s("a"),RF=o("Just-In-Time (JIT) compilation"),EF=p(),fu=s("li"),sd=s("a"),xF=o("Automatic Differentiation"),jF=p(),gu=s("li"),ad=s("a"),JF=o("Vectorization"),zF=p(),_u=s("li"),rd=s("a"),CF=o("Parallelization"),IF=p(),eo=s("div"),k(id.$$.fragment),UF=p(),An=s("p"),qF=o("The "),bu=s("code"),NF=o("FlaxRobertaPreTrainedModel"),WF=o(" forward method, overrides the "),yu=s("code"),ZF=o("__call__"),AF=o(" special method."),BF=p(),k(ba.$$.fragment),GF=p(),k(ya.$$.fragment),m_=p(),Bn=s("h2"),Ta=s("a"),Tu=s("span"),k(ld.$$.fragment),VF=p(),ku=s("span"),SF=o("FlaxRobertaForCausalLM"),u_=p(),st=s("div"),k(dd.$$.fragment),PF=p(),vu=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(),wu=s("p"),oR=o("Finally, this model supports inherent JAX features such as:"),nR=p(),yo=s("ul"),Mu=s("li"),md=s("a"),sR=o("Just-In-Time (JIT) compilation"),aR=p(),$u=s("li"),ud=s("a"),rR=o("Automatic Differentiation"),iR=p(),Fu=s("li"),fd=s("a"),lR=o("Vectorization"),dR=p(),Ru=s("li"),gd=s("a"),cR=o("Parallelization"),pR=p(),to=s("div"),k(_d.$$.fragment),hR=p(),Gn=s("p"),mR=o("The "),Eu=s("code"),uR=o("FlaxRobertaPreTrainedModel"),fR=o(" forward method, overrides the "),xu=s("code"),gR=o("__call__"),_R=o(" special method."),bR=p(),k(ka.$$.fragment),yR=p(),k(va.$$.fragment),f_=p(),Vn=s("h2"),wa=s("a"),ju=s("span"),k(bd.$$.fragment),TR=p(),Ju=s("span"),kR=o("FlaxRobertaForMaskedLM"),g_=p(),at=s("div"),k(yd.$$.fragment),vR=p(),Td=s("p"),wR=o("RoBERTa Model with a "),zu=s("code"),MR=o("language modeling"),$R=o(" head on top."),FR=p(),kd=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(),vd=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(),Cu=s("p"),UR=o("Finally, this model supports inherent JAX features such as:"),qR=p(),To=s("ul"),Iu=s("li"),Md=s("a"),NR=o("Just-In-Time (JIT) compilation"),WR=p(),Uu=s("li"),$d=s("a"),ZR=o("Automatic Differentiation"),AR=p(),qu=s("li"),Fd=s("a"),BR=o("Vectorization"),GR=p(),Nu=s("li"),Rd=s("a"),VR=o("Parallelization"),SR=p(),oo=s("div"),k(Ed.$$.fragment),PR=p(),Sn=s("p"),XR=o("The "),Wu=s("code"),LR=o("FlaxRobertaPreTrainedModel"),QR=o(" forward method, overrides the "),Zu=s("code"),OR=o("__call__"),DR=o(" special method."),YR=p(),k(Ma.$$.fragment),HR=p(),k($a.$$.fragment),__=p(),Pn=s("h2"),Fa=s("a"),Au=s("span"),k(xd.$$.fragment),KR=p(),Bu=s("span"),eE=o("FlaxRobertaForSequenceClassification"),b_=p(),rt=s("div"),k(jd.$$.fragment),tE=p(),Gu=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)`),iE=p(),zd=s("p"),lE=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(),Vu=s("p"),hE=o("Finally, this model supports inherent JAX features such as:"),mE=p(),ko=s("ul"),Su=s("li"),Id=s("a"),uE=o("Just-In-Time (JIT) compilation"),fE=p(),Pu=s("li"),Ud=s("a"),gE=o("Automatic Differentiation"),_E=p(),Xu=s("li"),qd=s("a"),bE=o("Vectorization"),yE=p(),Lu=s("li"),Nd=s("a"),TE=o("Parallelization"),kE=p(),no=s("div"),k(Wd.$$.fragment),vE=p(),Xn=s("p"),wE=o("The "),Qu=s("code"),ME=o("FlaxRobertaPreTrainedModel"),$E=o(" forward method, overrides the "),Ou=s("code"),FE=o("__call__"),RE=o(" special method."),EE=p(),k(Ra.$$.fragment),xE=p(),k(Ea.$$.fragment),y_=p(),Ln=s("h2"),xa=s("a"),Du=s("span"),k(Zd.$$.fragment),jE=p(),Yu=s("span"),JE=o("FlaxRobertaForMultipleChoice"),T_=p(),it=s("div"),k(Ad.$$.fragment),zE=p(),Hu=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(),Ku=s("p"),VE=o("Finally, this model supports inherent JAX features such as:"),SE=p(),vo=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"),k(Qd.$$.fragment),KE=p(),Qn=s("p"),ex=o("The "),sf=s("code"),tx=o("FlaxRobertaPreTrainedModel"),ox=o(" forward method, overrides the "),af=s("code"),nx=o("__call__"),sx=o(" special method."),ax=p(),k(ja.$$.fragment),rx=p(),k(Ja.$$.fragment),k_=p(),On=s("h2"),za=s("a"),rf=s("span"),k(Od.$$.fragment),ix=p(),lf=s("span"),lx=o("FlaxRobertaForTokenClassification"),v_=p(),lt=s("div"),k(Dd.$$.fragment),dx=p(),df=s("p"),cx=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.`),px=p(),Yd=s("p"),hx=o("This model inherits from "),Lp=s("a"),mx=o("FlaxPreTrainedModel"),ux=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)`),fx=p(),Hd=s("p"),gx=o("This model is also a Flax Linen "),Kd=s("a"),_x=o("flax.linen.Module"),bx=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.`),yx=p(),cf=s("p"),Tx=o("Finally, this model supports inherent JAX features such as:"),kx=p(),wo=s("ul"),pf=s("li"),ec=s("a"),vx=o("Just-In-Time (JIT) compilation"),wx=p(),hf=s("li"),tc=s("a"),Mx=o("Automatic Differentiation"),$x=p(),mf=s("li"),oc=s("a"),Fx=o("Vectorization"),Rx=p(),uf=s("li"),nc=s("a"),Ex=o("Parallelization"),xx=p(),ao=s("div"),k(sc.$$.fragment),jx=p(),Dn=s("p"),Jx=o("The "),ff=s("code"),zx=o("FlaxRobertaPreTrainedModel"),Cx=o(" forward method, overrides the "),gf=s("code"),Ix=o("__call__"),Ux=o(" special method."),qx=p(),k(Ca.$$.fragment),Nx=p(),k(Ia.$$.fragment),w_=p(),Yn=s("h2"),Ua=s("a"),_f=s("span"),k(ac.$$.fragment),Wx=p(),bf=s("span"),Zx=o("FlaxRobertaForQuestionAnswering"),M_=p(),dt=s("div"),k(rc.$$.fragment),Ax=p(),Hn=s("p"),Bx=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"),Gx=o("span start logits"),Vx=o(" and "),Tf=s("code"),Sx=o("span end logits"),Px=o(")."),Xx=p(),ic=s("p"),Lx=o("This model inherits from "),Qp=s("a"),Qx=o("FlaxPreTrainedModel"),Ox=o(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading, saving and converting weights from PyTorch models)`),Dx=p(),lc=s("p"),Yx=o("This model is also a Flax Linen "),dc=s("a"),Hx=o("flax.linen.Module"),Kx=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.`),ej=p(),kf=s("p"),tj=o("Finally, this model supports inherent JAX features such as:"),oj=p(),Mo=s("ul"),vf=s("li"),cc=s("a"),nj=o("Just-In-Time (JIT) compilation"),sj=p(),wf=s("li"),pc=s("a"),aj=o("Automatic Differentiation"),rj=p(),Mf=s("li"),hc=s("a"),ij=o("Vectorization"),lj=p(),$f=s("li"),mc=s("a"),dj=o("Parallelization"),cj=p(),ro=s("div"),k(uc.$$.fragment),pj=p(),Kn=s("p"),hj=o("The "),Ff=s("code"),mj=o("FlaxRobertaPreTrainedModel"),uj=o(" forward method, overrides the "),Rf=s("code"),fj=o("__call__"),gj=o(" special method."),_j=p(),k(qa.$$.fragment),bj=p(),k(Na.$$.fragment),this.h()},l(i){const _=j3('[data-svelte="svelte-1phssyn"]',document.head);d=a(_,"META",{name:!0,content:!0}),_.forEach(t),y=h(i),u=a(i,"H1",{class:!0});var fc=r(u);f=a(fc,"A",{id:!0,class:!0,href:!0});var Ef=r(f);b=a(Ef,"SPAN",{});var xf=r(b);v(l.$$.fragment,xf),xf.forEach(t),Ef.forEach(t),m=h(fc),E=a(fc,"SPAN",{});var jf=r(E);ae=n(jf,"RoBERTa"),jf.forEach(t),fc.forEach(t),K=h(i),N=a(i,"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);me=a(Cf,"IMG",{alt:!0,src:!0}),Cf.forEach(t),es.forEach(t),Fe=h(i),ie=a(i,"H2",{class:!0});var gc=r(ie);B=a(gc,"A",{id:!0,class:!0,href:!0});var If=r(B);_e=a(If,"SPAN",{});var Uf=r(_e);v(le.$$.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(i),z=a(i,"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(i),I=a(i,"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(i),ue=a(i,"P",{});var Af=r(ue);Ie=n(Af,"The abstract from the paper is the following:"),Af.forEach(t),L=h(i),fe=a(i,"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(i),V=a(i,"P",{});var Vf=r(V);Ue=n(Vf,"Tips:"),Vf.forEach(t),se=h(i),C=a(i,"UL",{});var St=r(C);Te=a(St,"LI",{});var Sf=r(Te);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);T=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);ke=a(Qf,"P",{});var $o=r(ke);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);iy=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),ly=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(i),Ro=a(i,"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),my=n(os,". The original code can be found "),cr=a(os,"A",{href:!0,rel:!0});var rg=r(cr);uy=n(rg,"here"),rg.forEach(t),fy=n(os,"."),os.forEach(t),yg=h(i),tn=a(i,"H2",{class:!0});var yc=r(tn);ss=a(yc,"A",{id:!0,class:!0,href:!0});var ig=r(ss);Eh=a(ig,"SPAN",{});var lg=r(Eh);v(pr.$$.fragment,lg),lg.forEach(t),ig.forEach(t),gy=h(yc),xh=a(yc,"SPAN",{});var dg=r(xh);_y=n(dg,"Resources"),dg.forEach(t),yc.forEach(t),Tg=h(i),Uc=a(i,"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),kg=h(i),v(hr.$$.fragment,i),vg=h(i),ct=a(i,"UL",{});var bt=r(ct);on=a(bt,"LI",{});var ns=r(on);yy=n(ns,"A blog on "),mr=a(ns,"A",{href:!0,rel:!0});var pg=r(mr);Ty=n(pg,"Getting Started with Sentiment Analysis on Twitter"),pg.forEach(t),ky=n(ns," using RoBERTa and the "),ur=a(ns,"A",{href:!0,rel:!0});var hg=r(ur);vy=n(hg,"Inference API"),hg.forEach(t),wy=n(ns,"."),ns.forEach(t),My=h(bt),fr=a(bt,"LI",{});var Tc=r(fr);$y=n(Tc,"A blog on "),gr=a(Tc,"A",{href:!0,rel:!0});var mg=r(gr);Fy=n(mg,"Opinion Classification with Kili and Hugging Face AutoTrain"),mg.forEach(t),Ry=n(Tc," using RoBERTa."),Tc.forEach(t),Ey=h(bt),_r=a(bt,"LI",{});var kc=r(_r);xy=n(kc,"A notebook on how to "),br=a(kc,"A",{href:!0,rel:!0});var ug=r(br);jy=n(ug,"finetune RoBERTa for sentiment analysis"),ug.forEach(t),Jy=n(kc,". \u{1F30E}"),kc.forEach(t),zy=h(bt),Eo=a(bt,"LI",{});var Go=r(Eo);qc=a(Go,"A",{href:!0});var $j=r(qc);Cy=n($j,"RobertaForSequenceClassification"),$j.forEach(t),Iy=n(Go," is supported by this "),yr=a(Go,"A",{href:!0,rel:!0});var Fj=r(yr);Uy=n(Fj,"example script"),Fj.forEach(t),qy=n(Go," and "),Tr=a(Go,"A",{href:!0,rel:!0});var Rj=r(Tr);Ny=n(Rj,"notebook"),Rj.forEach(t),Wy=n(Go,"."),Go.forEach(t),Zy=h(bt),xo=a(bt,"LI",{});var vc=r(xo);Nc=a(vc,"A",{href:!0});var Ej=r(Nc);Ay=n(Ej,"TFRobertaForSequenceClassification"),Ej.forEach(t),By=n(vc," is supported by this "),kr=a(vc,"A",{href:!0,rel:!0});var xj=r(kr);Gy=n(xj,"example script"),xj.forEach(t),Vy=n(vc," and "),vr=a(vc,"A",{href:!0,rel:!0});var jj=r(vr);Sy=n(jj,"notebook"),jj.forEach(t),Py=n(vc,"."),vc.forEach(t),Xy=h(bt),jo=a(bt,"LI",{});var wc=r(jo);Wc=a(wc,"A",{href:!0});var Jj=r(Wc);Ly=n(Jj,"FlaxRobertaForSequenceClassification"),Jj.forEach(t),Qy=n(wc," is supported by this "),wr=a(wc,"A",{href:!0,rel:!0});var zj=r(wr);Oy=n(zj,"example script"),zj.forEach(t),Dy=n(wc," and "),Mr=a(wc,"A",{href:!0,rel:!0});var Cj=r(Mr);Yy=n(Cj,"notebook"),Cj.forEach(t),Hy=n(wc,"."),wc.forEach(t),Ky=h(bt),jh=a(bt,"LI",{});var Ij=r(jh);Zc=a(Ij,"A",{href:!0});var Uj=r(Zc);eT=n(Uj,"Text classification task guide"),Uj.forEach(t),Ij.forEach(t),bt.forEach(t),wg=h(i),v($r.$$.fragment,i),Mg=h(i),xt=a(i,"UL",{});var Vo=r(xt);Jo=a(Vo,"LI",{});var Mc=r(Jo);Ac=a(Mc,"A",{href:!0});var qj=r(Ac);tT=n(qj,"RobertaForTokenClassification"),qj.forEach(t),oT=n(Mc," is supported by this "),Fr=a(Mc,"A",{href:!0,rel:!0});var Nj=r(Fr);nT=n(Nj,"example script"),Nj.forEach(t),sT=n(Mc," and "),Rr=a(Mc,"A",{href:!0,rel:!0});var Wj=r(Rr);aT=n(Wj,"notebook"),Wj.forEach(t),rT=n(Mc,"."),Mc.forEach(t),iT=h(Vo),zo=a(Vo,"LI",{});var $c=r(zo);Bc=a($c,"A",{href:!0});var Zj=r(Bc);lT=n(Zj,"TFRobertaForTokenClassification"),Zj.forEach(t),dT=n($c," is supported by this "),Er=a($c,"A",{href:!0,rel:!0});var Aj=r(Er);cT=n(Aj,"example script"),Aj.forEach(t),pT=n($c," and "),xr=a($c,"A",{href:!0,rel:!0});var Bj=r(xr);hT=n(Bj,"notebook"),Bj.forEach(t),mT=n($c,"."),$c.forEach(t),uT=h(Vo),as=a(Vo,"LI",{});var fg=r(as);Gc=a(fg,"A",{href:!0});var Gj=r(Gc);fT=n(Gj,"FlaxRobertaForTokenClassification"),Gj.forEach(t),gT=n(fg," is supported by this "),jr=a(fg,"A",{href:!0,rel:!0});var Vj=r(jr);_T=n(Vj,"example script"),Vj.forEach(t),bT=n(fg,"."),fg.forEach(t),yT=h(Vo),Vc=a(Vo,"LI",{});var yj=r(Vc);Jr=a(yj,"A",{href:!0,rel:!0});var Sj=r(Jr);TT=n(Sj,"Token classification"),Sj.forEach(t),kT=n(yj," chapter of the \u{1F917} Hugging Face Course."),yj.forEach(t),vT=h(Vo),Jh=a(Vo,"LI",{});var Pj=r(Jh);Sc=a(Pj,"A",{href:!0});var Xj=r(Sc);wT=n(Xj,"Token classification task guide"),Xj.forEach(t),Pj.forEach(t),Vo.forEach(t),$g=h(i),v(zr.$$.fragment,i),Fg=h(i),yt=a(i,"UL",{});var io=r(yt);Cr=a(io,"LI",{});var F_=r(Cr);MT=n(F_,"A blog on "),Ir=a(F_,"A",{href:!0,rel:!0});var Lj=r(Ir);$T=n(Lj,"How to train a new language model from scratch using Transformers and Tokenizers"),Lj.forEach(t),FT=n(F_," with RoBERTa."),F_.forEach(t),RT=h(io),Co=a(io,"LI",{});var Fc=r(Co);Pc=a(Fc,"A",{href:!0});var Qj=r(Pc);ET=n(Qj,"RobertaForMaskedLM"),Qj.forEach(t),xT=n(Fc," is supported by this "),Ur=a(Fc,"A",{href:!0,rel:!0});var Oj=r(Ur);jT=n(Oj,"example script"),Oj.forEach(t),JT=n(Fc," and "),qr=a(Fc,"A",{href:!0,rel:!0});var Dj=r(qr);zT=n(Dj,"notebook"),Dj.forEach(t),CT=n(Fc,"."),Fc.forEach(t),IT=h(io),Io=a(io,"LI",{});var Rc=r(Io);Xc=a(Rc,"A",{href:!0});var Yj=r(Xc);UT=n(Yj,"TFRobertaForMaskedLM"),Yj.forEach(t),qT=n(Rc," is supported by this "),Nr=a(Rc,"A",{href:!0,rel:!0});var Hj=r(Nr);NT=n(Hj,"example script"),Hj.forEach(t),WT=n(Rc," and "),Wr=a(Rc,"A",{href:!0,rel:!0});var Kj=r(Wr);ZT=n(Kj,"notebook"),Kj.forEach(t),AT=n(Rc,"."),Rc.forEach(t),BT=h(io),Uo=a(io,"LI",{});var Ec=r(Uo);Lc=a(Ec,"A",{href:!0});var eJ=r(Lc);GT=n(eJ,"FlaxRobertaForMaskedLM"),eJ.forEach(t),VT=n(Ec," is supported by this "),Zr=a(Ec,"A",{href:!0,rel:!0});var tJ=r(Zr);ST=n(tJ,"example script"),tJ.forEach(t),PT=n(Ec," and "),Ar=a(Ec,"A",{href:!0,rel:!0});var oJ=r(Ar);XT=n(oJ,"notebook"),oJ.forEach(t),LT=n(Ec,"."),Ec.forEach(t),QT=h(io),Qc=a(io,"LI",{});var Tj=r(Qc);Br=a(Tj,"A",{href:!0,rel:!0});var nJ=r(Br);OT=n(nJ,"Masked language modeling"),nJ.forEach(t),DT=n(Tj," chapter of the \u{1F917} Hugging Face Course."),Tj.forEach(t),YT=h(io),zh=a(io,"LI",{});var sJ=r(zh);Oc=a(sJ,"A",{href:!0});var aJ=r(Oc);HT=n(aJ,"Masked language modeling task guide"),aJ.forEach(t),sJ.forEach(t),io.forEach(t),Rg=h(i),v(Gr.$$.fragment,i),Eg=h(i),Tt=a(i,"UL",{});var lo=r(Tt);Vr=a(lo,"LI",{});var R_=r(Vr);KT=n(R_,"A blog on "),Sr=a(R_,"A",{href:!0,rel:!0});var rJ=r(Sr);ek=n(rJ,"Accelerated Inference with Optimum and Transformers Pipelines"),rJ.forEach(t),tk=n(R_," with RoBERTa for question answering."),R_.forEach(t),ok=h(lo),qo=a(lo,"LI",{});var xc=r(qo);Dc=a(xc,"A",{href:!0});var iJ=r(Dc);nk=n(iJ,"RobertaForQuestionAnswering"),iJ.forEach(t),sk=n(xc," is supported by this "),Pr=a(xc,"A",{href:!0,rel:!0});var lJ=r(Pr);ak=n(lJ,"example script"),lJ.forEach(t),rk=n(xc," and "),Xr=a(xc,"A",{href:!0,rel:!0});var dJ=r(Xr);ik=n(dJ,"notebook"),dJ.forEach(t),lk=n(xc,"."),xc.forEach(t),dk=h(lo),No=a(lo,"LI",{});var jc=r(No);Yc=a(jc,"A",{href:!0});var cJ=r(Yc);ck=n(cJ,"TFRobertaForQuestionAnswering"),cJ.forEach(t),pk=n(jc," is supported by this "),Lr=a(jc,"A",{href:!0,rel:!0});var pJ=r(Lr);hk=n(pJ,"example script"),pJ.forEach(t),mk=n(jc," and "),Qr=a(jc,"A",{href:!0,rel:!0});var hJ=r(Qr);uk=n(hJ,"notebook"),hJ.forEach(t),fk=n(jc,"."),jc.forEach(t),gk=h(lo),rs=a(lo,"LI",{});var gg=r(rs);Hc=a(gg,"A",{href:!0});var mJ=r(Hc);_k=n(mJ,"FlaxRobertaForQuestionAnswering"),mJ.forEach(t),bk=n(gg," is supported by this "),Or=a(gg,"A",{href:!0,rel:!0});var uJ=r(Or);yk=n(uJ,"example script"),uJ.forEach(t),Tk=n(gg,"."),gg.forEach(t),kk=h(lo),Kc=a(lo,"LI",{});var kj=r(Kc);Dr=a(kj,"A",{href:!0,rel:!0});var fJ=r(Dr);vk=n(fJ,"Question answering"),fJ.forEach(t),wk=n(kj," chapter of the \u{1F917} Hugging Face Course."),kj.forEach(t),Mk=h(lo),Ch=a(lo,"LI",{});var gJ=r(Ch);ep=a(gJ,"A",{href:!0});var _J=r(ep);$k=n(_J,"Question answering task guide"),_J.forEach(t),gJ.forEach(t),lo.forEach(t),xg=h(i),tp=a(i,"P",{});var bJ=r(tp);Ih=a(bJ,"STRONG",{});var yJ=r(Ih);Fk=n(yJ,"Multiple choice"),yJ.forEach(t),bJ.forEach(t),jg=h(i),Wo=a(i,"UL",{});var Dp=r(Wo);Zo=a(Dp,"LI",{});var Jc=r(Zo);op=a(Jc,"A",{href:!0});var TJ=r(op);Rk=n(TJ,"RobertaForMultipleChoice"),TJ.forEach(t),Ek=n(Jc," is supported by this "),Yr=a(Jc,"A",{href:!0,rel:!0});var kJ=r(Yr);xk=n(kJ,"example script"),kJ.forEach(t),jk=n(Jc," and "),Hr=a(Jc,"A",{href:!0,rel:!0});var vJ=r(Hr);Jk=n(vJ,"notebook"),vJ.forEach(t),zk=n(Jc,"."),Jc.forEach(t),Ck=h(Dp),Ao=a(Dp,"LI",{});var zc=r(Ao);np=a(zc,"A",{href:!0});var wJ=r(np);Ik=n(wJ,"TFRobertaForMultipleChoice"),wJ.forEach(t),Uk=n(zc," is supported by this "),Kr=a(zc,"A",{href:!0,rel:!0});var MJ=r(Kr);qk=n(MJ,"example script"),MJ.forEach(t),Nk=n(zc," and "),ei=a(zc,"A",{href:!0,rel:!0});var $J=r(ei);Wk=n($J,"notebook"),$J.forEach(t),Zk=n(zc,"."),zc.forEach(t),Ak=h(Dp),Uh=a(Dp,"LI",{});var FJ=r(Uh);sp=a(FJ,"A",{href:!0});var RJ=r(sp);Bk=n(RJ,"Multiple choice task guide"),RJ.forEach(t),FJ.forEach(t),Dp.forEach(t),Jg=h(i),nn=a(i,"H2",{class:!0});var E_=r(nn);is=a(E_,"A",{id:!0,class:!0,href:!0});var EJ=r(is);qh=a(EJ,"SPAN",{});var xJ=r(qh);v(ti.$$.fragment,xJ),xJ.forEach(t),EJ.forEach(t),Gk=h(E_),Nh=a(E_,"SPAN",{});var jJ=r(Nh);Vk=n(jJ,"RobertaConfig"),jJ.forEach(t),E_.forEach(t),zg=h(i),Vt=a(i,"DIV",{class:!0});var Wa=r(Vt);v(oi.$$.fragment,Wa),Sk=h(Wa),_o=a(Wa,"P",{});var Za=r(_o);Pk=n(Za,"This is the configuration class to store the configuration of a "),ap=a(Za,"A",{href:!0});var JJ=r(ap);Xk=n(JJ,"RobertaModel"),JJ.forEach(t),Lk=n(Za," or a "),rp=a(Za,"A",{href:!0});var zJ=r(rp);Qk=n(zJ,"TFRobertaModel"),zJ.forEach(t),Ok=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
`),ni=a(Za,"A",{href:!0,rel:!0});var CJ=r(ni);Dk=n(CJ,"roberta-base"),CJ.forEach(t),Yk=n(Za," architecture."),Za.forEach(t),Hk=h(Wa),sn=a(Wa,"P",{});var Yp=r(sn);Kk=n(Yp,"Configuration objects inherit from "),ip=a(Yp,"A",{href:!0});var IJ=r(ip);ev=n(IJ,"PretrainedConfig"),IJ.forEach(t),tv=n(Yp,` and can be used to control the model outputs. Read the
documentation from `),lp=a(Yp,"A",{href:!0});var UJ=r(lp);ov=n(UJ,"PretrainedConfig"),UJ.forEach(t),nv=n(Yp," for more information."),Yp.forEach(t),sv=h(Wa),v(ls.$$.fragment,Wa),Wa.forEach(t),Cg=h(i),an=a(i,"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);v(si.$$.fragment,NJ),NJ.forEach(t),qJ.forEach(t),av=h(x_),Zh=a(x_,"SPAN",{});var WJ=r(Zh);rv=n(WJ,"RobertaTokenizer"),WJ.forEach(t),x_.forEach(t),Ig=h(i),We=a(i,"DIV",{class:!0});var Pe=r(We);v(ai.$$.fragment,Pe),iv=h(Pe),Ah=a(Pe,"P",{});var ZJ=r(Ah);lv=n(ZJ,"Constructs a RoBERTa tokenizer, derived from the GPT-2 tokenizer, using byte-level Byte-Pair-Encoding."),ZJ.forEach(t),dv=h(Pe),Bh=a(Pe,"P",{});var AJ=r(Bh);cv=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),pv=h(Pe),v(cs.$$.fragment,Pe),hv=h(Pe),ri=a(Pe,"P",{});var j_=r(ri);mv=n(j_,"You can get around that behavior by passing "),Gh=a(j_,"CODE",{});var BJ=r(Gh);uv=n(BJ,"add_prefix_space=True"),BJ.forEach(t),fv=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),gv=h(Pe),v(ps.$$.fragment,Pe),_v=h(Pe),ii=a(Pe,"P",{});var J_=r(ii);bv=n(J_,"This tokenizer inherits from "),dp=a(J_,"A",{href:!0});var GJ=r(dp);yv=n(GJ,"PreTrainedTokenizer"),GJ.forEach(t),Tv=n(J_,` which contains most of the main methods. Users should refer to
this superclass for more information regarding those methods.`),J_.forEach(t),kv=h(Pe),Bo=a(Pe,"DIV",{class:!0});var Hp=r(Bo);v(li.$$.fragment,Hp),vv=h(Hp),Vh=a(Hp,"P",{});var VJ=r(Vh);wv=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),Mv=h(Hp),di=a(Hp,"UL",{});var z_=r(di);cp=a(z_,"LI",{});var vj=r(cp);$v=n(vj,"single sequence: "),Sh=a(vj,"CODE",{});var SJ=r(Sh);Fv=n(SJ,"<s> X </s>"),SJ.forEach(t),vj.forEach(t),Rv=h(z_),pp=a(z_,"LI",{});var wj=r(pp);Ev=n(wj,"pair of sequences: "),Ph=a(wj,"CODE",{});var PJ=r(Ph);xv=n(PJ,"<s> A </s></s> B </s>"),PJ.forEach(t),wj.forEach(t),z_.forEach(t),Hp.forEach(t),jv=h(Pe),hs=a(Pe,"DIV",{class:!0});var C_=r(hs);v(ci.$$.fragment,C_),Jv=h(C_),pi=a(C_,"P",{});var I_=r(pi);zv=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);Cv=n(XJ,"prepare_for_model"),XJ.forEach(t),Iv=n(I_," method."),I_.forEach(t),C_.forEach(t),Uv=h(Pe),ms=a(Pe,"DIV",{class:!0});var U_=r(ms);v(hi.$$.fragment,U_),qv=h(U_),Lh=a(U_,"P",{});var LJ=r(Lh);Nv=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),Wv=h(Pe),hp=a(Pe,"DIV",{class:!0});var QJ=r(hp);v(mi.$$.fragment,QJ),QJ.forEach(t),Pe.forEach(t),Ug=h(i),rn=a(i,"H2",{class:!0});var q_=r(rn);us=a(q_,"A",{id:!0,class:!0,href:!0});var OJ=r(us);Qh=a(OJ,"SPAN",{});var DJ=r(Qh);v(ui.$$.fragment,DJ),DJ.forEach(t),OJ.forEach(t),Zv=h(q_),Oh=a(q_,"SPAN",{});var YJ=r(Oh);Av=n(YJ,"RobertaTokenizerFast"),YJ.forEach(t),q_.forEach(t),qg=h(i),tt=a(i,"DIV",{class:!0});var kt=r(tt);v(fi.$$.fragment,kt),Bv=h(kt),gi=a(kt,"P",{});var N_=r(gi);Gv=n(N_,"Construct a \u201Cfast\u201D RoBERTa tokenizer (backed by HuggingFace\u2019s "),Dh=a(N_,"EM",{});var HJ=r(Dh);Vv=n(HJ,"tokenizers"),HJ.forEach(t),Sv=n(N_,` library), derived from the GPT-2
tokenizer, using byte-level Byte-Pair-Encoding.`),N_.forEach(t),Pv=h(kt),Yh=a(kt,"P",{});var KJ=r(Yh);Xv=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),Lv=h(kt),v(fs.$$.fragment,kt),Qv=h(kt),_i=a(kt,"P",{});var W_=r(_i);Ov=n(W_,"You can get around that behavior by passing "),Hh=a(W_,"CODE",{});var ez=r(Hh);Dv=n(ez,"add_prefix_space=True"),ez.forEach(t),Yv=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),Hv=h(kt),v(gs.$$.fragment,kt),Kv=h(kt),bi=a(kt,"P",{});var Z_=r(bi);ew=n(Z_,"This tokenizer inherits from "),mp=a(Z_,"A",{href:!0});var tz=r(mp);tw=n(tz,"PreTrainedTokenizerFast"),tz.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(kt),up=a(kt,"DIV",{class:!0});var oz=r(up);v(yi.$$.fragment,oz),oz.forEach(t),kt.forEach(t),Ng=h(i),ln=a(i,"H2",{class:!0});var A_=r(ln);_s=a(A_,"A",{id:!0,class:!0,href:!0});var nz=r(_s);Kh=a(nz,"SPAN",{});var sz=r(Kh);v(Ti.$$.fragment,sz),sz.forEach(t),nz.forEach(t),sw=h(A_),em=a(A_,"SPAN",{});var az=r(em);aw=n(az,"RobertaModel"),az.forEach(t),A_.forEach(t),Wg=h(i),ot=a(i,"DIV",{class:!0});var vt=r(ot);v(ki.$$.fragment,vt),rw=h(vt),tm=a(vt,"P",{});var rz=r(tm);iw=n(rz,"The bare RoBERTa Model transformer outputting raw hidden-states without any specific head on top."),rz.forEach(t),lw=h(vt),vi=a(vt,"P",{});var B_=r(vi);dw=n(B_,"This model inherits from "),fp=a(B_,"A",{href:!0});var iz=r(fp);cw=n(iz,"PreTrainedModel"),iz.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(vt),wi=a(vt,"P",{});var G_=r(wi);mw=n(G_,"This model is also a PyTorch "),Mi=a(G_,"A",{href:!0,rel:!0});var lz=r(Mi);uw=n(lz,"torch.nn.Module"),lz.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(vt),$i=a(vt,"P",{});var V_=r($i);_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 `),om=a(V_,"EM",{});var dz=r(om);bw=n(dz,`Attention is
all you need`),dz.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),Tw=h(vt),pt=a(vt,"P",{});var Ut=r(pt);kw=n(Ut,"To behave as an decoder the model needs to be initialized with the "),nm=a(Ut,"CODE",{});var cz=r(nm);vw=n(cz,"is_decoder"),cz.forEach(t),ww=n(Ut,` argument of the configuration set
to `),sm=a(Ut,"CODE",{});var pz=r(sm);Mw=n(pz,"True"),pz.forEach(t),$w=n(Ut,". To be used in a Seq2Seq model, the model needs to initialized with both "),am=a(Ut,"CODE",{});var hz=r(am);Fw=n(hz,"is_decoder"),hz.forEach(t),Rw=n(Ut,` argument and
`),rm=a(Ut,"CODE",{});var mz=r(rm);Ew=n(mz,"add_cross_attention"),mz.forEach(t),xw=n(Ut," set to "),im=a(Ut,"CODE",{});var uz=r(im);jw=n(uz,"True"),uz.forEach(t),Jw=n(Ut,"; an "),lm=a(Ut,"CODE",{});var fz=r(lm);zw=n(fz,"encoder_hidden_states"),fz.forEach(t),Cw=n(Ut," is then expected as an input to the forward pass."),Ut.forEach(t),Iw=h(vt),bs=a(vt,"P",{});var _g=r(bs);Uw=n(_g,".. _"),dm=a(_g,"EM",{});var gz=r(dm);qw=n(gz,"Attention is all you need"),gz.forEach(t),Nw=n(_g,": "),Fi=a(_g,"A",{href:!0,rel:!0});var _z=r(Fi);Ww=n(_z,"https://arxiv.org/abs/1706.03762"),_z.forEach(t),_g.forEach(t),Zw=h(vt),Pt=a(vt,"DIV",{class:!0});var Aa=r(Pt);v(Ri.$$.fragment,Aa),Aw=h(Aa),dn=a(Aa,"P",{});var Kp=r(dn);Bw=n(Kp,"The "),gp=a(Kp,"A",{href:!0});var bz=r(gp);Gw=n(bz,"RobertaModel"),bz.forEach(t),Vw=n(Kp," forward method, overrides the "),cm=a(Kp,"CODE",{});var yz=r(cm);Sw=n(yz,"__call__"),yz.forEach(t),Pw=n(Kp," special method."),Kp.forEach(t),Xw=h(Aa),v(ys.$$.fragment,Aa),Lw=h(Aa),v(Ts.$$.fragment,Aa),Aa.forEach(t),vt.forEach(t),Zg=h(i),cn=a(i,"H2",{class:!0});var S_=r(cn);ks=a(S_,"A",{id:!0,class:!0,href:!0});var Tz=r(ks);pm=a(Tz,"SPAN",{});var kz=r(pm);v(Ei.$$.fragment,kz),kz.forEach(t),Tz.forEach(t),Qw=h(S_),hm=a(S_,"SPAN",{});var vz=r(hm);Ow=n(vz,"RobertaForCausalLM"),vz.forEach(t),S_.forEach(t),Ag=h(i),wt=a(i,"DIV",{class:!0});var So=r(wt);v(xi.$$.fragment,So),Dw=h(So),ji=a(So,"P",{});var P_=r(ji);Yw=n(P_,"RoBERTa Model with a "),mm=a(P_,"CODE",{});var wz=r(mm);Hw=n(wz,"language modeling"),wz.forEach(t),Kw=n(P_," head on top for CLM fine-tuning."),P_.forEach(t),eM=h(So),Ji=a(So,"P",{});var X_=r(Ji);tM=n(X_,"This model inherits from "),_p=a(X_,"A",{href:!0});var Mz=r(_p);oM=n(Mz,"PreTrainedModel"),Mz.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),zi=a(So,"P",{});var L_=r(zi);aM=n(L_,"This model is also a PyTorch "),Ci=a(L_,"A",{href:!0,rel:!0});var $z=r(Ci);rM=n($z,"torch.nn.Module"),$z.forEach(t),iM=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),lM=h(So),Xt=a(So,"DIV",{class:!0});var Ba=r(Xt);v(Ii.$$.fragment,Ba),dM=h(Ba),pn=a(Ba,"P",{});var eh=r(pn);cM=n(eh,"The "),bp=a(eh,"A",{href:!0});var Fz=r(bp);pM=n(Fz,"RobertaForCausalLM"),Fz.forEach(t),hM=n(eh," forward method, overrides the "),um=a(eh,"CODE",{});var Rz=r(um);mM=n(Rz,"__call__"),Rz.forEach(t),uM=n(eh," special method."),eh.forEach(t),fM=h(Ba),v(vs.$$.fragment,Ba),gM=h(Ba),v(ws.$$.fragment,Ba),Ba.forEach(t),So.forEach(t),Bg=h(i),hn=a(i,"H2",{class:!0});var Q_=r(hn);Ms=a(Q_,"A",{id:!0,class:!0,href:!0});var Ez=r(Ms);fm=a(Ez,"SPAN",{});var xz=r(fm);v(Ui.$$.fragment,xz),xz.forEach(t),Ez.forEach(t),_M=h(Q_),gm=a(Q_,"SPAN",{});var jz=r(gm);bM=n(jz,"RobertaForMaskedLM"),jz.forEach(t),Q_.forEach(t),Gg=h(i),Mt=a(i,"DIV",{class:!0});var Po=r(Mt);v(qi.$$.fragment,Po),yM=h(Po),Ni=a(Po,"P",{});var O_=r(Ni);TM=n(O_,"RoBERTa Model with a "),_m=a(O_,"CODE",{});var Jz=r(_m);kM=n(Jz,"language modeling"),Jz.forEach(t),vM=n(O_," head on top."),O_.forEach(t),wM=h(Po),Wi=a(Po,"P",{});var D_=r(Wi);MM=n(D_,"This model inherits from "),yp=a(D_,"A",{href:!0});var zz=r(yp);$M=n(zz,"PreTrainedModel"),zz.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),Zi=a(Po,"P",{});var Y_=r(Zi);EM=n(Y_,"This model is also a PyTorch "),Ai=a(Y_,"A",{href:!0,rel:!0});var Cz=r(Ai);xM=n(Cz,"torch.nn.Module"),Cz.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);v(Bi.$$.fragment,Ga),zM=h(Ga),mn=a(Ga,"P",{});var th=r(mn);CM=n(th,"The "),Tp=a(th,"A",{href:!0});var Iz=r(Tp);IM=n(Iz,"RobertaForMaskedLM"),Iz.forEach(t),UM=n(th," forward method, overrides the "),bm=a(th,"CODE",{});var Uz=r(bm);qM=n(Uz,"__call__"),Uz.forEach(t),NM=n(th," special method."),th.forEach(t),WM=h(Ga),v($s.$$.fragment,Ga),ZM=h(Ga),v(Fs.$$.fragment,Ga),Ga.forEach(t),Po.forEach(t),Vg=h(i),un=a(i,"H2",{class:!0});var H_=r(un);Rs=a(H_,"A",{id:!0,class:!0,href:!0});var qz=r(Rs);ym=a(qz,"SPAN",{});var Nz=r(ym);v(Gi.$$.fragment,Nz),Nz.forEach(t),qz.forEach(t),AM=h(H_),Tm=a(H_,"SPAN",{});var Wz=r(Tm);BM=n(Wz,"RobertaForSequenceClassification"),Wz.forEach(t),H_.forEach(t),Sg=h(i),$t=a(i,"DIV",{class:!0});var Xo=r($t);v(Vi.$$.fragment,Xo),GM=h(Xo),km=a(Xo,"P",{});var Zz=r(km);VM=n(Zz,`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.`),Zz.forEach(t),SM=h(Xo),Si=a(Xo,"P",{});var K_=r(Si);PM=n(K_,"This model inherits from "),kp=a(K_,"A",{href:!0});var Az=r(kp);XM=n(Az,"PreTrainedModel"),Az.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),Pi=a(Xo,"P",{});var eb=r(Pi);OM=n(eb,"This model is also a PyTorch "),Xi=a(eb,"A",{href:!0,rel:!0});var Bz=r(Xi);DM=n(Bz,"torch.nn.Module"),Bz.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);v(Li.$$.fragment,Lo),KM=h(Lo),fn=a(Lo,"P",{});var oh=r(fn);e1=n(oh,"The "),vp=a(oh,"A",{href:!0});var Gz=r(vp);t1=n(Gz,"RobertaForSequenceClassification"),Gz.forEach(t),o1=n(oh," forward method, overrides the "),vm=a(oh,"CODE",{});var Vz=r(vm);n1=n(Vz,"__call__"),Vz.forEach(t),s1=n(oh," special method."),oh.forEach(t),a1=h(Lo),v(Es.$$.fragment,Lo),r1=h(Lo),v(xs.$$.fragment,Lo),i1=h(Lo),v(js.$$.fragment,Lo),Lo.forEach(t),Xo.forEach(t),Pg=h(i),gn=a(i,"H2",{class:!0});var tb=r(gn);Js=a(tb,"A",{id:!0,class:!0,href:!0});var Sz=r(Js);wm=a(Sz,"SPAN",{});var Pz=r(wm);v(Qi.$$.fragment,Pz),Pz.forEach(t),Sz.forEach(t),l1=h(tb),Mm=a(tb,"SPAN",{});var Xz=r(Mm);d1=n(Xz,"RobertaForMultipleChoice"),Xz.forEach(t),tb.forEach(t),Xg=h(i),Ft=a(i,"DIV",{class:!0});var Qo=r(Ft);v(Oi.$$.fragment,Qo),c1=h(Qo),$m=a(Qo,"P",{});var Lz=r($m);p1=n(Lz,`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.`),Lz.forEach(t),h1=h(Qo),Di=a(Qo,"P",{});var ob=r(Di);m1=n(ob,"This model inherits from "),wp=a(ob,"A",{href:!0});var Qz=r(wp);u1=n(Qz,"PreTrainedModel"),Qz.forEach(t),f1=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),g1=h(Qo),Yi=a(Qo,"P",{});var nb=r(Yi);_1=n(nb,"This model is also a PyTorch "),Hi=a(nb,"A",{href:!0,rel:!0});var Oz=r(Hi);b1=n(Oz,"torch.nn.Module"),Oz.forEach(t),y1=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),T1=h(Qo),Qt=a(Qo,"DIV",{class:!0});var Va=r(Qt);v(Ki.$$.fragment,Va),k1=h(Va),_n=a(Va,"P",{});var nh=r(_n);v1=n(nh,"The "),Mp=a(nh,"A",{href:!0});var Dz=r(Mp);w1=n(Dz,"RobertaForMultipleChoice"),Dz.forEach(t),M1=n(nh," forward method, overrides the "),Fm=a(nh,"CODE",{});var Yz=r(Fm);$1=n(Yz,"__call__"),Yz.forEach(t),F1=n(nh," special method."),nh.forEach(t),R1=h(Va),v(zs.$$.fragment,Va),E1=h(Va),v(Cs.$$.fragment,Va),Va.forEach(t),Qo.forEach(t),Lg=h(i),bn=a(i,"H2",{class:!0});var sb=r(bn);Is=a(sb,"A",{id:!0,class:!0,href:!0});var Hz=r(Is);Rm=a(Hz,"SPAN",{});var Kz=r(Rm);v(el.$$.fragment,Kz),Kz.forEach(t),Hz.forEach(t),x1=h(sb),Em=a(sb,"SPAN",{});var eC=r(Em);j1=n(eC,"RobertaForTokenClassification"),eC.forEach(t),sb.forEach(t),Qg=h(i),Rt=a(i,"DIV",{class:!0});var Oo=r(Rt);v(tl.$$.fragment,Oo),J1=h(Oo),xm=a(Oo,"P",{});var tC=r(xm);z1=n(tC,`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.`),tC.forEach(t),C1=h(Oo),ol=a(Oo,"P",{});var ab=r(ol);I1=n(ab,"This model inherits from "),$p=a(ab,"A",{href:!0});var oC=r($p);U1=n(oC,"PreTrainedModel"),oC.forEach(t),q1=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),N1=h(Oo),nl=a(Oo,"P",{});var rb=r(nl);W1=n(rb,"This model is also a PyTorch "),sl=a(rb,"A",{href:!0,rel:!0});var nC=r(sl);Z1=n(nC,"torch.nn.Module"),nC.forEach(t),A1=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),B1=h(Oo),Ot=a(Oo,"DIV",{class:!0});var Sa=r(Ot);v(al.$$.fragment,Sa),G1=h(Sa),yn=a(Sa,"P",{});var sh=r(yn);V1=n(sh,"The "),Fp=a(sh,"A",{href:!0});var sC=r(Fp);S1=n(sC,"RobertaForTokenClassification"),sC.forEach(t),P1=n(sh," forward method, overrides the "),jm=a(sh,"CODE",{});var aC=r(jm);X1=n(aC,"__call__"),aC.forEach(t),L1=n(sh," special method."),sh.forEach(t),Q1=h(Sa),v(Us.$$.fragment,Sa),O1=h(Sa),v(qs.$$.fragment,Sa),Sa.forEach(t),Oo.forEach(t),Og=h(i),Tn=a(i,"H2",{class:!0});var ib=r(Tn);Ns=a(ib,"A",{id:!0,class:!0,href:!0});var rC=r(Ns);Jm=a(rC,"SPAN",{});var iC=r(Jm);v(rl.$$.fragment,iC),iC.forEach(t),rC.forEach(t),D1=h(ib),zm=a(ib,"SPAN",{});var lC=r(zm);Y1=n(lC,"RobertaForQuestionAnswering"),lC.forEach(t),ib.forEach(t),Dg=h(i),Et=a(i,"DIV",{class:!0});var Do=r(Et);v(il.$$.fragment,Do),H1=h(Do),kn=a(Do,"P",{});var ah=r(kn);K1=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 `),Cm=a(ah,"CODE",{});var dC=r(Cm);e2=n(dC,"span start logits"),dC.forEach(t),t2=n(ah," and "),Im=a(ah,"CODE",{});var cC=r(Im);o2=n(cC,"span end logits"),cC.forEach(t),n2=n(ah,")."),ah.forEach(t),s2=h(Do),ll=a(Do,"P",{});var lb=r(ll);a2=n(lb,"This model inherits from "),Rp=a(lb,"A",{href:!0});var pC=r(Rp);r2=n(pC,"PreTrainedModel"),pC.forEach(t),i2=n(lb,`. 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.)`),lb.forEach(t),l2=h(Do),dl=a(Do,"P",{});var db=r(dl);d2=n(db,"This model is also a PyTorch "),cl=a(db,"A",{href:!0,rel:!0});var hC=r(cl);c2=n(hC,"torch.nn.Module"),hC.forEach(t),p2=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),h2=h(Do),Dt=a(Do,"DIV",{class:!0});var Pa=r(Dt);v(pl.$$.fragment,Pa),m2=h(Pa),vn=a(Pa,"P",{});var rh=r(vn);u2=n(rh,"The "),Ep=a(rh,"A",{href:!0});var mC=r(Ep);f2=n(mC,"RobertaForQuestionAnswering"),mC.forEach(t),g2=n(rh," forward method, overrides the "),Um=a(rh,"CODE",{});var uC=r(Um);_2=n(uC,"__call__"),uC.forEach(t),b2=n(rh," special method."),rh.forEach(t),y2=h(Pa),v(Ws.$$.fragment,Pa),T2=h(Pa),v(Zs.$$.fragment,Pa),Pa.forEach(t),Do.forEach(t),Yg=h(i),wn=a(i,"H2",{class:!0});var cb=r(wn);As=a(cb,"A",{id:!0,class:!0,href:!0});var fC=r(As);qm=a(fC,"SPAN",{});var gC=r(qm);v(hl.$$.fragment,gC),gC.forEach(t),fC.forEach(t),k2=h(cb),Nm=a(cb,"SPAN",{});var _C=r(Nm);v2=n(_C,"TFRobertaModel"),_C.forEach(t),cb.forEach(t),Hg=h(i),ht=a(i,"DIV",{class:!0});var co=r(ht);v(ml.$$.fragment,co),w2=h(co),Wm=a(co,"P",{});var bC=r(Wm);M2=n(bC,"The bare RoBERTa Model transformer outputting raw hidden-states without any specific head on top."),bC.forEach(t),$2=h(co),ul=a(co,"P",{});var pb=r(ul);F2=n(pb,"This model inherits from "),xp=a(pb,"A",{href:!0});var yC=r(xp);R2=n(yC,"TFPreTrainedModel"),yC.forEach(t),E2=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),x2=h(co),fl=a(co,"P",{});var hb=r(fl);j2=n(hb,"This model is also a "),gl=a(hb,"A",{href:!0,rel:!0});var TC=r(gl);J2=n(TC,"tf.keras.Model"),TC.forEach(t),z2=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),C2=h(co),v(Bs.$$.fragment,co),I2=h(co),Yt=a(co,"DIV",{class:!0});var Xa=r(Yt);v(_l.$$.fragment,Xa),U2=h(Xa),Mn=a(Xa,"P",{});var ih=r(Mn);q2=n(ih,"The "),jp=a(ih,"A",{href:!0});var kC=r(jp);N2=n(kC,"TFRobertaModel"),kC.forEach(t),W2=n(ih," forward method, overrides the "),Zm=a(ih,"CODE",{});var vC=r(Zm);Z2=n(vC,"__call__"),vC.forEach(t),A2=n(ih," special method."),ih.forEach(t),B2=h(Xa),v(Gs.$$.fragment,Xa),G2=h(Xa),v(Vs.$$.fragment,Xa),Xa.forEach(t),co.forEach(t),Kg=h(i),$n=a(i,"H2",{class:!0});var mb=r($n);Ss=a(mb,"A",{id:!0,class:!0,href:!0});var wC=r(Ss);Am=a(wC,"SPAN",{});var MC=r(Am);v(bl.$$.fragment,MC),MC.forEach(t),wC.forEach(t),V2=h(mb),Bm=a(mb,"SPAN",{});var $C=r(Bm);S2=n($C,"TFRobertaForCausalLM"),$C.forEach(t),mb.forEach(t),e_=h(i),Fn=a(i,"DIV",{class:!0});var ub=r(Fn);v(yl.$$.fragment,ub),P2=h(ub),Ht=a(ub,"DIV",{class:!0});var La=r(Ht);v(Tl.$$.fragment,La),X2=h(La),Rn=a(La,"P",{});var lh=r(Rn);L2=n(lh,"The "),Jp=a(lh,"A",{href:!0});var FC=r(Jp);Q2=n(FC,"TFRobertaForCausalLM"),FC.forEach(t),O2=n(lh," forward method, overrides the "),Gm=a(lh,"CODE",{});var RC=r(Gm);D2=n(RC,"__call__"),RC.forEach(t),Y2=n(lh," special method."),lh.forEach(t),H2=h(La),v(Ps.$$.fragment,La),K2=h(La),v(Xs.$$.fragment,La),La.forEach(t),ub.forEach(t),t_=h(i),En=a(i,"H2",{class:!0});var fb=r(En);Ls=a(fb,"A",{id:!0,class:!0,href:!0});var EC=r(Ls);Vm=a(EC,"SPAN",{});var xC=r(Vm);v(kl.$$.fragment,xC),xC.forEach(t),EC.forEach(t),e0=h(fb),Sm=a(fb,"SPAN",{});var jC=r(Sm);t0=n(jC,"TFRobertaForMaskedLM"),jC.forEach(t),fb.forEach(t),o_=h(i),mt=a(i,"DIV",{class:!0});var po=r(mt);v(vl.$$.fragment,po),o0=h(po),wl=a(po,"P",{});var gb=r(wl);n0=n(gb,"RoBERTa Model with a "),Pm=a(gb,"CODE",{});var JC=r(Pm);s0=n(JC,"language modeling"),JC.forEach(t),a0=n(gb," head on top."),gb.forEach(t),r0=h(po),Ml=a(po,"P",{});var _b=r(Ml);i0=n(_b,"This model inherits from "),zp=a(_b,"A",{href:!0});var zC=r(zp);l0=n(zC,"TFPreTrainedModel"),zC.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),$l=a(po,"P",{});var bb=r($l);p0=n(bb,"This model is also a "),Fl=a(bb,"A",{href:!0,rel:!0});var CC=r(Fl);h0=n(CC,"tf.keras.Model"),CC.forEach(t),m0=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),u0=h(po),v(Qs.$$.fragment,po),f0=h(po),Jt=a(po,"DIV",{class:!0});var Yo=r(Jt);v(Rl.$$.fragment,Yo),g0=h(Yo),xn=a(Yo,"P",{});var dh=r(xn);_0=n(dh,"The "),Cp=a(dh,"A",{href:!0});var IC=r(Cp);b0=n(IC,"TFRobertaForMaskedLM"),IC.forEach(t),y0=n(dh," forward method, overrides the "),Xm=a(dh,"CODE",{});var UC=r(Xm);T0=n(UC,"__call__"),UC.forEach(t),k0=n(dh," special method."),dh.forEach(t),v0=h(Yo),v(Os.$$.fragment,Yo),w0=h(Yo),v(Ds.$$.fragment,Yo),M0=h(Yo),v(Ys.$$.fragment,Yo),Yo.forEach(t),po.forEach(t),n_=h(i),jn=a(i,"H2",{class:!0});var yb=r(jn);Hs=a(yb,"A",{id:!0,class:!0,href:!0});var qC=r(Hs);Lm=a(qC,"SPAN",{});var NC=r(Lm);v(El.$$.fragment,NC),NC.forEach(t),qC.forEach(t),$0=h(yb),Qm=a(yb,"SPAN",{});var WC=r(Qm);F0=n(WC,"TFRobertaForSequenceClassification"),WC.forEach(t),yb.forEach(t),s_=h(i),ut=a(i,"DIV",{class:!0});var ho=r(ut);v(xl.$$.fragment,ho),R0=h(ho),Om=a(ho,"P",{});var ZC=r(Om);E0=n(ZC,`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.`),ZC.forEach(t),x0=h(ho),jl=a(ho,"P",{});var Tb=r(jl);j0=n(Tb,"This model inherits from "),Ip=a(Tb,"A",{href:!0});var AC=r(Ip);J0=n(AC,"TFPreTrainedModel"),AC.forEach(t),z0=n(Tb,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),Tb.forEach(t),C0=h(ho),Jl=a(ho,"P",{});var kb=r(Jl);I0=n(kb,"This model is also a "),zl=a(kb,"A",{href:!0,rel:!0});var BC=r(zl);U0=n(BC,"tf.keras.Model"),BC.forEach(t),q0=n(kb,` 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.`),kb.forEach(t),N0=h(ho),v(Ks.$$.fragment,ho),W0=h(ho),zt=a(ho,"DIV",{class:!0});var Ho=r(zt);v(Cl.$$.fragment,Ho),Z0=h(Ho),Jn=a(Ho,"P",{});var ch=r(Jn);A0=n(ch,"The "),Up=a(ch,"A",{href:!0});var GC=r(Up);B0=n(GC,"TFRobertaForSequenceClassification"),GC.forEach(t),G0=n(ch," forward method, overrides the "),Dm=a(ch,"CODE",{});var VC=r(Dm);V0=n(VC,"__call__"),VC.forEach(t),S0=n(ch," special method."),ch.forEach(t),P0=h(Ho),v(ea.$$.fragment,Ho),X0=h(Ho),v(ta.$$.fragment,Ho),L0=h(Ho),v(oa.$$.fragment,Ho),Ho.forEach(t),ho.forEach(t),a_=h(i),zn=a(i,"H2",{class:!0});var vb=r(zn);na=a(vb,"A",{id:!0,class:!0,href:!0});var SC=r(na);Ym=a(SC,"SPAN",{});var PC=r(Ym);v(Il.$$.fragment,PC),PC.forEach(t),SC.forEach(t),Q0=h(vb),Hm=a(vb,"SPAN",{});var XC=r(Hm);O0=n(XC,"TFRobertaForMultipleChoice"),XC.forEach(t),vb.forEach(t),r_=h(i),ft=a(i,"DIV",{class:!0});var mo=r(ft);v(Ul.$$.fragment,mo),D0=h(mo),Km=a(mo,"P",{});var LC=r(Km);Y0=n(LC,`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.`),LC.forEach(t),H0=h(mo),ql=a(mo,"P",{});var wb=r(ql);K0=n(wb,"This model inherits from "),qp=a(wb,"A",{href:!0});var QC=r(qp);e$=n(QC,"TFPreTrainedModel"),QC.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(mo),Nl=a(mo,"P",{});var Mb=r(Nl);n$=n(Mb,"This model is also a "),Wl=a(Mb,"A",{href:!0,rel:!0});var OC=r(Wl);s$=n(OC,"tf.keras.Model"),OC.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(mo),v(sa.$$.fragment,mo),i$=h(mo),Kt=a(mo,"DIV",{class:!0});var Qa=r(Kt);v(Zl.$$.fragment,Qa),l$=h(Qa),Cn=a(Qa,"P",{});var ph=r(Cn);d$=n(ph,"The "),Np=a(ph,"A",{href:!0});var DC=r(Np);c$=n(DC,"TFRobertaForMultipleChoice"),DC.forEach(t),p$=n(ph," forward method, overrides the "),eu=a(ph,"CODE",{});var YC=r(eu);h$=n(YC,"__call__"),YC.forEach(t),m$=n(ph," special method."),ph.forEach(t),u$=h(Qa),v(aa.$$.fragment,Qa),f$=h(Qa),v(ra.$$.fragment,Qa),Qa.forEach(t),mo.forEach(t),i_=h(i),In=a(i,"H2",{class:!0});var $b=r(In);ia=a($b,"A",{id:!0,class:!0,href:!0});var HC=r(ia);tu=a(HC,"SPAN",{});var KC=r(tu);v(Al.$$.fragment,KC),KC.forEach(t),HC.forEach(t),g$=h($b),ou=a($b,"SPAN",{});var e4=r(ou);_$=n(e4,"TFRobertaForTokenClassification"),e4.forEach(t),$b.forEach(t),l_=h(i),gt=a(i,"DIV",{class:!0});var uo=r(gt);v(Bl.$$.fragment,uo),b$=h(uo),nu=a(uo,"P",{});var t4=r(nu);y$=n(t4,`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.`),t4.forEach(t),T$=h(uo),Gl=a(uo,"P",{});var Fb=r(Gl);k$=n(Fb,"This model inherits from "),Wp=a(Fb,"A",{href:!0});var o4=r(Wp);v$=n(o4,"TFPreTrainedModel"),o4.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(uo),Vl=a(uo,"P",{});var Rb=r(Vl);$$=n(Rb,"This model is also a "),Sl=a(Rb,"A",{href:!0,rel:!0});var n4=r(Sl);F$=n(n4,"tf.keras.Model"),n4.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(uo),v(la.$$.fragment,uo),x$=h(uo),Ct=a(uo,"DIV",{class:!0});var Ko=r(Ct);v(Pl.$$.fragment,Ko),j$=h(Ko),Un=a(Ko,"P",{});var hh=r(Un);J$=n(hh,"The "),Zp=a(hh,"A",{href:!0});var s4=r(Zp);z$=n(s4,"TFRobertaForTokenClassification"),s4.forEach(t),C$=n(hh," forward method, overrides the "),su=a(hh,"CODE",{});var a4=r(su);I$=n(a4,"__call__"),a4.forEach(t),U$=n(hh," special method."),hh.forEach(t),q$=h(Ko),v(da.$$.fragment,Ko),N$=h(Ko),v(ca.$$.fragment,Ko),W$=h(Ko),v(pa.$$.fragment,Ko),Ko.forEach(t),uo.forEach(t),d_=h(i),qn=a(i,"H2",{class:!0});var Eb=r(qn);ha=a(Eb,"A",{id:!0,class:!0,href:!0});var r4=r(ha);au=a(r4,"SPAN",{});var i4=r(au);v(Xl.$$.fragment,i4),i4.forEach(t),r4.forEach(t),Z$=h(Eb),ru=a(Eb,"SPAN",{});var l4=r(ru);A$=n(l4,"TFRobertaForQuestionAnswering"),l4.forEach(t),Eb.forEach(t),c_=h(i),_t=a(i,"DIV",{class:!0});var fo=r(_t);v(Ll.$$.fragment,fo),B$=h(fo),Nn=a(fo,"P",{});var mh=r(Nn);G$=n(mh,`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 `),iu=a(mh,"CODE",{});var d4=r(iu);V$=n(d4,"span start logits"),d4.forEach(t),S$=n(mh," and "),lu=a(mh,"CODE",{});var c4=r(lu);P$=n(c4,"span end logits"),c4.forEach(t),X$=n(mh,")."),mh.forEach(t),L$=h(fo),Ql=a(fo,"P",{});var xb=r(Ql);Q$=n(xb,"This model inherits from "),Ap=a(xb,"A",{href:!0});var p4=r(Ap);O$=n(p4,"TFPreTrainedModel"),p4.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),Ol=a(fo,"P",{});var jb=r(Ol);H$=n(jb,"This model is also a "),Dl=a(jb,"A",{href:!0,rel:!0});var h4=r(Dl);K$=n(h4,"tf.keras.Model"),h4.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),v(ma.$$.fragment,fo),oF=h(fo),It=a(fo,"DIV",{class:!0});var en=r(It);v(Yl.$$.fragment,en),nF=h(en),Wn=a(en,"P",{});var uh=r(Wn);sF=n(uh,"The "),Bp=a(uh,"A",{href:!0});var m4=r(Bp);aF=n(m4,"TFRobertaForQuestionAnswering"),m4.forEach(t),rF=n(uh," forward method, overrides the "),du=a(uh,"CODE",{});var u4=r(du);iF=n(u4,"__call__"),u4.forEach(t),lF=n(uh," special method."),uh.forEach(t),dF=h(en),v(ua.$$.fragment,en),cF=h(en),v(fa.$$.fragment,en),pF=h(en),v(ga.$$.fragment,en),en.forEach(t),fo.forEach(t),p_=h(i),Zn=a(i,"H2",{class:!0});var Jb=r(Zn);_a=a(Jb,"A",{id:!0,class:!0,href:!0});var f4=r(_a);cu=a(f4,"SPAN",{});var g4=r(cu);v(Hl.$$.fragment,g4),g4.forEach(t),f4.forEach(t),hF=h(Jb),pu=a(Jb,"SPAN",{});var _4=r(pu);mF=n(_4,"FlaxRobertaModel"),_4.forEach(t),Jb.forEach(t),h_=h(i),nt=a(i,"DIV",{class:!0});var qt=r(nt);v(Kl.$$.fragment,qt),uF=h(qt),hu=a(qt,"P",{});var b4=r(hu);fF=n(b4,"The bare RoBERTa Model transformer outputting raw hidden-states without any specific head on top."),b4.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 y4=r(Gp);bF=n(y4,"FlaxPreTrainedModel"),y4.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),TF=h(qt),td=a(qt,"P",{});var Cb=r(td);kF=n(Cb,"This model is also a Flax Linen "),od=a(Cb,"A",{href:!0,rel:!0});var T4=r(od);vF=n(T4,"flax.linen.Module"),T4.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),mu=a(qt,"P",{});var k4=r(mu);$F=n(k4,"Finally, this model supports inherent JAX features such as:"),k4.forEach(t),FF=h(qt),bo=a(qt,"UL",{});var Oa=r(bo);uu=a(Oa,"LI",{});var v4=r(uu);nd=a(v4,"A",{href:!0,rel:!0});var w4=r(nd);RF=n(w4,"Just-In-Time (JIT) compilation"),w4.forEach(t),v4.forEach(t),EF=h(Oa),fu=a(Oa,"LI",{});var M4=r(fu);sd=a(M4,"A",{href:!0,rel:!0});var $4=r(sd);xF=n($4,"Automatic Differentiation"),$4.forEach(t),M4.forEach(t),jF=h(Oa),gu=a(Oa,"LI",{});var F4=r(gu);ad=a(F4,"A",{href:!0,rel:!0});var R4=r(ad);JF=n(R4,"Vectorization"),R4.forEach(t),F4.forEach(t),zF=h(Oa),_u=a(Oa,"LI",{});var E4=r(_u);rd=a(E4,"A",{href:!0,rel:!0});var x4=r(rd);CF=n(x4,"Parallelization"),x4.forEach(t),E4.forEach(t),Oa.forEach(t),IF=h(qt),eo=a(qt,"DIV",{class:!0});var Da=r(eo);v(id.$$.fragment,Da),UF=h(Da),An=a(Da,"P",{});var fh=r(An);qF=n(fh,"The "),bu=a(fh,"CODE",{});var j4=r(bu);NF=n(j4,"FlaxRobertaPreTrainedModel"),j4.forEach(t),WF=n(fh," forward method, overrides the "),yu=a(fh,"CODE",{});var J4=r(yu);ZF=n(J4,"__call__"),J4.forEach(t),AF=n(fh," special method."),fh.forEach(t),BF=h(Da),v(ba.$$.fragment,Da),GF=h(Da),v(ya.$$.fragment,Da),Da.forEach(t),qt.forEach(t),m_=h(i),Bn=a(i,"H2",{class:!0});var Ib=r(Bn);Ta=a(Ib,"A",{id:!0,class:!0,href:!0});var z4=r(Ta);Tu=a(z4,"SPAN",{});var C4=r(Tu);v(ld.$$.fragment,C4),C4.forEach(t),z4.forEach(t),VF=h(Ib),ku=a(Ib,"SPAN",{});var I4=r(ku);SF=n(I4,"FlaxRobertaForCausalLM"),I4.forEach(t),Ib.forEach(t),u_=h(i),st=a(i,"DIV",{class:!0});var Nt=r(st);v(dd.$$.fragment,Nt),PF=h(Nt),vu=a(Nt,"P",{});var U4=r(vu);XF=n(U4,`Roberta Model with a language modeling head on top (a linear layer on top of the hidden-states output) e.g for
autoregressive tasks.`),U4.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 q4=r(Vp);OF=n(q4,"FlaxPreTrainedModel"),q4.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 N4=r(hd);KF=n(N4,"flax.linen.Module"),N4.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),wu=a(Nt,"P",{});var W4=r(wu);oR=n(W4,"Finally, this model supports inherent JAX features such as:"),W4.forEach(t),nR=h(Nt),yo=a(Nt,"UL",{});var Ya=r(yo);Mu=a(Ya,"LI",{});var Z4=r(Mu);md=a(Z4,"A",{href:!0,rel:!0});var A4=r(md);sR=n(A4,"Just-In-Time (JIT) compilation"),A4.forEach(t),Z4.forEach(t),aR=h(Ya),$u=a(Ya,"LI",{});var B4=r($u);ud=a(B4,"A",{href:!0,rel:!0});var G4=r(ud);rR=n(G4,"Automatic Differentiation"),G4.forEach(t),B4.forEach(t),iR=h(Ya),Fu=a(Ya,"LI",{});var V4=r(Fu);fd=a(V4,"A",{href:!0,rel:!0});var S4=r(fd);lR=n(S4,"Vectorization"),S4.forEach(t),V4.forEach(t),dR=h(Ya),Ru=a(Ya,"LI",{});var P4=r(Ru);gd=a(P4,"A",{href:!0,rel:!0});var X4=r(gd);cR=n(X4,"Parallelization"),X4.forEach(t),P4.forEach(t),Ya.forEach(t),pR=h(Nt),to=a(Nt,"DIV",{class:!0});var Ha=r(to);v(_d.$$.fragment,Ha),hR=h(Ha),Gn=a(Ha,"P",{});var gh=r(Gn);mR=n(gh,"The "),Eu=a(gh,"CODE",{});var L4=r(Eu);uR=n(L4,"FlaxRobertaPreTrainedModel"),L4.forEach(t),fR=n(gh," forward method, overrides the "),xu=a(gh,"CODE",{});var Q4=r(xu);gR=n(Q4,"__call__"),Q4.forEach(t),_R=n(gh," special method."),gh.forEach(t),bR=h(Ha),v(ka.$$.fragment,Ha),yR=h(Ha),v(va.$$.fragment,Ha),Ha.forEach(t),Nt.forEach(t),f_=h(i),Vn=a(i,"H2",{class:!0});var Nb=r(Vn);wa=a(Nb,"A",{id:!0,class:!0,href:!0});var O4=r(wa);ju=a(O4,"SPAN",{});var D4=r(ju);v(bd.$$.fragment,D4),D4.forEach(t),O4.forEach(t),TR=h(Nb),Ju=a(Nb,"SPAN",{});var Y4=r(Ju);kR=n(Y4,"FlaxRobertaForMaskedLM"),Y4.forEach(t),Nb.forEach(t),g_=h(i),at=a(i,"DIV",{class:!0});var Wt=r(at);v(yd.$$.fragment,Wt),vR=h(Wt),Td=a(Wt,"P",{});var Wb=r(Td);wR=n(Wb,"RoBERTa Model with a "),zu=a(Wb,"CODE",{});var H4=r(zu);MR=n(H4,"language modeling"),H4.forEach(t),$R=n(Wb," head on top."),Wb.forEach(t),FR=h(Wt),kd=a(Wt,"P",{});var Zb=r(kd);RR=n(Zb,"This model inherits from "),Sp=a(Zb,"A",{href:!0});var K4=r(Sp);ER=n(K4,"FlaxPreTrainedModel"),K4.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),vd=a(Wt,"P",{});var Ab=r(vd);JR=n(Ab,"This model is also a Flax Linen "),wd=a(Ab,"A",{href:!0,rel:!0});var eI=r(wd);zR=n(eI,"flax.linen.Module"),eI.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),Cu=a(Wt,"P",{});var tI=r(Cu);UR=n(tI,"Finally, this model supports inherent JAX features such as:"),tI.forEach(t),qR=h(Wt),To=a(Wt,"UL",{});var Ka=r(To);Iu=a(Ka,"LI",{});var oI=r(Iu);Md=a(oI,"A",{href:!0,rel:!0});var nI=r(Md);NR=n(nI,"Just-In-Time (JIT) compilation"),nI.forEach(t),oI.forEach(t),WR=h(Ka),Uu=a(Ka,"LI",{});var sI=r(Uu);$d=a(sI,"A",{href:!0,rel:!0});var aI=r($d);ZR=n(aI,"Automatic Differentiation"),aI.forEach(t),sI.forEach(t),AR=h(Ka),qu=a(Ka,"LI",{});var rI=r(qu);Fd=a(rI,"A",{href:!0,rel:!0});var iI=r(Fd);BR=n(iI,"Vectorization"),iI.forEach(t),rI.forEach(t),GR=h(Ka),Nu=a(Ka,"LI",{});var lI=r(Nu);Rd=a(lI,"A",{href:!0,rel:!0});var dI=r(Rd);VR=n(dI,"Parallelization"),dI.forEach(t),lI.forEach(t),Ka.forEach(t),SR=h(Wt),oo=a(Wt,"DIV",{class:!0});var er=r(oo);v(Ed.$$.fragment,er),PR=h(er),Sn=a(er,"P",{});var _h=r(Sn);XR=n(_h,"The "),Wu=a(_h,"CODE",{});var cI=r(Wu);LR=n(cI,"FlaxRobertaPreTrainedModel"),cI.forEach(t),QR=n(_h," forward method, overrides the "),Zu=a(_h,"CODE",{});var pI=r(Zu);OR=n(pI,"__call__"),pI.forEach(t),DR=n(_h," special method."),_h.forEach(t),YR=h(er),v(Ma.$$.fragment,er),HR=h(er),v($a.$$.fragment,er),er.forEach(t),Wt.forEach(t),__=h(i),Pn=a(i,"H2",{class:!0});var Bb=r(Pn);Fa=a(Bb,"A",{id:!0,class:!0,href:!0});var hI=r(Fa);Au=a(hI,"SPAN",{});var mI=r(Au);v(xd.$$.fragment,mI),mI.forEach(t),hI.forEach(t),KR=h(Bb),Bu=a(Bb,"SPAN",{});var uI=r(Bu);eE=n(uI,"FlaxRobertaForSequenceClassification"),uI.forEach(t),Bb.forEach(t),b_=h(i),rt=a(i,"DIV",{class:!0});var Zt=r(rt);v(jd.$$.fragment,Zt),tE=h(Zt),Gu=a(Zt,"P",{});var fI=r(Gu);oE=n(fI,`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.`),fI.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 gI=r(Pp);aE=n(gI,"FlaxPreTrainedModel"),gI.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),iE=h(Zt),zd=a(Zt,"P",{});var Vb=r(zd);lE=n(Vb,"This model is also a Flax Linen "),Cd=a(Vb,"A",{href:!0,rel:!0});var _I=r(Cd);dE=n(_I,"flax.linen.Module"),_I.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),Vu=a(Zt,"P",{});var bI=r(Vu);hE=n(bI,"Finally, this model supports inherent JAX features such as:"),bI.forEach(t),mE=h(Zt),ko=a(Zt,"UL",{});var tr=r(ko);Su=a(tr,"LI",{});var yI=r(Su);Id=a(yI,"A",{href:!0,rel:!0});var TI=r(Id);uE=n(TI,"Just-In-Time (JIT) compilation"),TI.forEach(t),yI.forEach(t),fE=h(tr),Pu=a(tr,"LI",{});var kI=r(Pu);Ud=a(kI,"A",{href:!0,rel:!0});var vI=r(Ud);gE=n(vI,"Automatic Differentiation"),vI.forEach(t),kI.forEach(t),_E=h(tr),Xu=a(tr,"LI",{});var wI=r(Xu);qd=a(wI,"A",{href:!0,rel:!0});var MI=r(qd);bE=n(MI,"Vectorization"),MI.forEach(t),wI.forEach(t),yE=h(tr),Lu=a(tr,"LI",{});var $I=r(Lu);Nd=a($I,"A",{href:!0,rel:!0});var FI=r(Nd);TE=n(FI,"Parallelization"),FI.forEach(t),$I.forEach(t),tr.forEach(t),kE=h(Zt),no=a(Zt,"DIV",{class:!0});var or=r(no);v(Wd.$$.fragment,or),vE=h(or),Xn=a(or,"P",{});var bh=r(Xn);wE=n(bh,"The "),Qu=a(bh,"CODE",{});var RI=r(Qu);ME=n(RI,"FlaxRobertaPreTrainedModel"),RI.forEach(t),$E=n(bh," forward method, overrides the "),Ou=a(bh,"CODE",{});var EI=r(Ou);FE=n(EI,"__call__"),EI.forEach(t),RE=n(bh," special method."),bh.forEach(t),EE=h(or),v(Ra.$$.fragment,or),xE=h(or),v(Ea.$$.fragment,or),or.forEach(t),Zt.forEach(t),y_=h(i),Ln=a(i,"H2",{class:!0});var Sb=r(Ln);xa=a(Sb,"A",{id:!0,class:!0,href:!0});var xI=r(xa);Du=a(xI,"SPAN",{});var jI=r(Du);v(Zd.$$.fragment,jI),jI.forEach(t),xI.forEach(t),jE=h(Sb),Yu=a(Sb,"SPAN",{});var JI=r(Yu);JE=n(JI,"FlaxRobertaForMultipleChoice"),JI.forEach(t),Sb.forEach(t),T_=h(i),it=a(i,"DIV",{class:!0});var At=r(it);v(Ad.$$.fragment,At),zE=h(At),Hu=a(At,"P",{});var zI=r(Hu);CE=n(zI,`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.`),zI.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 CI=r(Xp);qE=n(CI,"FlaxPreTrainedModel"),CI.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 II=r(Vd);AE=n(II,"flax.linen.Module"),II.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),Ku=a(At,"P",{});var UI=r(Ku);VE=n(UI,"Finally, this model supports inherent JAX features such as:"),UI.forEach(t),SE=h(At),vo=a(At,"UL",{});var nr=r(vo);ef=a(nr,"LI",{});var qI=r(ef);Sd=a(qI,"A",{href:!0,rel:!0});var NI=r(Sd);PE=n(NI,"Just-In-Time (JIT) compilation"),NI.forEach(t),qI.forEach(t),XE=h(nr),tf=a(nr,"LI",{});var WI=r(tf);Pd=a(WI,"A",{href:!0,rel:!0});var ZI=r(Pd);LE=n(ZI,"Automatic Differentiation"),ZI.forEach(t),WI.forEach(t),QE=h(nr),of=a(nr,"LI",{});var AI=r(of);Xd=a(AI,"A",{href:!0,rel:!0});var BI=r(Xd);OE=n(BI,"Vectorization"),BI.forEach(t),AI.forEach(t),DE=h(nr),nf=a(nr,"LI",{});var GI=r(nf);Ld=a(GI,"A",{href:!0,rel:!0});var VI=r(Ld);YE=n(VI,"Parallelization"),VI.forEach(t),GI.forEach(t),nr.forEach(t),HE=h(At),so=a(At,"DIV",{class:!0});var sr=r(so);v(Qd.$$.fragment,sr),KE=h(sr),Qn=a(sr,"P",{});var yh=r(Qn);ex=n(yh,"The "),sf=a(yh,"CODE",{});var SI=r(sf);tx=n(SI,"FlaxRobertaPreTrainedModel"),SI.forEach(t),ox=n(yh," forward method, overrides the "),af=a(yh,"CODE",{});var PI=r(af);nx=n(PI,"__call__"),PI.forEach(t),sx=n(yh," special method."),yh.forEach(t),ax=h(sr),v(ja.$$.fragment,sr),rx=h(sr),v(Ja.$$.fragment,sr),sr.forEach(t),At.forEach(t),k_=h(i),On=a(i,"H2",{class:!0});var Lb=r(On);za=a(Lb,"A",{id:!0,class:!0,href:!0});var XI=r(za);rf=a(XI,"SPAN",{});var LI=r(rf);v(Od.$$.fragment,LI),LI.forEach(t),XI.forEach(t),ix=h(Lb),lf=a(Lb,"SPAN",{});var QI=r(lf);lx=n(QI,"FlaxRobertaForTokenClassification"),QI.forEach(t),Lb.forEach(t),v_=h(i),lt=a(i,"DIV",{class:!0});var Bt=r(lt);v(Dd.$$.fragment,Bt),dx=h(Bt),df=a(Bt,"P",{});var OI=r(df);cx=n(OI,`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.`),OI.forEach(t),px=h(Bt),Yd=a(Bt,"P",{});var Qb=r(Yd);hx=n(Qb,"This model inherits from "),Lp=a(Qb,"A",{href:!0});var DI=r(Lp);mx=n(DI,"FlaxPreTrainedModel"),DI.forEach(t),ux=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),fx=h(Bt),Hd=a(Bt,"P",{});var Ob=r(Hd);gx=n(Ob,"This model is also a Flax Linen "),Kd=a(Ob,"A",{href:!0,rel:!0});var YI=r(Kd);_x=n(YI,"flax.linen.Module"),YI.forEach(t),bx=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),yx=h(Bt),cf=a(Bt,"P",{});var HI=r(cf);Tx=n(HI,"Finally, this model supports inherent JAX features such as:"),HI.forEach(t),kx=h(Bt),wo=a(Bt,"UL",{});var ar=r(wo);pf=a(ar,"LI",{});var KI=r(pf);ec=a(KI,"A",{href:!0,rel:!0});var e3=r(ec);vx=n(e3,"Just-In-Time (JIT) compilation"),e3.forEach(t),KI.forEach(t),wx=h(ar),hf=a(ar,"LI",{});var t3=r(hf);tc=a(t3,"A",{href:!0,rel:!0});var o3=r(tc);Mx=n(o3,"Automatic Differentiation"),o3.forEach(t),t3.forEach(t),$x=h(ar),mf=a(ar,"LI",{});var n3=r(mf);oc=a(n3,"A",{href:!0,rel:!0});var s3=r(oc);Fx=n(s3,"Vectorization"),s3.forEach(t),n3.forEach(t),Rx=h(ar),uf=a(ar,"LI",{});var a3=r(uf);nc=a(a3,"A",{href:!0,rel:!0});var r3=r(nc);Ex=n(r3,"Parallelization"),r3.forEach(t),a3.forEach(t),ar.forEach(t),xx=h(Bt),ao=a(Bt,"DIV",{class:!0});var rr=r(ao);v(sc.$$.fragment,rr),jx=h(rr),Dn=a(rr,"P",{});var Th=r(Dn);Jx=n(Th,"The "),ff=a(Th,"CODE",{});var i3=r(ff);zx=n(i3,"FlaxRobertaPreTrainedModel"),i3.forEach(t),Cx=n(Th," forward method, overrides the "),gf=a(Th,"CODE",{});var l3=r(gf);Ix=n(l3,"__call__"),l3.forEach(t),Ux=n(Th," special method."),Th.forEach(t),qx=h(rr),v(Ca.$$.fragment,rr),Nx=h(rr),v(Ia.$$.fragment,rr),rr.forEach(t),Bt.forEach(t),w_=h(i),Yn=a(i,"H2",{class:!0});var Db=r(Yn);Ua=a(Db,"A",{id:!0,class:!0,href:!0});var d3=r(Ua);_f=a(d3,"SPAN",{});var c3=r(_f);v(ac.$$.fragment,c3),c3.forEach(t),d3.forEach(t),Wx=h(Db),bf=a(Db,"SPAN",{});var p3=r(bf);Zx=n(p3,"FlaxRobertaForQuestionAnswering"),p3.forEach(t),Db.forEach(t),M_=h(i),dt=a(i,"DIV",{class:!0});var Gt=r(dt);v(rc.$$.fragment,Gt),Ax=h(Gt),Hn=a(Gt,"P",{});var kh=r(Hn);Bx=n(kh,`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(kh,"CODE",{});var h3=r(yf);Gx=n(h3,"span start logits"),h3.forEach(t),Vx=n(kh," and "),Tf=a(kh,"CODE",{});var m3=r(Tf);Sx=n(m3,"span end logits"),m3.forEach(t),Px=n(kh,")."),kh.forEach(t),Xx=h(Gt),ic=a(Gt,"P",{});var Yb=r(ic);Lx=n(Yb,"This model inherits from "),Qp=a(Yb,"A",{href:!0});var u3=r(Qp);Qx=n(u3,"FlaxPreTrainedModel"),u3.forEach(t),Ox=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),Dx=h(Gt),lc=a(Gt,"P",{});var Hb=r(lc);Yx=n(Hb,"This model is also a Flax Linen "),dc=a(Hb,"A",{href:!0,rel:!0});var f3=r(dc);Hx=n(f3,"flax.linen.Module"),f3.forEach(t),Kx=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),ej=h(Gt),kf=a(Gt,"P",{});var g3=r(kf);tj=n(g3,"Finally, this model supports inherent JAX features such as:"),g3.forEach(t),oj=h(Gt),Mo=a(Gt,"UL",{});var ir=r(Mo);vf=a(ir,"LI",{});var _3=r(vf);cc=a(_3,"A",{href:!0,rel:!0});var b3=r(cc);nj=n(b3,"Just-In-Time (JIT) compilation"),b3.forEach(t),_3.forEach(t),sj=h(ir),wf=a(ir,"LI",{});var y3=r(wf);pc=a(y3,"A",{href:!0,rel:!0});var T3=r(pc);aj=n(T3,"Automatic Differentiation"),T3.forEach(t),y3.forEach(t),rj=h(ir),Mf=a(ir,"LI",{});var k3=r(Mf);hc=a(k3,"A",{href:!0,rel:!0});var v3=r(hc);ij=n(v3,"Vectorization"),v3.forEach(t),k3.forEach(t),lj=h(ir),$f=a(ir,"LI",{});var w3=r($f);mc=a(w3,"A",{href:!0,rel:!0});var M3=r(mc);dj=n(M3,"Parallelization"),M3.forEach(t),w3.forEach(t),ir.forEach(t),cj=h(Gt),ro=a(Gt,"DIV",{class:!0});var lr=r(ro);v(uc.$$.fragment,lr),pj=h(lr),Kn=a(lr,"P",{});var vh=r(Kn);hj=n(vh,"The "),Ff=a(vh,"CODE",{});var $3=r(Ff);mj=n($3,"FlaxRobertaPreTrainedModel"),$3.forEach(t),uj=n(vh," forward method, overrides the "),Rf=a(vh,"CODE",{});var F3=r(Rf);fj=n(F3,"__call__"),F3.forEach(t),gj=n(vh," special method."),vh.forEach(t),_j=h(lr),v(qa.$$.fragment,lr),bj=h(lr),v(Na.$$.fragment,lr),lr.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(u,"class","relative group"),c(ee,"alt","Models"),Mj(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"),Mj(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(me,"alt","Paper page"),Mj(me.src,H="https://img.shields.io/badge/Paper%20page-1907.11692-green")||c(me,"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(ie,"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/main/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(mr,"href","https://huggingface.co/blog/sentiment-analysis-twitter"),c(mr,"rel","nofollow"),c(ur,"href","https://huggingface.co/inference-api"),c(ur,"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/main/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(Tr,"href","https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/text_classification.ipynb"),c(Tr,"rel","nofollow"),c(Nc,"href","/docs/transformers/main/en/model_doc/roberta#transformers.TFRobertaForSequenceClassification"),c(kr,"href","https://github.com/huggingface/transformers/tree/main/examples/tensorflow/text-classification"),c(kr,"rel","nofollow"),c(vr,"href","https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/text_classification-tf.ipynb"),c(vr,"rel","nofollow"),c(Wc,"href","/docs/transformers/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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(ei,"href","https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/multiple_choice-tf.ipynb"),c(ei,"rel","nofollow"),c(sp,"href","../tasks/multiple_choice"),c(is,"id","transformers.RobertaConfig"),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.RobertaConfig"),c(nn,"class","relative group"),c(ap,"href","/docs/transformers/main/en/model_doc/roberta#transformers.RobertaModel"),c(rp,"href","/docs/transformers/main/en/model_doc/roberta#transformers.TFRobertaModel"),c(ni,"href","https://huggingface.co/roberta-base"),c(ni,"rel","nofollow"),c(ip,"href","/docs/transformers/main/en/main_classes/configuration#transformers.PretrainedConfig"),c(lp,"href","/docs/transformers/main/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/main/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(ms,"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(us,"id","transformers.RobertaTokenizerFast"),c(us,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(us,"href","#transformers.RobertaTokenizerFast"),c(rn,"class","relative group"),c(mp,"href","/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast"),c(up,"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/main/en/main_classes/model#transformers.PreTrainedModel"),c(Mi,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),c(Mi,"rel","nofollow"),c(Fi,"href","https://arxiv.org/abs/1706.03762"),c(Fi,"rel","nofollow"),c(gp,"href","/docs/transformers/main/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(ks,"id","transformers.RobertaForCausalLM"),c(ks,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(ks,"href","#transformers.RobertaForCausalLM"),c(cn,"class","relative group"),c(_p,"href","/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel"),c(Ci,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),c(Ci,"rel","nofollow"),c(bp,"href","/docs/transformers/main/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/main/en/main_classes/model#transformers.PreTrainedModel"),c(Ai,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),c(Ai,"rel","nofollow"),c(Tp,"href","/docs/transformers/main/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(un,"class","relative group"),c(kp,"href","/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel"),c(Xi,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),c(Xi,"rel","nofollow"),c(vp,"href","/docs/transformers/main/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/main/en/main_classes/model#transformers.PreTrainedModel"),c(Hi,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),c(Hi,"rel","nofollow"),c(Mp,"href","/docs/transformers/main/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/main/en/main_classes/model#transformers.PreTrainedModel"),c(sl,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),c(sl,"rel","nofollow"),c(Fp,"href","/docs/transformers/main/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(Tn,"class","relative group"),c(Rp,"href","/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel"),c(cl,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),c(cl,"rel","nofollow"),c(Ep,"href","/docs/transformers/main/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/main/en/main_classes/model#transformers.TFPreTrainedModel"),c(gl,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),c(gl,"rel","nofollow"),c(jp,"href","/docs/transformers/main/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/main/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/main/en/main_classes/model#transformers.TFPreTrainedModel"),c(Fl,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),c(Fl,"rel","nofollow"),c(Cp,"href","/docs/transformers/main/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(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(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/main/en/main_classes/model#transformers.TFPreTrainedModel"),c(zl,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),c(zl,"rel","nofollow"),c(Up,"href","/docs/transformers/main/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(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(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/main/en/main_classes/model#transformers.TFPreTrainedModel"),c(Wl,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),c(Wl,"rel","nofollow"),c(Np,"href","/docs/transformers/main/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(ia,"id","transformers.TFRobertaForTokenClassification"),c(ia,"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(ia,"href","#transformers.TFRobertaForTokenClassification"),c(In,"class","relative group"),c(Wp,"href","/docs/transformers/main/en/main_classes/model#transformers.TFPreTrainedModel"),c(Sl,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),c(Sl,"rel","nofollow"),c(Zp,"href","/docs/transformers/main/en/model_doc/roberta#transformers.TFRobertaForTokenClassification"),c(Ct,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(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/main/en/main_classes/model#transformers.TFPreTrainedModel"),c(Dl,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),c(Dl,"rel","nofollow"),c(Bp,"href","/docs/transformers/main/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/main/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(Ta,"id","transformers.FlaxRobertaForCausalLM"),c(Ta,"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(Ta,"href","#transformers.FlaxRobertaForCausalLM"),c(Bn,"class","relative group"),c(Vp,"href","/docs/transformers/main/en/main_classes/model#transformers.FlaxPreTrainedModel"),c(hd,"href","https://flax.readthedocs.io/en/latest/flax.linen.html#module"),c(hd,"rel","nofollow"),c(md,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),c(md,"rel","nofollow"),c(ud,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),c(ud,"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/main/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/main/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/main/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(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(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/main/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(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(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/main/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(mc,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),c(mc,"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(i,_){e(document.head,d),g(i,y,_),g(i,u,_),e(u,f),e(f,b),w(l,b,null),e(u,m),e(u,E),e(E,ae),g(i,K,_),g(i,N,_),e(N,re),e(re,ee),e(N,xe),e(N,G),e(G,pe),e(N,Q),e(N,he),e(he,me),g(i,Fe,_),g(i,ie,_),e(ie,B),e(B,_e),w(le,_e,null),e(ie,O),e(ie,be),e(be,je),g(i,ne,_),g(i,z,_),e(z,U),e(z,de),e(de,D),e(z,Je),e(z,ce),e(ce,Y),e(z,ze),g(i,Re,_),g(i,I,_),e(I,Ce),g(i,X,_),g(i,ue,_),e(ue,Ie),g(i,L,_),g(i,fe,_),e(fe,ye),e(ye,Z),g(i,Ee,_),g(i,V,_),e(V,Ue),g(i,se,_),g(i,C,_),e(C,Te),e(Te,q),e(q,qe),e(q,ge),e(ge,T),e(q,j),e(C,Xe),e(C,te),e(te,Ge),e(Ge,Le),e(C,J),e(C,Ve),e(Ve,ke),e(ke,Qe),e(ke,Se),e(Se,Oe),e(ke,A),e(ke,S),e(S,De),e(ke,Ye),e(ke,P),e(P,He),e(ke,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,iy),e(C,ly),e(C,Rh),e(Rh,Cc),e(Cc,Ic),e(Ic,dy),e(Cc,cy),g(i,bg,_),g(i,Ro,_),e(Ro,py),e(Ro,dr),e(dr,hy),e(Ro,my),e(Ro,cr),e(cr,uy),e(Ro,fy),g(i,yg,_),g(i,tn,_),e(tn,ss),e(ss,Eh),w(pr,Eh,null),e(tn,gy),e(tn,xh),e(xh,_y),g(i,Tg,_),g(i,Uc,_),e(Uc,by),g(i,kg,_),w(hr,i,_),g(i,vg,_),g(i,ct,_),e(ct,on),e(on,yy),e(on,mr),e(mr,Ty),e(on,ky),e(on,ur),e(ur,vy),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,Tr),e(Tr,Ny),e(Eo,Wy),e(ct,Zy),e(ct,xo),e(xo,Nc),e(Nc,Ay),e(xo,By),e(xo,kr),e(kr,Gy),e(xo,Vy),e(xo,vr),e(vr,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,eT),g(i,wg,_),w($r,i,_),g(i,Mg,_),g(i,xt,_),e(xt,Jo),e(Jo,Ac),e(Ac,tT),e(Jo,oT),e(Jo,Fr),e(Fr,nT),e(Jo,sT),e(Jo,Rr),e(Rr,aT),e(Jo,rT),e(xt,iT),e(xt,zo),e(zo,Bc),e(Bc,lT),e(zo,dT),e(zo,Er),e(Er,cT),e(zo,pT),e(zo,xr),e(xr,hT),e(zo,mT),e(xt,uT),e(xt,as),e(as,Gc),e(Gc,fT),e(as,gT),e(as,jr),e(jr,_T),e(as,bT),e(xt,yT),e(xt,Vc),e(Vc,Jr),e(Jr,TT),e(Vc,kT),e(xt,vT),e(xt,Jh),e(Jh,Sc),e(Sc,wT),g(i,$g,_),w(zr,i,_),g(i,Fg,_),g(i,yt,_),e(yt,Cr),e(Cr,MT),e(Cr,Ir),e(Ir,$T),e(Cr,FT),e(yt,RT),e(yt,Co),e(Co,Pc),e(Pc,ET),e(Co,xT),e(Co,Ur),e(Ur,jT),e(Co,JT),e(Co,qr),e(qr,zT),e(Co,CT),e(yt,IT),e(yt,Io),e(Io,Xc),e(Xc,UT),e(Io,qT),e(Io,Nr),e(Nr,NT),e(Io,WT),e(Io,Wr),e(Wr,ZT),e(Io,AT),e(yt,BT),e(yt,Uo),e(Uo,Lc),e(Lc,GT),e(Uo,VT),e(Uo,Zr),e(Zr,ST),e(Uo,PT),e(Uo,Ar),e(Ar,XT),e(Uo,LT),e(yt,QT),e(yt,Qc),e(Qc,Br),e(Br,OT),e(Qc,DT),e(yt,YT),e(yt,zh),e(zh,Oc),e(Oc,HT),g(i,Rg,_),w(Gr,i,_),g(i,Eg,_),g(i,Tt,_),e(Tt,Vr),e(Vr,KT),e(Vr,Sr),e(Sr,ek),e(Vr,tk),e(Tt,ok),e(Tt,qo),e(qo,Dc),e(Dc,nk),e(qo,sk),e(qo,Pr),e(Pr,ak),e(qo,rk),e(qo,Xr),e(Xr,ik),e(qo,lk),e(Tt,dk),e(Tt,No),e(No,Yc),e(Yc,ck),e(No,pk),e(No,Lr),e(Lr,hk),e(No,mk),e(No,Qr),e(Qr,uk),e(No,fk),e(Tt,gk),e(Tt,rs),e(rs,Hc),e(Hc,_k),e(rs,bk),e(rs,Or),e(Or,yk),e(rs,Tk),e(Tt,kk),e(Tt,Kc),e(Kc,Dr),e(Dr,vk),e(Kc,wk),e(Tt,Mk),e(Tt,Ch),e(Ch,ep),e(ep,$k),g(i,xg,_),g(i,tp,_),e(tp,Ih),e(Ih,Fk),g(i,jg,_),g(i,Wo,_),e(Wo,Zo),e(Zo,op),e(op,Rk),e(Zo,Ek),e(Zo,Yr),e(Yr,xk),e(Zo,jk),e(Zo,Hr),e(Hr,Jk),e(Zo,zk),e(Wo,Ck),e(Wo,Ao),e(Ao,np),e(np,Ik),e(Ao,Uk),e(Ao,Kr),e(Kr,qk),e(Ao,Nk),e(Ao,ei),e(ei,Wk),e(Ao,Zk),e(Wo,Ak),e(Wo,Uh),e(Uh,sp),e(sp,Bk),g(i,Jg,_),g(i,nn,_),e(nn,is),e(is,qh),w(ti,qh,null),e(nn,Gk),e(nn,Nh),e(Nh,Vk),g(i,zg,_),g(i,Vt,_),w(oi,Vt,null),e(Vt,Sk),e(Vt,_o),e(_o,Pk),e(_o,ap),e(ap,Xk),e(_o,Lk),e(_o,rp),e(rp,Qk),e(_o,Ok),e(_o,ni),e(ni,Dk),e(_o,Yk),e(Vt,Hk),e(Vt,sn),e(sn,Kk),e(sn,ip),e(ip,ev),e(sn,tv),e(sn,lp),e(lp,ov),e(sn,nv),e(Vt,sv),w(ls,Vt,null),g(i,Cg,_),g(i,an,_),e(an,ds),e(ds,Wh),w(si,Wh,null),e(an,av),e(an,Zh),e(Zh,rv),g(i,Ig,_),g(i,We,_),w(ai,We,null),e(We,iv),e(We,Ah),e(Ah,lv),e(We,dv),e(We,Bh),e(Bh,cv),e(We,pv),w(cs,We,null),e(We,hv),e(We,ri),e(ri,mv),e(ri,Gh),e(Gh,uv),e(ri,fv),e(We,gv),w(ps,We,null),e(We,_v),e(We,ii),e(ii,bv),e(ii,dp),e(dp,yv),e(ii,Tv),e(We,kv),e(We,Bo),w(li,Bo,null),e(Bo,vv),e(Bo,Vh),e(Vh,wv),e(Bo,Mv),e(Bo,di),e(di,cp),e(cp,$v),e(cp,Sh),e(Sh,Fv),e(di,Rv),e(di,pp),e(pp,Ev),e(pp,Ph),e(Ph,xv),e(We,jv),e(We,hs),w(ci,hs,null),e(hs,Jv),e(hs,pi),e(pi,zv),e(pi,Xh),e(Xh,Cv),e(pi,Iv),e(We,Uv),e(We,ms),w(hi,ms,null),e(ms,qv),e(ms,Lh),e(Lh,Nv),e(We,Wv),e(We,hp),w(mi,hp,null),g(i,Ug,_),g(i,rn,_),e(rn,us),e(us,Qh),w(ui,Qh,null),e(rn,Zv),e(rn,Oh),e(Oh,Av),g(i,qg,_),g(i,tt,_),w(fi,tt,null),e(tt,Bv),e(tt,gi),e(gi,Gv),e(gi,Dh),e(Dh,Vv),e(gi,Sv),e(tt,Pv),e(tt,Yh),e(Yh,Xv),e(tt,Lv),w(fs,tt,null),e(tt,Qv),e(tt,_i),e(_i,Ov),e(_i,Hh),e(Hh,Dv),e(_i,Yv),e(tt,Hv),w(gs,tt,null),e(tt,Kv),e(tt,bi),e(bi,ew),e(bi,mp),e(mp,tw),e(bi,ow),e(tt,nw),e(tt,up),w(yi,up,null),g(i,Ng,_),g(i,ln,_),e(ln,_s),e(_s,Kh),w(Ti,Kh,null),e(ln,sw),e(ln,em),e(em,aw),g(i,Wg,_),g(i,ot,_),w(ki,ot,null),e(ot,rw),e(ot,tm),e(tm,iw),e(ot,lw),e(ot,vi),e(vi,dw),e(vi,fp),e(fp,cw),e(vi,pw),e(ot,hw),e(ot,wi),e(wi,mw),e(wi,Mi),e(Mi,uw),e(wi,fw),e(ot,gw),e(ot,$i),e($i,_w),e($i,om),e(om,bw),e($i,yw),e(ot,Tw),e(ot,pt),e(pt,kw),e(pt,nm),e(nm,vw),e(pt,ww),e(pt,sm),e(sm,Mw),e(pt,$w),e(pt,am),e(am,Fw),e(pt,Rw),e(pt,rm),e(rm,Ew),e(pt,xw),e(pt,im),e(im,jw),e(pt,Jw),e(pt,lm),e(lm,zw),e(pt,Cw),e(ot,Iw),e(ot,bs),e(bs,Uw),e(bs,dm),e(dm,qw),e(bs,Nw),e(bs,Fi),e(Fi,Ww),e(ot,Zw),e(ot,Pt),w(Ri,Pt,null),e(Pt,Aw),e(Pt,dn),e(dn,Bw),e(dn,gp),e(gp,Gw),e(dn,Vw),e(dn,cm),e(cm,Sw),e(dn,Pw),e(Pt,Xw),w(ys,Pt,null),e(Pt,Lw),w(Ts,Pt,null),g(i,Zg,_),g(i,cn,_),e(cn,ks),e(ks,pm),w(Ei,pm,null),e(cn,Qw),e(cn,hm),e(hm,Ow),g(i,Ag,_),g(i,wt,_),w(xi,wt,null),e(wt,Dw),e(wt,ji),e(ji,Yw),e(ji,mm),e(mm,Hw),e(ji,Kw),e(wt,eM),e(wt,Ji),e(Ji,tM),e(Ji,_p),e(_p,oM),e(Ji,nM),e(wt,sM),e(wt,zi),e(zi,aM),e(zi,Ci),e(Ci,rM),e(zi,iM),e(wt,lM),e(wt,Xt),w(Ii,Xt,null),e(Xt,dM),e(Xt,pn),e(pn,cM),e(pn,bp),e(bp,pM),e(pn,hM),e(pn,um),e(um,mM),e(pn,uM),e(Xt,fM),w(vs,Xt,null),e(Xt,gM),w(ws,Xt,null),g(i,Bg,_),g(i,hn,_),e(hn,Ms),e(Ms,fm),w(Ui,fm,null),e(hn,_M),e(hn,gm),e(gm,bM),g(i,Gg,_),g(i,Mt,_),w(qi,Mt,null),e(Mt,yM),e(Mt,Ni),e(Ni,TM),e(Ni,_m),e(_m,kM),e(Ni,vM),e(Mt,wM),e(Mt,Wi),e(Wi,MM),e(Wi,yp),e(yp,$M),e(Wi,FM),e(Mt,RM),e(Mt,Zi),e(Zi,EM),e(Zi,Ai),e(Ai,xM),e(Zi,jM),e(Mt,JM),e(Mt,Lt),w(Bi,Lt,null),e(Lt,zM),e(Lt,mn),e(mn,CM),e(mn,Tp),e(Tp,IM),e(mn,UM),e(mn,bm),e(bm,qM),e(mn,NM),e(Lt,WM),w($s,Lt,null),e(Lt,ZM),w(Fs,Lt,null),g(i,Vg,_),g(i,un,_),e(un,Rs),e(Rs,ym),w(Gi,ym,null),e(un,AM),e(un,Tm),e(Tm,BM),g(i,Sg,_),g(i,$t,_),w(Vi,$t,null),e($t,GM),e($t,km),e(km,VM),e($t,SM),e($t,Si),e(Si,PM),e(Si,kp),e(kp,XM),e(Si,LM),e($t,QM),e($t,Pi),e(Pi,OM),e(Pi,Xi),e(Xi,DM),e(Pi,YM),e($t,HM),e($t,jt),w(Li,jt,null),e(jt,KM),e(jt,fn),e(fn,e1),e(fn,vp),e(vp,t1),e(fn,o1),e(fn,vm),e(vm,n1),e(fn,s1),e(jt,a1),w(Es,jt,null),e(jt,r1),w(xs,jt,null),e(jt,i1),w(js,jt,null),g(i,Pg,_),g(i,gn,_),e(gn,Js),e(Js,wm),w(Qi,wm,null),e(gn,l1),e(gn,Mm),e(Mm,d1),g(i,Xg,_),g(i,Ft,_),w(Oi,Ft,null),e(Ft,c1),e(Ft,$m),e($m,p1),e(Ft,h1),e(Ft,Di),e(Di,m1),e(Di,wp),e(wp,u1),e(Di,f1),e(Ft,g1),e(Ft,Yi),e(Yi,_1),e(Yi,Hi),e(Hi,b1),e(Yi,y1),e(Ft,T1),e(Ft,Qt),w(Ki,Qt,null),e(Qt,k1),e(Qt,_n),e(_n,v1),e(_n,Mp),e(Mp,w1),e(_n,M1),e(_n,Fm),e(Fm,$1),e(_n,F1),e(Qt,R1),w(zs,Qt,null),e(Qt,E1),w(Cs,Qt,null),g(i,Lg,_),g(i,bn,_),e(bn,Is),e(Is,Rm),w(el,Rm,null),e(bn,x1),e(bn,Em),e(Em,j1),g(i,Qg,_),g(i,Rt,_),w(tl,Rt,null),e(Rt,J1),e(Rt,xm),e(xm,z1),e(Rt,C1),e(Rt,ol),e(ol,I1),e(ol,$p),e($p,U1),e(ol,q1),e(Rt,N1),e(Rt,nl),e(nl,W1),e(nl,sl),e(sl,Z1),e(nl,A1),e(Rt,B1),e(Rt,Ot),w(al,Ot,null),e(Ot,G1),e(Ot,yn),e(yn,V1),e(yn,Fp),e(Fp,S1),e(yn,P1),e(yn,jm),e(jm,X1),e(yn,L1),e(Ot,Q1),w(Us,Ot,null),e(Ot,O1),w(qs,Ot,null),g(i,Og,_),g(i,Tn,_),e(Tn,Ns),e(Ns,Jm),w(rl,Jm,null),e(Tn,D1),e(Tn,zm),e(zm,Y1),g(i,Dg,_),g(i,Et,_),w(il,Et,null),e(Et,H1),e(Et,kn),e(kn,K1),e(kn,Cm),e(Cm,e2),e(kn,t2),e(kn,Im),e(Im,o2),e(kn,n2),e(Et,s2),e(Et,ll),e(ll,a2),e(ll,Rp),e(Rp,r2),e(ll,i2),e(Et,l2),e(Et,dl),e(dl,d2),e(dl,cl),e(cl,c2),e(dl,p2),e(Et,h2),e(Et,Dt),w(pl,Dt,null),e(Dt,m2),e(Dt,vn),e(vn,u2),e(vn,Ep),e(Ep,f2),e(vn,g2),e(vn,Um),e(Um,_2),e(vn,b2),e(Dt,y2),w(Ws,Dt,null),e(Dt,T2),w(Zs,Dt,null),g(i,Yg,_),g(i,wn,_),e(wn,As),e(As,qm),w(hl,qm,null),e(wn,k2),e(wn,Nm),e(Nm,v2),g(i,Hg,_),g(i,ht,_),w(ml,ht,null),e(ht,w2),e(ht,Wm),e(Wm,M2),e(ht,$2),e(ht,ul),e(ul,F2),e(ul,xp),e(xp,R2),e(ul,E2),e(ht,x2),e(ht,fl),e(fl,j2),e(fl,gl),e(gl,J2),e(fl,z2),e(ht,C2),w(Bs,ht,null),e(ht,I2),e(ht,Yt),w(_l,Yt,null),e(Yt,U2),e(Yt,Mn),e(Mn,q2),e(Mn,jp),e(jp,N2),e(Mn,W2),e(Mn,Zm),e(Zm,Z2),e(Mn,A2),e(Yt,B2),w(Gs,Yt,null),e(Yt,G2),w(Vs,Yt,null),g(i,Kg,_),g(i,$n,_),e($n,Ss),e(Ss,Am),w(bl,Am,null),e($n,V2),e($n,Bm),e(Bm,S2),g(i,e_,_),g(i,Fn,_),w(yl,Fn,null),e(Fn,P2),e(Fn,Ht),w(Tl,Ht,null),e(Ht,X2),e(Ht,Rn),e(Rn,L2),e(Rn,Jp),e(Jp,Q2),e(Rn,O2),e(Rn,Gm),e(Gm,D2),e(Rn,Y2),e(Ht,H2),w(Ps,Ht,null),e(Ht,K2),w(Xs,Ht,null),g(i,t_,_),g(i,En,_),e(En,Ls),e(Ls,Vm),w(kl,Vm,null),e(En,e0),e(En,Sm),e(Sm,t0),g(i,o_,_),g(i,mt,_),w(vl,mt,null),e(mt,o0),e(mt,wl),e(wl,n0),e(wl,Pm),e(Pm,s0),e(wl,a0),e(mt,r0),e(mt,Ml),e(Ml,i0),e(Ml,zp),e(zp,l0),e(Ml,d0),e(mt,c0),e(mt,$l),e($l,p0),e($l,Fl),e(Fl,h0),e($l,m0),e(mt,u0),w(Qs,mt,null),e(mt,f0),e(mt,Jt),w(Rl,Jt,null),e(Jt,g0),e(Jt,xn),e(xn,_0),e(xn,Cp),e(Cp,b0),e(xn,y0),e(xn,Xm),e(Xm,T0),e(xn,k0),e(Jt,v0),w(Os,Jt,null),e(Jt,w0),w(Ds,Jt,null),e(Jt,M0),w(Ys,Jt,null),g(i,n_,_),g(i,jn,_),e(jn,Hs),e(Hs,Lm),w(El,Lm,null),e(jn,$0),e(jn,Qm),e(Qm,F0),g(i,s_,_),g(i,ut,_),w(xl,ut,null),e(ut,R0),e(ut,Om),e(Om,E0),e(ut,x0),e(ut,jl),e(jl,j0),e(jl,Ip),e(Ip,J0),e(jl,z0),e(ut,C0),e(ut,Jl),e(Jl,I0),e(Jl,zl),e(zl,U0),e(Jl,q0),e(ut,N0),w(Ks,ut,null),e(ut,W0),e(ut,zt),w(Cl,zt,null),e(zt,Z0),e(zt,Jn),e(Jn,A0),e(Jn,Up),e(Up,B0),e(Jn,G0),e(Jn,Dm),e(Dm,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(i,a_,_),g(i,zn,_),e(zn,na),e(na,Ym),w(Il,Ym,null),e(zn,Q0),e(zn,Hm),e(Hm,O0),g(i,r_,_),g(i,ft,_),w(Ul,ft,null),e(ft,D0),e(ft,Km),e(Km,Y0),e(ft,H0),e(ft,ql),e(ql,K0),e(ql,qp),e(qp,e$),e(ql,t$),e(ft,o$),e(ft,Nl),e(Nl,n$),e(Nl,Wl),e(Wl,s$),e(Nl,a$),e(ft,r$),w(sa,ft,null),e(ft,i$),e(ft,Kt),w(Zl,Kt,null),e(Kt,l$),e(Kt,Cn),e(Cn,d$),e(Cn,Np),e(Np,c$),e(Cn,p$),e(Cn,eu),e(eu,h$),e(Cn,m$),e(Kt,u$),w(aa,Kt,null),e(Kt,f$),w(ra,Kt,null),g(i,i_,_),g(i,In,_),e(In,ia),e(ia,tu),w(Al,tu,null),e(In,g$),e(In,ou),e(ou,_$),g(i,l_,_),g(i,gt,_),w(Bl,gt,null),e(gt,b$),e(gt,nu),e(nu,y$),e(gt,T$),e(gt,Gl),e(Gl,k$),e(Gl,Wp),e(Wp,v$),e(Gl,w$),e(gt,M$),e(gt,Vl),e(Vl,$$),e(Vl,Sl),e(Sl,F$),e(Vl,R$),e(gt,E$),w(la,gt,null),e(gt,x$),e(gt,Ct),w(Pl,Ct,null),e(Ct,j$),e(Ct,Un),e(Un,J$),e(Un,Zp),e(Zp,z$),e(Un,C$),e(Un,su),e(su,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(i,d_,_),g(i,qn,_),e(qn,ha),e(ha,au),w(Xl,au,null),e(qn,Z$),e(qn,ru),e(ru,A$),g(i,c_,_),g(i,_t,_),w(Ll,_t,null),e(_t,B$),e(_t,Nn),e(Nn,G$),e(Nn,iu),e(iu,V$),e(Nn,S$),e(Nn,lu),e(lu,P$),e(Nn,X$),e(_t,L$),e(_t,Ql),e(Ql,Q$),e(Ql,Ap),e(Ap,O$),e(Ql,D$),e(_t,Y$),e(_t,Ol),e(Ol,H$),e(Ol,Dl),e(Dl,K$),e(Ol,eF),e(_t,tF),w(ma,_t,null),e(_t,oF),e(_t,It),w(Yl,It,null),e(It,nF),e(It,Wn),e(Wn,sF),e(Wn,Bp),e(Bp,aF),e(Wn,rF),e(Wn,du),e(du,iF),e(Wn,lF),e(It,dF),w(ua,It,null),e(It,cF),w(fa,It,null),e(It,pF),w(ga,It,null),g(i,p_,_),g(i,Zn,_),e(Zn,_a),e(_a,cu),w(Hl,cu,null),e(Zn,hF),e(Zn,pu),e(pu,mF),g(i,h_,_),g(i,nt,_),w(Kl,nt,null),e(nt,uF),e(nt,hu),e(hu,fF),e(nt,gF),e(nt,ed),e(ed,_F),e(ed,Gp),e(Gp,bF),e(ed,yF),e(nt,TF),e(nt,td),e(td,kF),e(td,od),e(od,vF),e(td,wF),e(nt,MF),e(nt,mu),e(mu,$F),e(nt,FF),e(nt,bo),e(bo,uu),e(uu,nd),e(nd,RF),e(bo,EF),e(bo,fu),e(fu,sd),e(sd,xF),e(bo,jF),e(bo,gu),e(gu,ad),e(ad,JF),e(bo,zF),e(bo,_u),e(_u,rd),e(rd,CF),e(nt,IF),e(nt,eo),w(id,eo,null),e(eo,UF),e(eo,An),e(An,qF),e(An,bu),e(bu,NF),e(An,WF),e(An,yu),e(yu,ZF),e(An,AF),e(eo,BF),w(ba,eo,null),e(eo,GF),w(ya,eo,null),g(i,m_,_),g(i,Bn,_),e(Bn,Ta),e(Ta,Tu),w(ld,Tu,null),e(Bn,VF),e(Bn,ku),e(ku,SF),g(i,u_,_),g(i,st,_),w(dd,st,null),e(st,PF),e(st,vu),e(vu,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,wu),e(wu,oR),e(st,nR),e(st,yo),e(yo,Mu),e(Mu,md),e(md,sR),e(yo,aR),e(yo,$u),e($u,ud),e(ud,rR),e(yo,iR),e(yo,Fu),e(Fu,fd),e(fd,lR),e(yo,dR),e(yo,Ru),e(Ru,gd),e(gd,cR),e(st,pR),e(st,to),w(_d,to,null),e(to,hR),e(to,Gn),e(Gn,mR),e(Gn,Eu),e(Eu,uR),e(Gn,fR),e(Gn,xu),e(xu,gR),e(Gn,_R),e(to,bR),w(ka,to,null),e(to,yR),w(va,to,null),g(i,f_,_),g(i,Vn,_),e(Vn,wa),e(wa,ju),w(bd,ju,null),e(Vn,TR),e(Vn,Ju),e(Ju,kR),g(i,g_,_),g(i,at,_),w(yd,at,null),e(at,vR),e(at,Td),e(Td,wR),e(Td,zu),e(zu,MR),e(Td,$R),e(at,FR),e(at,kd),e(kd,RR),e(kd,Sp),e(Sp,ER),e(kd,xR),e(at,jR),e(at,vd),e(vd,JR),e(vd,wd),e(wd,zR),e(vd,CR),e(at,IR),e(at,Cu),e(Cu,UR),e(at,qR),e(at,To),e(To,Iu),e(Iu,Md),e(Md,NR),e(To,WR),e(To,Uu),e(Uu,$d),e($d,ZR),e(To,AR),e(To,qu),e(qu,Fd),e(Fd,BR),e(To,GR),e(To,Nu),e(Nu,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,Wu),e(Wu,LR),e(Sn,QR),e(Sn,Zu),e(Zu,OR),e(Sn,DR),e(oo,YR),w(Ma,oo,null),e(oo,HR),w($a,oo,null),g(i,__,_),g(i,Pn,_),e(Pn,Fa),e(Fa,Au),w(xd,Au,null),e(Pn,KR),e(Pn,Bu),e(Bu,eE),g(i,b_,_),g(i,rt,_),w(jd,rt,null),e(rt,tE),e(rt,Gu),e(Gu,oE),e(rt,nE),e(rt,Jd),e(Jd,sE),e(Jd,Pp),e(Pp,aE),e(Jd,rE),e(rt,iE),e(rt,zd),e(zd,lE),e(zd,Cd),e(Cd,dE),e(zd,cE),e(rt,pE),e(rt,Vu),e(Vu,hE),e(rt,mE),e(rt,ko),e(ko,Su),e(Su,Id),e(Id,uE),e(ko,fE),e(ko,Pu),e(Pu,Ud),e(Ud,gE),e(ko,_E),e(ko,Xu),e(Xu,qd),e(qd,bE),e(ko,yE),e(ko,Lu),e(Lu,Nd),e(Nd,TE),e(rt,kE),e(rt,no),w(Wd,no,null),e(no,vE),e(no,Xn),e(Xn,wE),e(Xn,Qu),e(Qu,ME),e(Xn,$E),e(Xn,Ou),e(Ou,FE),e(Xn,RE),e(no,EE),w(Ra,no,null),e(no,xE),w(Ea,no,null),g(i,y_,_),g(i,Ln,_),e(Ln,xa),e(xa,Du),w(Zd,Du,null),e(Ln,jE),e(Ln,Yu),e(Yu,JE),g(i,T_,_),g(i,it,_),w(Ad,it,null),e(it,zE),e(it,Hu),e(Hu,CE),e(it,IE),e(it,Bd),e(Bd,UE),e(Bd,Xp),e(Xp,qE),e(Bd,NE),e(it,WE),e(it,Gd),e(Gd,ZE),e(Gd,Vd),e(Vd,AE),e(Gd,BE),e(it,GE),e(it,Ku),e(Ku,VE),e(it,SE),e(it,vo),e(vo,ef),e(ef,Sd),e(Sd,PE),e(vo,XE),e(vo,tf),e(tf,Pd),e(Pd,LE),e(vo,QE),e(vo,of),e(of,Xd),e(Xd,OE),e(vo,DE),e(vo,nf),e(nf,Ld),e(Ld,YE),e(it,HE),e(it,so),w(Qd,so,null),e(so,KE),e(so,Qn),e(Qn,ex),e(Qn,sf),e(sf,tx),e(Qn,ox),e(Qn,af),e(af,nx),e(Qn,sx),e(so,ax),w(ja,so,null),e(so,rx),w(Ja,so,null),g(i,k_,_),g(i,On,_),e(On,za),e(za,rf),w(Od,rf,null),e(On,ix),e(On,lf),e(lf,lx),g(i,v_,_),g(i,lt,_),w(Dd,lt,null),e(lt,dx),e(lt,df),e(df,cx),e(lt,px),e(lt,Yd),e(Yd,hx),e(Yd,Lp),e(Lp,mx),e(Yd,ux),e(lt,fx),e(lt,Hd),e(Hd,gx),e(Hd,Kd),e(Kd,_x),e(Hd,bx),e(lt,yx),e(lt,cf),e(cf,Tx),e(lt,kx),e(lt,wo),e(wo,pf),e(pf,ec),e(ec,vx),e(wo,wx),e(wo,hf),e(hf,tc),e(tc,Mx),e(wo,$x),e(wo,mf),e(mf,oc),e(oc,Fx),e(wo,Rx),e(wo,uf),e(uf,nc),e(nc,Ex),e(lt,xx),e(lt,ao),w(sc,ao,null),e(ao,jx),e(ao,Dn),e(Dn,Jx),e(Dn,ff),e(ff,zx),e(Dn,Cx),e(Dn,gf),e(gf,Ix),e(Dn,Ux),e(ao,qx),w(Ca,ao,null),e(ao,Nx),w(Ia,ao,null),g(i,w_,_),g(i,Yn,_),e(Yn,Ua),e(Ua,_f),w(ac,_f,null),e(Yn,Wx),e(Yn,bf),e(bf,Zx),g(i,M_,_),g(i,dt,_),w(rc,dt,null),e(dt,Ax),e(dt,Hn),e(Hn,Bx),e(Hn,yf),e(yf,Gx),e(Hn,Vx),e(Hn,Tf),e(Tf,Sx),e(Hn,Px),e(dt,Xx),e(dt,ic),e(ic,Lx),e(ic,Qp),e(Qp,Qx),e(ic,Ox),e(dt,Dx),e(dt,lc),e(lc,Yx),e(lc,dc),e(dc,Hx),e(lc,Kx),e(dt,ej),e(dt,kf),e(kf,tj),e(dt,oj),e(dt,Mo),e(Mo,vf),e(vf,cc),e(cc,nj),e(Mo,sj),e(Mo,wf),e(wf,pc),e(pc,aj),e(Mo,rj),e(Mo,Mf),e(Mf,hc),e(hc,ij),e(Mo,lj),e(Mo,$f),e($f,mc),e(mc,dj),e(dt,cj),e(dt,ro),w(uc,ro,null),e(ro,pj),e(ro,Kn),e(Kn,hj),e(Kn,Ff),e(Ff,mj),e(Kn,uj),e(Kn,Rf),e(Rf,fj),e(Kn,gj),e(ro,_j),w(qa,ro,null),e(ro,bj),w(Na,ro,null),$_=!0},p(i,[_]){const fc={};_&2&&(fc.$$scope={dirty:_,ctx:i}),ls.$set(fc);const Ef={};_&2&&(Ef.$$scope={dirty:_,ctx:i}),cs.$set(Ef);const xf={};_&2&&(xf.$$scope={dirty:_,ctx:i}),ps.$set(xf);const jf={};_&2&&(jf.$$scope={dirty:_,ctx:i}),fs.$set(jf);const es={};_&2&&(es.$$scope={dirty:_,ctx:i}),gs.$set(es);const Jf={};_&2&&(Jf.$$scope={dirty:_,ctx:i}),ys.$set(Jf);const zf={};_&2&&(zf.$$scope={dirty:_,ctx:i}),Ts.$set(zf);const Cf={};_&2&&(Cf.$$scope={dirty:_,ctx:i}),vs.$set(Cf);const gc={};_&2&&(gc.$$scope={dirty:_,ctx:i}),ws.$set(gc);const If={};_&2&&(If.$$scope={dirty:_,ctx:i}),$s.$set(If);const Uf={};_&2&&(Uf.$$scope={dirty:_,ctx:i}),Fs.$set(Uf);const qf={};_&2&&(qf.$$scope={dirty:_,ctx:i}),Es.$set(qf);const ts={};_&2&&(ts.$$scope={dirty:_,ctx:i}),xs.$set(ts);const Nf={};_&2&&(Nf.$$scope={dirty:_,ctx:i}),js.$set(Nf);const Wf={};_&2&&(Wf.$$scope={dirty:_,ctx:i}),zs.$set(Wf);const Zf={};_&2&&(Zf.$$scope={dirty:_,ctx:i}),Cs.$set(Zf);const Af={};_&2&&(Af.$$scope={dirty:_,ctx:i}),Us.$set(Af);const Bf={};_&2&&(Bf.$$scope={dirty:_,ctx:i}),qs.$set(Bf);const Gf={};_&2&&(Gf.$$scope={dirty:_,ctx:i}),Ws.$set(Gf);const Vf={};_&2&&(Vf.$$scope={dirty:_,ctx:i}),Zs.$set(Vf);const St={};_&2&&(St.$$scope={dirty:_,ctx:i}),Bs.$set(St);const Sf={};_&2&&(Sf.$$scope={dirty:_,ctx:i}),Gs.$set(Sf);const _c={};_&2&&(_c.$$scope={dirty:_,ctx:i}),Vs.$set(_c);const Pf={};_&2&&(Pf.$$scope={dirty:_,ctx:i}),Ps.$set(Pf);const Xf={};_&2&&(Xf.$$scope={dirty:_,ctx:i}),Xs.$set(Xf);const Lf={};_&2&&(Lf.$$scope={dirty:_,ctx:i}),Qs.$set(Lf);const Qf={};_&2&&(Qf.$$scope={dirty:_,ctx:i}),Os.$set(Qf);const $o={};_&2&&($o.$$scope={dirty:_,ctx:i}),Ds.$set($o);const Of={};_&2&&(Of.$$scope={dirty:_,ctx:i}),Ys.$set(Of);const Df={};_&2&&(Df.$$scope={dirty:_,ctx:i}),Ks.$set(Df);const Yf={};_&2&&(Yf.$$scope={dirty:_,ctx:i}),ea.$set(Yf);const bc={};_&2&&(bc.$$scope={dirty:_,ctx:i}),ta.$set(bc);const Hf={};_&2&&(Hf.$$scope={dirty:_,ctx:i}),oa.$set(Hf);const Fo={};_&2&&(Fo.$$scope={dirty:_,ctx:i}),sa.$set(Fo);const Kf={};_&2&&(Kf.$$scope={dirty:_,ctx:i}),aa.$set(Kf);const eg={};_&2&&(eg.$$scope={dirty:_,ctx:i}),ra.$set(eg);const tg={};_&2&&(tg.$$scope={dirty:_,ctx:i}),la.$set(tg);const og={};_&2&&(og.$$scope={dirty:_,ctx:i}),da.$set(og);const ng={};_&2&&(ng.$$scope={dirty:_,ctx:i}),ca.$set(ng);const Op={};_&2&&(Op.$$scope={dirty:_,ctx:i}),pa.$set(Op);const sg={};_&2&&(sg.$$scope={dirty:_,ctx:i}),ma.$set(sg);const os={};_&2&&(os.$$scope={dirty:_,ctx:i}),ua.$set(os);const ag={};_&2&&(ag.$$scope={dirty:_,ctx:i}),fa.$set(ag);const rg={};_&2&&(rg.$$scope={dirty:_,ctx:i}),ga.$set(rg);const yc={};_&2&&(yc.$$scope={dirty:_,ctx:i}),ba.$set(yc);const ig={};_&2&&(ig.$$scope={dirty:_,ctx:i}),ya.$set(ig);const lg={};_&2&&(lg.$$scope={dirty:_,ctx:i}),ka.$set(lg);const dg={};_&2&&(dg.$$scope={dirty:_,ctx:i}),va.$set(dg);const cg={};_&2&&(cg.$$scope={dirty:_,ctx:i}),Ma.$set(cg);const bt={};_&2&&(bt.$$scope={dirty:_,ctx:i}),$a.$set(bt);const ns={};_&2&&(ns.$$scope={dirty:_,ctx:i}),Ra.$set(ns);const pg={};_&2&&(pg.$$scope={dirty:_,ctx:i}),Ea.$set(pg);const hg={};_&2&&(hg.$$scope={dirty:_,ctx:i}),ja.$set(hg);const Tc={};_&2&&(Tc.$$scope={dirty:_,ctx:i}),Ja.$set(Tc);const mg={};_&2&&(mg.$$scope={dirty:_,ctx:i}),Ca.$set(mg);const kc={};_&2&&(kc.$$scope={dirty:_,ctx:i}),Ia.$set(kc);const ug={};_&2&&(ug.$$scope={dirty:_,ctx:i}),qa.$set(ug);const Go={};_&2&&(Go.$$scope={dirty:_,ctx:i}),Na.$set(Go)},i(i){$_||(M(l.$$.fragment,i),M(le.$$.fragment,i),M(pr.$$.fragment,i),M(hr.$$.fragment,i),M($r.$$.fragment,i),M(zr.$$.fragment,i),M(Gr.$$.fragment,i),M(ti.$$.fragment,i),M(oi.$$.fragment,i),M(ls.$$.fragment,i),M(si.$$.fragment,i),M(ai.$$.fragment,i),M(cs.$$.fragment,i),M(ps.$$.fragment,i),M(li.$$.fragment,i),M(ci.$$.fragment,i),M(hi.$$.fragment,i),M(mi.$$.fragment,i),M(ui.$$.fragment,i),M(fi.$$.fragment,i),M(fs.$$.fragment,i),M(gs.$$.fragment,i),M(yi.$$.fragment,i),M(Ti.$$.fragment,i),M(ki.$$.fragment,i),M(Ri.$$.fragment,i),M(ys.$$.fragment,i),M(Ts.$$.fragment,i),M(Ei.$$.fragment,i),M(xi.$$.fragment,i),M(Ii.$$.fragment,i),M(vs.$$.fragment,i),M(ws.$$.fragment,i),M(Ui.$$.fragment,i),M(qi.$$.fragment,i),M(Bi.$$.fragment,i),M($s.$$.fragment,i),M(Fs.$$.fragment,i),M(Gi.$$.fragment,i),M(Vi.$$.fragment,i),M(Li.$$.fragment,i),M(Es.$$.fragment,i),M(xs.$$.fragment,i),M(js.$$.fragment,i),M(Qi.$$.fragment,i),M(Oi.$$.fragment,i),M(Ki.$$.fragment,i),M(zs.$$.fragment,i),M(Cs.$$.fragment,i),M(el.$$.fragment,i),M(tl.$$.fragment,i),M(al.$$.fragment,i),M(Us.$$.fragment,i),M(qs.$$.fragment,i),M(rl.$$.fragment,i),M(il.$$.fragment,i),M(pl.$$.fragment,i),M(Ws.$$.fragment,i),M(Zs.$$.fragment,i),M(hl.$$.fragment,i),M(ml.$$.fragment,i),M(Bs.$$.fragment,i),M(_l.$$.fragment,i),M(Gs.$$.fragment,i),M(Vs.$$.fragment,i),M(bl.$$.fragment,i),M(yl.$$.fragment,i),M(Tl.$$.fragment,i),M(Ps.$$.fragment,i),M(Xs.$$.fragment,i),M(kl.$$.fragment,i),M(vl.$$.fragment,i),M(Qs.$$.fragment,i),M(Rl.$$.fragment,i),M(Os.$$.fragment,i),M(Ds.$$.fragment,i),M(Ys.$$.fragment,i),M(El.$$.fragment,i),M(xl.$$.fragment,i),M(Ks.$$.fragment,i),M(Cl.$$.fragment,i),M(ea.$$.fragment,i),M(ta.$$.fragment,i),M(oa.$$.fragment,i),M(Il.$$.fragment,i),M(Ul.$$.fragment,i),M(sa.$$.fragment,i),M(Zl.$$.fragment,i),M(aa.$$.fragment,i),M(ra.$$.fragment,i),M(Al.$$.fragment,i),M(Bl.$$.fragment,i),M(la.$$.fragment,i),M(Pl.$$.fragment,i),M(da.$$.fragment,i),M(ca.$$.fragment,i),M(pa.$$.fragment,i),M(Xl.$$.fragment,i),M(Ll.$$.fragment,i),M(ma.$$.fragment,i),M(Yl.$$.fragment,i),M(ua.$$.fragment,i),M(fa.$$.fragment,i),M(ga.$$.fragment,i),M(Hl.$$.fragment,i),M(Kl.$$.fragment,i),M(id.$$.fragment,i),M(ba.$$.fragment,i),M(ya.$$.fragment,i),M(ld.$$.fragment,i),M(dd.$$.fragment,i),M(_d.$$.fragment,i),M(ka.$$.fragment,i),M(va.$$.fragment,i),M(bd.$$.fragment,i),M(yd.$$.fragment,i),M(Ed.$$.fragment,i),M(Ma.$$.fragment,i),M($a.$$.fragment,i),M(xd.$$.fragment,i),M(jd.$$.fragment,i),M(Wd.$$.fragment,i),M(Ra.$$.fragment,i),M(Ea.$$.fragment,i),M(Zd.$$.fragment,i),M(Ad.$$.fragment,i),M(Qd.$$.fragment,i),M(ja.$$.fragment,i),M(Ja.$$.fragment,i),M(Od.$$.fragment,i),M(Dd.$$.fragment,i),M(sc.$$.fragment,i),M(Ca.$$.fragment,i),M(Ia.$$.fragment,i),M(ac.$$.fragment,i),M(rc.$$.fragment,i),M(uc.$$.fragment,i),M(qa.$$.fragment,i),M(Na.$$.fragment,i),$_=!0)},o(i){$(l.$$.fragment,i),$(le.$$.fragment,i),$(pr.$$.fragment,i),$(hr.$$.fragment,i),$($r.$$.fragment,i),$(zr.$$.fragment,i),$(Gr.$$.fragment,i),$(ti.$$.fragment,i),$(oi.$$.fragment,i),$(ls.$$.fragment,i),$(si.$$.fragment,i),$(ai.$$.fragment,i),$(cs.$$.fragment,i),$(ps.$$.fragment,i),$(li.$$.fragment,i),$(ci.$$.fragment,i),$(hi.$$.fragment,i),$(mi.$$.fragment,i),$(ui.$$.fragment,i),$(fi.$$.fragment,i),$(fs.$$.fragment,i),$(gs.$$.fragment,i),$(yi.$$.fragment,i),$(Ti.$$.fragment,i),$(ki.$$.fragment,i),$(Ri.$$.fragment,i),$(ys.$$.fragment,i),$(Ts.$$.fragment,i),$(Ei.$$.fragment,i),$(xi.$$.fragment,i),$(Ii.$$.fragment,i),$(vs.$$.fragment,i),$(ws.$$.fragment,i),$(Ui.$$.fragment,i),$(qi.$$.fragment,i),$(Bi.$$.fragment,i),$($s.$$.fragment,i),$(Fs.$$.fragment,i),$(Gi.$$.fragment,i),$(Vi.$$.fragment,i),$(Li.$$.fragment,i),$(Es.$$.fragment,i),$(xs.$$.fragment,i),$(js.$$.fragment,i),$(Qi.$$.fragment,i),$(Oi.$$.fragment,i),$(Ki.$$.fragment,i),$(zs.$$.fragment,i),$(Cs.$$.fragment,i),$(el.$$.fragment,i),$(tl.$$.fragment,i),$(al.$$.fragment,i),$(Us.$$.fragment,i),$(qs.$$.fragment,i),$(rl.$$.fragment,i),$(il.$$.fragment,i),$(pl.$$.fragment,i),$(Ws.$$.fragment,i),$(Zs.$$.fragment,i),$(hl.$$.fragment,i),$(ml.$$.fragment,i),$(Bs.$$.fragment,i),$(_l.$$.fragment,i),$(Gs.$$.fragment,i),$(Vs.$$.fragment,i),$(bl.$$.fragment,i),$(yl.$$.fragment,i),$(Tl.$$.fragment,i),$(Ps.$$.fragment,i),$(Xs.$$.fragment,i),$(kl.$$.fragment,i),$(vl.$$.fragment,i),$(Qs.$$.fragment,i),$(Rl.$$.fragment,i),$(Os.$$.fragment,i),$(Ds.$$.fragment,i),$(Ys.$$.fragment,i),$(El.$$.fragment,i),$(xl.$$.fragment,i),$(Ks.$$.fragment,i),$(Cl.$$.fragment,i),$(ea.$$.fragment,i),$(ta.$$.fragment,i),$(oa.$$.fragment,i),$(Il.$$.fragment,i),$(Ul.$$.fragment,i),$(sa.$$.fragment,i),$(Zl.$$.fragment,i),$(aa.$$.fragment,i),$(ra.$$.fragment,i),$(Al.$$.fragment,i),$(Bl.$$.fragment,i),$(la.$$.fragment,i),$(Pl.$$.fragment,i),$(da.$$.fragment,i),$(ca.$$.fragment,i),$(pa.$$.fragment,i),$(Xl.$$.fragment,i),$(Ll.$$.fragment,i),$(ma.$$.fragment,i),$(Yl.$$.fragment,i),$(ua.$$.fragment,i),$(fa.$$.fragment,i),$(ga.$$.fragment,i),$(Hl.$$.fragment,i),$(Kl.$$.fragment,i),$(id.$$.fragment,i),$(ba.$$.fragment,i),$(ya.$$.fragment,i),$(ld.$$.fragment,i),$(dd.$$.fragment,i),$(_d.$$.fragment,i),$(ka.$$.fragment,i),$(va.$$.fragment,i),$(bd.$$.fragment,i),$(yd.$$.fragment,i),$(Ed.$$.fragment,i),$(Ma.$$.fragment,i),$($a.$$.fragment,i),$(xd.$$.fragment,i),$(jd.$$.fragment,i),$(Wd.$$.fragment,i),$(Ra.$$.fragment,i),$(Ea.$$.fragment,i),$(Zd.$$.fragment,i),$(Ad.$$.fragment,i),$(Qd.$$.fragment,i),$(ja.$$.fragment,i),$(Ja.$$.fragment,i),$(Od.$$.fragment,i),$(Dd.$$.fragment,i),$(sc.$$.fragment,i),$(Ca.$$.fragment,i),$(Ia.$$.fragment,i),$(ac.$$.fragment,i),$(rc.$$.fragment,i),$(uc.$$.fragment,i),$(qa.$$.fragment,i),$(Na.$$.fragment,i),$_=!1},d(i){t(d),i&&t(y),i&&t(u),F(l),i&&t(K),i&&t(N),i&&t(Fe),i&&t(ie),F(le),i&&t(ne),i&&t(z),i&&t(Re),i&&t(I),i&&t(X),i&&t(ue),i&&t(L),i&&t(fe),i&&t(Ee),i&&t(V),i&&t(se),i&&t(C),i&&t(bg),i&&t(Ro),i&&t(yg),i&&t(tn),F(pr),i&&t(Tg),i&&t(Uc),i&&t(kg),F(hr,i),i&&t(vg),i&&t(ct),i&&t(wg),F($r,i),i&&t(Mg),i&&t(xt),i&&t($g),F(zr,i),i&&t(Fg),i&&t(yt),i&&t(Rg),F(Gr,i),i&&t(Eg),i&&t(Tt),i&&t(xg),i&&t(tp),i&&t(jg),i&&t(Wo),i&&t(Jg),i&&t(nn),F(ti),i&&t(zg),i&&t(Vt),F(oi),F(ls),i&&t(Cg),i&&t(an),F(si),i&&t(Ig),i&&t(We),F(ai),F(cs),F(ps),F(li),F(ci),F(hi),F(mi),i&&t(Ug),i&&t(rn),F(ui),i&&t(qg),i&&t(tt),F(fi),F(fs),F(gs),F(yi),i&&t(Ng),i&&t(ln),F(Ti),i&&t(Wg),i&&t(ot),F(ki),F(Ri),F(ys),F(Ts),i&&t(Zg),i&&t(cn),F(Ei),i&&t(Ag),i&&t(wt),F(xi),F(Ii),F(vs),F(ws),i&&t(Bg),i&&t(hn),F(Ui),i&&t(Gg),i&&t(Mt),F(qi),F(Bi),F($s),F(Fs),i&&t(Vg),i&&t(un),F(Gi),i&&t(Sg),i&&t($t),F(Vi),F(Li),F(Es),F(xs),F(js),i&&t(Pg),i&&t(gn),F(Qi),i&&t(Xg),i&&t(Ft),F(Oi),F(Ki),F(zs),F(Cs),i&&t(Lg),i&&t(bn),F(el),i&&t(Qg),i&&t(Rt),F(tl),F(al),F(Us),F(qs),i&&t(Og),i&&t(Tn),F(rl),i&&t(Dg),i&&t(Et),F(il),F(pl),F(Ws),F(Zs),i&&t(Yg),i&&t(wn),F(hl),i&&t(Hg),i&&t(ht),F(ml),F(Bs),F(_l),F(Gs),F(Vs),i&&t(Kg),i&&t($n),F(bl),i&&t(e_),i&&t(Fn),F(yl),F(Tl),F(Ps),F(Xs),i&&t(t_),i&&t(En),F(kl),i&&t(o_),i&&t(mt),F(vl),F(Qs),F(Rl),F(Os),F(Ds),F(Ys),i&&t(n_),i&&t(jn),F(El),i&&t(s_),i&&t(ut),F(xl),F(Ks),F(Cl),F(ea),F(ta),F(oa),i&&t(a_),i&&t(zn),F(Il),i&&t(r_),i&&t(ft),F(Ul),F(sa),F(Zl),F(aa),F(ra),i&&t(i_),i&&t(In),F(Al),i&&t(l_),i&&t(gt),F(Bl),F(la),F(Pl),F(da),F(ca),F(pa),i&&t(d_),i&&t(qn),F(Xl),i&&t(c_),i&&t(_t),F(Ll),F(ma),F(Yl),F(ua),F(fa),F(ga),i&&t(p_),i&&t(Zn),F(Hl),i&&t(h_),i&&t(nt),F(Kl),F(id),F(ba),F(ya),i&&t(m_),i&&t(Bn),F(ld),i&&t(u_),i&&t(st),F(dd),F(_d),F(ka),F(va),i&&t(f_),i&&t(Vn),F(bd),i&&t(g_),i&&t(at),F(yd),F(Ed),F(Ma),F($a),i&&t(__),i&&t(Pn),F(xd),i&&t(b_),i&&t(rt),F(jd),F(Wd),F(Ra),F(Ea),i&&t(y_),i&&t(Ln),F(Zd),i&&t(T_),i&&t(it),F(Ad),F(Qd),F(ja),F(Ja),i&&t(k_),i&&t(On),F(Od),i&&t(v_),i&&t(lt),F(Dd),F(sc),F(Ca),F(Ia),i&&t(w_),i&&t(Yn),F(ac),i&&t(M_),i&&t(dt),F(rc),F(uc),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 J3(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class XU extends R3{constructor(d){super();E3(this,d,WU,qU,x3,{})}}export{XU as default,NU as metadata};
