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

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

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

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

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

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

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

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer(<span class="hljs-string">&quot; Hello world&quot;</span>)[<span class="hljs-string">&quot;input_ids&quot;</span>]
[<span class="hljs-number">0</span>, <span class="hljs-number">20920</span>, <span class="hljs-number">232</span>, <span class="hljs-number">2</span>]`}}),{c(){d=s("p"),y=o("be encoded differently whether it is at the beginning of the sentence (without space) or not:"),m=p(),T(f.$$.fragment)},l(i){d=a(i,"P",{});var u=r(d);y=n(u,"be encoded differently whether it is at the beginning of the sentence (without space) or not:"),u.forEach(t),m=h(i),k(f.$$.fragment,i)},m(i,u){g(i,d,u),e(d,y),g(i,m,u),w(f,i,u),b=!0},p:Me,i(i){b||(M(f.$$.fragment,i),b=!0)},o(i){$(f.$$.fragment,i),b=!1},d(i){i&&t(d),i&&t(m),F(f,i)}}}function WI(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 q=r(m);f=n(q,"is_split_into_words=True"),q.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 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 NI(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 XI(R){let d,y,m,f,b;return f=new $e({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwQXV0b1Rva2VuaXplciUyQyUyMFJvYmVydGFGb3JTZXF1ZW5jZUNsYXNzaWZpY2F0aW9uJTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIyY2FyZGlmZm5scCUyRnR3aXR0ZXItcm9iZXJ0YS1iYXNlLWVtb3Rpb24lMjIpJTBBbW9kZWwlMjAlM0QlMjBSb2JlcnRhRm9yU2VxdWVuY2VDbGFzc2lmaWNhdGlvbi5mcm9tX3ByZXRyYWluZWQoJTIyY2FyZGlmZm5scCUyRnR3aXR0ZXItcm9iZXJ0YS1iYXNlLWVtb3Rpb24lMjIlMkMlMjBwcm9ibGVtX3R5cGUlM0QlMjJtdWx0aV9sYWJlbF9jbGFzc2lmaWNhdGlvbiUyMiklMEElMEFpbnB1dHMlMjAlM0QlMjB0b2tlbml6ZXIoJTIySGVsbG8lMkMlMjBteSUyMGRvZyUyMGlzJTIwY3V0ZSUyMiUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIycHQlMjIpJTBBJTBBd2l0aCUyMHRvcmNoLm5vX2dyYWQoKSUzQSUwQSUyMCUyMCUyMCUyMGxvZ2l0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzKS5sb2dpdHMlMEElMEFwcmVkaWN0ZWRfY2xhc3NfaWRzJTIwJTNEJTIwdG9yY2guYXJhbmdlKDAlMkMlMjBsb2dpdHMuc2hhcGUlNUItMSU1RCklNUJ0b3JjaC5zaWdtb2lkKGxvZ2l0cykuc3F1ZWV6ZShkaW0lM0QwKSUyMCUzRSUyMDAuNSU1RCUwQSUwQSUyMyUyMFRvJTIwdHJhaW4lMjBhJTIwbW9kZWwlMjBvbiUyMCU2MG51bV9sYWJlbHMlNjAlMjBjbGFzc2VzJTJDJTIweW91JTIwY2FuJTIwcGFzcyUyMCU2MG51bV9sYWJlbHMlM0RudW1fbGFiZWxzJTYwJTIwdG8lMjAlNjAuZnJvbV9wcmV0cmFpbmVkKC4uLiklNjAlMEFudW1fbGFiZWxzJTIwJTNEJTIwbGVuKG1vZGVsLmNvbmZpZy5pZDJsYWJlbCklMEFtb2RlbCUyMCUzRCUyMFJvYmVydGFGb3JTZXF1ZW5jZUNsYXNzaWZpY2F0aW9uLmZyb21fcHJldHJhaW5lZCglMEElMjAlMjAlMjAlMjAlMjJjYXJkaWZmbmxwJTJGdHdpdHRlci1yb2JlcnRhLWJhc2UtZW1vdGlvbiUyMiUyQyUyMG51bV9sYWJlbHMlM0RudW1fbGFiZWxzJTJDJTIwcHJvYmxlbV90eXBlJTNEJTIybXVsdGlfbGFiZWxfY2xhc3NpZmljYXRpb24lMjIlMEEpJTBBJTBBbGFiZWxzJTIwJTNEJTIwdG9yY2guc3VtKCUwQSUyMCUyMCUyMCUyMHRvcmNoLm5uLmZ1bmN0aW9uYWwub25lX2hvdChwcmVkaWN0ZWRfY2xhc3NfaWRzJTVCTm9uZSUyQyUyMCUzQSU1RC5jbG9uZSgpJTJDJTIwbnVtX2NsYXNzZXMlM0RudW1fbGFiZWxzKSUyQyUyMGRpbSUzRDElMEEpLnRvKHRvcmNoLmZsb2F0KSUwQWxvc3MlMjAlM0QlMjBtb2RlbCgqKmlucHV0cyUyQyUyMGxhYmVscyUzRGxhYmVscykubG9zcw==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, RobertaForSequenceClassification

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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