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

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

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a model from the junnyu/roformer_chinese_base style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = RoFormerModel(configuration)

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

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

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

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;junnyu/roformer_chinese_base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = RoFormerModel.from_pretrained(<span class="hljs-string">&quot;junnyu/roformer_chinese_base&quot;</span>)

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

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

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;junnyu/roformer_chinese_base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>config = RoFormerConfig.from_pretrained(<span class="hljs-string">&quot;junnyu/roformer_chinese_base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>config.is_decoder = <span class="hljs-literal">True</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = RoFormerForCausalLM.from_pretrained(<span class="hljs-string">&quot;junnyu/roformer_chinese_base&quot;</span>, config=config)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(<span class="hljs-string">&quot;\u4ECA\u5929\u5929\u6C14\u975E\u5E38\u597D\u3002&quot;</span>, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs)

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

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;junnyu/roformer_chinese_base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = RoFormerForMaskedLM.from_pretrained(<span class="hljs-string">&quot;junnyu/roformer_chinese_base&quot;</span>)

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

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

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

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

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

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

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;junnyu/roformer_chinese_base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = RoFormerForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;junnyu/roformer_chinese_base&quot;</span>)

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

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

<span class="hljs-meta">&gt;&gt;&gt; </span>predicted_class_id = logits.argmax().item()

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

