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 M4,G as e,g,y as w,q as M,o as $,B as F,v as JI,L as Me}from"../../chunks/vendor-hf-doc-builder.js";import{T as ke}from"../../chunks/Tip-hf-doc-builder.js";import{D as W}from"../../chunks/Docstring-hf-doc-builder.js";import{C as $e}from"../../chunks/CodeBlock-hf-doc-builder.js";import{I as Ze}from"../../chunks/IconCopyLink-hf-doc-builder.js";import{E as we}from"../../chunks/ExampleCodeBlock-hf-doc-builder.js";import{P as Kb}from"../../chunks/PipelineTag-hf-doc-builder.js";function zI(R){let d,y,m,f,b;return f=new $e({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMFJvYmVydGFDb25maWclMkMlMjBSb2JlcnRhTW9kZWwlMEElMEElMjMlMjBJbml0aWFsaXppbmclMjBhJTIwUm9CRVJUYSUyMGNvbmZpZ3VyYXRpb24lMEFjb25maWd1cmF0aW9uJTIwJTNEJTIwUm9iZXJ0YUNvbmZpZygpJTBBJTBBJTIzJTIwSW5pdGlhbGl6aW5nJTIwYSUyMG1vZGVsJTIwKHdpdGglMjByYW5kb20lMjB3ZWlnaHRzKSUyMGZyb20lMjB0aGUlMjBjb25maWd1cmF0aW9uJTBBbW9kZWwlMjAlM0QlMjBSb2JlcnRhTW9kZWwoY29uZmlndXJhdGlvbiklMEElMEElMjMlMjBBY2Nlc3NpbmclMjB0aGUlMjBtb2RlbCUyMGNvbmZpZ3VyYXRpb24lMEFjb25maWd1cmF0aW9uJTIwJTNEJTIwbW9kZWwuY29uZmln",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> RobertaConfig, RobertaModel

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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