import{S as FR,i as MR,s as $R,e as s,k as m,w as v,t,M as RR,c as r,d as o,m as p,a as l,x as k,h as n,b as f,G as e,g,y as w,q as F,o as M,B as $,v as jR,L as Ze}from"../../chunks/vendor-hf-doc-builder.js";import{T as Se}from"../../chunks/Tip-hf-doc-builder.js";import{D as S}from"../../chunks/Docstring-hf-doc-builder.js";import{C as Ne}from"../../chunks/CodeBlock-hf-doc-builder.js";import{I as Pe}from"../../chunks/IconCopyLink-hf-doc-builder.js";import{E as Ie}from"../../chunks/ExampleCodeBlock-hf-doc-builder.js";function ER(j){let d,y,h,u,_;return u=new Ne({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMFJvRm9ybWVyTW9kZWwlMkMlMjBSb0Zvcm1lckNvbmZpZyUwQSUwQSUyMyUyMEluaXRpYWxpemluZyUyMGElMjBSb0Zvcm1lciUyMGp1bm55dSUyRnJvZm9ybWVyX2NoaW5lc2VfYmFzZSUyMHN0eWxlJTIwY29uZmlndXJhdGlvbiUwQWNvbmZpZ3VyYXRpb24lMjAlM0QlMjBSb0Zvcm1lckNvbmZpZygpJTBBJTBBJTIzJTIwSW5pdGlhbGl6aW5nJTIwYSUyMG1vZGVsJTIwZnJvbSUyMHRoZSUyMGp1bm55dSUyRnJvZm9ybWVyX2NoaW5lc2VfYmFzZSUyMHN0eWxlJTIwY29uZmlndXJhdGlvbiUwQW1vZGVsJTIwJTNEJTIwUm9Gb3JtZXJNb2RlbChjb25maWd1cmF0aW9uKSUwQSUwQSUyMyUyMEFjY2Vzc2luZyUyMHRoZSUyMG1vZGVsJTIwY29uZmlndXJhdGlvbiUwQWNvbmZpZ3VyYXRpb24lMjAlM0QlMjBtb2RlbC5jb25maWc=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> RoFormerModel, RoFormerConfig

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a RoFormer junnyu/roformer_chinese_base style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = RoFormerConfig()

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a model from the junnyu/roformer_chinese_base style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = RoFormerModel(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=t("Example:"),h=m(),v(u.$$.fragment)},l(i){d=r(i,"P",{});var c=l(d);y=n(c,"Example:"),c.forEach(o),h=p(i),k(u.$$.fragment,i)},m(i,c){g(i,d,c),e(d,y),g(i,h,c),w(u,i,c),_=!0},p:Ze,i(i){_||(F(u.$$.fragment,i),_=!0)},o(i){M(u.$$.fragment,i),_=!1},d(i){i&&o(d),i&&o(h),$(u,i)}}}function JR(j){let d,y,h,u,_;return u=new Ne({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMFJvRm9ybWVyVG9rZW5pemVyJTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwUm9Gb3JtZXJUb2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMmp1bm55dSUyRnJvZm9ybWVyX2NoaW5lc2VfYmFzZSUyMiklMEF0b2tlbml6ZXIudG9rZW5pemUoJTIyJUU0JUJCJThBJUU1JUE0JUE5JUU1JUE0JUE5JUU2JUIwJTk0JUU5JTlEJTlFJUU1JUI4JUI4JUU1JUE1JUJEJUUzJTgwJTgyJTIyKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> RoFormerTokenizer

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = RoFormerTokenizer.from_pretrained(<span class="hljs-string">&quot;junnyu/roformer_chinese_base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer.tokenize(<span class="hljs-string">&quot;\u4ECA\u5929\u5929\u6C14\u975E\u5E38\u597D\u3002&quot;</span>)
[<span class="hljs-string">&#x27;\u4ECA&#x27;</span>, <span class="hljs-string">&#x27;\u5929&#x27;</span>, <span class="hljs-string">&#x27;\u5929&#x27;</span>, <span class="hljs-string">&#x27;\u6C14&#x27;</span>, <span class="hljs-string">&#x27;\u975E\u5E38&#x27;</span>, <span class="hljs-string">&#x27;\u597D&#x27;</span>, <span class="hljs-string">&#x27;\u3002&#x27;</span>]`}}),{c(){d=s("p"),y=t("Example:"),h=m(),v(u.$$.fragment)},l(i){d=r(i,"P",{});var c=l(d);y=n(c,"Example:"),c.forEach(o),h=p(i),k(u.$$.fragment,i)},m(i,c){g(i,d,c),e(d,y),g(i,h,c),w(u,i,c),_=!0},p:Ze,i(i){_||(F(u.$$.fragment,i),_=!0)},o(i){M(u.$$.fragment,i),_=!1},d(i){i&&o(d),i&&o(h),$(u,i)}}}function CR(j){let d,y,h,u,_;return u=new Ne({props:{code:"MCUyMDAlMjAwJTIwMCUyMDAlMjAwJTIwMCUyMDAlMjAwJTIwMCUyMDAlMjAxJTIwMSUyMDElMjAxJTIwMSUyMDElMjAxJTIwMSUyMDElMEElN0MlMjBmaXJzdCUyMHNlcXVlbmNlJTIwJTIwJTIwJTIwJTdDJTIwc2Vjb25kJTIwc2VxdWVuY2UlMjAlN0M=",highlighted:`0<span class="hljs-number"> 0 </span>0<span class="hljs-number"> 0 </span>0<span class="hljs-number"> 0 </span>0<span class="hljs-number"> 0 </span>0<span class="hljs-number"> 0 </span>0<span class="hljs-number"> 1 </span>1<span class="hljs-number"> 1 </span>1<span class="hljs-number"> 1 </span>1<span class="hljs-number"> 1 </span>1 1
| first sequence    | second sequence |`}}),{c(){d=s("p"),y=t("sequence pair mask has the following format:"),h=m(),v(u.$$.fragment)},l(i){d=r(i,"P",{});var c=l(d);y=n(c,"sequence pair mask has the following format:"),c.forEach(o),h=p(i),k(u.$$.fragment,i)},m(i,c){g(i,d,c),e(d,y),g(i,h,c),w(u,i,c),_=!0},p:Ze,i(i){_||(F(u.$$.fragment,i),_=!0)},o(i){M(u.$$.fragment,i),_=!1},d(i){i&&o(d),i&&o(h),$(u,i)}}}function UR(j){let d,y,h,u,_;return u=new Ne({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMFJvRm9ybWVyVG9rZW5pemVyRmFzdCUwQSUwQXRva2VuaXplciUyMCUzRCUyMFJvRm9ybWVyVG9rZW5pemVyRmFzdC5mcm9tX3ByZXRyYWluZWQoJTIyanVubnl1JTJGcm9mb3JtZXJfY2hpbmVzZV9iYXNlJTIyKSUwQXRva2VuaXplci50b2tlbml6ZSglMjIlRTQlQkIlOEElRTUlQTQlQTklRTUlQTQlQTklRTYlQjAlOTQlRTklOUQlOUUlRTUlQjglQjglRTUlQTUlQkQlRTMlODAlODIlMjIp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> RoFormerTokenizerFast

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = RoFormerTokenizerFast.from_pretrained(<span class="hljs-string">&quot;junnyu/roformer_chinese_base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer.tokenize(<span class="hljs-string">&quot;\u4ECA\u5929\u5929\u6C14\u975E\u5E38\u597D\u3002&quot;</span>)
[<span class="hljs-string">&#x27;\u4ECA&#x27;</span>, <span class="hljs-string">&#x27;\u5929&#x27;</span>, <span class="hljs-string">&#x27;\u5929&#x27;</span>, <span class="hljs-string">&#x27;\u6C14&#x27;</span>, <span class="hljs-string">&#x27;\u975E\u5E38&#x27;</span>, <span class="hljs-string">&#x27;\u597D&#x27;</span>, <span class="hljs-string">&#x27;\u3002&#x27;</span>]`}}),{c(){d=s("p"),y=t("Example:"),h=m(),v(u.$$.fragment)},l(i){d=r(i,"P",{});var c=l(d);y=n(c,"Example:"),c.forEach(o),h=p(i),k(u.$$.fragment,i)},m(i,c){g(i,d,c),e(d,y),g(i,h,c),w(u,i,c),_=!0},p:Ze,i(i){_||(F(u.$$.fragment,i),_=!0)},o(i){M(u.$$.fragment,i),_=!1},d(i){i&&o(d),i&&o(h),$(u,i)}}}function xR(j){let d,y,h,u,_;return{c(){d=s("p"),y=t("Although the recipe for forward pass needs to be defined within this function, one should call the "),h=s("code"),u=t("Module"),_=t(`
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=r(i,"P",{});var c=l(d);y=n(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),h=r(c,"CODE",{});var J=l(h);u=n(J,"Module"),J.forEach(o),_=n(c,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),c.forEach(o)},m(i,c){g(i,d,c),e(d,y),e(d,h),e(h,u),e(d,_)},d(i){i&&o(d)}}}function zR(j){let d,y,h,u,_;return u=new Ne({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBSb0Zvcm1lck1vZGVsJTBBaW1wb3J0JTIwdG9yY2glMEElMEF0b2tlbml6ZXIlMjAlM0QlMjBBdXRvVG9rZW5pemVyLmZyb21fcHJldHJhaW5lZCglMjJqdW5ueXUlMkZyb2Zvcm1lcl9jaGluZXNlX2Jhc2UlMjIpJTBBbW9kZWwlMjAlM0QlMjBSb0Zvcm1lck1vZGVsLmZyb21fcHJldHJhaW5lZCglMjJqdW5ueXUlMkZyb2Zvcm1lcl9jaGluZXNlX2Jhc2UlMjIpJTBBJTBBaW5wdXRzJTIwJTNEJTIwdG9rZW5pemVyKCUyMkhlbGxvJTJDJTIwbXklMjBkb2clMjBpcyUyMGN1dGUlMjIlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKSUwQW91dHB1dHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cyklMEElMEFsYXN0X2hpZGRlbl9zdGF0ZXMlMjAlM0QlMjBvdXRwdXRzLmxhc3RfaGlkZGVuX3N0YXRl",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, RoFormerModel
<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;junnyu/roformer_chinese_base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = RoFormerModel.from_pretrained(<span class="hljs-string">&quot;junnyu/roformer_chinese_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=t("Example:"),h=m(),v(u.$$.fragment)},l(i){d=r(i,"P",{});var c=l(d);y=n(c,"Example:"),c.forEach(o),h=p(i),k(u.$$.fragment,i)},m(i,c){g(i,d,c),e(d,y),g(i,h,c),w(u,i,c),_=!0},p:Ze,i(i){_||(F(u.$$.fragment,i),_=!0)},o(i){M(u.$$.fragment,i),_=!1},d(i){i&&o(d),i&&o(h),$(u,i)}}}function IR(j){let d,y,h,u,_;return{c(){d=s("p"),y=t("Although the recipe for forward pass needs to be defined within this function, one should call the "),h=s("code"),u=t("Module"),_=t(`
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=r(i,"P",{});var c=l(d);y=n(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),h=r(c,"CODE",{});var J=l(h);u=n(J,"Module"),J.forEach(o),_=n(c,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),c.forEach(o)},m(i,c){g(i,d,c),e(d,y),e(d,h),e(h,u),e(d,_)},d(i){i&&o(d)}}}function ZR(j){let d,y,h,u,_;return u=new Ne({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBSb0Zvcm1lckZvckNhdXNhbExNJTJDJTIwUm9Gb3JtZXJDb25maWclMEFpbXBvcnQlMjB0b3JjaCUwQSUwQXRva2VuaXplciUyMCUzRCUyMEF1dG9Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMmp1bm55dSUyRnJvZm9ybWVyX2NoaW5lc2VfYmFzZSUyMiklMEFjb25maWclMjAlM0QlMjBSb0Zvcm1lckNvbmZpZy5mcm9tX3ByZXRyYWluZWQoJTIyanVubnl1JTJGcm9mb3JtZXJfY2hpbmVzZV9iYXNlJTIyKSUwQWNvbmZpZy5pc19kZWNvZGVyJTIwJTNEJTIwVHJ1ZSUwQW1vZGVsJTIwJTNEJTIwUm9Gb3JtZXJGb3JDYXVzYWxMTS5mcm9tX3ByZXRyYWluZWQoJTIyanVubnl1JTJGcm9mb3JtZXJfY2hpbmVzZV9iYXNlJTIyJTJDJTIwY29uZmlnJTNEY29uZmlnKSUwQSUwQWlucHV0cyUyMCUzRCUyMHRva2VuaXplciglMjIlRTQlQkIlOEElRTUlQTQlQTklRTUlQTQlQTklRTYlQjAlOTQlRTklOUQlOUUlRTUlQjglQjglRTUlQTUlQkQlRTMlODAlODIlMjIlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKSUwQW91dHB1dHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cyklMEElMEFwcmVkaWN0aW9uX2xvZ2l0cyUyMCUzRCUyMG91dHB1dHMubG9naXRz",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, RoFormerForCausalLM, RoFormerConfig
<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;junnyu/roformer_chinese_base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>config = RoFormerConfig.from_pretrained(<span class="hljs-string">&quot;junnyu/roformer_chinese_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 = RoFormerForCausalLM.from_pretrained(<span class="hljs-string">&quot;junnyu/roformer_chinese_base&quot;</span>, config=config)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(<span class="hljs-string">&quot;\u4ECA\u5929\u5929\u6C14\u975E\u5E38\u597D\u3002&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=t("Example:"),h=m(),v(u.$$.fragment)},l(i){d=r(i,"P",{});var c=l(d);y=n(c,"Example:"),c.forEach(o),h=p(i),k(u.$$.fragment,i)},m(i,c){g(i,d,c),e(d,y),g(i,h,c),w(u,i,c),_=!0},p:Ze,i(i){_||(F(u.$$.fragment,i),_=!0)},o(i){M(u.$$.fragment,i),_=!1},d(i){i&&o(d),i&&o(h),$(u,i)}}}function NR(j){let d,y,h,u,_;return{c(){d=s("p"),y=t("Although the recipe for forward pass needs to be defined within this function, one should call the "),h=s("code"),u=t("Module"),_=t(`
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=r(i,"P",{});var c=l(d);y=n(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),h=r(c,"CODE",{});var J=l(h);u=n(J,"Module"),J.forEach(o),_=n(c,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),c.forEach(o)},m(i,c){g(i,d,c),e(d,y),e(d,h),e(h,u),e(d,_)},d(i){i&&o(d)}}}function WR(j){let d,y,h,u,_;return u=new Ne({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBSb0Zvcm1lckZvck1hc2tlZExNJTBBaW1wb3J0JTIwdG9yY2glMEElMEF0b2tlbml6ZXIlMjAlM0QlMjBBdXRvVG9rZW5pemVyLmZyb21fcHJldHJhaW5lZCglMjJqdW5ueXUlMkZyb2Zvcm1lcl9jaGluZXNlX2Jhc2UlMjIpJTBBbW9kZWwlMjAlM0QlMjBSb0Zvcm1lckZvck1hc2tlZExNLmZyb21fcHJldHJhaW5lZCglMjJqdW5ueXUlMkZyb2Zvcm1lcl9jaGluZXNlX2Jhc2UlMjIpJTBBJTBBaW5wdXRzJTIwJTNEJTIwdG9rZW5pemVyKCUyMlRoZSUyMGNhcGl0YWwlMjBvZiUyMEZyYW5jZSUyMGlzJTIwJTVCTUFTSyU1RC4lMjIlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKSUwQSUwQXdpdGglMjB0b3JjaC5ub19ncmFkKCklM0ElMEElMjAlMjAlMjAlMjBsb2dpdHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cykubG9naXRzJTBBJTBBJTIzJTIwcmV0cmlldmUlMjBpbmRleCUyMG9mJTIwJTVCTUFTSyU1RCUwQW1hc2tfdG9rZW5faW5kZXglMjAlM0QlMjAoaW5wdXRzLmlucHV0X2lkcyUyMCUzRCUzRCUyMHRva2VuaXplci5tYXNrX3Rva2VuX2lkKSU1QjAlNUQubm9uemVybyhhc190dXBsZSUzRFRydWUpJTVCMCU1RCUwQSUwQXByZWRpY3RlZF90b2tlbl9pZCUyMCUzRCUyMGxvZ2l0cyU1QjAlMkMlMjBtYXNrX3Rva2VuX2luZGV4JTVELmFyZ21heChheGlzJTNELTEpJTBBJTBBbGFiZWxzJTIwJTNEJTIwdG9rZW5pemVyKCUyMlRoZSUyMGNhcGl0YWwlMjBvZiUyMEZyYW5jZSUyMGlzJTIwUGFyaXMuJTIyJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMiklNUIlMjJpbnB1dF9pZHMlMjIlNUQlMEElMjMlMjBtYXNrJTIwbGFiZWxzJTIwb2YlMjBub24tJTVCTUFTSyU1RCUyMHRva2VucyUwQWxhYmVscyUyMCUzRCUyMHRvcmNoLndoZXJlKGlucHV0cy5pbnB1dF9pZHMlMjAlM0QlM0QlMjB0b2tlbml6ZXIubWFza190b2tlbl9pZCUyQyUyMGxhYmVscyUyQyUyMC0xMDApJTBBJTBBb3V0cHV0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzJTJDJTIwbGFiZWxzJTNEbGFiZWxzKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, RoFormerForMaskedLM
<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;junnyu/roformer_chinese_base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = RoFormerForMaskedLM.from_pretrained(<span class="hljs-string">&quot;junnyu/roformer_chinese_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;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 [MASK]</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>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-[MASK] 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)`}}),{c(){d=s("p"),y=t("Example:"),h=m(),v(u.$$.fragment)},l(i){d=r(i,"P",{});var c=l(d);y=n(c,"Example:"),c.forEach(o),h=p(i),k(u.$$.fragment,i)},m(i,c){g(i,d,c),e(d,y),g(i,h,c),w(u,i,c),_=!0},p:Ze,i(i){_||(F(u.$$.fragment,i),_=!0)},o(i){M(u.$$.fragment,i),_=!1},d(i){i&&o(d),i&&o(h),$(u,i)}}}function qR(j){let d,y,h,u,_;return{c(){d=s("p"),y=t("Although the recipe for forward pass needs to be defined within this function, one should call the "),h=s("code"),u=t("Module"),_=t(`
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=r(i,"P",{});var c=l(d);y=n(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),h=r(c,"CODE",{});var J=l(h);u=n(J,"Module"),J.forEach(o),_=n(c,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),c.forEach(o)},m(i,c){g(i,d,c),e(d,y),e(d,h),e(h,u),e(d,_)},d(i){i&&o(d)}}}function VR(j){let d,y,h,u,_;return u=new Ne({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwQXV0b1Rva2VuaXplciUyQyUyMFJvRm9ybWVyRm9yU2VxdWVuY2VDbGFzc2lmaWNhdGlvbiUwQSUwQXRva2VuaXplciUyMCUzRCUyMEF1dG9Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMmp1bm55dSUyRnJvZm9ybWVyX2NoaW5lc2VfYmFzZSUyMiklMEFtb2RlbCUyMCUzRCUyMFJvRm9ybWVyRm9yU2VxdWVuY2VDbGFzc2lmaWNhdGlvbi5mcm9tX3ByZXRyYWluZWQoJTIyanVubnl1JTJGcm9mb3JtZXJfY2hpbmVzZV9iYXNlJTIyKSUwQSUwQWlucHV0cyUyMCUzRCUyMHRva2VuaXplciglMjJIZWxsbyUyQyUyMG15JTIwZG9nJTIwaXMlMjBjdXRlJTIyJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMiklMEElMEF3aXRoJTIwdG9yY2gubm9fZ3JhZCgpJTNBJTBBJTIwJTIwJTIwJTIwbG9naXRzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMpLmxvZ2l0cyUwQSUwQXByZWRpY3RlZF9jbGFzc19pZCUyMCUzRCUyMGxvZ2l0cy5hcmdtYXgoKS5pdGVtKCklMEElMEElMjMlMjBUbyUyMHRyYWluJTIwYSUyMG1vZGVsJTIwb24lMjAlNjBudW1fbGFiZWxzJTYwJTIwY2xhc3NlcyUyQyUyMHlvdSUyMGNhbiUyMHBhc3MlMjAlNjBudW1fbGFiZWxzJTNEbnVtX2xhYmVscyU2MCUyMHRvJTIwJTYwLmZyb21fcHJldHJhaW5lZCguLi4pJTYwJTBBbnVtX2xhYmVscyUyMCUzRCUyMGxlbihtb2RlbC5jb25maWcuaWQybGFiZWwpJTBBbW9kZWwlMjAlM0QlMjBSb0Zvcm1lckZvclNlcXVlbmNlQ2xhc3NpZmljYXRpb24uZnJvbV9wcmV0cmFpbmVkKCUyMmp1bm55dSUyRnJvZm9ybWVyX2NoaW5lc2VfYmFzZSUyMiUyQyUyMG51bV9sYWJlbHMlM0RudW1fbGFiZWxzKSUwQSUwQWxhYmVscyUyMCUzRCUyMHRvcmNoLnRlbnNvciglNUIxJTVEKSUwQWxvc3MlMjAlM0QlMjBtb2RlbCgqKmlucHV0cyUyQyUyMGxhYmVscyUzRGxhYmVscykubG9zcw==",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, RoFormerForSequenceClassification

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;junnyu/roformer_chinese_base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = RoFormerForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;junnyu/roformer_chinese_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><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><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 = RoFormerForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;junnyu/roformer_chinese_base&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`}}),{c(){d=s("p"),y=t("Example of single-label classification:"),h=m(),v(u.$$.fragment)},l(i){d=r(i,"P",{});var c=l(d);y=n(c,"Example of single-label classification:"),c.forEach(o),h=p(i),k(u.$$.fragment,i)},m(i,c){g(i,d,c),e(d,y),g(i,h,c),w(u,i,c),_=!0},p:Ze,i(i){_||(F(u.$$.fragment,i),_=!0)},o(i){M(u.$$.fragment,i),_=!1},d(i){i&&o(d),i&&o(h),$(u,i)}}}function AR(j){let d,y,h,u,_;return u=new Ne({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwQXV0b1Rva2VuaXplciUyQyUyMFJvRm9ybWVyRm9yU2VxdWVuY2VDbGFzc2lmaWNhdGlvbiUwQSUwQXRva2VuaXplciUyMCUzRCUyMEF1dG9Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMmp1bm55dSUyRnJvZm9ybWVyX2NoaW5lc2VfYmFzZSUyMiklMEFtb2RlbCUyMCUzRCUyMFJvRm9ybWVyRm9yU2VxdWVuY2VDbGFzc2lmaWNhdGlvbi5mcm9tX3ByZXRyYWluZWQoJTIyanVubnl1JTJGcm9mb3JtZXJfY2hpbmVzZV9iYXNlJTIyJTJDJTIwcHJvYmxlbV90eXBlJTNEJTIybXVsdGlfbGFiZWxfY2xhc3NpZmljYXRpb24lMjIpJTBBJTBBaW5wdXRzJTIwJTNEJTIwdG9rZW5pemVyKCUyMkhlbGxvJTJDJTIwbXklMjBkb2clMjBpcyUyMGN1dGUlMjIlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKSUwQSUwQXdpdGglMjB0b3JjaC5ub19ncmFkKCklM0ElMEElMjAlMjAlMjAlMjBsb2dpdHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cykubG9naXRzJTBBJTBBcHJlZGljdGVkX2NsYXNzX2lkcyUyMCUzRCUyMHRvcmNoLmFyYW5nZSgwJTJDJTIwbG9naXRzLnNoYXBlJTVCLTElNUQpJTVCdG9yY2guc2lnbW9pZChsb2dpdHMpLnNxdWVlemUoZGltJTNEMCklMjAlM0UlMjAwLjUlNUQlMEElMEElMjMlMjBUbyUyMHRyYWluJTIwYSUyMG1vZGVsJTIwb24lMjAlNjBudW1fbGFiZWxzJTYwJTIwY2xhc3NlcyUyQyUyMHlvdSUyMGNhbiUyMHBhc3MlMjAlNjBudW1fbGFiZWxzJTNEbnVtX2xhYmVscyU2MCUyMHRvJTIwJTYwLmZyb21fcHJldHJhaW5lZCguLi4pJTYwJTBBbnVtX2xhYmVscyUyMCUzRCUyMGxlbihtb2RlbC5jb25maWcuaWQybGFiZWwpJTBBbW9kZWwlMjAlM0QlMjBSb0Zvcm1lckZvclNlcXVlbmNlQ2xhc3NpZmljYXRpb24uZnJvbV9wcmV0cmFpbmVkKCUwQSUyMCUyMCUyMCUyMCUyMmp1bm55dSUyRnJvZm9ybWVyX2NoaW5lc2VfYmFzZSUyMiUyQyUyMG51bV9sYWJlbHMlM0RudW1fbGFiZWxzJTJDJTIwcHJvYmxlbV90eXBlJTNEJTIybXVsdGlfbGFiZWxfY2xhc3NpZmljYXRpb24lMjIlMEEpJTBBJTBBbGFiZWxzJTIwJTNEJTIwdG9yY2guc3VtKCUwQSUyMCUyMCUyMCUyMHRvcmNoLm5uLmZ1bmN0aW9uYWwub25lX2hvdChwcmVkaWN0ZWRfY2xhc3NfaWRzJTVCTm9uZSUyQyUyMCUzQSU1RC5jbG9uZSgpJTJDJTIwbnVtX2NsYXNzZXMlM0RudW1fbGFiZWxzKSUyQyUyMGRpbSUzRDElMEEpLnRvKHRvcmNoLmZsb2F0KSUwQWxvc3MlMjAlM0QlMjBtb2RlbCgqKmlucHV0cyUyQyUyMGxhYmVscyUzRGxhYmVscykubG9zcw==",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, RoFormerForSequenceClassification

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;junnyu/roformer_chinese_base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = RoFormerForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;junnyu/roformer_chinese_base&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 = RoFormerForSequenceClassification.from_pretrained(
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;junnyu/roformer_chinese_base&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=t("Example of multi-label classification:"),h=m(),v(u.$$.fragment)},l(i){d=r(i,"P",{});var c=l(d);y=n(c,"Example of multi-label classification:"),c.forEach(o),h=p(i),k(u.$$.fragment,i)},m(i,c){g(i,d,c),e(d,y),g(i,h,c),w(u,i,c),_=!0},p:Ze,i(i){_||(F(u.$$.fragment,i),_=!0)},o(i){M(u.$$.fragment,i),_=!1},d(i){i&&o(d),i&&o(h),$(u,i)}}}function GR(j){let d,y,h,u,_;return{c(){d=s("p"),y=t("Although the recipe for forward pass needs to be defined within this function, one should call the "),h=s("code"),u=t("Module"),_=t(`
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=r(i,"P",{});var c=l(d);y=n(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),h=r(c,"CODE",{});var J=l(h);u=n(J,"Module"),J.forEach(o),_=n(c,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),c.forEach(o)},m(i,c){g(i,d,c),e(d,y),e(d,h),e(h,u),e(d,_)},d(i){i&&o(d)}}}function XR(j){let d,y,h,u,_;return u=new Ne({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBSb0Zvcm1lckZvck11bHRpcGxlQ2hvaWNlJTBBaW1wb3J0JTIwdG9yY2glMEElMEF0b2tlbml6ZXIlMjAlM0QlMjBBdXRvVG9rZW5pemVyLmZyb21fcHJldHJhaW5lZCglMjJqdW5ueXUlMkZyb2Zvcm1lcl9jaGluZXNlX2Jhc2UlMjIpJTBBbW9kZWwlMjAlM0QlMjBSb0Zvcm1lckZvck11bHRpcGxlQ2hvaWNlLmZyb21fcHJldHJhaW5lZCglMjJqdW5ueXUlMkZyb2Zvcm1lcl9jaGluZXNlX2Jhc2UlMjIpJTBBJTBBcHJvbXB0JTIwJTNEJTIwJTIySW4lMjBJdGFseSUyQyUyMHBpenphJTIwc2VydmVkJTIwaW4lMjBmb3JtYWwlMjBzZXR0aW5ncyUyQyUyMHN1Y2glMjBhcyUyMGF0JTIwYSUyMHJlc3RhdXJhbnQlMkMlMjBpcyUyMHByZXNlbnRlZCUyMHVuc2xpY2VkLiUyMiUwQWNob2ljZTAlMjAlM0QlMjAlMjJJdCUyMGlzJTIwZWF0ZW4lMjB3aXRoJTIwYSUyMGZvcmslMjBhbmQlMjBhJTIwa25pZmUuJTIyJTBBY2hvaWNlMSUyMCUzRCUyMCUyMkl0JTIwaXMlMjBlYXRlbiUyMHdoaWxlJTIwaGVsZCUyMGluJTIwdGhlJTIwaGFuZC4lMjIlMEFsYWJlbHMlMjAlM0QlMjB0b3JjaC50ZW5zb3IoMCkudW5zcXVlZXplKDApJTIwJTIwJTIzJTIwY2hvaWNlMCUyMGlzJTIwY29ycmVjdCUyMChhY2NvcmRpbmclMjB0byUyMFdpa2lwZWRpYSUyMCUzQikpJTJDJTIwYmF0Y2glMjBzaXplJTIwMSUwQSUwQWVuY29kaW5nJTIwJTNEJTIwdG9rZW5pemVyKCU1QnByb21wdCUyQyUyMHByb21wdCU1RCUyQyUyMCU1QmNob2ljZTAlMkMlMjBjaG9pY2UxJTVEJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMiUyQyUyMHBhZGRpbmclM0RUcnVlKSUwQW91dHB1dHMlMjAlM0QlMjBtb2RlbCgqKiU3QmslM0ElMjB2LnVuc3F1ZWV6ZSgwKSUyMGZvciUyMGslMkMlMjB2JTIwaW4lMjBlbmNvZGluZy5pdGVtcygpJTdEJTJDJTIwbGFiZWxzJTNEbGFiZWxzKSUyMCUyMCUyMyUyMGJhdGNoJTIwc2l6ZSUyMGlzJTIwMSUwQSUwQSUyMyUyMHRoZSUyMGxpbmVhciUyMGNsYXNzaWZpZXIlMjBzdGlsbCUyMG5lZWRzJTIwdG8lMjBiZSUyMHRyYWluZWQlMEFsb3NzJTIwJTNEJTIwb3V0cHV0cy5sb3NzJTBBbG9naXRzJTIwJTNEJTIwb3V0cHV0cy5sb2dpdHM=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, RoFormerForMultipleChoice
<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;junnyu/roformer_chinese_base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = RoFormerForMultipleChoice.from_pretrained(<span class="hljs-string">&quot;junnyu/roformer_chinese_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=t("Example:"),h=m(),v(u.$$.fragment)},l(i){d=r(i,"P",{});var c=l(d);y=n(c,"Example:"),c.forEach(o),h=p(i),k(u.$$.fragment,i)},m(i,c){g(i,d,c),e(d,y),g(i,h,c),w(u,i,c),_=!0},p:Ze,i(i){_||(F(u.$$.fragment,i),_=!0)},o(i){M(u.$$.fragment,i),_=!1},d(i){i&&o(d),i&&o(h),$(u,i)}}}function BR(j){let d,y,h,u,_;return{c(){d=s("p"),y=t("Although the recipe for forward pass needs to be defined within this function, one should call the "),h=s("code"),u=t("Module"),_=t(`
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=r(i,"P",{});var c=l(d);y=n(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),h=r(c,"CODE",{});var J=l(h);u=n(J,"Module"),J.forEach(o),_=n(c,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),c.forEach(o)},m(i,c){g(i,d,c),e(d,y),e(d,h),e(h,u),e(d,_)},d(i){i&&o(d)}}}function SR(j){let d,y,h,u,_;return u=new Ne({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBSb0Zvcm1lckZvclRva2VuQ2xhc3NpZmljYXRpb24lMEFpbXBvcnQlMjB0b3JjaCUwQSUwQXRva2VuaXplciUyMCUzRCUyMEF1dG9Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMmp1bm55dSUyRnJvZm9ybWVyX2NoaW5lc2VfYmFzZSUyMiklMEFtb2RlbCUyMCUzRCUyMFJvRm9ybWVyRm9yVG9rZW5DbGFzc2lmaWNhdGlvbi5mcm9tX3ByZXRyYWluZWQoJTIyanVubnl1JTJGcm9mb3JtZXJfY2hpbmVzZV9iYXNlJTIyKSUwQSUwQWlucHV0cyUyMCUzRCUyMHRva2VuaXplciglMEElMjAlMjAlMjAlMjAlMjJIdWdnaW5nRmFjZSUyMGlzJTIwYSUyMGNvbXBhbnklMjBiYXNlZCUyMGluJTIwUGFyaXMlMjBhbmQlMjBOZXclMjBZb3JrJTIyJTJDJTIwYWRkX3NwZWNpYWxfdG9rZW5zJTNERmFsc2UlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyJTBBKSUwQSUwQXdpdGglMjB0b3JjaC5ub19ncmFkKCklM0ElMEElMjAlMjAlMjAlMjBsb2dpdHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cykubG9naXRzJTBBJTBBcHJlZGljdGVkX3Rva2VuX2NsYXNzX2lkcyUyMCUzRCUyMGxvZ2l0cy5hcmdtYXgoLTEpJTBBJTBBJTIzJTIwTm90ZSUyMHRoYXQlMjB0b2tlbnMlMjBhcmUlMjBjbGFzc2lmaWVkJTIwcmF0aGVyJTIwdGhlbiUyMGlucHV0JTIwd29yZHMlMjB3aGljaCUyMG1lYW5zJTIwdGhhdCUwQSUyMyUyMHRoZXJlJTIwbWlnaHQlMjBiZSUyMG1vcmUlMjBwcmVkaWN0ZWQlMjB0b2tlbiUyMGNsYXNzZXMlMjB0aGFuJTIwd29yZHMuJTBBJTIzJTIwTXVsdGlwbGUlMjB0b2tlbiUyMGNsYXNzZXMlMjBtaWdodCUyMGFjY291bnQlMjBmb3IlMjB0aGUlMjBzYW1lJTIwd29yZCUwQXByZWRpY3RlZF90b2tlbnNfY2xhc3NlcyUyMCUzRCUyMCU1Qm1vZGVsLmNvbmZpZy5pZDJsYWJlbCU1QnQuaXRlbSgpJTVEJTIwZm9yJTIwdCUyMGluJTIwcHJlZGljdGVkX3Rva2VuX2NsYXNzX2lkcyU1QjAlNUQlNUQlMEElMEFsYWJlbHMlMjAlM0QlMjBwcmVkaWN0ZWRfdG9rZW5fY2xhc3NfaWRzJTBBbG9zcyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzJTJDJTIwbGFiZWxzJTNEbGFiZWxzKS5sb3Nz",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, RoFormerForTokenClassification
<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;junnyu/roformer_chinese_base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = RoFormerForTokenClassification.from_pretrained(<span class="hljs-string">&quot;junnyu/roformer_chinese_base&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>labels = predicted_token_class_ids
<span class="hljs-meta">&gt;&gt;&gt; </span>loss = model(**inputs, labels=labels).loss`}}),{c(){d=s("p"),y=t("Example:"),h=m(),v(u.$$.fragment)},l(i){d=r(i,"P",{});var c=l(d);y=n(c,"Example:"),c.forEach(o),h=p(i),k(u.$$.fragment,i)},m(i,c){g(i,d,c),e(d,y),g(i,h,c),w(u,i,c),_=!0},p:Ze,i(i){_||(F(u.$$.fragment,i),_=!0)},o(i){M(u.$$.fragment,i),_=!1},d(i){i&&o(d),i&&o(h),$(u,i)}}}function PR(j){let d,y,h,u,_;return{c(){d=s("p"),y=t("Although the recipe for forward pass needs to be defined within this function, one should call the "),h=s("code"),u=t("Module"),_=t(`
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=r(i,"P",{});var c=l(d);y=n(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),h=r(c,"CODE",{});var J=l(h);u=n(J,"Module"),J.forEach(o),_=n(c,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),c.forEach(o)},m(i,c){g(i,d,c),e(d,y),e(d,h),e(h,u),e(d,_)},d(i){i&&o(d)}}}function LR(j){let d,y,h,u,_;return u=new Ne({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBSb0Zvcm1lckZvclF1ZXN0aW9uQW5zd2VyaW5nJTBBaW1wb3J0JTIwdG9yY2glMEElMEF0b2tlbml6ZXIlMjAlM0QlMjBBdXRvVG9rZW5pemVyLmZyb21fcHJldHJhaW5lZCglMjJqdW5ueXUlMkZyb2Zvcm1lcl9jaGluZXNlX2Jhc2UlMjIpJTBBbW9kZWwlMjAlM0QlMjBSb0Zvcm1lckZvclF1ZXN0aW9uQW5zd2VyaW5nLmZyb21fcHJldHJhaW5lZCglMjJqdW5ueXUlMkZyb2Zvcm1lcl9jaGluZXNlX2Jhc2UlMjIpJTBBJTBBcXVlc3Rpb24lMkMlMjB0ZXh0JTIwJTNEJTIwJTIyV2hvJTIwd2FzJTIwSmltJTIwSGVuc29uJTNGJTIyJTJDJTIwJTIySmltJTIwSGVuc29uJTIwd2FzJTIwYSUyMG5pY2UlMjBwdXBwZXQlMjIlMEElMEFpbnB1dHMlMjAlM0QlMjB0b2tlbml6ZXIocXVlc3Rpb24lMkMlMjB0ZXh0JTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMiklMEF3aXRoJTIwdG9yY2gubm9fZ3JhZCgpJTNBJTBBJTIwJTIwJTIwJTIwb3V0cHV0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzKSUwQSUwQWFuc3dlcl9zdGFydF9pbmRleCUyMCUzRCUyMG91dHB1dHMuc3RhcnRfbG9naXRzLmFyZ21heCgpJTBBYW5zd2VyX2VuZF9pbmRleCUyMCUzRCUyMG91dHB1dHMuZW5kX2xvZ2l0cy5hcmdtYXgoKSUwQSUwQXByZWRpY3RfYW5zd2VyX3Rva2VucyUyMCUzRCUyMGlucHV0cy5pbnB1dF9pZHMlNUIwJTJDJTIwYW5zd2VyX3N0YXJ0X2luZGV4JTIwJTNBJTIwYW5zd2VyX2VuZF9pbmRleCUyMCUyQiUyMDElNUQlMEElMEElMjMlMjB0YXJnZXQlMjBpcyUyMCUyMm5pY2UlMjBwdXBwZXQlMjIlMEF0YXJnZXRfc3RhcnRfaW5kZXglMjAlM0QlMjB0b3JjaC50ZW5zb3IoJTVCMTQlNUQpJTBBdGFyZ2V0X2VuZF9pbmRleCUyMCUzRCUyMHRvcmNoLnRlbnNvciglNUIxNSU1RCklMEElMEFvdXRwdXRzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMlMkMlMjBzdGFydF9wb3NpdGlvbnMlM0R0YXJnZXRfc3RhcnRfaW5kZXglMkMlMjBlbmRfcG9zaXRpb25zJTNEdGFyZ2V0X2VuZF9pbmRleCklMEFsb3NzJTIwJTNEJTIwb3V0cHV0cy5sb3Nz",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, RoFormerForQuestionAnswering
<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;junnyu/roformer_chinese_base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = RoFormerForQuestionAnswering.from_pretrained(<span class="hljs-string">&quot;junnyu/roformer_chinese_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;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><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`}}),{c(){d=s("p"),y=t("Example:"),h=m(),v(u.$$.fragment)},l(i){d=r(i,"P",{});var c=l(d);y=n(c,"Example:"),c.forEach(o),h=p(i),k(u.$$.fragment,i)},m(i,c){g(i,d,c),e(d,y),g(i,h,c),w(u,i,c),_=!0},p:Ze,i(i){_||(F(u.$$.fragment,i),_=!0)},o(i){M(u.$$.fragment,i),_=!1},d(i){i&&o(d),i&&o(h),$(u,i)}}}function QR(j){let d,y,h,u,_,i,c,J,ke,fe,q,ae,ee,R,we,P,Fe,ge,V,Me,le,Q,$e,_e,G,Re,ye,X,me,je,te,U,I,be,B,pe,Ee,L,se,Je,z,Ce,D,ie,Ue,O,Te,re,N,he,A,xe,oe,Z,ve,x,ue,de;return{c(){d=s("p"),y=t("TensorFlow models and layers in "),h=s("code"),u=t("transformers"),_=t(" accept two formats as input:"),i=m(),c=s("ul"),J=s("li"),ke=t("having all inputs as keyword arguments (like PyTorch models), or"),fe=m(),q=s("li"),ae=t("having all inputs as a list, tuple or dict in the first positional argument."),ee=m(),R=s("p"),we=t(`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 `),P=s("code"),Fe=t("model.fit()"),ge=t(` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),V=s("code"),Me=t("model.fit()"),le=t(` supports! If, however, you want to use the second
format outside of Keras methods like `),Q=s("code"),$e=t("fit()"),_e=t(" and "),G=s("code"),Re=t("predict()"),ye=t(`, such as when creating your own layers or models with
the Keras `),X=s("code"),me=t("Functional"),je=t(` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),te=m(),U=s("ul"),I=s("li"),be=t("a single Tensor with "),B=s("code"),pe=t("input_ids"),Ee=t(" only and nothing else: "),L=s("code"),se=t("model(input_ids)"),Je=m(),z=s("li"),Ce=t(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),D=s("code"),ie=t("model([input_ids, attention_mask])"),Ue=t(" or "),O=s("code"),Te=t("model([input_ids, attention_mask, token_type_ids])"),re=m(),N=s("li"),he=t(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),A=s("code"),xe=t('model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),oe=m(),Z=s("p"),ve=t(`Note that when creating models and layers with
`),x=s("a"),ue=t("subclassing"),de=t(` then you don\u2019t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`),this.h()},l(T){d=r(T,"P",{});var E=l(d);y=n(E,"TensorFlow models and layers in "),h=r(E,"CODE",{});var Ae=l(h);u=n(Ae,"transformers"),Ae.forEach(o),_=n(E," accept two formats as input:"),E.forEach(o),i=p(T),c=r(T,"UL",{});var K=l(c);J=r(K,"LI",{});var Le=l(J);ke=n(Le,"having all inputs as keyword arguments (like PyTorch models), or"),Le.forEach(o),fe=p(K),q=r(K,"LI",{});var Qe=l(q);ae=n(Qe,"having all inputs as a list, tuple or dict in the first positional argument."),Qe.forEach(o),K.forEach(o),ee=p(T),R=r(T,"P",{});var C=l(R);we=n(C,`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 `),P=r(C,"CODE",{});var We=l(P);Fe=n(We,"model.fit()"),We.forEach(o),ge=n(C,` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),V=r(C,"CODE",{});var De=l(V);Me=n(De,"model.fit()"),De.forEach(o),le=n(C,` supports! If, however, you want to use the second
format outside of Keras methods like `),Q=r(C,"CODE",{});var Oe=l(Q);$e=n(Oe,"fit()"),Oe.forEach(o),_e=n(C," and "),G=r(C,"CODE",{});var Ge=l(G);Re=n(Ge,"predict()"),Ge.forEach(o),ye=n(C,`, such as when creating your own layers or models with
the Keras `),X=r(C,"CODE",{});var qe=l(X);me=n(qe,"Functional"),qe.forEach(o),je=n(C,` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),C.forEach(o),te=p(T),U=r(T,"UL",{});var W=l(U);I=r(W,"LI",{});var H=l(I);be=n(H,"a single Tensor with "),B=r(H,"CODE",{});var Xe=l(B);pe=n(Xe,"input_ids"),Xe.forEach(o),Ee=n(H," only and nothing else: "),L=r(H,"CODE",{});var Ve=l(L);se=n(Ve,"model(input_ids)"),Ve.forEach(o),H.forEach(o),Je=p(W),z=r(W,"LI",{});var Y=l(z);Ce=n(Y,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),D=r(Y,"CODE",{});var He=l(D);ie=n(He,"model([input_ids, attention_mask])"),He.forEach(o),Ue=n(Y," or "),O=r(Y,"CODE",{});var Be=l(O);Te=n(Be,"model([input_ids, attention_mask, token_type_ids])"),Be.forEach(o),Y.forEach(o),re=p(W),N=r(W,"LI",{});var ce=l(N);he=n(ce,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),A=r(ce,"CODE",{});var Ye=l(A);xe=n(Ye,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),Ye.forEach(o),ce.forEach(o),W.forEach(o),oe=p(T),Z=r(T,"P",{});var ne=l(Z);ve=n(ne,`Note that when creating models and layers with
`),x=r(ne,"A",{href:!0,rel:!0});var ze=l(x);ue=n(ze,"subclassing"),ze.forEach(o),de=n(ne,` 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!`),ne.forEach(o),this.h()},h(){f(x,"href","https://keras.io/guides/making_new_layers_and_models_via_subclassing/"),f(x,"rel","nofollow")},m(T,E){g(T,d,E),e(d,y),e(d,h),e(h,u),e(d,_),g(T,i,E),g(T,c,E),e(c,J),e(J,ke),e(c,fe),e(c,q),e(q,ae),g(T,ee,E),g(T,R,E),e(R,we),e(R,P),e(P,Fe),e(R,ge),e(R,V),e(V,Me),e(R,le),e(R,Q),e(Q,$e),e(R,_e),e(R,G),e(G,Re),e(R,ye),e(R,X),e(X,me),e(R,je),g(T,te,E),g(T,U,E),e(U,I),e(I,be),e(I,B),e(B,pe),e(I,Ee),e(I,L),e(L,se),e(U,Je),e(U,z),e(z,Ce),e(z,D),e(D,ie),e(z,Ue),e(z,O),e(O,Te),e(U,re),e(U,N),e(N,he),e(N,A),e(A,xe),g(T,oe,E),g(T,Z,E),e(Z,ve),e(Z,x),e(x,ue),e(Z,de)},d(T){T&&o(d),T&&o(i),T&&o(c),T&&o(ee),T&&o(R),T&&o(te),T&&o(U),T&&o(oe),T&&o(Z)}}}function DR(j){let d,y,h,u,_;return{c(){d=s("p"),y=t("Although the recipe for forward pass needs to be defined within this function, one should call the "),h=s("code"),u=t("Module"),_=t(`
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=r(i,"P",{});var c=l(d);y=n(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),h=r(c,"CODE",{});var J=l(h);u=n(J,"Module"),J.forEach(o),_=n(c,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),c.forEach(o)},m(i,c){g(i,d,c),e(d,y),e(d,h),e(h,u),e(d,_)},d(i){i&&o(d)}}}function OR(j){let d,y,h,u,_;return u=new Ne({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBURlJvRm9ybWVyTW9kZWwlMEFpbXBvcnQlMjB0ZW5zb3JmbG93JTIwYXMlMjB0ZiUwQSUwQXRva2VuaXplciUyMCUzRCUyMEF1dG9Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMmp1bm55dSUyRnJvZm9ybWVyX2NoaW5lc2VfYmFzZSUyMiklMEFtb2RlbCUyMCUzRCUyMFRGUm9Gb3JtZXJNb2RlbC5mcm9tX3ByZXRyYWluZWQoJTIyanVubnl1JTJGcm9mb3JtZXJfY2hpbmVzZV9iYXNlJTIyKSUwQSUwQWlucHV0cyUyMCUzRCUyMHRva2VuaXplciglMjJIZWxsbyUyQyUyMG15JTIwZG9nJTIwaXMlMjBjdXRlJTIyJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJ0ZiUyMiklMEFvdXRwdXRzJTIwJTNEJTIwbW9kZWwoaW5wdXRzKSUwQSUwQWxhc3RfaGlkZGVuX3N0YXRlcyUyMCUzRCUyMG91dHB1dHMubGFzdF9oaWRkZW5fc3RhdGU=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, TFRoFormerModel
<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;junnyu/roformer_chinese_base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFRoFormerModel.from_pretrained(<span class="hljs-string">&quot;junnyu/roformer_chinese_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=t("Example:"),h=m(),v(u.$$.fragment)},l(i){d=r(i,"P",{});var c=l(d);y=n(c,"Example:"),c.forEach(o),h=p(i),k(u.$$.fragment,i)},m(i,c){g(i,d,c),e(d,y),g(i,h,c),w(u,i,c),_=!0},p:Ze,i(i){_||(F(u.$$.fragment,i),_=!0)},o(i){M(u.$$.fragment,i),_=!1},d(i){i&&o(d),i&&o(h),$(u,i)}}}function HR(j){let d,y,h,u,_,i,c,J,ke,fe,q,ae,ee,R,we,P,Fe,ge,V,Me,le,Q,$e,_e,G,Re,ye,X,me,je,te,U,I,be,B,pe,Ee,L,se,Je,z,Ce,D,ie,Ue,O,Te,re,N,he,A,xe,oe,Z,ve,x,ue,de;return{c(){d=s("p"),y=t("TensorFlow models and layers in "),h=s("code"),u=t("transformers"),_=t(" accept two formats as input:"),i=m(),c=s("ul"),J=s("li"),ke=t("having all inputs as keyword arguments (like PyTorch models), or"),fe=m(),q=s("li"),ae=t("having all inputs as a list, tuple or dict in the first positional argument."),ee=m(),R=s("p"),we=t(`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 `),P=s("code"),Fe=t("model.fit()"),ge=t(` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),V=s("code"),Me=t("model.fit()"),le=t(` supports! If, however, you want to use the second
format outside of Keras methods like `),Q=s("code"),$e=t("fit()"),_e=t(" and "),G=s("code"),Re=t("predict()"),ye=t(`, such as when creating your own layers or models with
the Keras `),X=s("code"),me=t("Functional"),je=t(` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),te=m(),U=s("ul"),I=s("li"),be=t("a single Tensor with "),B=s("code"),pe=t("input_ids"),Ee=t(" only and nothing else: "),L=s("code"),se=t("model(input_ids)"),Je=m(),z=s("li"),Ce=t(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),D=s("code"),ie=t("model([input_ids, attention_mask])"),Ue=t(" or "),O=s("code"),Te=t("model([input_ids, attention_mask, token_type_ids])"),re=m(),N=s("li"),he=t(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),A=s("code"),xe=t('model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),oe=m(),Z=s("p"),ve=t(`Note that when creating models and layers with
`),x=s("a"),ue=t("subclassing"),de=t(` then you don\u2019t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`),this.h()},l(T){d=r(T,"P",{});var E=l(d);y=n(E,"TensorFlow models and layers in "),h=r(E,"CODE",{});var Ae=l(h);u=n(Ae,"transformers"),Ae.forEach(o),_=n(E," accept two formats as input:"),E.forEach(o),i=p(T),c=r(T,"UL",{});var K=l(c);J=r(K,"LI",{});var Le=l(J);ke=n(Le,"having all inputs as keyword arguments (like PyTorch models), or"),Le.forEach(o),fe=p(K),q=r(K,"LI",{});var Qe=l(q);ae=n(Qe,"having all inputs as a list, tuple or dict in the first positional argument."),Qe.forEach(o),K.forEach(o),ee=p(T),R=r(T,"P",{});var C=l(R);we=n(C,`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 `),P=r(C,"CODE",{});var We=l(P);Fe=n(We,"model.fit()"),We.forEach(o),ge=n(C,` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),V=r(C,"CODE",{});var De=l(V);Me=n(De,"model.fit()"),De.forEach(o),le=n(C,` supports! If, however, you want to use the second
format outside of Keras methods like `),Q=r(C,"CODE",{});var Oe=l(Q);$e=n(Oe,"fit()"),Oe.forEach(o),_e=n(C," and "),G=r(C,"CODE",{});var Ge=l(G);Re=n(Ge,"predict()"),Ge.forEach(o),ye=n(C,`, such as when creating your own layers or models with
the Keras `),X=r(C,"CODE",{});var qe=l(X);me=n(qe,"Functional"),qe.forEach(o),je=n(C,` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),C.forEach(o),te=p(T),U=r(T,"UL",{});var W=l(U);I=r(W,"LI",{});var H=l(I);be=n(H,"a single Tensor with "),B=r(H,"CODE",{});var Xe=l(B);pe=n(Xe,"input_ids"),Xe.forEach(o),Ee=n(H," only and nothing else: "),L=r(H,"CODE",{});var Ve=l(L);se=n(Ve,"model(input_ids)"),Ve.forEach(o),H.forEach(o),Je=p(W),z=r(W,"LI",{});var Y=l(z);Ce=n(Y,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),D=r(Y,"CODE",{});var He=l(D);ie=n(He,"model([input_ids, attention_mask])"),He.forEach(o),Ue=n(Y," or "),O=r(Y,"CODE",{});var Be=l(O);Te=n(Be,"model([input_ids, attention_mask, token_type_ids])"),Be.forEach(o),Y.forEach(o),re=p(W),N=r(W,"LI",{});var ce=l(N);he=n(ce,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),A=r(ce,"CODE",{});var Ye=l(A);xe=n(Ye,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),Ye.forEach(o),ce.forEach(o),W.forEach(o),oe=p(T),Z=r(T,"P",{});var ne=l(Z);ve=n(ne,`Note that when creating models and layers with
`),x=r(ne,"A",{href:!0,rel:!0});var ze=l(x);ue=n(ze,"subclassing"),ze.forEach(o),de=n(ne,` 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!`),ne.forEach(o),this.h()},h(){f(x,"href","https://keras.io/guides/making_new_layers_and_models_via_subclassing/"),f(x,"rel","nofollow")},m(T,E){g(T,d,E),e(d,y),e(d,h),e(h,u),e(d,_),g(T,i,E),g(T,c,E),e(c,J),e(J,ke),e(c,fe),e(c,q),e(q,ae),g(T,ee,E),g(T,R,E),e(R,we),e(R,P),e(P,Fe),e(R,ge),e(R,V),e(V,Me),e(R,le),e(R,Q),e(Q,$e),e(R,_e),e(R,G),e(G,Re),e(R,ye),e(R,X),e(X,me),e(R,je),g(T,te,E),g(T,U,E),e(U,I),e(I,be),e(I,B),e(B,pe),e(I,Ee),e(I,L),e(L,se),e(U,Je),e(U,z),e(z,Ce),e(z,D),e(D,ie),e(z,Ue),e(z,O),e(O,Te),e(U,re),e(U,N),e(N,he),e(N,A),e(A,xe),g(T,oe,E),g(T,Z,E),e(Z,ve),e(Z,x),e(x,ue),e(Z,de)},d(T){T&&o(d),T&&o(i),T&&o(c),T&&o(ee),T&&o(R),T&&o(te),T&&o(U),T&&o(oe),T&&o(Z)}}}function YR(j){let d,y,h,u,_;return{c(){d=s("p"),y=t("Although the recipe for forward pass needs to be defined within this function, one should call the "),h=s("code"),u=t("Module"),_=t(`
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=r(i,"P",{});var c=l(d);y=n(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),h=r(c,"CODE",{});var J=l(h);u=n(J,"Module"),J.forEach(o),_=n(c,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),c.forEach(o)},m(i,c){g(i,d,c),e(d,y),e(d,h),e(h,u),e(d,_)},d(i){i&&o(d)}}}function KR(j){let d,y,h,u,_;return u=new Ne({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBURlJvRm9ybWVyRm9yTWFza2VkTE0lMEFpbXBvcnQlMjB0ZW5zb3JmbG93JTIwYXMlMjB0ZiUwQSUwQXRva2VuaXplciUyMCUzRCUyMEF1dG9Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMmp1bm55dSUyRnJvZm9ybWVyX2NoaW5lc2VfYmFzZSUyMiklMEFtb2RlbCUyMCUzRCUyMFRGUm9Gb3JtZXJGb3JNYXNrZWRMTS5mcm9tX3ByZXRyYWluZWQoJTIyanVubnl1JTJGcm9mb3JtZXJfY2hpbmVzZV9iYXNlJTIyKSUwQSUwQWlucHV0cyUyMCUzRCUyMHRva2VuaXplciglMjJUaGUlMjBjYXBpdGFsJTIwb2YlMjBGcmFuY2UlMjBpcyUyMCU1Qk1BU0slNUQuJTIyJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJ0ZiUyMiklMEFsb2dpdHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cykubG9naXRzJTBBJTBBJTIzJTIwcmV0cmlldmUlMjBpbmRleCUyMG9mJTIwJTVCTUFTSyU1RCUwQW1hc2tfdG9rZW5faW5kZXglMjAlM0QlMjB0Zi53aGVyZSgoaW5wdXRzLmlucHV0X2lkcyUyMCUzRCUzRCUyMHRva2VuaXplci5tYXNrX3Rva2VuX2lkKSU1QjAlNUQpJTBBc2VsZWN0ZWRfbG9naXRzJTIwJTNEJTIwdGYuZ2F0aGVyX25kKGxvZ2l0cyU1QjAlNUQlMkMlMjBpbmRpY2VzJTNEbWFza190b2tlbl9pbmRleCklMEElMEFwcmVkaWN0ZWRfdG9rZW5faWQlMjAlM0QlMjB0Zi5tYXRoLmFyZ21heChzZWxlY3RlZF9sb2dpdHMlMkMlMjBheGlzJTNELTEp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, TFRoFormerForMaskedLM
<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;junnyu/roformer_chinese_base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFRoFormerForMaskedLM.from_pretrained(<span class="hljs-string">&quot;junnyu/roformer_chinese_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;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 [MASK]</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>)`}}),{c(){d=s("p"),y=t("Example:"),h=m(),v(u.$$.fragment)},l(i){d=r(i,"P",{});var c=l(d);y=n(c,"Example:"),c.forEach(o),h=p(i),k(u.$$.fragment,i)},m(i,c){g(i,d,c),e(d,y),g(i,h,c),w(u,i,c),_=!0},p:Ze,i(i){_||(F(u.$$.fragment,i),_=!0)},o(i){M(u.$$.fragment,i),_=!1},d(i){i&&o(d),i&&o(h),$(u,i)}}}function ej(j){let d,y;return d=new Ne({props:{code:"bGFiZWxzJTIwJTNEJTIwdG9rZW5pemVyKCUyMlRoZSUyMGNhcGl0YWwlMjBvZiUyMEZyYW5jZSUyMGlzJTIwUGFyaXMuJTIyJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJ0ZiUyMiklNUIlMjJpbnB1dF9pZHMlMjIlNUQlMEElMjMlMjBtYXNrJTIwbGFiZWxzJTIwb2YlMjBub24tJTVCTUFTSyU1RCUyMHRva2VucyUwQWxhYmVscyUyMCUzRCUyMHRmLndoZXJlKGlucHV0cy5pbnB1dF9pZHMlMjAlM0QlM0QlMjB0b2tlbml6ZXIubWFza190b2tlbl9pZCUyQyUyMGxhYmVscyUyQyUyMC0xMDApJTBBJTBBb3V0cHV0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzJTJDJTIwbGFiZWxzJTNEbGFiZWxzKQ==",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-[MASK] 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)`}}),{c(){v(d.$$.fragment)},l(h){k(d.$$.fragment,h)},m(h,u){w(d,h,u),y=!0},p:Ze,i(h){y||(F(d.$$.fragment,h),y=!0)},o(h){M(d.$$.fragment,h),y=!1},d(h){$(d,h)}}}function oj(j){let d,y,h,u,_,i,c,J,ke,fe,q,ae,ee,R,we,P,Fe,ge,V,Me,le,Q,$e,_e,G,Re,ye,X,me,je,te,U,I,be,B,pe,Ee,L,se,Je,z,Ce,D,ie,Ue,O,Te,re,N,he,A,xe,oe,Z,ve,x,ue,de;return{c(){d=s("p"),y=t("TensorFlow models and layers in "),h=s("code"),u=t("transformers"),_=t(" accept two formats as input:"),i=m(),c=s("ul"),J=s("li"),ke=t("having all inputs as keyword arguments (like PyTorch models), or"),fe=m(),q=s("li"),ae=t("having all inputs as a list, tuple or dict in the first positional argument."),ee=m(),R=s("p"),we=t(`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 `),P=s("code"),Fe=t("model.fit()"),ge=t(` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),V=s("code"),Me=t("model.fit()"),le=t(` supports! If, however, you want to use the second
format outside of Keras methods like `),Q=s("code"),$e=t("fit()"),_e=t(" and "),G=s("code"),Re=t("predict()"),ye=t(`, such as when creating your own layers or models with
the Keras `),X=s("code"),me=t("Functional"),je=t(` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),te=m(),U=s("ul"),I=s("li"),be=t("a single Tensor with "),B=s("code"),pe=t("input_ids"),Ee=t(" only and nothing else: "),L=s("code"),se=t("model(input_ids)"),Je=m(),z=s("li"),Ce=t(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),D=s("code"),ie=t("model([input_ids, attention_mask])"),Ue=t(" or "),O=s("code"),Te=t("model([input_ids, attention_mask, token_type_ids])"),re=m(),N=s("li"),he=t(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),A=s("code"),xe=t('model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),oe=m(),Z=s("p"),ve=t(`Note that when creating models and layers with
`),x=s("a"),ue=t("subclassing"),de=t(` then you don\u2019t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`),this.h()},l(T){d=r(T,"P",{});var E=l(d);y=n(E,"TensorFlow models and layers in "),h=r(E,"CODE",{});var Ae=l(h);u=n(Ae,"transformers"),Ae.forEach(o),_=n(E," accept two formats as input:"),E.forEach(o),i=p(T),c=r(T,"UL",{});var K=l(c);J=r(K,"LI",{});var Le=l(J);ke=n(Le,"having all inputs as keyword arguments (like PyTorch models), or"),Le.forEach(o),fe=p(K),q=r(K,"LI",{});var Qe=l(q);ae=n(Qe,"having all inputs as a list, tuple or dict in the first positional argument."),Qe.forEach(o),K.forEach(o),ee=p(T),R=r(T,"P",{});var C=l(R);we=n(C,`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 `),P=r(C,"CODE",{});var We=l(P);Fe=n(We,"model.fit()"),We.forEach(o),ge=n(C,` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),V=r(C,"CODE",{});var De=l(V);Me=n(De,"model.fit()"),De.forEach(o),le=n(C,` supports! If, however, you want to use the second
format outside of Keras methods like `),Q=r(C,"CODE",{});var Oe=l(Q);$e=n(Oe,"fit()"),Oe.forEach(o),_e=n(C," and "),G=r(C,"CODE",{});var Ge=l(G);Re=n(Ge,"predict()"),Ge.forEach(o),ye=n(C,`, such as when creating your own layers or models with
the Keras `),X=r(C,"CODE",{});var qe=l(X);me=n(qe,"Functional"),qe.forEach(o),je=n(C,` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),C.forEach(o),te=p(T),U=r(T,"UL",{});var W=l(U);I=r(W,"LI",{});var H=l(I);be=n(H,"a single Tensor with "),B=r(H,"CODE",{});var Xe=l(B);pe=n(Xe,"input_ids"),Xe.forEach(o),Ee=n(H," only and nothing else: "),L=r(H,"CODE",{});var Ve=l(L);se=n(Ve,"model(input_ids)"),Ve.forEach(o),H.forEach(o),Je=p(W),z=r(W,"LI",{});var Y=l(z);Ce=n(Y,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),D=r(Y,"CODE",{});var He=l(D);ie=n(He,"model([input_ids, attention_mask])"),He.forEach(o),Ue=n(Y," or "),O=r(Y,"CODE",{});var Be=l(O);Te=n(Be,"model([input_ids, attention_mask, token_type_ids])"),Be.forEach(o),Y.forEach(o),re=p(W),N=r(W,"LI",{});var ce=l(N);he=n(ce,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),A=r(ce,"CODE",{});var Ye=l(A);xe=n(Ye,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),Ye.forEach(o),ce.forEach(o),W.forEach(o),oe=p(T),Z=r(T,"P",{});var ne=l(Z);ve=n(ne,`Note that when creating models and layers with
`),x=r(ne,"A",{href:!0,rel:!0});var ze=l(x);ue=n(ze,"subclassing"),ze.forEach(o),de=n(ne,` 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!`),ne.forEach(o),this.h()},h(){f(x,"href","https://keras.io/guides/making_new_layers_and_models_via_subclassing/"),f(x,"rel","nofollow")},m(T,E){g(T,d,E),e(d,y),e(d,h),e(h,u),e(d,_),g(T,i,E),g(T,c,E),e(c,J),e(J,ke),e(c,fe),e(c,q),e(q,ae),g(T,ee,E),g(T,R,E),e(R,we),e(R,P),e(P,Fe),e(R,ge),e(R,V),e(V,Me),e(R,le),e(R,Q),e(Q,$e),e(R,_e),e(R,G),e(G,Re),e(R,ye),e(R,X),e(X,me),e(R,je),g(T,te,E),g(T,U,E),e(U,I),e(I,be),e(I,B),e(B,pe),e(I,Ee),e(I,L),e(L,se),e(U,Je),e(U,z),e(z,Ce),e(z,D),e(D,ie),e(z,Ue),e(z,O),e(O,Te),e(U,re),e(U,N),e(N,he),e(N,A),e(A,xe),g(T,oe,E),g(T,Z,E),e(Z,ve),e(Z,x),e(x,ue),e(Z,de)},d(T){T&&o(d),T&&o(i),T&&o(c),T&&o(ee),T&&o(R),T&&o(te),T&&o(U),T&&o(oe),T&&o(Z)}}}function tj(j){let d,y,h,u,_;return u=new Ne({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBURlJvRm9ybWVyRm9yQ2F1c2FsTE0lMEFpbXBvcnQlMjB0ZW5zb3JmbG93JTIwYXMlMjB0ZiUwQSUwQXRva2VuaXplciUyMCUzRCUyMEF1dG9Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMmp1bm55dSUyRnJvZm9ybWVyX2NoaW5lc2VfYmFzZSUyMiklMEFtb2RlbCUyMCUzRCUyMFRGUm9Gb3JtZXJGb3JDYXVzYWxMTS5mcm9tX3ByZXRyYWluZWQoJTIyanVubnl1JTJGcm9mb3JtZXJfY2hpbmVzZV9iYXNlJTIyKSUwQSUwQWlucHV0cyUyMCUzRCUyMHRva2VuaXplciglMjJIZWxsbyUyQyUyMG15JTIwZG9nJTIwaXMlMjBjdXRlJTIyJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJ0ZiUyMiklMEFvdXRwdXRzJTIwJTNEJTIwbW9kZWwoaW5wdXRzKSUwQWxvZ2l0cyUyMCUzRCUyMG91dHB1dHMubG9naXRz",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, TFRoFormerForCausalLM
<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;junnyu/roformer_chinese_base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFRoFormerForCausalLM.from_pretrained(<span class="hljs-string">&quot;junnyu/roformer_chinese_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=t("Example:"),h=m(),v(u.$$.fragment)},l(i){d=r(i,"P",{});var c=l(d);y=n(c,"Example:"),c.forEach(o),h=p(i),k(u.$$.fragment,i)},m(i,c){g(i,d,c),e(d,y),g(i,h,c),w(u,i,c),_=!0},p:Ze,i(i){_||(F(u.$$.fragment,i),_=!0)},o(i){M(u.$$.fragment,i),_=!1},d(i){i&&o(d),i&&o(h),$(u,i)}}}function nj(j){let d,y,h,u,_,i,c,J,ke,fe,q,ae,ee,R,we,P,Fe,ge,V,Me,le,Q,$e,_e,G,Re,ye,X,me,je,te,U,I,be,B,pe,Ee,L,se,Je,z,Ce,D,ie,Ue,O,Te,re,N,he,A,xe,oe,Z,ve,x,ue,de;return{c(){d=s("p"),y=t("TensorFlow models and layers in "),h=s("code"),u=t("transformers"),_=t(" accept two formats as input:"),i=m(),c=s("ul"),J=s("li"),ke=t("having all inputs as keyword arguments (like PyTorch models), or"),fe=m(),q=s("li"),ae=t("having all inputs as a list, tuple or dict in the first positional argument."),ee=m(),R=s("p"),we=t(`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 `),P=s("code"),Fe=t("model.fit()"),ge=t(` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),V=s("code"),Me=t("model.fit()"),le=t(` supports! If, however, you want to use the second
format outside of Keras methods like `),Q=s("code"),$e=t("fit()"),_e=t(" and "),G=s("code"),Re=t("predict()"),ye=t(`, such as when creating your own layers or models with
the Keras `),X=s("code"),me=t("Functional"),je=t(` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),te=m(),U=s("ul"),I=s("li"),be=t("a single Tensor with "),B=s("code"),pe=t("input_ids"),Ee=t(" only and nothing else: "),L=s("code"),se=t("model(input_ids)"),Je=m(),z=s("li"),Ce=t(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),D=s("code"),ie=t("model([input_ids, attention_mask])"),Ue=t(" or "),O=s("code"),Te=t("model([input_ids, attention_mask, token_type_ids])"),re=m(),N=s("li"),he=t(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),A=s("code"),xe=t('model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),oe=m(),Z=s("p"),ve=t(`Note that when creating models and layers with
`),x=s("a"),ue=t("subclassing"),de=t(` then you don\u2019t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`),this.h()},l(T){d=r(T,"P",{});var E=l(d);y=n(E,"TensorFlow models and layers in "),h=r(E,"CODE",{});var Ae=l(h);u=n(Ae,"transformers"),Ae.forEach(o),_=n(E," accept two formats as input:"),E.forEach(o),i=p(T),c=r(T,"UL",{});var K=l(c);J=r(K,"LI",{});var Le=l(J);ke=n(Le,"having all inputs as keyword arguments (like PyTorch models), or"),Le.forEach(o),fe=p(K),q=r(K,"LI",{});var Qe=l(q);ae=n(Qe,"having all inputs as a list, tuple or dict in the first positional argument."),Qe.forEach(o),K.forEach(o),ee=p(T),R=r(T,"P",{});var C=l(R);we=n(C,`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 `),P=r(C,"CODE",{});var We=l(P);Fe=n(We,"model.fit()"),We.forEach(o),ge=n(C,` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),V=r(C,"CODE",{});var De=l(V);Me=n(De,"model.fit()"),De.forEach(o),le=n(C,` supports! If, however, you want to use the second
format outside of Keras methods like `),Q=r(C,"CODE",{});var Oe=l(Q);$e=n(Oe,"fit()"),Oe.forEach(o),_e=n(C," and "),G=r(C,"CODE",{});var Ge=l(G);Re=n(Ge,"predict()"),Ge.forEach(o),ye=n(C,`, such as when creating your own layers or models with
the Keras `),X=r(C,"CODE",{});var qe=l(X);me=n(qe,"Functional"),qe.forEach(o),je=n(C,` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),C.forEach(o),te=p(T),U=r(T,"UL",{});var W=l(U);I=r(W,"LI",{});var H=l(I);be=n(H,"a single Tensor with "),B=r(H,"CODE",{});var Xe=l(B);pe=n(Xe,"input_ids"),Xe.forEach(o),Ee=n(H," only and nothing else: "),L=r(H,"CODE",{});var Ve=l(L);se=n(Ve,"model(input_ids)"),Ve.forEach(o),H.forEach(o),Je=p(W),z=r(W,"LI",{});var Y=l(z);Ce=n(Y,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),D=r(Y,"CODE",{});var He=l(D);ie=n(He,"model([input_ids, attention_mask])"),He.forEach(o),Ue=n(Y," or "),O=r(Y,"CODE",{});var Be=l(O);Te=n(Be,"model([input_ids, attention_mask, token_type_ids])"),Be.forEach(o),Y.forEach(o),re=p(W),N=r(W,"LI",{});var ce=l(N);he=n(ce,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),A=r(ce,"CODE",{});var Ye=l(A);xe=n(Ye,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),Ye.forEach(o),ce.forEach(o),W.forEach(o),oe=p(T),Z=r(T,"P",{});var ne=l(Z);ve=n(ne,`Note that when creating models and layers with
`),x=r(ne,"A",{href:!0,rel:!0});var ze=l(x);ue=n(ze,"subclassing"),ze.forEach(o),de=n(ne,` 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!`),ne.forEach(o),this.h()},h(){f(x,"href","https://keras.io/guides/making_new_layers_and_models_via_subclassing/"),f(x,"rel","nofollow")},m(T,E){g(T,d,E),e(d,y),e(d,h),e(h,u),e(d,_),g(T,i,E),g(T,c,E),e(c,J),e(J,ke),e(c,fe),e(c,q),e(q,ae),g(T,ee,E),g(T,R,E),e(R,we),e(R,P),e(P,Fe),e(R,ge),e(R,V),e(V,Me),e(R,le),e(R,Q),e(Q,$e),e(R,_e),e(R,G),e(G,Re),e(R,ye),e(R,X),e(X,me),e(R,je),g(T,te,E),g(T,U,E),e(U,I),e(I,be),e(I,B),e(B,pe),e(I,Ee),e(I,L),e(L,se),e(U,Je),e(U,z),e(z,Ce),e(z,D),e(D,ie),e(z,Ue),e(z,O),e(O,Te),e(U,re),e(U,N),e(N,he),e(N,A),e(A,xe),g(T,oe,E),g(T,Z,E),e(Z,ve),e(Z,x),e(x,ue),e(Z,de)},d(T){T&&o(d),T&&o(i),T&&o(c),T&&o(ee),T&&o(R),T&&o(te),T&&o(U),T&&o(oe),T&&o(Z)}}}function sj(j){let d,y,h,u,_;return{c(){d=s("p"),y=t("Although the recipe for forward pass needs to be defined within this function, one should call the "),h=s("code"),u=t("Module"),_=t(`
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=r(i,"P",{});var c=l(d);y=n(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),h=r(c,"CODE",{});var J=l(h);u=n(J,"Module"),J.forEach(o),_=n(c,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),c.forEach(o)},m(i,c){g(i,d,c),e(d,y),e(d,h),e(h,u),e(d,_)},d(i){i&&o(d)}}}function rj(j){let d,y,h,u,_;return u=new Ne({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBURlJvRm9ybWVyRm9yU2VxdWVuY2VDbGFzc2lmaWNhdGlvbiUwQWltcG9ydCUyMHRlbnNvcmZsb3clMjBhcyUyMHRmJTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIyanVubnl1JTJGcm9mb3JtZXJfY2hpbmVzZV9iYXNlJTIyKSUwQW1vZGVsJTIwJTNEJTIwVEZSb0Zvcm1lckZvclNlcXVlbmNlQ2xhc3NpZmljYXRpb24uZnJvbV9wcmV0cmFpbmVkKCUyMmp1bm55dSUyRnJvZm9ybWVyX2NoaW5lc2VfYmFzZSUyMiklMEElMEFpbnB1dHMlMjAlM0QlMjB0b2tlbml6ZXIoJTIySGVsbG8lMkMlMjBteSUyMGRvZyUyMGlzJTIwY3V0ZSUyMiUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIydGYlMjIpJTBBJTBBbG9naXRzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMpLmxvZ2l0cyUwQSUwQXByZWRpY3RlZF9jbGFzc19pZCUyMCUzRCUyMGludCh0Zi5tYXRoLmFyZ21heChsb2dpdHMlMkMlMjBheGlzJTNELTEpJTVCMCU1RCk=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, TFRoFormerForSequenceClassification
<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;junnyu/roformer_chinese_base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFRoFormerForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;junnyu/roformer_chinese_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>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>])`}}),{c(){d=s("p"),y=t("Example:"),h=m(),v(u.$$.fragment)},l(i){d=r(i,"P",{});var c=l(d);y=n(c,"Example:"),c.forEach(o),h=p(i),k(u.$$.fragment,i)},m(i,c){g(i,d,c),e(d,y),g(i,h,c),w(u,i,c),_=!0},p:Ze,i(i){_||(F(u.$$.fragment,i),_=!0)},o(i){M(u.$$.fragment,i),_=!1},d(i){i&&o(d),i&&o(h),$(u,i)}}}function aj(j){let d,y;return d=new Ne({props:{code:"JTIzJTIwVG8lMjB0cmFpbiUyMGElMjBtb2RlbCUyMG9uJTIwJTYwbnVtX2xhYmVscyU2MCUyMGNsYXNzZXMlMkMlMjB5b3UlMjBjYW4lMjBwYXNzJTIwJTYwbnVtX2xhYmVscyUzRG51bV9sYWJlbHMlNjAlMjB0byUyMCU2MC5mcm9tX3ByZXRyYWluZWQoLi4uKSU2MCUwQW51bV9sYWJlbHMlMjAlM0QlMjBsZW4obW9kZWwuY29uZmlnLmlkMmxhYmVsKSUwQW1vZGVsJTIwJTNEJTIwVEZSb0Zvcm1lckZvclNlcXVlbmNlQ2xhc3NpZmljYXRpb24uZnJvbV9wcmV0cmFpbmVkKCUyMmp1bm55dSUyRnJvZm9ybWVyX2NoaW5lc2VfYmFzZSUyMiUyQyUyMG51bV9sYWJlbHMlM0RudW1fbGFiZWxzKSUwQSUwQWxhYmVscyUyMCUzRCUyMHRmLmNvbnN0YW50KDEpJTBBbG9zcyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzJTJDJTIwbGFiZWxzJTNEbGFiZWxzKS5sb3Nz",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>\n<span class="hljs-meta">&gt;&gt;&gt; </span>num_labels = <span class="hljs-built_in">len</span>(model.config.id2label)\n<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFRoFormerForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;junnyu/roformer_chinese_base&quot;</span>, num_labels=num_labels)\n\n<span class="hljs-meta">&gt;&gt;&gt; </span>labels = tf.constant(<span class="hljs-number">1</span>)\n<span class="hljs-meta">&gt;&gt;&gt; </span>loss = model(**inputs, labels=labels).loss'}}),{c(){v(d.$$.fragment)},l(h){k(d.$$.fragment,h)},m(h,u){w(d,h,u),y=!0},p:Ze,i(h){y||(F(d.$$.fragment,h),y=!0)},o(h){M(d.$$.fragment,h),y=!1},d(h){$(d,h)}}}function lj(j){let d,y,h,u,_,i,c,J,ke,fe,q,ae,ee,R,we,P,Fe,ge,V,Me,le,Q,$e,_e,G,Re,ye,X,me,je,te,U,I,be,B,pe,Ee,L,se,Je,z,Ce,D,ie,Ue,O,Te,re,N,he,A,xe,oe,Z,ve,x,ue,de;return{c(){d=s("p"),y=t("TensorFlow models and layers in "),h=s("code"),u=t("transformers"),_=t(" accept two formats as input:"),i=m(),c=s("ul"),J=s("li"),ke=t("having all inputs as keyword arguments (like PyTorch models), or"),fe=m(),q=s("li"),ae=t("having all inputs as a list, tuple or dict in the first positional argument."),ee=m(),R=s("p"),we=t(`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 `),P=s("code"),Fe=t("model.fit()"),ge=t(` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),V=s("code"),Me=t("model.fit()"),le=t(` supports! If, however, you want to use the second
format outside of Keras methods like `),Q=s("code"),$e=t("fit()"),_e=t(" and "),G=s("code"),Re=t("predict()"),ye=t(`, such as when creating your own layers or models with
the Keras `),X=s("code"),me=t("Functional"),je=t(` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),te=m(),U=s("ul"),I=s("li"),be=t("a single Tensor with "),B=s("code"),pe=t("input_ids"),Ee=t(" only and nothing else: "),L=s("code"),se=t("model(input_ids)"),Je=m(),z=s("li"),Ce=t(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),D=s("code"),ie=t("model([input_ids, attention_mask])"),Ue=t(" or "),O=s("code"),Te=t("model([input_ids, attention_mask, token_type_ids])"),re=m(),N=s("li"),he=t(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),A=s("code"),xe=t('model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),oe=m(),Z=s("p"),ve=t(`Note that when creating models and layers with
`),x=s("a"),ue=t("subclassing"),de=t(` then you don\u2019t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`),this.h()},l(T){d=r(T,"P",{});var E=l(d);y=n(E,"TensorFlow models and layers in "),h=r(E,"CODE",{});var Ae=l(h);u=n(Ae,"transformers"),Ae.forEach(o),_=n(E," accept two formats as input:"),E.forEach(o),i=p(T),c=r(T,"UL",{});var K=l(c);J=r(K,"LI",{});var Le=l(J);ke=n(Le,"having all inputs as keyword arguments (like PyTorch models), or"),Le.forEach(o),fe=p(K),q=r(K,"LI",{});var Qe=l(q);ae=n(Qe,"having all inputs as a list, tuple or dict in the first positional argument."),Qe.forEach(o),K.forEach(o),ee=p(T),R=r(T,"P",{});var C=l(R);we=n(C,`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 `),P=r(C,"CODE",{});var We=l(P);Fe=n(We,"model.fit()"),We.forEach(o),ge=n(C,` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),V=r(C,"CODE",{});var De=l(V);Me=n(De,"model.fit()"),De.forEach(o),le=n(C,` supports! If, however, you want to use the second
format outside of Keras methods like `),Q=r(C,"CODE",{});var Oe=l(Q);$e=n(Oe,"fit()"),Oe.forEach(o),_e=n(C," and "),G=r(C,"CODE",{});var Ge=l(G);Re=n(Ge,"predict()"),Ge.forEach(o),ye=n(C,`, such as when creating your own layers or models with
the Keras `),X=r(C,"CODE",{});var qe=l(X);me=n(qe,"Functional"),qe.forEach(o),je=n(C,` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),C.forEach(o),te=p(T),U=r(T,"UL",{});var W=l(U);I=r(W,"LI",{});var H=l(I);be=n(H,"a single Tensor with "),B=r(H,"CODE",{});var Xe=l(B);pe=n(Xe,"input_ids"),Xe.forEach(o),Ee=n(H," only and nothing else: "),L=r(H,"CODE",{});var Ve=l(L);se=n(Ve,"model(input_ids)"),Ve.forEach(o),H.forEach(o),Je=p(W),z=r(W,"LI",{});var Y=l(z);Ce=n(Y,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),D=r(Y,"CODE",{});var He=l(D);ie=n(He,"model([input_ids, attention_mask])"),He.forEach(o),Ue=n(Y," or "),O=r(Y,"CODE",{});var Be=l(O);Te=n(Be,"model([input_ids, attention_mask, token_type_ids])"),Be.forEach(o),Y.forEach(o),re=p(W),N=r(W,"LI",{});var ce=l(N);he=n(ce,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),A=r(ce,"CODE",{});var Ye=l(A);xe=n(Ye,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),Ye.forEach(o),ce.forEach(o),W.forEach(o),oe=p(T),Z=r(T,"P",{});var ne=l(Z);ve=n(ne,`Note that when creating models and layers with
`),x=r(ne,"A",{href:!0,rel:!0});var ze=l(x);ue=n(ze,"subclassing"),ze.forEach(o),de=n(ne,` 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!`),ne.forEach(o),this.h()},h(){f(x,"href","https://keras.io/guides/making_new_layers_and_models_via_subclassing/"),f(x,"rel","nofollow")},m(T,E){g(T,d,E),e(d,y),e(d,h),e(h,u),e(d,_),g(T,i,E),g(T,c,E),e(c,J),e(J,ke),e(c,fe),e(c,q),e(q,ae),g(T,ee,E),g(T,R,E),e(R,we),e(R,P),e(P,Fe),e(R,ge),e(R,V),e(V,Me),e(R,le),e(R,Q),e(Q,$e),e(R,_e),e(R,G),e(G,Re),e(R,ye),e(R,X),e(X,me),e(R,je),g(T,te,E),g(T,U,E),e(U,I),e(I,be),e(I,B),e(B,pe),e(I,Ee),e(I,L),e(L,se),e(U,Je),e(U,z),e(z,Ce),e(z,D),e(D,ie),e(z,Ue),e(z,O),e(O,Te),e(U,re),e(U,N),e(N,he),e(N,A),e(A,xe),g(T,oe,E),g(T,Z,E),e(Z,ve),e(Z,x),e(x,ue),e(Z,de)},d(T){T&&o(d),T&&o(i),T&&o(c),T&&o(ee),T&&o(R),T&&o(te),T&&o(U),T&&o(oe),T&&o(Z)}}}function ij(j){let d,y,h,u,_;return{c(){d=s("p"),y=t("Although the recipe for forward pass needs to be defined within this function, one should call the "),h=s("code"),u=t("Module"),_=t(`
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=r(i,"P",{});var c=l(d);y=n(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),h=r(c,"CODE",{});var J=l(h);u=n(J,"Module"),J.forEach(o),_=n(c,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),c.forEach(o)},m(i,c){g(i,d,c),e(d,y),e(d,h),e(h,u),e(d,_)},d(i){i&&o(d)}}}function dj(j){let d,y,h,u,_;return u=new Ne({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBURlJvRm9ybWVyRm9yTXVsdGlwbGVDaG9pY2UlMEFpbXBvcnQlMjB0ZW5zb3JmbG93JTIwYXMlMjB0ZiUwQSUwQXRva2VuaXplciUyMCUzRCUyMEF1dG9Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMmp1bm55dSUyRnJvZm9ybWVyX2NoaW5lc2VfYmFzZSUyMiklMEFtb2RlbCUyMCUzRCUyMFRGUm9Gb3JtZXJGb3JNdWx0aXBsZUNob2ljZS5mcm9tX3ByZXRyYWluZWQoJTIyanVubnl1JTJGcm9mb3JtZXJfY2hpbmVzZV9iYXNlJTIyKSUwQSUwQXByb21wdCUyMCUzRCUyMCUyMkluJTIwSXRhbHklMkMlMjBwaXp6YSUyMHNlcnZlZCUyMGluJTIwZm9ybWFsJTIwc2V0dGluZ3MlMkMlMjBzdWNoJTIwYXMlMjBhdCUyMGElMjByZXN0YXVyYW50JTJDJTIwaXMlMjBwcmVzZW50ZWQlMjB1bnNsaWNlZC4lMjIlMEFjaG9pY2UwJTIwJTNEJTIwJTIySXQlMjBpcyUyMGVhdGVuJTIwd2l0aCUyMGElMjBmb3JrJTIwYW5kJTIwYSUyMGtuaWZlLiUyMiUwQWNob2ljZTElMjAlM0QlMjAlMjJJdCUyMGlzJTIwZWF0ZW4lMjB3aGlsZSUyMGhlbGQlMjBpbiUyMHRoZSUyMGhhbmQuJTIyJTBBJTBBZW5jb2RpbmclMjAlM0QlMjB0b2tlbml6ZXIoJTVCcHJvbXB0JTJDJTIwcHJvbXB0JTVEJTJDJTIwJTVCY2hvaWNlMCUyQyUyMGNob2ljZTElNUQlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnRmJTIyJTJDJTIwcGFkZGluZyUzRFRydWUpJTBBaW5wdXRzJTIwJTNEJTIwJTdCayUzQSUyMHRmLmV4cGFuZF9kaW1zKHYlMkMlMjAwKSUyMGZvciUyMGslMkMlMjB2JTIwaW4lMjBlbmNvZGluZy5pdGVtcygpJTdEJTBBb3V0cHV0cyUyMCUzRCUyMG1vZGVsKGlucHV0cyklMjAlMjAlMjMlMjBiYXRjaCUyMHNpemUlMjBpcyUyMDElMEElMEElMjMlMjB0aGUlMjBsaW5lYXIlMjBjbGFzc2lmaWVyJTIwc3RpbGwlMjBuZWVkcyUyMHRvJTIwYmUlMjB0cmFpbmVkJTBBbG9naXRzJTIwJTNEJTIwb3V0cHV0cy5sb2dpdHM=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, TFRoFormerForMultipleChoice
<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;junnyu/roformer_chinese_base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFRoFormerForMultipleChoice.from_pretrained(<span class="hljs-string">&quot;junnyu/roformer_chinese_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=t("Example:"),h=m(),v(u.$$.fragment)},l(i){d=r(i,"P",{});var c=l(d);y=n(c,"Example:"),c.forEach(o),h=p(i),k(u.$$.fragment,i)},m(i,c){g(i,d,c),e(d,y),g(i,h,c),w(u,i,c),_=!0},p:Ze,i(i){_||(F(u.$$.fragment,i),_=!0)},o(i){M(u.$$.fragment,i),_=!1},d(i){i&&o(d),i&&o(h),$(u,i)}}}function cj(j){let d,y,h,u,_,i,c,J,ke,fe,q,ae,ee,R,we,P,Fe,ge,V,Me,le,Q,$e,_e,G,Re,ye,X,me,je,te,U,I,be,B,pe,Ee,L,se,Je,z,Ce,D,ie,Ue,O,Te,re,N,he,A,xe,oe,Z,ve,x,ue,de;return{c(){d=s("p"),y=t("TensorFlow models and layers in "),h=s("code"),u=t("transformers"),_=t(" accept two formats as input:"),i=m(),c=s("ul"),J=s("li"),ke=t("having all inputs as keyword arguments (like PyTorch models), or"),fe=m(),q=s("li"),ae=t("having all inputs as a list, tuple or dict in the first positional argument."),ee=m(),R=s("p"),we=t(`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 `),P=s("code"),Fe=t("model.fit()"),ge=t(` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),V=s("code"),Me=t("model.fit()"),le=t(` supports! If, however, you want to use the second
format outside of Keras methods like `),Q=s("code"),$e=t("fit()"),_e=t(" and "),G=s("code"),Re=t("predict()"),ye=t(`, such as when creating your own layers or models with
the Keras `),X=s("code"),me=t("Functional"),je=t(` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),te=m(),U=s("ul"),I=s("li"),be=t("a single Tensor with "),B=s("code"),pe=t("input_ids"),Ee=t(" only and nothing else: "),L=s("code"),se=t("model(input_ids)"),Je=m(),z=s("li"),Ce=t(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),D=s("code"),ie=t("model([input_ids, attention_mask])"),Ue=t(" or "),O=s("code"),Te=t("model([input_ids, attention_mask, token_type_ids])"),re=m(),N=s("li"),he=t(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),A=s("code"),xe=t('model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),oe=m(),Z=s("p"),ve=t(`Note that when creating models and layers with
`),x=s("a"),ue=t("subclassing"),de=t(` then you don\u2019t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`),this.h()},l(T){d=r(T,"P",{});var E=l(d);y=n(E,"TensorFlow models and layers in "),h=r(E,"CODE",{});var Ae=l(h);u=n(Ae,"transformers"),Ae.forEach(o),_=n(E," accept two formats as input:"),E.forEach(o),i=p(T),c=r(T,"UL",{});var K=l(c);J=r(K,"LI",{});var Le=l(J);ke=n(Le,"having all inputs as keyword arguments (like PyTorch models), or"),Le.forEach(o),fe=p(K),q=r(K,"LI",{});var Qe=l(q);ae=n(Qe,"having all inputs as a list, tuple or dict in the first positional argument."),Qe.forEach(o),K.forEach(o),ee=p(T),R=r(T,"P",{});var C=l(R);we=n(C,`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 `),P=r(C,"CODE",{});var We=l(P);Fe=n(We,"model.fit()"),We.forEach(o),ge=n(C,` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),V=r(C,"CODE",{});var De=l(V);Me=n(De,"model.fit()"),De.forEach(o),le=n(C,` supports! If, however, you want to use the second
format outside of Keras methods like `),Q=r(C,"CODE",{});var Oe=l(Q);$e=n(Oe,"fit()"),Oe.forEach(o),_e=n(C," and "),G=r(C,"CODE",{});var Ge=l(G);Re=n(Ge,"predict()"),Ge.forEach(o),ye=n(C,`, such as when creating your own layers or models with
the Keras `),X=r(C,"CODE",{});var qe=l(X);me=n(qe,"Functional"),qe.forEach(o),je=n(C,` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),C.forEach(o),te=p(T),U=r(T,"UL",{});var W=l(U);I=r(W,"LI",{});var H=l(I);be=n(H,"a single Tensor with "),B=r(H,"CODE",{});var Xe=l(B);pe=n(Xe,"input_ids"),Xe.forEach(o),Ee=n(H," only and nothing else: "),L=r(H,"CODE",{});var Ve=l(L);se=n(Ve,"model(input_ids)"),Ve.forEach(o),H.forEach(o),Je=p(W),z=r(W,"LI",{});var Y=l(z);Ce=n(Y,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),D=r(Y,"CODE",{});var He=l(D);ie=n(He,"model([input_ids, attention_mask])"),He.forEach(o),Ue=n(Y," or "),O=r(Y,"CODE",{});var Be=l(O);Te=n(Be,"model([input_ids, attention_mask, token_type_ids])"),Be.forEach(o),Y.forEach(o),re=p(W),N=r(W,"LI",{});var ce=l(N);he=n(ce,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),A=r(ce,"CODE",{});var Ye=l(A);xe=n(Ye,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),Ye.forEach(o),ce.forEach(o),W.forEach(o),oe=p(T),Z=r(T,"P",{});var ne=l(Z);ve=n(ne,`Note that when creating models and layers with
`),x=r(ne,"A",{href:!0,rel:!0});var ze=l(x);ue=n(ze,"subclassing"),ze.forEach(o),de=n(ne,` 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!`),ne.forEach(o),this.h()},h(){f(x,"href","https://keras.io/guides/making_new_layers_and_models_via_subclassing/"),f(x,"rel","nofollow")},m(T,E){g(T,d,E),e(d,y),e(d,h),e(h,u),e(d,_),g(T,i,E),g(T,c,E),e(c,J),e(J,ke),e(c,fe),e(c,q),e(q,ae),g(T,ee,E),g(T,R,E),e(R,we),e(R,P),e(P,Fe),e(R,ge),e(R,V),e(V,Me),e(R,le),e(R,Q),e(Q,$e),e(R,_e),e(R,G),e(G,Re),e(R,ye),e(R,X),e(X,me),e(R,je),g(T,te,E),g(T,U,E),e(U,I),e(I,be),e(I,B),e(B,pe),e(I,Ee),e(I,L),e(L,se),e(U,Je),e(U,z),e(z,Ce),e(z,D),e(D,ie),e(z,Ue),e(z,O),e(O,Te),e(U,re),e(U,N),e(N,he),e(N,A),e(A,xe),g(T,oe,E),g(T,Z,E),e(Z,ve),e(Z,x),e(x,ue),e(Z,de)},d(T){T&&o(d),T&&o(i),T&&o(c),T&&o(ee),T&&o(R),T&&o(te),T&&o(U),T&&o(oe),T&&o(Z)}}}function mj(j){let d,y,h,u,_;return{c(){d=s("p"),y=t("Although the recipe for forward pass needs to be defined within this function, one should call the "),h=s("code"),u=t("Module"),_=t(`
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=r(i,"P",{});var c=l(d);y=n(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),h=r(c,"CODE",{});var J=l(h);u=n(J,"Module"),J.forEach(o),_=n(c,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),c.forEach(o)},m(i,c){g(i,d,c),e(d,y),e(d,h),e(h,u),e(d,_)},d(i){i&&o(d)}}}function pj(j){let d,y,h,u,_;return u=new Ne({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBURlJvRm9ybWVyRm9yVG9rZW5DbGFzc2lmaWNhdGlvbiUwQWltcG9ydCUyMHRlbnNvcmZsb3clMjBhcyUyMHRmJTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIyanVubnl1JTJGcm9mb3JtZXJfY2hpbmVzZV9iYXNlJTIyKSUwQW1vZGVsJTIwJTNEJTIwVEZSb0Zvcm1lckZvclRva2VuQ2xhc3NpZmljYXRpb24uZnJvbV9wcmV0cmFpbmVkKCUyMmp1bm55dSUyRnJvZm9ybWVyX2NoaW5lc2VfYmFzZSUyMiklMEElMEFpbnB1dHMlMjAlM0QlMjB0b2tlbml6ZXIoJTBBJTIwJTIwJTIwJTIwJTIySHVnZ2luZ0ZhY2UlMjBpcyUyMGElMjBjb21wYW55JTIwYmFzZWQlMjBpbiUyMFBhcmlzJTIwYW5kJTIwTmV3JTIwWW9yayUyMiUyQyUyMGFkZF9zcGVjaWFsX3Rva2VucyUzREZhbHNlJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJ0ZiUyMiUwQSklMEElMEFsb2dpdHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cykubG9naXRzJTBBcHJlZGljdGVkX3Rva2VuX2NsYXNzX2lkcyUyMCUzRCUyMHRmLm1hdGguYXJnbWF4KGxvZ2l0cyUyQyUyMGF4aXMlM0QtMSklMEElMEElMjMlMjBOb3RlJTIwdGhhdCUyMHRva2VucyUyMGFyZSUyMGNsYXNzaWZpZWQlMjByYXRoZXIlMjB0aGVuJTIwaW5wdXQlMjB3b3JkcyUyMHdoaWNoJTIwbWVhbnMlMjB0aGF0JTBBJTIzJTIwdGhlcmUlMjBtaWdodCUyMGJlJTIwbW9yZSUyMHByZWRpY3RlZCUyMHRva2VuJTIwY2xhc3NlcyUyMHRoYW4lMjB3b3Jkcy4lMEElMjMlMjBNdWx0aXBsZSUyMHRva2VuJTIwY2xhc3NlcyUyMG1pZ2h0JTIwYWNjb3VudCUyMGZvciUyMHRoZSUyMHNhbWUlMjB3b3JkJTBBcHJlZGljdGVkX3Rva2Vuc19jbGFzc2VzJTIwJTNEJTIwJTVCbW9kZWwuY29uZmlnLmlkMmxhYmVsJTVCdCU1RCUyMGZvciUyMHQlMjBpbiUyMHByZWRpY3RlZF90b2tlbl9jbGFzc19pZHMlNUIwJTVELm51bXB5KCkudG9saXN0KCklNUQ=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, TFRoFormerForTokenClassification
<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;junnyu/roformer_chinese_base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFRoFormerForTokenClassification.from_pretrained(<span class="hljs-string">&quot;junnyu/roformer_chinese_base&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()]`}}),{c(){d=s("p"),y=t("Example:"),h=m(),v(u.$$.fragment)},l(i){d=r(i,"P",{});var c=l(d);y=n(c,"Example:"),c.forEach(o),h=p(i),k(u.$$.fragment,i)},m(i,c){g(i,d,c),e(d,y),g(i,h,c),w(u,i,c),_=!0},p:Ze,i(i){_||(F(u.$$.fragment,i),_=!0)},o(i){M(u.$$.fragment,i),_=!1},d(i){i&&o(d),i&&o(h),$(u,i)}}}function hj(j){let d,y;return d=new Ne({props:{code:"bGFiZWxzJTIwJTNEJTIwcHJlZGljdGVkX3Rva2VuX2NsYXNzX2lkcyUwQWxvc3MlMjAlM0QlMjB0Zi5tYXRoLnJlZHVjZV9tZWFuKG1vZGVsKCoqaW5wdXRzJTJDJTIwbGFiZWxzJTNEbGFiZWxzKS5sb3NzKQ==",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)`}}),{c(){v(d.$$.fragment)},l(h){k(d.$$.fragment,h)},m(h,u){w(d,h,u),y=!0},p:Ze,i(h){y||(F(d.$$.fragment,h),y=!0)},o(h){M(d.$$.fragment,h),y=!1},d(h){$(d,h)}}}function uj(j){let d,y,h,u,_,i,c,J,ke,fe,q,ae,ee,R,we,P,Fe,ge,V,Me,le,Q,$e,_e,G,Re,ye,X,me,je,te,U,I,be,B,pe,Ee,L,se,Je,z,Ce,D,ie,Ue,O,Te,re,N,he,A,xe,oe,Z,ve,x,ue,de;return{c(){d=s("p"),y=t("TensorFlow models and layers in "),h=s("code"),u=t("transformers"),_=t(" accept two formats as input:"),i=m(),c=s("ul"),J=s("li"),ke=t("having all inputs as keyword arguments (like PyTorch models), or"),fe=m(),q=s("li"),ae=t("having all inputs as a list, tuple or dict in the first positional argument."),ee=m(),R=s("p"),we=t(`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 `),P=s("code"),Fe=t("model.fit()"),ge=t(` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),V=s("code"),Me=t("model.fit()"),le=t(` supports! If, however, you want to use the second
format outside of Keras methods like `),Q=s("code"),$e=t("fit()"),_e=t(" and "),G=s("code"),Re=t("predict()"),ye=t(`, such as when creating your own layers or models with
the Keras `),X=s("code"),me=t("Functional"),je=t(` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),te=m(),U=s("ul"),I=s("li"),be=t("a single Tensor with "),B=s("code"),pe=t("input_ids"),Ee=t(" only and nothing else: "),L=s("code"),se=t("model(input_ids)"),Je=m(),z=s("li"),Ce=t(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),D=s("code"),ie=t("model([input_ids, attention_mask])"),Ue=t(" or "),O=s("code"),Te=t("model([input_ids, attention_mask, token_type_ids])"),re=m(),N=s("li"),he=t(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),A=s("code"),xe=t('model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),oe=m(),Z=s("p"),ve=t(`Note that when creating models and layers with
`),x=s("a"),ue=t("subclassing"),de=t(` then you don\u2019t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`),this.h()},l(T){d=r(T,"P",{});var E=l(d);y=n(E,"TensorFlow models and layers in "),h=r(E,"CODE",{});var Ae=l(h);u=n(Ae,"transformers"),Ae.forEach(o),_=n(E," accept two formats as input:"),E.forEach(o),i=p(T),c=r(T,"UL",{});var K=l(c);J=r(K,"LI",{});var Le=l(J);ke=n(Le,"having all inputs as keyword arguments (like PyTorch models), or"),Le.forEach(o),fe=p(K),q=r(K,"LI",{});var Qe=l(q);ae=n(Qe,"having all inputs as a list, tuple or dict in the first positional argument."),Qe.forEach(o),K.forEach(o),ee=p(T),R=r(T,"P",{});var C=l(R);we=n(C,`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 `),P=r(C,"CODE",{});var We=l(P);Fe=n(We,"model.fit()"),We.forEach(o),ge=n(C,` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),V=r(C,"CODE",{});var De=l(V);Me=n(De,"model.fit()"),De.forEach(o),le=n(C,` supports! If, however, you want to use the second
format outside of Keras methods like `),Q=r(C,"CODE",{});var Oe=l(Q);$e=n(Oe,"fit()"),Oe.forEach(o),_e=n(C," and "),G=r(C,"CODE",{});var Ge=l(G);Re=n(Ge,"predict()"),Ge.forEach(o),ye=n(C,`, such as when creating your own layers or models with
the Keras `),X=r(C,"CODE",{});var qe=l(X);me=n(qe,"Functional"),qe.forEach(o),je=n(C,` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),C.forEach(o),te=p(T),U=r(T,"UL",{});var W=l(U);I=r(W,"LI",{});var H=l(I);be=n(H,"a single Tensor with "),B=r(H,"CODE",{});var Xe=l(B);pe=n(Xe,"input_ids"),Xe.forEach(o),Ee=n(H," only and nothing else: "),L=r(H,"CODE",{});var Ve=l(L);se=n(Ve,"model(input_ids)"),Ve.forEach(o),H.forEach(o),Je=p(W),z=r(W,"LI",{});var Y=l(z);Ce=n(Y,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),D=r(Y,"CODE",{});var He=l(D);ie=n(He,"model([input_ids, attention_mask])"),He.forEach(o),Ue=n(Y," or "),O=r(Y,"CODE",{});var Be=l(O);Te=n(Be,"model([input_ids, attention_mask, token_type_ids])"),Be.forEach(o),Y.forEach(o),re=p(W),N=r(W,"LI",{});var ce=l(N);he=n(ce,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),A=r(ce,"CODE",{});var Ye=l(A);xe=n(Ye,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),Ye.forEach(o),ce.forEach(o),W.forEach(o),oe=p(T),Z=r(T,"P",{});var ne=l(Z);ve=n(ne,`Note that when creating models and layers with
`),x=r(ne,"A",{href:!0,rel:!0});var ze=l(x);ue=n(ze,"subclassing"),ze.forEach(o),de=n(ne,` 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!`),ne.forEach(o),this.h()},h(){f(x,"href","https://keras.io/guides/making_new_layers_and_models_via_subclassing/"),f(x,"rel","nofollow")},m(T,E){g(T,d,E),e(d,y),e(d,h),e(h,u),e(d,_),g(T,i,E),g(T,c,E),e(c,J),e(J,ke),e(c,fe),e(c,q),e(q,ae),g(T,ee,E),g(T,R,E),e(R,we),e(R,P),e(P,Fe),e(R,ge),e(R,V),e(V,Me),e(R,le),e(R,Q),e(Q,$e),e(R,_e),e(R,G),e(G,Re),e(R,ye),e(R,X),e(X,me),e(R,je),g(T,te,E),g(T,U,E),e(U,I),e(I,be),e(I,B),e(B,pe),e(I,Ee),e(I,L),e(L,se),e(U,Je),e(U,z),e(z,Ce),e(z,D),e(D,ie),e(z,Ue),e(z,O),e(O,Te),e(U,re),e(U,N),e(N,he),e(N,A),e(A,xe),g(T,oe,E),g(T,Z,E),e(Z,ve),e(Z,x),e(x,ue),e(Z,de)},d(T){T&&o(d),T&&o(i),T&&o(c),T&&o(ee),T&&o(R),T&&o(te),T&&o(U),T&&o(oe),T&&o(Z)}}}function fj(j){let d,y,h,u,_;return{c(){d=s("p"),y=t("Although the recipe for forward pass needs to be defined within this function, one should call the "),h=s("code"),u=t("Module"),_=t(`
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=r(i,"P",{});var c=l(d);y=n(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),h=r(c,"CODE",{});var J=l(h);u=n(J,"Module"),J.forEach(o),_=n(c,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),c.forEach(o)},m(i,c){g(i,d,c),e(d,y),e(d,h),e(h,u),e(d,_)},d(i){i&&o(d)}}}function gj(j){let d,y,h,u,_;return u=new Ne({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBURlJvRm9ybWVyRm9yUXVlc3Rpb25BbnN3ZXJpbmclMEFpbXBvcnQlMjB0ZW5zb3JmbG93JTIwYXMlMjB0ZiUwQSUwQXRva2VuaXplciUyMCUzRCUyMEF1dG9Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMmp1bm55dSUyRnJvZm9ybWVyX2NoaW5lc2VfYmFzZSUyMiklMEFtb2RlbCUyMCUzRCUyMFRGUm9Gb3JtZXJGb3JRdWVzdGlvbkFuc3dlcmluZy5mcm9tX3ByZXRyYWluZWQoJTIyanVubnl1JTJGcm9mb3JtZXJfY2hpbmVzZV9iYXNlJTIyKSUwQSUwQXF1ZXN0aW9uJTJDJTIwdGV4dCUyMCUzRCUyMCUyMldobyUyMHdhcyUyMEppbSUyMEhlbnNvbiUzRiUyMiUyQyUyMCUyMkppbSUyMEhlbnNvbiUyMHdhcyUyMGElMjBuaWNlJTIwcHVwcGV0JTIyJTBBJTBBaW5wdXRzJTIwJTNEJTIwdG9rZW5pemVyKHF1ZXN0aW9uJTJDJTIwdGV4dCUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIydGYlMjIpJTBBb3V0cHV0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzKSUwQSUwQWFuc3dlcl9zdGFydF9pbmRleCUyMCUzRCUyMGludCh0Zi5tYXRoLmFyZ21heChvdXRwdXRzLnN0YXJ0X2xvZ2l0cyUyQyUyMGF4aXMlM0QtMSklNUIwJTVEKSUwQWFuc3dlcl9lbmRfaW5kZXglMjAlM0QlMjBpbnQodGYubWF0aC5hcmdtYXgob3V0cHV0cy5lbmRfbG9naXRzJTJDJTIwYXhpcyUzRC0xKSU1QjAlNUQpJTBBJTBBcHJlZGljdF9hbnN3ZXJfdG9rZW5zJTIwJTNEJTIwaW5wdXRzLmlucHV0X2lkcyU1QjAlMkMlMjBhbnN3ZXJfc3RhcnRfaW5kZXglMjAlM0ElMjBhbnN3ZXJfZW5kX2luZGV4JTIwJTJCJTIwMSU1RA==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, TFRoFormerForQuestionAnswering
<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;junnyu/roformer_chinese_base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFRoFormerForQuestionAnswering.from_pretrained(<span class="hljs-string">&quot;junnyu/roformer_chinese_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;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>]`}}),{c(){d=s("p"),y=t("Example:"),h=m(),v(u.$$.fragment)},l(i){d=r(i,"P",{});var c=l(d);y=n(c,"Example:"),c.forEach(o),h=p(i),k(u.$$.fragment,i)},m(i,c){g(i,d,c),e(d,y),g(i,h,c),w(u,i,c),_=!0},p:Ze,i(i){_||(F(u.$$.fragment,i),_=!0)},o(i){M(u.$$.fragment,i),_=!1},d(i){i&&o(d),i&&o(h),$(u,i)}}}function _j(j){let d,y;return d=new Ne({props:{code:"JTIzJTIwdGFyZ2V0JTIwaXMlMjAlMjJuaWNlJTIwcHVwcGV0JTIyJTBBdGFyZ2V0X3N0YXJ0X2luZGV4JTIwJTNEJTIwdGYuY29uc3RhbnQoJTVCMTQlNUQpJTBBdGFyZ2V0X2VuZF9pbmRleCUyMCUzRCUyMHRmLmNvbnN0YW50KCU1QjE1JTVEKSUwQSUwQW91dHB1dHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cyUyQyUyMHN0YXJ0X3Bvc2l0aW9ucyUzRHRhcmdldF9zdGFydF9pbmRleCUyQyUyMGVuZF9wb3NpdGlvbnMlM0R0YXJnZXRfZW5kX2luZGV4KSUwQWxvc3MlMjAlM0QlMjB0Zi5tYXRoLnJlZHVjZV9tZWFuKG91dHB1dHMubG9zcyk=",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)`}}),{c(){v(d.$$.fragment)},l(h){k(d.$$.fragment,h)},m(h,u){w(d,h,u),y=!0},p:Ze,i(h){y||(F(d.$$.fragment,h),y=!0)},o(h){M(d.$$.fragment,h),y=!1},d(h){$(d,h)}}}function yj(j){let d,y,h,u,_;return{c(){d=s("p"),y=t("Although the recipe for forward pass needs to be defined within this function, one should call the "),h=s("code"),u=t("Module"),_=t(`
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=r(i,"P",{});var c=l(d);y=n(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),h=r(c,"CODE",{});var J=l(h);u=n(J,"Module"),J.forEach(o),_=n(c,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),c.forEach(o)},m(i,c){g(i,d,c),e(d,y),e(d,h),e(h,u),e(d,_)},d(i){i&&o(d)}}}function bj(j){let d,y,h,u,_;return u=new Ne({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBGbGF4Um9Gb3JtZXJNb2RlbCUwQSUwQXRva2VuaXplciUyMCUzRCUyMEF1dG9Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMmp1bm55dSUyRnJvZm9ybWVyX2NoaW5lc2VfYmFzZSUyMiklMEFtb2RlbCUyMCUzRCUyMEZsYXhSb0Zvcm1lck1vZGVsLmZyb21fcHJldHJhaW5lZCglMjJqdW5ueXUlMkZyb2Zvcm1lcl9jaGluZXNlX2Jhc2UlMjIpJTBBJTBBaW5wdXRzJTIwJTNEJTIwdG9rZW5pemVyKCUyMkhlbGxvJTJDJTIwbXklMjBkb2clMjBpcyUyMGN1dGUlMjIlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMmpheCUyMiklMEFvdXRwdXRzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMpJTBBJTBBbGFzdF9oaWRkZW5fc3RhdGVzJTIwJTNEJTIwb3V0cHV0cy5sYXN0X2hpZGRlbl9zdGF0ZQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, FlaxRoFormerModel

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;junnyu/roformer_chinese_base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = FlaxRoFormerModel.from_pretrained(<span class="hljs-string">&quot;junnyu/roformer_chinese_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=t("Example:"),h=m(),v(u.$$.fragment)},l(i){d=r(i,"P",{});var c=l(d);y=n(c,"Example:"),c.forEach(o),h=p(i),k(u.$$.fragment,i)},m(i,c){g(i,d,c),e(d,y),g(i,h,c),w(u,i,c),_=!0},p:Ze,i(i){_||(F(u.$$.fragment,i),_=!0)},o(i){M(u.$$.fragment,i),_=!1},d(i){i&&o(d),i&&o(h),$(u,i)}}}function Tj(j){let d,y,h,u,_;return{c(){d=s("p"),y=t("Although the recipe for forward pass needs to be defined within this function, one should call the "),h=s("code"),u=t("Module"),_=t(`
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=r(i,"P",{});var c=l(d);y=n(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),h=r(c,"CODE",{});var J=l(h);u=n(J,"Module"),J.forEach(o),_=n(c,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),c.forEach(o)},m(i,c){g(i,d,c),e(d,y),e(d,h),e(h,u),e(d,_)},d(i){i&&o(d)}}}function vj(j){let d,y,h,u,_;return u=new Ne({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBGbGF4Um9Gb3JtZXJGb3JNYXNrZWRMTSUwQSUwQXRva2VuaXplciUyMCUzRCUyMEF1dG9Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMmp1bm55dSUyRnJvZm9ybWVyX2NoaW5lc2VfYmFzZSUyMiklMEFtb2RlbCUyMCUzRCUyMEZsYXhSb0Zvcm1lckZvck1hc2tlZExNLmZyb21fcHJldHJhaW5lZCglMjJqdW5ueXUlMkZyb2Zvcm1lcl9jaGluZXNlX2Jhc2UlMjIpJTBBJTBBaW5wdXRzJTIwJTNEJTIwdG9rZW5pemVyKCUyMlRoZSUyMGNhcGl0YWwlMjBvZiUyMEZyYW5jZSUyMGlzJTIwJTVCTUFTSyU1RC4lMjIlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMmpheCUyMiklMEElMEFvdXRwdXRzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMpJTBBbG9naXRzJTIwJTNEJTIwb3V0cHV0cy5sb2dpdHM=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, FlaxRoFormerForMaskedLM

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;junnyu/roformer_chinese_base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = FlaxRoFormerForMaskedLM.from_pretrained(<span class="hljs-string">&quot;junnyu/roformer_chinese_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=t("Example:"),h=m(),v(u.$$.fragment)},l(i){d=r(i,"P",{});var c=l(d);y=n(c,"Example:"),c.forEach(o),h=p(i),k(u.$$.fragment,i)},m(i,c){g(i,d,c),e(d,y),g(i,h,c),w(u,i,c),_=!0},p:Ze,i(i){_||(F(u.$$.fragment,i),_=!0)},o(i){M(u.$$.fragment,i),_=!1},d(i){i&&o(d),i&&o(h),$(u,i)}}}function kj(j){let d,y,h,u,_;return{c(){d=s("p"),y=t("Although the recipe for forward pass needs to be defined within this function, one should call the "),h=s("code"),u=t("Module"),_=t(`
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=r(i,"P",{});var c=l(d);y=n(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),h=r(c,"CODE",{});var J=l(h);u=n(J,"Module"),J.forEach(o),_=n(c,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),c.forEach(o)},m(i,c){g(i,d,c),e(d,y),e(d,h),e(h,u),e(d,_)},d(i){i&&o(d)}}}function wj(j){let d,y,h,u,_;return u=new Ne({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBGbGF4Um9Gb3JtZXJGb3JTZXF1ZW5jZUNsYXNzaWZpY2F0aW9uJTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIyanVubnl1JTJGcm9mb3JtZXJfY2hpbmVzZV9iYXNlJTIyKSUwQW1vZGVsJTIwJTNEJTIwRmxheFJvRm9ybWVyRm9yU2VxdWVuY2VDbGFzc2lmaWNhdGlvbi5mcm9tX3ByZXRyYWluZWQoJTIyanVubnl1JTJGcm9mb3JtZXJfY2hpbmVzZV9iYXNlJTIyKSUwQSUwQWlucHV0cyUyMCUzRCUyMHRva2VuaXplciglMjJIZWxsbyUyQyUyMG15JTIwZG9nJTIwaXMlMjBjdXRlJTIyJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJqYXglMjIpJTBBJTBBb3V0cHV0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzKSUwQWxvZ2l0cyUyMCUzRCUyMG91dHB1dHMubG9naXRz",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, FlaxRoFormerForSequenceClassification

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;junnyu/roformer_chinese_base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = FlaxRoFormerForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;junnyu/roformer_chinese_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=t("Example:"),h=m(),v(u.$$.fragment)},l(i){d=r(i,"P",{});var c=l(d);y=n(c,"Example:"),c.forEach(o),h=p(i),k(u.$$.fragment,i)},m(i,c){g(i,d,c),e(d,y),g(i,h,c),w(u,i,c),_=!0},p:Ze,i(i){_||(F(u.$$.fragment,i),_=!0)},o(i){M(u.$$.fragment,i),_=!1},d(i){i&&o(d),i&&o(h),$(u,i)}}}function Fj(j){let d,y,h,u,_;return{c(){d=s("p"),y=t("Although the recipe for forward pass needs to be defined within this function, one should call the "),h=s("code"),u=t("Module"),_=t(`
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=r(i,"P",{});var c=l(d);y=n(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),h=r(c,"CODE",{});var J=l(h);u=n(J,"Module"),J.forEach(o),_=n(c,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),c.forEach(o)},m(i,c){g(i,d,c),e(d,y),e(d,h),e(h,u),e(d,_)},d(i){i&&o(d)}}}function Mj(j){let d,y,h,u,_;return u=new Ne({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBGbGF4Um9Gb3JtZXJGb3JNdWx0aXBsZUNob2ljZSUwQSUwQXRva2VuaXplciUyMCUzRCUyMEF1dG9Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMmp1bm55dSUyRnJvZm9ybWVyX2NoaW5lc2VfYmFzZSUyMiklMEFtb2RlbCUyMCUzRCUyMEZsYXhSb0Zvcm1lckZvck11bHRpcGxlQ2hvaWNlLmZyb21fcHJldHJhaW5lZCglMjJqdW5ueXUlMkZyb2Zvcm1lcl9jaGluZXNlX2Jhc2UlMjIpJTBBJTBBcHJvbXB0JTIwJTNEJTIwJTIySW4lMjBJdGFseSUyQyUyMHBpenphJTIwc2VydmVkJTIwaW4lMjBmb3JtYWwlMjBzZXR0aW5ncyUyQyUyMHN1Y2glMjBhcyUyMGF0JTIwYSUyMHJlc3RhdXJhbnQlMkMlMjBpcyUyMHByZXNlbnRlZCUyMHVuc2xpY2VkLiUyMiUwQWNob2ljZTAlMjAlM0QlMjAlMjJJdCUyMGlzJTIwZWF0ZW4lMjB3aXRoJTIwYSUyMGZvcmslMjBhbmQlMjBhJTIwa25pZmUuJTIyJTBBY2hvaWNlMSUyMCUzRCUyMCUyMkl0JTIwaXMlMjBlYXRlbiUyMHdoaWxlJTIwaGVsZCUyMGluJTIwdGhlJTIwaGFuZC4lMjIlMEElMEFlbmNvZGluZyUyMCUzRCUyMHRva2VuaXplciglNUJwcm9tcHQlMkMlMjBwcm9tcHQlNUQlMkMlMjAlNUJjaG9pY2UwJTJDJTIwY2hvaWNlMSU1RCUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIyamF4JTIyJTJDJTIwcGFkZGluZyUzRFRydWUpJTBBb3V0cHV0cyUyMCUzRCUyMG1vZGVsKCoqJTdCayUzQSUyMHYlNUJOb25lJTJDJTIwJTNBJTVEJTIwZm9yJTIwayUyQyUyMHYlMjBpbiUyMGVuY29kaW5nLml0ZW1zKCklN0QpJTBBJTBBbG9naXRzJTIwJTNEJTIwb3V0cHV0cy5sb2dpdHM=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, FlaxRoFormerForMultipleChoice

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;junnyu/roformer_chinese_base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = FlaxRoFormerForMultipleChoice.from_pretrained(<span class="hljs-string">&quot;junnyu/roformer_chinese_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=t("Example:"),h=m(),v(u.$$.fragment)},l(i){d=r(i,"P",{});var c=l(d);y=n(c,"Example:"),c.forEach(o),h=p(i),k(u.$$.fragment,i)},m(i,c){g(i,d,c),e(d,y),g(i,h,c),w(u,i,c),_=!0},p:Ze,i(i){_||(F(u.$$.fragment,i),_=!0)},o(i){M(u.$$.fragment,i),_=!1},d(i){i&&o(d),i&&o(h),$(u,i)}}}function $j(j){let d,y,h,u,_;return{c(){d=s("p"),y=t("Although the recipe for forward pass needs to be defined within this function, one should call the "),h=s("code"),u=t("Module"),_=t(`
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=r(i,"P",{});var c=l(d);y=n(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),h=r(c,"CODE",{});var J=l(h);u=n(J,"Module"),J.forEach(o),_=n(c,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),c.forEach(o)},m(i,c){g(i,d,c),e(d,y),e(d,h),e(h,u),e(d,_)},d(i){i&&o(d)}}}function Rj(j){let d,y,h,u,_;return u=new Ne({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBGbGF4Um9Gb3JtZXJGb3JUb2tlbkNsYXNzaWZpY2F0aW9uJTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIyanVubnl1JTJGcm9mb3JtZXJfY2hpbmVzZV9iYXNlJTIyKSUwQW1vZGVsJTIwJTNEJTIwRmxheFJvRm9ybWVyRm9yVG9rZW5DbGFzc2lmaWNhdGlvbi5mcm9tX3ByZXRyYWluZWQoJTIyanVubnl1JTJGcm9mb3JtZXJfY2hpbmVzZV9iYXNlJTIyKSUwQSUwQWlucHV0cyUyMCUzRCUyMHRva2VuaXplciglMjJIZWxsbyUyQyUyMG15JTIwZG9nJTIwaXMlMjBjdXRlJTIyJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJqYXglMjIpJTBBJTBBb3V0cHV0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzKSUwQWxvZ2l0cyUyMCUzRCUyMG91dHB1dHMubG9naXRz",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, FlaxRoFormerForTokenClassification

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;junnyu/roformer_chinese_base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = FlaxRoFormerForTokenClassification.from_pretrained(<span class="hljs-string">&quot;junnyu/roformer_chinese_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=t("Example:"),h=m(),v(u.$$.fragment)},l(i){d=r(i,"P",{});var c=l(d);y=n(c,"Example:"),c.forEach(o),h=p(i),k(u.$$.fragment,i)},m(i,c){g(i,d,c),e(d,y),g(i,h,c),w(u,i,c),_=!0},p:Ze,i(i){_||(F(u.$$.fragment,i),_=!0)},o(i){M(u.$$.fragment,i),_=!1},d(i){i&&o(d),i&&o(h),$(u,i)}}}function jj(j){let d,y,h,u,_;return{c(){d=s("p"),y=t("Although the recipe for forward pass needs to be defined within this function, one should call the "),h=s("code"),u=t("Module"),_=t(`
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=r(i,"P",{});var c=l(d);y=n(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),h=r(c,"CODE",{});var J=l(h);u=n(J,"Module"),J.forEach(o),_=n(c,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),c.forEach(o)},m(i,c){g(i,d,c),e(d,y),e(d,h),e(h,u),e(d,_)},d(i){i&&o(d)}}}function Ej(j){let d,y,h,u,_;return u=new Ne({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBGbGF4Um9Gb3JtZXJGb3JRdWVzdGlvbkFuc3dlcmluZyUwQSUwQXRva2VuaXplciUyMCUzRCUyMEF1dG9Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMmp1bm55dSUyRnJvZm9ybWVyX2NoaW5lc2VfYmFzZSUyMiklMEFtb2RlbCUyMCUzRCUyMEZsYXhSb0Zvcm1lckZvclF1ZXN0aW9uQW5zd2VyaW5nLmZyb21fcHJldHJhaW5lZCglMjJqdW5ueXUlMkZyb2Zvcm1lcl9jaGluZXNlX2Jhc2UlMjIpJTBBJTBBcXVlc3Rpb24lMkMlMjB0ZXh0JTIwJTNEJTIwJTIyV2hvJTIwd2FzJTIwSmltJTIwSGVuc29uJTNGJTIyJTJDJTIwJTIySmltJTIwSGVuc29uJTIwd2FzJTIwYSUyMG5pY2UlMjBwdXBwZXQlMjIlMEFpbnB1dHMlMjAlM0QlMjB0b2tlbml6ZXIocXVlc3Rpb24lMkMlMjB0ZXh0JTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJqYXglMjIpJTBBJTBBb3V0cHV0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzKSUwQXN0YXJ0X3Njb3JlcyUyMCUzRCUyMG91dHB1dHMuc3RhcnRfbG9naXRzJTBBZW5kX3Njb3JlcyUyMCUzRCUyMG91dHB1dHMuZW5kX2xvZ2l0cw==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, FlaxRoFormerForQuestionAnswering

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;junnyu/roformer_chinese_base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = FlaxRoFormerForQuestionAnswering.from_pretrained(<span class="hljs-string">&quot;junnyu/roformer_chinese_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=t("Example:"),h=m(),v(u.$$.fragment)},l(i){d=r(i,"P",{});var c=l(d);y=n(c,"Example:"),c.forEach(o),h=p(i),k(u.$$.fragment,i)},m(i,c){g(i,d,c),e(d,y),g(i,h,c),w(u,i,c),_=!0},p:Ze,i(i){_||(F(u.$$.fragment,i),_=!0)},o(i){M(u.$$.fragment,i),_=!1},d(i){i&&o(d),i&&o(h),$(u,i)}}}function Jj(j){let d,y,h,u,_,i,c,J,ke,fe,q,ae,ee,R,we,P,Fe,ge,V,Me,le,Q,$e,_e,G,Re,ye,X,me,je,te,U,I,be,B,pe,Ee,L,se,Je,z,Ce,D,ie,Ue,O,Te,re,N,he,A,xe,oe,Z,ve,x,ue,de,T,E,Ae,K,Le,Qe,C,We,De,Oe,Ge,qe,W,H,Xe,Ve,Y,He,Be,ce,Ye,ne,ze,Fn,Ad,vr,hf,Gd,uf,ph,Uo,kr,ff,Mt,gf,Ri,_f,yf,wr,bf,Tf,vf,$t,kf,ji,wf,Ff,Ei,Mf,$f,Rf,Mn,hh,Rt,$n,Xd,Fr,jf,Bd,Ef,uh,Ke,Mr,Jf,$r,Cf,Rr,Uf,xf,zf,jr,If,Ji,Zf,Nf,Wf,Rn,qf,gt,Er,Vf,Sd,Af,Gf,Jr,Ci,Xf,Pd,Bf,Sf,Ui,Pf,Ld,Lf,Qf,jn,Cr,Df,Ur,Of,Qd,Hf,Yf,Kf,No,xr,eg,Dd,og,tg,En,ng,jt,sg,Od,rg,ag,Hd,lg,ig,dg,xi,zr,fh,Et,Jn,Yd,Ir,cg,Kd,mg,gh,lo,Zr,pg,Nr,hg,ec,ug,fg,gg,Cn,zi,_g,yg,Ii,bg,Tg,vg,Wr,kg,Zi,wg,Fg,Mg,Un,$g,_t,qr,Rg,oc,jg,Eg,Vr,Ni,Jg,tc,Cg,Ug,Wi,xg,nc,zg,_h,Jt,xn,sc,Ar,Ig,rc,Zg,yh,_o,Gr,Ng,Xr,Wg,Br,qg,Vg,Ag,Sr,Gg,Pr,Xg,Bg,Sg,io,Pg,ac,Lg,Qg,lc,Dg,Og,ic,Hg,Yg,dc,Kg,e_,cc,o_,t_,mc,n_,s_,r_,Wo,Lr,a_,Ct,l_,qi,i_,d_,pc,c_,m_,p_,zn,h_,In,bh,Ut,Zn,hc,Qr,u_,uc,f_,Th,lt,Dr,g_,xt,__,fc,y_,b_,Or,T_,v_,k_,qo,Hr,w_,zt,F_,Vi,M_,$_,gc,R_,j_,E_,Nn,J_,Wn,vh,It,qn,_c,Yr,C_,yc,U_,kh,it,Kr,x_,Zt,z_,bc,I_,Z_,ea,N_,W_,q_,Vo,oa,V_,Nt,A_,Ai,G_,X_,Tc,B_,S_,P_,Vn,L_,An,wh,Wt,Gn,vc,ta,Q_,kc,D_,Fh,xo,na,O_,wc,H_,Y_,sa,K_,ra,ey,oy,ty,To,aa,ny,qt,sy,Gi,ry,ay,Fc,ly,iy,dy,Xn,cy,Bn,my,Sn,Mh,Vt,Pn,Mc,la,py,$c,hy,$h,zo,ia,uy,Rc,fy,gy,da,_y,ca,yy,by,Ty,Ao,ma,vy,At,ky,Xi,wy,Fy,jc,My,$y,Ry,Ln,jy,Qn,Rh,Gt,Dn,Ec,pa,Ey,Jc,Jy,jh,Io,ha,Cy,Cc,Uy,xy,ua,zy,fa,Iy,Zy,Ny,Go,ga,Wy,Xt,qy,Bi,Vy,Ay,Uc,Gy,Xy,By,On,Sy,Hn,Eh,Bt,Yn,xc,_a,Py,zc,Ly,Jh,Zo,ya,Qy,St,Dy,Ic,Oy,Hy,Zc,Yy,Ky,eb,ba,ob,Ta,tb,nb,sb,Xo,va,rb,Pt,ab,Si,lb,ib,Nc,db,cb,mb,Kn,pb,es,Ch,Lt,os,Wc,ka,hb,qc,ub,Uh,co,wa,fb,Vc,gb,_b,Fa,yb,Pi,bb,Tb,vb,Ma,kb,$a,wb,Fb,Mb,ts,$b,Bo,Ra,Rb,Qt,jb,Li,Eb,Jb,Ac,Cb,Ub,xb,ns,zb,ss,xh,Dt,rs,Gc,ja,Ib,Xc,Zb,zh,mo,Ea,Nb,Ja,Wb,Bc,qb,Vb,Ab,Ca,Gb,Qi,Xb,Bb,Sb,Ua,Pb,xa,Lb,Qb,Db,as,Ob,vo,za,Hb,Ot,Yb,Di,Kb,eT,Sc,oT,tT,nT,ls,sT,is,rT,ds,Ih,Ht,cs,Pc,Ia,aT,Lc,lT,Zh,po,Za,iT,Na,dT,Qc,cT,mT,pT,Wa,hT,Oi,uT,fT,gT,qa,_T,Va,yT,bT,TT,ms,vT,yt,Aa,kT,yo,wT,Dc,FT,MT,Oc,$T,RT,Hc,jT,ET,Yc,JT,CT,Kc,UT,xT,zT,ps,Nh,Yt,hs,em,Ga,IT,om,ZT,Wh,ho,Xa,NT,tm,WT,qT,Ba,VT,Hi,AT,GT,XT,Sa,BT,Pa,ST,PT,LT,us,QT,ko,La,DT,Kt,OT,Yi,HT,YT,nm,KT,ev,ov,fs,tv,gs,nv,_s,qh,en,ys,sm,Qa,sv,rm,rv,Vh,uo,Da,av,am,lv,iv,Oa,dv,Ki,cv,mv,pv,Ha,hv,Ya,uv,fv,gv,bs,_v,So,Ka,yv,on,bv,ed,Tv,vv,lm,kv,wv,Fv,Ts,Mv,vs,Ah,tn,ks,im,el,$v,dm,Rv,Gh,fo,ol,jv,cm,Ev,Jv,tl,Cv,od,Uv,xv,zv,nl,Iv,sl,Zv,Nv,Wv,ws,qv,wo,rl,Vv,nn,Av,td,Gv,Xv,mm,Bv,Sv,Pv,Fs,Lv,Ms,Qv,$s,Xh,sn,Rs,pm,al,Dv,hm,Ov,Bh,go,ll,Hv,rn,Yv,um,Kv,ek,fm,ok,tk,nk,il,sk,nd,rk,ak,lk,dl,ik,cl,dk,ck,mk,js,pk,Fo,ml,hk,an,uk,sd,fk,gk,gm,_k,yk,bk,Es,Tk,Js,vk,Cs,Sh,ln,Us,_m,pl,kk,ym,wk,Ph,eo,hl,Fk,bm,Mk,$k,ul,Rk,rd,jk,Ek,Jk,fl,Ck,gl,Uk,xk,zk,Tm,Ik,Zk,dt,vm,_l,Nk,Wk,km,yl,qk,Vk,wm,bl,Ak,Gk,Fm,Tl,Xk,Bk,Po,vl,Sk,dn,Pk,Mm,Lk,Qk,$m,Dk,Ok,Hk,xs,Yk,zs,Lh,cn,Is,Rm,kl,Kk,jm,ew,Qh,oo,wl,ow,Fl,tw,Em,nw,sw,rw,Ml,aw,ad,lw,iw,dw,$l,cw,Rl,mw,pw,hw,Jm,uw,fw,ct,Cm,jl,gw,_w,Um,El,yw,bw,xm,Jl,Tw,vw,zm,Cl,kw,ww,Lo,Ul,Fw,mn,Mw,Im,$w,Rw,Zm,jw,Ew,Jw,Zs,Cw,Ns,Dh,pn,Ws,Nm,xl,Uw,Wm,xw,Oh,to,zl,zw,qm,Iw,Zw,Il,Nw,ld,Ww,qw,Vw,Zl,Aw,Nl,Gw,Xw,Bw,Vm,Sw,Pw,mt,Am,Wl,Lw,Qw,Gm,ql,Dw,Ow,Xm,Vl,Hw,Yw,Bm,Al,Kw,eF,Qo,Gl,oF,hn,tF,Sm,nF,sF,Pm,rF,aF,lF,qs,iF,Vs,Hh,un,As,Lm,Xl,dF,Qm,cF,Yh,no,Bl,mF,Dm,pF,hF,Sl,uF,id,fF,gF,_F,Pl,yF,Ll,bF,TF,vF,Om,kF,wF,pt,Hm,Ql,FF,MF,Ym,Dl,$F,RF,Km,Ol,jF,EF,ep,Hl,JF,CF,Do,Yl,UF,fn,xF,op,zF,IF,tp,ZF,NF,WF,Gs,qF,Xs,Kh,gn,Bs,np,Kl,VF,sp,AF,eu,so,ei,GF,rp,XF,BF,oi,SF,dd,PF,LF,QF,ti,DF,ni,OF,HF,YF,ap,KF,eM,ht,lp,si,oM,tM,ip,ri,nM,sM,dp,ai,rM,aM,cp,li,lM,iM,Oo,ii,dM,_n,cM,mp,mM,pM,pp,hM,uM,fM,Ss,gM,Ps,ou,yn,Ls,hp,di,_M,up,yM,tu,ro,ci,bM,bn,TM,fp,vM,kM,gp,wM,FM,MM,mi,$M,cd,RM,jM,EM,pi,JM,hi,CM,UM,xM,_p,zM,IM,ut,yp,ui,ZM,NM,bp,fi,WM,qM,Tp,gi,VM,AM,vp,_i,GM,XM,Ho,yi,BM,Tn,SM,kp,PM,LM,wp,QM,DM,OM,Qs,HM,Ds,nu;return i=new Pe({}),R=new Pe({}),A=new Pe({}),vr=new Pe({}),kr=new S({props:{name:"class transformers.RoFormerConfig",anchor:"transformers.RoFormerConfig",parameters:[{name:"vocab_size",val:" = 50000"},{name:"embedding_size",val:" = None"},{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:" = 1536"},{name:"type_vocab_size",val:" = 2"},{name:"initializer_range",val:" = 0.02"},{name:"layer_norm_eps",val:" = 1e-12"},{name:"pad_token_id",val:" = 0"},{name:"rotary_value",val:" = False"},{name:"use_cache",val:" = True"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.RoFormerConfig.vocab_size",description:`<strong>vocab_size</strong> (<code>int</code>, <em>optional</em>, defaults to 50000) &#x2014;
Vocabulary size of the RoFormer model. Defines the number of different tokens that can be represented by
the <code>inputs_ids</code> passed when calling <a href="/docs/transformers/main/en/model_doc/roformer#transformers.RoFormerModel">RoFormerModel</a> or <a href="/docs/transformers/main/en/model_doc/roformer#transformers.TFRoFormerModel">TFRoFormerModel</a>.`,name:"vocab_size"},{anchor:"transformers.RoFormerConfig.embedding_size",description:`<strong>embedding_size</strong> (<code>int</code>, <em>optional</em>, defaults to None) &#x2014;
Dimensionality of the encoder layers and the pooler layer. Defaults to the <code>hidden_size</code> if not provided.`,name:"embedding_size"},{anchor:"transformers.RoFormerConfig.hidden_size",description:`<strong>hidden_size</strong> (<code>int</code>, <em>optional</em>, defaults to 768) &#x2014;
Dimension of the encoder layers and the pooler layer.`,name:"hidden_size"},{anchor:"transformers.RoFormerConfig.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.RoFormerConfig.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.RoFormerConfig.intermediate_size",description:`<strong>intermediate_size</strong> (<code>int</code>, <em>optional</em>, defaults to 3072) &#x2014;
Dimension of the &#x201C;intermediate&#x201D; (i.e., feed-forward) layer in the Transformer encoder.`,name:"intermediate_size"},{anchor:"transformers.RoFormerConfig.hidden_act",description:`<strong>hidden_act</strong> (<code>str</code> or <code>function</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;selu&quot;</code> and <code>&quot;gelu_new&quot;</code> are supported.`,name:"hidden_act"},{anchor:"transformers.RoFormerConfig.hidden_dropout_prob",description:`<strong>hidden_dropout_prob</strong> (<code>float</code>, <em>optional</em>, defaults to 0.1) &#x2014;
The dropout probabilitiy for all fully connected layers in the embeddings, encoder, and pooler.`,name:"hidden_dropout_prob"},{anchor:"transformers.RoFormerConfig.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.RoFormerConfig.max_position_embeddings",description:`<strong>max_position_embeddings</strong> (<code>int</code>, <em>optional</em>, defaults to 1536) &#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 1536).`,name:"max_position_embeddings"},{anchor:"transformers.RoFormerConfig.type_vocab_size",description:`<strong>type_vocab_size</strong> (<code>int</code>, <em>optional</em>, defaults to 2) &#x2014;
The vocabulary size of the <code>token_type_ids</code> passed when calling <a href="/docs/transformers/main/en/model_doc/roformer#transformers.RoFormerModel">RoFormerModel</a> or <a href="/docs/transformers/main/en/model_doc/roformer#transformers.TFRoFormerModel">TFRoFormerModel</a>.`,name:"type_vocab_size"},{anchor:"transformers.RoFormerConfig.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.RoFormerConfig.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.RoFormerConfig.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.RoFormerConfig.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.RoFormerConfig.rotary_value",description:`<strong>rotary_value</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not apply rotary position embeddings on value layer.`,name:"rotary_value"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/roformer/configuration_roformer.py#L46"}}),Mn=new Ie({props:{anchor:"transformers.RoFormerConfig.example",$$slots:{default:[ER]},$$scope:{ctx:j}}}),Fr=new Pe({}),Mr=new S({props:{name:"class transformers.RoFormerTokenizer",anchor:"transformers.RoFormerTokenizer",parameters:[{name:"vocab_file",val:""},{name:"do_lower_case",val:" = True"},{name:"do_basic_tokenize",val:" = True"},{name:"never_split",val:" = None"},{name:"unk_token",val:" = '[UNK]'"},{name:"sep_token",val:" = '[SEP]'"},{name:"pad_token",val:" = '[PAD]'"},{name:"cls_token",val:" = '[CLS]'"},{name:"mask_token",val:" = '[MASK]'"},{name:"tokenize_chinese_chars",val:" = True"},{name:"strip_accents",val:" = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.RoFormerTokenizer.vocab_file",description:`<strong>vocab_file</strong> (<code>str</code>) &#x2014;
File containing the vocabulary.`,name:"vocab_file"},{anchor:"transformers.RoFormerTokenizer.do_lower_case",description:`<strong>do_lower_case</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to lowercase the input when tokenizing.`,name:"do_lower_case"},{anchor:"transformers.RoFormerTokenizer.do_basic_tokenize",description:`<strong>do_basic_tokenize</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to do basic tokenization before WordPiece.`,name:"do_basic_tokenize"},{anchor:"transformers.RoFormerTokenizer.never_split",description:`<strong>never_split</strong> (<code>Iterable</code>, <em>optional</em>) &#x2014;
Collection of tokens which will never be split during tokenization. Only has an effect when
<code>do_basic_tokenize=True</code>`,name:"never_split"},{anchor:"transformers.RoFormerTokenizer.unk_token",description:`<strong>unk_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;[UNK]&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.RoFormerTokenizer.sep_token",description:`<strong>sep_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;[SEP]&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.RoFormerTokenizer.pad_token",description:`<strong>pad_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;[PAD]&quot;</code>) &#x2014;
The token used for padding, for example when batching sequences of different lengths.`,name:"pad_token"},{anchor:"transformers.RoFormerTokenizer.cls_token",description:`<strong>cls_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;[CLS]&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.RoFormerTokenizer.mask_token",description:`<strong>mask_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;[MASK]&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.RoFormerTokenizer.tokenize_chinese_chars",description:`<strong>tokenize_chinese_chars</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to tokenize Chinese characters.</p>
<p>This should likely be deactivated for Japanese (see this
<a href="https://github.com/huggingface/transformers/issues/328" rel="nofollow">issue</a>).`,name:"tokenize_chinese_chars"},{anchor:"transformers.RoFormerTokenizer.strip_accents",description:`<strong>strip_accents</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to strip all accents. If this option is not specified, then it will be determined by the
value for <code>lowercase</code> (as in the original BERT).`,name:"strip_accents"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/roformer/tokenization_roformer.py#L311"}}),Rn=new Ie({props:{anchor:"transformers.RoFormerTokenizer.example",$$slots:{default:[JR]},$$scope:{ctx:j}}}),Er=new S({props:{name:"build_inputs_with_special_tokens",anchor:"transformers.RoFormerTokenizer.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.RoFormerTokenizer.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.RoFormerTokenizer.build_inputs_with_special_tokens.token_ids_1",description:`<strong>token_ids_1</strong> (<code>List[int]</code>, <em>optional</em>) &#x2014;
Optional second list of IDs for sequence pairs.`,name:"token_ids_1"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/roformer/tokenization_roformer.py#L477",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>
`}}),Cr=new S({props:{name:"get_special_tokens_mask",anchor:"transformers.RoFormerTokenizer.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.RoFormerTokenizer.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.RoFormerTokenizer.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.RoFormerTokenizer.get_special_tokens_mask.already_has_special_tokens",description:`<strong>already_has_special_tokens</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not the token list is already formatted with special tokens for the model.`,name:"already_has_special_tokens"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/roformer/tokenization_roformer.py#L502",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>
`}}),xr=new S({props:{name:"create_token_type_ids_from_sequences",anchor:"transformers.RoFormerTokenizer.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.RoFormerTokenizer.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.RoFormerTokenizer.create_token_type_ids_from_sequences.token_ids_1",description:`<strong>token_ids_1</strong> (<code>List[int]</code>, <em>optional</em>) &#x2014;
Optional second list of IDs for sequence pairs.`,name:"token_ids_1"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/roformer/tokenization_roformer.py#L530",returnDescription:`
<p>List of <a href="../glossary#token-type-ids">token type IDs</a> according to the given sequence(s).</p>
`,returnType:`
<p><code>List[int]</code></p>
`}}),En=new Ie({props:{anchor:"transformers.RoFormerTokenizer.create_token_type_ids_from_sequences.example",$$slots:{default:[CR]},$$scope:{ctx:j}}}),zr=new S({props:{name:"save_vocabulary",anchor:"transformers.RoFormerTokenizer.save_vocabulary",parameters:[{name:"save_directory",val:": str"},{name:"filename_prefix",val:": typing.Optional[str] = None"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/roformer/tokenization_roformer.py#L559"}}),Ir=new Pe({}),Zr=new S({props:{name:"class transformers.RoFormerTokenizerFast",anchor:"transformers.RoFormerTokenizerFast",parameters:[{name:"vocab_file",val:" = None"},{name:"tokenizer_file",val:" = None"},{name:"do_lower_case",val:" = True"},{name:"unk_token",val:" = '[UNK]'"},{name:"sep_token",val:" = '[SEP]'"},{name:"pad_token",val:" = '[PAD]'"},{name:"cls_token",val:" = '[CLS]'"},{name:"mask_token",val:" = '[MASK]'"},{name:"tokenize_chinese_chars",val:" = True"},{name:"strip_accents",val:" = None"},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/roformer/tokenization_roformer_fast.py#L71"}}),Un=new Ie({props:{anchor:"transformers.RoFormerTokenizerFast.example",$$slots:{default:[UR]},$$scope:{ctx:j}}}),qr=new S({props:{name:"build_inputs_with_special_tokens",anchor:"transformers.RoFormerTokenizerFast.build_inputs_with_special_tokens",parameters:[{name:"token_ids_0",val:""},{name:"token_ids_1",val:" = None"}],parametersDescription:[{anchor:"transformers.RoFormerTokenizerFast.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.RoFormerTokenizerFast.build_inputs_with_special_tokens.token_ids_1",description:`<strong>token_ids_1</strong> (<code>List[int]</code>, <em>optional</em>) &#x2014;
Optional second list of IDs for sequence pairs.`,name:"token_ids_1"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/roformer/tokenization_roformer_fast.py#L147",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>
`}}),Ar=new Pe({}),Gr=new S({props:{name:"class transformers.RoFormerModel",anchor:"transformers.RoFormerModel",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.RoFormerModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/roformer#transformers.RoFormerConfig">RoFormerConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/roformer/modeling_roformer.py#L783"}}),Lr=new S({props:{name:"forward",anchor:"transformers.RoFormerModel.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:"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:"past_key_values",val:": typing.Optional[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.RoFormerModel.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/model_doc/perceiver#transformers.PerceiverTokenizer.__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.RoFormerModel.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.RoFormerModel.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.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.RoFormerModel.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.RoFormerModel.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 <em>input_ids</em> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.RoFormerModel.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.RoFormerModel.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.RoFormerModel.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.RoFormerModel.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.RoFormerModel.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.RoFormerModel.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.
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.RoFormerModel.forward.use_cache",description:`<strong>use_cache</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
If set to <code>True</code>, <code>past_key_values</code> key value states are returned and can be used to speed up decoding (see
<code>past_key_values</code>).`,name:"use_cache"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/roformer/modeling_roformer.py#L823",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.BaseModelOutputWithPastAndCrossAttentions"
>transformers.modeling_outputs.BaseModelOutputWithPastAndCrossAttentions</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/main/en/model_doc/roformer#transformers.RoFormerConfig"
>RoFormerConfig</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>
<p>If <code>past_key_values</code> is used only the last hidden-state of the sequences of shape <code>(batch_size, 1, hidden_size)</code> is output.</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>
<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>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.BaseModelOutputWithPastAndCrossAttentions"
>transformers.modeling_outputs.BaseModelOutputWithPastAndCrossAttentions</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),zn=new Se({props:{$$slots:{default:[xR]},$$scope:{ctx:j}}}),In=new Ie({props:{anchor:"transformers.RoFormerModel.forward.example",$$slots:{default:[zR]},$$scope:{ctx:j}}}),Qr=new Pe({}),Dr=new S({props:{name:"class transformers.RoFormerForCausalLM",anchor:"transformers.RoFormerForCausalLM",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.RoFormerForCausalLM.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/roformer#transformers.RoFormerConfig">RoFormerConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/roformer/modeling_roformer.py#L1052"}}),Hr=new S({props:{name:"forward",anchor:"transformers.RoFormerForCausalLM.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:"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:"head_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"cross_attn_head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"past_key_values",val:": typing.Optional[typing.Tuple[typing.Tuple[torch.FloatTensor]]] = None"},{name:"labels",val:": typing.Optional[torch.LongTensor] = 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.RoFormerForCausalLM.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/model_doc/perceiver#transformers.PerceiverTokenizer.__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.RoFormerForCausalLM.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.RoFormerForCausalLM.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.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.RoFormerForCausalLM.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.RoFormerForCausalLM.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 <em>input_ids</em> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.RoFormerForCausalLM.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.RoFormerForCausalLM.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.RoFormerForCausalLM.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.RoFormerForCausalLM.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.RoFormerForCausalLM.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.RoFormerForCausalLM.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.
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.RoFormerForCausalLM.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 n <code>[0, ..., config.vocab_size]</code>.`,name:"labels"},{anchor:"transformers.RoFormerForCausalLM.forward.use_cache",description:`<strong>use_cache</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
If set to <code>True</code>, <code>past_key_values</code> key value states are returned and can be used to speed up decoding (see
<code>past_key_values</code>).`,name:"use_cache"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/roformer/modeling_roformer.py#L1073",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.CausalLMOutputWithCrossAttentions"
>transformers.modeling_outputs.CausalLMOutputWithCrossAttentions</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/main/en/model_doc/roformer#transformers.RoFormerConfig"
>RoFormerConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Language modeling loss (for next-token prediction).</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, config.vocab_size)</code>) \u2014 Prediction scores of the language modeling head (scores for each vocabulary token before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
<li>
<p><strong>cross_attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Cross attentions weights after the attention softmax, used to compute the weighted average in the
cross-attention heads.</p>
</li>
<li>
<p><strong>past_key_values</strong> (<code>tuple(tuple(torch.FloatTensor))</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> tuples of length <code>config.n_layers</code>, with each tuple containing the cached key,
value states of the self-attention and the cross-attention layers if model is used in encoder-decoder
setting. Only relevant if <code>config.is_decoder = True</code>.</p>
<p>Contains pre-computed hidden-states (key and values in the attention blocks) that can be used (see
<code>past_key_values</code> input) to speed up sequential decoding.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.CausalLMOutputWithCrossAttentions"
>transformers.modeling_outputs.CausalLMOutputWithCrossAttentions</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Nn=new Se({props:{$$slots:{default:[IR]},$$scope:{ctx:j}}}),Wn=new Ie({props:{anchor:"transformers.RoFormerForCausalLM.forward.example",$$slots:{default:[ZR]},$$scope:{ctx:j}}}),Yr=new Pe({}),Kr=new S({props:{name:"class transformers.RoFormerForMaskedLM",anchor:"transformers.RoFormerForMaskedLM",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.RoFormerForMaskedLM.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/roformer#transformers.RoFormerConfig">RoFormerConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/roformer/modeling_roformer.py#L950"}}),oa=new S({props:{name:"forward",anchor:"transformers.RoFormerForMaskedLM.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:"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.RoFormerForMaskedLM.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/model_doc/perceiver#transformers.PerceiverTokenizer.__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.RoFormerForMaskedLM.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.RoFormerForMaskedLM.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.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.RoFormerForMaskedLM.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.RoFormerForMaskedLM.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 <em>input_ids</em> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.RoFormerForMaskedLM.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.RoFormerForMaskedLM.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.RoFormerForMaskedLM.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.RoFormerForMaskedLM.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"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/roformer/modeling_roformer.py#L974",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.MaskedLMOutput"
>transformers.modeling_outputs.MaskedLMOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/main/en/model_doc/roformer#transformers.RoFormerConfig"
>RoFormerConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Masked language modeling (MLM) loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, config.vocab_size)</code>) \u2014 Prediction scores of the language modeling head (scores for each vocabulary token before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.MaskedLMOutput"
>transformers.modeling_outputs.MaskedLMOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Vn=new Se({props:{$$slots:{default:[NR]},$$scope:{ctx:j}}}),An=new Ie({props:{anchor:"transformers.RoFormerForMaskedLM.forward.example",$$slots:{default:[WR]},$$scope:{ctx:j}}}),ta=new Pe({}),na=new S({props:{name:"class transformers.RoFormerForSequenceClassification",anchor:"transformers.RoFormerForSequenceClassification",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.RoFormerForSequenceClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/roformer#transformers.RoFormerConfig">RoFormerConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/roformer/modeling_roformer.py#L1224"}}),aa=new S({props:{name:"forward",anchor:"transformers.RoFormerForSequenceClassification.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:"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.RoFormerForSequenceClassification.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/model_doc/perceiver#transformers.PerceiverTokenizer.__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.RoFormerForSequenceClassification.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.RoFormerForSequenceClassification.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.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.RoFormerForSequenceClassification.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.RoFormerForSequenceClassification.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 <em>input_ids</em> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.RoFormerForSequenceClassification.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.RoFormerForSequenceClassification.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.RoFormerForSequenceClassification.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.RoFormerForSequenceClassification.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for computing the sequence classification/regression loss. Indices should be in <code>[0, ..., config.num_labels - 1]</code>. If <code>config.num_labels == 1</code> a regression loss is computed (Mean-Square loss), If
<code>config.num_labels &gt; 1</code> a classification loss is computed (Cross-Entropy).`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/roformer/modeling_roformer.py#L1234",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.SequenceClassifierOutput"
>transformers.modeling_outputs.SequenceClassifierOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/main/en/model_doc/roformer#transformers.RoFormerConfig"
>RoFormerConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Classification (or regression if config.num_labels==1) loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, config.num_labels)</code>) \u2014 Classification (or regression if config.num_labels==1) scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.SequenceClassifierOutput"
>transformers.modeling_outputs.SequenceClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Xn=new Se({props:{$$slots:{default:[qR]},$$scope:{ctx:j}}}),Bn=new Ie({props:{anchor:"transformers.RoFormerForSequenceClassification.forward.example",$$slots:{default:[VR]},$$scope:{ctx:j}}}),Sn=new Ie({props:{anchor:"transformers.RoFormerForSequenceClassification.forward.example-2",$$slots:{default:[AR]},$$scope:{ctx:j}}}),la=new Pe({}),ia=new S({props:{name:"class transformers.RoFormerForMultipleChoice",anchor:"transformers.RoFormerForMultipleChoice",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.RoFormerForMultipleChoice.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/roformer#transformers.RoFormerConfig">RoFormerConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/roformer/modeling_roformer.py#L1315"}}),ma=new S({props:{name:"forward",anchor:"transformers.RoFormerForMultipleChoice.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:"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.RoFormerForMultipleChoice.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, num_choices, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/model_doc/perceiver#transformers.PerceiverTokenizer.__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.RoFormerForMultipleChoice.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.RoFormerForMultipleChoice.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.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.RoFormerForMultipleChoice.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.RoFormerForMultipleChoice.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 <em>input_ids</em> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.RoFormerForMultipleChoice.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.RoFormerForMultipleChoice.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.RoFormerForMultipleChoice.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.RoFormerForMultipleChoice.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for computing the multiple choice classification loss. Indices should be in <code>[0, ..., num_choices-1]</code> where <code>num_choices</code> is the size of the second dimension of the input tensors. (See
<code>input_ids</code> above)`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/roformer/modeling_roformer.py#L1326",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.MultipleChoiceModelOutput"
>transformers.modeling_outputs.MultipleChoiceModelOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/main/en/model_doc/roformer#transformers.RoFormerConfig"
>RoFormerConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <em>(1,)</em>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Classification loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_choices)</code>) \u2014 <em>num_choices</em> is the second dimension of the input tensors. (see <em>input_ids</em> above).</p>
<p>Classification scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.MultipleChoiceModelOutput"
>transformers.modeling_outputs.MultipleChoiceModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Ln=new Se({props:{$$slots:{default:[GR]},$$scope:{ctx:j}}}),Qn=new Ie({props:{anchor:"transformers.RoFormerForMultipleChoice.forward.example",$$slots:{default:[XR]},$$scope:{ctx:j}}}),pa=new Pe({}),ha=new S({props:{name:"class transformers.RoFormerForTokenClassification",anchor:"transformers.RoFormerForTokenClassification",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.RoFormerForTokenClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/roformer#transformers.RoFormerConfig">RoFormerConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/roformer/modeling_roformer.py#L1406"}}),ga=new S({props:{name:"forward",anchor:"transformers.RoFormerForTokenClassification.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:"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.RoFormerForTokenClassification.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/model_doc/perceiver#transformers.PerceiverTokenizer.__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.RoFormerForTokenClassification.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.RoFormerForTokenClassification.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.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.RoFormerForTokenClassification.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.RoFormerForTokenClassification.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 <em>input_ids</em> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.RoFormerForTokenClassification.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.RoFormerForTokenClassification.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.RoFormerForTokenClassification.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.RoFormerForTokenClassification.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Labels for computing the token classification loss. Indices should be in <code>[0, ..., config.num_labels - 1]</code>.`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/roformer/modeling_roformer.py#L1418",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.TokenClassifierOutput"
>transformers.modeling_outputs.TokenClassifierOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/main/en/model_doc/roformer#transformers.RoFormerConfig"
>RoFormerConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided)  \u2014 Classification loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, config.num_labels)</code>) \u2014 Classification scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.TokenClassifierOutput"
>transformers.modeling_outputs.TokenClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),On=new Se({props:{$$slots:{default:[BR]},$$scope:{ctx:j}}}),Hn=new Ie({props:{anchor:"transformers.RoFormerForTokenClassification.forward.example",$$slots:{default:[SR]},$$scope:{ctx:j}}}),_a=new Pe({}),ya=new S({props:{name:"class transformers.RoFormerForQuestionAnswering",anchor:"transformers.RoFormerForQuestionAnswering",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.RoFormerForQuestionAnswering.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/roformer#transformers.RoFormerConfig">RoFormerConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/roformer/modeling_roformer.py#L1482"}}),va=new S({props:{name:"forward",anchor:"transformers.RoFormerForQuestionAnswering.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:"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.RoFormerForQuestionAnswering.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/model_doc/perceiver#transformers.PerceiverTokenizer.__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.RoFormerForQuestionAnswering.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.RoFormerForQuestionAnswering.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.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.RoFormerForQuestionAnswering.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.RoFormerForQuestionAnswering.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 <em>input_ids</em> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.RoFormerForQuestionAnswering.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.RoFormerForQuestionAnswering.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.RoFormerForQuestionAnswering.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.RoFormerForQuestionAnswering.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.RoFormerForQuestionAnswering.forward.end_positions",description:`<strong>end_positions</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for position (index) of the end of the labelled span for computing the token classification loss.
Positions are clamped to the length of the sequence (<code>sequence_length</code>). Position outside of the sequence
are not taken into account for computing the loss.`,name:"end_positions"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/roformer/modeling_roformer.py#L1495",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.QuestionAnsweringModelOutput"
>transformers.modeling_outputs.QuestionAnsweringModelOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/main/en/model_doc/roformer#transformers.RoFormerConfig"
>RoFormerConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Total span extraction loss is the sum of a Cross-Entropy for the start and end positions.</p>
</li>
<li>
<p><strong>start_logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>) \u2014 Span-start scores (before SoftMax).</p>
</li>
<li>
<p><strong>end_logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>) \u2014 Span-end scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.QuestionAnsweringModelOutput"
>transformers.modeling_outputs.QuestionAnsweringModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Kn=new Se({props:{$$slots:{default:[PR]},$$scope:{ctx:j}}}),es=new Ie({props:{anchor:"transformers.RoFormerForQuestionAnswering.forward.example",$$slots:{default:[LR]},$$scope:{ctx:j}}}),ka=new Pe({}),wa=new S({props:{name:"class transformers.TFRoFormerModel",anchor:"transformers.TFRoFormerModel",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFRoFormerModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/roformer#transformers.RoFormerConfig">RoFormerConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/roformer/modeling_tf_roformer.py#L798"}}),ts=new Se({props:{$$slots:{default:[QR]},$$scope:{ctx:j}}}),Ra=new S({props:{name:"call",anchor:"transformers.TFRoFormerModel.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:"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:"training",val:": Optional[bool] = False"}],parametersDescription:[{anchor:"transformers.TFRoFormerModel.call.input_ids",description:`<strong>input_ids</strong> (<code>np.ndarray</code>, <code>tf.Tensor</code>, <code>List[tf.Tensor]</code> \`<code>Dict[str, tf.Tensor]</code> or <code>Dict[str, np.ndarray]</code> and each example must have the shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/model_doc/perceiver#transformers.PerceiverTokenizer.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.TFRoFormerModel.call.attention_mask",description:`<strong>attention_mask</strong> (<code>np.ndarray</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.TFRoFormerModel.call.token_type_ids",description:`<strong>token_type_ids</strong> (<code>np.ndarray</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.TFRoFormerModel.call.head_mask",description:`<strong>head_mask</strong> (<code>np.ndarray</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.TFRoFormerModel.call.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>np.ndarray</code> or <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.TFRoFormerModel.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.TFRoFormerModel.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.TFRoFormerModel.call.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.TFRoFormerModel.call.training",description:`<strong>training</strong> (<code>bool</code>, <em>optional</em>, defaults to \`False&#x201C;) &#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"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/roformer/modeling_tf_roformer.py#L804",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_tf_outputs.TFBaseModelOutputWithPooling"
>transformers.modeling_tf_outputs.TFBaseModelOutputWithPooling</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/main/en/model_doc/roformer#transformers.RoFormerConfig"
>RoFormerConfig</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>hidden_states</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_tf_outputs.TFBaseModelOutputWithPooling"
>transformers.modeling_tf_outputs.TFBaseModelOutputWithPooling</a> or <code>tuple(tf.Tensor)</code></p>
`}}),ns=new Se({props:{$$slots:{default:[DR]},$$scope:{ctx:j}}}),ss=new Ie({props:{anchor:"transformers.TFRoFormerModel.call.example",$$slots:{default:[OR]},$$scope:{ctx:j}}}),ja=new Pe({}),Ea=new S({props:{name:"class transformers.TFRoFormerForMaskedLM",anchor:"transformers.TFRoFormerForMaskedLM",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFRoFormerForMaskedLM.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/roformer#transformers.RoFormerConfig">RoFormerConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/roformer/modeling_tf_roformer.py#L839"}}),as=new Se({props:{$$slots:{default:[HR]},$$scope:{ctx:j}}}),za=new S({props:{name:"call",anchor:"transformers.TFRoFormerForMaskedLM.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:"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.TFRoFormerForMaskedLM.call.input_ids",description:`<strong>input_ids</strong> (<code>np.ndarray</code>, <code>tf.Tensor</code>, <code>List[tf.Tensor]</code> \`<code>Dict[str, tf.Tensor]</code> or <code>Dict[str, np.ndarray]</code> and each example must have the shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/model_doc/perceiver#transformers.PerceiverTokenizer.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.TFRoFormerForMaskedLM.call.attention_mask",description:`<strong>attention_mask</strong> (<code>np.ndarray</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.TFRoFormerForMaskedLM.call.token_type_ids",description:`<strong>token_type_ids</strong> (<code>np.ndarray</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.TFRoFormerForMaskedLM.call.head_mask",description:`<strong>head_mask</strong> (<code>np.ndarray</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.TFRoFormerForMaskedLM.call.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>np.ndarray</code> or <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.TFRoFormerForMaskedLM.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.TFRoFormerForMaskedLM.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.TFRoFormerForMaskedLM.call.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.TFRoFormerForMaskedLM.call.training",description:`<strong>training</strong> (<code>bool</code>, <em>optional</em>, defaults to \`False&#x201C;) &#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.TFRoFormerForMaskedLM.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 masked language modeling loss. Indices should be in <code>[-100, 0, ..., config.vocab_size]</code> (see <code>input_ids</code> docstring) Tokens with indices set to <code>-100</code> are ignored (masked), the
loss is only computed for the tokens with labels in <code>[0, ..., config.vocab_size]</code>`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/roformer/modeling_tf_roformer.py#L855",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_tf_outputs.TFMaskedLMOutput"
>transformers.modeling_tf_outputs.TFMaskedLMOutput</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/main/en/model_doc/roformer#transformers.RoFormerConfig"
>RoFormerConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>tf.Tensor</code> of shape <code>(n,)</code>, <em>optional</em>, where n is the number of non-masked labels, returned when <code>labels</code> is provided) \u2014 Masked language modeling (MLM) loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, config.vocab_size)</code>) \u2014 Prediction scores of the language modeling head (scores for each vocabulary token before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_tf_outputs.TFMaskedLMOutput"
>transformers.modeling_tf_outputs.TFMaskedLMOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),ls=new Se({props:{$$slots:{default:[YR]},$$scope:{ctx:j}}}),is=new Ie({props:{anchor:"transformers.TFRoFormerForMaskedLM.call.example",$$slots:{default:[KR]},$$scope:{ctx:j}}}),ds=new Ie({props:{anchor:"transformers.TFRoFormerForMaskedLM.call.example-2",$$slots:{default:[ej]},$$scope:{ctx:j}}}),Ia=new Pe({}),Za=new S({props:{name:"class transformers.TFRoFormerForCausalLM",anchor:"transformers.TFRoFormerForCausalLM",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFRoFormerForCausalLM.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/roformer#transformers.RoFormerConfig">RoFormerConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/roformer/modeling_tf_roformer.py#L911"}}),ms=new Se({props:{$$slots:{default:[oj]},$$scope:{ctx:j}}}),Aa=new S({props:{name:"call",anchor:"transformers.TFRoFormerForCausalLM.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:"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"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/roformer/modeling_tf_roformer.py#L924",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_tf_outputs.TFCausalLMOutput"
>transformers.modeling_tf_outputs.TFCausalLMOutput</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/main/en/model_doc/roformer#transformers.RoFormerConfig"
>RoFormerConfig</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>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_tf_outputs.TFCausalLMOutput"
>transformers.modeling_tf_outputs.TFCausalLMOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),ps=new Ie({props:{anchor:"transformers.TFRoFormerForCausalLM.call.example",$$slots:{default:[tj]},$$scope:{ctx:j}}}),Ga=new Pe({}),Xa=new S({props:{name:"class transformers.TFRoFormerForSequenceClassification",anchor:"transformers.TFRoFormerForSequenceClassification",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFRoFormerForSequenceClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/roformer#transformers.RoFormerConfig">RoFormerConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/roformer/modeling_tf_roformer.py#L1017"}}),us=new Se({props:{$$slots:{default:[nj]},$$scope:{ctx:j}}}),La=new S({props:{name:"call",anchor:"transformers.TFRoFormerForSequenceClassification.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:"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.TFRoFormerForSequenceClassification.call.input_ids",description:`<strong>input_ids</strong> (<code>np.ndarray</code>, <code>tf.Tensor</code>, <code>List[tf.Tensor]</code> \`<code>Dict[str, tf.Tensor]</code> or <code>Dict[str, np.ndarray]</code> and each example must have the shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/model_doc/perceiver#transformers.PerceiverTokenizer.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.TFRoFormerForSequenceClassification.call.attention_mask",description:`<strong>attention_mask</strong> (<code>np.ndarray</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.TFRoFormerForSequenceClassification.call.token_type_ids",description:`<strong>token_type_ids</strong> (<code>np.ndarray</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.TFRoFormerForSequenceClassification.call.head_mask",description:`<strong>head_mask</strong> (<code>np.ndarray</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.TFRoFormerForSequenceClassification.call.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>np.ndarray</code> or <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.TFRoFormerForSequenceClassification.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.TFRoFormerForSequenceClassification.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.TFRoFormerForSequenceClassification.call.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.TFRoFormerForSequenceClassification.call.training",description:`<strong>training</strong> (<code>bool</code>, <em>optional</em>, defaults to \`False&#x201C;) &#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.TFRoFormerForSequenceClassification.call.labels",description:`<strong>labels</strong> (<code>tf.Tensor</code> or <code>np.ndarray</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for computing the sequence classification/regression loss. Indices should be in <code>[0, ..., config.num_labels - 1]</code>. If <code>config.num_labels == 1</code> a regression loss is computed (Mean-Square loss), If
<code>config.num_labels &gt; 1</code> a classification loss is computed (Cross-Entropy).`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/roformer/modeling_tf_roformer.py#L1026",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_tf_outputs.TFSequenceClassifierOutput"
>transformers.modeling_tf_outputs.TFSequenceClassifierOutput</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/main/en/model_doc/roformer#transformers.RoFormerConfig"
>RoFormerConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, )</code>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Classification (or regression if config.num_labels==1) loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, config.num_labels)</code>) \u2014 Classification (or regression if config.num_labels==1) scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_tf_outputs.TFSequenceClassifierOutput"
>transformers.modeling_tf_outputs.TFSequenceClassifierOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),fs=new Se({props:{$$slots:{default:[sj]},$$scope:{ctx:j}}}),gs=new Ie({props:{anchor:"transformers.TFRoFormerForSequenceClassification.call.example",$$slots:{default:[rj]},$$scope:{ctx:j}}}),_s=new Ie({props:{anchor:"transformers.TFRoFormerForSequenceClassification.call.example-2",$$slots:{default:[aj]},$$scope:{ctx:j}}}),Qa=new Pe({}),Da=new S({props:{name:"class transformers.TFRoFormerForMultipleChoice",anchor:"transformers.TFRoFormerForMultipleChoice",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFRoFormerForMultipleChoice.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/roformer#transformers.RoFormerConfig">RoFormerConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/roformer/modeling_tf_roformer.py#L1086"}}),bs=new Se({props:{$$slots:{default:[lj]},$$scope:{ctx:j}}}),Ka=new S({props:{name:"call",anchor:"transformers.TFRoFormerForMultipleChoice.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:"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.TFRoFormerForMultipleChoice.call.input_ids",description:`<strong>input_ids</strong> (<code>np.ndarray</code>, <code>tf.Tensor</code>, <code>List[tf.Tensor]</code> \`<code>Dict[str, tf.Tensor]</code> or <code>Dict[str, np.ndarray]</code> and each example must have the shape <code>(batch_size, num_choices, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/model_doc/perceiver#transformers.PerceiverTokenizer.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.TFRoFormerForMultipleChoice.call.attention_mask",description:`<strong>attention_mask</strong> (<code>np.ndarray</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.TFRoFormerForMultipleChoice.call.token_type_ids",description:`<strong>token_type_ids</strong> (<code>np.ndarray</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.TFRoFormerForMultipleChoice.call.head_mask",description:`<strong>head_mask</strong> (<code>np.ndarray</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.TFRoFormerForMultipleChoice.call.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>np.ndarray</code> or <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.TFRoFormerForMultipleChoice.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.TFRoFormerForMultipleChoice.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.TFRoFormerForMultipleChoice.call.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.TFRoFormerForMultipleChoice.call.training",description:`<strong>training</strong> (<code>bool</code>, <em>optional</em>, defaults to \`False&#x201C;) &#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.TFRoFormerForMultipleChoice.call.labels",description:`<strong>labels</strong> (<code>tf.Tensor</code> or <code>np.ndarray</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for computing the multiple choice classification loss. Indices should be in <code>[0, ..., num_choices]</code>
where <code>num_choices</code> is the size of the second dimension of the input tensors. (See <code>input_ids</code> above)`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/roformer/modeling_tf_roformer.py#L1096",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_tf_outputs.TFMultipleChoiceModelOutput"
>transformers.modeling_tf_outputs.TFMultipleChoiceModelOutput</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/main/en/model_doc/roformer#transformers.RoFormerConfig"
>RoFormerConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>tf.Tensor</code> of shape <em>(batch_size, )</em>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Classification loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, num_choices)</code>) \u2014 <em>num_choices</em> is the second dimension of the input tensors. (see <em>input_ids</em> above).</p>
<p>Classification scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_tf_outputs.TFMultipleChoiceModelOutput"
>transformers.modeling_tf_outputs.TFMultipleChoiceModelOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),Ts=new Se({props:{$$slots:{default:[ij]},$$scope:{ctx:j}}}),vs=new Ie({props:{anchor:"transformers.TFRoFormerForMultipleChoice.call.example",$$slots:{default:[dj]},$$scope:{ctx:j}}}),el=new Pe({}),ol=new S({props:{name:"class transformers.TFRoFormerForTokenClassification",anchor:"transformers.TFRoFormerForTokenClassification",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFRoFormerForTokenClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/roformer#transformers.RoFormerConfig">RoFormerConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/roformer/modeling_tf_roformer.py#L1178"}}),ws=new Se({props:{$$slots:{default:[cj]},$$scope:{ctx:j}}}),rl=new S({props:{name:"call",anchor:"transformers.TFRoFormerForTokenClassification.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:"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.TFRoFormerForTokenClassification.call.input_ids",description:`<strong>input_ids</strong> (<code>np.ndarray</code>, <code>tf.Tensor</code>, <code>List[tf.Tensor]</code> \`<code>Dict[str, tf.Tensor]</code> or <code>Dict[str, np.ndarray]</code> and each example must have the shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/model_doc/perceiver#transformers.PerceiverTokenizer.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.TFRoFormerForTokenClassification.call.attention_mask",description:`<strong>attention_mask</strong> (<code>np.ndarray</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.TFRoFormerForTokenClassification.call.token_type_ids",description:`<strong>token_type_ids</strong> (<code>np.ndarray</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.TFRoFormerForTokenClassification.call.head_mask",description:`<strong>head_mask</strong> (<code>np.ndarray</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.TFRoFormerForTokenClassification.call.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>np.ndarray</code> or <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.TFRoFormerForTokenClassification.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.TFRoFormerForTokenClassification.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.TFRoFormerForTokenClassification.call.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.TFRoFormerForTokenClassification.call.training",description:`<strong>training</strong> (<code>bool</code>, <em>optional</em>, defaults to \`False&#x201C;) &#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.TFRoFormerForTokenClassification.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 token classification loss. Indices should be in <code>[0, ..., config.num_labels - 1]</code>.`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/roformer/modeling_tf_roformer.py#L1190",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_tf_outputs.TFTokenClassifierOutput"
>transformers.modeling_tf_outputs.TFTokenClassifierOutput</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/main/en/model_doc/roformer#transformers.RoFormerConfig"
>RoFormerConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>tf.Tensor</code> of shape <code>(n,)</code>, <em>optional</em>, where n is the number of unmasked labels, returned when <code>labels</code> is provided)  \u2014 Classification loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, config.num_labels)</code>) \u2014 Classification scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_tf_outputs.TFTokenClassifierOutput"
>transformers.modeling_tf_outputs.TFTokenClassifierOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),Fs=new Se({props:{$$slots:{default:[mj]},$$scope:{ctx:j}}}),Ms=new Ie({props:{anchor:"transformers.TFRoFormerForTokenClassification.call.example",$$slots:{default:[pj]},$$scope:{ctx:j}}}),$s=new Ie({props:{anchor:"transformers.TFRoFormerForTokenClassification.call.example-2",$$slots:{default:[hj]},$$scope:{ctx:j}}}),al=new Pe({}),ll=new S({props:{name:"class transformers.TFRoFormerForQuestionAnswering",anchor:"transformers.TFRoFormerForQuestionAnswering",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFRoFormerForQuestionAnswering.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/roformer#transformers.RoFormerConfig">RoFormerConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/roformer/modeling_tf_roformer.py#L1249"}}),js=new Se({props:{$$slots:{default:[uj]},$$scope:{ctx:j}}}),ml=new S({props:{name:"call",anchor:"transformers.TFRoFormerForQuestionAnswering.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:"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.TFRoFormerForQuestionAnswering.call.input_ids",description:`<strong>input_ids</strong> (<code>np.ndarray</code>, <code>tf.Tensor</code>, <code>List[tf.Tensor]</code> \`<code>Dict[str, tf.Tensor]</code> or <code>Dict[str, np.ndarray]</code> and each example must have the shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/model_doc/perceiver#transformers.PerceiverTokenizer.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.TFRoFormerForQuestionAnswering.call.attention_mask",description:`<strong>attention_mask</strong> (<code>np.ndarray</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.TFRoFormerForQuestionAnswering.call.token_type_ids",description:`<strong>token_type_ids</strong> (<code>np.ndarray</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.TFRoFormerForQuestionAnswering.call.head_mask",description:`<strong>head_mask</strong> (<code>np.ndarray</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.TFRoFormerForQuestionAnswering.call.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>np.ndarray</code> or <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.TFRoFormerForQuestionAnswering.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.TFRoFormerForQuestionAnswering.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.TFRoFormerForQuestionAnswering.call.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.TFRoFormerForQuestionAnswering.call.training",description:`<strong>training</strong> (<code>bool</code>, <em>optional</em>, defaults to \`False&#x201C;) &#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.TFRoFormerForQuestionAnswering.call.start_positions",description:`<strong>start_positions</strong> (<code>tf.Tensor</code> or <code>np.ndarray</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.TFRoFormerForQuestionAnswering.call.end_positions",description:`<strong>end_positions</strong> (<code>tf.Tensor</code> or <code>np.ndarray</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for position (index) of the end of the labelled span for computing the token classification loss.
Positions are clamped to the length of the sequence (<code>sequence_length</code>). Position outside of the sequence
are not taken into account for computing the loss.`,name:"end_positions"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/roformer/modeling_tf_roformer.py#L1260",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_tf_outputs.TFQuestionAnsweringModelOutput"
>transformers.modeling_tf_outputs.TFQuestionAnsweringModelOutput</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/main/en/model_doc/roformer#transformers.RoFormerConfig"
>RoFormerConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, )</code>, <em>optional</em>, returned when <code>start_positions</code> and <code>end_positions</code> are provided) \u2014 Total span extraction loss is the sum of a Cross-Entropy for the start and end positions.</p>
</li>
<li>
<p><strong>start_logits</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>) \u2014 Span-start scores (before SoftMax).</p>
</li>
<li>
<p><strong>end_logits</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>) \u2014 Span-end scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_tf_outputs.TFQuestionAnsweringModelOutput"
>transformers.modeling_tf_outputs.TFQuestionAnsweringModelOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),Es=new Se({props:{$$slots:{default:[fj]},$$scope:{ctx:j}}}),Js=new Ie({props:{anchor:"transformers.TFRoFormerForQuestionAnswering.call.example",$$slots:{default:[gj]},$$scope:{ctx:j}}}),Cs=new Ie({props:{anchor:"transformers.TFRoFormerForQuestionAnswering.call.example-2",$$slots:{default:[_j]},$$scope:{ctx:j}}}),pl=new Pe({}),hl=new S({props:{name:"class transformers.FlaxRoFormerModel",anchor:"transformers.FlaxRoFormerModel",parameters:[{name:"config",val:": RoFormerConfig"},{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:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.FlaxRoFormerModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/roformer#transformers.RoFormerConfig">RoFormerConfig</a>) &#x2014; Model configuration class with all the parameters of the
model. Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/main/en/main_classes/model#transformers.FlaxPreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"},{anchor:"transformers.FlaxRoFormerModel.dtype",description:`<strong>dtype</strong> (<code>jax.numpy.dtype</code>, <em>optional</em>, defaults to <code>jax.numpy.float32</code>) &#x2014;
The data type of the computation. Can be one of <code>jax.numpy.float32</code>, <code>jax.numpy.float16</code> (on GPUs) and
<code>jax.numpy.bfloat16</code> (on TPUs).</p>
<p>This can be used to enable mixed-precision training or half-precision inference on GPUs or TPUs. If
specified all the computation will be performed with the given <code>dtype</code>.</p>
<p><strong>Note that this only specifies the dtype of the computation and does not influence the dtype of model
parameters.</strong></p>
<p>If you wish to change the dtype of the model parameters, see <a href="/docs/transformers/main/en/main_classes/model#transformers.FlaxPreTrainedModel.to_fp16">to_fp16()</a> and
<a href="/docs/transformers/main/en/main_classes/model#transformers.FlaxPreTrainedModel.to_bf16">to_bf16()</a>.`,name:"dtype"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/roformer/modeling_flax_roformer.py#L747"}}),vl=new S({props:{name:"__call__",anchor:"transformers.FlaxRoFormerModel.__call__",parameters:[{name:"input_ids",val:""},{name:"attention_mask",val:" = None"},{name:"token_type_ids",val:" = None"},{name:"head_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"}],parametersDescription:[{anchor:"transformers.FlaxRoFormerModel.__call__.input_ids",description:`<strong>input_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/model_doc/perceiver#transformers.PerceiverTokenizer.__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.FlaxRoFormerModel.__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.FlaxRoFormerModel.__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.FlaxRoFormerModel.__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.FlaxRoFormerModel.__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.FlaxRoFormerModel.__call__.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/roformer/modeling_flax_roformer.py#L653",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_flax_outputs.FlaxBaseModelOutput"
>transformers.modeling_flax_outputs.FlaxBaseModelOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/main/en/model_doc/roformer#transformers.RoFormerConfig"
>RoFormerConfig</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>hidden_states</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_flax_outputs.FlaxBaseModelOutput"
>transformers.modeling_flax_outputs.FlaxBaseModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),xs=new Se({props:{$$slots:{default:[yj]},$$scope:{ctx:j}}}),zs=new Ie({props:{anchor:"transformers.FlaxRoFormerModel.__call__.example",$$slots:{default:[bj]},$$scope:{ctx:j}}}),kl=new Pe({}),wl=new S({props:{name:"class transformers.FlaxRoFormerForMaskedLM",anchor:"transformers.FlaxRoFormerForMaskedLM",parameters:[{name:"config",val:": RoFormerConfig"},{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:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.FlaxRoFormerForMaskedLM.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/roformer#transformers.RoFormerConfig">RoFormerConfig</a>) &#x2014; Model configuration class with all the parameters of the
model. Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/main/en/main_classes/model#transformers.FlaxPreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"},{anchor:"transformers.FlaxRoFormerForMaskedLM.dtype",description:`<strong>dtype</strong> (<code>jax.numpy.dtype</code>, <em>optional</em>, defaults to <code>jax.numpy.float32</code>) &#x2014;
The data type of the computation. Can be one of <code>jax.numpy.float32</code>, <code>jax.numpy.float16</code> (on GPUs) and
<code>jax.numpy.bfloat16</code> (on TPUs).</p>
<p>This can be used to enable mixed-precision training or half-precision inference on GPUs or TPUs. If
specified all the computation will be performed with the given <code>dtype</code>.</p>
<p><strong>Note that this only specifies the dtype of the computation and does not influence the dtype of model
parameters.</strong></p>
<p>If you wish to change the dtype of the model parameters, see <a href="/docs/transformers/main/en/main_classes/model#transformers.FlaxPreTrainedModel.to_fp16">to_fp16()</a> and
<a href="/docs/transformers/main/en/main_classes/model#transformers.FlaxPreTrainedModel.to_bf16">to_bf16()</a>.`,name:"dtype"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/roformer/modeling_flax_roformer.py#L805"}}),Ul=new S({props:{name:"__call__",anchor:"transformers.FlaxRoFormerForMaskedLM.__call__",parameters:[{name:"input_ids",val:""},{name:"attention_mask",val:" = None"},{name:"token_type_ids",val:" = None"},{name:"head_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"}],parametersDescription:[{anchor:"transformers.FlaxRoFormerForMaskedLM.__call__.input_ids",description:`<strong>input_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/model_doc/perceiver#transformers.PerceiverTokenizer.__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.FlaxRoFormerForMaskedLM.__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.FlaxRoFormerForMaskedLM.__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.FlaxRoFormerForMaskedLM.__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.FlaxRoFormerForMaskedLM.__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.FlaxRoFormerForMaskedLM.__call__.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/roformer/modeling_flax_roformer.py#L653",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_flax_outputs.FlaxMaskedLMOutput"
>transformers.modeling_flax_outputs.FlaxMaskedLMOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/main/en/model_doc/roformer#transformers.RoFormerConfig"
>RoFormerConfig</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>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_flax_outputs.FlaxMaskedLMOutput"
>transformers.modeling_flax_outputs.FlaxMaskedLMOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Zs=new Se({props:{$$slots:{default:[Tj]},$$scope:{ctx:j}}}),Ns=new Ie({props:{anchor:"transformers.FlaxRoFormerForMaskedLM.__call__.example",$$slots:{default:[vj]},$$scope:{ctx:j}}}),xl=new Pe({}),zl=new S({props:{name:"class transformers.FlaxRoFormerForSequenceClassification",anchor:"transformers.FlaxRoFormerForSequenceClassification",parameters:[{name:"config",val:": RoFormerConfig"},{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:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.FlaxRoFormerForSequenceClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/roformer#transformers.RoFormerConfig">RoFormerConfig</a>) &#x2014; Model configuration class with all the parameters of the
model. Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/main/en/main_classes/model#transformers.FlaxPreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"},{anchor:"transformers.FlaxRoFormerForSequenceClassification.dtype",description:`<strong>dtype</strong> (<code>jax.numpy.dtype</code>, <em>optional</em>, defaults to <code>jax.numpy.float32</code>) &#x2014;
The data type of the computation. Can be one of <code>jax.numpy.float32</code>, <code>jax.numpy.float16</code> (on GPUs) and
<code>jax.numpy.bfloat16</code> (on TPUs).</p>
<p>This can be used to enable mixed-precision training or half-precision inference on GPUs or TPUs. If
specified all the computation will be performed with the given <code>dtype</code>.</p>
<p><strong>Note that this only specifies the dtype of the computation and does not influence the dtype of model
parameters.</strong></p>
<p>If you wish to change the dtype of the model parameters, see <a href="/docs/transformers/main/en/main_classes/model#transformers.FlaxPreTrainedModel.to_fp16">to_fp16()</a> and
<a href="/docs/transformers/main/en/main_classes/model#transformers.FlaxPreTrainedModel.to_bf16">to_bf16()</a>.`,name:"dtype"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/roformer/modeling_flax_roformer.py#L869"}}),Gl=new S({props:{name:"__call__",anchor:"transformers.FlaxRoFormerForSequenceClassification.__call__",parameters:[{name:"input_ids",val:""},{name:"attention_mask",val:" = None"},{name:"token_type_ids",val:" = None"},{name:"head_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"}],parametersDescription:[{anchor:"transformers.FlaxRoFormerForSequenceClassification.__call__.input_ids",description:`<strong>input_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/model_doc/perceiver#transformers.PerceiverTokenizer.__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.FlaxRoFormerForSequenceClassification.__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.FlaxRoFormerForSequenceClassification.__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.FlaxRoFormerForSequenceClassification.__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.FlaxRoFormerForSequenceClassification.__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.FlaxRoFormerForSequenceClassification.__call__.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/roformer/modeling_flax_roformer.py#L653",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_flax_outputs.FlaxSequenceClassifierOutput"
>transformers.modeling_flax_outputs.FlaxSequenceClassifierOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/main/en/model_doc/roformer#transformers.RoFormerConfig"
>RoFormerConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>logits</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, config.num_labels)</code>) \u2014 Classification (or regression if config.num_labels==1) scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_flax_outputs.FlaxSequenceClassifierOutput"
>transformers.modeling_flax_outputs.FlaxSequenceClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),qs=new Se({props:{$$slots:{default:[kj]},$$scope:{ctx:j}}}),Vs=new Ie({props:{anchor:"transformers.FlaxRoFormerForSequenceClassification.__call__.example",$$slots:{default:[wj]},$$scope:{ctx:j}}}),Xl=new Pe({}),Bl=new S({props:{name:"class transformers.FlaxRoFormerForMultipleChoice",anchor:"transformers.FlaxRoFormerForMultipleChoice",parameters:[{name:"config",val:": RoFormerConfig"},{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:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.FlaxRoFormerForMultipleChoice.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/roformer#transformers.RoFormerConfig">RoFormerConfig</a>) &#x2014; Model configuration class with all the parameters of the
model. Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/main/en/main_classes/model#transformers.FlaxPreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"},{anchor:"transformers.FlaxRoFormerForMultipleChoice.dtype",description:`<strong>dtype</strong> (<code>jax.numpy.dtype</code>, <em>optional</em>, defaults to <code>jax.numpy.float32</code>) &#x2014;
The data type of the computation. Can be one of <code>jax.numpy.float32</code>, <code>jax.numpy.float16</code> (on GPUs) and
<code>jax.numpy.bfloat16</code> (on TPUs).</p>
<p>This can be used to enable mixed-precision training or half-precision inference on GPUs or TPUs. If
specified all the computation will be performed with the given <code>dtype</code>.</p>
<p><strong>Note that this only specifies the dtype of the computation and does not influence the dtype of model
parameters.</strong></p>
<p>If you wish to change the dtype of the model parameters, see <a href="/docs/transformers/main/en/main_classes/model#transformers.FlaxPreTrainedModel.to_fp16">to_fp16()</a> and
<a href="/docs/transformers/main/en/main_classes/model#transformers.FlaxPreTrainedModel.to_bf16">to_bf16()</a>.`,name:"dtype"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/roformer/modeling_flax_roformer.py#L944"}}),Yl=new S({props:{name:"__call__",anchor:"transformers.FlaxRoFormerForMultipleChoice.__call__",parameters:[{name:"input_ids",val:""},{name:"attention_mask",val:" = None"},{name:"token_type_ids",val:" = None"},{name:"head_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"}],parametersDescription:[{anchor:"transformers.FlaxRoFormerForMultipleChoice.__call__.input_ids",description:`<strong>input_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, num_choices, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/model_doc/perceiver#transformers.PerceiverTokenizer.__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.FlaxRoFormerForMultipleChoice.__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.FlaxRoFormerForMultipleChoice.__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.FlaxRoFormerForMultipleChoice.__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.FlaxRoFormerForMultipleChoice.__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.FlaxRoFormerForMultipleChoice.__call__.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/roformer/modeling_flax_roformer.py#L653",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_flax_outputs.FlaxMultipleChoiceModelOutput"
>transformers.modeling_flax_outputs.FlaxMultipleChoiceModelOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/main/en/model_doc/roformer#transformers.RoFormerConfig"
>RoFormerConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>logits</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, num_choices)</code>) \u2014 <em>num_choices</em> is the second dimension of the input tensors. (see <em>input_ids</em> above).</p>
<p>Classification scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_flax_outputs.FlaxMultipleChoiceModelOutput"
>transformers.modeling_flax_outputs.FlaxMultipleChoiceModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Gs=new Se({props:{$$slots:{default:[Fj]},$$scope:{ctx:j}}}),Xs=new Ie({props:{anchor:"transformers.FlaxRoFormerForMultipleChoice.__call__.example",$$slots:{default:[Mj]},$$scope:{ctx:j}}}),Kl=new Pe({}),ei=new S({props:{name:"class transformers.FlaxRoFormerForTokenClassification",anchor:"transformers.FlaxRoFormerForTokenClassification",parameters:[{name:"config",val:": RoFormerConfig"},{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:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.FlaxRoFormerForTokenClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/roformer#transformers.RoFormerConfig">RoFormerConfig</a>) &#x2014; Model configuration class with all the parameters of the
model. Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/main/en/main_classes/model#transformers.FlaxPreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"},{anchor:"transformers.FlaxRoFormerForTokenClassification.dtype",description:`<strong>dtype</strong> (<code>jax.numpy.dtype</code>, <em>optional</em>, defaults to <code>jax.numpy.float32</code>) &#x2014;
The data type of the computation. Can be one of <code>jax.numpy.float32</code>, <code>jax.numpy.float16</code> (on GPUs) and
<code>jax.numpy.bfloat16</code> (on TPUs).</p>
<p>This can be used to enable mixed-precision training or half-precision inference on GPUs or TPUs. If
specified all the computation will be performed with the given <code>dtype</code>.</p>
<p><strong>Note that this only specifies the dtype of the computation and does not influence the dtype of model
parameters.</strong></p>
<p>If you wish to change the dtype of the model parameters, see <a href="/docs/transformers/main/en/main_classes/model#transformers.FlaxPreTrainedModel.to_fp16">to_fp16()</a> and
<a href="/docs/transformers/main/en/main_classes/model#transformers.FlaxPreTrainedModel.to_bf16">to_bf16()</a>.`,name:"dtype"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/roformer/modeling_flax_roformer.py#L1012"}}),ii=new S({props:{name:"__call__",anchor:"transformers.FlaxRoFormerForTokenClassification.__call__",parameters:[{name:"input_ids",val:""},{name:"attention_mask",val:" = None"},{name:"token_type_ids",val:" = None"},{name:"head_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"}],parametersDescription:[{anchor:"transformers.FlaxRoFormerForTokenClassification.__call__.input_ids",description:`<strong>input_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/model_doc/perceiver#transformers.PerceiverTokenizer.__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.FlaxRoFormerForTokenClassification.__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.FlaxRoFormerForTokenClassification.__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.FlaxRoFormerForTokenClassification.__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.FlaxRoFormerForTokenClassification.__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.FlaxRoFormerForTokenClassification.__call__.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/roformer/modeling_flax_roformer.py#L653",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_flax_outputs.FlaxTokenClassifierOutput"
>transformers.modeling_flax_outputs.FlaxTokenClassifierOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/main/en/model_doc/roformer#transformers.RoFormerConfig"
>RoFormerConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>logits</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, sequence_length, config.num_labels)</code>) \u2014 Classification scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_flax_outputs.FlaxTokenClassifierOutput"
>transformers.modeling_flax_outputs.FlaxTokenClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Ss=new Se({props:{$$slots:{default:[$j]},$$scope:{ctx:j}}}),Ps=new Ie({props:{anchor:"transformers.FlaxRoFormerForTokenClassification.__call__.example",$$slots:{default:[Rj]},$$scope:{ctx:j}}}),di=new Pe({}),ci=new S({props:{name:"class transformers.FlaxRoFormerForQuestionAnswering",anchor:"transformers.FlaxRoFormerForQuestionAnswering",parameters:[{name:"config",val:": RoFormerConfig"},{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:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.FlaxRoFormerForQuestionAnswering.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/roformer#transformers.RoFormerConfig">RoFormerConfig</a>) &#x2014; Model configuration class with all the parameters of the
model. Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/main/en/main_classes/model#transformers.FlaxPreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"},{anchor:"transformers.FlaxRoFormerForQuestionAnswering.dtype",description:`<strong>dtype</strong> (<code>jax.numpy.dtype</code>, <em>optional</em>, defaults to <code>jax.numpy.float32</code>) &#x2014;
The data type of the computation. Can be one of <code>jax.numpy.float32</code>, <code>jax.numpy.float16</code> (on GPUs) and
<code>jax.numpy.bfloat16</code> (on TPUs).</p>
<p>This can be used to enable mixed-precision training or half-precision inference on GPUs or TPUs. If
specified all the computation will be performed with the given <code>dtype</code>.</p>
<p><strong>Note that this only specifies the dtype of the computation and does not influence the dtype of model
parameters.</strong></p>
<p>If you wish to change the dtype of the model parameters, see <a href="/docs/transformers/main/en/main_classes/model#transformers.FlaxPreTrainedModel.to_fp16">to_fp16()</a> and
<a href="/docs/transformers/main/en/main_classes/model#transformers.FlaxPreTrainedModel.to_bf16">to_bf16()</a>.`,name:"dtype"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/roformer/modeling_flax_roformer.py#L1080"}}),yi=new S({props:{name:"__call__",anchor:"transformers.FlaxRoFormerForQuestionAnswering.__call__",parameters:[{name:"input_ids",val:""},{name:"attention_mask",val:" = None"},{name:"token_type_ids",val:" = None"},{name:"head_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"}],parametersDescription:[{anchor:"transformers.FlaxRoFormerForQuestionAnswering.__call__.input_ids",description:`<strong>input_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/model_doc/perceiver#transformers.PerceiverTokenizer.__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.FlaxRoFormerForQuestionAnswering.__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.FlaxRoFormerForQuestionAnswering.__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.FlaxRoFormerForQuestionAnswering.__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.FlaxRoFormerForQuestionAnswering.__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.FlaxRoFormerForQuestionAnswering.__call__.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/roformer/modeling_flax_roformer.py#L653",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_flax_outputs.FlaxQuestionAnsweringModelOutput"
>transformers.modeling_flax_outputs.FlaxQuestionAnsweringModelOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/main/en/model_doc/roformer#transformers.RoFormerConfig"
>RoFormerConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>start_logits</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, sequence_length)</code>) \u2014 Span-start scores (before SoftMax).</p>
</li>
<li>
<p><strong>end_logits</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, sequence_length)</code>) \u2014 Span-end scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_flax_outputs.FlaxQuestionAnsweringModelOutput"
>transformers.modeling_flax_outputs.FlaxQuestionAnsweringModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Qs=new Se({props:{$$slots:{default:[jj]},$$scope:{ctx:j}}}),Ds=new Ie({props:{anchor:"transformers.FlaxRoFormerForQuestionAnswering.__call__.example",$$slots:{default:[Ej]},$$scope:{ctx:j}}}),{c(){d=s("meta"),y=m(),h=s("h1"),u=s("a"),_=s("span"),v(i.$$.fragment),c=m(),J=s("span"),ke=t("RoFormer"),fe=m(),q=s("h2"),ae=s("a"),ee=s("span"),v(R.$$.fragment),we=m(),P=s("span"),Fe=t("Overview"),ge=m(),V=s("p"),Me=t("The RoFormer model was proposed in "),le=s("a"),Q=t("RoFormer: Enhanced Transformer with Rotary Position Embedding"),$e=t(" by Jianlin Su and Yu Lu and Shengfeng Pan and Bo Wen and Yunfeng Liu."),_e=m(),G=s("p"),Re=t("The abstract from the paper is the following:"),ye=m(),X=s("p"),me=s("em"),je=t(`Position encoding in transformer architecture provides supervision for dependency modeling between elements at
different positions in the sequence. We investigate various methods to encode positional information in
transformer-based language models and propose a novel implementation named Rotary Position Embedding(RoPE). The
proposed RoPE encodes absolute positional information with rotation matrix and naturally incorporates explicit relative
position dependency in self-attention formulation. Notably, RoPE comes with valuable properties such as flexibility of
being expand to any sequence lengths, decaying inter-token dependency with increasing relative distances, and
capability of equipping the linear self-attention with relative position encoding. As a result, the enhanced
transformer with rotary position embedding, or RoFormer, achieves superior performance in tasks with long texts. We
release the theoretical analysis along with some preliminary experiment results on Chinese data. The undergoing
experiment for English benchmark will soon be updated.`),te=m(),U=s("p"),I=t("Tips:"),be=m(),B=s("ul"),pe=s("li"),Ee=t(`RoFormer is a BERT-like autoencoding model with rotary position embeddings. Rotary position embeddings have shown
improved performance on classification tasks with long texts.`),L=m(),se=s("p"),Je=t("This model was contributed by "),z=s("a"),Ce=t("junnyu"),D=t(". The original code can be found "),ie=s("a"),Ue=t("here"),O=t("."),Te=m(),re=s("h2"),N=s("a"),he=s("span"),v(A.$$.fragment),xe=m(),oe=s("span"),Z=t("Documentation resources"),ve=m(),x=s("ul"),ue=s("li"),de=s("a"),T=t("Text classification task guide"),E=m(),Ae=s("li"),K=s("a"),Le=t("Token classification task guide"),Qe=m(),C=s("li"),We=s("a"),De=t("Question answering task guide"),Oe=m(),Ge=s("li"),qe=s("a"),W=t("Causal language modeling task guide"),H=m(),Xe=s("li"),Ve=s("a"),Y=t("Masked language modeling task guide"),He=m(),Be=s("li"),ce=s("a"),Ye=t("Multiple choice task guide"),ne=m(),ze=s("h2"),Fn=s("a"),Ad=s("span"),v(vr.$$.fragment),hf=m(),Gd=s("span"),uf=t("RoFormerConfig"),ph=m(),Uo=s("div"),v(kr.$$.fragment),ff=m(),Mt=s("p"),gf=t("This is the configuration class to store the configuration of a "),Ri=s("a"),_f=t("RoFormerModel"),yf=t(`. It is used to instantiate an
RoFormer 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 RoFormer
`),wr=s("a"),bf=t("junnyu/roformer_chinese_base"),Tf=t(" architecture."),vf=m(),$t=s("p"),kf=t("Configuration objects inherit from "),ji=s("a"),wf=t("PretrainedConfig"),Ff=t(` and can be used to control the model outputs. Read the
documentation from `),Ei=s("a"),Mf=t("PretrainedConfig"),$f=t(" for more information."),Rf=m(),v(Mn.$$.fragment),hh=m(),Rt=s("h2"),$n=s("a"),Xd=s("span"),v(Fr.$$.fragment),jf=m(),Bd=s("span"),Ef=t("RoFormerTokenizer"),uh=m(),Ke=s("div"),v(Mr.$$.fragment),Jf=m(),$r=s("p"),Cf=t("Construct a RoFormer tokenizer. Based on "),Rr=s("a"),Uf=t("Rust Jieba"),xf=t("."),zf=m(),jr=s("p"),If=t("This tokenizer inherits from "),Ji=s("a"),Zf=t("PreTrainedTokenizer"),Nf=t(` which contains most of the main methods. Users should refer to
this superclass for more information regarding those methods.`),Wf=m(),v(Rn.$$.fragment),qf=m(),gt=s("div"),v(Er.$$.fragment),Vf=m(),Sd=s("p"),Af=t(`Build model inputs from a sequence or a pair of sequence for sequence classification tasks by concatenating and
adding special tokens. A RoFormer sequence has the following format:`),Gf=m(),Jr=s("ul"),Ci=s("li"),Xf=t("single sequence: "),Pd=s("code"),Bf=t("[CLS] X [SEP]"),Sf=m(),Ui=s("li"),Pf=t("pair of sequences: "),Ld=s("code"),Lf=t("[CLS] A [SEP] B [SEP]"),Qf=m(),jn=s("div"),v(Cr.$$.fragment),Df=m(),Ur=s("p"),Of=t(`Retrieve sequence ids from a token list that has no special tokens added. This method is called when adding
special tokens using the tokenizer `),Qd=s("code"),Hf=t("prepare_for_model"),Yf=t(" method."),Kf=m(),No=s("div"),v(xr.$$.fragment),eg=m(),Dd=s("p"),og=t("Create a mask from the two sequences passed to be used in a sequence-pair classification task. A RoFormer"),tg=m(),v(En.$$.fragment),ng=m(),jt=s("p"),sg=t("If "),Od=s("code"),rg=t("token_ids_1"),ag=t(" is "),Hd=s("code"),lg=t("None"),ig=t(", this method only returns the first portion of the mask (0s)."),dg=m(),xi=s("div"),v(zr.$$.fragment),fh=m(),Et=s("h2"),Jn=s("a"),Yd=s("span"),v(Ir.$$.fragment),cg=m(),Kd=s("span"),mg=t("RoFormerTokenizerFast"),gh=m(),lo=s("div"),v(Zr.$$.fragment),pg=m(),Nr=s("p"),hg=t("Construct a \u201Cfast\u201D RoFormer tokenizer (backed by HuggingFace\u2019s "),ec=s("em"),ug=t("tokenizers"),fg=t(" library)."),gg=m(),Cn=s("p"),zi=s("a"),_g=t("RoFormerTokenizerFast"),yg=t(" is almost identical to "),Ii=s("a"),bg=t("BertTokenizerFast"),Tg=t(` and runs end-to-end tokenization:
punctuation splitting and wordpiece. There are some difference between them when tokenizing Chinese.`),vg=m(),Wr=s("p"),kg=t("This tokenizer inherits from "),Zi=s("a"),wg=t("PreTrainedTokenizerFast"),Fg=t(` which contains most of the main methods. Users should
refer to this superclass for more information regarding those methods.`),Mg=m(),v(Un.$$.fragment),$g=m(),_t=s("div"),v(qr.$$.fragment),Rg=m(),oc=s("p"),jg=t(`Build model inputs from a sequence or a pair of sequence for sequence classification tasks by concatenating and
adding special tokens. A RoFormer sequence has the following format:`),Eg=m(),Vr=s("ul"),Ni=s("li"),Jg=t("single sequence: "),tc=s("code"),Cg=t("[CLS] X [SEP]"),Ug=m(),Wi=s("li"),xg=t("pair of sequences: "),nc=s("code"),zg=t("[CLS] A [SEP] B [SEP]"),_h=m(),Jt=s("h2"),xn=s("a"),sc=s("span"),v(Ar.$$.fragment),Ig=m(),rc=s("span"),Zg=t("RoFormerModel"),yh=m(),_o=s("div"),v(Gr.$$.fragment),Ng=m(),Xr=s("p"),Wg=t(`The bare RoFormer Model transformer outputting raw hidden-states without any specific head on top.
This model is a PyTorch `),Br=s("a"),qg=t("torch.nn.Module"),Vg=t(` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),Ag=m(),Sr=s("p"),Gg=t(`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 `),Pr=s("a"),Xg=t(`Attention is
all you need`),Bg=t(` by Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit,
Llion Jones, Aidan N. Gomez, Lukasz Kaiser and Illia Polosukhin.`),Sg=m(),io=s("p"),Pg=t("To behave as an decoder the model needs to be initialized with the "),ac=s("code"),Lg=t("is_decoder"),Qg=t(` argument of the configuration set
to `),lc=s("code"),Dg=t("True"),Og=t(". To be used in a Seq2Seq model, the model needs to initialized with both "),ic=s("code"),Hg=t("is_decoder"),Yg=t(` argument and
`),dc=s("code"),Kg=t("add_cross_attention"),e_=t(" set to "),cc=s("code"),o_=t("True"),t_=t("; an "),mc=s("code"),n_=t("encoder_hidden_states"),s_=t(" is then expected as an input to the forward pass."),r_=m(),Wo=s("div"),v(Lr.$$.fragment),a_=m(),Ct=s("p"),l_=t("The "),qi=s("a"),i_=t("RoFormerModel"),d_=t(" forward method, overrides the "),pc=s("code"),c_=t("__call__"),m_=t(" special method."),p_=m(),v(zn.$$.fragment),h_=m(),v(In.$$.fragment),bh=m(),Ut=s("h2"),Zn=s("a"),hc=s("span"),v(Qr.$$.fragment),u_=m(),uc=s("span"),f_=t("RoFormerForCausalLM"),Th=m(),lt=s("div"),v(Dr.$$.fragment),g_=m(),xt=s("p"),__=t("RoFormer Model with a "),fc=s("code"),y_=t("language modeling"),b_=t(` head on top for CLM fine-tuning.
This model is a PyTorch `),Or=s("a"),T_=t("torch.nn.Module"),v_=t(` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),k_=m(),qo=s("div"),v(Hr.$$.fragment),w_=m(),zt=s("p"),F_=t("The "),Vi=s("a"),M_=t("RoFormerForCausalLM"),$_=t(" forward method, overrides the "),gc=s("code"),R_=t("__call__"),j_=t(" special method."),E_=m(),v(Nn.$$.fragment),J_=m(),v(Wn.$$.fragment),vh=m(),It=s("h2"),qn=s("a"),_c=s("span"),v(Yr.$$.fragment),C_=m(),yc=s("span"),U_=t("RoFormerForMaskedLM"),kh=m(),it=s("div"),v(Kr.$$.fragment),x_=m(),Zt=s("p"),z_=t("RoFormer Model with a "),bc=s("code"),I_=t("language modeling"),Z_=t(` head on top.
This model is a PyTorch `),ea=s("a"),N_=t("torch.nn.Module"),W_=t(` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),q_=m(),Vo=s("div"),v(oa.$$.fragment),V_=m(),Nt=s("p"),A_=t("The "),Ai=s("a"),G_=t("RoFormerForMaskedLM"),X_=t(" forward method, overrides the "),Tc=s("code"),B_=t("__call__"),S_=t(" special method."),P_=m(),v(Vn.$$.fragment),L_=m(),v(An.$$.fragment),wh=m(),Wt=s("h2"),Gn=s("a"),vc=s("span"),v(ta.$$.fragment),Q_=m(),kc=s("span"),D_=t("RoFormerForSequenceClassification"),Fh=m(),xo=s("div"),v(na.$$.fragment),O_=m(),wc=s("p"),H_=t(`RoFormer Model transformer with a sequence classification/regression head on top (a linear layer on top of the
pooled output) e.g. for GLUE tasks.`),Y_=m(),sa=s("p"),K_=t("This model is a PyTorch "),ra=s("a"),ey=t("torch.nn.Module"),oy=t(` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),ty=m(),To=s("div"),v(aa.$$.fragment),ny=m(),qt=s("p"),sy=t("The "),Gi=s("a"),ry=t("RoFormerForSequenceClassification"),ay=t(" forward method, overrides the "),Fc=s("code"),ly=t("__call__"),iy=t(" special method."),dy=m(),v(Xn.$$.fragment),cy=m(),v(Bn.$$.fragment),my=m(),v(Sn.$$.fragment),Mh=m(),Vt=s("h2"),Pn=s("a"),Mc=s("span"),v(la.$$.fragment),py=m(),$c=s("span"),hy=t("RoFormerForMultipleChoice"),$h=m(),zo=s("div"),v(ia.$$.fragment),uy=m(),Rc=s("p"),fy=t(`RoFormer 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.`),gy=m(),da=s("p"),_y=t("This model is a PyTorch "),ca=s("a"),yy=t("torch.nn.Module"),by=t(` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),Ty=m(),Ao=s("div"),v(ma.$$.fragment),vy=m(),At=s("p"),ky=t("The "),Xi=s("a"),wy=t("RoFormerForMultipleChoice"),Fy=t(" forward method, overrides the "),jc=s("code"),My=t("__call__"),$y=t(" special method."),Ry=m(),v(Ln.$$.fragment),jy=m(),v(Qn.$$.fragment),Rh=m(),Gt=s("h2"),Dn=s("a"),Ec=s("span"),v(pa.$$.fragment),Ey=m(),Jc=s("span"),Jy=t("RoFormerForTokenClassification"),jh=m(),Io=s("div"),v(ha.$$.fragment),Cy=m(),Cc=s("p"),Uy=t(`RoFormer 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.`),xy=m(),ua=s("p"),zy=t("This model is a PyTorch "),fa=s("a"),Iy=t("torch.nn.Module"),Zy=t(` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),Ny=m(),Go=s("div"),v(ga.$$.fragment),Wy=m(),Xt=s("p"),qy=t("The "),Bi=s("a"),Vy=t("RoFormerForTokenClassification"),Ay=t(" forward method, overrides the "),Uc=s("code"),Gy=t("__call__"),Xy=t(" special method."),By=m(),v(On.$$.fragment),Sy=m(),v(Hn.$$.fragment),Eh=m(),Bt=s("h2"),Yn=s("a"),xc=s("span"),v(_a.$$.fragment),Py=m(),zc=s("span"),Ly=t("RoFormerForQuestionAnswering"),Jh=m(),Zo=s("div"),v(ya.$$.fragment),Qy=m(),St=s("p"),Dy=t(`RoFormer 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 `),Ic=s("code"),Oy=t("span start logits"),Hy=t(" and "),Zc=s("code"),Yy=t("span end logits"),Ky=t(")."),eb=m(),ba=s("p"),ob=t("This model is a PyTorch "),Ta=s("a"),tb=t("torch.nn.Module"),nb=t(` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),sb=m(),Xo=s("div"),v(va.$$.fragment),rb=m(),Pt=s("p"),ab=t("The "),Si=s("a"),lb=t("RoFormerForQuestionAnswering"),ib=t(" forward method, overrides the "),Nc=s("code"),db=t("__call__"),cb=t(" special method."),mb=m(),v(Kn.$$.fragment),pb=m(),v(es.$$.fragment),Ch=m(),Lt=s("h2"),os=s("a"),Wc=s("span"),v(ka.$$.fragment),hb=m(),qc=s("span"),ub=t("TFRoFormerModel"),Uh=m(),co=s("div"),v(wa.$$.fragment),fb=m(),Vc=s("p"),gb=t("The bare RoFormer Model transformer outputing raw hidden-states without any specific head on top."),_b=m(),Fa=s("p"),yb=t("This model inherits from "),Pi=s("a"),bb=t("TFPreTrainedModel"),Tb=t(`. 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=m(),Ma=s("p"),kb=t("This model is also a "),$a=s("a"),wb=t("tf.keras.Model"),Fb=t(` 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=m(),v(ts.$$.fragment),$b=m(),Bo=s("div"),v(Ra.$$.fragment),Rb=m(),Qt=s("p"),jb=t("The "),Li=s("a"),Eb=t("TFRoFormerModel"),Jb=t(" forward method, overrides the "),Ac=s("code"),Cb=t("__call__"),Ub=t(" special method."),xb=m(),v(ns.$$.fragment),zb=m(),v(ss.$$.fragment),xh=m(),Dt=s("h2"),rs=s("a"),Gc=s("span"),v(ja.$$.fragment),Ib=m(),Xc=s("span"),Zb=t("TFRoFormerForMaskedLM"),zh=m(),mo=s("div"),v(Ea.$$.fragment),Nb=m(),Ja=s("p"),Wb=t("RoFormer Model with a "),Bc=s("code"),qb=t("language modeling"),Vb=t(" head on top."),Ab=m(),Ca=s("p"),Gb=t("This model inherits from "),Qi=s("a"),Xb=t("TFPreTrainedModel"),Bb=t(`. 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.)`),Sb=m(),Ua=s("p"),Pb=t("This model is also a "),xa=s("a"),Lb=t("tf.keras.Model"),Qb=t(` 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.`),Db=m(),v(as.$$.fragment),Ob=m(),vo=s("div"),v(za.$$.fragment),Hb=m(),Ot=s("p"),Yb=t("The "),Di=s("a"),Kb=t("TFRoFormerForMaskedLM"),eT=t(" forward method, overrides the "),Sc=s("code"),oT=t("__call__"),tT=t(" special method."),nT=m(),v(ls.$$.fragment),sT=m(),v(is.$$.fragment),rT=m(),v(ds.$$.fragment),Ih=m(),Ht=s("h2"),cs=s("a"),Pc=s("span"),v(Ia.$$.fragment),aT=m(),Lc=s("span"),lT=t("TFRoFormerForCausalLM"),Zh=m(),po=s("div"),v(Za.$$.fragment),iT=m(),Na=s("p"),dT=t("RoFormer Model with a "),Qc=s("code"),cT=t("language modeling"),mT=t(" head on top for CLM fine-tuning."),pT=m(),Wa=s("p"),hT=t("This model inherits from "),Oi=s("a"),uT=t("TFPreTrainedModel"),fT=t(`. 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.)`),gT=m(),qa=s("p"),_T=t("This model is also a "),Va=s("a"),yT=t("tf.keras.Model"),bT=t(` 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.`),TT=m(),v(ms.$$.fragment),vT=m(),yt=s("div"),v(Aa.$$.fragment),kT=m(),yo=s("p"),wT=t("labels ("),Dc=s("code"),FT=t("tf.Tensor"),MT=t(" or "),Oc=s("code"),$T=t("np.ndarray"),RT=t(" of shape "),Hc=s("code"),jT=t("(batch_size, sequence_length)"),ET=t(", "),Yc=s("em"),JT=t("optional"),CT=t(`):
Labels for computing the cross entropy classification loss. Indices should be in `),Kc=s("code"),UT=t("[0, ..., config.vocab_size - 1]"),xT=t("."),zT=m(),v(ps.$$.fragment),Nh=m(),Yt=s("h2"),hs=s("a"),em=s("span"),v(Ga.$$.fragment),IT=m(),om=s("span"),ZT=t("TFRoFormerForSequenceClassification"),Wh=m(),ho=s("div"),v(Xa.$$.fragment),NT=m(),tm=s("p"),WT=t("RoFormer Model transformer with a sequence classification/regression head on top e.g., for GLUE tasks."),qT=m(),Ba=s("p"),VT=t("This model inherits from "),Hi=s("a"),AT=t("TFPreTrainedModel"),GT=t(`. 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.)`),XT=m(),Sa=s("p"),BT=t("This model is also a "),Pa=s("a"),ST=t("tf.keras.Model"),PT=t(` 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.`),LT=m(),v(us.$$.fragment),QT=m(),ko=s("div"),v(La.$$.fragment),DT=m(),Kt=s("p"),OT=t("The "),Yi=s("a"),HT=t("TFRoFormerForSequenceClassification"),YT=t(" forward method, overrides the "),nm=s("code"),KT=t("__call__"),ev=t(" special method."),ov=m(),v(fs.$$.fragment),tv=m(),v(gs.$$.fragment),nv=m(),v(_s.$$.fragment),qh=m(),en=s("h2"),ys=s("a"),sm=s("span"),v(Qa.$$.fragment),sv=m(),rm=s("span"),rv=t("TFRoFormerForMultipleChoice"),Vh=m(),uo=s("div"),v(Da.$$.fragment),av=m(),am=s("p"),lv=t(`RoFormer 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.`),iv=m(),Oa=s("p"),dv=t("This model inherits from "),Ki=s("a"),cv=t("TFPreTrainedModel"),mv=t(`. 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.)`),pv=m(),Ha=s("p"),hv=t("This model is also a "),Ya=s("a"),uv=t("tf.keras.Model"),fv=t(` 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.`),gv=m(),v(bs.$$.fragment),_v=m(),So=s("div"),v(Ka.$$.fragment),yv=m(),on=s("p"),bv=t("The "),ed=s("a"),Tv=t("TFRoFormerForMultipleChoice"),vv=t(" forward method, overrides the "),lm=s("code"),kv=t("__call__"),wv=t(" special method."),Fv=m(),v(Ts.$$.fragment),Mv=m(),v(vs.$$.fragment),Ah=m(),tn=s("h2"),ks=s("a"),im=s("span"),v(el.$$.fragment),$v=m(),dm=s("span"),Rv=t("TFRoFormerForTokenClassification"),Gh=m(),fo=s("div"),v(ol.$$.fragment),jv=m(),cm=s("p"),Ev=t(`RoFormer 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.`),Jv=m(),tl=s("p"),Cv=t("This model inherits from "),od=s("a"),Uv=t("TFPreTrainedModel"),xv=t(`. 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.)`),zv=m(),nl=s("p"),Iv=t("This model is also a "),sl=s("a"),Zv=t("tf.keras.Model"),Nv=t(` 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.`),Wv=m(),v(ws.$$.fragment),qv=m(),wo=s("div"),v(rl.$$.fragment),Vv=m(),nn=s("p"),Av=t("The "),td=s("a"),Gv=t("TFRoFormerForTokenClassification"),Xv=t(" forward method, overrides the "),mm=s("code"),Bv=t("__call__"),Sv=t(" special method."),Pv=m(),v(Fs.$$.fragment),Lv=m(),v(Ms.$$.fragment),Qv=m(),v($s.$$.fragment),Xh=m(),sn=s("h2"),Rs=s("a"),pm=s("span"),v(al.$$.fragment),Dv=m(),hm=s("span"),Ov=t("TFRoFormerForQuestionAnswering"),Bh=m(),go=s("div"),v(ll.$$.fragment),Hv=m(),rn=s("p"),Yv=t(`RoFormer Model with a span classification head on top for extractive question-answering tasks like SQuAD (a linear
layer on top of the hidden-states output to compute `),um=s("code"),Kv=t("span start logits"),ek=t(" and "),fm=s("code"),ok=t("span end logits"),tk=t(")."),nk=m(),il=s("p"),sk=t("This model inherits from "),nd=s("a"),rk=t("TFPreTrainedModel"),ak=t(`. 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.)`),lk=m(),dl=s("p"),ik=t("This model is also a "),cl=s("a"),dk=t("tf.keras.Model"),ck=t(` 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.`),mk=m(),v(js.$$.fragment),pk=m(),Fo=s("div"),v(ml.$$.fragment),hk=m(),an=s("p"),uk=t("The "),sd=s("a"),fk=t("TFRoFormerForQuestionAnswering"),gk=t(" forward method, overrides the "),gm=s("code"),_k=t("__call__"),yk=t(" special method."),bk=m(),v(Es.$$.fragment),Tk=m(),v(Js.$$.fragment),vk=m(),v(Cs.$$.fragment),Sh=m(),ln=s("h2"),Us=s("a"),_m=s("span"),v(pl.$$.fragment),kk=m(),ym=s("span"),wk=t("FlaxRoFormerModel"),Ph=m(),eo=s("div"),v(hl.$$.fragment),Fk=m(),bm=s("p"),Mk=t("The bare RoFormer Model transformer outputting raw hidden-states without any specific head on top."),$k=m(),ul=s("p"),Rk=t("This model inherits from "),rd=s("a"),jk=t("FlaxPreTrainedModel"),Ek=t(`. 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)`),Jk=m(),fl=s("p"),Ck=t("This model is also a Flax Linen "),gl=s("a"),Uk=t("flax.linen.Module"),xk=t(`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),zk=m(),Tm=s("p"),Ik=t("Finally, this model supports inherent JAX features such as:"),Zk=m(),dt=s("ul"),vm=s("li"),_l=s("a"),Nk=t("Just-In-Time (JIT) compilation"),Wk=m(),km=s("li"),yl=s("a"),qk=t("Automatic Differentiation"),Vk=m(),wm=s("li"),bl=s("a"),Ak=t("Vectorization"),Gk=m(),Fm=s("li"),Tl=s("a"),Xk=t("Parallelization"),Bk=m(),Po=s("div"),v(vl.$$.fragment),Sk=m(),dn=s("p"),Pk=t("The "),Mm=s("code"),Lk=t("FlaxRoFormerPreTrainedModel"),Qk=t(" forward method, overrides the "),$m=s("code"),Dk=t("__call__"),Ok=t(" special method."),Hk=m(),v(xs.$$.fragment),Yk=m(),v(zs.$$.fragment),Lh=m(),cn=s("h2"),Is=s("a"),Rm=s("span"),v(kl.$$.fragment),Kk=m(),jm=s("span"),ew=t("FlaxRoFormerForMaskedLM"),Qh=m(),oo=s("div"),v(wl.$$.fragment),ow=m(),Fl=s("p"),tw=t("RoFormer Model with a "),Em=s("code"),nw=t("language modeling"),sw=t(" head on top."),rw=m(),Ml=s("p"),aw=t("This model inherits from "),ad=s("a"),lw=t("FlaxPreTrainedModel"),iw=t(`. 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)`),dw=m(),$l=s("p"),cw=t("This model is also a Flax Linen "),Rl=s("a"),mw=t("flax.linen.Module"),pw=t(`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),hw=m(),Jm=s("p"),uw=t("Finally, this model supports inherent JAX features such as:"),fw=m(),ct=s("ul"),Cm=s("li"),jl=s("a"),gw=t("Just-In-Time (JIT) compilation"),_w=m(),Um=s("li"),El=s("a"),yw=t("Automatic Differentiation"),bw=m(),xm=s("li"),Jl=s("a"),Tw=t("Vectorization"),vw=m(),zm=s("li"),Cl=s("a"),kw=t("Parallelization"),ww=m(),Lo=s("div"),v(Ul.$$.fragment),Fw=m(),mn=s("p"),Mw=t("The "),Im=s("code"),$w=t("FlaxRoFormerPreTrainedModel"),Rw=t(" forward method, overrides the "),Zm=s("code"),jw=t("__call__"),Ew=t(" special method."),Jw=m(),v(Zs.$$.fragment),Cw=m(),v(Ns.$$.fragment),Dh=m(),pn=s("h2"),Ws=s("a"),Nm=s("span"),v(xl.$$.fragment),Uw=m(),Wm=s("span"),xw=t("FlaxRoFormerForSequenceClassification"),Oh=m(),to=s("div"),v(zl.$$.fragment),zw=m(),qm=s("p"),Iw=t(`RoFormer Model transformer with a sequence classification/regression head on top (a linear layer on top of the
pooled output) e.g. for GLUE tasks.`),Zw=m(),Il=s("p"),Nw=t("This model inherits from "),ld=s("a"),Ww=t("FlaxPreTrainedModel"),qw=t(`. 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)`),Vw=m(),Zl=s("p"),Aw=t("This model is also a Flax Linen "),Nl=s("a"),Gw=t("flax.linen.Module"),Xw=t(`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),Bw=m(),Vm=s("p"),Sw=t("Finally, this model supports inherent JAX features such as:"),Pw=m(),mt=s("ul"),Am=s("li"),Wl=s("a"),Lw=t("Just-In-Time (JIT) compilation"),Qw=m(),Gm=s("li"),ql=s("a"),Dw=t("Automatic Differentiation"),Ow=m(),Xm=s("li"),Vl=s("a"),Hw=t("Vectorization"),Yw=m(),Bm=s("li"),Al=s("a"),Kw=t("Parallelization"),eF=m(),Qo=s("div"),v(Gl.$$.fragment),oF=m(),hn=s("p"),tF=t("The "),Sm=s("code"),nF=t("FlaxRoFormerPreTrainedModel"),sF=t(" forward method, overrides the "),Pm=s("code"),rF=t("__call__"),aF=t(" special method."),lF=m(),v(qs.$$.fragment),iF=m(),v(Vs.$$.fragment),Hh=m(),un=s("h2"),As=s("a"),Lm=s("span"),v(Xl.$$.fragment),dF=m(),Qm=s("span"),cF=t("FlaxRoFormerForMultipleChoice"),Yh=m(),no=s("div"),v(Bl.$$.fragment),mF=m(),Dm=s("p"),pF=t(`RoFormer 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.`),hF=m(),Sl=s("p"),uF=t("This model inherits from "),id=s("a"),fF=t("FlaxPreTrainedModel"),gF=t(`. 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)`),_F=m(),Pl=s("p"),yF=t("This model is also a Flax Linen "),Ll=s("a"),bF=t("flax.linen.Module"),TF=t(`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),vF=m(),Om=s("p"),kF=t("Finally, this model supports inherent JAX features such as:"),wF=m(),pt=s("ul"),Hm=s("li"),Ql=s("a"),FF=t("Just-In-Time (JIT) compilation"),MF=m(),Ym=s("li"),Dl=s("a"),$F=t("Automatic Differentiation"),RF=m(),Km=s("li"),Ol=s("a"),jF=t("Vectorization"),EF=m(),ep=s("li"),Hl=s("a"),JF=t("Parallelization"),CF=m(),Do=s("div"),v(Yl.$$.fragment),UF=m(),fn=s("p"),xF=t("The "),op=s("code"),zF=t("FlaxRoFormerPreTrainedModel"),IF=t(" forward method, overrides the "),tp=s("code"),ZF=t("__call__"),NF=t(" special method."),WF=m(),v(Gs.$$.fragment),qF=m(),v(Xs.$$.fragment),Kh=m(),gn=s("h2"),Bs=s("a"),np=s("span"),v(Kl.$$.fragment),VF=m(),sp=s("span"),AF=t("FlaxRoFormerForTokenClassification"),eu=m(),so=s("div"),v(ei.$$.fragment),GF=m(),rp=s("p"),XF=t(`RoFormer 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.`),BF=m(),oi=s("p"),SF=t("This model inherits from "),dd=s("a"),PF=t("FlaxPreTrainedModel"),LF=t(`. 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)`),QF=m(),ti=s("p"),DF=t("This model is also a Flax Linen "),ni=s("a"),OF=t("flax.linen.Module"),HF=t(`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),YF=m(),ap=s("p"),KF=t("Finally, this model supports inherent JAX features such as:"),eM=m(),ht=s("ul"),lp=s("li"),si=s("a"),oM=t("Just-In-Time (JIT) compilation"),tM=m(),ip=s("li"),ri=s("a"),nM=t("Automatic Differentiation"),sM=m(),dp=s("li"),ai=s("a"),rM=t("Vectorization"),aM=m(),cp=s("li"),li=s("a"),lM=t("Parallelization"),iM=m(),Oo=s("div"),v(ii.$$.fragment),dM=m(),_n=s("p"),cM=t("The "),mp=s("code"),mM=t("FlaxRoFormerPreTrainedModel"),pM=t(" forward method, overrides the "),pp=s("code"),hM=t("__call__"),uM=t(" special method."),fM=m(),v(Ss.$$.fragment),gM=m(),v(Ps.$$.fragment),ou=m(),yn=s("h2"),Ls=s("a"),hp=s("span"),v(di.$$.fragment),_M=m(),up=s("span"),yM=t("FlaxRoFormerForQuestionAnswering"),tu=m(),ro=s("div"),v(ci.$$.fragment),bM=m(),bn=s("p"),TM=t(`RoFormer 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 `),fp=s("code"),vM=t("span start logits"),kM=t(" and "),gp=s("code"),wM=t("span end logits"),FM=t(")."),MM=m(),mi=s("p"),$M=t("This model inherits from "),cd=s("a"),RM=t("FlaxPreTrainedModel"),jM=t(`. 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)`),EM=m(),pi=s("p"),JM=t("This model is also a Flax Linen "),hi=s("a"),CM=t("flax.linen.Module"),UM=t(`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),xM=m(),_p=s("p"),zM=t("Finally, this model supports inherent JAX features such as:"),IM=m(),ut=s("ul"),yp=s("li"),ui=s("a"),ZM=t("Just-In-Time (JIT) compilation"),NM=m(),bp=s("li"),fi=s("a"),WM=t("Automatic Differentiation"),qM=m(),Tp=s("li"),gi=s("a"),VM=t("Vectorization"),AM=m(),vp=s("li"),_i=s("a"),GM=t("Parallelization"),XM=m(),Ho=s("div"),v(yi.$$.fragment),BM=m(),Tn=s("p"),SM=t("The "),kp=s("code"),PM=t("FlaxRoFormerPreTrainedModel"),LM=t(" forward method, overrides the "),wp=s("code"),QM=t("__call__"),DM=t(" special method."),OM=m(),v(Qs.$$.fragment),HM=m(),v(Ds.$$.fragment),this.h()},l(a){const b=RR('[data-svelte="svelte-1phssyn"]',document.head);d=r(b,"META",{name:!0,content:!0}),b.forEach(o),y=p(a),h=r(a,"H1",{class:!0});var bi=l(h);u=r(bi,"A",{id:!0,class:!0,href:!0});var Fp=l(u);_=r(Fp,"SPAN",{});var Mp=l(_);k(i.$$.fragment,Mp),Mp.forEach(o),Fp.forEach(o),c=p(bi),J=r(bi,"SPAN",{});var $p=l(J);ke=n($p,"RoFormer"),$p.forEach(o),bi.forEach(o),fe=p(a),q=r(a,"H2",{class:!0});var Ti=l(q);ae=r(Ti,"A",{id:!0,class:!0,href:!0});var Rp=l(ae);ee=r(Rp,"SPAN",{});var jp=l(ee);k(R.$$.fragment,jp),jp.forEach(o),Rp.forEach(o),we=p(Ti),P=r(Ti,"SPAN",{});var Ep=l(P);Fe=n(Ep,"Overview"),Ep.forEach(o),Ti.forEach(o),ge=p(a),V=r(a,"P",{});var vi=l(V);Me=n(vi,"The RoFormer model was proposed in "),le=r(vi,"A",{href:!0,rel:!0});var Jp=l(le);Q=n(Jp,"RoFormer: Enhanced Transformer with Rotary Position Embedding"),Jp.forEach(o),$e=n(vi," by Jianlin Su and Yu Lu and Shengfeng Pan and Bo Wen and Yunfeng Liu."),vi.forEach(o),_e=p(a),G=r(a,"P",{});var Cp=l(G);Re=n(Cp,"The abstract from the paper is the following:"),Cp.forEach(o),ye=p(a),X=r(a,"P",{});var Up=l(X);me=r(Up,"EM",{});var xp=l(me);je=n(xp,`Position encoding in transformer architecture provides supervision for dependency modeling between elements at
different positions in the sequence. We investigate various methods to encode positional information in
transformer-based language models and propose a novel implementation named Rotary Position Embedding(RoPE). The
proposed RoPE encodes absolute positional information with rotation matrix and naturally incorporates explicit relative
position dependency in self-attention formulation. Notably, RoPE comes with valuable properties such as flexibility of
being expand to any sequence lengths, decaying inter-token dependency with increasing relative distances, and
capability of equipping the linear self-attention with relative position encoding. As a result, the enhanced
transformer with rotary position embedding, or RoFormer, achieves superior performance in tasks with long texts. We
release the theoretical analysis along with some preliminary experiment results on Chinese data. The undergoing
experiment for English benchmark will soon be updated.`),xp.forEach(o),Up.forEach(o),te=p(a),U=r(a,"P",{});var zp=l(U);I=n(zp,"Tips:"),zp.forEach(o),be=p(a),B=r(a,"UL",{});var Ip=l(B);pe=r(Ip,"LI",{});var Zp=l(pe);Ee=n(Zp,`RoFormer is a BERT-like autoencoding model with rotary position embeddings. Rotary position embeddings have shown
improved performance on classification tasks with long texts.`),Zp.forEach(o),Ip.forEach(o),L=p(a),se=r(a,"P",{});var vn=l(se);Je=n(vn,"This model was contributed by "),z=r(vn,"A",{href:!0,rel:!0});var Np=l(z);Ce=n(Np,"junnyu"),Np.forEach(o),D=n(vn,". The original code can be found "),ie=r(vn,"A",{href:!0,rel:!0});var Wp=l(ie);Ue=n(Wp,"here"),Wp.forEach(o),O=n(vn,"."),vn.forEach(o),Te=p(a),re=r(a,"H2",{class:!0});var ki=l(re);N=r(ki,"A",{id:!0,class:!0,href:!0});var qp=l(N);he=r(qp,"SPAN",{});var Vp=l(he);k(A.$$.fragment,Vp),Vp.forEach(o),qp.forEach(o),xe=p(ki),oe=r(ki,"SPAN",{});var Ap=l(oe);Z=n(Ap,"Documentation resources"),Ap.forEach(o),ki.forEach(o),ve=p(a),x=r(a,"UL",{});var bo=l(x);ue=r(bo,"LI",{});var Gp=l(ue);de=r(Gp,"A",{href:!0});var Xp=l(de);T=n(Xp,"Text classification task guide"),Xp.forEach(o),Gp.forEach(o),E=p(bo),Ae=r(bo,"LI",{});var Bp=l(Ae);K=r(Bp,"A",{href:!0});var Sp=l(K);Le=n(Sp,"Token classification task guide"),Sp.forEach(o),Bp.forEach(o),Qe=p(bo),C=r(bo,"LI",{});var Pp=l(C);We=r(Pp,"A",{href:!0});var Lp=l(We);De=n(Lp,"Question answering task guide"),Lp.forEach(o),Pp.forEach(o),Oe=p(bo),Ge=r(bo,"LI",{});var Qp=l(Ge);qe=r(Qp,"A",{href:!0});var Dp=l(qe);W=n(Dp,"Causal language modeling task guide"),Dp.forEach(o),Qp.forEach(o),H=p(bo),Xe=r(bo,"LI",{});var Op=l(Xe);Ve=r(Op,"A",{href:!0});var Hp=l(Ve);Y=n(Hp,"Masked language modeling task guide"),Hp.forEach(o),Op.forEach(o),He=p(bo),Be=r(bo,"LI",{});var Yp=l(Be);ce=r(Yp,"A",{href:!0});var Kp=l(ce);Ye=n(Kp,"Multiple choice task guide"),Kp.forEach(o),Yp.forEach(o),bo.forEach(o),ne=p(a),ze=r(a,"H2",{class:!0});var wi=l(ze);Fn=r(wi,"A",{id:!0,class:!0,href:!0});var eh=l(Fn);Ad=r(eh,"SPAN",{});var oh=l(Ad);k(vr.$$.fragment,oh),oh.forEach(o),eh.forEach(o),hf=p(wi),Gd=r(wi,"SPAN",{});var th=l(Gd);uf=n(th,"RoFormerConfig"),th.forEach(o),wi.forEach(o),ph=p(a),Uo=r(a,"DIV",{class:!0});var ft=l(Uo);k(kr.$$.fragment,ft),ff=p(ft),Mt=r(ft,"P",{});var kn=l(Mt);gf=n(kn,"This is the configuration class to store the configuration of a "),Ri=r(kn,"A",{href:!0});var nh=l(Ri);_f=n(nh,"RoFormerModel"),nh.forEach(o),yf=n(kn,`. It is used to instantiate an
RoFormer 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 RoFormer
`),wr=r(kn,"A",{href:!0,rel:!0});var sh=l(wr);bf=n(sh,"junnyu/roformer_chinese_base"),sh.forEach(o),Tf=n(kn," architecture."),kn.forEach(o),vf=p(ft),$t=r(ft,"P",{});var wn=l($t);kf=n(wn,"Configuration objects inherit from "),ji=r(wn,"A",{href:!0});var rh=l(ji);wf=n(rh,"PretrainedConfig"),rh.forEach(o),Ff=n(wn,` and can be used to control the model outputs. Read the
documentation from `),Ei=r(wn,"A",{href:!0});var ah=l(Ei);Mf=n(ah,"PretrainedConfig"),ah.forEach(o),$f=n(wn," for more information."),wn.forEach(o),Rf=p(ft),k(Mn.$$.fragment,ft),ft.forEach(o),hh=p(a),Rt=r(a,"H2",{class:!0});var Fi=l(Rt);$n=r(Fi,"A",{id:!0,class:!0,href:!0});var lh=l($n);Xd=r(lh,"SPAN",{});var ih=l(Xd);k(Fr.$$.fragment,ih),ih.forEach(o),lh.forEach(o),jf=p(Fi),Bd=r(Fi,"SPAN",{});var dh=l(Bd);Ef=n(dh,"RoFormerTokenizer"),dh.forEach(o),Fi.forEach(o),uh=p(a),Ke=r(a,"DIV",{class:!0});var ao=l(Ke);k(Mr.$$.fragment,ao),Jf=p(ao),$r=r(ao,"P",{});var Mi=l($r);Cf=n(Mi,"Construct a RoFormer tokenizer. Based on "),Rr=r(Mi,"A",{href:!0,rel:!0});var ch=l(Rr);Uf=n(ch,"Rust Jieba"),ch.forEach(o),xf=n(Mi,"."),Mi.forEach(o),zf=p(ao),jr=r(ao,"P",{});var $i=l(jr);If=n($i,"This tokenizer inherits from "),Ji=r($i,"A",{href:!0});var t2=l(Ji);Zf=n(t2,"PreTrainedTokenizer"),t2.forEach(o),Nf=n($i,` which contains most of the main methods. Users should refer to
this superclass for more information regarding those methods.`),$i.forEach(o),Wf=p(ao),k(Rn.$$.fragment,ao),qf=p(ao),gt=r(ao,"DIV",{class:!0});var md=l(gt);k(Er.$$.fragment,md),Vf=p(md),Sd=r(md,"P",{});var n2=l(Sd);Af=n(n2,`Build model inputs from a sequence or a pair of sequence for sequence classification tasks by concatenating and
adding special tokens. A RoFormer sequence has the following format:`),n2.forEach(o),Gf=p(md),Jr=r(md,"UL",{});var su=l(Jr);Ci=r(su,"LI",{});var YM=l(Ci);Xf=n(YM,"single sequence: "),Pd=r(YM,"CODE",{});var s2=l(Pd);Bf=n(s2,"[CLS] X [SEP]"),s2.forEach(o),YM.forEach(o),Sf=p(su),Ui=r(su,"LI",{});var KM=l(Ui);Pf=n(KM,"pair of sequences: "),Ld=r(KM,"CODE",{});var r2=l(Ld);Lf=n(r2,"[CLS] A [SEP] B [SEP]"),r2.forEach(o),KM.forEach(o),su.forEach(o),md.forEach(o),Qf=p(ao),jn=r(ao,"DIV",{class:!0});var ru=l(jn);k(Cr.$$.fragment,ru),Df=p(ru),Ur=r(ru,"P",{});var au=l(Ur);Of=n(au,`Retrieve sequence ids from a token list that has no special tokens added. This method is called when adding
special tokens using the tokenizer `),Qd=r(au,"CODE",{});var a2=l(Qd);Hf=n(a2,"prepare_for_model"),a2.forEach(o),Yf=n(au," method."),au.forEach(o),ru.forEach(o),Kf=p(ao),No=r(ao,"DIV",{class:!0});var Os=l(No);k(xr.$$.fragment,Os),eg=p(Os),Dd=r(Os,"P",{});var l2=l(Dd);og=n(l2,"Create a mask from the two sequences passed to be used in a sequence-pair classification task. A RoFormer"),l2.forEach(o),tg=p(Os),k(En.$$.fragment,Os),ng=p(Os),jt=r(Os,"P",{});var pd=l(jt);sg=n(pd,"If "),Od=r(pd,"CODE",{});var i2=l(Od);rg=n(i2,"token_ids_1"),i2.forEach(o),ag=n(pd," is "),Hd=r(pd,"CODE",{});var d2=l(Hd);lg=n(d2,"None"),d2.forEach(o),ig=n(pd,", this method only returns the first portion of the mask (0s)."),pd.forEach(o),Os.forEach(o),dg=p(ao),xi=r(ao,"DIV",{class:!0});var c2=l(xi);k(zr.$$.fragment,c2),c2.forEach(o),ao.forEach(o),fh=p(a),Et=r(a,"H2",{class:!0});var lu=l(Et);Jn=r(lu,"A",{id:!0,class:!0,href:!0});var m2=l(Jn);Yd=r(m2,"SPAN",{});var p2=l(Yd);k(Ir.$$.fragment,p2),p2.forEach(o),m2.forEach(o),cg=p(lu),Kd=r(lu,"SPAN",{});var h2=l(Kd);mg=n(h2,"RoFormerTokenizerFast"),h2.forEach(o),lu.forEach(o),gh=p(a),lo=r(a,"DIV",{class:!0});var Yo=l(lo);k(Zr.$$.fragment,Yo),pg=p(Yo),Nr=r(Yo,"P",{});var iu=l(Nr);hg=n(iu,"Construct a \u201Cfast\u201D RoFormer tokenizer (backed by HuggingFace\u2019s "),ec=r(iu,"EM",{});var u2=l(ec);ug=n(u2,"tokenizers"),u2.forEach(o),fg=n(iu," library)."),iu.forEach(o),gg=p(Yo),Cn=r(Yo,"P",{});var mh=l(Cn);zi=r(mh,"A",{href:!0});var f2=l(zi);_g=n(f2,"RoFormerTokenizerFast"),f2.forEach(o),yg=n(mh," is almost identical to "),Ii=r(mh,"A",{href:!0});var g2=l(Ii);bg=n(g2,"BertTokenizerFast"),g2.forEach(o),Tg=n(mh,` and runs end-to-end tokenization:
punctuation splitting and wordpiece. There are some difference between them when tokenizing Chinese.`),mh.forEach(o),vg=p(Yo),Wr=r(Yo,"P",{});var du=l(Wr);kg=n(du,"This tokenizer inherits from "),Zi=r(du,"A",{href:!0});var _2=l(Zi);wg=n(_2,"PreTrainedTokenizerFast"),_2.forEach(o),Fg=n(du,` which contains most of the main methods. Users should
refer to this superclass for more information regarding those methods.`),du.forEach(o),Mg=p(Yo),k(Un.$$.fragment,Yo),$g=p(Yo),_t=r(Yo,"DIV",{class:!0});var hd=l(_t);k(qr.$$.fragment,hd),Rg=p(hd),oc=r(hd,"P",{});var y2=l(oc);jg=n(y2,`Build model inputs from a sequence or a pair of sequence for sequence classification tasks by concatenating and
adding special tokens. A RoFormer sequence has the following format:`),y2.forEach(o),Eg=p(hd),Vr=r(hd,"UL",{});var cu=l(Vr);Ni=r(cu,"LI",{});var e2=l(Ni);Jg=n(e2,"single sequence: "),tc=r(e2,"CODE",{});var b2=l(tc);Cg=n(b2,"[CLS] X [SEP]"),b2.forEach(o),e2.forEach(o),Ug=p(cu),Wi=r(cu,"LI",{});var o2=l(Wi);xg=n(o2,"pair of sequences: "),nc=r(o2,"CODE",{});var T2=l(nc);zg=n(T2,"[CLS] A [SEP] B [SEP]"),T2.forEach(o),o2.forEach(o),cu.forEach(o),hd.forEach(o),Yo.forEach(o),_h=p(a),Jt=r(a,"H2",{class:!0});var mu=l(Jt);xn=r(mu,"A",{id:!0,class:!0,href:!0});var v2=l(xn);sc=r(v2,"SPAN",{});var k2=l(sc);k(Ar.$$.fragment,k2),k2.forEach(o),v2.forEach(o),Ig=p(mu),rc=r(mu,"SPAN",{});var w2=l(rc);Zg=n(w2,"RoFormerModel"),w2.forEach(o),mu.forEach(o),yh=p(a),_o=r(a,"DIV",{class:!0});var bt=l(_o);k(Gr.$$.fragment,bt),Ng=p(bt),Xr=r(bt,"P",{});var pu=l(Xr);Wg=n(pu,`The bare RoFormer Model transformer outputting raw hidden-states without any specific head on top.
This model is a PyTorch `),Br=r(pu,"A",{href:!0,rel:!0});var F2=l(Br);qg=n(F2,"torch.nn.Module"),F2.forEach(o),Vg=n(pu,` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),pu.forEach(o),Ag=p(bt),Sr=r(bt,"P",{});var hu=l(Sr);Gg=n(hu,`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 `),Pr=r(hu,"A",{href:!0,rel:!0});var M2=l(Pr);Xg=n(M2,`Attention is
all you need`),M2.forEach(o),Bg=n(hu,` by Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit,
Llion Jones, Aidan N. Gomez, Lukasz Kaiser and Illia Polosukhin.`),hu.forEach(o),Sg=p(bt),io=r(bt,"P",{});var Mo=l(io);Pg=n(Mo,"To behave as an decoder the model needs to be initialized with the "),ac=r(Mo,"CODE",{});var $2=l(ac);Lg=n($2,"is_decoder"),$2.forEach(o),Qg=n(Mo,` argument of the configuration set
to `),lc=r(Mo,"CODE",{});var R2=l(lc);Dg=n(R2,"True"),R2.forEach(o),Og=n(Mo,". To be used in a Seq2Seq model, the model needs to initialized with both "),ic=r(Mo,"CODE",{});var j2=l(ic);Hg=n(j2,"is_decoder"),j2.forEach(o),Yg=n(Mo,` argument and
`),dc=r(Mo,"CODE",{});var E2=l(dc);Kg=n(E2,"add_cross_attention"),E2.forEach(o),e_=n(Mo," set to "),cc=r(Mo,"CODE",{});var J2=l(cc);o_=n(J2,"True"),J2.forEach(o),t_=n(Mo,"; an "),mc=r(Mo,"CODE",{});var C2=l(mc);n_=n(C2,"encoder_hidden_states"),C2.forEach(o),s_=n(Mo," is then expected as an input to the forward pass."),Mo.forEach(o),r_=p(bt),Wo=r(bt,"DIV",{class:!0});var Hs=l(Wo);k(Lr.$$.fragment,Hs),a_=p(Hs),Ct=r(Hs,"P",{});var ud=l(Ct);l_=n(ud,"The "),qi=r(ud,"A",{href:!0});var U2=l(qi);i_=n(U2,"RoFormerModel"),U2.forEach(o),d_=n(ud," forward method, overrides the "),pc=r(ud,"CODE",{});var x2=l(pc);c_=n(x2,"__call__"),x2.forEach(o),m_=n(ud," special method."),ud.forEach(o),p_=p(Hs),k(zn.$$.fragment,Hs),h_=p(Hs),k(In.$$.fragment,Hs),Hs.forEach(o),bt.forEach(o),bh=p(a),Ut=r(a,"H2",{class:!0});var uu=l(Ut);Zn=r(uu,"A",{id:!0,class:!0,href:!0});var z2=l(Zn);hc=r(z2,"SPAN",{});var I2=l(hc);k(Qr.$$.fragment,I2),I2.forEach(o),z2.forEach(o),u_=p(uu),uc=r(uu,"SPAN",{});var Z2=l(uc);f_=n(Z2,"RoFormerForCausalLM"),Z2.forEach(o),uu.forEach(o),Th=p(a),lt=r(a,"DIV",{class:!0});var fd=l(lt);k(Dr.$$.fragment,fd),g_=p(fd),xt=r(fd,"P",{});var gd=l(xt);__=n(gd,"RoFormer Model with a "),fc=r(gd,"CODE",{});var N2=l(fc);y_=n(N2,"language modeling"),N2.forEach(o),b_=n(gd,` head on top for CLM fine-tuning.
This model is a PyTorch `),Or=r(gd,"A",{href:!0,rel:!0});var W2=l(Or);T_=n(W2,"torch.nn.Module"),W2.forEach(o),v_=n(gd,` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),gd.forEach(o),k_=p(fd),qo=r(fd,"DIV",{class:!0});var Ys=l(qo);k(Hr.$$.fragment,Ys),w_=p(Ys),zt=r(Ys,"P",{});var _d=l(zt);F_=n(_d,"The "),Vi=r(_d,"A",{href:!0});var q2=l(Vi);M_=n(q2,"RoFormerForCausalLM"),q2.forEach(o),$_=n(_d," forward method, overrides the "),gc=r(_d,"CODE",{});var V2=l(gc);R_=n(V2,"__call__"),V2.forEach(o),j_=n(_d," special method."),_d.forEach(o),E_=p(Ys),k(Nn.$$.fragment,Ys),J_=p(Ys),k(Wn.$$.fragment,Ys),Ys.forEach(o),fd.forEach(o),vh=p(a),It=r(a,"H2",{class:!0});var fu=l(It);qn=r(fu,"A",{id:!0,class:!0,href:!0});var A2=l(qn);_c=r(A2,"SPAN",{});var G2=l(_c);k(Yr.$$.fragment,G2),G2.forEach(o),A2.forEach(o),C_=p(fu),yc=r(fu,"SPAN",{});var X2=l(yc);U_=n(X2,"RoFormerForMaskedLM"),X2.forEach(o),fu.forEach(o),kh=p(a),it=r(a,"DIV",{class:!0});var yd=l(it);k(Kr.$$.fragment,yd),x_=p(yd),Zt=r(yd,"P",{});var bd=l(Zt);z_=n(bd,"RoFormer Model with a "),bc=r(bd,"CODE",{});var B2=l(bc);I_=n(B2,"language modeling"),B2.forEach(o),Z_=n(bd,` head on top.
This model is a PyTorch `),ea=r(bd,"A",{href:!0,rel:!0});var S2=l(ea);N_=n(S2,"torch.nn.Module"),S2.forEach(o),W_=n(bd,` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),bd.forEach(o),q_=p(yd),Vo=r(yd,"DIV",{class:!0});var Ks=l(Vo);k(oa.$$.fragment,Ks),V_=p(Ks),Nt=r(Ks,"P",{});var Td=l(Nt);A_=n(Td,"The "),Ai=r(Td,"A",{href:!0});var P2=l(Ai);G_=n(P2,"RoFormerForMaskedLM"),P2.forEach(o),X_=n(Td," forward method, overrides the "),Tc=r(Td,"CODE",{});var L2=l(Tc);B_=n(L2,"__call__"),L2.forEach(o),S_=n(Td," special method."),Td.forEach(o),P_=p(Ks),k(Vn.$$.fragment,Ks),L_=p(Ks),k(An.$$.fragment,Ks),Ks.forEach(o),yd.forEach(o),wh=p(a),Wt=r(a,"H2",{class:!0});var gu=l(Wt);Gn=r(gu,"A",{id:!0,class:!0,href:!0});var Q2=l(Gn);vc=r(Q2,"SPAN",{});var D2=l(vc);k(ta.$$.fragment,D2),D2.forEach(o),Q2.forEach(o),Q_=p(gu),kc=r(gu,"SPAN",{});var O2=l(kc);D_=n(O2,"RoFormerForSequenceClassification"),O2.forEach(o),gu.forEach(o),Fh=p(a),xo=r(a,"DIV",{class:!0});var er=l(xo);k(na.$$.fragment,er),O_=p(er),wc=r(er,"P",{});var H2=l(wc);H_=n(H2,`RoFormer Model transformer with a sequence classification/regression head on top (a linear layer on top of the
pooled output) e.g. for GLUE tasks.`),H2.forEach(o),Y_=p(er),sa=r(er,"P",{});var _u=l(sa);K_=n(_u,"This model is a PyTorch "),ra=r(_u,"A",{href:!0,rel:!0});var Y2=l(ra);ey=n(Y2,"torch.nn.Module"),Y2.forEach(o),oy=n(_u,` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),_u.forEach(o),ty=p(er),To=r(er,"DIV",{class:!0});var Tt=l(To);k(aa.$$.fragment,Tt),ny=p(Tt),qt=r(Tt,"P",{});var vd=l(qt);sy=n(vd,"The "),Gi=r(vd,"A",{href:!0});var K2=l(Gi);ry=n(K2,"RoFormerForSequenceClassification"),K2.forEach(o),ay=n(vd," forward method, overrides the "),Fc=r(vd,"CODE",{});var e1=l(Fc);ly=n(e1,"__call__"),e1.forEach(o),iy=n(vd," special method."),vd.forEach(o),dy=p(Tt),k(Xn.$$.fragment,Tt),cy=p(Tt),k(Bn.$$.fragment,Tt),my=p(Tt),k(Sn.$$.fragment,Tt),Tt.forEach(o),er.forEach(o),Mh=p(a),Vt=r(a,"H2",{class:!0});var yu=l(Vt);Pn=r(yu,"A",{id:!0,class:!0,href:!0});var o1=l(Pn);Mc=r(o1,"SPAN",{});var t1=l(Mc);k(la.$$.fragment,t1),t1.forEach(o),o1.forEach(o),py=p(yu),$c=r(yu,"SPAN",{});var n1=l($c);hy=n(n1,"RoFormerForMultipleChoice"),n1.forEach(o),yu.forEach(o),$h=p(a),zo=r(a,"DIV",{class:!0});var or=l(zo);k(ia.$$.fragment,or),uy=p(or),Rc=r(or,"P",{});var s1=l(Rc);fy=n(s1,`RoFormer 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.`),s1.forEach(o),gy=p(or),da=r(or,"P",{});var bu=l(da);_y=n(bu,"This model is a PyTorch "),ca=r(bu,"A",{href:!0,rel:!0});var r1=l(ca);yy=n(r1,"torch.nn.Module"),r1.forEach(o),by=n(bu,` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),bu.forEach(o),Ty=p(or),Ao=r(or,"DIV",{class:!0});var tr=l(Ao);k(ma.$$.fragment,tr),vy=p(tr),At=r(tr,"P",{});var kd=l(At);ky=n(kd,"The "),Xi=r(kd,"A",{href:!0});var a1=l(Xi);wy=n(a1,"RoFormerForMultipleChoice"),a1.forEach(o),Fy=n(kd," forward method, overrides the "),jc=r(kd,"CODE",{});var l1=l(jc);My=n(l1,"__call__"),l1.forEach(o),$y=n(kd," special method."),kd.forEach(o),Ry=p(tr),k(Ln.$$.fragment,tr),jy=p(tr),k(Qn.$$.fragment,tr),tr.forEach(o),or.forEach(o),Rh=p(a),Gt=r(a,"H2",{class:!0});var Tu=l(Gt);Dn=r(Tu,"A",{id:!0,class:!0,href:!0});var i1=l(Dn);Ec=r(i1,"SPAN",{});var d1=l(Ec);k(pa.$$.fragment,d1),d1.forEach(o),i1.forEach(o),Ey=p(Tu),Jc=r(Tu,"SPAN",{});var c1=l(Jc);Jy=n(c1,"RoFormerForTokenClassification"),c1.forEach(o),Tu.forEach(o),jh=p(a),Io=r(a,"DIV",{class:!0});var nr=l(Io);k(ha.$$.fragment,nr),Cy=p(nr),Cc=r(nr,"P",{});var m1=l(Cc);Uy=n(m1,`RoFormer 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.`),m1.forEach(o),xy=p(nr),ua=r(nr,"P",{});var vu=l(ua);zy=n(vu,"This model is a PyTorch "),fa=r(vu,"A",{href:!0,rel:!0});var p1=l(fa);Iy=n(p1,"torch.nn.Module"),p1.forEach(o),Zy=n(vu,` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),vu.forEach(o),Ny=p(nr),Go=r(nr,"DIV",{class:!0});var sr=l(Go);k(ga.$$.fragment,sr),Wy=p(sr),Xt=r(sr,"P",{});var wd=l(Xt);qy=n(wd,"The "),Bi=r(wd,"A",{href:!0});var h1=l(Bi);Vy=n(h1,"RoFormerForTokenClassification"),h1.forEach(o),Ay=n(wd," forward method, overrides the "),Uc=r(wd,"CODE",{});var u1=l(Uc);Gy=n(u1,"__call__"),u1.forEach(o),Xy=n(wd," special method."),wd.forEach(o),By=p(sr),k(On.$$.fragment,sr),Sy=p(sr),k(Hn.$$.fragment,sr),sr.forEach(o),nr.forEach(o),Eh=p(a),Bt=r(a,"H2",{class:!0});var ku=l(Bt);Yn=r(ku,"A",{id:!0,class:!0,href:!0});var f1=l(Yn);xc=r(f1,"SPAN",{});var g1=l(xc);k(_a.$$.fragment,g1),g1.forEach(o),f1.forEach(o),Py=p(ku),zc=r(ku,"SPAN",{});var _1=l(zc);Ly=n(_1,"RoFormerForQuestionAnswering"),_1.forEach(o),ku.forEach(o),Jh=p(a),Zo=r(a,"DIV",{class:!0});var rr=l(Zo);k(ya.$$.fragment,rr),Qy=p(rr),St=r(rr,"P",{});var Fd=l(St);Dy=n(Fd,`RoFormer 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 `),Ic=r(Fd,"CODE",{});var y1=l(Ic);Oy=n(y1,"span start logits"),y1.forEach(o),Hy=n(Fd," and "),Zc=r(Fd,"CODE",{});var b1=l(Zc);Yy=n(b1,"span end logits"),b1.forEach(o),Ky=n(Fd,")."),Fd.forEach(o),eb=p(rr),ba=r(rr,"P",{});var wu=l(ba);ob=n(wu,"This model is a PyTorch "),Ta=r(wu,"A",{href:!0,rel:!0});var T1=l(Ta);tb=n(T1,"torch.nn.Module"),T1.forEach(o),nb=n(wu,` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),wu.forEach(o),sb=p(rr),Xo=r(rr,"DIV",{class:!0});var ar=l(Xo);k(va.$$.fragment,ar),rb=p(ar),Pt=r(ar,"P",{});var Md=l(Pt);ab=n(Md,"The "),Si=r(Md,"A",{href:!0});var v1=l(Si);lb=n(v1,"RoFormerForQuestionAnswering"),v1.forEach(o),ib=n(Md," forward method, overrides the "),Nc=r(Md,"CODE",{});var k1=l(Nc);db=n(k1,"__call__"),k1.forEach(o),cb=n(Md," special method."),Md.forEach(o),mb=p(ar),k(Kn.$$.fragment,ar),pb=p(ar),k(es.$$.fragment,ar),ar.forEach(o),rr.forEach(o),Ch=p(a),Lt=r(a,"H2",{class:!0});var Fu=l(Lt);os=r(Fu,"A",{id:!0,class:!0,href:!0});var w1=l(os);Wc=r(w1,"SPAN",{});var F1=l(Wc);k(ka.$$.fragment,F1),F1.forEach(o),w1.forEach(o),hb=p(Fu),qc=r(Fu,"SPAN",{});var M1=l(qc);ub=n(M1,"TFRoFormerModel"),M1.forEach(o),Fu.forEach(o),Uh=p(a),co=r(a,"DIV",{class:!0});var Ko=l(co);k(wa.$$.fragment,Ko),fb=p(Ko),Vc=r(Ko,"P",{});var $1=l(Vc);gb=n($1,"The bare RoFormer Model transformer outputing raw hidden-states without any specific head on top."),$1.forEach(o),_b=p(Ko),Fa=r(Ko,"P",{});var Mu=l(Fa);yb=n(Mu,"This model inherits from "),Pi=r(Mu,"A",{href:!0});var R1=l(Pi);bb=n(R1,"TFPreTrainedModel"),R1.forEach(o),Tb=n(Mu,`. 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.)`),Mu.forEach(o),vb=p(Ko),Ma=r(Ko,"P",{});var $u=l(Ma);kb=n($u,"This model is also a "),$a=r($u,"A",{href:!0,rel:!0});var j1=l($a);wb=n(j1,"tf.keras.Model"),j1.forEach(o),Fb=n($u,` 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.`),$u.forEach(o),Mb=p(Ko),k(ts.$$.fragment,Ko),$b=p(Ko),Bo=r(Ko,"DIV",{class:!0});var lr=l(Bo);k(Ra.$$.fragment,lr),Rb=p(lr),Qt=r(lr,"P",{});var $d=l(Qt);jb=n($d,"The "),Li=r($d,"A",{href:!0});var E1=l(Li);Eb=n(E1,"TFRoFormerModel"),E1.forEach(o),Jb=n($d," forward method, overrides the "),Ac=r($d,"CODE",{});var J1=l(Ac);Cb=n(J1,"__call__"),J1.forEach(o),Ub=n($d," special method."),$d.forEach(o),xb=p(lr),k(ns.$$.fragment,lr),zb=p(lr),k(ss.$$.fragment,lr),lr.forEach(o),Ko.forEach(o),xh=p(a),Dt=r(a,"H2",{class:!0});var Ru=l(Dt);rs=r(Ru,"A",{id:!0,class:!0,href:!0});var C1=l(rs);Gc=r(C1,"SPAN",{});var U1=l(Gc);k(ja.$$.fragment,U1),U1.forEach(o),C1.forEach(o),Ib=p(Ru),Xc=r(Ru,"SPAN",{});var x1=l(Xc);Zb=n(x1,"TFRoFormerForMaskedLM"),x1.forEach(o),Ru.forEach(o),zh=p(a),mo=r(a,"DIV",{class:!0});var et=l(mo);k(Ea.$$.fragment,et),Nb=p(et),Ja=r(et,"P",{});var ju=l(Ja);Wb=n(ju,"RoFormer Model with a "),Bc=r(ju,"CODE",{});var z1=l(Bc);qb=n(z1,"language modeling"),z1.forEach(o),Vb=n(ju," head on top."),ju.forEach(o),Ab=p(et),Ca=r(et,"P",{});var Eu=l(Ca);Gb=n(Eu,"This model inherits from "),Qi=r(Eu,"A",{href:!0});var I1=l(Qi);Xb=n(I1,"TFPreTrainedModel"),I1.forEach(o),Bb=n(Eu,`. 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.)`),Eu.forEach(o),Sb=p(et),Ua=r(et,"P",{});var Ju=l(Ua);Pb=n(Ju,"This model is also a "),xa=r(Ju,"A",{href:!0,rel:!0});var Z1=l(xa);Lb=n(Z1,"tf.keras.Model"),Z1.forEach(o),Qb=n(Ju,` 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.`),Ju.forEach(o),Db=p(et),k(as.$$.fragment,et),Ob=p(et),vo=r(et,"DIV",{class:!0});var vt=l(vo);k(za.$$.fragment,vt),Hb=p(vt),Ot=r(vt,"P",{});var Rd=l(Ot);Yb=n(Rd,"The "),Di=r(Rd,"A",{href:!0});var N1=l(Di);Kb=n(N1,"TFRoFormerForMaskedLM"),N1.forEach(o),eT=n(Rd," forward method, overrides the "),Sc=r(Rd,"CODE",{});var W1=l(Sc);oT=n(W1,"__call__"),W1.forEach(o),tT=n(Rd," special method."),Rd.forEach(o),nT=p(vt),k(ls.$$.fragment,vt),sT=p(vt),k(is.$$.fragment,vt),rT=p(vt),k(ds.$$.fragment,vt),vt.forEach(o),et.forEach(o),Ih=p(a),Ht=r(a,"H2",{class:!0});var Cu=l(Ht);cs=r(Cu,"A",{id:!0,class:!0,href:!0});var q1=l(cs);Pc=r(q1,"SPAN",{});var V1=l(Pc);k(Ia.$$.fragment,V1),V1.forEach(o),q1.forEach(o),aT=p(Cu),Lc=r(Cu,"SPAN",{});var A1=l(Lc);lT=n(A1,"TFRoFormerForCausalLM"),A1.forEach(o),Cu.forEach(o),Zh=p(a),po=r(a,"DIV",{class:!0});var ot=l(po);k(Za.$$.fragment,ot),iT=p(ot),Na=r(ot,"P",{});var Uu=l(Na);dT=n(Uu,"RoFormer Model with a "),Qc=r(Uu,"CODE",{});var G1=l(Qc);cT=n(G1,"language modeling"),G1.forEach(o),mT=n(Uu," head on top for CLM fine-tuning."),Uu.forEach(o),pT=p(ot),Wa=r(ot,"P",{});var xu=l(Wa);hT=n(xu,"This model inherits from "),Oi=r(xu,"A",{href:!0});var X1=l(Oi);uT=n(X1,"TFPreTrainedModel"),X1.forEach(o),fT=n(xu,`. 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.)`),xu.forEach(o),gT=p(ot),qa=r(ot,"P",{});var zu=l(qa);_T=n(zu,"This model is also a "),Va=r(zu,"A",{href:!0,rel:!0});var B1=l(Va);yT=n(B1,"tf.keras.Model"),B1.forEach(o),bT=n(zu,` 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.`),zu.forEach(o),TT=p(ot),k(ms.$$.fragment,ot),vT=p(ot),yt=r(ot,"DIV",{class:!0});var jd=l(yt);k(Aa.$$.fragment,jd),kT=p(jd),yo=r(jd,"P",{});var tt=l(yo);wT=n(tt,"labels ("),Dc=r(tt,"CODE",{});var S1=l(Dc);FT=n(S1,"tf.Tensor"),S1.forEach(o),MT=n(tt," or "),Oc=r(tt,"CODE",{});var P1=l(Oc);$T=n(P1,"np.ndarray"),P1.forEach(o),RT=n(tt," of shape "),Hc=r(tt,"CODE",{});var L1=l(Hc);jT=n(L1,"(batch_size, sequence_length)"),L1.forEach(o),ET=n(tt,", "),Yc=r(tt,"EM",{});var Q1=l(Yc);JT=n(Q1,"optional"),Q1.forEach(o),CT=n(tt,`):
Labels for computing the cross entropy classification loss. Indices should be in `),Kc=r(tt,"CODE",{});var D1=l(Kc);UT=n(D1,"[0, ..., config.vocab_size - 1]"),D1.forEach(o),xT=n(tt,"."),tt.forEach(o),zT=p(jd),k(ps.$$.fragment,jd),jd.forEach(o),ot.forEach(o),Nh=p(a),Yt=r(a,"H2",{class:!0});var Iu=l(Yt);hs=r(Iu,"A",{id:!0,class:!0,href:!0});var O1=l(hs);em=r(O1,"SPAN",{});var H1=l(em);k(Ga.$$.fragment,H1),H1.forEach(o),O1.forEach(o),IT=p(Iu),om=r(Iu,"SPAN",{});var Y1=l(om);ZT=n(Y1,"TFRoFormerForSequenceClassification"),Y1.forEach(o),Iu.forEach(o),Wh=p(a),ho=r(a,"DIV",{class:!0});var nt=l(ho);k(Xa.$$.fragment,nt),NT=p(nt),tm=r(nt,"P",{});var K1=l(tm);WT=n(K1,"RoFormer Model transformer with a sequence classification/regression head on top e.g., for GLUE tasks."),K1.forEach(o),qT=p(nt),Ba=r(nt,"P",{});var Zu=l(Ba);VT=n(Zu,"This model inherits from "),Hi=r(Zu,"A",{href:!0});var e$=l(Hi);AT=n(e$,"TFPreTrainedModel"),e$.forEach(o),GT=n(Zu,`. 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.)`),Zu.forEach(o),XT=p(nt),Sa=r(nt,"P",{});var Nu=l(Sa);BT=n(Nu,"This model is also a "),Pa=r(Nu,"A",{href:!0,rel:!0});var o$=l(Pa);ST=n(o$,"tf.keras.Model"),o$.forEach(o),PT=n(Nu,` 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.`),Nu.forEach(o),LT=p(nt),k(us.$$.fragment,nt),QT=p(nt),ko=r(nt,"DIV",{class:!0});var kt=l(ko);k(La.$$.fragment,kt),DT=p(kt),Kt=r(kt,"P",{});var Ed=l(Kt);OT=n(Ed,"The "),Yi=r(Ed,"A",{href:!0});var t$=l(Yi);HT=n(t$,"TFRoFormerForSequenceClassification"),t$.forEach(o),YT=n(Ed," forward method, overrides the "),nm=r(Ed,"CODE",{});var n$=l(nm);KT=n(n$,"__call__"),n$.forEach(o),ev=n(Ed," special method."),Ed.forEach(o),ov=p(kt),k(fs.$$.fragment,kt),tv=p(kt),k(gs.$$.fragment,kt),nv=p(kt),k(_s.$$.fragment,kt),kt.forEach(o),nt.forEach(o),qh=p(a),en=r(a,"H2",{class:!0});var Wu=l(en);ys=r(Wu,"A",{id:!0,class:!0,href:!0});var s$=l(ys);sm=r(s$,"SPAN",{});var r$=l(sm);k(Qa.$$.fragment,r$),r$.forEach(o),s$.forEach(o),sv=p(Wu),rm=r(Wu,"SPAN",{});var a$=l(rm);rv=n(a$,"TFRoFormerForMultipleChoice"),a$.forEach(o),Wu.forEach(o),Vh=p(a),uo=r(a,"DIV",{class:!0});var st=l(uo);k(Da.$$.fragment,st),av=p(st),am=r(st,"P",{});var l$=l(am);lv=n(l$,`RoFormer 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.`),l$.forEach(o),iv=p(st),Oa=r(st,"P",{});var qu=l(Oa);dv=n(qu,"This model inherits from "),Ki=r(qu,"A",{href:!0});var i$=l(Ki);cv=n(i$,"TFPreTrainedModel"),i$.forEach(o),mv=n(qu,`. 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.)`),qu.forEach(o),pv=p(st),Ha=r(st,"P",{});var Vu=l(Ha);hv=n(Vu,"This model is also a "),Ya=r(Vu,"A",{href:!0,rel:!0});var d$=l(Ya);uv=n(d$,"tf.keras.Model"),d$.forEach(o),fv=n(Vu,` 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.`),Vu.forEach(o),gv=p(st),k(bs.$$.fragment,st),_v=p(st),So=r(st,"DIV",{class:!0});var ir=l(So);k(Ka.$$.fragment,ir),yv=p(ir),on=r(ir,"P",{});var Jd=l(on);bv=n(Jd,"The "),ed=r(Jd,"A",{href:!0});var c$=l(ed);Tv=n(c$,"TFRoFormerForMultipleChoice"),c$.forEach(o),vv=n(Jd," forward method, overrides the "),lm=r(Jd,"CODE",{});var m$=l(lm);kv=n(m$,"__call__"),m$.forEach(o),wv=n(Jd," special method."),Jd.forEach(o),Fv=p(ir),k(Ts.$$.fragment,ir),Mv=p(ir),k(vs.$$.fragment,ir),ir.forEach(o),st.forEach(o),Ah=p(a),tn=r(a,"H2",{class:!0});var Au=l(tn);ks=r(Au,"A",{id:!0,class:!0,href:!0});var p$=l(ks);im=r(p$,"SPAN",{});var h$=l(im);k(el.$$.fragment,h$),h$.forEach(o),p$.forEach(o),$v=p(Au),dm=r(Au,"SPAN",{});var u$=l(dm);Rv=n(u$,"TFRoFormerForTokenClassification"),u$.forEach(o),Au.forEach(o),Gh=p(a),fo=r(a,"DIV",{class:!0});var rt=l(fo);k(ol.$$.fragment,rt),jv=p(rt),cm=r(rt,"P",{});var f$=l(cm);Ev=n(f$,`RoFormer 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.`),f$.forEach(o),Jv=p(rt),tl=r(rt,"P",{});var Gu=l(tl);Cv=n(Gu,"This model inherits from "),od=r(Gu,"A",{href:!0});var g$=l(od);Uv=n(g$,"TFPreTrainedModel"),g$.forEach(o),xv=n(Gu,`. 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.)`),Gu.forEach(o),zv=p(rt),nl=r(rt,"P",{});var Xu=l(nl);Iv=n(Xu,"This model is also a "),sl=r(Xu,"A",{href:!0,rel:!0});var _$=l(sl);Zv=n(_$,"tf.keras.Model"),_$.forEach(o),Nv=n(Xu,` 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.`),Xu.forEach(o),Wv=p(rt),k(ws.$$.fragment,rt),qv=p(rt),wo=r(rt,"DIV",{class:!0});var wt=l(wo);k(rl.$$.fragment,wt),Vv=p(wt),nn=r(wt,"P",{});var Cd=l(nn);Av=n(Cd,"The "),td=r(Cd,"A",{href:!0});var y$=l(td);Gv=n(y$,"TFRoFormerForTokenClassification"),y$.forEach(o),Xv=n(Cd," forward method, overrides the "),mm=r(Cd,"CODE",{});var b$=l(mm);Bv=n(b$,"__call__"),b$.forEach(o),Sv=n(Cd," special method."),Cd.forEach(o),Pv=p(wt),k(Fs.$$.fragment,wt),Lv=p(wt),k(Ms.$$.fragment,wt),Qv=p(wt),k($s.$$.fragment,wt),wt.forEach(o),rt.forEach(o),Xh=p(a),sn=r(a,"H2",{class:!0});var Bu=l(sn);Rs=r(Bu,"A",{id:!0,class:!0,href:!0});var T$=l(Rs);pm=r(T$,"SPAN",{});var v$=l(pm);k(al.$$.fragment,v$),v$.forEach(o),T$.forEach(o),Dv=p(Bu),hm=r(Bu,"SPAN",{});var k$=l(hm);Ov=n(k$,"TFRoFormerForQuestionAnswering"),k$.forEach(o),Bu.forEach(o),Bh=p(a),go=r(a,"DIV",{class:!0});var at=l(go);k(ll.$$.fragment,at),Hv=p(at),rn=r(at,"P",{});var Ud=l(rn);Yv=n(Ud,`RoFormer Model with a span classification head on top for extractive question-answering tasks like SQuAD (a linear
layer on top of the hidden-states output to compute `),um=r(Ud,"CODE",{});var w$=l(um);Kv=n(w$,"span start logits"),w$.forEach(o),ek=n(Ud," and "),fm=r(Ud,"CODE",{});var F$=l(fm);ok=n(F$,"span end logits"),F$.forEach(o),tk=n(Ud,")."),Ud.forEach(o),nk=p(at),il=r(at,"P",{});var Su=l(il);sk=n(Su,"This model inherits from "),nd=r(Su,"A",{href:!0});var M$=l(nd);rk=n(M$,"TFPreTrainedModel"),M$.forEach(o),ak=n(Su,`. 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.)`),Su.forEach(o),lk=p(at),dl=r(at,"P",{});var Pu=l(dl);ik=n(Pu,"This model is also a "),cl=r(Pu,"A",{href:!0,rel:!0});var $$=l(cl);dk=n($$,"tf.keras.Model"),$$.forEach(o),ck=n(Pu,` 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.`),Pu.forEach(o),mk=p(at),k(js.$$.fragment,at),pk=p(at),Fo=r(at,"DIV",{class:!0});var Ft=l(Fo);k(ml.$$.fragment,Ft),hk=p(Ft),an=r(Ft,"P",{});var xd=l(an);uk=n(xd,"The "),sd=r(xd,"A",{href:!0});var R$=l(sd);fk=n(R$,"TFRoFormerForQuestionAnswering"),R$.forEach(o),gk=n(xd," forward method, overrides the "),gm=r(xd,"CODE",{});var j$=l(gm);_k=n(j$,"__call__"),j$.forEach(o),yk=n(xd," special method."),xd.forEach(o),bk=p(Ft),k(Es.$$.fragment,Ft),Tk=p(Ft),k(Js.$$.fragment,Ft),vk=p(Ft),k(Cs.$$.fragment,Ft),Ft.forEach(o),at.forEach(o),Sh=p(a),ln=r(a,"H2",{class:!0});var Lu=l(ln);Us=r(Lu,"A",{id:!0,class:!0,href:!0});var E$=l(Us);_m=r(E$,"SPAN",{});var J$=l(_m);k(pl.$$.fragment,J$),J$.forEach(o),E$.forEach(o),kk=p(Lu),ym=r(Lu,"SPAN",{});var C$=l(ym);wk=n(C$,"FlaxRoFormerModel"),C$.forEach(o),Lu.forEach(o),Ph=p(a),eo=r(a,"DIV",{class:!0});var $o=l(eo);k(hl.$$.fragment,$o),Fk=p($o),bm=r($o,"P",{});var U$=l(bm);Mk=n(U$,"The bare RoFormer Model transformer outputting raw hidden-states without any specific head on top."),U$.forEach(o),$k=p($o),ul=r($o,"P",{});var Qu=l(ul);Rk=n(Qu,"This model inherits from "),rd=r(Qu,"A",{href:!0});var x$=l(rd);jk=n(x$,"FlaxPreTrainedModel"),x$.forEach(o),Ek=n(Qu,`. 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)`),Qu.forEach(o),Jk=p($o),fl=r($o,"P",{});var Du=l(fl);Ck=n(Du,"This model is also a Flax Linen "),gl=r(Du,"A",{href:!0,rel:!0});var z$=l(gl);Uk=n(z$,"flax.linen.Module"),z$.forEach(o),xk=n(Du,`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),Du.forEach(o),zk=p($o),Tm=r($o,"P",{});var I$=l(Tm);Ik=n(I$,"Finally, this model supports inherent JAX features such as:"),I$.forEach(o),Zk=p($o),dt=r($o,"UL",{});var dr=l(dt);vm=r(dr,"LI",{});var Z$=l(vm);_l=r(Z$,"A",{href:!0,rel:!0});var N$=l(_l);Nk=n(N$,"Just-In-Time (JIT) compilation"),N$.forEach(o),Z$.forEach(o),Wk=p(dr),km=r(dr,"LI",{});var W$=l(km);yl=r(W$,"A",{href:!0,rel:!0});var q$=l(yl);qk=n(q$,"Automatic Differentiation"),q$.forEach(o),W$.forEach(o),Vk=p(dr),wm=r(dr,"LI",{});var V$=l(wm);bl=r(V$,"A",{href:!0,rel:!0});var A$=l(bl);Ak=n(A$,"Vectorization"),A$.forEach(o),V$.forEach(o),Gk=p(dr),Fm=r(dr,"LI",{});var G$=l(Fm);Tl=r(G$,"A",{href:!0,rel:!0});var X$=l(Tl);Xk=n(X$,"Parallelization"),X$.forEach(o),G$.forEach(o),dr.forEach(o),Bk=p($o),Po=r($o,"DIV",{class:!0});var cr=l(Po);k(vl.$$.fragment,cr),Sk=p(cr),dn=r(cr,"P",{});var zd=l(dn);Pk=n(zd,"The "),Mm=r(zd,"CODE",{});var B$=l(Mm);Lk=n(B$,"FlaxRoFormerPreTrainedModel"),B$.forEach(o),Qk=n(zd," forward method, overrides the "),$m=r(zd,"CODE",{});var S$=l($m);Dk=n(S$,"__call__"),S$.forEach(o),Ok=n(zd," special method."),zd.forEach(o),Hk=p(cr),k(xs.$$.fragment,cr),Yk=p(cr),k(zs.$$.fragment,cr),cr.forEach(o),$o.forEach(o),Lh=p(a),cn=r(a,"H2",{class:!0});var Ou=l(cn);Is=r(Ou,"A",{id:!0,class:!0,href:!0});var P$=l(Is);Rm=r(P$,"SPAN",{});var L$=l(Rm);k(kl.$$.fragment,L$),L$.forEach(o),P$.forEach(o),Kk=p(Ou),jm=r(Ou,"SPAN",{});var Q$=l(jm);ew=n(Q$,"FlaxRoFormerForMaskedLM"),Q$.forEach(o),Ou.forEach(o),Qh=p(a),oo=r(a,"DIV",{class:!0});var Ro=l(oo);k(wl.$$.fragment,Ro),ow=p(Ro),Fl=r(Ro,"P",{});var Hu=l(Fl);tw=n(Hu,"RoFormer Model with a "),Em=r(Hu,"CODE",{});var D$=l(Em);nw=n(D$,"language modeling"),D$.forEach(o),sw=n(Hu," head on top."),Hu.forEach(o),rw=p(Ro),Ml=r(Ro,"P",{});var Yu=l(Ml);aw=n(Yu,"This model inherits from "),ad=r(Yu,"A",{href:!0});var O$=l(ad);lw=n(O$,"FlaxPreTrainedModel"),O$.forEach(o),iw=n(Yu,`. 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)`),Yu.forEach(o),dw=p(Ro),$l=r(Ro,"P",{});var Ku=l($l);cw=n(Ku,"This model is also a Flax Linen "),Rl=r(Ku,"A",{href:!0,rel:!0});var H$=l(Rl);mw=n(H$,"flax.linen.Module"),H$.forEach(o),pw=n(Ku,`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),Ku.forEach(o),hw=p(Ro),Jm=r(Ro,"P",{});var Y$=l(Jm);uw=n(Y$,"Finally, this model supports inherent JAX features such as:"),Y$.forEach(o),fw=p(Ro),ct=r(Ro,"UL",{});var mr=l(ct);Cm=r(mr,"LI",{});var K$=l(Cm);jl=r(K$,"A",{href:!0,rel:!0});var e0=l(jl);gw=n(e0,"Just-In-Time (JIT) compilation"),e0.forEach(o),K$.forEach(o),_w=p(mr),Um=r(mr,"LI",{});var o0=l(Um);El=r(o0,"A",{href:!0,rel:!0});var t0=l(El);yw=n(t0,"Automatic Differentiation"),t0.forEach(o),o0.forEach(o),bw=p(mr),xm=r(mr,"LI",{});var n0=l(xm);Jl=r(n0,"A",{href:!0,rel:!0});var s0=l(Jl);Tw=n(s0,"Vectorization"),s0.forEach(o),n0.forEach(o),vw=p(mr),zm=r(mr,"LI",{});var r0=l(zm);Cl=r(r0,"A",{href:!0,rel:!0});var a0=l(Cl);kw=n(a0,"Parallelization"),a0.forEach(o),r0.forEach(o),mr.forEach(o),ww=p(Ro),Lo=r(Ro,"DIV",{class:!0});var pr=l(Lo);k(Ul.$$.fragment,pr),Fw=p(pr),mn=r(pr,"P",{});var Id=l(mn);Mw=n(Id,"The "),Im=r(Id,"CODE",{});var l0=l(Im);$w=n(l0,"FlaxRoFormerPreTrainedModel"),l0.forEach(o),Rw=n(Id," forward method, overrides the "),Zm=r(Id,"CODE",{});var i0=l(Zm);jw=n(i0,"__call__"),i0.forEach(o),Ew=n(Id," special method."),Id.forEach(o),Jw=p(pr),k(Zs.$$.fragment,pr),Cw=p(pr),k(Ns.$$.fragment,pr),pr.forEach(o),Ro.forEach(o),Dh=p(a),pn=r(a,"H2",{class:!0});var ef=l(pn);Ws=r(ef,"A",{id:!0,class:!0,href:!0});var d0=l(Ws);Nm=r(d0,"SPAN",{});var c0=l(Nm);k(xl.$$.fragment,c0),c0.forEach(o),d0.forEach(o),Uw=p(ef),Wm=r(ef,"SPAN",{});var m0=l(Wm);xw=n(m0,"FlaxRoFormerForSequenceClassification"),m0.forEach(o),ef.forEach(o),Oh=p(a),to=r(a,"DIV",{class:!0});var jo=l(to);k(zl.$$.fragment,jo),zw=p(jo),qm=r(jo,"P",{});var p0=l(qm);Iw=n(p0,`RoFormer Model transformer with a sequence classification/regression head on top (a linear layer on top of the
pooled output) e.g. for GLUE tasks.`),p0.forEach(o),Zw=p(jo),Il=r(jo,"P",{});var of=l(Il);Nw=n(of,"This model inherits from "),ld=r(of,"A",{href:!0});var h0=l(ld);Ww=n(h0,"FlaxPreTrainedModel"),h0.forEach(o),qw=n(of,`. 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)`),of.forEach(o),Vw=p(jo),Zl=r(jo,"P",{});var tf=l(Zl);Aw=n(tf,"This model is also a Flax Linen "),Nl=r(tf,"A",{href:!0,rel:!0});var u0=l(Nl);Gw=n(u0,"flax.linen.Module"),u0.forEach(o),Xw=n(tf,`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),tf.forEach(o),Bw=p(jo),Vm=r(jo,"P",{});var f0=l(Vm);Sw=n(f0,"Finally, this model supports inherent JAX features such as:"),f0.forEach(o),Pw=p(jo),mt=r(jo,"UL",{});var hr=l(mt);Am=r(hr,"LI",{});var g0=l(Am);Wl=r(g0,"A",{href:!0,rel:!0});var _0=l(Wl);Lw=n(_0,"Just-In-Time (JIT) compilation"),_0.forEach(o),g0.forEach(o),Qw=p(hr),Gm=r(hr,"LI",{});var y0=l(Gm);ql=r(y0,"A",{href:!0,rel:!0});var b0=l(ql);Dw=n(b0,"Automatic Differentiation"),b0.forEach(o),y0.forEach(o),Ow=p(hr),Xm=r(hr,"LI",{});var T0=l(Xm);Vl=r(T0,"A",{href:!0,rel:!0});var v0=l(Vl);Hw=n(v0,"Vectorization"),v0.forEach(o),T0.forEach(o),Yw=p(hr),Bm=r(hr,"LI",{});var k0=l(Bm);Al=r(k0,"A",{href:!0,rel:!0});var w0=l(Al);Kw=n(w0,"Parallelization"),w0.forEach(o),k0.forEach(o),hr.forEach(o),eF=p(jo),Qo=r(jo,"DIV",{class:!0});var ur=l(Qo);k(Gl.$$.fragment,ur),oF=p(ur),hn=r(ur,"P",{});var Zd=l(hn);tF=n(Zd,"The "),Sm=r(Zd,"CODE",{});var F0=l(Sm);nF=n(F0,"FlaxRoFormerPreTrainedModel"),F0.forEach(o),sF=n(Zd," forward method, overrides the "),Pm=r(Zd,"CODE",{});var M0=l(Pm);rF=n(M0,"__call__"),M0.forEach(o),aF=n(Zd," special method."),Zd.forEach(o),lF=p(ur),k(qs.$$.fragment,ur),iF=p(ur),k(Vs.$$.fragment,ur),ur.forEach(o),jo.forEach(o),Hh=p(a),un=r(a,"H2",{class:!0});var nf=l(un);As=r(nf,"A",{id:!0,class:!0,href:!0});var $0=l(As);Lm=r($0,"SPAN",{});var R0=l(Lm);k(Xl.$$.fragment,R0),R0.forEach(o),$0.forEach(o),dF=p(nf),Qm=r(nf,"SPAN",{});var j0=l(Qm);cF=n(j0,"FlaxRoFormerForMultipleChoice"),j0.forEach(o),nf.forEach(o),Yh=p(a),no=r(a,"DIV",{class:!0});var Eo=l(no);k(Bl.$$.fragment,Eo),mF=p(Eo),Dm=r(Eo,"P",{});var E0=l(Dm);pF=n(E0,`RoFormer 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.`),E0.forEach(o),hF=p(Eo),Sl=r(Eo,"P",{});var sf=l(Sl);uF=n(sf,"This model inherits from "),id=r(sf,"A",{href:!0});var J0=l(id);fF=n(J0,"FlaxPreTrainedModel"),J0.forEach(o),gF=n(sf,`. 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)`),sf.forEach(o),_F=p(Eo),Pl=r(Eo,"P",{});var rf=l(Pl);yF=n(rf,"This model is also a Flax Linen "),Ll=r(rf,"A",{href:!0,rel:!0});var C0=l(Ll);bF=n(C0,"flax.linen.Module"),C0.forEach(o),TF=n(rf,`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),rf.forEach(o),vF=p(Eo),Om=r(Eo,"P",{});var U0=l(Om);kF=n(U0,"Finally, this model supports inherent JAX features such as:"),U0.forEach(o),wF=p(Eo),pt=r(Eo,"UL",{});var fr=l(pt);Hm=r(fr,"LI",{});var x0=l(Hm);Ql=r(x0,"A",{href:!0,rel:!0});var z0=l(Ql);FF=n(z0,"Just-In-Time (JIT) compilation"),z0.forEach(o),x0.forEach(o),MF=p(fr),Ym=r(fr,"LI",{});var I0=l(Ym);Dl=r(I0,"A",{href:!0,rel:!0});var Z0=l(Dl);$F=n(Z0,"Automatic Differentiation"),Z0.forEach(o),I0.forEach(o),RF=p(fr),Km=r(fr,"LI",{});var N0=l(Km);Ol=r(N0,"A",{href:!0,rel:!0});var W0=l(Ol);jF=n(W0,"Vectorization"),W0.forEach(o),N0.forEach(o),EF=p(fr),ep=r(fr,"LI",{});var q0=l(ep);Hl=r(q0,"A",{href:!0,rel:!0});var V0=l(Hl);JF=n(V0,"Parallelization"),V0.forEach(o),q0.forEach(o),fr.forEach(o),CF=p(Eo),Do=r(Eo,"DIV",{class:!0});var gr=l(Do);k(Yl.$$.fragment,gr),UF=p(gr),fn=r(gr,"P",{});var Nd=l(fn);xF=n(Nd,"The "),op=r(Nd,"CODE",{});var A0=l(op);zF=n(A0,"FlaxRoFormerPreTrainedModel"),A0.forEach(o),IF=n(Nd," forward method, overrides the "),tp=r(Nd,"CODE",{});var G0=l(tp);ZF=n(G0,"__call__"),G0.forEach(o),NF=n(Nd," special method."),Nd.forEach(o),WF=p(gr),k(Gs.$$.fragment,gr),qF=p(gr),k(Xs.$$.fragment,gr),gr.forEach(o),Eo.forEach(o),Kh=p(a),gn=r(a,"H2",{class:!0});var af=l(gn);Bs=r(af,"A",{id:!0,class:!0,href:!0});var X0=l(Bs);np=r(X0,"SPAN",{});var B0=l(np);k(Kl.$$.fragment,B0),B0.forEach(o),X0.forEach(o),VF=p(af),sp=r(af,"SPAN",{});var S0=l(sp);AF=n(S0,"FlaxRoFormerForTokenClassification"),S0.forEach(o),af.forEach(o),eu=p(a),so=r(a,"DIV",{class:!0});var Jo=l(so);k(ei.$$.fragment,Jo),GF=p(Jo),rp=r(Jo,"P",{});var P0=l(rp);XF=n(P0,`RoFormer 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.`),P0.forEach(o),BF=p(Jo),oi=r(Jo,"P",{});var lf=l(oi);SF=n(lf,"This model inherits from "),dd=r(lf,"A",{href:!0});var L0=l(dd);PF=n(L0,"FlaxPreTrainedModel"),L0.forEach(o),LF=n(lf,`. 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)`),lf.forEach(o),QF=p(Jo),ti=r(Jo,"P",{});var df=l(ti);DF=n(df,"This model is also a Flax Linen "),ni=r(df,"A",{href:!0,rel:!0});var Q0=l(ni);OF=n(Q0,"flax.linen.Module"),Q0.forEach(o),HF=n(df,`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),df.forEach(o),YF=p(Jo),ap=r(Jo,"P",{});var D0=l(ap);KF=n(D0,"Finally, this model supports inherent JAX features such as:"),D0.forEach(o),eM=p(Jo),ht=r(Jo,"UL",{});var _r=l(ht);lp=r(_r,"LI",{});var O0=l(lp);si=r(O0,"A",{href:!0,rel:!0});var H0=l(si);oM=n(H0,"Just-In-Time (JIT) compilation"),H0.forEach(o),O0.forEach(o),tM=p(_r),ip=r(_r,"LI",{});var Y0=l(ip);ri=r(Y0,"A",{href:!0,rel:!0});var K0=l(ri);nM=n(K0,"Automatic Differentiation"),K0.forEach(o),Y0.forEach(o),sM=p(_r),dp=r(_r,"LI",{});var eR=l(dp);ai=r(eR,"A",{href:!0,rel:!0});var oR=l(ai);rM=n(oR,"Vectorization"),oR.forEach(o),eR.forEach(o),aM=p(_r),cp=r(_r,"LI",{});var tR=l(cp);li=r(tR,"A",{href:!0,rel:!0});var nR=l(li);lM=n(nR,"Parallelization"),nR.forEach(o),tR.forEach(o),_r.forEach(o),iM=p(Jo),Oo=r(Jo,"DIV",{class:!0});var yr=l(Oo);k(ii.$$.fragment,yr),dM=p(yr),_n=r(yr,"P",{});var Wd=l(_n);cM=n(Wd,"The "),mp=r(Wd,"CODE",{});var sR=l(mp);mM=n(sR,"FlaxRoFormerPreTrainedModel"),sR.forEach(o),pM=n(Wd," forward method, overrides the "),pp=r(Wd,"CODE",{});var rR=l(pp);hM=n(rR,"__call__"),rR.forEach(o),uM=n(Wd," special method."),Wd.forEach(o),fM=p(yr),k(Ss.$$.fragment,yr),gM=p(yr),k(Ps.$$.fragment,yr),yr.forEach(o),Jo.forEach(o),ou=p(a),yn=r(a,"H2",{class:!0});var cf=l(yn);Ls=r(cf,"A",{id:!0,class:!0,href:!0});var aR=l(Ls);hp=r(aR,"SPAN",{});var lR=l(hp);k(di.$$.fragment,lR),lR.forEach(o),aR.forEach(o),_M=p(cf),up=r(cf,"SPAN",{});var iR=l(up);yM=n(iR,"FlaxRoFormerForQuestionAnswering"),iR.forEach(o),cf.forEach(o),tu=p(a),ro=r(a,"DIV",{class:!0});var Co=l(ro);k(ci.$$.fragment,Co),bM=p(Co),bn=r(Co,"P",{});var qd=l(bn);TM=n(qd,`RoFormer 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 `),fp=r(qd,"CODE",{});var dR=l(fp);vM=n(dR,"span start logits"),dR.forEach(o),kM=n(qd," and "),gp=r(qd,"CODE",{});var cR=l(gp);wM=n(cR,"span end logits"),cR.forEach(o),FM=n(qd,")."),qd.forEach(o),MM=p(Co),mi=r(Co,"P",{});var mf=l(mi);$M=n(mf,"This model inherits from "),cd=r(mf,"A",{href:!0});var mR=l(cd);RM=n(mR,"FlaxPreTrainedModel"),mR.forEach(o),jM=n(mf,`. 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)`),mf.forEach(o),EM=p(Co),pi=r(Co,"P",{});var pf=l(pi);JM=n(pf,"This model is also a Flax Linen "),hi=r(pf,"A",{href:!0,rel:!0});var pR=l(hi);CM=n(pR,"flax.linen.Module"),pR.forEach(o),UM=n(pf,`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),pf.forEach(o),xM=p(Co),_p=r(Co,"P",{});var hR=l(_p);zM=n(hR,"Finally, this model supports inherent JAX features such as:"),hR.forEach(o),IM=p(Co),ut=r(Co,"UL",{});var br=l(ut);yp=r(br,"LI",{});var uR=l(yp);ui=r(uR,"A",{href:!0,rel:!0});var fR=l(ui);ZM=n(fR,"Just-In-Time (JIT) compilation"),fR.forEach(o),uR.forEach(o),NM=p(br),bp=r(br,"LI",{});var gR=l(bp);fi=r(gR,"A",{href:!0,rel:!0});var _R=l(fi);WM=n(_R,"Automatic Differentiation"),_R.forEach(o),gR.forEach(o),qM=p(br),Tp=r(br,"LI",{});var yR=l(Tp);gi=r(yR,"A",{href:!0,rel:!0});var bR=l(gi);VM=n(bR,"Vectorization"),bR.forEach(o),yR.forEach(o),AM=p(br),vp=r(br,"LI",{});var TR=l(vp);_i=r(TR,"A",{href:!0,rel:!0});var vR=l(_i);GM=n(vR,"Parallelization"),vR.forEach(o),TR.forEach(o),br.forEach(o),XM=p(Co),Ho=r(Co,"DIV",{class:!0});var Tr=l(Ho);k(yi.$$.fragment,Tr),BM=p(Tr),Tn=r(Tr,"P",{});var Vd=l(Tn);SM=n(Vd,"The "),kp=r(Vd,"CODE",{});var kR=l(kp);PM=n(kR,"FlaxRoFormerPreTrainedModel"),kR.forEach(o),LM=n(Vd," forward method, overrides the "),wp=r(Vd,"CODE",{});var wR=l(wp);QM=n(wR,"__call__"),wR.forEach(o),DM=n(Vd," special method."),Vd.forEach(o),OM=p(Tr),k(Qs.$$.fragment,Tr),HM=p(Tr),k(Ds.$$.fragment,Tr),Tr.forEach(o),Co.forEach(o),this.h()},h(){f(d,"name","hf:doc:metadata"),f(d,"content",JSON.stringify(Cj)),f(u,"id","roformer"),f(u,"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"),f(u,"href","#roformer"),f(h,"class","relative group"),f(ae,"id","overview"),f(ae,"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"),f(ae,"href","#overview"),f(q,"class","relative group"),f(le,"href","https://arxiv.org/pdf/2104.09864v1.pdf"),f(le,"rel","nofollow"),f(z,"href","https://huggingface.co/junnyu"),f(z,"rel","nofollow"),f(ie,"href","https://github.com/ZhuiyiTechnology/roformer"),f(ie,"rel","nofollow"),f(N,"id","documentation-resources"),f(N,"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"),f(N,"href","#documentation-resources"),f(re,"class","relative group"),f(de,"href","../tasks/sequence_classification"),f(K,"href","../tasks/token_classification"),f(We,"href","../tasks/question_answering"),f(qe,"href","../tasks/language_modeling"),f(Ve,"href","../tasks/masked_language_modeling"),f(ce,"href","../tasks/multiple_choice"),f(Fn,"id","transformers.RoFormerConfig"),f(Fn,"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"),f(Fn,"href","#transformers.RoFormerConfig"),f(ze,"class","relative group"),f(Ri,"href","/docs/transformers/main/en/model_doc/roformer#transformers.RoFormerModel"),f(wr,"href","https://huggingface.co/junnyu/roformer_chinese_base"),f(wr,"rel","nofollow"),f(ji,"href","/docs/transformers/main/en/main_classes/configuration#transformers.PretrainedConfig"),f(Ei,"href","/docs/transformers/main/en/main_classes/configuration#transformers.PretrainedConfig"),f(Uo,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f($n,"id","transformers.RoFormerTokenizer"),f($n,"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"),f($n,"href","#transformers.RoFormerTokenizer"),f(Rt,"class","relative group"),f(Rr,"href","https://pypi.org/project/rjieba/"),f(Rr,"rel","nofollow"),f(Ji,"href","/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizer"),f(gt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(jn,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(No,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(xi,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(Ke,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(Jn,"id","transformers.RoFormerTokenizerFast"),f(Jn,"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"),f(Jn,"href","#transformers.RoFormerTokenizerFast"),f(Et,"class","relative group"),f(zi,"href","/docs/transformers/main/en/model_doc/roformer#transformers.RoFormerTokenizerFast"),f(Ii,"href","/docs/transformers/main/en/model_doc/bert#transformers.BertTokenizerFast"),f(Zi,"href","/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast"),f(_t,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(lo,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(xn,"id","transformers.RoFormerModel"),f(xn,"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"),f(xn,"href","#transformers.RoFormerModel"),f(Jt,"class","relative group"),f(Br,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),f(Br,"rel","nofollow"),f(Pr,"href","https://arxiv.org/abs/1706.03762"),f(Pr,"rel","nofollow"),f(qi,"href","/docs/transformers/main/en/model_doc/roformer#transformers.RoFormerModel"),f(Wo,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(_o,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(Zn,"id","transformers.RoFormerForCausalLM"),f(Zn,"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"),f(Zn,"href","#transformers.RoFormerForCausalLM"),f(Ut,"class","relative group"),f(Or,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),f(Or,"rel","nofollow"),f(Vi,"href","/docs/transformers/main/en/model_doc/roformer#transformers.RoFormerForCausalLM"),f(qo,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(lt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(qn,"id","transformers.RoFormerForMaskedLM"),f(qn,"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"),f(qn,"href","#transformers.RoFormerForMaskedLM"),f(It,"class","relative group"),f(ea,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),f(ea,"rel","nofollow"),f(Ai,"href","/docs/transformers/main/en/model_doc/roformer#transformers.RoFormerForMaskedLM"),f(Vo,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(it,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(Gn,"id","transformers.RoFormerForSequenceClassification"),f(Gn,"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"),f(Gn,"href","#transformers.RoFormerForSequenceClassification"),f(Wt,"class","relative group"),f(ra,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),f(ra,"rel","nofollow"),f(Gi,"href","/docs/transformers/main/en/model_doc/roformer#transformers.RoFormerForSequenceClassification"),f(To,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(xo,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(Pn,"id","transformers.RoFormerForMultipleChoice"),f(Pn,"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"),f(Pn,"href","#transformers.RoFormerForMultipleChoice"),f(Vt,"class","relative group"),f(ca,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),f(ca,"rel","nofollow"),f(Xi,"href","/docs/transformers/main/en/model_doc/roformer#transformers.RoFormerForMultipleChoice"),f(Ao,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(zo,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(Dn,"id","transformers.RoFormerForTokenClassification"),f(Dn,"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"),f(Dn,"href","#transformers.RoFormerForTokenClassification"),f(Gt,"class","relative group"),f(fa,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),f(fa,"rel","nofollow"),f(Bi,"href","/docs/transformers/main/en/model_doc/roformer#transformers.RoFormerForTokenClassification"),f(Go,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(Io,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(Yn,"id","transformers.RoFormerForQuestionAnswering"),f(Yn,"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"),f(Yn,"href","#transformers.RoFormerForQuestionAnswering"),f(Bt,"class","relative group"),f(Ta,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),f(Ta,"rel","nofollow"),f(Si,"href","/docs/transformers/main/en/model_doc/roformer#transformers.RoFormerForQuestionAnswering"),f(Xo,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(Zo,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(os,"id","transformers.TFRoFormerModel"),f(os,"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"),f(os,"href","#transformers.TFRoFormerModel"),f(Lt,"class","relative group"),f(Pi,"href","/docs/transformers/main/en/main_classes/model#transformers.TFPreTrainedModel"),f($a,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),f($a,"rel","nofollow"),f(Li,"href","/docs/transformers/main/en/model_doc/roformer#transformers.TFRoFormerModel"),f(Bo,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(co,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(rs,"id","transformers.TFRoFormerForMaskedLM"),f(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"),f(rs,"href","#transformers.TFRoFormerForMaskedLM"),f(Dt,"class","relative group"),f(Qi,"href","/docs/transformers/main/en/main_classes/model#transformers.TFPreTrainedModel"),f(xa,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),f(xa,"rel","nofollow"),f(Di,"href","/docs/transformers/main/en/model_doc/roformer#transformers.TFRoFormerForMaskedLM"),f(vo,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(mo,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(cs,"id","transformers.TFRoFormerForCausalLM"),f(cs,"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"),f(cs,"href","#transformers.TFRoFormerForCausalLM"),f(Ht,"class","relative group"),f(Oi,"href","/docs/transformers/main/en/main_classes/model#transformers.TFPreTrainedModel"),f(Va,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),f(Va,"rel","nofollow"),f(yt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(po,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(hs,"id","transformers.TFRoFormerForSequenceClassification"),f(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"),f(hs,"href","#transformers.TFRoFormerForSequenceClassification"),f(Yt,"class","relative group"),f(Hi,"href","/docs/transformers/main/en/main_classes/model#transformers.TFPreTrainedModel"),f(Pa,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),f(Pa,"rel","nofollow"),f(Yi,"href","/docs/transformers/main/en/model_doc/roformer#transformers.TFRoFormerForSequenceClassification"),f(ko,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(ho,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(ys,"id","transformers.TFRoFormerForMultipleChoice"),f(ys,"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"),f(ys,"href","#transformers.TFRoFormerForMultipleChoice"),f(en,"class","relative group"),f(Ki,"href","/docs/transformers/main/en/main_classes/model#transformers.TFPreTrainedModel"),f(Ya,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),f(Ya,"rel","nofollow"),f(ed,"href","/docs/transformers/main/en/model_doc/roformer#transformers.TFRoFormerForMultipleChoice"),f(So,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(uo,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(ks,"id","transformers.TFRoFormerForTokenClassification"),f(ks,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),f(ks,"href","#transformers.TFRoFormerForTokenClassification"),f(tn,"class","relative group"),f(od,"href","/docs/transformers/main/en/main_classes/model#transformers.TFPreTrainedModel"),f(sl,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),f(sl,"rel","nofollow"),f(td,"href","/docs/transformers/main/en/model_doc/roformer#transformers.TFRoFormerForTokenClassification"),f(wo,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(fo,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(Rs,"id","transformers.TFRoFormerForQuestionAnswering"),f(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"),f(Rs,"href","#transformers.TFRoFormerForQuestionAnswering"),f(sn,"class","relative group"),f(nd,"href","/docs/transformers/main/en/main_classes/model#transformers.TFPreTrainedModel"),f(cl,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),f(cl,"rel","nofollow"),f(sd,"href","/docs/transformers/main/en/model_doc/roformer#transformers.TFRoFormerForQuestionAnswering"),f(Fo,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(go,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(Us,"id","transformers.FlaxRoFormerModel"),f(Us,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),f(Us,"href","#transformers.FlaxRoFormerModel"),f(ln,"class","relative group"),f(rd,"href","/docs/transformers/main/en/main_classes/model#transformers.FlaxPreTrainedModel"),f(gl,"href","https://flax.readthedocs.io/en/latest/flax.linen.html#module"),f(gl,"rel","nofollow"),f(_l,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),f(_l,"rel","nofollow"),f(yl,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),f(yl,"rel","nofollow"),f(bl,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),f(bl,"rel","nofollow"),f(Tl,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),f(Tl,"rel","nofollow"),f(Po,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(eo,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(Is,"id","transformers.FlaxRoFormerForMaskedLM"),f(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"),f(Is,"href","#transformers.FlaxRoFormerForMaskedLM"),f(cn,"class","relative group"),f(ad,"href","/docs/transformers/main/en/main_classes/model#transformers.FlaxPreTrainedModel"),f(Rl,"href","https://flax.readthedocs.io/en/latest/flax.linen.html#module"),f(Rl,"rel","nofollow"),f(jl,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),f(jl,"rel","nofollow"),f(El,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),f(El,"rel","nofollow"),f(Jl,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),f(Jl,"rel","nofollow"),f(Cl,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),f(Cl,"rel","nofollow"),f(Lo,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(oo,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(Ws,"id","transformers.FlaxRoFormerForSequenceClassification"),f(Ws,"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"),f(Ws,"href","#transformers.FlaxRoFormerForSequenceClassification"),f(pn,"class","relative group"),f(ld,"href","/docs/transformers/main/en/main_classes/model#transformers.FlaxPreTrainedModel"),f(Nl,"href","https://flax.readthedocs.io/en/latest/flax.linen.html#module"),f(Nl,"rel","nofollow"),f(Wl,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),f(Wl,"rel","nofollow"),f(ql,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),f(ql,"rel","nofollow"),f(Vl,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),f(Vl,"rel","nofollow"),f(Al,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),f(Al,"rel","nofollow"),f(Qo,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(to,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(As,"id","transformers.FlaxRoFormerForMultipleChoice"),f(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"),f(As,"href","#transformers.FlaxRoFormerForMultipleChoice"),f(un,"class","relative group"),f(id,"href","/docs/transformers/main/en/main_classes/model#transformers.FlaxPreTrainedModel"),f(Ll,"href","https://flax.readthedocs.io/en/latest/flax.linen.html#module"),f(Ll,"rel","nofollow"),f(Ql,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),f(Ql,"rel","nofollow"),f(Dl,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),f(Dl,"rel","nofollow"),f(Ol,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),f(Ol,"rel","nofollow"),f(Hl,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),f(Hl,"rel","nofollow"),f(Do,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(no,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(Bs,"id","transformers.FlaxRoFormerForTokenClassification"),f(Bs,"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"),f(Bs,"href","#transformers.FlaxRoFormerForTokenClassification"),f(gn,"class","relative group"),f(dd,"href","/docs/transformers/main/en/main_classes/model#transformers.FlaxPreTrainedModel"),f(ni,"href","https://flax.readthedocs.io/en/latest/flax.linen.html#module"),f(ni,"rel","nofollow"),f(si,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),f(si,"rel","nofollow"),f(ri,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),f(ri,"rel","nofollow"),f(ai,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),f(ai,"rel","nofollow"),f(li,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),f(li,"rel","nofollow"),f(Oo,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(so,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(Ls,"id","transformers.FlaxRoFormerForQuestionAnswering"),f(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"),f(Ls,"href","#transformers.FlaxRoFormerForQuestionAnswering"),f(yn,"class","relative group"),f(cd,"href","/docs/transformers/main/en/main_classes/model#transformers.FlaxPreTrainedModel"),f(hi,"href","https://flax.readthedocs.io/en/latest/flax.linen.html#module"),f(hi,"rel","nofollow"),f(ui,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),f(ui,"rel","nofollow"),f(fi,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),f(fi,"rel","nofollow"),f(gi,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),f(gi,"rel","nofollow"),f(_i,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),f(_i,"rel","nofollow"),f(Ho,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(ro,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(a,b){e(document.head,d),g(a,y,b),g(a,h,b),e(h,u),e(u,_),w(i,_,null),e(h,c),e(h,J),e(J,ke),g(a,fe,b),g(a,q,b),e(q,ae),e(ae,ee),w(R,ee,null),e(q,we),e(q,P),e(P,Fe),g(a,ge,b),g(a,V,b),e(V,Me),e(V,le),e(le,Q),e(V,$e),g(a,_e,b),g(a,G,b),e(G,Re),g(a,ye,b),g(a,X,b),e(X,me),e(me,je),g(a,te,b),g(a,U,b),e(U,I),g(a,be,b),g(a,B,b),e(B,pe),e(pe,Ee),g(a,L,b),g(a,se,b),e(se,Je),e(se,z),e(z,Ce),e(se,D),e(se,ie),e(ie,Ue),e(se,O),g(a,Te,b),g(a,re,b),e(re,N),e(N,he),w(A,he,null),e(re,xe),e(re,oe),e(oe,Z),g(a,ve,b),g(a,x,b),e(x,ue),e(ue,de),e(de,T),e(x,E),e(x,Ae),e(Ae,K),e(K,Le),e(x,Qe),e(x,C),e(C,We),e(We,De),e(x,Oe),e(x,Ge),e(Ge,qe),e(qe,W),e(x,H),e(x,Xe),e(Xe,Ve),e(Ve,Y),e(x,He),e(x,Be),e(Be,ce),e(ce,Ye),g(a,ne,b),g(a,ze,b),e(ze,Fn),e(Fn,Ad),w(vr,Ad,null),e(ze,hf),e(ze,Gd),e(Gd,uf),g(a,ph,b),g(a,Uo,b),w(kr,Uo,null),e(Uo,ff),e(Uo,Mt),e(Mt,gf),e(Mt,Ri),e(Ri,_f),e(Mt,yf),e(Mt,wr),e(wr,bf),e(Mt,Tf),e(Uo,vf),e(Uo,$t),e($t,kf),e($t,ji),e(ji,wf),e($t,Ff),e($t,Ei),e(Ei,Mf),e($t,$f),e(Uo,Rf),w(Mn,Uo,null),g(a,hh,b),g(a,Rt,b),e(Rt,$n),e($n,Xd),w(Fr,Xd,null),e(Rt,jf),e(Rt,Bd),e(Bd,Ef),g(a,uh,b),g(a,Ke,b),w(Mr,Ke,null),e(Ke,Jf),e(Ke,$r),e($r,Cf),e($r,Rr),e(Rr,Uf),e($r,xf),e(Ke,zf),e(Ke,jr),e(jr,If),e(jr,Ji),e(Ji,Zf),e(jr,Nf),e(Ke,Wf),w(Rn,Ke,null),e(Ke,qf),e(Ke,gt),w(Er,gt,null),e(gt,Vf),e(gt,Sd),e(Sd,Af),e(gt,Gf),e(gt,Jr),e(Jr,Ci),e(Ci,Xf),e(Ci,Pd),e(Pd,Bf),e(Jr,Sf),e(Jr,Ui),e(Ui,Pf),e(Ui,Ld),e(Ld,Lf),e(Ke,Qf),e(Ke,jn),w(Cr,jn,null),e(jn,Df),e(jn,Ur),e(Ur,Of),e(Ur,Qd),e(Qd,Hf),e(Ur,Yf),e(Ke,Kf),e(Ke,No),w(xr,No,null),e(No,eg),e(No,Dd),e(Dd,og),e(No,tg),w(En,No,null),e(No,ng),e(No,jt),e(jt,sg),e(jt,Od),e(Od,rg),e(jt,ag),e(jt,Hd),e(Hd,lg),e(jt,ig),e(Ke,dg),e(Ke,xi),w(zr,xi,null),g(a,fh,b),g(a,Et,b),e(Et,Jn),e(Jn,Yd),w(Ir,Yd,null),e(Et,cg),e(Et,Kd),e(Kd,mg),g(a,gh,b),g(a,lo,b),w(Zr,lo,null),e(lo,pg),e(lo,Nr),e(Nr,hg),e(Nr,ec),e(ec,ug),e(Nr,fg),e(lo,gg),e(lo,Cn),e(Cn,zi),e(zi,_g),e(Cn,yg),e(Cn,Ii),e(Ii,bg),e(Cn,Tg),e(lo,vg),e(lo,Wr),e(Wr,kg),e(Wr,Zi),e(Zi,wg),e(Wr,Fg),e(lo,Mg),w(Un,lo,null),e(lo,$g),e(lo,_t),w(qr,_t,null),e(_t,Rg),e(_t,oc),e(oc,jg),e(_t,Eg),e(_t,Vr),e(Vr,Ni),e(Ni,Jg),e(Ni,tc),e(tc,Cg),e(Vr,Ug),e(Vr,Wi),e(Wi,xg),e(Wi,nc),e(nc,zg),g(a,_h,b),g(a,Jt,b),e(Jt,xn),e(xn,sc),w(Ar,sc,null),e(Jt,Ig),e(Jt,rc),e(rc,Zg),g(a,yh,b),g(a,_o,b),w(Gr,_o,null),e(_o,Ng),e(_o,Xr),e(Xr,Wg),e(Xr,Br),e(Br,qg),e(Xr,Vg),e(_o,Ag),e(_o,Sr),e(Sr,Gg),e(Sr,Pr),e(Pr,Xg),e(Sr,Bg),e(_o,Sg),e(_o,io),e(io,Pg),e(io,ac),e(ac,Lg),e(io,Qg),e(io,lc),e(lc,Dg),e(io,Og),e(io,ic),e(ic,Hg),e(io,Yg),e(io,dc),e(dc,Kg),e(io,e_),e(io,cc),e(cc,o_),e(io,t_),e(io,mc),e(mc,n_),e(io,s_),e(_o,r_),e(_o,Wo),w(Lr,Wo,null),e(Wo,a_),e(Wo,Ct),e(Ct,l_),e(Ct,qi),e(qi,i_),e(Ct,d_),e(Ct,pc),e(pc,c_),e(Ct,m_),e(Wo,p_),w(zn,Wo,null),e(Wo,h_),w(In,Wo,null),g(a,bh,b),g(a,Ut,b),e(Ut,Zn),e(Zn,hc),w(Qr,hc,null),e(Ut,u_),e(Ut,uc),e(uc,f_),g(a,Th,b),g(a,lt,b),w(Dr,lt,null),e(lt,g_),e(lt,xt),e(xt,__),e(xt,fc),e(fc,y_),e(xt,b_),e(xt,Or),e(Or,T_),e(xt,v_),e(lt,k_),e(lt,qo),w(Hr,qo,null),e(qo,w_),e(qo,zt),e(zt,F_),e(zt,Vi),e(Vi,M_),e(zt,$_),e(zt,gc),e(gc,R_),e(zt,j_),e(qo,E_),w(Nn,qo,null),e(qo,J_),w(Wn,qo,null),g(a,vh,b),g(a,It,b),e(It,qn),e(qn,_c),w(Yr,_c,null),e(It,C_),e(It,yc),e(yc,U_),g(a,kh,b),g(a,it,b),w(Kr,it,null),e(it,x_),e(it,Zt),e(Zt,z_),e(Zt,bc),e(bc,I_),e(Zt,Z_),e(Zt,ea),e(ea,N_),e(Zt,W_),e(it,q_),e(it,Vo),w(oa,Vo,null),e(Vo,V_),e(Vo,Nt),e(Nt,A_),e(Nt,Ai),e(Ai,G_),e(Nt,X_),e(Nt,Tc),e(Tc,B_),e(Nt,S_),e(Vo,P_),w(Vn,Vo,null),e(Vo,L_),w(An,Vo,null),g(a,wh,b),g(a,Wt,b),e(Wt,Gn),e(Gn,vc),w(ta,vc,null),e(Wt,Q_),e(Wt,kc),e(kc,D_),g(a,Fh,b),g(a,xo,b),w(na,xo,null),e(xo,O_),e(xo,wc),e(wc,H_),e(xo,Y_),e(xo,sa),e(sa,K_),e(sa,ra),e(ra,ey),e(sa,oy),e(xo,ty),e(xo,To),w(aa,To,null),e(To,ny),e(To,qt),e(qt,sy),e(qt,Gi),e(Gi,ry),e(qt,ay),e(qt,Fc),e(Fc,ly),e(qt,iy),e(To,dy),w(Xn,To,null),e(To,cy),w(Bn,To,null),e(To,my),w(Sn,To,null),g(a,Mh,b),g(a,Vt,b),e(Vt,Pn),e(Pn,Mc),w(la,Mc,null),e(Vt,py),e(Vt,$c),e($c,hy),g(a,$h,b),g(a,zo,b),w(ia,zo,null),e(zo,uy),e(zo,Rc),e(Rc,fy),e(zo,gy),e(zo,da),e(da,_y),e(da,ca),e(ca,yy),e(da,by),e(zo,Ty),e(zo,Ao),w(ma,Ao,null),e(Ao,vy),e(Ao,At),e(At,ky),e(At,Xi),e(Xi,wy),e(At,Fy),e(At,jc),e(jc,My),e(At,$y),e(Ao,Ry),w(Ln,Ao,null),e(Ao,jy),w(Qn,Ao,null),g(a,Rh,b),g(a,Gt,b),e(Gt,Dn),e(Dn,Ec),w(pa,Ec,null),e(Gt,Ey),e(Gt,Jc),e(Jc,Jy),g(a,jh,b),g(a,Io,b),w(ha,Io,null),e(Io,Cy),e(Io,Cc),e(Cc,Uy),e(Io,xy),e(Io,ua),e(ua,zy),e(ua,fa),e(fa,Iy),e(ua,Zy),e(Io,Ny),e(Io,Go),w(ga,Go,null),e(Go,Wy),e(Go,Xt),e(Xt,qy),e(Xt,Bi),e(Bi,Vy),e(Xt,Ay),e(Xt,Uc),e(Uc,Gy),e(Xt,Xy),e(Go,By),w(On,Go,null),e(Go,Sy),w(Hn,Go,null),g(a,Eh,b),g(a,Bt,b),e(Bt,Yn),e(Yn,xc),w(_a,xc,null),e(Bt,Py),e(Bt,zc),e(zc,Ly),g(a,Jh,b),g(a,Zo,b),w(ya,Zo,null),e(Zo,Qy),e(Zo,St),e(St,Dy),e(St,Ic),e(Ic,Oy),e(St,Hy),e(St,Zc),e(Zc,Yy),e(St,Ky),e(Zo,eb),e(Zo,ba),e(ba,ob),e(ba,Ta),e(Ta,tb),e(ba,nb),e(Zo,sb),e(Zo,Xo),w(va,Xo,null),e(Xo,rb),e(Xo,Pt),e(Pt,ab),e(Pt,Si),e(Si,lb),e(Pt,ib),e(Pt,Nc),e(Nc,db),e(Pt,cb),e(Xo,mb),w(Kn,Xo,null),e(Xo,pb),w(es,Xo,null),g(a,Ch,b),g(a,Lt,b),e(Lt,os),e(os,Wc),w(ka,Wc,null),e(Lt,hb),e(Lt,qc),e(qc,ub),g(a,Uh,b),g(a,co,b),w(wa,co,null),e(co,fb),e(co,Vc),e(Vc,gb),e(co,_b),e(co,Fa),e(Fa,yb),e(Fa,Pi),e(Pi,bb),e(Fa,Tb),e(co,vb),e(co,Ma),e(Ma,kb),e(Ma,$a),e($a,wb),e(Ma,Fb),e(co,Mb),w(ts,co,null),e(co,$b),e(co,Bo),w(Ra,Bo,null),e(Bo,Rb),e(Bo,Qt),e(Qt,jb),e(Qt,Li),e(Li,Eb),e(Qt,Jb),e(Qt,Ac),e(Ac,Cb),e(Qt,Ub),e(Bo,xb),w(ns,Bo,null),e(Bo,zb),w(ss,Bo,null),g(a,xh,b),g(a,Dt,b),e(Dt,rs),e(rs,Gc),w(ja,Gc,null),e(Dt,Ib),e(Dt,Xc),e(Xc,Zb),g(a,zh,b),g(a,mo,b),w(Ea,mo,null),e(mo,Nb),e(mo,Ja),e(Ja,Wb),e(Ja,Bc),e(Bc,qb),e(Ja,Vb),e(mo,Ab),e(mo,Ca),e(Ca,Gb),e(Ca,Qi),e(Qi,Xb),e(Ca,Bb),e(mo,Sb),e(mo,Ua),e(Ua,Pb),e(Ua,xa),e(xa,Lb),e(Ua,Qb),e(mo,Db),w(as,mo,null),e(mo,Ob),e(mo,vo),w(za,vo,null),e(vo,Hb),e(vo,Ot),e(Ot,Yb),e(Ot,Di),e(Di,Kb),e(Ot,eT),e(Ot,Sc),e(Sc,oT),e(Ot,tT),e(vo,nT),w(ls,vo,null),e(vo,sT),w(is,vo,null),e(vo,rT),w(ds,vo,null),g(a,Ih,b),g(a,Ht,b),e(Ht,cs),e(cs,Pc),w(Ia,Pc,null),e(Ht,aT),e(Ht,Lc),e(Lc,lT),g(a,Zh,b),g(a,po,b),w(Za,po,null),e(po,iT),e(po,Na),e(Na,dT),e(Na,Qc),e(Qc,cT),e(Na,mT),e(po,pT),e(po,Wa),e(Wa,hT),e(Wa,Oi),e(Oi,uT),e(Wa,fT),e(po,gT),e(po,qa),e(qa,_T),e(qa,Va),e(Va,yT),e(qa,bT),e(po,TT),w(ms,po,null),e(po,vT),e(po,yt),w(Aa,yt,null),e(yt,kT),e(yt,yo),e(yo,wT),e(yo,Dc),e(Dc,FT),e(yo,MT),e(yo,Oc),e(Oc,$T),e(yo,RT),e(yo,Hc),e(Hc,jT),e(yo,ET),e(yo,Yc),e(Yc,JT),e(yo,CT),e(yo,Kc),e(Kc,UT),e(yo,xT),e(yt,zT),w(ps,yt,null),g(a,Nh,b),g(a,Yt,b),e(Yt,hs),e(hs,em),w(Ga,em,null),e(Yt,IT),e(Yt,om),e(om,ZT),g(a,Wh,b),g(a,ho,b),w(Xa,ho,null),e(ho,NT),e(ho,tm),e(tm,WT),e(ho,qT),e(ho,Ba),e(Ba,VT),e(Ba,Hi),e(Hi,AT),e(Ba,GT),e(ho,XT),e(ho,Sa),e(Sa,BT),e(Sa,Pa),e(Pa,ST),e(Sa,PT),e(ho,LT),w(us,ho,null),e(ho,QT),e(ho,ko),w(La,ko,null),e(ko,DT),e(ko,Kt),e(Kt,OT),e(Kt,Yi),e(Yi,HT),e(Kt,YT),e(Kt,nm),e(nm,KT),e(Kt,ev),e(ko,ov),w(fs,ko,null),e(ko,tv),w(gs,ko,null),e(ko,nv),w(_s,ko,null),g(a,qh,b),g(a,en,b),e(en,ys),e(ys,sm),w(Qa,sm,null),e(en,sv),e(en,rm),e(rm,rv),g(a,Vh,b),g(a,uo,b),w(Da,uo,null),e(uo,av),e(uo,am),e(am,lv),e(uo,iv),e(uo,Oa),e(Oa,dv),e(Oa,Ki),e(Ki,cv),e(Oa,mv),e(uo,pv),e(uo,Ha),e(Ha,hv),e(Ha,Ya),e(Ya,uv),e(Ha,fv),e(uo,gv),w(bs,uo,null),e(uo,_v),e(uo,So),w(Ka,So,null),e(So,yv),e(So,on),e(on,bv),e(on,ed),e(ed,Tv),e(on,vv),e(on,lm),e(lm,kv),e(on,wv),e(So,Fv),w(Ts,So,null),e(So,Mv),w(vs,So,null),g(a,Ah,b),g(a,tn,b),e(tn,ks),e(ks,im),w(el,im,null),e(tn,$v),e(tn,dm),e(dm,Rv),g(a,Gh,b),g(a,fo,b),w(ol,fo,null),e(fo,jv),e(fo,cm),e(cm,Ev),e(fo,Jv),e(fo,tl),e(tl,Cv),e(tl,od),e(od,Uv),e(tl,xv),e(fo,zv),e(fo,nl),e(nl,Iv),e(nl,sl),e(sl,Zv),e(nl,Nv),e(fo,Wv),w(ws,fo,null),e(fo,qv),e(fo,wo),w(rl,wo,null),e(wo,Vv),e(wo,nn),e(nn,Av),e(nn,td),e(td,Gv),e(nn,Xv),e(nn,mm),e(mm,Bv),e(nn,Sv),e(wo,Pv),w(Fs,wo,null),e(wo,Lv),w(Ms,wo,null),e(wo,Qv),w($s,wo,null),g(a,Xh,b),g(a,sn,b),e(sn,Rs),e(Rs,pm),w(al,pm,null),e(sn,Dv),e(sn,hm),e(hm,Ov),g(a,Bh,b),g(a,go,b),w(ll,go,null),e(go,Hv),e(go,rn),e(rn,Yv),e(rn,um),e(um,Kv),e(rn,ek),e(rn,fm),e(fm,ok),e(rn,tk),e(go,nk),e(go,il),e(il,sk),e(il,nd),e(nd,rk),e(il,ak),e(go,lk),e(go,dl),e(dl,ik),e(dl,cl),e(cl,dk),e(dl,ck),e(go,mk),w(js,go,null),e(go,pk),e(go,Fo),w(ml,Fo,null),e(Fo,hk),e(Fo,an),e(an,uk),e(an,sd),e(sd,fk),e(an,gk),e(an,gm),e(gm,_k),e(an,yk),e(Fo,bk),w(Es,Fo,null),e(Fo,Tk),w(Js,Fo,null),e(Fo,vk),w(Cs,Fo,null),g(a,Sh,b),g(a,ln,b),e(ln,Us),e(Us,_m),w(pl,_m,null),e(ln,kk),e(ln,ym),e(ym,wk),g(a,Ph,b),g(a,eo,b),w(hl,eo,null),e(eo,Fk),e(eo,bm),e(bm,Mk),e(eo,$k),e(eo,ul),e(ul,Rk),e(ul,rd),e(rd,jk),e(ul,Ek),e(eo,Jk),e(eo,fl),e(fl,Ck),e(fl,gl),e(gl,Uk),e(fl,xk),e(eo,zk),e(eo,Tm),e(Tm,Ik),e(eo,Zk),e(eo,dt),e(dt,vm),e(vm,_l),e(_l,Nk),e(dt,Wk),e(dt,km),e(km,yl),e(yl,qk),e(dt,Vk),e(dt,wm),e(wm,bl),e(bl,Ak),e(dt,Gk),e(dt,Fm),e(Fm,Tl),e(Tl,Xk),e(eo,Bk),e(eo,Po),w(vl,Po,null),e(Po,Sk),e(Po,dn),e(dn,Pk),e(dn,Mm),e(Mm,Lk),e(dn,Qk),e(dn,$m),e($m,Dk),e(dn,Ok),e(Po,Hk),w(xs,Po,null),e(Po,Yk),w(zs,Po,null),g(a,Lh,b),g(a,cn,b),e(cn,Is),e(Is,Rm),w(kl,Rm,null),e(cn,Kk),e(cn,jm),e(jm,ew),g(a,Qh,b),g(a,oo,b),w(wl,oo,null),e(oo,ow),e(oo,Fl),e(Fl,tw),e(Fl,Em),e(Em,nw),e(Fl,sw),e(oo,rw),e(oo,Ml),e(Ml,aw),e(Ml,ad),e(ad,lw),e(Ml,iw),e(oo,dw),e(oo,$l),e($l,cw),e($l,Rl),e(Rl,mw),e($l,pw),e(oo,hw),e(oo,Jm),e(Jm,uw),e(oo,fw),e(oo,ct),e(ct,Cm),e(Cm,jl),e(jl,gw),e(ct,_w),e(ct,Um),e(Um,El),e(El,yw),e(ct,bw),e(ct,xm),e(xm,Jl),e(Jl,Tw),e(ct,vw),e(ct,zm),e(zm,Cl),e(Cl,kw),e(oo,ww),e(oo,Lo),w(Ul,Lo,null),e(Lo,Fw),e(Lo,mn),e(mn,Mw),e(mn,Im),e(Im,$w),e(mn,Rw),e(mn,Zm),e(Zm,jw),e(mn,Ew),e(Lo,Jw),w(Zs,Lo,null),e(Lo,Cw),w(Ns,Lo,null),g(a,Dh,b),g(a,pn,b),e(pn,Ws),e(Ws,Nm),w(xl,Nm,null),e(pn,Uw),e(pn,Wm),e(Wm,xw),g(a,Oh,b),g(a,to,b),w(zl,to,null),e(to,zw),e(to,qm),e(qm,Iw),e(to,Zw),e(to,Il),e(Il,Nw),e(Il,ld),e(ld,Ww),e(Il,qw),e(to,Vw),e(to,Zl),e(Zl,Aw),e(Zl,Nl),e(Nl,Gw),e(Zl,Xw),e(to,Bw),e(to,Vm),e(Vm,Sw),e(to,Pw),e(to,mt),e(mt,Am),e(Am,Wl),e(Wl,Lw),e(mt,Qw),e(mt,Gm),e(Gm,ql),e(ql,Dw),e(mt,Ow),e(mt,Xm),e(Xm,Vl),e(Vl,Hw),e(mt,Yw),e(mt,Bm),e(Bm,Al),e(Al,Kw),e(to,eF),e(to,Qo),w(Gl,Qo,null),e(Qo,oF),e(Qo,hn),e(hn,tF),e(hn,Sm),e(Sm,nF),e(hn,sF),e(hn,Pm),e(Pm,rF),e(hn,aF),e(Qo,lF),w(qs,Qo,null),e(Qo,iF),w(Vs,Qo,null),g(a,Hh,b),g(a,un,b),e(un,As),e(As,Lm),w(Xl,Lm,null),e(un,dF),e(un,Qm),e(Qm,cF),g(a,Yh,b),g(a,no,b),w(Bl,no,null),e(no,mF),e(no,Dm),e(Dm,pF),e(no,hF),e(no,Sl),e(Sl,uF),e(Sl,id),e(id,fF),e(Sl,gF),e(no,_F),e(no,Pl),e(Pl,yF),e(Pl,Ll),e(Ll,bF),e(Pl,TF),e(no,vF),e(no,Om),e(Om,kF),e(no,wF),e(no,pt),e(pt,Hm),e(Hm,Ql),e(Ql,FF),e(pt,MF),e(pt,Ym),e(Ym,Dl),e(Dl,$F),e(pt,RF),e(pt,Km),e(Km,Ol),e(Ol,jF),e(pt,EF),e(pt,ep),e(ep,Hl),e(Hl,JF),e(no,CF),e(no,Do),w(Yl,Do,null),e(Do,UF),e(Do,fn),e(fn,xF),e(fn,op),e(op,zF),e(fn,IF),e(fn,tp),e(tp,ZF),e(fn,NF),e(Do,WF),w(Gs,Do,null),e(Do,qF),w(Xs,Do,null),g(a,Kh,b),g(a,gn,b),e(gn,Bs),e(Bs,np),w(Kl,np,null),e(gn,VF),e(gn,sp),e(sp,AF),g(a,eu,b),g(a,so,b),w(ei,so,null),e(so,GF),e(so,rp),e(rp,XF),e(so,BF),e(so,oi),e(oi,SF),e(oi,dd),e(dd,PF),e(oi,LF),e(so,QF),e(so,ti),e(ti,DF),e(ti,ni),e(ni,OF),e(ti,HF),e(so,YF),e(so,ap),e(ap,KF),e(so,eM),e(so,ht),e(ht,lp),e(lp,si),e(si,oM),e(ht,tM),e(ht,ip),e(ip,ri),e(ri,nM),e(ht,sM),e(ht,dp),e(dp,ai),e(ai,rM),e(ht,aM),e(ht,cp),e(cp,li),e(li,lM),e(so,iM),e(so,Oo),w(ii,Oo,null),e(Oo,dM),e(Oo,_n),e(_n,cM),e(_n,mp),e(mp,mM),e(_n,pM),e(_n,pp),e(pp,hM),e(_n,uM),e(Oo,fM),w(Ss,Oo,null),e(Oo,gM),w(Ps,Oo,null),g(a,ou,b),g(a,yn,b),e(yn,Ls),e(Ls,hp),w(di,hp,null),e(yn,_M),e(yn,up),e(up,yM),g(a,tu,b),g(a,ro,b),w(ci,ro,null),e(ro,bM),e(ro,bn),e(bn,TM),e(bn,fp),e(fp,vM),e(bn,kM),e(bn,gp),e(gp,wM),e(bn,FM),e(ro,MM),e(ro,mi),e(mi,$M),e(mi,cd),e(cd,RM),e(mi,jM),e(ro,EM),e(ro,pi),e(pi,JM),e(pi,hi),e(hi,CM),e(pi,UM),e(ro,xM),e(ro,_p),e(_p,zM),e(ro,IM),e(ro,ut),e(ut,yp),e(yp,ui),e(ui,ZM),e(ut,NM),e(ut,bp),e(bp,fi),e(fi,WM),e(ut,qM),e(ut,Tp),e(Tp,gi),e(gi,VM),e(ut,AM),e(ut,vp),e(vp,_i),e(_i,GM),e(ro,XM),e(ro,Ho),w(yi,Ho,null),e(Ho,BM),e(Ho,Tn),e(Tn,SM),e(Tn,kp),e(kp,PM),e(Tn,LM),e(Tn,wp),e(wp,QM),e(Tn,DM),e(Ho,OM),w(Qs,Ho,null),e(Ho,HM),w(Ds,Ho,null),nu=!0},p(a,[b]){const bi={};b&2&&(bi.$$scope={dirty:b,ctx:a}),Mn.$set(bi);const Fp={};b&2&&(Fp.$$scope={dirty:b,ctx:a}),Rn.$set(Fp);const Mp={};b&2&&(Mp.$$scope={dirty:b,ctx:a}),En.$set(Mp);const $p={};b&2&&($p.$$scope={dirty:b,ctx:a}),Un.$set($p);const Ti={};b&2&&(Ti.$$scope={dirty:b,ctx:a}),zn.$set(Ti);const Rp={};b&2&&(Rp.$$scope={dirty:b,ctx:a}),In.$set(Rp);const jp={};b&2&&(jp.$$scope={dirty:b,ctx:a}),Nn.$set(jp);const Ep={};b&2&&(Ep.$$scope={dirty:b,ctx:a}),Wn.$set(Ep);const vi={};b&2&&(vi.$$scope={dirty:b,ctx:a}),Vn.$set(vi);const Jp={};b&2&&(Jp.$$scope={dirty:b,ctx:a}),An.$set(Jp);const Cp={};b&2&&(Cp.$$scope={dirty:b,ctx:a}),Xn.$set(Cp);const Up={};b&2&&(Up.$$scope={dirty:b,ctx:a}),Bn.$set(Up);const xp={};b&2&&(xp.$$scope={dirty:b,ctx:a}),Sn.$set(xp);const zp={};b&2&&(zp.$$scope={dirty:b,ctx:a}),Ln.$set(zp);const Ip={};b&2&&(Ip.$$scope={dirty:b,ctx:a}),Qn.$set(Ip);const Zp={};b&2&&(Zp.$$scope={dirty:b,ctx:a}),On.$set(Zp);const vn={};b&2&&(vn.$$scope={dirty:b,ctx:a}),Hn.$set(vn);const Np={};b&2&&(Np.$$scope={dirty:b,ctx:a}),Kn.$set(Np);const Wp={};b&2&&(Wp.$$scope={dirty:b,ctx:a}),es.$set(Wp);const ki={};b&2&&(ki.$$scope={dirty:b,ctx:a}),ts.$set(ki);const qp={};b&2&&(qp.$$scope={dirty:b,ctx:a}),ns.$set(qp);const Vp={};b&2&&(Vp.$$scope={dirty:b,ctx:a}),ss.$set(Vp);const Ap={};b&2&&(Ap.$$scope={dirty:b,ctx:a}),as.$set(Ap);const bo={};b&2&&(bo.$$scope={dirty:b,ctx:a}),ls.$set(bo);const Gp={};b&2&&(Gp.$$scope={dirty:b,ctx:a}),is.$set(Gp);const Xp={};b&2&&(Xp.$$scope={dirty:b,ctx:a}),ds.$set(Xp);const Bp={};b&2&&(Bp.$$scope={dirty:b,ctx:a}),ms.$set(Bp);const Sp={};b&2&&(Sp.$$scope={dirty:b,ctx:a}),ps.$set(Sp);const Pp={};b&2&&(Pp.$$scope={dirty:b,ctx:a}),us.$set(Pp);const Lp={};b&2&&(Lp.$$scope={dirty:b,ctx:a}),fs.$set(Lp);const Qp={};b&2&&(Qp.$$scope={dirty:b,ctx:a}),gs.$set(Qp);const Dp={};b&2&&(Dp.$$scope={dirty:b,ctx:a}),_s.$set(Dp);const Op={};b&2&&(Op.$$scope={dirty:b,ctx:a}),bs.$set(Op);const Hp={};b&2&&(Hp.$$scope={dirty:b,ctx:a}),Ts.$set(Hp);const Yp={};b&2&&(Yp.$$scope={dirty:b,ctx:a}),vs.$set(Yp);const Kp={};b&2&&(Kp.$$scope={dirty:b,ctx:a}),ws.$set(Kp);const wi={};b&2&&(wi.$$scope={dirty:b,ctx:a}),Fs.$set(wi);const eh={};b&2&&(eh.$$scope={dirty:b,ctx:a}),Ms.$set(eh);const oh={};b&2&&(oh.$$scope={dirty:b,ctx:a}),$s.$set(oh);const th={};b&2&&(th.$$scope={dirty:b,ctx:a}),js.$set(th);const ft={};b&2&&(ft.$$scope={dirty:b,ctx:a}),Es.$set(ft);const kn={};b&2&&(kn.$$scope={dirty:b,ctx:a}),Js.$set(kn);const nh={};b&2&&(nh.$$scope={dirty:b,ctx:a}),Cs.$set(nh);const sh={};b&2&&(sh.$$scope={dirty:b,ctx:a}),xs.$set(sh);const wn={};b&2&&(wn.$$scope={dirty:b,ctx:a}),zs.$set(wn);const rh={};b&2&&(rh.$$scope={dirty:b,ctx:a}),Zs.$set(rh);const ah={};b&2&&(ah.$$scope={dirty:b,ctx:a}),Ns.$set(ah);const Fi={};b&2&&(Fi.$$scope={dirty:b,ctx:a}),qs.$set(Fi);const lh={};b&2&&(lh.$$scope={dirty:b,ctx:a}),Vs.$set(lh);const ih={};b&2&&(ih.$$scope={dirty:b,ctx:a}),Gs.$set(ih);const dh={};b&2&&(dh.$$scope={dirty:b,ctx:a}),Xs.$set(dh);const ao={};b&2&&(ao.$$scope={dirty:b,ctx:a}),Ss.$set(ao);const Mi={};b&2&&(Mi.$$scope={dirty:b,ctx:a}),Ps.$set(Mi);const ch={};b&2&&(ch.$$scope={dirty:b,ctx:a}),Qs.$set(ch);const $i={};b&2&&($i.$$scope={dirty:b,ctx:a}),Ds.$set($i)},i(a){nu||(F(i.$$.fragment,a),F(R.$$.fragment,a),F(A.$$.fragment,a),F(vr.$$.fragment,a),F(kr.$$.fragment,a),F(Mn.$$.fragment,a),F(Fr.$$.fragment,a),F(Mr.$$.fragment,a),F(Rn.$$.fragment,a),F(Er.$$.fragment,a),F(Cr.$$.fragment,a),F(xr.$$.fragment,a),F(En.$$.fragment,a),F(zr.$$.fragment,a),F(Ir.$$.fragment,a),F(Zr.$$.fragment,a),F(Un.$$.fragment,a),F(qr.$$.fragment,a),F(Ar.$$.fragment,a),F(Gr.$$.fragment,a),F(Lr.$$.fragment,a),F(zn.$$.fragment,a),F(In.$$.fragment,a),F(Qr.$$.fragment,a),F(Dr.$$.fragment,a),F(Hr.$$.fragment,a),F(Nn.$$.fragment,a),F(Wn.$$.fragment,a),F(Yr.$$.fragment,a),F(Kr.$$.fragment,a),F(oa.$$.fragment,a),F(Vn.$$.fragment,a),F(An.$$.fragment,a),F(ta.$$.fragment,a),F(na.$$.fragment,a),F(aa.$$.fragment,a),F(Xn.$$.fragment,a),F(Bn.$$.fragment,a),F(Sn.$$.fragment,a),F(la.$$.fragment,a),F(ia.$$.fragment,a),F(ma.$$.fragment,a),F(Ln.$$.fragment,a),F(Qn.$$.fragment,a),F(pa.$$.fragment,a),F(ha.$$.fragment,a),F(ga.$$.fragment,a),F(On.$$.fragment,a),F(Hn.$$.fragment,a),F(_a.$$.fragment,a),F(ya.$$.fragment,a),F(va.$$.fragment,a),F(Kn.$$.fragment,a),F(es.$$.fragment,a),F(ka.$$.fragment,a),F(wa.$$.fragment,a),F(ts.$$.fragment,a),F(Ra.$$.fragment,a),F(ns.$$.fragment,a),F(ss.$$.fragment,a),F(ja.$$.fragment,a),F(Ea.$$.fragment,a),F(as.$$.fragment,a),F(za.$$.fragment,a),F(ls.$$.fragment,a),F(is.$$.fragment,a),F(ds.$$.fragment,a),F(Ia.$$.fragment,a),F(Za.$$.fragment,a),F(ms.$$.fragment,a),F(Aa.$$.fragment,a),F(ps.$$.fragment,a),F(Ga.$$.fragment,a),F(Xa.$$.fragment,a),F(us.$$.fragment,a),F(La.$$.fragment,a),F(fs.$$.fragment,a),F(gs.$$.fragment,a),F(_s.$$.fragment,a),F(Qa.$$.fragment,a),F(Da.$$.fragment,a),F(bs.$$.fragment,a),F(Ka.$$.fragment,a),F(Ts.$$.fragment,a),F(vs.$$.fragment,a),F(el.$$.fragment,a),F(ol.$$.fragment,a),F(ws.$$.fragment,a),F(rl.$$.fragment,a),F(Fs.$$.fragment,a),F(Ms.$$.fragment,a),F($s.$$.fragment,a),F(al.$$.fragment,a),F(ll.$$.fragment,a),F(js.$$.fragment,a),F(ml.$$.fragment,a),F(Es.$$.fragment,a),F(Js.$$.fragment,a),F(Cs.$$.fragment,a),F(pl.$$.fragment,a),F(hl.$$.fragment,a),F(vl.$$.fragment,a),F(xs.$$.fragment,a),F(zs.$$.fragment,a),F(kl.$$.fragment,a),F(wl.$$.fragment,a),F(Ul.$$.fragment,a),F(Zs.$$.fragment,a),F(Ns.$$.fragment,a),F(xl.$$.fragment,a),F(zl.$$.fragment,a),F(Gl.$$.fragment,a),F(qs.$$.fragment,a),F(Vs.$$.fragment,a),F(Xl.$$.fragment,a),F(Bl.$$.fragment,a),F(Yl.$$.fragment,a),F(Gs.$$.fragment,a),F(Xs.$$.fragment,a),F(Kl.$$.fragment,a),F(ei.$$.fragment,a),F(ii.$$.fragment,a),F(Ss.$$.fragment,a),F(Ps.$$.fragment,a),F(di.$$.fragment,a),F(ci.$$.fragment,a),F(yi.$$.fragment,a),F(Qs.$$.fragment,a),F(Ds.$$.fragment,a),nu=!0)},o(a){M(i.$$.fragment,a),M(R.$$.fragment,a),M(A.$$.fragment,a),M(vr.$$.fragment,a),M(kr.$$.fragment,a),M(Mn.$$.fragment,a),M(Fr.$$.fragment,a),M(Mr.$$.fragment,a),M(Rn.$$.fragment,a),M(Er.$$.fragment,a),M(Cr.$$.fragment,a),M(xr.$$.fragment,a),M(En.$$.fragment,a),M(zr.$$.fragment,a),M(Ir.$$.fragment,a),M(Zr.$$.fragment,a),M(Un.$$.fragment,a),M(qr.$$.fragment,a),M(Ar.$$.fragment,a),M(Gr.$$.fragment,a),M(Lr.$$.fragment,a),M(zn.$$.fragment,a),M(In.$$.fragment,a),M(Qr.$$.fragment,a),M(Dr.$$.fragment,a),M(Hr.$$.fragment,a),M(Nn.$$.fragment,a),M(Wn.$$.fragment,a),M(Yr.$$.fragment,a),M(Kr.$$.fragment,a),M(oa.$$.fragment,a),M(Vn.$$.fragment,a),M(An.$$.fragment,a),M(ta.$$.fragment,a),M(na.$$.fragment,a),M(aa.$$.fragment,a),M(Xn.$$.fragment,a),M(Bn.$$.fragment,a),M(Sn.$$.fragment,a),M(la.$$.fragment,a),M(ia.$$.fragment,a),M(ma.$$.fragment,a),M(Ln.$$.fragment,a),M(Qn.$$.fragment,a),M(pa.$$.fragment,a),M(ha.$$.fragment,a),M(ga.$$.fragment,a),M(On.$$.fragment,a),M(Hn.$$.fragment,a),M(_a.$$.fragment,a),M(ya.$$.fragment,a),M(va.$$.fragment,a),M(Kn.$$.fragment,a),M(es.$$.fragment,a),M(ka.$$.fragment,a),M(wa.$$.fragment,a),M(ts.$$.fragment,a),M(Ra.$$.fragment,a),M(ns.$$.fragment,a),M(ss.$$.fragment,a),M(ja.$$.fragment,a),M(Ea.$$.fragment,a),M(as.$$.fragment,a),M(za.$$.fragment,a),M(ls.$$.fragment,a),M(is.$$.fragment,a),M(ds.$$.fragment,a),M(Ia.$$.fragment,a),M(Za.$$.fragment,a),M(ms.$$.fragment,a),M(Aa.$$.fragment,a),M(ps.$$.fragment,a),M(Ga.$$.fragment,a),M(Xa.$$.fragment,a),M(us.$$.fragment,a),M(La.$$.fragment,a),M(fs.$$.fragment,a),M(gs.$$.fragment,a),M(_s.$$.fragment,a),M(Qa.$$.fragment,a),M(Da.$$.fragment,a),M(bs.$$.fragment,a),M(Ka.$$.fragment,a),M(Ts.$$.fragment,a),M(vs.$$.fragment,a),M(el.$$.fragment,a),M(ol.$$.fragment,a),M(ws.$$.fragment,a),M(rl.$$.fragment,a),M(Fs.$$.fragment,a),M(Ms.$$.fragment,a),M($s.$$.fragment,a),M(al.$$.fragment,a),M(ll.$$.fragment,a),M(js.$$.fragment,a),M(ml.$$.fragment,a),M(Es.$$.fragment,a),M(Js.$$.fragment,a),M(Cs.$$.fragment,a),M(pl.$$.fragment,a),M(hl.$$.fragment,a),M(vl.$$.fragment,a),M(xs.$$.fragment,a),M(zs.$$.fragment,a),M(kl.$$.fragment,a),M(wl.$$.fragment,a),M(Ul.$$.fragment,a),M(Zs.$$.fragment,a),M(Ns.$$.fragment,a),M(xl.$$.fragment,a),M(zl.$$.fragment,a),M(Gl.$$.fragment,a),M(qs.$$.fragment,a),M(Vs.$$.fragment,a),M(Xl.$$.fragment,a),M(Bl.$$.fragment,a),M(Yl.$$.fragment,a),M(Gs.$$.fragment,a),M(Xs.$$.fragment,a),M(Kl.$$.fragment,a),M(ei.$$.fragment,a),M(ii.$$.fragment,a),M(Ss.$$.fragment,a),M(Ps.$$.fragment,a),M(di.$$.fragment,a),M(ci.$$.fragment,a),M(yi.$$.fragment,a),M(Qs.$$.fragment,a),M(Ds.$$.fragment,a),nu=!1},d(a){o(d),a&&o(y),a&&o(h),$(i),a&&o(fe),a&&o(q),$(R),a&&o(ge),a&&o(V),a&&o(_e),a&&o(G),a&&o(ye),a&&o(X),a&&o(te),a&&o(U),a&&o(be),a&&o(B),a&&o(L),a&&o(se),a&&o(Te),a&&o(re),$(A),a&&o(ve),a&&o(x),a&&o(ne),a&&o(ze),$(vr),a&&o(ph),a&&o(Uo),$(kr),$(Mn),a&&o(hh),a&&o(Rt),$(Fr),a&&o(uh),a&&o(Ke),$(Mr),$(Rn),$(Er),$(Cr),$(xr),$(En),$(zr),a&&o(fh),a&&o(Et),$(Ir),a&&o(gh),a&&o(lo),$(Zr),$(Un),$(qr),a&&o(_h),a&&o(Jt),$(Ar),a&&o(yh),a&&o(_o),$(Gr),$(Lr),$(zn),$(In),a&&o(bh),a&&o(Ut),$(Qr),a&&o(Th),a&&o(lt),$(Dr),$(Hr),$(Nn),$(Wn),a&&o(vh),a&&o(It),$(Yr),a&&o(kh),a&&o(it),$(Kr),$(oa),$(Vn),$(An),a&&o(wh),a&&o(Wt),$(ta),a&&o(Fh),a&&o(xo),$(na),$(aa),$(Xn),$(Bn),$(Sn),a&&o(Mh),a&&o(Vt),$(la),a&&o($h),a&&o(zo),$(ia),$(ma),$(Ln),$(Qn),a&&o(Rh),a&&o(Gt),$(pa),a&&o(jh),a&&o(Io),$(ha),$(ga),$(On),$(Hn),a&&o(Eh),a&&o(Bt),$(_a),a&&o(Jh),a&&o(Zo),$(ya),$(va),$(Kn),$(es),a&&o(Ch),a&&o(Lt),$(ka),a&&o(Uh),a&&o(co),$(wa),$(ts),$(Ra),$(ns),$(ss),a&&o(xh),a&&o(Dt),$(ja),a&&o(zh),a&&o(mo),$(Ea),$(as),$(za),$(ls),$(is),$(ds),a&&o(Ih),a&&o(Ht),$(Ia),a&&o(Zh),a&&o(po),$(Za),$(ms),$(Aa),$(ps),a&&o(Nh),a&&o(Yt),$(Ga),a&&o(Wh),a&&o(ho),$(Xa),$(us),$(La),$(fs),$(gs),$(_s),a&&o(qh),a&&o(en),$(Qa),a&&o(Vh),a&&o(uo),$(Da),$(bs),$(Ka),$(Ts),$(vs),a&&o(Ah),a&&o(tn),$(el),a&&o(Gh),a&&o(fo),$(ol),$(ws),$(rl),$(Fs),$(Ms),$($s),a&&o(Xh),a&&o(sn),$(al),a&&o(Bh),a&&o(go),$(ll),$(js),$(ml),$(Es),$(Js),$(Cs),a&&o(Sh),a&&o(ln),$(pl),a&&o(Ph),a&&o(eo),$(hl),$(vl),$(xs),$(zs),a&&o(Lh),a&&o(cn),$(kl),a&&o(Qh),a&&o(oo),$(wl),$(Ul),$(Zs),$(Ns),a&&o(Dh),a&&o(pn),$(xl),a&&o(Oh),a&&o(to),$(zl),$(Gl),$(qs),$(Vs),a&&o(Hh),a&&o(un),$(Xl),a&&o(Yh),a&&o(no),$(Bl),$(Yl),$(Gs),$(Xs),a&&o(Kh),a&&o(gn),$(Kl),a&&o(eu),a&&o(so),$(ei),$(ii),$(Ss),$(Ps),a&&o(ou),a&&o(yn),$(di),a&&o(tu),a&&o(ro),$(ci),$(yi),$(Qs),$(Ds)}}}const Cj={local:"roformer",sections:[{local:"overview",title:"Overview"},{local:"documentation-resources",title:"Documentation resources"},{local:"transformers.RoFormerConfig",title:"RoFormerConfig"},{local:"transformers.RoFormerTokenizer",title:"RoFormerTokenizer"},{local:"transformers.RoFormerTokenizerFast",title:"RoFormerTokenizerFast"},{local:"transformers.RoFormerModel",title:"RoFormerModel"},{local:"transformers.RoFormerForCausalLM",title:"RoFormerForCausalLM"},{local:"transformers.RoFormerForMaskedLM",title:"RoFormerForMaskedLM"},{local:"transformers.RoFormerForSequenceClassification",title:"RoFormerForSequenceClassification"},{local:"transformers.RoFormerForMultipleChoice",title:"RoFormerForMultipleChoice"},{local:"transformers.RoFormerForTokenClassification",title:"RoFormerForTokenClassification"},{local:"transformers.RoFormerForQuestionAnswering",title:"RoFormerForQuestionAnswering"},{local:"transformers.TFRoFormerModel",title:"TFRoFormerModel"},{local:"transformers.TFRoFormerForMaskedLM",title:"TFRoFormerForMaskedLM"},{local:"transformers.TFRoFormerForCausalLM",title:"TFRoFormerForCausalLM"},{local:"transformers.TFRoFormerForSequenceClassification",title:"TFRoFormerForSequenceClassification"},{local:"transformers.TFRoFormerForMultipleChoice",title:"TFRoFormerForMultipleChoice"},{local:"transformers.TFRoFormerForTokenClassification",title:"TFRoFormerForTokenClassification"},{local:"transformers.TFRoFormerForQuestionAnswering",title:"TFRoFormerForQuestionAnswering"},{local:"transformers.FlaxRoFormerModel",title:"FlaxRoFormerModel"},{local:"transformers.FlaxRoFormerForMaskedLM",title:"FlaxRoFormerForMaskedLM"},{local:"transformers.FlaxRoFormerForSequenceClassification",title:"FlaxRoFormerForSequenceClassification"},{local:"transformers.FlaxRoFormerForMultipleChoice",title:"FlaxRoFormerForMultipleChoice"},{local:"transformers.FlaxRoFormerForTokenClassification",title:"FlaxRoFormerForTokenClassification"},{local:"transformers.FlaxRoFormerForQuestionAnswering",title:"FlaxRoFormerForQuestionAnswering"}],title:"RoFormer"};function Uj(j){return jR(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class qj extends FR{constructor(d){super();MR(this,d,Uj,Jj,$R,{})}}export{qj as default,Cj as metadata};