<span class="hljs-meta">&gt;&gt;&gt; </span>labels = torch.tensor([<span class="hljs-number">1</span>])
<span class="hljs-meta">&gt;&gt;&gt; </span>loss = model(**inputs, labels=labels).loss`}}),{c(){d=s("p"),y=t("Example of single-label classification:"),h=m(),k(u.$$.fragment)},l(i){d=r(i,"P",{});var c=l(d);y=n(c,"Example of single-label classification:"),c.forEach(o),h=p(i),w(u.$$.fragment,i)},m(i,c){g(i,d,c),e(d,y),g(i,h,c),v(u,i,c),_=!0},p:Ze,i(i){_||(F(u.$$.fragment,i),_=!0)},o(i){M(u.$$.fragment,i),_=!1},d(i){i&&o(d),i&&o(h),$(u,i)}}}function AR(j){let d,y,h,u,_;return u=new Ne({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwQXV0b1Rva2VuaXplciUyQyUyMFJvRm9ybWVyRm9yU2VxdWVuY2VDbGFzc2lmaWNhdGlvbiUwQSUwQXRva2VuaXplciUyMCUzRCUyMEF1dG9Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMmp1bm55dSUyRnJvZm9ybWVyX2NoaW5lc2VfYmFzZSUyMiklMEFtb2RlbCUyMCUzRCUyMFJvRm9ybWVyRm9yU2VxdWVuY2VDbGFzc2lmaWNhdGlvbi5mcm9tX3ByZXRyYWluZWQoJTIyanVubnl1JTJGcm9mb3JtZXJfY2hpbmVzZV9iYXNlJTIyJTJDJTIwcHJvYmxlbV90eXBlJTNEJTIybXVsdGlfbGFiZWxfY2xhc3NpZmljYXRpb24lMjIpJTBBJTBBaW5wdXRzJTIwJTNEJTIwdG9rZW5pemVyKCUyMkhlbGxvJTJDJTIwbXklMjBkb2clMjBpcyUyMGN1dGUlMjIlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKSUwQSUwQXdpdGglMjB0b3JjaC5ub19ncmFkKCklM0ElMEElMjAlMjAlMjAlMjBsb2dpdHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cykubG9naXRzJTBBJTBBcHJlZGljdGVkX2NsYXNzX2lkcyUyMCUzRCUyMHRvcmNoLmFyYW5nZSgwJTJDJTIwbG9naXRzLnNoYXBlJTVCLTElNUQpJTVCdG9yY2guc2lnbW9pZChsb2dpdHMpLnNxdWVlemUoZGltJTNEMCklMjAlM0UlMjAwLjUlNUQlMEElMEElMjMlMjBUbyUyMHRyYWluJTIwYSUyMG1vZGVsJTIwb24lMjAlNjBudW1fbGFiZWxzJTYwJTIwY2xhc3NlcyUyQyUyMHlvdSUyMGNhbiUyMHBhc3MlMjAlNjBudW1fbGFiZWxzJTNEbnVtX2xhYmVscyU2MCUyMHRvJTIwJTYwLmZyb21fcHJldHJhaW5lZCguLi4pJTYwJTBBbnVtX2xhYmVscyUyMCUzRCUyMGxlbihtb2RlbC5jb25maWcuaWQybGFiZWwpJTBBbW9kZWwlMjAlM0QlMjBSb0Zvcm1lckZvclNlcXVlbmNlQ2xhc3NpZmljYXRpb24uZnJvbV9wcmV0cmFpbmVkKCUwQSUyMCUyMCUyMCUyMCUyMmp1bm55dSUyRnJvZm9ybWVyX2NoaW5lc2VfYmFzZSUyMiUyQyUyMG51bV9sYWJlbHMlM0RudW1fbGFiZWxzJTJDJTIwcHJvYmxlbV90eXBlJTNEJTIybXVsdGlfbGFiZWxfY2xhc3NpZmljYXRpb24lMjIlMEEpJTBBJTBBbGFiZWxzJTIwJTNEJTIwdG9yY2guc3VtKCUwQSUyMCUyMCUyMCUyMHRvcmNoLm5uLmZ1bmN0aW9uYWwub25lX2hvdChwcmVkaWN0ZWRfY2xhc3NfaWRzJTVCTm9uZSUyQyUyMCUzQSU1RC5jbG9uZSgpJTJDJTIwbnVtX2NsYXNzZXMlM0RudW1fbGFiZWxzKSUyQyUyMGRpbSUzRDElMEEpLnRvKHRvcmNoLmZsb2F0KSUwQWxvc3MlMjAlM0QlMjBtb2RlbCgqKmlucHV0cyUyQyUyMGxhYmVscyUzRGxhYmVscykubG9zcw==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, RoFormerForSequenceClassification

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;junnyu/roformer_chinese_base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = RoFormerForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;junnyu/roformer_chinese_base&quot;</span>, problem_type=<span class="hljs-string">&quot;multi_label_classification&quot;</span>)

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

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

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

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

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

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;junnyu/roformer_chinese_base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = RoFormerForQuestionAnswering.from_pretrained(<span class="hljs-string">&quot;junnyu/roformer_chinese_base&quot;</span>)

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

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

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

<span class="hljs-meta">&gt;&gt;&gt; </span>predict_answer_tokens = inputs.input_ids[<span class="hljs-number">0</span>, answer_start_index : answer_end_index + <span class="hljs-number">1</span>]

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

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

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;junnyu/roformer_chinese_base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFRoFormerModel.from_pretrained(<span class="hljs-string">&quot;junnyu/roformer_chinese_base&quot;</span>)

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

<span class="hljs-meta">&gt;&gt;&gt; </span>last_hidden_states = outputs.last_hidden_state`}}),{c(){d=s("p"),y=t("Example:"),h=m(),k(u.$$.fragment)},l(i){d=r(i,"P",{});var c=l(d);y=n(c,"Example:"),c.forEach(o),h=p(i),w(u.$$.fragment,i)},m(i,c){g(i,d,c),e(d,y),g(i,h,c),v(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,we,fe,q,ae,ee,R,ve,P,Fe,ge,V,Me,le,Q,$e,_e,B,Re,ye,G,me,je,te,U,I,be,X,pe,Ee,L,se,Je,z,Ce,D,ie,Ue,O,Te,re,N,he,A,xe,oe,Z,ke,x,ue,de;return{c(){d=s("p"),y=t("TensorFlow models and layers in "),h=s("code"),u=t("transformers"),_=t(" accept two formats as input:"),i=m(),c=s("ul"),J=s("li"),we=t("having all inputs as keyword arguments (like PyTorch models), or"),fe=m(),q=s("li"),ae=t("having all inputs as a list, tuple or dict in the first positional argument."),ee=m(),R=s("p"),ve=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"),me=t("Functional"),je=t(` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),te=m(),U=s("ul"),I=s("li"),be=t("a single Tensor with "),X=s("code"),pe=t("input_ids"),Ee=t(" only and nothing else: "),L=s("code"),se=t("model(input_ids)"),Je=m(),z=s("li"),Ce=t(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),D=s("code"),ie=t("model([input_ids, attention_mask])"),Ue=t(" or "),O=s("code"),Te=t("model([input_ids, attention_mask, token_type_ids])"),re=m(),N=s("li"),he=t(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),A=s("code"),xe=t('model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),oe=m(),Z=s("p"),ke=t(`Note that when creating models and layers with
`),x=s("a"),ue=t("subclassing"),de=t(` then you don\u2019t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`),this.h()},l(T){d=r(T,"P",{});var E=l(d);y=n(E,"TensorFlow models and layers in "),h=r(E,"CODE",{});var Ae=l(h);u=n(Ae,"transformers"),Ae.forEach(o),_=n(E," accept two formats as input:"),E.forEach(o),i=p(T),c=r(T,"UL",{});var K=l(c);J=r(K,"LI",{});var Le=l(J);we=n(Le,"having all inputs as keyword arguments (like PyTorch models), or"),Le.forEach(o),fe=p(K),q=r(K,"LI",{});var Qe=l(q);ae=n(Qe,"having all inputs as a list, tuple or dict in the first positional argument."),Qe.forEach(o),K.forEach(o),ee=p(T),R=r(T,"P",{});var C=l(R);ve=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);me=n(qe,"Functional"),qe.forEach(o),je=n(C,` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),C.forEach(o),te=p(T),U=r(T,"UL",{});var W=l(U);I=r(W,"LI",{});var H=l(I);be=n(H,"a single Tensor with "),X=r(H,"CODE",{});var Ge=l(X);pe=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=p(W),z=r(W,"LI",{});var Y=l(z);Ce=n(Y,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),D=r(Y,"CODE",{});var He=l(D);ie=n(He,"model([input_ids, attention_mask])"),He.forEach(o),Ue=n(Y," or "),O=r(Y,"CODE",{});var Xe=l(O);Te=n(Xe,"model([input_ids, attention_mask, token_type_ids])"),Xe.forEach(o),Y.forEach(o),re=p(W),N=r(W,"LI",{});var ce=l(N);he=n(ce,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),A=r(ce,"CODE",{});var Ye=l(A);xe=n(Ye,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),Ye.forEach(o),ce.forEach(o),W.forEach(o),oe=p(T),Z=r(T,"P",{});var ne=l(Z);ke=n(ne,`Note that when creating models and layers with
`),x=r(ne,"A",{href:!0,rel:!0});var ze=l(x);ue=n(ze,"subclassing"),ze.forEach(o),de=n(ne,` then you don\u2019t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`),ne.forEach(o),this.h()},h(){f(x,"href","https://keras.io/guides/making_new_layers_and_models_via_subclassing/"),f(x,"rel","nofollow")},m(T,E){g(T,d,E),e(d,y),e(d,h),e(h,u),e(d,_),g(T,i,E),g(T,c,E),e(c,J),e(J,we),e(c,fe),e(c,q),e(q,ae),g(T,ee,E),g(T,R,E),e(R,ve),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,me),e(R,je),g(T,te,E),g(T,U,E),e(U,I),e(I,be),e(I,X),e(X,pe),e(I,Ee),e(I,L),e(L,se),e(U,Je),e(U,z),e(z,Ce),e(z,D),e(D,ie),e(z,Ue),e(z,O),e(O,Te),e(U,re),e(U,N),e(N,he),e(N,A),e(A,xe),g(T,oe,E),g(T,Z,E),e(Z,ke),e(Z,x),e(x,ue),e(Z,de)},d(T){T&&o(d),T&&o(i),T&&o(c),T&&o(ee),T&&o(R),T&&o(te),T&&o(U),T&&o(oe),T&&o(Z)}}}function YR(j){let d,y,h,u,_;return{c(){d=s("p"),y=t("Although the recipe for forward pass needs to be defined within this function, one should call the "),h=s("code"),u=t("Module"),_=t(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(i){d=r(i,"P",{});var c=l(d);y=n(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),h=r(c,"CODE",{});var J=l(h);u=n(J,"Module"),J.forEach(o),_=n(c,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),c.forEach(o)},m(i,c){g(i,d,c),e(d,y),e(d,h),e(h,u),e(d,_)},d(i){i&&o(d)}}}function KR(j){let d,y,h,u,_;return u=new Ne({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBURlJvRm9ybWVyRm9yTWFza2VkTE0lMEFpbXBvcnQlMjB0ZW5zb3JmbG93JTIwYXMlMjB0ZiUwQSUwQXRva2VuaXplciUyMCUzRCUyMEF1dG9Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMmp1bm55dSUyRnJvZm9ybWVyX2NoaW5lc2VfYmFzZSUyMiklMEFtb2RlbCUyMCUzRCUyMFRGUm9Gb3JtZXJGb3JNYXNrZWRMTS5mcm9tX3ByZXRyYWluZWQoJTIyanVubnl1JTJGcm9mb3JtZXJfY2hpbmVzZV9iYXNlJTIyKSUwQSUwQWlucHV0cyUyMCUzRCUyMHRva2VuaXplciglMjJUaGUlMjBjYXBpdGFsJTIwb2YlMjBGcmFuY2UlMjBpcyUyMCU1Qk1BU0slNUQuJTIyJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJ0ZiUyMiklMEFsb2dpdHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cykubG9naXRzJTBBJTBBJTIzJTIwcmV0cmlldmUlMjBpbmRleCUyMG9mJTIwJTVCTUFTSyU1RCUwQW1hc2tfdG9rZW5faW5kZXglMjAlM0QlMjB0Zi53aGVyZSgoaW5wdXRzLmlucHV0X2lkcyUyMCUzRCUzRCUyMHRva2VuaXplci5tYXNrX3Rva2VuX2lkKSU1QjAlNUQpJTBBc2VsZWN0ZWRfbG9naXRzJTIwJTNEJTIwdGYuZ2F0aGVyX25kKGxvZ2l0cyU1QjAlNUQlMkMlMjBpbmRpY2VzJTNEbWFza190b2tlbl9pbmRleCklMEElMEFwcmVkaWN0ZWRfdG9rZW5faWQlMjAlM0QlMjB0Zi5tYXRoLmFyZ21heChzZWxlY3RlZF9sb2dpdHMlMkMlMjBheGlzJTNELTEp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, TFRoFormerForMaskedLM
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> tensorflow <span class="hljs-keyword">as</span> tf

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;junnyu/roformer_chinese_base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFRoFormerForMaskedLM.from_pretrained(<span class="hljs-string">&quot;junnyu/roformer_chinese_base&quot;</span>)

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

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

<span class="hljs-meta">&gt;&gt;&gt; </span>predicted_token_id = tf.math.argmax(selected_logits, axis=-<span class="hljs-number">1</span>)`}}),{c(){d=s("p"),y=t("Example:"),h=m(),k(u.$$.fragment)},l(i){d=r(i,"P",{});var c=l(d);y=n(c,"Example:"),c.forEach(o),h=p(i),w(u.$$.fragment,i)},m(i,c){g(i,d,c),e(d,y),g(i,h,c),v(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(){k(d.$$.fragment)},l(h){w(d.$$.fragment,h)},m(h,u){v(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,we,fe,q,ae,ee,R,ve,P,Fe,ge,V,Me,le,Q,$e,_e,B,Re,ye,G,me,je,te,U,I,be,X,pe,Ee,L,se,Je,z,Ce,D,ie,Ue,O,Te,re,N,he,A,xe,oe,Z,ke,x,ue,de;return{c(){d=s("p"),y=t("TensorFlow models and layers in "),h=s("code"),u=t("transformers"),_=t(" accept two formats as input:"),i=m(),c=s("ul"),J=s("li"),we=t("having all inputs as keyword arguments (like PyTorch models), or"),fe=m(),q=s("li"),ae=t("having all inputs as a list, tuple or dict in the first positional argument."),ee=m(),R=s("p"),ve=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"),me=t("Functional"),je=t(` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),te=m(),U=s("ul"),I=s("li"),be=t("a single Tensor with "),X=s("code"),pe=t("input_ids"),Ee=t(" only and nothing else: "),L=s("code"),se=t("model(input_ids)"),Je=m(),z=s("li"),Ce=t(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),D=s("code"),ie=t("model([input_ids, attention_mask])"),Ue=t(" or "),O=s("code"),Te=t("model([input_ids, attention_mask, token_type_ids])"),re=m(),N=s("li"),he=t(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),A=s("code"),xe=t('model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),oe=m(),Z=s("p"),ke=t(`Note that when creating models and layers with
`),x=s("a"),ue=t("subclassing"),de=t(` then you don\u2019t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`),this.h()},l(T){d=r(T,"P",{});var E=l(d);y=n(E,"TensorFlow models and layers in "),h=r(E,"CODE",{});var Ae=l(h);u=n(Ae,"transformers"),Ae.forEach(o),_=n(E," accept two formats as input:"),E.forEach(o),i=p(T),c=r(T,"UL",{});var K=l(c);J=r(K,"LI",{});var Le=l(J);we=n(Le,"having all inputs as keyword arguments (like PyTorch models), or"),Le.forEach(o),fe=p(K),q=r(K,"LI",{});var Qe=l(q);ae=n(Qe,"having all inputs as a list, tuple or dict in the first positional argument."),Qe.forEach(o),K.forEach(o),ee=p(T),R=r(T,"P",{});var C=l(R);ve=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);me=n(qe,"Functional"),qe.forEach(o),je=n(C,` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),C.forEach(o),te=p(T),U=r(T,"UL",{});var W=l(U);I=r(W,"LI",{});var H=l(I);be=n(H,"a single Tensor with "),X=r(H,"CODE",{});var Ge=l(X);pe=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=p(W),z=r(W,"LI",{});var Y=l(z);Ce=n(Y,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),D=r(Y,"CODE",{});var He=l(D);ie=n(He,"model([input_ids, attention_mask])"),He.forEach(o),Ue=n(Y," or "),O=r(Y,"CODE",{});var Xe=l(O);Te=n(Xe,"model([input_ids, attention_mask, token_type_ids])"),Xe.forEach(o),Y.forEach(o),re=p(W),N=r(W,"LI",{});var ce=l(N);he=n(ce,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),A=r(ce,"CODE",{});var Ye=l(A);xe=n(Ye,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),Ye.forEach(o),ce.forEach(o),W.forEach(o),oe=p(T),Z=r(T,"P",{});var ne=l(Z);ke=n(ne,`Note that when creating models and layers with
`),x=r(ne,"A",{href:!0,rel:!0});var ze=l(x);ue=n(ze,"subclassing"),ze.forEach(o),de=n(ne,` then you don\u2019t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`),ne.forEach(o),this.h()},h(){f(x,"href","https://keras.io/guides/making_new_layers_and_models_via_subclassing/"),f(x,"rel","nofollow")},m(T,E){g(T,d,E),e(d,y),e(d,h),e(h,u),e(d,_),g(T,i,E),g(T,c,E),e(c,J),e(J,we),e(c,fe),e(c,q),e(q,ae),g(T,ee,E),g(T,R,E),e(R,ve),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,me),e(R,je),g(T,te,E),g(T,U,E),e(U,I),e(I,be),e(I,X),e(X,pe),e(I,Ee),e(I,L),e(L,se),e(U,Je),e(U,z),e(z,Ce),e(z,D),e(D,ie),e(z,Ue),e(z,O),e(O,Te),e(U,re),e(U,N),e(N,he),e(N,A),e(A,xe),g(T,oe,E),g(T,Z,E),e(Z,ke),e(Z,x),e(x,ue),e(Z,de)},d(T){T&&o(d),T&&o(i),T&&o(c),T&&o(ee),T&&o(R),T&&o(te),T&&o(U),T&&o(oe),T&&o(Z)}}}function tj(j){let d,y,h,u,_;return u=new Ne({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBURlJvRm9ybWVyRm9yQ2F1c2FsTE0lMEFpbXBvcnQlMjB0ZW5zb3JmbG93JTIwYXMlMjB0ZiUwQSUwQXRva2VuaXplciUyMCUzRCUyMEF1dG9Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMmp1bm55dSUyRnJvZm9ybWVyX2NoaW5lc2VfYmFzZSUyMiklMEFtb2RlbCUyMCUzRCUyMFRGUm9Gb3JtZXJGb3JDYXVzYWxMTS5mcm9tX3ByZXRyYWluZWQoJTIyanVubnl1JTJGcm9mb3JtZXJfY2hpbmVzZV9iYXNlJTIyKSUwQSUwQWlucHV0cyUyMCUzRCUyMHRva2VuaXplciglMjJIZWxsbyUyQyUyMG15JTIwZG9nJTIwaXMlMjBjdXRlJTIyJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJ0ZiUyMiklMEFvdXRwdXRzJTIwJTNEJTIwbW9kZWwoaW5wdXRzKSUwQWxvZ2l0cyUyMCUzRCUyMG91dHB1dHMubG9naXRz",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, TFRoFormerForCausalLM
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> tensorflow <span class="hljs-keyword">as</span> tf

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;junnyu/roformer_chinese_base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFRoFormerForCausalLM.from_pretrained(<span class="hljs-string">&quot;junnyu/roformer_chinese_base&quot;</span>)

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

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;junnyu/roformer_chinese_base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFRoFormerForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;junnyu/roformer_chinese_base&quot;</span>)

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

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

<span class="hljs-meta">&gt;&gt;&gt; </span>predicted_class_id = <span class="hljs-built_in">int</span>(tf.math.argmax(logits, axis=-<span class="hljs-number">1</span>)[<span class="hljs-number">0</span>])`}}),{c(){d=s("p"),y=t("Example:"),h=m(),k(u.$$.fragment)},l(i){d=r(i,"P",{});var c=l(d);y=n(c,"Example:"),c.forEach(o),h=p(i),w(u.$$.fragment,i)},m(i,c){g(i,d,c),e(d,y),g(i,h,c),v(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(){k(d.$$.fragment)},l(h){w(d.$$.fragment,h)},m(h,u){v(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,we,fe,q,ae,ee,R,ve,P,Fe,ge,V,Me,le,Q,$e,_e,B,Re,ye,G,me,je,te,U,I,be,X,pe,Ee,L,se,Je,z,Ce,D,ie,Ue,O,Te,re,N,he,A,xe,oe,Z,ke,x,ue,de;return{c(){d=s("p"),y=t("TensorFlow models and layers in "),h=s("code"),u=t("transformers"),_=t(" accept two formats as input:"),i=m(),c=s("ul"),J=s("li"),we=t("having all inputs as keyword arguments (like PyTorch models), or"),fe=m(),q=s("li"),ae=t("having all inputs as a list, tuple or dict in the first positional argument."),ee=m(),R=s("p"),ve=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"),me=t("Functional"),je=t(` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),te=m(),U=s("ul"),I=s("li"),be=t("a single Tensor with "),X=s("code"),pe=t("input_ids"),Ee=t(" only and nothing else: "),L=s("code"),se=t("model(input_ids)"),Je=m(),z=s("li"),Ce=t(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),D=s("code"),ie=t("model([input_ids, attention_mask])"),Ue=t(" or "),O=s("code"),Te=t("model([input_ids, attention_mask, token_type_ids])"),re=m(),N=s("li"),he=t(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),A=s("code"),xe=t('model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),oe=m(),Z=s("p"),ke=t(`Note that when creating models and layers with
`),x=s("a"),ue=t("subclassing"),de=t(` then you don\u2019t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`),this.h()},l(T){d=r(T,"P",{});var E=l(d);y=n(E,"TensorFlow models and layers in "),h=r(E,"CODE",{});var Ae=l(h);u=n(Ae,"transformers"),Ae.forEach(o),_=n(E," accept two formats as input:"),E.forEach(o),i=p(T),c=r(T,"UL",{});var K=l(c);J=r(K,"LI",{});var Le=l(J);we=n(Le,"having all inputs as keyword arguments (like PyTorch models), or"),Le.forEach(o),fe=p(K),q=r(K,"LI",{});var Qe=l(q);ae=n(Qe,"having all inputs as a list, tuple or dict in the first positional argument."),Qe.forEach(o),K.forEach(o),ee=p(T),R=r(T,"P",{});var C=l(R);ve=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);me=n(qe,"Functional"),qe.forEach(o),je=n(C,` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),C.forEach(o),te=p(T),U=r(T,"UL",{});var W=l(U);I=r(W,"LI",{});var H=l(I);be=n(H,"a single Tensor with "),X=r(H,"CODE",{});var Ge=l(X);pe=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=p(W),z=r(W,"LI",{});var Y=l(z);Ce=n(Y,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),D=r(Y,"CODE",{});var He=l(D);ie=n(He,"model([input_ids, attention_mask])"),He.forEach(o),Ue=n(Y," or "),O=r(Y,"CODE",{});var Xe=l(O);Te=n(Xe,"model([input_ids, attention_mask, token_type_ids])"),Xe.forEach(o),Y.forEach(o),re=p(W),N=r(W,"LI",{});var ce=l(N);he=n(ce,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),A=r(ce,"CODE",{});var Ye=l(A);xe=n(Ye,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),Ye.forEach(o),ce.forEach(o),W.forEach(o),oe=p(T),Z=r(T,"P",{});var ne=l(Z);ke=n(ne,`Note that when creating models and layers with
`),x=r(ne,"A",{href:!0,rel:!0});var ze=l(x);ue=n(ze,"subclassing"),ze.forEach(o),de=n(ne,` then you don\u2019t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`),ne.forEach(o),this.h()},h(){f(x,"href","https://keras.io/guides/making_new_layers_and_models_via_subclassing/"),f(x,"rel","nofollow")},m(T,E){g(T,d,E),e(d,y),e(d,h),e(h,u),e(d,_),g(T,i,E),g(T,c,E),e(c,J),e(J,we),e(c,fe),e(c,q),e(q,ae),g(T,ee,E),g(T,R,E),e(R,ve),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,me),e(R,je),g(T,te,E),g(T,U,E),e(U,I),e(I,be),e(I,X),e(X,pe),e(I,Ee),e(I,L),e(L,se),e(U,Je),e(U,z),e(z,Ce),e(z,D),e(D,ie),e(z,Ue),e(z,O),e(O,Te),e(U,re),e(U,N),e(N,he),e(N,A),e(A,xe),g(T,oe,E),g(T,Z,E),e(Z,ke),e(Z,x),e(x,ue),e(Z,de)},d(T){T&&o(d),T&&o(i),T&&o(c),T&&o(ee),T&&o(R),T&&o(te),T&&o(U),T&&o(oe),T&&o(Z)}}}function ij(j){let d,y,h,u,_;return{c(){d=s("p"),y=t("Although the recipe for forward pass needs to be defined within this function, one should call the "),h=s("code"),u=t("Module"),_=t(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(i){d=r(i,"P",{});var c=l(d);y=n(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),h=r(c,"CODE",{});var J=l(h);u=n(J,"Module"),J.forEach(o),_=n(c,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),c.forEach(o)},m(i,c){g(i,d,c),e(d,y),e(d,h),e(h,u),e(d,_)},d(i){i&&o(d)}}}function dj(j){let d,y,h,u,_;return u=new Ne({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBURlJvRm9ybWVyRm9yTXVsdGlwbGVDaG9pY2UlMEFpbXBvcnQlMjB0ZW5zb3JmbG93JTIwYXMlMjB0ZiUwQSUwQXRva2VuaXplciUyMCUzRCUyMEF1dG9Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMmp1bm55dSUyRnJvZm9ybWVyX2NoaW5lc2VfYmFzZSUyMiklMEFtb2RlbCUyMCUzRCUyMFRGUm9Gb3JtZXJGb3JNdWx0aXBsZUNob2ljZS5mcm9tX3ByZXRyYWluZWQoJTIyanVubnl1JTJGcm9mb3JtZXJfY2hpbmVzZV9iYXNlJTIyKSUwQSUwQXByb21wdCUyMCUzRCUyMCUyMkluJTIwSXRhbHklMkMlMjBwaXp6YSUyMHNlcnZlZCUyMGluJTIwZm9ybWFsJTIwc2V0dGluZ3MlMkMlMjBzdWNoJTIwYXMlMjBhdCUyMGElMjByZXN0YXVyYW50JTJDJTIwaXMlMjBwcmVzZW50ZWQlMjB1bnNsaWNlZC4lMjIlMEFjaG9pY2UwJTIwJTNEJTIwJTIySXQlMjBpcyUyMGVhdGVuJTIwd2l0aCUyMGElMjBmb3JrJTIwYW5kJTIwYSUyMGtuaWZlLiUyMiUwQWNob2ljZTElMjAlM0QlMjAlMjJJdCUyMGlzJTIwZWF0ZW4lMjB3aGlsZSUyMGhlbGQlMjBpbiUyMHRoZSUyMGhhbmQuJTIyJTBBJTBBZW5jb2RpbmclMjAlM0QlMjB0b2tlbml6ZXIoJTVCcHJvbXB0JTJDJTIwcHJvbXB0JTVEJTJDJTIwJTVCY2hvaWNlMCUyQyUyMGNob2ljZTElNUQlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnRmJTIyJTJDJTIwcGFkZGluZyUzRFRydWUpJTBBaW5wdXRzJTIwJTNEJTIwJTdCayUzQSUyMHRmLmV4cGFuZF9kaW1zKHYlMkMlMjAwKSUyMGZvciUyMGslMkMlMjB2JTIwaW4lMjBlbmNvZGluZy5pdGVtcygpJTdEJTBBb3V0cHV0cyUyMCUzRCUyMG1vZGVsKGlucHV0cyklMjAlMjAlMjMlMjBiYXRjaCUyMHNpemUlMjBpcyUyMDElMEElMEElMjMlMjB0aGUlMjBsaW5lYXIlMjBjbGFzc2lmaWVyJTIwc3RpbGwlMjBuZWVkcyUyMHRvJTIwYmUlMjB0cmFpbmVkJTBBbG9naXRzJTIwJTNEJTIwb3V0cHV0cy5sb2dpdHM=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, TFRoFormerForMultipleChoice
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> tensorflow <span class="hljs-keyword">as</span> tf

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;junnyu/roformer_chinese_base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFRoFormerForMultipleChoice.from_pretrained(<span class="hljs-string">&quot;junnyu/roformer_chinese_base&quot;</span>)

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

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

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

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;junnyu/roformer_chinese_base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFRoFormerForTokenClassification.from_pretrained(<span class="hljs-string">&quot;junnyu/roformer_chinese_base&quot;</span>)

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

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

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Note that tokens are classified rather then input words which means that</span>
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># there might be more predicted token classes than words.</span>
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Multiple token classes might account for the same word</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>predicted_tokens_classes = [model.config.id2label[t] <span class="hljs-keyword">for</span> t <span class="hljs-keyword">in</span> predicted_token_class_ids[<span class="hljs-number">0</span>].numpy().tolist()]`}}),{c(){d=s("p"),y=t("Example:"),h=m(),k(u.$$.fragment)},l(i){d=r(i,"P",{});var c=l(d);y=n(c,"Example:"),c.forEach(o),h=p(i),w(u.$$.fragment,i)},m(i,c){g(i,d,c),e(d,y),g(i,h,c),v(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(){k(d.$$.fragment)},l(h){w(d.$$.fragment,h)},m(h,u){v(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,we,fe,q,ae,ee,R,ve,P,Fe,ge,V,Me,le,Q,$e,_e,B,Re,ye,G,me,je,te,U,I,be,X,pe,Ee,L,se,Je,z,Ce,D,ie,Ue,O,Te,re,N,he,A,xe,oe,Z,ke,x,ue,de;return{c(){d=s("p"),y=t("TensorFlow models and layers in "),h=s("code"),u=t("transformers"),_=t(" accept two formats as input:"),i=m(),c=s("ul"),J=s("li"),we=t("having all inputs as keyword arguments (like PyTorch models), or"),fe=m(),q=s("li"),ae=t("having all inputs as a list, tuple or dict in the first positional argument."),ee=m(),R=s("p"),ve=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"),me=t("Functional"),je=t(` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),te=m(),U=s("ul"),I=s("li"),be=t("a single Tensor with "),X=s("code"),pe=t("input_ids"),Ee=t(" only and nothing else: "),L=s("code"),se=t("model(input_ids)"),Je=m(),z=s("li"),Ce=t(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),D=s("code"),ie=t("model([input_ids, attention_mask])"),Ue=t(" or "),O=s("code"),Te=t("model([input_ids, attention_mask, token_type_ids])"),re=m(),N=s("li"),he=t(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),A=s("code"),xe=t('model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),oe=m(),Z=s("p"),ke=t(`Note that when creating models and layers with
`),x=s("a"),ue=t("subclassing"),de=t(` then you don\u2019t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`),this.h()},l(T){d=r(T,"P",{});var E=l(d);y=n(E,"TensorFlow models and layers in "),h=r(E,"CODE",{});var Ae=l(h);u=n(Ae,"transformers"),Ae.forEach(o),_=n(E," accept two formats as input:"),E.forEach(o),i=p(T),c=r(T,"UL",{});var K=l(c);J=r(K,"LI",{});var Le=l(J);we=n(Le,"having all inputs as keyword arguments (like PyTorch models), or"),Le.forEach(o),fe=p(K),q=r(K,"LI",{});var Qe=l(q);ae=n(Qe,"having all inputs as a list, tuple or dict in the first positional argument."),Qe.forEach(o),K.forEach(o),ee=p(T),R=r(T,"P",{});var C=l(R);ve=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);me=n(qe,"Functional"),qe.forEach(o),je=n(C,` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),C.forEach(o),te=p(T),U=r(T,"UL",{});var W=l(U);I=r(W,"LI",{});var H=l(I);be=n(H,"a single Tensor with "),X=r(H,"CODE",{});var Ge=l(X);pe=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=p(W),z=r(W,"LI",{});var Y=l(z);Ce=n(Y,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),D=r(Y,"CODE",{});var He=l(D);ie=n(He,"model([input_ids, attention_mask])"),He.forEach(o),Ue=n(Y," or "),O=r(Y,"CODE",{});var Xe=l(O);Te=n(Xe,"model([input_ids, attention_mask, token_type_ids])"),Xe.forEach(o),Y.forEach(o),re=p(W),N=r(W,"LI",{});var ce=l(N);he=n(ce,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),A=r(ce,"CODE",{});var Ye=l(A);xe=n(Ye,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),Ye.forEach(o),ce.forEach(o),W.forEach(o),oe=p(T),Z=r(T,"P",{});var ne=l(Z);ke=n(ne,`Note that when creating models and layers with
`),x=r(ne,"A",{href:!0,rel:!0});var ze=l(x);ue=n(ze,"subclassing"),ze.forEach(o),de=n(ne,` then you don\u2019t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`),ne.forEach(o),this.h()},h(){f(x,"href","https://keras.io/guides/making_new_layers_and_models_via_subclassing/"),f(x,"rel","nofollow")},m(T,E){g(T,d,E),e(d,y),e(d,h),e(h,u),e(d,_),g(T,i,E),g(T,c,E),e(c,J),e(J,we),e(c,fe),e(c,q),e(q,ae),g(T,ee,E),g(T,R,E),e(R,ve),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,me),e(R,je),g(T,te,E),g(T,U,E),e(U,I),e(I,be),e(I,X),e(X,pe),e(I,Ee),e(I,L),e(L,se),e(U,Je),e(U,z),e(z,Ce),e(z,D),e(D,ie),e(z,Ue),e(z,O),e(O,Te),e(U,re),e(U,N),e(N,he),e(N,A),e(A,xe),g(T,oe,E),g(T,Z,E),e(Z,ke),e(Z,x),e(x,ue),e(Z,de)},d(T){T&&o(d),T&&o(i),T&&o(c),T&&o(ee),T&&o(R),T&&o(te),T&&o(U),T&&o(oe),T&&o(Z)}}}function fj(j){let d,y,h,u,_;return{c(){d=s("p"),y=t("Although the recipe for forward pass needs to be defined within this function, one should call the "),h=s("code"),u=t("Module"),_=t(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(i){d=r(i,"P",{});var c=l(d);y=n(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),h=r(c,"CODE",{});var J=l(h);u=n(J,"Module"),J.forEach(o),_=n(c,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),c.forEach(o)},m(i,c){g(i,d,c),e(d,y),e(d,h),e(h,u),e(d,_)},d(i){i&&o(d)}}}function gj(j){let d,y,h,u,_;return u=new Ne({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBURlJvRm9ybWVyRm9yUXVlc3Rpb25BbnN3ZXJpbmclMEFpbXBvcnQlMjB0ZW5zb3JmbG93JTIwYXMlMjB0ZiUwQSUwQXRva2VuaXplciUyMCUzRCUyMEF1dG9Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMmp1bm55dSUyRnJvZm9ybWVyX2NoaW5lc2VfYmFzZSUyMiklMEFtb2RlbCUyMCUzRCUyMFRGUm9Gb3JtZXJGb3JRdWVzdGlvbkFuc3dlcmluZy5mcm9tX3ByZXRyYWluZWQoJTIyanVubnl1JTJGcm9mb3JtZXJfY2hpbmVzZV9iYXNlJTIyKSUwQSUwQXF1ZXN0aW9uJTJDJTIwdGV4dCUyMCUzRCUyMCUyMldobyUyMHdhcyUyMEppbSUyMEhlbnNvbiUzRiUyMiUyQyUyMCUyMkppbSUyMEhlbnNvbiUyMHdhcyUyMGElMjBuaWNlJTIwcHVwcGV0JTIyJTBBJTBBaW5wdXRzJTIwJTNEJTIwdG9rZW5pemVyKHF1ZXN0aW9uJTJDJTIwdGV4dCUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIydGYlMjIpJTBBb3V0cHV0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzKSUwQSUwQWFuc3dlcl9zdGFydF9pbmRleCUyMCUzRCUyMGludCh0Zi5tYXRoLmFyZ21heChvdXRwdXRzLnN0YXJ0X2xvZ2l0cyUyQyUyMGF4aXMlM0QtMSklNUIwJTVEKSUwQWFuc3dlcl9lbmRfaW5kZXglMjAlM0QlMjBpbnQodGYubWF0aC5hcmdtYXgob3V0cHV0cy5lbmRfbG9naXRzJTJDJTIwYXhpcyUzRC0xKSU1QjAlNUQpJTBBJTBBcHJlZGljdF9hbnN3ZXJfdG9rZW5zJTIwJTNEJTIwaW5wdXRzLmlucHV0X2lkcyU1QjAlMkMlMjBhbnN3ZXJfc3RhcnRfaW5kZXglMjAlM0ElMjBhbnN3ZXJfZW5kX2luZGV4JTIwJTJCJTIwMSU1RA==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, TFRoFormerForQuestionAnswering
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> tensorflow <span class="hljs-keyword">as</span> tf

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;junnyu/roformer_chinese_base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFRoFormerForQuestionAnswering.from_pretrained(<span class="hljs-string">&quot;junnyu/roformer_chinese_base&quot;</span>)

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

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

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

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

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;junnyu/roformer_chinese_base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = FlaxRoFormerModel.from_pretrained(<span class="hljs-string">&quot;junnyu/roformer_chinese_base&quot;</span>)

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

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

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;junnyu/roformer_chinese_base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = FlaxRoFormerForMaskedLM.from_pretrained(<span class="hljs-string">&quot;junnyu/roformer_chinese_base&quot;</span>)

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

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

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;junnyu/roformer_chinese_base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = FlaxRoFormerForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;junnyu/roformer_chinese_base&quot;</span>)

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

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

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;junnyu/roformer_chinese_base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = FlaxRoFormerForMultipleChoice.from_pretrained(<span class="hljs-string">&quot;junnyu/roformer_chinese_base&quot;</span>)

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

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

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

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;junnyu/roformer_chinese_base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = FlaxRoFormerForTokenClassification.from_pretrained(<span class="hljs-string">&quot;junnyu/roformer_chinese_base&quot;</span>)

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

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

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;junnyu/roformer_chinese_base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = FlaxRoFormerForQuestionAnswering.from_pretrained(<span class="hljs-string">&quot;junnyu/roformer_chinese_base&quot;</span>)

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

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