import{S as Tx,i as $x,s as xx,e as s,k as p,w as F,t,M as Ex,c as r,d as o,m,a as i,x as b,h as n,b as f,G as e,g,y as w,q as T,o as $,B as x,v as Mx,L as Le}from"../../chunks/vendor-hf-doc-builder.js";import{T as Be}from"../../chunks/Tip-hf-doc-builder.js";import{D as B}from"../../chunks/Docstring-hf-doc-builder.js";import{C as Oe}from"../../chunks/CodeBlock-hf-doc-builder.js";import{I as Qe}from"../../chunks/IconCopyLink-hf-doc-builder.js";import{E as Pe}from"../../chunks/ExampleCodeBlock-hf-doc-builder.js";function Rx(M){let d,k,h,u,_;return u=new Oe({props:{code:`from transformers import RoFormerModel, RoFormerConfig

# Initializing a RoFormer junnyu/roformer_chinese_base style configuration
configuration = RoFormerConfig()

# Initializing a model from the junnyu/roformer_chinese_base style configuration
model = RoFormerModel(configuration)

# Accessing the model configuration
configuration = model.config`,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"),k=t("Example:"),h=p(),F(u.$$.fragment)},l(l){d=r(l,"P",{});var c=i(d);k=n(c,"Example:"),c.forEach(o),h=m(l),b(u.$$.fragment,l)},m(l,c){g(l,d,c),e(d,k),g(l,h,c),w(u,l,c),_=!0},p:Le,i(l){_||(T(u.$$.fragment,l),_=!0)},o(l){$(u.$$.fragment,l),_=!1},d(l){l&&o(d),l&&o(h),x(u,l)}}}function zx(M){let d,k,h,u,_;return u=new Oe({props:{code:`from transformers import RoFormerTokenizer

tokenizer = RoFormerTokenizer.from_pretrained("junnyu/roformer_chinese_base")
tokenizer.tokenize("\u4ECA\u5929\u5929\u6C14\u975E\u5E38\u597D\u3002")`,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-comment"># [&#x27;\u4ECA&#x27;, &#x27;\u5929&#x27;, &#x27;\u5929&#x27;, &#x27;\u6C14&#x27;, &#x27;\u975E\u5E38&#x27;, &#x27;\u597D&#x27;, &#x27;\u3002&#x27;]</span>`}}),{c(){d=s("p"),k=t("Example:"),h=p(),F(u.$$.fragment)},l(l){d=r(l,"P",{});var c=i(d);k=n(c,"Example:"),c.forEach(o),h=m(l),b(u.$$.fragment,l)},m(l,c){g(l,d,c),e(d,k),g(l,h,c),w(u,l,c),_=!0},p:Le,i(l){_||(T(u.$$.fragment,l),_=!0)},o(l){$(u.$$.fragment,l),_=!1},d(l){l&&o(d),l&&o(h),x(u,l)}}}function jx(M){let d,k,h,u,_;return u=new Oe({props:{code:`0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1
| first sequence    | second sequence |`,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"),k=t("sequence pair mask has the following format:"),h=p(),F(u.$$.fragment)},l(l){d=r(l,"P",{});var c=i(d);k=n(c,"sequence pair mask has the following format:"),c.forEach(o),h=m(l),b(u.$$.fragment,l)},m(l,c){g(l,d,c),e(d,k),g(l,h,c),w(u,l,c),_=!0},p:Le,i(l){_||(T(u.$$.fragment,l),_=!0)},o(l){$(u.$$.fragment,l),_=!1},d(l){l&&o(d),l&&o(h),x(u,l)}}}function Cx(M){let d,k,h,u,_;return u=new Oe({props:{code:`from transformers import RoFormerTokenizerFast

tokenizer = RoFormerTokenizerFast.from_pretrained("junnyu/roformer_chinese_base")
tokenizer.tokenize("\u4ECA\u5929\u5929\u6C14\u975E\u5E38\u597D\u3002")`,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-comment"># [&#x27;\u4ECA&#x27;, &#x27;\u5929&#x27;, &#x27;\u5929&#x27;, &#x27;\u6C14&#x27;, &#x27;\u975E\u5E38&#x27;, &#x27;\u597D&#x27;, &#x27;\u3002&#x27;]</span>`}}),{c(){d=s("p"),k=t("Example:"),h=p(),F(u.$$.fragment)},l(l){d=r(l,"P",{});var c=i(d);k=n(c,"Example:"),c.forEach(o),h=m(l),b(u.$$.fragment,l)},m(l,c){g(l,d,c),e(d,k),g(l,h,c),w(u,l,c),_=!0},p:Le,i(l){_||(T(u.$$.fragment,l),_=!0)},o(l){$(u.$$.fragment,l),_=!1},d(l){l&&o(d),l&&o(h),x(u,l)}}}function qx(M){let d,k,h,u,_;return{c(){d=s("p"),k=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(l){d=r(l,"P",{});var c=i(d);k=n(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),h=r(c,"CODE",{});var z=i(h);u=n(z,"Module"),z.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(l,c){g(l,d,c),e(d,k),e(d,h),e(h,u),e(d,_)},d(l){l&&o(d)}}}function Ax(M){let d,k,h,u,_;return u=new Oe({props:{code:`from transformers import AutoTokenizer, RoFormerModel
import torch

tokenizer = AutoTokenizer.from_pretrained("junnyu/roformer_chinese_base")
model = RoFormerModel.from_pretrained("junnyu/roformer_chinese_base")

inputs = tokenizer("Hello, my dog is cute", return_tensors="pt")
outputs = model(**inputs)

last_hidden_states = outputs.last_hidden_state`,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"),k=t("Example:"),h=p(),F(u.$$.fragment)},l(l){d=r(l,"P",{});var c=i(d);k=n(c,"Example:"),c.forEach(o),h=m(l),b(u.$$.fragment,l)},m(l,c){g(l,d,c),e(d,k),g(l,h,c),w(u,l,c),_=!0},p:Le,i(l){_||(T(u.$$.fragment,l),_=!0)},o(l){$(u.$$.fragment,l),_=!1},d(l){l&&o(d),l&&o(h),x(u,l)}}}function Px(M){let d,k,h,u,_;return{c(){d=s("p"),k=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(l){d=r(l,"P",{});var c=i(d);k=n(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),h=r(c,"CODE",{});var z=i(h);u=n(z,"Module"),z.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(l,c){g(l,d,c),e(d,k),e(d,h),e(h,u),e(d,_)},d(l){l&&o(d)}}}function Lx(M){let d,k,h,u,_;return u=new Oe({props:{code:`from transformers import AutoTokenizer, RoFormerForCausalLM, RoFormerConfig
import torch

tokenizer = AutoTokenizer.from_pretrained("junnyu/roformer_chinese_base")
config = RoFormerConfig.from_pretrained("junnyu/roformer_chinese_base")
config.is_decoder = True
model = RoFormerForCausalLM.from_pretrained("junnyu/roformer_chinese_base", config=config)

inputs = tokenizer("\u4ECA\u5929\u5929\u6C14\u975E\u5E38\u597D\u3002", return_tensors="pt")
outputs = model(**inputs)

prediction_logits = outputs.logits`,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"),k=t("Example:"),h=p(),F(u.$$.fragment)},l(l){d=r(l,"P",{});var c=i(d);k=n(c,"Example:"),c.forEach(o),h=m(l),b(u.$$.fragment,l)},m(l,c){g(l,d,c),e(d,k),g(l,h,c),w(u,l,c),_=!0},p:Le,i(l){_||(T(u.$$.fragment,l),_=!0)},o(l){$(u.$$.fragment,l),_=!1},d(l){l&&o(d),l&&o(h),x(u,l)}}}function Ox(M){let d,k,h,u,_;return{c(){d=s("p"),k=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(l){d=r(l,"P",{});var c=i(d);k=n(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),h=r(c,"CODE",{});var z=i(h);u=n(z,"Module"),z.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(l,c){g(l,d,c),e(d,k),e(d,h),e(h,u),e(d,_)},d(l){l&&o(d)}}}function Dx(M){let d,k,h,u,_;return u=new Oe({props:{code:`from transformers import AutoTokenizer, RoFormerForMaskedLM
import torch

tokenizer = AutoTokenizer.from_pretrained("junnyu/roformer_chinese_base")
model = RoFormerForMaskedLM.from_pretrained("junnyu/roformer_chinese_base")

inputs = tokenizer("The capital of France is [MASK].", return_tensors="pt")

with torch.no_grad():
    logits = model(**inputs).logits

# retrieve index of [MASK]
mask_token_index = (inputs.input_ids == tokenizer.mask_token_id)[0].nonzero(as_tuple=True)[0]

predicted_token_id = logits[0, mask_token_index].argmax(axis=-1)

labels = tokenizer("The capital of France is Paris.", return_tensors="pt")["input_ids"]
# mask labels of non-[MASK] tokens
labels = torch.where(inputs.input_ids == tokenizer.mask_token_id, labels, -100)

outputs = model(**inputs, labels=labels)`,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"),k=t("Example:"),h=p(),F(u.$$.fragment)},l(l){d=r(l,"P",{});var c=i(d);k=n(c,"Example:"),c.forEach(o),h=m(l),b(u.$$.fragment,l)},m(l,c){g(l,d,c),e(d,k),g(l,h,c),w(u,l,c),_=!0},p:Le,i(l){_||(T(u.$$.fragment,l),_=!0)},o(l){$(u.$$.fragment,l),_=!1},d(l){l&&o(d),l&&o(h),x(u,l)}}}function Ix(M){let d,k,h,u,_;return{c(){d=s("p"),k=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(l){d=r(l,"P",{});var c=i(d);k=n(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),h=r(c,"CODE",{});var z=i(h);u=n(z,"Module"),z.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(l,c){g(l,d,c),e(d,k),e(d,h),e(h,u),e(d,_)},d(l){l&&o(d)}}}function Nx(M){let d,k,h,u,_;return u=new Oe({props:{code:`import torch
from transformers import AutoTokenizer, RoFormerForSequenceClassification

tokenizer = AutoTokenizer.from_pretrained("junnyu/roformer_chinese_base")
model = RoFormerForSequenceClassification.from_pretrained("junnyu/roformer_chinese_base")

inputs = tokenizer("Hello, my dog is cute", return_tensors="pt")

with torch.no_grad():
    logits = model(**inputs).logits

predicted_class_id = logits.argmax().item()

# To train a model on \`num_labels\` classes, you can pass \`num_labels=num_labels\` to \`.from_pretrained(...)\`
num_labels = len(model.config.id2label)
model = RoFormerForSequenceClassification.from_pretrained("junnyu/roformer_chinese_base", num_labels=num_labels)

labels = torch.tensor([1])
loss = model(**inputs, labels=labels).loss`,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"),k=t("Example of single-label classification:"),h=p(),F(u.$$.fragment)},l(l){d=r(l,"P",{});var c=i(d);k=n(c,"Example of single-label classification:"),c.forEach(o),h=m(l),b(u.$$.fragment,l)},m(l,c){g(l,d,c),e(d,k),g(l,h,c),w(u,l,c),_=!0},p:Le,i(l){_||(T(u.$$.fragment,l),_=!0)},o(l){$(u.$$.fragment,l),_=!1},d(l){l&&o(d),l&&o(h),x(u,l)}}}function Sx(M){let d,k,h,u,_;return u=new Oe({props:{code:`import torch
from transformers import AutoTokenizer, RoFormerForSequenceClassification

tokenizer = AutoTokenizer.from_pretrained("junnyu/roformer_chinese_base")
model = RoFormerForSequenceClassification.from_pretrained("junnyu/roformer_chinese_base", problem_type="multi_label_classification")

inputs = tokenizer("Hello, my dog is cute", return_tensors="pt")

with torch.no_grad():
    logits = model(**inputs).logits

predicted_class_ids = torch.arange(0, logits.shape[-1])[torch.sigmoid(logits).squeeze(dim=0) > 0.5]

# To train a model on \`num_labels\` classes, you can pass \`num_labels=num_labels\` to \`.from_pretrained(...)\`
num_labels = len(model.config.id2label)
model = RoFormerForSequenceClassification.from_pretrained(
    "junnyu/roformer_chinese_base", num_labels=num_labels, problem_type="multi_label_classification"
)

labels = torch.sum(
    torch.nn.functional.one_hot(predicted_class_ids[None, :].clone(), num_classes=num_labels), dim=1
).to(torch.float)
loss = model(**inputs, labels=labels).loss`,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"),k=t("Example of multi-label classification:"),h=p(),F(u.$$.fragment)},l(l){d=r(l,"P",{});var c=i(d);k=n(c,"Example of multi-label classification:"),c.forEach(o),h=m(l),b(u.$$.fragment,l)},m(l,c){g(l,d,c),e(d,k),g(l,h,c),w(u,l,c),_=!0},p:Le,i(l){_||(T(u.$$.fragment,l),_=!0)},o(l){$(u.$$.fragment,l),_=!1},d(l){l&&o(d),l&&o(h),x(u,l)}}}function Wx(M){let d,k,h,u,_;return{c(){d=s("p"),k=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(l){d=r(l,"P",{});var c=i(d);k=n(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),h=r(c,"CODE",{});var z=i(h);u=n(z,"Module"),z.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(l,c){g(l,d,c),e(d,k),e(d,h),e(h,u),e(d,_)},d(l){l&&o(d)}}}function Ux(M){let d,k,h,u,_;return u=new Oe({props:{code:`from transformers import AutoTokenizer, RoFormerForMultipleChoice
import torch

tokenizer = AutoTokenizer.from_pretrained("junnyu/roformer_chinese_base")
model = RoFormerForMultipleChoice.from_pretrained("junnyu/roformer_chinese_base")

prompt = "In Italy, pizza served in formal settings, such as at a restaurant, is presented unsliced."
choice0 = "It is eaten with a fork and a knife."
choice1 = "It is eaten while held in the hand."
labels = torch.tensor(0).unsqueeze(0)  # choice0 is correct (according to Wikipedia ;)), batch size 1

encoding = tokenizer([prompt, prompt], [choice0, choice1], return_tensors="pt", padding=True)
outputs = model(**{k: v.unsqueeze(0) for k, v in encoding.items()}, labels=labels)  # batch size is 1

# the linear classifier still needs to be trained
loss = outputs.loss
logits = outputs.logits`,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"),k=t("Example:"),h=p(),F(u.$$.fragment)},l(l){d=r(l,"P",{});var c=i(d);k=n(c,"Example:"),c.forEach(o),h=m(l),b(u.$$.fragment,l)},m(l,c){g(l,d,c),e(d,k),g(l,h,c),w(u,l,c),_=!0},p:Le,i(l){_||(T(u.$$.fragment,l),_=!0)},o(l){$(u.$$.fragment,l),_=!1},d(l){l&&o(d),l&&o(h),x(u,l)}}}function Kx(M){let d,k,h,u,_;return{c(){d=s("p"),k=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(l){d=r(l,"P",{});var c=i(d);k=n(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),h=r(c,"CODE",{});var z=i(h);u=n(z,"Module"),z.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(l,c){g(l,d,c),e(d,k),e(d,h),e(h,u),e(d,_)},d(l){l&&o(d)}}}function Bx(M){let d,k,h,u,_;return u=new Oe({props:{code:`from transformers import AutoTokenizer, RoFormerForTokenClassification
import torch

tokenizer = AutoTokenizer.from_pretrained("junnyu/roformer_chinese_base")
model = RoFormerForTokenClassification.from_pretrained("junnyu/roformer_chinese_base")

inputs = tokenizer(
    "HuggingFace is a company based in Paris and New York", add_special_tokens=False, return_tensors="pt"
)

with torch.no_grad():
    logits = model(**inputs).logits

predicted_token_class_ids = logits.argmax(-1)

# Note that tokens are classified rather then input words which means that
# there might be more predicted token classes than words.
# Multiple token classes might account for the same word
predicted_tokens_classes = [model.config.id2label[t.item()] for t in predicted_token_class_ids[0]]

labels = predicted_token_class_ids
loss = model(**inputs, labels=labels).loss`,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"),k=t("Example:"),h=p(),F(u.$$.fragment)},l(l){d=r(l,"P",{});var c=i(d);k=n(c,"Example:"),c.forEach(o),h=m(l),b(u.$$.fragment,l)},m(l,c){g(l,d,c),e(d,k),g(l,h,c),w(u,l,c),_=!0},p:Le,i(l){_||(T(u.$$.fragment,l),_=!0)},o(l){$(u.$$.fragment,l),_=!1},d(l){l&&o(d),l&&o(h),x(u,l)}}}function Qx(M){let d,k,h,u,_;return{c(){d=s("p"),k=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(l){d=r(l,"P",{});var c=i(d);k=n(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),h=r(c,"CODE",{});var z=i(h);u=n(z,"Module"),z.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(l,c){g(l,d,c),e(d,k),e(d,h),e(h,u),e(d,_)},d(l){l&&o(d)}}}function Hx(M){let d,k,h,u,_;return u=new Oe({props:{code:`from transformers import AutoTokenizer, RoFormerForQuestionAnswering
import torch

tokenizer = AutoTokenizer.from_pretrained("junnyu/roformer_chinese_base")
model = RoFormerForQuestionAnswering.from_pretrained("junnyu/roformer_chinese_base")

question, text = "Who was Jim Henson?", "Jim Henson was a nice puppet"

inputs = tokenizer(question, text, return_tensors="pt")
with torch.no_grad():
    outputs = model(**inputs)

answer_start_index = outputs.start_logits.argmax()
answer_end_index = outputs.end_logits.argmax()

predict_answer_tokens = inputs.input_ids[0, answer_start_index : answer_end_index + 1]

# target is "nice puppet"
target_start_index = torch.tensor([14])
target_end_index = torch.tensor([15])

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

tokenizer = AutoTokenizer.from_pretrained("junnyu/roformer_chinese_base")
model = TFRoFormerModel.from_pretrained("junnyu/roformer_chinese_base")

inputs = tokenizer("Hello, my dog is cute", return_tensors="tf")
outputs = model(inputs)

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

tokenizer = AutoTokenizer.from_pretrained("junnyu/roformer_chinese_base")
model = TFRoFormerForMaskedLM.from_pretrained("junnyu/roformer_chinese_base")

inputs = tokenizer("The capital of France is [MASK].", return_tensors="tf")
logits = model(**inputs).logits

# retrieve index of [MASK]
mask_token_index = tf.where((inputs.input_ids == tokenizer.mask_token_id)[0])
selected_logits = tf.gather_nd(logits[0], indices=mask_token_index)

predicted_token_id = tf.math.argmax(selected_logits, axis=-1)`,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"),k=t("Example:"),h=p(),F(u.$$.fragment)},l(l){d=r(l,"P",{});var c=i(d);k=n(c,"Example:"),c.forEach(o),h=m(l),b(u.$$.fragment,l)},m(l,c){g(l,d,c),e(d,k),g(l,h,c),w(u,l,c),_=!0},p:Le,i(l){_||(T(u.$$.fragment,l),_=!0)},o(l){$(u.$$.fragment,l),_=!1},d(l){l&&o(d),l&&o(h),x(u,l)}}}function eE(M){let d,k;return d=new Oe({props:{code:`labels = tokenizer("The capital of France is Paris.", return_tensors="tf")["input_ids"]
# mask labels of non-[MASK] tokens
labels = tf.where(inputs.input_ids == tokenizer.mask_token_id, labels, -100)

outputs = model(**inputs, labels=labels)`,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(){F(d.$$.fragment)},l(h){b(d.$$.fragment,h)},m(h,u){w(d,h,u),k=!0},p:Le,i(h){k||(T(d.$$.fragment,h),k=!0)},o(h){$(d.$$.fragment,h),k=!1},d(h){x(d,h)}}}function oE(M){let d,k,h,u,_,l,c,z,be,fe,I,ae,ee,E,we,Q,Te,ge,N,$e,ie,V,xe,_e,W,Ee,ke,U,pe,Me,te,C,P,ve,K,me,Re,H,se,ze,A,je,J,le,Ce,G,ye,re,O,he,S,qe,oe,L,Fe,q,ue,de;return{c(){d=s("p"),k=t("TensorFlow models and layers in "),h=s("code"),u=t("transformers"),_=t(" accept two formats as input:"),l=p(),c=s("ul"),z=s("li"),be=t("having all inputs as keyword arguments (like PyTorch models), or"),fe=p(),I=s("li"),ae=t("having all inputs as a list, tuple or dict in the first positional argument."),ee=p(),E=s("p"),we=t(`The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
and layers. Because of this support, when using methods like `),Q=s("code"),Te=t("model.fit()"),ge=t(` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),N=s("code"),$e=t("model.fit()"),ie=t(` supports! If, however, you want to use the second
format outside of Keras methods like `),V=s("code"),xe=t("fit()"),_e=t(" and "),W=s("code"),Ee=t("predict()"),ke=t(`, such as when creating your own layers or models with
the Keras `),U=s("code"),pe=t("Functional"),Me=t(` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),te=p(),C=s("ul"),P=s("li"),ve=t("a single Tensor with "),K=s("code"),me=t("input_ids"),Re=t(" only and nothing else: "),H=s("code"),se=t("model(input_ids)"),ze=p(),A=s("li"),je=t(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),J=s("code"),le=t("model([input_ids, attention_mask])"),Ce=t(" or "),G=s("code"),ye=t("model([input_ids, attention_mask, token_type_ids])"),re=p(),O=s("li"),he=t(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),S=s("code"),qe=t('model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),oe=p(),L=s("p"),Fe=t(`Note that when creating models and layers with
`),q=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(y){d=r(y,"P",{});var R=i(d);k=n(R,"TensorFlow models and layers in "),h=r(R,"CODE",{});var Se=i(h);u=n(Se,"transformers"),Se.forEach(o),_=n(R," accept two formats as input:"),R.forEach(o),l=m(y),c=r(y,"UL",{});var Z=i(c);z=r(Z,"LI",{});var He=i(z);be=n(He,"having all inputs as keyword arguments (like PyTorch models), or"),He.forEach(o),fe=m(Z),I=r(Z,"LI",{});var Ve=i(I);ae=n(Ve,"having all inputs as a list, tuple or dict in the first positional argument."),Ve.forEach(o),Z.forEach(o),ee=m(y),E=r(y,"P",{});var j=i(E);we=n(j,`The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
and layers. Because of this support, when using methods like `),Q=r(j,"CODE",{});var De=i(Q);Te=n(De,"model.fit()"),De.forEach(o),ge=n(j,` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),N=r(j,"CODE",{});var Je=i(N);$e=n(Je,"model.fit()"),Je.forEach(o),ie=n(j,` supports! If, however, you want to use the second
format outside of Keras methods like `),V=r(j,"CODE",{});var Ge=i(V);xe=n(Ge,"fit()"),Ge.forEach(o),_e=n(j," and "),W=r(j,"CODE",{});var We=i(W);Ee=n(We,"predict()"),We.forEach(o),ke=n(j,`, such as when creating your own layers or models with
the Keras `),U=r(j,"CODE",{});var Ie=i(U);pe=n(Ie,"Functional"),Ie.forEach(o),Me=n(j,` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),j.forEach(o),te=m(y),C=r(y,"UL",{});var D=i(C);P=r(D,"LI",{});var X=i(P);ve=n(X,"a single Tensor with "),K=r(X,"CODE",{});var Ue=i(K);me=n(Ue,"input_ids"),Ue.forEach(o),Re=n(X," only and nothing else: "),H=r(X,"CODE",{});var Ne=i(H);se=n(Ne,"model(input_ids)"),Ne.forEach(o),X.forEach(o),ze=m(D),A=r(D,"LI",{});var Y=i(A);je=n(Y,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),J=r(Y,"CODE",{});var Xe=i(J);le=n(Xe,"model([input_ids, attention_mask])"),Xe.forEach(o),Ce=n(Y," or "),G=r(Y,"CODE",{});var Ke=i(G);ye=n(Ke,"model([input_ids, attention_mask, token_type_ids])"),Ke.forEach(o),Y.forEach(o),re=m(D),O=r(D,"LI",{});var ce=i(O);he=n(ce,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),S=r(ce,"CODE",{});var Ye=i(S);qe=n(Ye,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),Ye.forEach(o),ce.forEach(o),D.forEach(o),oe=m(y),L=r(y,"P",{});var ne=i(L);Fe=n(ne,`Note that when creating models and layers with
`),q=r(ne,"A",{href:!0,rel:!0});var Ae=i(q);ue=n(Ae,"subclassing"),Ae.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(q,"href","https://keras.io/guides/making_new_layers_and_models_via_subclassing/"),f(q,"rel","nofollow")},m(y,R){g(y,d,R),e(d,k),e(d,h),e(h,u),e(d,_),g(y,l,R),g(y,c,R),e(c,z),e(z,be),e(c,fe),e(c,I),e(I,ae),g(y,ee,R),g(y,E,R),e(E,we),e(E,Q),e(Q,Te),e(E,ge),e(E,N),e(N,$e),e(E,ie),e(E,V),e(V,xe),e(E,_e),e(E,W),e(W,Ee),e(E,ke),e(E,U),e(U,pe),e(E,Me),g(y,te,R),g(y,C,R),e(C,P),e(P,ve),e(P,K),e(K,me),e(P,Re),e(P,H),e(H,se),e(C,ze),e(C,A),e(A,je),e(A,J),e(J,le),e(A,Ce),e(A,G),e(G,ye),e(C,re),e(C,O),e(O,he),e(O,S),e(S,qe),g(y,oe,R),g(y,L,R),e(L,Fe),e(L,q),e(q,ue),e(L,de)},d(y){y&&o(d),y&&o(l),y&&o(c),y&&o(ee),y&&o(E),y&&o(te),y&&o(C),y&&o(oe),y&&o(L)}}}function tE(M){let d,k,h,u,_;return u=new Oe({props:{code:`from transformers import AutoTokenizer, TFRoFormerForCausalLM
import tensorflow as tf

tokenizer = AutoTokenizer.from_pretrained("junnyu/roformer_chinese_base")
model = TFRoFormerForCausalLM.from_pretrained("junnyu/roformer_chinese_base")

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

tokenizer = AutoTokenizer.from_pretrained("junnyu/roformer_chinese_base")
model = TFRoFormerForSequenceClassification.from_pretrained("junnyu/roformer_chinese_base")

inputs = tokenizer("Hello, my dog is cute", return_tensors="tf")

logits = model(**inputs).logits

predicted_class_id = int(tf.math.argmax(logits, axis=-1)[0])`,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"),k=t("Example:"),h=p(),F(u.$$.fragment)},l(l){d=r(l,"P",{});var c=i(d);k=n(c,"Example:"),c.forEach(o),h=m(l),b(u.$$.fragment,l)},m(l,c){g(l,d,c),e(d,k),g(l,h,c),w(u,l,c),_=!0},p:Le,i(l){_||(T(u.$$.fragment,l),_=!0)},o(l){$(u.$$.fragment,l),_=!1},d(l){l&&o(d),l&&o(h),x(u,l)}}}function aE(M){let d,k;return d=new Oe({props:{code:'# To train a model on `num_labels` classes, you can pass `num_labels=num_labels` to `.from_pretrained(...)`\nnum_labels = len(model.config.id2label)\nmodel = TFRoFormerForSequenceClassification.from_pretrained("junnyu/roformer_chinese_base", num_labels=num_labels)\n\nlabels = tf.constant(1)\nloss = model(**inputs, labels=labels).loss',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(){F(d.$$.fragment)},l(h){b(d.$$.fragment,h)},m(h,u){w(d,h,u),k=!0},p:Le,i(h){k||(T(d.$$.fragment,h),k=!0)},o(h){$(d.$$.fragment,h),k=!1},d(h){x(d,h)}}}function iE(M){let d,k,h,u,_,l,c,z,be,fe,I,ae,ee,E,we,Q,Te,ge,N,$e,ie,V,xe,_e,W,Ee,ke,U,pe,Me,te,C,P,ve,K,me,Re,H,se,ze,A,je,J,le,Ce,G,ye,re,O,he,S,qe,oe,L,Fe,q,ue,de;return{c(){d=s("p"),k=t("TensorFlow models and layers in "),h=s("code"),u=t("transformers"),_=t(" accept two formats as input:"),l=p(),c=s("ul"),z=s("li"),be=t("having all inputs as keyword arguments (like PyTorch models), or"),fe=p(),I=s("li"),ae=t("having all inputs as a list, tuple or dict in the first positional argument."),ee=p(),E=s("p"),we=t(`The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
and layers. Because of this support, when using methods like `),Q=s("code"),Te=t("model.fit()"),ge=t(` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),N=s("code"),$e=t("model.fit()"),ie=t(` supports! If, however, you want to use the second
format outside of Keras methods like `),V=s("code"),xe=t("fit()"),_e=t(" and "),W=s("code"),Ee=t("predict()"),ke=t(`, such as when creating your own layers or models with
the Keras `),U=s("code"),pe=t("Functional"),Me=t(` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),te=p(),C=s("ul"),P=s("li"),ve=t("a single Tensor with "),K=s("code"),me=t("input_ids"),Re=t(" only and nothing else: "),H=s("code"),se=t("model(input_ids)"),ze=p(),A=s("li"),je=t(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),J=s("code"),le=t("model([input_ids, attention_mask])"),Ce=t(" or "),G=s("code"),ye=t("model([input_ids, attention_mask, token_type_ids])"),re=p(),O=s("li"),he=t(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),S=s("code"),qe=t('model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),oe=p(),L=s("p"),Fe=t(`Note that when creating models and layers with
`),q=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(y){d=r(y,"P",{});var R=i(d);k=n(R,"TensorFlow models and layers in "),h=r(R,"CODE",{});var Se=i(h);u=n(Se,"transformers"),Se.forEach(o),_=n(R," accept two formats as input:"),R.forEach(o),l=m(y),c=r(y,"UL",{});var Z=i(c);z=r(Z,"LI",{});var He=i(z);be=n(He,"having all inputs as keyword arguments (like PyTorch models), or"),He.forEach(o),fe=m(Z),I=r(Z,"LI",{});var Ve=i(I);ae=n(Ve,"having all inputs as a list, tuple or dict in the first positional argument."),Ve.forEach(o),Z.forEach(o),ee=m(y),E=r(y,"P",{});var j=i(E);we=n(j,`The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
and layers. Because of this support, when using methods like `),Q=r(j,"CODE",{});var De=i(Q);Te=n(De,"model.fit()"),De.forEach(o),ge=n(j,` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),N=r(j,"CODE",{});var Je=i(N);$e=n(Je,"model.fit()"),Je.forEach(o),ie=n(j,` supports! If, however, you want to use the second
format outside of Keras methods like `),V=r(j,"CODE",{});var Ge=i(V);xe=n(Ge,"fit()"),Ge.forEach(o),_e=n(j," and "),W=r(j,"CODE",{});var We=i(W);Ee=n(We,"predict()"),We.forEach(o),ke=n(j,`, such as when creating your own layers or models with
the Keras `),U=r(j,"CODE",{});var Ie=i(U);pe=n(Ie,"Functional"),Ie.forEach(o),Me=n(j,` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),j.forEach(o),te=m(y),C=r(y,"UL",{});var D=i(C);P=r(D,"LI",{});var X=i(P);ve=n(X,"a single Tensor with "),K=r(X,"CODE",{});var Ue=i(K);me=n(Ue,"input_ids"),Ue.forEach(o),Re=n(X," only and nothing else: "),H=r(X,"CODE",{});var Ne=i(H);se=n(Ne,"model(input_ids)"),Ne.forEach(o),X.forEach(o),ze=m(D),A=r(D,"LI",{});var Y=i(A);je=n(Y,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),J=r(Y,"CODE",{});var Xe=i(J);le=n(Xe,"model([input_ids, attention_mask])"),Xe.forEach(o),Ce=n(Y," or "),G=r(Y,"CODE",{});var Ke=i(G);ye=n(Ke,"model([input_ids, attention_mask, token_type_ids])"),Ke.forEach(o),Y.forEach(o),re=m(D),O=r(D,"LI",{});var ce=i(O);he=n(ce,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),S=r(ce,"CODE",{});var Ye=i(S);qe=n(Ye,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),Ye.forEach(o),ce.forEach(o),D.forEach(o),oe=m(y),L=r(y,"P",{});var ne=i(L);Fe=n(ne,`Note that when creating models and layers with
`),q=r(ne,"A",{href:!0,rel:!0});var Ae=i(q);ue=n(Ae,"subclassing"),Ae.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(q,"href","https://keras.io/guides/making_new_layers_and_models_via_subclassing/"),f(q,"rel","nofollow")},m(y,R){g(y,d,R),e(d,k),e(d,h),e(h,u),e(d,_),g(y,l,R),g(y,c,R),e(c,z),e(z,be),e(c,fe),e(c,I),e(I,ae),g(y,ee,R),g(y,E,R),e(E,we),e(E,Q),e(Q,Te),e(E,ge),e(E,N),e(N,$e),e(E,ie),e(E,V),e(V,xe),e(E,_e),e(E,W),e(W,Ee),e(E,ke),e(E,U),e(U,pe),e(E,Me),g(y,te,R),g(y,C,R),e(C,P),e(P,ve),e(P,K),e(K,me),e(P,Re),e(P,H),e(H,se),e(C,ze),e(C,A),e(A,je),e(A,J),e(J,le),e(A,Ce),e(A,G),e(G,ye),e(C,re),e(C,O),e(O,he),e(O,S),e(S,qe),g(y,oe,R),g(y,L,R),e(L,Fe),e(L,q),e(q,ue),e(L,de)},d(y){y&&o(d),y&&o(l),y&&o(c),y&&o(ee),y&&o(E),y&&o(te),y&&o(C),y&&o(oe),y&&o(L)}}}function lE(M){let d,k,h,u,_;return{c(){d=s("p"),k=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(l){d=r(l,"P",{});var c=i(d);k=n(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),h=r(c,"CODE",{});var z=i(h);u=n(z,"Module"),z.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(l,c){g(l,d,c),e(d,k),e(d,h),e(h,u),e(d,_)},d(l){l&&o(d)}}}function dE(M){let d,k,h,u,_;return u=new Oe({props:{code:`from transformers import AutoTokenizer, TFRoFormerForMultipleChoice
import tensorflow as tf

tokenizer = AutoTokenizer.from_pretrained("junnyu/roformer_chinese_base")
model = TFRoFormerForMultipleChoice.from_pretrained("junnyu/roformer_chinese_base")

prompt = "In Italy, pizza served in formal settings, such as at a restaurant, is presented unsliced."
choice0 = "It is eaten with a fork and a knife."
choice1 = "It is eaten while held in the hand."

encoding = tokenizer([prompt, prompt], [choice0, choice1], return_tensors="tf", padding=True)
inputs = {k: tf.expand_dims(v, 0) for k, v in encoding.items()}
outputs = model(inputs)  # batch size is 1

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

tokenizer = AutoTokenizer.from_pretrained("junnyu/roformer_chinese_base")
model = TFRoFormerForTokenClassification.from_pretrained("junnyu/roformer_chinese_base")

inputs = tokenizer(
    "HuggingFace is a company based in Paris and New York", add_special_tokens=False, return_tensors="tf"
)

logits = model(**inputs).logits
predicted_token_class_ids = tf.math.argmax(logits, axis=-1)

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

tokenizer = AutoTokenizer.from_pretrained("junnyu/roformer_chinese_base")
model = TFRoFormerForQuestionAnswering.from_pretrained("junnyu/roformer_chinese_base")

question, text = "Who was Jim Henson?", "Jim Henson was a nice puppet"

inputs = tokenizer(question, text, return_tensors="tf")
outputs = model(**inputs)

answer_start_index = int(tf.math.argmax(outputs.start_logits, axis=-1)[0])
answer_end_index = int(tf.math.argmax(outputs.end_logits, axis=-1)[0])

predict_answer_tokens = inputs.input_ids[0, answer_start_index : answer_end_index + 1]`,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"),k=t("Example:"),h=p(),F(u.$$.fragment)},l(l){d=r(l,"P",{});var c=i(d);k=n(c,"Example:"),c.forEach(o),h=m(l),b(u.$$.fragment,l)},m(l,c){g(l,d,c),e(d,k),g(l,h,c),w(u,l,c),_=!0},p:Le,i(l){_||(T(u.$$.fragment,l),_=!0)},o(l){$(u.$$.fragment,l),_=!1},d(l){l&&o(d),l&&o(h),x(u,l)}}}function _E(M){let d,k;return d=new Oe({props:{code:`# target is "nice puppet"
target_start_index = tf.constant([14])
target_end_index = tf.constant([15])

outputs = model(**inputs, start_positions=target_start_index, end_positions=target_end_index)
loss = tf.math.reduce_mean(outputs.loss)`,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(){F(d.$$.fragment)},l(h){b(d.$$.fragment,h)},m(h,u){w(d,h,u),k=!0},p:Le,i(h){k||(T(d.$$.fragment,h),k=!0)},o(h){$(d.$$.fragment,h),k=!1},d(h){x(d,h)}}}function kE(M){let d,k,h,u,_;return{c(){d=s("p"),k=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(l){d=r(l,"P",{});var c=i(d);k=n(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),h=r(c,"CODE",{});var z=i(h);u=n(z,"Module"),z.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(l,c){g(l,d,c),e(d,k),e(d,h),e(h,u),e(d,_)},d(l){l&&o(d)}}}function vE(M){let d,k,h,u,_;return u=new Oe({props:{code:`from transformers import AutoTokenizer, FlaxRoFormerModel

tokenizer = AutoTokenizer.from_pretrained("junnyu/roformer_chinese_base")
model = FlaxRoFormerModel.from_pretrained("junnyu/roformer_chinese_base")

inputs = tokenizer("Hello, my dog is cute", return_tensors="jax")
outputs = model(**inputs)

last_hidden_states = outputs.last_hidden_state`,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"),k=t("Example:"),h=p(),F(u.$$.fragment)},l(l){d=r(l,"P",{});var c=i(d);k=n(c,"Example:"),c.forEach(o),h=m(l),b(u.$$.fragment,l)},m(l,c){g(l,d,c),e(d,k),g(l,h,c),w(u,l,c),_=!0},p:Le,i(l){_||(T(u.$$.fragment,l),_=!0)},o(l){$(u.$$.fragment,l),_=!1},d(l){l&&o(d),l&&o(h),x(u,l)}}}function yE(M){let d,k,h,u,_;return{c(){d=s("p"),k=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(l){d=r(l,"P",{});var c=i(d);k=n(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),h=r(c,"CODE",{});var z=i(h);u=n(z,"Module"),z.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(l,c){g(l,d,c),e(d,k),e(d,h),e(h,u),e(d,_)},d(l){l&&o(d)}}}function FE(M){let d,k,h,u,_;return u=new Oe({props:{code:`from transformers import AutoTokenizer, FlaxRoFormerForMaskedLM

tokenizer = AutoTokenizer.from_pretrained("junnyu/roformer_chinese_base")
model = FlaxRoFormerForMaskedLM.from_pretrained("junnyu/roformer_chinese_base")

inputs = tokenizer("The capital of France is [MASK].", return_tensors="jax")

outputs = model(**inputs)
logits = outputs.logits`,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"),k=t("Example:"),h=p(),F(u.$$.fragment)},l(l){d=r(l,"P",{});var c=i(d);k=n(c,"Example:"),c.forEach(o),h=m(l),b(u.$$.fragment,l)},m(l,c){g(l,d,c),e(d,k),g(l,h,c),w(u,l,c),_=!0},p:Le,i(l){_||(T(u.$$.fragment,l),_=!0)},o(l){$(u.$$.fragment,l),_=!1},d(l){l&&o(d),l&&o(h),x(u,l)}}}function bE(M){let d,k,h,u,_;return{c(){d=s("p"),k=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(l){d=r(l,"P",{});var c=i(d);k=n(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),h=r(c,"CODE",{});var z=i(h);u=n(z,"Module"),z.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(l,c){g(l,d,c),e(d,k),e(d,h),e(h,u),e(d,_)},d(l){l&&o(d)}}}function wE(M){let d,k,h,u,_;return u=new Oe({props:{code:`from transformers import AutoTokenizer, FlaxRoFormerForSequenceClassification

tokenizer = AutoTokenizer.from_pretrained("junnyu/roformer_chinese_base")
model = FlaxRoFormerForSequenceClassification.from_pretrained("junnyu/roformer_chinese_base")

inputs = tokenizer("Hello, my dog is cute", return_tensors="jax")

outputs = model(**inputs)
logits = outputs.logits`,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"),k=t("Example:"),h=p(),F(u.$$.fragment)},l(l){d=r(l,"P",{});var c=i(d);k=n(c,"Example:"),c.forEach(o),h=m(l),b(u.$$.fragment,l)},m(l,c){g(l,d,c),e(d,k),g(l,h,c),w(u,l,c),_=!0},p:Le,i(l){_||(T(u.$$.fragment,l),_=!0)},o(l){$(u.$$.fragment,l),_=!1},d(l){l&&o(d),l&&o(h),x(u,l)}}}function TE(M){let d,k,h,u,_;return{c(){d=s("p"),k=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(l){d=r(l,"P",{});var c=i(d);k=n(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),h=r(c,"CODE",{});var z=i(h);u=n(z,"Module"),z.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(l,c){g(l,d,c),e(d,k),e(d,h),e(h,u),e(d,_)},d(l){l&&o(d)}}}function $E(M){let d,k,h,u,_;return u=new Oe({props:{code:`from transformers import AutoTokenizer, FlaxRoFormerForMultipleChoice

tokenizer = AutoTokenizer.from_pretrained("junnyu/roformer_chinese_base")
model = FlaxRoFormerForMultipleChoice.from_pretrained("junnyu/roformer_chinese_base")

prompt = "In Italy, pizza served in formal settings, such as at a restaurant, is presented unsliced."
choice0 = "It is eaten with a fork and a knife."
choice1 = "It is eaten while held in the hand."

encoding = tokenizer([prompt, prompt], [choice0, choice1], return_tensors="jax", padding=True)
outputs = model(**{k: v[None, :] for k, v in encoding.items()})

logits = outputs.logits`,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"),k=t("Example:"),h=p(),F(u.$$.fragment)},l(l){d=r(l,"P",{});var c=i(d);k=n(c,"Example:"),c.forEach(o),h=m(l),b(u.$$.fragment,l)},m(l,c){g(l,d,c),e(d,k),g(l,h,c),w(u,l,c),_=!0},p:Le,i(l){_||(T(u.$$.fragment,l),_=!0)},o(l){$(u.$$.fragment,l),_=!1},d(l){l&&o(d),l&&o(h),x(u,l)}}}function xE(M){let d,k,h,u,_;return{c(){d=s("p"),k=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(l){d=r(l,"P",{});var c=i(d);k=n(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),h=r(c,"CODE",{});var z=i(h);u=n(z,"Module"),z.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(l,c){g(l,d,c),e(d,k),e(d,h),e(h,u),e(d,_)},d(l){l&&o(d)}}}function EE(M){let d,k,h,u,_;return u=new Oe({props:{code:`from transformers import AutoTokenizer, FlaxRoFormerForTokenClassification

tokenizer = AutoTokenizer.from_pretrained("junnyu/roformer_chinese_base")
model = FlaxRoFormerForTokenClassification.from_pretrained("junnyu/roformer_chinese_base")

inputs = tokenizer("Hello, my dog is cute", return_tensors="jax")

outputs = model(**inputs)
logits = outputs.logits`,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"),k=t("Example:"),h=p(),F(u.$$.fragment)},l(l){d=r(l,"P",{});var c=i(d);k=n(c,"Example:"),c.forEach(o),h=m(l),b(u.$$.fragment,l)},m(l,c){g(l,d,c),e(d,k),g(l,h,c),w(u,l,c),_=!0},p:Le,i(l){_||(T(u.$$.fragment,l),_=!0)},o(l){$(u.$$.fragment,l),_=!1},d(l){l&&o(d),l&&o(h),x(u,l)}}}function ME(M){let d,k,h,u,_;return{c(){d=s("p"),k=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(l){d=r(l,"P",{});var c=i(d);k=n(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),h=r(c,"CODE",{});var z=i(h);u=n(z,"Module"),z.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(l,c){g(l,d,c),e(d,k),e(d,h),e(h,u),e(d,_)},d(l){l&&o(d)}}}function RE(M){let d,k,h,u,_;return u=new Oe({props:{code:`from transformers import AutoTokenizer, FlaxRoFormerForQuestionAnswering

tokenizer = AutoTokenizer.from_pretrained("junnyu/roformer_chinese_base")
model = FlaxRoFormerForQuestionAnswering.from_pretrained("junnyu/roformer_chinese_base")

question, text = "Who was Jim Henson?", "Jim Henson was a nice puppet"
inputs = tokenizer(question, text, return_tensors="jax")

outputs = model(**inputs)
start_scores = outputs.start_logits
end_scores = outputs.end_logits`,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"),k=t("Example:"),h=p(),F(u.$$.fragment)},l(l){d=r(l,"P",{});var c=i(d);k=n(c,"Example:"),c.forEach(o),h=m(l),b(u.$$.fragment,l)},m(l,c){g(l,d,c),e(d,k),g(l,h,c),w(u,l,c),_=!0},p:Le,i(l){_||(T(u.$$.fragment,l),_=!0)},o(l){$(u.$$.fragment,l),_=!1},d(l){l&&o(d),l&&o(h),x(u,l)}}}function zE(M){let d,k,h,u,_,l,c,z,be,fe,I,ae,ee,E,we,Q,Te,ge,N,$e,ie,V,xe,_e,W,Ee,ke,U,pe,Me,te,C,P,ve,K,me,Re,H,se,ze,A,je,J,le,Ce,G,ye,re,O,he,S,qe,oe,L,Fe,q,ue,de,y,R,Se,Z,He,Ve,j,De,Je,Ge,We,Ie,D,X,Ue,Ne,Y,Xe,Ke,ce,Ye,ne,Ae,Tn,Sd,Fr,hf,Wd,uf,mh,Co,br,ff,$t,gf,El,_f,kf,wr,vf,yf,Ff,xt,bf,Ml,wf,Tf,Rl,$f,xf,Ef,$n,hh,Et,xn,Ud,Tr,Mf,Kd,Rf,uh,Ze,$r,zf,xr,jf,Er,Cf,qf,Af,Mr,Pf,zl,Lf,Of,Df,En,If,gt,Rr,Nf,Bd,Sf,Wf,zr,jl,Uf,Qd,Kf,Bf,Cl,Qf,Hd,Hf,Vf,Mn,jr,Jf,Cr,Gf,Vd,Xf,Yf,Zf,Oo,qr,eg,Jd,og,tg,Rn,ng,Mt,sg,Gd,rg,ag,Xd,ig,lg,dg,ql,Ar,fh,Rt,zn,Yd,Pr,cg,Zd,pg,gh,io,Lr,mg,Or,hg,ec,ug,fg,gg,jn,Al,_g,kg,Pl,vg,yg,Fg,Dr,bg,Ll,wg,Tg,$g,Cn,xg,_t,Ir,Eg,oc,Mg,Rg,Nr,Ol,zg,tc,jg,Cg,Dl,qg,nc,Ag,_h,zt,qn,sc,Sr,Pg,rc,Lg,kh,_o,Wr,Og,Ur,Dg,Kr,Ig,Ng,Sg,Br,Wg,Qr,Ug,Kg,Bg,lo,Qg,ac,Hg,Vg,ic,Jg,Gg,lc,Xg,Yg,dc,Zg,e_,cc,o_,t_,pc,n_,s_,r_,Do,Hr,a_,jt,i_,Il,l_,d_,mc,c_,p_,m_,An,h_,Pn,vh,Ct,Ln,hc,Vr,u_,uc,f_,yh,it,Jr,g_,qt,__,fc,k_,v_,Gr,y_,F_,b_,Io,Xr,w_,At,T_,Nl,$_,x_,gc,E_,M_,R_,On,z_,Dn,Fh,Pt,In,_c,Yr,j_,kc,C_,bh,lt,Zr,q_,Lt,A_,vc,P_,L_,ea,O_,D_,I_,No,oa,N_,Ot,S_,Sl,W_,U_,yc,K_,B_,Q_,Nn,H_,Sn,wh,Dt,Wn,Fc,ta,V_,bc,J_,Th,qo,na,G_,wc,X_,Y_,sa,Z_,ra,ek,ok,tk,yo,aa,nk,It,sk,Wl,rk,ak,Tc,ik,lk,dk,Un,ck,Kn,pk,Bn,$h,Nt,Qn,$c,ia,mk,xc,hk,xh,Ao,la,uk,Ec,fk,gk,da,_k,ca,kk,vk,yk,So,pa,Fk,St,bk,Ul,wk,Tk,Mc,$k,xk,Ek,Hn,Mk,Vn,Eh,Wt,Jn,Rc,ma,Rk,zc,zk,Mh,Po,ha,jk,jc,Ck,qk,ua,Ak,fa,Pk,Lk,Ok,Wo,ga,Dk,Ut,Ik,Kl,Nk,Sk,Cc,Wk,Uk,Kk,Gn,Bk,Xn,Rh,Kt,Yn,qc,_a,Qk,Ac,Hk,zh,Lo,ka,Vk,Bt,Jk,Pc,Gk,Xk,Lc,Yk,Zk,ev,va,ov,ya,tv,nv,sv,Uo,Fa,rv,Qt,av,Bl,iv,lv,Oc,dv,cv,pv,Zn,mv,es,jh,Ht,os,Dc,ba,hv,Ic,uv,Ch,co,wa,fv,Nc,gv,_v,Ta,kv,Ql,vv,yv,Fv,$a,bv,xa,wv,Tv,$v,ts,xv,Ko,Ea,Ev,Vt,Mv,Hl,Rv,zv,Sc,jv,Cv,qv,ns,Av,ss,qh,Jt,rs,Wc,Ma,Pv,Uc,Lv,Ah,po,Ra,Ov,za,Dv,Kc,Iv,Nv,Sv,ja,Wv,Vl,Uv,Kv,Bv,Ca,Qv,qa,Hv,Vv,Jv,as,Gv,Fo,Aa,Xv,Gt,Yv,Jl,Zv,ey,Bc,oy,ty,ny,is,sy,ls,ry,ds,Ph,Xt,cs,Qc,Pa,ay,Hc,iy,Lh,mo,La,ly,Oa,dy,Vc,cy,py,my,Da,hy,Gl,uy,fy,gy,Ia,_y,Na,ky,vy,yy,ps,Fy,kt,Sa,by,ko,wy,Jc,Ty,$y,Gc,xy,Ey,Xc,My,Ry,Yc,zy,jy,Zc,Cy,qy,Ay,ms,Oh,Yt,hs,ep,Wa,Py,op,Ly,Dh,ho,Ua,Oy,tp,Dy,Iy,Ka,Ny,Xl,Sy,Wy,Uy,Ba,Ky,Qa,By,Qy,Hy,us,Vy,bo,Ha,Jy,Zt,Gy,Yl,Xy,Yy,np,Zy,eF,oF,fs,tF,gs,nF,_s,Ih,en,ks,sp,Va,sF,rp,rF,Nh,uo,Ja,aF,ap,iF,lF,Ga,dF,Zl,cF,pF,mF,Xa,hF,Ya,uF,fF,gF,vs,_F,Bo,Za,kF,on,vF,ed,yF,FF,ip,bF,wF,TF,ys,$F,Fs,Sh,tn,bs,lp,ei,xF,dp,EF,Wh,fo,oi,MF,cp,RF,zF,ti,jF,od,CF,qF,AF,ni,PF,si,LF,OF,DF,ws,IF,wo,ri,NF,nn,SF,td,WF,UF,pp,KF,BF,QF,Ts,HF,$s,VF,xs,Uh,sn,Es,mp,ai,JF,hp,GF,Kh,go,ii,XF,rn,YF,up,ZF,eb,fp,ob,tb,nb,li,sb,nd,rb,ab,ib,di,lb,ci,db,cb,pb,Ms,mb,To,pi,hb,an,ub,sd,fb,gb,gp,_b,kb,vb,Rs,yb,zs,Fb,js,Bh,ln,Cs,_p,mi,bb,kp,wb,Qh,eo,hi,Tb,vp,$b,xb,ui,Eb,rd,Mb,Rb,zb,fi,jb,gi,Cb,qb,Ab,yp,Pb,Lb,dt,Fp,_i,Ob,Db,bp,ki,Ib,Nb,wp,vi,Sb,Wb,Tp,yi,Ub,Kb,Qo,Fi,Bb,dn,Qb,$p,Hb,Vb,xp,Jb,Gb,Xb,qs,Yb,As,Hh,cn,Ps,Ep,bi,Zb,Mp,ew,Vh,oo,wi,ow,Ti,tw,Rp,nw,sw,rw,$i,aw,ad,iw,lw,dw,xi,cw,Ei,pw,mw,hw,zp,uw,fw,ct,jp,Mi,gw,_w,Cp,Ri,kw,vw,qp,zi,yw,Fw,Ap,ji,bw,ww,Ho,Ci,Tw,pn,$w,Pp,xw,Ew,Lp,Mw,Rw,zw,Ls,jw,Os,Jh,mn,Ds,Op,qi,Cw,Dp,qw,Gh,to,Ai,Aw,Ip,Pw,Lw,Pi,Ow,id,Dw,Iw,Nw,Li,Sw,Oi,Ww,Uw,Kw,Np,Bw,Qw,pt,Sp,Di,Hw,Vw,Wp,Ii,Jw,Gw,Up,Ni,Xw,Yw,Kp,Si,Zw,eT,Vo,Wi,oT,hn,tT,Bp,nT,sT,Qp,rT,aT,iT,Is,lT,Ns,Xh,un,Ss,Hp,Ui,dT,Vp,cT,Yh,no,Ki,pT,Jp,mT,hT,Bi,uT,ld,fT,gT,_T,Qi,kT,Hi,vT,yT,FT,Gp,bT,wT,mt,Xp,Vi,TT,$T,Yp,Ji,xT,ET,Zp,Gi,MT,RT,em,Xi,zT,jT,Jo,Yi,CT,fn,qT,om,AT,PT,tm,LT,OT,DT,Ws,IT,Us,Zh,gn,Ks,nm,Zi,NT,sm,ST,eu,so,el,WT,rm,UT,KT,ol,BT,dd,QT,HT,VT,tl,JT,nl,GT,XT,YT,am,ZT,e1,ht,im,sl,o1,t1,lm,rl,n1,s1,dm,al,r1,a1,cm,il,i1,l1,Go,ll,d1,_n,c1,pm,p1,m1,mm,h1,u1,f1,Bs,g1,Qs,ou,kn,Hs,hm,dl,_1,um,k1,tu,ro,cl,v1,vn,y1,fm,F1,b1,gm,w1,T1,$1,pl,x1,cd,E1,M1,R1,ml,z1,hl,j1,C1,q1,_m,A1,P1,ut,km,ul,L1,O1,vm,fl,D1,I1,ym,gl,N1,S1,Fm,_l,W1,U1,Xo,kl,K1,yn,B1,bm,Q1,H1,wm,V1,J1,G1,Vs,X1,Js,nu;return l=new Qe({}),E=new Qe({}),S=new Qe({}),Fr=new Qe({}),br=new B({props:{name:"class transformers.RoFormerConfig",anchor:"transformers.RoFormerConfig",parameters:[{name:"vocab_size",val:" = 50000"},{name:"embedding_size",val:" = None"},{name:"hidden_size",val:" = 768"},{name:"num_hidden_layers",val:" = 12"},{name:"num_attention_heads",val:" = 12"},{name:"intermediate_size",val:" = 3072"},{name:"hidden_act",val:" = 'gelu'"},{name:"hidden_dropout_prob",val:" = 0.1"},{name:"attention_probs_dropout_prob",val:" = 0.1"},{name:"max_position_embeddings",val:" = 1536"},{name:"type_vocab_size",val:" = 2"},{name:"initializer_range",val:" = 0.02"},{name:"layer_norm_eps",val:" = 1e-12"},{name:"pad_token_id",val:" = 0"},{name:"rotary_value",val:" = False"},{name:"use_cache",val:" = True"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.RoFormerConfig.vocab_size",description:`<strong>vocab_size</strong> (<code>int</code>, <em>optional</em>, defaults to 50000) &#x2014;
Vocabulary size of the RoFormer model. Defines the number of different tokens that can be represented by
the <code>inputs_ids</code> passed when calling <a href="/docs/transformers/v4.27.1/en/model_doc/roformer#transformers.RoFormerModel">RoFormerModel</a> or <a href="/docs/transformers/v4.27.1/en/model_doc/roformer#transformers.TFRoFormerModel">TFRoFormerModel</a>.`,name:"vocab_size"},{anchor:"transformers.RoFormerConfig.embedding_size",description:`<strong>embedding_size</strong> (<code>int</code>, <em>optional</em>, defaults to None) &#x2014;
Dimensionality of the encoder layers and the pooler layer. Defaults to the <code>hidden_size</code> if not provided.`,name:"embedding_size"},{anchor:"transformers.RoFormerConfig.hidden_size",description:`<strong>hidden_size</strong> (<code>int</code>, <em>optional</em>, defaults to 768) &#x2014;
Dimension of the encoder layers and the pooler layer.`,name:"hidden_size"},{anchor:"transformers.RoFormerConfig.num_hidden_layers",description:`<strong>num_hidden_layers</strong> (<code>int</code>, <em>optional</em>, defaults to 12) &#x2014;
Number of hidden layers in the Transformer encoder.`,name:"num_hidden_layers"},{anchor:"transformers.RoFormerConfig.num_attention_heads",description:`<strong>num_attention_heads</strong> (<code>int</code>, <em>optional</em>, defaults to 12) &#x2014;
Number of attention heads for each attention layer in the Transformer encoder.`,name:"num_attention_heads"},{anchor:"transformers.RoFormerConfig.intermediate_size",description:`<strong>intermediate_size</strong> (<code>int</code>, <em>optional</em>, defaults to 3072) &#x2014;
Dimension of the &#x201C;intermediate&#x201D; (i.e., feed-forward) layer in the Transformer encoder.`,name:"intermediate_size"},{anchor:"transformers.RoFormerConfig.hidden_act",description:`<strong>hidden_act</strong> (<code>str</code> or <code>function</code>, <em>optional</em>, defaults to <code>&quot;gelu&quot;</code>) &#x2014;
The non-linear activation function (function or string) in the encoder and pooler. If string, <code>&quot;gelu&quot;</code>,
<code>&quot;relu&quot;</code>, <code>&quot;selu&quot;</code> and <code>&quot;gelu_new&quot;</code> are supported.`,name:"hidden_act"},{anchor:"transformers.RoFormerConfig.hidden_dropout_prob",description:`<strong>hidden_dropout_prob</strong> (<code>float</code>, <em>optional</em>, defaults to 0.1) &#x2014;
The dropout probabilitiy for all fully connected layers in the embeddings, encoder, and pooler.`,name:"hidden_dropout_prob"},{anchor:"transformers.RoFormerConfig.attention_probs_dropout_prob",description:`<strong>attention_probs_dropout_prob</strong> (<code>float</code>, <em>optional</em>, defaults to 0.1) &#x2014;
The dropout ratio for the attention probabilities.`,name:"attention_probs_dropout_prob"},{anchor:"transformers.RoFormerConfig.max_position_embeddings",description:`<strong>max_position_embeddings</strong> (<code>int</code>, <em>optional</em>, defaults to 1536) &#x2014;
The maximum sequence length that this model might ever be used with. Typically set this to something large
just in case (e.g., 512 or 1024 or 1536).`,name:"max_position_embeddings"},{anchor:"transformers.RoFormerConfig.type_vocab_size",description:`<strong>type_vocab_size</strong> (<code>int</code>, <em>optional</em>, defaults to 2) &#x2014;
The vocabulary size of the <code>token_type_ids</code> passed when calling <a href="/docs/transformers/v4.27.1/en/model_doc/roformer#transformers.RoFormerModel">RoFormerModel</a> or <a href="/docs/transformers/v4.27.1/en/model_doc/roformer#transformers.TFRoFormerModel">TFRoFormerModel</a>.`,name:"type_vocab_size"},{anchor:"transformers.RoFormerConfig.initializer_range",description:`<strong>initializer_range</strong> (<code>float</code>, <em>optional</em>, defaults to 0.02) &#x2014;
The standard deviation of the truncated_normal_initializer for initializing all weight matrices.`,name:"initializer_range"},{anchor:"transformers.RoFormerConfig.layer_norm_eps",description:`<strong>layer_norm_eps</strong> (<code>float</code>, <em>optional</em>, defaults to 1e-12) &#x2014;
The epsilon used by the layer normalization layers.`,name:"layer_norm_eps"},{anchor:"transformers.RoFormerConfig.is_decoder",description:`<strong>is_decoder</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether the model is used as a decoder or not. If <code>False</code>, the model is used as an encoder.`,name:"is_decoder"},{anchor:"transformers.RoFormerConfig.use_cache",description:`<strong>use_cache</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not the model should return the last key/values attentions (not used by all models). Only
relevant if <code>config.is_decoder=True</code>.`,name:"use_cache"},{anchor:"transformers.RoFormerConfig.rotary_value",description:`<strong>rotary_value</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not apply rotary position embeddings on value layer.`,name:"rotary_value"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/roformer/configuration_roformer.py#L46"}}),$n=new Pe({props:{anchor:"transformers.RoFormerConfig.example",$$slots:{default:[Rx]},$$scope:{ctx:M}}}),Tr=new Qe({}),$r=new B({props:{name:"class transformers.RoFormerTokenizer",anchor:"transformers.RoFormerTokenizer",parameters:[{name:"vocab_file",val:""},{name:"do_lower_case",val:" = True"},{name:"do_basic_tokenize",val:" = True"},{name:"never_split",val:" = None"},{name:"unk_token",val:" = '[UNK]'"},{name:"sep_token",val:" = '[SEP]'"},{name:"pad_token",val:" = '[PAD]'"},{name:"cls_token",val:" = '[CLS]'"},{name:"mask_token",val:" = '[MASK]'"},{name:"tokenize_chinese_chars",val:" = True"},{name:"strip_accents",val:" = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.RoFormerTokenizer.vocab_file",description:`<strong>vocab_file</strong> (<code>str</code>) &#x2014;
File containing the vocabulary.`,name:"vocab_file"},{anchor:"transformers.RoFormerTokenizer.do_lower_case",description:`<strong>do_lower_case</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to lowercase the input when tokenizing.`,name:"do_lower_case"},{anchor:"transformers.RoFormerTokenizer.do_basic_tokenize",description:`<strong>do_basic_tokenize</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to do basic tokenization before WordPiece.`,name:"do_basic_tokenize"},{anchor:"transformers.RoFormerTokenizer.never_split",description:`<strong>never_split</strong> (<code>Iterable</code>, <em>optional</em>) &#x2014;
Collection of tokens which will never be split during tokenization. Only has an effect when
<code>do_basic_tokenize=True</code>`,name:"never_split"},{anchor:"transformers.RoFormerTokenizer.unk_token",description:`<strong>unk_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;[UNK]&quot;</code>) &#x2014;
The unknown token. A token that is not in the vocabulary cannot be converted to an ID and is set to be this
token instead.`,name:"unk_token"},{anchor:"transformers.RoFormerTokenizer.sep_token",description:`<strong>sep_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;[SEP]&quot;</code>) &#x2014;
The separator token, which is used when building a sequence from multiple sequences, e.g. two sequences for
sequence classification or for a text and a question for question answering. It is also used as the last
token of a sequence built with special tokens.`,name:"sep_token"},{anchor:"transformers.RoFormerTokenizer.pad_token",description:`<strong>pad_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;[PAD]&quot;</code>) &#x2014;
The token used for padding, for example when batching sequences of different lengths.`,name:"pad_token"},{anchor:"transformers.RoFormerTokenizer.cls_token",description:`<strong>cls_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;[CLS]&quot;</code>) &#x2014;
The classifier token which is used when doing sequence classification (classification of the whole sequence
instead of per-token classification). It is the first token of the sequence when built with special tokens.`,name:"cls_token"},{anchor:"transformers.RoFormerTokenizer.mask_token",description:`<strong>mask_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;[MASK]&quot;</code>) &#x2014;
The token used for masking values. This is the token used when training this model with masked language
modeling. This is the token which the model will try to predict.`,name:"mask_token"},{anchor:"transformers.RoFormerTokenizer.tokenize_chinese_chars",description:`<strong>tokenize_chinese_chars</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to tokenize Chinese characters.</p>
<p>This should likely be deactivated for Japanese (see this
<a href="https://github.com/huggingface/transformers/issues/328" rel="nofollow">issue</a>).`,name:"tokenize_chinese_chars"},{anchor:"transformers.RoFormerTokenizer.strip_accents",description:`<strong>strip_accents</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to strip all accents. If this option is not specified, then it will be determined by the
value for <code>lowercase</code> (as in the original BERT).`,name:"strip_accents"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/roformer/tokenization_roformer.py#L299"}}),En=new Pe({props:{anchor:"transformers.RoFormerTokenizer.example",$$slots:{default:[zx]},$$scope:{ctx:M}}}),Rr=new B({props:{name:"build_inputs_with_special_tokens",anchor:"transformers.RoFormerTokenizer.build_inputs_with_special_tokens",parameters:[{name:"token_ids_0",val:": typing.List[int]"},{name:"token_ids_1",val:": typing.Optional[typing.List[int]] = None"}],parametersDescription:[{anchor:"transformers.RoFormerTokenizer.build_inputs_with_special_tokens.token_ids_0",description:`<strong>token_ids_0</strong> (<code>List[int]</code>) &#x2014;
List of IDs to which the special tokens will be added.`,name:"token_ids_0"},{anchor:"transformers.RoFormerTokenizer.build_inputs_with_special_tokens.token_ids_1",description:`<strong>token_ids_1</strong> (<code>List[int]</code>, <em>optional</em>) &#x2014;
Optional second list of IDs for sequence pairs.`,name:"token_ids_1"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/roformer/tokenization_roformer.py#L465",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>
`}}),jr=new B({props:{name:"get_special_tokens_mask",anchor:"transformers.RoFormerTokenizer.get_special_tokens_mask",parameters:[{name:"token_ids_0",val:": typing.List[int]"},{name:"token_ids_1",val:": typing.Optional[typing.List[int]] = None"},{name:"already_has_special_tokens",val:": bool = False"}],parametersDescription:[{anchor:"transformers.RoFormerTokenizer.get_special_tokens_mask.token_ids_0",description:`<strong>token_ids_0</strong> (<code>List[int]</code>) &#x2014;
List of IDs.`,name:"token_ids_0"},{anchor:"transformers.RoFormerTokenizer.get_special_tokens_mask.token_ids_1",description:`<strong>token_ids_1</strong> (<code>List[int]</code>, <em>optional</em>) &#x2014;
Optional second list of IDs for sequence pairs.`,name:"token_ids_1"},{anchor:"transformers.RoFormerTokenizer.get_special_tokens_mask.already_has_special_tokens",description:`<strong>already_has_special_tokens</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not the token list is already formatted with special tokens for the model.`,name:"already_has_special_tokens"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/roformer/tokenization_roformer.py#L490",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>
`}}),qr=new B({props:{name:"create_token_type_ids_from_sequences",anchor:"transformers.RoFormerTokenizer.create_token_type_ids_from_sequences",parameters:[{name:"token_ids_0",val:": typing.List[int]"},{name:"token_ids_1",val:": typing.Optional[typing.List[int]] = None"}],parametersDescription:[{anchor:"transformers.RoFormerTokenizer.create_token_type_ids_from_sequences.token_ids_0",description:`<strong>token_ids_0</strong> (<code>List[int]</code>) &#x2014;
List of IDs.`,name:"token_ids_0"},{anchor:"transformers.RoFormerTokenizer.create_token_type_ids_from_sequences.token_ids_1",description:`<strong>token_ids_1</strong> (<code>List[int]</code>, <em>optional</em>) &#x2014;
Optional second list of IDs for sequence pairs.`,name:"token_ids_1"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/roformer/tokenization_roformer.py#L518",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>
`}}),Rn=new Pe({props:{anchor:"transformers.RoFormerTokenizer.create_token_type_ids_from_sequences.example",$$slots:{default:[jx]},$$scope:{ctx:M}}}),Ar=new B({props:{name:"save_vocabulary",anchor:"transformers.RoFormerTokenizer.save_vocabulary",parameters:[{name:"save_directory",val:": str"},{name:"filename_prefix",val:": typing.Optional[str] = None"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/roformer/tokenization_roformer.py#L547"}}),Pr=new Qe({}),Lr=new B({props:{name:"class transformers.RoFormerTokenizerFast",anchor:"transformers.RoFormerTokenizerFast",parameters:[{name:"vocab_file",val:" = None"},{name:"tokenizer_file",val:" = None"},{name:"do_lower_case",val:" = True"},{name:"unk_token",val:" = '[UNK]'"},{name:"sep_token",val:" = '[SEP]'"},{name:"pad_token",val:" = '[PAD]'"},{name:"cls_token",val:" = '[CLS]'"},{name:"mask_token",val:" = '[MASK]'"},{name:"tokenize_chinese_chars",val:" = True"},{name:"strip_accents",val:" = None"},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/roformer/tokenization_roformer_fast.py#L71"}}),Cn=new Pe({props:{anchor:"transformers.RoFormerTokenizerFast.example",$$slots:{default:[Cx]},$$scope:{ctx:M}}}),Ir=new B({props:{name:"build_inputs_with_special_tokens",anchor:"transformers.RoFormerTokenizerFast.build_inputs_with_special_tokens",parameters:[{name:"token_ids_0",val:""},{name:"token_ids_1",val:" = None"}],parametersDescription:[{anchor:"transformers.RoFormerTokenizerFast.build_inputs_with_special_tokens.token_ids_0",description:`<strong>token_ids_0</strong> (<code>List[int]</code>) &#x2014;
List of IDs to which the special tokens will be added.`,name:"token_ids_0"},{anchor:"transformers.RoFormerTokenizerFast.build_inputs_with_special_tokens.token_ids_1",description:`<strong>token_ids_1</strong> (<code>List[int]</code>, <em>optional</em>) &#x2014;
Optional second list of IDs for sequence pairs.`,name:"token_ids_1"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/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>
`}}),Sr=new Qe({}),Wr=new B({props:{name:"class transformers.RoFormerModel",anchor:"transformers.RoFormerModel",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.RoFormerModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.27.1/en/model_doc/roformer#transformers.RoFormerConfig">RoFormerConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.27.1/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/roformer/modeling_roformer.py#L788"}}),Hr=new B({props:{name:"forward",anchor:"transformers.RoFormerModel.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"token_type_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"head_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"encoder_hidden_states",val:": typing.Optional[torch.FloatTensor] = None"},{name:"encoder_attention_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"past_key_values",val:": typing.Optional[typing.Tuple[typing.Tuple[torch.FloatTensor]]] = None"},{name:"use_cache",val:": typing.Optional[bool] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.RoFormerModel.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.27.1/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.RoFormerModel.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.RoFormerModel.forward.token_type_ids",description:`<strong>token_type_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.RoFormerModel.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.RoFormerModel.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <em>input_ids</em> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.RoFormerModel.forward.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.RoFormerModel.forward.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.RoFormerModel.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.RoFormerModel.forward.encoder_hidden_states",description:`<strong>encoder_hidden_states</strong>  (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Sequence of hidden-states at the output of the last layer of the encoder. Used in the cross-attention if
the model is configured as a decoder.`,name:"encoder_hidden_states"},{anchor:"transformers.RoFormerModel.forward.encoder_attention_mask",description:`<strong>encoder_attention_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on the padding token indices of the encoder input. This mask is used in
the cross-attention if the model is configured as a decoder. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>`,name:"encoder_attention_mask"},{anchor:"transformers.RoFormerModel.forward.past_key_values",description:`<strong>past_key_values</strong> (<code>tuple(tuple(torch.FloatTensor))</code> of length <code>config.n_layers</code> with each tuple having 4 tensors of shape <code>(batch_size, num_heads, sequence_length - 1, embed_size_per_head)</code>) &#x2014;
Contains precomputed key and value hidden states of the attention blocks. Can be used to speed up decoding.
If <code>past_key_values</code> are used, the user can optionally input only the last <code>decoder_input_ids</code> (those that
don&#x2019;t have their past key value states given to this model) of shape <code>(batch_size, 1)</code> instead of all
<code>decoder_input_ids</code> of shape <code>(batch_size, sequence_length)</code>.`,name:"past_key_values"},{anchor:"transformers.RoFormerModel.forward.use_cache",description:`<strong>use_cache</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
If set to <code>True</code>, <code>past_key_values</code> key value states are returned and can be used to speed up decoding (see
<code>past_key_values</code>).`,name:"use_cache"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/roformer/modeling_roformer.py#L828",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.modeling_outputs.BaseModelOutputWithPastAndCrossAttentions"
>transformers.modeling_outputs.BaseModelOutputWithPastAndCrossAttentions</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.27.1/en/model_doc/roformer#transformers.RoFormerConfig"
>RoFormerConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>last_hidden_state</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>) \u2014 Sequence of hidden-states at the output of the last layer of the model.</p>
<p>If <code>past_key_values</code> is used only the last hidden-state of the sequences of shape <code>(batch_size, 1, hidden_size)</code> is output.</p>
</li>
<li>
<p><strong>past_key_values</strong> (<code>tuple(tuple(torch.FloatTensor))</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) \u2014 Tuple of <code>tuple(torch.FloatTensor)</code> of length <code>config.n_layers</code>, with each tuple having 2 tensors of shape
<code>(batch_size, num_heads, sequence_length, embed_size_per_head)</code>) and optionally if
<code>config.is_encoder_decoder=True</code> 2 additional tensors of shape <code>(batch_size, num_heads, encoder_sequence_length, embed_size_per_head)</code>.</p>
<p>Contains pre-computed hidden-states (key and values in the self-attention blocks and optionally if
<code>config.is_encoder_decoder=True</code> in the cross-attention blocks) that can be used (see <code>past_key_values</code>
input) to speed up sequential decoding.</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
<li>
<p><strong>cross_attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> and <code>config.add_cross_attention=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights of the decoder\u2019s cross-attention layer, after the attention softmax, used to compute the
weighted average in the cross-attention heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.modeling_outputs.BaseModelOutputWithPastAndCrossAttentions"
>transformers.modeling_outputs.BaseModelOutputWithPastAndCrossAttentions</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),An=new Be({props:{$$slots:{default:[qx]},$$scope:{ctx:M}}}),Pn=new Pe({props:{anchor:"transformers.RoFormerModel.forward.example",$$slots:{default:[Ax]},$$scope:{ctx:M}}}),Vr=new Qe({}),Jr=new B({props:{name:"class transformers.RoFormerForCausalLM",anchor:"transformers.RoFormerForCausalLM",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.RoFormerForCausalLM.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.27.1/en/model_doc/roformer#transformers.RoFormerConfig">RoFormerConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.27.1/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/roformer/modeling_roformer.py#L1056"}}),Xr=new B({props:{name:"forward",anchor:"transformers.RoFormerForCausalLM.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"token_type_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"encoder_hidden_states",val:": typing.Optional[torch.FloatTensor] = None"},{name:"encoder_attention_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"head_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"cross_attn_head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"past_key_values",val:": typing.Optional[typing.Tuple[typing.Tuple[torch.FloatTensor]]] = None"},{name:"labels",val:": typing.Optional[torch.LongTensor] = None"},{name:"use_cache",val:": typing.Optional[bool] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.RoFormerForCausalLM.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.27.1/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.RoFormerForCausalLM.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.RoFormerForCausalLM.forward.token_type_ids",description:`<strong>token_type_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.RoFormerForCausalLM.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.RoFormerForCausalLM.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <em>input_ids</em> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.RoFormerForCausalLM.forward.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.RoFormerForCausalLM.forward.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.RoFormerForCausalLM.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.RoFormerForCausalLM.forward.encoder_hidden_states",description:`<strong>encoder_hidden_states</strong>  (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Sequence of hidden-states at the output of the last layer of the encoder. Used in the cross-attention if
the model is configured as a decoder.`,name:"encoder_hidden_states"},{anchor:"transformers.RoFormerForCausalLM.forward.encoder_attention_mask",description:`<strong>encoder_attention_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on the padding token indices of the encoder input. This mask is used in
the cross-attention if the model is configured as a decoder. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>`,name:"encoder_attention_mask"},{anchor:"transformers.RoFormerForCausalLM.forward.past_key_values",description:`<strong>past_key_values</strong> (<code>tuple(tuple(torch.FloatTensor))</code> of length <code>config.n_layers</code> with each tuple having 4 tensors of shape <code>(batch_size, num_heads, sequence_length - 1, embed_size_per_head)</code>) &#x2014;
Contains precomputed key and value hidden states of the attention blocks. Can be used to speed up decoding.
If <code>past_key_values</code> are used, the user can optionally input only the last <code>decoder_input_ids</code> (those that
don&#x2019;t have their past key value states given to this model) of shape <code>(batch_size, 1)</code> instead of all
<code>decoder_input_ids</code> of shape <code>(batch_size, sequence_length)</code>.`,name:"past_key_values"},{anchor:"transformers.RoFormerForCausalLM.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Labels for computing the left-to-right language modeling loss (next word prediction). Indices should be in
<code>[-100, 0, ..., config.vocab_size]</code> (see <code>input_ids</code> docstring) Tokens with indices set to <code>-100</code> are
ignored (masked), the loss is only computed for the tokens with labels n <code>[0, ..., config.vocab_size]</code>.`,name:"labels"},{anchor:"transformers.RoFormerForCausalLM.forward.use_cache",description:`<strong>use_cache</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
If set to <code>True</code>, <code>past_key_values</code> key value states are returned and can be used to speed up decoding (see
<code>past_key_values</code>).`,name:"use_cache"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/roformer/modeling_roformer.py#L1077",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.modeling_outputs.CausalLMOutputWithCrossAttentions"
>transformers.modeling_outputs.CausalLMOutputWithCrossAttentions</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.27.1/en/model_doc/roformer#transformers.RoFormerConfig"
>RoFormerConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Language modeling loss (for next-token prediction).</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, config.vocab_size)</code>) \u2014 Prediction scores of the language modeling head (scores for each vocabulary token before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
<li>
<p><strong>cross_attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Cross attentions weights after the attention softmax, used to compute the weighted average in the
cross-attention heads.</p>
</li>
<li>
<p><strong>past_key_values</strong> (<code>tuple(tuple(torch.FloatTensor))</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> tuples of length <code>config.n_layers</code>, with each tuple containing the cached key,
value states of the self-attention and the cross-attention layers if model is used in encoder-decoder
setting. Only relevant if <code>config.is_decoder = True</code>.</p>
<p>Contains pre-computed hidden-states (key and values in the attention blocks) that can be used (see
<code>past_key_values</code> input) to speed up sequential decoding.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.modeling_outputs.CausalLMOutputWithCrossAttentions"
>transformers.modeling_outputs.CausalLMOutputWithCrossAttentions</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),On=new Be({props:{$$slots:{default:[Px]},$$scope:{ctx:M}}}),Dn=new Pe({props:{anchor:"transformers.RoFormerForCausalLM.forward.example",$$slots:{default:[Lx]},$$scope:{ctx:M}}}),Yr=new Qe({}),Zr=new B({props:{name:"class transformers.RoFormerForMaskedLM",anchor:"transformers.RoFormerForMaskedLM",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.RoFormerForMaskedLM.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.27.1/en/model_doc/roformer#transformers.RoFormerConfig">RoFormerConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.27.1/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/roformer/modeling_roformer.py#L954"}}),oa=new B({props:{name:"forward",anchor:"transformers.RoFormerForMaskedLM.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"token_type_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"head_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"encoder_hidden_states",val:": typing.Optional[torch.FloatTensor] = None"},{name:"encoder_attention_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"labels",val:": typing.Optional[torch.LongTensor] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.RoFormerForMaskedLM.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.27.1/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.RoFormerForMaskedLM.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.RoFormerForMaskedLM.forward.token_type_ids",description:`<strong>token_type_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.RoFormerForMaskedLM.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.RoFormerForMaskedLM.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <em>input_ids</em> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.RoFormerForMaskedLM.forward.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.RoFormerForMaskedLM.forward.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.RoFormerForMaskedLM.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.RoFormerForMaskedLM.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Labels for computing the masked language modeling loss. Indices should be in <code>[-100, 0, ..., config.vocab_size]</code> (see <code>input_ids</code> docstring) Tokens with indices set to <code>-100</code> are ignored (masked), the
loss is only computed for the tokens with labels in <code>[0, ..., config.vocab_size]</code>.`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/roformer/modeling_roformer.py#L978",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.modeling_outputs.MaskedLMOutput"
>transformers.modeling_outputs.MaskedLMOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.27.1/en/model_doc/roformer#transformers.RoFormerConfig"
>RoFormerConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Masked language modeling (MLM) loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, config.vocab_size)</code>) \u2014 Prediction scores of the language modeling head (scores for each vocabulary token before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.modeling_outputs.MaskedLMOutput"
>transformers.modeling_outputs.MaskedLMOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Nn=new Be({props:{$$slots:{default:[Ox]},$$scope:{ctx:M}}}),Sn=new Pe({props:{anchor:"transformers.RoFormerForMaskedLM.forward.example",$$slots:{default:[Dx]},$$scope:{ctx:M}}}),ta=new Qe({}),na=new B({props:{name:"class transformers.RoFormerForSequenceClassification",anchor:"transformers.RoFormerForSequenceClassification",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.RoFormerForSequenceClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.27.1/en/model_doc/roformer#transformers.RoFormerConfig">RoFormerConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.27.1/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/roformer/modeling_roformer.py#L1228"}}),aa=new B({props:{name:"forward",anchor:"transformers.RoFormerForSequenceClassification.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"token_type_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"head_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"labels",val:": typing.Optional[torch.LongTensor] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.RoFormerForSequenceClassification.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.27.1/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.RoFormerForSequenceClassification.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.RoFormerForSequenceClassification.forward.token_type_ids",description:`<strong>token_type_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.RoFormerForSequenceClassification.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.RoFormerForSequenceClassification.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <em>input_ids</em> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.RoFormerForSequenceClassification.forward.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.RoFormerForSequenceClassification.forward.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.RoFormerForSequenceClassification.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.RoFormerForSequenceClassification.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for computing the sequence classification/regression loss. Indices should be in <code>[0, ..., config.num_labels - 1]</code>. If <code>config.num_labels == 1</code> a regression loss is computed (Mean-Square loss), If
<code>config.num_labels &gt; 1</code> a classification loss is computed (Cross-Entropy).`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/roformer/modeling_roformer.py#L1238",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.modeling_outputs.SequenceClassifierOutput"
>transformers.modeling_outputs.SequenceClassifierOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.27.1/en/model_doc/roformer#transformers.RoFormerConfig"
>RoFormerConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Classification (or regression if config.num_labels==1) loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, config.num_labels)</code>) \u2014 Classification (or regression if config.num_labels==1) scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.modeling_outputs.SequenceClassifierOutput"
>transformers.modeling_outputs.SequenceClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Un=new Be({props:{$$slots:{default:[Ix]},$$scope:{ctx:M}}}),Kn=new Pe({props:{anchor:"transformers.RoFormerForSequenceClassification.forward.example",$$slots:{default:[Nx]},$$scope:{ctx:M}}}),Bn=new Pe({props:{anchor:"transformers.RoFormerForSequenceClassification.forward.example-2",$$slots:{default:[Sx]},$$scope:{ctx:M}}}),ia=new Qe({}),la=new B({props:{name:"class transformers.RoFormerForMultipleChoice",anchor:"transformers.RoFormerForMultipleChoice",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.RoFormerForMultipleChoice.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.27.1/en/model_doc/roformer#transformers.RoFormerConfig">RoFormerConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.27.1/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/roformer/modeling_roformer.py#L1319"}}),pa=new B({props:{name:"forward",anchor:"transformers.RoFormerForMultipleChoice.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"token_type_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"head_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"labels",val:": typing.Optional[torch.LongTensor] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.RoFormerForMultipleChoice.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, num_choices, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.27.1/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.RoFormerForMultipleChoice.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_choices, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.RoFormerForMultipleChoice.forward.token_type_ids",description:`<strong>token_type_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, num_choices, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.RoFormerForMultipleChoice.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.RoFormerForMultipleChoice.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_choices, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <em>input_ids</em> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.RoFormerForMultipleChoice.forward.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.RoFormerForMultipleChoice.forward.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.RoFormerForMultipleChoice.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.RoFormerForMultipleChoice.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for computing the multiple choice classification loss. Indices should be in <code>[0, ..., num_choices-1]</code> where <code>num_choices</code> is the size of the second dimension of the input tensors. (See
<code>input_ids</code> above)`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/roformer/modeling_roformer.py#L1330",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.modeling_outputs.MultipleChoiceModelOutput"
>transformers.modeling_outputs.MultipleChoiceModelOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.27.1/en/model_doc/roformer#transformers.RoFormerConfig"
>RoFormerConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <em>(1,)</em>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Classification loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_choices)</code>) \u2014 <em>num_choices</em> is the second dimension of the input tensors. (see <em>input_ids</em> above).</p>
<p>Classification scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.modeling_outputs.MultipleChoiceModelOutput"
>transformers.modeling_outputs.MultipleChoiceModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Hn=new Be({props:{$$slots:{default:[Wx]},$$scope:{ctx:M}}}),Vn=new Pe({props:{anchor:"transformers.RoFormerForMultipleChoice.forward.example",$$slots:{default:[Ux]},$$scope:{ctx:M}}}),ma=new Qe({}),ha=new B({props:{name:"class transformers.RoFormerForTokenClassification",anchor:"transformers.RoFormerForTokenClassification",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.RoFormerForTokenClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.27.1/en/model_doc/roformer#transformers.RoFormerConfig">RoFormerConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.27.1/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/roformer/modeling_roformer.py#L1410"}}),ga=new B({props:{name:"forward",anchor:"transformers.RoFormerForTokenClassification.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"token_type_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"head_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"labels",val:": typing.Optional[torch.LongTensor] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.RoFormerForTokenClassification.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.27.1/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.RoFormerForTokenClassification.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.RoFormerForTokenClassification.forward.token_type_ids",description:`<strong>token_type_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.RoFormerForTokenClassification.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.RoFormerForTokenClassification.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <em>input_ids</em> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.RoFormerForTokenClassification.forward.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.RoFormerForTokenClassification.forward.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.RoFormerForTokenClassification.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.RoFormerForTokenClassification.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Labels for computing the token classification loss. Indices should be in <code>[0, ..., config.num_labels - 1]</code>.`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/roformer/modeling_roformer.py#L1422",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.modeling_outputs.TokenClassifierOutput"
>transformers.modeling_outputs.TokenClassifierOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.27.1/en/model_doc/roformer#transformers.RoFormerConfig"
>RoFormerConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided)  \u2014 Classification loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, config.num_labels)</code>) \u2014 Classification scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.modeling_outputs.TokenClassifierOutput"
>transformers.modeling_outputs.TokenClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Gn=new Be({props:{$$slots:{default:[Kx]},$$scope:{ctx:M}}}),Xn=new Pe({props:{anchor:"transformers.RoFormerForTokenClassification.forward.example",$$slots:{default:[Bx]},$$scope:{ctx:M}}}),_a=new Qe({}),ka=new B({props:{name:"class transformers.RoFormerForQuestionAnswering",anchor:"transformers.RoFormerForQuestionAnswering",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.RoFormerForQuestionAnswering.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.27.1/en/model_doc/roformer#transformers.RoFormerConfig">RoFormerConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.27.1/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/roformer/modeling_roformer.py#L1486"}}),Fa=new B({props:{name:"forward",anchor:"transformers.RoFormerForQuestionAnswering.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"token_type_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"head_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"start_positions",val:": typing.Optional[torch.LongTensor] = None"},{name:"end_positions",val:": typing.Optional[torch.LongTensor] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.RoFormerForQuestionAnswering.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.27.1/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.RoFormerForQuestionAnswering.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.RoFormerForQuestionAnswering.forward.token_type_ids",description:`<strong>token_type_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.RoFormerForQuestionAnswering.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.RoFormerForQuestionAnswering.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <em>input_ids</em> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.RoFormerForQuestionAnswering.forward.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.RoFormerForQuestionAnswering.forward.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.RoFormerForQuestionAnswering.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.RoFormerForQuestionAnswering.forward.start_positions",description:`<strong>start_positions</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for position (index) of the start of the labelled span for computing the token classification loss.
Positions are clamped to the length of the sequence (<code>sequence_length</code>). Position outside of the sequence
are not taken into account for computing the loss.`,name:"start_positions"},{anchor:"transformers.RoFormerForQuestionAnswering.forward.end_positions",description:`<strong>end_positions</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for position (index) of the end of the labelled span for computing the token classification loss.
Positions are clamped to the length of the sequence (<code>sequence_length</code>). Position outside of the sequence
are not taken into account for computing the loss.`,name:"end_positions"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/roformer/modeling_roformer.py#L1499",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.modeling_outputs.QuestionAnsweringModelOutput"
>transformers.modeling_outputs.QuestionAnsweringModelOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.27.1/en/model_doc/roformer#transformers.RoFormerConfig"
>RoFormerConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Total span extraction loss is the sum of a Cross-Entropy for the start and end positions.</p>
</li>
<li>
<p><strong>start_logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>) \u2014 Span-start scores (before SoftMax).</p>
</li>
<li>
<p><strong>end_logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>) \u2014 Span-end scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.modeling_outputs.QuestionAnsweringModelOutput"
>transformers.modeling_outputs.QuestionAnsweringModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Zn=new Be({props:{$$slots:{default:[Qx]},$$scope:{ctx:M}}}),es=new Pe({props:{anchor:"transformers.RoFormerForQuestionAnswering.forward.example",$$slots:{default:[Hx]},$$scope:{ctx:M}}}),ba=new Qe({}),wa=new B({props:{name:"class transformers.TFRoFormerModel",anchor:"transformers.TFRoFormerModel",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFRoFormerModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.27.1/en/model_doc/roformer#transformers.RoFormerConfig">RoFormerConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.27.1/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/roformer/modeling_tf_roformer.py#L806"}}),ts=new Be({props:{$$slots:{default:[Vx]},$$scope:{ctx:M}}}),Ea=new B({props:{name:"call",anchor:"transformers.TFRoFormerModel.call",parameters:[{name:"input_ids",val:": typing.Union[typing.List[tensorflow.python.framework.ops.Tensor], typing.List[numpy.ndarray], typing.List[keras.engine.keras_tensor.KerasTensor], typing.Dict[str, tensorflow.python.framework.ops.Tensor], typing.Dict[str, numpy.ndarray], typing.Dict[str, keras.engine.keras_tensor.KerasTensor], tensorflow.python.framework.ops.Tensor, numpy.ndarray, keras.engine.keras_tensor.KerasTensor, NoneType] = None"},{name:"attention_mask",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"token_type_ids",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"head_mask",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"inputs_embeds",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = 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"},{name:"training",val:": typing.Optional[bool] = False"}],parametersDescription:[{anchor:"transformers.TFRoFormerModel.call.input_ids",description:`<strong>input_ids</strong> (<code>np.ndarray</code>, <code>tf.Tensor</code>, <code>List[tf.Tensor]</code> \`<code>Dict[str, tf.Tensor]</code> or <code>Dict[str, np.ndarray]</code> and each example must have the shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.27.1/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.TFRoFormerModel.call.attention_mask",description:`<strong>attention_mask</strong> (<code>np.ndarray</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.TFRoFormerModel.call.token_type_ids",description:`<strong>token_type_ids</strong> (<code>np.ndarray</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.TFRoFormerModel.call.head_mask",description:`<strong>head_mask</strong> (<code>np.ndarray</code> or <code>tf.Tensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.TFRoFormerModel.call.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>np.ndarray</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.TFRoFormerModel.call.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail. This argument can be used only in eager mode, in graph mode the value in the
config will be used instead.`,name:"output_attentions"},{anchor:"transformers.TFRoFormerModel.call.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail. This argument can be used only in eager mode, in graph mode the value in the config will be
used instead.`,name:"output_hidden_states"},{anchor:"transformers.TFRoFormerModel.call.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.TFRoFormerModel.call.training",description:`<strong>training</strong> (<code>bool</code>, <em>optional</em>, defaults to \`False&#x201C;) &#x2014;
Whether or not to use the model in training mode (some modules like dropout modules have different
behaviors between training and evaluation).`,name:"training"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/roformer/modeling_tf_roformer.py#L812",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.modeling_tf_outputs.TFBaseModelOutputWithPooling"
>transformers.modeling_tf_outputs.TFBaseModelOutputWithPooling</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/v4.27.1/en/model_doc/roformer#transformers.RoFormerConfig"
>RoFormerConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>last_hidden_state</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>) \u2014 Sequence of hidden-states at the output of the last layer of the model.</p>
</li>
<li>
<p><strong>pooler_output</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, hidden_size)</code>) \u2014 Last layer hidden-state of the first token of the sequence (classification token) further processed by a
Linear layer and a Tanh activation function. The Linear layer weights are trained from the next sentence
prediction (classification) objective during pretraining.</p>
<p>This output is usually <em>not</em> a good summary of the semantic content of the input, you\u2019re often better with
averaging or pooling the sequence of hidden-states for the whole input sequence.</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.modeling_tf_outputs.TFBaseModelOutputWithPooling"
>transformers.modeling_tf_outputs.TFBaseModelOutputWithPooling</a> or <code>tuple(tf.Tensor)</code></p>
`}}),ns=new Be({props:{$$slots:{default:[Jx]},$$scope:{ctx:M}}}),ss=new Pe({props:{anchor:"transformers.TFRoFormerModel.call.example",$$slots:{default:[Gx]},$$scope:{ctx:M}}}),Ma=new Qe({}),Ra=new B({props:{name:"class transformers.TFRoFormerForMaskedLM",anchor:"transformers.TFRoFormerForMaskedLM",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFRoFormerForMaskedLM.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.27.1/en/model_doc/roformer#transformers.RoFormerConfig">RoFormerConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.27.1/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/roformer/modeling_tf_roformer.py#L853"}}),as=new Be({props:{$$slots:{default:[Xx]},$$scope:{ctx:M}}}),Aa=new B({props:{name:"call",anchor:"transformers.TFRoFormerForMaskedLM.call",parameters:[{name:"input_ids",val:": typing.Union[typing.List[tensorflow.python.framework.ops.Tensor], typing.List[numpy.ndarray], typing.List[keras.engine.keras_tensor.KerasTensor], typing.Dict[str, tensorflow.python.framework.ops.Tensor], typing.Dict[str, numpy.ndarray], typing.Dict[str, keras.engine.keras_tensor.KerasTensor], tensorflow.python.framework.ops.Tensor, numpy.ndarray, keras.engine.keras_tensor.KerasTensor, NoneType] = None"},{name:"attention_mask",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"token_type_ids",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"head_mask",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"inputs_embeds",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = 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"},{name:"labels",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"training",val:": typing.Optional[bool] = False"}],parametersDescription:[{anchor:"transformers.TFRoFormerForMaskedLM.call.input_ids",description:`<strong>input_ids</strong> (<code>np.ndarray</code>, <code>tf.Tensor</code>, <code>List[tf.Tensor]</code> \`<code>Dict[str, tf.Tensor]</code> or <code>Dict[str, np.ndarray]</code> and each example must have the shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.27.1/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.TFRoFormerForMaskedLM.call.attention_mask",description:`<strong>attention_mask</strong> (<code>np.ndarray</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.TFRoFormerForMaskedLM.call.token_type_ids",description:`<strong>token_type_ids</strong> (<code>np.ndarray</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.TFRoFormerForMaskedLM.call.head_mask",description:`<strong>head_mask</strong> (<code>np.ndarray</code> or <code>tf.Tensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.TFRoFormerForMaskedLM.call.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>np.ndarray</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.TFRoFormerForMaskedLM.call.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail. This argument can be used only in eager mode, in graph mode the value in the
config will be used instead.`,name:"output_attentions"},{anchor:"transformers.TFRoFormerForMaskedLM.call.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail. This argument can be used only in eager mode, in graph mode the value in the config will be
used instead.`,name:"output_hidden_states"},{anchor:"transformers.TFRoFormerForMaskedLM.call.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.TFRoFormerForMaskedLM.call.training",description:`<strong>training</strong> (<code>bool</code>, <em>optional</em>, defaults to \`False&#x201C;) &#x2014;
Whether or not to use the model in training mode (some modules like dropout modules have different
behaviors between training and evaluation).`,name:"training"},{anchor:"transformers.TFRoFormerForMaskedLM.call.labels",description:`<strong>labels</strong> (<code>tf.Tensor</code> or <code>np.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Labels for computing the masked language modeling loss. Indices should be in <code>[-100, 0, ..., config.vocab_size]</code> (see <code>input_ids</code> docstring) Tokens with indices set to <code>-100</code> are ignored (masked), the
loss is only computed for the tokens with labels in <code>[0, ..., config.vocab_size]</code>`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/roformer/modeling_tf_roformer.py#L869",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.modeling_tf_outputs.TFMaskedLMOutput"
>transformers.modeling_tf_outputs.TFMaskedLMOutput</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/v4.27.1/en/model_doc/roformer#transformers.RoFormerConfig"
>RoFormerConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>tf.Tensor</code> of shape <code>(n,)</code>, <em>optional</em>, where n is the number of non-masked labels, returned when <code>labels</code> is provided) \u2014 Masked language modeling (MLM) loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, config.vocab_size)</code>) \u2014 Prediction scores of the language modeling head (scores for each vocabulary token before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.modeling_tf_outputs.TFMaskedLMOutput"
>transformers.modeling_tf_outputs.TFMaskedLMOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),is=new Be({props:{$$slots:{default:[Yx]},$$scope:{ctx:M}}}),ls=new Pe({props:{anchor:"transformers.TFRoFormerForMaskedLM.call.example",$$slots:{default:[Zx]},$$scope:{ctx:M}}}),ds=new Pe({props:{anchor:"transformers.TFRoFormerForMaskedLM.call.example-2",$$slots:{default:[eE]},$$scope:{ctx:M}}}),Pa=new Qe({}),La=new B({props:{name:"class transformers.TFRoFormerForCausalLM",anchor:"transformers.TFRoFormerForCausalLM",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFRoFormerForCausalLM.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.27.1/en/model_doc/roformer#transformers.RoFormerConfig">RoFormerConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.27.1/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/roformer/modeling_tf_roformer.py#L931"}}),ps=new Be({props:{$$slots:{default:[oE]},$$scope:{ctx:M}}}),Sa=new B({props:{name:"call",anchor:"transformers.TFRoFormerForCausalLM.call",parameters:[{name:"input_ids",val:": typing.Union[typing.List[tensorflow.python.framework.ops.Tensor], typing.List[numpy.ndarray], typing.List[keras.engine.keras_tensor.KerasTensor], typing.Dict[str, tensorflow.python.framework.ops.Tensor], typing.Dict[str, numpy.ndarray], typing.Dict[str, keras.engine.keras_tensor.KerasTensor], tensorflow.python.framework.ops.Tensor, numpy.ndarray, keras.engine.keras_tensor.KerasTensor, NoneType] = None"},{name:"attention_mask",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"token_type_ids",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"head_mask",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"inputs_embeds",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = 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"},{name:"labels",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"training",val:": typing.Optional[bool] = False"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/roformer/modeling_tf_roformer.py#L944",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.modeling_tf_outputs.TFCausalLMOutput"
>transformers.modeling_tf_outputs.TFCausalLMOutput</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/v4.27.1/en/model_doc/roformer#transformers.RoFormerConfig"
>RoFormerConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>tf.Tensor</code> of shape <code>(n,)</code>, <em>optional</em>, where n is the number of non-masked labels, returned when <code>labels</code> is provided) \u2014 Language modeling loss (for next-token prediction).</p>
</li>
<li>
<p><strong>logits</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, config.vocab_size)</code>) \u2014 Prediction scores of the language modeling head (scores for each vocabulary token before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.modeling_tf_outputs.TFCausalLMOutput"
>transformers.modeling_tf_outputs.TFCausalLMOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),ms=new Pe({props:{anchor:"transformers.TFRoFormerForCausalLM.call.example",$$slots:{default:[tE]},$$scope:{ctx:M}}}),Wa=new Qe({}),Ua=new B({props:{name:"class transformers.TFRoFormerForSequenceClassification",anchor:"transformers.TFRoFormerForSequenceClassification",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFRoFormerForSequenceClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.27.1/en/model_doc/roformer#transformers.RoFormerConfig">RoFormerConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.27.1/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/roformer/modeling_tf_roformer.py#L1043"}}),us=new Be({props:{$$slots:{default:[nE]},$$scope:{ctx:M}}}),Ha=new B({props:{name:"call",anchor:"transformers.TFRoFormerForSequenceClassification.call",parameters:[{name:"input_ids",val:": typing.Union[typing.List[tensorflow.python.framework.ops.Tensor], typing.List[numpy.ndarray], typing.List[keras.engine.keras_tensor.KerasTensor], typing.Dict[str, tensorflow.python.framework.ops.Tensor], typing.Dict[str, numpy.ndarray], typing.Dict[str, keras.engine.keras_tensor.KerasTensor], tensorflow.python.framework.ops.Tensor, numpy.ndarray, keras.engine.keras_tensor.KerasTensor, NoneType] = None"},{name:"attention_mask",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"token_type_ids",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"head_mask",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"inputs_embeds",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = 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"},{name:"labels",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"training",val:": typing.Optional[bool] = False"}],parametersDescription:[{anchor:"transformers.TFRoFormerForSequenceClassification.call.input_ids",description:`<strong>input_ids</strong> (<code>np.ndarray</code>, <code>tf.Tensor</code>, <code>List[tf.Tensor]</code> \`<code>Dict[str, tf.Tensor]</code> or <code>Dict[str, np.ndarray]</code> and each example must have the shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.27.1/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.TFRoFormerForSequenceClassification.call.attention_mask",description:`<strong>attention_mask</strong> (<code>np.ndarray</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.TFRoFormerForSequenceClassification.call.token_type_ids",description:`<strong>token_type_ids</strong> (<code>np.ndarray</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.TFRoFormerForSequenceClassification.call.head_mask",description:`<strong>head_mask</strong> (<code>np.ndarray</code> or <code>tf.Tensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.TFRoFormerForSequenceClassification.call.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>np.ndarray</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.TFRoFormerForSequenceClassification.call.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail. This argument can be used only in eager mode, in graph mode the value in the
config will be used instead.`,name:"output_attentions"},{anchor:"transformers.TFRoFormerForSequenceClassification.call.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail. This argument can be used only in eager mode, in graph mode the value in the config will be
used instead.`,name:"output_hidden_states"},{anchor:"transformers.TFRoFormerForSequenceClassification.call.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.TFRoFormerForSequenceClassification.call.training",description:`<strong>training</strong> (<code>bool</code>, <em>optional</em>, defaults to \`False&#x201C;) &#x2014;
Whether or not to use the model in training mode (some modules like dropout modules have different
behaviors between training and evaluation).`,name:"training"},{anchor:"transformers.TFRoFormerForSequenceClassification.call.labels",description:`<strong>labels</strong> (<code>tf.Tensor</code> or <code>np.ndarray</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for computing the sequence classification/regression loss. Indices should be in <code>[0, ..., config.num_labels - 1]</code>. If <code>config.num_labels == 1</code> a regression loss is computed (Mean-Square loss), If
<code>config.num_labels &gt; 1</code> a classification loss is computed (Cross-Entropy).`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/roformer/modeling_tf_roformer.py#L1052",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.modeling_tf_outputs.TFSequenceClassifierOutput"
>transformers.modeling_tf_outputs.TFSequenceClassifierOutput</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/v4.27.1/en/model_doc/roformer#transformers.RoFormerConfig"
>RoFormerConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, )</code>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Classification (or regression if config.num_labels==1) loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, config.num_labels)</code>) \u2014 Classification (or regression if config.num_labels==1) scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.modeling_tf_outputs.TFSequenceClassifierOutput"
>transformers.modeling_tf_outputs.TFSequenceClassifierOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),fs=new Be({props:{$$slots:{default:[sE]},$$scope:{ctx:M}}}),gs=new Pe({props:{anchor:"transformers.TFRoFormerForSequenceClassification.call.example",$$slots:{default:[rE]},$$scope:{ctx:M}}}),_s=new Pe({props:{anchor:"transformers.TFRoFormerForSequenceClassification.call.example-2",$$slots:{default:[aE]},$$scope:{ctx:M}}}),Va=new Qe({}),Ja=new B({props:{name:"class transformers.TFRoFormerForMultipleChoice",anchor:"transformers.TFRoFormerForMultipleChoice",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFRoFormerForMultipleChoice.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.27.1/en/model_doc/roformer#transformers.RoFormerConfig">RoFormerConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.27.1/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/roformer/modeling_tf_roformer.py#L1118"}}),vs=new Be({props:{$$slots:{default:[iE]},$$scope:{ctx:M}}}),Za=new B({props:{name:"call",anchor:"transformers.TFRoFormerForMultipleChoice.call",parameters:[{name:"input_ids",val:": typing.Union[typing.List[tensorflow.python.framework.ops.Tensor], typing.List[numpy.ndarray], typing.List[keras.engine.keras_tensor.KerasTensor], typing.Dict[str, tensorflow.python.framework.ops.Tensor], typing.Dict[str, numpy.ndarray], typing.Dict[str, keras.engine.keras_tensor.KerasTensor], tensorflow.python.framework.ops.Tensor, numpy.ndarray, keras.engine.keras_tensor.KerasTensor, NoneType] = None"},{name:"attention_mask",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"token_type_ids",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"head_mask",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"inputs_embeds",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = 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"},{name:"labels",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"training",val:": typing.Optional[bool] = False"}],parametersDescription:[{anchor:"transformers.TFRoFormerForMultipleChoice.call.input_ids",description:`<strong>input_ids</strong> (<code>np.ndarray</code>, <code>tf.Tensor</code>, <code>List[tf.Tensor]</code> \`<code>Dict[str, tf.Tensor]</code> or <code>Dict[str, np.ndarray]</code> and each example must have the shape <code>(batch_size, num_choices, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.27.1/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.TFRoFormerForMultipleChoice.call.attention_mask",description:`<strong>attention_mask</strong> (<code>np.ndarray</code> or <code>tf.Tensor</code> of shape <code>(batch_size, num_choices, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.TFRoFormerForMultipleChoice.call.token_type_ids",description:`<strong>token_type_ids</strong> (<code>np.ndarray</code> or <code>tf.Tensor</code> of shape <code>(batch_size, num_choices, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.TFRoFormerForMultipleChoice.call.head_mask",description:`<strong>head_mask</strong> (<code>np.ndarray</code> or <code>tf.Tensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.TFRoFormerForMultipleChoice.call.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>np.ndarray</code> or <code>tf.Tensor</code> of shape <code>(batch_size, num_choices, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.TFRoFormerForMultipleChoice.call.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail. This argument can be used only in eager mode, in graph mode the value in the
config will be used instead.`,name:"output_attentions"},{anchor:"transformers.TFRoFormerForMultipleChoice.call.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail. This argument can be used only in eager mode, in graph mode the value in the config will be
used instead.`,name:"output_hidden_states"},{anchor:"transformers.TFRoFormerForMultipleChoice.call.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.TFRoFormerForMultipleChoice.call.training",description:`<strong>training</strong> (<code>bool</code>, <em>optional</em>, defaults to \`False&#x201C;) &#x2014;
Whether or not to use the model in training mode (some modules like dropout modules have different
behaviors between training and evaluation).`,name:"training"},{anchor:"transformers.TFRoFormerForMultipleChoice.call.labels",description:`<strong>labels</strong> (<code>tf.Tensor</code> or <code>np.ndarray</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for computing the multiple choice classification loss. Indices should be in <code>[0, ..., num_choices]</code>
where <code>num_choices</code> is the size of the second dimension of the input tensors. (See <code>input_ids</code> above)`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/roformer/modeling_tf_roformer.py#L1139",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.modeling_tf_outputs.TFMultipleChoiceModelOutput"
>transformers.modeling_tf_outputs.TFMultipleChoiceModelOutput</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/v4.27.1/en/model_doc/roformer#transformers.RoFormerConfig"
>RoFormerConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>tf.Tensor</code> of shape <em>(batch_size, )</em>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Classification loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, num_choices)</code>) \u2014 <em>num_choices</em> is the second dimension of the input tensors. (see <em>input_ids</em> above).</p>
<p>Classification scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.modeling_tf_outputs.TFMultipleChoiceModelOutput"
>transformers.modeling_tf_outputs.TFMultipleChoiceModelOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),ys=new Be({props:{$$slots:{default:[lE]},$$scope:{ctx:M}}}),Fs=new Pe({props:{anchor:"transformers.TFRoFormerForMultipleChoice.call.example",$$slots:{default:[dE]},$$scope:{ctx:M}}}),ei=new Qe({}),oi=new B({props:{name:"class transformers.TFRoFormerForTokenClassification",anchor:"transformers.TFRoFormerForTokenClassification",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFRoFormerForTokenClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.27.1/en/model_doc/roformer#transformers.RoFormerConfig">RoFormerConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.27.1/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/roformer/modeling_tf_roformer.py#L1241"}}),ws=new Be({props:{$$slots:{default:[cE]},$$scope:{ctx:M}}}),ri=new B({props:{name:"call",anchor:"transformers.TFRoFormerForTokenClassification.call",parameters:[{name:"input_ids",val:": typing.Union[typing.List[tensorflow.python.framework.ops.Tensor], typing.List[numpy.ndarray], typing.List[keras.engine.keras_tensor.KerasTensor], typing.Dict[str, tensorflow.python.framework.ops.Tensor], typing.Dict[str, numpy.ndarray], typing.Dict[str, keras.engine.keras_tensor.KerasTensor], tensorflow.python.framework.ops.Tensor, numpy.ndarray, keras.engine.keras_tensor.KerasTensor, NoneType] = None"},{name:"attention_mask",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"token_type_ids",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"head_mask",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"inputs_embeds",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = 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"},{name:"labels",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"training",val:": typing.Optional[bool] = False"}],parametersDescription:[{anchor:"transformers.TFRoFormerForTokenClassification.call.input_ids",description:`<strong>input_ids</strong> (<code>np.ndarray</code>, <code>tf.Tensor</code>, <code>List[tf.Tensor]</code> \`<code>Dict[str, tf.Tensor]</code> or <code>Dict[str, np.ndarray]</code> and each example must have the shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.27.1/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.TFRoFormerForTokenClassification.call.attention_mask",description:`<strong>attention_mask</strong> (<code>np.ndarray</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.TFRoFormerForTokenClassification.call.token_type_ids",description:`<strong>token_type_ids</strong> (<code>np.ndarray</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.TFRoFormerForTokenClassification.call.head_mask",description:`<strong>head_mask</strong> (<code>np.ndarray</code> or <code>tf.Tensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.TFRoFormerForTokenClassification.call.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>np.ndarray</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.TFRoFormerForTokenClassification.call.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail. This argument can be used only in eager mode, in graph mode the value in the
config will be used instead.`,name:"output_attentions"},{anchor:"transformers.TFRoFormerForTokenClassification.call.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail. This argument can be used only in eager mode, in graph mode the value in the config will be
used instead.`,name:"output_hidden_states"},{anchor:"transformers.TFRoFormerForTokenClassification.call.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.TFRoFormerForTokenClassification.call.training",description:`<strong>training</strong> (<code>bool</code>, <em>optional</em>, defaults to \`False&#x201C;) &#x2014;
Whether or not to use the model in training mode (some modules like dropout modules have different
behaviors between training and evaluation).`,name:"training"},{anchor:"transformers.TFRoFormerForTokenClassification.call.labels",description:`<strong>labels</strong> (<code>tf.Tensor</code> or <code>np.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Labels for computing the token classification loss. Indices should be in <code>[0, ..., config.num_labels - 1]</code>.`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/roformer/modeling_tf_roformer.py#L1253",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.modeling_tf_outputs.TFTokenClassifierOutput"
>transformers.modeling_tf_outputs.TFTokenClassifierOutput</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/v4.27.1/en/model_doc/roformer#transformers.RoFormerConfig"
>RoFormerConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>tf.Tensor</code> of shape <code>(n,)</code>, <em>optional</em>, where n is the number of unmasked labels, returned when <code>labels</code> is provided)  \u2014 Classification loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, config.num_labels)</code>) \u2014 Classification scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.modeling_tf_outputs.TFTokenClassifierOutput"
>transformers.modeling_tf_outputs.TFTokenClassifierOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),Ts=new Be({props:{$$slots:{default:[pE]},$$scope:{ctx:M}}}),$s=new Pe({props:{anchor:"transformers.TFRoFormerForTokenClassification.call.example",$$slots:{default:[mE]},$$scope:{ctx:M}}}),xs=new Pe({props:{anchor:"transformers.TFRoFormerForTokenClassification.call.example-2",$$slots:{default:[hE]},$$scope:{ctx:M}}}),ai=new Qe({}),ii=new B({props:{name:"class transformers.TFRoFormerForQuestionAnswering",anchor:"transformers.TFRoFormerForQuestionAnswering",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFRoFormerForQuestionAnswering.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.27.1/en/model_doc/roformer#transformers.RoFormerConfig">RoFormerConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.27.1/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/roformer/modeling_tf_roformer.py#L1318"}}),Ms=new Be({props:{$$slots:{default:[uE]},$$scope:{ctx:M}}}),pi=new B({props:{name:"call",anchor:"transformers.TFRoFormerForQuestionAnswering.call",parameters:[{name:"input_ids",val:": typing.Union[typing.List[tensorflow.python.framework.ops.Tensor], typing.List[numpy.ndarray], typing.List[keras.engine.keras_tensor.KerasTensor], typing.Dict[str, tensorflow.python.framework.ops.Tensor], typing.Dict[str, numpy.ndarray], typing.Dict[str, keras.engine.keras_tensor.KerasTensor], tensorflow.python.framework.ops.Tensor, numpy.ndarray, keras.engine.keras_tensor.KerasTensor, NoneType] = None"},{name:"attention_mask",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"token_type_ids",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"head_mask",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"inputs_embeds",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = 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"},{name:"start_positions",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"end_positions",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"training",val:": typing.Optional[bool] = False"}],parametersDescription:[{anchor:"transformers.TFRoFormerForQuestionAnswering.call.input_ids",description:`<strong>input_ids</strong> (<code>np.ndarray</code>, <code>tf.Tensor</code>, <code>List[tf.Tensor]</code> \`<code>Dict[str, tf.Tensor]</code> or <code>Dict[str, np.ndarray]</code> and each example must have the shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.27.1/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.TFRoFormerForQuestionAnswering.call.attention_mask",description:`<strong>attention_mask</strong> (<code>np.ndarray</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.TFRoFormerForQuestionAnswering.call.token_type_ids",description:`<strong>token_type_ids</strong> (<code>np.ndarray</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.TFRoFormerForQuestionAnswering.call.head_mask",description:`<strong>head_mask</strong> (<code>np.ndarray</code> or <code>tf.Tensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.TFRoFormerForQuestionAnswering.call.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>np.ndarray</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.TFRoFormerForQuestionAnswering.call.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail. This argument can be used only in eager mode, in graph mode the value in the
config will be used instead.`,name:"output_attentions"},{anchor:"transformers.TFRoFormerForQuestionAnswering.call.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail. This argument can be used only in eager mode, in graph mode the value in the config will be
used instead.`,name:"output_hidden_states"},{anchor:"transformers.TFRoFormerForQuestionAnswering.call.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.TFRoFormerForQuestionAnswering.call.training",description:`<strong>training</strong> (<code>bool</code>, <em>optional</em>, defaults to \`False&#x201C;) &#x2014;
Whether or not to use the model in training mode (some modules like dropout modules have different
behaviors between training and evaluation).`,name:"training"},{anchor:"transformers.TFRoFormerForQuestionAnswering.call.start_positions",description:`<strong>start_positions</strong> (<code>tf.Tensor</code> or <code>np.ndarray</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for position (index) of the start of the labelled span for computing the token classification loss.
Positions are clamped to the length of the sequence (<code>sequence_length</code>). Position outside of the sequence
are not taken into account for computing the loss.`,name:"start_positions"},{anchor:"transformers.TFRoFormerForQuestionAnswering.call.end_positions",description:`<strong>end_positions</strong> (<code>tf.Tensor</code> or <code>np.ndarray</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for position (index) of the end of the labelled span for computing the token classification loss.
Positions are clamped to the length of the sequence (<code>sequence_length</code>). Position outside of the sequence
are not taken into account for computing the loss.`,name:"end_positions"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/roformer/modeling_tf_roformer.py#L1329",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.modeling_tf_outputs.TFQuestionAnsweringModelOutput"
>transformers.modeling_tf_outputs.TFQuestionAnsweringModelOutput</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/v4.27.1/en/model_doc/roformer#transformers.RoFormerConfig"
>RoFormerConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, )</code>, <em>optional</em>, returned when <code>start_positions</code> and <code>end_positions</code> are provided) \u2014 Total span extraction loss is the sum of a Cross-Entropy for the start and end positions.</p>
</li>
<li>
<p><strong>start_logits</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>) \u2014 Span-start scores (before SoftMax).</p>
</li>
<li>
<p><strong>end_logits</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>) \u2014 Span-end scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.modeling_tf_outputs.TFQuestionAnsweringModelOutput"
>transformers.modeling_tf_outputs.TFQuestionAnsweringModelOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),Rs=new Be({props:{$$slots:{default:[fE]},$$scope:{ctx:M}}}),zs=new Pe({props:{anchor:"transformers.TFRoFormerForQuestionAnswering.call.example",$$slots:{default:[gE]},$$scope:{ctx:M}}}),js=new Pe({props:{anchor:"transformers.TFRoFormerForQuestionAnswering.call.example-2",$$slots:{default:[_E]},$$scope:{ctx:M}}}),mi=new Qe({}),hi=new B({props:{name:"class transformers.FlaxRoFormerModel",anchor:"transformers.FlaxRoFormerModel",parameters:[{name:"config",val:": RoFormerConfig"},{name:"input_shape",val:": typing.Tuple = (1, 1)"},{name:"seed",val:": int = 0"},{name:"dtype",val:": dtype = <class 'jax.numpy.float32'>"},{name:"_do_init",val:": bool = True"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.FlaxRoFormerModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.27.1/en/model_doc/roformer#transformers.RoFormerConfig">RoFormerConfig</a>) &#x2014; Model configuration class with all the parameters of the
model. Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.27.1/en/main_classes/model#transformers.FlaxPreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"},{anchor:"transformers.FlaxRoFormerModel.dtype",description:`<strong>dtype</strong> (<code>jax.numpy.dtype</code>, <em>optional</em>, defaults to <code>jax.numpy.float32</code>) &#x2014;
The data type of the computation. Can be one of <code>jax.numpy.float32</code>, <code>jax.numpy.float16</code> (on GPUs) and
<code>jax.numpy.bfloat16</code> (on TPUs).</p>
<p>This can be used to enable mixed-precision training or half-precision inference on GPUs or TPUs. If
specified all the computation will be performed with the given <code>dtype</code>.</p>
<p><strong>Note that this only specifies the dtype of the computation and does not influence the dtype of model
parameters.</strong></p>
<p>If you wish to change the dtype of the model parameters, see <a href="/docs/transformers/v4.27.1/en/main_classes/model#transformers.FlaxPreTrainedModel.to_fp16">to_fp16()</a> and
<a href="/docs/transformers/v4.27.1/en/main_classes/model#transformers.FlaxPreTrainedModel.to_bf16">to_bf16()</a>.`,name:"dtype"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/roformer/modeling_flax_roformer.py#L747"}}),Fi=new B({props:{name:"__call__",anchor:"transformers.FlaxRoFormerModel.__call__",parameters:[{name:"input_ids",val:""},{name:"attention_mask",val:" = None"},{name:"token_type_ids",val:" = None"},{name:"head_mask",val:" = None"},{name:"params",val:": dict = None"},{name:"dropout_rng",val:": PRNGKey = None"},{name:"train",val:": bool = False"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.FlaxRoFormerModel.__call__.input_ids",description:`<strong>input_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.27.1/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.FlaxRoFormerModel.__call__.attention_mask",description:`<strong>attention_mask</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.FlaxRoFormerModel.__call__.token_type_ids",description:`<strong>token_type_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.FlaxRoFormerModel.__call__.position_ids",description:`<strong>position_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.`,name:"position_ids"},{anchor:"transformers.FlaxRoFormerModel.__call__.head_mask",description:`<strong>head_mask</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <code>optional) -- Mask to nullify selected heads of the attention modules. Mask values selected in </code>[0, 1]\`:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.FlaxRoFormerModel.__call__.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/roformer/modeling_flax_roformer.py#L653",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.modeling_flax_outputs.FlaxBaseModelOutput"
>transformers.modeling_flax_outputs.FlaxBaseModelOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.27.1/en/model_doc/roformer#transformers.RoFormerConfig"
>RoFormerConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>last_hidden_state</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>) \u2014 Sequence of hidden-states at the output of the last layer of the model.</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.modeling_flax_outputs.FlaxBaseModelOutput"
>transformers.modeling_flax_outputs.FlaxBaseModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),qs=new Be({props:{$$slots:{default:[kE]},$$scope:{ctx:M}}}),As=new Pe({props:{anchor:"transformers.FlaxRoFormerModel.__call__.example",$$slots:{default:[vE]},$$scope:{ctx:M}}}),bi=new Qe({}),wi=new B({props:{name:"class transformers.FlaxRoFormerForMaskedLM",anchor:"transformers.FlaxRoFormerForMaskedLM",parameters:[{name:"config",val:": RoFormerConfig"},{name:"input_shape",val:": typing.Tuple = (1, 1)"},{name:"seed",val:": int = 0"},{name:"dtype",val:": dtype = <class 'jax.numpy.float32'>"},{name:"_do_init",val:": bool = True"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.FlaxRoFormerForMaskedLM.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.27.1/en/model_doc/roformer#transformers.RoFormerConfig">RoFormerConfig</a>) &#x2014; Model configuration class with all the parameters of the
model. Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.27.1/en/main_classes/model#transformers.FlaxPreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"},{anchor:"transformers.FlaxRoFormerForMaskedLM.dtype",description:`<strong>dtype</strong> (<code>jax.numpy.dtype</code>, <em>optional</em>, defaults to <code>jax.numpy.float32</code>) &#x2014;
The data type of the computation. Can be one of <code>jax.numpy.float32</code>, <code>jax.numpy.float16</code> (on GPUs) and
<code>jax.numpy.bfloat16</code> (on TPUs).</p>
<p>This can be used to enable mixed-precision training or half-precision inference on GPUs or TPUs. If
specified all the computation will be performed with the given <code>dtype</code>.</p>
<p><strong>Note that this only specifies the dtype of the computation and does not influence the dtype of model
parameters.</strong></p>
<p>If you wish to change the dtype of the model parameters, see <a href="/docs/transformers/v4.27.1/en/main_classes/model#transformers.FlaxPreTrainedModel.to_fp16">to_fp16()</a> and
<a href="/docs/transformers/v4.27.1/en/main_classes/model#transformers.FlaxPreTrainedModel.to_bf16">to_bf16()</a>.`,name:"dtype"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/roformer/modeling_flax_roformer.py#L805"}}),Ci=new B({props:{name:"__call__",anchor:"transformers.FlaxRoFormerForMaskedLM.__call__",parameters:[{name:"input_ids",val:""},{name:"attention_mask",val:" = None"},{name:"token_type_ids",val:" = None"},{name:"head_mask",val:" = None"},{name:"params",val:": dict = None"},{name:"dropout_rng",val:": PRNGKey = None"},{name:"train",val:": bool = False"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.FlaxRoFormerForMaskedLM.__call__.input_ids",description:`<strong>input_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.27.1/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.FlaxRoFormerForMaskedLM.__call__.attention_mask",description:`<strong>attention_mask</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.FlaxRoFormerForMaskedLM.__call__.token_type_ids",description:`<strong>token_type_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.FlaxRoFormerForMaskedLM.__call__.position_ids",description:`<strong>position_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.`,name:"position_ids"},{anchor:"transformers.FlaxRoFormerForMaskedLM.__call__.head_mask",description:`<strong>head_mask</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <code>optional) -- Mask to nullify selected heads of the attention modules. Mask values selected in </code>[0, 1]\`:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.FlaxRoFormerForMaskedLM.__call__.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/roformer/modeling_flax_roformer.py#L653",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.modeling_flax_outputs.FlaxMaskedLMOutput"
>transformers.modeling_flax_outputs.FlaxMaskedLMOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.27.1/en/model_doc/roformer#transformers.RoFormerConfig"
>RoFormerConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>logits</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, sequence_length, config.vocab_size)</code>) \u2014 Prediction scores of the language modeling head (scores for each vocabulary token before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.modeling_flax_outputs.FlaxMaskedLMOutput"
>transformers.modeling_flax_outputs.FlaxMaskedLMOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Ls=new Be({props:{$$slots:{default:[yE]},$$scope:{ctx:M}}}),Os=new Pe({props:{anchor:"transformers.FlaxRoFormerForMaskedLM.__call__.example",$$slots:{default:[FE]},$$scope:{ctx:M}}}),qi=new Qe({}),Ai=new B({props:{name:"class transformers.FlaxRoFormerForSequenceClassification",anchor:"transformers.FlaxRoFormerForSequenceClassification",parameters:[{name:"config",val:": RoFormerConfig"},{name:"input_shape",val:": typing.Tuple = (1, 1)"},{name:"seed",val:": int = 0"},{name:"dtype",val:": dtype = <class 'jax.numpy.float32'>"},{name:"_do_init",val:": bool = True"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.FlaxRoFormerForSequenceClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.27.1/en/model_doc/roformer#transformers.RoFormerConfig">RoFormerConfig</a>) &#x2014; Model configuration class with all the parameters of the
model. Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.27.1/en/main_classes/model#transformers.FlaxPreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"},{anchor:"transformers.FlaxRoFormerForSequenceClassification.dtype",description:`<strong>dtype</strong> (<code>jax.numpy.dtype</code>, <em>optional</em>, defaults to <code>jax.numpy.float32</code>) &#x2014;
The data type of the computation. Can be one of <code>jax.numpy.float32</code>, <code>jax.numpy.float16</code> (on GPUs) and
<code>jax.numpy.bfloat16</code> (on TPUs).</p>
<p>This can be used to enable mixed-precision training or half-precision inference on GPUs or TPUs. If
specified all the computation will be performed with the given <code>dtype</code>.</p>
<p><strong>Note that this only specifies the dtype of the computation and does not influence the dtype of model
parameters.</strong></p>
<p>If you wish to change the dtype of the model parameters, see <a href="/docs/transformers/v4.27.1/en/main_classes/model#transformers.FlaxPreTrainedModel.to_fp16">to_fp16()</a> and
<a href="/docs/transformers/v4.27.1/en/main_classes/model#transformers.FlaxPreTrainedModel.to_bf16">to_bf16()</a>.`,name:"dtype"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/roformer/modeling_flax_roformer.py#L869"}}),Wi=new B({props:{name:"__call__",anchor:"transformers.FlaxRoFormerForSequenceClassification.__call__",parameters:[{name:"input_ids",val:""},{name:"attention_mask",val:" = None"},{name:"token_type_ids",val:" = None"},{name:"head_mask",val:" = None"},{name:"params",val:": dict = None"},{name:"dropout_rng",val:": PRNGKey = None"},{name:"train",val:": bool = False"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.FlaxRoFormerForSequenceClassification.__call__.input_ids",description:`<strong>input_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.27.1/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.FlaxRoFormerForSequenceClassification.__call__.attention_mask",description:`<strong>attention_mask</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.FlaxRoFormerForSequenceClassification.__call__.token_type_ids",description:`<strong>token_type_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.FlaxRoFormerForSequenceClassification.__call__.position_ids",description:`<strong>position_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.`,name:"position_ids"},{anchor:"transformers.FlaxRoFormerForSequenceClassification.__call__.head_mask",description:`<strong>head_mask</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <code>optional) -- Mask to nullify selected heads of the attention modules. Mask values selected in </code>[0, 1]\`:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.FlaxRoFormerForSequenceClassification.__call__.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/roformer/modeling_flax_roformer.py#L653",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.modeling_flax_outputs.FlaxSequenceClassifierOutput"
>transformers.modeling_flax_outputs.FlaxSequenceClassifierOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.27.1/en/model_doc/roformer#transformers.RoFormerConfig"
>RoFormerConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>logits</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, config.num_labels)</code>) \u2014 Classification (or regression if config.num_labels==1) scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.modeling_flax_outputs.FlaxSequenceClassifierOutput"
>transformers.modeling_flax_outputs.FlaxSequenceClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Is=new Be({props:{$$slots:{default:[bE]},$$scope:{ctx:M}}}),Ns=new Pe({props:{anchor:"transformers.FlaxRoFormerForSequenceClassification.__call__.example",$$slots:{default:[wE]},$$scope:{ctx:M}}}),Ui=new Qe({}),Ki=new B({props:{name:"class transformers.FlaxRoFormerForMultipleChoice",anchor:"transformers.FlaxRoFormerForMultipleChoice",parameters:[{name:"config",val:": RoFormerConfig"},{name:"input_shape",val:": typing.Tuple = (1, 1)"},{name:"seed",val:": int = 0"},{name:"dtype",val:": dtype = <class 'jax.numpy.float32'>"},{name:"_do_init",val:": bool = True"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.FlaxRoFormerForMultipleChoice.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.27.1/en/model_doc/roformer#transformers.RoFormerConfig">RoFormerConfig</a>) &#x2014; Model configuration class with all the parameters of the
model. Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.27.1/en/main_classes/model#transformers.FlaxPreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"},{anchor:"transformers.FlaxRoFormerForMultipleChoice.dtype",description:`<strong>dtype</strong> (<code>jax.numpy.dtype</code>, <em>optional</em>, defaults to <code>jax.numpy.float32</code>) &#x2014;
The data type of the computation. Can be one of <code>jax.numpy.float32</code>, <code>jax.numpy.float16</code> (on GPUs) and
<code>jax.numpy.bfloat16</code> (on TPUs).</p>
<p>This can be used to enable mixed-precision training or half-precision inference on GPUs or TPUs. If
specified all the computation will be performed with the given <code>dtype</code>.</p>
<p><strong>Note that this only specifies the dtype of the computation and does not influence the dtype of model
parameters.</strong></p>
<p>If you wish to change the dtype of the model parameters, see <a href="/docs/transformers/v4.27.1/en/main_classes/model#transformers.FlaxPreTrainedModel.to_fp16">to_fp16()</a> and
<a href="/docs/transformers/v4.27.1/en/main_classes/model#transformers.FlaxPreTrainedModel.to_bf16">to_bf16()</a>.`,name:"dtype"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/roformer/modeling_flax_roformer.py#L944"}}),Yi=new B({props:{name:"__call__",anchor:"transformers.FlaxRoFormerForMultipleChoice.__call__",parameters:[{name:"input_ids",val:""},{name:"attention_mask",val:" = None"},{name:"token_type_ids",val:" = None"},{name:"head_mask",val:" = None"},{name:"params",val:": dict = None"},{name:"dropout_rng",val:": PRNGKey = None"},{name:"train",val:": bool = False"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.FlaxRoFormerForMultipleChoice.__call__.input_ids",description:`<strong>input_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, num_choices, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.27.1/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.FlaxRoFormerForMultipleChoice.__call__.attention_mask",description:`<strong>attention_mask</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, num_choices, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.FlaxRoFormerForMultipleChoice.__call__.token_type_ids",description:`<strong>token_type_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, num_choices, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.FlaxRoFormerForMultipleChoice.__call__.position_ids",description:`<strong>position_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, num_choices, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.`,name:"position_ids"},{anchor:"transformers.FlaxRoFormerForMultipleChoice.__call__.head_mask",description:`<strong>head_mask</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, num_choices, sequence_length)</code>, <code>optional) -- Mask to nullify selected heads of the attention modules. Mask values selected in </code>[0, 1]\`:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.FlaxRoFormerForMultipleChoice.__call__.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/roformer/modeling_flax_roformer.py#L653",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.modeling_flax_outputs.FlaxMultipleChoiceModelOutput"
>transformers.modeling_flax_outputs.FlaxMultipleChoiceModelOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.27.1/en/model_doc/roformer#transformers.RoFormerConfig"
>RoFormerConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>logits</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, num_choices)</code>) \u2014 <em>num_choices</em> is the second dimension of the input tensors. (see <em>input_ids</em> above).</p>
<p>Classification scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.modeling_flax_outputs.FlaxMultipleChoiceModelOutput"
>transformers.modeling_flax_outputs.FlaxMultipleChoiceModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Ws=new Be({props:{$$slots:{default:[TE]},$$scope:{ctx:M}}}),Us=new Pe({props:{anchor:"transformers.FlaxRoFormerForMultipleChoice.__call__.example",$$slots:{default:[$E]},$$scope:{ctx:M}}}),Zi=new Qe({}),el=new B({props:{name:"class transformers.FlaxRoFormerForTokenClassification",anchor:"transformers.FlaxRoFormerForTokenClassification",parameters:[{name:"config",val:": RoFormerConfig"},{name:"input_shape",val:": typing.Tuple = (1, 1)"},{name:"seed",val:": int = 0"},{name:"dtype",val:": dtype = <class 'jax.numpy.float32'>"},{name:"_do_init",val:": bool = True"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.FlaxRoFormerForTokenClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.27.1/en/model_doc/roformer#transformers.RoFormerConfig">RoFormerConfig</a>) &#x2014; Model configuration class with all the parameters of the
model. Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.27.1/en/main_classes/model#transformers.FlaxPreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"},{anchor:"transformers.FlaxRoFormerForTokenClassification.dtype",description:`<strong>dtype</strong> (<code>jax.numpy.dtype</code>, <em>optional</em>, defaults to <code>jax.numpy.float32</code>) &#x2014;
The data type of the computation. Can be one of <code>jax.numpy.float32</code>, <code>jax.numpy.float16</code> (on GPUs) and
<code>jax.numpy.bfloat16</code> (on TPUs).</p>
<p>This can be used to enable mixed-precision training or half-precision inference on GPUs or TPUs. If
specified all the computation will be performed with the given <code>dtype</code>.</p>
<p><strong>Note that this only specifies the dtype of the computation and does not influence the dtype of model
parameters.</strong></p>
<p>If you wish to change the dtype of the model parameters, see <a href="/docs/transformers/v4.27.1/en/main_classes/model#transformers.FlaxPreTrainedModel.to_fp16">to_fp16()</a> and
<a href="/docs/transformers/v4.27.1/en/main_classes/model#transformers.FlaxPreTrainedModel.to_bf16">to_bf16()</a>.`,name:"dtype"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/roformer/modeling_flax_roformer.py#L1012"}}),ll=new B({props:{name:"__call__",anchor:"transformers.FlaxRoFormerForTokenClassification.__call__",parameters:[{name:"input_ids",val:""},{name:"attention_mask",val:" = None"},{name:"token_type_ids",val:" = None"},{name:"head_mask",val:" = None"},{name:"params",val:": dict = None"},{name:"dropout_rng",val:": PRNGKey = None"},{name:"train",val:": bool = False"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.FlaxRoFormerForTokenClassification.__call__.input_ids",description:`<strong>input_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.27.1/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.FlaxRoFormerForTokenClassification.__call__.attention_mask",description:`<strong>attention_mask</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.FlaxRoFormerForTokenClassification.__call__.token_type_ids",description:`<strong>token_type_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.FlaxRoFormerForTokenClassification.__call__.position_ids",description:`<strong>position_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.`,name:"position_ids"},{anchor:"transformers.FlaxRoFormerForTokenClassification.__call__.head_mask",description:`<strong>head_mask</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <code>optional) -- Mask to nullify selected heads of the attention modules. Mask values selected in </code>[0, 1]\`:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.FlaxRoFormerForTokenClassification.__call__.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/roformer/modeling_flax_roformer.py#L653",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.modeling_flax_outputs.FlaxTokenClassifierOutput"
>transformers.modeling_flax_outputs.FlaxTokenClassifierOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.27.1/en/model_doc/roformer#transformers.RoFormerConfig"
>RoFormerConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>logits</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, sequence_length, config.num_labels)</code>) \u2014 Classification scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.modeling_flax_outputs.FlaxTokenClassifierOutput"
>transformers.modeling_flax_outputs.FlaxTokenClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Bs=new Be({props:{$$slots:{default:[xE]},$$scope:{ctx:M}}}),Qs=new Pe({props:{anchor:"transformers.FlaxRoFormerForTokenClassification.__call__.example",$$slots:{default:[EE]},$$scope:{ctx:M}}}),dl=new Qe({}),cl=new B({props:{name:"class transformers.FlaxRoFormerForQuestionAnswering",anchor:"transformers.FlaxRoFormerForQuestionAnswering",parameters:[{name:"config",val:": RoFormerConfig"},{name:"input_shape",val:": typing.Tuple = (1, 1)"},{name:"seed",val:": int = 0"},{name:"dtype",val:": dtype = <class 'jax.numpy.float32'>"},{name:"_do_init",val:": bool = True"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.FlaxRoFormerForQuestionAnswering.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.27.1/en/model_doc/roformer#transformers.RoFormerConfig">RoFormerConfig</a>) &#x2014; Model configuration class with all the parameters of the
model. Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.27.1/en/main_classes/model#transformers.FlaxPreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"},{anchor:"transformers.FlaxRoFormerForQuestionAnswering.dtype",description:`<strong>dtype</strong> (<code>jax.numpy.dtype</code>, <em>optional</em>, defaults to <code>jax.numpy.float32</code>) &#x2014;
The data type of the computation. Can be one of <code>jax.numpy.float32</code>, <code>jax.numpy.float16</code> (on GPUs) and
<code>jax.numpy.bfloat16</code> (on TPUs).</p>
<p>This can be used to enable mixed-precision training or half-precision inference on GPUs or TPUs. If
specified all the computation will be performed with the given <code>dtype</code>.</p>
<p><strong>Note that this only specifies the dtype of the computation and does not influence the dtype of model
parameters.</strong></p>
<p>If you wish to change the dtype of the model parameters, see <a href="/docs/transformers/v4.27.1/en/main_classes/model#transformers.FlaxPreTrainedModel.to_fp16">to_fp16()</a> and
<a href="/docs/transformers/v4.27.1/en/main_classes/model#transformers.FlaxPreTrainedModel.to_bf16">to_bf16()</a>.`,name:"dtype"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/roformer/modeling_flax_roformer.py#L1080"}}),kl=new B({props:{name:"__call__",anchor:"transformers.FlaxRoFormerForQuestionAnswering.__call__",parameters:[{name:"input_ids",val:""},{name:"attention_mask",val:" = None"},{name:"token_type_ids",val:" = None"},{name:"head_mask",val:" = None"},{name:"params",val:": dict = None"},{name:"dropout_rng",val:": PRNGKey = None"},{name:"train",val:": bool = False"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.FlaxRoFormerForQuestionAnswering.__call__.input_ids",description:`<strong>input_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.27.1/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.FlaxRoFormerForQuestionAnswering.__call__.attention_mask",description:`<strong>attention_mask</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.FlaxRoFormerForQuestionAnswering.__call__.token_type_ids",description:`<strong>token_type_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.FlaxRoFormerForQuestionAnswering.__call__.position_ids",description:`<strong>position_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.`,name:"position_ids"},{anchor:"transformers.FlaxRoFormerForQuestionAnswering.__call__.head_mask",description:`<strong>head_mask</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <code>optional) -- Mask to nullify selected heads of the attention modules. Mask values selected in </code>[0, 1]\`:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.FlaxRoFormerForQuestionAnswering.__call__.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/roformer/modeling_flax_roformer.py#L653",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.modeling_flax_outputs.FlaxQuestionAnsweringModelOutput"
>transformers.modeling_flax_outputs.FlaxQuestionAnsweringModelOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.27.1/en/model_doc/roformer#transformers.RoFormerConfig"
>RoFormerConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>start_logits</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, sequence_length)</code>) \u2014 Span-start scores (before SoftMax).</p>
</li>
<li>
<p><strong>end_logits</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, sequence_length)</code>) \u2014 Span-end scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.modeling_flax_outputs.FlaxQuestionAnsweringModelOutput"
>transformers.modeling_flax_outputs.FlaxQuestionAnsweringModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Vs=new Be({props:{$$slots:{default:[ME]},$$scope:{ctx:M}}}),Js=new Pe({props:{anchor:"transformers.FlaxRoFormerForQuestionAnswering.__call__.example",$$slots:{default:[RE]},$$scope:{ctx:M}}}),{c(){d=s("meta"),k=p(),h=s("h1"),u=s("a"),_=s("span"),F(l.$$.fragment),c=p(),z=s("span"),be=t("RoFormer"),fe=p(),I=s("h2"),ae=s("a"),ee=s("span"),F(E.$$.fragment),we=p(),Q=s("span"),Te=t("Overview"),ge=p(),N=s("p"),$e=t("The RoFormer model was proposed in "),ie=s("a"),V=t("RoFormer: Enhanced Transformer with Rotary Position Embedding"),xe=t(" by Jianlin Su and Yu Lu and Shengfeng Pan and Bo Wen and Yunfeng Liu."),_e=p(),W=s("p"),Ee=t("The abstract from the paper is the following:"),ke=p(),U=s("p"),pe=s("em"),Me=t(`Position encoding in transformer architecture provides supervision for dependency modeling between elements at
different positions in the sequence. We investigate various methods to encode positional information in
transformer-based language models and propose a novel implementation named Rotary Position Embedding(RoPE). The
proposed RoPE encodes absolute positional information with rotation matrix and naturally incorporates explicit relative
position dependency in self-attention formulation. Notably, RoPE comes with valuable properties such as flexibility of
being expand to any sequence lengths, decaying inter-token dependency with increasing relative distances, and
capability of equipping the linear self-attention with relative position encoding. As a result, the enhanced
transformer with rotary position embedding, or RoFormer, achieves superior performance in tasks with long texts. We
release the theoretical analysis along with some preliminary experiment results on Chinese data. The undergoing
experiment for English benchmark will soon be updated.`),te=p(),C=s("p"),P=t("Tips:"),ve=p(),K=s("ul"),me=s("li"),Re=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.`),H=p(),se=s("p"),ze=t("This model was contributed by "),A=s("a"),je=t("junnyu"),J=t(". The original code can be found "),le=s("a"),Ce=t("here"),G=t("."),ye=p(),re=s("h2"),O=s("a"),he=s("span"),F(S.$$.fragment),qe=p(),oe=s("span"),L=t("Documentation resources"),Fe=p(),q=s("ul"),ue=s("li"),de=s("a"),y=t("Text classification task guide"),R=p(),Se=s("li"),Z=s("a"),He=t("Token classification task guide"),Ve=p(),j=s("li"),De=s("a"),Je=t("Question answering task guide"),Ge=p(),We=s("li"),Ie=s("a"),D=t("Causal language modeling task guide"),X=p(),Ue=s("li"),Ne=s("a"),Y=t("Masked language modeling task guide"),Xe=p(),Ke=s("li"),ce=s("a"),Ye=t("Multiple choice task guide"),ne=p(),Ae=s("h2"),Tn=s("a"),Sd=s("span"),F(Fr.$$.fragment),hf=p(),Wd=s("span"),uf=t("RoFormerConfig"),mh=p(),Co=s("div"),F(br.$$.fragment),ff=p(),$t=s("p"),gf=t("This is the configuration class to store the configuration of a "),El=s("a"),_f=t("RoFormerModel"),kf=t(`. It is used to instantiate an
RoFormer model according to the specified arguments, defining the model architecture. Instantiating a configuration
with the defaults will yield a similar configuration to that of the RoFormer
`),wr=s("a"),vf=t("junnyu/roformer_chinese_base"),yf=t(" architecture."),Ff=p(),xt=s("p"),bf=t("Configuration objects inherit from "),Ml=s("a"),wf=t("PretrainedConfig"),Tf=t(` and can be used to control the model outputs. Read the
documentation from `),Rl=s("a"),$f=t("PretrainedConfig"),xf=t(" for more information."),Ef=p(),F($n.$$.fragment),hh=p(),Et=s("h2"),xn=s("a"),Ud=s("span"),F(Tr.$$.fragment),Mf=p(),Kd=s("span"),Rf=t("RoFormerTokenizer"),uh=p(),Ze=s("div"),F($r.$$.fragment),zf=p(),xr=s("p"),jf=t("Construct a RoFormer tokenizer. Based on "),Er=s("a"),Cf=t("Rust Jieba"),qf=t("."),Af=p(),Mr=s("p"),Pf=t("This tokenizer inherits from "),zl=s("a"),Lf=t("PreTrainedTokenizer"),Of=t(` which contains most of the main methods. Users should refer to
this superclass for more information regarding those methods.`),Df=p(),F(En.$$.fragment),If=p(),gt=s("div"),F(Rr.$$.fragment),Nf=p(),Bd=s("p"),Sf=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:`),Wf=p(),zr=s("ul"),jl=s("li"),Uf=t("single sequence: "),Qd=s("code"),Kf=t("[CLS] X [SEP]"),Bf=p(),Cl=s("li"),Qf=t("pair of sequences: "),Hd=s("code"),Hf=t("[CLS] A [SEP] B [SEP]"),Vf=p(),Mn=s("div"),F(jr.$$.fragment),Jf=p(),Cr=s("p"),Gf=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 `),Vd=s("code"),Xf=t("prepare_for_model"),Yf=t(" method."),Zf=p(),Oo=s("div"),F(qr.$$.fragment),eg=p(),Jd=s("p"),og=t("Create a mask from the two sequences passed to be used in a sequence-pair classification task. A RoFormer"),tg=p(),F(Rn.$$.fragment),ng=p(),Mt=s("p"),sg=t("If "),Gd=s("code"),rg=t("token_ids_1"),ag=t(" is "),Xd=s("code"),ig=t("None"),lg=t(", this method only returns the first portion of the mask (0s)."),dg=p(),ql=s("div"),F(Ar.$$.fragment),fh=p(),Rt=s("h2"),zn=s("a"),Yd=s("span"),F(Pr.$$.fragment),cg=p(),Zd=s("span"),pg=t("RoFormerTokenizerFast"),gh=p(),io=s("div"),F(Lr.$$.fragment),mg=p(),Or=s("p"),hg=t("Construct a \u201Cfast\u201D RoFormer tokenizer (backed by HuggingFace\u2019s "),ec=s("em"),ug=t("tokenizers"),fg=t(" library)."),gg=p(),jn=s("p"),Al=s("a"),_g=t("RoFormerTokenizerFast"),kg=t(" is almost identical to "),Pl=s("a"),vg=t("BertTokenizerFast"),yg=t(` and runs end-to-end tokenization:
punctuation splitting and wordpiece. There are some difference between them when tokenizing Chinese.`),Fg=p(),Dr=s("p"),bg=t("This tokenizer inherits from "),Ll=s("a"),wg=t("PreTrainedTokenizerFast"),Tg=t(` which contains most of the main methods. Users should
refer to this superclass for more information regarding those methods.`),$g=p(),F(Cn.$$.fragment),xg=p(),_t=s("div"),F(Ir.$$.fragment),Eg=p(),oc=s("p"),Mg=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:`),Rg=p(),Nr=s("ul"),Ol=s("li"),zg=t("single sequence: "),tc=s("code"),jg=t("[CLS] X [SEP]"),Cg=p(),Dl=s("li"),qg=t("pair of sequences: "),nc=s("code"),Ag=t("[CLS] A [SEP] B [SEP]"),_h=p(),zt=s("h2"),qn=s("a"),sc=s("span"),F(Sr.$$.fragment),Pg=p(),rc=s("span"),Lg=t("RoFormerModel"),kh=p(),_o=s("div"),F(Wr.$$.fragment),Og=p(),Ur=s("p"),Dg=t(`The bare RoFormer Model transformer outputting raw hidden-states without any specific head on top.
This model is a PyTorch `),Kr=s("a"),Ig=t("torch.nn.Module"),Ng=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.`),Sg=p(),Br=s("p"),Wg=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 `),Qr=s("a"),Ug=t(`Attention is
all you need`),Kg=t(` by Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit,
Llion Jones, Aidan N. Gomez, Lukasz Kaiser and Illia Polosukhin.`),Bg=p(),lo=s("p"),Qg=t("To behave as an decoder the model needs to be initialized with the "),ac=s("code"),Hg=t("is_decoder"),Vg=t(` argument of the configuration set
to `),ic=s("code"),Jg=t("True"),Gg=t(". To be used in a Seq2Seq model, the model needs to initialized with both "),lc=s("code"),Xg=t("is_decoder"),Yg=t(` argument and
`),dc=s("code"),Zg=t("add_cross_attention"),e_=t(" set to "),cc=s("code"),o_=t("True"),t_=t("; an "),pc=s("code"),n_=t("encoder_hidden_states"),s_=t(" is then expected as an input to the forward pass."),r_=p(),Do=s("div"),F(Hr.$$.fragment),a_=p(),jt=s("p"),i_=t("The "),Il=s("a"),l_=t("RoFormerModel"),d_=t(" forward method, overrides the "),mc=s("code"),c_=t("__call__"),p_=t(" special method."),m_=p(),F(An.$$.fragment),h_=p(),F(Pn.$$.fragment),vh=p(),Ct=s("h2"),Ln=s("a"),hc=s("span"),F(Vr.$$.fragment),u_=p(),uc=s("span"),f_=t("RoFormerForCausalLM"),yh=p(),it=s("div"),F(Jr.$$.fragment),g_=p(),qt=s("p"),__=t("RoFormer Model with a "),fc=s("code"),k_=t("language modeling"),v_=t(` head on top for CLM fine-tuning.
This model is a PyTorch `),Gr=s("a"),y_=t("torch.nn.Module"),F_=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.`),b_=p(),Io=s("div"),F(Xr.$$.fragment),w_=p(),At=s("p"),T_=t("The "),Nl=s("a"),$_=t("RoFormerForCausalLM"),x_=t(" forward method, overrides the "),gc=s("code"),E_=t("__call__"),M_=t(" special method."),R_=p(),F(On.$$.fragment),z_=p(),F(Dn.$$.fragment),Fh=p(),Pt=s("h2"),In=s("a"),_c=s("span"),F(Yr.$$.fragment),j_=p(),kc=s("span"),C_=t("RoFormerForMaskedLM"),bh=p(),lt=s("div"),F(Zr.$$.fragment),q_=p(),Lt=s("p"),A_=t("RoFormer Model with a "),vc=s("code"),P_=t("language modeling"),L_=t(` head on top.
This model is a PyTorch `),ea=s("a"),O_=t("torch.nn.Module"),D_=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.`),I_=p(),No=s("div"),F(oa.$$.fragment),N_=p(),Ot=s("p"),S_=t("The "),Sl=s("a"),W_=t("RoFormerForMaskedLM"),U_=t(" forward method, overrides the "),yc=s("code"),K_=t("__call__"),B_=t(" special method."),Q_=p(),F(Nn.$$.fragment),H_=p(),F(Sn.$$.fragment),wh=p(),Dt=s("h2"),Wn=s("a"),Fc=s("span"),F(ta.$$.fragment),V_=p(),bc=s("span"),J_=t("RoFormerForSequenceClassification"),Th=p(),qo=s("div"),F(na.$$.fragment),G_=p(),wc=s("p"),X_=t(`RoFormer Model transformer with a sequence classification/regression head on top (a linear layer on top of the
pooled output) e.g. for GLUE tasks.`),Y_=p(),sa=s("p"),Z_=t("This model is a PyTorch "),ra=s("a"),ek=t("torch.nn.Module"),ok=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.`),tk=p(),yo=s("div"),F(aa.$$.fragment),nk=p(),It=s("p"),sk=t("The "),Wl=s("a"),rk=t("RoFormerForSequenceClassification"),ak=t(" forward method, overrides the "),Tc=s("code"),ik=t("__call__"),lk=t(" special method."),dk=p(),F(Un.$$.fragment),ck=p(),F(Kn.$$.fragment),pk=p(),F(Bn.$$.fragment),$h=p(),Nt=s("h2"),Qn=s("a"),$c=s("span"),F(ia.$$.fragment),mk=p(),xc=s("span"),hk=t("RoFormerForMultipleChoice"),xh=p(),Ao=s("div"),F(la.$$.fragment),uk=p(),Ec=s("p"),fk=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.`),gk=p(),da=s("p"),_k=t("This model is a PyTorch "),ca=s("a"),kk=t("torch.nn.Module"),vk=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.`),yk=p(),So=s("div"),F(pa.$$.fragment),Fk=p(),St=s("p"),bk=t("The "),Ul=s("a"),wk=t("RoFormerForMultipleChoice"),Tk=t(" forward method, overrides the "),Mc=s("code"),$k=t("__call__"),xk=t(" special method."),Ek=p(),F(Hn.$$.fragment),Mk=p(),F(Vn.$$.fragment),Eh=p(),Wt=s("h2"),Jn=s("a"),Rc=s("span"),F(ma.$$.fragment),Rk=p(),zc=s("span"),zk=t("RoFormerForTokenClassification"),Mh=p(),Po=s("div"),F(ha.$$.fragment),jk=p(),jc=s("p"),Ck=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.`),qk=p(),ua=s("p"),Ak=t("This model is a PyTorch "),fa=s("a"),Pk=t("torch.nn.Module"),Lk=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.`),Ok=p(),Wo=s("div"),F(ga.$$.fragment),Dk=p(),Ut=s("p"),Ik=t("The "),Kl=s("a"),Nk=t("RoFormerForTokenClassification"),Sk=t(" forward method, overrides the "),Cc=s("code"),Wk=t("__call__"),Uk=t(" special method."),Kk=p(),F(Gn.$$.fragment),Bk=p(),F(Xn.$$.fragment),Rh=p(),Kt=s("h2"),Yn=s("a"),qc=s("span"),F(_a.$$.fragment),Qk=p(),Ac=s("span"),Hk=t("RoFormerForQuestionAnswering"),zh=p(),Lo=s("div"),F(ka.$$.fragment),Vk=p(),Bt=s("p"),Jk=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 `),Pc=s("code"),Gk=t("span start logits"),Xk=t(" and "),Lc=s("code"),Yk=t("span end logits"),Zk=t(")."),ev=p(),va=s("p"),ov=t("This model is a PyTorch "),ya=s("a"),tv=t("torch.nn.Module"),nv=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.`),sv=p(),Uo=s("div"),F(Fa.$$.fragment),rv=p(),Qt=s("p"),av=t("The "),Bl=s("a"),iv=t("RoFormerForQuestionAnswering"),lv=t(" forward method, overrides the "),Oc=s("code"),dv=t("__call__"),cv=t(" special method."),pv=p(),F(Zn.$$.fragment),mv=p(),F(es.$$.fragment),jh=p(),Ht=s("h2"),os=s("a"),Dc=s("span"),F(ba.$$.fragment),hv=p(),Ic=s("span"),uv=t("TFRoFormerModel"),Ch=p(),co=s("div"),F(wa.$$.fragment),fv=p(),Nc=s("p"),gv=t("The bare RoFormer Model transformer outputing raw hidden-states without any specific head on top."),_v=p(),Ta=s("p"),kv=t("This model inherits from "),Ql=s("a"),vv=t("TFPreTrainedModel"),yv=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.)`),Fv=p(),$a=s("p"),bv=t("This model is also a "),xa=s("a"),wv=t("tf.keras.Model"),Tv=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.`),$v=p(),F(ts.$$.fragment),xv=p(),Ko=s("div"),F(Ea.$$.fragment),Ev=p(),Vt=s("p"),Mv=t("The "),Hl=s("a"),Rv=t("TFRoFormerModel"),zv=t(" forward method, overrides the "),Sc=s("code"),jv=t("__call__"),Cv=t(" special method."),qv=p(),F(ns.$$.fragment),Av=p(),F(ss.$$.fragment),qh=p(),Jt=s("h2"),rs=s("a"),Wc=s("span"),F(Ma.$$.fragment),Pv=p(),Uc=s("span"),Lv=t("TFRoFormerForMaskedLM"),Ah=p(),po=s("div"),F(Ra.$$.fragment),Ov=p(),za=s("p"),Dv=t("RoFormer Model with a "),Kc=s("code"),Iv=t("language modeling"),Nv=t(" head on top."),Sv=p(),ja=s("p"),Wv=t("This model inherits from "),Vl=s("a"),Uv=t("TFPreTrainedModel"),Kv=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.)`),Bv=p(),Ca=s("p"),Qv=t("This model is also a "),qa=s("a"),Hv=t("tf.keras.Model"),Vv=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.`),Jv=p(),F(as.$$.fragment),Gv=p(),Fo=s("div"),F(Aa.$$.fragment),Xv=p(),Gt=s("p"),Yv=t("The "),Jl=s("a"),Zv=t("TFRoFormerForMaskedLM"),ey=t(" forward method, overrides the "),Bc=s("code"),oy=t("__call__"),ty=t(" special method."),ny=p(),F(is.$$.fragment),sy=p(),F(ls.$$.fragment),ry=p(),F(ds.$$.fragment),Ph=p(),Xt=s("h2"),cs=s("a"),Qc=s("span"),F(Pa.$$.fragment),ay=p(),Hc=s("span"),iy=t("TFRoFormerForCausalLM"),Lh=p(),mo=s("div"),F(La.$$.fragment),ly=p(),Oa=s("p"),dy=t("RoFormer Model with a "),Vc=s("code"),cy=t("language modeling"),py=t(" head on top for CLM fine-tuning."),my=p(),Da=s("p"),hy=t("This model inherits from "),Gl=s("a"),uy=t("TFPreTrainedModel"),fy=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.)`),gy=p(),Ia=s("p"),_y=t("This model is also a "),Na=s("a"),ky=t("tf.keras.Model"),vy=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.`),yy=p(),F(ps.$$.fragment),Fy=p(),kt=s("div"),F(Sa.$$.fragment),by=p(),ko=s("p"),wy=t("labels ("),Jc=s("code"),Ty=t("tf.Tensor"),$y=t(" or "),Gc=s("code"),xy=t("np.ndarray"),Ey=t(" of shape "),Xc=s("code"),My=t("(batch_size, sequence_length)"),Ry=t(", "),Yc=s("em"),zy=t("optional"),jy=t(`):
Labels for computing the cross entropy classification loss. Indices should be in `),Zc=s("code"),Cy=t("[0, ..., config.vocab_size - 1]"),qy=t("."),Ay=p(),F(ms.$$.fragment),Oh=p(),Yt=s("h2"),hs=s("a"),ep=s("span"),F(Wa.$$.fragment),Py=p(),op=s("span"),Ly=t("TFRoFormerForSequenceClassification"),Dh=p(),ho=s("div"),F(Ua.$$.fragment),Oy=p(),tp=s("p"),Dy=t("RoFormer Model transformer with a sequence classification/regression head on top e.g., for GLUE tasks."),Iy=p(),Ka=s("p"),Ny=t("This model inherits from "),Xl=s("a"),Sy=t("TFPreTrainedModel"),Wy=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.)`),Uy=p(),Ba=s("p"),Ky=t("This model is also a "),Qa=s("a"),By=t("tf.keras.Model"),Qy=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.`),Hy=p(),F(us.$$.fragment),Vy=p(),bo=s("div"),F(Ha.$$.fragment),Jy=p(),Zt=s("p"),Gy=t("The "),Yl=s("a"),Xy=t("TFRoFormerForSequenceClassification"),Yy=t(" forward method, overrides the "),np=s("code"),Zy=t("__call__"),eF=t(" special method."),oF=p(),F(fs.$$.fragment),tF=p(),F(gs.$$.fragment),nF=p(),F(_s.$$.fragment),Ih=p(),en=s("h2"),ks=s("a"),sp=s("span"),F(Va.$$.fragment),sF=p(),rp=s("span"),rF=t("TFRoFormerForMultipleChoice"),Nh=p(),uo=s("div"),F(Ja.$$.fragment),aF=p(),ap=s("p"),iF=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.`),lF=p(),Ga=s("p"),dF=t("This model inherits from "),Zl=s("a"),cF=t("TFPreTrainedModel"),pF=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.)`),mF=p(),Xa=s("p"),hF=t("This model is also a "),Ya=s("a"),uF=t("tf.keras.Model"),fF=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.`),gF=p(),F(vs.$$.fragment),_F=p(),Bo=s("div"),F(Za.$$.fragment),kF=p(),on=s("p"),vF=t("The "),ed=s("a"),yF=t("TFRoFormerForMultipleChoice"),FF=t(" forward method, overrides the "),ip=s("code"),bF=t("__call__"),wF=t(" special method."),TF=p(),F(ys.$$.fragment),$F=p(),F(Fs.$$.fragment),Sh=p(),tn=s("h2"),bs=s("a"),lp=s("span"),F(ei.$$.fragment),xF=p(),dp=s("span"),EF=t("TFRoFormerForTokenClassification"),Wh=p(),fo=s("div"),F(oi.$$.fragment),MF=p(),cp=s("p"),RF=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.`),zF=p(),ti=s("p"),jF=t("This model inherits from "),od=s("a"),CF=t("TFPreTrainedModel"),qF=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.)`),AF=p(),ni=s("p"),PF=t("This model is also a "),si=s("a"),LF=t("tf.keras.Model"),OF=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.`),DF=p(),F(ws.$$.fragment),IF=p(),wo=s("div"),F(ri.$$.fragment),NF=p(),nn=s("p"),SF=t("The "),td=s("a"),WF=t("TFRoFormerForTokenClassification"),UF=t(" forward method, overrides the "),pp=s("code"),KF=t("__call__"),BF=t(" special method."),QF=p(),F(Ts.$$.fragment),HF=p(),F($s.$$.fragment),VF=p(),F(xs.$$.fragment),Uh=p(),sn=s("h2"),Es=s("a"),mp=s("span"),F(ai.$$.fragment),JF=p(),hp=s("span"),GF=t("TFRoFormerForQuestionAnswering"),Kh=p(),go=s("div"),F(ii.$$.fragment),XF=p(),rn=s("p"),YF=t(`RoFormer Model with a span classification head on top for extractive question-answering tasks like SQuAD (a linear
layer on top of the hidden-states output to compute `),up=s("code"),ZF=t("span start logits"),eb=t(" and "),fp=s("code"),ob=t("span end logits"),tb=t(")."),nb=p(),li=s("p"),sb=t("This model inherits from "),nd=s("a"),rb=t("TFPreTrainedModel"),ab=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.)`),ib=p(),di=s("p"),lb=t("This model is also a "),ci=s("a"),db=t("tf.keras.Model"),cb=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.`),pb=p(),F(Ms.$$.fragment),mb=p(),To=s("div"),F(pi.$$.fragment),hb=p(),an=s("p"),ub=t("The "),sd=s("a"),fb=t("TFRoFormerForQuestionAnswering"),gb=t(" forward method, overrides the "),gp=s("code"),_b=t("__call__"),kb=t(" special method."),vb=p(),F(Rs.$$.fragment),yb=p(),F(zs.$$.fragment),Fb=p(),F(js.$$.fragment),Bh=p(),ln=s("h2"),Cs=s("a"),_p=s("span"),F(mi.$$.fragment),bb=p(),kp=s("span"),wb=t("FlaxRoFormerModel"),Qh=p(),eo=s("div"),F(hi.$$.fragment),Tb=p(),vp=s("p"),$b=t("The bare RoFormer Model transformer outputting raw hidden-states without any specific head on top."),xb=p(),ui=s("p"),Eb=t("This model inherits from "),rd=s("a"),Mb=t("FlaxPreTrainedModel"),Rb=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)`),zb=p(),fi=s("p"),jb=t("This model is also a Flax Linen "),gi=s("a"),Cb=t("flax.linen.Module"),qb=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.`),Ab=p(),yp=s("p"),Pb=t("Finally, this model supports inherent JAX features such as:"),Lb=p(),dt=s("ul"),Fp=s("li"),_i=s("a"),Ob=t("Just-In-Time (JIT) compilation"),Db=p(),bp=s("li"),ki=s("a"),Ib=t("Automatic Differentiation"),Nb=p(),wp=s("li"),vi=s("a"),Sb=t("Vectorization"),Wb=p(),Tp=s("li"),yi=s("a"),Ub=t("Parallelization"),Kb=p(),Qo=s("div"),F(Fi.$$.fragment),Bb=p(),dn=s("p"),Qb=t("The "),$p=s("code"),Hb=t("FlaxRoFormerPreTrainedModel"),Vb=t(" forward method, overrides the "),xp=s("code"),Jb=t("__call__"),Gb=t(" special method."),Xb=p(),F(qs.$$.fragment),Yb=p(),F(As.$$.fragment),Hh=p(),cn=s("h2"),Ps=s("a"),Ep=s("span"),F(bi.$$.fragment),Zb=p(),Mp=s("span"),ew=t("FlaxRoFormerForMaskedLM"),Vh=p(),oo=s("div"),F(wi.$$.fragment),ow=p(),Ti=s("p"),tw=t("RoFormer Model with a "),Rp=s("code"),nw=t("language modeling"),sw=t(" head on top."),rw=p(),$i=s("p"),aw=t("This model inherits from "),ad=s("a"),iw=t("FlaxPreTrainedModel"),lw=t(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading, saving and converting weights from PyTorch models)`),dw=p(),xi=s("p"),cw=t("This model is also a Flax Linen "),Ei=s("a"),pw=t("flax.linen.Module"),mw=t(`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),hw=p(),zp=s("p"),uw=t("Finally, this model supports inherent JAX features such as:"),fw=p(),ct=s("ul"),jp=s("li"),Mi=s("a"),gw=t("Just-In-Time (JIT) compilation"),_w=p(),Cp=s("li"),Ri=s("a"),kw=t("Automatic Differentiation"),vw=p(),qp=s("li"),zi=s("a"),yw=t("Vectorization"),Fw=p(),Ap=s("li"),ji=s("a"),bw=t("Parallelization"),ww=p(),Ho=s("div"),F(Ci.$$.fragment),Tw=p(),pn=s("p"),$w=t("The "),Pp=s("code"),xw=t("FlaxRoFormerPreTrainedModel"),Ew=t(" forward method, overrides the "),Lp=s("code"),Mw=t("__call__"),Rw=t(" special method."),zw=p(),F(Ls.$$.fragment),jw=p(),F(Os.$$.fragment),Jh=p(),mn=s("h2"),Ds=s("a"),Op=s("span"),F(qi.$$.fragment),Cw=p(),Dp=s("span"),qw=t("FlaxRoFormerForSequenceClassification"),Gh=p(),to=s("div"),F(Ai.$$.fragment),Aw=p(),Ip=s("p"),Pw=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.`),Lw=p(),Pi=s("p"),Ow=t("This model inherits from "),id=s("a"),Dw=t("FlaxPreTrainedModel"),Iw=t(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading, saving and converting weights from PyTorch models)`),Nw=p(),Li=s("p"),Sw=t("This model is also a Flax Linen "),Oi=s("a"),Ww=t("flax.linen.Module"),Uw=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.`),Kw=p(),Np=s("p"),Bw=t("Finally, this model supports inherent JAX features such as:"),Qw=p(),pt=s("ul"),Sp=s("li"),Di=s("a"),Hw=t("Just-In-Time (JIT) compilation"),Vw=p(),Wp=s("li"),Ii=s("a"),Jw=t("Automatic Differentiation"),Gw=p(),Up=s("li"),Ni=s("a"),Xw=t("Vectorization"),Yw=p(),Kp=s("li"),Si=s("a"),Zw=t("Parallelization"),eT=p(),Vo=s("div"),F(Wi.$$.fragment),oT=p(),hn=s("p"),tT=t("The "),Bp=s("code"),nT=t("FlaxRoFormerPreTrainedModel"),sT=t(" forward method, overrides the "),Qp=s("code"),rT=t("__call__"),aT=t(" special method."),iT=p(),F(Is.$$.fragment),lT=p(),F(Ns.$$.fragment),Xh=p(),un=s("h2"),Ss=s("a"),Hp=s("span"),F(Ui.$$.fragment),dT=p(),Vp=s("span"),cT=t("FlaxRoFormerForMultipleChoice"),Yh=p(),no=s("div"),F(Ki.$$.fragment),pT=p(),Jp=s("p"),mT=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.`),hT=p(),Bi=s("p"),uT=t("This model inherits from "),ld=s("a"),fT=t("FlaxPreTrainedModel"),gT=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)`),_T=p(),Qi=s("p"),kT=t("This model is also a Flax Linen "),Hi=s("a"),vT=t("flax.linen.Module"),yT=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.`),FT=p(),Gp=s("p"),bT=t("Finally, this model supports inherent JAX features such as:"),wT=p(),mt=s("ul"),Xp=s("li"),Vi=s("a"),TT=t("Just-In-Time (JIT) compilation"),$T=p(),Yp=s("li"),Ji=s("a"),xT=t("Automatic Differentiation"),ET=p(),Zp=s("li"),Gi=s("a"),MT=t("Vectorization"),RT=p(),em=s("li"),Xi=s("a"),zT=t("Parallelization"),jT=p(),Jo=s("div"),F(Yi.$$.fragment),CT=p(),fn=s("p"),qT=t("The "),om=s("code"),AT=t("FlaxRoFormerPreTrainedModel"),PT=t(" forward method, overrides the "),tm=s("code"),LT=t("__call__"),OT=t(" special method."),DT=p(),F(Ws.$$.fragment),IT=p(),F(Us.$$.fragment),Zh=p(),gn=s("h2"),Ks=s("a"),nm=s("span"),F(Zi.$$.fragment),NT=p(),sm=s("span"),ST=t("FlaxRoFormerForTokenClassification"),eu=p(),so=s("div"),F(el.$$.fragment),WT=p(),rm=s("p"),UT=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.`),KT=p(),ol=s("p"),BT=t("This model inherits from "),dd=s("a"),QT=t("FlaxPreTrainedModel"),HT=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)`),VT=p(),tl=s("p"),JT=t("This model is also a Flax Linen "),nl=s("a"),GT=t("flax.linen.Module"),XT=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.`),YT=p(),am=s("p"),ZT=t("Finally, this model supports inherent JAX features such as:"),e1=p(),ht=s("ul"),im=s("li"),sl=s("a"),o1=t("Just-In-Time (JIT) compilation"),t1=p(),lm=s("li"),rl=s("a"),n1=t("Automatic Differentiation"),s1=p(),dm=s("li"),al=s("a"),r1=t("Vectorization"),a1=p(),cm=s("li"),il=s("a"),i1=t("Parallelization"),l1=p(),Go=s("div"),F(ll.$$.fragment),d1=p(),_n=s("p"),c1=t("The "),pm=s("code"),p1=t("FlaxRoFormerPreTrainedModel"),m1=t(" forward method, overrides the "),mm=s("code"),h1=t("__call__"),u1=t(" special method."),f1=p(),F(Bs.$$.fragment),g1=p(),F(Qs.$$.fragment),ou=p(),kn=s("h2"),Hs=s("a"),hm=s("span"),F(dl.$$.fragment),_1=p(),um=s("span"),k1=t("FlaxRoFormerForQuestionAnswering"),tu=p(),ro=s("div"),F(cl.$$.fragment),v1=p(),vn=s("p"),y1=t(`RoFormer Model with a span classification head on top for extractive question-answering tasks like SQuAD (a linear
layers on top of the hidden-states output to compute `),fm=s("code"),F1=t("span start logits"),b1=t(" and "),gm=s("code"),w1=t("span end logits"),T1=t(")."),$1=p(),pl=s("p"),x1=t("This model inherits from "),cd=s("a"),E1=t("FlaxPreTrainedModel"),M1=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)`),R1=p(),ml=s("p"),z1=t("This model is also a Flax Linen "),hl=s("a"),j1=t("flax.linen.Module"),C1=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.`),q1=p(),_m=s("p"),A1=t("Finally, this model supports inherent JAX features such as:"),P1=p(),ut=s("ul"),km=s("li"),ul=s("a"),L1=t("Just-In-Time (JIT) compilation"),O1=p(),vm=s("li"),fl=s("a"),D1=t("Automatic Differentiation"),I1=p(),ym=s("li"),gl=s("a"),N1=t("Vectorization"),S1=p(),Fm=s("li"),_l=s("a"),W1=t("Parallelization"),U1=p(),Xo=s("div"),F(kl.$$.fragment),K1=p(),yn=s("p"),B1=t("The "),bm=s("code"),Q1=t("FlaxRoFormerPreTrainedModel"),H1=t(" forward method, overrides the "),wm=s("code"),V1=t("__call__"),J1=t(" special method."),G1=p(),F(Vs.$$.fragment),X1=p(),F(Js.$$.fragment),this.h()},l(a){const v=Ex('[data-svelte="svelte-1phssyn"]',document.head);d=r(v,"META",{name:!0,content:!0}),v.forEach(o),k=m(a),h=r(a,"H1",{class:!0});var vl=i(h);u=r(vl,"A",{id:!0,class:!0,href:!0});var Tm=i(u);_=r(Tm,"SPAN",{});var $m=i(_);b(l.$$.fragment,$m),$m.forEach(o),Tm.forEach(o),c=m(vl),z=r(vl,"SPAN",{});var xm=i(z);be=n(xm,"RoFormer"),xm.forEach(o),vl.forEach(o),fe=m(a),I=r(a,"H2",{class:!0});var yl=i(I);ae=r(yl,"A",{id:!0,class:!0,href:!0});var Em=i(ae);ee=r(Em,"SPAN",{});var Mm=i(ee);b(E.$$.fragment,Mm),Mm.forEach(o),Em.forEach(o),we=m(yl),Q=r(yl,"SPAN",{});var Rm=i(Q);Te=n(Rm,"Overview"),Rm.forEach(o),yl.forEach(o),ge=m(a),N=r(a,"P",{});var Fl=i(N);$e=n(Fl,"The RoFormer model was proposed in "),ie=r(Fl,"A",{href:!0,rel:!0});var zm=i(ie);V=n(zm,"RoFormer: Enhanced Transformer with Rotary Position Embedding"),zm.forEach(o),xe=n(Fl," by Jianlin Su and Yu Lu and Shengfeng Pan and Bo Wen and Yunfeng Liu."),Fl.forEach(o),_e=m(a),W=r(a,"P",{});var jm=i(W);Ee=n(jm,"The abstract from the paper is the following:"),jm.forEach(o),ke=m(a),U=r(a,"P",{});var Cm=i(U);pe=r(Cm,"EM",{});var qm=i(pe);Me=n(qm,`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.`),qm.forEach(o),Cm.forEach(o),te=m(a),C=r(a,"P",{});var Am=i(C);P=n(Am,"Tips:"),Am.forEach(o),ve=m(a),K=r(a,"UL",{});var Pm=i(K);me=r(Pm,"LI",{});var Lm=i(me);Re=n(Lm,`RoFormer is a BERT-like autoencoding model with rotary position embeddings. Rotary position embeddings have shown
improved performance on classification tasks with long texts.`),Lm.forEach(o),Pm.forEach(o),H=m(a),se=r(a,"P",{});var Fn=i(se);ze=n(Fn,"This model was contributed by "),A=r(Fn,"A",{href:!0,rel:!0});var Om=i(A);je=n(Om,"junnyu"),Om.forEach(o),J=n(Fn,". The original code can be found "),le=r(Fn,"A",{href:!0,rel:!0});var Dm=i(le);Ce=n(Dm,"here"),Dm.forEach(o),G=n(Fn,"."),Fn.forEach(o),ye=m(a),re=r(a,"H2",{class:!0});var bl=i(re);O=r(bl,"A",{id:!0,class:!0,href:!0});var Im=i(O);he=r(Im,"SPAN",{});var Nm=i(he);b(S.$$.fragment,Nm),Nm.forEach(o),Im.forEach(o),qe=m(bl),oe=r(bl,"SPAN",{});var Sm=i(oe);L=n(Sm,"Documentation resources"),Sm.forEach(o),bl.forEach(o),Fe=m(a),q=r(a,"UL",{});var vo=i(q);ue=r(vo,"LI",{});var Wm=i(ue);de=r(Wm,"A",{href:!0});var Um=i(de);y=n(Um,"Text classification task guide"),Um.forEach(o),Wm.forEach(o),R=m(vo),Se=r(vo,"LI",{});var Km=i(Se);Z=r(Km,"A",{href:!0});var Bm=i(Z);He=n(Bm,"Token classification task guide"),Bm.forEach(o),Km.forEach(o),Ve=m(vo),j=r(vo,"LI",{});var Qm=i(j);De=r(Qm,"A",{href:!0});var Hm=i(De);Je=n(Hm,"Question answering task guide"),Hm.forEach(o),Qm.forEach(o),Ge=m(vo),We=r(vo,"LI",{});var Vm=i(We);Ie=r(Vm,"A",{href:!0});var Jm=i(Ie);D=n(Jm,"Causal language modeling task guide"),Jm.forEach(o),Vm.forEach(o),X=m(vo),Ue=r(vo,"LI",{});var Gm=i(Ue);Ne=r(Gm,"A",{href:!0});var Xm=i(Ne);Y=n(Xm,"Masked language modeling task guide"),Xm.forEach(o),Gm.forEach(o),Xe=m(vo),Ke=r(vo,"LI",{});var Ym=i(Ke);ce=r(Ym,"A",{href:!0});var Zm=i(ce);Ye=n(Zm,"Multiple choice task guide"),Zm.forEach(o),Ym.forEach(o),vo.forEach(o),ne=m(a),Ae=r(a,"H2",{class:!0});var wl=i(Ae);Tn=r(wl,"A",{id:!0,class:!0,href:!0});var eh=i(Tn);Sd=r(eh,"SPAN",{});var oh=i(Sd);b(Fr.$$.fragment,oh),oh.forEach(o),eh.forEach(o),hf=m(wl),Wd=r(wl,"SPAN",{});var th=i(Wd);uf=n(th,"RoFormerConfig"),th.forEach(o),wl.forEach(o),mh=m(a),Co=r(a,"DIV",{class:!0});var ft=i(Co);b(br.$$.fragment,ft),ff=m(ft),$t=r(ft,"P",{});var bn=i($t);gf=n(bn,"This is the configuration class to store the configuration of a "),El=r(bn,"A",{href:!0});var nh=i(El);_f=n(nh,"RoFormerModel"),nh.forEach(o),kf=n(bn,`. It is used to instantiate an
RoFormer model according to the specified arguments, defining the model architecture. Instantiating a configuration
with the defaults will yield a similar configuration to that of the RoFormer
`),wr=r(bn,"A",{href:!0,rel:!0});var sh=i(wr);vf=n(sh,"junnyu/roformer_chinese_base"),sh.forEach(o),yf=n(bn," architecture."),bn.forEach(o),Ff=m(ft),xt=r(ft,"P",{});var wn=i(xt);bf=n(wn,"Configuration objects inherit from "),Ml=r(wn,"A",{href:!0});var rh=i(Ml);wf=n(rh,"PretrainedConfig"),rh.forEach(o),Tf=n(wn,` and can be used to control the model outputs. Read the
documentation from `),Rl=r(wn,"A",{href:!0});var ah=i(Rl);$f=n(ah,"PretrainedConfig"),ah.forEach(o),xf=n(wn," for more information."),wn.forEach(o),Ef=m(ft),b($n.$$.fragment,ft),ft.forEach(o),hh=m(a),Et=r(a,"H2",{class:!0});var Tl=i(Et);xn=r(Tl,"A",{id:!0,class:!0,href:!0});var ih=i(xn);Ud=r(ih,"SPAN",{});var lh=i(Ud);b(Tr.$$.fragment,lh),lh.forEach(o),ih.forEach(o),Mf=m(Tl),Kd=r(Tl,"SPAN",{});var dh=i(Kd);Rf=n(dh,"RoFormerTokenizer"),dh.forEach(o),Tl.forEach(o),uh=m(a),Ze=r(a,"DIV",{class:!0});var ao=i(Ze);b($r.$$.fragment,ao),zf=m(ao),xr=r(ao,"P",{});var $l=i(xr);jf=n($l,"Construct a RoFormer tokenizer. Based on "),Er=r($l,"A",{href:!0,rel:!0});var ch=i(Er);Cf=n(ch,"Rust Jieba"),ch.forEach(o),qf=n($l,"."),$l.forEach(o),Af=m(ao),Mr=r(ao,"P",{});var xl=i(Mr);Pf=n(xl,"This tokenizer inherits from "),zl=r(xl,"A",{href:!0});var t$=i(zl);Lf=n(t$,"PreTrainedTokenizer"),t$.forEach(o),Of=n(xl,` which contains most of the main methods. Users should refer to
this superclass for more information regarding those methods.`),xl.forEach(o),Df=m(ao),b(En.$$.fragment,ao),If=m(ao),gt=r(ao,"DIV",{class:!0});var pd=i(gt);b(Rr.$$.fragment,pd),Nf=m(pd),Bd=r(pd,"P",{});var n$=i(Bd);Sf=n(n$,`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:`),n$.forEach(o),Wf=m(pd),zr=r(pd,"UL",{});var su=i(zr);jl=r(su,"LI",{});var Y1=i(jl);Uf=n(Y1,"single sequence: "),Qd=r(Y1,"CODE",{});var s$=i(Qd);Kf=n(s$,"[CLS] X [SEP]"),s$.forEach(o),Y1.forEach(o),Bf=m(su),Cl=r(su,"LI",{});var Z1=i(Cl);Qf=n(Z1,"pair of sequences: "),Hd=r(Z1,"CODE",{});var r$=i(Hd);Hf=n(r$,"[CLS] A [SEP] B [SEP]"),r$.forEach(o),Z1.forEach(o),su.forEach(o),pd.forEach(o),Vf=m(ao),Mn=r(ao,"DIV",{class:!0});var ru=i(Mn);b(jr.$$.fragment,ru),Jf=m(ru),Cr=r(ru,"P",{});var au=i(Cr);Gf=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 `),Vd=r(au,"CODE",{});var a$=i(Vd);Xf=n(a$,"prepare_for_model"),a$.forEach(o),Yf=n(au," method."),au.forEach(o),ru.forEach(o),Zf=m(ao),Oo=r(ao,"DIV",{class:!0});var Gs=i(Oo);b(qr.$$.fragment,Gs),eg=m(Gs),Jd=r(Gs,"P",{});var i$=i(Jd);og=n(i$,"Create a mask from the two sequences passed to be used in a sequence-pair classification task. A RoFormer"),i$.forEach(o),tg=m(Gs),b(Rn.$$.fragment,Gs),ng=m(Gs),Mt=r(Gs,"P",{});var md=i(Mt);sg=n(md,"If "),Gd=r(md,"CODE",{});var l$=i(Gd);rg=n(l$,"token_ids_1"),l$.forEach(o),ag=n(md," is "),Xd=r(md,"CODE",{});var d$=i(Xd);ig=n(d$,"None"),d$.forEach(o),lg=n(md,", this method only returns the first portion of the mask (0s)."),md.forEach(o),Gs.forEach(o),dg=m(ao),ql=r(ao,"DIV",{class:!0});var c$=i(ql);b(Ar.$$.fragment,c$),c$.forEach(o),ao.forEach(o),fh=m(a),Rt=r(a,"H2",{class:!0});var iu=i(Rt);zn=r(iu,"A",{id:!0,class:!0,href:!0});var p$=i(zn);Yd=r(p$,"SPAN",{});var m$=i(Yd);b(Pr.$$.fragment,m$),m$.forEach(o),p$.forEach(o),cg=m(iu),Zd=r(iu,"SPAN",{});var h$=i(Zd);pg=n(h$,"RoFormerTokenizerFast"),h$.forEach(o),iu.forEach(o),gh=m(a),io=r(a,"DIV",{class:!0});var Yo=i(io);b(Lr.$$.fragment,Yo),mg=m(Yo),Or=r(Yo,"P",{});var lu=i(Or);hg=n(lu,"Construct a \u201Cfast\u201D RoFormer tokenizer (backed by HuggingFace\u2019s "),ec=r(lu,"EM",{});var u$=i(ec);ug=n(u$,"tokenizers"),u$.forEach(o),fg=n(lu," library)."),lu.forEach(o),gg=m(Yo),jn=r(Yo,"P",{});var ph=i(jn);Al=r(ph,"A",{href:!0});var f$=i(Al);_g=n(f$,"RoFormerTokenizerFast"),f$.forEach(o),kg=n(ph," is almost identical to "),Pl=r(ph,"A",{href:!0});var g$=i(Pl);vg=n(g$,"BertTokenizerFast"),g$.forEach(o),yg=n(ph,` and runs end-to-end tokenization:
punctuation splitting and wordpiece. There are some difference between them when tokenizing Chinese.`),ph.forEach(o),Fg=m(Yo),Dr=r(Yo,"P",{});var du=i(Dr);bg=n(du,"This tokenizer inherits from "),Ll=r(du,"A",{href:!0});var _$=i(Ll);wg=n(_$,"PreTrainedTokenizerFast"),_$.forEach(o),Tg=n(du,` which contains most of the main methods. Users should
refer to this superclass for more information regarding those methods.`),du.forEach(o),$g=m(Yo),b(Cn.$$.fragment,Yo),xg=m(Yo),_t=r(Yo,"DIV",{class:!0});var hd=i(_t);b(Ir.$$.fragment,hd),Eg=m(hd),oc=r(hd,"P",{});var k$=i(oc);Mg=n(k$,`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:`),k$.forEach(o),Rg=m(hd),Nr=r(hd,"UL",{});var cu=i(Nr);Ol=r(cu,"LI",{});var e$=i(Ol);zg=n(e$,"single sequence: "),tc=r(e$,"CODE",{});var v$=i(tc);jg=n(v$,"[CLS] X [SEP]"),v$.forEach(o),e$.forEach(o),Cg=m(cu),Dl=r(cu,"LI",{});var o$=i(Dl);qg=n(o$,"pair of sequences: "),nc=r(o$,"CODE",{});var y$=i(nc);Ag=n(y$,"[CLS] A [SEP] B [SEP]"),y$.forEach(o),o$.forEach(o),cu.forEach(o),hd.forEach(o),Yo.forEach(o),_h=m(a),zt=r(a,"H2",{class:!0});var pu=i(zt);qn=r(pu,"A",{id:!0,class:!0,href:!0});var F$=i(qn);sc=r(F$,"SPAN",{});var b$=i(sc);b(Sr.$$.fragment,b$),b$.forEach(o),F$.forEach(o),Pg=m(pu),rc=r(pu,"SPAN",{});var w$=i(rc);Lg=n(w$,"RoFormerModel"),w$.forEach(o),pu.forEach(o),kh=m(a),_o=r(a,"DIV",{class:!0});var vt=i(_o);b(Wr.$$.fragment,vt),Og=m(vt),Ur=r(vt,"P",{});var mu=i(Ur);Dg=n(mu,`The bare RoFormer Model transformer outputting raw hidden-states without any specific head on top.
This model is a PyTorch `),Kr=r(mu,"A",{href:!0,rel:!0});var T$=i(Kr);Ig=n(T$,"torch.nn.Module"),T$.forEach(o),Ng=n(mu,` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),mu.forEach(o),Sg=m(vt),Br=r(vt,"P",{});var hu=i(Br);Wg=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 `),Qr=r(hu,"A",{href:!0,rel:!0});var $$=i(Qr);Ug=n($$,`Attention is
all you need`),$$.forEach(o),Kg=n(hu,` by Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit,
Llion Jones, Aidan N. Gomez, Lukasz Kaiser and Illia Polosukhin.`),hu.forEach(o),Bg=m(vt),lo=r(vt,"P",{});var $o=i(lo);Qg=n($o,"To behave as an decoder the model needs to be initialized with the "),ac=r($o,"CODE",{});var x$=i(ac);Hg=n(x$,"is_decoder"),x$.forEach(o),Vg=n($o,` argument of the configuration set
to `),ic=r($o,"CODE",{});var E$=i(ic);Jg=n(E$,"True"),E$.forEach(o),Gg=n($o,". To be used in a Seq2Seq model, the model needs to initialized with both "),lc=r($o,"CODE",{});var M$=i(lc);Xg=n(M$,"is_decoder"),M$.forEach(o),Yg=n($o,` argument and
`),dc=r($o,"CODE",{});var R$=i(dc);Zg=n(R$,"add_cross_attention"),R$.forEach(o),e_=n($o," set to "),cc=r($o,"CODE",{});var z$=i(cc);o_=n(z$,"True"),z$.forEach(o),t_=n($o,"; an "),pc=r($o,"CODE",{});var j$=i(pc);n_=n(j$,"encoder_hidden_states"),j$.forEach(o),s_=n($o," is then expected as an input to the forward pass."),$o.forEach(o),r_=m(vt),Do=r(vt,"DIV",{class:!0});var Xs=i(Do);b(Hr.$$.fragment,Xs),a_=m(Xs),jt=r(Xs,"P",{});var ud=i(jt);i_=n(ud,"The "),Il=r(ud,"A",{href:!0});var C$=i(Il);l_=n(C$,"RoFormerModel"),C$.forEach(o),d_=n(ud," forward method, overrides the "),mc=r(ud,"CODE",{});var q$=i(mc);c_=n(q$,"__call__"),q$.forEach(o),p_=n(ud," special method."),ud.forEach(o),m_=m(Xs),b(An.$$.fragment,Xs),h_=m(Xs),b(Pn.$$.fragment,Xs),Xs.forEach(o),vt.forEach(o),vh=m(a),Ct=r(a,"H2",{class:!0});var uu=i(Ct);Ln=r(uu,"A",{id:!0,class:!0,href:!0});var A$=i(Ln);hc=r(A$,"SPAN",{});var P$=i(hc);b(Vr.$$.fragment,P$),P$.forEach(o),A$.forEach(o),u_=m(uu),uc=r(uu,"SPAN",{});var L$=i(uc);f_=n(L$,"RoFormerForCausalLM"),L$.forEach(o),uu.forEach(o),yh=m(a),it=r(a,"DIV",{class:!0});var fd=i(it);b(Jr.$$.fragment,fd),g_=m(fd),qt=r(fd,"P",{});var gd=i(qt);__=n(gd,"RoFormer Model with a "),fc=r(gd,"CODE",{});var O$=i(fc);k_=n(O$,"language modeling"),O$.forEach(o),v_=n(gd,` head on top for CLM fine-tuning.
This model is a PyTorch `),Gr=r(gd,"A",{href:!0,rel:!0});var D$=i(Gr);y_=n(D$,"torch.nn.Module"),D$.forEach(o),F_=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),b_=m(fd),Io=r(fd,"DIV",{class:!0});var Ys=i(Io);b(Xr.$$.fragment,Ys),w_=m(Ys),At=r(Ys,"P",{});var _d=i(At);T_=n(_d,"The "),Nl=r(_d,"A",{href:!0});var I$=i(Nl);$_=n(I$,"RoFormerForCausalLM"),I$.forEach(o),x_=n(_d," forward method, overrides the "),gc=r(_d,"CODE",{});var N$=i(gc);E_=n(N$,"__call__"),N$.forEach(o),M_=n(_d," special method."),_d.forEach(o),R_=m(Ys),b(On.$$.fragment,Ys),z_=m(Ys),b(Dn.$$.fragment,Ys),Ys.forEach(o),fd.forEach(o),Fh=m(a),Pt=r(a,"H2",{class:!0});var fu=i(Pt);In=r(fu,"A",{id:!0,class:!0,href:!0});var S$=i(In);_c=r(S$,"SPAN",{});var W$=i(_c);b(Yr.$$.fragment,W$),W$.forEach(o),S$.forEach(o),j_=m(fu),kc=r(fu,"SPAN",{});var U$=i(kc);C_=n(U$,"RoFormerForMaskedLM"),U$.forEach(o),fu.forEach(o),bh=m(a),lt=r(a,"DIV",{class:!0});var kd=i(lt);b(Zr.$$.fragment,kd),q_=m(kd),Lt=r(kd,"P",{});var vd=i(Lt);A_=n(vd,"RoFormer Model with a "),vc=r(vd,"CODE",{});var K$=i(vc);P_=n(K$,"language modeling"),K$.forEach(o),L_=n(vd,` head on top.
This model is a PyTorch `),ea=r(vd,"A",{href:!0,rel:!0});var B$=i(ea);O_=n(B$,"torch.nn.Module"),B$.forEach(o),D_=n(vd,` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),vd.forEach(o),I_=m(kd),No=r(kd,"DIV",{class:!0});var Zs=i(No);b(oa.$$.fragment,Zs),N_=m(Zs),Ot=r(Zs,"P",{});var yd=i(Ot);S_=n(yd,"The "),Sl=r(yd,"A",{href:!0});var Q$=i(Sl);W_=n(Q$,"RoFormerForMaskedLM"),Q$.forEach(o),U_=n(yd," forward method, overrides the "),yc=r(yd,"CODE",{});var H$=i(yc);K_=n(H$,"__call__"),H$.forEach(o),B_=n(yd," special method."),yd.forEach(o),Q_=m(Zs),b(Nn.$$.fragment,Zs),H_=m(Zs),b(Sn.$$.fragment,Zs),Zs.forEach(o),kd.forEach(o),wh=m(a),Dt=r(a,"H2",{class:!0});var gu=i(Dt);Wn=r(gu,"A",{id:!0,class:!0,href:!0});var V$=i(Wn);Fc=r(V$,"SPAN",{});var J$=i(Fc);b(ta.$$.fragment,J$),J$.forEach(o),V$.forEach(o),V_=m(gu),bc=r(gu,"SPAN",{});var G$=i(bc);J_=n(G$,"RoFormerForSequenceClassification"),G$.forEach(o),gu.forEach(o),Th=m(a),qo=r(a,"DIV",{class:!0});var er=i(qo);b(na.$$.fragment,er),G_=m(er),wc=r(er,"P",{});var X$=i(wc);X_=n(X$,`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.`),X$.forEach(o),Y_=m(er),sa=r(er,"P",{});var _u=i(sa);Z_=n(_u,"This model is a PyTorch "),ra=r(_u,"A",{href:!0,rel:!0});var Y$=i(ra);ek=n(Y$,"torch.nn.Module"),Y$.forEach(o),ok=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),tk=m(er),yo=r(er,"DIV",{class:!0});var yt=i(yo);b(aa.$$.fragment,yt),nk=m(yt),It=r(yt,"P",{});var Fd=i(It);sk=n(Fd,"The "),Wl=r(Fd,"A",{href:!0});var Z$=i(Wl);rk=n(Z$,"RoFormerForSequenceClassification"),Z$.forEach(o),ak=n(Fd," forward method, overrides the "),Tc=r(Fd,"CODE",{});var e2=i(Tc);ik=n(e2,"__call__"),e2.forEach(o),lk=n(Fd," special method."),Fd.forEach(o),dk=m(yt),b(Un.$$.fragment,yt),ck=m(yt),b(Kn.$$.fragment,yt),pk=m(yt),b(Bn.$$.fragment,yt),yt.forEach(o),er.forEach(o),$h=m(a),Nt=r(a,"H2",{class:!0});var ku=i(Nt);Qn=r(ku,"A",{id:!0,class:!0,href:!0});var o2=i(Qn);$c=r(o2,"SPAN",{});var t2=i($c);b(ia.$$.fragment,t2),t2.forEach(o),o2.forEach(o),mk=m(ku),xc=r(ku,"SPAN",{});var n2=i(xc);hk=n(n2,"RoFormerForMultipleChoice"),n2.forEach(o),ku.forEach(o),xh=m(a),Ao=r(a,"DIV",{class:!0});var or=i(Ao);b(la.$$.fragment,or),uk=m(or),Ec=r(or,"P",{});var s2=i(Ec);fk=n(s2,`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.`),s2.forEach(o),gk=m(or),da=r(or,"P",{});var vu=i(da);_k=n(vu,"This model is a PyTorch "),ca=r(vu,"A",{href:!0,rel:!0});var r2=i(ca);kk=n(r2,"torch.nn.Module"),r2.forEach(o),vk=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),yk=m(or),So=r(or,"DIV",{class:!0});var tr=i(So);b(pa.$$.fragment,tr),Fk=m(tr),St=r(tr,"P",{});var bd=i(St);bk=n(bd,"The "),Ul=r(bd,"A",{href:!0});var a2=i(Ul);wk=n(a2,"RoFormerForMultipleChoice"),a2.forEach(o),Tk=n(bd," forward method, overrides the "),Mc=r(bd,"CODE",{});var i2=i(Mc);$k=n(i2,"__call__"),i2.forEach(o),xk=n(bd," special method."),bd.forEach(o),Ek=m(tr),b(Hn.$$.fragment,tr),Mk=m(tr),b(Vn.$$.fragment,tr),tr.forEach(o),or.forEach(o),Eh=m(a),Wt=r(a,"H2",{class:!0});var yu=i(Wt);Jn=r(yu,"A",{id:!0,class:!0,href:!0});var l2=i(Jn);Rc=r(l2,"SPAN",{});var d2=i(Rc);b(ma.$$.fragment,d2),d2.forEach(o),l2.forEach(o),Rk=m(yu),zc=r(yu,"SPAN",{});var c2=i(zc);zk=n(c2,"RoFormerForTokenClassification"),c2.forEach(o),yu.forEach(o),Mh=m(a),Po=r(a,"DIV",{class:!0});var nr=i(Po);b(ha.$$.fragment,nr),jk=m(nr),jc=r(nr,"P",{});var p2=i(jc);Ck=n(p2,`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.`),p2.forEach(o),qk=m(nr),ua=r(nr,"P",{});var Fu=i(ua);Ak=n(Fu,"This model is a PyTorch "),fa=r(Fu,"A",{href:!0,rel:!0});var m2=i(fa);Pk=n(m2,"torch.nn.Module"),m2.forEach(o),Lk=n(Fu,` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),Fu.forEach(o),Ok=m(nr),Wo=r(nr,"DIV",{class:!0});var sr=i(Wo);b(ga.$$.fragment,sr),Dk=m(sr),Ut=r(sr,"P",{});var wd=i(Ut);Ik=n(wd,"The "),Kl=r(wd,"A",{href:!0});var h2=i(Kl);Nk=n(h2,"RoFormerForTokenClassification"),h2.forEach(o),Sk=n(wd," forward method, overrides the "),Cc=r(wd,"CODE",{});var u2=i(Cc);Wk=n(u2,"__call__"),u2.forEach(o),Uk=n(wd," special method."),wd.forEach(o),Kk=m(sr),b(Gn.$$.fragment,sr),Bk=m(sr),b(Xn.$$.fragment,sr),sr.forEach(o),nr.forEach(o),Rh=m(a),Kt=r(a,"H2",{class:!0});var bu=i(Kt);Yn=r(bu,"A",{id:!0,class:!0,href:!0});var f2=i(Yn);qc=r(f2,"SPAN",{});var g2=i(qc);b(_a.$$.fragment,g2),g2.forEach(o),f2.forEach(o),Qk=m(bu),Ac=r(bu,"SPAN",{});var _2=i(Ac);Hk=n(_2,"RoFormerForQuestionAnswering"),_2.forEach(o),bu.forEach(o),zh=m(a),Lo=r(a,"DIV",{class:!0});var rr=i(Lo);b(ka.$$.fragment,rr),Vk=m(rr),Bt=r(rr,"P",{});var Td=i(Bt);Jk=n(Td,`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 `),Pc=r(Td,"CODE",{});var k2=i(Pc);Gk=n(k2,"span start logits"),k2.forEach(o),Xk=n(Td," and "),Lc=r(Td,"CODE",{});var v2=i(Lc);Yk=n(v2,"span end logits"),v2.forEach(o),Zk=n(Td,")."),Td.forEach(o),ev=m(rr),va=r(rr,"P",{});var wu=i(va);ov=n(wu,"This model is a PyTorch "),ya=r(wu,"A",{href:!0,rel:!0});var y2=i(ya);tv=n(y2,"torch.nn.Module"),y2.forEach(o),nv=n(wu,` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),wu.forEach(o),sv=m(rr),Uo=r(rr,"DIV",{class:!0});var ar=i(Uo);b(Fa.$$.fragment,ar),rv=m(ar),Qt=r(ar,"P",{});var $d=i(Qt);av=n($d,"The "),Bl=r($d,"A",{href:!0});var F2=i(Bl);iv=n(F2,"RoFormerForQuestionAnswering"),F2.forEach(o),lv=n($d," forward method, overrides the "),Oc=r($d,"CODE",{});var b2=i(Oc);dv=n(b2,"__call__"),b2.forEach(o),cv=n($d," special method."),$d.forEach(o),pv=m(ar),b(Zn.$$.fragment,ar),mv=m(ar),b(es.$$.fragment,ar),ar.forEach(o),rr.forEach(o),jh=m(a),Ht=r(a,"H2",{class:!0});var Tu=i(Ht);os=r(Tu,"A",{id:!0,class:!0,href:!0});var w2=i(os);Dc=r(w2,"SPAN",{});var T2=i(Dc);b(ba.$$.fragment,T2),T2.forEach(o),w2.forEach(o),hv=m(Tu),Ic=r(Tu,"SPAN",{});var $2=i(Ic);uv=n($2,"TFRoFormerModel"),$2.forEach(o),Tu.forEach(o),Ch=m(a),co=r(a,"DIV",{class:!0});var Zo=i(co);b(wa.$$.fragment,Zo),fv=m(Zo),Nc=r(Zo,"P",{});var x2=i(Nc);gv=n(x2,"The bare RoFormer Model transformer outputing raw hidden-states without any specific head on top."),x2.forEach(o),_v=m(Zo),Ta=r(Zo,"P",{});var $u=i(Ta);kv=n($u,"This model inherits from "),Ql=r($u,"A",{href:!0});var E2=i(Ql);vv=n(E2,"TFPreTrainedModel"),E2.forEach(o),yv=n($u,`. 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.)`),$u.forEach(o),Fv=m(Zo),$a=r(Zo,"P",{});var xu=i($a);bv=n(xu,"This model is also a "),xa=r(xu,"A",{href:!0,rel:!0});var M2=i(xa);wv=n(M2,"tf.keras.Model"),M2.forEach(o),Tv=n(xu,` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),xu.forEach(o),$v=m(Zo),b(ts.$$.fragment,Zo),xv=m(Zo),Ko=r(Zo,"DIV",{class:!0});var ir=i(Ko);b(Ea.$$.fragment,ir),Ev=m(ir),Vt=r(ir,"P",{});var xd=i(Vt);Mv=n(xd,"The "),Hl=r(xd,"A",{href:!0});var R2=i(Hl);Rv=n(R2,"TFRoFormerModel"),R2.forEach(o),zv=n(xd," forward method, overrides the "),Sc=r(xd,"CODE",{});var z2=i(Sc);jv=n(z2,"__call__"),z2.forEach(o),Cv=n(xd," special method."),xd.forEach(o),qv=m(ir),b(ns.$$.fragment,ir),Av=m(ir),b(ss.$$.fragment,ir),ir.forEach(o),Zo.forEach(o),qh=m(a),Jt=r(a,"H2",{class:!0});var Eu=i(Jt);rs=r(Eu,"A",{id:!0,class:!0,href:!0});var j2=i(rs);Wc=r(j2,"SPAN",{});var C2=i(Wc);b(Ma.$$.fragment,C2),C2.forEach(o),j2.forEach(o),Pv=m(Eu),Uc=r(Eu,"SPAN",{});var q2=i(Uc);Lv=n(q2,"TFRoFormerForMaskedLM"),q2.forEach(o),Eu.forEach(o),Ah=m(a),po=r(a,"DIV",{class:!0});var et=i(po);b(Ra.$$.fragment,et),Ov=m(et),za=r(et,"P",{});var Mu=i(za);Dv=n(Mu,"RoFormer Model with a "),Kc=r(Mu,"CODE",{});var A2=i(Kc);Iv=n(A2,"language modeling"),A2.forEach(o),Nv=n(Mu," head on top."),Mu.forEach(o),Sv=m(et),ja=r(et,"P",{});var Ru=i(ja);Wv=n(Ru,"This model inherits from "),Vl=r(Ru,"A",{href:!0});var P2=i(Vl);Uv=n(P2,"TFPreTrainedModel"),P2.forEach(o),Kv=n(Ru,`. 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.)`),Ru.forEach(o),Bv=m(et),Ca=r(et,"P",{});var zu=i(Ca);Qv=n(zu,"This model is also a "),qa=r(zu,"A",{href:!0,rel:!0});var L2=i(qa);Hv=n(L2,"tf.keras.Model"),L2.forEach(o),Vv=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),Jv=m(et),b(as.$$.fragment,et),Gv=m(et),Fo=r(et,"DIV",{class:!0});var Ft=i(Fo);b(Aa.$$.fragment,Ft),Xv=m(Ft),Gt=r(Ft,"P",{});var Ed=i(Gt);Yv=n(Ed,"The "),Jl=r(Ed,"A",{href:!0});var O2=i(Jl);Zv=n(O2,"TFRoFormerForMaskedLM"),O2.forEach(o),ey=n(Ed," forward method, overrides the "),Bc=r(Ed,"CODE",{});var D2=i(Bc);oy=n(D2,"__call__"),D2.forEach(o),ty=n(Ed," special method."),Ed.forEach(o),ny=m(Ft),b(is.$$.fragment,Ft),sy=m(Ft),b(ls.$$.fragment,Ft),ry=m(Ft),b(ds.$$.fragment,Ft),Ft.forEach(o),et.forEach(o),Ph=m(a),Xt=r(a,"H2",{class:!0});var ju=i(Xt);cs=r(ju,"A",{id:!0,class:!0,href:!0});var I2=i(cs);Qc=r(I2,"SPAN",{});var N2=i(Qc);b(Pa.$$.fragment,N2),N2.forEach(o),I2.forEach(o),ay=m(ju),Hc=r(ju,"SPAN",{});var S2=i(Hc);iy=n(S2,"TFRoFormerForCausalLM"),S2.forEach(o),ju.forEach(o),Lh=m(a),mo=r(a,"DIV",{class:!0});var ot=i(mo);b(La.$$.fragment,ot),ly=m(ot),Oa=r(ot,"P",{});var Cu=i(Oa);dy=n(Cu,"RoFormer Model with a "),Vc=r(Cu,"CODE",{});var W2=i(Vc);cy=n(W2,"language modeling"),W2.forEach(o),py=n(Cu," head on top for CLM fine-tuning."),Cu.forEach(o),my=m(ot),Da=r(ot,"P",{});var qu=i(Da);hy=n(qu,"This model inherits from "),Gl=r(qu,"A",{href:!0});var U2=i(Gl);uy=n(U2,"TFPreTrainedModel"),U2.forEach(o),fy=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),gy=m(ot),Ia=r(ot,"P",{});var Au=i(Ia);_y=n(Au,"This model is also a "),Na=r(Au,"A",{href:!0,rel:!0});var K2=i(Na);ky=n(K2,"tf.keras.Model"),K2.forEach(o),vy=n(Au,` 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.`),Au.forEach(o),yy=m(ot),b(ps.$$.fragment,ot),Fy=m(ot),kt=r(ot,"DIV",{class:!0});var Md=i(kt);b(Sa.$$.fragment,Md),by=m(Md),ko=r(Md,"P",{});var tt=i(ko);wy=n(tt,"labels ("),Jc=r(tt,"CODE",{});var B2=i(Jc);Ty=n(B2,"tf.Tensor"),B2.forEach(o),$y=n(tt," or "),Gc=r(tt,"CODE",{});var Q2=i(Gc);xy=n(Q2,"np.ndarray"),Q2.forEach(o),Ey=n(tt," of shape "),Xc=r(tt,"CODE",{});var H2=i(Xc);My=n(H2,"(batch_size, sequence_length)"),H2.forEach(o),Ry=n(tt,", "),Yc=r(tt,"EM",{});var V2=i(Yc);zy=n(V2,"optional"),V2.forEach(o),jy=n(tt,`):
Labels for computing the cross entropy classification loss. Indices should be in `),Zc=r(tt,"CODE",{});var J2=i(Zc);Cy=n(J2,"[0, ..., config.vocab_size - 1]"),J2.forEach(o),qy=n(tt,"."),tt.forEach(o),Ay=m(Md),b(ms.$$.fragment,Md),Md.forEach(o),ot.forEach(o),Oh=m(a),Yt=r(a,"H2",{class:!0});var Pu=i(Yt);hs=r(Pu,"A",{id:!0,class:!0,href:!0});var G2=i(hs);ep=r(G2,"SPAN",{});var X2=i(ep);b(Wa.$$.fragment,X2),X2.forEach(o),G2.forEach(o),Py=m(Pu),op=r(Pu,"SPAN",{});var Y2=i(op);Ly=n(Y2,"TFRoFormerForSequenceClassification"),Y2.forEach(o),Pu.forEach(o),Dh=m(a),ho=r(a,"DIV",{class:!0});var nt=i(ho);b(Ua.$$.fragment,nt),Oy=m(nt),tp=r(nt,"P",{});var Z2=i(tp);Dy=n(Z2,"RoFormer Model transformer with a sequence classification/regression head on top e.g., for GLUE tasks."),Z2.forEach(o),Iy=m(nt),Ka=r(nt,"P",{});var Lu=i(Ka);Ny=n(Lu,"This model inherits from "),Xl=r(Lu,"A",{href:!0});var e0=i(Xl);Sy=n(e0,"TFPreTrainedModel"),e0.forEach(o),Wy=n(Lu,`. 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.)`),Lu.forEach(o),Uy=m(nt),Ba=r(nt,"P",{});var Ou=i(Ba);Ky=n(Ou,"This model is also a "),Qa=r(Ou,"A",{href:!0,rel:!0});var o0=i(Qa);By=n(o0,"tf.keras.Model"),o0.forEach(o),Qy=n(Ou,` 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.`),Ou.forEach(o),Hy=m(nt),b(us.$$.fragment,nt),Vy=m(nt),bo=r(nt,"DIV",{class:!0});var bt=i(bo);b(Ha.$$.fragment,bt),Jy=m(bt),Zt=r(bt,"P",{});var Rd=i(Zt);Gy=n(Rd,"The "),Yl=r(Rd,"A",{href:!0});var t0=i(Yl);Xy=n(t0,"TFRoFormerForSequenceClassification"),t0.forEach(o),Yy=n(Rd," forward method, overrides the "),np=r(Rd,"CODE",{});var n0=i(np);Zy=n(n0,"__call__"),n0.forEach(o),eF=n(Rd," special method."),Rd.forEach(o),oF=m(bt),b(fs.$$.fragment,bt),tF=m(bt),b(gs.$$.fragment,bt),nF=m(bt),b(_s.$$.fragment,bt),bt.forEach(o),nt.forEach(o),Ih=m(a),en=r(a,"H2",{class:!0});var Du=i(en);ks=r(Du,"A",{id:!0,class:!0,href:!0});var s0=i(ks);sp=r(s0,"SPAN",{});var r0=i(sp);b(Va.$$.fragment,r0),r0.forEach(o),s0.forEach(o),sF=m(Du),rp=r(Du,"SPAN",{});var a0=i(rp);rF=n(a0,"TFRoFormerForMultipleChoice"),a0.forEach(o),Du.forEach(o),Nh=m(a),uo=r(a,"DIV",{class:!0});var st=i(uo);b(Ja.$$.fragment,st),aF=m(st),ap=r(st,"P",{});var i0=i(ap);iF=n(i0,`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.`),i0.forEach(o),lF=m(st),Ga=r(st,"P",{});var Iu=i(Ga);dF=n(Iu,"This model inherits from "),Zl=r(Iu,"A",{href:!0});var l0=i(Zl);cF=n(l0,"TFPreTrainedModel"),l0.forEach(o),pF=n(Iu,`. 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.)`),Iu.forEach(o),mF=m(st),Xa=r(st,"P",{});var Nu=i(Xa);hF=n(Nu,"This model is also a "),Ya=r(Nu,"A",{href:!0,rel:!0});var d0=i(Ya);uF=n(d0,"tf.keras.Model"),d0.forEach(o),fF=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),gF=m(st),b(vs.$$.fragment,st),_F=m(st),Bo=r(st,"DIV",{class:!0});var lr=i(Bo);b(Za.$$.fragment,lr),kF=m(lr),on=r(lr,"P",{});var zd=i(on);vF=n(zd,"The "),ed=r(zd,"A",{href:!0});var c0=i(ed);yF=n(c0,"TFRoFormerForMultipleChoice"),c0.forEach(o),FF=n(zd," forward method, overrides the "),ip=r(zd,"CODE",{});var p0=i(ip);bF=n(p0,"__call__"),p0.forEach(o),wF=n(zd," special method."),zd.forEach(o),TF=m(lr),b(ys.$$.fragment,lr),$F=m(lr),b(Fs.$$.fragment,lr),lr.forEach(o),st.forEach(o),Sh=m(a),tn=r(a,"H2",{class:!0});var Su=i(tn);bs=r(Su,"A",{id:!0,class:!0,href:!0});var m0=i(bs);lp=r(m0,"SPAN",{});var h0=i(lp);b(ei.$$.fragment,h0),h0.forEach(o),m0.forEach(o),xF=m(Su),dp=r(Su,"SPAN",{});var u0=i(dp);EF=n(u0,"TFRoFormerForTokenClassification"),u0.forEach(o),Su.forEach(o),Wh=m(a),fo=r(a,"DIV",{class:!0});var rt=i(fo);b(oi.$$.fragment,rt),MF=m(rt),cp=r(rt,"P",{});var f0=i(cp);RF=n(f0,`RoFormer Model with a token classification head on top (a linear layer on top of the hidden-states output) e.g. for
Named-Entity-Recognition (NER) tasks.`),f0.forEach(o),zF=m(rt),ti=r(rt,"P",{});var Wu=i(ti);jF=n(Wu,"This model inherits from "),od=r(Wu,"A",{href:!0});var g0=i(od);CF=n(g0,"TFPreTrainedModel"),g0.forEach(o),qF=n(Wu,`. 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.)`),Wu.forEach(o),AF=m(rt),ni=r(rt,"P",{});var Uu=i(ni);PF=n(Uu,"This model is also a "),si=r(Uu,"A",{href:!0,rel:!0});var _0=i(si);LF=n(_0,"tf.keras.Model"),_0.forEach(o),OF=n(Uu,` 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.`),Uu.forEach(o),DF=m(rt),b(ws.$$.fragment,rt),IF=m(rt),wo=r(rt,"DIV",{class:!0});var wt=i(wo);b(ri.$$.fragment,wt),NF=m(wt),nn=r(wt,"P",{});var jd=i(nn);SF=n(jd,"The "),td=r(jd,"A",{href:!0});var k0=i(td);WF=n(k0,"TFRoFormerForTokenClassification"),k0.forEach(o),UF=n(jd," forward method, overrides the "),pp=r(jd,"CODE",{});var v0=i(pp);KF=n(v0,"__call__"),v0.forEach(o),BF=n(jd," special method."),jd.forEach(o),QF=m(wt),b(Ts.$$.fragment,wt),HF=m(wt),b($s.$$.fragment,wt),VF=m(wt),b(xs.$$.fragment,wt),wt.forEach(o),rt.forEach(o),Uh=m(a),sn=r(a,"H2",{class:!0});var Ku=i(sn);Es=r(Ku,"A",{id:!0,class:!0,href:!0});var y0=i(Es);mp=r(y0,"SPAN",{});var F0=i(mp);b(ai.$$.fragment,F0),F0.forEach(o),y0.forEach(o),JF=m(Ku),hp=r(Ku,"SPAN",{});var b0=i(hp);GF=n(b0,"TFRoFormerForQuestionAnswering"),b0.forEach(o),Ku.forEach(o),Kh=m(a),go=r(a,"DIV",{class:!0});var at=i(go);b(ii.$$.fragment,at),XF=m(at),rn=r(at,"P",{});var Cd=i(rn);YF=n(Cd,`RoFormer Model with a span classification head on top for extractive question-answering tasks like SQuAD (a linear
layer on top of the hidden-states output to compute `),up=r(Cd,"CODE",{});var w0=i(up);ZF=n(w0,"span start logits"),w0.forEach(o),eb=n(Cd," and "),fp=r(Cd,"CODE",{});var T0=i(fp);ob=n(T0,"span end logits"),T0.forEach(o),tb=n(Cd,")."),Cd.forEach(o),nb=m(at),li=r(at,"P",{});var Bu=i(li);sb=n(Bu,"This model inherits from "),nd=r(Bu,"A",{href:!0});var $0=i(nd);rb=n($0,"TFPreTrainedModel"),$0.forEach(o),ab=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),ib=m(at),di=r(at,"P",{});var Qu=i(di);lb=n(Qu,"This model is also a "),ci=r(Qu,"A",{href:!0,rel:!0});var x0=i(ci);db=n(x0,"tf.keras.Model"),x0.forEach(o),cb=n(Qu,` 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.`),Qu.forEach(o),pb=m(at),b(Ms.$$.fragment,at),mb=m(at),To=r(at,"DIV",{class:!0});var Tt=i(To);b(pi.$$.fragment,Tt),hb=m(Tt),an=r(Tt,"P",{});var qd=i(an);ub=n(qd,"The "),sd=r(qd,"A",{href:!0});var E0=i(sd);fb=n(E0,"TFRoFormerForQuestionAnswering"),E0.forEach(o),gb=n(qd," forward method, overrides the "),gp=r(qd,"CODE",{});var M0=i(gp);_b=n(M0,"__call__"),M0.forEach(o),kb=n(qd," special method."),qd.forEach(o),vb=m(Tt),b(Rs.$$.fragment,Tt),yb=m(Tt),b(zs.$$.fragment,Tt),Fb=m(Tt),b(js.$$.fragment,Tt),Tt.forEach(o),at.forEach(o),Bh=m(a),ln=r(a,"H2",{class:!0});var Hu=i(ln);Cs=r(Hu,"A",{id:!0,class:!0,href:!0});var R0=i(Cs);_p=r(R0,"SPAN",{});var z0=i(_p);b(mi.$$.fragment,z0),z0.forEach(o),R0.forEach(o),bb=m(Hu),kp=r(Hu,"SPAN",{});var j0=i(kp);wb=n(j0,"FlaxRoFormerModel"),j0.forEach(o),Hu.forEach(o),Qh=m(a),eo=r(a,"DIV",{class:!0});var xo=i(eo);b(hi.$$.fragment,xo),Tb=m(xo),vp=r(xo,"P",{});var C0=i(vp);$b=n(C0,"The bare RoFormer Model transformer outputting raw hidden-states without any specific head on top."),C0.forEach(o),xb=m(xo),ui=r(xo,"P",{});var Vu=i(ui);Eb=n(Vu,"This model inherits from "),rd=r(Vu,"A",{href:!0});var q0=i(rd);Mb=n(q0,"FlaxPreTrainedModel"),q0.forEach(o),Rb=n(Vu,`. 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)`),Vu.forEach(o),zb=m(xo),fi=r(xo,"P",{});var Ju=i(fi);jb=n(Ju,"This model is also a Flax Linen "),gi=r(Ju,"A",{href:!0,rel:!0});var A0=i(gi);Cb=n(A0,"flax.linen.Module"),A0.forEach(o),qb=n(Ju,`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),Ju.forEach(o),Ab=m(xo),yp=r(xo,"P",{});var P0=i(yp);Pb=n(P0,"Finally, this model supports inherent JAX features such as:"),P0.forEach(o),Lb=m(xo),dt=r(xo,"UL",{});var dr=i(dt);Fp=r(dr,"LI",{});var L0=i(Fp);_i=r(L0,"A",{href:!0,rel:!0});var O0=i(_i);Ob=n(O0,"Just-In-Time (JIT) compilation"),O0.forEach(o),L0.forEach(o),Db=m(dr),bp=r(dr,"LI",{});var D0=i(bp);ki=r(D0,"A",{href:!0,rel:!0});var I0=i(ki);Ib=n(I0,"Automatic Differentiation"),I0.forEach(o),D0.forEach(o),Nb=m(dr),wp=r(dr,"LI",{});var N0=i(wp);vi=r(N0,"A",{href:!0,rel:!0});var S0=i(vi);Sb=n(S0,"Vectorization"),S0.forEach(o),N0.forEach(o),Wb=m(dr),Tp=r(dr,"LI",{});var W0=i(Tp);yi=r(W0,"A",{href:!0,rel:!0});var U0=i(yi);Ub=n(U0,"Parallelization"),U0.forEach(o),W0.forEach(o),dr.forEach(o),Kb=m(xo),Qo=r(xo,"DIV",{class:!0});var cr=i(Qo);b(Fi.$$.fragment,cr),Bb=m(cr),dn=r(cr,"P",{});var Ad=i(dn);Qb=n(Ad,"The "),$p=r(Ad,"CODE",{});var K0=i($p);Hb=n(K0,"FlaxRoFormerPreTrainedModel"),K0.forEach(o),Vb=n(Ad," forward method, overrides the "),xp=r(Ad,"CODE",{});var B0=i(xp);Jb=n(B0,"__call__"),B0.forEach(o),Gb=n(Ad," special method."),Ad.forEach(o),Xb=m(cr),b(qs.$$.fragment,cr),Yb=m(cr),b(As.$$.fragment,cr),cr.forEach(o),xo.forEach(o),Hh=m(a),cn=r(a,"H2",{class:!0});var Gu=i(cn);Ps=r(Gu,"A",{id:!0,class:!0,href:!0});var Q0=i(Ps);Ep=r(Q0,"SPAN",{});var H0=i(Ep);b(bi.$$.fragment,H0),H0.forEach(o),Q0.forEach(o),Zb=m(Gu),Mp=r(Gu,"SPAN",{});var V0=i(Mp);ew=n(V0,"FlaxRoFormerForMaskedLM"),V0.forEach(o),Gu.forEach(o),Vh=m(a),oo=r(a,"DIV",{class:!0});var Eo=i(oo);b(wi.$$.fragment,Eo),ow=m(Eo),Ti=r(Eo,"P",{});var Xu=i(Ti);tw=n(Xu,"RoFormer Model with a "),Rp=r(Xu,"CODE",{});var J0=i(Rp);nw=n(J0,"language modeling"),J0.forEach(o),sw=n(Xu," head on top."),Xu.forEach(o),rw=m(Eo),$i=r(Eo,"P",{});var Yu=i($i);aw=n(Yu,"This model inherits from "),ad=r(Yu,"A",{href:!0});var G0=i(ad);iw=n(G0,"FlaxPreTrainedModel"),G0.forEach(o),lw=n(Yu,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading, saving and converting weights from PyTorch models)`),Yu.forEach(o),dw=m(Eo),xi=r(Eo,"P",{});var Zu=i(xi);cw=n(Zu,"This model is also a Flax Linen "),Ei=r(Zu,"A",{href:!0,rel:!0});var X0=i(Ei);pw=n(X0,"flax.linen.Module"),X0.forEach(o),mw=n(Zu,`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),Zu.forEach(o),hw=m(Eo),zp=r(Eo,"P",{});var Y0=i(zp);uw=n(Y0,"Finally, this model supports inherent JAX features such as:"),Y0.forEach(o),fw=m(Eo),ct=r(Eo,"UL",{});var pr=i(ct);jp=r(pr,"LI",{});var Z0=i(jp);Mi=r(Z0,"A",{href:!0,rel:!0});var e4=i(Mi);gw=n(e4,"Just-In-Time (JIT) compilation"),e4.forEach(o),Z0.forEach(o),_w=m(pr),Cp=r(pr,"LI",{});var o4=i(Cp);Ri=r(o4,"A",{href:!0,rel:!0});var t4=i(Ri);kw=n(t4,"Automatic Differentiation"),t4.forEach(o),o4.forEach(o),vw=m(pr),qp=r(pr,"LI",{});var n4=i(qp);zi=r(n4,"A",{href:!0,rel:!0});var s4=i(zi);yw=n(s4,"Vectorization"),s4.forEach(o),n4.forEach(o),Fw=m(pr),Ap=r(pr,"LI",{});var r4=i(Ap);ji=r(r4,"A",{href:!0,rel:!0});var a4=i(ji);bw=n(a4,"Parallelization"),a4.forEach(o),r4.forEach(o),pr.forEach(o),ww=m(Eo),Ho=r(Eo,"DIV",{class:!0});var mr=i(Ho);b(Ci.$$.fragment,mr),Tw=m(mr),pn=r(mr,"P",{});var Pd=i(pn);$w=n(Pd,"The "),Pp=r(Pd,"CODE",{});var i4=i(Pp);xw=n(i4,"FlaxRoFormerPreTrainedModel"),i4.forEach(o),Ew=n(Pd," forward method, overrides the "),Lp=r(Pd,"CODE",{});var l4=i(Lp);Mw=n(l4,"__call__"),l4.forEach(o),Rw=n(Pd," special method."),Pd.forEach(o),zw=m(mr),b(Ls.$$.fragment,mr),jw=m(mr),b(Os.$$.fragment,mr),mr.forEach(o),Eo.forEach(o),Jh=m(a),mn=r(a,"H2",{class:!0});var ef=i(mn);Ds=r(ef,"A",{id:!0,class:!0,href:!0});var d4=i(Ds);Op=r(d4,"SPAN",{});var c4=i(Op);b(qi.$$.fragment,c4),c4.forEach(o),d4.forEach(o),Cw=m(ef),Dp=r(ef,"SPAN",{});var p4=i(Dp);qw=n(p4,"FlaxRoFormerForSequenceClassification"),p4.forEach(o),ef.forEach(o),Gh=m(a),to=r(a,"DIV",{class:!0});var Mo=i(to);b(Ai.$$.fragment,Mo),Aw=m(Mo),Ip=r(Mo,"P",{});var m4=i(Ip);Pw=n(m4,`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.`),m4.forEach(o),Lw=m(Mo),Pi=r(Mo,"P",{});var of=i(Pi);Ow=n(of,"This model inherits from "),id=r(of,"A",{href:!0});var h4=i(id);Dw=n(h4,"FlaxPreTrainedModel"),h4.forEach(o),Iw=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),Nw=m(Mo),Li=r(Mo,"P",{});var tf=i(Li);Sw=n(tf,"This model is also a Flax Linen "),Oi=r(tf,"A",{href:!0,rel:!0});var u4=i(Oi);Ww=n(u4,"flax.linen.Module"),u4.forEach(o),Uw=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),Kw=m(Mo),Np=r(Mo,"P",{});var f4=i(Np);Bw=n(f4,"Finally, this model supports inherent JAX features such as:"),f4.forEach(o),Qw=m(Mo),pt=r(Mo,"UL",{});var hr=i(pt);Sp=r(hr,"LI",{});var g4=i(Sp);Di=r(g4,"A",{href:!0,rel:!0});var _4=i(Di);Hw=n(_4,"Just-In-Time (JIT) compilation"),_4.forEach(o),g4.forEach(o),Vw=m(hr),Wp=r(hr,"LI",{});var k4=i(Wp);Ii=r(k4,"A",{href:!0,rel:!0});var v4=i(Ii);Jw=n(v4,"Automatic Differentiation"),v4.forEach(o),k4.forEach(o),Gw=m(hr),Up=r(hr,"LI",{});var y4=i(Up);Ni=r(y4,"A",{href:!0,rel:!0});var F4=i(Ni);Xw=n(F4,"Vectorization"),F4.forEach(o),y4.forEach(o),Yw=m(hr),Kp=r(hr,"LI",{});var b4=i(Kp);Si=r(b4,"A",{href:!0,rel:!0});var w4=i(Si);Zw=n(w4,"Parallelization"),w4.forEach(o),b4.forEach(o),hr.forEach(o),eT=m(Mo),Vo=r(Mo,"DIV",{class:!0});var ur=i(Vo);b(Wi.$$.fragment,ur),oT=m(ur),hn=r(ur,"P",{});var Ld=i(hn);tT=n(Ld,"The "),Bp=r(Ld,"CODE",{});var T4=i(Bp);nT=n(T4,"FlaxRoFormerPreTrainedModel"),T4.forEach(o),sT=n(Ld," forward method, overrides the "),Qp=r(Ld,"CODE",{});var $4=i(Qp);rT=n($4,"__call__"),$4.forEach(o),aT=n(Ld," special method."),Ld.forEach(o),iT=m(ur),b(Is.$$.fragment,ur),lT=m(ur),b(Ns.$$.fragment,ur),ur.forEach(o),Mo.forEach(o),Xh=m(a),un=r(a,"H2",{class:!0});var nf=i(un);Ss=r(nf,"A",{id:!0,class:!0,href:!0});var x4=i(Ss);Hp=r(x4,"SPAN",{});var E4=i(Hp);b(Ui.$$.fragment,E4),E4.forEach(o),x4.forEach(o),dT=m(nf),Vp=r(nf,"SPAN",{});var M4=i(Vp);cT=n(M4,"FlaxRoFormerForMultipleChoice"),M4.forEach(o),nf.forEach(o),Yh=m(a),no=r(a,"DIV",{class:!0});var Ro=i(no);b(Ki.$$.fragment,Ro),pT=m(Ro),Jp=r(Ro,"P",{});var R4=i(Jp);mT=n(R4,`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.`),R4.forEach(o),hT=m(Ro),Bi=r(Ro,"P",{});var sf=i(Bi);uT=n(sf,"This model inherits from "),ld=r(sf,"A",{href:!0});var z4=i(ld);fT=n(z4,"FlaxPreTrainedModel"),z4.forEach(o),gT=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),_T=m(Ro),Qi=r(Ro,"P",{});var rf=i(Qi);kT=n(rf,"This model is also a Flax Linen "),Hi=r(rf,"A",{href:!0,rel:!0});var j4=i(Hi);vT=n(j4,"flax.linen.Module"),j4.forEach(o),yT=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),FT=m(Ro),Gp=r(Ro,"P",{});var C4=i(Gp);bT=n(C4,"Finally, this model supports inherent JAX features such as:"),C4.forEach(o),wT=m(Ro),mt=r(Ro,"UL",{});var fr=i(mt);Xp=r(fr,"LI",{});var q4=i(Xp);Vi=r(q4,"A",{href:!0,rel:!0});var A4=i(Vi);TT=n(A4,"Just-In-Time (JIT) compilation"),A4.forEach(o),q4.forEach(o),$T=m(fr),Yp=r(fr,"LI",{});var P4=i(Yp);Ji=r(P4,"A",{href:!0,rel:!0});var L4=i(Ji);xT=n(L4,"Automatic Differentiation"),L4.forEach(o),P4.forEach(o),ET=m(fr),Zp=r(fr,"LI",{});var O4=i(Zp);Gi=r(O4,"A",{href:!0,rel:!0});var D4=i(Gi);MT=n(D4,"Vectorization"),D4.forEach(o),O4.forEach(o),RT=m(fr),em=r(fr,"LI",{});var I4=i(em);Xi=r(I4,"A",{href:!0,rel:!0});var N4=i(Xi);zT=n(N4,"Parallelization"),N4.forEach(o),I4.forEach(o),fr.forEach(o),jT=m(Ro),Jo=r(Ro,"DIV",{class:!0});var gr=i(Jo);b(Yi.$$.fragment,gr),CT=m(gr),fn=r(gr,"P",{});var Od=i(fn);qT=n(Od,"The "),om=r(Od,"CODE",{});var S4=i(om);AT=n(S4,"FlaxRoFormerPreTrainedModel"),S4.forEach(o),PT=n(Od," forward method, overrides the "),tm=r(Od,"CODE",{});var W4=i(tm);LT=n(W4,"__call__"),W4.forEach(o),OT=n(Od," special method."),Od.forEach(o),DT=m(gr),b(Ws.$$.fragment,gr),IT=m(gr),b(Us.$$.fragment,gr),gr.forEach(o),Ro.forEach(o),Zh=m(a),gn=r(a,"H2",{class:!0});var af=i(gn);Ks=r(af,"A",{id:!0,class:!0,href:!0});var U4=i(Ks);nm=r(U4,"SPAN",{});var K4=i(nm);b(Zi.$$.fragment,K4),K4.forEach(o),U4.forEach(o),NT=m(af),sm=r(af,"SPAN",{});var B4=i(sm);ST=n(B4,"FlaxRoFormerForTokenClassification"),B4.forEach(o),af.forEach(o),eu=m(a),so=r(a,"DIV",{class:!0});var zo=i(so);b(el.$$.fragment,zo),WT=m(zo),rm=r(zo,"P",{});var Q4=i(rm);UT=n(Q4,`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.`),Q4.forEach(o),KT=m(zo),ol=r(zo,"P",{});var lf=i(ol);BT=n(lf,"This model inherits from "),dd=r(lf,"A",{href:!0});var H4=i(dd);QT=n(H4,"FlaxPreTrainedModel"),H4.forEach(o),HT=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),VT=m(zo),tl=r(zo,"P",{});var df=i(tl);JT=n(df,"This model is also a Flax Linen "),nl=r(df,"A",{href:!0,rel:!0});var V4=i(nl);GT=n(V4,"flax.linen.Module"),V4.forEach(o),XT=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),YT=m(zo),am=r(zo,"P",{});var J4=i(am);ZT=n(J4,"Finally, this model supports inherent JAX features such as:"),J4.forEach(o),e1=m(zo),ht=r(zo,"UL",{});var _r=i(ht);im=r(_r,"LI",{});var G4=i(im);sl=r(G4,"A",{href:!0,rel:!0});var X4=i(sl);o1=n(X4,"Just-In-Time (JIT) compilation"),X4.forEach(o),G4.forEach(o),t1=m(_r),lm=r(_r,"LI",{});var Y4=i(lm);rl=r(Y4,"A",{href:!0,rel:!0});var Z4=i(rl);n1=n(Z4,"Automatic Differentiation"),Z4.forEach(o),Y4.forEach(o),s1=m(_r),dm=r(_r,"LI",{});var ex=i(dm);al=r(ex,"A",{href:!0,rel:!0});var ox=i(al);r1=n(ox,"Vectorization"),ox.forEach(o),ex.forEach(o),a1=m(_r),cm=r(_r,"LI",{});var tx=i(cm);il=r(tx,"A",{href:!0,rel:!0});var nx=i(il);i1=n(nx,"Parallelization"),nx.forEach(o),tx.forEach(o),_r.forEach(o),l1=m(zo),Go=r(zo,"DIV",{class:!0});var kr=i(Go);b(ll.$$.fragment,kr),d1=m(kr),_n=r(kr,"P",{});var Dd=i(_n);c1=n(Dd,"The "),pm=r(Dd,"CODE",{});var sx=i(pm);p1=n(sx,"FlaxRoFormerPreTrainedModel"),sx.forEach(o),m1=n(Dd," forward method, overrides the "),mm=r(Dd,"CODE",{});var rx=i(mm);h1=n(rx,"__call__"),rx.forEach(o),u1=n(Dd," special method."),Dd.forEach(o),f1=m(kr),b(Bs.$$.fragment,kr),g1=m(kr),b(Qs.$$.fragment,kr),kr.forEach(o),zo.forEach(o),ou=m(a),kn=r(a,"H2",{class:!0});var cf=i(kn);Hs=r(cf,"A",{id:!0,class:!0,href:!0});var ax=i(Hs);hm=r(ax,"SPAN",{});var ix=i(hm);b(dl.$$.fragment,ix),ix.forEach(o),ax.forEach(o),_1=m(cf),um=r(cf,"SPAN",{});var lx=i(um);k1=n(lx,"FlaxRoFormerForQuestionAnswering"),lx.forEach(o),cf.forEach(o),tu=m(a),ro=r(a,"DIV",{class:!0});var jo=i(ro);b(cl.$$.fragment,jo),v1=m(jo),vn=r(jo,"P",{});var Id=i(vn);y1=n(Id,`RoFormer Model with a span classification head on top for extractive question-answering tasks like SQuAD (a linear
layers on top of the hidden-states output to compute `),fm=r(Id,"CODE",{});var dx=i(fm);F1=n(dx,"span start logits"),dx.forEach(o),b1=n(Id," and "),gm=r(Id,"CODE",{});var cx=i(gm);w1=n(cx,"span end logits"),cx.forEach(o),T1=n(Id,")."),Id.forEach(o),$1=m(jo),pl=r(jo,"P",{});var pf=i(pl);x1=n(pf,"This model inherits from "),cd=r(pf,"A",{href:!0});var px=i(cd);E1=n(px,"FlaxPreTrainedModel"),px.forEach(o),M1=n(pf,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading, saving and converting weights from PyTorch models)`),pf.forEach(o),R1=m(jo),ml=r(jo,"P",{});var mf=i(ml);z1=n(mf,"This model is also a Flax Linen "),hl=r(mf,"A",{href:!0,rel:!0});var mx=i(hl);j1=n(mx,"flax.linen.Module"),mx.forEach(o),C1=n(mf,`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),mf.forEach(o),q1=m(jo),_m=r(jo,"P",{});var hx=i(_m);A1=n(hx,"Finally, this model supports inherent JAX features such as:"),hx.forEach(o),P1=m(jo),ut=r(jo,"UL",{});var vr=i(ut);km=r(vr,"LI",{});var ux=i(km);ul=r(ux,"A",{href:!0,rel:!0});var fx=i(ul);L1=n(fx,"Just-In-Time (JIT) compilation"),fx.forEach(o),ux.forEach(o),O1=m(vr),vm=r(vr,"LI",{});var gx=i(vm);fl=r(gx,"A",{href:!0,rel:!0});var _x=i(fl);D1=n(_x,"Automatic Differentiation"),_x.forEach(o),gx.forEach(o),I1=m(vr),ym=r(vr,"LI",{});var kx=i(ym);gl=r(kx,"A",{href:!0,rel:!0});var vx=i(gl);N1=n(vx,"Vectorization"),vx.forEach(o),kx.forEach(o),S1=m(vr),Fm=r(vr,"LI",{});var yx=i(Fm);_l=r(yx,"A",{href:!0,rel:!0});var Fx=i(_l);W1=n(Fx,"Parallelization"),Fx.forEach(o),yx.forEach(o),vr.forEach(o),U1=m(jo),Xo=r(jo,"DIV",{class:!0});var yr=i(Xo);b(kl.$$.fragment,yr),K1=m(yr),yn=r(yr,"P",{});var Nd=i(yn);B1=n(Nd,"The "),bm=r(Nd,"CODE",{});var bx=i(bm);Q1=n(bx,"FlaxRoFormerPreTrainedModel"),bx.forEach(o),H1=n(Nd," forward method, overrides the "),wm=r(Nd,"CODE",{});var wx=i(wm);V1=n(wx,"__call__"),wx.forEach(o),J1=n(Nd," special method."),Nd.forEach(o),G1=m(yr),b(Vs.$$.fragment,yr),X1=m(yr),b(Js.$$.fragment,yr),yr.forEach(o),jo.forEach(o),this.h()},h(){f(d,"name","hf:doc:metadata"),f(d,"content",JSON.stringify(jE)),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(I,"class","relative group"),f(ie,"href","https://arxiv.org/pdf/2104.09864v1.pdf"),f(ie,"rel","nofollow"),f(A,"href","https://huggingface.co/junnyu"),f(A,"rel","nofollow"),f(le,"href","https://github.com/ZhuiyiTechnology/roformer"),f(le,"rel","nofollow"),f(O,"id","documentation-resources"),f(O,"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(O,"href","#documentation-resources"),f(re,"class","relative group"),f(de,"href","./tasks/sequence_classification"),f(Z,"href","./tasks/token_classification"),f(De,"href","./tasks/question_answering"),f(Ie,"href","./tasks/language_modeling"),f(Ne,"href","./tasks/masked_language_modeling"),f(ce,"href","./tasks/multiple_choice"),f(Tn,"id","transformers.RoFormerConfig"),f(Tn,"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(Tn,"href","#transformers.RoFormerConfig"),f(Ae,"class","relative group"),f(El,"href","/docs/transformers/v4.27.1/en/model_doc/roformer#transformers.RoFormerModel"),f(wr,"href","https://huggingface.co/junnyu/roformer_chinese_base"),f(wr,"rel","nofollow"),f(Ml,"href","/docs/transformers/v4.27.1/en/main_classes/configuration#transformers.PretrainedConfig"),f(Rl,"href","/docs/transformers/v4.27.1/en/main_classes/configuration#transformers.PretrainedConfig"),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(xn,"id","transformers.RoFormerTokenizer"),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.RoFormerTokenizer"),f(Et,"class","relative group"),f(Er,"href","https://pypi.org/project/rjieba/"),f(Er,"rel","nofollow"),f(zl,"href","/docs/transformers/v4.27.1/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(Mn,"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(ql,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(Ze,"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.RoFormerTokenizerFast"),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.RoFormerTokenizerFast"),f(Rt,"class","relative group"),f(Al,"href","/docs/transformers/v4.27.1/en/model_doc/roformer#transformers.RoFormerTokenizerFast"),f(Pl,"href","/docs/transformers/v4.27.1/en/model_doc/bert#transformers.BertTokenizerFast"),f(Ll,"href","/docs/transformers/v4.27.1/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(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(qn,"id","transformers.RoFormerModel"),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.RoFormerModel"),f(zt,"class","relative group"),f(Kr,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),f(Kr,"rel","nofollow"),f(Qr,"href","https://arxiv.org/abs/1706.03762"),f(Qr,"rel","nofollow"),f(Il,"href","/docs/transformers/v4.27.1/en/model_doc/roformer#transformers.RoFormerModel"),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(_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(Ln,"id","transformers.RoFormerForCausalLM"),f(Ln,"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(Ln,"href","#transformers.RoFormerForCausalLM"),f(Ct,"class","relative group"),f(Gr,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),f(Gr,"rel","nofollow"),f(Nl,"href","/docs/transformers/v4.27.1/en/model_doc/roformer#transformers.RoFormerForCausalLM"),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(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(In,"id","transformers.RoFormerForMaskedLM"),f(In,"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(In,"href","#transformers.RoFormerForMaskedLM"),f(Pt,"class","relative group"),f(ea,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),f(ea,"rel","nofollow"),f(Sl,"href","/docs/transformers/v4.27.1/en/model_doc/roformer#transformers.RoFormerForMaskedLM"),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(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(Wn,"id","transformers.RoFormerForSequenceClassification"),f(Wn,"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(Wn,"href","#transformers.RoFormerForSequenceClassification"),f(Dt,"class","relative group"),f(ra,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),f(ra,"rel","nofollow"),f(Wl,"href","/docs/transformers/v4.27.1/en/model_doc/roformer#transformers.RoFormerForSequenceClassification"),f(yo,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),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(Qn,"id","transformers.RoFormerForMultipleChoice"),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.RoFormerForMultipleChoice"),f(Nt,"class","relative group"),f(ca,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),f(ca,"rel","nofollow"),f(Ul,"href","/docs/transformers/v4.27.1/en/model_doc/roformer#transformers.RoFormerForMultipleChoice"),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(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(Jn,"id","transformers.RoFormerForTokenClassification"),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.RoFormerForTokenClassification"),f(Wt,"class","relative group"),f(fa,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),f(fa,"rel","nofollow"),f(Kl,"href","/docs/transformers/v4.27.1/en/model_doc/roformer#transformers.RoFormerForTokenClassification"),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(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(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(Kt,"class","relative group"),f(ya,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),f(ya,"rel","nofollow"),f(Bl,"href","/docs/transformers/v4.27.1/en/model_doc/roformer#transformers.RoFormerForQuestionAnswering"),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(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(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(Ht,"class","relative group"),f(Ql,"href","/docs/transformers/v4.27.1/en/main_classes/model#transformers.TFPreTrainedModel"),f(xa,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),f(xa,"rel","nofollow"),f(Hl,"href","/docs/transformers/v4.27.1/en/model_doc/roformer#transformers.TFRoFormerModel"),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(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(Jt,"class","relative group"),f(Vl,"href","/docs/transformers/v4.27.1/en/main_classes/model#transformers.TFPreTrainedModel"),f(qa,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),f(qa,"rel","nofollow"),f(Jl,"href","/docs/transformers/v4.27.1/en/model_doc/roformer#transformers.TFRoFormerForMaskedLM"),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(po,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(cs,"id","transformers.TFRoFormerForCausalLM"),f(cs,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),f(cs,"href","#transformers.TFRoFormerForCausalLM"),f(Xt,"class","relative group"),f(Gl,"href","/docs/transformers/v4.27.1/en/main_classes/model#transformers.TFPreTrainedModel"),f(Na,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),f(Na,"rel","nofollow"),f(kt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(mo,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(hs,"id","transformers.TFRoFormerForSequenceClassification"),f(hs,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),f(hs,"href","#transformers.TFRoFormerForSequenceClassification"),f(Yt,"class","relative group"),f(Xl,"href","/docs/transformers/v4.27.1/en/main_classes/model#transformers.TFPreTrainedModel"),f(Qa,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),f(Qa,"rel","nofollow"),f(Yl,"href","/docs/transformers/v4.27.1/en/model_doc/roformer#transformers.TFRoFormerForSequenceClassification"),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(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(ks,"id","transformers.TFRoFormerForMultipleChoice"),f(ks,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),f(ks,"href","#transformers.TFRoFormerForMultipleChoice"),f(en,"class","relative group"),f(Zl,"href","/docs/transformers/v4.27.1/en/main_classes/model#transformers.TFPreTrainedModel"),f(Ya,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),f(Ya,"rel","nofollow"),f(ed,"href","/docs/transformers/v4.27.1/en/model_doc/roformer#transformers.TFRoFormerForMultipleChoice"),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(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(bs,"id","transformers.TFRoFormerForTokenClassification"),f(bs,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),f(bs,"href","#transformers.TFRoFormerForTokenClassification"),f(tn,"class","relative group"),f(od,"href","/docs/transformers/v4.27.1/en/main_classes/model#transformers.TFPreTrainedModel"),f(si,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),f(si,"rel","nofollow"),f(td,"href","/docs/transformers/v4.27.1/en/model_doc/roformer#transformers.TFRoFormerForTokenClassification"),f(wo,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(fo,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(Es,"id","transformers.TFRoFormerForQuestionAnswering"),f(Es,"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(Es,"href","#transformers.TFRoFormerForQuestionAnswering"),f(sn,"class","relative group"),f(nd,"href","/docs/transformers/v4.27.1/en/main_classes/model#transformers.TFPreTrainedModel"),f(ci,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),f(ci,"rel","nofollow"),f(sd,"href","/docs/transformers/v4.27.1/en/model_doc/roformer#transformers.TFRoFormerForQuestionAnswering"),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(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(Cs,"id","transformers.FlaxRoFormerModel"),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.FlaxRoFormerModel"),f(ln,"class","relative group"),f(rd,"href","/docs/transformers/v4.27.1/en/main_classes/model#transformers.FlaxPreTrainedModel"),f(gi,"href","https://flax.readthedocs.io/en/latest/flax.linen.html#module"),f(gi,"rel","nofollow"),f(_i,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),f(_i,"rel","nofollow"),f(ki,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),f(ki,"rel","nofollow"),f(vi,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),f(vi,"rel","nofollow"),f(yi,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),f(yi,"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(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(Ps,"id","transformers.FlaxRoFormerForMaskedLM"),f(Ps,"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(Ps,"href","#transformers.FlaxRoFormerForMaskedLM"),f(cn,"class","relative group"),f(ad,"href","/docs/transformers/v4.27.1/en/main_classes/model#transformers.FlaxPreTrainedModel"),f(Ei,"href","https://flax.readthedocs.io/en/latest/flax.linen.html#module"),f(Ei,"rel","nofollow"),f(Mi,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),f(Mi,"rel","nofollow"),f(Ri,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),f(Ri,"rel","nofollow"),f(zi,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),f(zi,"rel","nofollow"),f(ji,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),f(ji,"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(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(Ds,"id","transformers.FlaxRoFormerForSequenceClassification"),f(Ds,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),f(Ds,"href","#transformers.FlaxRoFormerForSequenceClassification"),f(mn,"class","relative group"),f(id,"href","/docs/transformers/v4.27.1/en/main_classes/model#transformers.FlaxPreTrainedModel"),f(Oi,"href","https://flax.readthedocs.io/en/latest/flax.linen.html#module"),f(Oi,"rel","nofollow"),f(Di,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),f(Di,"rel","nofollow"),f(Ii,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),f(Ii,"rel","nofollow"),f(Ni,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),f(Ni,"rel","nofollow"),f(Si,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),f(Si,"rel","nofollow"),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(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(Ss,"id","transformers.FlaxRoFormerForMultipleChoice"),f(Ss,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),f(Ss,"href","#transformers.FlaxRoFormerForMultipleChoice"),f(un,"class","relative group"),f(ld,"href","/docs/transformers/v4.27.1/en/main_classes/model#transformers.FlaxPreTrainedModel"),f(Hi,"href","https://flax.readthedocs.io/en/latest/flax.linen.html#module"),f(Hi,"rel","nofollow"),f(Vi,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),f(Vi,"rel","nofollow"),f(Ji,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),f(Ji,"rel","nofollow"),f(Gi,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),f(Gi,"rel","nofollow"),f(Xi,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),f(Xi,"rel","nofollow"),f(Jo,"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(Ks,"id","transformers.FlaxRoFormerForTokenClassification"),f(Ks,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),f(Ks,"href","#transformers.FlaxRoFormerForTokenClassification"),f(gn,"class","relative group"),f(dd,"href","/docs/transformers/v4.27.1/en/main_classes/model#transformers.FlaxPreTrainedModel"),f(nl,"href","https://flax.readthedocs.io/en/latest/flax.linen.html#module"),f(nl,"rel","nofollow"),f(sl,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),f(sl,"rel","nofollow"),f(rl,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),f(rl,"rel","nofollow"),f(al,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),f(al,"rel","nofollow"),f(il,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),f(il,"rel","nofollow"),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(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(Hs,"id","transformers.FlaxRoFormerForQuestionAnswering"),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.FlaxRoFormerForQuestionAnswering"),f(kn,"class","relative group"),f(cd,"href","/docs/transformers/v4.27.1/en/main_classes/model#transformers.FlaxPreTrainedModel"),f(hl,"href","https://flax.readthedocs.io/en/latest/flax.linen.html#module"),f(hl,"rel","nofollow"),f(ul,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),f(ul,"rel","nofollow"),f(fl,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),f(fl,"rel","nofollow"),f(gl,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),f(gl,"rel","nofollow"),f(_l,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),f(_l,"rel","nofollow"),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(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,v){e(document.head,d),g(a,k,v),g(a,h,v),e(h,u),e(u,_),w(l,_,null),e(h,c),e(h,z),e(z,be),g(a,fe,v),g(a,I,v),e(I,ae),e(ae,ee),w(E,ee,null),e(I,we),e(I,Q),e(Q,Te),g(a,ge,v),g(a,N,v),e(N,$e),e(N,ie),e(ie,V),e(N,xe),g(a,_e,v),g(a,W,v),e(W,Ee),g(a,ke,v),g(a,U,v),e(U,pe),e(pe,Me),g(a,te,v),g(a,C,v),e(C,P),g(a,ve,v),g(a,K,v),e(K,me),e(me,Re),g(a,H,v),g(a,se,v),e(se,ze),e(se,A),e(A,je),e(se,J),e(se,le),e(le,Ce),e(se,G),g(a,ye,v),g(a,re,v),e(re,O),e(O,he),w(S,he,null),e(re,qe),e(re,oe),e(oe,L),g(a,Fe,v),g(a,q,v),e(q,ue),e(ue,de),e(de,y),e(q,R),e(q,Se),e(Se,Z),e(Z,He),e(q,Ve),e(q,j),e(j,De),e(De,Je),e(q,Ge),e(q,We),e(We,Ie),e(Ie,D),e(q,X),e(q,Ue),e(Ue,Ne),e(Ne,Y),e(q,Xe),e(q,Ke),e(Ke,ce),e(ce,Ye),g(a,ne,v),g(a,Ae,v),e(Ae,Tn),e(Tn,Sd),w(Fr,Sd,null),e(Ae,hf),e(Ae,Wd),e(Wd,uf),g(a,mh,v),g(a,Co,v),w(br,Co,null),e(Co,ff),e(Co,$t),e($t,gf),e($t,El),e(El,_f),e($t,kf),e($t,wr),e(wr,vf),e($t,yf),e(Co,Ff),e(Co,xt),e(xt,bf),e(xt,Ml),e(Ml,wf),e(xt,Tf),e(xt,Rl),e(Rl,$f),e(xt,xf),e(Co,Ef),w($n,Co,null),g(a,hh,v),g(a,Et,v),e(Et,xn),e(xn,Ud),w(Tr,Ud,null),e(Et,Mf),e(Et,Kd),e(Kd,Rf),g(a,uh,v),g(a,Ze,v),w($r,Ze,null),e(Ze,zf),e(Ze,xr),e(xr,jf),e(xr,Er),e(Er,Cf),e(xr,qf),e(Ze,Af),e(Ze,Mr),e(Mr,Pf),e(Mr,zl),e(zl,Lf),e(Mr,Of),e(Ze,Df),w(En,Ze,null),e(Ze,If),e(Ze,gt),w(Rr,gt,null),e(gt,Nf),e(gt,Bd),e(Bd,Sf),e(gt,Wf),e(gt,zr),e(zr,jl),e(jl,Uf),e(jl,Qd),e(Qd,Kf),e(zr,Bf),e(zr,Cl),e(Cl,Qf),e(Cl,Hd),e(Hd,Hf),e(Ze,Vf),e(Ze,Mn),w(jr,Mn,null),e(Mn,Jf),e(Mn,Cr),e(Cr,Gf),e(Cr,Vd),e(Vd,Xf),e(Cr,Yf),e(Ze,Zf),e(Ze,Oo),w(qr,Oo,null),e(Oo,eg),e(Oo,Jd),e(Jd,og),e(Oo,tg),w(Rn,Oo,null),e(Oo,ng),e(Oo,Mt),e(Mt,sg),e(Mt,Gd),e(Gd,rg),e(Mt,ag),e(Mt,Xd),e(Xd,ig),e(Mt,lg),e(Ze,dg),e(Ze,ql),w(Ar,ql,null),g(a,fh,v),g(a,Rt,v),e(Rt,zn),e(zn,Yd),w(Pr,Yd,null),e(Rt,cg),e(Rt,Zd),e(Zd,pg),g(a,gh,v),g(a,io,v),w(Lr,io,null),e(io,mg),e(io,Or),e(Or,hg),e(Or,ec),e(ec,ug),e(Or,fg),e(io,gg),e(io,jn),e(jn,Al),e(Al,_g),e(jn,kg),e(jn,Pl),e(Pl,vg),e(jn,yg),e(io,Fg),e(io,Dr),e(Dr,bg),e(Dr,Ll),e(Ll,wg),e(Dr,Tg),e(io,$g),w(Cn,io,null),e(io,xg),e(io,_t),w(Ir,_t,null),e(_t,Eg),e(_t,oc),e(oc,Mg),e(_t,Rg),e(_t,Nr),e(Nr,Ol),e(Ol,zg),e(Ol,tc),e(tc,jg),e(Nr,Cg),e(Nr,Dl),e(Dl,qg),e(Dl,nc),e(nc,Ag),g(a,_h,v),g(a,zt,v),e(zt,qn),e(qn,sc),w(Sr,sc,null),e(zt,Pg),e(zt,rc),e(rc,Lg),g(a,kh,v),g(a,_o,v),w(Wr,_o,null),e(_o,Og),e(_o,Ur),e(Ur,Dg),e(Ur,Kr),e(Kr,Ig),e(Ur,Ng),e(_o,Sg),e(_o,Br),e(Br,Wg),e(Br,Qr),e(Qr,Ug),e(Br,Kg),e(_o,Bg),e(_o,lo),e(lo,Qg),e(lo,ac),e(ac,Hg),e(lo,Vg),e(lo,ic),e(ic,Jg),e(lo,Gg),e(lo,lc),e(lc,Xg),e(lo,Yg),e(lo,dc),e(dc,Zg),e(lo,e_),e(lo,cc),e(cc,o_),e(lo,t_),e(lo,pc),e(pc,n_),e(lo,s_),e(_o,r_),e(_o,Do),w(Hr,Do,null),e(Do,a_),e(Do,jt),e(jt,i_),e(jt,Il),e(Il,l_),e(jt,d_),e(jt,mc),e(mc,c_),e(jt,p_),e(Do,m_),w(An,Do,null),e(Do,h_),w(Pn,Do,null),g(a,vh,v),g(a,Ct,v),e(Ct,Ln),e(Ln,hc),w(Vr,hc,null),e(Ct,u_),e(Ct,uc),e(uc,f_),g(a,yh,v),g(a,it,v),w(Jr,it,null),e(it,g_),e(it,qt),e(qt,__),e(qt,fc),e(fc,k_),e(qt,v_),e(qt,Gr),e(Gr,y_),e(qt,F_),e(it,b_),e(it,Io),w(Xr,Io,null),e(Io,w_),e(Io,At),e(At,T_),e(At,Nl),e(Nl,$_),e(At,x_),e(At,gc),e(gc,E_),e(At,M_),e(Io,R_),w(On,Io,null),e(Io,z_),w(Dn,Io,null),g(a,Fh,v),g(a,Pt,v),e(Pt,In),e(In,_c),w(Yr,_c,null),e(Pt,j_),e(Pt,kc),e(kc,C_),g(a,bh,v),g(a,lt,v),w(Zr,lt,null),e(lt,q_),e(lt,Lt),e(Lt,A_),e(Lt,vc),e(vc,P_),e(Lt,L_),e(Lt,ea),e(ea,O_),e(Lt,D_),e(lt,I_),e(lt,No),w(oa,No,null),e(No,N_),e(No,Ot),e(Ot,S_),e(Ot,Sl),e(Sl,W_),e(Ot,U_),e(Ot,yc),e(yc,K_),e(Ot,B_),e(No,Q_),w(Nn,No,null),e(No,H_),w(Sn,No,null),g(a,wh,v),g(a,Dt,v),e(Dt,Wn),e(Wn,Fc),w(ta,Fc,null),e(Dt,V_),e(Dt,bc),e(bc,J_),g(a,Th,v),g(a,qo,v),w(na,qo,null),e(qo,G_),e(qo,wc),e(wc,X_),e(qo,Y_),e(qo,sa),e(sa,Z_),e(sa,ra),e(ra,ek),e(sa,ok),e(qo,tk),e(qo,yo),w(aa,yo,null),e(yo,nk),e(yo,It),e(It,sk),e(It,Wl),e(Wl,rk),e(It,ak),e(It,Tc),e(Tc,ik),e(It,lk),e(yo,dk),w(Un,yo,null),e(yo,ck),w(Kn,yo,null),e(yo,pk),w(Bn,yo,null),g(a,$h,v),g(a,Nt,v),e(Nt,Qn),e(Qn,$c),w(ia,$c,null),e(Nt,mk),e(Nt,xc),e(xc,hk),g(a,xh,v),g(a,Ao,v),w(la,Ao,null),e(Ao,uk),e(Ao,Ec),e(Ec,fk),e(Ao,gk),e(Ao,da),e(da,_k),e(da,ca),e(ca,kk),e(da,vk),e(Ao,yk),e(Ao,So),w(pa,So,null),e(So,Fk),e(So,St),e(St,bk),e(St,Ul),e(Ul,wk),e(St,Tk),e(St,Mc),e(Mc,$k),e(St,xk),e(So,Ek),w(Hn,So,null),e(So,Mk),w(Vn,So,null),g(a,Eh,v),g(a,Wt,v),e(Wt,Jn),e(Jn,Rc),w(ma,Rc,null),e(Wt,Rk),e(Wt,zc),e(zc,zk),g(a,Mh,v),g(a,Po,v),w(ha,Po,null),e(Po,jk),e(Po,jc),e(jc,Ck),e(Po,qk),e(Po,ua),e(ua,Ak),e(ua,fa),e(fa,Pk),e(ua,Lk),e(Po,Ok),e(Po,Wo),w(ga,Wo,null),e(Wo,Dk),e(Wo,Ut),e(Ut,Ik),e(Ut,Kl),e(Kl,Nk),e(Ut,Sk),e(Ut,Cc),e(Cc,Wk),e(Ut,Uk),e(Wo,Kk),w(Gn,Wo,null),e(Wo,Bk),w(Xn,Wo,null),g(a,Rh,v),g(a,Kt,v),e(Kt,Yn),e(Yn,qc),w(_a,qc,null),e(Kt,Qk),e(Kt,Ac),e(Ac,Hk),g(a,zh,v),g(a,Lo,v),w(ka,Lo,null),e(Lo,Vk),e(Lo,Bt),e(Bt,Jk),e(Bt,Pc),e(Pc,Gk),e(Bt,Xk),e(Bt,Lc),e(Lc,Yk),e(Bt,Zk),e(Lo,ev),e(Lo,va),e(va,ov),e(va,ya),e(ya,tv),e(va,nv),e(Lo,sv),e(Lo,Uo),w(Fa,Uo,null),e(Uo,rv),e(Uo,Qt),e(Qt,av),e(Qt,Bl),e(Bl,iv),e(Qt,lv),e(Qt,Oc),e(Oc,dv),e(Qt,cv),e(Uo,pv),w(Zn,Uo,null),e(Uo,mv),w(es,Uo,null),g(a,jh,v),g(a,Ht,v),e(Ht,os),e(os,Dc),w(ba,Dc,null),e(Ht,hv),e(Ht,Ic),e(Ic,uv),g(a,Ch,v),g(a,co,v),w(wa,co,null),e(co,fv),e(co,Nc),e(Nc,gv),e(co,_v),e(co,Ta),e(Ta,kv),e(Ta,Ql),e(Ql,vv),e(Ta,yv),e(co,Fv),e(co,$a),e($a,bv),e($a,xa),e(xa,wv),e($a,Tv),e(co,$v),w(ts,co,null),e(co,xv),e(co,Ko),w(Ea,Ko,null),e(Ko,Ev),e(Ko,Vt),e(Vt,Mv),e(Vt,Hl),e(Hl,Rv),e(Vt,zv),e(Vt,Sc),e(Sc,jv),e(Vt,Cv),e(Ko,qv),w(ns,Ko,null),e(Ko,Av),w(ss,Ko,null),g(a,qh,v),g(a,Jt,v),e(Jt,rs),e(rs,Wc),w(Ma,Wc,null),e(Jt,Pv),e(Jt,Uc),e(Uc,Lv),g(a,Ah,v),g(a,po,v),w(Ra,po,null),e(po,Ov),e(po,za),e(za,Dv),e(za,Kc),e(Kc,Iv),e(za,Nv),e(po,Sv),e(po,ja),e(ja,Wv),e(ja,Vl),e(Vl,Uv),e(ja,Kv),e(po,Bv),e(po,Ca),e(Ca,Qv),e(Ca,qa),e(qa,Hv),e(Ca,Vv),e(po,Jv),w(as,po,null),e(po,Gv),e(po,Fo),w(Aa,Fo,null),e(Fo,Xv),e(Fo,Gt),e(Gt,Yv),e(Gt,Jl),e(Jl,Zv),e(Gt,ey),e(Gt,Bc),e(Bc,oy),e(Gt,ty),e(Fo,ny),w(is,Fo,null),e(Fo,sy),w(ls,Fo,null),e(Fo,ry),w(ds,Fo,null),g(a,Ph,v),g(a,Xt,v),e(Xt,cs),e(cs,Qc),w(Pa,Qc,null),e(Xt,ay),e(Xt,Hc),e(Hc,iy),g(a,Lh,v),g(a,mo,v),w(La,mo,null),e(mo,ly),e(mo,Oa),e(Oa,dy),e(Oa,Vc),e(Vc,cy),e(Oa,py),e(mo,my),e(mo,Da),e(Da,hy),e(Da,Gl),e(Gl,uy),e(Da,fy),e(mo,gy),e(mo,Ia),e(Ia,_y),e(Ia,Na),e(Na,ky),e(Ia,vy),e(mo,yy),w(ps,mo,null),e(mo,Fy),e(mo,kt),w(Sa,kt,null),e(kt,by),e(kt,ko),e(ko,wy),e(ko,Jc),e(Jc,Ty),e(ko,$y),e(ko,Gc),e(Gc,xy),e(ko,Ey),e(ko,Xc),e(Xc,My),e(ko,Ry),e(ko,Yc),e(Yc,zy),e(ko,jy),e(ko,Zc),e(Zc,Cy),e(ko,qy),e(kt,Ay),w(ms,kt,null),g(a,Oh,v),g(a,Yt,v),e(Yt,hs),e(hs,ep),w(Wa,ep,null),e(Yt,Py),e(Yt,op),e(op,Ly),g(a,Dh,v),g(a,ho,v),w(Ua,ho,null),e(ho,Oy),e(ho,tp),e(tp,Dy),e(ho,Iy),e(ho,Ka),e(Ka,Ny),e(Ka,Xl),e(Xl,Sy),e(Ka,Wy),e(ho,Uy),e(ho,Ba),e(Ba,Ky),e(Ba,Qa),e(Qa,By),e(Ba,Qy),e(ho,Hy),w(us,ho,null),e(ho,Vy),e(ho,bo),w(Ha,bo,null),e(bo,Jy),e(bo,Zt),e(Zt,Gy),e(Zt,Yl),e(Yl,Xy),e(Zt,Yy),e(Zt,np),e(np,Zy),e(Zt,eF),e(bo,oF),w(fs,bo,null),e(bo,tF),w(gs,bo,null),e(bo,nF),w(_s,bo,null),g(a,Ih,v),g(a,en,v),e(en,ks),e(ks,sp),w(Va,sp,null),e(en,sF),e(en,rp),e(rp,rF),g(a,Nh,v),g(a,uo,v),w(Ja,uo,null),e(uo,aF),e(uo,ap),e(ap,iF),e(uo,lF),e(uo,Ga),e(Ga,dF),e(Ga,Zl),e(Zl,cF),e(Ga,pF),e(uo,mF),e(uo,Xa),e(Xa,hF),e(Xa,Ya),e(Ya,uF),e(Xa,fF),e(uo,gF),w(vs,uo,null),e(uo,_F),e(uo,Bo),w(Za,Bo,null),e(Bo,kF),e(Bo,on),e(on,vF),e(on,ed),e(ed,yF),e(on,FF),e(on,ip),e(ip,bF),e(on,wF),e(Bo,TF),w(ys,Bo,null),e(Bo,$F),w(Fs,Bo,null),g(a,Sh,v),g(a,tn,v),e(tn,bs),e(bs,lp),w(ei,lp,null),e(tn,xF),e(tn,dp),e(dp,EF),g(a,Wh,v),g(a,fo,v),w(oi,fo,null),e(fo,MF),e(fo,cp),e(cp,RF),e(fo,zF),e(fo,ti),e(ti,jF),e(ti,od),e(od,CF),e(ti,qF),e(fo,AF),e(fo,ni),e(ni,PF),e(ni,si),e(si,LF),e(ni,OF),e(fo,DF),w(ws,fo,null),e(fo,IF),e(fo,wo),w(ri,wo,null),e(wo,NF),e(wo,nn),e(nn,SF),e(nn,td),e(td,WF),e(nn,UF),e(nn,pp),e(pp,KF),e(nn,BF),e(wo,QF),w(Ts,wo,null),e(wo,HF),w($s,wo,null),e(wo,VF),w(xs,wo,null),g(a,Uh,v),g(a,sn,v),e(sn,Es),e(Es,mp),w(ai,mp,null),e(sn,JF),e(sn,hp),e(hp,GF),g(a,Kh,v),g(a,go,v),w(ii,go,null),e(go,XF),e(go,rn),e(rn,YF),e(rn,up),e(up,ZF),e(rn,eb),e(rn,fp),e(fp,ob),e(rn,tb),e(go,nb),e(go,li),e(li,sb),e(li,nd),e(nd,rb),e(li,ab),e(go,ib),e(go,di),e(di,lb),e(di,ci),e(ci,db),e(di,cb),e(go,pb),w(Ms,go,null),e(go,mb),e(go,To),w(pi,To,null),e(To,hb),e(To,an),e(an,ub),e(an,sd),e(sd,fb),e(an,gb),e(an,gp),e(gp,_b),e(an,kb),e(To,vb),w(Rs,To,null),e(To,yb),w(zs,To,null),e(To,Fb),w(js,To,null),g(a,Bh,v),g(a,ln,v),e(ln,Cs),e(Cs,_p),w(mi,_p,null),e(ln,bb),e(ln,kp),e(kp,wb),g(a,Qh,v),g(a,eo,v),w(hi,eo,null),e(eo,Tb),e(eo,vp),e(vp,$b),e(eo,xb),e(eo,ui),e(ui,Eb),e(ui,rd),e(rd,Mb),e(ui,Rb),e(eo,zb),e(eo,fi),e(fi,jb),e(fi,gi),e(gi,Cb),e(fi,qb),e(eo,Ab),e(eo,yp),e(yp,Pb),e(eo,Lb),e(eo,dt),e(dt,Fp),e(Fp,_i),e(_i,Ob),e(dt,Db),e(dt,bp),e(bp,ki),e(ki,Ib),e(dt,Nb),e(dt,wp),e(wp,vi),e(vi,Sb),e(dt,Wb),e(dt,Tp),e(Tp,yi),e(yi,Ub),e(eo,Kb),e(eo,Qo),w(Fi,Qo,null),e(Qo,Bb),e(Qo,dn),e(dn,Qb),e(dn,$p),e($p,Hb),e(dn,Vb),e(dn,xp),e(xp,Jb),e(dn,Gb),e(Qo,Xb),w(qs,Qo,null),e(Qo,Yb),w(As,Qo,null),g(a,Hh,v),g(a,cn,v),e(cn,Ps),e(Ps,Ep),w(bi,Ep,null),e(cn,Zb),e(cn,Mp),e(Mp,ew),g(a,Vh,v),g(a,oo,v),w(wi,oo,null),e(oo,ow),e(oo,Ti),e(Ti,tw),e(Ti,Rp),e(Rp,nw),e(Ti,sw),e(oo,rw),e(oo,$i),e($i,aw),e($i,ad),e(ad,iw),e($i,lw),e(oo,dw),e(oo,xi),e(xi,cw),e(xi,Ei),e(Ei,pw),e(xi,mw),e(oo,hw),e(oo,zp),e(zp,uw),e(oo,fw),e(oo,ct),e(ct,jp),e(jp,Mi),e(Mi,gw),e(ct,_w),e(ct,Cp),e(Cp,Ri),e(Ri,kw),e(ct,vw),e(ct,qp),e(qp,zi),e(zi,yw),e(ct,Fw),e(ct,Ap),e(Ap,ji),e(ji,bw),e(oo,ww),e(oo,Ho),w(Ci,Ho,null),e(Ho,Tw),e(Ho,pn),e(pn,$w),e(pn,Pp),e(Pp,xw),e(pn,Ew),e(pn,Lp),e(Lp,Mw),e(pn,Rw),e(Ho,zw),w(Ls,Ho,null),e(Ho,jw),w(Os,Ho,null),g(a,Jh,v),g(a,mn,v),e(mn,Ds),e(Ds,Op),w(qi,Op,null),e(mn,Cw),e(mn,Dp),e(Dp,qw),g(a,Gh,v),g(a,to,v),w(Ai,to,null),e(to,Aw),e(to,Ip),e(Ip,Pw),e(to,Lw),e(to,Pi),e(Pi,Ow),e(Pi,id),e(id,Dw),e(Pi,Iw),e(to,Nw),e(to,Li),e(Li,Sw),e(Li,Oi),e(Oi,Ww),e(Li,Uw),e(to,Kw),e(to,Np),e(Np,Bw),e(to,Qw),e(to,pt),e(pt,Sp),e(Sp,Di),e(Di,Hw),e(pt,Vw),e(pt,Wp),e(Wp,Ii),e(Ii,Jw),e(pt,Gw),e(pt,Up),e(Up,Ni),e(Ni,Xw),e(pt,Yw),e(pt,Kp),e(Kp,Si),e(Si,Zw),e(to,eT),e(to,Vo),w(Wi,Vo,null),e(Vo,oT),e(Vo,hn),e(hn,tT),e(hn,Bp),e(Bp,nT),e(hn,sT),e(hn,Qp),e(Qp,rT),e(hn,aT),e(Vo,iT),w(Is,Vo,null),e(Vo,lT),w(Ns,Vo,null),g(a,Xh,v),g(a,un,v),e(un,Ss),e(Ss,Hp),w(Ui,Hp,null),e(un,dT),e(un,Vp),e(Vp,cT),g(a,Yh,v),g(a,no,v),w(Ki,no,null),e(no,pT),e(no,Jp),e(Jp,mT),e(no,hT),e(no,Bi),e(Bi,uT),e(Bi,ld),e(ld,fT),e(Bi,gT),e(no,_T),e(no,Qi),e(Qi,kT),e(Qi,Hi),e(Hi,vT),e(Qi,yT),e(no,FT),e(no,Gp),e(Gp,bT),e(no,wT),e(no,mt),e(mt,Xp),e(Xp,Vi),e(Vi,TT),e(mt,$T),e(mt,Yp),e(Yp,Ji),e(Ji,xT),e(mt,ET),e(mt,Zp),e(Zp,Gi),e(Gi,MT),e(mt,RT),e(mt,em),e(em,Xi),e(Xi,zT),e(no,jT),e(no,Jo),w(Yi,Jo,null),e(Jo,CT),e(Jo,fn),e(fn,qT),e(fn,om),e(om,AT),e(fn,PT),e(fn,tm),e(tm,LT),e(fn,OT),e(Jo,DT),w(Ws,Jo,null),e(Jo,IT),w(Us,Jo,null),g(a,Zh,v),g(a,gn,v),e(gn,Ks),e(Ks,nm),w(Zi,nm,null),e(gn,NT),e(gn,sm),e(sm,ST),g(a,eu,v),g(a,so,v),w(el,so,null),e(so,WT),e(so,rm),e(rm,UT),e(so,KT),e(so,ol),e(ol,BT),e(ol,dd),e(dd,QT),e(ol,HT),e(so,VT),e(so,tl),e(tl,JT),e(tl,nl),e(nl,GT),e(tl,XT),e(so,YT),e(so,am),e(am,ZT),e(so,e1),e(so,ht),e(ht,im),e(im,sl),e(sl,o1),e(ht,t1),e(ht,lm),e(lm,rl),e(rl,n1),e(ht,s1),e(ht,dm),e(dm,al),e(al,r1),e(ht,a1),e(ht,cm),e(cm,il),e(il,i1),e(so,l1),e(so,Go),w(ll,Go,null),e(Go,d1),e(Go,_n),e(_n,c1),e(_n,pm),e(pm,p1),e(_n,m1),e(_n,mm),e(mm,h1),e(_n,u1),e(Go,f1),w(Bs,Go,null),e(Go,g1),w(Qs,Go,null),g(a,ou,v),g(a,kn,v),e(kn,Hs),e(Hs,hm),w(dl,hm,null),e(kn,_1),e(kn,um),e(um,k1),g(a,tu,v),g(a,ro,v),w(cl,ro,null),e(ro,v1),e(ro,vn),e(vn,y1),e(vn,fm),e(fm,F1),e(vn,b1),e(vn,gm),e(gm,w1),e(vn,T1),e(ro,$1),e(ro,pl),e(pl,x1),e(pl,cd),e(cd,E1),e(pl,M1),e(ro,R1),e(ro,ml),e(ml,z1),e(ml,hl),e(hl,j1),e(ml,C1),e(ro,q1),e(ro,_m),e(_m,A1),e(ro,P1),e(ro,ut),e(ut,km),e(km,ul),e(ul,L1),e(ut,O1),e(ut,vm),e(vm,fl),e(fl,D1),e(ut,I1),e(ut,ym),e(ym,gl),e(gl,N1),e(ut,S1),e(ut,Fm),e(Fm,_l),e(_l,W1),e(ro,U1),e(ro,Xo),w(kl,Xo,null),e(Xo,K1),e(Xo,yn),e(yn,B1),e(yn,bm),e(bm,Q1),e(yn,H1),e(yn,wm),e(wm,V1),e(yn,J1),e(Xo,G1),w(Vs,Xo,null),e(Xo,X1),w(Js,Xo,null),nu=!0},p(a,[v]){const vl={};v&2&&(vl.$$scope={dirty:v,ctx:a}),$n.$set(vl);const Tm={};v&2&&(Tm.$$scope={dirty:v,ctx:a}),En.$set(Tm);const $m={};v&2&&($m.$$scope={dirty:v,ctx:a}),Rn.$set($m);const xm={};v&2&&(xm.$$scope={dirty:v,ctx:a}),Cn.$set(xm);const yl={};v&2&&(yl.$$scope={dirty:v,ctx:a}),An.$set(yl);const Em={};v&2&&(Em.$$scope={dirty:v,ctx:a}),Pn.$set(Em);const Mm={};v&2&&(Mm.$$scope={dirty:v,ctx:a}),On.$set(Mm);const Rm={};v&2&&(Rm.$$scope={dirty:v,ctx:a}),Dn.$set(Rm);const Fl={};v&2&&(Fl.$$scope={dirty:v,ctx:a}),Nn.$set(Fl);const zm={};v&2&&(zm.$$scope={dirty:v,ctx:a}),Sn.$set(zm);const jm={};v&2&&(jm.$$scope={dirty:v,ctx:a}),Un.$set(jm);const Cm={};v&2&&(Cm.$$scope={dirty:v,ctx:a}),Kn.$set(Cm);const qm={};v&2&&(qm.$$scope={dirty:v,ctx:a}),Bn.$set(qm);const Am={};v&2&&(Am.$$scope={dirty:v,ctx:a}),Hn.$set(Am);const Pm={};v&2&&(Pm.$$scope={dirty:v,ctx:a}),Vn.$set(Pm);const Lm={};v&2&&(Lm.$$scope={dirty:v,ctx:a}),Gn.$set(Lm);const Fn={};v&2&&(Fn.$$scope={dirty:v,ctx:a}),Xn.$set(Fn);const Om={};v&2&&(Om.$$scope={dirty:v,ctx:a}),Zn.$set(Om);const Dm={};v&2&&(Dm.$$scope={dirty:v,ctx:a}),es.$set(Dm);const bl={};v&2&&(bl.$$scope={dirty:v,ctx:a}),ts.$set(bl);const Im={};v&2&&(Im.$$scope={dirty:v,ctx:a}),ns.$set(Im);const Nm={};v&2&&(Nm.$$scope={dirty:v,ctx:a}),ss.$set(Nm);const Sm={};v&2&&(Sm.$$scope={dirty:v,ctx:a}),as.$set(Sm);const vo={};v&2&&(vo.$$scope={dirty:v,ctx:a}),is.$set(vo);const Wm={};v&2&&(Wm.$$scope={dirty:v,ctx:a}),ls.$set(Wm);const Um={};v&2&&(Um.$$scope={dirty:v,ctx:a}),ds.$set(Um);const Km={};v&2&&(Km.$$scope={dirty:v,ctx:a}),ps.$set(Km);const Bm={};v&2&&(Bm.$$scope={dirty:v,ctx:a}),ms.$set(Bm);const Qm={};v&2&&(Qm.$$scope={dirty:v,ctx:a}),us.$set(Qm);const Hm={};v&2&&(Hm.$$scope={dirty:v,ctx:a}),fs.$set(Hm);const Vm={};v&2&&(Vm.$$scope={dirty:v,ctx:a}),gs.$set(Vm);const Jm={};v&2&&(Jm.$$scope={dirty:v,ctx:a}),_s.$set(Jm);const Gm={};v&2&&(Gm.$$scope={dirty:v,ctx:a}),vs.$set(Gm);const Xm={};v&2&&(Xm.$$scope={dirty:v,ctx:a}),ys.$set(Xm);const Ym={};v&2&&(Ym.$$scope={dirty:v,ctx:a}),Fs.$set(Ym);const Zm={};v&2&&(Zm.$$scope={dirty:v,ctx:a}),ws.$set(Zm);const wl={};v&2&&(wl.$$scope={dirty:v,ctx:a}),Ts.$set(wl);const eh={};v&2&&(eh.$$scope={dirty:v,ctx:a}),$s.$set(eh);const oh={};v&2&&(oh.$$scope={dirty:v,ctx:a}),xs.$set(oh);const th={};v&2&&(th.$$scope={dirty:v,ctx:a}),Ms.$set(th);const ft={};v&2&&(ft.$$scope={dirty:v,ctx:a}),Rs.$set(ft);const bn={};v&2&&(bn.$$scope={dirty:v,ctx:a}),zs.$set(bn);const nh={};v&2&&(nh.$$scope={dirty:v,ctx:a}),js.$set(nh);const sh={};v&2&&(sh.$$scope={dirty:v,ctx:a}),qs.$set(sh);const wn={};v&2&&(wn.$$scope={dirty:v,ctx:a}),As.$set(wn);const rh={};v&2&&(rh.$$scope={dirty:v,ctx:a}),Ls.$set(rh);const ah={};v&2&&(ah.$$scope={dirty:v,ctx:a}),Os.$set(ah);const Tl={};v&2&&(Tl.$$scope={dirty:v,ctx:a}),Is.$set(Tl);const ih={};v&2&&(ih.$$scope={dirty:v,ctx:a}),Ns.$set(ih);const lh={};v&2&&(lh.$$scope={dirty:v,ctx:a}),Ws.$set(lh);const dh={};v&2&&(dh.$$scope={dirty:v,ctx:a}),Us.$set(dh);const ao={};v&2&&(ao.$$scope={dirty:v,ctx:a}),Bs.$set(ao);const $l={};v&2&&($l.$$scope={dirty:v,ctx:a}),Qs.$set($l);const ch={};v&2&&(ch.$$scope={dirty:v,ctx:a}),Vs.$set(ch);const xl={};v&2&&(xl.$$scope={dirty:v,ctx:a}),Js.$set(xl)},i(a){nu||(T(l.$$.fragment,a),T(E.$$.fragment,a),T(S.$$.fragment,a),T(Fr.$$.fragment,a),T(br.$$.fragment,a),T($n.$$.fragment,a),T(Tr.$$.fragment,a),T($r.$$.fragment,a),T(En.$$.fragment,a),T(Rr.$$.fragment,a),T(jr.$$.fragment,a),T(qr.$$.fragment,a),T(Rn.$$.fragment,a),T(Ar.$$.fragment,a),T(Pr.$$.fragment,a),T(Lr.$$.fragment,a),T(Cn.$$.fragment,a),T(Ir.$$.fragment,a),T(Sr.$$.fragment,a),T(Wr.$$.fragment,a),T(Hr.$$.fragment,a),T(An.$$.fragment,a),T(Pn.$$.fragment,a),T(Vr.$$.fragment,a),T(Jr.$$.fragment,a),T(Xr.$$.fragment,a),T(On.$$.fragment,a),T(Dn.$$.fragment,a),T(Yr.$$.fragment,a),T(Zr.$$.fragment,a),T(oa.$$.fragment,a),T(Nn.$$.fragment,a),T(Sn.$$.fragment,a),T(ta.$$.fragment,a),T(na.$$.fragment,a),T(aa.$$.fragment,a),T(Un.$$.fragment,a),T(Kn.$$.fragment,a),T(Bn.$$.fragment,a),T(ia.$$.fragment,a),T(la.$$.fragment,a),T(pa.$$.fragment,a),T(Hn.$$.fragment,a),T(Vn.$$.fragment,a),T(ma.$$.fragment,a),T(ha.$$.fragment,a),T(ga.$$.fragment,a),T(Gn.$$.fragment,a),T(Xn.$$.fragment,a),T(_a.$$.fragment,a),T(ka.$$.fragment,a),T(Fa.$$.fragment,a),T(Zn.$$.fragment,a),T(es.$$.fragment,a),T(ba.$$.fragment,a),T(wa.$$.fragment,a),T(ts.$$.fragment,a),T(Ea.$$.fragment,a),T(ns.$$.fragment,a),T(ss.$$.fragment,a),T(Ma.$$.fragment,a),T(Ra.$$.fragment,a),T(as.$$.fragment,a),T(Aa.$$.fragment,a),T(is.$$.fragment,a),T(ls.$$.fragment,a),T(ds.$$.fragment,a),T(Pa.$$.fragment,a),T(La.$$.fragment,a),T(ps.$$.fragment,a),T(Sa.$$.fragment,a),T(ms.$$.fragment,a),T(Wa.$$.fragment,a),T(Ua.$$.fragment,a),T(us.$$.fragment,a),T(Ha.$$.fragment,a),T(fs.$$.fragment,a),T(gs.$$.fragment,a),T(_s.$$.fragment,a),T(Va.$$.fragment,a),T(Ja.$$.fragment,a),T(vs.$$.fragment,a),T(Za.$$.fragment,a),T(ys.$$.fragment,a),T(Fs.$$.fragment,a),T(ei.$$.fragment,a),T(oi.$$.fragment,a),T(ws.$$.fragment,a),T(ri.$$.fragment,a),T(Ts.$$.fragment,a),T($s.$$.fragment,a),T(xs.$$.fragment,a),T(ai.$$.fragment,a),T(ii.$$.fragment,a),T(Ms.$$.fragment,a),T(pi.$$.fragment,a),T(Rs.$$.fragment,a),T(zs.$$.fragment,a),T(js.$$.fragment,a),T(mi.$$.fragment,a),T(hi.$$.fragment,a),T(Fi.$$.fragment,a),T(qs.$$.fragment,a),T(As.$$.fragment,a),T(bi.$$.fragment,a),T(wi.$$.fragment,a),T(Ci.$$.fragment,a),T(Ls.$$.fragment,a),T(Os.$$.fragment,a),T(qi.$$.fragment,a),T(Ai.$$.fragment,a),T(Wi.$$.fragment,a),T(Is.$$.fragment,a),T(Ns.$$.fragment,a),T(Ui.$$.fragment,a),T(Ki.$$.fragment,a),T(Yi.$$.fragment,a),T(Ws.$$.fragment,a),T(Us.$$.fragment,a),T(Zi.$$.fragment,a),T(el.$$.fragment,a),T(ll.$$.fragment,a),T(Bs.$$.fragment,a),T(Qs.$$.fragment,a),T(dl.$$.fragment,a),T(cl.$$.fragment,a),T(kl.$$.fragment,a),T(Vs.$$.fragment,a),T(Js.$$.fragment,a),nu=!0)},o(a){$(l.$$.fragment,a),$(E.$$.fragment,a),$(S.$$.fragment,a),$(Fr.$$.fragment,a),$(br.$$.fragment,a),$($n.$$.fragment,a),$(Tr.$$.fragment,a),$($r.$$.fragment,a),$(En.$$.fragment,a),$(Rr.$$.fragment,a),$(jr.$$.fragment,a),$(qr.$$.fragment,a),$(Rn.$$.fragment,a),$(Ar.$$.fragment,a),$(Pr.$$.fragment,a),$(Lr.$$.fragment,a),$(Cn.$$.fragment,a),$(Ir.$$.fragment,a),$(Sr.$$.fragment,a),$(Wr.$$.fragment,a),$(Hr.$$.fragment,a),$(An.$$.fragment,a),$(Pn.$$.fragment,a),$(Vr.$$.fragment,a),$(Jr.$$.fragment,a),$(Xr.$$.fragment,a),$(On.$$.fragment,a),$(Dn.$$.fragment,a),$(Yr.$$.fragment,a),$(Zr.$$.fragment,a),$(oa.$$.fragment,a),$(Nn.$$.fragment,a),$(Sn.$$.fragment,a),$(ta.$$.fragment,a),$(na.$$.fragment,a),$(aa.$$.fragment,a),$(Un.$$.fragment,a),$(Kn.$$.fragment,a),$(Bn.$$.fragment,a),$(ia.$$.fragment,a),$(la.$$.fragment,a),$(pa.$$.fragment,a),$(Hn.$$.fragment,a),$(Vn.$$.fragment,a),$(ma.$$.fragment,a),$(ha.$$.fragment,a),$(ga.$$.fragment,a),$(Gn.$$.fragment,a),$(Xn.$$.fragment,a),$(_a.$$.fragment,a),$(ka.$$.fragment,a),$(Fa.$$.fragment,a),$(Zn.$$.fragment,a),$(es.$$.fragment,a),$(ba.$$.fragment,a),$(wa.$$.fragment,a),$(ts.$$.fragment,a),$(Ea.$$.fragment,a),$(ns.$$.fragment,a),$(ss.$$.fragment,a),$(Ma.$$.fragment,a),$(Ra.$$.fragment,a),$(as.$$.fragment,a),$(Aa.$$.fragment,a),$(is.$$.fragment,a),$(ls.$$.fragment,a),$(ds.$$.fragment,a),$(Pa.$$.fragment,a),$(La.$$.fragment,a),$(ps.$$.fragment,a),$(Sa.$$.fragment,a),$(ms.$$.fragment,a),$(Wa.$$.fragment,a),$(Ua.$$.fragment,a),$(us.$$.fragment,a),$(Ha.$$.fragment,a),$(fs.$$.fragment,a),$(gs.$$.fragment,a),$(_s.$$.fragment,a),$(Va.$$.fragment,a),$(Ja.$$.fragment,a),$(vs.$$.fragment,a),$(Za.$$.fragment,a),$(ys.$$.fragment,a),$(Fs.$$.fragment,a),$(ei.$$.fragment,a),$(oi.$$.fragment,a),$(ws.$$.fragment,a),$(ri.$$.fragment,a),$(Ts.$$.fragment,a),$($s.$$.fragment,a),$(xs.$$.fragment,a),$(ai.$$.fragment,a),$(ii.$$.fragment,a),$(Ms.$$.fragment,a),$(pi.$$.fragment,a),$(Rs.$$.fragment,a),$(zs.$$.fragment,a),$(js.$$.fragment,a),$(mi.$$.fragment,a),$(hi.$$.fragment,a),$(Fi.$$.fragment,a),$(qs.$$.fragment,a),$(As.$$.fragment,a),$(bi.$$.fragment,a),$(wi.$$.fragment,a),$(Ci.$$.fragment,a),$(Ls.$$.fragment,a),$(Os.$$.fragment,a),$(qi.$$.fragment,a),$(Ai.$$.fragment,a),$(Wi.$$.fragment,a),$(Is.$$.fragment,a),$(Ns.$$.fragment,a),$(Ui.$$.fragment,a),$(Ki.$$.fragment,a),$(Yi.$$.fragment,a),$(Ws.$$.fragment,a),$(Us.$$.fragment,a),$(Zi.$$.fragment,a),$(el.$$.fragment,a),$(ll.$$.fragment,a),$(Bs.$$.fragment,a),$(Qs.$$.fragment,a),$(dl.$$.fragment,a),$(cl.$$.fragment,a),$(kl.$$.fragment,a),$(Vs.$$.fragment,a),$(Js.$$.fragment,a),nu=!1},d(a){o(d),a&&o(k),a&&o(h),x(l),a&&o(fe),a&&o(I),x(E),a&&o(ge),a&&o(N),a&&o(_e),a&&o(W),a&&o(ke),a&&o(U),a&&o(te),a&&o(C),a&&o(ve),a&&o(K),a&&o(H),a&&o(se),a&&o(ye),a&&o(re),x(S),a&&o(Fe),a&&o(q),a&&o(ne),a&&o(Ae),x(Fr),a&&o(mh),a&&o(Co),x(br),x($n),a&&o(hh),a&&o(Et),x(Tr),a&&o(uh),a&&o(Ze),x($r),x(En),x(Rr),x(jr),x(qr),x(Rn),x(Ar),a&&o(fh),a&&o(Rt),x(Pr),a&&o(gh),a&&o(io),x(Lr),x(Cn),x(Ir),a&&o(_h),a&&o(zt),x(Sr),a&&o(kh),a&&o(_o),x(Wr),x(Hr),x(An),x(Pn),a&&o(vh),a&&o(Ct),x(Vr),a&&o(yh),a&&o(it),x(Jr),x(Xr),x(On),x(Dn),a&&o(Fh),a&&o(Pt),x(Yr),a&&o(bh),a&&o(lt),x(Zr),x(oa),x(Nn),x(Sn),a&&o(wh),a&&o(Dt),x(ta),a&&o(Th),a&&o(qo),x(na),x(aa),x(Un),x(Kn),x(Bn),a&&o($h),a&&o(Nt),x(ia),a&&o(xh),a&&o(Ao),x(la),x(pa),x(Hn),x(Vn),a&&o(Eh),a&&o(Wt),x(ma),a&&o(Mh),a&&o(Po),x(ha),x(ga),x(Gn),x(Xn),a&&o(Rh),a&&o(Kt),x(_a),a&&o(zh),a&&o(Lo),x(ka),x(Fa),x(Zn),x(es),a&&o(jh),a&&o(Ht),x(ba),a&&o(Ch),a&&o(co),x(wa),x(ts),x(Ea),x(ns),x(ss),a&&o(qh),a&&o(Jt),x(Ma),a&&o(Ah),a&&o(po),x(Ra),x(as),x(Aa),x(is),x(ls),x(ds),a&&o(Ph),a&&o(Xt),x(Pa),a&&o(Lh),a&&o(mo),x(La),x(ps),x(Sa),x(ms),a&&o(Oh),a&&o(Yt),x(Wa),a&&o(Dh),a&&o(ho),x(Ua),x(us),x(Ha),x(fs),x(gs),x(_s),a&&o(Ih),a&&o(en),x(Va),a&&o(Nh),a&&o(uo),x(Ja),x(vs),x(Za),x(ys),x(Fs),a&&o(Sh),a&&o(tn),x(ei),a&&o(Wh),a&&o(fo),x(oi),x(ws),x(ri),x(Ts),x($s),x(xs),a&&o(Uh),a&&o(sn),x(ai),a&&o(Kh),a&&o(go),x(ii),x(Ms),x(pi),x(Rs),x(zs),x(js),a&&o(Bh),a&&o(ln),x(mi),a&&o(Qh),a&&o(eo),x(hi),x(Fi),x(qs),x(As),a&&o(Hh),a&&o(cn),x(bi),a&&o(Vh),a&&o(oo),x(wi),x(Ci),x(Ls),x(Os),a&&o(Jh),a&&o(mn),x(qi),a&&o(Gh),a&&o(to),x(Ai),x(Wi),x(Is),x(Ns),a&&o(Xh),a&&o(un),x(Ui),a&&o(Yh),a&&o(no),x(Ki),x(Yi),x(Ws),x(Us),a&&o(Zh),a&&o(gn),x(Zi),a&&o(eu),a&&o(so),x(el),x(ll),x(Bs),x(Qs),a&&o(ou),a&&o(kn),x(dl),a&&o(tu),a&&o(ro),x(cl),x(kl),x(Vs),x(Js)}}}const jE={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 CE(M){return Mx(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class IE extends Tx{constructor(d){super();$x(this,d,CE,zE,xx,{})}}export{IE as default,jE as metadata};
