import{S as FR,i as MR,s as $R,e as s,k as p,w as T,t,M as RR,c as r,d as o,m,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=p(),T(u.$$.fragment)},l(i){d=r(i,"P",{});var c=l(d);y=n(c,"Example:"),c.forEach(o),h=m(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=p(),T(u.$$.fragment)},l(i){d=r(i,"P",{});var c=l(d);y=n(c,"Example:"),c.forEach(o),h=m(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=p(),T(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=m(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=p(),T(u.$$.fragment)},l(i){d=r(i,"P",{});var c=l(d);y=n(c,"Example:"),c.forEach(o),h=m(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=p(),T(u.$$.fragment)},l(i){d=r(i,"P",{});var c=l(d);y=n(c,"Example:"),c.forEach(o),h=m(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=p(),T(u.$$.fragment)},l(i){d=r(i,"P",{});var c=l(d);y=n(c,"Example:"),c.forEach(o),h=m(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=p(),T(u.$$.fragment)},l(i){d=r(i,"P",{});var c=l(d);y=n(c,"Example:"),c.forEach(o),h=m(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=p(),T(u.$$.fragment)},l(i){d=r(i,"P",{});var c=l(d);y=n(c,"Example of single-label classification:"),c.forEach(o),h=m(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=p(),T(u.$$.fragment)},l(i){d=r(i,"P",{});var c=l(d);y=n(c,"Example of multi-label classification:"),c.forEach(o),h=m(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 GR(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=p(),T(u.$$.fragment)},l(i){d=r(i,"P",{});var c=l(d);y=n(c,"Example:"),c.forEach(o),h=m(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 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=p(),T(u.$$.fragment)},l(i){d=r(i,"P",{});var c=l(d);y=n(c,"Example:"),c.forEach(o),h=m(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=p(),T(u.$$.fragment)},l(i){d=r(i,"P",{});var c=l(d);y=n(c,"Example:"),c.forEach(o),h=m(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,B,Re,ye,G,pe,je,te,U,I,be,X,me,Ee,L,se,Je,z,Ce,D,ie,Ue,O,ve,re,N,he,A,xe,oe,Z,Te,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=p(),c=s("ul"),J=s("li"),ke=t("having all inputs as keyword arguments (like PyTorch models), or"),fe=p(),q=s("li"),ae=t("having all inputs as a list, tuple or dict in the first positional argument."),ee=p(),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 "),B=s("code"),Re=t("predict()"),ye=t(`, such as when creating your own layers or models with
the Keras `),G=s("code"),pe=t("Functional"),je=t(` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),te=p(),U=s("ul"),I=s("li"),be=t("a single Tensor with "),X=s("code"),me=t("input_ids"),Ee=t(" only and nothing else: "),L=s("code"),se=t("model(input_ids)"),Je=p(),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"),ve=t("model([input_ids, attention_mask, token_type_ids])"),re=p(),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=p(),Z=s("p"),Te=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(v){d=r(v,"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=m(v),c=r(v,"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=m(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=m(v),R=r(v,"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 "),B=r(C,"CODE",{});var Be=l(B);Re=n(Be,"predict()"),Be.forEach(o),ye=n(C,`, such as when creating your own layers or models with
the Keras `),G=r(C,"CODE",{});var qe=l(G);pe=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=m(v),U=r(v,"UL",{});var W=l(U);I=r(W,"LI",{});var H=l(I);be=n(H,"a single Tensor with "),X=r(H,"CODE",{});var Ge=l(X);me=n(Ge,"input_ids"),Ge.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=m(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 Xe=l(O);ve=n(Xe,"model([input_ids, attention_mask, token_type_ids])"),Xe.forEach(o),Y.forEach(o),re=m(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=m(v),Z=r(v,"P",{});var ne=l(Z);Te=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(v,E){g(v,d,E),e(d,y),e(d,h),e(h,u),e(d,_),g(v,i,E),g(v,c,E),e(c,J),e(J,ke),e(c,fe),e(c,q),e(q,ae),g(v,ee,E),g(v,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,B),e(B,Re),e(R,ye),e(R,G),e(G,pe),e(R,je),g(v,te,E),g(v,U,E),e(U,I),e(I,be),e(I,X),e(X,me),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,ve),e(U,re),e(U,N),e(N,he),e(N,A),e(A,xe),g(v,oe,E),g(v,Z,E),e(Z,Te),e(Z,x),e(x,ue),e(Z,de)},d(v){v&&o(d),v&&o(i),v&&o(c),v&&o(ee),v&&o(R),v&&o(te),v&&o(U),v&&o(oe),v&&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=p(),T(u.$$.fragment)},l(i){d=r(i,"P",{});var c=l(d);y=n(c,"Example:"),c.forEach(o),h=m(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,B,Re,ye,G,pe,je,te,U,I,be,X,me,Ee,L,se,Je,z,Ce,D,ie,Ue,O,ve,re,N,he,A,xe,oe,Z,Te,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=p(),c=s("ul"),J=s("li"),ke=t("having all inputs as keyword arguments (like PyTorch models), or"),fe=p(),q=s("li"),ae=t("having all inputs as a list, tuple or dict in the first positional argument."),ee=p(),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 "),B=s("code"),Re=t("predict()"),ye=t(`, such as when creating your own layers or models with
the Keras `),G=s("code"),pe=t("Functional"),je=t(` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),te=p(),U=s("ul"),I=s("li"),be=t("a single Tensor with "),X=s("code"),me=t("input_ids"),Ee=t(" only and nothing else: "),L=s("code"),se=t("model(input_ids)"),Je=p(),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"),ve=t("model([input_ids, attention_mask, token_type_ids])"),re=p(),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=p(),Z=s("p"),Te=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(v){d=r(v,"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=m(v),c=r(v,"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=m(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=m(v),R=r(v,"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 "),B=r(C,"CODE",{});var Be=l(B);Re=n(Be,"predict()"),Be.forEach(o),ye=n(C,`, such as when creating your own layers or models with
the Keras `),G=r(C,"CODE",{});var qe=l(G);pe=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=m(v),U=r(v,"UL",{});var W=l(U);I=r(W,"LI",{});var H=l(I);be=n(H,"a single Tensor with "),X=r(H,"CODE",{});var Ge=l(X);me=n(Ge,"input_ids"),Ge.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=m(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 Xe=l(O);ve=n(Xe,"model([input_ids, attention_mask, token_type_ids])"),Xe.forEach(o),Y.forEach(o),re=m(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=m(v),Z=r(v,"P",{});var ne=l(Z);Te=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(v,E){g(v,d,E),e(d,y),e(d,h),e(h,u),e(d,_),g(v,i,E),g(v,c,E),e(c,J),e(J,ke),e(c,fe),e(c,q),e(q,ae),g(v,ee,E),g(v,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,B),e(B,Re),e(R,ye),e(R,G),e(G,pe),e(R,je),g(v,te,E),g(v,U,E),e(U,I),e(I,be),e(I,X),e(X,me),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,ve),e(U,re),e(U,N),e(N,he),e(N,A),e(A,xe),g(v,oe,E),g(v,Z,E),e(Z,Te),e(Z,x),e(x,ue),e(Z,de)},d(v){v&&o(d),v&&o(i),v&&o(c),v&&o(ee),v&&o(R),v&&o(te),v&&o(U),v&&o(oe),v&&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=p(),T(u.$$.fragment)},l(i){d=r(i,"P",{});var c=l(d);y=n(c,"Example:"),c.forEach(o),h=m(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(){T(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,B,Re,ye,G,pe,je,te,U,I,be,X,me,Ee,L,se,Je,z,Ce,D,ie,Ue,O,ve,re,N,he,A,xe,oe,Z,Te,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=p(),c=s("ul"),J=s("li"),ke=t("having all inputs as keyword arguments (like PyTorch models), or"),fe=p(),q=s("li"),ae=t("having all inputs as a list, tuple or dict in the first positional argument."),ee=p(),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 "),B=s("code"),Re=t("predict()"),ye=t(`, such as when creating your own layers or models with
the Keras `),G=s("code"),pe=t("Functional"),je=t(` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),te=p(),U=s("ul"),I=s("li"),be=t("a single Tensor with "),X=s("code"),me=t("input_ids"),Ee=t(" only and nothing else: "),L=s("code"),se=t("model(input_ids)"),Je=p(),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"),ve=t("model([input_ids, attention_mask, token_type_ids])"),re=p(),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=p(),Z=s("p"),Te=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(v){d=r(v,"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=m(v),c=r(v,"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=m(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=m(v),R=r(v,"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 "),B=r(C,"CODE",{});var Be=l(B);Re=n(Be,"predict()"),Be.forEach(o),ye=n(C,`, such as when creating your own layers or models with
the Keras `),G=r(C,"CODE",{});var qe=l(G);pe=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=m(v),U=r(v,"UL",{});var W=l(U);I=r(W,"LI",{});var H=l(I);be=n(H,"a single Tensor with "),X=r(H,"CODE",{});var Ge=l(X);me=n(Ge,"input_ids"),Ge.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=m(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 Xe=l(O);ve=n(Xe,"model([input_ids, attention_mask, token_type_ids])"),Xe.forEach(o),Y.forEach(o),re=m(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=m(v),Z=r(v,"P",{});var ne=l(Z);Te=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(v,E){g(v,d,E),e(d,y),e(d,h),e(h,u),e(d,_),g(v,i,E),g(v,c,E),e(c,J),e(J,ke),e(c,fe),e(c,q),e(q,ae),g(v,ee,E),g(v,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,B),e(B,Re),e(R,ye),e(R,G),e(G,pe),e(R,je),g(v,te,E),g(v,U,E),e(U,I),e(I,be),e(I,X),e(X,me),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,ve),e(U,re),e(U,N),e(N,he),e(N,A),e(A,xe),g(v,oe,E),g(v,Z,E),e(Z,Te),e(Z,x),e(x,ue),e(Z,de)},d(v){v&&o(d),v&&o(i),v&&o(c),v&&o(ee),v&&o(R),v&&o(te),v&&o(U),v&&o(oe),v&&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=p(),T(u.$$.fragment)},l(i){d=r(i,"P",{});var c=l(d);y=n(c,"Example:"),c.forEach(o),h=m(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,B,Re,ye,G,pe,je,te,U,I,be,X,me,Ee,L,se,Je,z,Ce,D,ie,Ue,O,ve,re,N,he,A,xe,oe,Z,Te,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=p(),c=s("ul"),J=s("li"),ke=t("having all inputs as keyword arguments (like PyTorch models), or"),fe=p(),q=s("li"),ae=t("having all inputs as a list, tuple or dict in the first positional argument."),ee=p(),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 "),B=s("code"),Re=t("predict()"),ye=t(`, such as when creating your own layers or models with
the Keras `),G=s("code"),pe=t("Functional"),je=t(` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),te=p(),U=s("ul"),I=s("li"),be=t("a single Tensor with "),X=s("code"),me=t("input_ids"),Ee=t(" only and nothing else: "),L=s("code"),se=t("model(input_ids)"),Je=p(),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"),ve=t("model([input_ids, attention_mask, token_type_ids])"),re=p(),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=p(),Z=s("p"),Te=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(v){d=r(v,"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=m(v),c=r(v,"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=m(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=m(v),R=r(v,"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 "),B=r(C,"CODE",{});var Be=l(B);Re=n(Be,"predict()"),Be.forEach(o),ye=n(C,`, such as when creating your own layers or models with
the Keras `),G=r(C,"CODE",{});var qe=l(G);pe=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=m(v),U=r(v,"UL",{});var W=l(U);I=r(W,"LI",{});var H=l(I);be=n(H,"a single Tensor with "),X=r(H,"CODE",{});var Ge=l(X);me=n(Ge,"input_ids"),Ge.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=m(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 Xe=l(O);ve=n(Xe,"model([input_ids, attention_mask, token_type_ids])"),Xe.forEach(o),Y.forEach(o),re=m(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=m(v),Z=r(v,"P",{});var ne=l(Z);Te=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(v,E){g(v,d,E),e(d,y),e(d,h),e(h,u),e(d,_),g(v,i,E),g(v,c,E),e(c,J),e(J,ke),e(c,fe),e(c,q),e(q,ae),g(v,ee,E),g(v,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,B),e(B,Re),e(R,ye),e(R,G),e(G,pe),e(R,je),g(v,te,E),g(v,U,E),e(U,I),e(I,be),e(I,X),e(X,me),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,ve),e(U,re),e(U,N),e(N,he),e(N,A),e(A,xe),g(v,oe,E),g(v,Z,E),e(Z,Te),e(Z,x),e(x,ue),e(Z,de)},d(v){v&&o(d),v&&o(i),v&&o(c),v&&o(ee),v&&o(R),v&&o(te),v&&o(U),v&&o(oe),v&&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=p(),T(u.$$.fragment)},l(i){d=r(i,"P",{});var c=l(d);y=n(c,"Example:"),c.forEach(o),h=m(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(){T(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,B,Re,ye,G,pe,je,te,U,I,be,X,me,Ee,L,se,Je,z,Ce,D,ie,Ue,O,ve,re,N,he,A,xe,oe,Z,Te,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=p(),c=s("ul"),J=s("li"),ke=t("having all inputs as keyword arguments (like PyTorch models), or"),fe=p(),q=s("li"),ae=t("having all inputs as a list, tuple or dict in the first positional argument."),ee=p(),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 "),B=s("code"),Re=t("predict()"),ye=t(`, such as when creating your own layers or models with
the Keras `),G=s("code"),pe=t("Functional"),je=t(` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),te=p(),U=s("ul"),I=s("li"),be=t("a single Tensor with "),X=s("code"),me=t("input_ids"),Ee=t(" only and nothing else: "),L=s("code"),se=t("model(input_ids)"),Je=p(),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"),ve=t("model([input_ids, attention_mask, token_type_ids])"),re=p(),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=p(),Z=s("p"),Te=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(v){d=r(v,"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=m(v),c=r(v,"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=m(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=m(v),R=r(v,"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 "),B=r(C,"CODE",{});var Be=l(B);Re=n(Be,"predict()"),Be.forEach(o),ye=n(C,`, such as when creating your own layers or models with
the Keras `),G=r(C,"CODE",{});var qe=l(G);pe=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=m(v),U=r(v,"UL",{});var W=l(U);I=r(W,"LI",{});var H=l(I);be=n(H,"a single Tensor with "),X=r(H,"CODE",{});var Ge=l(X);me=n(Ge,"input_ids"),Ge.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=m(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 Xe=l(O);ve=n(Xe,"model([input_ids, attention_mask, token_type_ids])"),Xe.forEach(o),Y.forEach(o),re=m(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=m(v),Z=r(v,"P",{});var ne=l(Z);Te=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(v,E){g(v,d,E),e(d,y),e(d,h),e(h,u),e(d,_),g(v,i,E),g(v,c,E),e(c,J),e(J,ke),e(c,fe),e(c,q),e(q,ae),g(v,ee,E),g(v,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,B),e(B,Re),e(R,ye),e(R,G),e(G,pe),e(R,je),g(v,te,E),g(v,U,E),e(U,I),e(I,be),e(I,X),e(X,me),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,ve),e(U,re),e(U,N),e(N,he),e(N,A),e(A,xe),g(v,oe,E),g(v,Z,E),e(Z,Te),e(Z,x),e(x,ue),e(Z,de)},d(v){v&&o(d),v&&o(i),v&&o(c),v&&o(ee),v&&o(R),v&&o(te),v&&o(U),v&&o(oe),v&&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=p(),T(u.$$.fragment)},l(i){d=r(i,"P",{});var c=l(d);y=n(c,"Example:"),c.forEach(o),h=m(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,B,Re,ye,G,pe,je,te,U,I,be,X,me,Ee,L,se,Je,z,Ce,D,ie,Ue,O,ve,re,N,he,A,xe,oe,Z,Te,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=p(),c=s("ul"),J=s("li"),ke=t("having all inputs as keyword arguments (like PyTorch models), or"),fe=p(),q=s("li"),ae=t("having all inputs as a list, tuple or dict in the first positional argument."),ee=p(),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 "),B=s("code"),Re=t("predict()"),ye=t(`, such as when creating your own layers or models with
the Keras `),G=s("code"),pe=t("Functional"),je=t(` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),te=p(),U=s("ul"),I=s("li"),be=t("a single Tensor with "),X=s("code"),me=t("input_ids"),Ee=t(" only and nothing else: "),L=s("code"),se=t("model(input_ids)"),Je=p(),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"),ve=t("model([input_ids, attention_mask, token_type_ids])"),re=p(),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=p(),Z=s("p"),Te=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(v){d=r(v,"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=m(v),c=r(v,"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=m(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=m(v),R=r(v,"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 "),B=r(C,"CODE",{});var Be=l(B);Re=n(Be,"predict()"),Be.forEach(o),ye=n(C,`, such as when creating your own layers or models with
the Keras `),G=r(C,"CODE",{});var qe=l(G);pe=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=m(v),U=r(v,"UL",{});var W=l(U);I=r(W,"LI",{});var H=l(I);be=n(H,"a single Tensor with "),X=r(H,"CODE",{});var Ge=l(X);me=n(Ge,"input_ids"),Ge.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=m(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 Xe=l(O);ve=n(Xe,"model([input_ids, attention_mask, token_type_ids])"),Xe.forEach(o),Y.forEach(o),re=m(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=m(v),Z=r(v,"P",{});var ne=l(Z);Te=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(v,E){g(v,d,E),e(d,y),e(d,h),e(h,u),e(d,_),g(v,i,E),g(v,c,E),e(c,J),e(J,ke),e(c,fe),e(c,q),e(q,ae),g(v,ee,E),g(v,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,B),e(B,Re),e(R,ye),e(R,G),e(G,pe),e(R,je),g(v,te,E),g(v,U,E),e(U,I),e(I,be),e(I,X),e(X,me),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,ve),e(U,re),e(U,N),e(N,he),e(N,A),e(A,xe),g(v,oe,E),g(v,Z,E),e(Z,Te),e(Z,x),e(x,ue),e(Z,de)},d(v){v&&o(d),v&&o(i),v&&o(c),v&&o(ee),v&&o(R),v&&o(te),v&&o(U),v&&o(oe),v&&o(Z)}}}function pj(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:"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=p(),T(u.$$.fragment)},l(i){d=r(i,"P",{});var c=l(d);y=n(c,"Example:"),c.forEach(o),h=m(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(){T(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,B,Re,ye,G,pe,je,te,U,I,be,X,me,Ee,L,se,Je,z,Ce,D,ie,Ue,O,ve,re,N,he,A,xe,oe,Z,Te,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=p(),c=s("ul"),J=s("li"),ke=t("having all inputs as keyword arguments (like PyTorch models), or"),fe=p(),q=s("li"),ae=t("having all inputs as a list, tuple or dict in the first positional argument."),ee=p(),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 "),B=s("code"),Re=t("predict()"),ye=t(`, such as when creating your own layers or models with
the Keras `),G=s("code"),pe=t("Functional"),je=t(` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),te=p(),U=s("ul"),I=s("li"),be=t("a single Tensor with "),X=s("code"),me=t("input_ids"),Ee=t(" only and nothing else: "),L=s("code"),se=t("model(input_ids)"),Je=p(),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"),ve=t("model([input_ids, attention_mask, token_type_ids])"),re=p(),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=p(),Z=s("p"),Te=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(v){d=r(v,"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=m(v),c=r(v,"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=m(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=m(v),R=r(v,"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 "),B=r(C,"CODE",{});var Be=l(B);Re=n(Be,"predict()"),Be.forEach(o),ye=n(C,`, such as when creating your own layers or models with
the Keras `),G=r(C,"CODE",{});var qe=l(G);pe=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=m(v),U=r(v,"UL",{});var W=l(U);I=r(W,"LI",{});var H=l(I);be=n(H,"a single Tensor with "),X=r(H,"CODE",{});var Ge=l(X);me=n(Ge,"input_ids"),Ge.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=m(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 Xe=l(O);ve=n(Xe,"model([input_ids, attention_mask, token_type_ids])"),Xe.forEach(o),Y.forEach(o),re=m(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=m(v),Z=r(v,"P",{});var ne=l(Z);Te=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(v,E){g(v,d,E),e(d,y),e(d,h),e(h,u),e(d,_),g(v,i,E),g(v,c,E),e(c,J),e(J,ke),e(c,fe),e(c,q),e(q,ae),g(v,ee,E),g(v,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,B),e(B,Re),e(R,ye),e(R,G),e(G,pe),e(R,je),g(v,te,E),g(v,U,E),e(U,I),e(I,be),e(I,X),e(X,me),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,ve),e(U,re),e(U,N),e(N,he),e(N,A),e(A,xe),g(v,oe,E),g(v,Z,E),e(Z,Te),e(Z,x),e(x,ue),e(Z,de)},d(v){v&&o(d),v&&o(i),v&&o(c),v&&o(ee),v&&o(R),v&&o(te),v&&o(U),v&&o(oe),v&&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=p(),T(u.$$.fragment)},l(i){d=r(i,"P",{});var c=l(d);y=n(c,"Example:"),c.forEach(o),h=m(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(){T(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=p(),T(u.$$.fragment)},l(i){d=r(i,"P",{});var c=l(d);y=n(c,"Example:"),c.forEach(o),h=m(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 vj(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 Tj(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=p(),T(u.$$.fragment)},l(i){d=r(i,"P",{});var c=l(d);y=n(c,"Example:"),c.forEach(o),h=m(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=p(),T(u.$$.fragment)},l(i){d=r(i,"P",{});var c=l(d);y=n(c,"Example:"),c.forEach(o),h=m(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=p(),T(u.$$.fragment)},l(i){d=r(i,"P",{});var c=l(d);y=n(c,"Example:"),c.forEach(o),h=m(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=p(),T(u.$$.fragment)},l(i){d=r(i,"P",{});var c=l(d);y=n(c,"Example:"),c.forEach(o),h=m(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=p(),T(u.$$.fragment)},l(i){d=r(i,"P",{});var c=l(d);y=n(c,"Example:"),c.forEach(o),h=m(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,B,Re,ye,G,pe,je,te,U,I,be,X,me,Ee,L,se,Je,z,Ce,D,ie,Ue,O,ve,re,N,he,A,xe,oe,Z,Te,x,ue,de,v,E,Ae,K,Le,Qe,C,We,De,Oe,Be,qe,W,H,Ge,Ve,Y,He,Xe,ce,Ye,ne,ze,Fn,Ad,Tr,hf,Bd,uf,mh,Uo,kr,ff,Mt,gf,Ri,_f,yf,wr,bf,vf,Tf,$t,kf,ji,wf,Ff,Ei,Mf,$f,Rf,Mn,hh,Rt,$n,Gd,Fr,jf,Xd,Ef,uh,Ke,Mr,Jf,$r,Cf,Rr,Uf,xf,zf,jr,If,Ji,Zf,Nf,Wf,Rn,qf,gt,Er,Vf,Sd,Af,Bf,Jr,Ci,Gf,Pd,Xf,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,pg,gh,lo,Zr,mg,Nr,hg,ec,ug,fg,gg,Cn,zi,_g,yg,Ii,bg,vg,Tg,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,Br,Ng,Gr,Wg,Xr,qg,Vg,Ag,Sr,Bg,Pr,Gg,Xg,Sg,io,Pg,ac,Lg,Qg,lc,Dg,Og,ic,Hg,Yg,dc,Kg,e_,cc,o_,t_,pc,n_,s_,r_,Wo,Lr,a_,Ct,l_,qi,i_,d_,mc,c_,p_,m_,zn,h_,In,bh,Ut,Zn,hc,Qr,u_,uc,f_,vh,lt,Dr,g_,xt,__,fc,y_,b_,Or,v_,T_,k_,qo,Hr,w_,zt,F_,Vi,M_,$_,gc,R_,j_,E_,Nn,J_,Wn,Th,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,B_,G_,vc,X_,S_,P_,Vn,L_,An,wh,Wt,Bn,Tc,ta,Q_,kc,D_,Fh,xo,na,O_,wc,H_,Y_,sa,K_,ra,ey,oy,ty,vo,aa,ny,qt,sy,Bi,ry,ay,Fc,ly,iy,dy,Gn,cy,Xn,py,Sn,Mh,Vt,Pn,Mc,la,my,$c,hy,$h,zo,ia,uy,Rc,fy,gy,da,_y,ca,yy,by,vy,Ao,pa,Ty,At,ky,Gi,wy,Fy,jc,My,$y,Ry,Ln,jy,Qn,Rh,Bt,Dn,Ec,ma,Ey,Jc,Jy,jh,Io,ha,Cy,Cc,Uy,xy,ua,zy,fa,Iy,Zy,Ny,Bo,ga,Wy,Gt,qy,Xi,Vy,Ay,Uc,By,Gy,Xy,On,Sy,Hn,Eh,Xt,Yn,xc,_a,Py,zc,Ly,Jh,Zo,ya,Qy,St,Dy,Ic,Oy,Hy,Zc,Yy,Ky,eb,ba,ob,va,tb,nb,sb,Go,Ta,rb,Pt,ab,Si,lb,ib,Nc,db,cb,pb,Kn,mb,es,Ch,Lt,os,Wc,ka,hb,qc,ub,Uh,co,wa,fb,Vc,gb,_b,Fa,yb,Pi,bb,vb,Tb,Ma,kb,$a,wb,Fb,Mb,ts,$b,Xo,Ra,Rb,Qt,jb,Li,Eb,Jb,Ac,Cb,Ub,xb,ns,zb,ss,xh,Dt,rs,Bc,ja,Ib,Gc,Zb,zh,po,Ea,Nb,Ja,Wb,Xc,qb,Vb,Ab,Ca,Bb,Qi,Gb,Xb,Sb,Ua,Pb,xa,Lb,Qb,Db,as,Ob,To,za,Hb,Ot,Yb,Di,Kb,ev,Sc,ov,tv,nv,ls,sv,is,rv,ds,Ih,Ht,cs,Pc,Ia,av,Lc,lv,Zh,mo,Za,iv,Na,dv,Qc,cv,pv,mv,Wa,hv,Oi,uv,fv,gv,qa,_v,Va,yv,bv,vv,ps,Tv,yt,Aa,kv,yo,wv,Dc,Fv,Mv,Oc,$v,Rv,Hc,jv,Ev,Yc,Jv,Cv,Kc,Uv,xv,zv,ms,Nh,Yt,hs,ep,Ba,Iv,op,Zv,Wh,ho,Ga,Nv,tp,Wv,qv,Xa,Vv,Hi,Av,Bv,Gv,Sa,Xv,Pa,Sv,Pv,Lv,us,Qv,ko,La,Dv,Kt,Ov,Yi,Hv,Yv,np,Kv,eT,oT,fs,tT,gs,nT,_s,qh,en,ys,sp,Qa,sT,rp,rT,Vh,uo,Da,aT,ap,lT,iT,Oa,dT,Ki,cT,pT,mT,Ha,hT,Ya,uT,fT,gT,bs,_T,So,Ka,yT,on,bT,ed,vT,TT,lp,kT,wT,FT,vs,MT,Ts,Ah,tn,ks,ip,el,$T,dp,RT,Bh,fo,ol,jT,cp,ET,JT,tl,CT,od,UT,xT,zT,nl,IT,sl,ZT,NT,WT,ws,qT,wo,rl,VT,nn,AT,td,BT,GT,pp,XT,ST,PT,Fs,LT,Ms,QT,$s,Gh,sn,Rs,mp,al,DT,hp,OT,Xh,go,ll,HT,rn,YT,up,KT,ek,fp,ok,tk,nk,il,sk,nd,rk,ak,lk,dl,ik,cl,dk,ck,pk,js,mk,Fo,pl,hk,an,uk,sd,fk,gk,gp,_k,yk,bk,Es,vk,Js,Tk,Cs,Sh,ln,Us,_p,ml,kk,yp,wk,Ph,eo,hl,Fk,bp,Mk,$k,ul,Rk,rd,jk,Ek,Jk,fl,Ck,gl,Uk,xk,zk,vp,Ik,Zk,dt,Tp,_l,Nk,Wk,kp,yl,qk,Vk,wp,bl,Ak,Bk,Fp,vl,Gk,Xk,Po,Tl,Sk,dn,Pk,Mp,Lk,Qk,$p,Dk,Ok,Hk,xs,Yk,zs,Lh,cn,Is,Rp,kl,Kk,jp,ew,Qh,oo,wl,ow,Fl,tw,Ep,nw,sw,rw,Ml,aw,ad,lw,iw,dw,$l,cw,Rl,pw,mw,hw,Jp,uw,fw,ct,Cp,jl,gw,_w,Up,El,yw,bw,xp,Jl,vw,Tw,zp,Cl,kw,ww,Lo,Ul,Fw,pn,Mw,Ip,$w,Rw,Zp,jw,Ew,Jw,Zs,Cw,Ns,Dh,mn,Ws,Np,xl,Uw,Wp,xw,Oh,to,zl,zw,qp,Iw,Zw,Il,Nw,ld,Ww,qw,Vw,Zl,Aw,Nl,Bw,Gw,Xw,Vp,Sw,Pw,pt,Ap,Wl,Lw,Qw,Bp,ql,Dw,Ow,Gp,Vl,Hw,Yw,Xp,Al,Kw,eF,Qo,Bl,oF,hn,tF,Sp,nF,sF,Pp,rF,aF,lF,qs,iF,Vs,Hh,un,As,Lp,Gl,dF,Qp,cF,Yh,no,Xl,pF,Dp,mF,hF,Sl,uF,id,fF,gF,_F,Pl,yF,Ll,bF,vF,TF,Op,kF,wF,mt,Hp,Ql,FF,MF,Yp,Dl,$F,RF,Kp,Ol,jF,EF,em,Hl,JF,CF,Do,Yl,UF,fn,xF,om,zF,IF,tm,ZF,NF,WF,Bs,qF,Gs,Kh,gn,Xs,nm,Kl,VF,sm,AF,eu,so,ei,BF,rm,GF,XF,oi,SF,dd,PF,LF,QF,ti,DF,ni,OF,HF,YF,am,KF,eM,ht,lm,si,oM,tM,im,ri,nM,sM,dm,ai,rM,aM,cm,li,lM,iM,Oo,ii,dM,_n,cM,pm,pM,mM,mm,hM,uM,fM,Ss,gM,Ps,ou,yn,Ls,hm,di,_M,um,yM,tu,ro,ci,bM,bn,vM,fm,TM,kM,gm,wM,FM,MM,pi,$M,cd,RM,jM,EM,mi,JM,hi,CM,UM,xM,_m,zM,IM,ut,ym,ui,ZM,NM,bm,fi,WM,qM,vm,gi,VM,AM,Tm,_i,BM,GM,Ho,yi,XM,vn,SM,km,PM,LM,wm,QM,DM,OM,Qs,HM,Ds,nu;return i=new Pe({}),R=new Pe({}),A=new Pe({}),Tr=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/v4.32.0/en/model_doc/roformer#transformers.RoFormerModel">RoFormerModel</a> or <a href="/docs/transformers/v4.32.0/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/v4.32.0/en/model_doc/roformer#transformers.RoFormerModel">RoFormerModel</a> or <a href="/docs/transformers/v4.32.0/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/v4.32.0/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/v4.32.0/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/v4.32.0/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/v4.32.0/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/v4.32.0/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/v4.32.0/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/v4.32.0/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/v4.32.0/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({}),Br=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/v4.32.0/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/v4.32.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/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/v4.32.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.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/v4.32.0/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/v4.32.0/src/transformers/models/roformer/modeling_roformer.py#L823",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.32.0/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/v4.32.0/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/v4.32.0/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/v4.32.0/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/v4.32.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/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/v4.32.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.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/v4.32.0/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/v4.32.0/src/transformers/models/roformer/modeling_roformer.py#L1073",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.32.0/en/main_classes/output#transformers.modeling_outputs.CausalLMOutputWithCrossAttentions"
>transformers.modeling_outputs.CausalLMOutputWithCrossAttentions</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.32.0/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/v4.32.0/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/v4.32.0/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/v4.32.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/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/v4.32.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.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/v4.32.0/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/v4.32.0/src/transformers/models/roformer/modeling_roformer.py#L974",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.32.0/en/main_classes/output#transformers.modeling_outputs.MaskedLMOutput"
>transformers.modeling_outputs.MaskedLMOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.32.0/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/v4.32.0/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/v4.32.0/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/v4.32.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/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/v4.32.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.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/v4.32.0/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/v4.32.0/src/transformers/models/roformer/modeling_roformer.py#L1234",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.32.0/en/main_classes/output#transformers.modeling_outputs.SequenceClassifierOutput"
>transformers.modeling_outputs.SequenceClassifierOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.32.0/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/v4.32.0/en/main_classes/output#transformers.modeling_outputs.SequenceClassifierOutput"
>transformers.modeling_outputs.SequenceClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Gn=new Se({props:{$$slots:{default:[qR]},$$scope:{ctx:j}}}),Xn=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/v4.32.0/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/v4.32.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/roformer/modeling_roformer.py#L1315"}}),pa=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/v4.32.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.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/v4.32.0/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/v4.32.0/src/transformers/models/roformer/modeling_roformer.py#L1326",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.32.0/en/main_classes/output#transformers.modeling_outputs.MultipleChoiceModelOutput"
>transformers.modeling_outputs.MultipleChoiceModelOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.32.0/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/v4.32.0/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:[BR]},$$scope:{ctx:j}}}),Qn=new Ie({props:{anchor:"transformers.RoFormerForMultipleChoice.forward.example",$$slots:{default:[GR]},$$scope:{ctx:j}}}),ma=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/v4.32.0/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/v4.32.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/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/v4.32.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.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/v4.32.0/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/v4.32.0/src/transformers/models/roformer/modeling_roformer.py#L1418",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.32.0/en/main_classes/output#transformers.modeling_outputs.TokenClassifierOutput"
>transformers.modeling_outputs.TokenClassifierOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.32.0/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/v4.32.0/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:[XR]},$$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/v4.32.0/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/v4.32.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/roformer/modeling_roformer.py#L1482"}}),Ta=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/v4.32.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.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/v4.32.0/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/v4.32.0/src/transformers/models/roformer/modeling_roformer.py#L1495",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.32.0/en/main_classes/output#transformers.modeling_outputs.QuestionAnsweringModelOutput"
>transformers.modeling_outputs.QuestionAnsweringModelOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.32.0/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/v4.32.0/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/v4.32.0/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/v4.32.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/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/v4.32.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.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/v4.32.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.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/v4.32.0/src/transformers/models/roformer/modeling_tf_roformer.py#L804",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.32.0/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/v4.32.0/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/v4.32.0/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/v4.32.0/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/v4.32.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/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/v4.32.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.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/v4.32.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.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/v4.32.0/src/transformers/models/roformer/modeling_tf_roformer.py#L855",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.32.0/en/main_classes/output#transformers.modeling_tf_outputs.TFMaskedLMOutput"
>transformers.modeling_tf_outputs.TFMaskedLMOutput</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/v4.32.0/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/v4.32.0/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/v4.32.0/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/v4.32.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/roformer/modeling_tf_roformer.py#L911"}}),ps=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/v4.32.0/src/transformers/models/roformer/modeling_tf_roformer.py#L924",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.32.0/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/v4.32.0/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/v4.32.0/en/main_classes/output#transformers.modeling_tf_outputs.TFCausalLMOutput"
>transformers.modeling_tf_outputs.TFCausalLMOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),ms=new Ie({props:{anchor:"transformers.TFRoFormerForCausalLM.call.example",$$slots:{default:[tj]},$$scope:{ctx:j}}}),Ba=new Pe({}),Ga=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/v4.32.0/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/v4.32.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/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/v4.32.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.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/v4.32.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.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/v4.32.0/src/transformers/models/roformer/modeling_tf_roformer.py#L1026",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.32.0/en/main_classes/output#transformers.modeling_tf_outputs.TFSequenceClassifierOutput"
>transformers.modeling_tf_outputs.TFSequenceClassifierOutput</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/v4.32.0/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/v4.32.0/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/v4.32.0/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/v4.32.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/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/v4.32.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.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/v4.32.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.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/v4.32.0/src/transformers/models/roformer/modeling_tf_roformer.py#L1096",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.32.0/en/main_classes/output#transformers.modeling_tf_outputs.TFMultipleChoiceModelOutput"
>transformers.modeling_tf_outputs.TFMultipleChoiceModelOutput</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/v4.32.0/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/v4.32.0/en/main_classes/output#transformers.modeling_tf_outputs.TFMultipleChoiceModelOutput"
>transformers.modeling_tf_outputs.TFMultipleChoiceModelOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),vs=new Se({props:{$$slots:{default:[ij]},$$scope:{ctx:j}}}),Ts=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/v4.32.0/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/v4.32.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/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/v4.32.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.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/v4.32.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.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/v4.32.0/src/transformers/models/roformer/modeling_tf_roformer.py#L1190",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.32.0/en/main_classes/output#transformers.modeling_tf_outputs.TFTokenClassifierOutput"
>transformers.modeling_tf_outputs.TFTokenClassifierOutput</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/v4.32.0/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/v4.32.0/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:[pj]},$$scope:{ctx:j}}}),Ms=new Ie({props:{anchor:"transformers.TFRoFormerForTokenClassification.call.example",$$slots:{default:[mj]},$$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/v4.32.0/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/v4.32.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/roformer/modeling_tf_roformer.py#L1249"}}),js=new Se({props:{$$slots:{default:[uj]},$$scope:{ctx:j}}}),pl=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/v4.32.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.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/v4.32.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.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/v4.32.0/src/transformers/models/roformer/modeling_tf_roformer.py#L1260",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.32.0/en/main_classes/output#transformers.modeling_tf_outputs.TFQuestionAnsweringModelOutput"
>transformers.modeling_tf_outputs.TFQuestionAnsweringModelOutput</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/v4.32.0/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/v4.32.0/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}}}),ml=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/v4.32.0/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/v4.32.0/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/v4.32.0/en/main_classes/model#transformers.FlaxPreTrainedModel.to_fp16">to_fp16()</a> and
<a href="/docs/transformers/v4.32.0/en/main_classes/model#transformers.FlaxPreTrainedModel.to_bf16">to_bf16()</a>.`,name:"dtype"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/roformer/modeling_flax_roformer.py#L747"}}),Tl=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/v4.32.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.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/v4.32.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/roformer/modeling_flax_roformer.py#L653",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.32.0/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/v4.32.0/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/v4.32.0/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/v4.32.0/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/v4.32.0/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/v4.32.0/en/main_classes/model#transformers.FlaxPreTrainedModel.to_fp16">to_fp16()</a> and
<a href="/docs/transformers/v4.32.0/en/main_classes/model#transformers.FlaxPreTrainedModel.to_bf16">to_bf16()</a>.`,name:"dtype"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/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/v4.32.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.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/v4.32.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/roformer/modeling_flax_roformer.py#L653",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.32.0/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/v4.32.0/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/v4.32.0/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:[vj]},$$scope:{ctx:j}}}),Ns=new Ie({props:{anchor:"transformers.FlaxRoFormerForMaskedLM.__call__.example",$$slots:{default:[Tj]},$$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/v4.32.0/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/v4.32.0/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/v4.32.0/en/main_classes/model#transformers.FlaxPreTrainedModel.to_fp16">to_fp16()</a> and
<a href="/docs/transformers/v4.32.0/en/main_classes/model#transformers.FlaxPreTrainedModel.to_bf16">to_bf16()</a>.`,name:"dtype"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/roformer/modeling_flax_roformer.py#L869"}}),Bl=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/v4.32.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.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/v4.32.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/roformer/modeling_flax_roformer.py#L653",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.32.0/en/main_classes/output#transformers.modeling_flax_outputs.FlaxSequenceClassifierOutput"
>transformers.modeling_flax_outputs.FlaxSequenceClassifierOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.32.0/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/v4.32.0/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}}}),Gl=new Pe({}),Xl=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/v4.32.0/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/v4.32.0/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/v4.32.0/en/main_classes/model#transformers.FlaxPreTrainedModel.to_fp16">to_fp16()</a> and
<a href="/docs/transformers/v4.32.0/en/main_classes/model#transformers.FlaxPreTrainedModel.to_bf16">to_bf16()</a>.`,name:"dtype"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/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/v4.32.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.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/v4.32.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/roformer/modeling_flax_roformer.py#L653",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.32.0/en/main_classes/output#transformers.modeling_flax_outputs.FlaxMultipleChoiceModelOutput"
>transformers.modeling_flax_outputs.FlaxMultipleChoiceModelOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.32.0/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/v4.32.0/en/main_classes/output#transformers.modeling_flax_outputs.FlaxMultipleChoiceModelOutput"
>transformers.modeling_flax_outputs.FlaxMultipleChoiceModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Bs=new Se({props:{$$slots:{default:[Fj]},$$scope:{ctx:j}}}),Gs=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/v4.32.0/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/v4.32.0/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/v4.32.0/en/main_classes/model#transformers.FlaxPreTrainedModel.to_fp16">to_fp16()</a> and
<a href="/docs/transformers/v4.32.0/en/main_classes/model#transformers.FlaxPreTrainedModel.to_bf16">to_bf16()</a>.`,name:"dtype"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/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/v4.32.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.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/v4.32.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/roformer/modeling_flax_roformer.py#L653",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.32.0/en/main_classes/output#transformers.modeling_flax_outputs.FlaxTokenClassifierOutput"
>transformers.modeling_flax_outputs.FlaxTokenClassifierOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.32.0/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/v4.32.0/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/v4.32.0/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/v4.32.0/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/v4.32.0/en/main_classes/model#transformers.FlaxPreTrainedModel.to_fp16">to_fp16()</a> and
<a href="/docs/transformers/v4.32.0/en/main_classes/model#transformers.FlaxPreTrainedModel.to_bf16">to_bf16()</a>.`,name:"dtype"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/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/v4.32.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.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/v4.32.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/roformer/modeling_flax_roformer.py#L653",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.32.0/en/main_classes/output#transformers.modeling_flax_outputs.FlaxQuestionAnsweringModelOutput"
>transformers.modeling_flax_outputs.FlaxQuestionAnsweringModelOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.32.0/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/v4.32.0/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=p(),h=s("h1"),u=s("a"),_=s("span"),T(i.$$.fragment),c=p(),J=s("span"),ke=t("RoFormer"),fe=p(),q=s("h2"),ae=s("a"),ee=s("span"),T(R.$$.fragment),we=p(),P=s("span"),Fe=t("Overview"),ge=p(),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=p(),B=s("p"),Re=t("The abstract from the paper is the following:"),ye=p(),G=s("p"),pe=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=p(),U=s("p"),I=t("Tips:"),be=p(),X=s("ul"),me=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=p(),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("."),ve=p(),re=s("h2"),N=s("a"),he=s("span"),T(A.$$.fragment),xe=p(),oe=s("span"),Z=t("Documentation resources"),Te=p(),x=s("ul"),ue=s("li"),de=s("a"),v=t("Text classification task guide"),E=p(),Ae=s("li"),K=s("a"),Le=t("Token classification task guide"),Qe=p(),C=s("li"),We=s("a"),De=t("Question answering task guide"),Oe=p(),Be=s("li"),qe=s("a"),W=t("Causal language modeling task guide"),H=p(),Ge=s("li"),Ve=s("a"),Y=t("Masked language modeling task guide"),He=p(),Xe=s("li"),ce=s("a"),Ye=t("Multiple choice task guide"),ne=p(),ze=s("h2"),Fn=s("a"),Ad=s("span"),T(Tr.$$.fragment),hf=p(),Bd=s("span"),uf=t("RoFormerConfig"),mh=p(),Uo=s("div"),T(kr.$$.fragment),ff=p(),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"),vf=t(" architecture."),Tf=p(),$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=p(),T(Mn.$$.fragment),hh=p(),Rt=s("h2"),$n=s("a"),Gd=s("span"),T(Fr.$$.fragment),jf=p(),Xd=s("span"),Ef=t("RoFormerTokenizer"),uh=p(),Ke=s("div"),T(Mr.$$.fragment),Jf=p(),$r=s("p"),Cf=t("Construct a RoFormer tokenizer. Based on "),Rr=s("a"),Uf=t("Rust Jieba"),xf=t("."),zf=p(),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=p(),T(Rn.$$.fragment),qf=p(),gt=s("div"),T(Er.$$.fragment),Vf=p(),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:`),Bf=p(),Jr=s("ul"),Ci=s("li"),Gf=t("single sequence: "),Pd=s("code"),Xf=t("[CLS] X [SEP]"),Sf=p(),Ui=s("li"),Pf=t("pair of sequences: "),Ld=s("code"),Lf=t("[CLS] A [SEP] B [SEP]"),Qf=p(),jn=s("div"),T(Cr.$$.fragment),Df=p(),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=p(),No=s("div"),T(xr.$$.fragment),eg=p(),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=p(),T(En.$$.fragment),ng=p(),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=p(),xi=s("div"),T(zr.$$.fragment),fh=p(),Et=s("h2"),Jn=s("a"),Yd=s("span"),T(Ir.$$.fragment),cg=p(),Kd=s("span"),pg=t("RoFormerTokenizerFast"),gh=p(),lo=s("div"),T(Zr.$$.fragment),mg=p(),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=p(),Cn=s("p"),zi=s("a"),_g=t("RoFormerTokenizerFast"),yg=t(" is almost identical to "),Ii=s("a"),bg=t("BertTokenizerFast"),vg=t(` and runs end-to-end tokenization:
punctuation splitting and wordpiece. There are some difference between them when tokenizing Chinese.`),Tg=p(),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=p(),T(Un.$$.fragment),$g=p(),_t=s("div"),T(qr.$$.fragment),Rg=p(),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=p(),Vr=s("ul"),Ni=s("li"),Jg=t("single sequence: "),tc=s("code"),Cg=t("[CLS] X [SEP]"),Ug=p(),Wi=s("li"),xg=t("pair of sequences: "),nc=s("code"),zg=t("[CLS] A [SEP] B [SEP]"),_h=p(),Jt=s("h2"),xn=s("a"),sc=s("span"),T(Ar.$$.fragment),Ig=p(),rc=s("span"),Zg=t("RoFormerModel"),yh=p(),_o=s("div"),T(Br.$$.fragment),Ng=p(),Gr=s("p"),Wg=t(`The bare RoFormer Model transformer outputting raw hidden-states without any specific head on top.
This model is a PyTorch `),Xr=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=p(),Sr=s("p"),Bg=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"),Gg=t(`Attention is
all you need`),Xg=t(` by Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit,
Llion Jones, Aidan N. Gomez, Lukasz Kaiser and Illia Polosukhin.`),Sg=p(),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 "),pc=s("code"),n_=t("encoder_hidden_states"),s_=t(" is then expected as an input to the forward pass."),r_=p(),Wo=s("div"),T(Lr.$$.fragment),a_=p(),Ct=s("p"),l_=t("The "),qi=s("a"),i_=t("RoFormerModel"),d_=t(" forward method, overrides the "),mc=s("code"),c_=t("__call__"),p_=t(" special method."),m_=p(),T(zn.$$.fragment),h_=p(),T(In.$$.fragment),bh=p(),Ut=s("h2"),Zn=s("a"),hc=s("span"),T(Qr.$$.fragment),u_=p(),uc=s("span"),f_=t("RoFormerForCausalLM"),vh=p(),lt=s("div"),T(Dr.$$.fragment),g_=p(),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"),v_=t("torch.nn.Module"),T_=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_=p(),qo=s("div"),T(Hr.$$.fragment),w_=p(),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_=p(),T(Nn.$$.fragment),J_=p(),T(Wn.$$.fragment),Th=p(),It=s("h2"),qn=s("a"),_c=s("span"),T(Yr.$$.fragment),C_=p(),yc=s("span"),U_=t("RoFormerForMaskedLM"),kh=p(),it=s("div"),T(Kr.$$.fragment),x_=p(),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_=p(),Vo=s("div"),T(oa.$$.fragment),V_=p(),Nt=s("p"),A_=t("The "),Ai=s("a"),B_=t("RoFormerForMaskedLM"),G_=t(" forward method, overrides the "),vc=s("code"),X_=t("__call__"),S_=t(" special method."),P_=p(),T(Vn.$$.fragment),L_=p(),T(An.$$.fragment),wh=p(),Wt=s("h2"),Bn=s("a"),Tc=s("span"),T(ta.$$.fragment),Q_=p(),kc=s("span"),D_=t("RoFormerForSequenceClassification"),Fh=p(),xo=s("div"),T(na.$$.fragment),O_=p(),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_=p(),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=p(),vo=s("div"),T(aa.$$.fragment),ny=p(),qt=s("p"),sy=t("The "),Bi=s("a"),ry=t("RoFormerForSequenceClassification"),ay=t(" forward method, overrides the "),Fc=s("code"),ly=t("__call__"),iy=t(" special method."),dy=p(),T(Gn.$$.fragment),cy=p(),T(Xn.$$.fragment),py=p(),T(Sn.$$.fragment),Mh=p(),Vt=s("h2"),Pn=s("a"),Mc=s("span"),T(la.$$.fragment),my=p(),$c=s("span"),hy=t("RoFormerForMultipleChoice"),$h=p(),zo=s("div"),T(ia.$$.fragment),uy=p(),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=p(),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.`),vy=p(),Ao=s("div"),T(pa.$$.fragment),Ty=p(),At=s("p"),ky=t("The "),Gi=s("a"),wy=t("RoFormerForMultipleChoice"),Fy=t(" forward method, overrides the "),jc=s("code"),My=t("__call__"),$y=t(" special method."),Ry=p(),T(Ln.$$.fragment),jy=p(),T(Qn.$$.fragment),Rh=p(),Bt=s("h2"),Dn=s("a"),Ec=s("span"),T(ma.$$.fragment),Ey=p(),Jc=s("span"),Jy=t("RoFormerForTokenClassification"),jh=p(),Io=s("div"),T(ha.$$.fragment),Cy=p(),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=p(),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=p(),Bo=s("div"),T(ga.$$.fragment),Wy=p(),Gt=s("p"),qy=t("The "),Xi=s("a"),Vy=t("RoFormerForTokenClassification"),Ay=t(" forward method, overrides the "),Uc=s("code"),By=t("__call__"),Gy=t(" special method."),Xy=p(),T(On.$$.fragment),Sy=p(),T(Hn.$$.fragment),Eh=p(),Xt=s("h2"),Yn=s("a"),xc=s("span"),T(_a.$$.fragment),Py=p(),zc=s("span"),Ly=t("RoFormerForQuestionAnswering"),Jh=p(),Zo=s("div"),T(ya.$$.fragment),Qy=p(),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=p(),ba=s("p"),ob=t("This model is a PyTorch "),va=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=p(),Go=s("div"),T(Ta.$$.fragment),rb=p(),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."),pb=p(),T(Kn.$$.fragment),mb=p(),T(es.$$.fragment),Ch=p(),Lt=s("h2"),os=s("a"),Wc=s("span"),T(ka.$$.fragment),hb=p(),qc=s("span"),ub=t("TFRoFormerModel"),Uh=p(),co=s("div"),T(wa.$$.fragment),fb=p(),Vc=s("p"),gb=t("The bare RoFormer Model transformer outputing raw hidden-states without any specific head on top."),_b=p(),Fa=s("p"),yb=t("This model inherits from "),Pi=s("a"),bb=t("TFPreTrainedModel"),vb=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.)`),Tb=p(),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=p(),T(ts.$$.fragment),$b=p(),Xo=s("div"),T(Ra.$$.fragment),Rb=p(),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=p(),T(ns.$$.fragment),zb=p(),T(ss.$$.fragment),xh=p(),Dt=s("h2"),rs=s("a"),Bc=s("span"),T(ja.$$.fragment),Ib=p(),Gc=s("span"),Zb=t("TFRoFormerForMaskedLM"),zh=p(),po=s("div"),T(Ea.$$.fragment),Nb=p(),Ja=s("p"),Wb=t("RoFormer Model with a "),Xc=s("code"),qb=t("language modeling"),Vb=t(" head on top."),Ab=p(),Ca=s("p"),Bb=t("This model inherits from "),Qi=s("a"),Gb=t("TFPreTrainedModel"),Xb=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=p(),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=p(),T(as.$$.fragment),Ob=p(),To=s("div"),T(za.$$.fragment),Hb=p(),Ot=s("p"),Yb=t("The "),Di=s("a"),Kb=t("TFRoFormerForMaskedLM"),ev=t(" forward method, overrides the "),Sc=s("code"),ov=t("__call__"),tv=t(" special method."),nv=p(),T(ls.$$.fragment),sv=p(),T(is.$$.fragment),rv=p(),T(ds.$$.fragment),Ih=p(),Ht=s("h2"),cs=s("a"),Pc=s("span"),T(Ia.$$.fragment),av=p(),Lc=s("span"),lv=t("TFRoFormerForCausalLM"),Zh=p(),mo=s("div"),T(Za.$$.fragment),iv=p(),Na=s("p"),dv=t("RoFormer Model with a "),Qc=s("code"),cv=t("language modeling"),pv=t(" head on top for CLM fine-tuning."),mv=p(),Wa=s("p"),hv=t("This model inherits from "),Oi=s("a"),uv=t("TFPreTrainedModel"),fv=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.)`),gv=p(),qa=s("p"),_v=t("This model is also a "),Va=s("a"),yv=t("tf.keras.Model"),bv=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.`),vv=p(),T(ps.$$.fragment),Tv=p(),yt=s("div"),T(Aa.$$.fragment),kv=p(),yo=s("p"),wv=t("labels ("),Dc=s("code"),Fv=t("tf.Tensor"),Mv=t(" or "),Oc=s("code"),$v=t("np.ndarray"),Rv=t(" of shape "),Hc=s("code"),jv=t("(batch_size, sequence_length)"),Ev=t(", "),Yc=s("em"),Jv=t("optional"),Cv=t(`):
Labels for computing the cross entropy classification loss. Indices should be in `),Kc=s("code"),Uv=t("[0, ..., config.vocab_size - 1]"),xv=t("."),zv=p(),T(ms.$$.fragment),Nh=p(),Yt=s("h2"),hs=s("a"),ep=s("span"),T(Ba.$$.fragment),Iv=p(),op=s("span"),Zv=t("TFRoFormerForSequenceClassification"),Wh=p(),ho=s("div"),T(Ga.$$.fragment),Nv=p(),tp=s("p"),Wv=t("RoFormer Model transformer with a sequence classification/regression head on top e.g., for GLUE tasks."),qv=p(),Xa=s("p"),Vv=t("This model inherits from "),Hi=s("a"),Av=t("TFPreTrainedModel"),Bv=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.)`),Gv=p(),Sa=s("p"),Xv=t("This model is also a "),Pa=s("a"),Sv=t("tf.keras.Model"),Pv=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.`),Lv=p(),T(us.$$.fragment),Qv=p(),ko=s("div"),T(La.$$.fragment),Dv=p(),Kt=s("p"),Ov=t("The "),Yi=s("a"),Hv=t("TFRoFormerForSequenceClassification"),Yv=t(" forward method, overrides the "),np=s("code"),Kv=t("__call__"),eT=t(" special method."),oT=p(),T(fs.$$.fragment),tT=p(),T(gs.$$.fragment),nT=p(),T(_s.$$.fragment),qh=p(),en=s("h2"),ys=s("a"),sp=s("span"),T(Qa.$$.fragment),sT=p(),rp=s("span"),rT=t("TFRoFormerForMultipleChoice"),Vh=p(),uo=s("div"),T(Da.$$.fragment),aT=p(),ap=s("p"),lT=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.`),iT=p(),Oa=s("p"),dT=t("This model inherits from "),Ki=s("a"),cT=t("TFPreTrainedModel"),pT=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.)`),mT=p(),Ha=s("p"),hT=t("This model is also a "),Ya=s("a"),uT=t("tf.keras.Model"),fT=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.`),gT=p(),T(bs.$$.fragment),_T=p(),So=s("div"),T(Ka.$$.fragment),yT=p(),on=s("p"),bT=t("The "),ed=s("a"),vT=t("TFRoFormerForMultipleChoice"),TT=t(" forward method, overrides the "),lp=s("code"),kT=t("__call__"),wT=t(" special method."),FT=p(),T(vs.$$.fragment),MT=p(),T(Ts.$$.fragment),Ah=p(),tn=s("h2"),ks=s("a"),ip=s("span"),T(el.$$.fragment),$T=p(),dp=s("span"),RT=t("TFRoFormerForTokenClassification"),Bh=p(),fo=s("div"),T(ol.$$.fragment),jT=p(),cp=s("p"),ET=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.`),JT=p(),tl=s("p"),CT=t("This model inherits from "),od=s("a"),UT=t("TFPreTrainedModel"),xT=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.)`),zT=p(),nl=s("p"),IT=t("This model is also a "),sl=s("a"),ZT=t("tf.keras.Model"),NT=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.`),WT=p(),T(ws.$$.fragment),qT=p(),wo=s("div"),T(rl.$$.fragment),VT=p(),nn=s("p"),AT=t("The "),td=s("a"),BT=t("TFRoFormerForTokenClassification"),GT=t(" forward method, overrides the "),pp=s("code"),XT=t("__call__"),ST=t(" special method."),PT=p(),T(Fs.$$.fragment),LT=p(),T(Ms.$$.fragment),QT=p(),T($s.$$.fragment),Gh=p(),sn=s("h2"),Rs=s("a"),mp=s("span"),T(al.$$.fragment),DT=p(),hp=s("span"),OT=t("TFRoFormerForQuestionAnswering"),Xh=p(),go=s("div"),T(ll.$$.fragment),HT=p(),rn=s("p"),YT=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 `),up=s("code"),KT=t("span start logits"),ek=t(" and "),fp=s("code"),ok=t("span end logits"),tk=t(")."),nk=p(),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=p(),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.`),pk=p(),T(js.$$.fragment),mk=p(),Fo=s("div"),T(pl.$$.fragment),hk=p(),an=s("p"),uk=t("The "),sd=s("a"),fk=t("TFRoFormerForQuestionAnswering"),gk=t(" forward method, overrides the "),gp=s("code"),_k=t("__call__"),yk=t(" special method."),bk=p(),T(Es.$$.fragment),vk=p(),T(Js.$$.fragment),Tk=p(),T(Cs.$$.fragment),Sh=p(),ln=s("h2"),Us=s("a"),_p=s("span"),T(ml.$$.fragment),kk=p(),yp=s("span"),wk=t("FlaxRoFormerModel"),Ph=p(),eo=s("div"),T(hl.$$.fragment),Fk=p(),bp=s("p"),Mk=t("The bare RoFormer Model transformer outputting raw hidden-states without any specific head on top."),$k=p(),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=p(),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=p(),vp=s("p"),Ik=t("Finally, this model supports inherent JAX features such as:"),Zk=p(),dt=s("ul"),Tp=s("li"),_l=s("a"),Nk=t("Just-In-Time (JIT) compilation"),Wk=p(),kp=s("li"),yl=s("a"),qk=t("Automatic Differentiation"),Vk=p(),wp=s("li"),bl=s("a"),Ak=t("Vectorization"),Bk=p(),Fp=s("li"),vl=s("a"),Gk=t("Parallelization"),Xk=p(),Po=s("div"),T(Tl.$$.fragment),Sk=p(),dn=s("p"),Pk=t("The "),Mp=s("code"),Lk=t("FlaxRoFormerPreTrainedModel"),Qk=t(" forward method, overrides the "),$p=s("code"),Dk=t("__call__"),Ok=t(" special method."),Hk=p(),T(xs.$$.fragment),Yk=p(),T(zs.$$.fragment),Lh=p(),cn=s("h2"),Is=s("a"),Rp=s("span"),T(kl.$$.fragment),Kk=p(),jp=s("span"),ew=t("FlaxRoFormerForMaskedLM"),Qh=p(),oo=s("div"),T(wl.$$.fragment),ow=p(),Fl=s("p"),tw=t("RoFormer Model with a "),Ep=s("code"),nw=t("language modeling"),sw=t(" head on top."),rw=p(),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=p(),$l=s("p"),cw=t("This model is also a Flax Linen "),Rl=s("a"),pw=t("flax.linen.Module"),mw=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=p(),Jp=s("p"),uw=t("Finally, this model supports inherent JAX features such as:"),fw=p(),ct=s("ul"),Cp=s("li"),jl=s("a"),gw=t("Just-In-Time (JIT) compilation"),_w=p(),Up=s("li"),El=s("a"),yw=t("Automatic Differentiation"),bw=p(),xp=s("li"),Jl=s("a"),vw=t("Vectorization"),Tw=p(),zp=s("li"),Cl=s("a"),kw=t("Parallelization"),ww=p(),Lo=s("div"),T(Ul.$$.fragment),Fw=p(),pn=s("p"),Mw=t("The "),Ip=s("code"),$w=t("FlaxRoFormerPreTrainedModel"),Rw=t(" forward method, overrides the "),Zp=s("code"),jw=t("__call__"),Ew=t(" special method."),Jw=p(),T(Zs.$$.fragment),Cw=p(),T(Ns.$$.fragment),Dh=p(),mn=s("h2"),Ws=s("a"),Np=s("span"),T(xl.$$.fragment),Uw=p(),Wp=s("span"),xw=t("FlaxRoFormerForSequenceClassification"),Oh=p(),to=s("div"),T(zl.$$.fragment),zw=p(),qp=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=p(),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=p(),Zl=s("p"),Aw=t("This model is also a Flax Linen "),Nl=s("a"),Bw=t("flax.linen.Module"),Gw=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.`),Xw=p(),Vp=s("p"),Sw=t("Finally, this model supports inherent JAX features such as:"),Pw=p(),pt=s("ul"),Ap=s("li"),Wl=s("a"),Lw=t("Just-In-Time (JIT) compilation"),Qw=p(),Bp=s("li"),ql=s("a"),Dw=t("Automatic Differentiation"),Ow=p(),Gp=s("li"),Vl=s("a"),Hw=t("Vectorization"),Yw=p(),Xp=s("li"),Al=s("a"),Kw=t("Parallelization"),eF=p(),Qo=s("div"),T(Bl.$$.fragment),oF=p(),hn=s("p"),tF=t("The "),Sp=s("code"),nF=t("FlaxRoFormerPreTrainedModel"),sF=t(" forward method, overrides the "),Pp=s("code"),rF=t("__call__"),aF=t(" special method."),lF=p(),T(qs.$$.fragment),iF=p(),T(Vs.$$.fragment),Hh=p(),un=s("h2"),As=s("a"),Lp=s("span"),T(Gl.$$.fragment),dF=p(),Qp=s("span"),cF=t("FlaxRoFormerForMultipleChoice"),Yh=p(),no=s("div"),T(Xl.$$.fragment),pF=p(),Dp=s("p"),mF=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=p(),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=p(),Pl=s("p"),yF=t("This model is also a Flax Linen "),Ll=s("a"),bF=t("flax.linen.Module"),vF=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.`),TF=p(),Op=s("p"),kF=t("Finally, this model supports inherent JAX features such as:"),wF=p(),mt=s("ul"),Hp=s("li"),Ql=s("a"),FF=t("Just-In-Time (JIT) compilation"),MF=p(),Yp=s("li"),Dl=s("a"),$F=t("Automatic Differentiation"),RF=p(),Kp=s("li"),Ol=s("a"),jF=t("Vectorization"),EF=p(),em=s("li"),Hl=s("a"),JF=t("Parallelization"),CF=p(),Do=s("div"),T(Yl.$$.fragment),UF=p(),fn=s("p"),xF=t("The "),om=s("code"),zF=t("FlaxRoFormerPreTrainedModel"),IF=t(" forward method, overrides the "),tm=s("code"),ZF=t("__call__"),NF=t(" special method."),WF=p(),T(Bs.$$.fragment),qF=p(),T(Gs.$$.fragment),Kh=p(),gn=s("h2"),Xs=s("a"),nm=s("span"),T(Kl.$$.fragment),VF=p(),sm=s("span"),AF=t("FlaxRoFormerForTokenClassification"),eu=p(),so=s("div"),T(ei.$$.fragment),BF=p(),rm=s("p"),GF=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.`),XF=p(),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=p(),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=p(),am=s("p"),KF=t("Finally, this model supports inherent JAX features such as:"),eM=p(),ht=s("ul"),lm=s("li"),si=s("a"),oM=t("Just-In-Time (JIT) compilation"),tM=p(),im=s("li"),ri=s("a"),nM=t("Automatic Differentiation"),sM=p(),dm=s("li"),ai=s("a"),rM=t("Vectorization"),aM=p(),cm=s("li"),li=s("a"),lM=t("Parallelization"),iM=p(),Oo=s("div"),T(ii.$$.fragment),dM=p(),_n=s("p"),cM=t("The "),pm=s("code"),pM=t("FlaxRoFormerPreTrainedModel"),mM=t(" forward method, overrides the "),mm=s("code"),hM=t("__call__"),uM=t(" special method."),fM=p(),T(Ss.$$.fragment),gM=p(),T(Ps.$$.fragment),ou=p(),yn=s("h2"),Ls=s("a"),hm=s("span"),T(di.$$.fragment),_M=p(),um=s("span"),yM=t("FlaxRoFormerForQuestionAnswering"),tu=p(),ro=s("div"),T(ci.$$.fragment),bM=p(),bn=s("p"),vM=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 `),fm=s("code"),TM=t("span start logits"),kM=t(" and "),gm=s("code"),wM=t("span end logits"),FM=t(")."),MM=p(),pi=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=p(),mi=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=p(),_m=s("p"),zM=t("Finally, this model supports inherent JAX features such as:"),IM=p(),ut=s("ul"),ym=s("li"),ui=s("a"),ZM=t("Just-In-Time (JIT) compilation"),NM=p(),bm=s("li"),fi=s("a"),WM=t("Automatic Differentiation"),qM=p(),vm=s("li"),gi=s("a"),VM=t("Vectorization"),AM=p(),Tm=s("li"),_i=s("a"),BM=t("Parallelization"),GM=p(),Ho=s("div"),T(yi.$$.fragment),XM=p(),vn=s("p"),SM=t("The "),km=s("code"),PM=t("FlaxRoFormerPreTrainedModel"),LM=t(" forward method, overrides the "),wm=s("code"),QM=t("__call__"),DM=t(" special method."),OM=p(),T(Qs.$$.fragment),HM=p(),T(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=m(a),h=r(a,"H1",{class:!0});var bi=l(h);u=r(bi,"A",{id:!0,class:!0,href:!0});var Fm=l(u);_=r(Fm,"SPAN",{});var Mm=l(_);k(i.$$.fragment,Mm),Mm.forEach(o),Fm.forEach(o),c=m(bi),J=r(bi,"SPAN",{});var $m=l(J);ke=n($m,"RoFormer"),$m.forEach(o),bi.forEach(o),fe=m(a),q=r(a,"H2",{class:!0});var vi=l(q);ae=r(vi,"A",{id:!0,class:!0,href:!0});var Rm=l(ae);ee=r(Rm,"SPAN",{});var jm=l(ee);k(R.$$.fragment,jm),jm.forEach(o),Rm.forEach(o),we=m(vi),P=r(vi,"SPAN",{});var Em=l(P);Fe=n(Em,"Overview"),Em.forEach(o),vi.forEach(o),ge=m(a),V=r(a,"P",{});var Ti=l(V);Me=n(Ti,"The RoFormer model was proposed in "),le=r(Ti,"A",{href:!0,rel:!0});var Jm=l(le);Q=n(Jm,"RoFormer: Enhanced Transformer with Rotary Position Embedding"),Jm.forEach(o),$e=n(Ti," by Jianlin Su and Yu Lu and Shengfeng Pan and Bo Wen and Yunfeng Liu."),Ti.forEach(o),_e=m(a),B=r(a,"P",{});var Cm=l(B);Re=n(Cm,"The abstract from the paper is the following:"),Cm.forEach(o),ye=m(a),G=r(a,"P",{});var Um=l(G);pe=r(Um,"EM",{});var xm=l(pe);je=n(xm,`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.`),xm.forEach(o),Um.forEach(o),te=m(a),U=r(a,"P",{});var zm=l(U);I=n(zm,"Tips:"),zm.forEach(o),be=m(a),X=r(a,"UL",{});var Im=l(X);me=r(Im,"LI",{});var Zm=l(me);Ee=n(Zm,`RoFormer is a BERT-like autoencoding model with rotary position embeddings. Rotary position embeddings have shown
improved performance on classification tasks with long texts.`),Zm.forEach(o),Im.forEach(o),L=m(a),se=r(a,"P",{});var Tn=l(se);Je=n(Tn,"This model was contributed by "),z=r(Tn,"A",{href:!0,rel:!0});var Nm=l(z);Ce=n(Nm,"junnyu"),Nm.forEach(o),D=n(Tn,". The original code can be found "),ie=r(Tn,"A",{href:!0,rel:!0});var Wm=l(ie);Ue=n(Wm,"here"),Wm.forEach(o),O=n(Tn,"."),Tn.forEach(o),ve=m(a),re=r(a,"H2",{class:!0});var ki=l(re);N=r(ki,"A",{id:!0,class:!0,href:!0});var qm=l(N);he=r(qm,"SPAN",{});var Vm=l(he);k(A.$$.fragment,Vm),Vm.forEach(o),qm.forEach(o),xe=m(ki),oe=r(ki,"SPAN",{});var Am=l(oe);Z=n(Am,"Documentation resources"),Am.forEach(o),ki.forEach(o),Te=m(a),x=r(a,"UL",{});var bo=l(x);ue=r(bo,"LI",{});var Bm=l(ue);de=r(Bm,"A",{href:!0});var Gm=l(de);v=n(Gm,"Text classification task guide"),Gm.forEach(o),Bm.forEach(o),E=m(bo),Ae=r(bo,"LI",{});var Xm=l(Ae);K=r(Xm,"A",{href:!0});var Sm=l(K);Le=n(Sm,"Token classification task guide"),Sm.forEach(o),Xm.forEach(o),Qe=m(bo),C=r(bo,"LI",{});var Pm=l(C);We=r(Pm,"A",{href:!0});var Lm=l(We);De=n(Lm,"Question answering task guide"),Lm.forEach(o),Pm.forEach(o),Oe=m(bo),Be=r(bo,"LI",{});var Qm=l(Be);qe=r(Qm,"A",{href:!0});var Dm=l(qe);W=n(Dm,"Causal language modeling task guide"),Dm.forEach(o),Qm.forEach(o),H=m(bo),Ge=r(bo,"LI",{});var Om=l(Ge);Ve=r(Om,"A",{href:!0});var Hm=l(Ve);Y=n(Hm,"Masked language modeling task guide"),Hm.forEach(o),Om.forEach(o),He=m(bo),Xe=r(bo,"LI",{});var Ym=l(Xe);ce=r(Ym,"A",{href:!0});var Km=l(ce);Ye=n(Km,"Multiple choice task guide"),Km.forEach(o),Ym.forEach(o),bo.forEach(o),ne=m(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(Tr.$$.fragment,oh),oh.forEach(o),eh.forEach(o),hf=m(wi),Bd=r(wi,"SPAN",{});var th=l(Bd);uf=n(th,"RoFormerConfig"),th.forEach(o),wi.forEach(o),mh=m(a),Uo=r(a,"DIV",{class:!0});var ft=l(Uo);k(kr.$$.fragment,ft),ff=m(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),vf=n(kn," architecture."),kn.forEach(o),Tf=m(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=m(ft),k(Mn.$$.fragment,ft),ft.forEach(o),hh=m(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);Gd=r(lh,"SPAN",{});var ih=l(Gd);k(Fr.$$.fragment,ih),ih.forEach(o),lh.forEach(o),jf=m(Fi),Xd=r(Fi,"SPAN",{});var dh=l(Xd);Ef=n(dh,"RoFormerTokenizer"),dh.forEach(o),Fi.forEach(o),uh=m(a),Ke=r(a,"DIV",{class:!0});var ao=l(Ke);k(Mr.$$.fragment,ao),Jf=m(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=m(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=m(ao),k(Rn.$$.fragment,ao),qf=m(ao),gt=r(ao,"DIV",{class:!0});var pd=l(gt);k(Er.$$.fragment,pd),Vf=m(pd),Sd=r(pd,"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),Bf=m(pd),Jr=r(pd,"UL",{});var su=l(Jr);Ci=r(su,"LI",{});var YM=l(Ci);Gf=n(YM,"single sequence: "),Pd=r(YM,"CODE",{});var s2=l(Pd);Xf=n(s2,"[CLS] X [SEP]"),s2.forEach(o),YM.forEach(o),Sf=m(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),pd.forEach(o),Qf=m(ao),jn=r(ao,"DIV",{class:!0});var ru=l(jn);k(Cr.$$.fragment,ru),Df=m(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=m(ao),No=r(ao,"DIV",{class:!0});var Os=l(No);k(xr.$$.fragment,Os),eg=m(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=m(Os),k(En.$$.fragment,Os),ng=m(Os),jt=r(Os,"P",{});var md=l(jt);sg=n(md,"If "),Od=r(md,"CODE",{});var i2=l(Od);rg=n(i2,"token_ids_1"),i2.forEach(o),ag=n(md," is "),Hd=r(md,"CODE",{});var d2=l(Hd);lg=n(d2,"None"),d2.forEach(o),ig=n(md,", this method only returns the first portion of the mask (0s)."),md.forEach(o),Os.forEach(o),dg=m(ao),xi=r(ao,"DIV",{class:!0});var c2=l(xi);k(zr.$$.fragment,c2),c2.forEach(o),ao.forEach(o),fh=m(a),Et=r(a,"H2",{class:!0});var lu=l(Et);Jn=r(lu,"A",{id:!0,class:!0,href:!0});var p2=l(Jn);Yd=r(p2,"SPAN",{});var m2=l(Yd);k(Ir.$$.fragment,m2),m2.forEach(o),p2.forEach(o),cg=m(lu),Kd=r(lu,"SPAN",{});var h2=l(Kd);pg=n(h2,"RoFormerTokenizerFast"),h2.forEach(o),lu.forEach(o),gh=m(a),lo=r(a,"DIV",{class:!0});var Yo=l(lo);k(Zr.$$.fragment,Yo),mg=m(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=m(Yo),Cn=r(Yo,"P",{});var ph=l(Cn);zi=r(ph,"A",{href:!0});var f2=l(zi);_g=n(f2,"RoFormerTokenizerFast"),f2.forEach(o),yg=n(ph," is almost identical to "),Ii=r(ph,"A",{href:!0});var g2=l(Ii);bg=n(g2,"BertTokenizerFast"),g2.forEach(o),vg=n(ph,` and runs end-to-end tokenization:
punctuation splitting and wordpiece. There are some difference between them when tokenizing Chinese.`),ph.forEach(o),Tg=m(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=m(Yo),k(Un.$$.fragment,Yo),$g=m(Yo),_t=r(Yo,"DIV",{class:!0});var hd=l(_t);k(qr.$$.fragment,hd),Rg=m(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=m(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=m(cu),Wi=r(cu,"LI",{});var o2=l(Wi);xg=n(o2,"pair of sequences: "),nc=r(o2,"CODE",{});var v2=l(nc);zg=n(v2,"[CLS] A [SEP] B [SEP]"),v2.forEach(o),o2.forEach(o),cu.forEach(o),hd.forEach(o),Yo.forEach(o),_h=m(a),Jt=r(a,"H2",{class:!0});var pu=l(Jt);xn=r(pu,"A",{id:!0,class:!0,href:!0});var T2=l(xn);sc=r(T2,"SPAN",{});var k2=l(sc);k(Ar.$$.fragment,k2),k2.forEach(o),T2.forEach(o),Ig=m(pu),rc=r(pu,"SPAN",{});var w2=l(rc);Zg=n(w2,"RoFormerModel"),w2.forEach(o),pu.forEach(o),yh=m(a),_o=r(a,"DIV",{class:!0});var bt=l(_o);k(Br.$$.fragment,bt),Ng=m(bt),Gr=r(bt,"P",{});var mu=l(Gr);Wg=n(mu,`The bare RoFormer Model transformer outputting raw hidden-states without any specific head on top.
This model is a PyTorch `),Xr=r(mu,"A",{href:!0,rel:!0});var F2=l(Xr);qg=n(F2,"torch.nn.Module"),F2.forEach(o),Vg=n(mu,` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),mu.forEach(o),Ag=m(bt),Sr=r(bt,"P",{});var hu=l(Sr);Bg=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);Gg=n(M2,`Attention is
all you need`),M2.forEach(o),Xg=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=m(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 "),pc=r(Mo,"CODE",{});var C2=l(pc);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_=m(bt),Wo=r(bt,"DIV",{class:!0});var Hs=l(Wo);k(Lr.$$.fragment,Hs),a_=m(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 "),mc=r(ud,"CODE",{});var x2=l(mc);c_=n(x2,"__call__"),x2.forEach(o),p_=n(ud," special method."),ud.forEach(o),m_=m(Hs),k(zn.$$.fragment,Hs),h_=m(Hs),k(In.$$.fragment,Hs),Hs.forEach(o),bt.forEach(o),bh=m(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_=m(uu),uc=r(uu,"SPAN",{});var Z2=l(uc);f_=n(Z2,"RoFormerForCausalLM"),Z2.forEach(o),uu.forEach(o),vh=m(a),lt=r(a,"DIV",{class:!0});var fd=l(lt);k(Dr.$$.fragment,fd),g_=m(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);v_=n(W2,"torch.nn.Module"),W2.forEach(o),T_=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_=m(fd),qo=r(fd,"DIV",{class:!0});var Ys=l(qo);k(Hr.$$.fragment,Ys),w_=m(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_=m(Ys),k(Nn.$$.fragment,Ys),J_=m(Ys),k(Wn.$$.fragment,Ys),Ys.forEach(o),fd.forEach(o),Th=m(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 B2=l(_c);k(Yr.$$.fragment,B2),B2.forEach(o),A2.forEach(o),C_=m(fu),yc=r(fu,"SPAN",{});var G2=l(yc);U_=n(G2,"RoFormerForMaskedLM"),G2.forEach(o),fu.forEach(o),kh=m(a),it=r(a,"DIV",{class:!0});var yd=l(it);k(Kr.$$.fragment,yd),x_=m(yd),Zt=r(yd,"P",{});var bd=l(Zt);z_=n(bd,"RoFormer Model with a "),bc=r(bd,"CODE",{});var X2=l(bc);I_=n(X2,"language modeling"),X2.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_=m(yd),Vo=r(yd,"DIV",{class:!0});var Ks=l(Vo);k(oa.$$.fragment,Ks),V_=m(Ks),Nt=r(Ks,"P",{});var vd=l(Nt);A_=n(vd,"The "),Ai=r(vd,"A",{href:!0});var P2=l(Ai);B_=n(P2,"RoFormerForMaskedLM"),P2.forEach(o),G_=n(vd," forward method, overrides the "),vc=r(vd,"CODE",{});var L2=l(vc);X_=n(L2,"__call__"),L2.forEach(o),S_=n(vd," special method."),vd.forEach(o),P_=m(Ks),k(Vn.$$.fragment,Ks),L_=m(Ks),k(An.$$.fragment,Ks),Ks.forEach(o),yd.forEach(o),wh=m(a),Wt=r(a,"H2",{class:!0});var gu=l(Wt);Bn=r(gu,"A",{id:!0,class:!0,href:!0});var Q2=l(Bn);Tc=r(Q2,"SPAN",{});var D2=l(Tc);k(ta.$$.fragment,D2),D2.forEach(o),Q2.forEach(o),Q_=m(gu),kc=r(gu,"SPAN",{});var O2=l(kc);D_=n(O2,"RoFormerForSequenceClassification"),O2.forEach(o),gu.forEach(o),Fh=m(a),xo=r(a,"DIV",{class:!0});var er=l(xo);k(na.$$.fragment,er),O_=m(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_=m(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=m(er),vo=r(er,"DIV",{class:!0});var vt=l(vo);k(aa.$$.fragment,vt),ny=m(vt),qt=r(vt,"P",{});var Td=l(qt);sy=n(Td,"The "),Bi=r(Td,"A",{href:!0});var K2=l(Bi);ry=n(K2,"RoFormerForSequenceClassification"),K2.forEach(o),ay=n(Td," forward method, overrides the "),Fc=r(Td,"CODE",{});var e1=l(Fc);ly=n(e1,"__call__"),e1.forEach(o),iy=n(Td," special method."),Td.forEach(o),dy=m(vt),k(Gn.$$.fragment,vt),cy=m(vt),k(Xn.$$.fragment,vt),py=m(vt),k(Sn.$$.fragment,vt),vt.forEach(o),er.forEach(o),Mh=m(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),my=m(yu),$c=r(yu,"SPAN",{});var n1=l($c);hy=n(n1,"RoFormerForMultipleChoice"),n1.forEach(o),yu.forEach(o),$h=m(a),zo=r(a,"DIV",{class:!0});var or=l(zo);k(ia.$$.fragment,or),uy=m(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=m(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),vy=m(or),Ao=r(or,"DIV",{class:!0});var tr=l(Ao);k(pa.$$.fragment,tr),Ty=m(tr),At=r(tr,"P",{});var kd=l(At);ky=n(kd,"The "),Gi=r(kd,"A",{href:!0});var a1=l(Gi);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=m(tr),k(Ln.$$.fragment,tr),jy=m(tr),k(Qn.$$.fragment,tr),tr.forEach(o),or.forEach(o),Rh=m(a),Bt=r(a,"H2",{class:!0});var vu=l(Bt);Dn=r(vu,"A",{id:!0,class:!0,href:!0});var i1=l(Dn);Ec=r(i1,"SPAN",{});var d1=l(Ec);k(ma.$$.fragment,d1),d1.forEach(o),i1.forEach(o),Ey=m(vu),Jc=r(vu,"SPAN",{});var c1=l(Jc);Jy=n(c1,"RoFormerForTokenClassification"),c1.forEach(o),vu.forEach(o),jh=m(a),Io=r(a,"DIV",{class:!0});var nr=l(Io);k(ha.$$.fragment,nr),Cy=m(nr),Cc=r(nr,"P",{});var p1=l(Cc);Uy=n(p1,`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.`),p1.forEach(o),xy=m(nr),ua=r(nr,"P",{});var Tu=l(ua);zy=n(Tu,"This model is a PyTorch "),fa=r(Tu,"A",{href:!0,rel:!0});var m1=l(fa);Iy=n(m1,"torch.nn.Module"),m1.forEach(o),Zy=n(Tu,` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),Tu.forEach(o),Ny=m(nr),Bo=r(nr,"DIV",{class:!0});var sr=l(Bo);k(ga.$$.fragment,sr),Wy=m(sr),Gt=r(sr,"P",{});var wd=l(Gt);qy=n(wd,"The "),Xi=r(wd,"A",{href:!0});var h1=l(Xi);Vy=n(h1,"RoFormerForTokenClassification"),h1.forEach(o),Ay=n(wd," forward method, overrides the "),Uc=r(wd,"CODE",{});var u1=l(Uc);By=n(u1,"__call__"),u1.forEach(o),Gy=n(wd," special method."),wd.forEach(o),Xy=m(sr),k(On.$$.fragment,sr),Sy=m(sr),k(Hn.$$.fragment,sr),sr.forEach(o),nr.forEach(o),Eh=m(a),Xt=r(a,"H2",{class:!0});var ku=l(Xt);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=m(ku),zc=r(ku,"SPAN",{});var _1=l(zc);Ly=n(_1,"RoFormerForQuestionAnswering"),_1.forEach(o),ku.forEach(o),Jh=m(a),Zo=r(a,"DIV",{class:!0});var rr=l(Zo);k(ya.$$.fragment,rr),Qy=m(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=m(rr),ba=r(rr,"P",{});var wu=l(ba);ob=n(wu,"This model is a PyTorch "),va=r(wu,"A",{href:!0,rel:!0});var v1=l(va);tb=n(v1,"torch.nn.Module"),v1.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=m(rr),Go=r(rr,"DIV",{class:!0});var ar=l(Go);k(Ta.$$.fragment,ar),rb=m(ar),Pt=r(ar,"P",{});var Md=l(Pt);ab=n(Md,"The "),Si=r(Md,"A",{href:!0});var T1=l(Si);lb=n(T1,"RoFormerForQuestionAnswering"),T1.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),pb=m(ar),k(Kn.$$.fragment,ar),mb=m(ar),k(es.$$.fragment,ar),ar.forEach(o),rr.forEach(o),Ch=m(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=m(Fu),qc=r(Fu,"SPAN",{});var M1=l(qc);ub=n(M1,"TFRoFormerModel"),M1.forEach(o),Fu.forEach(o),Uh=m(a),co=r(a,"DIV",{class:!0});var Ko=l(co);k(wa.$$.fragment,Ko),fb=m(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=m(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),vb=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),Tb=m(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=m(Ko),k(ts.$$.fragment,Ko),$b=m(Ko),Xo=r(Ko,"DIV",{class:!0});var lr=l(Xo);k(Ra.$$.fragment,lr),Rb=m(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=m(lr),k(ns.$$.fragment,lr),zb=m(lr),k(ss.$$.fragment,lr),lr.forEach(o),Ko.forEach(o),xh=m(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);Bc=r(C1,"SPAN",{});var U1=l(Bc);k(ja.$$.fragment,U1),U1.forEach(o),C1.forEach(o),Ib=m(Ru),Gc=r(Ru,"SPAN",{});var x1=l(Gc);Zb=n(x1,"TFRoFormerForMaskedLM"),x1.forEach(o),Ru.forEach(o),zh=m(a),po=r(a,"DIV",{class:!0});var et=l(po);k(Ea.$$.fragment,et),Nb=m(et),Ja=r(et,"P",{});var ju=l(Ja);Wb=n(ju,"RoFormer Model with a "),Xc=r(ju,"CODE",{});var z1=l(Xc);qb=n(z1,"language modeling"),z1.forEach(o),Vb=n(ju," head on top."),ju.forEach(o),Ab=m(et),Ca=r(et,"P",{});var Eu=l(Ca);Bb=n(Eu,"This model inherits from "),Qi=r(Eu,"A",{href:!0});var I1=l(Qi);Gb=n(I1,"TFPreTrainedModel"),I1.forEach(o),Xb=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=m(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=m(et),k(as.$$.fragment,et),Ob=m(et),To=r(et,"DIV",{class:!0});var Tt=l(To);k(za.$$.fragment,Tt),Hb=m(Tt),Ot=r(Tt,"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),ev=n(Rd," forward method, overrides the "),Sc=r(Rd,"CODE",{});var W1=l(Sc);ov=n(W1,"__call__"),W1.forEach(o),tv=n(Rd," special method."),Rd.forEach(o),nv=m(Tt),k(ls.$$.fragment,Tt),sv=m(Tt),k(is.$$.fragment,Tt),rv=m(Tt),k(ds.$$.fragment,Tt),Tt.forEach(o),et.forEach(o),Ih=m(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),av=m(Cu),Lc=r(Cu,"SPAN",{});var A1=l(Lc);lv=n(A1,"TFRoFormerForCausalLM"),A1.forEach(o),Cu.forEach(o),Zh=m(a),mo=r(a,"DIV",{class:!0});var ot=l(mo);k(Za.$$.fragment,ot),iv=m(ot),Na=r(ot,"P",{});var Uu=l(Na);dv=n(Uu,"RoFormer Model with a "),Qc=r(Uu,"CODE",{});var B1=l(Qc);cv=n(B1,"language modeling"),B1.forEach(o),pv=n(Uu," head on top for CLM fine-tuning."),Uu.forEach(o),mv=m(ot),Wa=r(ot,"P",{});var xu=l(Wa);hv=n(xu,"This model inherits from "),Oi=r(xu,"A",{href:!0});var G1=l(Oi);uv=n(G1,"TFPreTrainedModel"),G1.forEach(o),fv=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),gv=m(ot),qa=r(ot,"P",{});var zu=l(qa);_v=n(zu,"This model is also a "),Va=r(zu,"A",{href:!0,rel:!0});var X1=l(Va);yv=n(X1,"tf.keras.Model"),X1.forEach(o),bv=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),vv=m(ot),k(ps.$$.fragment,ot),Tv=m(ot),yt=r(ot,"DIV",{class:!0});var jd=l(yt);k(Aa.$$.fragment,jd),kv=m(jd),yo=r(jd,"P",{});var tt=l(yo);wv=n(tt,"labels ("),Dc=r(tt,"CODE",{});var S1=l(Dc);Fv=n(S1,"tf.Tensor"),S1.forEach(o),Mv=n(tt," or "),Oc=r(tt,"CODE",{});var P1=l(Oc);$v=n(P1,"np.ndarray"),P1.forEach(o),Rv=n(tt," of shape "),Hc=r(tt,"CODE",{});var L1=l(Hc);jv=n(L1,"(batch_size, sequence_length)"),L1.forEach(o),Ev=n(tt,", "),Yc=r(tt,"EM",{});var Q1=l(Yc);Jv=n(Q1,"optional"),Q1.forEach(o),Cv=n(tt,`):
Labels for computing the cross entropy classification loss. Indices should be in `),Kc=r(tt,"CODE",{});var D1=l(Kc);Uv=n(D1,"[0, ..., config.vocab_size - 1]"),D1.forEach(o),xv=n(tt,"."),tt.forEach(o),zv=m(jd),k(ms.$$.fragment,jd),jd.forEach(o),ot.forEach(o),Nh=m(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);ep=r(O1,"SPAN",{});var H1=l(ep);k(Ba.$$.fragment,H1),H1.forEach(o),O1.forEach(o),Iv=m(Iu),op=r(Iu,"SPAN",{});var Y1=l(op);Zv=n(Y1,"TFRoFormerForSequenceClassification"),Y1.forEach(o),Iu.forEach(o),Wh=m(a),ho=r(a,"DIV",{class:!0});var nt=l(ho);k(Ga.$$.fragment,nt),Nv=m(nt),tp=r(nt,"P",{});var K1=l(tp);Wv=n(K1,"RoFormer Model transformer with a sequence classification/regression head on top e.g., for GLUE tasks."),K1.forEach(o),qv=m(nt),Xa=r(nt,"P",{});var Zu=l(Xa);Vv=n(Zu,"This model inherits from "),Hi=r(Zu,"A",{href:!0});var e0=l(Hi);Av=n(e0,"TFPreTrainedModel"),e0.forEach(o),Bv=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),Gv=m(nt),Sa=r(nt,"P",{});var Nu=l(Sa);Xv=n(Nu,"This model is also a "),Pa=r(Nu,"A",{href:!0,rel:!0});var o0=l(Pa);Sv=n(o0,"tf.keras.Model"),o0.forEach(o),Pv=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),Lv=m(nt),k(us.$$.fragment,nt),Qv=m(nt),ko=r(nt,"DIV",{class:!0});var kt=l(ko);k(La.$$.fragment,kt),Dv=m(kt),Kt=r(kt,"P",{});var Ed=l(Kt);Ov=n(Ed,"The "),Yi=r(Ed,"A",{href:!0});var t0=l(Yi);Hv=n(t0,"TFRoFormerForSequenceClassification"),t0.forEach(o),Yv=n(Ed," forward method, overrides the "),np=r(Ed,"CODE",{});var n0=l(np);Kv=n(n0,"__call__"),n0.forEach(o),eT=n(Ed," special method."),Ed.forEach(o),oT=m(kt),k(fs.$$.fragment,kt),tT=m(kt),k(gs.$$.fragment,kt),nT=m(kt),k(_s.$$.fragment,kt),kt.forEach(o),nt.forEach(o),qh=m(a),en=r(a,"H2",{class:!0});var Wu=l(en);ys=r(Wu,"A",{id:!0,class:!0,href:!0});var s0=l(ys);sp=r(s0,"SPAN",{});var r0=l(sp);k(Qa.$$.fragment,r0),r0.forEach(o),s0.forEach(o),sT=m(Wu),rp=r(Wu,"SPAN",{});var a0=l(rp);rT=n(a0,"TFRoFormerForMultipleChoice"),a0.forEach(o),Wu.forEach(o),Vh=m(a),uo=r(a,"DIV",{class:!0});var st=l(uo);k(Da.$$.fragment,st),aT=m(st),ap=r(st,"P",{});var l0=l(ap);lT=n(l0,`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.`),l0.forEach(o),iT=m(st),Oa=r(st,"P",{});var qu=l(Oa);dT=n(qu,"This model inherits from "),Ki=r(qu,"A",{href:!0});var i0=l(Ki);cT=n(i0,"TFPreTrainedModel"),i0.forEach(o),pT=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),mT=m(st),Ha=r(st,"P",{});var Vu=l(Ha);hT=n(Vu,"This model is also a "),Ya=r(Vu,"A",{href:!0,rel:!0});var d0=l(Ya);uT=n(d0,"tf.keras.Model"),d0.forEach(o),fT=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),gT=m(st),k(bs.$$.fragment,st),_T=m(st),So=r(st,"DIV",{class:!0});var ir=l(So);k(Ka.$$.fragment,ir),yT=m(ir),on=r(ir,"P",{});var Jd=l(on);bT=n(Jd,"The "),ed=r(Jd,"A",{href:!0});var c0=l(ed);vT=n(c0,"TFRoFormerForMultipleChoice"),c0.forEach(o),TT=n(Jd," forward method, overrides the "),lp=r(Jd,"CODE",{});var p0=l(lp);kT=n(p0,"__call__"),p0.forEach(o),wT=n(Jd," special method."),Jd.forEach(o),FT=m(ir),k(vs.$$.fragment,ir),MT=m(ir),k(Ts.$$.fragment,ir),ir.forEach(o),st.forEach(o),Ah=m(a),tn=r(a,"H2",{class:!0});var Au=l(tn);ks=r(Au,"A",{id:!0,class:!0,href:!0});var m0=l(ks);ip=r(m0,"SPAN",{});var h0=l(ip);k(el.$$.fragment,h0),h0.forEach(o),m0.forEach(o),$T=m(Au),dp=r(Au,"SPAN",{});var u0=l(dp);RT=n(u0,"TFRoFormerForTokenClassification"),u0.forEach(o),Au.forEach(o),Bh=m(a),fo=r(a,"DIV",{class:!0});var rt=l(fo);k(ol.$$.fragment,rt),jT=m(rt),cp=r(rt,"P",{});var f0=l(cp);ET=n(f0,`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.`),f0.forEach(o),JT=m(rt),tl=r(rt,"P",{});var Bu=l(tl);CT=n(Bu,"This model inherits from "),od=r(Bu,"A",{href:!0});var g0=l(od);UT=n(g0,"TFPreTrainedModel"),g0.forEach(o),xT=n(Bu,`. 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.)`),Bu.forEach(o),zT=m(rt),nl=r(rt,"P",{});var Gu=l(nl);IT=n(Gu,"This model is also a "),sl=r(Gu,"A",{href:!0,rel:!0});var _0=l(sl);ZT=n(_0,"tf.keras.Model"),_0.forEach(o),NT=n(Gu,` 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.`),Gu.forEach(o),WT=m(rt),k(ws.$$.fragment,rt),qT=m(rt),wo=r(rt,"DIV",{class:!0});var wt=l(wo);k(rl.$$.fragment,wt),VT=m(wt),nn=r(wt,"P",{});var Cd=l(nn);AT=n(Cd,"The "),td=r(Cd,"A",{href:!0});var y0=l(td);BT=n(y0,"TFRoFormerForTokenClassification"),y0.forEach(o),GT=n(Cd," forward method, overrides the "),pp=r(Cd,"CODE",{});var b0=l(pp);XT=n(b0,"__call__"),b0.forEach(o),ST=n(Cd," special method."),Cd.forEach(o),PT=m(wt),k(Fs.$$.fragment,wt),LT=m(wt),k(Ms.$$.fragment,wt),QT=m(wt),k($s.$$.fragment,wt),wt.forEach(o),rt.forEach(o),Gh=m(a),sn=r(a,"H2",{class:!0});var Xu=l(sn);Rs=r(Xu,"A",{id:!0,class:!0,href:!0});var v0=l(Rs);mp=r(v0,"SPAN",{});var T0=l(mp);k(al.$$.fragment,T0),T0.forEach(o),v0.forEach(o),DT=m(Xu),hp=r(Xu,"SPAN",{});var k0=l(hp);OT=n(k0,"TFRoFormerForQuestionAnswering"),k0.forEach(o),Xu.forEach(o),Xh=m(a),go=r(a,"DIV",{class:!0});var at=l(go);k(ll.$$.fragment,at),HT=m(at),rn=r(at,"P",{});var Ud=l(rn);YT=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 `),up=r(Ud,"CODE",{});var w0=l(up);KT=n(w0,"span start logits"),w0.forEach(o),ek=n(Ud," and "),fp=r(Ud,"CODE",{});var F0=l(fp);ok=n(F0,"span end logits"),F0.forEach(o),tk=n(Ud,")."),Ud.forEach(o),nk=m(at),il=r(at,"P",{});var Su=l(il);sk=n(Su,"This model inherits from "),nd=r(Su,"A",{href:!0});var M0=l(nd);rk=n(M0,"TFPreTrainedModel"),M0.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=m(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 $0=l(cl);dk=n($0,"tf.keras.Model"),$0.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),pk=m(at),k(js.$$.fragment,at),mk=m(at),Fo=r(at,"DIV",{class:!0});var Ft=l(Fo);k(pl.$$.fragment,Ft),hk=m(Ft),an=r(Ft,"P",{});var xd=l(an);uk=n(xd,"The "),sd=r(xd,"A",{href:!0});var R0=l(sd);fk=n(R0,"TFRoFormerForQuestionAnswering"),R0.forEach(o),gk=n(xd," forward method, overrides the "),gp=r(xd,"CODE",{});var j0=l(gp);_k=n(j0,"__call__"),j0.forEach(o),yk=n(xd," special method."),xd.forEach(o),bk=m(Ft),k(Es.$$.fragment,Ft),vk=m(Ft),k(Js.$$.fragment,Ft),Tk=m(Ft),k(Cs.$$.fragment,Ft),Ft.forEach(o),at.forEach(o),Sh=m(a),ln=r(a,"H2",{class:!0});var Lu=l(ln);Us=r(Lu,"A",{id:!0,class:!0,href:!0});var E0=l(Us);_p=r(E0,"SPAN",{});var J0=l(_p);k(ml.$$.fragment,J0),J0.forEach(o),E0.forEach(o),kk=m(Lu),yp=r(Lu,"SPAN",{});var C0=l(yp);wk=n(C0,"FlaxRoFormerModel"),C0.forEach(o),Lu.forEach(o),Ph=m(a),eo=r(a,"DIV",{class:!0});var $o=l(eo);k(hl.$$.fragment,$o),Fk=m($o),bp=r($o,"P",{});var U0=l(bp);Mk=n(U0,"The bare RoFormer Model transformer outputting raw hidden-states without any specific head on top."),U0.forEach(o),$k=m($o),ul=r($o,"P",{});var Qu=l(ul);Rk=n(Qu,"This model inherits from "),rd=r(Qu,"A",{href:!0});var x0=l(rd);jk=n(x0,"FlaxPreTrainedModel"),x0.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=m($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 z0=l(gl);Uk=n(z0,"flax.linen.Module"),z0.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=m($o),vp=r($o,"P",{});var I0=l(vp);Ik=n(I0,"Finally, this model supports inherent JAX features such as:"),I0.forEach(o),Zk=m($o),dt=r($o,"UL",{});var dr=l(dt);Tp=r(dr,"LI",{});var Z0=l(Tp);_l=r(Z0,"A",{href:!0,rel:!0});var N0=l(_l);Nk=n(N0,"Just-In-Time (JIT) compilation"),N0.forEach(o),Z0.forEach(o),Wk=m(dr),kp=r(dr,"LI",{});var W0=l(kp);yl=r(W0,"A",{href:!0,rel:!0});var q0=l(yl);qk=n(q0,"Automatic Differentiation"),q0.forEach(o),W0.forEach(o),Vk=m(dr),wp=r(dr,"LI",{});var V0=l(wp);bl=r(V0,"A",{href:!0,rel:!0});var A0=l(bl);Ak=n(A0,"Vectorization"),A0.forEach(o),V0.forEach(o),Bk=m(dr),Fp=r(dr,"LI",{});var B0=l(Fp);vl=r(B0,"A",{href:!0,rel:!0});var G0=l(vl);Gk=n(G0,"Parallelization"),G0.forEach(o),B0.forEach(o),dr.forEach(o),Xk=m($o),Po=r($o,"DIV",{class:!0});var cr=l(Po);k(Tl.$$.fragment,cr),Sk=m(cr),dn=r(cr,"P",{});var zd=l(dn);Pk=n(zd,"The "),Mp=r(zd,"CODE",{});var X0=l(Mp);Lk=n(X0,"FlaxRoFormerPreTrainedModel"),X0.forEach(o),Qk=n(zd," forward method, overrides the "),$p=r(zd,"CODE",{});var S0=l($p);Dk=n(S0,"__call__"),S0.forEach(o),Ok=n(zd," special method."),zd.forEach(o),Hk=m(cr),k(xs.$$.fragment,cr),Yk=m(cr),k(zs.$$.fragment,cr),cr.forEach(o),$o.forEach(o),Lh=m(a),cn=r(a,"H2",{class:!0});var Ou=l(cn);Is=r(Ou,"A",{id:!0,class:!0,href:!0});var P0=l(Is);Rp=r(P0,"SPAN",{});var L0=l(Rp);k(kl.$$.fragment,L0),L0.forEach(o),P0.forEach(o),Kk=m(Ou),jp=r(Ou,"SPAN",{});var Q0=l(jp);ew=n(Q0,"FlaxRoFormerForMaskedLM"),Q0.forEach(o),Ou.forEach(o),Qh=m(a),oo=r(a,"DIV",{class:!0});var Ro=l(oo);k(wl.$$.fragment,Ro),ow=m(Ro),Fl=r(Ro,"P",{});var Hu=l(Fl);tw=n(Hu,"RoFormer Model with a "),Ep=r(Hu,"CODE",{});var D0=l(Ep);nw=n(D0,"language modeling"),D0.forEach(o),sw=n(Hu," head on top."),Hu.forEach(o),rw=m(Ro),Ml=r(Ro,"P",{});var Yu=l(Ml);aw=n(Yu,"This model inherits from "),ad=r(Yu,"A",{href:!0});var O0=l(ad);lw=n(O0,"FlaxPreTrainedModel"),O0.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=m(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 H0=l(Rl);pw=n(H0,"flax.linen.Module"),H0.forEach(o),mw=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=m(Ro),Jp=r(Ro,"P",{});var Y0=l(Jp);uw=n(Y0,"Finally, this model supports inherent JAX features such as:"),Y0.forEach(o),fw=m(Ro),ct=r(Ro,"UL",{});var pr=l(ct);Cp=r(pr,"LI",{});var K0=l(Cp);jl=r(K0,"A",{href:!0,rel:!0});var e$=l(jl);gw=n(e$,"Just-In-Time (JIT) compilation"),e$.forEach(o),K0.forEach(o),_w=m(pr),Up=r(pr,"LI",{});var o$=l(Up);El=r(o$,"A",{href:!0,rel:!0});var t$=l(El);yw=n(t$,"Automatic Differentiation"),t$.forEach(o),o$.forEach(o),bw=m(pr),xp=r(pr,"LI",{});var n$=l(xp);Jl=r(n$,"A",{href:!0,rel:!0});var s$=l(Jl);vw=n(s$,"Vectorization"),s$.forEach(o),n$.forEach(o),Tw=m(pr),zp=r(pr,"LI",{});var r$=l(zp);Cl=r(r$,"A",{href:!0,rel:!0});var a$=l(Cl);kw=n(a$,"Parallelization"),a$.forEach(o),r$.forEach(o),pr.forEach(o),ww=m(Ro),Lo=r(Ro,"DIV",{class:!0});var mr=l(Lo);k(Ul.$$.fragment,mr),Fw=m(mr),pn=r(mr,"P",{});var Id=l(pn);Mw=n(Id,"The "),Ip=r(Id,"CODE",{});var l$=l(Ip);$w=n(l$,"FlaxRoFormerPreTrainedModel"),l$.forEach(o),Rw=n(Id," forward method, overrides the "),Zp=r(Id,"CODE",{});var i$=l(Zp);jw=n(i$,"__call__"),i$.forEach(o),Ew=n(Id," special method."),Id.forEach(o),Jw=m(mr),k(Zs.$$.fragment,mr),Cw=m(mr),k(Ns.$$.fragment,mr),mr.forEach(o),Ro.forEach(o),Dh=m(a),mn=r(a,"H2",{class:!0});var ef=l(mn);Ws=r(ef,"A",{id:!0,class:!0,href:!0});var d$=l(Ws);Np=r(d$,"SPAN",{});var c$=l(Np);k(xl.$$.fragment,c$),c$.forEach(o),d$.forEach(o),Uw=m(ef),Wp=r(ef,"SPAN",{});var p$=l(Wp);xw=n(p$,"FlaxRoFormerForSequenceClassification"),p$.forEach(o),ef.forEach(o),Oh=m(a),to=r(a,"DIV",{class:!0});var jo=l(to);k(zl.$$.fragment,jo),zw=m(jo),qp=r(jo,"P",{});var m$=l(qp);Iw=n(m$,`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.`),m$.forEach(o),Zw=m(jo),Il=r(jo,"P",{});var of=l(Il);Nw=n(of,"This model inherits from "),ld=r(of,"A",{href:!0});var h$=l(ld);Ww=n(h$,"FlaxPreTrainedModel"),h$.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=m(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 u$=l(Nl);Bw=n(u$,"flax.linen.Module"),u$.forEach(o),Gw=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),Xw=m(jo),Vp=r(jo,"P",{});var f$=l(Vp);Sw=n(f$,"Finally, this model supports inherent JAX features such as:"),f$.forEach(o),Pw=m(jo),pt=r(jo,"UL",{});var hr=l(pt);Ap=r(hr,"LI",{});var g$=l(Ap);Wl=r(g$,"A",{href:!0,rel:!0});var _$=l(Wl);Lw=n(_$,"Just-In-Time (JIT) compilation"),_$.forEach(o),g$.forEach(o),Qw=m(hr),Bp=r(hr,"LI",{});var y$=l(Bp);ql=r(y$,"A",{href:!0,rel:!0});var b$=l(ql);Dw=n(b$,"Automatic Differentiation"),b$.forEach(o),y$.forEach(o),Ow=m(hr),Gp=r(hr,"LI",{});var v$=l(Gp);Vl=r(v$,"A",{href:!0,rel:!0});var T$=l(Vl);Hw=n(T$,"Vectorization"),T$.forEach(o),v$.forEach(o),Yw=m(hr),Xp=r(hr,"LI",{});var k$=l(Xp);Al=r(k$,"A",{href:!0,rel:!0});var w$=l(Al);Kw=n(w$,"Parallelization"),w$.forEach(o),k$.forEach(o),hr.forEach(o),eF=m(jo),Qo=r(jo,"DIV",{class:!0});var ur=l(Qo);k(Bl.$$.fragment,ur),oF=m(ur),hn=r(ur,"P",{});var Zd=l(hn);tF=n(Zd,"The "),Sp=r(Zd,"CODE",{});var F$=l(Sp);nF=n(F$,"FlaxRoFormerPreTrainedModel"),F$.forEach(o),sF=n(Zd," forward method, overrides the "),Pp=r(Zd,"CODE",{});var M$=l(Pp);rF=n(M$,"__call__"),M$.forEach(o),aF=n(Zd," special method."),Zd.forEach(o),lF=m(ur),k(qs.$$.fragment,ur),iF=m(ur),k(Vs.$$.fragment,ur),ur.forEach(o),jo.forEach(o),Hh=m(a),un=r(a,"H2",{class:!0});var nf=l(un);As=r(nf,"A",{id:!0,class:!0,href:!0});var $$=l(As);Lp=r($$,"SPAN",{});var R$=l(Lp);k(Gl.$$.fragment,R$),R$.forEach(o),$$.forEach(o),dF=m(nf),Qp=r(nf,"SPAN",{});var j$=l(Qp);cF=n(j$,"FlaxRoFormerForMultipleChoice"),j$.forEach(o),nf.forEach(o),Yh=m(a),no=r(a,"DIV",{class:!0});var Eo=l(no);k(Xl.$$.fragment,Eo),pF=m(Eo),Dp=r(Eo,"P",{});var E$=l(Dp);mF=n(E$,`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.`),E$.forEach(o),hF=m(Eo),Sl=r(Eo,"P",{});var sf=l(Sl);uF=n(sf,"This model inherits from "),id=r(sf,"A",{href:!0});var J$=l(id);fF=n(J$,"FlaxPreTrainedModel"),J$.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=m(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 C$=l(Ll);bF=n(C$,"flax.linen.Module"),C$.forEach(o),vF=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),TF=m(Eo),Op=r(Eo,"P",{});var U$=l(Op);kF=n(U$,"Finally, this model supports inherent JAX features such as:"),U$.forEach(o),wF=m(Eo),mt=r(Eo,"UL",{});var fr=l(mt);Hp=r(fr,"LI",{});var x$=l(Hp);Ql=r(x$,"A",{href:!0,rel:!0});var z$=l(Ql);FF=n(z$,"Just-In-Time (JIT) compilation"),z$.forEach(o),x$.forEach(o),MF=m(fr),Yp=r(fr,"LI",{});var I$=l(Yp);Dl=r(I$,"A",{href:!0,rel:!0});var Z$=l(Dl);$F=n(Z$,"Automatic Differentiation"),Z$.forEach(o),I$.forEach(o),RF=m(fr),Kp=r(fr,"LI",{});var N$=l(Kp);Ol=r(N$,"A",{href:!0,rel:!0});var W$=l(Ol);jF=n(W$,"Vectorization"),W$.forEach(o),N$.forEach(o),EF=m(fr),em=r(fr,"LI",{});var q$=l(em);Hl=r(q$,"A",{href:!0,rel:!0});var V$=l(Hl);JF=n(V$,"Parallelization"),V$.forEach(o),q$.forEach(o),fr.forEach(o),CF=m(Eo),Do=r(Eo,"DIV",{class:!0});var gr=l(Do);k(Yl.$$.fragment,gr),UF=m(gr),fn=r(gr,"P",{});var Nd=l(fn);xF=n(Nd,"The "),om=r(Nd,"CODE",{});var A$=l(om);zF=n(A$,"FlaxRoFormerPreTrainedModel"),A$.forEach(o),IF=n(Nd," forward method, overrides the "),tm=r(Nd,"CODE",{});var B$=l(tm);ZF=n(B$,"__call__"),B$.forEach(o),NF=n(Nd," special method."),Nd.forEach(o),WF=m(gr),k(Bs.$$.fragment,gr),qF=m(gr),k(Gs.$$.fragment,gr),gr.forEach(o),Eo.forEach(o),Kh=m(a),gn=r(a,"H2",{class:!0});var af=l(gn);Xs=r(af,"A",{id:!0,class:!0,href:!0});var G$=l(Xs);nm=r(G$,"SPAN",{});var X$=l(nm);k(Kl.$$.fragment,X$),X$.forEach(o),G$.forEach(o),VF=m(af),sm=r(af,"SPAN",{});var S$=l(sm);AF=n(S$,"FlaxRoFormerForTokenClassification"),S$.forEach(o),af.forEach(o),eu=m(a),so=r(a,"DIV",{class:!0});var Jo=l(so);k(ei.$$.fragment,Jo),BF=m(Jo),rm=r(Jo,"P",{});var P$=l(rm);GF=n(P$,`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.`),P$.forEach(o),XF=m(Jo),oi=r(Jo,"P",{});var lf=l(oi);SF=n(lf,"This model inherits from "),dd=r(lf,"A",{href:!0});var L$=l(dd);PF=n(L$,"FlaxPreTrainedModel"),L$.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=m(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 Q$=l(ni);OF=n(Q$,"flax.linen.Module"),Q$.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=m(Jo),am=r(Jo,"P",{});var D$=l(am);KF=n(D$,"Finally, this model supports inherent JAX features such as:"),D$.forEach(o),eM=m(Jo),ht=r(Jo,"UL",{});var _r=l(ht);lm=r(_r,"LI",{});var O$=l(lm);si=r(O$,"A",{href:!0,rel:!0});var H$=l(si);oM=n(H$,"Just-In-Time (JIT) compilation"),H$.forEach(o),O$.forEach(o),tM=m(_r),im=r(_r,"LI",{});var Y$=l(im);ri=r(Y$,"A",{href:!0,rel:!0});var K$=l(ri);nM=n(K$,"Automatic Differentiation"),K$.forEach(o),Y$.forEach(o),sM=m(_r),dm=r(_r,"LI",{});var eR=l(dm);ai=r(eR,"A",{href:!0,rel:!0});var oR=l(ai);rM=n(oR,"Vectorization"),oR.forEach(o),eR.forEach(o),aM=m(_r),cm=r(_r,"LI",{});var tR=l(cm);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=m(Jo),Oo=r(Jo,"DIV",{class:!0});var yr=l(Oo);k(ii.$$.fragment,yr),dM=m(yr),_n=r(yr,"P",{});var Wd=l(_n);cM=n(Wd,"The "),pm=r(Wd,"CODE",{});var sR=l(pm);pM=n(sR,"FlaxRoFormerPreTrainedModel"),sR.forEach(o),mM=n(Wd," forward method, overrides the "),mm=r(Wd,"CODE",{});var rR=l(mm);hM=n(rR,"__call__"),rR.forEach(o),uM=n(Wd," special method."),Wd.forEach(o),fM=m(yr),k(Ss.$$.fragment,yr),gM=m(yr),k(Ps.$$.fragment,yr),yr.forEach(o),Jo.forEach(o),ou=m(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);hm=r(aR,"SPAN",{});var lR=l(hm);k(di.$$.fragment,lR),lR.forEach(o),aR.forEach(o),_M=m(cf),um=r(cf,"SPAN",{});var iR=l(um);yM=n(iR,"FlaxRoFormerForQuestionAnswering"),iR.forEach(o),cf.forEach(o),tu=m(a),ro=r(a,"DIV",{class:!0});var Co=l(ro);k(ci.$$.fragment,Co),bM=m(Co),bn=r(Co,"P",{});var qd=l(bn);vM=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 `),fm=r(qd,"CODE",{});var dR=l(fm);TM=n(dR,"span start logits"),dR.forEach(o),kM=n(qd," and "),gm=r(qd,"CODE",{});var cR=l(gm);wM=n(cR,"span end logits"),cR.forEach(o),FM=n(qd,")."),qd.forEach(o),MM=m(Co),pi=r(Co,"P",{});var pf=l(pi);$M=n(pf,"This model inherits from "),cd=r(pf,"A",{href:!0});var pR=l(cd);RM=n(pR,"FlaxPreTrainedModel"),pR.forEach(o),jM=n(pf,`. 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)`),pf.forEach(o),EM=m(Co),mi=r(Co,"P",{});var mf=l(mi);JM=n(mf,"This model is also a Flax Linen "),hi=r(mf,"A",{href:!0,rel:!0});var mR=l(hi);CM=n(mR,"flax.linen.Module"),mR.forEach(o),UM=n(mf,`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),mf.forEach(o),xM=m(Co),_m=r(Co,"P",{});var hR=l(_m);zM=n(hR,"Finally, this model supports inherent JAX features such as:"),hR.forEach(o),IM=m(Co),ut=r(Co,"UL",{});var br=l(ut);ym=r(br,"LI",{});var uR=l(ym);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=m(br),bm=r(br,"LI",{});var gR=l(bm);fi=r(gR,"A",{href:!0,rel:!0});var _R=l(fi);WM=n(_R,"Automatic Differentiation"),_R.forEach(o),gR.forEach(o),qM=m(br),vm=r(br,"LI",{});var yR=l(vm);gi=r(yR,"A",{href:!0,rel:!0});var bR=l(gi);VM=n(bR,"Vectorization"),bR.forEach(o),yR.forEach(o),AM=m(br),Tm=r(br,"LI",{});var vR=l(Tm);_i=r(vR,"A",{href:!0,rel:!0});var TR=l(_i);BM=n(TR,"Parallelization"),TR.forEach(o),vR.forEach(o),br.forEach(o),GM=m(Co),Ho=r(Co,"DIV",{class:!0});var vr=l(Ho);k(yi.$$.fragment,vr),XM=m(vr),vn=r(vr,"P",{});var Vd=l(vn);SM=n(Vd,"The "),km=r(Vd,"CODE",{});var kR=l(km);PM=n(kR,"FlaxRoFormerPreTrainedModel"),kR.forEach(o),LM=n(Vd," forward method, overrides the "),wm=r(Vd,"CODE",{});var wR=l(wm);QM=n(wR,"__call__"),wR.forEach(o),DM=n(Vd," special method."),Vd.forEach(o),OM=m(vr),k(Qs.$$.fragment,vr),HM=m(vr),k(Ds.$$.fragment,vr),vr.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/v4.32.0/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/v4.32.0/en/main_classes/configuration#transformers.PretrainedConfig"),f(Ei,"href","/docs/transformers/v4.32.0/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/v4.32.0/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/v4.32.0/en/model_doc/roformer#transformers.RoFormerTokenizerFast"),f(Ii,"href","/docs/transformers/v4.32.0/en/model_doc/bert#transformers.BertTokenizerFast"),f(Zi,"href","/docs/transformers/v4.32.0/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(Xr,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),f(Xr,"rel","nofollow"),f(Pr,"href","https://arxiv.org/abs/1706.03762"),f(Pr,"rel","nofollow"),f(qi,"href","/docs/transformers/v4.32.0/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/v4.32.0/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/v4.32.0/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(Bn,"id","transformers.RoFormerForSequenceClassification"),f(Bn,"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(Bn,"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(Bi,"href","/docs/transformers/v4.32.0/en/model_doc/roformer#transformers.RoFormerForSequenceClassification"),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(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(Gi,"href","/docs/transformers/v4.32.0/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(Bt,"class","relative group"),f(fa,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),f(fa,"rel","nofollow"),f(Xi,"href","/docs/transformers/v4.32.0/en/model_doc/roformer#transformers.RoFormerForTokenClassification"),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(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(Xt,"class","relative group"),f(va,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),f(va,"rel","nofollow"),f(Si,"href","/docs/transformers/v4.32.0/en/model_doc/roformer#transformers.RoFormerForQuestionAnswering"),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(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/v4.32.0/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/v4.32.0/en/model_doc/roformer#transformers.TFRoFormerModel"),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(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/v4.32.0/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/v4.32.0/en/model_doc/roformer#transformers.TFRoFormerForMaskedLM"),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(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(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/v4.32.0/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(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(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/v4.32.0/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/v4.32.0/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/v4.32.0/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/v4.32.0/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/v4.32.0/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/v4.32.0/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/v4.32.0/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/v4.32.0/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/v4.32.0/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(vl,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),f(vl,"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/v4.32.0/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(mn,"class","relative group"),f(ld,"href","/docs/transformers/v4.32.0/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/v4.32.0/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(Xs,"id","transformers.FlaxRoFormerForTokenClassification"),f(Xs,"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(Xs,"href","#transformers.FlaxRoFormerForTokenClassification"),f(gn,"class","relative group"),f(dd,"href","/docs/transformers/v4.32.0/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/v4.32.0/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,B,b),e(B,Re),g(a,ye,b),g(a,G,b),e(G,pe),e(pe,je),g(a,te,b),g(a,U,b),e(U,I),g(a,be,b),g(a,X,b),e(X,me),e(me,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,ve,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,Te,b),g(a,x,b),e(x,ue),e(ue,de),e(de,v),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,Be),e(Be,qe),e(qe,W),e(x,H),e(x,Ge),e(Ge,Ve),e(Ve,Y),e(x,He),e(x,Xe),e(Xe,ce),e(ce,Ye),g(a,ne,b),g(a,ze,b),e(ze,Fn),e(Fn,Ad),w(Tr,Ad,null),e(ze,hf),e(ze,Bd),e(Bd,uf),g(a,mh,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,vf),e(Uo,Tf),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,Gd),w(Fr,Gd,null),e(Rt,jf),e(Rt,Xd),e(Xd,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,Bf),e(gt,Jr),e(Jr,Ci),e(Ci,Gf),e(Ci,Pd),e(Pd,Xf),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,pg),g(a,gh,b),g(a,lo,b),w(Zr,lo,null),e(lo,mg),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,vg),e(lo,Tg),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(Br,_o,null),e(_o,Ng),e(_o,Gr),e(Gr,Wg),e(Gr,Xr),e(Xr,qg),e(Gr,Vg),e(_o,Ag),e(_o,Sr),e(Sr,Bg),e(Sr,Pr),e(Pr,Gg),e(Sr,Xg),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,pc),e(pc,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,mc),e(mc,c_),e(Ct,p_),e(Wo,m_),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,vh,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,v_),e(xt,T_),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,Th,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,B_),e(Nt,G_),e(Nt,vc),e(vc,X_),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,Bn),e(Bn,Tc),w(ta,Tc,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,vo),w(aa,vo,null),e(vo,ny),e(vo,qt),e(qt,sy),e(qt,Bi),e(Bi,ry),e(qt,ay),e(qt,Fc),e(Fc,ly),e(qt,iy),e(vo,dy),w(Gn,vo,null),e(vo,cy),w(Xn,vo,null),e(vo,py),w(Sn,vo,null),g(a,Mh,b),g(a,Vt,b),e(Vt,Pn),e(Pn,Mc),w(la,Mc,null),e(Vt,my),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,vy),e(zo,Ao),w(pa,Ao,null),e(Ao,Ty),e(Ao,At),e(At,ky),e(At,Gi),e(Gi,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,Bt,b),e(Bt,Dn),e(Dn,Ec),w(ma,Ec,null),e(Bt,Ey),e(Bt,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,Bo),w(ga,Bo,null),e(Bo,Wy),e(Bo,Gt),e(Gt,qy),e(Gt,Xi),e(Xi,Vy),e(Gt,Ay),e(Gt,Uc),e(Uc,By),e(Gt,Gy),e(Bo,Xy),w(On,Bo,null),e(Bo,Sy),w(Hn,Bo,null),g(a,Eh,b),g(a,Xt,b),e(Xt,Yn),e(Yn,xc),w(_a,xc,null),e(Xt,Py),e(Xt,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,va),e(va,tb),e(ba,nb),e(Zo,sb),e(Zo,Go),w(Ta,Go,null),e(Go,rb),e(Go,Pt),e(Pt,ab),e(Pt,Si),e(Si,lb),e(Pt,ib),e(Pt,Nc),e(Nc,db),e(Pt,cb),e(Go,pb),w(Kn,Go,null),e(Go,mb),w(es,Go,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,vb),e(co,Tb),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,Xo),w(Ra,Xo,null),e(Xo,Rb),e(Xo,Qt),e(Qt,jb),e(Qt,Li),e(Li,Eb),e(Qt,Jb),e(Qt,Ac),e(Ac,Cb),e(Qt,Ub),e(Xo,xb),w(ns,Xo,null),e(Xo,zb),w(ss,Xo,null),g(a,xh,b),g(a,Dt,b),e(Dt,rs),e(rs,Bc),w(ja,Bc,null),e(Dt,Ib),e(Dt,Gc),e(Gc,Zb),g(a,zh,b),g(a,po,b),w(Ea,po,null),e(po,Nb),e(po,Ja),e(Ja,Wb),e(Ja,Xc),e(Xc,qb),e(Ja,Vb),e(po,Ab),e(po,Ca),e(Ca,Bb),e(Ca,Qi),e(Qi,Gb),e(Ca,Xb),e(po,Sb),e(po,Ua),e(Ua,Pb),e(Ua,xa),e(xa,Lb),e(Ua,Qb),e(po,Db),w(as,po,null),e(po,Ob),e(po,To),w(za,To,null),e(To,Hb),e(To,Ot),e(Ot,Yb),e(Ot,Di),e(Di,Kb),e(Ot,ev),e(Ot,Sc),e(Sc,ov),e(Ot,tv),e(To,nv),w(ls,To,null),e(To,sv),w(is,To,null),e(To,rv),w(ds,To,null),g(a,Ih,b),g(a,Ht,b),e(Ht,cs),e(cs,Pc),w(Ia,Pc,null),e(Ht,av),e(Ht,Lc),e(Lc,lv),g(a,Zh,b),g(a,mo,b),w(Za,mo,null),e(mo,iv),e(mo,Na),e(Na,dv),e(Na,Qc),e(Qc,cv),e(Na,pv),e(mo,mv),e(mo,Wa),e(Wa,hv),e(Wa,Oi),e(Oi,uv),e(Wa,fv),e(mo,gv),e(mo,qa),e(qa,_v),e(qa,Va),e(Va,yv),e(qa,bv),e(mo,vv),w(ps,mo,null),e(mo,Tv),e(mo,yt),w(Aa,yt,null),e(yt,kv),e(yt,yo),e(yo,wv),e(yo,Dc),e(Dc,Fv),e(yo,Mv),e(yo,Oc),e(Oc,$v),e(yo,Rv),e(yo,Hc),e(Hc,jv),e(yo,Ev),e(yo,Yc),e(Yc,Jv),e(yo,Cv),e(yo,Kc),e(Kc,Uv),e(yo,xv),e(yt,zv),w(ms,yt,null),g(a,Nh,b),g(a,Yt,b),e(Yt,hs),e(hs,ep),w(Ba,ep,null),e(Yt,Iv),e(Yt,op),e(op,Zv),g(a,Wh,b),g(a,ho,b),w(Ga,ho,null),e(ho,Nv),e(ho,tp),e(tp,Wv),e(ho,qv),e(ho,Xa),e(Xa,Vv),e(Xa,Hi),e(Hi,Av),e(Xa,Bv),e(ho,Gv),e(ho,Sa),e(Sa,Xv),e(Sa,Pa),e(Pa,Sv),e(Sa,Pv),e(ho,Lv),w(us,ho,null),e(ho,Qv),e(ho,ko),w(La,ko,null),e(ko,Dv),e(ko,Kt),e(Kt,Ov),e(Kt,Yi),e(Yi,Hv),e(Kt,Yv),e(Kt,np),e(np,Kv),e(Kt,eT),e(ko,oT),w(fs,ko,null),e(ko,tT),w(gs,ko,null),e(ko,nT),w(_s,ko,null),g(a,qh,b),g(a,en,b),e(en,ys),e(ys,sp),w(Qa,sp,null),e(en,sT),e(en,rp),e(rp,rT),g(a,Vh,b),g(a,uo,b),w(Da,uo,null),e(uo,aT),e(uo,ap),e(ap,lT),e(uo,iT),e(uo,Oa),e(Oa,dT),e(Oa,Ki),e(Ki,cT),e(Oa,pT),e(uo,mT),e(uo,Ha),e(Ha,hT),e(Ha,Ya),e(Ya,uT),e(Ha,fT),e(uo,gT),w(bs,uo,null),e(uo,_T),e(uo,So),w(Ka,So,null),e(So,yT),e(So,on),e(on,bT),e(on,ed),e(ed,vT),e(on,TT),e(on,lp),e(lp,kT),e(on,wT),e(So,FT),w(vs,So,null),e(So,MT),w(Ts,So,null),g(a,Ah,b),g(a,tn,b),e(tn,ks),e(ks,ip),w(el,ip,null),e(tn,$T),e(tn,dp),e(dp,RT),g(a,Bh,b),g(a,fo,b),w(ol,fo,null),e(fo,jT),e(fo,cp),e(cp,ET),e(fo,JT),e(fo,tl),e(tl,CT),e(tl,od),e(od,UT),e(tl,xT),e(fo,zT),e(fo,nl),e(nl,IT),e(nl,sl),e(sl,ZT),e(nl,NT),e(fo,WT),w(ws,fo,null),e(fo,qT),e(fo,wo),w(rl,wo,null),e(wo,VT),e(wo,nn),e(nn,AT),e(nn,td),e(td,BT),e(nn,GT),e(nn,pp),e(pp,XT),e(nn,ST),e(wo,PT),w(Fs,wo,null),e(wo,LT),w(Ms,wo,null),e(wo,QT),w($s,wo,null),g(a,Gh,b),g(a,sn,b),e(sn,Rs),e(Rs,mp),w(al,mp,null),e(sn,DT),e(sn,hp),e(hp,OT),g(a,Xh,b),g(a,go,b),w(ll,go,null),e(go,HT),e(go,rn),e(rn,YT),e(rn,up),e(up,KT),e(rn,ek),e(rn,fp),e(fp,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,pk),w(js,go,null),e(go,mk),e(go,Fo),w(pl,Fo,null),e(Fo,hk),e(Fo,an),e(an,uk),e(an,sd),e(sd,fk),e(an,gk),e(an,gp),e(gp,_k),e(an,yk),e(Fo,bk),w(Es,Fo,null),e(Fo,vk),w(Js,Fo,null),e(Fo,Tk),w(Cs,Fo,null),g(a,Sh,b),g(a,ln,b),e(ln,Us),e(Us,_p),w(ml,_p,null),e(ln,kk),e(ln,yp),e(yp,wk),g(a,Ph,b),g(a,eo,b),w(hl,eo,null),e(eo,Fk),e(eo,bp),e(bp,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,vp),e(vp,Ik),e(eo,Zk),e(eo,dt),e(dt,Tp),e(Tp,_l),e(_l,Nk),e(dt,Wk),e(dt,kp),e(kp,yl),e(yl,qk),e(dt,Vk),e(dt,wp),e(wp,bl),e(bl,Ak),e(dt,Bk),e(dt,Fp),e(Fp,vl),e(vl,Gk),e(eo,Xk),e(eo,Po),w(Tl,Po,null),e(Po,Sk),e(Po,dn),e(dn,Pk),e(dn,Mp),e(Mp,Lk),e(dn,Qk),e(dn,$p),e($p,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,Rp),w(kl,Rp,null),e(cn,Kk),e(cn,jp),e(jp,ew),g(a,Qh,b),g(a,oo,b),w(wl,oo,null),e(oo,ow),e(oo,Fl),e(Fl,tw),e(Fl,Ep),e(Ep,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,pw),e($l,mw),e(oo,hw),e(oo,Jp),e(Jp,uw),e(oo,fw),e(oo,ct),e(ct,Cp),e(Cp,jl),e(jl,gw),e(ct,_w),e(ct,Up),e(Up,El),e(El,yw),e(ct,bw),e(ct,xp),e(xp,Jl),e(Jl,vw),e(ct,Tw),e(ct,zp),e(zp,Cl),e(Cl,kw),e(oo,ww),e(oo,Lo),w(Ul,Lo,null),e(Lo,Fw),e(Lo,pn),e(pn,Mw),e(pn,Ip),e(Ip,$w),e(pn,Rw),e(pn,Zp),e(Zp,jw),e(pn,Ew),e(Lo,Jw),w(Zs,Lo,null),e(Lo,Cw),w(Ns,Lo,null),g(a,Dh,b),g(a,mn,b),e(mn,Ws),e(Ws,Np),w(xl,Np,null),e(mn,Uw),e(mn,Wp),e(Wp,xw),g(a,Oh,b),g(a,to,b),w(zl,to,null),e(to,zw),e(to,qp),e(qp,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,Bw),e(Zl,Gw),e(to,Xw),e(to,Vp),e(Vp,Sw),e(to,Pw),e(to,pt),e(pt,Ap),e(Ap,Wl),e(Wl,Lw),e(pt,Qw),e(pt,Bp),e(Bp,ql),e(ql,Dw),e(pt,Ow),e(pt,Gp),e(Gp,Vl),e(Vl,Hw),e(pt,Yw),e(pt,Xp),e(Xp,Al),e(Al,Kw),e(to,eF),e(to,Qo),w(Bl,Qo,null),e(Qo,oF),e(Qo,hn),e(hn,tF),e(hn,Sp),e(Sp,nF),e(hn,sF),e(hn,Pp),e(Pp,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,Lp),w(Gl,Lp,null),e(un,dF),e(un,Qp),e(Qp,cF),g(a,Yh,b),g(a,no,b),w(Xl,no,null),e(no,pF),e(no,Dp),e(Dp,mF),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,vF),e(no,TF),e(no,Op),e(Op,kF),e(no,wF),e(no,mt),e(mt,Hp),e(Hp,Ql),e(Ql,FF),e(mt,MF),e(mt,Yp),e(Yp,Dl),e(Dl,$F),e(mt,RF),e(mt,Kp),e(Kp,Ol),e(Ol,jF),e(mt,EF),e(mt,em),e(em,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,om),e(om,zF),e(fn,IF),e(fn,tm),e(tm,ZF),e(fn,NF),e(Do,WF),w(Bs,Do,null),e(Do,qF),w(Gs,Do,null),g(a,Kh,b),g(a,gn,b),e(gn,Xs),e(Xs,nm),w(Kl,nm,null),e(gn,VF),e(gn,sm),e(sm,AF),g(a,eu,b),g(a,so,b),w(ei,so,null),e(so,BF),e(so,rm),e(rm,GF),e(so,XF),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,am),e(am,KF),e(so,eM),e(so,ht),e(ht,lm),e(lm,si),e(si,oM),e(ht,tM),e(ht,im),e(im,ri),e(ri,nM),e(ht,sM),e(ht,dm),e(dm,ai),e(ai,rM),e(ht,aM),e(ht,cm),e(cm,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,pm),e(pm,pM),e(_n,mM),e(_n,mm),e(mm,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,hm),w(di,hm,null),e(yn,_M),e(yn,um),e(um,yM),g(a,tu,b),g(a,ro,b),w(ci,ro,null),e(ro,bM),e(ro,bn),e(bn,vM),e(bn,fm),e(fm,TM),e(bn,kM),e(bn,gm),e(gm,wM),e(bn,FM),e(ro,MM),e(ro,pi),e(pi,$M),e(pi,cd),e(cd,RM),e(pi,jM),e(ro,EM),e(ro,mi),e(mi,JM),e(mi,hi),e(hi,CM),e(mi,UM),e(ro,xM),e(ro,_m),e(_m,zM),e(ro,IM),e(ro,ut),e(ut,ym),e(ym,ui),e(ui,ZM),e(ut,NM),e(ut,bm),e(bm,fi),e(fi,WM),e(ut,qM),e(ut,vm),e(vm,gi),e(gi,VM),e(ut,AM),e(ut,Tm),e(Tm,_i),e(_i,BM),e(ro,GM),e(ro,Ho),w(yi,Ho,null),e(Ho,XM),e(Ho,vn),e(vn,SM),e(vn,km),e(km,PM),e(vn,LM),e(vn,wm),e(wm,QM),e(vn,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 Fm={};b&2&&(Fm.$$scope={dirty:b,ctx:a}),Rn.$set(Fm);const Mm={};b&2&&(Mm.$$scope={dirty:b,ctx:a}),En.$set(Mm);const $m={};b&2&&($m.$$scope={dirty:b,ctx:a}),Un.$set($m);const vi={};b&2&&(vi.$$scope={dirty:b,ctx:a}),zn.$set(vi);const Rm={};b&2&&(Rm.$$scope={dirty:b,ctx:a}),In.$set(Rm);const jm={};b&2&&(jm.$$scope={dirty:b,ctx:a}),Nn.$set(jm);const Em={};b&2&&(Em.$$scope={dirty:b,ctx:a}),Wn.$set(Em);const Ti={};b&2&&(Ti.$$scope={dirty:b,ctx:a}),Vn.$set(Ti);const Jm={};b&2&&(Jm.$$scope={dirty:b,ctx:a}),An.$set(Jm);const Cm={};b&2&&(Cm.$$scope={dirty:b,ctx:a}),Gn.$set(Cm);const Um={};b&2&&(Um.$$scope={dirty:b,ctx:a}),Xn.$set(Um);const xm={};b&2&&(xm.$$scope={dirty:b,ctx:a}),Sn.$set(xm);const zm={};b&2&&(zm.$$scope={dirty:b,ctx:a}),Ln.$set(zm);const Im={};b&2&&(Im.$$scope={dirty:b,ctx:a}),Qn.$set(Im);const Zm={};b&2&&(Zm.$$scope={dirty:b,ctx:a}),On.$set(Zm);const Tn={};b&2&&(Tn.$$scope={dirty:b,ctx:a}),Hn.$set(Tn);const Nm={};b&2&&(Nm.$$scope={dirty:b,ctx:a}),Kn.$set(Nm);const Wm={};b&2&&(Wm.$$scope={dirty:b,ctx:a}),es.$set(Wm);const ki={};b&2&&(ki.$$scope={dirty:b,ctx:a}),ts.$set(ki);const qm={};b&2&&(qm.$$scope={dirty:b,ctx:a}),ns.$set(qm);const Vm={};b&2&&(Vm.$$scope={dirty:b,ctx:a}),ss.$set(Vm);const Am={};b&2&&(Am.$$scope={dirty:b,ctx:a}),as.$set(Am);const bo={};b&2&&(bo.$$scope={dirty:b,ctx:a}),ls.$set(bo);const Bm={};b&2&&(Bm.$$scope={dirty:b,ctx:a}),is.$set(Bm);const Gm={};b&2&&(Gm.$$scope={dirty:b,ctx:a}),ds.$set(Gm);const Xm={};b&2&&(Xm.$$scope={dirty:b,ctx:a}),ps.$set(Xm);const Sm={};b&2&&(Sm.$$scope={dirty:b,ctx:a}),ms.$set(Sm);const Pm={};b&2&&(Pm.$$scope={dirty:b,ctx:a}),us.$set(Pm);const Lm={};b&2&&(Lm.$$scope={dirty:b,ctx:a}),fs.$set(Lm);const Qm={};b&2&&(Qm.$$scope={dirty:b,ctx:a}),gs.$set(Qm);const Dm={};b&2&&(Dm.$$scope={dirty:b,ctx:a}),_s.$set(Dm);const Om={};b&2&&(Om.$$scope={dirty:b,ctx:a}),bs.$set(Om);const Hm={};b&2&&(Hm.$$scope={dirty:b,ctx:a}),vs.$set(Hm);const Ym={};b&2&&(Ym.$$scope={dirty:b,ctx:a}),Ts.$set(Ym);const Km={};b&2&&(Km.$$scope={dirty:b,ctx:a}),ws.$set(Km);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}),Bs.$set(ih);const dh={};b&2&&(dh.$$scope={dirty:b,ctx:a}),Gs.$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(Tr.$$.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(Br.$$.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(Gn.$$.fragment,a),F(Xn.$$.fragment,a),F(Sn.$$.fragment,a),F(la.$$.fragment,a),F(ia.$$.fragment,a),F(pa.$$.fragment,a),F(Ln.$$.fragment,a),F(Qn.$$.fragment,a),F(ma.$$.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(Ta.$$.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(ps.$$.fragment,a),F(Aa.$$.fragment,a),F(ms.$$.fragment,a),F(Ba.$$.fragment,a),F(Ga.$$.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(vs.$$.fragment,a),F(Ts.$$.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(pl.$$.fragment,a),F(Es.$$.fragment,a),F(Js.$$.fragment,a),F(Cs.$$.fragment,a),F(ml.$$.fragment,a),F(hl.$$.fragment,a),F(Tl.$$.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(Bl.$$.fragment,a),F(qs.$$.fragment,a),F(Vs.$$.fragment,a),F(Gl.$$.fragment,a),F(Xl.$$.fragment,a),F(Yl.$$.fragment,a),F(Bs.$$.fragment,a),F(Gs.$$.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(Tr.$$.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(Br.$$.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(Gn.$$.fragment,a),M(Xn.$$.fragment,a),M(Sn.$$.fragment,a),M(la.$$.fragment,a),M(ia.$$.fragment,a),M(pa.$$.fragment,a),M(Ln.$$.fragment,a),M(Qn.$$.fragment,a),M(ma.$$.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(Ta.$$.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(ps.$$.fragment,a),M(Aa.$$.fragment,a),M(ms.$$.fragment,a),M(Ba.$$.fragment,a),M(Ga.$$.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(vs.$$.fragment,a),M(Ts.$$.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(pl.$$.fragment,a),M(Es.$$.fragment,a),M(Js.$$.fragment,a),M(Cs.$$.fragment,a),M(ml.$$.fragment,a),M(hl.$$.fragment,a),M(Tl.$$.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(Bl.$$.fragment,a),M(qs.$$.fragment,a),M(Vs.$$.fragment,a),M(Gl.$$.fragment,a),M(Xl.$$.fragment,a),M(Yl.$$.fragment,a),M(Bs.$$.fragment,a),M(Gs.$$.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(B),a&&o(ye),a&&o(G),a&&o(te),a&&o(U),a&&o(be),a&&o(X),a&&o(L),a&&o(se),a&&o(ve),a&&o(re),$(A),a&&o(Te),a&&o(x),a&&o(ne),a&&o(ze),$(Tr),a&&o(mh),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),$(Br),$(Lr),$(zn),$(In),a&&o(bh),a&&o(Ut),$(Qr),a&&o(vh),a&&o(lt),$(Dr),$(Hr),$(Nn),$(Wn),a&&o(Th),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),$(Gn),$(Xn),$(Sn),a&&o(Mh),a&&o(Vt),$(la),a&&o($h),a&&o(zo),$(ia),$(pa),$(Ln),$(Qn),a&&o(Rh),a&&o(Bt),$(ma),a&&o(jh),a&&o(Io),$(ha),$(ga),$(On),$(Hn),a&&o(Eh),a&&o(Xt),$(_a),a&&o(Jh),a&&o(Zo),$(ya),$(Ta),$(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(po),$(Ea),$(as),$(za),$(ls),$(is),$(ds),a&&o(Ih),a&&o(Ht),$(Ia),a&&o(Zh),a&&o(mo),$(Za),$(ps),$(Aa),$(ms),a&&o(Nh),a&&o(Yt),$(Ba),a&&o(Wh),a&&o(ho),$(Ga),$(us),$(La),$(fs),$(gs),$(_s),a&&o(qh),a&&o(en),$(Qa),a&&o(Vh),a&&o(uo),$(Da),$(bs),$(Ka),$(vs),$(Ts),a&&o(Ah),a&&o(tn),$(el),a&&o(Bh),a&&o(fo),$(ol),$(ws),$(rl),$(Fs),$(Ms),$($s),a&&o(Gh),a&&o(sn),$(al),a&&o(Xh),a&&o(go),$(ll),$(js),$(pl),$(Es),$(Js),$(Cs),a&&o(Sh),a&&o(ln),$(ml),a&&o(Ph),a&&o(eo),$(hl),$(Tl),$(xs),$(zs),a&&o(Lh),a&&o(cn),$(kl),a&&o(Qh),a&&o(oo),$(wl),$(Ul),$(Zs),$(Ns),a&&o(Dh),a&&o(mn),$(xl),a&&o(Oh),a&&o(to),$(zl),$(Bl),$(qs),$(Vs),a&&o(Hh),a&&o(un),$(Gl),a&&o(Yh),a&&o(no),$(Xl),$(Yl),$(Bs),$(Gs),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};
