import{S as Mx,i as Rx,s as zx,e as r,k as p,w as b,t,M as jx,c as a,d as o,m,a as i,x as v,h as n,b as f,G as e,g,y as w,q as T,o as $,B as x,v as Cx,L as De}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 Ie}from"../../chunks/CodeBlock-hf-doc-builder.js";import{I as Qe}from"../../chunks/IconCopyLink-hf-doc-builder.js";import{E as Oe}from"../../chunks/ExampleCodeBlock-hf-doc-builder.js";function qx(M){let d,k,h,u,_;return u=new Ie({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=r("p"),k=t("Example:"),h=p(),b(u.$$.fragment)},l(l){d=a(l,"P",{});var c=i(d);k=n(c,"Example:"),c.forEach(o),h=m(l),v(u.$$.fragment,l)},m(l,c){g(l,d,c),e(d,k),g(l,h,c),w(u,l,c),_=!0},p:De,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 u=new Ie({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=r("p"),k=t("Example:"),h=p(),b(u.$$.fragment)},l(l){d=a(l,"P",{});var c=i(d);k=n(c,"Example:"),c.forEach(o),h=m(l),v(u.$$.fragment,l)},m(l,c){g(l,d,c),e(d,k),g(l,h,c),w(u,l,c),_=!0},p:De,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 Ax(M){let d,k,h,u,_;return u=new Ie({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=r("p"),k=t("sequence pair mask has the following format:"),h=p(),b(u.$$.fragment)},l(l){d=a(l,"P",{});var c=i(d);k=n(c,"sequence pair mask has the following format:"),c.forEach(o),h=m(l),v(u.$$.fragment,l)},m(l,c){g(l,d,c),e(d,k),g(l,h,c),w(u,l,c),_=!0},p:De,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 Lx(M){let d,k,h,u,_;return u=new Ie({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=r("p"),k=t("Example:"),h=p(),b(u.$$.fragment)},l(l){d=a(l,"P",{});var c=i(d);k=n(c,"Example:"),c.forEach(o),h=m(l),v(u.$$.fragment,l)},m(l,c){g(l,d,c),e(d,k),g(l,h,c),w(u,l,c),_=!0},p:De,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=r("p"),k=t("Although the recipe for forward pass needs to be defined within this function, one should call the "),h=r("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=a(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=a(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 Ie({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=r("p"),k=t("Example:"),h=p(),b(u.$$.fragment)},l(l){d=a(l,"P",{});var c=i(d);k=n(c,"Example:"),c.forEach(o),h=m(l),v(u.$$.fragment,l)},m(l,c){g(l,d,c),e(d,k),g(l,h,c),w(u,l,c),_=!0},p:De,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=r("p"),k=t("Although the recipe for forward pass needs to be defined within this function, one should call the "),h=r("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=a(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=a(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 Ie({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=r("p"),k=t("Example:"),h=p(),b(u.$$.fragment)},l(l){d=a(l,"P",{});var c=i(d);k=n(c,"Example:"),c.forEach(o),h=m(l),v(u.$$.fragment,l)},m(l,c){g(l,d,c),e(d,k),g(l,h,c),w(u,l,c),_=!0},p:De,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{c(){d=r("p"),k=t("Although the recipe for forward pass needs to be defined within this function, one should call the "),h=r("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=a(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=a(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 Wx(M){let d,k,h,u,_;return u=new Ie({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=r("p"),k=t("Example:"),h=p(),b(u.$$.fragment)},l(l){d=a(l,"P",{});var c=i(d);k=n(c,"Example:"),c.forEach(o),h=m(l),v(u.$$.fragment,l)},m(l,c){g(l,d,c),e(d,k),g(l,h,c),w(u,l,c),_=!0},p:De,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 Ux(M){let d,k,h,u,_;return{c(){d=r("p"),k=t("Although the recipe for forward pass needs to be defined within this function, one should call the "),h=r("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=a(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=a(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 Kx(M){let d,k,h,u,_;return u=new Ie({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=r("p"),k=t("Example of single-label classification:"),h=p(),b(u.$$.fragment)},l(l){d=a(l,"P",{});var c=i(d);k=n(c,"Example of single-label classification:"),c.forEach(o),h=m(l),v(u.$$.fragment,l)},m(l,c){g(l,d,c),e(d,k),g(l,h,c),w(u,l,c),_=!0},p:De,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 Bx(M){let d,k,h,u,_;return u=new Ie({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=r("p"),k=t("Example of multi-label classification:"),h=p(),b(u.$$.fragment)},l(l){d=a(l,"P",{});var c=i(d);k=n(c,"Example of multi-label classification:"),c.forEach(o),h=m(l),v(u.$$.fragment,l)},m(l,c){g(l,d,c),e(d,k),g(l,h,c),w(u,l,c),_=!0},p:De,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=r("p"),k=t("Although the recipe for forward pass needs to be defined within this function, one should call the "),h=r("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=a(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=a(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 Ie({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=r("p"),k=t("Example:"),h=p(),b(u.$$.fragment)},l(l){d=a(l,"P",{});var c=i(d);k=n(c,"Example:"),c.forEach(o),h=m(l),v(u.$$.fragment,l)},m(l,c){g(l,d,c),e(d,k),g(l,h,c),w(u,l,c),_=!0},p:De,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,_;return{c(){d=r("p"),k=t("Although the recipe for forward pass needs to be defined within this function, one should call the "),h=r("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=a(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=a(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 Jx(M){let d,k,h,u,_;return u=new Ie({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=r("p"),k=t("Example:"),h=p(),b(u.$$.fragment)},l(l){d=a(l,"P",{});var c=i(d);k=n(c,"Example:"),c.forEach(o),h=m(l),v(u.$$.fragment,l)},m(l,c){g(l,d,c),e(d,k),g(l,h,c),w(u,l,c),_=!0},p:De,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 Gx(M){let d,k,h,u,_;return{c(){d=r("p"),k=t("Although the recipe for forward pass needs to be defined within this function, one should call the "),h=r("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=a(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=a(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 Xx(M){let d,k,h,u,_;return u=new Ie({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=r("p"),k=t("Example:"),h=p(),b(u.$$.fragment)},l(l){d=a(l,"P",{});var c=i(d);k=n(c,"Example:"),c.forEach(o),h=m(l),v(u.$$.fragment,l)},m(l,c){g(l,d,c),e(d,k),g(l,h,c),w(u,l,c),_=!0},p:De,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 Yx(M){let d,k,h,u,_,l,c,z,be,he,I,ae,ee,E,ve,Q,we,ue,N,Te,ie,V,$e,fe,W,xe,ge,U,ce,Ee,te,C,A,_e,K,pe,Me,H,ne,Re,q,ze,J,le,je,G,ke,re,O,me,S,Ce,oe,L,ye,P,de,qe;return{c(){d=r("p"),k=t("TensorFlow models and layers in "),h=r("code"),u=t("transformers"),_=t(" accept two formats as input:"),l=p(),c=r("ul"),z=r("li"),be=t("having all inputs as keyword arguments (like PyTorch models), or"),he=p(),I=r("li"),ae=t("having all inputs as a list, tuple or dict in the first positional argument."),ee=p(),E=r("p"),ve=t(`The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
and layers. Because of this support, when using methods like `),Q=r("code"),we=t("model.fit()"),ue=t(` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),N=r("code"),Te=t("model.fit()"),ie=t(` supports! If, however, you want to use the second
format outside of Keras methods like `),V=r("code"),$e=t("fit()"),fe=t(" and "),W=r("code"),xe=t("predict()"),ge=t(`, such as when creating your own layers or models with
the Keras `),U=r("code"),ce=t("Functional"),Ee=t(` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),te=p(),C=r("ul"),A=r("li"),_e=t("a single Tensor with "),K=r("code"),pe=t("input_ids"),Me=t(" only and nothing else: "),H=r("code"),ne=t("model(input_ids)"),Re=p(),q=r("li"),ze=t(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),J=r("code"),le=t("model([input_ids, attention_mask])"),je=t(" or "),G=r("code"),ke=t("model([input_ids, attention_mask, token_type_ids])"),re=p(),O=r("li"),me=t(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),S=r("code"),Ce=t('model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),oe=p(),L=r("p"),ye=t(`Note that when creating models and layers with
`),P=r("a"),de=t("subclassing"),qe=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(F){d=a(F,"P",{});var R=i(d);k=n(R,"TensorFlow models and layers in "),h=a(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(F),c=a(F,"UL",{});var se=i(c);z=a(se,"LI",{});var He=i(z);be=n(He,"having all inputs as keyword arguments (like PyTorch models), or"),He.forEach(o),he=m(se),I=a(se,"LI",{});var Ne=i(I);ae=n(Ne,"having all inputs as a list, tuple or dict in the first positional argument."),Ne.forEach(o),se.forEach(o),ee=m(F),E=a(F,"P",{});var j=i(E);ve=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=a(j,"CODE",{});var Ve=i(Q);we=n(Ve,"model.fit()"),Ve.forEach(o),ue=n(j,` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),N=a(j,"CODE",{});var Je=i(N);Te=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=a(j,"CODE",{});var Pe=i(V);$e=n(Pe,"fit()"),Pe.forEach(o),fe=n(j," and "),W=a(j,"CODE",{});var Ge=i(W);xe=n(Ge,"predict()"),Ge.forEach(o),ge=n(j,`, such as when creating your own layers or models with
the Keras `),U=a(j,"CODE",{});var We=i(U);ce=n(We,"Functional"),We.forEach(o),Ee=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(F),C=a(F,"UL",{});var D=i(C);A=a(D,"LI",{});var X=i(A);_e=n(X,"a single Tensor with "),K=a(X,"CODE",{});var Ue=i(K);pe=n(Ue,"input_ids"),Ue.forEach(o),Me=n(X," only and nothing else: "),H=a(X,"CODE",{});var Xe=i(H);ne=n(Xe,"model(input_ids)"),Xe.forEach(o),X.forEach(o),Re=m(D),q=a(D,"LI",{});var Y=i(q);ze=n(Y,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),J=a(Y,"CODE",{});var Ye=i(J);le=n(Ye,"model([input_ids, attention_mask])"),Ye.forEach(o),je=n(Y," or "),G=a(Y,"CODE",{});var Le=i(G);ke=n(Le,"model([input_ids, attention_mask, token_type_ids])"),Le.forEach(o),Y.forEach(o),re=m(D),O=a(D,"LI",{});var Fe=i(O);me=n(Fe,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),S=a(Fe,"CODE",{});var Ae=i(S);Ce=n(Ae,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),Ae.forEach(o),Fe.forEach(o),D.forEach(o),oe=m(F),L=a(F,"P",{});var Z=i(L);ye=n(Z,`Note that when creating models and layers with
`),P=a(Z,"A",{href:!0,rel:!0});var Ke=i(P);de=n(Ke,"subclassing"),Ke.forEach(o),qe=n(Z,` 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!`),Z.forEach(o),this.h()},h(){f(P,"href","https://keras.io/guides/making_new_layers_and_models_via_subclassing/"),f(P,"rel","nofollow")},m(F,R){g(F,d,R),e(d,k),e(d,h),e(h,u),e(d,_),g(F,l,R),g(F,c,R),e(c,z),e(z,be),e(c,he),e(c,I),e(I,ae),g(F,ee,R),g(F,E,R),e(E,ve),e(E,Q),e(Q,we),e(E,ue),e(E,N),e(N,Te),e(E,ie),e(E,V),e(V,$e),e(E,fe),e(E,W),e(W,xe),e(E,ge),e(E,U),e(U,ce),e(E,Ee),g(F,te,R),g(F,C,R),e(C,A),e(A,_e),e(A,K),e(K,pe),e(A,Me),e(A,H),e(H,ne),e(C,Re),e(C,q),e(q,ze),e(q,J),e(J,le),e(q,je),e(q,G),e(G,ke),e(C,re),e(C,O),e(O,me),e(O,S),e(S,Ce),g(F,oe,R),g(F,L,R),e(L,ye),e(L,P),e(P,de),e(L,qe)},d(F){F&&o(d),F&&o(l),F&&o(c),F&&o(ee),F&&o(E),F&&o(te),F&&o(C),F&&o(oe),F&&o(L)}}}function Zx(M){let d,k,h,u,_;return{c(){d=r("p"),k=t("Although the recipe for forward pass needs to be defined within this function, one should call the "),h=r("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=a(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=a(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 Ie({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=r("p"),k=t("Example:"),h=p(),b(u.$$.fragment)},l(l){d=a(l,"P",{});var c=i(d);k=n(c,"Example:"),c.forEach(o),h=m(l),v(u.$$.fragment,l)},m(l,c){g(l,d,c),e(d,k),g(l,h,c),w(u,l,c),_=!0},p:De,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 oE(M){let d,k,h,u,_,l,c,z,be,he,I,ae,ee,E,ve,Q,we,ue,N,Te,ie,V,$e,fe,W,xe,ge,U,ce,Ee,te,C,A,_e,K,pe,Me,H,ne,Re,q,ze,J,le,je,G,ke,re,O,me,S,Ce,oe,L,ye,P,de,qe;return{c(){d=r("p"),k=t("TensorFlow models and layers in "),h=r("code"),u=t("transformers"),_=t(" accept two formats as input:"),l=p(),c=r("ul"),z=r("li"),be=t("having all inputs as keyword arguments (like PyTorch models), or"),he=p(),I=r("li"),ae=t("having all inputs as a list, tuple or dict in the first positional argument."),ee=p(),E=r("p"),ve=t(`The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
and layers. Because of this support, when using methods like `),Q=r("code"),we=t("model.fit()"),ue=t(` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),N=r("code"),Te=t("model.fit()"),ie=t(` supports! If, however, you want to use the second
format outside of Keras methods like `),V=r("code"),$e=t("fit()"),fe=t(" and "),W=r("code"),xe=t("predict()"),ge=t(`, such as when creating your own layers or models with
the Keras `),U=r("code"),ce=t("Functional"),Ee=t(` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),te=p(),C=r("ul"),A=r("li"),_e=t("a single Tensor with "),K=r("code"),pe=t("input_ids"),Me=t(" only and nothing else: "),H=r("code"),ne=t("model(input_ids)"),Re=p(),q=r("li"),ze=t(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),J=r("code"),le=t("model([input_ids, attention_mask])"),je=t(" or "),G=r("code"),ke=t("model([input_ids, attention_mask, token_type_ids])"),re=p(),O=r("li"),me=t(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),S=r("code"),Ce=t('model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),oe=p(),L=r("p"),ye=t(`Note that when creating models and layers with
`),P=r("a"),de=t("subclassing"),qe=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(F){d=a(F,"P",{});var R=i(d);k=n(R,"TensorFlow models and layers in "),h=a(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(F),c=a(F,"UL",{});var se=i(c);z=a(se,"LI",{});var He=i(z);be=n(He,"having all inputs as keyword arguments (like PyTorch models), or"),He.forEach(o),he=m(se),I=a(se,"LI",{});var Ne=i(I);ae=n(Ne,"having all inputs as a list, tuple or dict in the first positional argument."),Ne.forEach(o),se.forEach(o),ee=m(F),E=a(F,"P",{});var j=i(E);ve=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=a(j,"CODE",{});var Ve=i(Q);we=n(Ve,"model.fit()"),Ve.forEach(o),ue=n(j,` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),N=a(j,"CODE",{});var Je=i(N);Te=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=a(j,"CODE",{});var Pe=i(V);$e=n(Pe,"fit()"),Pe.forEach(o),fe=n(j," and "),W=a(j,"CODE",{});var Ge=i(W);xe=n(Ge,"predict()"),Ge.forEach(o),ge=n(j,`, such as when creating your own layers or models with
the Keras `),U=a(j,"CODE",{});var We=i(U);ce=n(We,"Functional"),We.forEach(o),Ee=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(F),C=a(F,"UL",{});var D=i(C);A=a(D,"LI",{});var X=i(A);_e=n(X,"a single Tensor with "),K=a(X,"CODE",{});var Ue=i(K);pe=n(Ue,"input_ids"),Ue.forEach(o),Me=n(X," only and nothing else: "),H=a(X,"CODE",{});var Xe=i(H);ne=n(Xe,"model(input_ids)"),Xe.forEach(o),X.forEach(o),Re=m(D),q=a(D,"LI",{});var Y=i(q);ze=n(Y,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),J=a(Y,"CODE",{});var Ye=i(J);le=n(Ye,"model([input_ids, attention_mask])"),Ye.forEach(o),je=n(Y," or "),G=a(Y,"CODE",{});var Le=i(G);ke=n(Le,"model([input_ids, attention_mask, token_type_ids])"),Le.forEach(o),Y.forEach(o),re=m(D),O=a(D,"LI",{});var Fe=i(O);me=n(Fe,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),S=a(Fe,"CODE",{});var Ae=i(S);Ce=n(Ae,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),Ae.forEach(o),Fe.forEach(o),D.forEach(o),oe=m(F),L=a(F,"P",{});var Z=i(L);ye=n(Z,`Note that when creating models and layers with
`),P=a(Z,"A",{href:!0,rel:!0});var Ke=i(P);de=n(Ke,"subclassing"),Ke.forEach(o),qe=n(Z,` 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!`),Z.forEach(o),this.h()},h(){f(P,"href","https://keras.io/guides/making_new_layers_and_models_via_subclassing/"),f(P,"rel","nofollow")},m(F,R){g(F,d,R),e(d,k),e(d,h),e(h,u),e(d,_),g(F,l,R),g(F,c,R),e(c,z),e(z,be),e(c,he),e(c,I),e(I,ae),g(F,ee,R),g(F,E,R),e(E,ve),e(E,Q),e(Q,we),e(E,ue),e(E,N),e(N,Te),e(E,ie),e(E,V),e(V,$e),e(E,fe),e(E,W),e(W,xe),e(E,ge),e(E,U),e(U,ce),e(E,Ee),g(F,te,R),g(F,C,R),e(C,A),e(A,_e),e(A,K),e(K,pe),e(A,Me),e(A,H),e(H,ne),e(C,Re),e(C,q),e(q,ze),e(q,J),e(J,le),e(q,je),e(q,G),e(G,ke),e(C,re),e(C,O),e(O,me),e(O,S),e(S,Ce),g(F,oe,R),g(F,L,R),e(L,ye),e(L,P),e(P,de),e(L,qe)},d(F){F&&o(d),F&&o(l),F&&o(c),F&&o(ee),F&&o(E),F&&o(te),F&&o(C),F&&o(oe),F&&o(L)}}}function tE(M){let d,k,h,u,_;return{c(){d=r("p"),k=t("Although the recipe for forward pass needs to be defined within this function, one should call the "),h=r("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=a(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=a(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 nE(M){let d,k,h,u,_;return u=new Ie({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=r("p"),k=t("Example:"),h=p(),b(u.$$.fragment)},l(l){d=a(l,"P",{});var c=i(d);k=n(c,"Example:"),c.forEach(o),h=m(l),v(u.$$.fragment,l)},m(l,c){g(l,d,c),e(d,k),g(l,h,c),w(u,l,c),_=!0},p:De,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 sE(M){let d,k;return d=new Ie({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(){b(d.$$.fragment)},l(h){v(d.$$.fragment,h)},m(h,u){w(d,h,u),k=!0},p:De,i(h){k||(T(d.$$.fragment,h),k=!0)},o(h){$(d.$$.fragment,h),k=!1},d(h){x(d,h)}}}function rE(M){let d,k,h,u,_,l,c,z,be,he,I,ae,ee,E,ve,Q,we,ue,N,Te,ie,V,$e,fe,W,xe,ge,U,ce,Ee,te,C,A,_e,K,pe,Me,H,ne,Re,q,ze,J,le,je,G,ke,re,O,me,S,Ce,oe,L,ye,P,de,qe;return{c(){d=r("p"),k=t("TensorFlow models and layers in "),h=r("code"),u=t("transformers"),_=t(" accept two formats as input:"),l=p(),c=r("ul"),z=r("li"),be=t("having all inputs as keyword arguments (like PyTorch models), or"),he=p(),I=r("li"),ae=t("having all inputs as a list, tuple or dict in the first positional argument."),ee=p(),E=r("p"),ve=t(`The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
and layers. Because of this support, when using methods like `),Q=r("code"),we=t("model.fit()"),ue=t(` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),N=r("code"),Te=t("model.fit()"),ie=t(` supports! If, however, you want to use the second
format outside of Keras methods like `),V=r("code"),$e=t("fit()"),fe=t(" and "),W=r("code"),xe=t("predict()"),ge=t(`, such as when creating your own layers or models with
the Keras `),U=r("code"),ce=t("Functional"),Ee=t(` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),te=p(),C=r("ul"),A=r("li"),_e=t("a single Tensor with "),K=r("code"),pe=t("input_ids"),Me=t(" only and nothing else: "),H=r("code"),ne=t("model(input_ids)"),Re=p(),q=r("li"),ze=t(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),J=r("code"),le=t("model([input_ids, attention_mask])"),je=t(" or "),G=r("code"),ke=t("model([input_ids, attention_mask, token_type_ids])"),re=p(),O=r("li"),me=t(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),S=r("code"),Ce=t('model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),oe=p(),L=r("p"),ye=t(`Note that when creating models and layers with
`),P=r("a"),de=t("subclassing"),qe=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(F){d=a(F,"P",{});var R=i(d);k=n(R,"TensorFlow models and layers in "),h=a(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(F),c=a(F,"UL",{});var se=i(c);z=a(se,"LI",{});var He=i(z);be=n(He,"having all inputs as keyword arguments (like PyTorch models), or"),He.forEach(o),he=m(se),I=a(se,"LI",{});var Ne=i(I);ae=n(Ne,"having all inputs as a list, tuple or dict in the first positional argument."),Ne.forEach(o),se.forEach(o),ee=m(F),E=a(F,"P",{});var j=i(E);ve=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=a(j,"CODE",{});var Ve=i(Q);we=n(Ve,"model.fit()"),Ve.forEach(o),ue=n(j,` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),N=a(j,"CODE",{});var Je=i(N);Te=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=a(j,"CODE",{});var Pe=i(V);$e=n(Pe,"fit()"),Pe.forEach(o),fe=n(j," and "),W=a(j,"CODE",{});var Ge=i(W);xe=n(Ge,"predict()"),Ge.forEach(o),ge=n(j,`, such as when creating your own layers or models with
the Keras `),U=a(j,"CODE",{});var We=i(U);ce=n(We,"Functional"),We.forEach(o),Ee=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(F),C=a(F,"UL",{});var D=i(C);A=a(D,"LI",{});var X=i(A);_e=n(X,"a single Tensor with "),K=a(X,"CODE",{});var Ue=i(K);pe=n(Ue,"input_ids"),Ue.forEach(o),Me=n(X," only and nothing else: "),H=a(X,"CODE",{});var Xe=i(H);ne=n(Xe,"model(input_ids)"),Xe.forEach(o),X.forEach(o),Re=m(D),q=a(D,"LI",{});var Y=i(q);ze=n(Y,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),J=a(Y,"CODE",{});var Ye=i(J);le=n(Ye,"model([input_ids, attention_mask])"),Ye.forEach(o),je=n(Y," or "),G=a(Y,"CODE",{});var Le=i(G);ke=n(Le,"model([input_ids, attention_mask, token_type_ids])"),Le.forEach(o),Y.forEach(o),re=m(D),O=a(D,"LI",{});var Fe=i(O);me=n(Fe,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),S=a(Fe,"CODE",{});var Ae=i(S);Ce=n(Ae,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),Ae.forEach(o),Fe.forEach(o),D.forEach(o),oe=m(F),L=a(F,"P",{});var Z=i(L);ye=n(Z,`Note that when creating models and layers with
`),P=a(Z,"A",{href:!0,rel:!0});var Ke=i(P);de=n(Ke,"subclassing"),Ke.forEach(o),qe=n(Z,` 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!`),Z.forEach(o),this.h()},h(){f(P,"href","https://keras.io/guides/making_new_layers_and_models_via_subclassing/"),f(P,"rel","nofollow")},m(F,R){g(F,d,R),e(d,k),e(d,h),e(h,u),e(d,_),g(F,l,R),g(F,c,R),e(c,z),e(z,be),e(c,he),e(c,I),e(I,ae),g(F,ee,R),g(F,E,R),e(E,ve),e(E,Q),e(Q,we),e(E,ue),e(E,N),e(N,Te),e(E,ie),e(E,V),e(V,$e),e(E,fe),e(E,W),e(W,xe),e(E,ge),e(E,U),e(U,ce),e(E,Ee),g(F,te,R),g(F,C,R),e(C,A),e(A,_e),e(A,K),e(K,pe),e(A,Me),e(A,H),e(H,ne),e(C,Re),e(C,q),e(q,ze),e(q,J),e(J,le),e(q,je),e(q,G),e(G,ke),e(C,re),e(C,O),e(O,me),e(O,S),e(S,Ce),g(F,oe,R),g(F,L,R),e(L,ye),e(L,P),e(P,de),e(L,qe)},d(F){F&&o(d),F&&o(l),F&&o(c),F&&o(ee),F&&o(E),F&&o(te),F&&o(C),F&&o(oe),F&&o(L)}}}function aE(M){let d,k,h,u,_;return u=new Ie({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=r("p"),k=t("Example:"),h=p(),b(u.$$.fragment)},l(l){d=a(l,"P",{});var c=i(d);k=n(c,"Example:"),c.forEach(o),h=m(l),v(u.$$.fragment,l)},m(l,c){g(l,d,c),e(d,k),g(l,h,c),w(u,l,c),_=!0},p:De,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 iE(M){let d,k,h,u,_,l,c,z,be,he,I,ae,ee,E,ve,Q,we,ue,N,Te,ie,V,$e,fe,W,xe,ge,U,ce,Ee,te,C,A,_e,K,pe,Me,H,ne,Re,q,ze,J,le,je,G,ke,re,O,me,S,Ce,oe,L,ye,P,de,qe;return{c(){d=r("p"),k=t("TensorFlow models and layers in "),h=r("code"),u=t("transformers"),_=t(" accept two formats as input:"),l=p(),c=r("ul"),z=r("li"),be=t("having all inputs as keyword arguments (like PyTorch models), or"),he=p(),I=r("li"),ae=t("having all inputs as a list, tuple or dict in the first positional argument."),ee=p(),E=r("p"),ve=t(`The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
and layers. Because of this support, when using methods like `),Q=r("code"),we=t("model.fit()"),ue=t(` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),N=r("code"),Te=t("model.fit()"),ie=t(` supports! If, however, you want to use the second
format outside of Keras methods like `),V=r("code"),$e=t("fit()"),fe=t(" and "),W=r("code"),xe=t("predict()"),ge=t(`, such as when creating your own layers or models with
the Keras `),U=r("code"),ce=t("Functional"),Ee=t(` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),te=p(),C=r("ul"),A=r("li"),_e=t("a single Tensor with "),K=r("code"),pe=t("input_ids"),Me=t(" only and nothing else: "),H=r("code"),ne=t("model(input_ids)"),Re=p(),q=r("li"),ze=t(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),J=r("code"),le=t("model([input_ids, attention_mask])"),je=t(" or "),G=r("code"),ke=t("model([input_ids, attention_mask, token_type_ids])"),re=p(),O=r("li"),me=t(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),S=r("code"),Ce=t('model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),oe=p(),L=r("p"),ye=t(`Note that when creating models and layers with
`),P=r("a"),de=t("subclassing"),qe=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(F){d=a(F,"P",{});var R=i(d);k=n(R,"TensorFlow models and layers in "),h=a(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(F),c=a(F,"UL",{});var se=i(c);z=a(se,"LI",{});var He=i(z);be=n(He,"having all inputs as keyword arguments (like PyTorch models), or"),He.forEach(o),he=m(se),I=a(se,"LI",{});var Ne=i(I);ae=n(Ne,"having all inputs as a list, tuple or dict in the first positional argument."),Ne.forEach(o),se.forEach(o),ee=m(F),E=a(F,"P",{});var j=i(E);ve=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=a(j,"CODE",{});var Ve=i(Q);we=n(Ve,"model.fit()"),Ve.forEach(o),ue=n(j,` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),N=a(j,"CODE",{});var Je=i(N);Te=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=a(j,"CODE",{});var Pe=i(V);$e=n(Pe,"fit()"),Pe.forEach(o),fe=n(j," and "),W=a(j,"CODE",{});var Ge=i(W);xe=n(Ge,"predict()"),Ge.forEach(o),ge=n(j,`, such as when creating your own layers or models with
the Keras `),U=a(j,"CODE",{});var We=i(U);ce=n(We,"Functional"),We.forEach(o),Ee=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(F),C=a(F,"UL",{});var D=i(C);A=a(D,"LI",{});var X=i(A);_e=n(X,"a single Tensor with "),K=a(X,"CODE",{});var Ue=i(K);pe=n(Ue,"input_ids"),Ue.forEach(o),Me=n(X," only and nothing else: "),H=a(X,"CODE",{});var Xe=i(H);ne=n(Xe,"model(input_ids)"),Xe.forEach(o),X.forEach(o),Re=m(D),q=a(D,"LI",{});var Y=i(q);ze=n(Y,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),J=a(Y,"CODE",{});var Ye=i(J);le=n(Ye,"model([input_ids, attention_mask])"),Ye.forEach(o),je=n(Y," or "),G=a(Y,"CODE",{});var Le=i(G);ke=n(Le,"model([input_ids, attention_mask, token_type_ids])"),Le.forEach(o),Y.forEach(o),re=m(D),O=a(D,"LI",{});var Fe=i(O);me=n(Fe,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),S=a(Fe,"CODE",{});var Ae=i(S);Ce=n(Ae,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),Ae.forEach(o),Fe.forEach(o),D.forEach(o),oe=m(F),L=a(F,"P",{});var Z=i(L);ye=n(Z,`Note that when creating models and layers with
`),P=a(Z,"A",{href:!0,rel:!0});var Ke=i(P);de=n(Ke,"subclassing"),Ke.forEach(o),qe=n(Z,` 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!`),Z.forEach(o),this.h()},h(){f(P,"href","https://keras.io/guides/making_new_layers_and_models_via_subclassing/"),f(P,"rel","nofollow")},m(F,R){g(F,d,R),e(d,k),e(d,h),e(h,u),e(d,_),g(F,l,R),g(F,c,R),e(c,z),e(z,be),e(c,he),e(c,I),e(I,ae),g(F,ee,R),g(F,E,R),e(E,ve),e(E,Q),e(Q,we),e(E,ue),e(E,N),e(N,Te),e(E,ie),e(E,V),e(V,$e),e(E,fe),e(E,W),e(W,xe),e(E,ge),e(E,U),e(U,ce),e(E,Ee),g(F,te,R),g(F,C,R),e(C,A),e(A,_e),e(A,K),e(K,pe),e(A,Me),e(A,H),e(H,ne),e(C,Re),e(C,q),e(q,ze),e(q,J),e(J,le),e(q,je),e(q,G),e(G,ke),e(C,re),e(C,O),e(O,me),e(O,S),e(S,Ce),g(F,oe,R),g(F,L,R),e(L,ye),e(L,P),e(P,de),e(L,qe)},d(F){F&&o(d),F&&o(l),F&&o(c),F&&o(ee),F&&o(E),F&&o(te),F&&o(C),F&&o(oe),F&&o(L)}}}function lE(M){let d,k,h,u,_;return{c(){d=r("p"),k=t("Although the recipe for forward pass needs to be defined within this function, one should call the "),h=r("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=a(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=a(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 Ie({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=r("p"),k=t("Example:"),h=p(),b(u.$$.fragment)},l(l){d=a(l,"P",{});var c=i(d);k=n(c,"Example:"),c.forEach(o),h=m(l),v(u.$$.fragment,l)},m(l,c){g(l,d,c),e(d,k),g(l,h,c),w(u,l,c),_=!0},p:De,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;return d=new Ie({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(){b(d.$$.fragment)},l(h){v(d.$$.fragment,h)},m(h,u){w(d,h,u),k=!0},p:De,i(h){k||(T(d.$$.fragment,h),k=!0)},o(h){$(d.$$.fragment,h),k=!1},d(h){x(d,h)}}}function pE(M){let d,k,h,u,_,l,c,z,be,he,I,ae,ee,E,ve,Q,we,ue,N,Te,ie,V,$e,fe,W,xe,ge,U,ce,Ee,te,C,A,_e,K,pe,Me,H,ne,Re,q,ze,J,le,je,G,ke,re,O,me,S,Ce,oe,L,ye,P,de,qe;return{c(){d=r("p"),k=t("TensorFlow models and layers in "),h=r("code"),u=t("transformers"),_=t(" accept two formats as input:"),l=p(),c=r("ul"),z=r("li"),be=t("having all inputs as keyword arguments (like PyTorch models), or"),he=p(),I=r("li"),ae=t("having all inputs as a list, tuple or dict in the first positional argument."),ee=p(),E=r("p"),ve=t(`The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
and layers. Because of this support, when using methods like `),Q=r("code"),we=t("model.fit()"),ue=t(` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),N=r("code"),Te=t("model.fit()"),ie=t(` supports! If, however, you want to use the second
format outside of Keras methods like `),V=r("code"),$e=t("fit()"),fe=t(" and "),W=r("code"),xe=t("predict()"),ge=t(`, such as when creating your own layers or models with
the Keras `),U=r("code"),ce=t("Functional"),Ee=t(` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),te=p(),C=r("ul"),A=r("li"),_e=t("a single Tensor with "),K=r("code"),pe=t("input_ids"),Me=t(" only and nothing else: "),H=r("code"),ne=t("model(input_ids)"),Re=p(),q=r("li"),ze=t(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),J=r("code"),le=t("model([input_ids, attention_mask])"),je=t(" or "),G=r("code"),ke=t("model([input_ids, attention_mask, token_type_ids])"),re=p(),O=r("li"),me=t(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),S=r("code"),Ce=t('model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),oe=p(),L=r("p"),ye=t(`Note that when creating models and layers with
`),P=r("a"),de=t("subclassing"),qe=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(F){d=a(F,"P",{});var R=i(d);k=n(R,"TensorFlow models and layers in "),h=a(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(F),c=a(F,"UL",{});var se=i(c);z=a(se,"LI",{});var He=i(z);be=n(He,"having all inputs as keyword arguments (like PyTorch models), or"),He.forEach(o),he=m(se),I=a(se,"LI",{});var Ne=i(I);ae=n(Ne,"having all inputs as a list, tuple or dict in the first positional argument."),Ne.forEach(o),se.forEach(o),ee=m(F),E=a(F,"P",{});var j=i(E);ve=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=a(j,"CODE",{});var Ve=i(Q);we=n(Ve,"model.fit()"),Ve.forEach(o),ue=n(j,` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),N=a(j,"CODE",{});var Je=i(N);Te=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=a(j,"CODE",{});var Pe=i(V);$e=n(Pe,"fit()"),Pe.forEach(o),fe=n(j," and "),W=a(j,"CODE",{});var Ge=i(W);xe=n(Ge,"predict()"),Ge.forEach(o),ge=n(j,`, such as when creating your own layers or models with
the Keras `),U=a(j,"CODE",{});var We=i(U);ce=n(We,"Functional"),We.forEach(o),Ee=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(F),C=a(F,"UL",{});var D=i(C);A=a(D,"LI",{});var X=i(A);_e=n(X,"a single Tensor with "),K=a(X,"CODE",{});var Ue=i(K);pe=n(Ue,"input_ids"),Ue.forEach(o),Me=n(X," only and nothing else: "),H=a(X,"CODE",{});var Xe=i(H);ne=n(Xe,"model(input_ids)"),Xe.forEach(o),X.forEach(o),Re=m(D),q=a(D,"LI",{});var Y=i(q);ze=n(Y,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),J=a(Y,"CODE",{});var Ye=i(J);le=n(Ye,"model([input_ids, attention_mask])"),Ye.forEach(o),je=n(Y," or "),G=a(Y,"CODE",{});var Le=i(G);ke=n(Le,"model([input_ids, attention_mask, token_type_ids])"),Le.forEach(o),Y.forEach(o),re=m(D),O=a(D,"LI",{});var Fe=i(O);me=n(Fe,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),S=a(Fe,"CODE",{});var Ae=i(S);Ce=n(Ae,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),Ae.forEach(o),Fe.forEach(o),D.forEach(o),oe=m(F),L=a(F,"P",{});var Z=i(L);ye=n(Z,`Note that when creating models and layers with
`),P=a(Z,"A",{href:!0,rel:!0});var Ke=i(P);de=n(Ke,"subclassing"),Ke.forEach(o),qe=n(Z,` 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!`),Z.forEach(o),this.h()},h(){f(P,"href","https://keras.io/guides/making_new_layers_and_models_via_subclassing/"),f(P,"rel","nofollow")},m(F,R){g(F,d,R),e(d,k),e(d,h),e(h,u),e(d,_),g(F,l,R),g(F,c,R),e(c,z),e(z,be),e(c,he),e(c,I),e(I,ae),g(F,ee,R),g(F,E,R),e(E,ve),e(E,Q),e(Q,we),e(E,ue),e(E,N),e(N,Te),e(E,ie),e(E,V),e(V,$e),e(E,fe),e(E,W),e(W,xe),e(E,ge),e(E,U),e(U,ce),e(E,Ee),g(F,te,R),g(F,C,R),e(C,A),e(A,_e),e(A,K),e(K,pe),e(A,Me),e(A,H),e(H,ne),e(C,Re),e(C,q),e(q,ze),e(q,J),e(J,le),e(q,je),e(q,G),e(G,ke),e(C,re),e(C,O),e(O,me),e(O,S),e(S,Ce),g(F,oe,R),g(F,L,R),e(L,ye),e(L,P),e(P,de),e(L,qe)},d(F){F&&o(d),F&&o(l),F&&o(c),F&&o(ee),F&&o(E),F&&o(te),F&&o(C),F&&o(oe),F&&o(L)}}}function mE(M){let d,k,h,u,_;return{c(){d=r("p"),k=t("Although the recipe for forward pass needs to be defined within this function, one should call the "),h=r("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=a(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=a(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 hE(M){let d,k,h,u,_;return u=new Ie({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=r("p"),k=t("Example:"),h=p(),b(u.$$.fragment)},l(l){d=a(l,"P",{});var c=i(d);k=n(c,"Example:"),c.forEach(o),h=m(l),v(u.$$.fragment,l)},m(l,c){g(l,d,c),e(d,k),g(l,h,c),w(u,l,c),_=!0},p:De,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 uE(M){let d,k,h,u,_,l,c,z,be,he,I,ae,ee,E,ve,Q,we,ue,N,Te,ie,V,$e,fe,W,xe,ge,U,ce,Ee,te,C,A,_e,K,pe,Me,H,ne,Re,q,ze,J,le,je,G,ke,re,O,me,S,Ce,oe,L,ye,P,de,qe;return{c(){d=r("p"),k=t("TensorFlow models and layers in "),h=r("code"),u=t("transformers"),_=t(" accept two formats as input:"),l=p(),c=r("ul"),z=r("li"),be=t("having all inputs as keyword arguments (like PyTorch models), or"),he=p(),I=r("li"),ae=t("having all inputs as a list, tuple or dict in the first positional argument."),ee=p(),E=r("p"),ve=t(`The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
and layers. Because of this support, when using methods like `),Q=r("code"),we=t("model.fit()"),ue=t(` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),N=r("code"),Te=t("model.fit()"),ie=t(` supports! If, however, you want to use the second
format outside of Keras methods like `),V=r("code"),$e=t("fit()"),fe=t(" and "),W=r("code"),xe=t("predict()"),ge=t(`, such as when creating your own layers or models with
the Keras `),U=r("code"),ce=t("Functional"),Ee=t(` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),te=p(),C=r("ul"),A=r("li"),_e=t("a single Tensor with "),K=r("code"),pe=t("input_ids"),Me=t(" only and nothing else: "),H=r("code"),ne=t("model(input_ids)"),Re=p(),q=r("li"),ze=t(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),J=r("code"),le=t("model([input_ids, attention_mask])"),je=t(" or "),G=r("code"),ke=t("model([input_ids, attention_mask, token_type_ids])"),re=p(),O=r("li"),me=t(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),S=r("code"),Ce=t('model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),oe=p(),L=r("p"),ye=t(`Note that when creating models and layers with
`),P=r("a"),de=t("subclassing"),qe=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(F){d=a(F,"P",{});var R=i(d);k=n(R,"TensorFlow models and layers in "),h=a(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(F),c=a(F,"UL",{});var se=i(c);z=a(se,"LI",{});var He=i(z);be=n(He,"having all inputs as keyword arguments (like PyTorch models), or"),He.forEach(o),he=m(se),I=a(se,"LI",{});var Ne=i(I);ae=n(Ne,"having all inputs as a list, tuple or dict in the first positional argument."),Ne.forEach(o),se.forEach(o),ee=m(F),E=a(F,"P",{});var j=i(E);ve=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=a(j,"CODE",{});var Ve=i(Q);we=n(Ve,"model.fit()"),Ve.forEach(o),ue=n(j,` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),N=a(j,"CODE",{});var Je=i(N);Te=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=a(j,"CODE",{});var Pe=i(V);$e=n(Pe,"fit()"),Pe.forEach(o),fe=n(j," and "),W=a(j,"CODE",{});var Ge=i(W);xe=n(Ge,"predict()"),Ge.forEach(o),ge=n(j,`, such as when creating your own layers or models with
the Keras `),U=a(j,"CODE",{});var We=i(U);ce=n(We,"Functional"),We.forEach(o),Ee=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(F),C=a(F,"UL",{});var D=i(C);A=a(D,"LI",{});var X=i(A);_e=n(X,"a single Tensor with "),K=a(X,"CODE",{});var Ue=i(K);pe=n(Ue,"input_ids"),Ue.forEach(o),Me=n(X," only and nothing else: "),H=a(X,"CODE",{});var Xe=i(H);ne=n(Xe,"model(input_ids)"),Xe.forEach(o),X.forEach(o),Re=m(D),q=a(D,"LI",{});var Y=i(q);ze=n(Y,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),J=a(Y,"CODE",{});var Ye=i(J);le=n(Ye,"model([input_ids, attention_mask])"),Ye.forEach(o),je=n(Y," or "),G=a(Y,"CODE",{});var Le=i(G);ke=n(Le,"model([input_ids, attention_mask, token_type_ids])"),Le.forEach(o),Y.forEach(o),re=m(D),O=a(D,"LI",{});var Fe=i(O);me=n(Fe,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),S=a(Fe,"CODE",{});var Ae=i(S);Ce=n(Ae,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),Ae.forEach(o),Fe.forEach(o),D.forEach(o),oe=m(F),L=a(F,"P",{});var Z=i(L);ye=n(Z,`Note that when creating models and layers with
`),P=a(Z,"A",{href:!0,rel:!0});var Ke=i(P);de=n(Ke,"subclassing"),Ke.forEach(o),qe=n(Z,` 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!`),Z.forEach(o),this.h()},h(){f(P,"href","https://keras.io/guides/making_new_layers_and_models_via_subclassing/"),f(P,"rel","nofollow")},m(F,R){g(F,d,R),e(d,k),e(d,h),e(h,u),e(d,_),g(F,l,R),g(F,c,R),e(c,z),e(z,be),e(c,he),e(c,I),e(I,ae),g(F,ee,R),g(F,E,R),e(E,ve),e(E,Q),e(Q,we),e(E,ue),e(E,N),e(N,Te),e(E,ie),e(E,V),e(V,$e),e(E,fe),e(E,W),e(W,xe),e(E,ge),e(E,U),e(U,ce),e(E,Ee),g(F,te,R),g(F,C,R),e(C,A),e(A,_e),e(A,K),e(K,pe),e(A,Me),e(A,H),e(H,ne),e(C,Re),e(C,q),e(q,ze),e(q,J),e(J,le),e(q,je),e(q,G),e(G,ke),e(C,re),e(C,O),e(O,me),e(O,S),e(S,Ce),g(F,oe,R),g(F,L,R),e(L,ye),e(L,P),e(P,de),e(L,qe)},d(F){F&&o(d),F&&o(l),F&&o(c),F&&o(ee),F&&o(E),F&&o(te),F&&o(C),F&&o(oe),F&&o(L)}}}function fE(M){let d,k,h,u,_;return{c(){d=r("p"),k=t("Although the recipe for forward pass needs to be defined within this function, one should call the "),h=r("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=a(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=a(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 Ie({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=r("p"),k=t("Example:"),h=p(),b(u.$$.fragment)},l(l){d=a(l,"P",{});var c=i(d);k=n(c,"Example:"),c.forEach(o),h=m(l),v(u.$$.fragment,l)},m(l,c){g(l,d,c),e(d,k),g(l,h,c),w(u,l,c),_=!0},p:De,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 Ie({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(){b(d.$$.fragment)},l(h){v(d.$$.fragment,h)},m(h,u){w(d,h,u),k=!0},p:De,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,_,l,c,z,be,he,I,ae,ee,E,ve,Q,we,ue,N,Te,ie,V,$e,fe,W,xe,ge,U,ce,Ee,te,C,A,_e,K,pe,Me,H,ne,Re,q,ze,J,le,je,G,ke,re,O,me,S,Ce,oe,L,ye,P,de,qe;return{c(){d=r("p"),k=t("TensorFlow models and layers in "),h=r("code"),u=t("transformers"),_=t(" accept two formats as input:"),l=p(),c=r("ul"),z=r("li"),be=t("having all inputs as keyword arguments (like PyTorch models), or"),he=p(),I=r("li"),ae=t("having all inputs as a list, tuple or dict in the first positional argument."),ee=p(),E=r("p"),ve=t(`The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
and layers. Because of this support, when using methods like `),Q=r("code"),we=t("model.fit()"),ue=t(` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),N=r("code"),Te=t("model.fit()"),ie=t(` supports! If, however, you want to use the second
format outside of Keras methods like `),V=r("code"),$e=t("fit()"),fe=t(" and "),W=r("code"),xe=t("predict()"),ge=t(`, such as when creating your own layers or models with
the Keras `),U=r("code"),ce=t("Functional"),Ee=t(` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),te=p(),C=r("ul"),A=r("li"),_e=t("a single Tensor with "),K=r("code"),pe=t("input_ids"),Me=t(" only and nothing else: "),H=r("code"),ne=t("model(input_ids)"),Re=p(),q=r("li"),ze=t(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),J=r("code"),le=t("model([input_ids, attention_mask])"),je=t(" or "),G=r("code"),ke=t("model([input_ids, attention_mask, token_type_ids])"),re=p(),O=r("li"),me=t(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),S=r("code"),Ce=t('model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),oe=p(),L=r("p"),ye=t(`Note that when creating models and layers with
`),P=r("a"),de=t("subclassing"),qe=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(F){d=a(F,"P",{});var R=i(d);k=n(R,"TensorFlow models and layers in "),h=a(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(F),c=a(F,"UL",{});var se=i(c);z=a(se,"LI",{});var He=i(z);be=n(He,"having all inputs as keyword arguments (like PyTorch models), or"),He.forEach(o),he=m(se),I=a(se,"LI",{});var Ne=i(I);ae=n(Ne,"having all inputs as a list, tuple or dict in the first positional argument."),Ne.forEach(o),se.forEach(o),ee=m(F),E=a(F,"P",{});var j=i(E);ve=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=a(j,"CODE",{});var Ve=i(Q);we=n(Ve,"model.fit()"),Ve.forEach(o),ue=n(j,` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),N=a(j,"CODE",{});var Je=i(N);Te=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=a(j,"CODE",{});var Pe=i(V);$e=n(Pe,"fit()"),Pe.forEach(o),fe=n(j," and "),W=a(j,"CODE",{});var Ge=i(W);xe=n(Ge,"predict()"),Ge.forEach(o),ge=n(j,`, such as when creating your own layers or models with
the Keras `),U=a(j,"CODE",{});var We=i(U);ce=n(We,"Functional"),We.forEach(o),Ee=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(F),C=a(F,"UL",{});var D=i(C);A=a(D,"LI",{});var X=i(A);_e=n(X,"a single Tensor with "),K=a(X,"CODE",{});var Ue=i(K);pe=n(Ue,"input_ids"),Ue.forEach(o),Me=n(X," only and nothing else: "),H=a(X,"CODE",{});var Xe=i(H);ne=n(Xe,"model(input_ids)"),Xe.forEach(o),X.forEach(o),Re=m(D),q=a(D,"LI",{});var Y=i(q);ze=n(Y,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),J=a(Y,"CODE",{});var Ye=i(J);le=n(Ye,"model([input_ids, attention_mask])"),Ye.forEach(o),je=n(Y," or "),G=a(Y,"CODE",{});var Le=i(G);ke=n(Le,"model([input_ids, attention_mask, token_type_ids])"),Le.forEach(o),Y.forEach(o),re=m(D),O=a(D,"LI",{});var Fe=i(O);me=n(Fe,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),S=a(Fe,"CODE",{});var Ae=i(S);Ce=n(Ae,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),Ae.forEach(o),Fe.forEach(o),D.forEach(o),oe=m(F),L=a(F,"P",{});var Z=i(L);ye=n(Z,`Note that when creating models and layers with
`),P=a(Z,"A",{href:!0,rel:!0});var Ke=i(P);de=n(Ke,"subclassing"),Ke.forEach(o),qe=n(Z,` 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!`),Z.forEach(o),this.h()},h(){f(P,"href","https://keras.io/guides/making_new_layers_and_models_via_subclassing/"),f(P,"rel","nofollow")},m(F,R){g(F,d,R),e(d,k),e(d,h),e(h,u),e(d,_),g(F,l,R),g(F,c,R),e(c,z),e(z,be),e(c,he),e(c,I),e(I,ae),g(F,ee,R),g(F,E,R),e(E,ve),e(E,Q),e(Q,we),e(E,ue),e(E,N),e(N,Te),e(E,ie),e(E,V),e(V,$e),e(E,fe),e(E,W),e(W,xe),e(E,ge),e(E,U),e(U,ce),e(E,Ee),g(F,te,R),g(F,C,R),e(C,A),e(A,_e),e(A,K),e(K,pe),e(A,Me),e(A,H),e(H,ne),e(C,Re),e(C,q),e(q,ze),e(q,J),e(J,le),e(q,je),e(q,G),e(G,ke),e(C,re),e(C,O),e(O,me),e(O,S),e(S,Ce),g(F,oe,R),g(F,L,R),e(L,ye),e(L,P),e(P,de),e(L,qe)},d(F){F&&o(d),F&&o(l),F&&o(c),F&&o(ee),F&&o(E),F&&o(te),F&&o(C),F&&o(oe),F&&o(L)}}}function yE(M){let d,k,h,u,_;return{c(){d=r("p"),k=t("Although the recipe for forward pass needs to be defined within this function, one should call the "),h=r("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=a(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=a(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 Ie({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=r("p"),k=t("Example:"),h=p(),b(u.$$.fragment)},l(l){d=a(l,"P",{});var c=i(d);k=n(c,"Example:"),c.forEach(o),h=m(l),v(u.$$.fragment,l)},m(l,c){g(l,d,c),e(d,k),g(l,h,c),w(u,l,c),_=!0},p:De,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;return d=new Ie({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(){b(d.$$.fragment)},l(h){v(d.$$.fragment,h)},m(h,u){w(d,h,u),k=!0},p:De,i(h){k||(T(d.$$.fragment,h),k=!0)},o(h){$(d.$$.fragment,h),k=!1},d(h){x(d,h)}}}function vE(M){let d,k,h,u,_;return{c(){d=r("p"),k=t("Although the recipe for forward pass needs to be defined within this function, one should call the "),h=r("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=a(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=a(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 Ie({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=r("p"),k=t("Example:"),h=p(),b(u.$$.fragment)},l(l){d=a(l,"P",{});var c=i(d);k=n(c,"Example:"),c.forEach(o),h=m(l),v(u.$$.fragment,l)},m(l,c){g(l,d,c),e(d,k),g(l,h,c),w(u,l,c),_=!0},p:De,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=r("p"),k=t("Although the recipe for forward pass needs to be defined within this function, one should call the "),h=r("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=a(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=a(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 Ie({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=r("p"),k=t("Example:"),h=p(),b(u.$$.fragment)},l(l){d=a(l,"P",{});var c=i(d);k=n(c,"Example:"),c.forEach(o),h=m(l),v(u.$$.fragment,l)},m(l,c){g(l,d,c),e(d,k),g(l,h,c),w(u,l,c),_=!0},p:De,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=r("p"),k=t("Although the recipe for forward pass needs to be defined within this function, one should call the "),h=r("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=a(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=a(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 Ie({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=r("p"),k=t("Example:"),h=p(),b(u.$$.fragment)},l(l){d=a(l,"P",{});var c=i(d);k=n(c,"Example:"),c.forEach(o),h=m(l),v(u.$$.fragment,l)},m(l,c){g(l,d,c),e(d,k),g(l,h,c),w(u,l,c),_=!0},p:De,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=r("p"),k=t("Although the recipe for forward pass needs to be defined within this function, one should call the "),h=r("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=a(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=a(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 Ie({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=r("p"),k=t("Example:"),h=p(),b(u.$$.fragment)},l(l){d=a(l,"P",{});var c=i(d);k=n(c,"Example:"),c.forEach(o),h=m(l),v(u.$$.fragment,l)},m(l,c){g(l,d,c),e(d,k),g(l,h,c),w(u,l,c),_=!0},p:De,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,_;return{c(){d=r("p"),k=t("Although the recipe for forward pass needs to be defined within this function, one should call the "),h=r("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=a(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=a(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 jE(M){let d,k,h,u,_;return u=new Ie({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=r("p"),k=t("Example:"),h=p(),b(u.$$.fragment)},l(l){d=a(l,"P",{});var c=i(d);k=n(c,"Example:"),c.forEach(o),h=m(l),v(u.$$.fragment,l)},m(l,c){g(l,d,c),e(d,k),g(l,h,c),w(u,l,c),_=!0},p:De,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,_;return{c(){d=r("p"),k=t("Although the recipe for forward pass needs to be defined within this function, one should call the "),h=r("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=a(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=a(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 qE(M){let d,k,h,u,_;return u=new Ie({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=r("p"),k=t("Example:"),h=p(),b(u.$$.fragment)},l(l){d=a(l,"P",{});var c=i(d);k=n(c,"Example:"),c.forEach(o),h=m(l),v(u.$$.fragment,l)},m(l,c){g(l,d,c),e(d,k),g(l,h,c),w(u,l,c),_=!0},p:De,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 PE(M){let d,k,h,u,_,l,c,z,be,he,I,ae,ee,E,ve,Q,we,ue,N,Te,ie,V,$e,fe,W,xe,ge,U,ce,Ee,te,C,A,_e,K,pe,Me,H,ne,Re,q,ze,J,le,je,G,ke,re,O,me,S,Ce,oe,L,ye,P,de,qe,F,R,Se,se,He,Ne,j,Ve,Je,Pe,Ge,We,D,X,Ue,Xe,Y,Ye,Le,Fe,Ae,Z,Ke,fr,Wu,jd,Uu,Hm,Ze,gr,Ku,_r,Bu,kr,Qu,Hu,Vu,yr,Ju,Fl,Gu,Xu,Yu,vn,Zu,ft,Fr,ef,Cd,of,tf,br,bl,nf,qd,sf,rf,vl,af,Pd,lf,df,wn,vr,cf,wr,pf,Ad,mf,hf,uf,Ao,Tr,ff,Ld,gf,_f,Tn,kf,Tt,yf,Od,Ff,bf,Dd,vf,wf,Tf,wl,$r,Vm,$t,$n,Id,xr,$f,Nd,xf,Jm,io,Er,Ef,Mr,Mf,Sd,Rf,zf,jf,xn,Tl,Cf,qf,$l,Pf,Af,Lf,Rr,Of,xl,Df,If,Nf,En,Sf,gt,zr,Wf,Wd,Uf,Kf,jr,El,Bf,Ud,Qf,Hf,Ml,Vf,Kd,Jf,Gm,xt,Mn,Bd,Cr,Gf,Qd,Xf,Xm,_o,qr,Yf,Pr,Zf,Ar,eg,og,tg,Lr,ng,Or,sg,rg,ag,lo,ig,Hd,lg,dg,Vd,cg,pg,Jd,mg,hg,Gd,ug,fg,Xd,gg,_g,Yd,kg,yg,Fg,Lo,Dr,bg,Et,vg,Rl,wg,Tg,Zd,$g,xg,Eg,Rn,Mg,zn,Ym,Mt,jn,ec,Ir,Rg,oc,zg,Zm,rt,Nr,jg,Rt,Cg,tc,qg,Pg,Sr,Ag,Lg,Og,Oo,Wr,Dg,zt,Ig,zl,Ng,Sg,nc,Wg,Ug,Kg,Cn,Bg,qn,eh,jt,Pn,sc,Ur,Qg,rc,Hg,oh,at,Kr,Vg,Ct,Jg,ac,Gg,Xg,Br,Yg,Zg,e_,Do,Qr,o_,qt,t_,jl,n_,s_,ic,r_,a_,i_,An,l_,Ln,th,Pt,On,lc,Hr,d_,dc,c_,nh,jo,Vr,p_,cc,m_,h_,Jr,u_,Gr,f_,g_,__,yo,Xr,k_,At,y_,Cl,F_,b_,pc,v_,w_,T_,Dn,$_,In,x_,Nn,sh,Lt,Sn,mc,Yr,E_,hc,M_,rh,Co,Zr,R_,uc,z_,j_,ea,C_,oa,q_,P_,A_,Io,ta,L_,Ot,O_,ql,D_,I_,fc,N_,S_,W_,Wn,U_,Un,ah,Dt,Kn,gc,na,K_,_c,B_,ih,qo,sa,Q_,kc,H_,V_,ra,J_,aa,G_,X_,Y_,No,ia,Z_,It,ek,Pl,ok,tk,yc,nk,sk,rk,Bn,ak,Qn,lh,Nt,Hn,Fc,la,ik,bc,lk,dh,Po,da,dk,St,ck,vc,pk,mk,wc,hk,uk,fk,ca,gk,pa,_k,kk,yk,So,ma,Fk,Wt,bk,Al,vk,wk,Tc,Tk,$k,xk,Vn,Ek,Jn,ch,Ut,Gn,$c,ha,Mk,xc,Rk,ph,co,ua,zk,Ec,jk,Ck,fa,qk,Ll,Pk,Ak,Lk,ga,Ok,_a,Dk,Ik,Nk,Xn,Sk,Wo,ka,Wk,Kt,Uk,Ol,Kk,Bk,Mc,Qk,Hk,Vk,Yn,Jk,Zn,mh,Bt,es,Rc,ya,Gk,zc,Xk,hh,po,Fa,Yk,ba,Zk,jc,ey,oy,ty,va,ny,Dl,sy,ry,ay,wa,iy,Ta,ly,dy,cy,os,py,Fo,$a,my,Qt,hy,Il,uy,fy,Cc,gy,_y,ky,ts,yy,ns,Fy,ss,uh,Ht,rs,qc,xa,by,Pc,vy,fh,mo,Ea,wy,Ma,Ty,Ac,$y,xy,Ey,Ra,My,Nl,Ry,zy,jy,za,Cy,ja,qy,Py,Ay,as,Ly,_t,Ca,Oy,ko,Dy,Lc,Iy,Ny,Oc,Sy,Wy,Dc,Uy,Ky,Ic,By,Qy,Nc,Hy,Vy,Jy,is,gh,Vt,ls,Sc,qa,Gy,Wc,Xy,_h,ho,Pa,Yy,Uc,Zy,eF,Aa,oF,Sl,tF,nF,sF,La,rF,Oa,aF,iF,lF,ds,dF,bo,Da,cF,Jt,pF,Wl,mF,hF,Kc,uF,fF,gF,cs,_F,ps,kF,ms,kh,Gt,hs,Bc,Ia,yF,Qc,FF,yh,uo,Na,bF,Hc,vF,wF,Sa,TF,Ul,$F,xF,EF,Wa,MF,Ua,RF,zF,jF,us,CF,Uo,Ka,qF,Xt,PF,Kl,AF,LF,Vc,OF,DF,IF,fs,NF,gs,Fh,Yt,_s,Jc,Ba,SF,Gc,WF,bh,fo,Qa,UF,Xc,KF,BF,Ha,QF,Bl,HF,VF,JF,Va,GF,Ja,XF,YF,ZF,ks,eb,vo,Ga,ob,Zt,tb,Ql,nb,sb,Yc,rb,ab,ib,ys,lb,Fs,db,bs,vh,en,vs,Zc,Xa,cb,ep,pb,wh,go,Ya,mb,on,hb,op,ub,fb,tp,gb,_b,kb,Za,yb,Hl,Fb,bb,vb,ei,wb,oi,Tb,$b,xb,ws,Eb,wo,ti,Mb,tn,Rb,Vl,zb,jb,np,Cb,qb,Pb,Ts,Ab,$s,Lb,xs,Th,nn,Es,sp,ni,Ob,rp,Db,$h,eo,si,Ib,ap,Nb,Sb,ri,Wb,Jl,Ub,Kb,Bb,ai,Qb,ii,Hb,Vb,Jb,ip,Gb,Xb,it,lp,li,Yb,Zb,dp,di,ev,ov,cp,ci,tv,nv,pp,pi,sv,rv,Ko,mi,av,sn,iv,mp,lv,dv,hp,cv,pv,mv,Ms,hv,Rs,xh,rn,zs,up,hi,uv,fp,fv,Eh,oo,ui,gv,fi,_v,gp,kv,yv,Fv,gi,bv,Gl,vv,wv,Tv,_i,$v,ki,xv,Ev,Mv,_p,Rv,zv,lt,kp,yi,jv,Cv,yp,Fi,qv,Pv,Fp,bi,Av,Lv,bp,vi,Ov,Dv,Bo,wi,Iv,an,Nv,vp,Sv,Wv,wp,Uv,Kv,Bv,js,Qv,Cs,Mh,ln,qs,Tp,Ti,Hv,$p,Vv,Rh,to,$i,Jv,xp,Gv,Xv,xi,Yv,Xl,Zv,ew,ow,Ei,tw,Mi,nw,sw,rw,Ep,aw,iw,dt,Mp,Ri,lw,dw,Rp,zi,cw,pw,zp,ji,mw,hw,jp,Ci,uw,fw,Qo,qi,gw,dn,_w,Cp,kw,yw,qp,Fw,bw,vw,Ps,ww,As,zh,cn,Ls,Pp,Pi,Tw,Ap,$w,jh,no,Ai,xw,Lp,Ew,Mw,Li,Rw,Yl,zw,jw,Cw,Oi,qw,Di,Pw,Aw,Lw,Op,Ow,Dw,ct,Dp,Ii,Iw,Nw,Ip,Ni,Sw,Ww,Np,Si,Uw,Kw,Sp,Wi,Bw,Qw,Ho,Ui,Hw,pn,Vw,Wp,Jw,Gw,Up,Xw,Yw,Zw,Os,eT,Ds,Ch,mn,Is,Kp,Ki,oT,Bp,tT,qh,so,Bi,nT,Qp,sT,rT,Qi,aT,Zl,iT,lT,dT,Hi,cT,Vi,pT,mT,hT,Hp,uT,fT,pt,Vp,Ji,gT,_T,Jp,Gi,kT,yT,Gp,Xi,FT,bT,Xp,Yi,vT,wT,Vo,Zi,TT,hn,$T,Yp,xT,ET,Zp,MT,RT,zT,Ns,jT,Ss,Ph,un,Ws,em,el,CT,om,qT,Ah,ro,ol,PT,fn,AT,tm,LT,OT,nm,DT,IT,NT,tl,ST,ed,WT,UT,KT,nl,BT,sl,QT,HT,VT,sm,JT,GT,mt,rm,rl,XT,YT,am,al,ZT,e$,im,il,o$,t$,lm,ll,n$,s$,Jo,dl,r$,gn,a$,dm,i$,l$,cm,d$,c$,p$,Us,m$,Ks,Lh;return l=new Qe({}),E=new Qe({}),S=new Qe({}),de=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/main/en/model_doc/roformer#transformers.RoFormerModel">RoFormerModel</a> or <a href="/docs/transformers/main/en/model_doc/roformer#transformers.TFRoFormerModel">TFRoFormerModel</a>.`,name:"vocab_size"},{anchor:"transformers.RoFormerConfig.embedding_size",description:`<strong>embedding_size</strong> (<code>int</code>, <em>optional</em>, defaults to None) &#x2014;
Dimensionality of the encoder layers and the pooler layer. Defaults to the <code>hidden_size</code> if not provided.`,name:"embedding_size"},{anchor:"transformers.RoFormerConfig.hidden_size",description:`<strong>hidden_size</strong> (<code>int</code>, <em>optional</em>, defaults to 768) &#x2014;
Dimension of the encoder layers and the pooler layer.`,name:"hidden_size"},{anchor:"transformers.RoFormerConfig.num_hidden_layers",description:`<strong>num_hidden_layers</strong> (<code>int</code>, <em>optional</em>, defaults to 12) &#x2014;
Number of hidden layers in the Transformer encoder.`,name:"num_hidden_layers"},{anchor:"transformers.RoFormerConfig.num_attention_heads",description:`<strong>num_attention_heads</strong> (<code>int</code>, <em>optional</em>, defaults to 12) &#x2014;
Number of attention heads for each attention layer in the Transformer encoder.`,name:"num_attention_heads"},{anchor:"transformers.RoFormerConfig.intermediate_size",description:`<strong>intermediate_size</strong> (<code>int</code>, <em>optional</em>, defaults to 3072) &#x2014;
Dimension of the &#x201C;intermediate&#x201D; (i.e., feed-forward) layer in the Transformer encoder.`,name:"intermediate_size"},{anchor:"transformers.RoFormerConfig.hidden_act",description:`<strong>hidden_act</strong> (<code>str</code> or <code>function</code>, <em>optional</em>, defaults to <code>&quot;gelu&quot;</code>) &#x2014;
The non-linear activation function (function or string) in the encoder and pooler. If string, <code>&quot;gelu&quot;</code>,
<code>&quot;relu&quot;</code>, <code>&quot;selu&quot;</code> and <code>&quot;gelu_new&quot;</code> are supported.`,name:"hidden_act"},{anchor:"transformers.RoFormerConfig.hidden_dropout_prob",description:`<strong>hidden_dropout_prob</strong> (<code>float</code>, <em>optional</em>, defaults to 0.1) &#x2014;
The dropout probabilitiy for all fully connected layers in the embeddings, encoder, and pooler.`,name:"hidden_dropout_prob"},{anchor:"transformers.RoFormerConfig.attention_probs_dropout_prob",description:`<strong>attention_probs_dropout_prob</strong> (<code>float</code>, <em>optional</em>, defaults to 0.1) &#x2014;
The dropout ratio for the attention probabilities.`,name:"attention_probs_dropout_prob"},{anchor:"transformers.RoFormerConfig.max_position_embeddings",description:`<strong>max_position_embeddings</strong> (<code>int</code>, <em>optional</em>, defaults to 1536) &#x2014;
The maximum sequence length that this model might ever be used with. Typically set this to something large
just in case (e.g., 512 or 1024 or 1536).`,name:"max_position_embeddings"},{anchor:"transformers.RoFormerConfig.type_vocab_size",description:`<strong>type_vocab_size</strong> (<code>int</code>, <em>optional</em>, defaults to 2) &#x2014;
The vocabulary size of the <code>token_type_ids</code> passed when calling <a href="/docs/transformers/main/en/model_doc/roformer#transformers.RoFormerModel">RoFormerModel</a> or <a href="/docs/transformers/main/en/model_doc/roformer#transformers.TFRoFormerModel">TFRoFormerModel</a>.`,name:"type_vocab_size"},{anchor:"transformers.RoFormerConfig.initializer_range",description:`<strong>initializer_range</strong> (<code>float</code>, <em>optional</em>, defaults to 0.02) &#x2014;
The standard deviation of the truncated_normal_initializer for initializing all weight matrices.`,name:"initializer_range"},{anchor:"transformers.RoFormerConfig.layer_norm_eps",description:`<strong>layer_norm_eps</strong> (<code>float</code>, <em>optional</em>, defaults to 1e-12) &#x2014;
The epsilon used by the layer normalization layers.`,name:"layer_norm_eps"},{anchor:"transformers.RoFormerConfig.is_decoder",description:`<strong>is_decoder</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether the model is used as a decoder or not. If <code>False</code>, the model is used as an encoder.`,name:"is_decoder"},{anchor:"transformers.RoFormerConfig.use_cache",description:`<strong>use_cache</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not the model should return the last key/values attentions (not used by all models). Only
relevant if <code>config.is_decoder=True</code>.`,name:"use_cache"},{anchor:"transformers.RoFormerConfig.rotary_value",description:`<strong>rotary_value</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not apply rotary position embeddings on value layer.`,name:"rotary_value"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/roformer/configuration_roformer.py#L46"}}),Le=new Oe({props:{anchor:"transformers.RoFormerConfig.example",$$slots:{default:[qx]},$$scope:{ctx:M}}}),fr=new Qe({}),gr=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/main/src/transformers/models/roformer/tokenization_roformer.py#L299"}}),vn=new Oe({props:{anchor:"transformers.RoFormerTokenizer.example",$$slots:{default:[Px]},$$scope:{ctx:M}}}),Fr=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/main/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>
`}}),vr=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/main/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>
`}}),Tr=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/main/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>
`}}),Tn=new Oe({props:{anchor:"transformers.RoFormerTokenizer.create_token_type_ids_from_sequences.example",$$slots:{default:[Ax]},$$scope:{ctx:M}}}),$r=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/main/src/transformers/models/roformer/tokenization_roformer.py#L547"}}),xr=new Qe({}),Er=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/main/src/transformers/models/roformer/tokenization_roformer_fast.py#L71"}}),En=new Oe({props:{anchor:"transformers.RoFormerTokenizerFast.example",$$slots:{default:[Lx]},$$scope:{ctx:M}}}),zr=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/main/src/transformers/models/roformer/tokenization_roformer_fast.py#L147",returnDescription:`
<p>List of <a href="../glossary#input-ids">input IDs</a> with the appropriate special tokens.</p>
`,returnType:`
<p><code>List[int]</code></p>
`}}),Cr=new Qe({}),qr=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/main/en/model_doc/roformer#transformers.RoFormerConfig">RoFormerConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/roformer/modeling_roformer.py#L788"}}),Dr=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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.RoFormerModel.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.RoFormerModel.forward.token_type_ids",description:`<strong>token_type_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.RoFormerModel.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.RoFormerModel.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <em>input_ids</em> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.RoFormerModel.forward.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.RoFormerModel.forward.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.RoFormerModel.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.RoFormerModel.forward.encoder_hidden_states",description:`<strong>encoder_hidden_states</strong>  (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Sequence of hidden-states at the output of the last layer of the encoder. Used in the cross-attention if
the model is configured as a decoder.`,name:"encoder_hidden_states"},{anchor:"transformers.RoFormerModel.forward.encoder_attention_mask",description:`<strong>encoder_attention_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on the padding token indices of the encoder input. This mask is used in
the cross-attention if the model is configured as a decoder. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>`,name:"encoder_attention_mask"},{anchor:"transformers.RoFormerModel.forward.past_key_values",description:`<strong>past_key_values</strong> (<code>tuple(tuple(torch.FloatTensor))</code> of length <code>config.n_layers</code> with each tuple having 4 tensors of shape <code>(batch_size, num_heads, sequence_length - 1, embed_size_per_head)</code>) &#x2014;
Contains precomputed key and value hidden states of the attention blocks. Can be used to speed up decoding.
If <code>past_key_values</code> are used, the user can optionally input only the last <code>decoder_input_ids</code> (those that
don&#x2019;t have their past key value states given to this model) of shape <code>(batch_size, 1)</code> instead of all
<code>decoder_input_ids</code> of shape <code>(batch_size, sequence_length)</code>.`,name:"past_key_values"},{anchor:"transformers.RoFormerModel.forward.use_cache",description:`<strong>use_cache</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
If set to <code>True</code>, <code>past_key_values</code> key value states are returned and can be used to speed up decoding (see
<code>past_key_values</code>).`,name:"use_cache"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/roformer/modeling_roformer.py#L828",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.BaseModelOutputWithPastAndCrossAttentions"
>transformers.modeling_outputs.BaseModelOutputWithPastAndCrossAttentions</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/main/en/model_doc/roformer#transformers.RoFormerConfig"
>RoFormerConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>last_hidden_state</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>) \u2014 Sequence of hidden-states at the output of the last layer of the model.</p>
<p>If <code>past_key_values</code> is used only the last hidden-state of the sequences of shape <code>(batch_size, 1, hidden_size)</code> is output.</p>
</li>
<li>
<p><strong>past_key_values</strong> (<code>tuple(tuple(torch.FloatTensor))</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) \u2014 Tuple of <code>tuple(torch.FloatTensor)</code> of length <code>config.n_layers</code>, with each tuple having 2 tensors of shape
<code>(batch_size, num_heads, sequence_length, embed_size_per_head)</code>) and optionally if
<code>config.is_encoder_decoder=True</code> 2 additional tensors of shape <code>(batch_size, num_heads, encoder_sequence_length, embed_size_per_head)</code>.</p>
<p>Contains pre-computed hidden-states (key and values in the self-attention blocks and optionally if
<code>config.is_encoder_decoder=True</code> in the cross-attention blocks) that can be used (see <code>past_key_values</code>
input) to speed up sequential decoding.</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
<li>
<p><strong>cross_attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> and <code>config.add_cross_attention=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights of the decoder\u2019s cross-attention layer, after the attention softmax, used to compute the
weighted average in the cross-attention heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.BaseModelOutputWithPastAndCrossAttentions"
>transformers.modeling_outputs.BaseModelOutputWithPastAndCrossAttentions</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Rn=new Be({props:{$$slots:{default:[Ox]},$$scope:{ctx:M}}}),zn=new Oe({props:{anchor:"transformers.RoFormerModel.forward.example",$$slots:{default:[Dx]},$$scope:{ctx:M}}}),Ir=new Qe({}),Nr=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/main/en/model_doc/roformer#transformers.RoFormerConfig">RoFormerConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/roformer/modeling_roformer.py#L1056"}}),Wr=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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.RoFormerForCausalLM.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.RoFormerForCausalLM.forward.token_type_ids",description:`<strong>token_type_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.RoFormerForCausalLM.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.RoFormerForCausalLM.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <em>input_ids</em> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.RoFormerForCausalLM.forward.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.RoFormerForCausalLM.forward.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.RoFormerForCausalLM.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.RoFormerForCausalLM.forward.encoder_hidden_states",description:`<strong>encoder_hidden_states</strong>  (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Sequence of hidden-states at the output of the last layer of the encoder. Used in the cross-attention if
the model is configured as a decoder.`,name:"encoder_hidden_states"},{anchor:"transformers.RoFormerForCausalLM.forward.encoder_attention_mask",description:`<strong>encoder_attention_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on the padding token indices of the encoder input. This mask is used in
the cross-attention if the model is configured as a decoder. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>`,name:"encoder_attention_mask"},{anchor:"transformers.RoFormerForCausalLM.forward.past_key_values",description:`<strong>past_key_values</strong> (<code>tuple(tuple(torch.FloatTensor))</code> of length <code>config.n_layers</code> with each tuple having 4 tensors of shape <code>(batch_size, num_heads, sequence_length - 1, embed_size_per_head)</code>) &#x2014;
Contains precomputed key and value hidden states of the attention blocks. Can be used to speed up decoding.
If <code>past_key_values</code> are used, the user can optionally input only the last <code>decoder_input_ids</code> (those that
don&#x2019;t have their past key value states given to this model) of shape <code>(batch_size, 1)</code> instead of all
<code>decoder_input_ids</code> of shape <code>(batch_size, sequence_length)</code>.`,name:"past_key_values"},{anchor:"transformers.RoFormerForCausalLM.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Labels for computing the left-to-right language modeling loss (next word prediction). Indices should be in
<code>[-100, 0, ..., config.vocab_size]</code> (see <code>input_ids</code> docstring) Tokens with indices set to <code>-100</code> are
ignored (masked), the loss is only computed for the tokens with labels n <code>[0, ..., config.vocab_size]</code>.`,name:"labels"},{anchor:"transformers.RoFormerForCausalLM.forward.use_cache",description:`<strong>use_cache</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
If set to <code>True</code>, <code>past_key_values</code> key value states are returned and can be used to speed up decoding (see
<code>past_key_values</code>).`,name:"use_cache"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/roformer/modeling_roformer.py#L1077",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.CausalLMOutputWithCrossAttentions"
>transformers.modeling_outputs.CausalLMOutputWithCrossAttentions</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/main/en/model_doc/roformer#transformers.RoFormerConfig"
>RoFormerConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Language modeling loss (for next-token prediction).</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, config.vocab_size)</code>) \u2014 Prediction scores of the language modeling head (scores for each vocabulary token before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
<li>
<p><strong>cross_attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Cross attentions weights after the attention softmax, used to compute the weighted average in the
cross-attention heads.</p>
</li>
<li>
<p><strong>past_key_values</strong> (<code>tuple(tuple(torch.FloatTensor))</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> tuples of length <code>config.n_layers</code>, with each tuple containing the cached key,
value states of the self-attention and the cross-attention layers if model is used in encoder-decoder
setting. Only relevant if <code>config.is_decoder = True</code>.</p>
<p>Contains pre-computed hidden-states (key and values in the attention blocks) that can be used (see
<code>past_key_values</code> input) to speed up sequential decoding.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.CausalLMOutputWithCrossAttentions"
>transformers.modeling_outputs.CausalLMOutputWithCrossAttentions</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Cn=new Be({props:{$$slots:{default:[Ix]},$$scope:{ctx:M}}}),qn=new Oe({props:{anchor:"transformers.RoFormerForCausalLM.forward.example",$$slots:{default:[Nx]},$$scope:{ctx:M}}}),Ur=new Qe({}),Kr=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/main/en/model_doc/roformer#transformers.RoFormerConfig">RoFormerConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/roformer/modeling_roformer.py#L954"}}),Qr=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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.RoFormerForMaskedLM.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.RoFormerForMaskedLM.forward.token_type_ids",description:`<strong>token_type_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.RoFormerForMaskedLM.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.RoFormerForMaskedLM.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <em>input_ids</em> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.RoFormerForMaskedLM.forward.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.RoFormerForMaskedLM.forward.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.RoFormerForMaskedLM.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.RoFormerForMaskedLM.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Labels for computing the masked language modeling loss. Indices should be in <code>[-100, 0, ..., config.vocab_size]</code> (see <code>input_ids</code> docstring) Tokens with indices set to <code>-100</code> are ignored (masked), the
loss is only computed for the tokens with labels in <code>[0, ..., config.vocab_size]</code>.`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/roformer/modeling_roformer.py#L978",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.MaskedLMOutput"
>transformers.modeling_outputs.MaskedLMOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/main/en/model_doc/roformer#transformers.RoFormerConfig"
>RoFormerConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Masked language modeling (MLM) loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, config.vocab_size)</code>) \u2014 Prediction scores of the language modeling head (scores for each vocabulary token before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.MaskedLMOutput"
>transformers.modeling_outputs.MaskedLMOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),An=new Be({props:{$$slots:{default:[Sx]},$$scope:{ctx:M}}}),Ln=new Oe({props:{anchor:"transformers.RoFormerForMaskedLM.forward.example",$$slots:{default:[Wx]},$$scope:{ctx:M}}}),Hr=new Qe({}),Vr=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/main/en/model_doc/roformer#transformers.RoFormerConfig">RoFormerConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/roformer/modeling_roformer.py#L1228"}}),Xr=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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.RoFormerForSequenceClassification.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.RoFormerForSequenceClassification.forward.token_type_ids",description:`<strong>token_type_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.RoFormerForSequenceClassification.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.RoFormerForSequenceClassification.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <em>input_ids</em> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.RoFormerForSequenceClassification.forward.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.RoFormerForSequenceClassification.forward.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.RoFormerForSequenceClassification.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.RoFormerForSequenceClassification.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for computing the sequence classification/regression loss. Indices should be in <code>[0, ..., config.num_labels - 1]</code>. If <code>config.num_labels == 1</code> a regression loss is computed (Mean-Square loss), If
<code>config.num_labels &gt; 1</code> a classification loss is computed (Cross-Entropy).`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/roformer/modeling_roformer.py#L1238",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.SequenceClassifierOutput"
>transformers.modeling_outputs.SequenceClassifierOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/main/en/model_doc/roformer#transformers.RoFormerConfig"
>RoFormerConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Classification (or regression if config.num_labels==1) loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, config.num_labels)</code>) \u2014 Classification (or regression if config.num_labels==1) scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.SequenceClassifierOutput"
>transformers.modeling_outputs.SequenceClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Dn=new Be({props:{$$slots:{default:[Ux]},$$scope:{ctx:M}}}),In=new Oe({props:{anchor:"transformers.RoFormerForSequenceClassification.forward.example",$$slots:{default:[Kx]},$$scope:{ctx:M}}}),Nn=new Oe({props:{anchor:"transformers.RoFormerForSequenceClassification.forward.example-2",$$slots:{default:[Bx]},$$scope:{ctx:M}}}),Yr=new Qe({}),Zr=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/main/en/model_doc/roformer#transformers.RoFormerConfig">RoFormerConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/roformer/modeling_roformer.py#L1319"}}),ta=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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.RoFormerForMultipleChoice.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_choices, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.RoFormerForMultipleChoice.forward.token_type_ids",description:`<strong>token_type_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, num_choices, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.RoFormerForMultipleChoice.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.RoFormerForMultipleChoice.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_choices, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <em>input_ids</em> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.RoFormerForMultipleChoice.forward.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.RoFormerForMultipleChoice.forward.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.RoFormerForMultipleChoice.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.RoFormerForMultipleChoice.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for computing the multiple choice classification loss. Indices should be in <code>[0, ..., num_choices-1]</code> where <code>num_choices</code> is the size of the second dimension of the input tensors. (See
<code>input_ids</code> above)`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/roformer/modeling_roformer.py#L1330",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.MultipleChoiceModelOutput"
>transformers.modeling_outputs.MultipleChoiceModelOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/main/en/model_doc/roformer#transformers.RoFormerConfig"
>RoFormerConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <em>(1,)</em>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Classification loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_choices)</code>) \u2014 <em>num_choices</em> is the second dimension of the input tensors. (see <em>input_ids</em> above).</p>
<p>Classification scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.MultipleChoiceModelOutput"
>transformers.modeling_outputs.MultipleChoiceModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Wn=new Be({props:{$$slots:{default:[Qx]},$$scope:{ctx:M}}}),Un=new Oe({props:{anchor:"transformers.RoFormerForMultipleChoice.forward.example",$$slots:{default:[Hx]},$$scope:{ctx:M}}}),na=new Qe({}),sa=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/main/en/model_doc/roformer#transformers.RoFormerConfig">RoFormerConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/roformer/modeling_roformer.py#L1410"}}),ia=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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.RoFormerForTokenClassification.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.RoFormerForTokenClassification.forward.token_type_ids",description:`<strong>token_type_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.RoFormerForTokenClassification.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.RoFormerForTokenClassification.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <em>input_ids</em> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.RoFormerForTokenClassification.forward.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.RoFormerForTokenClassification.forward.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.RoFormerForTokenClassification.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.RoFormerForTokenClassification.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Labels for computing the token classification loss. Indices should be in <code>[0, ..., config.num_labels - 1]</code>.`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/roformer/modeling_roformer.py#L1422",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.TokenClassifierOutput"
>transformers.modeling_outputs.TokenClassifierOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/main/en/model_doc/roformer#transformers.RoFormerConfig"
>RoFormerConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided)  \u2014 Classification loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, config.num_labels)</code>) \u2014 Classification scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.TokenClassifierOutput"
>transformers.modeling_outputs.TokenClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Bn=new Be({props:{$$slots:{default:[Vx]},$$scope:{ctx:M}}}),Qn=new Oe({props:{anchor:"transformers.RoFormerForTokenClassification.forward.example",$$slots:{default:[Jx]},$$scope:{ctx:M}}}),la=new Qe({}),da=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/main/en/model_doc/roformer#transformers.RoFormerConfig">RoFormerConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/roformer/modeling_roformer.py#L1486"}}),ma=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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.RoFormerForQuestionAnswering.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.RoFormerForQuestionAnswering.forward.token_type_ids",description:`<strong>token_type_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.RoFormerForQuestionAnswering.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.RoFormerForQuestionAnswering.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <em>input_ids</em> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.RoFormerForQuestionAnswering.forward.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.RoFormerForQuestionAnswering.forward.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.RoFormerForQuestionAnswering.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.RoFormerForQuestionAnswering.forward.start_positions",description:`<strong>start_positions</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for position (index) of the start of the labelled span for computing the token classification loss.
Positions are clamped to the length of the sequence (<code>sequence_length</code>). Position outside of the sequence
are not taken into account for computing the loss.`,name:"start_positions"},{anchor:"transformers.RoFormerForQuestionAnswering.forward.end_positions",description:`<strong>end_positions</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for position (index) of the end of the labelled span for computing the token classification loss.
Positions are clamped to the length of the sequence (<code>sequence_length</code>). Position outside of the sequence
are not taken into account for computing the loss.`,name:"end_positions"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/roformer/modeling_roformer.py#L1499",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.QuestionAnsweringModelOutput"
>transformers.modeling_outputs.QuestionAnsweringModelOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/main/en/model_doc/roformer#transformers.RoFormerConfig"
>RoFormerConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Total span extraction loss is the sum of a Cross-Entropy for the start and end positions.</p>
</li>
<li>
<p><strong>start_logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>) \u2014 Span-start scores (before SoftMax).</p>
</li>
<li>
<p><strong>end_logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>) \u2014 Span-end scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.QuestionAnsweringModelOutput"
>transformers.modeling_outputs.QuestionAnsweringModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Vn=new Be({props:{$$slots:{default:[Gx]},$$scope:{ctx:M}}}),Jn=new Oe({props:{anchor:"transformers.RoFormerForQuestionAnswering.forward.example",$$slots:{default:[Xx]},$$scope:{ctx:M}}}),ha=new Qe({}),ua=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/main/en/model_doc/roformer#transformers.RoFormerConfig">RoFormerConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/roformer/modeling_tf_roformer.py#L807"}}),Xn=new Be({props:{$$slots:{default:[Yx]},$$scope:{ctx:M}}}),ka=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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.TFRoFormerModel.call.attention_mask",description:`<strong>attention_mask</strong> (<code>np.ndarray</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.TFRoFormerModel.call.token_type_ids",description:`<strong>token_type_ids</strong> (<code>np.ndarray</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.TFRoFormerModel.call.head_mask",description:`<strong>head_mask</strong> (<code>np.ndarray</code> or <code>tf.Tensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.TFRoFormerModel.call.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>np.ndarray</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.TFRoFormerModel.call.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail. This argument can be used only in eager mode, in graph mode the value in the
config will be used instead.`,name:"output_attentions"},{anchor:"transformers.TFRoFormerModel.call.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail. This argument can be used only in eager mode, in graph mode the value in the config will be
used instead.`,name:"output_hidden_states"},{anchor:"transformers.TFRoFormerModel.call.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.TFRoFormerModel.call.training",description:`<strong>training</strong> (<code>bool</code>, <em>optional</em>, defaults to \`False&#x201C;) &#x2014;
Whether or not to use the model in training mode (some modules like dropout modules have different
behaviors between training and evaluation).`,name:"training"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/roformer/modeling_tf_roformer.py#L813",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_tf_outputs.TFBaseModelOutputWithPooling"
>transformers.modeling_tf_outputs.TFBaseModelOutputWithPooling</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/main/en/model_doc/roformer#transformers.RoFormerConfig"
>RoFormerConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>last_hidden_state</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>) \u2014 Sequence of hidden-states at the output of the last layer of the model.</p>
</li>
<li>
<p><strong>pooler_output</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, hidden_size)</code>) \u2014 Last layer hidden-state of the first token of the sequence (classification token) further processed by a
Linear layer and a Tanh activation function. The Linear layer weights are trained from the next sentence
prediction (classification) objective during pretraining.</p>
<p>This output is usually <em>not</em> a good summary of the semantic content of the input, you\u2019re often better with
averaging or pooling the sequence of hidden-states for the whole input sequence.</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_tf_outputs.TFBaseModelOutputWithPooling"
>transformers.modeling_tf_outputs.TFBaseModelOutputWithPooling</a> or <code>tuple(tf.Tensor)</code></p>
`}}),Yn=new Be({props:{$$slots:{default:[Zx]},$$scope:{ctx:M}}}),Zn=new Oe({props:{anchor:"transformers.TFRoFormerModel.call.example",$$slots:{default:[eE]},$$scope:{ctx:M}}}),ya=new Qe({}),Fa=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/main/en/model_doc/roformer#transformers.RoFormerConfig">RoFormerConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/roformer/modeling_tf_roformer.py#L854"}}),os=new Be({props:{$$slots:{default:[oE]},$$scope:{ctx:M}}}),$a=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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.TFRoFormerForMaskedLM.call.attention_mask",description:`<strong>attention_mask</strong> (<code>np.ndarray</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.TFRoFormerForMaskedLM.call.token_type_ids",description:`<strong>token_type_ids</strong> (<code>np.ndarray</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.TFRoFormerForMaskedLM.call.head_mask",description:`<strong>head_mask</strong> (<code>np.ndarray</code> or <code>tf.Tensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.TFRoFormerForMaskedLM.call.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>np.ndarray</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.TFRoFormerForMaskedLM.call.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail. This argument can be used only in eager mode, in graph mode the value in the
config will be used instead.`,name:"output_attentions"},{anchor:"transformers.TFRoFormerForMaskedLM.call.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail. This argument can be used only in eager mode, in graph mode the value in the config will be
used instead.`,name:"output_hidden_states"},{anchor:"transformers.TFRoFormerForMaskedLM.call.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.TFRoFormerForMaskedLM.call.training",description:`<strong>training</strong> (<code>bool</code>, <em>optional</em>, defaults to \`False&#x201C;) &#x2014;
Whether or not to use the model in training mode (some modules like dropout modules have different
behaviors between training and evaluation).`,name:"training"},{anchor:"transformers.TFRoFormerForMaskedLM.call.labels",description:`<strong>labels</strong> (<code>tf.Tensor</code> or <code>np.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Labels for computing the masked language modeling loss. Indices should be in <code>[-100, 0, ..., config.vocab_size]</code> (see <code>input_ids</code> docstring) Tokens with indices set to <code>-100</code> are ignored (masked), the
loss is only computed for the tokens with labels in <code>[0, ..., config.vocab_size]</code>`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/roformer/modeling_tf_roformer.py#L870",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_tf_outputs.TFMaskedLMOutput"
>transformers.modeling_tf_outputs.TFMaskedLMOutput</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/main/en/model_doc/roformer#transformers.RoFormerConfig"
>RoFormerConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>tf.Tensor</code> of shape <code>(n,)</code>, <em>optional</em>, where n is the number of non-masked labels, returned when <code>labels</code> is provided) \u2014 Masked language modeling (MLM) loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, config.vocab_size)</code>) \u2014 Prediction scores of the language modeling head (scores for each vocabulary token before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_tf_outputs.TFMaskedLMOutput"
>transformers.modeling_tf_outputs.TFMaskedLMOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),ts=new Be({props:{$$slots:{default:[tE]},$$scope:{ctx:M}}}),ns=new Oe({props:{anchor:"transformers.TFRoFormerForMaskedLM.call.example",$$slots:{default:[nE]},$$scope:{ctx:M}}}),ss=new Oe({props:{anchor:"transformers.TFRoFormerForMaskedLM.call.example-2",$$slots:{default:[sE]},$$scope:{ctx:M}}}),xa=new Qe({}),Ea=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/main/en/model_doc/roformer#transformers.RoFormerConfig">RoFormerConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/roformer/modeling_tf_roformer.py#L932"}}),as=new Be({props:{$$slots:{default:[rE]},$$scope:{ctx:M}}}),Ca=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/main/src/transformers/models/roformer/modeling_tf_roformer.py#L945",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_tf_outputs.TFCausalLMOutput"
>transformers.modeling_tf_outputs.TFCausalLMOutput</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/main/en/model_doc/roformer#transformers.RoFormerConfig"
>RoFormerConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>tf.Tensor</code> of shape <code>(n,)</code>, <em>optional</em>, where n is the number of non-masked labels, returned when <code>labels</code> is provided) \u2014 Language modeling loss (for next-token prediction).</p>
</li>
<li>
<p><strong>logits</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, config.vocab_size)</code>) \u2014 Prediction scores of the language modeling head (scores for each vocabulary token before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_tf_outputs.TFCausalLMOutput"
>transformers.modeling_tf_outputs.TFCausalLMOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),is=new Oe({props:{anchor:"transformers.TFRoFormerForCausalLM.call.example",$$slots:{default:[aE]},$$scope:{ctx:M}}}),qa=new Qe({}),Pa=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/main/en/model_doc/roformer#transformers.RoFormerConfig">RoFormerConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/roformer/modeling_tf_roformer.py#L1044"}}),ds=new Be({props:{$$slots:{default:[iE]},$$scope:{ctx:M}}}),Da=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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.TFRoFormerForSequenceClassification.call.attention_mask",description:`<strong>attention_mask</strong> (<code>np.ndarray</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.TFRoFormerForSequenceClassification.call.token_type_ids",description:`<strong>token_type_ids</strong> (<code>np.ndarray</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.TFRoFormerForSequenceClassification.call.head_mask",description:`<strong>head_mask</strong> (<code>np.ndarray</code> or <code>tf.Tensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.TFRoFormerForSequenceClassification.call.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>np.ndarray</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.TFRoFormerForSequenceClassification.call.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail. This argument can be used only in eager mode, in graph mode the value in the
config will be used instead.`,name:"output_attentions"},{anchor:"transformers.TFRoFormerForSequenceClassification.call.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail. This argument can be used only in eager mode, in graph mode the value in the config will be
used instead.`,name:"output_hidden_states"},{anchor:"transformers.TFRoFormerForSequenceClassification.call.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.TFRoFormerForSequenceClassification.call.training",description:`<strong>training</strong> (<code>bool</code>, <em>optional</em>, defaults to \`False&#x201C;) &#x2014;
Whether or not to use the model in training mode (some modules like dropout modules have different
behaviors between training and evaluation).`,name:"training"},{anchor:"transformers.TFRoFormerForSequenceClassification.call.labels",description:`<strong>labels</strong> (<code>tf.Tensor</code> or <code>np.ndarray</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for computing the sequence classification/regression loss. Indices should be in <code>[0, ..., config.num_labels - 1]</code>. If <code>config.num_labels == 1</code> a regression loss is computed (Mean-Square loss), If
<code>config.num_labels &gt; 1</code> a classification loss is computed (Cross-Entropy).`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/roformer/modeling_tf_roformer.py#L1053",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_tf_outputs.TFSequenceClassifierOutput"
>transformers.modeling_tf_outputs.TFSequenceClassifierOutput</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/main/en/model_doc/roformer#transformers.RoFormerConfig"
>RoFormerConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, )</code>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Classification (or regression if config.num_labels==1) loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, config.num_labels)</code>) \u2014 Classification (or regression if config.num_labels==1) scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_tf_outputs.TFSequenceClassifierOutput"
>transformers.modeling_tf_outputs.TFSequenceClassifierOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),cs=new Be({props:{$$slots:{default:[lE]},$$scope:{ctx:M}}}),ps=new Oe({props:{anchor:"transformers.TFRoFormerForSequenceClassification.call.example",$$slots:{default:[dE]},$$scope:{ctx:M}}}),ms=new Oe({props:{anchor:"transformers.TFRoFormerForSequenceClassification.call.example-2",$$slots:{default:[cE]},$$scope:{ctx:M}}}),Ia=new Qe({}),Na=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/main/en/model_doc/roformer#transformers.RoFormerConfig">RoFormerConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/roformer/modeling_tf_roformer.py#L1119"}}),us=new Be({props:{$$slots:{default:[pE]},$$scope:{ctx:M}}}),Ka=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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.TFRoFormerForMultipleChoice.call.attention_mask",description:`<strong>attention_mask</strong> (<code>np.ndarray</code> or <code>tf.Tensor</code> of shape <code>(batch_size, num_choices, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.TFRoFormerForMultipleChoice.call.token_type_ids",description:`<strong>token_type_ids</strong> (<code>np.ndarray</code> or <code>tf.Tensor</code> of shape <code>(batch_size, num_choices, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.TFRoFormerForMultipleChoice.call.head_mask",description:`<strong>head_mask</strong> (<code>np.ndarray</code> or <code>tf.Tensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.TFRoFormerForMultipleChoice.call.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>np.ndarray</code> or <code>tf.Tensor</code> of shape <code>(batch_size, num_choices, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.TFRoFormerForMultipleChoice.call.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail. This argument can be used only in eager mode, in graph mode the value in the
config will be used instead.`,name:"output_attentions"},{anchor:"transformers.TFRoFormerForMultipleChoice.call.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail. This argument can be used only in eager mode, in graph mode the value in the config will be
used instead.`,name:"output_hidden_states"},{anchor:"transformers.TFRoFormerForMultipleChoice.call.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.TFRoFormerForMultipleChoice.call.training",description:`<strong>training</strong> (<code>bool</code>, <em>optional</em>, defaults to \`False&#x201C;) &#x2014;
Whether or not to use the model in training mode (some modules like dropout modules have different
behaviors between training and evaluation).`,name:"training"},{anchor:"transformers.TFRoFormerForMultipleChoice.call.labels",description:`<strong>labels</strong> (<code>tf.Tensor</code> or <code>np.ndarray</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for computing the multiple choice classification loss. Indices should be in <code>[0, ..., num_choices]</code>
where <code>num_choices</code> is the size of the second dimension of the input tensors. (See <code>input_ids</code> above)`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/roformer/modeling_tf_roformer.py#L1140",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_tf_outputs.TFMultipleChoiceModelOutput"
>transformers.modeling_tf_outputs.TFMultipleChoiceModelOutput</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/main/en/model_doc/roformer#transformers.RoFormerConfig"
>RoFormerConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>tf.Tensor</code> of shape <em>(batch_size, )</em>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Classification loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, num_choices)</code>) \u2014 <em>num_choices</em> is the second dimension of the input tensors. (see <em>input_ids</em> above).</p>
<p>Classification scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_tf_outputs.TFMultipleChoiceModelOutput"
>transformers.modeling_tf_outputs.TFMultipleChoiceModelOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),fs=new Be({props:{$$slots:{default:[mE]},$$scope:{ctx:M}}}),gs=new Oe({props:{anchor:"transformers.TFRoFormerForMultipleChoice.call.example",$$slots:{default:[hE]},$$scope:{ctx:M}}}),Ba=new Qe({}),Qa=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/main/en/model_doc/roformer#transformers.RoFormerConfig">RoFormerConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/roformer/modeling_tf_roformer.py#L1242"}}),ks=new Be({props:{$$slots:{default:[uE]},$$scope:{ctx:M}}}),Ga=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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.TFRoFormerForTokenClassification.call.attention_mask",description:`<strong>attention_mask</strong> (<code>np.ndarray</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.TFRoFormerForTokenClassification.call.token_type_ids",description:`<strong>token_type_ids</strong> (<code>np.ndarray</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.TFRoFormerForTokenClassification.call.head_mask",description:`<strong>head_mask</strong> (<code>np.ndarray</code> or <code>tf.Tensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.TFRoFormerForTokenClassification.call.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>np.ndarray</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.TFRoFormerForTokenClassification.call.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail. This argument can be used only in eager mode, in graph mode the value in the
config will be used instead.`,name:"output_attentions"},{anchor:"transformers.TFRoFormerForTokenClassification.call.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail. This argument can be used only in eager mode, in graph mode the value in the config will be
used instead.`,name:"output_hidden_states"},{anchor:"transformers.TFRoFormerForTokenClassification.call.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.TFRoFormerForTokenClassification.call.training",description:`<strong>training</strong> (<code>bool</code>, <em>optional</em>, defaults to \`False&#x201C;) &#x2014;
Whether or not to use the model in training mode (some modules like dropout modules have different
behaviors between training and evaluation).`,name:"training"},{anchor:"transformers.TFRoFormerForTokenClassification.call.labels",description:`<strong>labels</strong> (<code>tf.Tensor</code> or <code>np.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Labels for computing the token classification loss. Indices should be in <code>[0, ..., config.num_labels - 1]</code>.`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/roformer/modeling_tf_roformer.py#L1254",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_tf_outputs.TFTokenClassifierOutput"
>transformers.modeling_tf_outputs.TFTokenClassifierOutput</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/main/en/model_doc/roformer#transformers.RoFormerConfig"
>RoFormerConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>tf.Tensor</code> of shape <code>(n,)</code>, <em>optional</em>, where n is the number of unmasked labels, returned when <code>labels</code> is provided)  \u2014 Classification loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, config.num_labels)</code>) \u2014 Classification scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_tf_outputs.TFTokenClassifierOutput"
>transformers.modeling_tf_outputs.TFTokenClassifierOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),ys=new Be({props:{$$slots:{default:[fE]},$$scope:{ctx:M}}}),Fs=new Oe({props:{anchor:"transformers.TFRoFormerForTokenClassification.call.example",$$slots:{default:[gE]},$$scope:{ctx:M}}}),bs=new Oe({props:{anchor:"transformers.TFRoFormerForTokenClassification.call.example-2",$$slots:{default:[_E]},$$scope:{ctx:M}}}),Xa=new Qe({}),Ya=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/main/en/model_doc/roformer#transformers.RoFormerConfig">RoFormerConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/roformer/modeling_tf_roformer.py#L1319"}}),ws=new Be({props:{$$slots:{default:[kE]},$$scope:{ctx:M}}}),ti=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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.TFRoFormerForQuestionAnswering.call.attention_mask",description:`<strong>attention_mask</strong> (<code>np.ndarray</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.TFRoFormerForQuestionAnswering.call.token_type_ids",description:`<strong>token_type_ids</strong> (<code>np.ndarray</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.TFRoFormerForQuestionAnswering.call.head_mask",description:`<strong>head_mask</strong> (<code>np.ndarray</code> or <code>tf.Tensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.TFRoFormerForQuestionAnswering.call.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>np.ndarray</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.TFRoFormerForQuestionAnswering.call.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail. This argument can be used only in eager mode, in graph mode the value in the
config will be used instead.`,name:"output_attentions"},{anchor:"transformers.TFRoFormerForQuestionAnswering.call.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail. This argument can be used only in eager mode, in graph mode the value in the config will be
used instead.`,name:"output_hidden_states"},{anchor:"transformers.TFRoFormerForQuestionAnswering.call.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.TFRoFormerForQuestionAnswering.call.training",description:`<strong>training</strong> (<code>bool</code>, <em>optional</em>, defaults to \`False&#x201C;) &#x2014;
Whether or not to use the model in training mode (some modules like dropout modules have different
behaviors between training and evaluation).`,name:"training"},{anchor:"transformers.TFRoFormerForQuestionAnswering.call.start_positions",description:`<strong>start_positions</strong> (<code>tf.Tensor</code> or <code>np.ndarray</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for position (index) of the start of the labelled span for computing the token classification loss.
Positions are clamped to the length of the sequence (<code>sequence_length</code>). Position outside of the sequence
are not taken into account for computing the loss.`,name:"start_positions"},{anchor:"transformers.TFRoFormerForQuestionAnswering.call.end_positions",description:`<strong>end_positions</strong> (<code>tf.Tensor</code> or <code>np.ndarray</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for position (index) of the end of the labelled span for computing the token classification loss.
Positions are clamped to the length of the sequence (<code>sequence_length</code>). Position outside of the sequence
are not taken into account for computing the loss.`,name:"end_positions"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/roformer/modeling_tf_roformer.py#L1330",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_tf_outputs.TFQuestionAnsweringModelOutput"
>transformers.modeling_tf_outputs.TFQuestionAnsweringModelOutput</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/main/en/model_doc/roformer#transformers.RoFormerConfig"
>RoFormerConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, )</code>, <em>optional</em>, returned when <code>start_positions</code> and <code>end_positions</code> are provided) \u2014 Total span extraction loss is the sum of a Cross-Entropy for the start and end positions.</p>
</li>
<li>
<p><strong>start_logits</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>) \u2014 Span-start scores (before SoftMax).</p>
</li>
<li>
<p><strong>end_logits</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>) \u2014 Span-end scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_tf_outputs.TFQuestionAnsweringModelOutput"
>transformers.modeling_tf_outputs.TFQuestionAnsweringModelOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),Ts=new Be({props:{$$slots:{default:[yE]},$$scope:{ctx:M}}}),$s=new Oe({props:{anchor:"transformers.TFRoFormerForQuestionAnswering.call.example",$$slots:{default:[FE]},$$scope:{ctx:M}}}),xs=new Oe({props:{anchor:"transformers.TFRoFormerForQuestionAnswering.call.example-2",$$slots:{default:[bE]},$$scope:{ctx:M}}}),ni=new Qe({}),si=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/main/en/model_doc/roformer#transformers.RoFormerConfig">RoFormerConfig</a>) &#x2014; Model configuration class with all the parameters of the
model. Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/main/en/main_classes/model#transformers.FlaxPreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"},{anchor:"transformers.FlaxRoFormerModel.dtype",description:`<strong>dtype</strong> (<code>jax.numpy.dtype</code>, <em>optional</em>, defaults to <code>jax.numpy.float32</code>) &#x2014;
The data type of the computation. Can be one of <code>jax.numpy.float32</code>, <code>jax.numpy.float16</code> (on GPUs) and
<code>jax.numpy.bfloat16</code> (on TPUs).</p>
<p>This can be used to enable mixed-precision training or half-precision inference on GPUs or TPUs. If
specified all the computation will be performed with the given <code>dtype</code>.</p>
<p><strong>Note that this only specifies the dtype of the computation and does not influence the dtype of model
parameters.</strong></p>
<p>If you wish to change the dtype of the model parameters, see <a href="/docs/transformers/main/en/main_classes/model#transformers.FlaxPreTrainedModel.to_fp16">to_fp16()</a> and
<a href="/docs/transformers/main/en/main_classes/model#transformers.FlaxPreTrainedModel.to_bf16">to_bf16()</a>.`,name:"dtype"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/roformer/modeling_flax_roformer.py#L748"}}),mi=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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.FlaxRoFormerModel.__call__.attention_mask",description:`<strong>attention_mask</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.FlaxRoFormerModel.__call__.token_type_ids",description:`<strong>token_type_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.FlaxRoFormerModel.__call__.position_ids",description:`<strong>position_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.`,name:"position_ids"},{anchor:"transformers.FlaxRoFormerModel.__call__.head_mask",description:`<strong>head_mask</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <code>optional) -- Mask to nullify selected heads of the attention modules. Mask values selected in </code>[0, 1]\`:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.FlaxRoFormerModel.__call__.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/roformer/modeling_flax_roformer.py#L654",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_flax_outputs.FlaxBaseModelOutput"
>transformers.modeling_flax_outputs.FlaxBaseModelOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/main/en/model_doc/roformer#transformers.RoFormerConfig"
>RoFormerConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>last_hidden_state</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>) \u2014 Sequence of hidden-states at the output of the last layer of the model.</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_flax_outputs.FlaxBaseModelOutput"
>transformers.modeling_flax_outputs.FlaxBaseModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Ms=new Be({props:{$$slots:{default:[vE]},$$scope:{ctx:M}}}),Rs=new Oe({props:{anchor:"transformers.FlaxRoFormerModel.__call__.example",$$slots:{default:[wE]},$$scope:{ctx:M}}}),hi=new Qe({}),ui=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/main/en/model_doc/roformer#transformers.RoFormerConfig">RoFormerConfig</a>) &#x2014; Model configuration class with all the parameters of the
model. Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/main/en/main_classes/model#transformers.FlaxPreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"},{anchor:"transformers.FlaxRoFormerForMaskedLM.dtype",description:`<strong>dtype</strong> (<code>jax.numpy.dtype</code>, <em>optional</em>, defaults to <code>jax.numpy.float32</code>) &#x2014;
The data type of the computation. Can be one of <code>jax.numpy.float32</code>, <code>jax.numpy.float16</code> (on GPUs) and
<code>jax.numpy.bfloat16</code> (on TPUs).</p>
<p>This can be used to enable mixed-precision training or half-precision inference on GPUs or TPUs. If
specified all the computation will be performed with the given <code>dtype</code>.</p>
<p><strong>Note that this only specifies the dtype of the computation and does not influence the dtype of model
parameters.</strong></p>
<p>If you wish to change the dtype of the model parameters, see <a href="/docs/transformers/main/en/main_classes/model#transformers.FlaxPreTrainedModel.to_fp16">to_fp16()</a> and
<a href="/docs/transformers/main/en/main_classes/model#transformers.FlaxPreTrainedModel.to_bf16">to_bf16()</a>.`,name:"dtype"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/roformer/modeling_flax_roformer.py#L806"}}),wi=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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.FlaxRoFormerForMaskedLM.__call__.attention_mask",description:`<strong>attention_mask</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.FlaxRoFormerForMaskedLM.__call__.token_type_ids",description:`<strong>token_type_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.FlaxRoFormerForMaskedLM.__call__.position_ids",description:`<strong>position_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.`,name:"position_ids"},{anchor:"transformers.FlaxRoFormerForMaskedLM.__call__.head_mask",description:`<strong>head_mask</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <code>optional) -- Mask to nullify selected heads of the attention modules. Mask values selected in </code>[0, 1]\`:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.FlaxRoFormerForMaskedLM.__call__.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/roformer/modeling_flax_roformer.py#L654",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_flax_outputs.FlaxMaskedLMOutput"
>transformers.modeling_flax_outputs.FlaxMaskedLMOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/main/en/model_doc/roformer#transformers.RoFormerConfig"
>RoFormerConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>logits</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, sequence_length, config.vocab_size)</code>) \u2014 Prediction scores of the language modeling head (scores for each vocabulary token before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_flax_outputs.FlaxMaskedLMOutput"
>transformers.modeling_flax_outputs.FlaxMaskedLMOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),js=new Be({props:{$$slots:{default:[TE]},$$scope:{ctx:M}}}),Cs=new Oe({props:{anchor:"transformers.FlaxRoFormerForMaskedLM.__call__.example",$$slots:{default:[$E]},$$scope:{ctx:M}}}),Ti=new Qe({}),$i=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/main/en/model_doc/roformer#transformers.RoFormerConfig">RoFormerConfig</a>) &#x2014; Model configuration class with all the parameters of the
model. Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/main/en/main_classes/model#transformers.FlaxPreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"},{anchor:"transformers.FlaxRoFormerForSequenceClassification.dtype",description:`<strong>dtype</strong> (<code>jax.numpy.dtype</code>, <em>optional</em>, defaults to <code>jax.numpy.float32</code>) &#x2014;
The data type of the computation. Can be one of <code>jax.numpy.float32</code>, <code>jax.numpy.float16</code> (on GPUs) and
<code>jax.numpy.bfloat16</code> (on TPUs).</p>
<p>This can be used to enable mixed-precision training or half-precision inference on GPUs or TPUs. If
specified all the computation will be performed with the given <code>dtype</code>.</p>
<p><strong>Note that this only specifies the dtype of the computation and does not influence the dtype of model
parameters.</strong></p>
<p>If you wish to change the dtype of the model parameters, see <a href="/docs/transformers/main/en/main_classes/model#transformers.FlaxPreTrainedModel.to_fp16">to_fp16()</a> and
<a href="/docs/transformers/main/en/main_classes/model#transformers.FlaxPreTrainedModel.to_bf16">to_bf16()</a>.`,name:"dtype"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/roformer/modeling_flax_roformer.py#L870"}}),qi=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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.FlaxRoFormerForSequenceClassification.__call__.attention_mask",description:`<strong>attention_mask</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.FlaxRoFormerForSequenceClassification.__call__.token_type_ids",description:`<strong>token_type_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.FlaxRoFormerForSequenceClassification.__call__.position_ids",description:`<strong>position_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.`,name:"position_ids"},{anchor:"transformers.FlaxRoFormerForSequenceClassification.__call__.head_mask",description:`<strong>head_mask</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <code>optional) -- Mask to nullify selected heads of the attention modules. Mask values selected in </code>[0, 1]\`:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.FlaxRoFormerForSequenceClassification.__call__.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/roformer/modeling_flax_roformer.py#L654",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_flax_outputs.FlaxSequenceClassifierOutput"
>transformers.modeling_flax_outputs.FlaxSequenceClassifierOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/main/en/model_doc/roformer#transformers.RoFormerConfig"
>RoFormerConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>logits</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, config.num_labels)</code>) \u2014 Classification (or regression if config.num_labels==1) scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_flax_outputs.FlaxSequenceClassifierOutput"
>transformers.modeling_flax_outputs.FlaxSequenceClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Ps=new Be({props:{$$slots:{default:[xE]},$$scope:{ctx:M}}}),As=new Oe({props:{anchor:"transformers.FlaxRoFormerForSequenceClassification.__call__.example",$$slots:{default:[EE]},$$scope:{ctx:M}}}),Pi=new Qe({}),Ai=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/main/en/model_doc/roformer#transformers.RoFormerConfig">RoFormerConfig</a>) &#x2014; Model configuration class with all the parameters of the
model. Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/main/en/main_classes/model#transformers.FlaxPreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"},{anchor:"transformers.FlaxRoFormerForMultipleChoice.dtype",description:`<strong>dtype</strong> (<code>jax.numpy.dtype</code>, <em>optional</em>, defaults to <code>jax.numpy.float32</code>) &#x2014;
The data type of the computation. Can be one of <code>jax.numpy.float32</code>, <code>jax.numpy.float16</code> (on GPUs) and
<code>jax.numpy.bfloat16</code> (on TPUs).</p>
<p>This can be used to enable mixed-precision training or half-precision inference on GPUs or TPUs. If
specified all the computation will be performed with the given <code>dtype</code>.</p>
<p><strong>Note that this only specifies the dtype of the computation and does not influence the dtype of model
parameters.</strong></p>
<p>If you wish to change the dtype of the model parameters, see <a href="/docs/transformers/main/en/main_classes/model#transformers.FlaxPreTrainedModel.to_fp16">to_fp16()</a> and
<a href="/docs/transformers/main/en/main_classes/model#transformers.FlaxPreTrainedModel.to_bf16">to_bf16()</a>.`,name:"dtype"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/roformer/modeling_flax_roformer.py#L945"}}),Ui=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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.FlaxRoFormerForMultipleChoice.__call__.attention_mask",description:`<strong>attention_mask</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, num_choices, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.FlaxRoFormerForMultipleChoice.__call__.token_type_ids",description:`<strong>token_type_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, num_choices, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.FlaxRoFormerForMultipleChoice.__call__.position_ids",description:`<strong>position_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, num_choices, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.`,name:"position_ids"},{anchor:"transformers.FlaxRoFormerForMultipleChoice.__call__.head_mask",description:`<strong>head_mask</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, num_choices, sequence_length)</code>, <code>optional) -- Mask to nullify selected heads of the attention modules. Mask values selected in </code>[0, 1]\`:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.FlaxRoFormerForMultipleChoice.__call__.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/roformer/modeling_flax_roformer.py#L654",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_flax_outputs.FlaxMultipleChoiceModelOutput"
>transformers.modeling_flax_outputs.FlaxMultipleChoiceModelOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/main/en/model_doc/roformer#transformers.RoFormerConfig"
>RoFormerConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>logits</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, num_choices)</code>) \u2014 <em>num_choices</em> is the second dimension of the input tensors. (see <em>input_ids</em> above).</p>
<p>Classification scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_flax_outputs.FlaxMultipleChoiceModelOutput"
>transformers.modeling_flax_outputs.FlaxMultipleChoiceModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Os=new Be({props:{$$slots:{default:[ME]},$$scope:{ctx:M}}}),Ds=new Oe({props:{anchor:"transformers.FlaxRoFormerForMultipleChoice.__call__.example",$$slots:{default:[RE]},$$scope:{ctx:M}}}),Ki=new Qe({}),Bi=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/main/en/model_doc/roformer#transformers.RoFormerConfig">RoFormerConfig</a>) &#x2014; Model configuration class with all the parameters of the
model. Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/main/en/main_classes/model#transformers.FlaxPreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"},{anchor:"transformers.FlaxRoFormerForTokenClassification.dtype",description:`<strong>dtype</strong> (<code>jax.numpy.dtype</code>, <em>optional</em>, defaults to <code>jax.numpy.float32</code>) &#x2014;
The data type of the computation. Can be one of <code>jax.numpy.float32</code>, <code>jax.numpy.float16</code> (on GPUs) and
<code>jax.numpy.bfloat16</code> (on TPUs).</p>
<p>This can be used to enable mixed-precision training or half-precision inference on GPUs or TPUs. If
specified all the computation will be performed with the given <code>dtype</code>.</p>
<p><strong>Note that this only specifies the dtype of the computation and does not influence the dtype of model
parameters.</strong></p>
<p>If you wish to change the dtype of the model parameters, see <a href="/docs/transformers/main/en/main_classes/model#transformers.FlaxPreTrainedModel.to_fp16">to_fp16()</a> and
<a href="/docs/transformers/main/en/main_classes/model#transformers.FlaxPreTrainedModel.to_bf16">to_bf16()</a>.`,name:"dtype"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/roformer/modeling_flax_roformer.py#L1013"}}),Zi=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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.FlaxRoFormerForTokenClassification.__call__.attention_mask",description:`<strong>attention_mask</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.FlaxRoFormerForTokenClassification.__call__.token_type_ids",description:`<strong>token_type_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.FlaxRoFormerForTokenClassification.__call__.position_ids",description:`<strong>position_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.`,name:"position_ids"},{anchor:"transformers.FlaxRoFormerForTokenClassification.__call__.head_mask",description:`<strong>head_mask</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <code>optional) -- Mask to nullify selected heads of the attention modules. Mask values selected in </code>[0, 1]\`:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.FlaxRoFormerForTokenClassification.__call__.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/roformer/modeling_flax_roformer.py#L654",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_flax_outputs.FlaxTokenClassifierOutput"
>transformers.modeling_flax_outputs.FlaxTokenClassifierOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/main/en/model_doc/roformer#transformers.RoFormerConfig"
>RoFormerConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>logits</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, sequence_length, config.num_labels)</code>) \u2014 Classification scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_flax_outputs.FlaxTokenClassifierOutput"
>transformers.modeling_flax_outputs.FlaxTokenClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Ns=new Be({props:{$$slots:{default:[zE]},$$scope:{ctx:M}}}),Ss=new Oe({props:{anchor:"transformers.FlaxRoFormerForTokenClassification.__call__.example",$$slots:{default:[jE]},$$scope:{ctx:M}}}),el=new Qe({}),ol=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/main/en/model_doc/roformer#transformers.RoFormerConfig">RoFormerConfig</a>) &#x2014; Model configuration class with all the parameters of the
model. Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/main/en/main_classes/model#transformers.FlaxPreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"},{anchor:"transformers.FlaxRoFormerForQuestionAnswering.dtype",description:`<strong>dtype</strong> (<code>jax.numpy.dtype</code>, <em>optional</em>, defaults to <code>jax.numpy.float32</code>) &#x2014;
The data type of the computation. Can be one of <code>jax.numpy.float32</code>, <code>jax.numpy.float16</code> (on GPUs) and
<code>jax.numpy.bfloat16</code> (on TPUs).</p>
<p>This can be used to enable mixed-precision training or half-precision inference on GPUs or TPUs. If
specified all the computation will be performed with the given <code>dtype</code>.</p>
<p><strong>Note that this only specifies the dtype of the computation and does not influence the dtype of model
parameters.</strong></p>
<p>If you wish to change the dtype of the model parameters, see <a href="/docs/transformers/main/en/main_classes/model#transformers.FlaxPreTrainedModel.to_fp16">to_fp16()</a> and
<a href="/docs/transformers/main/en/main_classes/model#transformers.FlaxPreTrainedModel.to_bf16">to_bf16()</a>.`,name:"dtype"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/roformer/modeling_flax_roformer.py#L1081"}}),dl=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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.FlaxRoFormerForQuestionAnswering.__call__.attention_mask",description:`<strong>attention_mask</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.FlaxRoFormerForQuestionAnswering.__call__.token_type_ids",description:`<strong>token_type_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.FlaxRoFormerForQuestionAnswering.__call__.position_ids",description:`<strong>position_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.`,name:"position_ids"},{anchor:"transformers.FlaxRoFormerForQuestionAnswering.__call__.head_mask",description:`<strong>head_mask</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <code>optional) -- Mask to nullify selected heads of the attention modules. Mask values selected in </code>[0, 1]\`:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.FlaxRoFormerForQuestionAnswering.__call__.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/roformer/modeling_flax_roformer.py#L654",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_flax_outputs.FlaxQuestionAnsweringModelOutput"
>transformers.modeling_flax_outputs.FlaxQuestionAnsweringModelOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/main/en/model_doc/roformer#transformers.RoFormerConfig"
>RoFormerConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>start_logits</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, sequence_length)</code>) \u2014 Span-start scores (before SoftMax).</p>
</li>
<li>
<p><strong>end_logits</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, sequence_length)</code>) \u2014 Span-end scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_flax_outputs.FlaxQuestionAnsweringModelOutput"
>transformers.modeling_flax_outputs.FlaxQuestionAnsweringModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Us=new Be({props:{$$slots:{default:[CE]},$$scope:{ctx:M}}}),Ks=new Oe({props:{anchor:"transformers.FlaxRoFormerForQuestionAnswering.__call__.example",$$slots:{default:[qE]},$$scope:{ctx:M}}}),{c(){d=r("meta"),k=p(),h=r("h1"),u=r("a"),_=r("span"),b(l.$$.fragment),c=p(),z=r("span"),be=t("RoFormer"),he=p(),I=r("h2"),ae=r("a"),ee=r("span"),b(E.$$.fragment),ve=p(),Q=r("span"),we=t("Overview"),ue=p(),N=r("p"),Te=t("The RoFormer model was proposed in "),ie=r("a"),V=t("RoFormer: Enhanced Transformer with Rotary Position Embedding"),$e=t(" by Jianlin Su and Yu Lu and Shengfeng Pan and Bo Wen and Yunfeng Liu."),fe=p(),W=r("p"),xe=t("The abstract from the paper is the following:"),ge=p(),U=r("p"),ce=r("em"),Ee=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=r("p"),A=t("Tips:"),_e=p(),K=r("ul"),pe=r("li"),Me=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(),ne=r("p"),Re=t("This model was contributed by "),q=r("a"),ze=t("junnyu"),J=t(". The original code can be found "),le=r("a"),je=t("here"),G=t("."),ke=p(),re=r("h2"),O=r("a"),me=r("span"),b(S.$$.fragment),Ce=p(),oe=r("span"),L=t("RoFormerConfig"),ye=p(),P=r("div"),b(de.$$.fragment),qe=p(),F=r("p"),R=t("This is the configuration class to store the configuration of a "),Se=r("a"),se=t("RoFormerModel"),He=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
`),Ne=r("a"),j=t("junnyu/roformer_chinese_base"),Ve=t(" architecture."),Je=p(),Pe=r("p"),Ge=t("Configuration objects inherit from "),We=r("a"),D=t("PretrainedConfig"),X=t(` and can be used to control the model outputs. Read the
documentation from `),Ue=r("a"),Xe=t("PretrainedConfig"),Y=t(" for more information."),Ye=p(),b(Le.$$.fragment),Fe=p(),Ae=r("h2"),Z=r("a"),Ke=r("span"),b(fr.$$.fragment),Wu=p(),jd=r("span"),Uu=t("RoFormerTokenizer"),Hm=p(),Ze=r("div"),b(gr.$$.fragment),Ku=p(),_r=r("p"),Bu=t("Construct a RoFormer tokenizer. Based on "),kr=r("a"),Qu=t("Rust Jieba"),Hu=t("."),Vu=p(),yr=r("p"),Ju=t("This tokenizer inherits from "),Fl=r("a"),Gu=t("PreTrainedTokenizer"),Xu=t(` which contains most of the main methods. Users should refer to
this superclass for more information regarding those methods.`),Yu=p(),b(vn.$$.fragment),Zu=p(),ft=r("div"),b(Fr.$$.fragment),ef=p(),Cd=r("p"),of=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:`),tf=p(),br=r("ul"),bl=r("li"),nf=t("single sequence: "),qd=r("code"),sf=t("[CLS] X [SEP]"),rf=p(),vl=r("li"),af=t("pair of sequences: "),Pd=r("code"),lf=t("[CLS] A [SEP] B [SEP]"),df=p(),wn=r("div"),b(vr.$$.fragment),cf=p(),wr=r("p"),pf=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 `),Ad=r("code"),mf=t("prepare_for_model"),hf=t(" method."),uf=p(),Ao=r("div"),b(Tr.$$.fragment),ff=p(),Ld=r("p"),gf=t("Create a mask from the two sequences passed to be used in a sequence-pair classification task. A RoFormer"),_f=p(),b(Tn.$$.fragment),kf=p(),Tt=r("p"),yf=t("If "),Od=r("code"),Ff=t("token_ids_1"),bf=t(" is "),Dd=r("code"),vf=t("None"),wf=t(", this method only returns the first portion of the mask (0s)."),Tf=p(),wl=r("div"),b($r.$$.fragment),Vm=p(),$t=r("h2"),$n=r("a"),Id=r("span"),b(xr.$$.fragment),$f=p(),Nd=r("span"),xf=t("RoFormerTokenizerFast"),Jm=p(),io=r("div"),b(Er.$$.fragment),Ef=p(),Mr=r("p"),Mf=t("Construct a \u201Cfast\u201D RoFormer tokenizer (backed by HuggingFace\u2019s "),Sd=r("em"),Rf=t("tokenizers"),zf=t(" library)."),jf=p(),xn=r("p"),Tl=r("a"),Cf=t("RoFormerTokenizerFast"),qf=t(" is almost identical to "),$l=r("a"),Pf=t("BertTokenizerFast"),Af=t(` and runs end-to-end tokenization:
punctuation splitting and wordpiece. There are some difference between them when tokenizing Chinese.`),Lf=p(),Rr=r("p"),Of=t("This tokenizer inherits from "),xl=r("a"),Df=t("PreTrainedTokenizerFast"),If=t(` which contains most of the main methods. Users should
refer to this superclass for more information regarding those methods.`),Nf=p(),b(En.$$.fragment),Sf=p(),gt=r("div"),b(zr.$$.fragment),Wf=p(),Wd=r("p"),Uf=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:`),Kf=p(),jr=r("ul"),El=r("li"),Bf=t("single sequence: "),Ud=r("code"),Qf=t("[CLS] X [SEP]"),Hf=p(),Ml=r("li"),Vf=t("pair of sequences: "),Kd=r("code"),Jf=t("[CLS] A [SEP] B [SEP]"),Gm=p(),xt=r("h2"),Mn=r("a"),Bd=r("span"),b(Cr.$$.fragment),Gf=p(),Qd=r("span"),Xf=t("RoFormerModel"),Xm=p(),_o=r("div"),b(qr.$$.fragment),Yf=p(),Pr=r("p"),Zf=t(`The bare RoFormer Model transformer outputting raw hidden-states without any specific head on top.
This model is a PyTorch `),Ar=r("a"),eg=t("torch.nn.Module"),og=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.`),tg=p(),Lr=r("p"),ng=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 `),Or=r("a"),sg=t(`Attention is
all you need`),rg=t(` by Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit,
Llion Jones, Aidan N. Gomez, Lukasz Kaiser and Illia Polosukhin.`),ag=p(),lo=r("p"),ig=t("To behave as an decoder the model needs to be initialized with the "),Hd=r("code"),lg=t("is_decoder"),dg=t(` argument of the configuration set
to `),Vd=r("code"),cg=t("True"),pg=t(". To be used in a Seq2Seq model, the model needs to initialized with both "),Jd=r("code"),mg=t("is_decoder"),hg=t(` argument and
`),Gd=r("code"),ug=t("add_cross_attention"),fg=t(" set to "),Xd=r("code"),gg=t("True"),_g=t("; an "),Yd=r("code"),kg=t("encoder_hidden_states"),yg=t(" is then expected as an input to the forward pass."),Fg=p(),Lo=r("div"),b(Dr.$$.fragment),bg=p(),Et=r("p"),vg=t("The "),Rl=r("a"),wg=t("RoFormerModel"),Tg=t(" forward method, overrides the "),Zd=r("code"),$g=t("__call__"),xg=t(" special method."),Eg=p(),b(Rn.$$.fragment),Mg=p(),b(zn.$$.fragment),Ym=p(),Mt=r("h2"),jn=r("a"),ec=r("span"),b(Ir.$$.fragment),Rg=p(),oc=r("span"),zg=t("RoFormerForCausalLM"),Zm=p(),rt=r("div"),b(Nr.$$.fragment),jg=p(),Rt=r("p"),Cg=t("RoFormer Model with a "),tc=r("code"),qg=t("language modeling"),Pg=t(` head on top for CLM fine-tuning.
This model is a PyTorch `),Sr=r("a"),Ag=t("torch.nn.Module"),Lg=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.`),Og=p(),Oo=r("div"),b(Wr.$$.fragment),Dg=p(),zt=r("p"),Ig=t("The "),zl=r("a"),Ng=t("RoFormerForCausalLM"),Sg=t(" forward method, overrides the "),nc=r("code"),Wg=t("__call__"),Ug=t(" special method."),Kg=p(),b(Cn.$$.fragment),Bg=p(),b(qn.$$.fragment),eh=p(),jt=r("h2"),Pn=r("a"),sc=r("span"),b(Ur.$$.fragment),Qg=p(),rc=r("span"),Hg=t("RoFormerForMaskedLM"),oh=p(),at=r("div"),b(Kr.$$.fragment),Vg=p(),Ct=r("p"),Jg=t("RoFormer Model with a "),ac=r("code"),Gg=t("language modeling"),Xg=t(` head on top.
This model is a PyTorch `),Br=r("a"),Yg=t("torch.nn.Module"),Zg=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.`),e_=p(),Do=r("div"),b(Qr.$$.fragment),o_=p(),qt=r("p"),t_=t("The "),jl=r("a"),n_=t("RoFormerForMaskedLM"),s_=t(" forward method, overrides the "),ic=r("code"),r_=t("__call__"),a_=t(" special method."),i_=p(),b(An.$$.fragment),l_=p(),b(Ln.$$.fragment),th=p(),Pt=r("h2"),On=r("a"),lc=r("span"),b(Hr.$$.fragment),d_=p(),dc=r("span"),c_=t("RoFormerForSequenceClassification"),nh=p(),jo=r("div"),b(Vr.$$.fragment),p_=p(),cc=r("p"),m_=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.`),h_=p(),Jr=r("p"),u_=t("This model is a PyTorch "),Gr=r("a"),f_=t("torch.nn.Module"),g_=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.`),__=p(),yo=r("div"),b(Xr.$$.fragment),k_=p(),At=r("p"),y_=t("The "),Cl=r("a"),F_=t("RoFormerForSequenceClassification"),b_=t(" forward method, overrides the "),pc=r("code"),v_=t("__call__"),w_=t(" special method."),T_=p(),b(Dn.$$.fragment),$_=p(),b(In.$$.fragment),x_=p(),b(Nn.$$.fragment),sh=p(),Lt=r("h2"),Sn=r("a"),mc=r("span"),b(Yr.$$.fragment),E_=p(),hc=r("span"),M_=t("RoFormerForMultipleChoice"),rh=p(),Co=r("div"),b(Zr.$$.fragment),R_=p(),uc=r("p"),z_=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.`),j_=p(),ea=r("p"),C_=t("This model is a PyTorch "),oa=r("a"),q_=t("torch.nn.Module"),P_=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.`),A_=p(),Io=r("div"),b(ta.$$.fragment),L_=p(),Ot=r("p"),O_=t("The "),ql=r("a"),D_=t("RoFormerForMultipleChoice"),I_=t(" forward method, overrides the "),fc=r("code"),N_=t("__call__"),S_=t(" special method."),W_=p(),b(Wn.$$.fragment),U_=p(),b(Un.$$.fragment),ah=p(),Dt=r("h2"),Kn=r("a"),gc=r("span"),b(na.$$.fragment),K_=p(),_c=r("span"),B_=t("RoFormerForTokenClassification"),ih=p(),qo=r("div"),b(sa.$$.fragment),Q_=p(),kc=r("p"),H_=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.`),V_=p(),ra=r("p"),J_=t("This model is a PyTorch "),aa=r("a"),G_=t("torch.nn.Module"),X_=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.`),Y_=p(),No=r("div"),b(ia.$$.fragment),Z_=p(),It=r("p"),ek=t("The "),Pl=r("a"),ok=t("RoFormerForTokenClassification"),tk=t(" forward method, overrides the "),yc=r("code"),nk=t("__call__"),sk=t(" special method."),rk=p(),b(Bn.$$.fragment),ak=p(),b(Qn.$$.fragment),lh=p(),Nt=r("h2"),Hn=r("a"),Fc=r("span"),b(la.$$.fragment),ik=p(),bc=r("span"),lk=t("RoFormerForQuestionAnswering"),dh=p(),Po=r("div"),b(da.$$.fragment),dk=p(),St=r("p"),ck=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 `),vc=r("code"),pk=t("span start logits"),mk=t(" and "),wc=r("code"),hk=t("span end logits"),uk=t(")."),fk=p(),ca=r("p"),gk=t("This model is a PyTorch "),pa=r("a"),_k=t("torch.nn.Module"),kk=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=r("div"),b(ma.$$.fragment),Fk=p(),Wt=r("p"),bk=t("The "),Al=r("a"),vk=t("RoFormerForQuestionAnswering"),wk=t(" forward method, overrides the "),Tc=r("code"),Tk=t("__call__"),$k=t(" special method."),xk=p(),b(Vn.$$.fragment),Ek=p(),b(Jn.$$.fragment),ch=p(),Ut=r("h2"),Gn=r("a"),$c=r("span"),b(ha.$$.fragment),Mk=p(),xc=r("span"),Rk=t("TFRoFormerModel"),ph=p(),co=r("div"),b(ua.$$.fragment),zk=p(),Ec=r("p"),jk=t("The bare RoFormer Model transformer outputing raw hidden-states without any specific head on top."),Ck=p(),fa=r("p"),qk=t("This model inherits from "),Ll=r("a"),Pk=t("TFPreTrainedModel"),Ak=t(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),Lk=p(),ga=r("p"),Ok=t("This model is also a "),_a=r("a"),Dk=t("tf.keras.Model"),Ik=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.`),Nk=p(),b(Xn.$$.fragment),Sk=p(),Wo=r("div"),b(ka.$$.fragment),Wk=p(),Kt=r("p"),Uk=t("The "),Ol=r("a"),Kk=t("TFRoFormerModel"),Bk=t(" forward method, overrides the "),Mc=r("code"),Qk=t("__call__"),Hk=t(" special method."),Vk=p(),b(Yn.$$.fragment),Jk=p(),b(Zn.$$.fragment),mh=p(),Bt=r("h2"),es=r("a"),Rc=r("span"),b(ya.$$.fragment),Gk=p(),zc=r("span"),Xk=t("TFRoFormerForMaskedLM"),hh=p(),po=r("div"),b(Fa.$$.fragment),Yk=p(),ba=r("p"),Zk=t("RoFormer Model with a "),jc=r("code"),ey=t("language modeling"),oy=t(" head on top."),ty=p(),va=r("p"),ny=t("This model inherits from "),Dl=r("a"),sy=t("TFPreTrainedModel"),ry=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.)`),ay=p(),wa=r("p"),iy=t("This model is also a "),Ta=r("a"),ly=t("tf.keras.Model"),dy=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.`),cy=p(),b(os.$$.fragment),py=p(),Fo=r("div"),b($a.$$.fragment),my=p(),Qt=r("p"),hy=t("The "),Il=r("a"),uy=t("TFRoFormerForMaskedLM"),fy=t(" forward method, overrides the "),Cc=r("code"),gy=t("__call__"),_y=t(" special method."),ky=p(),b(ts.$$.fragment),yy=p(),b(ns.$$.fragment),Fy=p(),b(ss.$$.fragment),uh=p(),Ht=r("h2"),rs=r("a"),qc=r("span"),b(xa.$$.fragment),by=p(),Pc=r("span"),vy=t("TFRoFormerForCausalLM"),fh=p(),mo=r("div"),b(Ea.$$.fragment),wy=p(),Ma=r("p"),Ty=t("RoFormer Model with a "),Ac=r("code"),$y=t("language modeling"),xy=t(" head on top for CLM fine-tuning."),Ey=p(),Ra=r("p"),My=t("This model inherits from "),Nl=r("a"),Ry=t("TFPreTrainedModel"),zy=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.)`),jy=p(),za=r("p"),Cy=t("This model is also a "),ja=r("a"),qy=t("tf.keras.Model"),Py=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.`),Ay=p(),b(as.$$.fragment),Ly=p(),_t=r("div"),b(Ca.$$.fragment),Oy=p(),ko=r("p"),Dy=t("labels ("),Lc=r("code"),Iy=t("tf.Tensor"),Ny=t(" or "),Oc=r("code"),Sy=t("np.ndarray"),Wy=t(" of shape "),Dc=r("code"),Uy=t("(batch_size, sequence_length)"),Ky=t(", "),Ic=r("em"),By=t("optional"),Qy=t(`):
Labels for computing the cross entropy classification loss. Indices should be in `),Nc=r("code"),Hy=t("[0, ..., config.vocab_size - 1]"),Vy=t("."),Jy=p(),b(is.$$.fragment),gh=p(),Vt=r("h2"),ls=r("a"),Sc=r("span"),b(qa.$$.fragment),Gy=p(),Wc=r("span"),Xy=t("TFRoFormerForSequenceClassification"),_h=p(),ho=r("div"),b(Pa.$$.fragment),Yy=p(),Uc=r("p"),Zy=t("RoFormer Model transformer with a sequence classification/regression head on top e.g., for GLUE tasks."),eF=p(),Aa=r("p"),oF=t("This model inherits from "),Sl=r("a"),tF=t("TFPreTrainedModel"),nF=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.)`),sF=p(),La=r("p"),rF=t("This model is also a "),Oa=r("a"),aF=t("tf.keras.Model"),iF=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.`),lF=p(),b(ds.$$.fragment),dF=p(),bo=r("div"),b(Da.$$.fragment),cF=p(),Jt=r("p"),pF=t("The "),Wl=r("a"),mF=t("TFRoFormerForSequenceClassification"),hF=t(" forward method, overrides the "),Kc=r("code"),uF=t("__call__"),fF=t(" special method."),gF=p(),b(cs.$$.fragment),_F=p(),b(ps.$$.fragment),kF=p(),b(ms.$$.fragment),kh=p(),Gt=r("h2"),hs=r("a"),Bc=r("span"),b(Ia.$$.fragment),yF=p(),Qc=r("span"),FF=t("TFRoFormerForMultipleChoice"),yh=p(),uo=r("div"),b(Na.$$.fragment),bF=p(),Hc=r("p"),vF=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.`),wF=p(),Sa=r("p"),TF=t("This model inherits from "),Ul=r("a"),$F=t("TFPreTrainedModel"),xF=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.)`),EF=p(),Wa=r("p"),MF=t("This model is also a "),Ua=r("a"),RF=t("tf.keras.Model"),zF=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.`),jF=p(),b(us.$$.fragment),CF=p(),Uo=r("div"),b(Ka.$$.fragment),qF=p(),Xt=r("p"),PF=t("The "),Kl=r("a"),AF=t("TFRoFormerForMultipleChoice"),LF=t(" forward method, overrides the "),Vc=r("code"),OF=t("__call__"),DF=t(" special method."),IF=p(),b(fs.$$.fragment),NF=p(),b(gs.$$.fragment),Fh=p(),Yt=r("h2"),_s=r("a"),Jc=r("span"),b(Ba.$$.fragment),SF=p(),Gc=r("span"),WF=t("TFRoFormerForTokenClassification"),bh=p(),fo=r("div"),b(Qa.$$.fragment),UF=p(),Xc=r("p"),KF=t(`RoFormer Model with a token classification head on top (a linear layer on top of the hidden-states output) e.g. for
Named-Entity-Recognition (NER) tasks.`),BF=p(),Ha=r("p"),QF=t("This model inherits from "),Bl=r("a"),HF=t("TFPreTrainedModel"),VF=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.)`),JF=p(),Va=r("p"),GF=t("This model is also a "),Ja=r("a"),XF=t("tf.keras.Model"),YF=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.`),ZF=p(),b(ks.$$.fragment),eb=p(),vo=r("div"),b(Ga.$$.fragment),ob=p(),Zt=r("p"),tb=t("The "),Ql=r("a"),nb=t("TFRoFormerForTokenClassification"),sb=t(" forward method, overrides the "),Yc=r("code"),rb=t("__call__"),ab=t(" special method."),ib=p(),b(ys.$$.fragment),lb=p(),b(Fs.$$.fragment),db=p(),b(bs.$$.fragment),vh=p(),en=r("h2"),vs=r("a"),Zc=r("span"),b(Xa.$$.fragment),cb=p(),ep=r("span"),pb=t("TFRoFormerForQuestionAnswering"),wh=p(),go=r("div"),b(Ya.$$.fragment),mb=p(),on=r("p"),hb=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 `),op=r("code"),ub=t("span start logits"),fb=t(" and "),tp=r("code"),gb=t("span end logits"),_b=t(")."),kb=p(),Za=r("p"),yb=t("This model inherits from "),Hl=r("a"),Fb=t("TFPreTrainedModel"),bb=t(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),vb=p(),ei=r("p"),wb=t("This model is also a "),oi=r("a"),Tb=t("tf.keras.Model"),$b=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.`),xb=p(),b(ws.$$.fragment),Eb=p(),wo=r("div"),b(ti.$$.fragment),Mb=p(),tn=r("p"),Rb=t("The "),Vl=r("a"),zb=t("TFRoFormerForQuestionAnswering"),jb=t(" forward method, overrides the "),np=r("code"),Cb=t("__call__"),qb=t(" special method."),Pb=p(),b(Ts.$$.fragment),Ab=p(),b($s.$$.fragment),Lb=p(),b(xs.$$.fragment),Th=p(),nn=r("h2"),Es=r("a"),sp=r("span"),b(ni.$$.fragment),Ob=p(),rp=r("span"),Db=t("FlaxRoFormerModel"),$h=p(),eo=r("div"),b(si.$$.fragment),Ib=p(),ap=r("p"),Nb=t("The bare RoFormer Model transformer outputting raw hidden-states without any specific head on top."),Sb=p(),ri=r("p"),Wb=t("This model inherits from "),Jl=r("a"),Ub=t("FlaxPreTrainedModel"),Kb=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)`),Bb=p(),ai=r("p"),Qb=t("This model is also a Flax Linen "),ii=r("a"),Hb=t("flax.linen.Module"),Vb=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.`),Jb=p(),ip=r("p"),Gb=t("Finally, this model supports inherent JAX features such as:"),Xb=p(),it=r("ul"),lp=r("li"),li=r("a"),Yb=t("Just-In-Time (JIT) compilation"),Zb=p(),dp=r("li"),di=r("a"),ev=t("Automatic Differentiation"),ov=p(),cp=r("li"),ci=r("a"),tv=t("Vectorization"),nv=p(),pp=r("li"),pi=r("a"),sv=t("Parallelization"),rv=p(),Ko=r("div"),b(mi.$$.fragment),av=p(),sn=r("p"),iv=t("The "),mp=r("code"),lv=t("FlaxRoFormerPreTrainedModel"),dv=t(" forward method, overrides the "),hp=r("code"),cv=t("__call__"),pv=t(" special method."),mv=p(),b(Ms.$$.fragment),hv=p(),b(Rs.$$.fragment),xh=p(),rn=r("h2"),zs=r("a"),up=r("span"),b(hi.$$.fragment),uv=p(),fp=r("span"),fv=t("FlaxRoFormerForMaskedLM"),Eh=p(),oo=r("div"),b(ui.$$.fragment),gv=p(),fi=r("p"),_v=t("RoFormer Model with a "),gp=r("code"),kv=t("language modeling"),yv=t(" head on top."),Fv=p(),gi=r("p"),bv=t("This model inherits from "),Gl=r("a"),vv=t("FlaxPreTrainedModel"),wv=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)`),Tv=p(),_i=r("p"),$v=t("This model is also a Flax Linen "),ki=r("a"),xv=t("flax.linen.Module"),Ev=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.`),Mv=p(),_p=r("p"),Rv=t("Finally, this model supports inherent JAX features such as:"),zv=p(),lt=r("ul"),kp=r("li"),yi=r("a"),jv=t("Just-In-Time (JIT) compilation"),Cv=p(),yp=r("li"),Fi=r("a"),qv=t("Automatic Differentiation"),Pv=p(),Fp=r("li"),bi=r("a"),Av=t("Vectorization"),Lv=p(),bp=r("li"),vi=r("a"),Ov=t("Parallelization"),Dv=p(),Bo=r("div"),b(wi.$$.fragment),Iv=p(),an=r("p"),Nv=t("The "),vp=r("code"),Sv=t("FlaxRoFormerPreTrainedModel"),Wv=t(" forward method, overrides the "),wp=r("code"),Uv=t("__call__"),Kv=t(" special method."),Bv=p(),b(js.$$.fragment),Qv=p(),b(Cs.$$.fragment),Mh=p(),ln=r("h2"),qs=r("a"),Tp=r("span"),b(Ti.$$.fragment),Hv=p(),$p=r("span"),Vv=t("FlaxRoFormerForSequenceClassification"),Rh=p(),to=r("div"),b($i.$$.fragment),Jv=p(),xp=r("p"),Gv=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.`),Xv=p(),xi=r("p"),Yv=t("This model inherits from "),Xl=r("a"),Zv=t("FlaxPreTrainedModel"),ew=t(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading, saving and converting weights from PyTorch models)`),ow=p(),Ei=r("p"),tw=t("This model is also a Flax Linen "),Mi=r("a"),nw=t("flax.linen.Module"),sw=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.`),rw=p(),Ep=r("p"),aw=t("Finally, this model supports inherent JAX features such as:"),iw=p(),dt=r("ul"),Mp=r("li"),Ri=r("a"),lw=t("Just-In-Time (JIT) compilation"),dw=p(),Rp=r("li"),zi=r("a"),cw=t("Automatic Differentiation"),pw=p(),zp=r("li"),ji=r("a"),mw=t("Vectorization"),hw=p(),jp=r("li"),Ci=r("a"),uw=t("Parallelization"),fw=p(),Qo=r("div"),b(qi.$$.fragment),gw=p(),dn=r("p"),_w=t("The "),Cp=r("code"),kw=t("FlaxRoFormerPreTrainedModel"),yw=t(" forward method, overrides the "),qp=r("code"),Fw=t("__call__"),bw=t(" special method."),vw=p(),b(Ps.$$.fragment),ww=p(),b(As.$$.fragment),zh=p(),cn=r("h2"),Ls=r("a"),Pp=r("span"),b(Pi.$$.fragment),Tw=p(),Ap=r("span"),$w=t("FlaxRoFormerForMultipleChoice"),jh=p(),no=r("div"),b(Ai.$$.fragment),xw=p(),Lp=r("p"),Ew=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.`),Mw=p(),Li=r("p"),Rw=t("This model inherits from "),Yl=r("a"),zw=t("FlaxPreTrainedModel"),jw=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)`),Cw=p(),Oi=r("p"),qw=t("This model is also a Flax Linen "),Di=r("a"),Pw=t("flax.linen.Module"),Aw=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.`),Lw=p(),Op=r("p"),Ow=t("Finally, this model supports inherent JAX features such as:"),Dw=p(),ct=r("ul"),Dp=r("li"),Ii=r("a"),Iw=t("Just-In-Time (JIT) compilation"),Nw=p(),Ip=r("li"),Ni=r("a"),Sw=t("Automatic Differentiation"),Ww=p(),Np=r("li"),Si=r("a"),Uw=t("Vectorization"),Kw=p(),Sp=r("li"),Wi=r("a"),Bw=t("Parallelization"),Qw=p(),Ho=r("div"),b(Ui.$$.fragment),Hw=p(),pn=r("p"),Vw=t("The "),Wp=r("code"),Jw=t("FlaxRoFormerPreTrainedModel"),Gw=t(" forward method, overrides the "),Up=r("code"),Xw=t("__call__"),Yw=t(" special method."),Zw=p(),b(Os.$$.fragment),eT=p(),b(Ds.$$.fragment),Ch=p(),mn=r("h2"),Is=r("a"),Kp=r("span"),b(Ki.$$.fragment),oT=p(),Bp=r("span"),tT=t("FlaxRoFormerForTokenClassification"),qh=p(),so=r("div"),b(Bi.$$.fragment),nT=p(),Qp=r("p"),sT=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.`),rT=p(),Qi=r("p"),aT=t("This model inherits from "),Zl=r("a"),iT=t("FlaxPreTrainedModel"),lT=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)`),dT=p(),Hi=r("p"),cT=t("This model is also a Flax Linen "),Vi=r("a"),pT=t("flax.linen.Module"),mT=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.`),hT=p(),Hp=r("p"),uT=t("Finally, this model supports inherent JAX features such as:"),fT=p(),pt=r("ul"),Vp=r("li"),Ji=r("a"),gT=t("Just-In-Time (JIT) compilation"),_T=p(),Jp=r("li"),Gi=r("a"),kT=t("Automatic Differentiation"),yT=p(),Gp=r("li"),Xi=r("a"),FT=t("Vectorization"),bT=p(),Xp=r("li"),Yi=r("a"),vT=t("Parallelization"),wT=p(),Vo=r("div"),b(Zi.$$.fragment),TT=p(),hn=r("p"),$T=t("The "),Yp=r("code"),xT=t("FlaxRoFormerPreTrainedModel"),ET=t(" forward method, overrides the "),Zp=r("code"),MT=t("__call__"),RT=t(" special method."),zT=p(),b(Ns.$$.fragment),jT=p(),b(Ss.$$.fragment),Ph=p(),un=r("h2"),Ws=r("a"),em=r("span"),b(el.$$.fragment),CT=p(),om=r("span"),qT=t("FlaxRoFormerForQuestionAnswering"),Ah=p(),ro=r("div"),b(ol.$$.fragment),PT=p(),fn=r("p"),AT=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 `),tm=r("code"),LT=t("span start logits"),OT=t(" and "),nm=r("code"),DT=t("span end logits"),IT=t(")."),NT=p(),tl=r("p"),ST=t("This model inherits from "),ed=r("a"),WT=t("FlaxPreTrainedModel"),UT=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)`),KT=p(),nl=r("p"),BT=t("This model is also a Flax Linen "),sl=r("a"),QT=t("flax.linen.Module"),HT=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.`),VT=p(),sm=r("p"),JT=t("Finally, this model supports inherent JAX features such as:"),GT=p(),mt=r("ul"),rm=r("li"),rl=r("a"),XT=t("Just-In-Time (JIT) compilation"),YT=p(),am=r("li"),al=r("a"),ZT=t("Automatic Differentiation"),e$=p(),im=r("li"),il=r("a"),o$=t("Vectorization"),t$=p(),lm=r("li"),ll=r("a"),n$=t("Parallelization"),s$=p(),Jo=r("div"),b(dl.$$.fragment),r$=p(),gn=r("p"),a$=t("The "),dm=r("code"),i$=t("FlaxRoFormerPreTrainedModel"),l$=t(" forward method, overrides the "),cm=r("code"),d$=t("__call__"),c$=t(" special method."),p$=p(),b(Us.$$.fragment),m$=p(),b(Ks.$$.fragment),this.h()},l(s){const y=jx('[data-svelte="svelte-1phssyn"]',document.head);d=a(y,"META",{name:!0,content:!0}),y.forEach(o),k=m(s),h=a(s,"H1",{class:!0});var cl=i(h);u=a(cl,"A",{id:!0,class:!0,href:!0});var pm=i(u);_=a(pm,"SPAN",{});var mm=i(_);v(l.$$.fragment,mm),mm.forEach(o),pm.forEach(o),c=m(cl),z=a(cl,"SPAN",{});var hm=i(z);be=n(hm,"RoFormer"),hm.forEach(o),cl.forEach(o),he=m(s),I=a(s,"H2",{class:!0});var pl=i(I);ae=a(pl,"A",{id:!0,class:!0,href:!0});var um=i(ae);ee=a(um,"SPAN",{});var fm=i(ee);v(E.$$.fragment,fm),fm.forEach(o),um.forEach(o),ve=m(pl),Q=a(pl,"SPAN",{});var gm=i(Q);we=n(gm,"Overview"),gm.forEach(o),pl.forEach(o),ue=m(s),N=a(s,"P",{});var ml=i(N);Te=n(ml,"The RoFormer model was proposed in "),ie=a(ml,"A",{href:!0,rel:!0});var _m=i(ie);V=n(_m,"RoFormer: Enhanced Transformer with Rotary Position Embedding"),_m.forEach(o),$e=n(ml," by Jianlin Su and Yu Lu and Shengfeng Pan and Bo Wen and Yunfeng Liu."),ml.forEach(o),fe=m(s),W=a(s,"P",{});var km=i(W);xe=n(km,"The abstract from the paper is the following:"),km.forEach(o),ge=m(s),U=a(s,"P",{});var ym=i(U);ce=a(ym,"EM",{});var Fm=i(ce);Ee=n(Fm,`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.`),Fm.forEach(o),ym.forEach(o),te=m(s),C=a(s,"P",{});var bm=i(C);A=n(bm,"Tips:"),bm.forEach(o),_e=m(s),K=a(s,"UL",{});var vm=i(K);pe=a(vm,"LI",{});var wm=i(pe);Me=n(wm,`RoFormer is a BERT-like autoencoding model with rotary position embeddings. Rotary position embeddings have shown
improved performance on classification tasks with long texts.`),wm.forEach(o),vm.forEach(o),H=m(s),ne=a(s,"P",{});var _n=i(ne);Re=n(_n,"This model was contributed by "),q=a(_n,"A",{href:!0,rel:!0});var Tm=i(q);ze=n(Tm,"junnyu"),Tm.forEach(o),J=n(_n,". The original code can be found "),le=a(_n,"A",{href:!0,rel:!0});var $m=i(le);je=n($m,"here"),$m.forEach(o),G=n(_n,"."),_n.forEach(o),ke=m(s),re=a(s,"H2",{class:!0});var hl=i(re);O=a(hl,"A",{id:!0,class:!0,href:!0});var xm=i(O);me=a(xm,"SPAN",{});var Em=i(me);v(S.$$.fragment,Em),Em.forEach(o),xm.forEach(o),Ce=m(hl),oe=a(hl,"SPAN",{});var Mm=i(oe);L=n(Mm,"RoFormerConfig"),Mm.forEach(o),hl.forEach(o),ye=m(s),P=a(s,"DIV",{class:!0});var ht=i(P);v(de.$$.fragment,ht),qe=m(ht),F=a(ht,"P",{});var kn=i(F);R=n(kn,"This is the configuration class to store the configuration of a "),Se=a(kn,"A",{href:!0});var Rm=i(Se);se=n(Rm,"RoFormerModel"),Rm.forEach(o),He=n(kn,`. It is used to instantiate an
RoFormer model according to the specified arguments, defining the model architecture. Instantiating a configuration
with the defaults will yield a similar configuration to that of the RoFormer
`),Ne=a(kn,"A",{href:!0,rel:!0});var zm=i(Ne);j=n(zm,"junnyu/roformer_chinese_base"),zm.forEach(o),Ve=n(kn," architecture."),kn.forEach(o),Je=m(ht),Pe=a(ht,"P",{});var yn=i(Pe);Ge=n(yn,"Configuration objects inherit from "),We=a(yn,"A",{href:!0});var jm=i(We);D=n(jm,"PretrainedConfig"),jm.forEach(o),X=n(yn,` and can be used to control the model outputs. Read the
documentation from `),Ue=a(yn,"A",{href:!0});var Cm=i(Ue);Xe=n(Cm,"PretrainedConfig"),Cm.forEach(o),Y=n(yn," for more information."),yn.forEach(o),Ye=m(ht),v(Le.$$.fragment,ht),ht.forEach(o),Fe=m(s),Ae=a(s,"H2",{class:!0});var ul=i(Ae);Z=a(ul,"A",{id:!0,class:!0,href:!0});var qm=i(Z);Ke=a(qm,"SPAN",{});var Pm=i(Ke);v(fr.$$.fragment,Pm),Pm.forEach(o),qm.forEach(o),Wu=m(ul),jd=a(ul,"SPAN",{});var Am=i(jd);Uu=n(Am,"RoFormerTokenizer"),Am.forEach(o),ul.forEach(o),Hm=m(s),Ze=a(s,"DIV",{class:!0});var ao=i(Ze);v(gr.$$.fragment,ao),Ku=m(ao),_r=a(ao,"P",{});var fl=i(_r);Bu=n(fl,"Construct a RoFormer tokenizer. Based on "),kr=a(fl,"A",{href:!0,rel:!0});var Lm=i(kr);Qu=n(Lm,"Rust Jieba"),Lm.forEach(o),Hu=n(fl,"."),fl.forEach(o),Vu=m(ao),yr=a(ao,"P",{});var gl=i(yr);Ju=n(gl,"This tokenizer inherits from "),Fl=a(gl,"A",{href:!0});var Om=i(Fl);Gu=n(Om,"PreTrainedTokenizer"),Om.forEach(o),Xu=n(gl,` which contains most of the main methods. Users should refer to
this superclass for more information regarding those methods.`),gl.forEach(o),Yu=m(ao),v(vn.$$.fragment,ao),Zu=m(ao),ft=a(ao,"DIV",{class:!0});var Fn=i(ft);v(Fr.$$.fragment,Fn),ef=m(Fn),Cd=a(Fn,"P",{});var Dm=i(Cd);of=n(Dm,`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:`),Dm.forEach(o),tf=m(Fn),br=a(Fn,"UL",{});var _l=i(br);bl=a(_l,"LI",{});var od=i(bl);nf=n(od,"single sequence: "),qd=a(od,"CODE",{});var Im=i(qd);sf=n(Im,"[CLS] X [SEP]"),Im.forEach(o),od.forEach(o),rf=m(_l),vl=a(_l,"LI",{});var td=i(vl);af=n(td,"pair of sequences: "),Pd=a(td,"CODE",{});var Nm=i(Pd);lf=n(Nm,"[CLS] A [SEP] B [SEP]"),Nm.forEach(o),td.forEach(o),_l.forEach(o),Fn.forEach(o),df=m(ao),wn=a(ao,"DIV",{class:!0});var kl=i(wn);v(vr.$$.fragment,kl),cf=m(kl),wr=a(kl,"P",{});var yl=i(wr);pf=n(yl,`Retrieve sequence ids from a token list that has no special tokens added. This method is called when adding
special tokens using the tokenizer `),Ad=a(yl,"CODE",{});var Sm=i(Ad);mf=n(Sm,"prepare_for_model"),Sm.forEach(o),hf=n(yl," method."),yl.forEach(o),kl.forEach(o),uf=m(ao),Ao=a(ao,"DIV",{class:!0});var ut=i(Ao);v(Tr.$$.fragment,ut),ff=m(ut),Ld=a(ut,"P",{});var Wm=i(Ld);gf=n(Wm,"Create a mask from the two sequences passed to be used in a sequence-pair classification task. A RoFormer"),Wm.forEach(o),_f=m(ut),v(Tn.$$.fragment,ut),kf=m(ut),Tt=a(ut,"P",{});var bn=i(Tt);yf=n(bn,"If "),Od=a(bn,"CODE",{});var Um=i(Od);Ff=n(Um,"token_ids_1"),Um.forEach(o),bf=n(bn," is "),Dd=a(bn,"CODE",{});var Km=i(Dd);vf=n(Km,"None"),Km.forEach(o),wf=n(bn,", this method only returns the first portion of the mask (0s)."),bn.forEach(o),ut.forEach(o),Tf=m(ao),wl=a(ao,"DIV",{class:!0});var Bm=i(wl);v($r.$$.fragment,Bm),Bm.forEach(o),ao.forEach(o),Vm=m(s),$t=a(s,"H2",{class:!0});var Oh=i($t);$n=a(Oh,"A",{id:!0,class:!0,href:!0});var f$=i($n);Id=a(f$,"SPAN",{});var g$=i(Id);v(xr.$$.fragment,g$),g$.forEach(o),f$.forEach(o),$f=m(Oh),Nd=a(Oh,"SPAN",{});var _$=i(Nd);xf=n(_$,"RoFormerTokenizerFast"),_$.forEach(o),Oh.forEach(o),Jm=m(s),io=a(s,"DIV",{class:!0});var Go=i(io);v(Er.$$.fragment,Go),Ef=m(Go),Mr=a(Go,"P",{});var Dh=i(Mr);Mf=n(Dh,"Construct a \u201Cfast\u201D RoFormer tokenizer (backed by HuggingFace\u2019s "),Sd=a(Dh,"EM",{});var k$=i(Sd);Rf=n(k$,"tokenizers"),k$.forEach(o),zf=n(Dh," library)."),Dh.forEach(o),jf=m(Go),xn=a(Go,"P",{});var Qm=i(xn);Tl=a(Qm,"A",{href:!0});var y$=i(Tl);Cf=n(y$,"RoFormerTokenizerFast"),y$.forEach(o),qf=n(Qm," is almost identical to "),$l=a(Qm,"A",{href:!0});var F$=i($l);Pf=n(F$,"BertTokenizerFast"),F$.forEach(o),Af=n(Qm,` and runs end-to-end tokenization:
punctuation splitting and wordpiece. There are some difference between them when tokenizing Chinese.`),Qm.forEach(o),Lf=m(Go),Rr=a(Go,"P",{});var Ih=i(Rr);Of=n(Ih,"This tokenizer inherits from "),xl=a(Ih,"A",{href:!0});var b$=i(xl);Df=n(b$,"PreTrainedTokenizerFast"),b$.forEach(o),If=n(Ih,` which contains most of the main methods. Users should
refer to this superclass for more information regarding those methods.`),Ih.forEach(o),Nf=m(Go),v(En.$$.fragment,Go),Sf=m(Go),gt=a(Go,"DIV",{class:!0});var nd=i(gt);v(zr.$$.fragment,nd),Wf=m(nd),Wd=a(nd,"P",{});var v$=i(Wd);Uf=n(v$,`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:`),v$.forEach(o),Kf=m(nd),jr=a(nd,"UL",{});var Nh=i(jr);El=a(Nh,"LI",{});var h$=i(El);Bf=n(h$,"single sequence: "),Ud=a(h$,"CODE",{});var w$=i(Ud);Qf=n(w$,"[CLS] X [SEP]"),w$.forEach(o),h$.forEach(o),Hf=m(Nh),Ml=a(Nh,"LI",{});var u$=i(Ml);Vf=n(u$,"pair of sequences: "),Kd=a(u$,"CODE",{});var T$=i(Kd);Jf=n(T$,"[CLS] A [SEP] B [SEP]"),T$.forEach(o),u$.forEach(o),Nh.forEach(o),nd.forEach(o),Go.forEach(o),Gm=m(s),xt=a(s,"H2",{class:!0});var Sh=i(xt);Mn=a(Sh,"A",{id:!0,class:!0,href:!0});var $$=i(Mn);Bd=a($$,"SPAN",{});var x$=i(Bd);v(Cr.$$.fragment,x$),x$.forEach(o),$$.forEach(o),Gf=m(Sh),Qd=a(Sh,"SPAN",{});var E$=i(Qd);Xf=n(E$,"RoFormerModel"),E$.forEach(o),Sh.forEach(o),Xm=m(s),_o=a(s,"DIV",{class:!0});var kt=i(_o);v(qr.$$.fragment,kt),Yf=m(kt),Pr=a(kt,"P",{});var Wh=i(Pr);Zf=n(Wh,`The bare RoFormer Model transformer outputting raw hidden-states without any specific head on top.
This model is a PyTorch `),Ar=a(Wh,"A",{href:!0,rel:!0});var M$=i(Ar);eg=n(M$,"torch.nn.Module"),M$.forEach(o),og=n(Wh,` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),Wh.forEach(o),tg=m(kt),Lr=a(kt,"P",{});var Uh=i(Lr);ng=n(Uh,`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 `),Or=a(Uh,"A",{href:!0,rel:!0});var R$=i(Or);sg=n(R$,`Attention is
all you need`),R$.forEach(o),rg=n(Uh,` by Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit,
Llion Jones, Aidan N. Gomez, Lukasz Kaiser and Illia Polosukhin.`),Uh.forEach(o),ag=m(kt),lo=a(kt,"P",{});var To=i(lo);ig=n(To,"To behave as an decoder the model needs to be initialized with the "),Hd=a(To,"CODE",{});var z$=i(Hd);lg=n(z$,"is_decoder"),z$.forEach(o),dg=n(To,` argument of the configuration set
to `),Vd=a(To,"CODE",{});var j$=i(Vd);cg=n(j$,"True"),j$.forEach(o),pg=n(To,". To be used in a Seq2Seq model, the model needs to initialized with both "),Jd=a(To,"CODE",{});var C$=i(Jd);mg=n(C$,"is_decoder"),C$.forEach(o),hg=n(To,` argument and
`),Gd=a(To,"CODE",{});var q$=i(Gd);ug=n(q$,"add_cross_attention"),q$.forEach(o),fg=n(To," set to "),Xd=a(To,"CODE",{});var P$=i(Xd);gg=n(P$,"True"),P$.forEach(o),_g=n(To,"; an "),Yd=a(To,"CODE",{});var A$=i(Yd);kg=n(A$,"encoder_hidden_states"),A$.forEach(o),yg=n(To," is then expected as an input to the forward pass."),To.forEach(o),Fg=m(kt),Lo=a(kt,"DIV",{class:!0});var Bs=i(Lo);v(Dr.$$.fragment,Bs),bg=m(Bs),Et=a(Bs,"P",{});var sd=i(Et);vg=n(sd,"The "),Rl=a(sd,"A",{href:!0});var L$=i(Rl);wg=n(L$,"RoFormerModel"),L$.forEach(o),Tg=n(sd," forward method, overrides the "),Zd=a(sd,"CODE",{});var O$=i(Zd);$g=n(O$,"__call__"),O$.forEach(o),xg=n(sd," special method."),sd.forEach(o),Eg=m(Bs),v(Rn.$$.fragment,Bs),Mg=m(Bs),v(zn.$$.fragment,Bs),Bs.forEach(o),kt.forEach(o),Ym=m(s),Mt=a(s,"H2",{class:!0});var Kh=i(Mt);jn=a(Kh,"A",{id:!0,class:!0,href:!0});var D$=i(jn);ec=a(D$,"SPAN",{});var I$=i(ec);v(Ir.$$.fragment,I$),I$.forEach(o),D$.forEach(o),Rg=m(Kh),oc=a(Kh,"SPAN",{});var N$=i(oc);zg=n(N$,"RoFormerForCausalLM"),N$.forEach(o),Kh.forEach(o),Zm=m(s),rt=a(s,"DIV",{class:!0});var rd=i(rt);v(Nr.$$.fragment,rd),jg=m(rd),Rt=a(rd,"P",{});var ad=i(Rt);Cg=n(ad,"RoFormer Model with a "),tc=a(ad,"CODE",{});var S$=i(tc);qg=n(S$,"language modeling"),S$.forEach(o),Pg=n(ad,` head on top for CLM fine-tuning.
This model is a PyTorch `),Sr=a(ad,"A",{href:!0,rel:!0});var W$=i(Sr);Ag=n(W$,"torch.nn.Module"),W$.forEach(o),Lg=n(ad,` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),ad.forEach(o),Og=m(rd),Oo=a(rd,"DIV",{class:!0});var Qs=i(Oo);v(Wr.$$.fragment,Qs),Dg=m(Qs),zt=a(Qs,"P",{});var id=i(zt);Ig=n(id,"The "),zl=a(id,"A",{href:!0});var U$=i(zl);Ng=n(U$,"RoFormerForCausalLM"),U$.forEach(o),Sg=n(id," forward method, overrides the "),nc=a(id,"CODE",{});var K$=i(nc);Wg=n(K$,"__call__"),K$.forEach(o),Ug=n(id," special method."),id.forEach(o),Kg=m(Qs),v(Cn.$$.fragment,Qs),Bg=m(Qs),v(qn.$$.fragment,Qs),Qs.forEach(o),rd.forEach(o),eh=m(s),jt=a(s,"H2",{class:!0});var Bh=i(jt);Pn=a(Bh,"A",{id:!0,class:!0,href:!0});var B$=i(Pn);sc=a(B$,"SPAN",{});var Q$=i(sc);v(Ur.$$.fragment,Q$),Q$.forEach(o),B$.forEach(o),Qg=m(Bh),rc=a(Bh,"SPAN",{});var H$=i(rc);Hg=n(H$,"RoFormerForMaskedLM"),H$.forEach(o),Bh.forEach(o),oh=m(s),at=a(s,"DIV",{class:!0});var ld=i(at);v(Kr.$$.fragment,ld),Vg=m(ld),Ct=a(ld,"P",{});var dd=i(Ct);Jg=n(dd,"RoFormer Model with a "),ac=a(dd,"CODE",{});var V$=i(ac);Gg=n(V$,"language modeling"),V$.forEach(o),Xg=n(dd,` head on top.
This model is a PyTorch `),Br=a(dd,"A",{href:!0,rel:!0});var J$=i(Br);Yg=n(J$,"torch.nn.Module"),J$.forEach(o),Zg=n(dd,` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),dd.forEach(o),e_=m(ld),Do=a(ld,"DIV",{class:!0});var Hs=i(Do);v(Qr.$$.fragment,Hs),o_=m(Hs),qt=a(Hs,"P",{});var cd=i(qt);t_=n(cd,"The "),jl=a(cd,"A",{href:!0});var G$=i(jl);n_=n(G$,"RoFormerForMaskedLM"),G$.forEach(o),s_=n(cd," forward method, overrides the "),ic=a(cd,"CODE",{});var X$=i(ic);r_=n(X$,"__call__"),X$.forEach(o),a_=n(cd," special method."),cd.forEach(o),i_=m(Hs),v(An.$$.fragment,Hs),l_=m(Hs),v(Ln.$$.fragment,Hs),Hs.forEach(o),ld.forEach(o),th=m(s),Pt=a(s,"H2",{class:!0});var Qh=i(Pt);On=a(Qh,"A",{id:!0,class:!0,href:!0});var Y$=i(On);lc=a(Y$,"SPAN",{});var Z$=i(lc);v(Hr.$$.fragment,Z$),Z$.forEach(o),Y$.forEach(o),d_=m(Qh),dc=a(Qh,"SPAN",{});var e1=i(dc);c_=n(e1,"RoFormerForSequenceClassification"),e1.forEach(o),Qh.forEach(o),nh=m(s),jo=a(s,"DIV",{class:!0});var Vs=i(jo);v(Vr.$$.fragment,Vs),p_=m(Vs),cc=a(Vs,"P",{});var o1=i(cc);m_=n(o1,`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.`),o1.forEach(o),h_=m(Vs),Jr=a(Vs,"P",{});var Hh=i(Jr);u_=n(Hh,"This model is a PyTorch "),Gr=a(Hh,"A",{href:!0,rel:!0});var t1=i(Gr);f_=n(t1,"torch.nn.Module"),t1.forEach(o),g_=n(Hh,` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),Hh.forEach(o),__=m(Vs),yo=a(Vs,"DIV",{class:!0});var yt=i(yo);v(Xr.$$.fragment,yt),k_=m(yt),At=a(yt,"P",{});var pd=i(At);y_=n(pd,"The "),Cl=a(pd,"A",{href:!0});var n1=i(Cl);F_=n(n1,"RoFormerForSequenceClassification"),n1.forEach(o),b_=n(pd," forward method, overrides the "),pc=a(pd,"CODE",{});var s1=i(pc);v_=n(s1,"__call__"),s1.forEach(o),w_=n(pd," special method."),pd.forEach(o),T_=m(yt),v(Dn.$$.fragment,yt),$_=m(yt),v(In.$$.fragment,yt),x_=m(yt),v(Nn.$$.fragment,yt),yt.forEach(o),Vs.forEach(o),sh=m(s),Lt=a(s,"H2",{class:!0});var Vh=i(Lt);Sn=a(Vh,"A",{id:!0,class:!0,href:!0});var r1=i(Sn);mc=a(r1,"SPAN",{});var a1=i(mc);v(Yr.$$.fragment,a1),a1.forEach(o),r1.forEach(o),E_=m(Vh),hc=a(Vh,"SPAN",{});var i1=i(hc);M_=n(i1,"RoFormerForMultipleChoice"),i1.forEach(o),Vh.forEach(o),rh=m(s),Co=a(s,"DIV",{class:!0});var Js=i(Co);v(Zr.$$.fragment,Js),R_=m(Js),uc=a(Js,"P",{});var l1=i(uc);z_=n(l1,`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.`),l1.forEach(o),j_=m(Js),ea=a(Js,"P",{});var Jh=i(ea);C_=n(Jh,"This model is a PyTorch "),oa=a(Jh,"A",{href:!0,rel:!0});var d1=i(oa);q_=n(d1,"torch.nn.Module"),d1.forEach(o),P_=n(Jh,` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),Jh.forEach(o),A_=m(Js),Io=a(Js,"DIV",{class:!0});var Gs=i(Io);v(ta.$$.fragment,Gs),L_=m(Gs),Ot=a(Gs,"P",{});var md=i(Ot);O_=n(md,"The "),ql=a(md,"A",{href:!0});var c1=i(ql);D_=n(c1,"RoFormerForMultipleChoice"),c1.forEach(o),I_=n(md," forward method, overrides the "),fc=a(md,"CODE",{});var p1=i(fc);N_=n(p1,"__call__"),p1.forEach(o),S_=n(md," special method."),md.forEach(o),W_=m(Gs),v(Wn.$$.fragment,Gs),U_=m(Gs),v(Un.$$.fragment,Gs),Gs.forEach(o),Js.forEach(o),ah=m(s),Dt=a(s,"H2",{class:!0});var Gh=i(Dt);Kn=a(Gh,"A",{id:!0,class:!0,href:!0});var m1=i(Kn);gc=a(m1,"SPAN",{});var h1=i(gc);v(na.$$.fragment,h1),h1.forEach(o),m1.forEach(o),K_=m(Gh),_c=a(Gh,"SPAN",{});var u1=i(_c);B_=n(u1,"RoFormerForTokenClassification"),u1.forEach(o),Gh.forEach(o),ih=m(s),qo=a(s,"DIV",{class:!0});var Xs=i(qo);v(sa.$$.fragment,Xs),Q_=m(Xs),kc=a(Xs,"P",{});var f1=i(kc);H_=n(f1,`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.`),f1.forEach(o),V_=m(Xs),ra=a(Xs,"P",{});var Xh=i(ra);J_=n(Xh,"This model is a PyTorch "),aa=a(Xh,"A",{href:!0,rel:!0});var g1=i(aa);G_=n(g1,"torch.nn.Module"),g1.forEach(o),X_=n(Xh,` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),Xh.forEach(o),Y_=m(Xs),No=a(Xs,"DIV",{class:!0});var Ys=i(No);v(ia.$$.fragment,Ys),Z_=m(Ys),It=a(Ys,"P",{});var hd=i(It);ek=n(hd,"The "),Pl=a(hd,"A",{href:!0});var _1=i(Pl);ok=n(_1,"RoFormerForTokenClassification"),_1.forEach(o),tk=n(hd," forward method, overrides the "),yc=a(hd,"CODE",{});var k1=i(yc);nk=n(k1,"__call__"),k1.forEach(o),sk=n(hd," special method."),hd.forEach(o),rk=m(Ys),v(Bn.$$.fragment,Ys),ak=m(Ys),v(Qn.$$.fragment,Ys),Ys.forEach(o),Xs.forEach(o),lh=m(s),Nt=a(s,"H2",{class:!0});var Yh=i(Nt);Hn=a(Yh,"A",{id:!0,class:!0,href:!0});var y1=i(Hn);Fc=a(y1,"SPAN",{});var F1=i(Fc);v(la.$$.fragment,F1),F1.forEach(o),y1.forEach(o),ik=m(Yh),bc=a(Yh,"SPAN",{});var b1=i(bc);lk=n(b1,"RoFormerForQuestionAnswering"),b1.forEach(o),Yh.forEach(o),dh=m(s),Po=a(s,"DIV",{class:!0});var Zs=i(Po);v(da.$$.fragment,Zs),dk=m(Zs),St=a(Zs,"P",{});var ud=i(St);ck=n(ud,`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 `),vc=a(ud,"CODE",{});var v1=i(vc);pk=n(v1,"span start logits"),v1.forEach(o),mk=n(ud," and "),wc=a(ud,"CODE",{});var w1=i(wc);hk=n(w1,"span end logits"),w1.forEach(o),uk=n(ud,")."),ud.forEach(o),fk=m(Zs),ca=a(Zs,"P",{});var Zh=i(ca);gk=n(Zh,"This model is a PyTorch "),pa=a(Zh,"A",{href:!0,rel:!0});var T1=i(pa);_k=n(T1,"torch.nn.Module"),T1.forEach(o),kk=n(Zh,` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),Zh.forEach(o),yk=m(Zs),So=a(Zs,"DIV",{class:!0});var er=i(So);v(ma.$$.fragment,er),Fk=m(er),Wt=a(er,"P",{});var fd=i(Wt);bk=n(fd,"The "),Al=a(fd,"A",{href:!0});var $1=i(Al);vk=n($1,"RoFormerForQuestionAnswering"),$1.forEach(o),wk=n(fd," forward method, overrides the "),Tc=a(fd,"CODE",{});var x1=i(Tc);Tk=n(x1,"__call__"),x1.forEach(o),$k=n(fd," special method."),fd.forEach(o),xk=m(er),v(Vn.$$.fragment,er),Ek=m(er),v(Jn.$$.fragment,er),er.forEach(o),Zs.forEach(o),ch=m(s),Ut=a(s,"H2",{class:!0});var eu=i(Ut);Gn=a(eu,"A",{id:!0,class:!0,href:!0});var E1=i(Gn);$c=a(E1,"SPAN",{});var M1=i($c);v(ha.$$.fragment,M1),M1.forEach(o),E1.forEach(o),Mk=m(eu),xc=a(eu,"SPAN",{});var R1=i(xc);Rk=n(R1,"TFRoFormerModel"),R1.forEach(o),eu.forEach(o),ph=m(s),co=a(s,"DIV",{class:!0});var Xo=i(co);v(ua.$$.fragment,Xo),zk=m(Xo),Ec=a(Xo,"P",{});var z1=i(Ec);jk=n(z1,"The bare RoFormer Model transformer outputing raw hidden-states without any specific head on top."),z1.forEach(o),Ck=m(Xo),fa=a(Xo,"P",{});var ou=i(fa);qk=n(ou,"This model inherits from "),Ll=a(ou,"A",{href:!0});var j1=i(Ll);Pk=n(j1,"TFPreTrainedModel"),j1.forEach(o),Ak=n(ou,`. 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.)`),ou.forEach(o),Lk=m(Xo),ga=a(Xo,"P",{});var tu=i(ga);Ok=n(tu,"This model is also a "),_a=a(tu,"A",{href:!0,rel:!0});var C1=i(_a);Dk=n(C1,"tf.keras.Model"),C1.forEach(o),Ik=n(tu,` 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.`),tu.forEach(o),Nk=m(Xo),v(Xn.$$.fragment,Xo),Sk=m(Xo),Wo=a(Xo,"DIV",{class:!0});var or=i(Wo);v(ka.$$.fragment,or),Wk=m(or),Kt=a(or,"P",{});var gd=i(Kt);Uk=n(gd,"The "),Ol=a(gd,"A",{href:!0});var q1=i(Ol);Kk=n(q1,"TFRoFormerModel"),q1.forEach(o),Bk=n(gd," forward method, overrides the "),Mc=a(gd,"CODE",{});var P1=i(Mc);Qk=n(P1,"__call__"),P1.forEach(o),Hk=n(gd," special method."),gd.forEach(o),Vk=m(or),v(Yn.$$.fragment,or),Jk=m(or),v(Zn.$$.fragment,or),or.forEach(o),Xo.forEach(o),mh=m(s),Bt=a(s,"H2",{class:!0});var nu=i(Bt);es=a(nu,"A",{id:!0,class:!0,href:!0});var A1=i(es);Rc=a(A1,"SPAN",{});var L1=i(Rc);v(ya.$$.fragment,L1),L1.forEach(o),A1.forEach(o),Gk=m(nu),zc=a(nu,"SPAN",{});var O1=i(zc);Xk=n(O1,"TFRoFormerForMaskedLM"),O1.forEach(o),nu.forEach(o),hh=m(s),po=a(s,"DIV",{class:!0});var Yo=i(po);v(Fa.$$.fragment,Yo),Yk=m(Yo),ba=a(Yo,"P",{});var su=i(ba);Zk=n(su,"RoFormer Model with a "),jc=a(su,"CODE",{});var D1=i(jc);ey=n(D1,"language modeling"),D1.forEach(o),oy=n(su," head on top."),su.forEach(o),ty=m(Yo),va=a(Yo,"P",{});var ru=i(va);ny=n(ru,"This model inherits from "),Dl=a(ru,"A",{href:!0});var I1=i(Dl);sy=n(I1,"TFPreTrainedModel"),I1.forEach(o),ry=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),ay=m(Yo),wa=a(Yo,"P",{});var au=i(wa);iy=n(au,"This model is also a "),Ta=a(au,"A",{href:!0,rel:!0});var N1=i(Ta);ly=n(N1,"tf.keras.Model"),N1.forEach(o),dy=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),cy=m(Yo),v(os.$$.fragment,Yo),py=m(Yo),Fo=a(Yo,"DIV",{class:!0});var Ft=i(Fo);v($a.$$.fragment,Ft),my=m(Ft),Qt=a(Ft,"P",{});var _d=i(Qt);hy=n(_d,"The "),Il=a(_d,"A",{href:!0});var S1=i(Il);uy=n(S1,"TFRoFormerForMaskedLM"),S1.forEach(o),fy=n(_d," forward method, overrides the "),Cc=a(_d,"CODE",{});var W1=i(Cc);gy=n(W1,"__call__"),W1.forEach(o),_y=n(_d," special method."),_d.forEach(o),ky=m(Ft),v(ts.$$.fragment,Ft),yy=m(Ft),v(ns.$$.fragment,Ft),Fy=m(Ft),v(ss.$$.fragment,Ft),Ft.forEach(o),Yo.forEach(o),uh=m(s),Ht=a(s,"H2",{class:!0});var iu=i(Ht);rs=a(iu,"A",{id:!0,class:!0,href:!0});var U1=i(rs);qc=a(U1,"SPAN",{});var K1=i(qc);v(xa.$$.fragment,K1),K1.forEach(o),U1.forEach(o),by=m(iu),Pc=a(iu,"SPAN",{});var B1=i(Pc);vy=n(B1,"TFRoFormerForCausalLM"),B1.forEach(o),iu.forEach(o),fh=m(s),mo=a(s,"DIV",{class:!0});var Zo=i(mo);v(Ea.$$.fragment,Zo),wy=m(Zo),Ma=a(Zo,"P",{});var lu=i(Ma);Ty=n(lu,"RoFormer Model with a "),Ac=a(lu,"CODE",{});var Q1=i(Ac);$y=n(Q1,"language modeling"),Q1.forEach(o),xy=n(lu," head on top for CLM fine-tuning."),lu.forEach(o),Ey=m(Zo),Ra=a(Zo,"P",{});var du=i(Ra);My=n(du,"This model inherits from "),Nl=a(du,"A",{href:!0});var H1=i(Nl);Ry=n(H1,"TFPreTrainedModel"),H1.forEach(o),zy=n(du,`. 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.)`),du.forEach(o),jy=m(Zo),za=a(Zo,"P",{});var cu=i(za);Cy=n(cu,"This model is also a "),ja=a(cu,"A",{href:!0,rel:!0});var V1=i(ja);qy=n(V1,"tf.keras.Model"),V1.forEach(o),Py=n(cu,` 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.`),cu.forEach(o),Ay=m(Zo),v(as.$$.fragment,Zo),Ly=m(Zo),_t=a(Zo,"DIV",{class:!0});var kd=i(_t);v(Ca.$$.fragment,kd),Oy=m(kd),ko=a(kd,"P",{});var et=i(ko);Dy=n(et,"labels ("),Lc=a(et,"CODE",{});var J1=i(Lc);Iy=n(J1,"tf.Tensor"),J1.forEach(o),Ny=n(et," or "),Oc=a(et,"CODE",{});var G1=i(Oc);Sy=n(G1,"np.ndarray"),G1.forEach(o),Wy=n(et," of shape "),Dc=a(et,"CODE",{});var X1=i(Dc);Uy=n(X1,"(batch_size, sequence_length)"),X1.forEach(o),Ky=n(et,", "),Ic=a(et,"EM",{});var Y1=i(Ic);By=n(Y1,"optional"),Y1.forEach(o),Qy=n(et,`):
Labels for computing the cross entropy classification loss. Indices should be in `),Nc=a(et,"CODE",{});var Z1=i(Nc);Hy=n(Z1,"[0, ..., config.vocab_size - 1]"),Z1.forEach(o),Vy=n(et,"."),et.forEach(o),Jy=m(kd),v(is.$$.fragment,kd),kd.forEach(o),Zo.forEach(o),gh=m(s),Vt=a(s,"H2",{class:!0});var pu=i(Vt);ls=a(pu,"A",{id:!0,class:!0,href:!0});var e2=i(ls);Sc=a(e2,"SPAN",{});var o2=i(Sc);v(qa.$$.fragment,o2),o2.forEach(o),e2.forEach(o),Gy=m(pu),Wc=a(pu,"SPAN",{});var t2=i(Wc);Xy=n(t2,"TFRoFormerForSequenceClassification"),t2.forEach(o),pu.forEach(o),_h=m(s),ho=a(s,"DIV",{class:!0});var ot=i(ho);v(Pa.$$.fragment,ot),Yy=m(ot),Uc=a(ot,"P",{});var n2=i(Uc);Zy=n(n2,"RoFormer Model transformer with a sequence classification/regression head on top e.g., for GLUE tasks."),n2.forEach(o),eF=m(ot),Aa=a(ot,"P",{});var mu=i(Aa);oF=n(mu,"This model inherits from "),Sl=a(mu,"A",{href:!0});var s2=i(Sl);tF=n(s2,"TFPreTrainedModel"),s2.forEach(o),nF=n(mu,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),mu.forEach(o),sF=m(ot),La=a(ot,"P",{});var hu=i(La);rF=n(hu,"This model is also a "),Oa=a(hu,"A",{href:!0,rel:!0});var r2=i(Oa);aF=n(r2,"tf.keras.Model"),r2.forEach(o),iF=n(hu,` 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.`),hu.forEach(o),lF=m(ot),v(ds.$$.fragment,ot),dF=m(ot),bo=a(ot,"DIV",{class:!0});var bt=i(bo);v(Da.$$.fragment,bt),cF=m(bt),Jt=a(bt,"P",{});var yd=i(Jt);pF=n(yd,"The "),Wl=a(yd,"A",{href:!0});var a2=i(Wl);mF=n(a2,"TFRoFormerForSequenceClassification"),a2.forEach(o),hF=n(yd," forward method, overrides the "),Kc=a(yd,"CODE",{});var i2=i(Kc);uF=n(i2,"__call__"),i2.forEach(o),fF=n(yd," special method."),yd.forEach(o),gF=m(bt),v(cs.$$.fragment,bt),_F=m(bt),v(ps.$$.fragment,bt),kF=m(bt),v(ms.$$.fragment,bt),bt.forEach(o),ot.forEach(o),kh=m(s),Gt=a(s,"H2",{class:!0});var uu=i(Gt);hs=a(uu,"A",{id:!0,class:!0,href:!0});var l2=i(hs);Bc=a(l2,"SPAN",{});var d2=i(Bc);v(Ia.$$.fragment,d2),d2.forEach(o),l2.forEach(o),yF=m(uu),Qc=a(uu,"SPAN",{});var c2=i(Qc);FF=n(c2,"TFRoFormerForMultipleChoice"),c2.forEach(o),uu.forEach(o),yh=m(s),uo=a(s,"DIV",{class:!0});var tt=i(uo);v(Na.$$.fragment,tt),bF=m(tt),Hc=a(tt,"P",{});var p2=i(Hc);vF=n(p2,`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.`),p2.forEach(o),wF=m(tt),Sa=a(tt,"P",{});var fu=i(Sa);TF=n(fu,"This model inherits from "),Ul=a(fu,"A",{href:!0});var m2=i(Ul);$F=n(m2,"TFPreTrainedModel"),m2.forEach(o),xF=n(fu,`. 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.)`),fu.forEach(o),EF=m(tt),Wa=a(tt,"P",{});var gu=i(Wa);MF=n(gu,"This model is also a "),Ua=a(gu,"A",{href:!0,rel:!0});var h2=i(Ua);RF=n(h2,"tf.keras.Model"),h2.forEach(o),zF=n(gu,` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),gu.forEach(o),jF=m(tt),v(us.$$.fragment,tt),CF=m(tt),Uo=a(tt,"DIV",{class:!0});var tr=i(Uo);v(Ka.$$.fragment,tr),qF=m(tr),Xt=a(tr,"P",{});var Fd=i(Xt);PF=n(Fd,"The "),Kl=a(Fd,"A",{href:!0});var u2=i(Kl);AF=n(u2,"TFRoFormerForMultipleChoice"),u2.forEach(o),LF=n(Fd," forward method, overrides the "),Vc=a(Fd,"CODE",{});var f2=i(Vc);OF=n(f2,"__call__"),f2.forEach(o),DF=n(Fd," special method."),Fd.forEach(o),IF=m(tr),v(fs.$$.fragment,tr),NF=m(tr),v(gs.$$.fragment,tr),tr.forEach(o),tt.forEach(o),Fh=m(s),Yt=a(s,"H2",{class:!0});var _u=i(Yt);_s=a(_u,"A",{id:!0,class:!0,href:!0});var g2=i(_s);Jc=a(g2,"SPAN",{});var _2=i(Jc);v(Ba.$$.fragment,_2),_2.forEach(o),g2.forEach(o),SF=m(_u),Gc=a(_u,"SPAN",{});var k2=i(Gc);WF=n(k2,"TFRoFormerForTokenClassification"),k2.forEach(o),_u.forEach(o),bh=m(s),fo=a(s,"DIV",{class:!0});var nt=i(fo);v(Qa.$$.fragment,nt),UF=m(nt),Xc=a(nt,"P",{});var y2=i(Xc);KF=n(y2,`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.`),y2.forEach(o),BF=m(nt),Ha=a(nt,"P",{});var ku=i(Ha);QF=n(ku,"This model inherits from "),Bl=a(ku,"A",{href:!0});var F2=i(Bl);HF=n(F2,"TFPreTrainedModel"),F2.forEach(o),VF=n(ku,`. 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.)`),ku.forEach(o),JF=m(nt),Va=a(nt,"P",{});var yu=i(Va);GF=n(yu,"This model is also a "),Ja=a(yu,"A",{href:!0,rel:!0});var b2=i(Ja);XF=n(b2,"tf.keras.Model"),b2.forEach(o),YF=n(yu,` 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.`),yu.forEach(o),ZF=m(nt),v(ks.$$.fragment,nt),eb=m(nt),vo=a(nt,"DIV",{class:!0});var vt=i(vo);v(Ga.$$.fragment,vt),ob=m(vt),Zt=a(vt,"P",{});var bd=i(Zt);tb=n(bd,"The "),Ql=a(bd,"A",{href:!0});var v2=i(Ql);nb=n(v2,"TFRoFormerForTokenClassification"),v2.forEach(o),sb=n(bd," forward method, overrides the "),Yc=a(bd,"CODE",{});var w2=i(Yc);rb=n(w2,"__call__"),w2.forEach(o),ab=n(bd," special method."),bd.forEach(o),ib=m(vt),v(ys.$$.fragment,vt),lb=m(vt),v(Fs.$$.fragment,vt),db=m(vt),v(bs.$$.fragment,vt),vt.forEach(o),nt.forEach(o),vh=m(s),en=a(s,"H2",{class:!0});var Fu=i(en);vs=a(Fu,"A",{id:!0,class:!0,href:!0});var T2=i(vs);Zc=a(T2,"SPAN",{});var $2=i(Zc);v(Xa.$$.fragment,$2),$2.forEach(o),T2.forEach(o),cb=m(Fu),ep=a(Fu,"SPAN",{});var x2=i(ep);pb=n(x2,"TFRoFormerForQuestionAnswering"),x2.forEach(o),Fu.forEach(o),wh=m(s),go=a(s,"DIV",{class:!0});var st=i(go);v(Ya.$$.fragment,st),mb=m(st),on=a(st,"P",{});var vd=i(on);hb=n(vd,`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 `),op=a(vd,"CODE",{});var E2=i(op);ub=n(E2,"span start logits"),E2.forEach(o),fb=n(vd," and "),tp=a(vd,"CODE",{});var M2=i(tp);gb=n(M2,"span end logits"),M2.forEach(o),_b=n(vd,")."),vd.forEach(o),kb=m(st),Za=a(st,"P",{});var bu=i(Za);yb=n(bu,"This model inherits from "),Hl=a(bu,"A",{href:!0});var R2=i(Hl);Fb=n(R2,"TFPreTrainedModel"),R2.forEach(o),bb=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),vb=m(st),ei=a(st,"P",{});var vu=i(ei);wb=n(vu,"This model is also a "),oi=a(vu,"A",{href:!0,rel:!0});var z2=i(oi);Tb=n(z2,"tf.keras.Model"),z2.forEach(o),$b=n(vu,` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),vu.forEach(o),xb=m(st),v(ws.$$.fragment,st),Eb=m(st),wo=a(st,"DIV",{class:!0});var wt=i(wo);v(ti.$$.fragment,wt),Mb=m(wt),tn=a(wt,"P",{});var wd=i(tn);Rb=n(wd,"The "),Vl=a(wd,"A",{href:!0});var j2=i(Vl);zb=n(j2,"TFRoFormerForQuestionAnswering"),j2.forEach(o),jb=n(wd," forward method, overrides the "),np=a(wd,"CODE",{});var C2=i(np);Cb=n(C2,"__call__"),C2.forEach(o),qb=n(wd," special method."),wd.forEach(o),Pb=m(wt),v(Ts.$$.fragment,wt),Ab=m(wt),v($s.$$.fragment,wt),Lb=m(wt),v(xs.$$.fragment,wt),wt.forEach(o),st.forEach(o),Th=m(s),nn=a(s,"H2",{class:!0});var wu=i(nn);Es=a(wu,"A",{id:!0,class:!0,href:!0});var q2=i(Es);sp=a(q2,"SPAN",{});var P2=i(sp);v(ni.$$.fragment,P2),P2.forEach(o),q2.forEach(o),Ob=m(wu),rp=a(wu,"SPAN",{});var A2=i(rp);Db=n(A2,"FlaxRoFormerModel"),A2.forEach(o),wu.forEach(o),$h=m(s),eo=a(s,"DIV",{class:!0});var $o=i(eo);v(si.$$.fragment,$o),Ib=m($o),ap=a($o,"P",{});var L2=i(ap);Nb=n(L2,"The bare RoFormer Model transformer outputting raw hidden-states without any specific head on top."),L2.forEach(o),Sb=m($o),ri=a($o,"P",{});var Tu=i(ri);Wb=n(Tu,"This model inherits from "),Jl=a(Tu,"A",{href:!0});var O2=i(Jl);Ub=n(O2,"FlaxPreTrainedModel"),O2.forEach(o),Kb=n(Tu,`. 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)`),Tu.forEach(o),Bb=m($o),ai=a($o,"P",{});var $u=i(ai);Qb=n($u,"This model is also a Flax Linen "),ii=a($u,"A",{href:!0,rel:!0});var D2=i(ii);Hb=n(D2,"flax.linen.Module"),D2.forEach(o),Vb=n($u,`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),$u.forEach(o),Jb=m($o),ip=a($o,"P",{});var I2=i(ip);Gb=n(I2,"Finally, this model supports inherent JAX features such as:"),I2.forEach(o),Xb=m($o),it=a($o,"UL",{});var nr=i(it);lp=a(nr,"LI",{});var N2=i(lp);li=a(N2,"A",{href:!0,rel:!0});var S2=i(li);Yb=n(S2,"Just-In-Time (JIT) compilation"),S2.forEach(o),N2.forEach(o),Zb=m(nr),dp=a(nr,"LI",{});var W2=i(dp);di=a(W2,"A",{href:!0,rel:!0});var U2=i(di);ev=n(U2,"Automatic Differentiation"),U2.forEach(o),W2.forEach(o),ov=m(nr),cp=a(nr,"LI",{});var K2=i(cp);ci=a(K2,"A",{href:!0,rel:!0});var B2=i(ci);tv=n(B2,"Vectorization"),B2.forEach(o),K2.forEach(o),nv=m(nr),pp=a(nr,"LI",{});var Q2=i(pp);pi=a(Q2,"A",{href:!0,rel:!0});var H2=i(pi);sv=n(H2,"Parallelization"),H2.forEach(o),Q2.forEach(o),nr.forEach(o),rv=m($o),Ko=a($o,"DIV",{class:!0});var sr=i(Ko);v(mi.$$.fragment,sr),av=m(sr),sn=a(sr,"P",{});var Td=i(sn);iv=n(Td,"The "),mp=a(Td,"CODE",{});var V2=i(mp);lv=n(V2,"FlaxRoFormerPreTrainedModel"),V2.forEach(o),dv=n(Td," forward method, overrides the "),hp=a(Td,"CODE",{});var J2=i(hp);cv=n(J2,"__call__"),J2.forEach(o),pv=n(Td," special method."),Td.forEach(o),mv=m(sr),v(Ms.$$.fragment,sr),hv=m(sr),v(Rs.$$.fragment,sr),sr.forEach(o),$o.forEach(o),xh=m(s),rn=a(s,"H2",{class:!0});var xu=i(rn);zs=a(xu,"A",{id:!0,class:!0,href:!0});var G2=i(zs);up=a(G2,"SPAN",{});var X2=i(up);v(hi.$$.fragment,X2),X2.forEach(o),G2.forEach(o),uv=m(xu),fp=a(xu,"SPAN",{});var Y2=i(fp);fv=n(Y2,"FlaxRoFormerForMaskedLM"),Y2.forEach(o),xu.forEach(o),Eh=m(s),oo=a(s,"DIV",{class:!0});var xo=i(oo);v(ui.$$.fragment,xo),gv=m(xo),fi=a(xo,"P",{});var Eu=i(fi);_v=n(Eu,"RoFormer Model with a "),gp=a(Eu,"CODE",{});var Z2=i(gp);kv=n(Z2,"language modeling"),Z2.forEach(o),yv=n(Eu," head on top."),Eu.forEach(o),Fv=m(xo),gi=a(xo,"P",{});var Mu=i(gi);bv=n(Mu,"This model inherits from "),Gl=a(Mu,"A",{href:!0});var e0=i(Gl);vv=n(e0,"FlaxPreTrainedModel"),e0.forEach(o),wv=n(Mu,`. 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)`),Mu.forEach(o),Tv=m(xo),_i=a(xo,"P",{});var Ru=i(_i);$v=n(Ru,"This model is also a Flax Linen "),ki=a(Ru,"A",{href:!0,rel:!0});var o0=i(ki);xv=n(o0,"flax.linen.Module"),o0.forEach(o),Ev=n(Ru,`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),Ru.forEach(o),Mv=m(xo),_p=a(xo,"P",{});var t0=i(_p);Rv=n(t0,"Finally, this model supports inherent JAX features such as:"),t0.forEach(o),zv=m(xo),lt=a(xo,"UL",{});var rr=i(lt);kp=a(rr,"LI",{});var n0=i(kp);yi=a(n0,"A",{href:!0,rel:!0});var s0=i(yi);jv=n(s0,"Just-In-Time (JIT) compilation"),s0.forEach(o),n0.forEach(o),Cv=m(rr),yp=a(rr,"LI",{});var r0=i(yp);Fi=a(r0,"A",{href:!0,rel:!0});var a0=i(Fi);qv=n(a0,"Automatic Differentiation"),a0.forEach(o),r0.forEach(o),Pv=m(rr),Fp=a(rr,"LI",{});var i0=i(Fp);bi=a(i0,"A",{href:!0,rel:!0});var l0=i(bi);Av=n(l0,"Vectorization"),l0.forEach(o),i0.forEach(o),Lv=m(rr),bp=a(rr,"LI",{});var d0=i(bp);vi=a(d0,"A",{href:!0,rel:!0});var c0=i(vi);Ov=n(c0,"Parallelization"),c0.forEach(o),d0.forEach(o),rr.forEach(o),Dv=m(xo),Bo=a(xo,"DIV",{class:!0});var ar=i(Bo);v(wi.$$.fragment,ar),Iv=m(ar),an=a(ar,"P",{});var $d=i(an);Nv=n($d,"The "),vp=a($d,"CODE",{});var p0=i(vp);Sv=n(p0,"FlaxRoFormerPreTrainedModel"),p0.forEach(o),Wv=n($d," forward method, overrides the "),wp=a($d,"CODE",{});var m0=i(wp);Uv=n(m0,"__call__"),m0.forEach(o),Kv=n($d," special method."),$d.forEach(o),Bv=m(ar),v(js.$$.fragment,ar),Qv=m(ar),v(Cs.$$.fragment,ar),ar.forEach(o),xo.forEach(o),Mh=m(s),ln=a(s,"H2",{class:!0});var zu=i(ln);qs=a(zu,"A",{id:!0,class:!0,href:!0});var h0=i(qs);Tp=a(h0,"SPAN",{});var u0=i(Tp);v(Ti.$$.fragment,u0),u0.forEach(o),h0.forEach(o),Hv=m(zu),$p=a(zu,"SPAN",{});var f0=i($p);Vv=n(f0,"FlaxRoFormerForSequenceClassification"),f0.forEach(o),zu.forEach(o),Rh=m(s),to=a(s,"DIV",{class:!0});var Eo=i(to);v($i.$$.fragment,Eo),Jv=m(Eo),xp=a(Eo,"P",{});var g0=i(xp);Gv=n(g0,`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.`),g0.forEach(o),Xv=m(Eo),xi=a(Eo,"P",{});var ju=i(xi);Yv=n(ju,"This model inherits from "),Xl=a(ju,"A",{href:!0});var _0=i(Xl);Zv=n(_0,"FlaxPreTrainedModel"),_0.forEach(o),ew=n(ju,`. 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)`),ju.forEach(o),ow=m(Eo),Ei=a(Eo,"P",{});var Cu=i(Ei);tw=n(Cu,"This model is also a Flax Linen "),Mi=a(Cu,"A",{href:!0,rel:!0});var k0=i(Mi);nw=n(k0,"flax.linen.Module"),k0.forEach(o),sw=n(Cu,`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),Cu.forEach(o),rw=m(Eo),Ep=a(Eo,"P",{});var y0=i(Ep);aw=n(y0,"Finally, this model supports inherent JAX features such as:"),y0.forEach(o),iw=m(Eo),dt=a(Eo,"UL",{});var ir=i(dt);Mp=a(ir,"LI",{});var F0=i(Mp);Ri=a(F0,"A",{href:!0,rel:!0});var b0=i(Ri);lw=n(b0,"Just-In-Time (JIT) compilation"),b0.forEach(o),F0.forEach(o),dw=m(ir),Rp=a(ir,"LI",{});var v0=i(Rp);zi=a(v0,"A",{href:!0,rel:!0});var w0=i(zi);cw=n(w0,"Automatic Differentiation"),w0.forEach(o),v0.forEach(o),pw=m(ir),zp=a(ir,"LI",{});var T0=i(zp);ji=a(T0,"A",{href:!0,rel:!0});var $0=i(ji);mw=n($0,"Vectorization"),$0.forEach(o),T0.forEach(o),hw=m(ir),jp=a(ir,"LI",{});var x0=i(jp);Ci=a(x0,"A",{href:!0,rel:!0});var E0=i(Ci);uw=n(E0,"Parallelization"),E0.forEach(o),x0.forEach(o),ir.forEach(o),fw=m(Eo),Qo=a(Eo,"DIV",{class:!0});var lr=i(Qo);v(qi.$$.fragment,lr),gw=m(lr),dn=a(lr,"P",{});var xd=i(dn);_w=n(xd,"The "),Cp=a(xd,"CODE",{});var M0=i(Cp);kw=n(M0,"FlaxRoFormerPreTrainedModel"),M0.forEach(o),yw=n(xd," forward method, overrides the "),qp=a(xd,"CODE",{});var R0=i(qp);Fw=n(R0,"__call__"),R0.forEach(o),bw=n(xd," special method."),xd.forEach(o),vw=m(lr),v(Ps.$$.fragment,lr),ww=m(lr),v(As.$$.fragment,lr),lr.forEach(o),Eo.forEach(o),zh=m(s),cn=a(s,"H2",{class:!0});var qu=i(cn);Ls=a(qu,"A",{id:!0,class:!0,href:!0});var z0=i(Ls);Pp=a(z0,"SPAN",{});var j0=i(Pp);v(Pi.$$.fragment,j0),j0.forEach(o),z0.forEach(o),Tw=m(qu),Ap=a(qu,"SPAN",{});var C0=i(Ap);$w=n(C0,"FlaxRoFormerForMultipleChoice"),C0.forEach(o),qu.forEach(o),jh=m(s),no=a(s,"DIV",{class:!0});var Mo=i(no);v(Ai.$$.fragment,Mo),xw=m(Mo),Lp=a(Mo,"P",{});var q0=i(Lp);Ew=n(q0,`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.`),q0.forEach(o),Mw=m(Mo),Li=a(Mo,"P",{});var Pu=i(Li);Rw=n(Pu,"This model inherits from "),Yl=a(Pu,"A",{href:!0});var P0=i(Yl);zw=n(P0,"FlaxPreTrainedModel"),P0.forEach(o),jw=n(Pu,`. 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)`),Pu.forEach(o),Cw=m(Mo),Oi=a(Mo,"P",{});var Au=i(Oi);qw=n(Au,"This model is also a Flax Linen "),Di=a(Au,"A",{href:!0,rel:!0});var A0=i(Di);Pw=n(A0,"flax.linen.Module"),A0.forEach(o),Aw=n(Au,`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),Au.forEach(o),Lw=m(Mo),Op=a(Mo,"P",{});var L0=i(Op);Ow=n(L0,"Finally, this model supports inherent JAX features such as:"),L0.forEach(o),Dw=m(Mo),ct=a(Mo,"UL",{});var dr=i(ct);Dp=a(dr,"LI",{});var O0=i(Dp);Ii=a(O0,"A",{href:!0,rel:!0});var D0=i(Ii);Iw=n(D0,"Just-In-Time (JIT) compilation"),D0.forEach(o),O0.forEach(o),Nw=m(dr),Ip=a(dr,"LI",{});var I0=i(Ip);Ni=a(I0,"A",{href:!0,rel:!0});var N0=i(Ni);Sw=n(N0,"Automatic Differentiation"),N0.forEach(o),I0.forEach(o),Ww=m(dr),Np=a(dr,"LI",{});var S0=i(Np);Si=a(S0,"A",{href:!0,rel:!0});var W0=i(Si);Uw=n(W0,"Vectorization"),W0.forEach(o),S0.forEach(o),Kw=m(dr),Sp=a(dr,"LI",{});var U0=i(Sp);Wi=a(U0,"A",{href:!0,rel:!0});var K0=i(Wi);Bw=n(K0,"Parallelization"),K0.forEach(o),U0.forEach(o),dr.forEach(o),Qw=m(Mo),Ho=a(Mo,"DIV",{class:!0});var cr=i(Ho);v(Ui.$$.fragment,cr),Hw=m(cr),pn=a(cr,"P",{});var Ed=i(pn);Vw=n(Ed,"The "),Wp=a(Ed,"CODE",{});var B0=i(Wp);Jw=n(B0,"FlaxRoFormerPreTrainedModel"),B0.forEach(o),Gw=n(Ed," forward method, overrides the "),Up=a(Ed,"CODE",{});var Q0=i(Up);Xw=n(Q0,"__call__"),Q0.forEach(o),Yw=n(Ed," special method."),Ed.forEach(o),Zw=m(cr),v(Os.$$.fragment,cr),eT=m(cr),v(Ds.$$.fragment,cr),cr.forEach(o),Mo.forEach(o),Ch=m(s),mn=a(s,"H2",{class:!0});var Lu=i(mn);Is=a(Lu,"A",{id:!0,class:!0,href:!0});var H0=i(Is);Kp=a(H0,"SPAN",{});var V0=i(Kp);v(Ki.$$.fragment,V0),V0.forEach(o),H0.forEach(o),oT=m(Lu),Bp=a(Lu,"SPAN",{});var J0=i(Bp);tT=n(J0,"FlaxRoFormerForTokenClassification"),J0.forEach(o),Lu.forEach(o),qh=m(s),so=a(s,"DIV",{class:!0});var Ro=i(so);v(Bi.$$.fragment,Ro),nT=m(Ro),Qp=a(Ro,"P",{});var G0=i(Qp);sT=n(G0,`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.`),G0.forEach(o),rT=m(Ro),Qi=a(Ro,"P",{});var Ou=i(Qi);aT=n(Ou,"This model inherits from "),Zl=a(Ou,"A",{href:!0});var X0=i(Zl);iT=n(X0,"FlaxPreTrainedModel"),X0.forEach(o),lT=n(Ou,`. 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)`),Ou.forEach(o),dT=m(Ro),Hi=a(Ro,"P",{});var Du=i(Hi);cT=n(Du,"This model is also a Flax Linen "),Vi=a(Du,"A",{href:!0,rel:!0});var Y0=i(Vi);pT=n(Y0,"flax.linen.Module"),Y0.forEach(o),mT=n(Du,`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),Du.forEach(o),hT=m(Ro),Hp=a(Ro,"P",{});var Z0=i(Hp);uT=n(Z0,"Finally, this model supports inherent JAX features such as:"),Z0.forEach(o),fT=m(Ro),pt=a(Ro,"UL",{});var pr=i(pt);Vp=a(pr,"LI",{});var ex=i(Vp);Ji=a(ex,"A",{href:!0,rel:!0});var ox=i(Ji);gT=n(ox,"Just-In-Time (JIT) compilation"),ox.forEach(o),ex.forEach(o),_T=m(pr),Jp=a(pr,"LI",{});var tx=i(Jp);Gi=a(tx,"A",{href:!0,rel:!0});var nx=i(Gi);kT=n(nx,"Automatic Differentiation"),nx.forEach(o),tx.forEach(o),yT=m(pr),Gp=a(pr,"LI",{});var sx=i(Gp);Xi=a(sx,"A",{href:!0,rel:!0});var rx=i(Xi);FT=n(rx,"Vectorization"),rx.forEach(o),sx.forEach(o),bT=m(pr),Xp=a(pr,"LI",{});var ax=i(Xp);Yi=a(ax,"A",{href:!0,rel:!0});var ix=i(Yi);vT=n(ix,"Parallelization"),ix.forEach(o),ax.forEach(o),pr.forEach(o),wT=m(Ro),Vo=a(Ro,"DIV",{class:!0});var mr=i(Vo);v(Zi.$$.fragment,mr),TT=m(mr),hn=a(mr,"P",{});var Md=i(hn);$T=n(Md,"The "),Yp=a(Md,"CODE",{});var lx=i(Yp);xT=n(lx,"FlaxRoFormerPreTrainedModel"),lx.forEach(o),ET=n(Md," forward method, overrides the "),Zp=a(Md,"CODE",{});var dx=i(Zp);MT=n(dx,"__call__"),dx.forEach(o),RT=n(Md," special method."),Md.forEach(o),zT=m(mr),v(Ns.$$.fragment,mr),jT=m(mr),v(Ss.$$.fragment,mr),mr.forEach(o),Ro.forEach(o),Ph=m(s),un=a(s,"H2",{class:!0});var Iu=i(un);Ws=a(Iu,"A",{id:!0,class:!0,href:!0});var cx=i(Ws);em=a(cx,"SPAN",{});var px=i(em);v(el.$$.fragment,px),px.forEach(o),cx.forEach(o),CT=m(Iu),om=a(Iu,"SPAN",{});var mx=i(om);qT=n(mx,"FlaxRoFormerForQuestionAnswering"),mx.forEach(o),Iu.forEach(o),Ah=m(s),ro=a(s,"DIV",{class:!0});var zo=i(ro);v(ol.$$.fragment,zo),PT=m(zo),fn=a(zo,"P",{});var Rd=i(fn);AT=n(Rd,`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 `),tm=a(Rd,"CODE",{});var hx=i(tm);LT=n(hx,"span start logits"),hx.forEach(o),OT=n(Rd," and "),nm=a(Rd,"CODE",{});var ux=i(nm);DT=n(ux,"span end logits"),ux.forEach(o),IT=n(Rd,")."),Rd.forEach(o),NT=m(zo),tl=a(zo,"P",{});var Nu=i(tl);ST=n(Nu,"This model inherits from "),ed=a(Nu,"A",{href:!0});var fx=i(ed);WT=n(fx,"FlaxPreTrainedModel"),fx.forEach(o),UT=n(Nu,`. 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)`),Nu.forEach(o),KT=m(zo),nl=a(zo,"P",{});var Su=i(nl);BT=n(Su,"This model is also a Flax Linen "),sl=a(Su,"A",{href:!0,rel:!0});var gx=i(sl);QT=n(gx,"flax.linen.Module"),gx.forEach(o),HT=n(Su,`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),Su.forEach(o),VT=m(zo),sm=a(zo,"P",{});var _x=i(sm);JT=n(_x,"Finally, this model supports inherent JAX features such as:"),_x.forEach(o),GT=m(zo),mt=a(zo,"UL",{});var hr=i(mt);rm=a(hr,"LI",{});var kx=i(rm);rl=a(kx,"A",{href:!0,rel:!0});var yx=i(rl);XT=n(yx,"Just-In-Time (JIT) compilation"),yx.forEach(o),kx.forEach(o),YT=m(hr),am=a(hr,"LI",{});var Fx=i(am);al=a(Fx,"A",{href:!0,rel:!0});var bx=i(al);ZT=n(bx,"Automatic Differentiation"),bx.forEach(o),Fx.forEach(o),e$=m(hr),im=a(hr,"LI",{});var vx=i(im);il=a(vx,"A",{href:!0,rel:!0});var wx=i(il);o$=n(wx,"Vectorization"),wx.forEach(o),vx.forEach(o),t$=m(hr),lm=a(hr,"LI",{});var Tx=i(lm);ll=a(Tx,"A",{href:!0,rel:!0});var $x=i(ll);n$=n($x,"Parallelization"),$x.forEach(o),Tx.forEach(o),hr.forEach(o),s$=m(zo),Jo=a(zo,"DIV",{class:!0});var ur=i(Jo);v(dl.$$.fragment,ur),r$=m(ur),gn=a(ur,"P",{});var zd=i(gn);a$=n(zd,"The "),dm=a(zd,"CODE",{});var xx=i(dm);i$=n(xx,"FlaxRoFormerPreTrainedModel"),xx.forEach(o),l$=n(zd," forward method, overrides the "),cm=a(zd,"CODE",{});var Ex=i(cm);d$=n(Ex,"__call__"),Ex.forEach(o),c$=n(zd," special method."),zd.forEach(o),p$=m(ur),v(Us.$$.fragment,ur),m$=m(ur),v(Ks.$$.fragment,ur),ur.forEach(o),zo.forEach(o),this.h()},h(){f(d,"name","hf:doc:metadata"),f(d,"content",JSON.stringify(AE)),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(q,"href","https://huggingface.co/junnyu"),f(q,"rel","nofollow"),f(le,"href","https://github.com/ZhuiyiTechnology/roformer"),f(le,"rel","nofollow"),f(O,"id","transformers.RoFormerConfig"),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","#transformers.RoFormerConfig"),f(re,"class","relative group"),f(Se,"href","/docs/transformers/main/en/model_doc/roformer#transformers.RoFormerModel"),f(Ne,"href","https://huggingface.co/junnyu/roformer_chinese_base"),f(Ne,"rel","nofollow"),f(We,"href","/docs/transformers/main/en/main_classes/configuration#transformers.PretrainedConfig"),f(Ue,"href","/docs/transformers/main/en/main_classes/configuration#transformers.PretrainedConfig"),f(P,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(Z,"id","transformers.RoFormerTokenizer"),f(Z,"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(Z,"href","#transformers.RoFormerTokenizer"),f(Ae,"class","relative group"),f(kr,"href","https://pypi.org/project/rjieba/"),f(kr,"rel","nofollow"),f(Fl,"href","/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizer"),f(ft,"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,"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(wl,"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($n,"id","transformers.RoFormerTokenizerFast"),f($n,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),f($n,"href","#transformers.RoFormerTokenizerFast"),f($t,"class","relative group"),f(Tl,"href","/docs/transformers/main/en/model_doc/roformer#transformers.RoFormerTokenizerFast"),f($l,"href","/docs/transformers/main/en/model_doc/bert#transformers.BertTokenizerFast"),f(xl,"href","/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast"),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(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(Mn,"id","transformers.RoFormerModel"),f(Mn,"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(Mn,"href","#transformers.RoFormerModel"),f(xt,"class","relative group"),f(Ar,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),f(Ar,"rel","nofollow"),f(Or,"href","https://arxiv.org/abs/1706.03762"),f(Or,"rel","nofollow"),f(Rl,"href","/docs/transformers/main/en/model_doc/roformer#transformers.RoFormerModel"),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(_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(jn,"id","transformers.RoFormerForCausalLM"),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.RoFormerForCausalLM"),f(Mt,"class","relative group"),f(Sr,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),f(Sr,"rel","nofollow"),f(zl,"href","/docs/transformers/main/en/model_doc/roformer#transformers.RoFormerForCausalLM"),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(rt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(Pn,"id","transformers.RoFormerForMaskedLM"),f(Pn,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),f(Pn,"href","#transformers.RoFormerForMaskedLM"),f(jt,"class","relative group"),f(Br,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),f(Br,"rel","nofollow"),f(jl,"href","/docs/transformers/main/en/model_doc/roformer#transformers.RoFormerForMaskedLM"),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(at,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(On,"id","transformers.RoFormerForSequenceClassification"),f(On,"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(On,"href","#transformers.RoFormerForSequenceClassification"),f(Pt,"class","relative group"),f(Gr,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),f(Gr,"rel","nofollow"),f(Cl,"href","/docs/transformers/main/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(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(Sn,"id","transformers.RoFormerForMultipleChoice"),f(Sn,"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(Sn,"href","#transformers.RoFormerForMultipleChoice"),f(Lt,"class","relative group"),f(oa,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),f(oa,"rel","nofollow"),f(ql,"href","/docs/transformers/main/en/model_doc/roformer#transformers.RoFormerForMultipleChoice"),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(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(Kn,"id","transformers.RoFormerForTokenClassification"),f(Kn,"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(Kn,"href","#transformers.RoFormerForTokenClassification"),f(Dt,"class","relative group"),f(aa,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),f(aa,"rel","nofollow"),f(Pl,"href","/docs/transformers/main/en/model_doc/roformer#transformers.RoFormerForTokenClassification"),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(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(Hn,"id","transformers.RoFormerForQuestionAnswering"),f(Hn,"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(Hn,"href","#transformers.RoFormerForQuestionAnswering"),f(Nt,"class","relative group"),f(pa,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),f(pa,"rel","nofollow"),f(Al,"href","/docs/transformers/main/en/model_doc/roformer#transformers.RoFormerForQuestionAnswering"),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(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(Gn,"id","transformers.TFRoFormerModel"),f(Gn,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),f(Gn,"href","#transformers.TFRoFormerModel"),f(Ut,"class","relative group"),f(Ll,"href","/docs/transformers/main/en/main_classes/model#transformers.TFPreTrainedModel"),f(_a,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),f(_a,"rel","nofollow"),f(Ol,"href","/docs/transformers/main/en/model_doc/roformer#transformers.TFRoFormerModel"),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(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(es,"id","transformers.TFRoFormerForMaskedLM"),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.TFRoFormerForMaskedLM"),f(Bt,"class","relative group"),f(Dl,"href","/docs/transformers/main/en/main_classes/model#transformers.TFPreTrainedModel"),f(Ta,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),f(Ta,"rel","nofollow"),f(Il,"href","/docs/transformers/main/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(rs,"id","transformers.TFRoFormerForCausalLM"),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.TFRoFormerForCausalLM"),f(Ht,"class","relative group"),f(Nl,"href","/docs/transformers/main/en/main_classes/model#transformers.TFPreTrainedModel"),f(ja,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),f(ja,"rel","nofollow"),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(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(ls,"id","transformers.TFRoFormerForSequenceClassification"),f(ls,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),f(ls,"href","#transformers.TFRoFormerForSequenceClassification"),f(Vt,"class","relative group"),f(Sl,"href","/docs/transformers/main/en/main_classes/model#transformers.TFPreTrainedModel"),f(Oa,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),f(Oa,"rel","nofollow"),f(Wl,"href","/docs/transformers/main/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(hs,"id","transformers.TFRoFormerForMultipleChoice"),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.TFRoFormerForMultipleChoice"),f(Gt,"class","relative group"),f(Ul,"href","/docs/transformers/main/en/main_classes/model#transformers.TFPreTrainedModel"),f(Ua,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),f(Ua,"rel","nofollow"),f(Kl,"href","/docs/transformers/main/en/model_doc/roformer#transformers.TFRoFormerForMultipleChoice"),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(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(_s,"id","transformers.TFRoFormerForTokenClassification"),f(_s,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),f(_s,"href","#transformers.TFRoFormerForTokenClassification"),f(Yt,"class","relative group"),f(Bl,"href","/docs/transformers/main/en/main_classes/model#transformers.TFPreTrainedModel"),f(Ja,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),f(Ja,"rel","nofollow"),f(Ql,"href","/docs/transformers/main/en/model_doc/roformer#transformers.TFRoFormerForTokenClassification"),f(vo,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(fo,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(vs,"id","transformers.TFRoFormerForQuestionAnswering"),f(vs,"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(vs,"href","#transformers.TFRoFormerForQuestionAnswering"),f(en,"class","relative group"),f(Hl,"href","/docs/transformers/main/en/main_classes/model#transformers.TFPreTrainedModel"),f(oi,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),f(oi,"rel","nofollow"),f(Vl,"href","/docs/transformers/main/en/model_doc/roformer#transformers.TFRoFormerForQuestionAnswering"),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(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(Es,"id","transformers.FlaxRoFormerModel"),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.FlaxRoFormerModel"),f(nn,"class","relative group"),f(Jl,"href","/docs/transformers/main/en/main_classes/model#transformers.FlaxPreTrainedModel"),f(ii,"href","https://flax.readthedocs.io/en/latest/flax.linen.html#module"),f(ii,"rel","nofollow"),f(li,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),f(li,"rel","nofollow"),f(di,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),f(di,"rel","nofollow"),f(ci,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),f(ci,"rel","nofollow"),f(pi,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),f(pi,"rel","nofollow"),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(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(zs,"id","transformers.FlaxRoFormerForMaskedLM"),f(zs,"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(zs,"href","#transformers.FlaxRoFormerForMaskedLM"),f(rn,"class","relative group"),f(Gl,"href","/docs/transformers/main/en/main_classes/model#transformers.FlaxPreTrainedModel"),f(ki,"href","https://flax.readthedocs.io/en/latest/flax.linen.html#module"),f(ki,"rel","nofollow"),f(yi,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),f(yi,"rel","nofollow"),f(Fi,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),f(Fi,"rel","nofollow"),f(bi,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),f(bi,"rel","nofollow"),f(vi,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),f(vi,"rel","nofollow"),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(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(qs,"id","transformers.FlaxRoFormerForSequenceClassification"),f(qs,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),f(qs,"href","#transformers.FlaxRoFormerForSequenceClassification"),f(ln,"class","relative group"),f(Xl,"href","/docs/transformers/main/en/main_classes/model#transformers.FlaxPreTrainedModel"),f(Mi,"href","https://flax.readthedocs.io/en/latest/flax.linen.html#module"),f(Mi,"rel","nofollow"),f(Ri,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),f(Ri,"rel","nofollow"),f(zi,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),f(zi,"rel","nofollow"),f(ji,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),f(ji,"rel","nofollow"),f(Ci,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),f(Ci,"rel","nofollow"),f(Qo,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(to,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(Ls,"id","transformers.FlaxRoFormerForMultipleChoice"),f(Ls,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),f(Ls,"href","#transformers.FlaxRoFormerForMultipleChoice"),f(cn,"class","relative group"),f(Yl,"href","/docs/transformers/main/en/main_classes/model#transformers.FlaxPreTrainedModel"),f(Di,"href","https://flax.readthedocs.io/en/latest/flax.linen.html#module"),f(Di,"rel","nofollow"),f(Ii,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),f(Ii,"rel","nofollow"),f(Ni,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),f(Ni,"rel","nofollow"),f(Si,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),f(Si,"rel","nofollow"),f(Wi,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),f(Wi,"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(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(Is,"id","transformers.FlaxRoFormerForTokenClassification"),f(Is,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),f(Is,"href","#transformers.FlaxRoFormerForTokenClassification"),f(mn,"class","relative group"),f(Zl,"href","/docs/transformers/main/en/main_classes/model#transformers.FlaxPreTrainedModel"),f(Vi,"href","https://flax.readthedocs.io/en/latest/flax.linen.html#module"),f(Vi,"rel","nofollow"),f(Ji,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),f(Ji,"rel","nofollow"),f(Gi,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),f(Gi,"rel","nofollow"),f(Xi,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),f(Xi,"rel","nofollow"),f(Yi,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),f(Yi,"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(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(Ws,"id","transformers.FlaxRoFormerForQuestionAnswering"),f(Ws,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),f(Ws,"href","#transformers.FlaxRoFormerForQuestionAnswering"),f(un,"class","relative group"),f(ed,"href","/docs/transformers/main/en/main_classes/model#transformers.FlaxPreTrainedModel"),f(sl,"href","https://flax.readthedocs.io/en/latest/flax.linen.html#module"),f(sl,"rel","nofollow"),f(rl,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),f(rl,"rel","nofollow"),f(al,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),f(al,"rel","nofollow"),f(il,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),f(il,"rel","nofollow"),f(ll,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),f(ll,"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(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(s,y){e(document.head,d),g(s,k,y),g(s,h,y),e(h,u),e(u,_),w(l,_,null),e(h,c),e(h,z),e(z,be),g(s,he,y),g(s,I,y),e(I,ae),e(ae,ee),w(E,ee,null),e(I,ve),e(I,Q),e(Q,we),g(s,ue,y),g(s,N,y),e(N,Te),e(N,ie),e(ie,V),e(N,$e),g(s,fe,y),g(s,W,y),e(W,xe),g(s,ge,y),g(s,U,y),e(U,ce),e(ce,Ee),g(s,te,y),g(s,C,y),e(C,A),g(s,_e,y),g(s,K,y),e(K,pe),e(pe,Me),g(s,H,y),g(s,ne,y),e(ne,Re),e(ne,q),e(q,ze),e(ne,J),e(ne,le),e(le,je),e(ne,G),g(s,ke,y),g(s,re,y),e(re,O),e(O,me),w(S,me,null),e(re,Ce),e(re,oe),e(oe,L),g(s,ye,y),g(s,P,y),w(de,P,null),e(P,qe),e(P,F),e(F,R),e(F,Se),e(Se,se),e(F,He),e(F,Ne),e(Ne,j),e(F,Ve),e(P,Je),e(P,Pe),e(Pe,Ge),e(Pe,We),e(We,D),e(Pe,X),e(Pe,Ue),e(Ue,Xe),e(Pe,Y),e(P,Ye),w(Le,P,null),g(s,Fe,y),g(s,Ae,y),e(Ae,Z),e(Z,Ke),w(fr,Ke,null),e(Ae,Wu),e(Ae,jd),e(jd,Uu),g(s,Hm,y),g(s,Ze,y),w(gr,Ze,null),e(Ze,Ku),e(Ze,_r),e(_r,Bu),e(_r,kr),e(kr,Qu),e(_r,Hu),e(Ze,Vu),e(Ze,yr),e(yr,Ju),e(yr,Fl),e(Fl,Gu),e(yr,Xu),e(Ze,Yu),w(vn,Ze,null),e(Ze,Zu),e(Ze,ft),w(Fr,ft,null),e(ft,ef),e(ft,Cd),e(Cd,of),e(ft,tf),e(ft,br),e(br,bl),e(bl,nf),e(bl,qd),e(qd,sf),e(br,rf),e(br,vl),e(vl,af),e(vl,Pd),e(Pd,lf),e(Ze,df),e(Ze,wn),w(vr,wn,null),e(wn,cf),e(wn,wr),e(wr,pf),e(wr,Ad),e(Ad,mf),e(wr,hf),e(Ze,uf),e(Ze,Ao),w(Tr,Ao,null),e(Ao,ff),e(Ao,Ld),e(Ld,gf),e(Ao,_f),w(Tn,Ao,null),e(Ao,kf),e(Ao,Tt),e(Tt,yf),e(Tt,Od),e(Od,Ff),e(Tt,bf),e(Tt,Dd),e(Dd,vf),e(Tt,wf),e(Ze,Tf),e(Ze,wl),w($r,wl,null),g(s,Vm,y),g(s,$t,y),e($t,$n),e($n,Id),w(xr,Id,null),e($t,$f),e($t,Nd),e(Nd,xf),g(s,Jm,y),g(s,io,y),w(Er,io,null),e(io,Ef),e(io,Mr),e(Mr,Mf),e(Mr,Sd),e(Sd,Rf),e(Mr,zf),e(io,jf),e(io,xn),e(xn,Tl),e(Tl,Cf),e(xn,qf),e(xn,$l),e($l,Pf),e(xn,Af),e(io,Lf),e(io,Rr),e(Rr,Of),e(Rr,xl),e(xl,Df),e(Rr,If),e(io,Nf),w(En,io,null),e(io,Sf),e(io,gt),w(zr,gt,null),e(gt,Wf),e(gt,Wd),e(Wd,Uf),e(gt,Kf),e(gt,jr),e(jr,El),e(El,Bf),e(El,Ud),e(Ud,Qf),e(jr,Hf),e(jr,Ml),e(Ml,Vf),e(Ml,Kd),e(Kd,Jf),g(s,Gm,y),g(s,xt,y),e(xt,Mn),e(Mn,Bd),w(Cr,Bd,null),e(xt,Gf),e(xt,Qd),e(Qd,Xf),g(s,Xm,y),g(s,_o,y),w(qr,_o,null),e(_o,Yf),e(_o,Pr),e(Pr,Zf),e(Pr,Ar),e(Ar,eg),e(Pr,og),e(_o,tg),e(_o,Lr),e(Lr,ng),e(Lr,Or),e(Or,sg),e(Lr,rg),e(_o,ag),e(_o,lo),e(lo,ig),e(lo,Hd),e(Hd,lg),e(lo,dg),e(lo,Vd),e(Vd,cg),e(lo,pg),e(lo,Jd),e(Jd,mg),e(lo,hg),e(lo,Gd),e(Gd,ug),e(lo,fg),e(lo,Xd),e(Xd,gg),e(lo,_g),e(lo,Yd),e(Yd,kg),e(lo,yg),e(_o,Fg),e(_o,Lo),w(Dr,Lo,null),e(Lo,bg),e(Lo,Et),e(Et,vg),e(Et,Rl),e(Rl,wg),e(Et,Tg),e(Et,Zd),e(Zd,$g),e(Et,xg),e(Lo,Eg),w(Rn,Lo,null),e(Lo,Mg),w(zn,Lo,null),g(s,Ym,y),g(s,Mt,y),e(Mt,jn),e(jn,ec),w(Ir,ec,null),e(Mt,Rg),e(Mt,oc),e(oc,zg),g(s,Zm,y),g(s,rt,y),w(Nr,rt,null),e(rt,jg),e(rt,Rt),e(Rt,Cg),e(Rt,tc),e(tc,qg),e(Rt,Pg),e(Rt,Sr),e(Sr,Ag),e(Rt,Lg),e(rt,Og),e(rt,Oo),w(Wr,Oo,null),e(Oo,Dg),e(Oo,zt),e(zt,Ig),e(zt,zl),e(zl,Ng),e(zt,Sg),e(zt,nc),e(nc,Wg),e(zt,Ug),e(Oo,Kg),w(Cn,Oo,null),e(Oo,Bg),w(qn,Oo,null),g(s,eh,y),g(s,jt,y),e(jt,Pn),e(Pn,sc),w(Ur,sc,null),e(jt,Qg),e(jt,rc),e(rc,Hg),g(s,oh,y),g(s,at,y),w(Kr,at,null),e(at,Vg),e(at,Ct),e(Ct,Jg),e(Ct,ac),e(ac,Gg),e(Ct,Xg),e(Ct,Br),e(Br,Yg),e(Ct,Zg),e(at,e_),e(at,Do),w(Qr,Do,null),e(Do,o_),e(Do,qt),e(qt,t_),e(qt,jl),e(jl,n_),e(qt,s_),e(qt,ic),e(ic,r_),e(qt,a_),e(Do,i_),w(An,Do,null),e(Do,l_),w(Ln,Do,null),g(s,th,y),g(s,Pt,y),e(Pt,On),e(On,lc),w(Hr,lc,null),e(Pt,d_),e(Pt,dc),e(dc,c_),g(s,nh,y),g(s,jo,y),w(Vr,jo,null),e(jo,p_),e(jo,cc),e(cc,m_),e(jo,h_),e(jo,Jr),e(Jr,u_),e(Jr,Gr),e(Gr,f_),e(Jr,g_),e(jo,__),e(jo,yo),w(Xr,yo,null),e(yo,k_),e(yo,At),e(At,y_),e(At,Cl),e(Cl,F_),e(At,b_),e(At,pc),e(pc,v_),e(At,w_),e(yo,T_),w(Dn,yo,null),e(yo,$_),w(In,yo,null),e(yo,x_),w(Nn,yo,null),g(s,sh,y),g(s,Lt,y),e(Lt,Sn),e(Sn,mc),w(Yr,mc,null),e(Lt,E_),e(Lt,hc),e(hc,M_),g(s,rh,y),g(s,Co,y),w(Zr,Co,null),e(Co,R_),e(Co,uc),e(uc,z_),e(Co,j_),e(Co,ea),e(ea,C_),e(ea,oa),e(oa,q_),e(ea,P_),e(Co,A_),e(Co,Io),w(ta,Io,null),e(Io,L_),e(Io,Ot),e(Ot,O_),e(Ot,ql),e(ql,D_),e(Ot,I_),e(Ot,fc),e(fc,N_),e(Ot,S_),e(Io,W_),w(Wn,Io,null),e(Io,U_),w(Un,Io,null),g(s,ah,y),g(s,Dt,y),e(Dt,Kn),e(Kn,gc),w(na,gc,null),e(Dt,K_),e(Dt,_c),e(_c,B_),g(s,ih,y),g(s,qo,y),w(sa,qo,null),e(qo,Q_),e(qo,kc),e(kc,H_),e(qo,V_),e(qo,ra),e(ra,J_),e(ra,aa),e(aa,G_),e(ra,X_),e(qo,Y_),e(qo,No),w(ia,No,null),e(No,Z_),e(No,It),e(It,ek),e(It,Pl),e(Pl,ok),e(It,tk),e(It,yc),e(yc,nk),e(It,sk),e(No,rk),w(Bn,No,null),e(No,ak),w(Qn,No,null),g(s,lh,y),g(s,Nt,y),e(Nt,Hn),e(Hn,Fc),w(la,Fc,null),e(Nt,ik),e(Nt,bc),e(bc,lk),g(s,dh,y),g(s,Po,y),w(da,Po,null),e(Po,dk),e(Po,St),e(St,ck),e(St,vc),e(vc,pk),e(St,mk),e(St,wc),e(wc,hk),e(St,uk),e(Po,fk),e(Po,ca),e(ca,gk),e(ca,pa),e(pa,_k),e(ca,kk),e(Po,yk),e(Po,So),w(ma,So,null),e(So,Fk),e(So,Wt),e(Wt,bk),e(Wt,Al),e(Al,vk),e(Wt,wk),e(Wt,Tc),e(Tc,Tk),e(Wt,$k),e(So,xk),w(Vn,So,null),e(So,Ek),w(Jn,So,null),g(s,ch,y),g(s,Ut,y),e(Ut,Gn),e(Gn,$c),w(ha,$c,null),e(Ut,Mk),e(Ut,xc),e(xc,Rk),g(s,ph,y),g(s,co,y),w(ua,co,null),e(co,zk),e(co,Ec),e(Ec,jk),e(co,Ck),e(co,fa),e(fa,qk),e(fa,Ll),e(Ll,Pk),e(fa,Ak),e(co,Lk),e(co,ga),e(ga,Ok),e(ga,_a),e(_a,Dk),e(ga,Ik),e(co,Nk),w(Xn,co,null),e(co,Sk),e(co,Wo),w(ka,Wo,null),e(Wo,Wk),e(Wo,Kt),e(Kt,Uk),e(Kt,Ol),e(Ol,Kk),e(Kt,Bk),e(Kt,Mc),e(Mc,Qk),e(Kt,Hk),e(Wo,Vk),w(Yn,Wo,null),e(Wo,Jk),w(Zn,Wo,null),g(s,mh,y),g(s,Bt,y),e(Bt,es),e(es,Rc),w(ya,Rc,null),e(Bt,Gk),e(Bt,zc),e(zc,Xk),g(s,hh,y),g(s,po,y),w(Fa,po,null),e(po,Yk),e(po,ba),e(ba,Zk),e(ba,jc),e(jc,ey),e(ba,oy),e(po,ty),e(po,va),e(va,ny),e(va,Dl),e(Dl,sy),e(va,ry),e(po,ay),e(po,wa),e(wa,iy),e(wa,Ta),e(Ta,ly),e(wa,dy),e(po,cy),w(os,po,null),e(po,py),e(po,Fo),w($a,Fo,null),e(Fo,my),e(Fo,Qt),e(Qt,hy),e(Qt,Il),e(Il,uy),e(Qt,fy),e(Qt,Cc),e(Cc,gy),e(Qt,_y),e(Fo,ky),w(ts,Fo,null),e(Fo,yy),w(ns,Fo,null),e(Fo,Fy),w(ss,Fo,null),g(s,uh,y),g(s,Ht,y),e(Ht,rs),e(rs,qc),w(xa,qc,null),e(Ht,by),e(Ht,Pc),e(Pc,vy),g(s,fh,y),g(s,mo,y),w(Ea,mo,null),e(mo,wy),e(mo,Ma),e(Ma,Ty),e(Ma,Ac),e(Ac,$y),e(Ma,xy),e(mo,Ey),e(mo,Ra),e(Ra,My),e(Ra,Nl),e(Nl,Ry),e(Ra,zy),e(mo,jy),e(mo,za),e(za,Cy),e(za,ja),e(ja,qy),e(za,Py),e(mo,Ay),w(as,mo,null),e(mo,Ly),e(mo,_t),w(Ca,_t,null),e(_t,Oy),e(_t,ko),e(ko,Dy),e(ko,Lc),e(Lc,Iy),e(ko,Ny),e(ko,Oc),e(Oc,Sy),e(ko,Wy),e(ko,Dc),e(Dc,Uy),e(ko,Ky),e(ko,Ic),e(Ic,By),e(ko,Qy),e(ko,Nc),e(Nc,Hy),e(ko,Vy),e(_t,Jy),w(is,_t,null),g(s,gh,y),g(s,Vt,y),e(Vt,ls),e(ls,Sc),w(qa,Sc,null),e(Vt,Gy),e(Vt,Wc),e(Wc,Xy),g(s,_h,y),g(s,ho,y),w(Pa,ho,null),e(ho,Yy),e(ho,Uc),e(Uc,Zy),e(ho,eF),e(ho,Aa),e(Aa,oF),e(Aa,Sl),e(Sl,tF),e(Aa,nF),e(ho,sF),e(ho,La),e(La,rF),e(La,Oa),e(Oa,aF),e(La,iF),e(ho,lF),w(ds,ho,null),e(ho,dF),e(ho,bo),w(Da,bo,null),e(bo,cF),e(bo,Jt),e(Jt,pF),e(Jt,Wl),e(Wl,mF),e(Jt,hF),e(Jt,Kc),e(Kc,uF),e(Jt,fF),e(bo,gF),w(cs,bo,null),e(bo,_F),w(ps,bo,null),e(bo,kF),w(ms,bo,null),g(s,kh,y),g(s,Gt,y),e(Gt,hs),e(hs,Bc),w(Ia,Bc,null),e(Gt,yF),e(Gt,Qc),e(Qc,FF),g(s,yh,y),g(s,uo,y),w(Na,uo,null),e(uo,bF),e(uo,Hc),e(Hc,vF),e(uo,wF),e(uo,Sa),e(Sa,TF),e(Sa,Ul),e(Ul,$F),e(Sa,xF),e(uo,EF),e(uo,Wa),e(Wa,MF),e(Wa,Ua),e(Ua,RF),e(Wa,zF),e(uo,jF),w(us,uo,null),e(uo,CF),e(uo,Uo),w(Ka,Uo,null),e(Uo,qF),e(Uo,Xt),e(Xt,PF),e(Xt,Kl),e(Kl,AF),e(Xt,LF),e(Xt,Vc),e(Vc,OF),e(Xt,DF),e(Uo,IF),w(fs,Uo,null),e(Uo,NF),w(gs,Uo,null),g(s,Fh,y),g(s,Yt,y),e(Yt,_s),e(_s,Jc),w(Ba,Jc,null),e(Yt,SF),e(Yt,Gc),e(Gc,WF),g(s,bh,y),g(s,fo,y),w(Qa,fo,null),e(fo,UF),e(fo,Xc),e(Xc,KF),e(fo,BF),e(fo,Ha),e(Ha,QF),e(Ha,Bl),e(Bl,HF),e(Ha,VF),e(fo,JF),e(fo,Va),e(Va,GF),e(Va,Ja),e(Ja,XF),e(Va,YF),e(fo,ZF),w(ks,fo,null),e(fo,eb),e(fo,vo),w(Ga,vo,null),e(vo,ob),e(vo,Zt),e(Zt,tb),e(Zt,Ql),e(Ql,nb),e(Zt,sb),e(Zt,Yc),e(Yc,rb),e(Zt,ab),e(vo,ib),w(ys,vo,null),e(vo,lb),w(Fs,vo,null),e(vo,db),w(bs,vo,null),g(s,vh,y),g(s,en,y),e(en,vs),e(vs,Zc),w(Xa,Zc,null),e(en,cb),e(en,ep),e(ep,pb),g(s,wh,y),g(s,go,y),w(Ya,go,null),e(go,mb),e(go,on),e(on,hb),e(on,op),e(op,ub),e(on,fb),e(on,tp),e(tp,gb),e(on,_b),e(go,kb),e(go,Za),e(Za,yb),e(Za,Hl),e(Hl,Fb),e(Za,bb),e(go,vb),e(go,ei),e(ei,wb),e(ei,oi),e(oi,Tb),e(ei,$b),e(go,xb),w(ws,go,null),e(go,Eb),e(go,wo),w(ti,wo,null),e(wo,Mb),e(wo,tn),e(tn,Rb),e(tn,Vl),e(Vl,zb),e(tn,jb),e(tn,np),e(np,Cb),e(tn,qb),e(wo,Pb),w(Ts,wo,null),e(wo,Ab),w($s,wo,null),e(wo,Lb),w(xs,wo,null),g(s,Th,y),g(s,nn,y),e(nn,Es),e(Es,sp),w(ni,sp,null),e(nn,Ob),e(nn,rp),e(rp,Db),g(s,$h,y),g(s,eo,y),w(si,eo,null),e(eo,Ib),e(eo,ap),e(ap,Nb),e(eo,Sb),e(eo,ri),e(ri,Wb),e(ri,Jl),e(Jl,Ub),e(ri,Kb),e(eo,Bb),e(eo,ai),e(ai,Qb),e(ai,ii),e(ii,Hb),e(ai,Vb),e(eo,Jb),e(eo,ip),e(ip,Gb),e(eo,Xb),e(eo,it),e(it,lp),e(lp,li),e(li,Yb),e(it,Zb),e(it,dp),e(dp,di),e(di,ev),e(it,ov),e(it,cp),e(cp,ci),e(ci,tv),e(it,nv),e(it,pp),e(pp,pi),e(pi,sv),e(eo,rv),e(eo,Ko),w(mi,Ko,null),e(Ko,av),e(Ko,sn),e(sn,iv),e(sn,mp),e(mp,lv),e(sn,dv),e(sn,hp),e(hp,cv),e(sn,pv),e(Ko,mv),w(Ms,Ko,null),e(Ko,hv),w(Rs,Ko,null),g(s,xh,y),g(s,rn,y),e(rn,zs),e(zs,up),w(hi,up,null),e(rn,uv),e(rn,fp),e(fp,fv),g(s,Eh,y),g(s,oo,y),w(ui,oo,null),e(oo,gv),e(oo,fi),e(fi,_v),e(fi,gp),e(gp,kv),e(fi,yv),e(oo,Fv),e(oo,gi),e(gi,bv),e(gi,Gl),e(Gl,vv),e(gi,wv),e(oo,Tv),e(oo,_i),e(_i,$v),e(_i,ki),e(ki,xv),e(_i,Ev),e(oo,Mv),e(oo,_p),e(_p,Rv),e(oo,zv),e(oo,lt),e(lt,kp),e(kp,yi),e(yi,jv),e(lt,Cv),e(lt,yp),e(yp,Fi),e(Fi,qv),e(lt,Pv),e(lt,Fp),e(Fp,bi),e(bi,Av),e(lt,Lv),e(lt,bp),e(bp,vi),e(vi,Ov),e(oo,Dv),e(oo,Bo),w(wi,Bo,null),e(Bo,Iv),e(Bo,an),e(an,Nv),e(an,vp),e(vp,Sv),e(an,Wv),e(an,wp),e(wp,Uv),e(an,Kv),e(Bo,Bv),w(js,Bo,null),e(Bo,Qv),w(Cs,Bo,null),g(s,Mh,y),g(s,ln,y),e(ln,qs),e(qs,Tp),w(Ti,Tp,null),e(ln,Hv),e(ln,$p),e($p,Vv),g(s,Rh,y),g(s,to,y),w($i,to,null),e(to,Jv),e(to,xp),e(xp,Gv),e(to,Xv),e(to,xi),e(xi,Yv),e(xi,Xl),e(Xl,Zv),e(xi,ew),e(to,ow),e(to,Ei),e(Ei,tw),e(Ei,Mi),e(Mi,nw),e(Ei,sw),e(to,rw),e(to,Ep),e(Ep,aw),e(to,iw),e(to,dt),e(dt,Mp),e(Mp,Ri),e(Ri,lw),e(dt,dw),e(dt,Rp),e(Rp,zi),e(zi,cw),e(dt,pw),e(dt,zp),e(zp,ji),e(ji,mw),e(dt,hw),e(dt,jp),e(jp,Ci),e(Ci,uw),e(to,fw),e(to,Qo),w(qi,Qo,null),e(Qo,gw),e(Qo,dn),e(dn,_w),e(dn,Cp),e(Cp,kw),e(dn,yw),e(dn,qp),e(qp,Fw),e(dn,bw),e(Qo,vw),w(Ps,Qo,null),e(Qo,ww),w(As,Qo,null),g(s,zh,y),g(s,cn,y),e(cn,Ls),e(Ls,Pp),w(Pi,Pp,null),e(cn,Tw),e(cn,Ap),e(Ap,$w),g(s,jh,y),g(s,no,y),w(Ai,no,null),e(no,xw),e(no,Lp),e(Lp,Ew),e(no,Mw),e(no,Li),e(Li,Rw),e(Li,Yl),e(Yl,zw),e(Li,jw),e(no,Cw),e(no,Oi),e(Oi,qw),e(Oi,Di),e(Di,Pw),e(Oi,Aw),e(no,Lw),e(no,Op),e(Op,Ow),e(no,Dw),e(no,ct),e(ct,Dp),e(Dp,Ii),e(Ii,Iw),e(ct,Nw),e(ct,Ip),e(Ip,Ni),e(Ni,Sw),e(ct,Ww),e(ct,Np),e(Np,Si),e(Si,Uw),e(ct,Kw),e(ct,Sp),e(Sp,Wi),e(Wi,Bw),e(no,Qw),e(no,Ho),w(Ui,Ho,null),e(Ho,Hw),e(Ho,pn),e(pn,Vw),e(pn,Wp),e(Wp,Jw),e(pn,Gw),e(pn,Up),e(Up,Xw),e(pn,Yw),e(Ho,Zw),w(Os,Ho,null),e(Ho,eT),w(Ds,Ho,null),g(s,Ch,y),g(s,mn,y),e(mn,Is),e(Is,Kp),w(Ki,Kp,null),e(mn,oT),e(mn,Bp),e(Bp,tT),g(s,qh,y),g(s,so,y),w(Bi,so,null),e(so,nT),e(so,Qp),e(Qp,sT),e(so,rT),e(so,Qi),e(Qi,aT),e(Qi,Zl),e(Zl,iT),e(Qi,lT),e(so,dT),e(so,Hi),e(Hi,cT),e(Hi,Vi),e(Vi,pT),e(Hi,mT),e(so,hT),e(so,Hp),e(Hp,uT),e(so,fT),e(so,pt),e(pt,Vp),e(Vp,Ji),e(Ji,gT),e(pt,_T),e(pt,Jp),e(Jp,Gi),e(Gi,kT),e(pt,yT),e(pt,Gp),e(Gp,Xi),e(Xi,FT),e(pt,bT),e(pt,Xp),e(Xp,Yi),e(Yi,vT),e(so,wT),e(so,Vo),w(Zi,Vo,null),e(Vo,TT),e(Vo,hn),e(hn,$T),e(hn,Yp),e(Yp,xT),e(hn,ET),e(hn,Zp),e(Zp,MT),e(hn,RT),e(Vo,zT),w(Ns,Vo,null),e(Vo,jT),w(Ss,Vo,null),g(s,Ph,y),g(s,un,y),e(un,Ws),e(Ws,em),w(el,em,null),e(un,CT),e(un,om),e(om,qT),g(s,Ah,y),g(s,ro,y),w(ol,ro,null),e(ro,PT),e(ro,fn),e(fn,AT),e(fn,tm),e(tm,LT),e(fn,OT),e(fn,nm),e(nm,DT),e(fn,IT),e(ro,NT),e(ro,tl),e(tl,ST),e(tl,ed),e(ed,WT),e(tl,UT),e(ro,KT),e(ro,nl),e(nl,BT),e(nl,sl),e(sl,QT),e(nl,HT),e(ro,VT),e(ro,sm),e(sm,JT),e(ro,GT),e(ro,mt),e(mt,rm),e(rm,rl),e(rl,XT),e(mt,YT),e(mt,am),e(am,al),e(al,ZT),e(mt,e$),e(mt,im),e(im,il),e(il,o$),e(mt,t$),e(mt,lm),e(lm,ll),e(ll,n$),e(ro,s$),e(ro,Jo),w(dl,Jo,null),e(Jo,r$),e(Jo,gn),e(gn,a$),e(gn,dm),e(dm,i$),e(gn,l$),e(gn,cm),e(cm,d$),e(gn,c$),e(Jo,p$),w(Us,Jo,null),e(Jo,m$),w(Ks,Jo,null),Lh=!0},p(s,[y]){const cl={};y&2&&(cl.$$scope={dirty:y,ctx:s}),Le.$set(cl);const pm={};y&2&&(pm.$$scope={dirty:y,ctx:s}),vn.$set(pm);const mm={};y&2&&(mm.$$scope={dirty:y,ctx:s}),Tn.$set(mm);const hm={};y&2&&(hm.$$scope={dirty:y,ctx:s}),En.$set(hm);const pl={};y&2&&(pl.$$scope={dirty:y,ctx:s}),Rn.$set(pl);const um={};y&2&&(um.$$scope={dirty:y,ctx:s}),zn.$set(um);const fm={};y&2&&(fm.$$scope={dirty:y,ctx:s}),Cn.$set(fm);const gm={};y&2&&(gm.$$scope={dirty:y,ctx:s}),qn.$set(gm);const ml={};y&2&&(ml.$$scope={dirty:y,ctx:s}),An.$set(ml);const _m={};y&2&&(_m.$$scope={dirty:y,ctx:s}),Ln.$set(_m);const km={};y&2&&(km.$$scope={dirty:y,ctx:s}),Dn.$set(km);const ym={};y&2&&(ym.$$scope={dirty:y,ctx:s}),In.$set(ym);const Fm={};y&2&&(Fm.$$scope={dirty:y,ctx:s}),Nn.$set(Fm);const bm={};y&2&&(bm.$$scope={dirty:y,ctx:s}),Wn.$set(bm);const vm={};y&2&&(vm.$$scope={dirty:y,ctx:s}),Un.$set(vm);const wm={};y&2&&(wm.$$scope={dirty:y,ctx:s}),Bn.$set(wm);const _n={};y&2&&(_n.$$scope={dirty:y,ctx:s}),Qn.$set(_n);const Tm={};y&2&&(Tm.$$scope={dirty:y,ctx:s}),Vn.$set(Tm);const $m={};y&2&&($m.$$scope={dirty:y,ctx:s}),Jn.$set($m);const hl={};y&2&&(hl.$$scope={dirty:y,ctx:s}),Xn.$set(hl);const xm={};y&2&&(xm.$$scope={dirty:y,ctx:s}),Yn.$set(xm);const Em={};y&2&&(Em.$$scope={dirty:y,ctx:s}),Zn.$set(Em);const Mm={};y&2&&(Mm.$$scope={dirty:y,ctx:s}),os.$set(Mm);const ht={};y&2&&(ht.$$scope={dirty:y,ctx:s}),ts.$set(ht);const kn={};y&2&&(kn.$$scope={dirty:y,ctx:s}),ns.$set(kn);const Rm={};y&2&&(Rm.$$scope={dirty:y,ctx:s}),ss.$set(Rm);const zm={};y&2&&(zm.$$scope={dirty:y,ctx:s}),as.$set(zm);const yn={};y&2&&(yn.$$scope={dirty:y,ctx:s}),is.$set(yn);const jm={};y&2&&(jm.$$scope={dirty:y,ctx:s}),ds.$set(jm);const Cm={};y&2&&(Cm.$$scope={dirty:y,ctx:s}),cs.$set(Cm);const ul={};y&2&&(ul.$$scope={dirty:y,ctx:s}),ps.$set(ul);const qm={};y&2&&(qm.$$scope={dirty:y,ctx:s}),ms.$set(qm);const Pm={};y&2&&(Pm.$$scope={dirty:y,ctx:s}),us.$set(Pm);const Am={};y&2&&(Am.$$scope={dirty:y,ctx:s}),fs.$set(Am);const ao={};y&2&&(ao.$$scope={dirty:y,ctx:s}),gs.$set(ao);const fl={};y&2&&(fl.$$scope={dirty:y,ctx:s}),ks.$set(fl);const Lm={};y&2&&(Lm.$$scope={dirty:y,ctx:s}),ys.$set(Lm);const gl={};y&2&&(gl.$$scope={dirty:y,ctx:s}),Fs.$set(gl);const Om={};y&2&&(Om.$$scope={dirty:y,ctx:s}),bs.$set(Om);const Fn={};y&2&&(Fn.$$scope={dirty:y,ctx:s}),ws.$set(Fn);const Dm={};y&2&&(Dm.$$scope={dirty:y,ctx:s}),Ts.$set(Dm);const _l={};y&2&&(_l.$$scope={dirty:y,ctx:s}),$s.$set(_l);const od={};y&2&&(od.$$scope={dirty:y,ctx:s}),xs.$set(od);const Im={};y&2&&(Im.$$scope={dirty:y,ctx:s}),Ms.$set(Im);const td={};y&2&&(td.$$scope={dirty:y,ctx:s}),Rs.$set(td);const Nm={};y&2&&(Nm.$$scope={dirty:y,ctx:s}),js.$set(Nm);const kl={};y&2&&(kl.$$scope={dirty:y,ctx:s}),Cs.$set(kl);const yl={};y&2&&(yl.$$scope={dirty:y,ctx:s}),Ps.$set(yl);const Sm={};y&2&&(Sm.$$scope={dirty:y,ctx:s}),As.$set(Sm);const ut={};y&2&&(ut.$$scope={dirty:y,ctx:s}),Os.$set(ut);const Wm={};y&2&&(Wm.$$scope={dirty:y,ctx:s}),Ds.$set(Wm);const bn={};y&2&&(bn.$$scope={dirty:y,ctx:s}),Ns.$set(bn);const Um={};y&2&&(Um.$$scope={dirty:y,ctx:s}),Ss.$set(Um);const Km={};y&2&&(Km.$$scope={dirty:y,ctx:s}),Us.$set(Km);const Bm={};y&2&&(Bm.$$scope={dirty:y,ctx:s}),Ks.$set(Bm)},i(s){Lh||(T(l.$$.fragment,s),T(E.$$.fragment,s),T(S.$$.fragment,s),T(de.$$.fragment,s),T(Le.$$.fragment,s),T(fr.$$.fragment,s),T(gr.$$.fragment,s),T(vn.$$.fragment,s),T(Fr.$$.fragment,s),T(vr.$$.fragment,s),T(Tr.$$.fragment,s),T(Tn.$$.fragment,s),T($r.$$.fragment,s),T(xr.$$.fragment,s),T(Er.$$.fragment,s),T(En.$$.fragment,s),T(zr.$$.fragment,s),T(Cr.$$.fragment,s),T(qr.$$.fragment,s),T(Dr.$$.fragment,s),T(Rn.$$.fragment,s),T(zn.$$.fragment,s),T(Ir.$$.fragment,s),T(Nr.$$.fragment,s),T(Wr.$$.fragment,s),T(Cn.$$.fragment,s),T(qn.$$.fragment,s),T(Ur.$$.fragment,s),T(Kr.$$.fragment,s),T(Qr.$$.fragment,s),T(An.$$.fragment,s),T(Ln.$$.fragment,s),T(Hr.$$.fragment,s),T(Vr.$$.fragment,s),T(Xr.$$.fragment,s),T(Dn.$$.fragment,s),T(In.$$.fragment,s),T(Nn.$$.fragment,s),T(Yr.$$.fragment,s),T(Zr.$$.fragment,s),T(ta.$$.fragment,s),T(Wn.$$.fragment,s),T(Un.$$.fragment,s),T(na.$$.fragment,s),T(sa.$$.fragment,s),T(ia.$$.fragment,s),T(Bn.$$.fragment,s),T(Qn.$$.fragment,s),T(la.$$.fragment,s),T(da.$$.fragment,s),T(ma.$$.fragment,s),T(Vn.$$.fragment,s),T(Jn.$$.fragment,s),T(ha.$$.fragment,s),T(ua.$$.fragment,s),T(Xn.$$.fragment,s),T(ka.$$.fragment,s),T(Yn.$$.fragment,s),T(Zn.$$.fragment,s),T(ya.$$.fragment,s),T(Fa.$$.fragment,s),T(os.$$.fragment,s),T($a.$$.fragment,s),T(ts.$$.fragment,s),T(ns.$$.fragment,s),T(ss.$$.fragment,s),T(xa.$$.fragment,s),T(Ea.$$.fragment,s),T(as.$$.fragment,s),T(Ca.$$.fragment,s),T(is.$$.fragment,s),T(qa.$$.fragment,s),T(Pa.$$.fragment,s),T(ds.$$.fragment,s),T(Da.$$.fragment,s),T(cs.$$.fragment,s),T(ps.$$.fragment,s),T(ms.$$.fragment,s),T(Ia.$$.fragment,s),T(Na.$$.fragment,s),T(us.$$.fragment,s),T(Ka.$$.fragment,s),T(fs.$$.fragment,s),T(gs.$$.fragment,s),T(Ba.$$.fragment,s),T(Qa.$$.fragment,s),T(ks.$$.fragment,s),T(Ga.$$.fragment,s),T(ys.$$.fragment,s),T(Fs.$$.fragment,s),T(bs.$$.fragment,s),T(Xa.$$.fragment,s),T(Ya.$$.fragment,s),T(ws.$$.fragment,s),T(ti.$$.fragment,s),T(Ts.$$.fragment,s),T($s.$$.fragment,s),T(xs.$$.fragment,s),T(ni.$$.fragment,s),T(si.$$.fragment,s),T(mi.$$.fragment,s),T(Ms.$$.fragment,s),T(Rs.$$.fragment,s),T(hi.$$.fragment,s),T(ui.$$.fragment,s),T(wi.$$.fragment,s),T(js.$$.fragment,s),T(Cs.$$.fragment,s),T(Ti.$$.fragment,s),T($i.$$.fragment,s),T(qi.$$.fragment,s),T(Ps.$$.fragment,s),T(As.$$.fragment,s),T(Pi.$$.fragment,s),T(Ai.$$.fragment,s),T(Ui.$$.fragment,s),T(Os.$$.fragment,s),T(Ds.$$.fragment,s),T(Ki.$$.fragment,s),T(Bi.$$.fragment,s),T(Zi.$$.fragment,s),T(Ns.$$.fragment,s),T(Ss.$$.fragment,s),T(el.$$.fragment,s),T(ol.$$.fragment,s),T(dl.$$.fragment,s),T(Us.$$.fragment,s),T(Ks.$$.fragment,s),Lh=!0)},o(s){$(l.$$.fragment,s),$(E.$$.fragment,s),$(S.$$.fragment,s),$(de.$$.fragment,s),$(Le.$$.fragment,s),$(fr.$$.fragment,s),$(gr.$$.fragment,s),$(vn.$$.fragment,s),$(Fr.$$.fragment,s),$(vr.$$.fragment,s),$(Tr.$$.fragment,s),$(Tn.$$.fragment,s),$($r.$$.fragment,s),$(xr.$$.fragment,s),$(Er.$$.fragment,s),$(En.$$.fragment,s),$(zr.$$.fragment,s),$(Cr.$$.fragment,s),$(qr.$$.fragment,s),$(Dr.$$.fragment,s),$(Rn.$$.fragment,s),$(zn.$$.fragment,s),$(Ir.$$.fragment,s),$(Nr.$$.fragment,s),$(Wr.$$.fragment,s),$(Cn.$$.fragment,s),$(qn.$$.fragment,s),$(Ur.$$.fragment,s),$(Kr.$$.fragment,s),$(Qr.$$.fragment,s),$(An.$$.fragment,s),$(Ln.$$.fragment,s),$(Hr.$$.fragment,s),$(Vr.$$.fragment,s),$(Xr.$$.fragment,s),$(Dn.$$.fragment,s),$(In.$$.fragment,s),$(Nn.$$.fragment,s),$(Yr.$$.fragment,s),$(Zr.$$.fragment,s),$(ta.$$.fragment,s),$(Wn.$$.fragment,s),$(Un.$$.fragment,s),$(na.$$.fragment,s),$(sa.$$.fragment,s),$(ia.$$.fragment,s),$(Bn.$$.fragment,s),$(Qn.$$.fragment,s),$(la.$$.fragment,s),$(da.$$.fragment,s),$(ma.$$.fragment,s),$(Vn.$$.fragment,s),$(Jn.$$.fragment,s),$(ha.$$.fragment,s),$(ua.$$.fragment,s),$(Xn.$$.fragment,s),$(ka.$$.fragment,s),$(Yn.$$.fragment,s),$(Zn.$$.fragment,s),$(ya.$$.fragment,s),$(Fa.$$.fragment,s),$(os.$$.fragment,s),$($a.$$.fragment,s),$(ts.$$.fragment,s),$(ns.$$.fragment,s),$(ss.$$.fragment,s),$(xa.$$.fragment,s),$(Ea.$$.fragment,s),$(as.$$.fragment,s),$(Ca.$$.fragment,s),$(is.$$.fragment,s),$(qa.$$.fragment,s),$(Pa.$$.fragment,s),$(ds.$$.fragment,s),$(Da.$$.fragment,s),$(cs.$$.fragment,s),$(ps.$$.fragment,s),$(ms.$$.fragment,s),$(Ia.$$.fragment,s),$(Na.$$.fragment,s),$(us.$$.fragment,s),$(Ka.$$.fragment,s),$(fs.$$.fragment,s),$(gs.$$.fragment,s),$(Ba.$$.fragment,s),$(Qa.$$.fragment,s),$(ks.$$.fragment,s),$(Ga.$$.fragment,s),$(ys.$$.fragment,s),$(Fs.$$.fragment,s),$(bs.$$.fragment,s),$(Xa.$$.fragment,s),$(Ya.$$.fragment,s),$(ws.$$.fragment,s),$(ti.$$.fragment,s),$(Ts.$$.fragment,s),$($s.$$.fragment,s),$(xs.$$.fragment,s),$(ni.$$.fragment,s),$(si.$$.fragment,s),$(mi.$$.fragment,s),$(Ms.$$.fragment,s),$(Rs.$$.fragment,s),$(hi.$$.fragment,s),$(ui.$$.fragment,s),$(wi.$$.fragment,s),$(js.$$.fragment,s),$(Cs.$$.fragment,s),$(Ti.$$.fragment,s),$($i.$$.fragment,s),$(qi.$$.fragment,s),$(Ps.$$.fragment,s),$(As.$$.fragment,s),$(Pi.$$.fragment,s),$(Ai.$$.fragment,s),$(Ui.$$.fragment,s),$(Os.$$.fragment,s),$(Ds.$$.fragment,s),$(Ki.$$.fragment,s),$(Bi.$$.fragment,s),$(Zi.$$.fragment,s),$(Ns.$$.fragment,s),$(Ss.$$.fragment,s),$(el.$$.fragment,s),$(ol.$$.fragment,s),$(dl.$$.fragment,s),$(Us.$$.fragment,s),$(Ks.$$.fragment,s),Lh=!1},d(s){o(d),s&&o(k),s&&o(h),x(l),s&&o(he),s&&o(I),x(E),s&&o(ue),s&&o(N),s&&o(fe),s&&o(W),s&&o(ge),s&&o(U),s&&o(te),s&&o(C),s&&o(_e),s&&o(K),s&&o(H),s&&o(ne),s&&o(ke),s&&o(re),x(S),s&&o(ye),s&&o(P),x(de),x(Le),s&&o(Fe),s&&o(Ae),x(fr),s&&o(Hm),s&&o(Ze),x(gr),x(vn),x(Fr),x(vr),x(Tr),x(Tn),x($r),s&&o(Vm),s&&o($t),x(xr),s&&o(Jm),s&&o(io),x(Er),x(En),x(zr),s&&o(Gm),s&&o(xt),x(Cr),s&&o(Xm),s&&o(_o),x(qr),x(Dr),x(Rn),x(zn),s&&o(Ym),s&&o(Mt),x(Ir),s&&o(Zm),s&&o(rt),x(Nr),x(Wr),x(Cn),x(qn),s&&o(eh),s&&o(jt),x(Ur),s&&o(oh),s&&o(at),x(Kr),x(Qr),x(An),x(Ln),s&&o(th),s&&o(Pt),x(Hr),s&&o(nh),s&&o(jo),x(Vr),x(Xr),x(Dn),x(In),x(Nn),s&&o(sh),s&&o(Lt),x(Yr),s&&o(rh),s&&o(Co),x(Zr),x(ta),x(Wn),x(Un),s&&o(ah),s&&o(Dt),x(na),s&&o(ih),s&&o(qo),x(sa),x(ia),x(Bn),x(Qn),s&&o(lh),s&&o(Nt),x(la),s&&o(dh),s&&o(Po),x(da),x(ma),x(Vn),x(Jn),s&&o(ch),s&&o(Ut),x(ha),s&&o(ph),s&&o(co),x(ua),x(Xn),x(ka),x(Yn),x(Zn),s&&o(mh),s&&o(Bt),x(ya),s&&o(hh),s&&o(po),x(Fa),x(os),x($a),x(ts),x(ns),x(ss),s&&o(uh),s&&o(Ht),x(xa),s&&o(fh),s&&o(mo),x(Ea),x(as),x(Ca),x(is),s&&o(gh),s&&o(Vt),x(qa),s&&o(_h),s&&o(ho),x(Pa),x(ds),x(Da),x(cs),x(ps),x(ms),s&&o(kh),s&&o(Gt),x(Ia),s&&o(yh),s&&o(uo),x(Na),x(us),x(Ka),x(fs),x(gs),s&&o(Fh),s&&o(Yt),x(Ba),s&&o(bh),s&&o(fo),x(Qa),x(ks),x(Ga),x(ys),x(Fs),x(bs),s&&o(vh),s&&o(en),x(Xa),s&&o(wh),s&&o(go),x(Ya),x(ws),x(ti),x(Ts),x($s),x(xs),s&&o(Th),s&&o(nn),x(ni),s&&o($h),s&&o(eo),x(si),x(mi),x(Ms),x(Rs),s&&o(xh),s&&o(rn),x(hi),s&&o(Eh),s&&o(oo),x(ui),x(wi),x(js),x(Cs),s&&o(Mh),s&&o(ln),x(Ti),s&&o(Rh),s&&o(to),x($i),x(qi),x(Ps),x(As),s&&o(zh),s&&o(cn),x(Pi),s&&o(jh),s&&o(no),x(Ai),x(Ui),x(Os),x(Ds),s&&o(Ch),s&&o(mn),x(Ki),s&&o(qh),s&&o(so),x(Bi),x(Zi),x(Ns),x(Ss),s&&o(Ph),s&&o(un),x(el),s&&o(Ah),s&&o(ro),x(ol),x(dl),x(Us),x(Ks)}}}const AE={local:"roformer",sections:[{local:"overview",title:"Overview"},{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 LE(M){return Cx(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class UE extends Mx{constructor(d){super();Rx(this,d,LE,PE,zx,{})}}export{UE as default,AE as metadata};
