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

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

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a model (with random weights) from the configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = RobertaModel(configuration)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Accessing the model configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = model.config`}}),{c(){d=s("p"),y=o("Examples:"),m=p(),T(f.$$.fragment)},l(i){d=a(i,"P",{});var u=r(d);y=n(u,"Examples:"),u.forEach(t),m=h(i),k(f.$$.fragment,i)},m(i,u){g(i,d,u),e(d,y),g(i,m,u),w(f,i,u),b=!0},p:Me,i(i){b||(M(f.$$.fragment,i),b=!0)},o(i){$(f.$$.fragment,i),b=!1},d(i){i&&t(d),i&&t(m),F(f,i)}}}function zI(R){let d,y,m,f,b;return f=new $e({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMFJvYmVydGFUb2tlbml6ZXIlMEElMEF0b2tlbml6ZXIlMjAlM0QlMjBSb2JlcnRhVG9rZW5pemVyLmZyb21fcHJldHJhaW5lZCglMjJyb2JlcnRhLWJhc2UlMjIpJTBBdG9rZW5pemVyKCUyMkhlbGxvJTIwd29ybGQlMjIpJTVCJTIyaW5wdXRfaWRzJTIyJTVEJTBBJTBBdG9rZW5pemVyKCUyMiUyMEhlbGxvJTIwd29ybGQlMjIpJTVCJTIyaW5wdXRfaWRzJTIyJTVE",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> RobertaTokenizer

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

<span class="hljs-meta">&gt;&gt;&gt; </span>predicted_class_id = <span class="hljs-built_in">int</span>(tf.math.argmax(logits, axis=-<span class="hljs-number">1</span>)[<span class="hljs-number">0</span>])
<span class="hljs-meta">&gt;&gt;&gt; </span>model.config.id2label[predicted_class_id]
<span class="hljs-string">&#x27;optimism&#x27;</span>`}}),{c(){d=s("p"),y=o("Example:"),m=p(),T(f.$$.fragment)},l(i){d=a(i,"P",{});var u=r(d);y=n(u,"Example:"),u.forEach(t),m=h(i),k(f.$$.fragment,i)},m(i,u){g(i,d,u),e(d,y),g(i,m,u),w(f,i,u),b=!0},p:Me,i(i){b||(M(f.$$.fragment,i),b=!0)},o(i){$(f.$$.fragment,i),b=!1},d(i){i&&t(d),i&&t(m),F(f,i)}}}function c5(R){let d,y;return d=new $e({props:{code:"JTIzJTIwVG8lMjB0cmFpbiUyMGElMjBtb2RlbCUyMG9uJTIwJTYwbnVtX2xhYmVscyU2MCUyMGNsYXNzZXMlMkMlMjB5b3UlMjBjYW4lMjBwYXNzJTIwJTYwbnVtX2xhYmVscyUzRG51bV9sYWJlbHMlNjAlMjB0byUyMCU2MC5mcm9tX3ByZXRyYWluZWQoLi4uKSU2MCUwQW51bV9sYWJlbHMlMjAlM0QlMjBsZW4obW9kZWwuY29uZmlnLmlkMmxhYmVsKSUwQW1vZGVsJTIwJTNEJTIwVEZSb2JlcnRhRm9yU2VxdWVuY2VDbGFzc2lmaWNhdGlvbi5mcm9tX3ByZXRyYWluZWQoJTIyY2FyZGlmZm5scCUyRnR3aXR0ZXItcm9iZXJ0YS1iYXNlLWVtb3Rpb24lMjIlMkMlMjBudW1fbGFiZWxzJTNEbnVtX2xhYmVscyklMEElMEFsYWJlbHMlMjAlM0QlMjB0Zi5jb25zdGFudCgxKSUwQWxvc3MlMjAlM0QlMjBtb2RlbCgqKmlucHV0cyUyQyUyMGxhYmVscyUzRGxhYmVscykubG9zcyUwQXJvdW5kKGZsb2F0KGxvc3MpJTJDJTIwMik=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># To train a model on \`num_labels\` classes, you can pass \`num_labels=num_labels\` to \`.from_pretrained(...)\`</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>num_labels = <span class="hljs-built_in">len</span>(model.config.id2label)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFRobertaForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;cardiffnlp/twitter-roberta-base-emotion&quot;</span>, num_labels=num_labels)

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs)
<span class="hljs-meta">&gt;&gt;&gt; </span>start_scores = outputs.start_logits
<span class="hljs-meta">&gt;&gt;&gt; </span>end_scores = outputs.end_logits`}}),{c(){d=s("p"),y=o("Example:"),m=p(),T(f.$$.fragment)},l(i){d=a(i,"P",{});var u=r(d);y=n(u,"Example:"),u.forEach(t),m=h(i),k(f.$$.fragment,i)},m(i,u){g(i,d,u),e(d,y),g(i,m,u),w(f,i,u),b=!0},p:Me,i(i){b||(M(f.$$.fragment,i),b=!0)},o(i){$(f.$$.fragment,i),b=!1},d(i){i&&t(d),i&&t(m),F(f,i)}}}function q5(R){let d,y,m,f,b,i,u,E,ae,K,N,re,ee,x,xe,G,pe,Ae,Q,he,ue,H,Fe,le,B,_e,ie,O,be,je,ne,C,U,de,D,Je,ce,Y,Ce,Re,I,ze,P,me,Ie,L,fe,ye,Z,Ee,S,Ue,se,z,ve,q,qe,ge,v,j,Pe,te,Ge,Le,J,Se,Te,Qe,Ve,Oe,A,V,De,Ye,X,He,Ke,Ne,Be,oe,et,ey,go,wh,ty,oy,Mh,ny,sy,$h,ay,ry,Fh,ly,iy,Rh,zc,Ic,dy,cy,bg,Ro,py,dr,hy,uy,cr,my,fy,yg,tn,ss,Eh,pr,gy,xh,_y,vg,Uc,by,Tg,hr,kg,ct,on,yy,ur,vy,Ty,mr,ky,wy,My,fr,$y,gr,Fy,Ry,Ey,_r,xy,br,jy,Jy,Cy,Eo,qc,zy,Iy,yr,Uy,qy,vr,Ny,Wy,Zy,xo,Nc,Ay,By,Tr,Gy,Sy,kr,Vy,Xy,Py,jo,Wc,Ly,Qy,wr,Oy,Dy,Mr,Yy,Hy,Ky,jh,Zc,ev,wg,$r,Mg,xt,Jo,Ac,tv,ov,Fr,nv,sv,Rr,av,rv,lv,Co,Bc,iv,dv,Er,cv,pv,xr,hv,uv,mv,as,Gc,fv,gv,jr,_v,bv,yv,Sc,Jr,vv,Tv,kv,Jh,Vc,wv,$g,Cr,Fg,yt,zr,Mv,Ir,$v,Fv,Rv,zo,Xc,Ev,xv,Ur,jv,Jv,qr,Cv,zv,Iv,Io,Pc,Uv,qv,Nr,Nv,Wv,Wr,Zv,Av,Bv,Uo,Lc,Gv,Sv,Zr,Vv,Xv,Ar,Pv,Lv,Qv,Qc,Br,Ov,Dv,Yv,Ch,Oc,Hv,Rg,Gr,Eg,vt,Sr,Kv,Vr,eT,tT,oT,qo,Dc,nT,sT,Xr,aT,rT,Pr,lT,iT,dT,No,Yc,cT,pT,Lr,hT,uT,Qr,mT,fT,gT,rs,Hc,_T,bT,Or,yT,vT,TT,Kc,Dr,kT,wT,MT,zh,ep,$T,xg,tp,Ih,FT,jg,Wo,Zo,op,RT,ET,Yr,xT,jT,Hr,JT,CT,zT,Ao,np,IT,UT,Kr,qT,NT,el,WT,ZT,AT,Uh,sp,BT,Jg,nn,ls,qh,tl,GT,Nh,ST,Cg,St,ol,VT,_o,XT,ap,PT,LT,rp,QT,OT,nl,DT,YT,HT,sn,KT,lp,ek,tk,ip,ok,nk,sk,is,zg,an,ds,Wh,sl,ak,Zh,rk,Ig,We,al,lk,Ah,ik,dk,Bh,ck,pk,cs,hk,rl,uk,Gh,mk,fk,gk,ps,_k,ll,bk,dp,yk,vk,Tk,Bo,il,kk,Sh,wk,Mk,dl,cp,$k,Vh,Fk,Rk,pp,Ek,Xh,xk,jk,hs,cl,Jk,pl,Ck,Ph,zk,Ik,Uk,us,hl,qk,Lh,Nk,Wk,hp,ul,Ug,rn,ms,Qh,ml,Zk,Oh,Ak,qg,tt,fl,Bk,gl,Gk,Dh,Sk,Vk,Xk,Yh,Pk,Lk,fs,Qk,_l,Ok,Hh,Dk,Yk,Hk,gs,Kk,bl,ew,up,tw,ow,nw,mp,yl,Ng,ln,_s,Kh,vl,sw,eu,aw,Wg,ot,Tl,rw,tu,lw,iw,kl,dw,fp,cw,pw,hw,wl,uw,Ml,mw,fw,gw,$l,_w,ou,bw,yw,vw,pt,Tw,nu,kw,ww,su,Mw,$w,au,Fw,Rw,ru,Ew,xw,lu,jw,Jw,iu,Cw,zw,Iw,bs,Uw,du,qw,Nw,Fl,Ww,Zw,Xt,Rl,Aw,dn,Bw,gp,Gw,Sw,cu,Vw,Xw,Pw,ys,Lw,vs,Zg,cn,Ts,pu,El,Qw,hu,Ow,Ag,wt,xl,Dw,jl,Yw,uu,Hw,Kw,e0,Jl,t0,_p,o0,n0,s0,Cl,a0,zl,r0,l0,i0,Pt,Il,d0,pn,c0,bp,p0,h0,mu,u0,m0,f0,ks,g0,ws,Bg,hn,Ms,fu,Ul,_0,gu,b0,Gg,Mt,ql,y0,Nl,v0,_u,T0,k0,w0,Wl,M0,yp,$0,F0,R0,Zl,E0,Al,x0,j0,J0,Lt,Bl,C0,un,z0,vp,I0,U0,bu,q0,N0,W0,$s,Z0,Fs,Sg,mn,Rs,yu,Gl,A0,vu,B0,Vg,$t,Sl,G0,Tu,S0,V0,Vl,X0,Tp,P0,L0,Q0,Xl,O0,Pl,D0,Y0,H0,jt,Ll,K0,fn,eM,kp,tM,oM,ku,nM,sM,aM,Es,rM,xs,lM,js,Xg,gn,Js,wu,Ql,iM,Mu,dM,Pg,Ft,Ol,cM,$u,pM,hM,Dl,uM,wp,mM,fM,gM,Yl,_M,Hl,bM,yM,vM,Qt,Kl,TM,_n,kM,Mp,wM,MM,Fu,$M,FM,RM,Cs,EM,zs,Lg,bn,Is,Ru,ei,xM,Eu,jM,Qg,Rt,ti,JM,xu,CM,zM,oi,IM,$p,UM,qM,NM,ni,WM,si,ZM,AM,BM,Ot,ai,GM,yn,SM,Fp,VM,XM,ju,PM,LM,QM,Us,OM,qs,Og,vn,Ns,Ju,ri,DM,Cu,YM,Dg,Et,li,HM,Tn,KM,zu,e1,t1,Iu,o1,n1,s1,ii,a1,Rp,r1,l1,i1,di,d1,ci,c1,p1,h1,Dt,pi,u1,kn,m1,Ep,f1,g1,Uu,_1,b1,y1,Ws,v1,Zs,Yg,wn,As,qu,hi,T1,Nu,k1,Hg,ht,ui,w1,Wu,M1,$1,mi,F1,xp,R1,E1,x1,fi,j1,gi,J1,C1,z1,Bs,I1,Yt,_i,U1,Mn,q1,jp,N1,W1,Zu,Z1,A1,B1,Gs,G1,Ss,Kg,$n,Vs,Au,bi,S1,Bu,V1,e_,Fn,yi,X1,Ht,vi,P1,Rn,L1,Jp,Q1,O1,Gu,D1,Y1,H1,Xs,K1,Ps,t_,En,Ls,Su,Ti,e2,Vu,t2,o_,ut,ki,o2,wi,n2,Xu,s2,a2,r2,Mi,l2,Cp,i2,d2,c2,$i,p2,Fi,h2,u2,m2,Qs,f2,Jt,Ri,g2,xn,_2,zp,b2,y2,Pu,v2,T2,k2,Os,w2,Ds,M2,Ys,n_,jn,Hs,Lu,Ei,$2,Qu,F2,s_,mt,xi,R2,Ou,E2,x2,ji,j2,Ip,J2,C2,z2,Ji,I2,Ci,U2,q2,N2,Ks,W2,Ct,zi,Z2,Jn,A2,Up,B2,G2,Du,S2,V2,X2,ea,P2,ta,L2,oa,a_,Cn,na,Yu,Ii,Q2,Hu,O2,r_,ft,Ui,D2,Ku,Y2,H2,qi,K2,qp,e$,t$,o$,Ni,n$,Wi,s$,a$,r$,sa,l$,Kt,Zi,i$,zn,d$,Np,c$,p$,em,h$,u$,m$,aa,f$,ra,l_,In,la,tm,Ai,g$,om,_$,i_,gt,Bi,b$,nm,y$,v$,Gi,T$,Wp,k$,w$,M$,Si,$$,Vi,F$,R$,E$,ia,x$,zt,Xi,j$,Un,J$,Zp,C$,z$,sm,I$,U$,q$,da,N$,ca,W$,pa,d_,qn,ha,am,Pi,Z$,rm,A$,c_,_t,Li,B$,Nn,G$,lm,S$,V$,im,X$,P$,L$,Qi,Q$,Ap,O$,D$,Y$,Oi,H$,Di,K$,eF,tF,ua,oF,It,Yi,nF,Wn,sF,Bp,aF,rF,dm,lF,iF,dF,ma,cF,fa,pF,ga,p_,Zn,_a,cm,Hi,hF,pm,uF,h_,nt,Ki,mF,hm,fF,gF,ed,_F,Gp,bF,yF,vF,td,TF,od,kF,wF,MF,um,$F,FF,bo,mm,nd,RF,EF,fm,sd,xF,jF,gm,ad,JF,CF,_m,rd,zF,IF,eo,ld,UF,An,qF,bm,NF,WF,ym,ZF,AF,BF,ba,GF,ya,u_,Bn,va,vm,id,SF,Tm,VF,m_,st,dd,XF,km,PF,LF,cd,QF,Sp,OF,DF,YF,pd,HF,hd,KF,eR,tR,wm,oR,nR,yo,Mm,ud,sR,aR,$m,md,rR,lR,Fm,fd,iR,dR,Rm,gd,cR,pR,to,_d,hR,Gn,uR,Em,mR,fR,xm,gR,_R,bR,Ta,yR,ka,f_,Sn,wa,jm,bd,vR,Jm,TR,g_,at,yd,kR,vd,wR,Cm,MR,$R,FR,Td,RR,Vp,ER,xR,jR,kd,JR,wd,CR,zR,IR,zm,UR,qR,vo,Im,Md,NR,WR,Um,$d,ZR,AR,qm,Fd,BR,GR,Nm,Rd,SR,VR,oo,Ed,XR,Vn,PR,Wm,LR,QR,Zm,OR,DR,YR,Ma,HR,$a,__,Xn,Fa,Am,xd,KR,Bm,eE,b_,rt,jd,tE,Gm,oE,nE,Jd,sE,Xp,aE,rE,lE,Cd,iE,zd,dE,cE,pE,Sm,hE,uE,To,Vm,Id,mE,fE,Xm,Ud,gE,_E,Pm,qd,bE,yE,Lm,Nd,vE,TE,no,Wd,kE,Pn,wE,Qm,ME,$E,Om,FE,RE,EE,Ra,xE,Ea,y_,Ln,xa,Dm,Zd,jE,Ym,JE,v_,lt,Ad,CE,Hm,zE,IE,Bd,UE,Pp,qE,NE,WE,Gd,ZE,Sd,AE,BE,GE,Km,SE,VE,ko,ef,Vd,XE,PE,tf,Xd,LE,QE,of,Pd,OE,DE,nf,Ld,YE,HE,so,Qd,KE,Qn,e4,sf,t4,o4,af,n4,s4,a4,ja,r4,Ja,T_,On,Ca,rf,Od,l4,lf,i4,k_,it,Dd,d4,df,c4,p4,Yd,h4,Lp,u4,m4,f4,Hd,g4,Kd,_4,b4,y4,cf,v4,T4,wo,pf,ec,k4,w4,hf,tc,M4,$4,uf,oc,F4,R4,mf,nc,E4,x4,ao,sc,j4,Dn,J4,ff,C4,z4,gf,I4,U4,q4,za,N4,Ia,w_,Yn,Ua,_f,ac,W4,bf,Z4,M_,dt,rc,A4,Hn,B4,yf,G4,S4,vf,V4,X4,P4,lc,L4,Qp,Q4,O4,D4,ic,Y4,dc,H4,K4,ex,Tf,tx,ox,Mo,kf,cc,nx,sx,wf,pc,ax,rx,Mf,hc,lx,ix,$f,uc,dx,cx,ro,mc,px,Kn,hx,Ff,ux,mx,Rf,fx,gx,_x,qa,bx,Na,$_;return i=new Ze({}),ie=new Ze({}),pr=new Ze({}),hr=new Kb({props:{pipeline:"text-classification"}}),$r=new Kb({props:{pipeline:"token-classification"}}),Cr=new Kb({props:{pipeline:"fill-mask"}}),Gr=new Kb({props:{pipeline:"question-answering"}}),tl=new Ze({}),ol=new W({props:{name:"class transformers.RobertaConfig",anchor:"transformers.RobertaConfig",parameters:[{name:"vocab_size",val:" = 50265"},{name:"hidden_size",val:" = 768"},{name:"num_hidden_layers",val:" = 12"},{name:"num_attention_heads",val:" = 12"},{name:"intermediate_size",val:" = 3072"},{name:"hidden_act",val:" = 'gelu'"},{name:"hidden_dropout_prob",val:" = 0.1"},{name:"attention_probs_dropout_prob",val:" = 0.1"},{name:"max_position_embeddings",val:" = 512"},{name:"type_vocab_size",val:" = 2"},{name:"initializer_range",val:" = 0.02"},{name:"layer_norm_eps",val:" = 1e-12"},{name:"pad_token_id",val:" = 1"},{name:"bos_token_id",val:" = 0"},{name:"eos_token_id",val:" = 2"},{name:"position_embedding_type",val:" = 'absolute'"},{name:"use_cache",val:" = True"},{name:"classifier_dropout",val:" = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.RobertaConfig.vocab_size",description:`<strong>vocab_size</strong> (<code>int</code>, <em>optional</em>, defaults to 50265) &#x2014;
Vocabulary size of the RoBERTa model. Defines the number of different tokens that can be represented by the
<code>inputs_ids</code> passed when calling <a href="/docs/transformers/v4.30.0/en/model_doc/roberta#transformers.RobertaModel">RobertaModel</a> or <a href="/docs/transformers/v4.30.0/en/model_doc/roberta#transformers.TFRobertaModel">TFRobertaModel</a>.`,name:"vocab_size"},{anchor:"transformers.RobertaConfig.hidden_size",description:`<strong>hidden_size</strong> (<code>int</code>, <em>optional</em>, defaults to 768) &#x2014;
Dimensionality of the encoder layers and the pooler layer.`,name:"hidden_size"},{anchor:"transformers.RobertaConfig.num_hidden_layers",description:`<strong>num_hidden_layers</strong> (<code>int</code>, <em>optional</em>, defaults to 12) &#x2014;
Number of hidden layers in the Transformer encoder.`,name:"num_hidden_layers"},{anchor:"transformers.RobertaConfig.num_attention_heads",description:`<strong>num_attention_heads</strong> (<code>int</code>, <em>optional</em>, defaults to 12) &#x2014;
Number of attention heads for each attention layer in the Transformer encoder.`,name:"num_attention_heads"},{anchor:"transformers.RobertaConfig.intermediate_size",description:`<strong>intermediate_size</strong> (<code>int</code>, <em>optional</em>, defaults to 3072) &#x2014;
Dimensionality of the &#x201C;intermediate&#x201D; (often named feed-forward) layer in the Transformer encoder.`,name:"intermediate_size"},{anchor:"transformers.RobertaConfig.hidden_act",description:`<strong>hidden_act</strong> (<code>str</code> or <code>Callable</code>, <em>optional</em>, defaults to <code>&quot;gelu&quot;</code>) &#x2014;
The non-linear activation function (function or string) in the encoder and pooler. If string, <code>&quot;gelu&quot;</code>,
<code>&quot;relu&quot;</code>, <code>&quot;silu&quot;</code> and <code>&quot;gelu_new&quot;</code> are supported.`,name:"hidden_act"},{anchor:"transformers.RobertaConfig.hidden_dropout_prob",description:`<strong>hidden_dropout_prob</strong> (<code>float</code>, <em>optional</em>, defaults to 0.1) &#x2014;
The dropout probability for all fully connected layers in the embeddings, encoder, and pooler.`,name:"hidden_dropout_prob"},{anchor:"transformers.RobertaConfig.attention_probs_dropout_prob",description:`<strong>attention_probs_dropout_prob</strong> (<code>float</code>, <em>optional</em>, defaults to 0.1) &#x2014;
The dropout ratio for the attention probabilities.`,name:"attention_probs_dropout_prob"},{anchor:"transformers.RobertaConfig.max_position_embeddings",description:`<strong>max_position_embeddings</strong> (<code>int</code>, <em>optional</em>, defaults to 512) &#x2014;
The maximum sequence length that this model might ever be used with. Typically set this to something large
just in case (e.g., 512 or 1024 or 2048).`,name:"max_position_embeddings"},{anchor:"transformers.RobertaConfig.type_vocab_size",description:`<strong>type_vocab_size</strong> (<code>int</code>, <em>optional</em>, defaults to 2) &#x2014;
The vocabulary size of the <code>token_type_ids</code> passed when calling <a href="/docs/transformers/v4.30.0/en/model_doc/roberta#transformers.RobertaModel">RobertaModel</a> or <a href="/docs/transformers/v4.30.0/en/model_doc/roberta#transformers.TFRobertaModel">TFRobertaModel</a>.`,name:"type_vocab_size"},{anchor:"transformers.RobertaConfig.initializer_range",description:`<strong>initializer_range</strong> (<code>float</code>, <em>optional</em>, defaults to 0.02) &#x2014;
The standard deviation of the truncated_normal_initializer for initializing all weight matrices.`,name:"initializer_range"},{anchor:"transformers.RobertaConfig.layer_norm_eps",description:`<strong>layer_norm_eps</strong> (<code>float</code>, <em>optional</em>, defaults to 1e-12) &#x2014;
The epsilon used by the layer normalization layers.`,name:"layer_norm_eps"},{anchor:"transformers.RobertaConfig.position_embedding_type",description:`<strong>position_embedding_type</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;absolute&quot;</code>) &#x2014;
Type of position embedding. Choose one of <code>&quot;absolute&quot;</code>, <code>&quot;relative_key&quot;</code>, <code>&quot;relative_key_query&quot;</code>. For
positional embeddings use <code>&quot;absolute&quot;</code>. For more information on <code>&quot;relative_key&quot;</code>, please refer to
<a href="https://arxiv.org/abs/1803.02155" rel="nofollow">Self-Attention with Relative Position Representations (Shaw et al.)</a>.
For more information on <code>&quot;relative_key_query&quot;</code>, please refer to <em>Method 4</em> in <a href="https://arxiv.org/abs/2009.13658" rel="nofollow">Improve Transformer Models
with Better Relative Position Embeddings (Huang et al.)</a>.`,name:"position_embedding_type"},{anchor:"transformers.RobertaConfig.is_decoder",description:`<strong>is_decoder</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether the model is used as a decoder or not. If <code>False</code>, the model is used as an encoder.`,name:"is_decoder"},{anchor:"transformers.RobertaConfig.use_cache",description:`<strong>use_cache</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not the model should return the last key/values attentions (not used by all models). Only
relevant if <code>config.is_decoder=True</code>.`,name:"use_cache"},{anchor:"transformers.RobertaConfig.classifier_dropout",description:`<strong>classifier_dropout</strong> (<code>float</code>, <em>optional</em>) &#x2014;
The dropout ratio for the classification head.`,name:"classifier_dropout"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/roberta/configuration_roberta.py#L37"}}),is=new we({props:{anchor:"transformers.RobertaConfig.example",$$slots:{default:[CI]},$$scope:{ctx:R}}}),sl=new Ze({}),al=new W({props:{name:"class transformers.RobertaTokenizer",anchor:"transformers.RobertaTokenizer",parameters:[{name:"vocab_file",val:""},{name:"merges_file",val:""},{name:"errors",val:" = 'replace'"},{name:"bos_token",val:" = '<s>'"},{name:"eos_token",val:" = '</s>'"},{name:"sep_token",val:" = '</s>'"},{name:"cls_token",val:" = '<s>'"},{name:"unk_token",val:" = '<unk>'"},{name:"pad_token",val:" = '<pad>'"},{name:"mask_token",val:" = '<mask>'"},{name:"add_prefix_space",val:" = False"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.RobertaTokenizer.vocab_file",description:`<strong>vocab_file</strong> (<code>str</code>) &#x2014;
Path to the vocabulary file.`,name:"vocab_file"},{anchor:"transformers.RobertaTokenizer.merges_file",description:`<strong>merges_file</strong> (<code>str</code>) &#x2014;
Path to the merges file.`,name:"merges_file"},{anchor:"transformers.RobertaTokenizer.errors",description:`<strong>errors</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;replace&quot;</code>) &#x2014;
Paradigm to follow when decoding bytes to UTF-8. See
<a href="https://docs.python.org/3/library/stdtypes.html#bytes.decode" rel="nofollow">bytes.decode</a> for more information.`,name:"errors"},{anchor:"transformers.RobertaTokenizer.bos_token",description:`<strong>bos_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;s&gt;&quot;</code>) &#x2014;
The beginning of sequence token that was used during pretraining. Can be used a sequence classifier token.</p>
<div class="course-tip  bg-gradient-to-br dark:bg-gradient-to-r before:border-green-500 dark:before:border-green-800 from-green-50 dark:from-gray-900 to-white dark:to-gray-950 border border-green-50 text-green-700 dark:text-gray-400">
						
<p>When building a sequence using special tokens, this is not the token that is used for the beginning of
sequence. The token used is the <code>cls_token</code>.</p>

					</div>`,name:"bos_token"},{anchor:"transformers.RobertaTokenizer.eos_token",description:`<strong>eos_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;/s&gt;&quot;</code>) &#x2014;
The end of sequence token.</p>
<div class="course-tip  bg-gradient-to-br dark:bg-gradient-to-r before:border-green-500 dark:before:border-green-800 from-green-50 dark:from-gray-900 to-white dark:to-gray-950 border border-green-50 text-green-700 dark:text-gray-400">
						
<p>When building a sequence using special tokens, this is not the token that is used for the end of sequence.
The token used is the <code>sep_token</code>.</p>

					</div>`,name:"eos_token"},{anchor:"transformers.RobertaTokenizer.sep_token",description:`<strong>sep_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;/s&gt;&quot;</code>) &#x2014;
The separator token, which is used when building a sequence from multiple sequences, e.g. two sequences for
sequence classification or for a text and a question for question answering. It is also used as the last
token of a sequence built with special tokens.`,name:"sep_token"},{anchor:"transformers.RobertaTokenizer.cls_token",description:`<strong>cls_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;s&gt;&quot;</code>) &#x2014;
The classifier token which is used when doing sequence classification (classification of the whole sequence
instead of per-token classification). It is the first token of the sequence when built with special tokens.`,name:"cls_token"},{anchor:"transformers.RobertaTokenizer.unk_token",description:`<strong>unk_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;unk&gt;&quot;</code>) &#x2014;
The unknown token. A token that is not in the vocabulary cannot be converted to an ID and is set to be this
token instead.`,name:"unk_token"},{anchor:"transformers.RobertaTokenizer.pad_token",description:`<strong>pad_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;pad&gt;&quot;</code>) &#x2014;
The token used for padding, for example when batching sequences of different lengths.`,name:"pad_token"},{anchor:"transformers.RobertaTokenizer.mask_token",description:`<strong>mask_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;mask&gt;&quot;</code>) &#x2014;
The token used for masking values. This is the token used when training this model with masked language
modeling. This is the token which the model will try to predict.`,name:"mask_token"},{anchor:"transformers.RobertaTokenizer.add_prefix_space",description:`<strong>add_prefix_space</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to add an initial space to the input. This allows to treat the leading word just as any
other word. (RoBERTa tokenizer detect beginning of words by the preceding space).`,name:"add_prefix_space"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/roberta/tokenization_roberta.py#L107"}}),cs=new we({props:{anchor:"transformers.RobertaTokenizer.example",$$slots:{default:[zI]},$$scope:{ctx:R}}}),ps=new ke({props:{$$slots:{default:[II]},$$scope:{ctx:R}}}),il=new W({props:{name:"build_inputs_with_special_tokens",anchor:"transformers.RobertaTokenizer.build_inputs_with_special_tokens",parameters:[{name:"token_ids_0",val:": typing.List[int]"},{name:"token_ids_1",val:": typing.Optional[typing.List[int]] = None"}],parametersDescription:[{anchor:"transformers.RobertaTokenizer.build_inputs_with_special_tokens.token_ids_0",description:`<strong>token_ids_0</strong> (<code>List[int]</code>) &#x2014;
List of IDs to which the special tokens will be added.`,name:"token_ids_0"},{anchor:"transformers.RobertaTokenizer.build_inputs_with_special_tokens.token_ids_1",description:`<strong>token_ids_1</strong> (<code>List[int]</code>, <em>optional</em>) &#x2014;
Optional second list of IDs for sequence pairs.`,name:"token_ids_1"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/roberta/tokenization_roberta.py#L346",returnDescription:`
<p>List of <a href="../glossary#input-ids">input IDs</a> with the appropriate special tokens.</p>
`,returnType:`
<p><code>List[int]</code></p>
`}}),cl=new W({props:{name:"get_special_tokens_mask",anchor:"transformers.RobertaTokenizer.get_special_tokens_mask",parameters:[{name:"token_ids_0",val:": typing.List[int]"},{name:"token_ids_1",val:": typing.Optional[typing.List[int]] = None"},{name:"already_has_special_tokens",val:": bool = False"}],parametersDescription:[{anchor:"transformers.RobertaTokenizer.get_special_tokens_mask.token_ids_0",description:`<strong>token_ids_0</strong> (<code>List[int]</code>) &#x2014;
List of IDs.`,name:"token_ids_0"},{anchor:"transformers.RobertaTokenizer.get_special_tokens_mask.token_ids_1",description:`<strong>token_ids_1</strong> (<code>List[int]</code>, <em>optional</em>) &#x2014;
Optional second list of IDs for sequence pairs.`,name:"token_ids_1"},{anchor:"transformers.RobertaTokenizer.get_special_tokens_mask.already_has_special_tokens",description:`<strong>already_has_special_tokens</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not the token list is already formatted with special tokens for the model.`,name:"already_has_special_tokens"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/roberta/tokenization_roberta.py#L371",returnDescription:`
<p>A list of integers in the range [0, 1]: 1 for a special token, 0 for a sequence token.</p>
`,returnType:`
<p><code>List[int]</code></p>
`}}),hl=new W({props:{name:"create_token_type_ids_from_sequences",anchor:"transformers.RobertaTokenizer.create_token_type_ids_from_sequences",parameters:[{name:"token_ids_0",val:": typing.List[int]"},{name:"token_ids_1",val:": typing.Optional[typing.List[int]] = None"}],parametersDescription:[{anchor:"transformers.RobertaTokenizer.create_token_type_ids_from_sequences.token_ids_0",description:`<strong>token_ids_0</strong> (<code>List[int]</code>) &#x2014;
List of IDs.`,name:"token_ids_0"},{anchor:"transformers.RobertaTokenizer.create_token_type_ids_from_sequences.token_ids_1",description:`<strong>token_ids_1</strong> (<code>List[int]</code>, <em>optional</em>) &#x2014;
Optional second list of IDs for sequence pairs.`,name:"token_ids_1"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/roberta/tokenization_roberta.py#L398",returnDescription:`
<p>List of zeros.</p>
`,returnType:`
<p><code>List[int]</code></p>
`}}),ul=new W({props:{name:"save_vocabulary",anchor:"transformers.RobertaTokenizer.save_vocabulary",parameters:[{name:"save_directory",val:": str"},{name:"filename_prefix",val:": typing.Optional[str] = None"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/roberta/tokenization_roberta.py#L317"}}),ml=new Ze({}),fl=new W({props:{name:"class transformers.RobertaTokenizerFast",anchor:"transformers.RobertaTokenizerFast",parameters:[{name:"vocab_file",val:" = None"},{name:"merges_file",val:" = None"},{name:"tokenizer_file",val:" = None"},{name:"errors",val:" = 'replace'"},{name:"bos_token",val:" = '<s>'"},{name:"eos_token",val:" = '</s>'"},{name:"sep_token",val:" = '</s>'"},{name:"cls_token",val:" = '<s>'"},{name:"unk_token",val:" = '<unk>'"},{name:"pad_token",val:" = '<pad>'"},{name:"mask_token",val:" = '<mask>'"},{name:"add_prefix_space",val:" = False"},{name:"trim_offsets",val:" = True"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.RobertaTokenizerFast.vocab_file",description:`<strong>vocab_file</strong> (<code>str</code>) &#x2014;
Path to the vocabulary file.`,name:"vocab_file"},{anchor:"transformers.RobertaTokenizerFast.merges_file",description:`<strong>merges_file</strong> (<code>str</code>) &#x2014;
Path to the merges file.`,name:"merges_file"},{anchor:"transformers.RobertaTokenizerFast.errors",description:`<strong>errors</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;replace&quot;</code>) &#x2014;
Paradigm to follow when decoding bytes to UTF-8. See
<a href="https://docs.python.org/3/library/stdtypes.html#bytes.decode" rel="nofollow">bytes.decode</a> for more information.`,name:"errors"},{anchor:"transformers.RobertaTokenizerFast.bos_token",description:`<strong>bos_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;s&gt;&quot;</code>) &#x2014;
The beginning of sequence token that was used during pretraining. Can be used a sequence classifier token.</p>
<div class="course-tip  bg-gradient-to-br dark:bg-gradient-to-r before:border-green-500 dark:before:border-green-800 from-green-50 dark:from-gray-900 to-white dark:to-gray-950 border border-green-50 text-green-700 dark:text-gray-400">
						
<p>When building a sequence using special tokens, this is not the token that is used for the beginning of
sequence. The token used is the <code>cls_token</code>.</p>

					</div>`,name:"bos_token"},{anchor:"transformers.RobertaTokenizerFast.eos_token",description:`<strong>eos_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;/s&gt;&quot;</code>) &#x2014;
The end of sequence token.</p>
<div class="course-tip  bg-gradient-to-br dark:bg-gradient-to-r before:border-green-500 dark:before:border-green-800 from-green-50 dark:from-gray-900 to-white dark:to-gray-950 border border-green-50 text-green-700 dark:text-gray-400">
						
<p>When building a sequence using special tokens, this is not the token that is used for the end of sequence.
The token used is the <code>sep_token</code>.</p>

					</div>`,name:"eos_token"},{anchor:"transformers.RobertaTokenizerFast.sep_token",description:`<strong>sep_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;/s&gt;&quot;</code>) &#x2014;
The separator token, which is used when building a sequence from multiple sequences, e.g. two sequences for
sequence classification or for a text and a question for question answering. It is also used as the last
token of a sequence built with special tokens.`,name:"sep_token"},{anchor:"transformers.RobertaTokenizerFast.cls_token",description:`<strong>cls_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;s&gt;&quot;</code>) &#x2014;
The classifier token which is used when doing sequence classification (classification of the whole sequence
instead of per-token classification). It is the first token of the sequence when built with special tokens.`,name:"cls_token"},{anchor:"transformers.RobertaTokenizerFast.unk_token",description:`<strong>unk_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;unk&gt;&quot;</code>) &#x2014;
The unknown token. A token that is not in the vocabulary cannot be converted to an ID and is set to be this
token instead.`,name:"unk_token"},{anchor:"transformers.RobertaTokenizerFast.pad_token",description:`<strong>pad_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;pad&gt;&quot;</code>) &#x2014;
The token used for padding, for example when batching sequences of different lengths.`,name:"pad_token"},{anchor:"transformers.RobertaTokenizerFast.mask_token",description:`<strong>mask_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;mask&gt;&quot;</code>) &#x2014;
The token used for masking values. This is the token used when training this model with masked language
modeling. This is the token which the model will try to predict.`,name:"mask_token"},{anchor:"transformers.RobertaTokenizerFast.add_prefix_space",description:`<strong>add_prefix_space</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to add an initial space to the input. This allows to treat the leading word just as any
other word. (RoBERTa tokenizer detect beginning of words by the preceding space).`,name:"add_prefix_space"},{anchor:"transformers.RobertaTokenizerFast.trim_offsets",description:`<strong>trim_offsets</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether the post processing step should trim offsets to avoid including whitespaces.`,name:"trim_offsets"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/roberta/tokenization_roberta_fast.py#L76"}}),fs=new we({props:{anchor:"transformers.RobertaTokenizerFast.example",$$slots:{default:[UI]},$$scope:{ctx:R}}}),gs=new ke({props:{$$slots:{default:[qI]},$$scope:{ctx:R}}}),yl=new W({props:{name:"build_inputs_with_special_tokens",anchor:"transformers.RobertaTokenizerFast.build_inputs_with_special_tokens",parameters:[{name:"token_ids_0",val:""},{name:"token_ids_1",val:" = None"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/roberta/tokenization_roberta_fast.py#L281"}}),vl=new Ze({}),Tl=new W({props:{name:"class transformers.RobertaModel",anchor:"transformers.RobertaModel",parameters:[{name:"config",val:""},{name:"add_pooling_layer",val:" = True"}],parametersDescription:[{anchor:"transformers.RobertaModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.30.0/en/model_doc/roberta#transformers.RobertaConfig">RobertaConfig</a>) &#x2014; Model configuration class with all the parameters of the
model. Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.30.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/roberta/modeling_roberta.py#L698"}}),Rl=new W({props:{name:"forward",anchor:"transformers.RobertaModel.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"token_type_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"position_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.Tensor] = None"},{name:"encoder_hidden_states",val:": typing.Optional[torch.Tensor] = None"},{name:"encoder_attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"past_key_values",val:": typing.Optional[typing.List[torch.FloatTensor]] = None"},{name:"use_cache",val:": typing.Optional[bool] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.RobertaModel.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.30.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.30.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.RobertaModel.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.RobertaModel.forward.token_type_ids",description:`<strong>token_type_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0,1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.
This parameter can only be used when the model is initialized with <code>type_vocab_size</code> parameter with value<blockquote>
<p>= 2. All the value in this tensor should be always &lt; type_vocab_size.</p>
</blockquote></li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.RobertaModel.forward.position_ids",description:`<strong>position_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.RobertaModel.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.RobertaModel.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.RobertaModel.forward.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.RobertaModel.forward.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.RobertaModel.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.30.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.RobertaModel.forward.encoder_hidden_states",description:`<strong>encoder_hidden_states</strong>  (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Sequence of hidden-states at the output of the last layer of the encoder. Used in the cross-attention if
the model is configured as a decoder.`,name:"encoder_hidden_states"},{anchor:"transformers.RobertaModel.forward.encoder_attention_mask",description:`<strong>encoder_attention_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on the padding token indices of the encoder input. This mask is used in
the cross-attention if the model is configured as a decoder. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>`,name:"encoder_attention_mask"},{anchor:"transformers.RobertaModel.forward.past_key_values",description:`<strong>past_key_values</strong> (<code>tuple(tuple(torch.FloatTensor))</code> of length <code>config.n_layers</code> with each tuple having 4 tensors of shape <code>(batch_size, num_heads, sequence_length - 1, embed_size_per_head)</code>) &#x2014;
Contains precomputed key and value hidden states of the attention blocks. Can be used to speed up decoding.</p>
<p>If <code>past_key_values</code> are used, the user can optionally input only the last <code>decoder_input_ids</code> (those that
don&#x2019;t have their past key value states given to this model) of shape <code>(batch_size, 1)</code> instead of all
<code>decoder_input_ids</code> of shape <code>(batch_size, sequence_length)</code>.`,name:"past_key_values"},{anchor:"transformers.RobertaModel.forward.use_cache",description:`<strong>use_cache</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
If set to <code>True</code>, <code>past_key_values</code> key value states are returned and can be used to speed up decoding (see
<code>past_key_values</code>).`,name:"use_cache"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/roberta/modeling_roberta.py#L743",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.30.0/en/main_classes/output#transformers.modeling_outputs.BaseModelOutputWithPoolingAndCrossAttentions"
>transformers.modeling_outputs.BaseModelOutputWithPoolingAndCrossAttentions</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.30.0/en/model_doc/roberta#transformers.RobertaConfig"
>RobertaConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>last_hidden_state</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>) \u2014 Sequence of hidden-states at the output of the last layer of the model.</p>
</li>
<li>
<p><strong>pooler_output</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, hidden_size)</code>) \u2014 Last layer hidden-state of the first token of the sequence (classification token) after further processing
through the layers used for the auxiliary pretraining task. E.g. for BERT-family of models, this returns
the classification token after processing through a linear layer and a tanh activation function. The linear
layer weights are trained from the next sentence prediction (classification) objective during pretraining.</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
<li>
<p><strong>cross_attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> and <code>config.add_cross_attention=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights of the decoder\u2019s cross-attention layer, after the attention softmax, used to compute the
weighted average in the cross-attention heads.</p>
</li>
<li>
<p><strong>past_key_values</strong> (<code>tuple(tuple(torch.FloatTensor))</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) \u2014 Tuple of <code>tuple(torch.FloatTensor)</code> of length <code>config.n_layers</code>, with each tuple having 2 tensors of shape
<code>(batch_size, num_heads, sequence_length, embed_size_per_head)</code>) and optionally if
<code>config.is_encoder_decoder=True</code> 2 additional tensors of shape <code>(batch_size, num_heads, encoder_sequence_length, embed_size_per_head)</code>.</p>
<p>Contains pre-computed hidden-states (key and values in the self-attention blocks and optionally if
<code>config.is_encoder_decoder=True</code> in the cross-attention blocks) that can be used (see <code>past_key_values</code>
input) to speed up sequential decoding.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.30.0/en/main_classes/output#transformers.modeling_outputs.BaseModelOutputWithPoolingAndCrossAttentions"
>transformers.modeling_outputs.BaseModelOutputWithPoolingAndCrossAttentions</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),ys=new ke({props:{$$slots:{default:[NI]},$$scope:{ctx:R}}}),vs=new we({props:{anchor:"transformers.RobertaModel.forward.example",$$slots:{default:[WI]},$$scope:{ctx:R}}}),El=new Ze({}),xl=new W({props:{name:"class transformers.RobertaForCausalLM",anchor:"transformers.RobertaForCausalLM",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.RobertaForCausalLM.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.30.0/en/model_doc/roberta#transformers.RobertaConfig">RobertaConfig</a>) &#x2014; Model configuration class with all the parameters of the
model. Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.30.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/roberta/modeling_roberta.py#L883"}}),Il=new W({props:{name:"forward",anchor:"transformers.RobertaForCausalLM.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"token_type_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"position_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"head_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"encoder_hidden_states",val:": typing.Optional[torch.FloatTensor] = None"},{name:"encoder_attention_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"labels",val:": typing.Optional[torch.LongTensor] = None"},{name:"past_key_values",val:": typing.Tuple[typing.Tuple[torch.FloatTensor]] = None"},{name:"use_cache",val:": typing.Optional[bool] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.RobertaForCausalLM.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.30.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.30.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.RobertaForCausalLM.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.RobertaForCausalLM.forward.token_type_ids",description:`<strong>token_type_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0,1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.
This parameter can only be used when the model is initialized with <code>type_vocab_size</code> parameter with value<blockquote>
<p>= 2. All the value in this tensor should be always &lt; type_vocab_size.</p>
</blockquote></li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.RobertaForCausalLM.forward.position_ids",description:`<strong>position_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.RobertaForCausalLM.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.RobertaForCausalLM.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.RobertaForCausalLM.forward.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.RobertaForCausalLM.forward.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.RobertaForCausalLM.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.30.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.RobertaForCausalLM.forward.encoder_hidden_states",description:`<strong>encoder_hidden_states</strong>  (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Sequence of hidden-states at the output of the last layer of the encoder. Used in the cross-attention if
the model is configured as a decoder.`,name:"encoder_hidden_states"},{anchor:"transformers.RobertaForCausalLM.forward.encoder_attention_mask",description:`<strong>encoder_attention_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on the padding token indices of the encoder input. This mask is used in
the cross-attention if the model is configured as a decoder. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>`,name:"encoder_attention_mask"},{anchor:"transformers.RobertaForCausalLM.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Labels for computing the left-to-right language modeling loss (next word prediction). Indices should be in
<code>[-100, 0, ..., config.vocab_size]</code> (see <code>input_ids</code> docstring) Tokens with indices set to <code>-100</code> are
ignored (masked), the loss is only computed for the tokens with labels in <code>[0, ..., config.vocab_size]</code>`,name:"labels"},{anchor:"transformers.RobertaForCausalLM.forward.past_key_values",description:`<strong>past_key_values</strong> (<code>tuple(tuple(torch.FloatTensor))</code> of length <code>config.n_layers</code> with each tuple having 4 tensors of shape <code>(batch_size, num_heads, sequence_length - 1, embed_size_per_head)</code>) &#x2014;
Contains precomputed key and value hidden states of the attention blocks. Can be used to speed up decoding.</p>
<p>If <code>past_key_values</code> are used, the user can optionally input only the last <code>decoder_input_ids</code> (those that
don&#x2019;t have their past key value states given to this model) of shape <code>(batch_size, 1)</code> instead of all
<code>decoder_input_ids</code> of shape <code>(batch_size, sequence_length)</code>.`,name:"past_key_values"},{anchor:"transformers.RobertaForCausalLM.forward.use_cache",description:`<strong>use_cache</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
If set to <code>True</code>, <code>past_key_values</code> key value states are returned and can be used to speed up decoding (see
<code>past_key_values</code>).`,name:"use_cache"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/roberta/modeling_roberta.py#L909",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.30.0/en/main_classes/output#transformers.modeling_outputs.CausalLMOutputWithCrossAttentions"
>transformers.modeling_outputs.CausalLMOutputWithCrossAttentions</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.30.0/en/model_doc/roberta#transformers.RobertaConfig"
>RobertaConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Language modeling loss (for next-token prediction).</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, config.vocab_size)</code>) \u2014 Prediction scores of the language modeling head (scores for each vocabulary token before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
<li>
<p><strong>cross_attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Cross attentions weights after the attention softmax, used to compute the weighted average in the
cross-attention heads.</p>
</li>
<li>
<p><strong>past_key_values</strong> (<code>tuple(tuple(torch.FloatTensor))</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> tuples of length <code>config.n_layers</code>, with each tuple containing the cached key,
value states of the self-attention and the cross-attention layers if model is used in encoder-decoder
setting. Only relevant if <code>config.is_decoder = True</code>.</p>
<p>Contains pre-computed hidden-states (key and values in the attention blocks) that can be used (see
<code>past_key_values</code> input) to speed up sequential decoding.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.30.0/en/main_classes/output#transformers.modeling_outputs.CausalLMOutputWithCrossAttentions"
>transformers.modeling_outputs.CausalLMOutputWithCrossAttentions</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),ks=new ke({props:{$$slots:{default:[ZI]},$$scope:{ctx:R}}}),ws=new we({props:{anchor:"transformers.RobertaForCausalLM.forward.example",$$slots:{default:[AI]},$$scope:{ctx:R}}}),Ul=new Ze({}),ql=new W({props:{name:"class transformers.RobertaForMaskedLM",anchor:"transformers.RobertaForMaskedLM",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.RobertaForMaskedLM.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.30.0/en/model_doc/roberta#transformers.RobertaConfig">RobertaConfig</a>) &#x2014; Model configuration class with all the parameters of the
model. Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.30.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/roberta/modeling_roberta.py#L1037"}}),Bl=new W({props:{name:"forward",anchor:"transformers.RobertaForMaskedLM.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"token_type_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"position_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"head_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"encoder_hidden_states",val:": typing.Optional[torch.FloatTensor] = None"},{name:"encoder_attention_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"labels",val:": typing.Optional[torch.LongTensor] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.RobertaForMaskedLM.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.30.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.30.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.RobertaForMaskedLM.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.RobertaForMaskedLM.forward.token_type_ids",description:`<strong>token_type_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0,1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.
This parameter can only be used when the model is initialized with <code>type_vocab_size</code> parameter with value<blockquote>
<p>= 2. All the value in this tensor should be always &lt; type_vocab_size.</p>
</blockquote></li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.RobertaForMaskedLM.forward.position_ids",description:`<strong>position_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.RobertaForMaskedLM.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.RobertaForMaskedLM.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.RobertaForMaskedLM.forward.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.RobertaForMaskedLM.forward.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.RobertaForMaskedLM.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.30.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.RobertaForMaskedLM.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Labels for computing the masked language modeling loss. Indices should be in <code>[-100, 0, ..., config.vocab_size]</code> (see <code>input_ids</code> docstring) Tokens with indices set to <code>-100</code> are ignored (masked), the
loss is only computed for the tokens with labels in <code>[0, ..., config.vocab_size]</code>`,name:"labels"},{anchor:"transformers.RobertaForMaskedLM.forward.kwargs",description:`<strong>kwargs</strong> (<code>Dict[str, any]</code>, optional, defaults to <em>{}</em>) &#x2014;
Used to hide legacy arguments that have been deprecated.`,name:"kwargs"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/roberta/modeling_roberta.py#L1066",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.30.0/en/main_classes/output#transformers.modeling_outputs.MaskedLMOutput"
>transformers.modeling_outputs.MaskedLMOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.30.0/en/model_doc/roberta#transformers.RobertaConfig"
>RobertaConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Masked language modeling (MLM) loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, config.vocab_size)</code>) \u2014 Prediction scores of the language modeling head (scores for each vocabulary token before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.30.0/en/main_classes/output#transformers.modeling_outputs.MaskedLMOutput"
>transformers.modeling_outputs.MaskedLMOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),$s=new ke({props:{$$slots:{default:[BI]},$$scope:{ctx:R}}}),Fs=new we({props:{anchor:"transformers.RobertaForMaskedLM.forward.example",$$slots:{default:[GI]},$$scope:{ctx:R}}}),Gl=new Ze({}),Sl=new W({props:{name:"class transformers.RobertaForSequenceClassification",anchor:"transformers.RobertaForSequenceClassification",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.RobertaForSequenceClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.30.0/en/model_doc/roberta#transformers.RobertaConfig">RobertaConfig</a>) &#x2014; Model configuration class with all the parameters of the
model. Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.30.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/roberta/modeling_roberta.py#L1173"}}),Ll=new W({props:{name:"forward",anchor:"transformers.RobertaForSequenceClassification.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"token_type_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"position_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"head_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"labels",val:": typing.Optional[torch.LongTensor] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.RobertaForSequenceClassification.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.30.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.30.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.RobertaForSequenceClassification.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.RobertaForSequenceClassification.forward.token_type_ids",description:`<strong>token_type_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0,1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.
This parameter can only be used when the model is initialized with <code>type_vocab_size</code> parameter with value<blockquote>
<p>= 2. All the value in this tensor should be always &lt; type_vocab_size.</p>
</blockquote></li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.RobertaForSequenceClassification.forward.position_ids",description:`<strong>position_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.RobertaForSequenceClassification.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.RobertaForSequenceClassification.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.RobertaForSequenceClassification.forward.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.RobertaForSequenceClassification.forward.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.RobertaForSequenceClassification.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.30.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.RobertaForSequenceClassification.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for computing the sequence classification/regression loss. Indices should be in <code>[0, ..., config.num_labels - 1]</code>. If <code>config.num_labels == 1</code> a regression loss is computed (Mean-Square loss), If
<code>config.num_labels &gt; 1</code> a classification loss is computed (Cross-Entropy).`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/roberta/modeling_roberta.py#L1187",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.30.0/en/main_classes/output#transformers.modeling_outputs.SequenceClassifierOutput"
>transformers.modeling_outputs.SequenceClassifierOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.30.0/en/model_doc/roberta#transformers.RobertaConfig"
>RobertaConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Classification (or regression if config.num_labels==1) loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, config.num_labels)</code>) \u2014 Classification (or regression if config.num_labels==1) scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.30.0/en/main_classes/output#transformers.modeling_outputs.SequenceClassifierOutput"
>transformers.modeling_outputs.SequenceClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Es=new ke({props:{$$slots:{default:[SI]},$$scope:{ctx:R}}}),xs=new we({props:{anchor:"transformers.RobertaForSequenceClassification.forward.example",$$slots:{default:[VI]},$$scope:{ctx:R}}}),js=new we({props:{anchor:"transformers.RobertaForSequenceClassification.forward.example-2",$$slots:{default:[XI]},$$scope:{ctx:R}}}),Ql=new Ze({}),Ol=new W({props:{name:"class transformers.RobertaForMultipleChoice",anchor:"transformers.RobertaForMultipleChoice",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.RobertaForMultipleChoice.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.30.0/en/model_doc/roberta#transformers.RobertaConfig">RobertaConfig</a>) &#x2014; Model configuration class with all the parameters of the
model. Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.30.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/roberta/modeling_roberta.py#L1274"}}),Kl=new W({props:{name:"forward",anchor:"transformers.RobertaForMultipleChoice.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"token_type_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"labels",val:": typing.Optional[torch.LongTensor] = None"},{name:"position_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"head_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.RobertaForMultipleChoice.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, num_choices, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.30.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.30.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.RobertaForMultipleChoice.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_choices, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.RobertaForMultipleChoice.forward.token_type_ids",description:`<strong>token_type_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, num_choices, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0,1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.
This parameter can only be used when the model is initialized with <code>type_vocab_size</code> parameter with value<blockquote>
<p>= 2. All the value in this tensor should be always &lt; type_vocab_size.</p>
</blockquote></li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.RobertaForMultipleChoice.forward.position_ids",description:`<strong>position_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, num_choices, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.RobertaForMultipleChoice.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.RobertaForMultipleChoice.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_choices, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.RobertaForMultipleChoice.forward.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.RobertaForMultipleChoice.forward.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.RobertaForMultipleChoice.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.30.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.RobertaForMultipleChoice.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for computing the multiple choice classification loss. Indices should be in <code>[0, ..., num_choices-1]</code> where <code>num_choices</code> is the size of the second dimension of the input tensors. (See
<code>input_ids</code> above)`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/roberta/modeling_roberta.py#L1287",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.30.0/en/main_classes/output#transformers.modeling_outputs.MultipleChoiceModelOutput"
>transformers.modeling_outputs.MultipleChoiceModelOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.30.0/en/model_doc/roberta#transformers.RobertaConfig"
>RobertaConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <em>(1,)</em>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Classification loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_choices)</code>) \u2014 <em>num_choices</em> is the second dimension of the input tensors. (see <em>input_ids</em> above).</p>
<p>Classification scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.30.0/en/main_classes/output#transformers.modeling_outputs.MultipleChoiceModelOutput"
>transformers.modeling_outputs.MultipleChoiceModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Cs=new ke({props:{$$slots:{default:[PI]},$$scope:{ctx:R}}}),zs=new we({props:{anchor:"transformers.RobertaForMultipleChoice.forward.example",$$slots:{default:[LI]},$$scope:{ctx:R}}}),ei=new Ze({}),ti=new W({props:{name:"class transformers.RobertaForTokenClassification",anchor:"transformers.RobertaForTokenClassification",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.RobertaForTokenClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.30.0/en/model_doc/roberta#transformers.RobertaConfig">RobertaConfig</a>) &#x2014; Model configuration class with all the parameters of the
model. Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.30.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/roberta/modeling_roberta.py#L1368"}}),ai=new W({props:{name:"forward",anchor:"transformers.RobertaForTokenClassification.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"token_type_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"position_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"head_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"labels",val:": typing.Optional[torch.LongTensor] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.RobertaForTokenClassification.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.30.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.30.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.RobertaForTokenClassification.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.RobertaForTokenClassification.forward.token_type_ids",description:`<strong>token_type_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0,1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.
This parameter can only be used when the model is initialized with <code>type_vocab_size</code> parameter with value<blockquote>
<p>= 2. All the value in this tensor should be always &lt; type_vocab_size.</p>
</blockquote></li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.RobertaForTokenClassification.forward.position_ids",description:`<strong>position_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.RobertaForTokenClassification.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.RobertaForTokenClassification.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.RobertaForTokenClassification.forward.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.RobertaForTokenClassification.forward.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.RobertaForTokenClassification.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.30.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.RobertaForTokenClassification.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Labels for computing the token classification loss. Indices should be in <code>[0, ..., config.num_labels - 1]</code>.`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/roberta/modeling_roberta.py#L1386",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.30.0/en/main_classes/output#transformers.modeling_outputs.TokenClassifierOutput"
>transformers.modeling_outputs.TokenClassifierOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.30.0/en/model_doc/roberta#transformers.RobertaConfig"
>RobertaConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided)  \u2014 Classification loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, config.num_labels)</code>) \u2014 Classification scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.30.0/en/main_classes/output#transformers.modeling_outputs.TokenClassifierOutput"
>transformers.modeling_outputs.TokenClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Us=new ke({props:{$$slots:{default:[QI]},$$scope:{ctx:R}}}),qs=new we({props:{anchor:"transformers.RobertaForTokenClassification.forward.example",$$slots:{default:[OI]},$$scope:{ctx:R}}}),ri=new Ze({}),li=new W({props:{name:"class transformers.RobertaForQuestionAnswering",anchor:"transformers.RobertaForQuestionAnswering",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.RobertaForQuestionAnswering.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.30.0/en/model_doc/roberta#transformers.RobertaConfig">RobertaConfig</a>) &#x2014; Model configuration class with all the parameters of the
model. Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.30.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/roberta/modeling_roberta.py#L1478"}}),pi=new W({props:{name:"forward",anchor:"transformers.RobertaForQuestionAnswering.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"token_type_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"position_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"head_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"start_positions",val:": typing.Optional[torch.LongTensor] = None"},{name:"end_positions",val:": typing.Optional[torch.LongTensor] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.RobertaForQuestionAnswering.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.30.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.30.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.RobertaForQuestionAnswering.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.RobertaForQuestionAnswering.forward.token_type_ids",description:`<strong>token_type_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0,1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.
This parameter can only be used when the model is initialized with <code>type_vocab_size</code> parameter with value<blockquote>
<p>= 2. All the value in this tensor should be always &lt; type_vocab_size.</p>
</blockquote></li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.RobertaForQuestionAnswering.forward.position_ids",description:`<strong>position_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.RobertaForQuestionAnswering.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.RobertaForQuestionAnswering.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.RobertaForQuestionAnswering.forward.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.RobertaForQuestionAnswering.forward.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.RobertaForQuestionAnswering.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.30.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.RobertaForQuestionAnswering.forward.start_positions",description:`<strong>start_positions</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for position (index) of the start of the labelled span for computing the token classification loss.
Positions are clamped to the length of the sequence (<code>sequence_length</code>). Position outside of the sequence
are not taken into account for computing the loss.`,name:"start_positions"},{anchor:"transformers.RobertaForQuestionAnswering.forward.end_positions",description:`<strong>end_positions</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for position (index) of the end of the labelled span for computing the token classification loss.
Positions are clamped to the length of the sequence (<code>sequence_length</code>). Position outside of the sequence
are not taken into account for computing the loss.`,name:"end_positions"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/roberta/modeling_roberta.py#L1492",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.30.0/en/main_classes/output#transformers.modeling_outputs.QuestionAnsweringModelOutput"
>transformers.modeling_outputs.QuestionAnsweringModelOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.30.0/en/model_doc/roberta#transformers.RobertaConfig"
>RobertaConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Total span extraction loss is the sum of a Cross-Entropy for the start and end positions.</p>
</li>
<li>
<p><strong>start_logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>) \u2014 Span-start scores (before SoftMax).</p>
</li>
<li>
<p><strong>end_logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>) \u2014 Span-end scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.30.0/en/main_classes/output#transformers.modeling_outputs.QuestionAnsweringModelOutput"
>transformers.modeling_outputs.QuestionAnsweringModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Ws=new ke({props:{$$slots:{default:[DI]},$$scope:{ctx:R}}}),Zs=new we({props:{anchor:"transformers.RobertaForQuestionAnswering.forward.example",$$slots:{default:[YI]},$$scope:{ctx:R}}}),hi=new Ze({}),ui=new W({props:{name:"class transformers.TFRobertaModel",anchor:"transformers.TFRobertaModel",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFRobertaModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.30.0/en/model_doc/roberta#transformers.RobertaConfig">RobertaConfig</a>) &#x2014; Model configuration class with all the parameters of the
model. Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.30.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/roberta/modeling_tf_roberta.py#L881"}}),Bs=new ke({props:{$$slots:{default:[HI]},$$scope:{ctx:R}}}),_i=new W({props:{name:"call",anchor:"transformers.TFRobertaModel.call",parameters:[{name:"input_ids",val:": TFModelInputType | None = None"},{name:"attention_mask",val:": np.ndarray | tf.Tensor | None = None"},{name:"token_type_ids",val:": np.ndarray | tf.Tensor | None = None"},{name:"position_ids",val:": np.ndarray | tf.Tensor | None = None"},{name:"head_mask",val:": np.ndarray | tf.Tensor | None = None"},{name:"inputs_embeds",val:": np.ndarray | tf.Tensor | None = None"},{name:"encoder_hidden_states",val:": np.ndarray | tf.Tensor | None = None"},{name:"encoder_attention_mask",val:": np.ndarray | tf.Tensor | None = None"},{name:"past_key_values",val:": Optional[Tuple[Tuple[Union[np.ndarray, tf.Tensor]]]] = None"},{name:"use_cache",val:": Optional[bool] = None"},{name:"output_attentions",val:": Optional[bool] = None"},{name:"output_hidden_states",val:": Optional[bool] = None"},{name:"return_dict",val:": Optional[bool] = None"},{name:"training",val:": Optional[bool] = False"}],parametersDescription:[{anchor:"transformers.TFRobertaModel.call.input_ids",description:`<strong>input_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.30.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.30.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.TFRobertaModel.call.attention_mask",description:`<strong>attention_mask</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.TFRobertaModel.call.token_type_ids",description:`<strong>token_type_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.TFRobertaModel.call.position_ids",description:`<strong>position_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.TFRobertaModel.call.head_mask",description:`<strong>head_mask</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.TFRobertaModel.call.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.TFRobertaModel.call.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail. This argument can be used only in eager mode, in graph mode the value in the
config will be used instead.`,name:"output_attentions"},{anchor:"transformers.TFRobertaModel.call.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail. This argument can be used only in eager mode, in graph mode the value in the config will be
used instead.`,name:"output_hidden_states"},{anchor:"transformers.TFRobertaModel.call.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.30.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.TFRobertaModel.call.training",description:`<strong>training</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to use the model in training mode (some modules like dropout modules have different
behaviors between training and evaluation).`,name:"training"},{anchor:"transformers.TFRobertaModel.call.encoder_hidden_states",description:`<strong>encoder_hidden_states</strong>  (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Sequence of hidden-states at the output of the last layer of the encoder. Used in the cross-attention if
the model is configured as a decoder.`,name:"encoder_hidden_states"},{anchor:"transformers.TFRobertaModel.call.encoder_attention_mask",description:`<strong>encoder_attention_mask</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on the padding token indices of the encoder input. This mask is used in
the cross-attention if the model is configured as a decoder. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>`,name:"encoder_attention_mask"},{anchor:"transformers.TFRobertaModel.call.past_key_values",description:`<strong>past_key_values</strong> (<code>Tuple[Tuple[tf.Tensor]]</code> of length <code>config.n_layers</code>) &#x2014;
contains precomputed key and value hidden states of the attention blocks. Can be used to speed up decoding.
If <code>past_key_values</code> are used, the user can optionally input only the last <code>decoder_input_ids</code> (those that
don&#x2019;t have their past key value states given to this model) of shape <code>(batch_size, 1)</code> instead of all
<code>decoder_input_ids</code> of shape <code>(batch_size, sequence_length)</code>.`,name:"past_key_values"},{anchor:"transformers.TFRobertaModel.call.use_cache",description:`<strong>use_cache</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
If set to <code>True</code>, <code>past_key_values</code> key value states are returned and can be used to speed up decoding (see
<code>past_key_values</code>). Set to <code>False</code> during training, <code>True</code> during generation`,name:"use_cache"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/roberta/modeling_tf_roberta.py#L886",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.30.0/en/main_classes/output#transformers.modeling_tf_outputs.TFBaseModelOutputWithPoolingAndCrossAttentions"
>transformers.modeling_tf_outputs.TFBaseModelOutputWithPoolingAndCrossAttentions</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/v4.30.0/en/model_doc/roberta#transformers.RobertaConfig"
>RobertaConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>last_hidden_state</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>) \u2014 Sequence of hidden-states at the output of the last layer of the model.</p>
</li>
<li>
<p><strong>pooler_output</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, hidden_size)</code>) \u2014 Last layer hidden-state of the first token of the sequence (classification token) further processed by a
Linear layer and a Tanh activation function. The Linear layer weights are trained from the next sentence
prediction (classification) objective during pretraining.</p>
<p>This output is usually <em>not</em> a good summary of the semantic content of the input, you\u2019re often better with
averaging or pooling the sequence of hidden-states for the whole input sequence.</p>
</li>
<li>
<p><strong>past_key_values</strong> (<code>List[tf.Tensor]</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) \u2014 List of <code>tf.Tensor</code> of length <code>config.n_layers</code>, with each tensor of shape <code>(2, batch_size, num_heads, sequence_length, embed_size_per_head)</code>).</p>
<p>Contains pre-computed hidden-states (key and values in the attention blocks) that can be used (see
<code>past_key_values</code> input) to speed up sequential decoding.</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
<li>
<p><strong>cross_attentions</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights of the decoder\u2019s cross-attention layer, after the attention softmax, used to compute the
weighted average in the cross-attention heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.30.0/en/main_classes/output#transformers.modeling_tf_outputs.TFBaseModelOutputWithPoolingAndCrossAttentions"
>transformers.modeling_tf_outputs.TFBaseModelOutputWithPoolingAndCrossAttentions</a> or <code>tuple(tf.Tensor)</code></p>
`}}),Gs=new ke({props:{$$slots:{default:[KI]},$$scope:{ctx:R}}}),Ss=new we({props:{anchor:"transformers.TFRobertaModel.call.example",$$slots:{default:[e5]},$$scope:{ctx:R}}}),bi=new Ze({}),yi=new W({props:{name:"class transformers.TFRobertaForCausalLM",anchor:"transformers.TFRobertaForCausalLM",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/roberta/modeling_tf_roberta.py#L1080"}}),vi=new W({props:{name:"call",anchor:"transformers.TFRobertaForCausalLM.call",parameters:[{name:"input_ids",val:": TFModelInputType | None = None"},{name:"attention_mask",val:": np.ndarray | tf.Tensor | None = None"},{name:"token_type_ids",val:": np.ndarray | tf.Tensor | None = None"},{name:"position_ids",val:": np.ndarray | tf.Tensor | None = None"},{name:"head_mask",val:": np.ndarray | tf.Tensor | None = None"},{name:"inputs_embeds",val:": np.ndarray | tf.Tensor | None = None"},{name:"encoder_hidden_states",val:": np.ndarray | tf.Tensor | None = None"},{name:"encoder_attention_mask",val:": np.ndarray | tf.Tensor | None = None"},{name:"past_key_values",val:": Optional[Tuple[Tuple[Union[np.ndarray, tf.Tensor]]]] = None"},{name:"use_cache",val:": Optional[bool] = None"},{name:"output_attentions",val:": Optional[bool] = None"},{name:"output_hidden_states",val:": Optional[bool] = None"},{name:"return_dict",val:": Optional[bool] = None"},{name:"labels",val:": np.ndarray | tf.Tensor | None = None"},{name:"training",val:": Optional[bool] = False"}],parametersDescription:[{anchor:"transformers.TFRobertaForCausalLM.call.input_ids",description:`<strong>input_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.30.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.30.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.TFRobertaForCausalLM.call.attention_mask",description:`<strong>attention_mask</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.TFRobertaForCausalLM.call.token_type_ids",description:`<strong>token_type_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.TFRobertaForCausalLM.call.position_ids",description:`<strong>position_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.TFRobertaForCausalLM.call.head_mask",description:`<strong>head_mask</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.TFRobertaForCausalLM.call.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.TFRobertaForCausalLM.call.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail. This argument can be used only in eager mode, in graph mode the value in the
config will be used instead.`,name:"output_attentions"},{anchor:"transformers.TFRobertaForCausalLM.call.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail. This argument can be used only in eager mode, in graph mode the value in the config will be
used instead.`,name:"output_hidden_states"},{anchor:"transformers.TFRobertaForCausalLM.call.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.30.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.TFRobertaForCausalLM.call.training",description:`<strong>training</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to use the model in training mode (some modules like dropout modules have different
behaviors between training and evaluation).`,name:"training"},{anchor:"transformers.TFRobertaForCausalLM.call.encoder_hidden_states",description:`<strong>encoder_hidden_states</strong>  (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Sequence of hidden-states at the output of the last layer of the encoder. Used in the cross-attention if
the model is configured as a decoder.`,name:"encoder_hidden_states"},{anchor:"transformers.TFRobertaForCausalLM.call.encoder_attention_mask",description:`<strong>encoder_attention_mask</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on the padding token indices of the encoder input. This mask is used in
the cross-attention if the model is configured as a decoder. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>`,name:"encoder_attention_mask"},{anchor:"transformers.TFRobertaForCausalLM.call.past_key_values",description:`<strong>past_key_values</strong> (<code>Tuple[Tuple[tf.Tensor]]</code> of length <code>config.n_layers</code>) &#x2014;
contains precomputed key and value hidden states of the attention blocks. Can be used to speed up decoding.
If <code>past_key_values</code> are used, the user can optionally input only the last <code>decoder_input_ids</code> (those that
don&#x2019;t have their past key value states given to this model) of shape <code>(batch_size, 1)</code> instead of all
<code>decoder_input_ids</code> of shape <code>(batch_size, sequence_length)</code>.`,name:"past_key_values"},{anchor:"transformers.TFRobertaForCausalLM.call.use_cache",description:`<strong>use_cache</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
If set to <code>True</code>, <code>past_key_values</code> key value states are returned and can be used to speed up decoding (see
<code>past_key_values</code>). Set to <code>False</code> during training, <code>True</code> during generation`,name:"use_cache"},{anchor:"transformers.TFRobertaForCausalLM.call.labels",description:`<strong>labels</strong> (<code>tf.Tensor</code> or <code>np.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Labels for computing the cross entropy classification loss. Indices should be in <code>[0, ..., config.vocab_size - 1]</code>.`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/roberta/modeling_tf_roberta.py#L1113",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.30.0/en/main_classes/output#transformers.modeling_tf_outputs.TFCausalLMOutputWithCrossAttentions"
>transformers.modeling_tf_outputs.TFCausalLMOutputWithCrossAttentions</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/v4.30.0/en/model_doc/roberta#transformers.RobertaConfig"
>RobertaConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>tf.Tensor</code> of shape <code>(n,)</code>, <em>optional</em>, where n is the number of non-masked labels, returned when <code>labels</code> is provided) \u2014 Language modeling loss (for next-token prediction).</p>
</li>
<li>
<p><strong>logits</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, config.vocab_size)</code>) \u2014 Prediction scores of the language modeling head (scores for each vocabulary token before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
<li>
<p><strong>cross_attentions</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights of the decoder\u2019s cross-attention layer, after the attention softmax, used to compute the
weighted average in the cross-attention heads.</p>
</li>
<li>
<p><strong>past_key_values</strong> (<code>List[tf.Tensor]</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) \u2014 List of <code>tf.Tensor</code> of length <code>config.n_layers</code>, with each tensor of shape <code>(2, batch_size, num_heads, sequence_length, embed_size_per_head)</code>).</p>
<p>Contains pre-computed hidden-states (key and values in the attention blocks) that can be used (see
<code>past_key_values</code> input) to speed up sequential decoding.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.30.0/en/main_classes/output#transformers.modeling_tf_outputs.TFCausalLMOutputWithCrossAttentions"
>transformers.modeling_tf_outputs.TFCausalLMOutputWithCrossAttentions</a> or <code>tuple(tf.Tensor)</code></p>
`}}),Xs=new ke({props:{$$slots:{default:[t5]},$$scope:{ctx:R}}}),Ps=new we({props:{anchor:"transformers.TFRobertaForCausalLM.call.example",$$slots:{default:[o5]},$$scope:{ctx:R}}}),Ti=new Ze({}),ki=new W({props:{name:"class transformers.TFRobertaForMaskedLM",anchor:"transformers.TFRobertaForMaskedLM",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFRobertaForMaskedLM.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.30.0/en/model_doc/roberta#transformers.RobertaConfig">RobertaConfig</a>) &#x2014; Model configuration class with all the parameters of the
model. Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.30.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/roberta/modeling_tf_roberta.py#L1003"}}),Qs=new ke({props:{$$slots:{default:[n5]},$$scope:{ctx:R}}}),Ri=new W({props:{name:"call",anchor:"transformers.TFRobertaForMaskedLM.call",parameters:[{name:"input_ids",val:": TFModelInputType | None = None"},{name:"attention_mask",val:": np.ndarray | tf.Tensor | None = None"},{name:"token_type_ids",val:": np.ndarray | tf.Tensor | None = None"},{name:"position_ids",val:": np.ndarray | tf.Tensor | None = None"},{name:"head_mask",val:": np.ndarray | tf.Tensor | None = None"},{name:"inputs_embeds",val:": np.ndarray | tf.Tensor | None = None"},{name:"output_attentions",val:": Optional[bool] = None"},{name:"output_hidden_states",val:": Optional[bool] = None"},{name:"return_dict",val:": Optional[bool] = None"},{name:"labels",val:": np.ndarray | tf.Tensor | None = None"},{name:"training",val:": Optional[bool] = False"}],parametersDescription:[{anchor:"transformers.TFRobertaForMaskedLM.call.input_ids",description:`<strong>input_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.30.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.30.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.TFRobertaForMaskedLM.call.attention_mask",description:`<strong>attention_mask</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.TFRobertaForMaskedLM.call.token_type_ids",description:`<strong>token_type_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.TFRobertaForMaskedLM.call.position_ids",description:`<strong>position_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.TFRobertaForMaskedLM.call.head_mask",description:`<strong>head_mask</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.TFRobertaForMaskedLM.call.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.TFRobertaForMaskedLM.call.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail. This argument can be used only in eager mode, in graph mode the value in the
config will be used instead.`,name:"output_attentions"},{anchor:"transformers.TFRobertaForMaskedLM.call.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail. This argument can be used only in eager mode, in graph mode the value in the config will be
used instead.`,name:"output_hidden_states"},{anchor:"transformers.TFRobertaForMaskedLM.call.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.30.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.TFRobertaForMaskedLM.call.training",description:`<strong>training</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to use the model in training mode (some modules like dropout modules have different
behaviors between training and evaluation).`,name:"training"},{anchor:"transformers.TFRobertaForMaskedLM.call.labels",description:`<strong>labels</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Labels for computing the masked language modeling loss. Indices should be in <code>[-100, 0, ..., config.vocab_size]</code> (see <code>input_ids</code> docstring) Tokens with indices set to <code>-100</code> are ignored (masked), the
loss is only computed for the tokens with labels in <code>[0, ..., config.vocab_size]</code>`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/roberta/modeling_tf_roberta.py#L1020",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.30.0/en/main_classes/output#transformers.modeling_tf_outputs.TFMaskedLMOutput"
>transformers.modeling_tf_outputs.TFMaskedLMOutput</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/v4.30.0/en/model_doc/roberta#transformers.RobertaConfig"
>RobertaConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>tf.Tensor</code> of shape <code>(n,)</code>, <em>optional</em>, where n is the number of non-masked labels, returned when <code>labels</code> is provided) \u2014 Masked language modeling (MLM) loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, config.vocab_size)</code>) \u2014 Prediction scores of the language modeling head (scores for each vocabulary token before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.30.0/en/main_classes/output#transformers.modeling_tf_outputs.TFMaskedLMOutput"
>transformers.modeling_tf_outputs.TFMaskedLMOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),Os=new ke({props:{$$slots:{default:[s5]},$$scope:{ctx:R}}}),Ds=new we({props:{anchor:"transformers.TFRobertaForMaskedLM.call.example",$$slots:{default:[a5]},$$scope:{ctx:R}}}),Ys=new we({props:{anchor:"transformers.TFRobertaForMaskedLM.call.example-2",$$slots:{default:[r5]},$$scope:{ctx:R}}}),Ei=new Ze({}),xi=new W({props:{name:"class transformers.TFRobertaForSequenceClassification",anchor:"transformers.TFRobertaForSequenceClassification",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFRobertaForSequenceClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.30.0/en/model_doc/roberta#transformers.RobertaConfig">RobertaConfig</a>) &#x2014; Model configuration class with all the parameters of the
model. Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.30.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/roberta/modeling_tf_roberta.py#L1237"}}),Ks=new ke({props:{$$slots:{default:[l5]},$$scope:{ctx:R}}}),zi=new W({props:{name:"call",anchor:"transformers.TFRobertaForSequenceClassification.call",parameters:[{name:"input_ids",val:": TFModelInputType | None = None"},{name:"attention_mask",val:": np.ndarray | tf.Tensor | None = None"},{name:"token_type_ids",val:": np.ndarray | tf.Tensor | None = None"},{name:"position_ids",val:": np.ndarray | tf.Tensor | None = None"},{name:"head_mask",val:": np.ndarray | tf.Tensor | None = None"},{name:"inputs_embeds",val:": np.ndarray | tf.Tensor | None = None"},{name:"output_attentions",val:": Optional[bool] = None"},{name:"output_hidden_states",val:": Optional[bool] = None"},{name:"return_dict",val:": Optional[bool] = None"},{name:"labels",val:": np.ndarray | tf.Tensor | None = None"},{name:"training",val:": Optional[bool] = False"}],parametersDescription:[{anchor:"transformers.TFRobertaForSequenceClassification.call.input_ids",description:`<strong>input_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.30.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.30.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.TFRobertaForSequenceClassification.call.attention_mask",description:`<strong>attention_mask</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.TFRobertaForSequenceClassification.call.token_type_ids",description:`<strong>token_type_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.TFRobertaForSequenceClassification.call.position_ids",description:`<strong>position_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.TFRobertaForSequenceClassification.call.head_mask",description:`<strong>head_mask</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.TFRobertaForSequenceClassification.call.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.TFRobertaForSequenceClassification.call.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail. This argument can be used only in eager mode, in graph mode the value in the
config will be used instead.`,name:"output_attentions"},{anchor:"transformers.TFRobertaForSequenceClassification.call.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail. This argument can be used only in eager mode, in graph mode the value in the config will be
used instead.`,name:"output_hidden_states"},{anchor:"transformers.TFRobertaForSequenceClassification.call.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.30.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.TFRobertaForSequenceClassification.call.training",description:`<strong>training</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to use the model in training mode (some modules like dropout modules have different
behaviors between training and evaluation).`,name:"training"},{anchor:"transformers.TFRobertaForSequenceClassification.call.labels",description:`<strong>labels</strong> (<code>tf.Tensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for computing the sequence classification/regression loss. Indices should be in <code>[0, ..., config.num_labels - 1]</code>. If <code>config.num_labels == 1</code> a regression loss is computed (Mean-Square loss), If
<code>config.num_labels &gt; 1</code> a classification loss is computed (Cross-Entropy).`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/roberta/modeling_tf_roberta.py#L1248",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.30.0/en/main_classes/output#transformers.modeling_tf_outputs.TFSequenceClassifierOutput"
>transformers.modeling_tf_outputs.TFSequenceClassifierOutput</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/v4.30.0/en/model_doc/roberta#transformers.RobertaConfig"
>RobertaConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, )</code>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Classification (or regression if config.num_labels==1) loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, config.num_labels)</code>) \u2014 Classification (or regression if config.num_labels==1) scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.30.0/en/main_classes/output#transformers.modeling_tf_outputs.TFSequenceClassifierOutput"
>transformers.modeling_tf_outputs.TFSequenceClassifierOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),ea=new ke({props:{$$slots:{default:[i5]},$$scope:{ctx:R}}}),ta=new we({props:{anchor:"transformers.TFRobertaForSequenceClassification.call.example",$$slots:{default:[d5]},$$scope:{ctx:R}}}),oa=new we({props:{anchor:"transformers.TFRobertaForSequenceClassification.call.example-2",$$slots:{default:[c5]},$$scope:{ctx:R}}}),Ii=new Ze({}),Ui=new W({props:{name:"class transformers.TFRobertaForMultipleChoice",anchor:"transformers.TFRobertaForMultipleChoice",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFRobertaForMultipleChoice.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.30.0/en/model_doc/roberta#transformers.RobertaConfig">RobertaConfig</a>) &#x2014; Model configuration class with all the parameters of the
model. Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.30.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/roberta/modeling_tf_roberta.py#L1313"}}),sa=new ke({props:{$$slots:{default:[p5]},$$scope:{ctx:R}}}),Zi=new W({props:{name:"call",anchor:"transformers.TFRobertaForMultipleChoice.call",parameters:[{name:"input_ids",val:": TFModelInputType | None = None"},{name:"attention_mask",val:": np.ndarray | tf.Tensor | None = None"},{name:"token_type_ids",val:": np.ndarray | tf.Tensor | None = None"},{name:"position_ids",val:": np.ndarray | tf.Tensor | None = None"},{name:"head_mask",val:": np.ndarray | tf.Tensor | None = None"},{name:"inputs_embeds",val:": np.ndarray | tf.Tensor | None = None"},{name:"output_attentions",val:": Optional[bool] = None"},{name:"output_hidden_states",val:": Optional[bool] = None"},{name:"return_dict",val:": Optional[bool] = None"},{name:"labels",val:": np.ndarray | tf.Tensor | None = None"},{name:"training",val:": Optional[bool] = False"}],parametersDescription:[{anchor:"transformers.TFRobertaForMultipleChoice.call.input_ids",description:`<strong>input_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, num_choices, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.30.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.30.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.TFRobertaForMultipleChoice.call.attention_mask",description:`<strong>attention_mask</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, num_choices, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.TFRobertaForMultipleChoice.call.token_type_ids",description:`<strong>token_type_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, num_choices, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.TFRobertaForMultipleChoice.call.position_ids",description:`<strong>position_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, num_choices, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.TFRobertaForMultipleChoice.call.head_mask",description:`<strong>head_mask</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.TFRobertaForMultipleChoice.call.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, num_choices, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.TFRobertaForMultipleChoice.call.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail. This argument can be used only in eager mode, in graph mode the value in the
config will be used instead.`,name:"output_attentions"},{anchor:"transformers.TFRobertaForMultipleChoice.call.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail. This argument can be used only in eager mode, in graph mode the value in the config will be
used instead.`,name:"output_hidden_states"},{anchor:"transformers.TFRobertaForMultipleChoice.call.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.30.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.TFRobertaForMultipleChoice.call.training",description:`<strong>training</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to use the model in training mode (some modules like dropout modules have different
behaviors between training and evaluation).`,name:"training"},{anchor:"transformers.TFRobertaForMultipleChoice.call.labels",description:`<strong>labels</strong> (<code>tf.Tensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for computing the multiple choice classification loss. Indices should be in <code>[0, ..., num_choices]</code>
where <code>num_choices</code> is the size of the second dimension of the input tensors. (See <code>input_ids</code> above)`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/roberta/modeling_tf_roberta.py#L1327",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.30.0/en/main_classes/output#transformers.modeling_tf_outputs.TFMultipleChoiceModelOutput"
>transformers.modeling_tf_outputs.TFMultipleChoiceModelOutput</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/v4.30.0/en/model_doc/roberta#transformers.RobertaConfig"
>RobertaConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>tf.Tensor</code> of shape <em>(batch_size, )</em>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Classification loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, num_choices)</code>) \u2014 <em>num_choices</em> is the second dimension of the input tensors. (see <em>input_ids</em> above).</p>
<p>Classification scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.30.0/en/main_classes/output#transformers.modeling_tf_outputs.TFMultipleChoiceModelOutput"
>transformers.modeling_tf_outputs.TFMultipleChoiceModelOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),aa=new ke({props:{$$slots:{default:[h5]},$$scope:{ctx:R}}}),ra=new we({props:{anchor:"transformers.TFRobertaForMultipleChoice.call.example",$$slots:{default:[u5]},$$scope:{ctx:R}}}),Ai=new Ze({}),Bi=new W({props:{name:"class transformers.TFRobertaForTokenClassification",anchor:"transformers.TFRobertaForTokenClassification",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFRobertaForTokenClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.30.0/en/model_doc/roberta#transformers.RobertaConfig">RobertaConfig</a>) &#x2014; Model configuration class with all the parameters of the
model. Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.30.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/roberta/modeling_tf_roberta.py#L1403"}}),ia=new ke({props:{$$slots:{default:[m5]},$$scope:{ctx:R}}}),Xi=new W({props:{name:"call",anchor:"transformers.TFRobertaForTokenClassification.call",parameters:[{name:"input_ids",val:": TFModelInputType | None = None"},{name:"attention_mask",val:": np.ndarray | tf.Tensor | None = None"},{name:"token_type_ids",val:": np.ndarray | tf.Tensor | None = None"},{name:"position_ids",val:": np.ndarray | tf.Tensor | None = None"},{name:"head_mask",val:": np.ndarray | tf.Tensor | None = None"},{name:"inputs_embeds",val:": np.ndarray | tf.Tensor | None = None"},{name:"output_attentions",val:": Optional[bool] = None"},{name:"output_hidden_states",val:": Optional[bool] = None"},{name:"return_dict",val:": Optional[bool] = None"},{name:"labels",val:": np.ndarray | tf.Tensor | None = None"},{name:"training",val:": Optional[bool] = False"}],parametersDescription:[{anchor:"transformers.TFRobertaForTokenClassification.call.input_ids",description:`<strong>input_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.30.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.30.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.TFRobertaForTokenClassification.call.attention_mask",description:`<strong>attention_mask</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.TFRobertaForTokenClassification.call.token_type_ids",description:`<strong>token_type_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.TFRobertaForTokenClassification.call.position_ids",description:`<strong>position_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.TFRobertaForTokenClassification.call.head_mask",description:`<strong>head_mask</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.TFRobertaForTokenClassification.call.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.TFRobertaForTokenClassification.call.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail. This argument can be used only in eager mode, in graph mode the value in the
config will be used instead.`,name:"output_attentions"},{anchor:"transformers.TFRobertaForTokenClassification.call.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail. This argument can be used only in eager mode, in graph mode the value in the config will be
used instead.`,name:"output_hidden_states"},{anchor:"transformers.TFRobertaForTokenClassification.call.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.30.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.TFRobertaForTokenClassification.call.training",description:`<strong>training</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to use the model in training mode (some modules like dropout modules have different
behaviors between training and evaluation).`,name:"training"},{anchor:"transformers.TFRobertaForTokenClassification.call.labels",description:`<strong>labels</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Labels for computing the token classification loss. Indices should be in <code>[0, ..., config.num_labels - 1]</code>.`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/roberta/modeling_tf_roberta.py#L1421",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.30.0/en/main_classes/output#transformers.modeling_tf_outputs.TFTokenClassifierOutput"
>transformers.modeling_tf_outputs.TFTokenClassifierOutput</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/v4.30.0/en/model_doc/roberta#transformers.RobertaConfig"
>RobertaConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>tf.Tensor</code> of shape <code>(n,)</code>, <em>optional</em>, where n is the number of unmasked labels, returned when <code>labels</code> is provided)  \u2014 Classification loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, config.num_labels)</code>) \u2014 Classification scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.30.0/en/main_classes/output#transformers.modeling_tf_outputs.TFTokenClassifierOutput"
>transformers.modeling_tf_outputs.TFTokenClassifierOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),da=new ke({props:{$$slots:{default:[f5]},$$scope:{ctx:R}}}),ca=new we({props:{anchor:"transformers.TFRobertaForTokenClassification.call.example",$$slots:{default:[g5]},$$scope:{ctx:R}}}),pa=new we({props:{anchor:"transformers.TFRobertaForTokenClassification.call.example-2",$$slots:{default:[_5]},$$scope:{ctx:R}}}),Pi=new Ze({}),Li=new W({props:{name:"class transformers.TFRobertaForQuestionAnswering",anchor:"transformers.TFRobertaForQuestionAnswering",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFRobertaForQuestionAnswering.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.30.0/en/model_doc/roberta#transformers.RobertaConfig">RobertaConfig</a>) &#x2014; Model configuration class with all the parameters of the
model. Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.30.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/roberta/modeling_tf_roberta.py#L1486"}}),ua=new ke({props:{$$slots:{default:[b5]},$$scope:{ctx:R}}}),Yi=new W({props:{name:"call",anchor:"transformers.TFRobertaForQuestionAnswering.call",parameters:[{name:"input_ids",val:": TFModelInputType | None = None"},{name:"attention_mask",val:": np.ndarray | tf.Tensor | None = None"},{name:"token_type_ids",val:": np.ndarray | tf.Tensor | None = None"},{name:"position_ids",val:": np.ndarray | tf.Tensor | None = None"},{name:"head_mask",val:": np.ndarray | tf.Tensor | None = None"},{name:"inputs_embeds",val:": np.ndarray | tf.Tensor | None = None"},{name:"output_attentions",val:": Optional[bool] = None"},{name:"output_hidden_states",val:": Optional[bool] = None"},{name:"return_dict",val:": Optional[bool] = None"},{name:"start_positions",val:": np.ndarray | tf.Tensor | None = None"},{name:"end_positions",val:": np.ndarray | tf.Tensor | None = None"},{name:"training",val:": Optional[bool] = False"}],parametersDescription:[{anchor:"transformers.TFRobertaForQuestionAnswering.call.input_ids",description:`<strong>input_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.30.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.30.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.TFRobertaForQuestionAnswering.call.attention_mask",description:`<strong>attention_mask</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.TFRobertaForQuestionAnswering.call.token_type_ids",description:`<strong>token_type_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.TFRobertaForQuestionAnswering.call.position_ids",description:`<strong>position_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.TFRobertaForQuestionAnswering.call.head_mask",description:`<strong>head_mask</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.TFRobertaForQuestionAnswering.call.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.TFRobertaForQuestionAnswering.call.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail. This argument can be used only in eager mode, in graph mode the value in the
config will be used instead.`,name:"output_attentions"},{anchor:"transformers.TFRobertaForQuestionAnswering.call.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail. This argument can be used only in eager mode, in graph mode the value in the config will be
used instead.`,name:"output_hidden_states"},{anchor:"transformers.TFRobertaForQuestionAnswering.call.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.30.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.TFRobertaForQuestionAnswering.call.training",description:`<strong>training</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to use the model in training mode (some modules like dropout modules have different
behaviors between training and evaluation).`,name:"training"},{anchor:"transformers.TFRobertaForQuestionAnswering.call.start_positions",description:`<strong>start_positions</strong> (<code>tf.Tensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for position (index) of the start of the labelled span for computing the token classification loss.
Positions are clamped to the length of the sequence (<code>sequence_length</code>). Position outside of the sequence
are not taken into account for computing the loss.`,name:"start_positions"},{anchor:"transformers.TFRobertaForQuestionAnswering.call.end_positions",description:`<strong>end_positions</strong> (<code>tf.Tensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for position (index) of the end of the labelled span for computing the token classification loss.
Positions are clamped to the length of the sequence (<code>sequence_length</code>). Position outside of the sequence
are not taken into account for computing the loss.`,name:"end_positions"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/roberta/modeling_tf_roberta.py#L1499",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.30.0/en/main_classes/output#transformers.modeling_tf_outputs.TFQuestionAnsweringModelOutput"
>transformers.modeling_tf_outputs.TFQuestionAnsweringModelOutput</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/v4.30.0/en/model_doc/roberta#transformers.RobertaConfig"
>RobertaConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, )</code>, <em>optional</em>, returned when <code>start_positions</code> and <code>end_positions</code> are provided) \u2014 Total span extraction loss is the sum of a Cross-Entropy for the start and end positions.</p>
</li>
<li>
<p><strong>start_logits</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>) \u2014 Span-start scores (before SoftMax).</p>
</li>
<li>
<p><strong>end_logits</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>) \u2014 Span-end scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.30.0/en/main_classes/output#transformers.modeling_tf_outputs.TFQuestionAnsweringModelOutput"
>transformers.modeling_tf_outputs.TFQuestionAnsweringModelOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),ma=new ke({props:{$$slots:{default:[y5]},$$scope:{ctx:R}}}),fa=new we({props:{anchor:"transformers.TFRobertaForQuestionAnswering.call.example",$$slots:{default:[v5]},$$scope:{ctx:R}}}),ga=new we({props:{anchor:"transformers.TFRobertaForQuestionAnswering.call.example-2",$$slots:{default:[T5]},$$scope:{ctx:R}}}),Hi=new Ze({}),Ki=new W({props:{name:"class transformers.FlaxRobertaModel",anchor:"transformers.FlaxRobertaModel",parameters:[{name:"config",val:": RobertaConfig"},{name:"input_shape",val:": typing.Tuple = (1, 1)"},{name:"seed",val:": int = 0"},{name:"dtype",val:": dtype = <class 'jax.numpy.float32'>"},{name:"_do_init",val:": bool = True"},{name:"gradient_checkpointing",val:": bool = False"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.FlaxRobertaModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.30.0/en/model_doc/roberta#transformers.RobertaConfig">RobertaConfig</a>) &#x2014; Model configuration class with all the parameters of the
model. Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.30.0/en/main_classes/model#transformers.FlaxPreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/roberta/modeling_flax_roberta.py#L990"}}),ld=new W({props:{name:"__call__",anchor:"transformers.FlaxRobertaModel.__call__",parameters:[{name:"input_ids",val:""},{name:"attention_mask",val:" = None"},{name:"token_type_ids",val:" = None"},{name:"position_ids",val:" = None"},{name:"head_mask",val:" = None"},{name:"encoder_hidden_states",val:" = None"},{name:"encoder_attention_mask",val:" = None"},{name:"params",val:": dict = None"},{name:"dropout_rng",val:": PRNGKey = None"},{name:"train",val:": bool = False"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"},{name:"past_key_values",val:": dict = None"}],parametersDescription:[{anchor:"transformers.FlaxRobertaModel.__call__.input_ids",description:`<strong>input_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.30.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.30.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.FlaxRobertaModel.__call__.attention_mask",description:`<strong>attention_mask</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.FlaxRobertaModel.__call__.token_type_ids",description:`<strong>token_type_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.FlaxRobertaModel.__call__.position_ids",description:`<strong>position_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.`,name:"position_ids"},{anchor:"transformers.FlaxRobertaModel.__call__.head_mask",description:`<strong>head_mask</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <code>optional) -- Mask to nullify selected heads of the attention modules. Mask values selected in </code>[0, 1]\`:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.FlaxRobertaModel.__call__.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.30.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/roberta/modeling_flax_roberta.py#L816",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.30.0/en/main_classes/output#transformers.modeling_flax_outputs.FlaxBaseModelOutputWithPooling"
>transformers.modeling_flax_outputs.FlaxBaseModelOutputWithPooling</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.30.0/en/model_doc/roberta#transformers.RobertaConfig"
>RobertaConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>last_hidden_state</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>) \u2014 Sequence of hidden-states at the output of the last layer of the model.</p>
</li>
<li>
<p><strong>pooler_output</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, hidden_size)</code>) \u2014 Last layer hidden-state of the first token of the sequence (classification token) further processed by a
Linear layer and a Tanh activation function. The Linear layer weights are trained from the next sentence
prediction (classification) objective during pretraining.</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.30.0/en/main_classes/output#transformers.modeling_flax_outputs.FlaxBaseModelOutputWithPooling"
>transformers.modeling_flax_outputs.FlaxBaseModelOutputWithPooling</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),ba=new ke({props:{$$slots:{default:[k5]},$$scope:{ctx:R}}}),ya=new we({props:{anchor:"transformers.FlaxRobertaModel.__call__.example",$$slots:{default:[w5]},$$scope:{ctx:R}}}),id=new Ze({}),dd=new W({props:{name:"class transformers.FlaxRobertaForCausalLM",anchor:"transformers.FlaxRobertaForCausalLM",parameters:[{name:"config",val:": RobertaConfig"},{name:"input_shape",val:": typing.Tuple = (1, 1)"},{name:"seed",val:": int = 0"},{name:"dtype",val:": dtype = <class 'jax.numpy.float32'>"},{name:"_do_init",val:": bool = True"},{name:"gradient_checkpointing",val:": bool = False"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.FlaxRobertaForCausalLM.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.30.0/en/model_doc/roberta#transformers.RobertaConfig">RobertaConfig</a>) &#x2014; Model configuration class with all the parameters of the
model. Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.30.0/en/main_classes/model#transformers.FlaxPreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/roberta/modeling_flax_roberta.py#L1452"}}),_d=new W({props:{name:"__call__",anchor:"transformers.FlaxRobertaForCausalLM.__call__",parameters:[{name:"input_ids",val:""},{name:"attention_mask",val:" = None"},{name:"token_type_ids",val:" = None"},{name:"position_ids",val:" = None"},{name:"head_mask",val:" = None"},{name:"encoder_hidden_states",val:" = None"},{name:"encoder_attention_mask",val:" = None"},{name:"params",val:": dict = None"},{name:"dropout_rng",val:": PRNGKey = None"},{name:"train",val:": bool = False"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"},{name:"past_key_values",val:": dict = None"}],parametersDescription:[{anchor:"transformers.FlaxRobertaForCausalLM.__call__.input_ids",description:`<strong>input_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.30.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.30.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.FlaxRobertaForCausalLM.__call__.attention_mask",description:`<strong>attention_mask</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.FlaxRobertaForCausalLM.__call__.token_type_ids",description:`<strong>token_type_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.FlaxRobertaForCausalLM.__call__.position_ids",description:`<strong>position_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.`,name:"position_ids"},{anchor:"transformers.FlaxRobertaForCausalLM.__call__.head_mask",description:`<strong>head_mask</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <code>optional) -- Mask to nullify selected heads of the attention modules. Mask values selected in </code>[0, 1]\`:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.FlaxRobertaForCausalLM.__call__.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.30.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/roberta/modeling_flax_roberta.py#L816",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.30.0/en/main_classes/output#transformers.modeling_flax_outputs.FlaxCausalLMOutputWithCrossAttentions"
>transformers.modeling_flax_outputs.FlaxCausalLMOutputWithCrossAttentions</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.30.0/en/model_doc/roberta#transformers.RobertaConfig"
>RobertaConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>logits</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, sequence_length, config.vocab_size)</code>) \u2014 Prediction scores of the language modeling head (scores for each vocabulary token before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
<li>
<p><strong>cross_attentions</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Cross attentions weights after the attention softmax, used to compute the weighted average in the
cross-attention heads.</p>
</li>
<li>
<p><strong>past_key_values</strong> (<code>tuple(tuple(jnp.ndarray))</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> tuples of length <code>config.n_layers</code>, with each tuple containing the cached key, value
states of the self-attention and the cross-attention layers if model is used in encoder-decoder setting.
Only relevant if <code>config.is_decoder = True</code>.</p>
<p>Contains pre-computed hidden-states (key and values in the attention blocks) that can be used (see
<code>past_key_values</code> input) to speed up sequential decoding.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.30.0/en/main_classes/output#transformers.modeling_flax_outputs.FlaxCausalLMOutputWithCrossAttentions"
>transformers.modeling_flax_outputs.FlaxCausalLMOutputWithCrossAttentions</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Ta=new ke({props:{$$slots:{default:[M5]},$$scope:{ctx:R}}}),ka=new we({props:{anchor:"transformers.FlaxRobertaForCausalLM.__call__.example",$$slots:{default:[$5]},$$scope:{ctx:R}}}),bd=new Ze({}),yd=new W({props:{name:"class transformers.FlaxRobertaForMaskedLM",anchor:"transformers.FlaxRobertaForMaskedLM",parameters:[{name:"config",val:": RobertaConfig"},{name:"input_shape",val:": typing.Tuple = (1, 1)"},{name:"seed",val:": int = 0"},{name:"dtype",val:": dtype = <class 'jax.numpy.float32'>"},{name:"_do_init",val:": bool = True"},{name:"gradient_checkpointing",val:": bool = False"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.FlaxRobertaForMaskedLM.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.30.0/en/model_doc/roberta#transformers.RobertaConfig">RobertaConfig</a>) &#x2014; Model configuration class with all the parameters of the
model. Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.30.0/en/main_classes/model#transformers.FlaxPreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/roberta/modeling_flax_roberta.py#L1056"}}),Ed=new W({props:{name:"__call__",anchor:"transformers.FlaxRobertaForMaskedLM.__call__",parameters:[{name:"input_ids",val:""},{name:"attention_mask",val:" = None"},{name:"token_type_ids",val:" = None"},{name:"position_ids",val:" = None"},{name:"head_mask",val:" = None"},{name:"encoder_hidden_states",val:" = None"},{name:"encoder_attention_mask",val:" = None"},{name:"params",val:": dict = None"},{name:"dropout_rng",val:": PRNGKey = None"},{name:"train",val:": bool = False"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"},{name:"past_key_values",val:": dict = None"}],parametersDescription:[{anchor:"transformers.FlaxRobertaForMaskedLM.__call__.input_ids",description:`<strong>input_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.30.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.30.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.FlaxRobertaForMaskedLM.__call__.attention_mask",description:`<strong>attention_mask</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.FlaxRobertaForMaskedLM.__call__.token_type_ids",description:`<strong>token_type_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.FlaxRobertaForMaskedLM.__call__.position_ids",description:`<strong>position_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.`,name:"position_ids"},{anchor:"transformers.FlaxRobertaForMaskedLM.__call__.head_mask",description:`<strong>head_mask</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <code>optional) -- Mask to nullify selected heads of the attention modules. Mask values selected in </code>[0, 1]\`:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.FlaxRobertaForMaskedLM.__call__.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.30.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/roberta/modeling_flax_roberta.py#L816",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.30.0/en/main_classes/output#transformers.modeling_flax_outputs.FlaxBaseModelOutputWithPooling"
>transformers.modeling_flax_outputs.FlaxBaseModelOutputWithPooling</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.30.0/en/model_doc/roberta#transformers.RobertaConfig"
>RobertaConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>last_hidden_state</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>) \u2014 Sequence of hidden-states at the output of the last layer of the model.</p>
</li>
<li>
<p><strong>pooler_output</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, hidden_size)</code>) \u2014 Last layer hidden-state of the first token of the sequence (classification token) further processed by a
Linear layer and a Tanh activation function. The Linear layer weights are trained from the next sentence
prediction (classification) objective during pretraining.</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.30.0/en/main_classes/output#transformers.modeling_flax_outputs.FlaxBaseModelOutputWithPooling"
>transformers.modeling_flax_outputs.FlaxBaseModelOutputWithPooling</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Ma=new ke({props:{$$slots:{default:[F5]},$$scope:{ctx:R}}}),$a=new we({props:{anchor:"transformers.FlaxRobertaForMaskedLM.__call__.example",$$slots:{default:[R5]},$$scope:{ctx:R}}}),xd=new Ze({}),jd=new W({props:{name:"class transformers.FlaxRobertaForSequenceClassification",anchor:"transformers.FlaxRobertaForSequenceClassification",parameters:[{name:"config",val:": RobertaConfig"},{name:"input_shape",val:": typing.Tuple = (1, 1)"},{name:"seed",val:": int = 0"},{name:"dtype",val:": dtype = <class 'jax.numpy.float32'>"},{name:"_do_init",val:": bool = True"},{name:"gradient_checkpointing",val:": bool = False"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.FlaxRobertaForSequenceClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.30.0/en/model_doc/roberta#transformers.RobertaConfig">RobertaConfig</a>) &#x2014; Model configuration class with all the parameters of the
model. Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.30.0/en/main_classes/model#transformers.FlaxPreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/roberta/modeling_flax_roberta.py#L1128"}}),Wd=new W({props:{name:"__call__",anchor:"transformers.FlaxRobertaForSequenceClassification.__call__",parameters:[{name:"input_ids",val:""},{name:"attention_mask",val:" = None"},{name:"token_type_ids",val:" = None"},{name:"position_ids",val:" = None"},{name:"head_mask",val:" = None"},{name:"encoder_hidden_states",val:" = None"},{name:"encoder_attention_mask",val:" = None"},{name:"params",val:": dict = None"},{name:"dropout_rng",val:": PRNGKey = None"},{name:"train",val:": bool = False"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"},{name:"past_key_values",val:": dict = None"}],parametersDescription:[{anchor:"transformers.FlaxRobertaForSequenceClassification.__call__.input_ids",description:`<strong>input_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.30.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.30.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.FlaxRobertaForSequenceClassification.__call__.attention_mask",description:`<strong>attention_mask</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.FlaxRobertaForSequenceClassification.__call__.token_type_ids",description:`<strong>token_type_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.FlaxRobertaForSequenceClassification.__call__.position_ids",description:`<strong>position_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.`,name:"position_ids"},{anchor:"transformers.FlaxRobertaForSequenceClassification.__call__.head_mask",description:`<strong>head_mask</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <code>optional) -- Mask to nullify selected heads of the attention modules. Mask values selected in </code>[0, 1]\`:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.FlaxRobertaForSequenceClassification.__call__.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.30.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/roberta/modeling_flax_roberta.py#L816",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.30.0/en/main_classes/output#transformers.modeling_flax_outputs.FlaxSequenceClassifierOutput"
>transformers.modeling_flax_outputs.FlaxSequenceClassifierOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.30.0/en/model_doc/roberta#transformers.RobertaConfig"
>RobertaConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>logits</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, config.num_labels)</code>) \u2014 Classification (or regression if config.num_labels==1) scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.30.0/en/main_classes/output#transformers.modeling_flax_outputs.FlaxSequenceClassifierOutput"
>transformers.modeling_flax_outputs.FlaxSequenceClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Ra=new ke({props:{$$slots:{default:[E5]},$$scope:{ctx:R}}}),Ea=new we({props:{anchor:"transformers.FlaxRobertaForSequenceClassification.__call__.example",$$slots:{default:[x5]},$$scope:{ctx:R}}}),Zd=new Ze({}),Ad=new W({props:{name:"class transformers.FlaxRobertaForMultipleChoice",anchor:"transformers.FlaxRobertaForMultipleChoice",parameters:[{name:"config",val:": RobertaConfig"},{name:"input_shape",val:": typing.Tuple = (1, 1)"},{name:"seed",val:": int = 0"},{name:"dtype",val:": dtype = <class 'jax.numpy.float32'>"},{name:"_do_init",val:": bool = True"},{name:"gradient_checkpointing",val:": bool = False"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.FlaxRobertaForMultipleChoice.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.30.0/en/model_doc/roberta#transformers.RobertaConfig">RobertaConfig</a>) &#x2014; Model configuration class with all the parameters of the
model. Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.30.0/en/main_classes/model#transformers.FlaxPreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/roberta/modeling_flax_roberta.py#L1209"}}),Qd=new W({props:{name:"__call__",anchor:"transformers.FlaxRobertaForMultipleChoice.__call__",parameters:[{name:"input_ids",val:""},{name:"attention_mask",val:" = None"},{name:"token_type_ids",val:" = None"},{name:"position_ids",val:" = None"},{name:"head_mask",val:" = None"},{name:"encoder_hidden_states",val:" = None"},{name:"encoder_attention_mask",val:" = None"},{name:"params",val:": dict = None"},{name:"dropout_rng",val:": PRNGKey = None"},{name:"train",val:": bool = False"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"},{name:"past_key_values",val:": dict = None"}],parametersDescription:[{anchor:"transformers.FlaxRobertaForMultipleChoice.__call__.input_ids",description:`<strong>input_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, num_choices, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.30.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.30.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.FlaxRobertaForMultipleChoice.__call__.attention_mask",description:`<strong>attention_mask</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, num_choices, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.FlaxRobertaForMultipleChoice.__call__.token_type_ids",description:`<strong>token_type_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, num_choices, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.FlaxRobertaForMultipleChoice.__call__.position_ids",description:`<strong>position_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, num_choices, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.`,name:"position_ids"},{anchor:"transformers.FlaxRobertaForMultipleChoice.__call__.head_mask",description:`<strong>head_mask</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, num_choices, sequence_length)</code>, <code>optional) -- Mask to nullify selected heads of the attention modules. Mask values selected in </code>[0, 1]\`:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.FlaxRobertaForMultipleChoice.__call__.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.30.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/roberta/modeling_flax_roberta.py#L816",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.30.0/en/main_classes/output#transformers.modeling_flax_outputs.FlaxMultipleChoiceModelOutput"
>transformers.modeling_flax_outputs.FlaxMultipleChoiceModelOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.30.0/en/model_doc/roberta#transformers.RobertaConfig"
>RobertaConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>logits</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, num_choices)</code>) \u2014 <em>num_choices</em> is the second dimension of the input tensors. (see <em>input_ids</em> above).</p>
<p>Classification scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.30.0/en/main_classes/output#transformers.modeling_flax_outputs.FlaxMultipleChoiceModelOutput"
>transformers.modeling_flax_outputs.FlaxMultipleChoiceModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),ja=new ke({props:{$$slots:{default:[j5]},$$scope:{ctx:R}}}),Ja=new we({props:{anchor:"transformers.FlaxRobertaForMultipleChoice.__call__.example",$$slots:{default:[J5]},$$scope:{ctx:R}}}),Od=new Ze({}),Dd=new W({props:{name:"class transformers.FlaxRobertaForTokenClassification",anchor:"transformers.FlaxRobertaForTokenClassification",parameters:[{name:"config",val:": RobertaConfig"},{name:"input_shape",val:": typing.Tuple = (1, 1)"},{name:"seed",val:": int = 0"},{name:"dtype",val:": dtype = <class 'jax.numpy.float32'>"},{name:"_do_init",val:": bool = True"},{name:"gradient_checkpointing",val:": bool = False"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.FlaxRobertaForTokenClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.30.0/en/model_doc/roberta#transformers.RobertaConfig">RobertaConfig</a>) &#x2014; Model configuration class with all the parameters of the
model. Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.30.0/en/main_classes/model#transformers.FlaxPreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/roberta/modeling_flax_roberta.py#L1291"}}),sc=new W({props:{name:"__call__",anchor:"transformers.FlaxRobertaForTokenClassification.__call__",parameters:[{name:"input_ids",val:""},{name:"attention_mask",val:" = None"},{name:"token_type_ids",val:" = None"},{name:"position_ids",val:" = None"},{name:"head_mask",val:" = None"},{name:"encoder_hidden_states",val:" = None"},{name:"encoder_attention_mask",val:" = None"},{name:"params",val:": dict = None"},{name:"dropout_rng",val:": PRNGKey = None"},{name:"train",val:": bool = False"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"},{name:"past_key_values",val:": dict = None"}],parametersDescription:[{anchor:"transformers.FlaxRobertaForTokenClassification.__call__.input_ids",description:`<strong>input_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.30.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.30.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.FlaxRobertaForTokenClassification.__call__.attention_mask",description:`<strong>attention_mask</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.FlaxRobertaForTokenClassification.__call__.token_type_ids",description:`<strong>token_type_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.FlaxRobertaForTokenClassification.__call__.position_ids",description:`<strong>position_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.`,name:"position_ids"},{anchor:"transformers.FlaxRobertaForTokenClassification.__call__.head_mask",description:`<strong>head_mask</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <code>optional) -- Mask to nullify selected heads of the attention modules. Mask values selected in </code>[0, 1]\`:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.FlaxRobertaForTokenClassification.__call__.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.30.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/roberta/modeling_flax_roberta.py#L816",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.30.0/en/main_classes/output#transformers.modeling_flax_outputs.FlaxTokenClassifierOutput"
>transformers.modeling_flax_outputs.FlaxTokenClassifierOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.30.0/en/model_doc/roberta#transformers.RobertaConfig"
>RobertaConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>logits</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, sequence_length, config.num_labels)</code>) \u2014 Classification scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.30.0/en/main_classes/output#transformers.modeling_flax_outputs.FlaxTokenClassifierOutput"
>transformers.modeling_flax_outputs.FlaxTokenClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),za=new ke({props:{$$slots:{default:[C5]},$$scope:{ctx:R}}}),Ia=new we({props:{anchor:"transformers.FlaxRobertaForTokenClassification.__call__.example",$$slots:{default:[z5]},$$scope:{ctx:R}}}),ac=new Ze({}),rc=new W({props:{name:"class transformers.FlaxRobertaForQuestionAnswering",anchor:"transformers.FlaxRobertaForQuestionAnswering",parameters:[{name:"config",val:": RobertaConfig"},{name:"input_shape",val:": typing.Tuple = (1, 1)"},{name:"seed",val:": int = 0"},{name:"dtype",val:": dtype = <class 'jax.numpy.float32'>"},{name:"_do_init",val:": bool = True"},{name:"gradient_checkpointing",val:": bool = False"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.FlaxRobertaForQuestionAnswering.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.30.0/en/model_doc/roberta#transformers.RobertaConfig">RobertaConfig</a>) &#x2014; Model configuration class with all the parameters of the
model. Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.30.0/en/main_classes/model#transformers.FlaxPreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/roberta/modeling_flax_roberta.py#L1368"}}),mc=new W({props:{name:"__call__",anchor:"transformers.FlaxRobertaForQuestionAnswering.__call__",parameters:[{name:"input_ids",val:""},{name:"attention_mask",val:" = None"},{name:"token_type_ids",val:" = None"},{name:"position_ids",val:" = None"},{name:"head_mask",val:" = None"},{name:"encoder_hidden_states",val:" = None"},{name:"encoder_attention_mask",val:" = None"},{name:"params",val:": dict = None"},{name:"dropout_rng",val:": PRNGKey = None"},{name:"train",val:": bool = False"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"},{name:"past_key_values",val:": dict = None"}],parametersDescription:[{anchor:"transformers.FlaxRobertaForQuestionAnswering.__call__.input_ids",description:`<strong>input_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.30.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.30.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.FlaxRobertaForQuestionAnswering.__call__.attention_mask",description:`<strong>attention_mask</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.FlaxRobertaForQuestionAnswering.__call__.token_type_ids",description:`<strong>token_type_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.FlaxRobertaForQuestionAnswering.__call__.position_ids",description:`<strong>position_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.`,name:"position_ids"},{anchor:"transformers.FlaxRobertaForQuestionAnswering.__call__.head_mask",description:`<strong>head_mask</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <code>optional) -- Mask to nullify selected heads of the attention modules. Mask values selected in </code>[0, 1]\`:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.FlaxRobertaForQuestionAnswering.__call__.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.30.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/roberta/modeling_flax_roberta.py#L816",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.30.0/en/main_classes/output#transformers.modeling_flax_outputs.FlaxQuestionAnsweringModelOutput"
>transformers.modeling_flax_outputs.FlaxQuestionAnsweringModelOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.30.0/en/model_doc/roberta#transformers.RobertaConfig"
>RobertaConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>start_logits</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, sequence_length)</code>) \u2014 Span-start scores (before SoftMax).</p>
</li>
<li>
<p><strong>end_logits</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, sequence_length)</code>) \u2014 Span-end scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.30.0/en/main_classes/output#transformers.modeling_flax_outputs.FlaxQuestionAnsweringModelOutput"
>transformers.modeling_flax_outputs.FlaxQuestionAnsweringModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),qa=new ke({props:{$$slots:{default:[I5]},$$scope:{ctx:R}}}),Na=new we({props:{anchor:"transformers.FlaxRobertaForQuestionAnswering.__call__.example",$$slots:{default:[U5]},$$scope:{ctx:R}}}),{c(){d=s("meta"),y=p(),m=s("h1"),f=s("a"),b=s("span"),T(i.$$.fragment),u=p(),E=s("span"),ae=o("RoBERTa"),K=p(),N=s("div"),re=s("a"),ee=s("img"),xe=p(),G=s("a"),pe=s("img"),Q=p(),he=s("a"),ue=s("img"),Fe=p(),le=s("h2"),B=s("a"),_e=s("span"),T(ie.$$.fragment),O=p(),be=s("span"),je=o("Overview"),ne=p(),C=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"),Ce=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"),ze=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.`),P=p(),me=s("p"),Ie=o("The abstract from the paper is the following:"),L=p(),fe=s("p"),ye=s("em"),Z=o(`Language model pretraining has led to significant performance gains but careful comparison between different
approaches is challenging. Training is computationally expensive, often done on private datasets of different sizes,
and, as we will show, hyperparameter choices have significant impact on the final results. We present a replication
study of BERT pretraining (Devlin et al., 2019) that carefully measures the impact of many key hyperparameters and
training data size. We find that BERT was significantly undertrained, and can match or exceed the performance of every
model published after it. Our best model achieves state-of-the-art results on GLUE, RACE and SQuAD. These results
highlight the importance of previously overlooked design choices, and raise questions about the source of recently
reported improvements. We release our models and code.`),Ee=p(),S=s("p"),Ue=o("Tips:"),se=p(),z=s("ul"),ve=s("li"),q=s("p"),qe=o("This implementation is the same as "),ge=s("a"),v=o("BertModel"),j=o(` with a tiny embeddings tweak as well as a setup
for Roberta pretrained models.`),Pe=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(),Se=s("li"),Te=s("p"),Qe=o("RoBERTa doesn\u2019t have "),Ve=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 `),V=s("code"),De=o("tokenizer.sep_token"),Ye=o(" (or "),X=s("code"),He=o("</s>"),Ke=o(")"),Ne=p(),Be=s("li"),oe=s("p"),et=o("Same as BERT with better pretraining tricks:"),ey=p(),go=s("ul"),wh=s("li"),ty=o("dynamic masking: tokens are masked differently at each epoch, whereas BERT does it once and for all"),oy=p(),Mh=s("li"),ny=o("together to reach 512 tokens (so the sentences are in an order than may span several documents)"),sy=p(),$h=s("li"),ay=o("train with larger batches"),ry=p(),Fh=s("li"),ly=o("use BPE with bytes as a subunit and not characters (because of unicode characters)"),iy=p(),Rh=s("li"),zc=s("p"),Ic=s("a"),dy=o("CamemBERT"),cy=o(" is a wrapper around RoBERTa. Refer to this page for usage examples."),bg=p(),Ro=s("p"),py=o("This model was contributed by "),dr=s("a"),hy=o("julien-c"),uy=o(". The original code can be found "),cr=s("a"),my=o("here"),fy=o("."),yg=p(),tn=s("h2"),ss=s("a"),Eh=s("span"),T(pr.$$.fragment),gy=p(),xh=s("span"),_y=o("Resources"),vg=p(),Uc=s("p"),by=o("A list of official Hugging Face and community (indicated by \u{1F30E}) resources to help you get started with RoBERTa. If you\u2019re interested in submitting a resource to be included here, please feel free to open a Pull Request and we\u2019ll review it! The resource should ideally demonstrate something new instead of duplicating an existing resource."),Tg=p(),T(hr.$$.fragment),kg=p(),ct=s("ul"),on=s("li"),yy=o("A blog on "),ur=s("a"),vy=o("Getting Started with Sentiment Analysis on Twitter"),Ty=o(" using RoBERTa and the "),mr=s("a"),ky=o("Inference API"),wy=o("."),My=p(),fr=s("li"),$y=o("A blog on "),gr=s("a"),Fy=o("Opinion Classification with Kili and Hugging Face AutoTrain"),Ry=o(" using RoBERTa."),Ey=p(),_r=s("li"),xy=o("A notebook on how to "),br=s("a"),jy=o("finetune RoBERTa for sentiment analysis"),Jy=o(". \u{1F30E}"),Cy=p(),Eo=s("li"),qc=s("a"),zy=o("RobertaForSequenceClassification"),Iy=o(" is supported by this "),yr=s("a"),Uy=o("example script"),qy=o(" and "),vr=s("a"),Ny=o("notebook"),Wy=o("."),Zy=p(),xo=s("li"),Nc=s("a"),Ay=o("TFRobertaForSequenceClassification"),By=o(" is supported by this "),Tr=s("a"),Gy=o("example script"),Sy=o(" and "),kr=s("a"),Vy=o("notebook"),Xy=o("."),Py=p(),jo=s("li"),Wc=s("a"),Ly=o("FlaxRobertaForSequenceClassification"),Qy=o(" is supported by this "),wr=s("a"),Oy=o("example script"),Dy=o(" and "),Mr=s("a"),Yy=o("notebook"),Hy=o("."),Ky=p(),jh=s("li"),Zc=s("a"),ev=o("Text classification task guide"),wg=p(),T($r.$$.fragment),Mg=p(),xt=s("ul"),Jo=s("li"),Ac=s("a"),tv=o("RobertaForTokenClassification"),ov=o(" is supported by this "),Fr=s("a"),nv=o("example script"),sv=o(" and "),Rr=s("a"),av=o("notebook"),rv=o("."),lv=p(),Co=s("li"),Bc=s("a"),iv=o("TFRobertaForTokenClassification"),dv=o(" is supported by this "),Er=s("a"),cv=o("example script"),pv=o(" and "),xr=s("a"),hv=o("notebook"),uv=o("."),mv=p(),as=s("li"),Gc=s("a"),fv=o("FlaxRobertaForTokenClassification"),gv=o(" is supported by this "),jr=s("a"),_v=o("example script"),bv=o("."),yv=p(),Sc=s("li"),Jr=s("a"),vv=o("Token classification"),Tv=o(" chapter of the \u{1F917} Hugging Face Course."),kv=p(),Jh=s("li"),Vc=s("a"),wv=o("Token classification task guide"),$g=p(),T(Cr.$$.fragment),Fg=p(),yt=s("ul"),zr=s("li"),Mv=o("A blog on "),Ir=s("a"),$v=o("How to train a new language model from scratch using Transformers and Tokenizers"),Fv=o(" with RoBERTa."),Rv=p(),zo=s("li"),Xc=s("a"),Ev=o("RobertaForMaskedLM"),xv=o(" is supported by this "),Ur=s("a"),jv=o("example script"),Jv=o(" and "),qr=s("a"),Cv=o("notebook"),zv=o("."),Iv=p(),Io=s("li"),Pc=s("a"),Uv=o("TFRobertaForMaskedLM"),qv=o(" is supported by this "),Nr=s("a"),Nv=o("example script"),Wv=o(" and "),Wr=s("a"),Zv=o("notebook"),Av=o("."),Bv=p(),Uo=s("li"),Lc=s("a"),Gv=o("FlaxRobertaForMaskedLM"),Sv=o(" is supported by this "),Zr=s("a"),Vv=o("example script"),Xv=o(" and "),Ar=s("a"),Pv=o("notebook"),Lv=o("."),Qv=p(),Qc=s("li"),Br=s("a"),Ov=o("Masked language modeling"),Dv=o(" chapter of the \u{1F917} Hugging Face Course."),Yv=p(),Ch=s("li"),Oc=s("a"),Hv=o("Masked language modeling task guide"),Rg=p(),T(Gr.$$.fragment),Eg=p(),vt=s("ul"),Sr=s("li"),Kv=o("A blog on "),Vr=s("a"),eT=o("Accelerated Inference with Optimum and Transformers Pipelines"),tT=o(" with RoBERTa for question answering."),oT=p(),qo=s("li"),Dc=s("a"),nT=o("RobertaForQuestionAnswering"),sT=o(" is supported by this "),Xr=s("a"),aT=o("example script"),rT=o(" and "),Pr=s("a"),lT=o("notebook"),iT=o("."),dT=p(),No=s("li"),Yc=s("a"),cT=o("TFRobertaForQuestionAnswering"),pT=o(" is supported by this "),Lr=s("a"),hT=o("example script"),uT=o(" and "),Qr=s("a"),mT=o("notebook"),fT=o("."),gT=p(),rs=s("li"),Hc=s("a"),_T=o("FlaxRobertaForQuestionAnswering"),bT=o(" is supported by this "),Or=s("a"),yT=o("example script"),vT=o("."),TT=p(),Kc=s("li"),Dr=s("a"),kT=o("Question answering"),wT=o(" chapter of the \u{1F917} Hugging Face Course."),MT=p(),zh=s("li"),ep=s("a"),$T=o("Question answering task guide"),xg=p(),tp=s("p"),Ih=s("strong"),FT=o("Multiple choice"),jg=p(),Wo=s("ul"),Zo=s("li"),op=s("a"),RT=o("RobertaForMultipleChoice"),ET=o(" is supported by this "),Yr=s("a"),xT=o("example script"),jT=o(" and "),Hr=s("a"),JT=o("notebook"),CT=o("."),zT=p(),Ao=s("li"),np=s("a"),IT=o("TFRobertaForMultipleChoice"),UT=o(" is supported by this "),Kr=s("a"),qT=o("example script"),NT=o(" and "),el=s("a"),WT=o("notebook"),ZT=o("."),AT=p(),Uh=s("li"),sp=s("a"),BT=o("Multiple choice task guide"),Jg=p(),nn=s("h2"),ls=s("a"),qh=s("span"),T(tl.$$.fragment),GT=p(),Nh=s("span"),ST=o("RobertaConfig"),Cg=p(),St=s("div"),T(ol.$$.fragment),VT=p(),_o=s("p"),XT=o("This is the configuration class to store the configuration of a "),ap=s("a"),PT=o("RobertaModel"),LT=o(" or a "),rp=s("a"),QT=o("TFRobertaModel"),OT=o(`. It is
used to instantiate a RoBERTa model according to the specified arguments, defining the model architecture.
Instantiating a configuration with the defaults will yield a similar configuration to that of the RoBERTa
`),nl=s("a"),DT=o("roberta-base"),YT=o(" architecture."),HT=p(),sn=s("p"),KT=o("Configuration objects inherit from "),lp=s("a"),ek=o("PretrainedConfig"),tk=o(` and can be used to control the model outputs. Read the
documentation from `),ip=s("a"),ok=o("PretrainedConfig"),nk=o(" for more information."),sk=p(),T(is.$$.fragment),zg=p(),an=s("h2"),ds=s("a"),Wh=s("span"),T(sl.$$.fragment),ak=p(),Zh=s("span"),rk=o("RobertaTokenizer"),Ig=p(),We=s("div"),T(al.$$.fragment),lk=p(),Ah=s("p"),ik=o("Constructs a RoBERTa tokenizer, derived from the GPT-2 tokenizer, using byte-level Byte-Pair-Encoding."),dk=p(),Bh=s("p"),ck=o("This tokenizer has been trained to treat spaces like parts of the tokens (a bit like sentencepiece) so a word will"),pk=p(),T(cs.$$.fragment),hk=p(),rl=s("p"),uk=o("You can get around that behavior by passing "),Gh=s("code"),mk=o("add_prefix_space=True"),fk=o(` when instantiating this tokenizer or when you
call it on some text, but since the model was not pretrained this way, it might yield a decrease in performance.`),gk=p(),T(ps.$$.fragment),_k=p(),ll=s("p"),bk=o("This tokenizer inherits from "),dp=s("a"),yk=o("PreTrainedTokenizer"),vk=o(` which contains most of the main methods. Users should refer to
this superclass for more information regarding those methods.`),Tk=p(),Bo=s("div"),T(il.$$.fragment),kk=p(),Sh=s("p"),wk=o(`Build model inputs from a sequence or a pair of sequence for sequence classification tasks by concatenating and
adding special tokens. A RoBERTa sequence has the following format:`),Mk=p(),dl=s("ul"),cp=s("li"),$k=o("single sequence: "),Vh=s("code"),Fk=o("<s> X </s>"),Rk=p(),pp=s("li"),Ek=o("pair of sequences: "),Xh=s("code"),xk=o("<s> A </s></s> B </s>"),jk=p(),hs=s("div"),T(cl.$$.fragment),Jk=p(),pl=s("p"),Ck=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 `),Ph=s("code"),zk=o("prepare_for_model"),Ik=o(" method."),Uk=p(),us=s("div"),T(hl.$$.fragment),qk=p(),Lh=s("p"),Nk=o(`Create a mask from the two sequences passed to be used in a sequence-pair classification task. RoBERTa does not
make use of token type ids, therefore a list of zeros is returned.`),Wk=p(),hp=s("div"),T(ul.$$.fragment),Ug=p(),rn=s("h2"),ms=s("a"),Qh=s("span"),T(ml.$$.fragment),Zk=p(),Oh=s("span"),Ak=o("RobertaTokenizerFast"),qg=p(),tt=s("div"),T(fl.$$.fragment),Bk=p(),gl=s("p"),Gk=o("Construct a \u201Cfast\u201D RoBERTa tokenizer (backed by HuggingFace\u2019s "),Dh=s("em"),Sk=o("tokenizers"),Vk=o(` library), derived from the GPT-2
tokenizer, using byte-level Byte-Pair-Encoding.`),Xk=p(),Yh=s("p"),Pk=o("This tokenizer has been trained to treat spaces like parts of the tokens (a bit like sentencepiece) so a word will"),Lk=p(),T(fs.$$.fragment),Qk=p(),_l=s("p"),Ok=o("You can get around that behavior by passing "),Hh=s("code"),Dk=o("add_prefix_space=True"),Yk=o(` when instantiating this tokenizer or when you
call it on some text, but since the model was not pretrained this way, it might yield a decrease in performance.`),Hk=p(),T(gs.$$.fragment),Kk=p(),bl=s("p"),ew=o("This tokenizer inherits from "),up=s("a"),tw=o("PreTrainedTokenizerFast"),ow=o(` which contains most of the main methods. Users should
refer to this superclass for more information regarding those methods.`),nw=p(),mp=s("div"),T(yl.$$.fragment),Ng=p(),ln=s("h2"),_s=s("a"),Kh=s("span"),T(vl.$$.fragment),sw=p(),eu=s("span"),aw=o("RobertaModel"),Wg=p(),ot=s("div"),T(Tl.$$.fragment),rw=p(),tu=s("p"),lw=o("The bare RoBERTa Model transformer outputting raw hidden-states without any specific head on top."),iw=p(),kl=s("p"),dw=o("This model inherits from "),fp=s("a"),cw=o("PreTrainedModel"),pw=o(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),hw=p(),wl=s("p"),uw=o("This model is also a PyTorch "),Ml=s("a"),mw=o("torch.nn.Module"),fw=o(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),gw=p(),$l=s("p"),_w=o(`The model can behave as an encoder (with only self-attention) as well as a decoder, in which case a layer of
cross-attention is added between the self-attention layers, following the architecture described in `),ou=s("em"),bw=o(`Attention is
all you need`),yw=o(`_ by Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N. Gomez, Lukasz
Kaiser and Illia Polosukhin.`),vw=p(),pt=s("p"),Tw=o("To behave as an decoder the model needs to be initialized with the "),nu=s("code"),kw=o("is_decoder"),ww=o(` argument of the configuration set
to `),su=s("code"),Mw=o("True"),$w=o(". To be used in a Seq2Seq model, the model needs to initialized with both "),au=s("code"),Fw=o("is_decoder"),Rw=o(` argument and
`),ru=s("code"),Ew=o("add_cross_attention"),xw=o(" set to "),lu=s("code"),jw=o("True"),Jw=o("; an "),iu=s("code"),Cw=o("encoder_hidden_states"),zw=o(" is then expected as an input to the forward pass."),Iw=p(),bs=s("p"),Uw=o(".. _"),du=s("em"),qw=o("Attention is all you need"),Nw=o(": "),Fl=s("a"),Ww=o("https://arxiv.org/abs/1706.03762"),Zw=p(),Xt=s("div"),T(Rl.$$.fragment),Aw=p(),dn=s("p"),Bw=o("The "),gp=s("a"),Gw=o("RobertaModel"),Sw=o(" forward method, overrides the "),cu=s("code"),Vw=o("__call__"),Xw=o(" special method."),Pw=p(),T(ys.$$.fragment),Lw=p(),T(vs.$$.fragment),Zg=p(),cn=s("h2"),Ts=s("a"),pu=s("span"),T(El.$$.fragment),Qw=p(),hu=s("span"),Ow=o("RobertaForCausalLM"),Ag=p(),wt=s("div"),T(xl.$$.fragment),Dw=p(),jl=s("p"),Yw=o("RoBERTa Model with a "),uu=s("code"),Hw=o("language modeling"),Kw=o(" head on top for CLM fine-tuning."),e0=p(),Jl=s("p"),t0=o("This model inherits from "),_p=s("a"),o0=o("PreTrainedModel"),n0=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.)`),s0=p(),Cl=s("p"),a0=o("This model is also a PyTorch "),zl=s("a"),r0=o("torch.nn.Module"),l0=o(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),i0=p(),Pt=s("div"),T(Il.$$.fragment),d0=p(),pn=s("p"),c0=o("The "),bp=s("a"),p0=o("RobertaForCausalLM"),h0=o(" forward method, overrides the "),mu=s("code"),u0=o("__call__"),m0=o(" special method."),f0=p(),T(ks.$$.fragment),g0=p(),T(ws.$$.fragment),Bg=p(),hn=s("h2"),Ms=s("a"),fu=s("span"),T(Ul.$$.fragment),_0=p(),gu=s("span"),b0=o("RobertaForMaskedLM"),Gg=p(),Mt=s("div"),T(ql.$$.fragment),y0=p(),Nl=s("p"),v0=o("RoBERTa Model with a "),_u=s("code"),T0=o("language modeling"),k0=o(" head on top."),w0=p(),Wl=s("p"),M0=o("This model inherits from "),yp=s("a"),$0=o("PreTrainedModel"),F0=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.)`),R0=p(),Zl=s("p"),E0=o("This model is also a PyTorch "),Al=s("a"),x0=o("torch.nn.Module"),j0=o(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),J0=p(),Lt=s("div"),T(Bl.$$.fragment),C0=p(),un=s("p"),z0=o("The "),vp=s("a"),I0=o("RobertaForMaskedLM"),U0=o(" forward method, overrides the "),bu=s("code"),q0=o("__call__"),N0=o(" special method."),W0=p(),T($s.$$.fragment),Z0=p(),T(Fs.$$.fragment),Sg=p(),mn=s("h2"),Rs=s("a"),yu=s("span"),T(Gl.$$.fragment),A0=p(),vu=s("span"),B0=o("RobertaForSequenceClassification"),Vg=p(),$t=s("div"),T(Sl.$$.fragment),G0=p(),Tu=s("p"),S0=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.`),V0=p(),Vl=s("p"),X0=o("This model inherits from "),Tp=s("a"),P0=o("PreTrainedModel"),L0=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.)`),Q0=p(),Xl=s("p"),O0=o("This model is also a PyTorch "),Pl=s("a"),D0=o("torch.nn.Module"),Y0=o(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),H0=p(),jt=s("div"),T(Ll.$$.fragment),K0=p(),fn=s("p"),eM=o("The "),kp=s("a"),tM=o("RobertaForSequenceClassification"),oM=o(" forward method, overrides the "),ku=s("code"),nM=o("__call__"),sM=o(" special method."),aM=p(),T(Es.$$.fragment),rM=p(),T(xs.$$.fragment),lM=p(),T(js.$$.fragment),Xg=p(),gn=s("h2"),Js=s("a"),wu=s("span"),T(Ql.$$.fragment),iM=p(),Mu=s("span"),dM=o("RobertaForMultipleChoice"),Pg=p(),Ft=s("div"),T(Ol.$$.fragment),cM=p(),$u=s("p"),pM=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.`),hM=p(),Dl=s("p"),uM=o("This model inherits from "),wp=s("a"),mM=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.)`),gM=p(),Yl=s("p"),_M=o("This model is also a PyTorch "),Hl=s("a"),bM=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.`),vM=p(),Qt=s("div"),T(Kl.$$.fragment),TM=p(),_n=s("p"),kM=o("The "),Mp=s("a"),wM=o("RobertaForMultipleChoice"),MM=o(" forward method, overrides the "),Fu=s("code"),$M=o("__call__"),FM=o(" special method."),RM=p(),T(Cs.$$.fragment),EM=p(),T(zs.$$.fragment),Lg=p(),bn=s("h2"),Is=s("a"),Ru=s("span"),T(ei.$$.fragment),xM=p(),Eu=s("span"),jM=o("RobertaForTokenClassification"),Qg=p(),Rt=s("div"),T(ti.$$.fragment),JM=p(),xu=s("p"),CM=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.`),zM=p(),oi=s("p"),IM=o("This model inherits from "),$p=s("a"),UM=o("PreTrainedModel"),qM=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.)`),NM=p(),ni=s("p"),WM=o("This model is also a PyTorch "),si=s("a"),ZM=o("torch.nn.Module"),AM=o(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),BM=p(),Ot=s("div"),T(ai.$$.fragment),GM=p(),yn=s("p"),SM=o("The "),Fp=s("a"),VM=o("RobertaForTokenClassification"),XM=o(" forward method, overrides the "),ju=s("code"),PM=o("__call__"),LM=o(" special method."),QM=p(),T(Us.$$.fragment),OM=p(),T(qs.$$.fragment),Og=p(),vn=s("h2"),Ns=s("a"),Ju=s("span"),T(ri.$$.fragment),DM=p(),Cu=s("span"),YM=o("RobertaForQuestionAnswering"),Dg=p(),Et=s("div"),T(li.$$.fragment),HM=p(),Tn=s("p"),KM=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 `),zu=s("code"),e1=o("span start logits"),t1=o(" and "),Iu=s("code"),o1=o("span end logits"),n1=o(")."),s1=p(),ii=s("p"),a1=o("This model inherits from "),Rp=s("a"),r1=o("PreTrainedModel"),l1=o(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),i1=p(),di=s("p"),d1=o("This model is also a PyTorch "),ci=s("a"),c1=o("torch.nn.Module"),p1=o(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),h1=p(),Dt=s("div"),T(pi.$$.fragment),u1=p(),kn=s("p"),m1=o("The "),Ep=s("a"),f1=o("RobertaForQuestionAnswering"),g1=o(" forward method, overrides the "),Uu=s("code"),_1=o("__call__"),b1=o(" special method."),y1=p(),T(Ws.$$.fragment),v1=p(),T(Zs.$$.fragment),Yg=p(),wn=s("h2"),As=s("a"),qu=s("span"),T(hi.$$.fragment),T1=p(),Nu=s("span"),k1=o("TFRobertaModel"),Hg=p(),ht=s("div"),T(ui.$$.fragment),w1=p(),Wu=s("p"),M1=o("The bare RoBERTa Model transformer outputting raw hidden-states without any specific head on top."),$1=p(),mi=s("p"),F1=o("This model inherits from "),xp=s("a"),R1=o("TFPreTrainedModel"),E1=o(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),x1=p(),fi=s("p"),j1=o("This model is also a "),gi=s("a"),J1=o("tf.keras.Model"),C1=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.`),z1=p(),T(Bs.$$.fragment),I1=p(),Yt=s("div"),T(_i.$$.fragment),U1=p(),Mn=s("p"),q1=o("The "),jp=s("a"),N1=o("TFRobertaModel"),W1=o(" forward method, overrides the "),Zu=s("code"),Z1=o("__call__"),A1=o(" special method."),B1=p(),T(Gs.$$.fragment),G1=p(),T(Ss.$$.fragment),Kg=p(),$n=s("h2"),Vs=s("a"),Au=s("span"),T(bi.$$.fragment),S1=p(),Bu=s("span"),V1=o("TFRobertaForCausalLM"),e_=p(),Fn=s("div"),T(yi.$$.fragment),X1=p(),Ht=s("div"),T(vi.$$.fragment),P1=p(),Rn=s("p"),L1=o("The "),Jp=s("a"),Q1=o("TFRobertaForCausalLM"),O1=o(" forward method, overrides the "),Gu=s("code"),D1=o("__call__"),Y1=o(" special method."),H1=p(),T(Xs.$$.fragment),K1=p(),T(Ps.$$.fragment),t_=p(),En=s("h2"),Ls=s("a"),Su=s("span"),T(Ti.$$.fragment),e2=p(),Vu=s("span"),t2=o("TFRobertaForMaskedLM"),o_=p(),ut=s("div"),T(ki.$$.fragment),o2=p(),wi=s("p"),n2=o("RoBERTa Model with a "),Xu=s("code"),s2=o("language modeling"),a2=o(" head on top."),r2=p(),Mi=s("p"),l2=o("This model inherits from "),Cp=s("a"),i2=o("TFPreTrainedModel"),d2=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.)`),c2=p(),$i=s("p"),p2=o("This model is also a "),Fi=s("a"),h2=o("tf.keras.Model"),u2=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.`),m2=p(),T(Qs.$$.fragment),f2=p(),Jt=s("div"),T(Ri.$$.fragment),g2=p(),xn=s("p"),_2=o("The "),zp=s("a"),b2=o("TFRobertaForMaskedLM"),y2=o(" forward method, overrides the "),Pu=s("code"),v2=o("__call__"),T2=o(" special method."),k2=p(),T(Os.$$.fragment),w2=p(),T(Ds.$$.fragment),M2=p(),T(Ys.$$.fragment),n_=p(),jn=s("h2"),Hs=s("a"),Lu=s("span"),T(Ei.$$.fragment),$2=p(),Qu=s("span"),F2=o("TFRobertaForSequenceClassification"),s_=p(),mt=s("div"),T(xi.$$.fragment),R2=p(),Ou=s("p"),E2=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.`),x2=p(),ji=s("p"),j2=o("This model inherits from "),Ip=s("a"),J2=o("TFPreTrainedModel"),C2=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.)`),z2=p(),Ji=s("p"),I2=o("This model is also a "),Ci=s("a"),U2=o("tf.keras.Model"),q2=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.`),N2=p(),T(Ks.$$.fragment),W2=p(),Ct=s("div"),T(zi.$$.fragment),Z2=p(),Jn=s("p"),A2=o("The "),Up=s("a"),B2=o("TFRobertaForSequenceClassification"),G2=o(" forward method, overrides the "),Du=s("code"),S2=o("__call__"),V2=o(" special method."),X2=p(),T(ea.$$.fragment),P2=p(),T(ta.$$.fragment),L2=p(),T(oa.$$.fragment),a_=p(),Cn=s("h2"),na=s("a"),Yu=s("span"),T(Ii.$$.fragment),Q2=p(),Hu=s("span"),O2=o("TFRobertaForMultipleChoice"),r_=p(),ft=s("div"),T(Ui.$$.fragment),D2=p(),Ku=s("p"),Y2=o(`Roberta Model with a multiple choice classification head on top (a linear layer on top of the pooled output and a
softmax) e.g. for RocStories/SWAG tasks.`),H2=p(),qi=s("p"),K2=o("This model inherits from "),qp=s("a"),e$=o("TFPreTrainedModel"),t$=o(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),o$=p(),Ni=s("p"),n$=o("This model is also a "),Wi=s("a"),s$=o("tf.keras.Model"),a$=o(` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),r$=p(),T(sa.$$.fragment),l$=p(),Kt=s("div"),T(Zi.$$.fragment),i$=p(),zn=s("p"),d$=o("The "),Np=s("a"),c$=o("TFRobertaForMultipleChoice"),p$=o(" forward method, overrides the "),em=s("code"),h$=o("__call__"),u$=o(" special method."),m$=p(),T(aa.$$.fragment),f$=p(),T(ra.$$.fragment),l_=p(),In=s("h2"),la=s("a"),tm=s("span"),T(Ai.$$.fragment),g$=p(),om=s("span"),_$=o("TFRobertaForTokenClassification"),i_=p(),gt=s("div"),T(Bi.$$.fragment),b$=p(),nm=s("p"),y$=o(`RoBERTa Model with a token classification head on top (a linear layer on top of the hidden-states output) e.g. for
Named-Entity-Recognition (NER) tasks.`),v$=p(),Gi=s("p"),T$=o("This model inherits from "),Wp=s("a"),k$=o("TFPreTrainedModel"),w$=o(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),M$=p(),Si=s("p"),$$=o("This model is also a "),Vi=s("a"),F$=o("tf.keras.Model"),R$=o(` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),E$=p(),T(ia.$$.fragment),x$=p(),zt=s("div"),T(Xi.$$.fragment),j$=p(),Un=s("p"),J$=o("The "),Zp=s("a"),C$=o("TFRobertaForTokenClassification"),z$=o(" forward method, overrides the "),sm=s("code"),I$=o("__call__"),U$=o(" special method."),q$=p(),T(da.$$.fragment),N$=p(),T(ca.$$.fragment),W$=p(),T(pa.$$.fragment),d_=p(),qn=s("h2"),ha=s("a"),am=s("span"),T(Pi.$$.fragment),Z$=p(),rm=s("span"),A$=o("TFRobertaForQuestionAnswering"),c_=p(),_t=s("div"),T(Li.$$.fragment),B$=p(),Nn=s("p"),G$=o(`RoBERTa Model with a span classification head on top for extractive question-answering tasks like SQuAD (a linear
layers on top of the hidden-states output to compute `),lm=s("code"),S$=o("span start logits"),V$=o(" and "),im=s("code"),X$=o("span end logits"),P$=o(")."),L$=p(),Qi=s("p"),Q$=o("This model inherits from "),Ap=s("a"),O$=o("TFPreTrainedModel"),D$=o(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),Y$=p(),Oi=s("p"),H$=o("This model is also a "),Di=s("a"),K$=o("tf.keras.Model"),eF=o(` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),tF=p(),T(ua.$$.fragment),oF=p(),It=s("div"),T(Yi.$$.fragment),nF=p(),Wn=s("p"),sF=o("The "),Bp=s("a"),aF=o("TFRobertaForQuestionAnswering"),rF=o(" forward method, overrides the "),dm=s("code"),lF=o("__call__"),iF=o(" special method."),dF=p(),T(ma.$$.fragment),cF=p(),T(fa.$$.fragment),pF=p(),T(ga.$$.fragment),p_=p(),Zn=s("h2"),_a=s("a"),cm=s("span"),T(Hi.$$.fragment),hF=p(),pm=s("span"),uF=o("FlaxRobertaModel"),h_=p(),nt=s("div"),T(Ki.$$.fragment),mF=p(),hm=s("p"),fF=o("The bare RoBERTa Model transformer outputting raw hidden-states without any specific head on top."),gF=p(),ed=s("p"),_F=o("This model inherits from "),Gp=s("a"),bF=o("FlaxPreTrainedModel"),yF=o(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading, saving and converting weights from PyTorch models)`),vF=p(),td=s("p"),TF=o("This model is also a Flax Linen "),od=s("a"),kF=o("flax.linen.Module"),wF=o(`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),MF=p(),um=s("p"),$F=o("Finally, this model supports inherent JAX features such as:"),FF=p(),bo=s("ul"),mm=s("li"),nd=s("a"),RF=o("Just-In-Time (JIT) compilation"),EF=p(),fm=s("li"),sd=s("a"),xF=o("Automatic Differentiation"),jF=p(),gm=s("li"),ad=s("a"),JF=o("Vectorization"),CF=p(),_m=s("li"),rd=s("a"),zF=o("Parallelization"),IF=p(),eo=s("div"),T(ld.$$.fragment),UF=p(),An=s("p"),qF=o("The "),bm=s("code"),NF=o("FlaxRobertaPreTrainedModel"),WF=o(" forward method, overrides the "),ym=s("code"),ZF=o("__call__"),AF=o(" special method."),BF=p(),T(ba.$$.fragment),GF=p(),T(ya.$$.fragment),u_=p(),Bn=s("h2"),va=s("a"),vm=s("span"),T(id.$$.fragment),SF=p(),Tm=s("span"),VF=o("FlaxRobertaForCausalLM"),m_=p(),st=s("div"),T(dd.$$.fragment),XF=p(),km=s("p"),PF=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 "),Sp=s("a"),OF=o("FlaxPreTrainedModel"),DF=o(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading, saving and converting weights from PyTorch models)`),YF=p(),pd=s("p"),HF=o("This model is also a Flax Linen "),hd=s("a"),KF=o("flax.linen.Module"),eR=o(`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),tR=p(),wm=s("p"),oR=o("Finally, this model supports inherent JAX features such as:"),nR=p(),yo=s("ul"),Mm=s("li"),ud=s("a"),sR=o("Just-In-Time (JIT) compilation"),aR=p(),$m=s("li"),md=s("a"),rR=o("Automatic Differentiation"),lR=p(),Fm=s("li"),fd=s("a"),iR=o("Vectorization"),dR=p(),Rm=s("li"),gd=s("a"),cR=o("Parallelization"),pR=p(),to=s("div"),T(_d.$$.fragment),hR=p(),Gn=s("p"),uR=o("The "),Em=s("code"),mR=o("FlaxRobertaPreTrainedModel"),fR=o(" forward method, overrides the "),xm=s("code"),gR=o("__call__"),_R=o(" special method."),bR=p(),T(Ta.$$.fragment),yR=p(),T(ka.$$.fragment),f_=p(),Sn=s("h2"),wa=s("a"),jm=s("span"),T(bd.$$.fragment),vR=p(),Jm=s("span"),TR=o("FlaxRobertaForMaskedLM"),g_=p(),at=s("div"),T(yd.$$.fragment),kR=p(),vd=s("p"),wR=o("RoBERTa Model with a "),Cm=s("code"),MR=o("language modeling"),$R=o(" head on top."),FR=p(),Td=s("p"),RR=o("This model inherits from "),Vp=s("a"),ER=o("FlaxPreTrainedModel"),xR=o(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading, saving and converting weights from PyTorch models)`),jR=p(),kd=s("p"),JR=o("This model is also a Flax Linen "),wd=s("a"),CR=o("flax.linen.Module"),zR=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(),zm=s("p"),UR=o("Finally, this model supports inherent JAX features such as:"),qR=p(),vo=s("ul"),Im=s("li"),Md=s("a"),NR=o("Just-In-Time (JIT) compilation"),WR=p(),Um=s("li"),$d=s("a"),ZR=o("Automatic Differentiation"),AR=p(),qm=s("li"),Fd=s("a"),BR=o("Vectorization"),GR=p(),Nm=s("li"),Rd=s("a"),SR=o("Parallelization"),VR=p(),oo=s("div"),T(Ed.$$.fragment),XR=p(),Vn=s("p"),PR=o("The "),Wm=s("code"),LR=o("FlaxRobertaPreTrainedModel"),QR=o(" forward method, overrides the "),Zm=s("code"),OR=o("__call__"),DR=o(" special method."),YR=p(),T(Ma.$$.fragment),HR=p(),T($a.$$.fragment),__=p(),Xn=s("h2"),Fa=s("a"),Am=s("span"),T(xd.$$.fragment),KR=p(),Bm=s("span"),eE=o("FlaxRobertaForSequenceClassification"),b_=p(),rt=s("div"),T(jd.$$.fragment),tE=p(),Gm=s("p"),oE=o(`Roberta Model transformer with a sequence classification/regression head on top (a linear layer on top of the
pooled output) e.g. for GLUE tasks.`),nE=p(),Jd=s("p"),sE=o("This model inherits from "),Xp=s("a"),aE=o("FlaxPreTrainedModel"),rE=o(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading, saving and converting weights from PyTorch models)`),lE=p(),Cd=s("p"),iE=o("This model is also a Flax Linen "),zd=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(),Sm=s("p"),hE=o("Finally, this model supports inherent JAX features such as:"),uE=p(),To=s("ul"),Vm=s("li"),Id=s("a"),mE=o("Just-In-Time (JIT) compilation"),fE=p(),Xm=s("li"),Ud=s("a"),gE=o("Automatic Differentiation"),_E=p(),Pm=s("li"),qd=s("a"),bE=o("Vectorization"),yE=p(),Lm=s("li"),Nd=s("a"),vE=o("Parallelization"),TE=p(),no=s("div"),T(Wd.$$.fragment),kE=p(),Pn=s("p"),wE=o("The "),Qm=s("code"),ME=o("FlaxRobertaPreTrainedModel"),$E=o(" forward method, overrides the "),Om=s("code"),FE=o("__call__"),RE=o(" special method."),EE=p(),T(Ra.$$.fragment),xE=p(),T(Ea.$$.fragment),y_=p(),Ln=s("h2"),xa=s("a"),Dm=s("span"),T(Zd.$$.fragment),jE=p(),Ym=s("span"),JE=o("FlaxRobertaForMultipleChoice"),v_=p(),lt=s("div"),T(Ad.$$.fragment),CE=p(),Hm=s("p"),zE=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 "),Pp=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 "),Sd=s("a"),AE=o("flax.linen.Module"),BE=o(`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),GE=p(),Km=s("p"),SE=o("Finally, this model supports inherent JAX features such as:"),VE=p(),ko=s("ul"),ef=s("li"),Vd=s("a"),XE=o("Just-In-Time (JIT) compilation"),PE=p(),tf=s("li"),Xd=s("a"),LE=o("Automatic Differentiation"),QE=p(),of=s("li"),Pd=s("a"),OE=o("Vectorization"),DE=p(),nf=s("li"),Ld=s("a"),YE=o("Parallelization"),HE=p(),so=s("div"),T(Qd.$$.fragment),KE=p(),Qn=s("p"),e4=o("The "),sf=s("code"),t4=o("FlaxRobertaPreTrainedModel"),o4=o(" forward method, overrides the "),af=s("code"),n4=o("__call__"),s4=o(" special method."),a4=p(),T(ja.$$.fragment),r4=p(),T(Ja.$$.fragment),T_=p(),On=s("h2"),Ca=s("a"),rf=s("span"),T(Od.$$.fragment),l4=p(),lf=s("span"),i4=o("FlaxRobertaForTokenClassification"),k_=p(),it=s("div"),T(Dd.$$.fragment),d4=p(),df=s("p"),c4=o(`Roberta Model with a token classification head on top (a linear layer on top of the hidden-states output) e.g. for
Named-Entity-Recognition (NER) tasks.`),p4=p(),Yd=s("p"),h4=o("This model inherits from "),Lp=s("a"),u4=o("FlaxPreTrainedModel"),m4=o(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading, saving and converting weights from PyTorch models)`),f4=p(),Hd=s("p"),g4=o("This model is also a Flax Linen "),Kd=s("a"),_4=o("flax.linen.Module"),b4=o(`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),y4=p(),cf=s("p"),v4=o("Finally, this model supports inherent JAX features such as:"),T4=p(),wo=s("ul"),pf=s("li"),ec=s("a"),k4=o("Just-In-Time (JIT) compilation"),w4=p(),hf=s("li"),tc=s("a"),M4=o("Automatic Differentiation"),$4=p(),uf=s("li"),oc=s("a"),F4=o("Vectorization"),R4=p(),mf=s("li"),nc=s("a"),E4=o("Parallelization"),x4=p(),ao=s("div"),T(sc.$$.fragment),j4=p(),Dn=s("p"),J4=o("The "),ff=s("code"),C4=o("FlaxRobertaPreTrainedModel"),z4=o(" forward method, overrides the "),gf=s("code"),I4=o("__call__"),U4=o(" special method."),q4=p(),T(za.$$.fragment),N4=p(),T(Ia.$$.fragment),w_=p(),Yn=s("h2"),Ua=s("a"),_f=s("span"),T(ac.$$.fragment),W4=p(),bf=s("span"),Z4=o("FlaxRobertaForQuestionAnswering"),M_=p(),dt=s("div"),T(rc.$$.fragment),A4=p(),Hn=s("p"),B4=o(`Roberta Model with a span classification head on top for extractive question-answering tasks like SQuAD (a linear
layers on top of the hidden-states output to compute `),yf=s("code"),G4=o("span start logits"),S4=o(" and "),vf=s("code"),V4=o("span end logits"),X4=o(")."),P4=p(),lc=s("p"),L4=o("This model inherits from "),Qp=s("a"),Q4=o("FlaxPreTrainedModel"),O4=o(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading, saving and converting weights from PyTorch models)`),D4=p(),ic=s("p"),Y4=o("This model is also a Flax Linen "),dc=s("a"),H4=o("flax.linen.Module"),K4=o(`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),ex=p(),Tf=s("p"),tx=o("Finally, this model supports inherent JAX features such as:"),ox=p(),Mo=s("ul"),kf=s("li"),cc=s("a"),nx=o("Just-In-Time (JIT) compilation"),sx=p(),wf=s("li"),pc=s("a"),ax=o("Automatic Differentiation"),rx=p(),Mf=s("li"),hc=s("a"),lx=o("Vectorization"),ix=p(),$f=s("li"),uc=s("a"),dx=o("Parallelization"),cx=p(),ro=s("div"),T(mc.$$.fragment),px=p(),Kn=s("p"),hx=o("The "),Ff=s("code"),ux=o("FlaxRobertaPreTrainedModel"),mx=o(" forward method, overrides the "),Rf=s("code"),fx=o("__call__"),gx=o(" special method."),_x=p(),T(qa.$$.fragment),bx=p(),T(Na.$$.fragment),this.h()},l(l){const _=jI('[data-svelte="svelte-1phssyn"]',document.head);d=a(_,"META",{name:!0,content:!0}),_.forEach(t),y=h(l),m=a(l,"H1",{class:!0});var fc=r(m);f=a(fc,"A",{id:!0,class:!0,href:!0});var Ef=r(f);b=a(Ef,"SPAN",{});var xf=r(b);k(i.$$.fragment,xf),xf.forEach(t),Ef.forEach(t),u=h(fc),E=a(fc,"SPAN",{});var jf=r(E);ae=n(jf,"RoBERTa"),jf.forEach(t),fc.forEach(t),K=h(l),N=a(l,"DIV",{class:!0});var es=r(N);re=a(es,"A",{href:!0});var Jf=r(re);ee=a(Jf,"IMG",{alt:!0,src:!0}),Jf.forEach(t),xe=h(es),G=a(es,"A",{href:!0});var Cf=r(G);pe=a(Cf,"IMG",{alt:!0,src:!0}),Cf.forEach(t),Q=h(es),he=a(es,"A",{href:!0});var zf=r(he);ue=a(zf,"IMG",{alt:!0,src:!0}),zf.forEach(t),es.forEach(t),Fe=h(l),le=a(l,"H2",{class:!0});var gc=r(le);B=a(gc,"A",{id:!0,class:!0,href:!0});var If=r(B);_e=a(If,"SPAN",{});var Uf=r(_e);k(ie.$$.fragment,Uf),Uf.forEach(t),If.forEach(t),O=h(gc),be=a(gc,"SPAN",{});var qf=r(be);je=n(qf,"Overview"),qf.forEach(t),gc.forEach(t),ne=h(l),C=a(l,"P",{});var ts=r(C);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),Ce=n(ts,`, Naman Goyal, Jingfei Du, Mandar Joshi, Danqi Chen, Omer
Levy, Mike Lewis, Luke Zettlemoyer, Veselin Stoyanov. It is based on Google\u2019s BERT model released in 2018.`),ts.forEach(t),Re=h(l),I=a(l,"P",{});var Zf=r(I);ze=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),P=h(l),me=a(l,"P",{});var Af=r(me);Ie=n(Af,"The abstract from the paper is the following:"),Af.forEach(t),L=h(l),fe=a(l,"P",{});var Bf=r(fe);ye=a(Bf,"EM",{});var Gf=r(ye);Z=n(Gf,`Language model pretraining has led to significant performance gains but careful comparison between different
approaches is challenging. Training is computationally expensive, often done on private datasets of different sizes,
and, as we will show, hyperparameter choices have significant impact on the final results. We present a replication
study of BERT pretraining (Devlin et al., 2019) that carefully measures the impact of many key hyperparameters and
training data size. We find that BERT was significantly undertrained, and can match or exceed the performance of every
model published after it. Our best model achieves state-of-the-art results on GLUE, RACE and SQuAD. These results
highlight the importance of previously overlooked design choices, and raise questions about the source of recently
reported improvements. We release our models and code.`),Gf.forEach(t),Bf.forEach(t),Ee=h(l),S=a(l,"P",{});var Sf=r(S);Ue=n(Sf,"Tips:"),Sf.forEach(t),se=h(l),z=a(l,"UL",{});var Vt=r(z);ve=a(Vt,"LI",{});var Vf=r(ve);q=a(Vf,"P",{});var _c=r(q);qe=n(_c,"This implementation is the same as "),ge=a(_c,"A",{href:!0});var Xf=r(ge);v=n(Xf,"BertModel"),Xf.forEach(t),j=n(_c,` with a tiny embeddings tweak as well as a setup
for Roberta pretrained models.`),_c.forEach(t),Vf.forEach(t),Pe=h(Vt),te=a(Vt,"LI",{});var Pf=r(te);Ge=a(Pf,"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),Pf.forEach(t),J=h(Vt),Se=a(Vt,"LI",{});var Qf=r(Se);Te=a(Qf,"P",{});var $o=r(Te);Qe=n($o,"RoBERTa doesn\u2019t have "),Ve=a($o,"CODE",{});var Of=r(Ve);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 `),V=a($o,"CODE",{});var Df=r(V);De=n(Df,"tokenizer.sep_token"),Df.forEach(t),Ye=n($o," (or "),X=a($o,"CODE",{});var Yf=r(X);He=n(Yf,"</s>"),Yf.forEach(t),Ke=n($o,")"),$o.forEach(t),Qf.forEach(t),Ne=h(Vt),Be=a(Vt,"LI",{});var bc=r(Be);oe=a(bc,"P",{});var Hf=r(oe);et=n(Hf,"Same as BERT with better pretraining tricks:"),Hf.forEach(t),ey=h(bc),go=a(bc,"UL",{});var Fo=r(go);wh=a(Fo,"LI",{});var Kf=r(wh);ty=n(Kf,"dynamic masking: tokens are masked differently at each epoch, whereas BERT does it once and for all"),Kf.forEach(t),oy=h(Fo),Mh=a(Fo,"LI",{});var eg=r(Mh);ny=n(eg,"together to reach 512 tokens (so the sentences are in an order than may span several documents)"),eg.forEach(t),sy=h(Fo),$h=a(Fo,"LI",{});var tg=r($h);ay=n(tg,"train with larger batches"),tg.forEach(t),ry=h(Fo),Fh=a(Fo,"LI",{});var og=r(Fh);ly=n(og,"use BPE with bytes as a subunit and not characters (because of unicode characters)"),og.forEach(t),Fo.forEach(t),bc.forEach(t),iy=h(Vt),Rh=a(Vt,"LI",{});var ng=r(Rh);zc=a(ng,"P",{});var Op=r(zc);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),Vt.forEach(t),bg=h(l),Ro=a(l,"P",{});var os=r(Ro);py=n(os,"This model was contributed by "),dr=a(os,"A",{href:!0,rel:!0});var ag=r(dr);hy=n(ag,"julien-c"),ag.forEach(t),uy=n(os,". The original code can be found "),cr=a(os,"A",{href:!0,rel:!0});var rg=r(cr);my=n(rg,"here"),rg.forEach(t),fy=n(os,"."),os.forEach(t),yg=h(l),tn=a(l,"H2",{class:!0});var yc=r(tn);ss=a(yc,"A",{id:!0,class:!0,href:!0});var lg=r(ss);Eh=a(lg,"SPAN",{});var ig=r(Eh);k(pr.$$.fragment,ig),ig.forEach(t),lg.forEach(t),gy=h(yc),xh=a(yc,"SPAN",{});var dg=r(xh);_y=n(dg,"Resources"),dg.forEach(t),yc.forEach(t),vg=h(l),Uc=a(l,"P",{});var cg=r(Uc);by=n(cg,"A list of official Hugging Face and community (indicated by \u{1F30E}) resources to help you get started with RoBERTa. If you\u2019re interested in submitting a resource to be included here, please feel free to open a Pull Request and we\u2019ll review it! The resource should ideally demonstrate something new instead of duplicating an existing resource."),cg.forEach(t),Tg=h(l),k(hr.$$.fragment,l),kg=h(l),ct=a(l,"UL",{});var bt=r(ct);on=a(bt,"LI",{});var ns=r(on);yy=n(ns,"A blog on "),ur=a(ns,"A",{href:!0,rel:!0});var pg=r(ur);vy=n(pg,"Getting Started with Sentiment Analysis on Twitter"),pg.forEach(t),Ty=n(ns," using RoBERTa and the "),mr=a(ns,"A",{href:!0,rel:!0});var hg=r(mr);ky=n(hg,"Inference API"),hg.forEach(t),wy=n(ns,"."),ns.forEach(t),My=h(bt),fr=a(bt,"LI",{});var vc=r(fr);$y=n(vc,"A blog on "),gr=a(vc,"A",{href:!0,rel:!0});var ug=r(gr);Fy=n(ug,"Opinion Classification with Kili and Hugging Face AutoTrain"),ug.forEach(t),Ry=n(vc," using RoBERTa."),vc.forEach(t),Ey=h(bt),_r=a(bt,"LI",{});var Tc=r(_r);xy=n(Tc,"A notebook on how to "),br=a(Tc,"A",{href:!0,rel:!0});var mg=r(br);jy=n(mg,"finetune RoBERTa for sentiment analysis"),mg.forEach(t),Jy=n(Tc,". \u{1F30E}"),Tc.forEach(t),Cy=h(bt),Eo=a(bt,"LI",{});var Go=r(Eo);qc=a(Go,"A",{href:!0});var $x=r(qc);zy=n($x,"RobertaForSequenceClassification"),$x.forEach(t),Iy=n(Go," is supported by this "),yr=a(Go,"A",{href:!0,rel:!0});var Fx=r(yr);Uy=n(Fx,"example script"),Fx.forEach(t),qy=n(Go," and "),vr=a(Go,"A",{href:!0,rel:!0});var Rx=r(vr);Ny=n(Rx,"notebook"),Rx.forEach(t),Wy=n(Go,"."),Go.forEach(t),Zy=h(bt),xo=a(bt,"LI",{});var kc=r(xo);Nc=a(kc,"A",{href:!0});var Ex=r(Nc);Ay=n(Ex,"TFRobertaForSequenceClassification"),Ex.forEach(t),By=n(kc," is supported by this "),Tr=a(kc,"A",{href:!0,rel:!0});var xx=r(Tr);Gy=n(xx,"example script"),xx.forEach(t),Sy=n(kc," and "),kr=a(kc,"A",{href:!0,rel:!0});var jx=r(kr);Vy=n(jx,"notebook"),jx.forEach(t),Xy=n(kc,"."),kc.forEach(t),Py=h(bt),jo=a(bt,"LI",{});var wc=r(jo);Wc=a(wc,"A",{href:!0});var Jx=r(Wc);Ly=n(Jx,"FlaxRobertaForSequenceClassification"),Jx.forEach(t),Qy=n(wc," is supported by this "),wr=a(wc,"A",{href:!0,rel:!0});var Cx=r(wr);Oy=n(Cx,"example script"),Cx.forEach(t),Dy=n(wc," and "),Mr=a(wc,"A",{href:!0,rel:!0});var zx=r(Mr);Yy=n(zx,"notebook"),zx.forEach(t),Hy=n(wc,"."),wc.forEach(t),Ky=h(bt),jh=a(bt,"LI",{});var Ix=r(jh);Zc=a(Ix,"A",{href:!0});var Ux=r(Zc);ev=n(Ux,"Text classification task guide"),Ux.forEach(t),Ix.forEach(t),bt.forEach(t),wg=h(l),k($r.$$.fragment,l),Mg=h(l),xt=a(l,"UL",{});var So=r(xt);Jo=a(So,"LI",{});var Mc=r(Jo);Ac=a(Mc,"A",{href:!0});var qx=r(Ac);tv=n(qx,"RobertaForTokenClassification"),qx.forEach(t),ov=n(Mc," is supported by this "),Fr=a(Mc,"A",{href:!0,rel:!0});var Nx=r(Fr);nv=n(Nx,"example script"),Nx.forEach(t),sv=n(Mc," and "),Rr=a(Mc,"A",{href:!0,rel:!0});var Wx=r(Rr);av=n(Wx,"notebook"),Wx.forEach(t),rv=n(Mc,"."),Mc.forEach(t),lv=h(So),Co=a(So,"LI",{});var $c=r(Co);Bc=a($c,"A",{href:!0});var Zx=r(Bc);iv=n(Zx,"TFRobertaForTokenClassification"),Zx.forEach(t),dv=n($c," is supported by this "),Er=a($c,"A",{href:!0,rel:!0});var Ax=r(Er);cv=n(Ax,"example script"),Ax.forEach(t),pv=n($c," and "),xr=a($c,"A",{href:!0,rel:!0});var Bx=r(xr);hv=n(Bx,"notebook"),Bx.forEach(t),uv=n($c,"."),$c.forEach(t),mv=h(So),as=a(So,"LI",{});var fg=r(as);Gc=a(fg,"A",{href:!0});var Gx=r(Gc);fv=n(Gx,"FlaxRobertaForTokenClassification"),Gx.forEach(t),gv=n(fg," is supported by this "),jr=a(fg,"A",{href:!0,rel:!0});var Sx=r(jr);_v=n(Sx,"example script"),Sx.forEach(t),bv=n(fg,"."),fg.forEach(t),yv=h(So),Sc=a(So,"LI",{});var yx=r(Sc);Jr=a(yx,"A",{href:!0,rel:!0});var Vx=r(Jr);vv=n(Vx,"Token classification"),Vx.forEach(t),Tv=n(yx," chapter of the \u{1F917} Hugging Face Course."),yx.forEach(t),kv=h(So),Jh=a(So,"LI",{});var Xx=r(Jh);Vc=a(Xx,"A",{href:!0});var Px=r(Vc);wv=n(Px,"Token classification task guide"),Px.forEach(t),Xx.forEach(t),So.forEach(t),$g=h(l),k(Cr.$$.fragment,l),Fg=h(l),yt=a(l,"UL",{});var lo=r(yt);zr=a(lo,"LI",{});var F_=r(zr);Mv=n(F_,"A blog on "),Ir=a(F_,"A",{href:!0,rel:!0});var Lx=r(Ir);$v=n(Lx,"How to train a new language model from scratch using Transformers and Tokenizers"),Lx.forEach(t),Fv=n(F_," with RoBERTa."),F_.forEach(t),Rv=h(lo),zo=a(lo,"LI",{});var Fc=r(zo);Xc=a(Fc,"A",{href:!0});var Qx=r(Xc);Ev=n(Qx,"RobertaForMaskedLM"),Qx.forEach(t),xv=n(Fc," is supported by this "),Ur=a(Fc,"A",{href:!0,rel:!0});var Ox=r(Ur);jv=n(Ox,"example script"),Ox.forEach(t),Jv=n(Fc," and "),qr=a(Fc,"A",{href:!0,rel:!0});var Dx=r(qr);Cv=n(Dx,"notebook"),Dx.forEach(t),zv=n(Fc,"."),Fc.forEach(t),Iv=h(lo),Io=a(lo,"LI",{});var Rc=r(Io);Pc=a(Rc,"A",{href:!0});var Yx=r(Pc);Uv=n(Yx,"TFRobertaForMaskedLM"),Yx.forEach(t),qv=n(Rc," is supported by this "),Nr=a(Rc,"A",{href:!0,rel:!0});var Hx=r(Nr);Nv=n(Hx,"example script"),Hx.forEach(t),Wv=n(Rc," and "),Wr=a(Rc,"A",{href:!0,rel:!0});var Kx=r(Wr);Zv=n(Kx,"notebook"),Kx.forEach(t),Av=n(Rc,"."),Rc.forEach(t),Bv=h(lo),Uo=a(lo,"LI",{});var Ec=r(Uo);Lc=a(Ec,"A",{href:!0});var ej=r(Lc);Gv=n(ej,"FlaxRobertaForMaskedLM"),ej.forEach(t),Sv=n(Ec," is supported by this "),Zr=a(Ec,"A",{href:!0,rel:!0});var tj=r(Zr);Vv=n(tj,"example script"),tj.forEach(t),Xv=n(Ec," and "),Ar=a(Ec,"A",{href:!0,rel:!0});var oj=r(Ar);Pv=n(oj,"notebook"),oj.forEach(t),Lv=n(Ec,"."),Ec.forEach(t),Qv=h(lo),Qc=a(lo,"LI",{});var vx=r(Qc);Br=a(vx,"A",{href:!0,rel:!0});var nj=r(Br);Ov=n(nj,"Masked language modeling"),nj.forEach(t),Dv=n(vx," chapter of the \u{1F917} Hugging Face Course."),vx.forEach(t),Yv=h(lo),Ch=a(lo,"LI",{});var sj=r(Ch);Oc=a(sj,"A",{href:!0});var aj=r(Oc);Hv=n(aj,"Masked language modeling task guide"),aj.forEach(t),sj.forEach(t),lo.forEach(t),Rg=h(l),k(Gr.$$.fragment,l),Eg=h(l),vt=a(l,"UL",{});var io=r(vt);Sr=a(io,"LI",{});var R_=r(Sr);Kv=n(R_,"A blog on "),Vr=a(R_,"A",{href:!0,rel:!0});var rj=r(Vr);eT=n(rj,"Accelerated Inference with Optimum and Transformers Pipelines"),rj.forEach(t),tT=n(R_," with RoBERTa for question answering."),R_.forEach(t),oT=h(io),qo=a(io,"LI",{});var xc=r(qo);Dc=a(xc,"A",{href:!0});var lj=r(Dc);nT=n(lj,"RobertaForQuestionAnswering"),lj.forEach(t),sT=n(xc," is supported by this "),Xr=a(xc,"A",{href:!0,rel:!0});var ij=r(Xr);aT=n(ij,"example script"),ij.forEach(t),rT=n(xc," and "),Pr=a(xc,"A",{href:!0,rel:!0});var dj=r(Pr);lT=n(dj,"notebook"),dj.forEach(t),iT=n(xc,"."),xc.forEach(t),dT=h(io),No=a(io,"LI",{});var jc=r(No);Yc=a(jc,"A",{href:!0});var cj=r(Yc);cT=n(cj,"TFRobertaForQuestionAnswering"),cj.forEach(t),pT=n(jc," is supported by this "),Lr=a(jc,"A",{href:!0,rel:!0});var pj=r(Lr);hT=n(pj,"example script"),pj.forEach(t),uT=n(jc," and "),Qr=a(jc,"A",{href:!0,rel:!0});var hj=r(Qr);mT=n(hj,"notebook"),hj.forEach(t),fT=n(jc,"."),jc.forEach(t),gT=h(io),rs=a(io,"LI",{});var gg=r(rs);Hc=a(gg,"A",{href:!0});var uj=r(Hc);_T=n(uj,"FlaxRobertaForQuestionAnswering"),uj.forEach(t),bT=n(gg," is supported by this "),Or=a(gg,"A",{href:!0,rel:!0});var mj=r(Or);yT=n(mj,"example script"),mj.forEach(t),vT=n(gg,"."),gg.forEach(t),TT=h(io),Kc=a(io,"LI",{});var Tx=r(Kc);Dr=a(Tx,"A",{href:!0,rel:!0});var fj=r(Dr);kT=n(fj,"Question answering"),fj.forEach(t),wT=n(Tx," chapter of the \u{1F917} Hugging Face Course."),Tx.forEach(t),MT=h(io),zh=a(io,"LI",{});var gj=r(zh);ep=a(gj,"A",{href:!0});var _j=r(ep);$T=n(_j,"Question answering task guide"),_j.forEach(t),gj.forEach(t),io.forEach(t),xg=h(l),tp=a(l,"P",{});var bj=r(tp);Ih=a(bj,"STRONG",{});var yj=r(Ih);FT=n(yj,"Multiple choice"),yj.forEach(t),bj.forEach(t),jg=h(l),Wo=a(l,"UL",{});var Dp=r(Wo);Zo=a(Dp,"LI",{});var Jc=r(Zo);op=a(Jc,"A",{href:!0});var vj=r(op);RT=n(vj,"RobertaForMultipleChoice"),vj.forEach(t),ET=n(Jc," is supported by this "),Yr=a(Jc,"A",{href:!0,rel:!0});var Tj=r(Yr);xT=n(Tj,"example script"),Tj.forEach(t),jT=n(Jc," and "),Hr=a(Jc,"A",{href:!0,rel:!0});var kj=r(Hr);JT=n(kj,"notebook"),kj.forEach(t),CT=n(Jc,"."),Jc.forEach(t),zT=h(Dp),Ao=a(Dp,"LI",{});var Cc=r(Ao);np=a(Cc,"A",{href:!0});var wj=r(np);IT=n(wj,"TFRobertaForMultipleChoice"),wj.forEach(t),UT=n(Cc," is supported by this "),Kr=a(Cc,"A",{href:!0,rel:!0});var Mj=r(Kr);qT=n(Mj,"example script"),Mj.forEach(t),NT=n(Cc," and "),el=a(Cc,"A",{href:!0,rel:!0});var $j=r(el);WT=n($j,"notebook"),$j.forEach(t),ZT=n(Cc,"."),Cc.forEach(t),AT=h(Dp),Uh=a(Dp,"LI",{});var Fj=r(Uh);sp=a(Fj,"A",{href:!0});var Rj=r(sp);BT=n(Rj,"Multiple choice task guide"),Rj.forEach(t),Fj.forEach(t),Dp.forEach(t),Jg=h(l),nn=a(l,"H2",{class:!0});var E_=r(nn);ls=a(E_,"A",{id:!0,class:!0,href:!0});var Ej=r(ls);qh=a(Ej,"SPAN",{});var xj=r(qh);k(tl.$$.fragment,xj),xj.forEach(t),Ej.forEach(t),GT=h(E_),Nh=a(E_,"SPAN",{});var jj=r(Nh);ST=n(jj,"RobertaConfig"),jj.forEach(t),E_.forEach(t),Cg=h(l),St=a(l,"DIV",{class:!0});var Wa=r(St);k(ol.$$.fragment,Wa),VT=h(Wa),_o=a(Wa,"P",{});var Za=r(_o);XT=n(Za,"This is the configuration class to store the configuration of a "),ap=a(Za,"A",{href:!0});var Jj=r(ap);PT=n(Jj,"RobertaModel"),Jj.forEach(t),LT=n(Za," or a "),rp=a(Za,"A",{href:!0});var Cj=r(rp);QT=n(Cj,"TFRobertaModel"),Cj.forEach(t),OT=n(Za,`. It is
used to instantiate a RoBERTa model according to the specified arguments, defining the model architecture.
Instantiating a configuration with the defaults will yield a similar configuration to that of the RoBERTa
`),nl=a(Za,"A",{href:!0,rel:!0});var zj=r(nl);DT=n(zj,"roberta-base"),zj.forEach(t),YT=n(Za," architecture."),Za.forEach(t),HT=h(Wa),sn=a(Wa,"P",{});var Yp=r(sn);KT=n(Yp,"Configuration objects inherit from "),lp=a(Yp,"A",{href:!0});var Ij=r(lp);ek=n(Ij,"PretrainedConfig"),Ij.forEach(t),tk=n(Yp,` and can be used to control the model outputs. Read the
documentation from `),ip=a(Yp,"A",{href:!0});var Uj=r(ip);ok=n(Uj,"PretrainedConfig"),Uj.forEach(t),nk=n(Yp," for more information."),Yp.forEach(t),sk=h(Wa),k(is.$$.fragment,Wa),Wa.forEach(t),zg=h(l),an=a(l,"H2",{class:!0});var x_=r(an);ds=a(x_,"A",{id:!0,class:!0,href:!0});var qj=r(ds);Wh=a(qj,"SPAN",{});var Nj=r(Wh);k(sl.$$.fragment,Nj),Nj.forEach(t),qj.forEach(t),ak=h(x_),Zh=a(x_,"SPAN",{});var Wj=r(Zh);rk=n(Wj,"RobertaTokenizer"),Wj.forEach(t),x_.forEach(t),Ig=h(l),We=a(l,"DIV",{class:!0});var Xe=r(We);k(al.$$.fragment,Xe),lk=h(Xe),Ah=a(Xe,"P",{});var Zj=r(Ah);ik=n(Zj,"Constructs a RoBERTa tokenizer, derived from the GPT-2 tokenizer, using byte-level Byte-Pair-Encoding."),Zj.forEach(t),dk=h(Xe),Bh=a(Xe,"P",{});var Aj=r(Bh);ck=n(Aj,"This tokenizer has been trained to treat spaces like parts of the tokens (a bit like sentencepiece) so a word will"),Aj.forEach(t),pk=h(Xe),k(cs.$$.fragment,Xe),hk=h(Xe),rl=a(Xe,"P",{});var j_=r(rl);uk=n(j_,"You can get around that behavior by passing "),Gh=a(j_,"CODE",{});var Bj=r(Gh);mk=n(Bj,"add_prefix_space=True"),Bj.forEach(t),fk=n(j_,` when instantiating this tokenizer or when you
call it on some text, but since the model was not pretrained this way, it might yield a decrease in performance.`),j_.forEach(t),gk=h(Xe),k(ps.$$.fragment,Xe),_k=h(Xe),ll=a(Xe,"P",{});var J_=r(ll);bk=n(J_,"This tokenizer inherits from "),dp=a(J_,"A",{href:!0});var Gj=r(dp);yk=n(Gj,"PreTrainedTokenizer"),Gj.forEach(t),vk=n(J_,` which contains most of the main methods. Users should refer to
this superclass for more information regarding those methods.`),J_.forEach(t),Tk=h(Xe),Bo=a(Xe,"DIV",{class:!0});var Hp=r(Bo);k(il.$$.fragment,Hp),kk=h(Hp),Sh=a(Hp,"P",{});var Sj=r(Sh);wk=n(Sj,`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:`),Sj.forEach(t),Mk=h(Hp),dl=a(Hp,"UL",{});var C_=r(dl);cp=a(C_,"LI",{});var kx=r(cp);$k=n(kx,"single sequence: "),Vh=a(kx,"CODE",{});var Vj=r(Vh);Fk=n(Vj,"<s> X </s>"),Vj.forEach(t),kx.forEach(t),Rk=h(C_),pp=a(C_,"LI",{});var wx=r(pp);Ek=n(wx,"pair of sequences: "),Xh=a(wx,"CODE",{});var Xj=r(Xh);xk=n(Xj,"<s> A </s></s> B </s>"),Xj.forEach(t),wx.forEach(t),C_.forEach(t),Hp.forEach(t),jk=h(Xe),hs=a(Xe,"DIV",{class:!0});var z_=r(hs);k(cl.$$.fragment,z_),Jk=h(z_),pl=a(z_,"P",{});var I_=r(pl);Ck=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 `),Ph=a(I_,"CODE",{});var Pj=r(Ph);zk=n(Pj,"prepare_for_model"),Pj.forEach(t),Ik=n(I_," method."),I_.forEach(t),z_.forEach(t),Uk=h(Xe),us=a(Xe,"DIV",{class:!0});var U_=r(us);k(hl.$$.fragment,U_),qk=h(U_),Lh=a(U_,"P",{});var Lj=r(Lh);Nk=n(Lj,`Create a mask from the two sequences passed to be used in a sequence-pair classification task. RoBERTa does not
make use of token type ids, therefore a list of zeros is returned.`),Lj.forEach(t),U_.forEach(t),Wk=h(Xe),hp=a(Xe,"DIV",{class:!0});var Qj=r(hp);k(ul.$$.fragment,Qj),Qj.forEach(t),Xe.forEach(t),Ug=h(l),rn=a(l,"H2",{class:!0});var q_=r(rn);ms=a(q_,"A",{id:!0,class:!0,href:!0});var Oj=r(ms);Qh=a(Oj,"SPAN",{});var Dj=r(Qh);k(ml.$$.fragment,Dj),Dj.forEach(t),Oj.forEach(t),Zk=h(q_),Oh=a(q_,"SPAN",{});var Yj=r(Oh);Ak=n(Yj,"RobertaTokenizerFast"),Yj.forEach(t),q_.forEach(t),qg=h(l),tt=a(l,"DIV",{class:!0});var Tt=r(tt);k(fl.$$.fragment,Tt),Bk=h(Tt),gl=a(Tt,"P",{});var N_=r(gl);Gk=n(N_,"Construct a \u201Cfast\u201D RoBERTa tokenizer (backed by HuggingFace\u2019s "),Dh=a(N_,"EM",{});var Hj=r(Dh);Sk=n(Hj,"tokenizers"),Hj.forEach(t),Vk=n(N_,` library), derived from the GPT-2
tokenizer, using byte-level Byte-Pair-Encoding.`),N_.forEach(t),Xk=h(Tt),Yh=a(Tt,"P",{});var Kj=r(Yh);Pk=n(Kj,"This tokenizer has been trained to treat spaces like parts of the tokens (a bit like sentencepiece) so a word will"),Kj.forEach(t),Lk=h(Tt),k(fs.$$.fragment,Tt),Qk=h(Tt),_l=a(Tt,"P",{});var W_=r(_l);Ok=n(W_,"You can get around that behavior by passing "),Hh=a(W_,"CODE",{});var e3=r(Hh);Dk=n(e3,"add_prefix_space=True"),e3.forEach(t),Yk=n(W_,` when instantiating this tokenizer or when you
call it on some text, but since the model was not pretrained this way, it might yield a decrease in performance.`),W_.forEach(t),Hk=h(Tt),k(gs.$$.fragment,Tt),Kk=h(Tt),bl=a(Tt,"P",{});var Z_=r(bl);ew=n(Z_,"This tokenizer inherits from "),up=a(Z_,"A",{href:!0});var t3=r(up);tw=n(t3,"PreTrainedTokenizerFast"),t3.forEach(t),ow=n(Z_,` which contains most of the main methods. Users should
refer to this superclass for more information regarding those methods.`),Z_.forEach(t),nw=h(Tt),mp=a(Tt,"DIV",{class:!0});var o3=r(mp);k(yl.$$.fragment,o3),o3.forEach(t),Tt.forEach(t),Ng=h(l),ln=a(l,"H2",{class:!0});var A_=r(ln);_s=a(A_,"A",{id:!0,class:!0,href:!0});var n3=r(_s);Kh=a(n3,"SPAN",{});var s3=r(Kh);k(vl.$$.fragment,s3),s3.forEach(t),n3.forEach(t),sw=h(A_),eu=a(A_,"SPAN",{});var a3=r(eu);aw=n(a3,"RobertaModel"),a3.forEach(t),A_.forEach(t),Wg=h(l),ot=a(l,"DIV",{class:!0});var kt=r(ot);k(Tl.$$.fragment,kt),rw=h(kt),tu=a(kt,"P",{});var r3=r(tu);lw=n(r3,"The bare RoBERTa Model transformer outputting raw hidden-states without any specific head on top."),r3.forEach(t),iw=h(kt),kl=a(kt,"P",{});var B_=r(kl);dw=n(B_,"This model inherits from "),fp=a(B_,"A",{href:!0});var l3=r(fp);cw=n(l3,"PreTrainedModel"),l3.forEach(t),pw=n(B_,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),B_.forEach(t),hw=h(kt),wl=a(kt,"P",{});var G_=r(wl);uw=n(G_,"This model is also a PyTorch "),Ml=a(G_,"A",{href:!0,rel:!0});var i3=r(Ml);mw=n(i3,"torch.nn.Module"),i3.forEach(t),fw=n(G_,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),G_.forEach(t),gw=h(kt),$l=a(kt,"P",{});var S_=r($l);_w=n(S_,`The model can behave as an encoder (with only self-attention) as well as a decoder, in which case a layer of
cross-attention is added between the self-attention layers, following the architecture described in `),ou=a(S_,"EM",{});var d3=r(ou);bw=n(d3,`Attention is
all you need`),d3.forEach(t),yw=n(S_,`_ by Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N. Gomez, Lukasz
Kaiser and Illia Polosukhin.`),S_.forEach(t),vw=h(kt),pt=a(kt,"P",{});var Ut=r(pt);Tw=n(Ut,"To behave as an decoder the model needs to be initialized with the "),nu=a(Ut,"CODE",{});var c3=r(nu);kw=n(c3,"is_decoder"),c3.forEach(t),ww=n(Ut,` argument of the configuration set
to `),su=a(Ut,"CODE",{});var p3=r(su);Mw=n(p3,"True"),p3.forEach(t),$w=n(Ut,". To be used in a Seq2Seq model, the model needs to initialized with both "),au=a(Ut,"CODE",{});var h3=r(au);Fw=n(h3,"is_decoder"),h3.forEach(t),Rw=n(Ut,` argument and
`),ru=a(Ut,"CODE",{});var u3=r(ru);Ew=n(u3,"add_cross_attention"),u3.forEach(t),xw=n(Ut," set to "),lu=a(Ut,"CODE",{});var m3=r(lu);jw=n(m3,"True"),m3.forEach(t),Jw=n(Ut,"; an "),iu=a(Ut,"CODE",{});var f3=r(iu);Cw=n(f3,"encoder_hidden_states"),f3.forEach(t),zw=n(Ut," is then expected as an input to the forward pass."),Ut.forEach(t),Iw=h(kt),bs=a(kt,"P",{});var _g=r(bs);Uw=n(_g,".. _"),du=a(_g,"EM",{});var g3=r(du);qw=n(g3,"Attention is all you need"),g3.forEach(t),Nw=n(_g,": "),Fl=a(_g,"A",{href:!0,rel:!0});var _3=r(Fl);Ww=n(_3,"https://arxiv.org/abs/1706.03762"),_3.forEach(t),_g.forEach(t),Zw=h(kt),Xt=a(kt,"DIV",{class:!0});var Aa=r(Xt);k(Rl.$$.fragment,Aa),Aw=h(Aa),dn=a(Aa,"P",{});var Kp=r(dn);Bw=n(Kp,"The "),gp=a(Kp,"A",{href:!0});var b3=r(gp);Gw=n(b3,"RobertaModel"),b3.forEach(t),Sw=n(Kp," forward method, overrides the "),cu=a(Kp,"CODE",{});var y3=r(cu);Vw=n(y3,"__call__"),y3.forEach(t),Xw=n(Kp," special method."),Kp.forEach(t),Pw=h(Aa),k(ys.$$.fragment,Aa),Lw=h(Aa),k(vs.$$.fragment,Aa),Aa.forEach(t),kt.forEach(t),Zg=h(l),cn=a(l,"H2",{class:!0});var V_=r(cn);Ts=a(V_,"A",{id:!0,class:!0,href:!0});var v3=r(Ts);pu=a(v3,"SPAN",{});var T3=r(pu);k(El.$$.fragment,T3),T3.forEach(t),v3.forEach(t),Qw=h(V_),hu=a(V_,"SPAN",{});var k3=r(hu);Ow=n(k3,"RobertaForCausalLM"),k3.forEach(t),V_.forEach(t),Ag=h(l),wt=a(l,"DIV",{class:!0});var Vo=r(wt);k(xl.$$.fragment,Vo),Dw=h(Vo),jl=a(Vo,"P",{});var X_=r(jl);Yw=n(X_,"RoBERTa Model with a "),uu=a(X_,"CODE",{});var w3=r(uu);Hw=n(w3,"language modeling"),w3.forEach(t),Kw=n(X_," head on top for CLM fine-tuning."),X_.forEach(t),e0=h(Vo),Jl=a(Vo,"P",{});var P_=r(Jl);t0=n(P_,"This model inherits from "),_p=a(P_,"A",{href:!0});var M3=r(_p);o0=n(M3,"PreTrainedModel"),M3.forEach(t),n0=n(P_,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),P_.forEach(t),s0=h(Vo),Cl=a(Vo,"P",{});var L_=r(Cl);a0=n(L_,"This model is also a PyTorch "),zl=a(L_,"A",{href:!0,rel:!0});var $3=r(zl);r0=n($3,"torch.nn.Module"),$3.forEach(t),l0=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),i0=h(Vo),Pt=a(Vo,"DIV",{class:!0});var Ba=r(Pt);k(Il.$$.fragment,Ba),d0=h(Ba),pn=a(Ba,"P",{});var eh=r(pn);c0=n(eh,"The "),bp=a(eh,"A",{href:!0});var F3=r(bp);p0=n(F3,"RobertaForCausalLM"),F3.forEach(t),h0=n(eh," forward method, overrides the "),mu=a(eh,"CODE",{});var R3=r(mu);u0=n(R3,"__call__"),R3.forEach(t),m0=n(eh," special method."),eh.forEach(t),f0=h(Ba),k(ks.$$.fragment,Ba),g0=h(Ba),k(ws.$$.fragment,Ba),Ba.forEach(t),Vo.forEach(t),Bg=h(l),hn=a(l,"H2",{class:!0});var Q_=r(hn);Ms=a(Q_,"A",{id:!0,class:!0,href:!0});var E3=r(Ms);fu=a(E3,"SPAN",{});var x3=r(fu);k(Ul.$$.fragment,x3),x3.forEach(t),E3.forEach(t),_0=h(Q_),gu=a(Q_,"SPAN",{});var j3=r(gu);b0=n(j3,"RobertaForMaskedLM"),j3.forEach(t),Q_.forEach(t),Gg=h(l),Mt=a(l,"DIV",{class:!0});var Xo=r(Mt);k(ql.$$.fragment,Xo),y0=h(Xo),Nl=a(Xo,"P",{});var O_=r(Nl);v0=n(O_,"RoBERTa Model with a "),_u=a(O_,"CODE",{});var J3=r(_u);T0=n(J3,"language modeling"),J3.forEach(t),k0=n(O_," head on top."),O_.forEach(t),w0=h(Xo),Wl=a(Xo,"P",{});var D_=r(Wl);M0=n(D_,"This model inherits from "),yp=a(D_,"A",{href:!0});var C3=r(yp);$0=n(C3,"PreTrainedModel"),C3.forEach(t),F0=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),R0=h(Xo),Zl=a(Xo,"P",{});var Y_=r(Zl);E0=n(Y_,"This model is also a PyTorch "),Al=a(Y_,"A",{href:!0,rel:!0});var z3=r(Al);x0=n(z3,"torch.nn.Module"),z3.forEach(t),j0=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),J0=h(Xo),Lt=a(Xo,"DIV",{class:!0});var Ga=r(Lt);k(Bl.$$.fragment,Ga),C0=h(Ga),un=a(Ga,"P",{});var th=r(un);z0=n(th,"The "),vp=a(th,"A",{href:!0});var I3=r(vp);I0=n(I3,"RobertaForMaskedLM"),I3.forEach(t),U0=n(th," forward method, overrides the "),bu=a(th,"CODE",{});var U3=r(bu);q0=n(U3,"__call__"),U3.forEach(t),N0=n(th," special method."),th.forEach(t),W0=h(Ga),k($s.$$.fragment,Ga),Z0=h(Ga),k(Fs.$$.fragment,Ga),Ga.forEach(t),Xo.forEach(t),Sg=h(l),mn=a(l,"H2",{class:!0});var H_=r(mn);Rs=a(H_,"A",{id:!0,class:!0,href:!0});var q3=r(Rs);yu=a(q3,"SPAN",{});var N3=r(yu);k(Gl.$$.fragment,N3),N3.forEach(t),q3.forEach(t),A0=h(H_),vu=a(H_,"SPAN",{});var W3=r(vu);B0=n(W3,"RobertaForSequenceClassification"),W3.forEach(t),H_.forEach(t),Vg=h(l),$t=a(l,"DIV",{class:!0});var Po=r($t);k(Sl.$$.fragment,Po),G0=h(Po),Tu=a(Po,"P",{});var Z3=r(Tu);S0=n(Z3,`RoBERTa Model transformer with a sequence classification/regression head on top (a linear layer on top of the
pooled output) e.g. for GLUE tasks.`),Z3.forEach(t),V0=h(Po),Vl=a(Po,"P",{});var K_=r(Vl);X0=n(K_,"This model inherits from "),Tp=a(K_,"A",{href:!0});var A3=r(Tp);P0=n(A3,"PreTrainedModel"),A3.forEach(t),L0=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),Q0=h(Po),Xl=a(Po,"P",{});var eb=r(Xl);O0=n(eb,"This model is also a PyTorch "),Pl=a(eb,"A",{href:!0,rel:!0});var B3=r(Pl);D0=n(B3,"torch.nn.Module"),B3.forEach(t),Y0=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),H0=h(Po),jt=a(Po,"DIV",{class:!0});var Lo=r(jt);k(Ll.$$.fragment,Lo),K0=h(Lo),fn=a(Lo,"P",{});var oh=r(fn);eM=n(oh,"The "),kp=a(oh,"A",{href:!0});var G3=r(kp);tM=n(G3,"RobertaForSequenceClassification"),G3.forEach(t),oM=n(oh," forward method, overrides the "),ku=a(oh,"CODE",{});var S3=r(ku);nM=n(S3,"__call__"),S3.forEach(t),sM=n(oh," special method."),oh.forEach(t),aM=h(Lo),k(Es.$$.fragment,Lo),rM=h(Lo),k(xs.$$.fragment,Lo),lM=h(Lo),k(js.$$.fragment,Lo),Lo.forEach(t),Po.forEach(t),Xg=h(l),gn=a(l,"H2",{class:!0});var tb=r(gn);Js=a(tb,"A",{id:!0,class:!0,href:!0});var V3=r(Js);wu=a(V3,"SPAN",{});var X3=r(wu);k(Ql.$$.fragment,X3),X3.forEach(t),V3.forEach(t),iM=h(tb),Mu=a(tb,"SPAN",{});var P3=r(Mu);dM=n(P3,"RobertaForMultipleChoice"),P3.forEach(t),tb.forEach(t),Pg=h(l),Ft=a(l,"DIV",{class:!0});var Qo=r(Ft);k(Ol.$$.fragment,Qo),cM=h(Qo),$u=a(Qo,"P",{});var L3=r($u);pM=n(L3,`Roberta Model with a multiple choice classification head on top (a linear layer on top of the pooled output and a
softmax) e.g. for RocStories/SWAG tasks.`),L3.forEach(t),hM=h(Qo),Dl=a(Qo,"P",{});var ob=r(Dl);uM=n(ob,"This model inherits from "),wp=a(ob,"A",{href:!0});var Q3=r(wp);mM=n(Q3,"PreTrainedModel"),Q3.forEach(t),fM=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),gM=h(Qo),Yl=a(Qo,"P",{});var nb=r(Yl);_M=n(nb,"This model is also a PyTorch "),Hl=a(nb,"A",{href:!0,rel:!0});var O3=r(Hl);bM=n(O3,"torch.nn.Module"),O3.forEach(t),yM=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),vM=h(Qo),Qt=a(Qo,"DIV",{class:!0});var Sa=r(Qt);k(Kl.$$.fragment,Sa),TM=h(Sa),_n=a(Sa,"P",{});var nh=r(_n);kM=n(nh,"The "),Mp=a(nh,"A",{href:!0});var D3=r(Mp);wM=n(D3,"RobertaForMultipleChoice"),D3.forEach(t),MM=n(nh," forward method, overrides the "),Fu=a(nh,"CODE",{});var Y3=r(Fu);$M=n(Y3,"__call__"),Y3.forEach(t),FM=n(nh," special method."),nh.forEach(t),RM=h(Sa),k(Cs.$$.fragment,Sa),EM=h(Sa),k(zs.$$.fragment,Sa),Sa.forEach(t),Qo.forEach(t),Lg=h(l),bn=a(l,"H2",{class:!0});var sb=r(bn);Is=a(sb,"A",{id:!0,class:!0,href:!0});var H3=r(Is);Ru=a(H3,"SPAN",{});var K3=r(Ru);k(ei.$$.fragment,K3),K3.forEach(t),H3.forEach(t),xM=h(sb),Eu=a(sb,"SPAN",{});var eJ=r(Eu);jM=n(eJ,"RobertaForTokenClassification"),eJ.forEach(t),sb.forEach(t),Qg=h(l),Rt=a(l,"DIV",{class:!0});var Oo=r(Rt);k(ti.$$.fragment,Oo),JM=h(Oo),xu=a(Oo,"P",{});var tJ=r(xu);CM=n(tJ,`Roberta Model with a token classification head on top (a linear layer on top of the hidden-states output) e.g. for
Named-Entity-Recognition (NER) tasks.`),tJ.forEach(t),zM=h(Oo),oi=a(Oo,"P",{});var ab=r(oi);IM=n(ab,"This model inherits from "),$p=a(ab,"A",{href:!0});var oJ=r($p);UM=n(oJ,"PreTrainedModel"),oJ.forEach(t),qM=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),NM=h(Oo),ni=a(Oo,"P",{});var rb=r(ni);WM=n(rb,"This model is also a PyTorch "),si=a(rb,"A",{href:!0,rel:!0});var nJ=r(si);ZM=n(nJ,"torch.nn.Module"),nJ.forEach(t),AM=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),BM=h(Oo),Ot=a(Oo,"DIV",{class:!0});var Va=r(Ot);k(ai.$$.fragment,Va),GM=h(Va),yn=a(Va,"P",{});var sh=r(yn);SM=n(sh,"The "),Fp=a(sh,"A",{href:!0});var sJ=r(Fp);VM=n(sJ,"RobertaForTokenClassification"),sJ.forEach(t),XM=n(sh," forward method, overrides the "),ju=a(sh,"CODE",{});var aJ=r(ju);PM=n(aJ,"__call__"),aJ.forEach(t),LM=n(sh," special method."),sh.forEach(t),QM=h(Va),k(Us.$$.fragment,Va),OM=h(Va),k(qs.$$.fragment,Va),Va.forEach(t),Oo.forEach(t),Og=h(l),vn=a(l,"H2",{class:!0});var lb=r(vn);Ns=a(lb,"A",{id:!0,class:!0,href:!0});var rJ=r(Ns);Ju=a(rJ,"SPAN",{});var lJ=r(Ju);k(ri.$$.fragment,lJ),lJ.forEach(t),rJ.forEach(t),DM=h(lb),Cu=a(lb,"SPAN",{});var iJ=r(Cu);YM=n(iJ,"RobertaForQuestionAnswering"),iJ.forEach(t),lb.forEach(t),Dg=h(l),Et=a(l,"DIV",{class:!0});var Do=r(Et);k(li.$$.fragment,Do),HM=h(Do),Tn=a(Do,"P",{});var ah=r(Tn);KM=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 `),zu=a(ah,"CODE",{});var dJ=r(zu);e1=n(dJ,"span start logits"),dJ.forEach(t),t1=n(ah," and "),Iu=a(ah,"CODE",{});var cJ=r(Iu);o1=n(cJ,"span end logits"),cJ.forEach(t),n1=n(ah,")."),ah.forEach(t),s1=h(Do),ii=a(Do,"P",{});var ib=r(ii);a1=n(ib,"This model inherits from "),Rp=a(ib,"A",{href:!0});var pJ=r(Rp);r1=n(pJ,"PreTrainedModel"),pJ.forEach(t),l1=n(ib,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),ib.forEach(t),i1=h(Do),di=a(Do,"P",{});var db=r(di);d1=n(db,"This model is also a PyTorch "),ci=a(db,"A",{href:!0,rel:!0});var hJ=r(ci);c1=n(hJ,"torch.nn.Module"),hJ.forEach(t),p1=n(db,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),db.forEach(t),h1=h(Do),Dt=a(Do,"DIV",{class:!0});var Xa=r(Dt);k(pi.$$.fragment,Xa),u1=h(Xa),kn=a(Xa,"P",{});var rh=r(kn);m1=n(rh,"The "),Ep=a(rh,"A",{href:!0});var uJ=r(Ep);f1=n(uJ,"RobertaForQuestionAnswering"),uJ.forEach(t),g1=n(rh," forward method, overrides the "),Uu=a(rh,"CODE",{});var mJ=r(Uu);_1=n(mJ,"__call__"),mJ.forEach(t),b1=n(rh," special method."),rh.forEach(t),y1=h(Xa),k(Ws.$$.fragment,Xa),v1=h(Xa),k(Zs.$$.fragment,Xa),Xa.forEach(t),Do.forEach(t),Yg=h(l),wn=a(l,"H2",{class:!0});var cb=r(wn);As=a(cb,"A",{id:!0,class:!0,href:!0});var fJ=r(As);qu=a(fJ,"SPAN",{});var gJ=r(qu);k(hi.$$.fragment,gJ),gJ.forEach(t),fJ.forEach(t),T1=h(cb),Nu=a(cb,"SPAN",{});var _J=r(Nu);k1=n(_J,"TFRobertaModel"),_J.forEach(t),cb.forEach(t),Hg=h(l),ht=a(l,"DIV",{class:!0});var co=r(ht);k(ui.$$.fragment,co),w1=h(co),Wu=a(co,"P",{});var bJ=r(Wu);M1=n(bJ,"The bare RoBERTa Model transformer outputting raw hidden-states without any specific head on top."),bJ.forEach(t),$1=h(co),mi=a(co,"P",{});var pb=r(mi);F1=n(pb,"This model inherits from "),xp=a(pb,"A",{href:!0});var yJ=r(xp);R1=n(yJ,"TFPreTrainedModel"),yJ.forEach(t),E1=n(pb,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),pb.forEach(t),x1=h(co),fi=a(co,"P",{});var hb=r(fi);j1=n(hb,"This model is also a "),gi=a(hb,"A",{href:!0,rel:!0});var vJ=r(gi);J1=n(vJ,"tf.keras.Model"),vJ.forEach(t),C1=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),z1=h(co),k(Bs.$$.fragment,co),I1=h(co),Yt=a(co,"DIV",{class:!0});var Pa=r(Yt);k(_i.$$.fragment,Pa),U1=h(Pa),Mn=a(Pa,"P",{});var lh=r(Mn);q1=n(lh,"The "),jp=a(lh,"A",{href:!0});var TJ=r(jp);N1=n(TJ,"TFRobertaModel"),TJ.forEach(t),W1=n(lh," forward method, overrides the "),Zu=a(lh,"CODE",{});var kJ=r(Zu);Z1=n(kJ,"__call__"),kJ.forEach(t),A1=n(lh," special method."),lh.forEach(t),B1=h(Pa),k(Gs.$$.fragment,Pa),G1=h(Pa),k(Ss.$$.fragment,Pa),Pa.forEach(t),co.forEach(t),Kg=h(l),$n=a(l,"H2",{class:!0});var ub=r($n);Vs=a(ub,"A",{id:!0,class:!0,href:!0});var wJ=r(Vs);Au=a(wJ,"SPAN",{});var MJ=r(Au);k(bi.$$.fragment,MJ),MJ.forEach(t),wJ.forEach(t),S1=h(ub),Bu=a(ub,"SPAN",{});var $J=r(Bu);V1=n($J,"TFRobertaForCausalLM"),$J.forEach(t),ub.forEach(t),e_=h(l),Fn=a(l,"DIV",{class:!0});var mb=r(Fn);k(yi.$$.fragment,mb),X1=h(mb),Ht=a(mb,"DIV",{class:!0});var La=r(Ht);k(vi.$$.fragment,La),P1=h(La),Rn=a(La,"P",{});var ih=r(Rn);L1=n(ih,"The "),Jp=a(ih,"A",{href:!0});var FJ=r(Jp);Q1=n(FJ,"TFRobertaForCausalLM"),FJ.forEach(t),O1=n(ih," forward method, overrides the "),Gu=a(ih,"CODE",{});var RJ=r(Gu);D1=n(RJ,"__call__"),RJ.forEach(t),Y1=n(ih," special method."),ih.forEach(t),H1=h(La),k(Xs.$$.fragment,La),K1=h(La),k(Ps.$$.fragment,La),La.forEach(t),mb.forEach(t),t_=h(l),En=a(l,"H2",{class:!0});var fb=r(En);Ls=a(fb,"A",{id:!0,class:!0,href:!0});var EJ=r(Ls);Su=a(EJ,"SPAN",{});var xJ=r(Su);k(Ti.$$.fragment,xJ),xJ.forEach(t),EJ.forEach(t),e2=h(fb),Vu=a(fb,"SPAN",{});var jJ=r(Vu);t2=n(jJ,"TFRobertaForMaskedLM"),jJ.forEach(t),fb.forEach(t),o_=h(l),ut=a(l,"DIV",{class:!0});var po=r(ut);k(ki.$$.fragment,po),o2=h(po),wi=a(po,"P",{});var gb=r(wi);n2=n(gb,"RoBERTa Model with a "),Xu=a(gb,"CODE",{});var JJ=r(Xu);s2=n(JJ,"language modeling"),JJ.forEach(t),a2=n(gb," head on top."),gb.forEach(t),r2=h(po),Mi=a(po,"P",{});var _b=r(Mi);l2=n(_b,"This model inherits from "),Cp=a(_b,"A",{href:!0});var CJ=r(Cp);i2=n(CJ,"TFPreTrainedModel"),CJ.forEach(t),d2=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),c2=h(po),$i=a(po,"P",{});var bb=r($i);p2=n(bb,"This model is also a "),Fi=a(bb,"A",{href:!0,rel:!0});var zJ=r(Fi);h2=n(zJ,"tf.keras.Model"),zJ.forEach(t),u2=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),m2=h(po),k(Qs.$$.fragment,po),f2=h(po),Jt=a(po,"DIV",{class:!0});var Yo=r(Jt);k(Ri.$$.fragment,Yo),g2=h(Yo),xn=a(Yo,"P",{});var dh=r(xn);_2=n(dh,"The "),zp=a(dh,"A",{href:!0});var IJ=r(zp);b2=n(IJ,"TFRobertaForMaskedLM"),IJ.forEach(t),y2=n(dh," forward method, overrides the "),Pu=a(dh,"CODE",{});var UJ=r(Pu);v2=n(UJ,"__call__"),UJ.forEach(t),T2=n(dh," special method."),dh.forEach(t),k2=h(Yo),k(Os.$$.fragment,Yo),w2=h(Yo),k(Ds.$$.fragment,Yo),M2=h(Yo),k(Ys.$$.fragment,Yo),Yo.forEach(t),po.forEach(t),n_=h(l),jn=a(l,"H2",{class:!0});var yb=r(jn);Hs=a(yb,"A",{id:!0,class:!0,href:!0});var qJ=r(Hs);Lu=a(qJ,"SPAN",{});var NJ=r(Lu);k(Ei.$$.fragment,NJ),NJ.forEach(t),qJ.forEach(t),$2=h(yb),Qu=a(yb,"SPAN",{});var WJ=r(Qu);F2=n(WJ,"TFRobertaForSequenceClassification"),WJ.forEach(t),yb.forEach(t),s_=h(l),mt=a(l,"DIV",{class:!0});var ho=r(mt);k(xi.$$.fragment,ho),R2=h(ho),Ou=a(ho,"P",{});var ZJ=r(Ou);E2=n(ZJ,`RoBERTa Model transformer with a sequence classification/regression head on top (a linear layer on top of the
pooled output) e.g. for GLUE tasks.`),ZJ.forEach(t),x2=h(ho),ji=a(ho,"P",{});var vb=r(ji);j2=n(vb,"This model inherits from "),Ip=a(vb,"A",{href:!0});var AJ=r(Ip);J2=n(AJ,"TFPreTrainedModel"),AJ.forEach(t),C2=n(vb,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),vb.forEach(t),z2=h(ho),Ji=a(ho,"P",{});var Tb=r(Ji);I2=n(Tb,"This model is also a "),Ci=a(Tb,"A",{href:!0,rel:!0});var BJ=r(Ci);U2=n(BJ,"tf.keras.Model"),BJ.forEach(t),q2=n(Tb,` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),Tb.forEach(t),N2=h(ho),k(Ks.$$.fragment,ho),W2=h(ho),Ct=a(ho,"DIV",{class:!0});var Ho=r(Ct);k(zi.$$.fragment,Ho),Z2=h(Ho),Jn=a(Ho,"P",{});var ch=r(Jn);A2=n(ch,"The "),Up=a(ch,"A",{href:!0});var GJ=r(Up);B2=n(GJ,"TFRobertaForSequenceClassification"),GJ.forEach(t),G2=n(ch," forward method, overrides the "),Du=a(ch,"CODE",{});var SJ=r(Du);S2=n(SJ,"__call__"),SJ.forEach(t),V2=n(ch," special method."),ch.forEach(t),X2=h(Ho),k(ea.$$.fragment,Ho),P2=h(Ho),k(ta.$$.fragment,Ho),L2=h(Ho),k(oa.$$.fragment,Ho),Ho.forEach(t),ho.forEach(t),a_=h(l),Cn=a(l,"H2",{class:!0});var kb=r(Cn);na=a(kb,"A",{id:!0,class:!0,href:!0});var VJ=r(na);Yu=a(VJ,"SPAN",{});var XJ=r(Yu);k(Ii.$$.fragment,XJ),XJ.forEach(t),VJ.forEach(t),Q2=h(kb),Hu=a(kb,"SPAN",{});var PJ=r(Hu);O2=n(PJ,"TFRobertaForMultipleChoice"),PJ.forEach(t),kb.forEach(t),r_=h(l),ft=a(l,"DIV",{class:!0});var uo=r(ft);k(Ui.$$.fragment,uo),D2=h(uo),Ku=a(uo,"P",{});var LJ=r(Ku);Y2=n(LJ,`Roberta Model with a multiple choice classification head on top (a linear layer on top of the pooled output and a
softmax) e.g. for RocStories/SWAG tasks.`),LJ.forEach(t),H2=h(uo),qi=a(uo,"P",{});var wb=r(qi);K2=n(wb,"This model inherits from "),qp=a(wb,"A",{href:!0});var QJ=r(qp);e$=n(QJ,"TFPreTrainedModel"),QJ.forEach(t),t$=n(wb,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),wb.forEach(t),o$=h(uo),Ni=a(uo,"P",{});var Mb=r(Ni);n$=n(Mb,"This model is also a "),Wi=a(Mb,"A",{href:!0,rel:!0});var OJ=r(Wi);s$=n(OJ,"tf.keras.Model"),OJ.forEach(t),a$=n(Mb,` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),Mb.forEach(t),r$=h(uo),k(sa.$$.fragment,uo),l$=h(uo),Kt=a(uo,"DIV",{class:!0});var Qa=r(Kt);k(Zi.$$.fragment,Qa),i$=h(Qa),zn=a(Qa,"P",{});var ph=r(zn);d$=n(ph,"The "),Np=a(ph,"A",{href:!0});var DJ=r(Np);c$=n(DJ,"TFRobertaForMultipleChoice"),DJ.forEach(t),p$=n(ph," forward method, overrides the "),em=a(ph,"CODE",{});var YJ=r(em);h$=n(YJ,"__call__"),YJ.forEach(t),u$=n(ph," special method."),ph.forEach(t),m$=h(Qa),k(aa.$$.fragment,Qa),f$=h(Qa),k(ra.$$.fragment,Qa),Qa.forEach(t),uo.forEach(t),l_=h(l),In=a(l,"H2",{class:!0});var $b=r(In);la=a($b,"A",{id:!0,class:!0,href:!0});var HJ=r(la);tm=a(HJ,"SPAN",{});var KJ=r(tm);k(Ai.$$.fragment,KJ),KJ.forEach(t),HJ.forEach(t),g$=h($b),om=a($b,"SPAN",{});var eC=r(om);_$=n(eC,"TFRobertaForTokenClassification"),eC.forEach(t),$b.forEach(t),i_=h(l),gt=a(l,"DIV",{class:!0});var mo=r(gt);k(Bi.$$.fragment,mo),b$=h(mo),nm=a(mo,"P",{});var tC=r(nm);y$=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),v$=h(mo),Gi=a(mo,"P",{});var Fb=r(Gi);T$=n(Fb,"This model inherits from "),Wp=a(Fb,"A",{href:!0});var oC=r(Wp);k$=n(oC,"TFPreTrainedModel"),oC.forEach(t),w$=n(Fb,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),Fb.forEach(t),M$=h(mo),Si=a(mo,"P",{});var Rb=r(Si);$$=n(Rb,"This model is also a "),Vi=a(Rb,"A",{href:!0,rel:!0});var nC=r(Vi);F$=n(nC,"tf.keras.Model"),nC.forEach(t),R$=n(Rb,` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),Rb.forEach(t),E$=h(mo),k(ia.$$.fragment,mo),x$=h(mo),zt=a(mo,"DIV",{class:!0});var Ko=r(zt);k(Xi.$$.fragment,Ko),j$=h(Ko),Un=a(Ko,"P",{});var hh=r(Un);J$=n(hh,"The "),Zp=a(hh,"A",{href:!0});var sC=r(Zp);C$=n(sC,"TFRobertaForTokenClassification"),sC.forEach(t),z$=n(hh," forward method, overrides the "),sm=a(hh,"CODE",{});var aC=r(sm);I$=n(aC,"__call__"),aC.forEach(t),U$=n(hh," special method."),hh.forEach(t),q$=h(Ko),k(da.$$.fragment,Ko),N$=h(Ko),k(ca.$$.fragment,Ko),W$=h(Ko),k(pa.$$.fragment,Ko),Ko.forEach(t),mo.forEach(t),d_=h(l),qn=a(l,"H2",{class:!0});var Eb=r(qn);ha=a(Eb,"A",{id:!0,class:!0,href:!0});var rC=r(ha);am=a(rC,"SPAN",{});var lC=r(am);k(Pi.$$.fragment,lC),lC.forEach(t),rC.forEach(t),Z$=h(Eb),rm=a(Eb,"SPAN",{});var iC=r(rm);A$=n(iC,"TFRobertaForQuestionAnswering"),iC.forEach(t),Eb.forEach(t),c_=h(l),_t=a(l,"DIV",{class:!0});var fo=r(_t);k(Li.$$.fragment,fo),B$=h(fo),Nn=a(fo,"P",{});var uh=r(Nn);G$=n(uh,`RoBERTa Model with a span classification head on top for extractive question-answering tasks like SQuAD (a linear
layers on top of the hidden-states output to compute `),lm=a(uh,"CODE",{});var dC=r(lm);S$=n(dC,"span start logits"),dC.forEach(t),V$=n(uh," and "),im=a(uh,"CODE",{});var cC=r(im);X$=n(cC,"span end logits"),cC.forEach(t),P$=n(uh,")."),uh.forEach(t),L$=h(fo),Qi=a(fo,"P",{});var xb=r(Qi);Q$=n(xb,"This model inherits from "),Ap=a(xb,"A",{href:!0});var pC=r(Ap);O$=n(pC,"TFPreTrainedModel"),pC.forEach(t),D$=n(xb,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),xb.forEach(t),Y$=h(fo),Oi=a(fo,"P",{});var jb=r(Oi);H$=n(jb,"This model is also a "),Di=a(jb,"A",{href:!0,rel:!0});var hC=r(Di);K$=n(hC,"tf.keras.Model"),hC.forEach(t),eF=n(jb,` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),jb.forEach(t),tF=h(fo),k(ua.$$.fragment,fo),oF=h(fo),It=a(fo,"DIV",{class:!0});var en=r(It);k(Yi.$$.fragment,en),nF=h(en),Wn=a(en,"P",{});var mh=r(Wn);sF=n(mh,"The "),Bp=a(mh,"A",{href:!0});var uC=r(Bp);aF=n(uC,"TFRobertaForQuestionAnswering"),uC.forEach(t),rF=n(mh," forward method, overrides the "),dm=a(mh,"CODE",{});var mC=r(dm);lF=n(mC,"__call__"),mC.forEach(t),iF=n(mh," special method."),mh.forEach(t),dF=h(en),k(ma.$$.fragment,en),cF=h(en),k(fa.$$.fragment,en),pF=h(en),k(ga.$$.fragment,en),en.forEach(t),fo.forEach(t),p_=h(l),Zn=a(l,"H2",{class:!0});var Jb=r(Zn);_a=a(Jb,"A",{id:!0,class:!0,href:!0});var fC=r(_a);cm=a(fC,"SPAN",{});var gC=r(cm);k(Hi.$$.fragment,gC),gC.forEach(t),fC.forEach(t),hF=h(Jb),pm=a(Jb,"SPAN",{});var _C=r(pm);uF=n(_C,"FlaxRobertaModel"),_C.forEach(t),Jb.forEach(t),h_=h(l),nt=a(l,"DIV",{class:!0});var qt=r(nt);k(Ki.$$.fragment,qt),mF=h(qt),hm=a(qt,"P",{});var bC=r(hm);fF=n(bC,"The bare RoBERTa Model transformer outputting raw hidden-states without any specific head on top."),bC.forEach(t),gF=h(qt),ed=a(qt,"P",{});var Cb=r(ed);_F=n(Cb,"This model inherits from "),Gp=a(Cb,"A",{href:!0});var yC=r(Gp);bF=n(yC,"FlaxPreTrainedModel"),yC.forEach(t),yF=n(Cb,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading, saving and converting weights from PyTorch models)`),Cb.forEach(t),vF=h(qt),td=a(qt,"P",{});var zb=r(td);TF=n(zb,"This model is also a Flax Linen "),od=a(zb,"A",{href:!0,rel:!0});var vC=r(od);kF=n(vC,"flax.linen.Module"),vC.forEach(t),wF=n(zb,`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),zb.forEach(t),MF=h(qt),um=a(qt,"P",{});var TC=r(um);$F=n(TC,"Finally, this model supports inherent JAX features such as:"),TC.forEach(t),FF=h(qt),bo=a(qt,"UL",{});var Oa=r(bo);mm=a(Oa,"LI",{});var kC=r(mm);nd=a(kC,"A",{href:!0,rel:!0});var wC=r(nd);RF=n(wC,"Just-In-Time (JIT) compilation"),wC.forEach(t),kC.forEach(t),EF=h(Oa),fm=a(Oa,"LI",{});var MC=r(fm);sd=a(MC,"A",{href:!0,rel:!0});var $C=r(sd);xF=n($C,"Automatic Differentiation"),$C.forEach(t),MC.forEach(t),jF=h(Oa),gm=a(Oa,"LI",{});var FC=r(gm);ad=a(FC,"A",{href:!0,rel:!0});var RC=r(ad);JF=n(RC,"Vectorization"),RC.forEach(t),FC.forEach(t),CF=h(Oa),_m=a(Oa,"LI",{});var EC=r(_m);rd=a(EC,"A",{href:!0,rel:!0});var xC=r(rd);zF=n(xC,"Parallelization"),xC.forEach(t),EC.forEach(t),Oa.forEach(t),IF=h(qt),eo=a(qt,"DIV",{class:!0});var Da=r(eo);k(ld.$$.fragment,Da),UF=h(Da),An=a(Da,"P",{});var fh=r(An);qF=n(fh,"The "),bm=a(fh,"CODE",{});var jC=r(bm);NF=n(jC,"FlaxRobertaPreTrainedModel"),jC.forEach(t),WF=n(fh," forward method, overrides the "),ym=a(fh,"CODE",{});var JC=r(ym);ZF=n(JC,"__call__"),JC.forEach(t),AF=n(fh," special method."),fh.forEach(t),BF=h(Da),k(ba.$$.fragment,Da),GF=h(Da),k(ya.$$.fragment,Da),Da.forEach(t),qt.forEach(t),u_=h(l),Bn=a(l,"H2",{class:!0});var Ib=r(Bn);va=a(Ib,"A",{id:!0,class:!0,href:!0});var CC=r(va);vm=a(CC,"SPAN",{});var zC=r(vm);k(id.$$.fragment,zC),zC.forEach(t),CC.forEach(t),SF=h(Ib),Tm=a(Ib,"SPAN",{});var IC=r(Tm);VF=n(IC,"FlaxRobertaForCausalLM"),IC.forEach(t),Ib.forEach(t),m_=h(l),st=a(l,"DIV",{class:!0});var Nt=r(st);k(dd.$$.fragment,Nt),XF=h(Nt),km=a(Nt,"P",{});var UC=r(km);PF=n(UC,`Roberta Model with a language modeling head on top (a linear layer on top of the hidden-states output) e.g for
autoregressive tasks.`),UC.forEach(t),LF=h(Nt),cd=a(Nt,"P",{});var Ub=r(cd);QF=n(Ub,"This model inherits from "),Sp=a(Ub,"A",{href:!0});var qC=r(Sp);OF=n(qC,"FlaxPreTrainedModel"),qC.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 NC=r(hd);KF=n(NC,"flax.linen.Module"),NC.forEach(t),eR=n(qb,`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),qb.forEach(t),tR=h(Nt),wm=a(Nt,"P",{});var WC=r(wm);oR=n(WC,"Finally, this model supports inherent JAX features such as:"),WC.forEach(t),nR=h(Nt),yo=a(Nt,"UL",{});var Ya=r(yo);Mm=a(Ya,"LI",{});var ZC=r(Mm);ud=a(ZC,"A",{href:!0,rel:!0});var AC=r(ud);sR=n(AC,"Just-In-Time (JIT) compilation"),AC.forEach(t),ZC.forEach(t),aR=h(Ya),$m=a(Ya,"LI",{});var BC=r($m);md=a(BC,"A",{href:!0,rel:!0});var GC=r(md);rR=n(GC,"Automatic Differentiation"),GC.forEach(t),BC.forEach(t),lR=h(Ya),Fm=a(Ya,"LI",{});var SC=r(Fm);fd=a(SC,"A",{href:!0,rel:!0});var VC=r(fd);iR=n(VC,"Vectorization"),VC.forEach(t),SC.forEach(t),dR=h(Ya),Rm=a(Ya,"LI",{});var XC=r(Rm);gd=a(XC,"A",{href:!0,rel:!0});var PC=r(gd);cR=n(PC,"Parallelization"),PC.forEach(t),XC.forEach(t),Ya.forEach(t),pR=h(Nt),to=a(Nt,"DIV",{class:!0});var Ha=r(to);k(_d.$$.fragment,Ha),hR=h(Ha),Gn=a(Ha,"P",{});var gh=r(Gn);uR=n(gh,"The "),Em=a(gh,"CODE",{});var LC=r(Em);mR=n(LC,"FlaxRobertaPreTrainedModel"),LC.forEach(t),fR=n(gh," forward method, overrides the "),xm=a(gh,"CODE",{});var QC=r(xm);gR=n(QC,"__call__"),QC.forEach(t),_R=n(gh," special method."),gh.forEach(t),bR=h(Ha),k(Ta.$$.fragment,Ha),yR=h(Ha),k(ka.$$.fragment,Ha),Ha.forEach(t),Nt.forEach(t),f_=h(l),Sn=a(l,"H2",{class:!0});var Nb=r(Sn);wa=a(Nb,"A",{id:!0,class:!0,href:!0});var OC=r(wa);jm=a(OC,"SPAN",{});var DC=r(jm);k(bd.$$.fragment,DC),DC.forEach(t),OC.forEach(t),vR=h(Nb),Jm=a(Nb,"SPAN",{});var YC=r(Jm);TR=n(YC,"FlaxRobertaForMaskedLM"),YC.forEach(t),Nb.forEach(t),g_=h(l),at=a(l,"DIV",{class:!0});var Wt=r(at);k(yd.$$.fragment,Wt),kR=h(Wt),vd=a(Wt,"P",{});var Wb=r(vd);wR=n(Wb,"RoBERTa Model with a "),Cm=a(Wb,"CODE",{});var HC=r(Cm);MR=n(HC,"language modeling"),HC.forEach(t),$R=n(Wb," head on top."),Wb.forEach(t),FR=h(Wt),Td=a(Wt,"P",{});var Zb=r(Td);RR=n(Zb,"This model inherits from "),Vp=a(Zb,"A",{href:!0});var KC=r(Vp);ER=n(KC,"FlaxPreTrainedModel"),KC.forEach(t),xR=n(Zb,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading, saving and converting weights from PyTorch models)`),Zb.forEach(t),jR=h(Wt),kd=a(Wt,"P",{});var Ab=r(kd);JR=n(Ab,"This model is also a Flax Linen "),wd=a(Ab,"A",{href:!0,rel:!0});var ez=r(wd);CR=n(ez,"flax.linen.Module"),ez.forEach(t),zR=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),zm=a(Wt,"P",{});var tz=r(zm);UR=n(tz,"Finally, this model supports inherent JAX features such as:"),tz.forEach(t),qR=h(Wt),vo=a(Wt,"UL",{});var Ka=r(vo);Im=a(Ka,"LI",{});var oz=r(Im);Md=a(oz,"A",{href:!0,rel:!0});var nz=r(Md);NR=n(nz,"Just-In-Time (JIT) compilation"),nz.forEach(t),oz.forEach(t),WR=h(Ka),Um=a(Ka,"LI",{});var sz=r(Um);$d=a(sz,"A",{href:!0,rel:!0});var az=r($d);ZR=n(az,"Automatic Differentiation"),az.forEach(t),sz.forEach(t),AR=h(Ka),qm=a(Ka,"LI",{});var rz=r(qm);Fd=a(rz,"A",{href:!0,rel:!0});var lz=r(Fd);BR=n(lz,"Vectorization"),lz.forEach(t),rz.forEach(t),GR=h(Ka),Nm=a(Ka,"LI",{});var iz=r(Nm);Rd=a(iz,"A",{href:!0,rel:!0});var dz=r(Rd);SR=n(dz,"Parallelization"),dz.forEach(t),iz.forEach(t),Ka.forEach(t),VR=h(Wt),oo=a(Wt,"DIV",{class:!0});var er=r(oo);k(Ed.$$.fragment,er),XR=h(er),Vn=a(er,"P",{});var _h=r(Vn);PR=n(_h,"The "),Wm=a(_h,"CODE",{});var cz=r(Wm);LR=n(cz,"FlaxRobertaPreTrainedModel"),cz.forEach(t),QR=n(_h," forward method, overrides the "),Zm=a(_h,"CODE",{});var pz=r(Zm);OR=n(pz,"__call__"),pz.forEach(t),DR=n(_h," special method."),_h.forEach(t),YR=h(er),k(Ma.$$.fragment,er),HR=h(er),k($a.$$.fragment,er),er.forEach(t),Wt.forEach(t),__=h(l),Xn=a(l,"H2",{class:!0});var Bb=r(Xn);Fa=a(Bb,"A",{id:!0,class:!0,href:!0});var hz=r(Fa);Am=a(hz,"SPAN",{});var uz=r(Am);k(xd.$$.fragment,uz),uz.forEach(t),hz.forEach(t),KR=h(Bb),Bm=a(Bb,"SPAN",{});var mz=r(Bm);eE=n(mz,"FlaxRobertaForSequenceClassification"),mz.forEach(t),Bb.forEach(t),b_=h(l),rt=a(l,"DIV",{class:!0});var Zt=r(rt);k(jd.$$.fragment,Zt),tE=h(Zt),Gm=a(Zt,"P",{});var fz=r(Gm);oE=n(fz,`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.`),fz.forEach(t),nE=h(Zt),Jd=a(Zt,"P",{});var Gb=r(Jd);sE=n(Gb,"This model inherits from "),Xp=a(Gb,"A",{href:!0});var gz=r(Xp);aE=n(gz,"FlaxPreTrainedModel"),gz.forEach(t),rE=n(Gb,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading, saving and converting weights from PyTorch models)`),Gb.forEach(t),lE=h(Zt),Cd=a(Zt,"P",{});var Sb=r(Cd);iE=n(Sb,"This model is also a Flax Linen "),zd=a(Sb,"A",{href:!0,rel:!0});var _z=r(zd);dE=n(_z,"flax.linen.Module"),_z.forEach(t),cE=n(Sb,`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),Sb.forEach(t),pE=h(Zt),Sm=a(Zt,"P",{});var bz=r(Sm);hE=n(bz,"Finally, this model supports inherent JAX features such as:"),bz.forEach(t),uE=h(Zt),To=a(Zt,"UL",{});var tr=r(To);Vm=a(tr,"LI",{});var yz=r(Vm);Id=a(yz,"A",{href:!0,rel:!0});var vz=r(Id);mE=n(vz,"Just-In-Time (JIT) compilation"),vz.forEach(t),yz.forEach(t),fE=h(tr),Xm=a(tr,"LI",{});var Tz=r(Xm);Ud=a(Tz,"A",{href:!0,rel:!0});var kz=r(Ud);gE=n(kz,"Automatic Differentiation"),kz.forEach(t),Tz.forEach(t),_E=h(tr),Pm=a(tr,"LI",{});var wz=r(Pm);qd=a(wz,"A",{href:!0,rel:!0});var Mz=r(qd);bE=n(Mz,"Vectorization"),Mz.forEach(t),wz.forEach(t),yE=h(tr),Lm=a(tr,"LI",{});var $z=r(Lm);Nd=a($z,"A",{href:!0,rel:!0});var Fz=r(Nd);vE=n(Fz,"Parallelization"),Fz.forEach(t),$z.forEach(t),tr.forEach(t),TE=h(Zt),no=a(Zt,"DIV",{class:!0});var or=r(no);k(Wd.$$.fragment,or),kE=h(or),Pn=a(or,"P",{});var bh=r(Pn);wE=n(bh,"The "),Qm=a(bh,"CODE",{});var Rz=r(Qm);ME=n(Rz,"FlaxRobertaPreTrainedModel"),Rz.forEach(t),$E=n(bh," forward method, overrides the "),Om=a(bh,"CODE",{});var Ez=r(Om);FE=n(Ez,"__call__"),Ez.forEach(t),RE=n(bh," special method."),bh.forEach(t),EE=h(or),k(Ra.$$.fragment,or),xE=h(or),k(Ea.$$.fragment,or),or.forEach(t),Zt.forEach(t),y_=h(l),Ln=a(l,"H2",{class:!0});var Vb=r(Ln);xa=a(Vb,"A",{id:!0,class:!0,href:!0});var xz=r(xa);Dm=a(xz,"SPAN",{});var jz=r(Dm);k(Zd.$$.fragment,jz),jz.forEach(t),xz.forEach(t),jE=h(Vb),Ym=a(Vb,"SPAN",{});var Jz=r(Ym);JE=n(Jz,"FlaxRobertaForMultipleChoice"),Jz.forEach(t),Vb.forEach(t),v_=h(l),lt=a(l,"DIV",{class:!0});var At=r(lt);k(Ad.$$.fragment,At),CE=h(At),Hm=a(At,"P",{});var Cz=r(Hm);zE=n(Cz,`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.`),Cz.forEach(t),IE=h(At),Bd=a(At,"P",{});var Xb=r(Bd);UE=n(Xb,"This model inherits from "),Pp=a(Xb,"A",{href:!0});var zz=r(Pp);qE=n(zz,"FlaxPreTrainedModel"),zz.forEach(t),NE=n(Xb,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading, saving and converting weights from PyTorch models)`),Xb.forEach(t),WE=h(At),Gd=a(At,"P",{});var Pb=r(Gd);ZE=n(Pb,"This model is also a Flax Linen "),Sd=a(Pb,"A",{href:!0,rel:!0});var Iz=r(Sd);AE=n(Iz,"flax.linen.Module"),Iz.forEach(t),BE=n(Pb,`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),Pb.forEach(t),GE=h(At),Km=a(At,"P",{});var Uz=r(Km);SE=n(Uz,"Finally, this model supports inherent JAX features such as:"),Uz.forEach(t),VE=h(At),ko=a(At,"UL",{});var nr=r(ko);ef=a(nr,"LI",{});var qz=r(ef);Vd=a(qz,"A",{href:!0,rel:!0});var Nz=r(Vd);XE=n(Nz,"Just-In-Time (JIT) compilation"),Nz.forEach(t),qz.forEach(t),PE=h(nr),tf=a(nr,"LI",{});var Wz=r(tf);Xd=a(Wz,"A",{href:!0,rel:!0});var Zz=r(Xd);LE=n(Zz,"Automatic Differentiation"),Zz.forEach(t),Wz.forEach(t),QE=h(nr),of=a(nr,"LI",{});var Az=r(of);Pd=a(Az,"A",{href:!0,rel:!0});var Bz=r(Pd);OE=n(Bz,"Vectorization"),Bz.forEach(t),Az.forEach(t),DE=h(nr),nf=a(nr,"LI",{});var Gz=r(nf);Ld=a(Gz,"A",{href:!0,rel:!0});var Sz=r(Ld);YE=n(Sz,"Parallelization"),Sz.forEach(t),Gz.forEach(t),nr.forEach(t),HE=h(At),so=a(At,"DIV",{class:!0});var sr=r(so);k(Qd.$$.fragment,sr),KE=h(sr),Qn=a(sr,"P",{});var yh=r(Qn);e4=n(yh,"The "),sf=a(yh,"CODE",{});var Vz=r(sf);t4=n(Vz,"FlaxRobertaPreTrainedModel"),Vz.forEach(t),o4=n(yh," forward method, overrides the "),af=a(yh,"CODE",{});var Xz=r(af);n4=n(Xz,"__call__"),Xz.forEach(t),s4=n(yh," special method."),yh.forEach(t),a4=h(sr),k(ja.$$.fragment,sr),r4=h(sr),k(Ja.$$.fragment,sr),sr.forEach(t),At.forEach(t),T_=h(l),On=a(l,"H2",{class:!0});var Lb=r(On);Ca=a(Lb,"A",{id:!0,class:!0,href:!0});var Pz=r(Ca);rf=a(Pz,"SPAN",{});var Lz=r(rf);k(Od.$$.fragment,Lz),Lz.forEach(t),Pz.forEach(t),l4=h(Lb),lf=a(Lb,"SPAN",{});var Qz=r(lf);i4=n(Qz,"FlaxRobertaForTokenClassification"),Qz.forEach(t),Lb.forEach(t),k_=h(l),it=a(l,"DIV",{class:!0});var Bt=r(it);k(Dd.$$.fragment,Bt),d4=h(Bt),df=a(Bt,"P",{});var Oz=r(df);c4=n(Oz,`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.`),Oz.forEach(t),p4=h(Bt),Yd=a(Bt,"P",{});var Qb=r(Yd);h4=n(Qb,"This model inherits from "),Lp=a(Qb,"A",{href:!0});var Dz=r(Lp);u4=n(Dz,"FlaxPreTrainedModel"),Dz.forEach(t),m4=n(Qb,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading, saving and converting weights from PyTorch models)`),Qb.forEach(t),f4=h(Bt),Hd=a(Bt,"P",{});var Ob=r(Hd);g4=n(Ob,"This model is also a Flax Linen "),Kd=a(Ob,"A",{href:!0,rel:!0});var Yz=r(Kd);_4=n(Yz,"flax.linen.Module"),Yz.forEach(t),b4=n(Ob,`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),Ob.forEach(t),y4=h(Bt),cf=a(Bt,"P",{});var Hz=r(cf);v4=n(Hz,"Finally, this model supports inherent JAX features such as:"),Hz.forEach(t),T4=h(Bt),wo=a(Bt,"UL",{});var ar=r(wo);pf=a(ar,"LI",{});var Kz=r(pf);ec=a(Kz,"A",{href:!0,rel:!0});var eI=r(ec);k4=n(eI,"Just-In-Time (JIT) compilation"),eI.forEach(t),Kz.forEach(t),w4=h(ar),hf=a(ar,"LI",{});var tI=r(hf);tc=a(tI,"A",{href:!0,rel:!0});var oI=r(tc);M4=n(oI,"Automatic Differentiation"),oI.forEach(t),tI.forEach(t),$4=h(ar),uf=a(ar,"LI",{});var nI=r(uf);oc=a(nI,"A",{href:!0,rel:!0});var sI=r(oc);F4=n(sI,"Vectorization"),sI.forEach(t),nI.forEach(t),R4=h(ar),mf=a(ar,"LI",{});var aI=r(mf);nc=a(aI,"A",{href:!0,rel:!0});var rI=r(nc);E4=n(rI,"Parallelization"),rI.forEach(t),aI.forEach(t),ar.forEach(t),x4=h(Bt),ao=a(Bt,"DIV",{class:!0});var rr=r(ao);k(sc.$$.fragment,rr),j4=h(rr),Dn=a(rr,"P",{});var vh=r(Dn);J4=n(vh,"The "),ff=a(vh,"CODE",{});var lI=r(ff);C4=n(lI,"FlaxRobertaPreTrainedModel"),lI.forEach(t),z4=n(vh," forward method, overrides the "),gf=a(vh,"CODE",{});var iI=r(gf);I4=n(iI,"__call__"),iI.forEach(t),U4=n(vh," special method."),vh.forEach(t),q4=h(rr),k(za.$$.fragment,rr),N4=h(rr),k(Ia.$$.fragment,rr),rr.forEach(t),Bt.forEach(t),w_=h(l),Yn=a(l,"H2",{class:!0});var Db=r(Yn);Ua=a(Db,"A",{id:!0,class:!0,href:!0});var dI=r(Ua);_f=a(dI,"SPAN",{});var cI=r(_f);k(ac.$$.fragment,cI),cI.forEach(t),dI.forEach(t),W4=h(Db),bf=a(Db,"SPAN",{});var pI=r(bf);Z4=n(pI,"FlaxRobertaForQuestionAnswering"),pI.forEach(t),Db.forEach(t),M_=h(l),dt=a(l,"DIV",{class:!0});var Gt=r(dt);k(rc.$$.fragment,Gt),A4=h(Gt),Hn=a(Gt,"P",{});var Th=r(Hn);B4=n(Th,`Roberta Model with a span classification head on top for extractive question-answering tasks like SQuAD (a linear
layers on top of the hidden-states output to compute `),yf=a(Th,"CODE",{});var hI=r(yf);G4=n(hI,"span start logits"),hI.forEach(t),S4=n(Th," and "),vf=a(Th,"CODE",{});var uI=r(vf);V4=n(uI,"span end logits"),uI.forEach(t),X4=n(Th,")."),Th.forEach(t),P4=h(Gt),lc=a(Gt,"P",{});var Yb=r(lc);L4=n(Yb,"This model inherits from "),Qp=a(Yb,"A",{href:!0});var mI=r(Qp);Q4=n(mI,"FlaxPreTrainedModel"),mI.forEach(t),O4=n(Yb,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading, saving and converting weights from PyTorch models)`),Yb.forEach(t),D4=h(Gt),ic=a(Gt,"P",{});var Hb=r(ic);Y4=n(Hb,"This model is also a Flax Linen "),dc=a(Hb,"A",{href:!0,rel:!0});var fI=r(dc);H4=n(fI,"flax.linen.Module"),fI.forEach(t),K4=n(Hb,`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),Hb.forEach(t),ex=h(Gt),Tf=a(Gt,"P",{});var gI=r(Tf);tx=n(gI,"Finally, this model supports inherent JAX features such as:"),gI.forEach(t),ox=h(Gt),Mo=a(Gt,"UL",{});var lr=r(Mo);kf=a(lr,"LI",{});var _I=r(kf);cc=a(_I,"A",{href:!0,rel:!0});var bI=r(cc);nx=n(bI,"Just-In-Time (JIT) compilation"),bI.forEach(t),_I.forEach(t),sx=h(lr),wf=a(lr,"LI",{});var yI=r(wf);pc=a(yI,"A",{href:!0,rel:!0});var vI=r(pc);ax=n(vI,"Automatic Differentiation"),vI.forEach(t),yI.forEach(t),rx=h(lr),Mf=a(lr,"LI",{});var TI=r(Mf);hc=a(TI,"A",{href:!0,rel:!0});var kI=r(hc);lx=n(kI,"Vectorization"),kI.forEach(t),TI.forEach(t),ix=h(lr),$f=a(lr,"LI",{});var wI=r($f);uc=a(wI,"A",{href:!0,rel:!0});var MI=r(uc);dx=n(MI,"Parallelization"),MI.forEach(t),wI.forEach(t),lr.forEach(t),cx=h(Gt),ro=a(Gt,"DIV",{class:!0});var ir=r(ro);k(mc.$$.fragment,ir),px=h(ir),Kn=a(ir,"P",{});var kh=r(Kn);hx=n(kh,"The "),Ff=a(kh,"CODE",{});var $I=r(Ff);ux=n($I,"FlaxRobertaPreTrainedModel"),$I.forEach(t),mx=n(kh," forward method, overrides the "),Rf=a(kh,"CODE",{});var FI=r(Rf);fx=n(FI,"__call__"),FI.forEach(t),gx=n(kh," special method."),kh.forEach(t),_x=h(ir),k(qa.$$.fragment,ir),bx=h(ir),k(Na.$$.fragment,ir),ir.forEach(t),Gt.forEach(t),this.h()},h(){c(d,"name","hf:doc:metadata"),c(d,"content",JSON.stringify(N5)),c(f,"id","roberta"),c(f,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(f,"href","#roberta"),c(m,"class","relative group"),c(ee,"alt","Models"),Mx(ee.src,x="https://img.shields.io/badge/All_model_pages-roberta-blueviolet")||c(ee,"src",x),c(re,"href","https://huggingface.co/models?filter=roberta"),c(pe,"alt","Spaces"),Mx(pe.src,Ae="https://img.shields.io/badge/%F0%9F%A4%97%20Hugging%20Face-Spaces-blue")||c(pe,"src",Ae),c(G,"href","https://huggingface.co/spaces/docs-demos/roberta-base"),c(ue,"alt","Paper page"),Mx(ue.src,H="https://img.shields.io/badge/Paper%20page-1907.11692-green")||c(ue,"src",H),c(he,"href","https://huggingface.co/papers/1907.11692"),c(N,"class","flex flex-wrap space-x-1"),c(B,"id","overview"),c(B,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(B,"href","#overview"),c(le,"class","relative group"),c(de,"href","https://arxiv.org/abs/1907.11692"),c(de,"rel","nofollow"),c(ce,"href","https://huggingface.co/myleott"),c(ce,"rel","nofollow"),c(ge,"href","/docs/transformers/v4.30.0/en/model_doc/bert#transformers.BertModel"),c(Ic,"href","camembert"),c(dr,"href","https://huggingface.co/julien-c"),c(dr,"rel","nofollow"),c(cr,"href","https://github.com/pytorch/fairseq/tree/master/examples/roberta"),c(cr,"rel","nofollow"),c(ss,"id","resources"),c(ss,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(ss,"href","#resources"),c(tn,"class","relative group"),c(ur,"href","https://huggingface.co/blog/sentiment-analysis-twitter"),c(ur,"rel","nofollow"),c(mr,"href","https://huggingface.co/inference-api"),c(mr,"rel","nofollow"),c(gr,"href","https://huggingface.co/blog/opinion-classification-with-kili"),c(gr,"rel","nofollow"),c(br,"href","https://colab.research.google.com/github/DhavalTaunk08/NLP_scripts/blob/master/sentiment_analysis_using_roberta.ipynb"),c(br,"rel","nofollow"),c(qc,"href","/docs/transformers/v4.30.0/en/model_doc/roberta#transformers.RobertaForSequenceClassification"),c(yr,"href","https://github.com/huggingface/transformers/tree/main/examples/pytorch/text-classification"),c(yr,"rel","nofollow"),c(vr,"href","https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/text_classification.ipynb"),c(vr,"rel","nofollow"),c(Nc,"href","/docs/transformers/v4.30.0/en/model_doc/roberta#transformers.TFRobertaForSequenceClassification"),c(Tr,"href","https://github.com/huggingface/transformers/tree/main/examples/tensorflow/text-classification"),c(Tr,"rel","nofollow"),c(kr,"href","https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/text_classification-tf.ipynb"),c(kr,"rel","nofollow"),c(Wc,"href","/docs/transformers/v4.30.0/en/model_doc/roberta#transformers.FlaxRobertaForSequenceClassification"),c(wr,"href","https://github.com/huggingface/transformers/tree/main/examples/flax/text-classification"),c(wr,"rel","nofollow"),c(Mr,"href","https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/text_classification_flax.ipynb"),c(Mr,"rel","nofollow"),c(Zc,"href","../tasks/sequence_classification"),c(Ac,"href","/docs/transformers/v4.30.0/en/model_doc/roberta#transformers.RobertaForTokenClassification"),c(Fr,"href","https://github.com/huggingface/transformers/tree/main/examples/pytorch/token-classification"),c(Fr,"rel","nofollow"),c(Rr,"href","https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/token_classification.ipynb"),c(Rr,"rel","nofollow"),c(Bc,"href","/docs/transformers/v4.30.0/en/model_doc/roberta#transformers.TFRobertaForTokenClassification"),c(Er,"href","https://github.com/huggingface/transformers/tree/main/examples/tensorflow/token-classification"),c(Er,"rel","nofollow"),c(xr,"href","https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/token_classification-tf.ipynb"),c(xr,"rel","nofollow"),c(Gc,"href","/docs/transformers/v4.30.0/en/model_doc/roberta#transformers.FlaxRobertaForTokenClassification"),c(jr,"href","https://github.com/huggingface/transformers/tree/main/examples/flax/token-classification"),c(jr,"rel","nofollow"),c(Jr,"href","https://huggingface.co/course/chapter7/2?fw=pt"),c(Jr,"rel","nofollow"),c(Vc,"href","../tasks/token_classification"),c(Ir,"href","https://huggingface.co/blog/how-to-train"),c(Ir,"rel","nofollow"),c(Xc,"href","/docs/transformers/v4.30.0/en/model_doc/roberta#transformers.RobertaForMaskedLM"),c(Ur,"href","https://github.com/huggingface/transformers/tree/main/examples/pytorch/language-modeling#robertabertdistilbert-and-masked-language-modeling"),c(Ur,"rel","nofollow"),c(qr,"href","https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/language_modeling.ipynb"),c(qr,"rel","nofollow"),c(Pc,"href","/docs/transformers/v4.30.0/en/model_doc/roberta#transformers.TFRobertaForMaskedLM"),c(Nr,"href","https://github.com/huggingface/transformers/tree/main/examples/tensorflow/language-modeling#run_mlmpy"),c(Nr,"rel","nofollow"),c(Wr,"href","https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/language_modeling-tf.ipynb"),c(Wr,"rel","nofollow"),c(Lc,"href","/docs/transformers/v4.30.0/en/model_doc/roberta#transformers.FlaxRobertaForMaskedLM"),c(Zr,"href","https://github.com/huggingface/transformers/tree/main/examples/flax/language-modeling#masked-language-modeling"),c(Zr,"rel","nofollow"),c(Ar,"href","https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/masked_language_modeling_flax.ipynb"),c(Ar,"rel","nofollow"),c(Br,"href","https://huggingface.co/course/chapter7/3?fw=pt"),c(Br,"rel","nofollow"),c(Oc,"href","../tasks/masked_language_modeling"),c(Vr,"href","https://huggingface.co/blog/optimum-inference"),c(Vr,"rel","nofollow"),c(Dc,"href","/docs/transformers/v4.30.0/en/model_doc/roberta#transformers.RobertaForQuestionAnswering"),c(Xr,"href","https://github.com/huggingface/transformers/tree/main/examples/pytorch/question-answering"),c(Xr,"rel","nofollow"),c(Pr,"href","https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/question_answering.ipynb"),c(Pr,"rel","nofollow"),c(Yc,"href","/docs/transformers/v4.30.0/en/model_doc/roberta#transformers.TFRobertaForQuestionAnswering"),c(Lr,"href","https://github.com/huggingface/transformers/tree/main/examples/tensorflow/question-answering"),c(Lr,"rel","nofollow"),c(Qr,"href","https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/question_answering-tf.ipynb"),c(Qr,"rel","nofollow"),c(Hc,"href","/docs/transformers/v4.30.0/en/model_doc/roberta#transformers.FlaxRobertaForQuestionAnswering"),c(Or,"href","https://github.com/huggingface/transformers/tree/main/examples/flax/question-answering"),c(Or,"rel","nofollow"),c(Dr,"href","https://huggingface.co/course/chapter7/7?fw=pt"),c(Dr,"rel","nofollow"),c(ep,"href","../tasks/question_answering"),c(op,"href","/docs/transformers/v4.30.0/en/model_doc/roberta#transformers.RobertaForMultipleChoice"),c(Yr,"href","https://github.com/huggingface/transformers/tree/main/examples/pytorch/multiple-choice"),c(Yr,"rel","nofollow"),c(Hr,"href","https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/multiple_choice.ipynb"),c(Hr,"rel","nofollow"),c(np,"href","/docs/transformers/v4.30.0/en/model_doc/roberta#transformers.TFRobertaForMultipleChoice"),c(Kr,"href","https://github.com/huggingface/transformers/tree/main/examples/tensorflow/multiple-choice"),c(Kr,"rel","nofollow"),c(el,"href","https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/multiple_choice-tf.ipynb"),c(el,"rel","nofollow"),c(sp,"href","../tasks/multiple_choice"),c(ls,"id","transformers.RobertaConfig"),c(ls,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(ls,"href","#transformers.RobertaConfig"),c(nn,"class","relative group"),c(ap,"href","/docs/transformers/v4.30.0/en/model_doc/roberta#transformers.RobertaModel"),c(rp,"href","/docs/transformers/v4.30.0/en/model_doc/roberta#transformers.TFRobertaModel"),c(nl,"href","https://huggingface.co/roberta-base"),c(nl,"rel","nofollow"),c(lp,"href","/docs/transformers/v4.30.0/en/main_classes/configuration#transformers.PretrainedConfig"),c(ip,"href","/docs/transformers/v4.30.0/en/main_classes/configuration#transformers.PretrainedConfig"),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(ds,"id","transformers.RobertaTokenizer"),c(ds,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(ds,"href","#transformers.RobertaTokenizer"),c(an,"class","relative group"),c(dp,"href","/docs/transformers/v4.30.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizer"),c(Bo,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(hs,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(us,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(hp,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(We,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(ms,"id","transformers.RobertaTokenizerFast"),c(ms,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(ms,"href","#transformers.RobertaTokenizerFast"),c(rn,"class","relative group"),c(up,"href","/docs/transformers/v4.30.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast"),c(mp,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(tt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(_s,"id","transformers.RobertaModel"),c(_s,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(_s,"href","#transformers.RobertaModel"),c(ln,"class","relative group"),c(fp,"href","/docs/transformers/v4.30.0/en/main_classes/model#transformers.PreTrainedModel"),c(Ml,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),c(Ml,"rel","nofollow"),c(Fl,"href","https://arxiv.org/abs/1706.03762"),c(Fl,"rel","nofollow"),c(gp,"href","/docs/transformers/v4.30.0/en/model_doc/roberta#transformers.RobertaModel"),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(ot,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(Ts,"id","transformers.RobertaForCausalLM"),c(Ts,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(Ts,"href","#transformers.RobertaForCausalLM"),c(cn,"class","relative group"),c(_p,"href","/docs/transformers/v4.30.0/en/main_classes/model#transformers.PreTrainedModel"),c(zl,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),c(zl,"rel","nofollow"),c(bp,"href","/docs/transformers/v4.30.0/en/model_doc/roberta#transformers.RobertaForCausalLM"),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(wt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(Ms,"id","transformers.RobertaForMaskedLM"),c(Ms,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(Ms,"href","#transformers.RobertaForMaskedLM"),c(hn,"class","relative group"),c(yp,"href","/docs/transformers/v4.30.0/en/main_classes/model#transformers.PreTrainedModel"),c(Al,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),c(Al,"rel","nofollow"),c(vp,"href","/docs/transformers/v4.30.0/en/model_doc/roberta#transformers.RobertaForMaskedLM"),c(Lt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(Mt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(Rs,"id","transformers.RobertaForSequenceClassification"),c(Rs,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(Rs,"href","#transformers.RobertaForSequenceClassification"),c(mn,"class","relative group"),c(Tp,"href","/docs/transformers/v4.30.0/en/main_classes/model#transformers.PreTrainedModel"),c(Pl,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),c(Pl,"rel","nofollow"),c(kp,"href","/docs/transformers/v4.30.0/en/model_doc/roberta#transformers.RobertaForSequenceClassification"),c(jt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c($t,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(Js,"id","transformers.RobertaForMultipleChoice"),c(Js,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(Js,"href","#transformers.RobertaForMultipleChoice"),c(gn,"class","relative group"),c(wp,"href","/docs/transformers/v4.30.0/en/main_classes/model#transformers.PreTrainedModel"),c(Hl,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),c(Hl,"rel","nofollow"),c(Mp,"href","/docs/transformers/v4.30.0/en/model_doc/roberta#transformers.RobertaForMultipleChoice"),c(Qt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(Ft,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(Is,"id","transformers.RobertaForTokenClassification"),c(Is,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(Is,"href","#transformers.RobertaForTokenClassification"),c(bn,"class","relative group"),c($p,"href","/docs/transformers/v4.30.0/en/main_classes/model#transformers.PreTrainedModel"),c(si,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),c(si,"rel","nofollow"),c(Fp,"href","/docs/transformers/v4.30.0/en/model_doc/roberta#transformers.RobertaForTokenClassification"),c(Ot,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(Rt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(Ns,"id","transformers.RobertaForQuestionAnswering"),c(Ns,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(Ns,"href","#transformers.RobertaForQuestionAnswering"),c(vn,"class","relative group"),c(Rp,"href","/docs/transformers/v4.30.0/en/main_classes/model#transformers.PreTrainedModel"),c(ci,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),c(ci,"rel","nofollow"),c(Ep,"href","/docs/transformers/v4.30.0/en/model_doc/roberta#transformers.RobertaForQuestionAnswering"),c(Dt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(Et,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(As,"id","transformers.TFRobertaModel"),c(As,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(As,"href","#transformers.TFRobertaModel"),c(wn,"class","relative group"),c(xp,"href","/docs/transformers/v4.30.0/en/main_classes/model#transformers.TFPreTrainedModel"),c(gi,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),c(gi,"rel","nofollow"),c(jp,"href","/docs/transformers/v4.30.0/en/model_doc/roberta#transformers.TFRobertaModel"),c(Yt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(ht,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(Vs,"id","transformers.TFRobertaForCausalLM"),c(Vs,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(Vs,"href","#transformers.TFRobertaForCausalLM"),c($n,"class","relative group"),c(Jp,"href","/docs/transformers/v4.30.0/en/model_doc/roberta#transformers.TFRobertaForCausalLM"),c(Ht,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(Fn,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(Ls,"id","transformers.TFRobertaForMaskedLM"),c(Ls,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(Ls,"href","#transformers.TFRobertaForMaskedLM"),c(En,"class","relative group"),c(Cp,"href","/docs/transformers/v4.30.0/en/main_classes/model#transformers.TFPreTrainedModel"),c(Fi,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),c(Fi,"rel","nofollow"),c(zp,"href","/docs/transformers/v4.30.0/en/model_doc/roberta#transformers.TFRobertaForMaskedLM"),c(Jt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(ut,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(Hs,"id","transformers.TFRobertaForSequenceClassification"),c(Hs,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(Hs,"href","#transformers.TFRobertaForSequenceClassification"),c(jn,"class","relative group"),c(Ip,"href","/docs/transformers/v4.30.0/en/main_classes/model#transformers.TFPreTrainedModel"),c(Ci,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),c(Ci,"rel","nofollow"),c(Up,"href","/docs/transformers/v4.30.0/en/model_doc/roberta#transformers.TFRobertaForSequenceClassification"),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(mt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(na,"id","transformers.TFRobertaForMultipleChoice"),c(na,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(na,"href","#transformers.TFRobertaForMultipleChoice"),c(Cn,"class","relative group"),c(qp,"href","/docs/transformers/v4.30.0/en/main_classes/model#transformers.TFPreTrainedModel"),c(Wi,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),c(Wi,"rel","nofollow"),c(Np,"href","/docs/transformers/v4.30.0/en/model_doc/roberta#transformers.TFRobertaForMultipleChoice"),c(Kt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(ft,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(la,"id","transformers.TFRobertaForTokenClassification"),c(la,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(la,"href","#transformers.TFRobertaForTokenClassification"),c(In,"class","relative group"),c(Wp,"href","/docs/transformers/v4.30.0/en/main_classes/model#transformers.TFPreTrainedModel"),c(Vi,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),c(Vi,"rel","nofollow"),c(Zp,"href","/docs/transformers/v4.30.0/en/model_doc/roberta#transformers.TFRobertaForTokenClassification"),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(gt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(ha,"id","transformers.TFRobertaForQuestionAnswering"),c(ha,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(ha,"href","#transformers.TFRobertaForQuestionAnswering"),c(qn,"class","relative group"),c(Ap,"href","/docs/transformers/v4.30.0/en/main_classes/model#transformers.TFPreTrainedModel"),c(Di,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),c(Di,"rel","nofollow"),c(Bp,"href","/docs/transformers/v4.30.0/en/model_doc/roberta#transformers.TFRobertaForQuestionAnswering"),c(It,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(_t,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(_a,"id","transformers.FlaxRobertaModel"),c(_a,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(_a,"href","#transformers.FlaxRobertaModel"),c(Zn,"class","relative group"),c(Gp,"href","/docs/transformers/v4.30.0/en/main_classes/model#transformers.FlaxPreTrainedModel"),c(od,"href","https://flax.readthedocs.io/en/latest/flax.linen.html#module"),c(od,"rel","nofollow"),c(nd,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),c(nd,"rel","nofollow"),c(sd,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),c(sd,"rel","nofollow"),c(ad,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),c(ad,"rel","nofollow"),c(rd,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),c(rd,"rel","nofollow"),c(eo,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(nt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(va,"id","transformers.FlaxRobertaForCausalLM"),c(va,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(va,"href","#transformers.FlaxRobertaForCausalLM"),c(Bn,"class","relative group"),c(Sp,"href","/docs/transformers/v4.30.0/en/main_classes/model#transformers.FlaxPreTrainedModel"),c(hd,"href","https://flax.readthedocs.io/en/latest/flax.linen.html#module"),c(hd,"rel","nofollow"),c(ud,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),c(ud,"rel","nofollow"),c(md,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),c(md,"rel","nofollow"),c(fd,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),c(fd,"rel","nofollow"),c(gd,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),c(gd,"rel","nofollow"),c(to,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(st,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(wa,"id","transformers.FlaxRobertaForMaskedLM"),c(wa,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(wa,"href","#transformers.FlaxRobertaForMaskedLM"),c(Sn,"class","relative group"),c(Vp,"href","/docs/transformers/v4.30.0/en/main_classes/model#transformers.FlaxPreTrainedModel"),c(wd,"href","https://flax.readthedocs.io/en/latest/flax.linen.html#module"),c(wd,"rel","nofollow"),c(Md,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),c(Md,"rel","nofollow"),c($d,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),c($d,"rel","nofollow"),c(Fd,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),c(Fd,"rel","nofollow"),c(Rd,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),c(Rd,"rel","nofollow"),c(oo,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(at,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(Fa,"id","transformers.FlaxRobertaForSequenceClassification"),c(Fa,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(Fa,"href","#transformers.FlaxRobertaForSequenceClassification"),c(Xn,"class","relative group"),c(Xp,"href","/docs/transformers/v4.30.0/en/main_classes/model#transformers.FlaxPreTrainedModel"),c(zd,"href","https://flax.readthedocs.io/en/latest/flax.linen.html#module"),c(zd,"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(Pp,"href","/docs/transformers/v4.30.0/en/main_classes/model#transformers.FlaxPreTrainedModel"),c(Sd,"href","https://flax.readthedocs.io/en/latest/flax.linen.html#module"),c(Sd,"rel","nofollow"),c(Vd,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),c(Vd,"rel","nofollow"),c(Xd,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),c(Xd,"rel","nofollow"),c(Pd,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),c(Pd,"rel","nofollow"),c(Ld,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),c(Ld,"rel","nofollow"),c(so,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(lt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(Ca,"id","transformers.FlaxRobertaForTokenClassification"),c(Ca,"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(Ca,"href","#transformers.FlaxRobertaForTokenClassification"),c(On,"class","relative group"),c(Lp,"href","/docs/transformers/v4.30.0/en/main_classes/model#transformers.FlaxPreTrainedModel"),c(Kd,"href","https://flax.readthedocs.io/en/latest/flax.linen.html#module"),c(Kd,"rel","nofollow"),c(ec,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),c(ec,"rel","nofollow"),c(tc,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),c(tc,"rel","nofollow"),c(oc,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),c(oc,"rel","nofollow"),c(nc,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),c(nc,"rel","nofollow"),c(ao,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(it,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(Ua,"id","transformers.FlaxRobertaForQuestionAnswering"),c(Ua,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(Ua,"href","#transformers.FlaxRobertaForQuestionAnswering"),c(Yn,"class","relative group"),c(Qp,"href","/docs/transformers/v4.30.0/en/main_classes/model#transformers.FlaxPreTrainedModel"),c(dc,"href","https://flax.readthedocs.io/en/latest/flax.linen.html#module"),c(dc,"rel","nofollow"),c(cc,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),c(cc,"rel","nofollow"),c(pc,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),c(pc,"rel","nofollow"),c(hc,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),c(hc,"rel","nofollow"),c(uc,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),c(uc,"rel","nofollow"),c(ro,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(dt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(l,_){e(document.head,d),g(l,y,_),g(l,m,_),e(m,f),e(f,b),w(i,b,null),e(m,u),e(m,E),e(E,ae),g(l,K,_),g(l,N,_),e(N,re),e(re,ee),e(N,xe),e(N,G),e(G,pe),e(N,Q),e(N,he),e(he,ue),g(l,Fe,_),g(l,le,_),e(le,B),e(B,_e),w(ie,_e,null),e(le,O),e(le,be),e(be,je),g(l,ne,_),g(l,C,_),e(C,U),e(C,de),e(de,D),e(C,Je),e(C,ce),e(ce,Y),e(C,Ce),g(l,Re,_),g(l,I,_),e(I,ze),g(l,P,_),g(l,me,_),e(me,Ie),g(l,L,_),g(l,fe,_),e(fe,ye),e(ye,Z),g(l,Ee,_),g(l,S,_),e(S,Ue),g(l,se,_),g(l,z,_),e(z,ve),e(ve,q),e(q,qe),e(q,ge),e(ge,v),e(q,j),e(z,Pe),e(z,te),e(te,Ge),e(Ge,Le),e(z,J),e(z,Se),e(Se,Te),e(Te,Qe),e(Te,Ve),e(Ve,Oe),e(Te,A),e(Te,V),e(V,De),e(Te,Ye),e(Te,X),e(X,He),e(Te,Ke),e(z,Ne),e(z,Be),e(Be,oe),e(oe,et),e(Be,ey),e(Be,go),e(go,wh),e(wh,ty),e(go,oy),e(go,Mh),e(Mh,ny),e(go,sy),e(go,$h),e($h,ay),e(go,ry),e(go,Fh),e(Fh,ly),e(z,iy),e(z,Rh),e(Rh,zc),e(zc,Ic),e(Ic,dy),e(zc,cy),g(l,bg,_),g(l,Ro,_),e(Ro,py),e(Ro,dr),e(dr,hy),e(Ro,uy),e(Ro,cr),e(cr,my),e(Ro,fy),g(l,yg,_),g(l,tn,_),e(tn,ss),e(ss,Eh),w(pr,Eh,null),e(tn,gy),e(tn,xh),e(xh,_y),g(l,vg,_),g(l,Uc,_),e(Uc,by),g(l,Tg,_),w(hr,l,_),g(l,kg,_),g(l,ct,_),e(ct,on),e(on,yy),e(on,ur),e(ur,vy),e(on,Ty),e(on,mr),e(mr,ky),e(on,wy),e(ct,My),e(ct,fr),e(fr,$y),e(fr,gr),e(gr,Fy),e(fr,Ry),e(ct,Ey),e(ct,_r),e(_r,xy),e(_r,br),e(br,jy),e(_r,Jy),e(ct,Cy),e(ct,Eo),e(Eo,qc),e(qc,zy),e(Eo,Iy),e(Eo,yr),e(yr,Uy),e(Eo,qy),e(Eo,vr),e(vr,Ny),e(Eo,Wy),e(ct,Zy),e(ct,xo),e(xo,Nc),e(Nc,Ay),e(xo,By),e(xo,Tr),e(Tr,Gy),e(xo,Sy),e(xo,kr),e(kr,Vy),e(xo,Xy),e(ct,Py),e(ct,jo),e(jo,Wc),e(Wc,Ly),e(jo,Qy),e(jo,wr),e(wr,Oy),e(jo,Dy),e(jo,Mr),e(Mr,Yy),e(jo,Hy),e(ct,Ky),e(ct,jh),e(jh,Zc),e(Zc,ev),g(l,wg,_),w($r,l,_),g(l,Mg,_),g(l,xt,_),e(xt,Jo),e(Jo,Ac),e(Ac,tv),e(Jo,ov),e(Jo,Fr),e(Fr,nv),e(Jo,sv),e(Jo,Rr),e(Rr,av),e(Jo,rv),e(xt,lv),e(xt,Co),e(Co,Bc),e(Bc,iv),e(Co,dv),e(Co,Er),e(Er,cv),e(Co,pv),e(Co,xr),e(xr,hv),e(Co,uv),e(xt,mv),e(xt,as),e(as,Gc),e(Gc,fv),e(as,gv),e(as,jr),e(jr,_v),e(as,bv),e(xt,yv),e(xt,Sc),e(Sc,Jr),e(Jr,vv),e(Sc,Tv),e(xt,kv),e(xt,Jh),e(Jh,Vc),e(Vc,wv),g(l,$g,_),w(Cr,l,_),g(l,Fg,_),g(l,yt,_),e(yt,zr),e(zr,Mv),e(zr,Ir),e(Ir,$v),e(zr,Fv),e(yt,Rv),e(yt,zo),e(zo,Xc),e(Xc,Ev),e(zo,xv),e(zo,Ur),e(Ur,jv),e(zo,Jv),e(zo,qr),e(qr,Cv),e(zo,zv),e(yt,Iv),e(yt,Io),e(Io,Pc),e(Pc,Uv),e(Io,qv),e(Io,Nr),e(Nr,Nv),e(Io,Wv),e(Io,Wr),e(Wr,Zv),e(Io,Av),e(yt,Bv),e(yt,Uo),e(Uo,Lc),e(Lc,Gv),e(Uo,Sv),e(Uo,Zr),e(Zr,Vv),e(Uo,Xv),e(Uo,Ar),e(Ar,Pv),e(Uo,Lv),e(yt,Qv),e(yt,Qc),e(Qc,Br),e(Br,Ov),e(Qc,Dv),e(yt,Yv),e(yt,Ch),e(Ch,Oc),e(Oc,Hv),g(l,Rg,_),w(Gr,l,_),g(l,Eg,_),g(l,vt,_),e(vt,Sr),e(Sr,Kv),e(Sr,Vr),e(Vr,eT),e(Sr,tT),e(vt,oT),e(vt,qo),e(qo,Dc),e(Dc,nT),e(qo,sT),e(qo,Xr),e(Xr,aT),e(qo,rT),e(qo,Pr),e(Pr,lT),e(qo,iT),e(vt,dT),e(vt,No),e(No,Yc),e(Yc,cT),e(No,pT),e(No,Lr),e(Lr,hT),e(No,uT),e(No,Qr),e(Qr,mT),e(No,fT),e(vt,gT),e(vt,rs),e(rs,Hc),e(Hc,_T),e(rs,bT),e(rs,Or),e(Or,yT),e(rs,vT),e(vt,TT),e(vt,Kc),e(Kc,Dr),e(Dr,kT),e(Kc,wT),e(vt,MT),e(vt,zh),e(zh,ep),e(ep,$T),g(l,xg,_),g(l,tp,_),e(tp,Ih),e(Ih,FT),g(l,jg,_),g(l,Wo,_),e(Wo,Zo),e(Zo,op),e(op,RT),e(Zo,ET),e(Zo,Yr),e(Yr,xT),e(Zo,jT),e(Zo,Hr),e(Hr,JT),e(Zo,CT),e(Wo,zT),e(Wo,Ao),e(Ao,np),e(np,IT),e(Ao,UT),e(Ao,Kr),e(Kr,qT),e(Ao,NT),e(Ao,el),e(el,WT),e(Ao,ZT),e(Wo,AT),e(Wo,Uh),e(Uh,sp),e(sp,BT),g(l,Jg,_),g(l,nn,_),e(nn,ls),e(ls,qh),w(tl,qh,null),e(nn,GT),e(nn,Nh),e(Nh,ST),g(l,Cg,_),g(l,St,_),w(ol,St,null),e(St,VT),e(St,_o),e(_o,XT),e(_o,ap),e(ap,PT),e(_o,LT),e(_o,rp),e(rp,QT),e(_o,OT),e(_o,nl),e(nl,DT),e(_o,YT),e(St,HT),e(St,sn),e(sn,KT),e(sn,lp),e(lp,ek),e(sn,tk),e(sn,ip),e(ip,ok),e(sn,nk),e(St,sk),w(is,St,null),g(l,zg,_),g(l,an,_),e(an,ds),e(ds,Wh),w(sl,Wh,null),e(an,ak),e(an,Zh),e(Zh,rk),g(l,Ig,_),g(l,We,_),w(al,We,null),e(We,lk),e(We,Ah),e(Ah,ik),e(We,dk),e(We,Bh),e(Bh,ck),e(We,pk),w(cs,We,null),e(We,hk),e(We,rl),e(rl,uk),e(rl,Gh),e(Gh,mk),e(rl,fk),e(We,gk),w(ps,We,null),e(We,_k),e(We,ll),e(ll,bk),e(ll,dp),e(dp,yk),e(ll,vk),e(We,Tk),e(We,Bo),w(il,Bo,null),e(Bo,kk),e(Bo,Sh),e(Sh,wk),e(Bo,Mk),e(Bo,dl),e(dl,cp),e(cp,$k),e(cp,Vh),e(Vh,Fk),e(dl,Rk),e(dl,pp),e(pp,Ek),e(pp,Xh),e(Xh,xk),e(We,jk),e(We,hs),w(cl,hs,null),e(hs,Jk),e(hs,pl),e(pl,Ck),e(pl,Ph),e(Ph,zk),e(pl,Ik),e(We,Uk),e(We,us),w(hl,us,null),e(us,qk),e(us,Lh),e(Lh,Nk),e(We,Wk),e(We,hp),w(ul,hp,null),g(l,Ug,_),g(l,rn,_),e(rn,ms),e(ms,Qh),w(ml,Qh,null),e(rn,Zk),e(rn,Oh),e(Oh,Ak),g(l,qg,_),g(l,tt,_),w(fl,tt,null),e(tt,Bk),e(tt,gl),e(gl,Gk),e(gl,Dh),e(Dh,Sk),e(gl,Vk),e(tt,Xk),e(tt,Yh),e(Yh,Pk),e(tt,Lk),w(fs,tt,null),e(tt,Qk),e(tt,_l),e(_l,Ok),e(_l,Hh),e(Hh,Dk),e(_l,Yk),e(tt,Hk),w(gs,tt,null),e(tt,Kk),e(tt,bl),e(bl,ew),e(bl,up),e(up,tw),e(bl,ow),e(tt,nw),e(tt,mp),w(yl,mp,null),g(l,Ng,_),g(l,ln,_),e(ln,_s),e(_s,Kh),w(vl,Kh,null),e(ln,sw),e(ln,eu),e(eu,aw),g(l,Wg,_),g(l,ot,_),w(Tl,ot,null),e(ot,rw),e(ot,tu),e(tu,lw),e(ot,iw),e(ot,kl),e(kl,dw),e(kl,fp),e(fp,cw),e(kl,pw),e(ot,hw),e(ot,wl),e(wl,uw),e(wl,Ml),e(Ml,mw),e(wl,fw),e(ot,gw),e(ot,$l),e($l,_w),e($l,ou),e(ou,bw),e($l,yw),e(ot,vw),e(ot,pt),e(pt,Tw),e(pt,nu),e(nu,kw),e(pt,ww),e(pt,su),e(su,Mw),e(pt,$w),e(pt,au),e(au,Fw),e(pt,Rw),e(pt,ru),e(ru,Ew),e(pt,xw),e(pt,lu),e(lu,jw),e(pt,Jw),e(pt,iu),e(iu,Cw),e(pt,zw),e(ot,Iw),e(ot,bs),e(bs,Uw),e(bs,du),e(du,qw),e(bs,Nw),e(bs,Fl),e(Fl,Ww),e(ot,Zw),e(ot,Xt),w(Rl,Xt,null),e(Xt,Aw),e(Xt,dn),e(dn,Bw),e(dn,gp),e(gp,Gw),e(dn,Sw),e(dn,cu),e(cu,Vw),e(dn,Xw),e(Xt,Pw),w(ys,Xt,null),e(Xt,Lw),w(vs,Xt,null),g(l,Zg,_),g(l,cn,_),e(cn,Ts),e(Ts,pu),w(El,pu,null),e(cn,Qw),e(cn,hu),e(hu,Ow),g(l,Ag,_),g(l,wt,_),w(xl,wt,null),e(wt,Dw),e(wt,jl),e(jl,Yw),e(jl,uu),e(uu,Hw),e(jl,Kw),e(wt,e0),e(wt,Jl),e(Jl,t0),e(Jl,_p),e(_p,o0),e(Jl,n0),e(wt,s0),e(wt,Cl),e(Cl,a0),e(Cl,zl),e(zl,r0),e(Cl,l0),e(wt,i0),e(wt,Pt),w(Il,Pt,null),e(Pt,d0),e(Pt,pn),e(pn,c0),e(pn,bp),e(bp,p0),e(pn,h0),e(pn,mu),e(mu,u0),e(pn,m0),e(Pt,f0),w(ks,Pt,null),e(Pt,g0),w(ws,Pt,null),g(l,Bg,_),g(l,hn,_),e(hn,Ms),e(Ms,fu),w(Ul,fu,null),e(hn,_0),e(hn,gu),e(gu,b0),g(l,Gg,_),g(l,Mt,_),w(ql,Mt,null),e(Mt,y0),e(Mt,Nl),e(Nl,v0),e(Nl,_u),e(_u,T0),e(Nl,k0),e(Mt,w0),e(Mt,Wl),e(Wl,M0),e(Wl,yp),e(yp,$0),e(Wl,F0),e(Mt,R0),e(Mt,Zl),e(Zl,E0),e(Zl,Al),e(Al,x0),e(Zl,j0),e(Mt,J0),e(Mt,Lt),w(Bl,Lt,null),e(Lt,C0),e(Lt,un),e(un,z0),e(un,vp),e(vp,I0),e(un,U0),e(un,bu),e(bu,q0),e(un,N0),e(Lt,W0),w($s,Lt,null),e(Lt,Z0),w(Fs,Lt,null),g(l,Sg,_),g(l,mn,_),e(mn,Rs),e(Rs,yu),w(Gl,yu,null),e(mn,A0),e(mn,vu),e(vu,B0),g(l,Vg,_),g(l,$t,_),w(Sl,$t,null),e($t,G0),e($t,Tu),e(Tu,S0),e($t,V0),e($t,Vl),e(Vl,X0),e(Vl,Tp),e(Tp,P0),e(Vl,L0),e($t,Q0),e($t,Xl),e(Xl,O0),e(Xl,Pl),e(Pl,D0),e(Xl,Y0),e($t,H0),e($t,jt),w(Ll,jt,null),e(jt,K0),e(jt,fn),e(fn,eM),e(fn,kp),e(kp,tM),e(fn,oM),e(fn,ku),e(ku,nM),e(fn,sM),e(jt,aM),w(Es,jt,null),e(jt,rM),w(xs,jt,null),e(jt,lM),w(js,jt,null),g(l,Xg,_),g(l,gn,_),e(gn,Js),e(Js,wu),w(Ql,wu,null),e(gn,iM),e(gn,Mu),e(Mu,dM),g(l,Pg,_),g(l,Ft,_),w(Ol,Ft,null),e(Ft,cM),e(Ft,$u),e($u,pM),e(Ft,hM),e(Ft,Dl),e(Dl,uM),e(Dl,wp),e(wp,mM),e(Dl,fM),e(Ft,gM),e(Ft,Yl),e(Yl,_M),e(Yl,Hl),e(Hl,bM),e(Yl,yM),e(Ft,vM),e(Ft,Qt),w(Kl,Qt,null),e(Qt,TM),e(Qt,_n),e(_n,kM),e(_n,Mp),e(Mp,wM),e(_n,MM),e(_n,Fu),e(Fu,$M),e(_n,FM),e(Qt,RM),w(Cs,Qt,null),e(Qt,EM),w(zs,Qt,null),g(l,Lg,_),g(l,bn,_),e(bn,Is),e(Is,Ru),w(ei,Ru,null),e(bn,xM),e(bn,Eu),e(Eu,jM),g(l,Qg,_),g(l,Rt,_),w(ti,Rt,null),e(Rt,JM),e(Rt,xu),e(xu,CM),e(Rt,zM),e(Rt,oi),e(oi,IM),e(oi,$p),e($p,UM),e(oi,qM),e(Rt,NM),e(Rt,ni),e(ni,WM),e(ni,si),e(si,ZM),e(ni,AM),e(Rt,BM),e(Rt,Ot),w(ai,Ot,null),e(Ot,GM),e(Ot,yn),e(yn,SM),e(yn,Fp),e(Fp,VM),e(yn,XM),e(yn,ju),e(ju,PM),e(yn,LM),e(Ot,QM),w(Us,Ot,null),e(Ot,OM),w(qs,Ot,null),g(l,Og,_),g(l,vn,_),e(vn,Ns),e(Ns,Ju),w(ri,Ju,null),e(vn,DM),e(vn,Cu),e(Cu,YM),g(l,Dg,_),g(l,Et,_),w(li,Et,null),e(Et,HM),e(Et,Tn),e(Tn,KM),e(Tn,zu),e(zu,e1),e(Tn,t1),e(Tn,Iu),e(Iu,o1),e(Tn,n1),e(Et,s1),e(Et,ii),e(ii,a1),e(ii,Rp),e(Rp,r1),e(ii,l1),e(Et,i1),e(Et,di),e(di,d1),e(di,ci),e(ci,c1),e(di,p1),e(Et,h1),e(Et,Dt),w(pi,Dt,null),e(Dt,u1),e(Dt,kn),e(kn,m1),e(kn,Ep),e(Ep,f1),e(kn,g1),e(kn,Uu),e(Uu,_1),e(kn,b1),e(Dt,y1),w(Ws,Dt,null),e(Dt,v1),w(Zs,Dt,null),g(l,Yg,_),g(l,wn,_),e(wn,As),e(As,qu),w(hi,qu,null),e(wn,T1),e(wn,Nu),e(Nu,k1),g(l,Hg,_),g(l,ht,_),w(ui,ht,null),e(ht,w1),e(ht,Wu),e(Wu,M1),e(ht,$1),e(ht,mi),e(mi,F1),e(mi,xp),e(xp,R1),e(mi,E1),e(ht,x1),e(ht,fi),e(fi,j1),e(fi,gi),e(gi,J1),e(fi,C1),e(ht,z1),w(Bs,ht,null),e(ht,I1),e(ht,Yt),w(_i,Yt,null),e(Yt,U1),e(Yt,Mn),e(Mn,q1),e(Mn,jp),e(jp,N1),e(Mn,W1),e(Mn,Zu),e(Zu,Z1),e(Mn,A1),e(Yt,B1),w(Gs,Yt,null),e(Yt,G1),w(Ss,Yt,null),g(l,Kg,_),g(l,$n,_),e($n,Vs),e(Vs,Au),w(bi,Au,null),e($n,S1),e($n,Bu),e(Bu,V1),g(l,e_,_),g(l,Fn,_),w(yi,Fn,null),e(Fn,X1),e(Fn,Ht),w(vi,Ht,null),e(Ht,P1),e(Ht,Rn),e(Rn,L1),e(Rn,Jp),e(Jp,Q1),e(Rn,O1),e(Rn,Gu),e(Gu,D1),e(Rn,Y1),e(Ht,H1),w(Xs,Ht,null),e(Ht,K1),w(Ps,Ht,null),g(l,t_,_),g(l,En,_),e(En,Ls),e(Ls,Su),w(Ti,Su,null),e(En,e2),e(En,Vu),e(Vu,t2),g(l,o_,_),g(l,ut,_),w(ki,ut,null),e(ut,o2),e(ut,wi),e(wi,n2),e(wi,Xu),e(Xu,s2),e(wi,a2),e(ut,r2),e(ut,Mi),e(Mi,l2),e(Mi,Cp),e(Cp,i2),e(Mi,d2),e(ut,c2),e(ut,$i),e($i,p2),e($i,Fi),e(Fi,h2),e($i,u2),e(ut,m2),w(Qs,ut,null),e(ut,f2),e(ut,Jt),w(Ri,Jt,null),e(Jt,g2),e(Jt,xn),e(xn,_2),e(xn,zp),e(zp,b2),e(xn,y2),e(xn,Pu),e(Pu,v2),e(xn,T2),e(Jt,k2),w(Os,Jt,null),e(Jt,w2),w(Ds,Jt,null),e(Jt,M2),w(Ys,Jt,null),g(l,n_,_),g(l,jn,_),e(jn,Hs),e(Hs,Lu),w(Ei,Lu,null),e(jn,$2),e(jn,Qu),e(Qu,F2),g(l,s_,_),g(l,mt,_),w(xi,mt,null),e(mt,R2),e(mt,Ou),e(Ou,E2),e(mt,x2),e(mt,ji),e(ji,j2),e(ji,Ip),e(Ip,J2),e(ji,C2),e(mt,z2),e(mt,Ji),e(Ji,I2),e(Ji,Ci),e(Ci,U2),e(Ji,q2),e(mt,N2),w(Ks,mt,null),e(mt,W2),e(mt,Ct),w(zi,Ct,null),e(Ct,Z2),e(Ct,Jn),e(Jn,A2),e(Jn,Up),e(Up,B2),e(Jn,G2),e(Jn,Du),e(Du,S2),e(Jn,V2),e(Ct,X2),w(ea,Ct,null),e(Ct,P2),w(ta,Ct,null),e(Ct,L2),w(oa,Ct,null),g(l,a_,_),g(l,Cn,_),e(Cn,na),e(na,Yu),w(Ii,Yu,null),e(Cn,Q2),e(Cn,Hu),e(Hu,O2),g(l,r_,_),g(l,ft,_),w(Ui,ft,null),e(ft,D2),e(ft,Ku),e(Ku,Y2),e(ft,H2),e(ft,qi),e(qi,K2),e(qi,qp),e(qp,e$),e(qi,t$),e(ft,o$),e(ft,Ni),e(Ni,n$),e(Ni,Wi),e(Wi,s$),e(Ni,a$),e(ft,r$),w(sa,ft,null),e(ft,l$),e(ft,Kt),w(Zi,Kt,null),e(Kt,i$),e(Kt,zn),e(zn,d$),e(zn,Np),e(Np,c$),e(zn,p$),e(zn,em),e(em,h$),e(zn,u$),e(Kt,m$),w(aa,Kt,null),e(Kt,f$),w(ra,Kt,null),g(l,l_,_),g(l,In,_),e(In,la),e(la,tm),w(Ai,tm,null),e(In,g$),e(In,om),e(om,_$),g(l,i_,_),g(l,gt,_),w(Bi,gt,null),e(gt,b$),e(gt,nm),e(nm,y$),e(gt,v$),e(gt,Gi),e(Gi,T$),e(Gi,Wp),e(Wp,k$),e(Gi,w$),e(gt,M$),e(gt,Si),e(Si,$$),e(Si,Vi),e(Vi,F$),e(Si,R$),e(gt,E$),w(ia,gt,null),e(gt,x$),e(gt,zt),w(Xi,zt,null),e(zt,j$),e(zt,Un),e(Un,J$),e(Un,Zp),e(Zp,C$),e(Un,z$),e(Un,sm),e(sm,I$),e(Un,U$),e(zt,q$),w(da,zt,null),e(zt,N$),w(ca,zt,null),e(zt,W$),w(pa,zt,null),g(l,d_,_),g(l,qn,_),e(qn,ha),e(ha,am),w(Pi,am,null),e(qn,Z$),e(qn,rm),e(rm,A$),g(l,c_,_),g(l,_t,_),w(Li,_t,null),e(_t,B$),e(_t,Nn),e(Nn,G$),e(Nn,lm),e(lm,S$),e(Nn,V$),e(Nn,im),e(im,X$),e(Nn,P$),e(_t,L$),e(_t,Qi),e(Qi,Q$),e(Qi,Ap),e(Ap,O$),e(Qi,D$),e(_t,Y$),e(_t,Oi),e(Oi,H$),e(Oi,Di),e(Di,K$),e(Oi,eF),e(_t,tF),w(ua,_t,null),e(_t,oF),e(_t,It),w(Yi,It,null),e(It,nF),e(It,Wn),e(Wn,sF),e(Wn,Bp),e(Bp,aF),e(Wn,rF),e(Wn,dm),e(dm,lF),e(Wn,iF),e(It,dF),w(ma,It,null),e(It,cF),w(fa,It,null),e(It,pF),w(ga,It,null),g(l,p_,_),g(l,Zn,_),e(Zn,_a),e(_a,cm),w(Hi,cm,null),e(Zn,hF),e(Zn,pm),e(pm,uF),g(l,h_,_),g(l,nt,_),w(Ki,nt,null),e(nt,mF),e(nt,hm),e(hm,fF),e(nt,gF),e(nt,ed),e(ed,_F),e(ed,Gp),e(Gp,bF),e(ed,yF),e(nt,vF),e(nt,td),e(td,TF),e(td,od),e(od,kF),e(td,wF),e(nt,MF),e(nt,um),e(um,$F),e(nt,FF),e(nt,bo),e(bo,mm),e(mm,nd),e(nd,RF),e(bo,EF),e(bo,fm),e(fm,sd),e(sd,xF),e(bo,jF),e(bo,gm),e(gm,ad),e(ad,JF),e(bo,CF),e(bo,_m),e(_m,rd),e(rd,zF),e(nt,IF),e(nt,eo),w(ld,eo,null),e(eo,UF),e(eo,An),e(An,qF),e(An,bm),e(bm,NF),e(An,WF),e(An,ym),e(ym,ZF),e(An,AF),e(eo,BF),w(ba,eo,null),e(eo,GF),w(ya,eo,null),g(l,u_,_),g(l,Bn,_),e(Bn,va),e(va,vm),w(id,vm,null),e(Bn,SF),e(Bn,Tm),e(Tm,VF),g(l,m_,_),g(l,st,_),w(dd,st,null),e(st,XF),e(st,km),e(km,PF),e(st,LF),e(st,cd),e(cd,QF),e(cd,Sp),e(Sp,OF),e(cd,DF),e(st,YF),e(st,pd),e(pd,HF),e(pd,hd),e(hd,KF),e(pd,eR),e(st,tR),e(st,wm),e(wm,oR),e(st,nR),e(st,yo),e(yo,Mm),e(Mm,ud),e(ud,sR),e(yo,aR),e(yo,$m),e($m,md),e(md,rR),e(yo,lR),e(yo,Fm),e(Fm,fd),e(fd,iR),e(yo,dR),e(yo,Rm),e(Rm,gd),e(gd,cR),e(st,pR),e(st,to),w(_d,to,null),e(to,hR),e(to,Gn),e(Gn,uR),e(Gn,Em),e(Em,mR),e(Gn,fR),e(Gn,xm),e(xm,gR),e(Gn,_R),e(to,bR),w(Ta,to,null),e(to,yR),w(ka,to,null),g(l,f_,_),g(l,Sn,_),e(Sn,wa),e(wa,jm),w(bd,jm,null),e(Sn,vR),e(Sn,Jm),e(Jm,TR),g(l,g_,_),g(l,at,_),w(yd,at,null),e(at,kR),e(at,vd),e(vd,wR),e(vd,Cm),e(Cm,MR),e(vd,$R),e(at,FR),e(at,Td),e(Td,RR),e(Td,Vp),e(Vp,ER),e(Td,xR),e(at,jR),e(at,kd),e(kd,JR),e(kd,wd),e(wd,CR),e(kd,zR),e(at,IR),e(at,zm),e(zm,UR),e(at,qR),e(at,vo),e(vo,Im),e(Im,Md),e(Md,NR),e(vo,WR),e(vo,Um),e(Um,$d),e($d,ZR),e(vo,AR),e(vo,qm),e(qm,Fd),e(Fd,BR),e(vo,GR),e(vo,Nm),e(Nm,Rd),e(Rd,SR),e(at,VR),e(at,oo),w(Ed,oo,null),e(oo,XR),e(oo,Vn),e(Vn,PR),e(Vn,Wm),e(Wm,LR),e(Vn,QR),e(Vn,Zm),e(Zm,OR),e(Vn,DR),e(oo,YR),w(Ma,oo,null),e(oo,HR),w($a,oo,null),g(l,__,_),g(l,Xn,_),e(Xn,Fa),e(Fa,Am),w(xd,Am,null),e(Xn,KR),e(Xn,Bm),e(Bm,eE),g(l,b_,_),g(l,rt,_),w(jd,rt,null),e(rt,tE),e(rt,Gm),e(Gm,oE),e(rt,nE),e(rt,Jd),e(Jd,sE),e(Jd,Xp),e(Xp,aE),e(Jd,rE),e(rt,lE),e(rt,Cd),e(Cd,iE),e(Cd,zd),e(zd,dE),e(Cd,cE),e(rt,pE),e(rt,Sm),e(Sm,hE),e(rt,uE),e(rt,To),e(To,Vm),e(Vm,Id),e(Id,mE),e(To,fE),e(To,Xm),e(Xm,Ud),e(Ud,gE),e(To,_E),e(To,Pm),e(Pm,qd),e(qd,bE),e(To,yE),e(To,Lm),e(Lm,Nd),e(Nd,vE),e(rt,TE),e(rt,no),w(Wd,no,null),e(no,kE),e(no,Pn),e(Pn,wE),e(Pn,Qm),e(Qm,ME),e(Pn,$E),e(Pn,Om),e(Om,FE),e(Pn,RE),e(no,EE),w(Ra,no,null),e(no,xE),w(Ea,no,null),g(l,y_,_),g(l,Ln,_),e(Ln,xa),e(xa,Dm),w(Zd,Dm,null),e(Ln,jE),e(Ln,Ym),e(Ym,JE),g(l,v_,_),g(l,lt,_),w(Ad,lt,null),e(lt,CE),e(lt,Hm),e(Hm,zE),e(lt,IE),e(lt,Bd),e(Bd,UE),e(Bd,Pp),e(Pp,qE),e(Bd,NE),e(lt,WE),e(lt,Gd),e(Gd,ZE),e(Gd,Sd),e(Sd,AE),e(Gd,BE),e(lt,GE),e(lt,Km),e(Km,SE),e(lt,VE),e(lt,ko),e(ko,ef),e(ef,Vd),e(Vd,XE),e(ko,PE),e(ko,tf),e(tf,Xd),e(Xd,LE),e(ko,QE),e(ko,of),e(of,Pd),e(Pd,OE),e(ko,DE),e(ko,nf),e(nf,Ld),e(Ld,YE),e(lt,HE),e(lt,so),w(Qd,so,null),e(so,KE),e(so,Qn),e(Qn,e4),e(Qn,sf),e(sf,t4),e(Qn,o4),e(Qn,af),e(af,n4),e(Qn,s4),e(so,a4),w(ja,so,null),e(so,r4),w(Ja,so,null),g(l,T_,_),g(l,On,_),e(On,Ca),e(Ca,rf),w(Od,rf,null),e(On,l4),e(On,lf),e(lf,i4),g(l,k_,_),g(l,it,_),w(Dd,it,null),e(it,d4),e(it,df),e(df,c4),e(it,p4),e(it,Yd),e(Yd,h4),e(Yd,Lp),e(Lp,u4),e(Yd,m4),e(it,f4),e(it,Hd),e(Hd,g4),e(Hd,Kd),e(Kd,_4),e(Hd,b4),e(it,y4),e(it,cf),e(cf,v4),e(it,T4),e(it,wo),e(wo,pf),e(pf,ec),e(ec,k4),e(wo,w4),e(wo,hf),e(hf,tc),e(tc,M4),e(wo,$4),e(wo,uf),e(uf,oc),e(oc,F4),e(wo,R4),e(wo,mf),e(mf,nc),e(nc,E4),e(it,x4),e(it,ao),w(sc,ao,null),e(ao,j4),e(ao,Dn),e(Dn,J4),e(Dn,ff),e(ff,C4),e(Dn,z4),e(Dn,gf),e(gf,I4),e(Dn,U4),e(ao,q4),w(za,ao,null),e(ao,N4),w(Ia,ao,null),g(l,w_,_),g(l,Yn,_),e(Yn,Ua),e(Ua,_f),w(ac,_f,null),e(Yn,W4),e(Yn,bf),e(bf,Z4),g(l,M_,_),g(l,dt,_),w(rc,dt,null),e(dt,A4),e(dt,Hn),e(Hn,B4),e(Hn,yf),e(yf,G4),e(Hn,S4),e(Hn,vf),e(vf,V4),e(Hn,X4),e(dt,P4),e(dt,lc),e(lc,L4),e(lc,Qp),e(Qp,Q4),e(lc,O4),e(dt,D4),e(dt,ic),e(ic,Y4),e(ic,dc),e(dc,H4),e(ic,K4),e(dt,ex),e(dt,Tf),e(Tf,tx),e(dt,ox),e(dt,Mo),e(Mo,kf),e(kf,cc),e(cc,nx),e(Mo,sx),e(Mo,wf),e(wf,pc),e(pc,ax),e(Mo,rx),e(Mo,Mf),e(Mf,hc),e(hc,lx),e(Mo,ix),e(Mo,$f),e($f,uc),e(uc,dx),e(dt,cx),e(dt,ro),w(mc,ro,null),e(ro,px),e(ro,Kn),e(Kn,hx),e(Kn,Ff),e(Ff,ux),e(Kn,mx),e(Kn,Rf),e(Rf,fx),e(Kn,gx),e(ro,_x),w(qa,ro,null),e(ro,bx),w(Na,ro,null),$_=!0},p(l,[_]){const fc={};_&2&&(fc.$$scope={dirty:_,ctx:l}),is.$set(fc);const Ef={};_&2&&(Ef.$$scope={dirty:_,ctx:l}),cs.$set(Ef);const xf={};_&2&&(xf.$$scope={dirty:_,ctx:l}),ps.$set(xf);const jf={};_&2&&(jf.$$scope={dirty:_,ctx:l}),fs.$set(jf);const es={};_&2&&(es.$$scope={dirty:_,ctx:l}),gs.$set(es);const Jf={};_&2&&(Jf.$$scope={dirty:_,ctx:l}),ys.$set(Jf);const Cf={};_&2&&(Cf.$$scope={dirty:_,ctx:l}),vs.$set(Cf);const zf={};_&2&&(zf.$$scope={dirty:_,ctx:l}),ks.$set(zf);const gc={};_&2&&(gc.$$scope={dirty:_,ctx:l}),ws.$set(gc);const If={};_&2&&(If.$$scope={dirty:_,ctx:l}),$s.$set(If);const Uf={};_&2&&(Uf.$$scope={dirty:_,ctx:l}),Fs.$set(Uf);const qf={};_&2&&(qf.$$scope={dirty:_,ctx:l}),Es.$set(qf);const ts={};_&2&&(ts.$$scope={dirty:_,ctx:l}),xs.$set(ts);const Nf={};_&2&&(Nf.$$scope={dirty:_,ctx:l}),js.$set(Nf);const Wf={};_&2&&(Wf.$$scope={dirty:_,ctx:l}),Cs.$set(Wf);const Zf={};_&2&&(Zf.$$scope={dirty:_,ctx:l}),zs.$set(Zf);const Af={};_&2&&(Af.$$scope={dirty:_,ctx:l}),Us.$set(Af);const Bf={};_&2&&(Bf.$$scope={dirty:_,ctx:l}),qs.$set(Bf);const Gf={};_&2&&(Gf.$$scope={dirty:_,ctx:l}),Ws.$set(Gf);const Sf={};_&2&&(Sf.$$scope={dirty:_,ctx:l}),Zs.$set(Sf);const Vt={};_&2&&(Vt.$$scope={dirty:_,ctx:l}),Bs.$set(Vt);const Vf={};_&2&&(Vf.$$scope={dirty:_,ctx:l}),Gs.$set(Vf);const _c={};_&2&&(_c.$$scope={dirty:_,ctx:l}),Ss.$set(_c);const Xf={};_&2&&(Xf.$$scope={dirty:_,ctx:l}),Xs.$set(Xf);const Pf={};_&2&&(Pf.$$scope={dirty:_,ctx:l}),Ps.$set(Pf);const Lf={};_&2&&(Lf.$$scope={dirty:_,ctx:l}),Qs.$set(Lf);const Qf={};_&2&&(Qf.$$scope={dirty:_,ctx:l}),Os.$set(Qf);const $o={};_&2&&($o.$$scope={dirty:_,ctx:l}),Ds.$set($o);const Of={};_&2&&(Of.$$scope={dirty:_,ctx:l}),Ys.$set(Of);const Df={};_&2&&(Df.$$scope={dirty:_,ctx:l}),Ks.$set(Df);const Yf={};_&2&&(Yf.$$scope={dirty:_,ctx:l}),ea.$set(Yf);const bc={};_&2&&(bc.$$scope={dirty:_,ctx:l}),ta.$set(bc);const Hf={};_&2&&(Hf.$$scope={dirty:_,ctx:l}),oa.$set(Hf);const Fo={};_&2&&(Fo.$$scope={dirty:_,ctx:l}),sa.$set(Fo);const Kf={};_&2&&(Kf.$$scope={dirty:_,ctx:l}),aa.$set(Kf);const eg={};_&2&&(eg.$$scope={dirty:_,ctx:l}),ra.$set(eg);const tg={};_&2&&(tg.$$scope={dirty:_,ctx:l}),ia.$set(tg);const og={};_&2&&(og.$$scope={dirty:_,ctx:l}),da.$set(og);const ng={};_&2&&(ng.$$scope={dirty:_,ctx:l}),ca.$set(ng);const Op={};_&2&&(Op.$$scope={dirty:_,ctx:l}),pa.$set(Op);const sg={};_&2&&(sg.$$scope={dirty:_,ctx:l}),ua.$set(sg);const os={};_&2&&(os.$$scope={dirty:_,ctx:l}),ma.$set(os);const ag={};_&2&&(ag.$$scope={dirty:_,ctx:l}),fa.$set(ag);const rg={};_&2&&(rg.$$scope={dirty:_,ctx:l}),ga.$set(rg);const yc={};_&2&&(yc.$$scope={dirty:_,ctx:l}),ba.$set(yc);const lg={};_&2&&(lg.$$scope={dirty:_,ctx:l}),ya.$set(lg);const ig={};_&2&&(ig.$$scope={dirty:_,ctx:l}),Ta.$set(ig);const dg={};_&2&&(dg.$$scope={dirty:_,ctx:l}),ka.$set(dg);const cg={};_&2&&(cg.$$scope={dirty:_,ctx:l}),Ma.$set(cg);const bt={};_&2&&(bt.$$scope={dirty:_,ctx:l}),$a.$set(bt);const ns={};_&2&&(ns.$$scope={dirty:_,ctx:l}),Ra.$set(ns);const pg={};_&2&&(pg.$$scope={dirty:_,ctx:l}),Ea.$set(pg);const hg={};_&2&&(hg.$$scope={dirty:_,ctx:l}),ja.$set(hg);const vc={};_&2&&(vc.$$scope={dirty:_,ctx:l}),Ja.$set(vc);const ug={};_&2&&(ug.$$scope={dirty:_,ctx:l}),za.$set(ug);const Tc={};_&2&&(Tc.$$scope={dirty:_,ctx:l}),Ia.$set(Tc);const mg={};_&2&&(mg.$$scope={dirty:_,ctx:l}),qa.$set(mg);const Go={};_&2&&(Go.$$scope={dirty:_,ctx:l}),Na.$set(Go)},i(l){$_||(M(i.$$.fragment,l),M(ie.$$.fragment,l),M(pr.$$.fragment,l),M(hr.$$.fragment,l),M($r.$$.fragment,l),M(Cr.$$.fragment,l),M(Gr.$$.fragment,l),M(tl.$$.fragment,l),M(ol.$$.fragment,l),M(is.$$.fragment,l),M(sl.$$.fragment,l),M(al.$$.fragment,l),M(cs.$$.fragment,l),M(ps.$$.fragment,l),M(il.$$.fragment,l),M(cl.$$.fragment,l),M(hl.$$.fragment,l),M(ul.$$.fragment,l),M(ml.$$.fragment,l),M(fl.$$.fragment,l),M(fs.$$.fragment,l),M(gs.$$.fragment,l),M(yl.$$.fragment,l),M(vl.$$.fragment,l),M(Tl.$$.fragment,l),M(Rl.$$.fragment,l),M(ys.$$.fragment,l),M(vs.$$.fragment,l),M(El.$$.fragment,l),M(xl.$$.fragment,l),M(Il.$$.fragment,l),M(ks.$$.fragment,l),M(ws.$$.fragment,l),M(Ul.$$.fragment,l),M(ql.$$.fragment,l),M(Bl.$$.fragment,l),M($s.$$.fragment,l),M(Fs.$$.fragment,l),M(Gl.$$.fragment,l),M(Sl.$$.fragment,l),M(Ll.$$.fragment,l),M(Es.$$.fragment,l),M(xs.$$.fragment,l),M(js.$$.fragment,l),M(Ql.$$.fragment,l),M(Ol.$$.fragment,l),M(Kl.$$.fragment,l),M(Cs.$$.fragment,l),M(zs.$$.fragment,l),M(ei.$$.fragment,l),M(ti.$$.fragment,l),M(ai.$$.fragment,l),M(Us.$$.fragment,l),M(qs.$$.fragment,l),M(ri.$$.fragment,l),M(li.$$.fragment,l),M(pi.$$.fragment,l),M(Ws.$$.fragment,l),M(Zs.$$.fragment,l),M(hi.$$.fragment,l),M(ui.$$.fragment,l),M(Bs.$$.fragment,l),M(_i.$$.fragment,l),M(Gs.$$.fragment,l),M(Ss.$$.fragment,l),M(bi.$$.fragment,l),M(yi.$$.fragment,l),M(vi.$$.fragment,l),M(Xs.$$.fragment,l),M(Ps.$$.fragment,l),M(Ti.$$.fragment,l),M(ki.$$.fragment,l),M(Qs.$$.fragment,l),M(Ri.$$.fragment,l),M(Os.$$.fragment,l),M(Ds.$$.fragment,l),M(Ys.$$.fragment,l),M(Ei.$$.fragment,l),M(xi.$$.fragment,l),M(Ks.$$.fragment,l),M(zi.$$.fragment,l),M(ea.$$.fragment,l),M(ta.$$.fragment,l),M(oa.$$.fragment,l),M(Ii.$$.fragment,l),M(Ui.$$.fragment,l),M(sa.$$.fragment,l),M(Zi.$$.fragment,l),M(aa.$$.fragment,l),M(ra.$$.fragment,l),M(Ai.$$.fragment,l),M(Bi.$$.fragment,l),M(ia.$$.fragment,l),M(Xi.$$.fragment,l),M(da.$$.fragment,l),M(ca.$$.fragment,l),M(pa.$$.fragment,l),M(Pi.$$.fragment,l),M(Li.$$.fragment,l),M(ua.$$.fragment,l),M(Yi.$$.fragment,l),M(ma.$$.fragment,l),M(fa.$$.fragment,l),M(ga.$$.fragment,l),M(Hi.$$.fragment,l),M(Ki.$$.fragment,l),M(ld.$$.fragment,l),M(ba.$$.fragment,l),M(ya.$$.fragment,l),M(id.$$.fragment,l),M(dd.$$.fragment,l),M(_d.$$.fragment,l),M(Ta.$$.fragment,l),M(ka.$$.fragment,l),M(bd.$$.fragment,l),M(yd.$$.fragment,l),M(Ed.$$.fragment,l),M(Ma.$$.fragment,l),M($a.$$.fragment,l),M(xd.$$.fragment,l),M(jd.$$.fragment,l),M(Wd.$$.fragment,l),M(Ra.$$.fragment,l),M(Ea.$$.fragment,l),M(Zd.$$.fragment,l),M(Ad.$$.fragment,l),M(Qd.$$.fragment,l),M(ja.$$.fragment,l),M(Ja.$$.fragment,l),M(Od.$$.fragment,l),M(Dd.$$.fragment,l),M(sc.$$.fragment,l),M(za.$$.fragment,l),M(Ia.$$.fragment,l),M(ac.$$.fragment,l),M(rc.$$.fragment,l),M(mc.$$.fragment,l),M(qa.$$.fragment,l),M(Na.$$.fragment,l),$_=!0)},o(l){$(i.$$.fragment,l),$(ie.$$.fragment,l),$(pr.$$.fragment,l),$(hr.$$.fragment,l),$($r.$$.fragment,l),$(Cr.$$.fragment,l),$(Gr.$$.fragment,l),$(tl.$$.fragment,l),$(ol.$$.fragment,l),$(is.$$.fragment,l),$(sl.$$.fragment,l),$(al.$$.fragment,l),$(cs.$$.fragment,l),$(ps.$$.fragment,l),$(il.$$.fragment,l),$(cl.$$.fragment,l),$(hl.$$.fragment,l),$(ul.$$.fragment,l),$(ml.$$.fragment,l),$(fl.$$.fragment,l),$(fs.$$.fragment,l),$(gs.$$.fragment,l),$(yl.$$.fragment,l),$(vl.$$.fragment,l),$(Tl.$$.fragment,l),$(Rl.$$.fragment,l),$(ys.$$.fragment,l),$(vs.$$.fragment,l),$(El.$$.fragment,l),$(xl.$$.fragment,l),$(Il.$$.fragment,l),$(ks.$$.fragment,l),$(ws.$$.fragment,l),$(Ul.$$.fragment,l),$(ql.$$.fragment,l),$(Bl.$$.fragment,l),$($s.$$.fragment,l),$(Fs.$$.fragment,l),$(Gl.$$.fragment,l),$(Sl.$$.fragment,l),$(Ll.$$.fragment,l),$(Es.$$.fragment,l),$(xs.$$.fragment,l),$(js.$$.fragment,l),$(Ql.$$.fragment,l),$(Ol.$$.fragment,l),$(Kl.$$.fragment,l),$(Cs.$$.fragment,l),$(zs.$$.fragment,l),$(ei.$$.fragment,l),$(ti.$$.fragment,l),$(ai.$$.fragment,l),$(Us.$$.fragment,l),$(qs.$$.fragment,l),$(ri.$$.fragment,l),$(li.$$.fragment,l),$(pi.$$.fragment,l),$(Ws.$$.fragment,l),$(Zs.$$.fragment,l),$(hi.$$.fragment,l),$(ui.$$.fragment,l),$(Bs.$$.fragment,l),$(_i.$$.fragment,l),$(Gs.$$.fragment,l),$(Ss.$$.fragment,l),$(bi.$$.fragment,l),$(yi.$$.fragment,l),$(vi.$$.fragment,l),$(Xs.$$.fragment,l),$(Ps.$$.fragment,l),$(Ti.$$.fragment,l),$(ki.$$.fragment,l),$(Qs.$$.fragment,l),$(Ri.$$.fragment,l),$(Os.$$.fragment,l),$(Ds.$$.fragment,l),$(Ys.$$.fragment,l),$(Ei.$$.fragment,l),$(xi.$$.fragment,l),$(Ks.$$.fragment,l),$(zi.$$.fragment,l),$(ea.$$.fragment,l),$(ta.$$.fragment,l),$(oa.$$.fragment,l),$(Ii.$$.fragment,l),$(Ui.$$.fragment,l),$(sa.$$.fragment,l),$(Zi.$$.fragment,l),$(aa.$$.fragment,l),$(ra.$$.fragment,l),$(Ai.$$.fragment,l),$(Bi.$$.fragment,l),$(ia.$$.fragment,l),$(Xi.$$.fragment,l),$(da.$$.fragment,l),$(ca.$$.fragment,l),$(pa.$$.fragment,l),$(Pi.$$.fragment,l),$(Li.$$.fragment,l),$(ua.$$.fragment,l),$(Yi.$$.fragment,l),$(ma.$$.fragment,l),$(fa.$$.fragment,l),$(ga.$$.fragment,l),$(Hi.$$.fragment,l),$(Ki.$$.fragment,l),$(ld.$$.fragment,l),$(ba.$$.fragment,l),$(ya.$$.fragment,l),$(id.$$.fragment,l),$(dd.$$.fragment,l),$(_d.$$.fragment,l),$(Ta.$$.fragment,l),$(ka.$$.fragment,l),$(bd.$$.fragment,l),$(yd.$$.fragment,l),$(Ed.$$.fragment,l),$(Ma.$$.fragment,l),$($a.$$.fragment,l),$(xd.$$.fragment,l),$(jd.$$.fragment,l),$(Wd.$$.fragment,l),$(Ra.$$.fragment,l),$(Ea.$$.fragment,l),$(Zd.$$.fragment,l),$(Ad.$$.fragment,l),$(Qd.$$.fragment,l),$(ja.$$.fragment,l),$(Ja.$$.fragment,l),$(Od.$$.fragment,l),$(Dd.$$.fragment,l),$(sc.$$.fragment,l),$(za.$$.fragment,l),$(Ia.$$.fragment,l),$(ac.$$.fragment,l),$(rc.$$.fragment,l),$(mc.$$.fragment,l),$(qa.$$.fragment,l),$(Na.$$.fragment,l),$_=!1},d(l){t(d),l&&t(y),l&&t(m),F(i),l&&t(K),l&&t(N),l&&t(Fe),l&&t(le),F(ie),l&&t(ne),l&&t(C),l&&t(Re),l&&t(I),l&&t(P),l&&t(me),l&&t(L),l&&t(fe),l&&t(Ee),l&&t(S),l&&t(se),l&&t(z),l&&t(bg),l&&t(Ro),l&&t(yg),l&&t(tn),F(pr),l&&t(vg),l&&t(Uc),l&&t(Tg),F(hr,l),l&&t(kg),l&&t(ct),l&&t(wg),F($r,l),l&&t(Mg),l&&t(xt),l&&t($g),F(Cr,l),l&&t(Fg),l&&t(yt),l&&t(Rg),F(Gr,l),l&&t(Eg),l&&t(vt),l&&t(xg),l&&t(tp),l&&t(jg),l&&t(Wo),l&&t(Jg),l&&t(nn),F(tl),l&&t(Cg),l&&t(St),F(ol),F(is),l&&t(zg),l&&t(an),F(sl),l&&t(Ig),l&&t(We),F(al),F(cs),F(ps),F(il),F(cl),F(hl),F(ul),l&&t(Ug),l&&t(rn),F(ml),l&&t(qg),l&&t(tt),F(fl),F(fs),F(gs),F(yl),l&&t(Ng),l&&t(ln),F(vl),l&&t(Wg),l&&t(ot),F(Tl),F(Rl),F(ys),F(vs),l&&t(Zg),l&&t(cn),F(El),l&&t(Ag),l&&t(wt),F(xl),F(Il),F(ks),F(ws),l&&t(Bg),l&&t(hn),F(Ul),l&&t(Gg),l&&t(Mt),F(ql),F(Bl),F($s),F(Fs),l&&t(Sg),l&&t(mn),F(Gl),l&&t(Vg),l&&t($t),F(Sl),F(Ll),F(Es),F(xs),F(js),l&&t(Xg),l&&t(gn),F(Ql),l&&t(Pg),l&&t(Ft),F(Ol),F(Kl),F(Cs),F(zs),l&&t(Lg),l&&t(bn),F(ei),l&&t(Qg),l&&t(Rt),F(ti),F(ai),F(Us),F(qs),l&&t(Og),l&&t(vn),F(ri),l&&t(Dg),l&&t(Et),F(li),F(pi),F(Ws),F(Zs),l&&t(Yg),l&&t(wn),F(hi),l&&t(Hg),l&&t(ht),F(ui),F(Bs),F(_i),F(Gs),F(Ss),l&&t(Kg),l&&t($n),F(bi),l&&t(e_),l&&t(Fn),F(yi),F(vi),F(Xs),F(Ps),l&&t(t_),l&&t(En),F(Ti),l&&t(o_),l&&t(ut),F(ki),F(Qs),F(Ri),F(Os),F(Ds),F(Ys),l&&t(n_),l&&t(jn),F(Ei),l&&t(s_),l&&t(mt),F(xi),F(Ks),F(zi),F(ea),F(ta),F(oa),l&&t(a_),l&&t(Cn),F(Ii),l&&t(r_),l&&t(ft),F(Ui),F(sa),F(Zi),F(aa),F(ra),l&&t(l_),l&&t(In),F(Ai),l&&t(i_),l&&t(gt),F(Bi),F(ia),F(Xi),F(da),F(ca),F(pa),l&&t(d_),l&&t(qn),F(Pi),l&&t(c_),l&&t(_t),F(Li),F(ua),F(Yi),F(ma),F(fa),F(ga),l&&t(p_),l&&t(Zn),F(Hi),l&&t(h_),l&&t(nt),F(Ki),F(ld),F(ba),F(ya),l&&t(u_),l&&t(Bn),F(id),l&&t(m_),l&&t(st),F(dd),F(_d),F(Ta),F(ka),l&&t(f_),l&&t(Sn),F(bd),l&&t(g_),l&&t(at),F(yd),F(Ed),F(Ma),F($a),l&&t(__),l&&t(Xn),F(xd),l&&t(b_),l&&t(rt),F(jd),F(Wd),F(Ra),F(Ea),l&&t(y_),l&&t(Ln),F(Zd),l&&t(v_),l&&t(lt),F(Ad),F(Qd),F(ja),F(Ja),l&&t(T_),l&&t(On),F(Od),l&&t(k_),l&&t(it),F(Dd),F(sc),F(za),F(Ia),l&&t(w_),l&&t(Yn),F(ac),l&&t(M_),l&&t(dt),F(rc),F(mc),F(qa),F(Na)}}}const N5={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 W5(R){return JI(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class P5 extends RI{constructor(d){super();EI(this,d,W5,q5,xI,{})}}export{P5 as default,N5 as metadata};
