import{S as WT,i as UT,s as KT,e as s,k as m,w as v,t as o,M as HT,c as r,d as t,m as h,a,x as w,h as n,b as g,G as e,g as _,y as $,q as F,o as E,B as R,v as QT,L as Xe}from"../../chunks/vendor-hf-doc-builder.js";import{T as Ze}from"../../chunks/Tip-hf-doc-builder.js";import{D as se}from"../../chunks/Docstring-hf-doc-builder.js";import{C as Ye}from"../../chunks/CodeBlock-hf-doc-builder.js";import{I as tt}from"../../chunks/IconCopyLink-hf-doc-builder.js";import{E as Ge}from"../../chunks/ExampleCodeBlock-hf-doc-builder.js";function VT(z){let d,k,p,u,b;return u=new Ye({props:{code:`from transformers import RemBertModel, RemBertConfig

# Initializing a RemBERT rembert style configuration
configuration = RemBertConfig()

# Initializing a model from the rembert style configuration
model = RemBertModel(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> RemBertModel, RemBertConfig

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a RemBERT rembert style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = RemBertConfig()

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

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Accessing the model configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = model.config`}}),{c(){d=s("p"),k=o("Example:"),p=m(),v(u.$$.fragment)},l(l){d=r(l,"P",{});var c=a(d);k=n(c,"Example:"),c.forEach(t),p=h(l),w(u.$$.fragment,l)},m(l,c){_(l,d,c),e(d,k),_(l,p,c),$(u,l,c),b=!0},p:Xe,i(l){b||(F(u.$$.fragment,l),b=!0)},o(l){E(u.$$.fragment,l),b=!1},d(l){l&&t(d),l&&t(p),R(u,l)}}}function JT(z){let d,k,p,u,b;return u=new Ye({props:{code:`0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1
| first sequence    | second sequence |`,highlighted:`0<span class="hljs-number"> 0 </span>0<span class="hljs-number"> 0 </span>0<span class="hljs-number"> 0 </span>0<span class="hljs-number"> 0 </span>0<span class="hljs-number"> 0 </span>0<span class="hljs-number"> 1 </span>1<span class="hljs-number"> 1 </span>1<span class="hljs-number"> 1 </span>1<span class="hljs-number"> 1 </span>1 1
| first sequence    | second sequence |`}}),{c(){d=s("p"),k=o("sequence pair mask has the following format:"),p=m(),v(u.$$.fragment)},l(l){d=r(l,"P",{});var c=a(d);k=n(c,"sequence pair mask has the following format:"),c.forEach(t),p=h(l),w(u.$$.fragment,l)},m(l,c){_(l,d,c),e(d,k),_(l,p,c),$(u,l,c),b=!0},p:Xe,i(l){b||(F(u.$$.fragment,l),b=!0)},o(l){E(u.$$.fragment,l),b=!1},d(l){l&&t(d),l&&t(p),R(u,l)}}}function GT(z){let d,k,p,u,b;return u=new Ye({props:{code:`0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1
| first sequence    | second sequence |`,highlighted:`0<span class="hljs-number"> 0 </span>0<span class="hljs-number"> 0 </span>0<span class="hljs-number"> 0 </span>0<span class="hljs-number"> 0 </span>0<span class="hljs-number"> 0 </span>0<span class="hljs-number"> 1 </span>1<span class="hljs-number"> 1 </span>1<span class="hljs-number"> 1 </span>1<span class="hljs-number"> 1 </span>1 1
| first sequence    | second sequence |`}}),{c(){d=s("p"),k=o("sequence pair mask has the following format:"),p=m(),v(u.$$.fragment)},l(l){d=r(l,"P",{});var c=a(d);k=n(c,"sequence pair mask has the following format:"),c.forEach(t),p=h(l),w(u.$$.fragment,l)},m(l,c){_(l,d,c),e(d,k),_(l,p,c),$(u,l,c),b=!0},p:Xe,i(l){b||(F(u.$$.fragment,l),b=!0)},o(l){E(u.$$.fragment,l),b=!1},d(l){l&&t(d),l&&t(p),R(u,l)}}}function XT(z){let d,k,p,u,b;return{c(){d=s("p"),k=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),p=s("code"),u=o("Module"),b=o(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){d=r(l,"P",{});var c=a(d);k=n(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),p=r(c,"CODE",{});var C=a(p);u=n(C,"Module"),C.forEach(t),b=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(t)},m(l,c){_(l,d,c),e(d,k),e(d,p),e(p,u),e(d,b)},d(l){l&&t(d)}}}function YT(z){let d,k,p,u,b;return u=new Ye({props:{code:`from transformers import AutoTokenizer, RemBertModel
import torch

tokenizer = AutoTokenizer.from_pretrained("google/rembert")
model = RemBertModel.from_pretrained("google/rembert")

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, RemBertModel
<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;google/rembert&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = RemBertModel.from_pretrained(<span class="hljs-string">&quot;google/rembert&quot;</span>)

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

<span class="hljs-meta">&gt;&gt;&gt; </span>last_hidden_states = outputs.last_hidden_state`}}),{c(){d=s("p"),k=o("Example:"),p=m(),v(u.$$.fragment)},l(l){d=r(l,"P",{});var c=a(d);k=n(c,"Example:"),c.forEach(t),p=h(l),w(u.$$.fragment,l)},m(l,c){_(l,d,c),e(d,k),_(l,p,c),$(u,l,c),b=!0},p:Xe,i(l){b||(F(u.$$.fragment,l),b=!0)},o(l){E(u.$$.fragment,l),b=!1},d(l){l&&t(d),l&&t(p),R(u,l)}}}function ZT(z){let d,k,p,u,b;return{c(){d=s("p"),k=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),p=s("code"),u=o("Module"),b=o(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){d=r(l,"P",{});var c=a(d);k=n(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),p=r(c,"CODE",{});var C=a(p);u=n(C,"Module"),C.forEach(t),b=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(t)},m(l,c){_(l,d,c),e(d,k),e(d,p),e(p,u),e(d,b)},d(l){l&&t(d)}}}function ev(z){let d,k,p,u,b;return u=new Ye({props:{code:`from transformers import AutoTokenizer, RemBertForCausalLM, RemBertConfig
import torch

tokenizer = AutoTokenizer.from_pretrained("google/rembert")
config = RemBertConfig.from_pretrained("google/rembert")
config.is_decoder = True
model = RemBertForCausalLM.from_pretrained("google/rembert", config=config)

inputs = tokenizer("Hello, my dog is cute", 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, RemBertForCausalLM, RemBertConfig
<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;google/rembert&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>config = RemBertConfig.from_pretrained(<span class="hljs-string">&quot;google/rembert&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 = RemBertForCausalLM.from_pretrained(<span class="hljs-string">&quot;google/rembert&quot;</span>, config=config)

<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>prediction_logits = outputs.logits`}}),{c(){d=s("p"),k=o("Example:"),p=m(),v(u.$$.fragment)},l(l){d=r(l,"P",{});var c=a(d);k=n(c,"Example:"),c.forEach(t),p=h(l),w(u.$$.fragment,l)},m(l,c){_(l,d,c),e(d,k),_(l,p,c),$(u,l,c),b=!0},p:Xe,i(l){b||(F(u.$$.fragment,l),b=!0)},o(l){E(u.$$.fragment,l),b=!1},d(l){l&&t(d),l&&t(p),R(u,l)}}}function tv(z){let d,k,p,u,b;return{c(){d=s("p"),k=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),p=s("code"),u=o("Module"),b=o(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){d=r(l,"P",{});var c=a(d);k=n(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),p=r(c,"CODE",{});var C=a(p);u=n(C,"Module"),C.forEach(t),b=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(t)},m(l,c){_(l,d,c),e(d,k),e(d,p),e(p,u),e(d,b)},d(l){l&&t(d)}}}function ov(z){let d,k,p,u,b;return u=new Ye({props:{code:`from transformers import AutoTokenizer, RemBertForMaskedLM
import torch

tokenizer = AutoTokenizer.from_pretrained("google/rembert")
model = RemBertForMaskedLM.from_pretrained("google/rembert")

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, RemBertForMaskedLM
<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;google/rembert&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = RemBertForMaskedLM.from_pretrained(<span class="hljs-string">&quot;google/rembert&quot;</span>)

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

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

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

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

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

<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs, labels=labels)`}}),{c(){d=s("p"),k=o("Example:"),p=m(),v(u.$$.fragment)},l(l){d=r(l,"P",{});var c=a(d);k=n(c,"Example:"),c.forEach(t),p=h(l),w(u.$$.fragment,l)},m(l,c){_(l,d,c),e(d,k),_(l,p,c),$(u,l,c),b=!0},p:Xe,i(l){b||(F(u.$$.fragment,l),b=!0)},o(l){E(u.$$.fragment,l),b=!1},d(l){l&&t(d),l&&t(p),R(u,l)}}}function nv(z){let d,k,p,u,b;return{c(){d=s("p"),k=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),p=s("code"),u=o("Module"),b=o(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){d=r(l,"P",{});var c=a(d);k=n(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),p=r(c,"CODE",{});var C=a(p);u=n(C,"Module"),C.forEach(t),b=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(t)},m(l,c){_(l,d,c),e(d,k),e(d,p),e(p,u),e(d,b)},d(l){l&&t(d)}}}function sv(z){let d,k,p,u,b;return u=new Ye({props:{code:`import torch
from transformers import AutoTokenizer, RemBertForSequenceClassification

tokenizer = AutoTokenizer.from_pretrained("google/rembert")
model = RemBertForSequenceClassification.from_pretrained("google/rembert")

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 = RemBertForSequenceClassification.from_pretrained("google/rembert", 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, RemBertForSequenceClassification

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;google/rembert&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = RemBertForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;google/rembert&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 = RemBertForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;google/rembert&quot;</span>, num_labels=num_labels)

<span class="hljs-meta">&gt;&gt;&gt; </span>labels = torch.tensor([<span class="hljs-number">1</span>])
<span class="hljs-meta">&gt;&gt;&gt; </span>loss = model(**inputs, labels=labels).loss`}}),{c(){d=s("p"),k=o("Example of single-label classification:"),p=m(),v(u.$$.fragment)},l(l){d=r(l,"P",{});var c=a(d);k=n(c,"Example of single-label classification:"),c.forEach(t),p=h(l),w(u.$$.fragment,l)},m(l,c){_(l,d,c),e(d,k),_(l,p,c),$(u,l,c),b=!0},p:Xe,i(l){b||(F(u.$$.fragment,l),b=!0)},o(l){E(u.$$.fragment,l),b=!1},d(l){l&&t(d),l&&t(p),R(u,l)}}}function rv(z){let d,k,p,u,b;return u=new Ye({props:{code:`import torch
from transformers import AutoTokenizer, RemBertForSequenceClassification

tokenizer = AutoTokenizer.from_pretrained("google/rembert")
model = RemBertForSequenceClassification.from_pretrained("google/rembert", 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 = RemBertForSequenceClassification.from_pretrained(
    "google/rembert", 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, RemBertForSequenceClassification

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;google/rembert&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = RemBertForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;google/rembert&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 = RemBertForSequenceClassification.from_pretrained(
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;google/rembert&quot;</span>, num_labels=num_labels, problem_type=<span class="hljs-string">&quot;multi_label_classification&quot;</span>
<span class="hljs-meta">... </span>)

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

tokenizer = AutoTokenizer.from_pretrained("google/rembert")
model = RemBertForMultipleChoice.from_pretrained("google/rembert")

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, RemBertForMultipleChoice
<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;google/rembert&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = RemBertForMultipleChoice.from_pretrained(<span class="hljs-string">&quot;google/rembert&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>prompt = <span class="hljs-string">&quot;In Italy, pizza served in formal settings, such as at a restaurant, is presented unsliced.&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>choice0 = <span class="hljs-string">&quot;It is eaten with a fork and a knife.&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>choice1 = <span class="hljs-string">&quot;It is eaten while held in the hand.&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>labels = torch.tensor(<span class="hljs-number">0</span>).unsqueeze(<span class="hljs-number">0</span>)  <span class="hljs-comment"># choice0 is correct (according to Wikipedia ;)), batch size 1</span>

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

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># the linear classifier still needs to be trained</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>loss = outputs.loss
<span class="hljs-meta">&gt;&gt;&gt; </span>logits = outputs.logits`}}),{c(){d=s("p"),k=o("Example:"),p=m(),v(u.$$.fragment)},l(l){d=r(l,"P",{});var c=a(d);k=n(c,"Example:"),c.forEach(t),p=h(l),w(u.$$.fragment,l)},m(l,c){_(l,d,c),e(d,k),_(l,p,c),$(u,l,c),b=!0},p:Xe,i(l){b||(F(u.$$.fragment,l),b=!0)},o(l){E(u.$$.fragment,l),b=!1},d(l){l&&t(d),l&&t(p),R(u,l)}}}function lv(z){let d,k,p,u,b;return{c(){d=s("p"),k=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),p=s("code"),u=o("Module"),b=o(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){d=r(l,"P",{});var c=a(d);k=n(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),p=r(c,"CODE",{});var C=a(p);u=n(C,"Module"),C.forEach(t),b=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(t)},m(l,c){_(l,d,c),e(d,k),e(d,p),e(p,u),e(d,b)},d(l){l&&t(d)}}}function dv(z){let d,k,p,u,b;return u=new Ye({props:{code:`from transformers import AutoTokenizer, RemBertForTokenClassification
import torch

tokenizer = AutoTokenizer.from_pretrained("google/rembert")
model = RemBertForTokenClassification.from_pretrained("google/rembert")

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, RemBertForTokenClassification
<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;google/rembert&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = RemBertForTokenClassification.from_pretrained(<span class="hljs-string">&quot;google/rembert&quot;</span>)

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

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

<span class="hljs-meta">&gt;&gt;&gt; </span>predicted_token_class_ids = logits.argmax(-<span class="hljs-number">1</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Note that tokens are classified rather then input words which means that</span>
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># there might be more predicted token classes than words.</span>
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Multiple token classes might account for the same word</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>predicted_tokens_classes = [model.config.id2label[t.item()] <span class="hljs-keyword">for</span> t <span class="hljs-keyword">in</span> predicted_token_class_ids[<span class="hljs-number">0</span>]]

<span class="hljs-meta">&gt;&gt;&gt; </span>labels = predicted_token_class_ids
<span class="hljs-meta">&gt;&gt;&gt; </span>loss = model(**inputs, labels=labels).loss`}}),{c(){d=s("p"),k=o("Example:"),p=m(),v(u.$$.fragment)},l(l){d=r(l,"P",{});var c=a(d);k=n(c,"Example:"),c.forEach(t),p=h(l),w(u.$$.fragment,l)},m(l,c){_(l,d,c),e(d,k),_(l,p,c),$(u,l,c),b=!0},p:Xe,i(l){b||(F(u.$$.fragment,l),b=!0)},o(l){E(u.$$.fragment,l),b=!1},d(l){l&&t(d),l&&t(p),R(u,l)}}}function cv(z){let d,k,p,u,b;return{c(){d=s("p"),k=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),p=s("code"),u=o("Module"),b=o(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){d=r(l,"P",{});var c=a(d);k=n(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),p=r(c,"CODE",{});var C=a(p);u=n(C,"Module"),C.forEach(t),b=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(t)},m(l,c){_(l,d,c),e(d,k),e(d,p),e(p,u),e(d,b)},d(l){l&&t(d)}}}function pv(z){let d,k,p,u,b;return u=new Ye({props:{code:`from transformers import AutoTokenizer, RemBertForQuestionAnswering
import torch

tokenizer = AutoTokenizer.from_pretrained("google/rembert")
model = RemBertForQuestionAnswering.from_pretrained("google/rembert")

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, RemBertForQuestionAnswering
<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;google/rembert&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = RemBertForQuestionAnswering.from_pretrained(<span class="hljs-string">&quot;google/rembert&quot;</span>)

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

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

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

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

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

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

tokenizer = AutoTokenizer.from_pretrained("google/rembert")
model = TFRemBertModel.from_pretrained("google/rembert")

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, TFRemBertModel
<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;google/rembert&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFRemBertModel.from_pretrained(<span class="hljs-string">&quot;google/rembert&quot;</span>)

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

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

tokenizer = AutoTokenizer.from_pretrained("google/rembert")
model = TFRemBertForMaskedLM.from_pretrained("google/rembert")

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, TFRemBertForMaskedLM
<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;google/rembert&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFRemBertForMaskedLM.from_pretrained(<span class="hljs-string">&quot;google/rembert&quot;</span>)

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

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

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

tokenizer = AutoTokenizer.from_pretrained("google/rembert")
model = TFRemBertForCausalLM.from_pretrained("google/rembert")

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, TFRemBertForCausalLM
<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;google/rembert&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFRemBertForCausalLM.from_pretrained(<span class="hljs-string">&quot;google/rembert&quot;</span>)

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

tokenizer = AutoTokenizer.from_pretrained("google/rembert")
model = TFRemBertForSequenceClassification.from_pretrained("google/rembert")

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, TFRemBertForSequenceClassification
<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;google/rembert&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFRemBertForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;google/rembert&quot;</span>)

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

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

<span class="hljs-meta">&gt;&gt;&gt; </span>predicted_class_id = <span class="hljs-built_in">int</span>(tf.math.argmax(logits, axis=-<span class="hljs-number">1</span>)[<span class="hljs-number">0</span>])`}}),{c(){d=s("p"),k=o("Example:"),p=m(),v(u.$$.fragment)},l(l){d=r(l,"P",{});var c=a(d);k=n(c,"Example:"),c.forEach(t),p=h(l),w(u.$$.fragment,l)},m(l,c){_(l,d,c),e(d,k),_(l,p,c),$(u,l,c),b=!0},p:Xe,i(l){b||(F(u.$$.fragment,l),b=!0)},o(l){E(u.$$.fragment,l),b=!1},d(l){l&&t(d),l&&t(p),R(u,l)}}}function $v(z){let d,k;return d=new Ye({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 = TFRemBertForSequenceClassification.from_pretrained("google/rembert", 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 = TFRemBertForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;google/rembert&quot;</span>, num_labels=num_labels)\n\n<span class="hljs-meta">&gt;&gt;&gt; </span>labels = tf.constant(<span class="hljs-number">1</span>)\n<span class="hljs-meta">&gt;&gt;&gt; </span>loss = model(**inputs, labels=labels).loss'}}),{c(){v(d.$$.fragment)},l(p){w(d.$$.fragment,p)},m(p,u){$(d,p,u),k=!0},p:Xe,i(p){k||(F(d.$$.fragment,p),k=!0)},o(p){E(d.$$.fragment,p),k=!1},d(p){R(d,p)}}}function Fv(z){let d,k,p,u,b,l,c,C,ve,fe,N,le,te,T,we,V,$e,ge,S,Fe,ce,G,Ee,_e,U,Re,ke,K,he,Be,ne,q,A,be,H,Me,ye,I,de,ue,x,ze,J,Ce,Te,O,pe,qe,L,xe,Q,je,re,j,Ae,P,Pe,ie;return{c(){d=s("p"),k=o("TensorFlow models and layers in "),p=s("code"),u=o("transformers"),b=o(" accept two formats as input:"),l=m(),c=s("ul"),C=s("li"),ve=o("having all inputs as keyword arguments (like PyTorch models), or"),fe=m(),N=s("li"),le=o("having all inputs as a list, tuple or dict in the first positional argument."),te=m(),T=s("p"),we=o(`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 `),V=s("code"),$e=o("model.fit()"),ge=o(` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),S=s("code"),Fe=o("model.fit()"),ce=o(` supports! If, however, you want to use the second
format outside of Keras methods like `),G=s("code"),Ee=o("fit()"),_e=o(" and "),U=s("code"),Re=o("predict()"),ke=o(`, such as when creating your own layers or models with
the Keras `),K=s("code"),he=o("Functional"),Be=o(` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),ne=m(),q=s("ul"),A=s("li"),be=o("a single Tensor with "),H=s("code"),Me=o("input_ids"),ye=o(" only and nothing else: "),I=s("code"),de=o("model(input_ids)"),ue=m(),x=s("li"),ze=o(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),J=s("code"),Ce=o("model([input_ids, attention_mask])"),Te=o(" or "),O=s("code"),pe=o("model([input_ids, attention_mask, token_type_ids])"),qe=m(),L=s("li"),xe=o(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),Q=s("code"),je=o('model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),re=m(),j=s("p"),Ae=o(`Note that when creating models and layers with
`),P=s("a"),Pe=o("subclassing"),ie=o(` 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=r(f,"P",{});var B=a(d);k=n(B,"TensorFlow models and layers in "),p=r(B,"CODE",{});var Ue=a(p);u=n(Ue,"transformers"),Ue.forEach(t),b=n(B," accept two formats as input:"),B.forEach(t),l=h(f),c=r(f,"UL",{});var ae=a(c);C=r(ae,"LI",{});var Ne=a(C);ve=n(Ne,"having all inputs as keyword arguments (like PyTorch models), or"),Ne.forEach(t),fe=h(ae),N=r(ae,"LI",{});var Ke=a(N);le=n(Ke,"having all inputs as a list, tuple or dict in the first positional argument."),Ke.forEach(t),ae.forEach(t),te=h(f),T=r(f,"P",{});var M=a(T);we=n(M,`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 `),V=r(M,"CODE",{});var He=a(V);$e=n(He,"model.fit()"),He.forEach(t),ge=n(M,` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),S=r(M,"CODE",{});var Oe=a(S);Fe=n(Oe,"model.fit()"),Oe.forEach(t),ce=n(M,` supports! If, however, you want to use the second
format outside of Keras methods like `),G=r(M,"CODE",{});var Se=a(G);Ee=n(Se,"fit()"),Se.forEach(t),_e=n(M," and "),U=r(M,"CODE",{});var Le=a(U);Re=n(Le,"predict()"),Le.forEach(t),ke=n(M,`, such as when creating your own layers or models with
the Keras `),K=r(M,"CODE",{});var De=a(K);he=n(De,"Functional"),De.forEach(t),Be=n(M,` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),M.forEach(t),ne=h(f),q=r(f,"UL",{});var D=a(q);A=r(D,"LI",{});var W=a(A);be=n(W,"a single Tensor with "),H=r(W,"CODE",{});var Qe=a(H);Me=n(Qe,"input_ids"),Qe.forEach(t),ye=n(W," only and nothing else: "),I=r(W,"CODE",{});var Ie=a(I);de=n(Ie,"model(input_ids)"),Ie.forEach(t),W.forEach(t),ue=h(D),x=r(D,"LI",{});var X=a(x);ze=n(X,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),J=r(X,"CODE",{});var We=a(J);Ce=n(We,"model([input_ids, attention_mask])"),We.forEach(t),Te=n(X," or "),O=r(X,"CODE",{});var oe=a(O);pe=n(oe,"model([input_ids, attention_mask, token_type_ids])"),oe.forEach(t),X.forEach(t),qe=h(D),L=r(D,"LI",{});var me=a(L);xe=n(me,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),Q=r(me,"CODE",{});var Ve=a(Q);je=n(Ve,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),Ve.forEach(t),me.forEach(t),D.forEach(t),re=h(f),j=r(f,"P",{});var Z=a(j);Ae=n(Z,`Note that when creating models and layers with
`),P=r(Z,"A",{href:!0,rel:!0});var Je=a(P);Pe=n(Je,"subclassing"),Je.forEach(t),ie=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(t),this.h()},h(){g(P,"href","https://keras.io/guides/making_new_layers_and_models_via_subclassing/"),g(P,"rel","nofollow")},m(f,B){_(f,d,B),e(d,k),e(d,p),e(p,u),e(d,b),_(f,l,B),_(f,c,B),e(c,C),e(C,ve),e(c,fe),e(c,N),e(N,le),_(f,te,B),_(f,T,B),e(T,we),e(T,V),e(V,$e),e(T,ge),e(T,S),e(S,Fe),e(T,ce),e(T,G),e(G,Ee),e(T,_e),e(T,U),e(U,Re),e(T,ke),e(T,K),e(K,he),e(T,Be),_(f,ne,B),_(f,q,B),e(q,A),e(A,be),e(A,H),e(H,Me),e(A,ye),e(A,I),e(I,de),e(q,ue),e(q,x),e(x,ze),e(x,J),e(J,Ce),e(x,Te),e(x,O),e(O,pe),e(q,qe),e(q,L),e(L,xe),e(L,Q),e(Q,je),_(f,re,B),_(f,j,B),e(j,Ae),e(j,P),e(P,Pe),e(j,ie)},d(f){f&&t(d),f&&t(l),f&&t(c),f&&t(te),f&&t(T),f&&t(ne),f&&t(q),f&&t(re),f&&t(j)}}}function Ev(z){let d,k,p,u,b;return{c(){d=s("p"),k=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),p=s("code"),u=o("Module"),b=o(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){d=r(l,"P",{});var c=a(d);k=n(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),p=r(c,"CODE",{});var C=a(p);u=n(C,"Module"),C.forEach(t),b=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(t)},m(l,c){_(l,d,c),e(d,k),e(d,p),e(p,u),e(d,b)},d(l){l&&t(d)}}}function Rv(z){let d,k,p,u,b;return u=new Ye({props:{code:`from transformers import AutoTokenizer, TFRemBertForMultipleChoice
import tensorflow as tf

tokenizer = AutoTokenizer.from_pretrained("google/rembert")
model = TFRemBertForMultipleChoice.from_pretrained("google/rembert")

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, TFRemBertForMultipleChoice
<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;google/rembert&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFRemBertForMultipleChoice.from_pretrained(<span class="hljs-string">&quot;google/rembert&quot;</span>)

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

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

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

tokenizer = AutoTokenizer.from_pretrained("google/rembert")
model = TFRemBertForTokenClassification.from_pretrained("google/rembert")

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, TFRemBertForTokenClassification
<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;google/rembert&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFRemBertForTokenClassification.from_pretrained(<span class="hljs-string">&quot;google/rembert&quot;</span>)

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

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

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

tokenizer = AutoTokenizer.from_pretrained("google/rembert")
model = TFRemBertForQuestionAnswering.from_pretrained("google/rembert")

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, TFRemBertForQuestionAnswering
<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;google/rembert&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFRemBertForQuestionAnswering.from_pretrained(<span class="hljs-string">&quot;google/rembert&quot;</span>)

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

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

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

<span class="hljs-meta">&gt;&gt;&gt; </span>predict_answer_tokens = inputs.input_ids[<span class="hljs-number">0</span>, answer_start_index : answer_end_index + <span class="hljs-number">1</span>]`}}),{c(){d=s("p"),k=o("Example:"),p=m(),v(u.$$.fragment)},l(l){d=r(l,"P",{});var c=a(d);k=n(c,"Example:"),c.forEach(t),p=h(l),w(u.$$.fragment,l)},m(l,c){_(l,d,c),e(d,k),_(l,p,c),$(u,l,c),b=!0},p:Xe,i(l){b||(F(u.$$.fragment,l),b=!0)},o(l){E(u.$$.fragment,l),b=!1},d(l){l&&t(d),l&&t(p),R(u,l)}}}function Av(z){let d,k;return d=new Ye({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(){v(d.$$.fragment)},l(p){w(d.$$.fragment,p)},m(p,u){$(d,p,u),k=!0},p:Xe,i(p){k||(F(d.$$.fragment,p),k=!0)},o(p){E(d.$$.fragment,p),k=!1},d(p){R(d,p)}}}function Pv(z){let d,k,p,u,b,l,c,C,ve,fe,N,le,te,T,we,V,$e,ge,S,Fe,ce,G,Ee,_e,U,Re,ke,K,he,Be,ne,q,A,be,H,Me,ye,I,de,ue,x,ze,J,Ce,Te,O,pe,qe,L,xe,Q,je,re,j,Ae,P,Pe,ie,f,B,Ue,ae,Ne,Ke,M,He,Oe,Se,Le,De,D,W,Qe,Ie,X,We,oe,me,Ve,Z,Je,rs,Jc,Gc,Xc,as,Yc,sa,Zc,ep,tp,Qt,is,op,ti,np,sp,ls,ra,rp,oi,ap,ip,aa,lp,ni,dp,cp,Do,ds,pp,cs,mp,si,hp,up,fp,Ft,ps,gp,ri,_p,kp,No,bp,oo,yp,ai,Tp,vp,ii,wp,$p,Fp,ia,ms,Rd,no,Io,li,hs,Ep,di,Rp,Bd,ot,us,Bp,Wt,Mp,ci,zp,Cp,fs,qp,xp,la,jp,Ap,Pp,Vt,gs,Lp,pi,Op,Dp,_s,da,Np,mi,Ip,Sp,ca,Wp,hi,Up,Kp,So,ks,Hp,bs,Qp,ui,Vp,Jp,Gp,Et,ys,Xp,fi,Yp,Zp,Wo,em,gi,tm,om,pa,Ts,Md,so,Uo,_i,vs,nm,ki,sm,zd,ht,ws,rm,$s,am,Fs,im,lm,dm,Es,cm,Rs,pm,mm,hm,nt,um,bi,fm,gm,yi,_m,km,Ti,bm,ym,vi,Tm,vm,wi,wm,$m,$i,Fm,Em,Rm,Rt,Bs,Bm,ro,Mm,ma,zm,Cm,Fi,qm,xm,jm,Ko,Am,Ho,Cd,ao,Qo,Ei,Ms,Pm,Ri,Lm,qd,Ut,zs,Om,io,Dm,Bi,Nm,Im,Cs,Sm,Wm,Um,Bt,qs,Km,lo,Hm,ha,Qm,Vm,Mi,Jm,Gm,Xm,Vo,Ym,Jo,xd,co,Go,zi,xs,Zm,Ci,eh,jd,Kt,js,th,po,oh,qi,nh,sh,As,rh,ah,ih,Mt,Ps,lh,mo,dh,ua,ch,ph,xi,mh,hh,uh,Xo,fh,Yo,Ad,ho,Zo,ji,Ls,gh,Ai,_h,Pd,Tt,Os,kh,Pi,bh,yh,Ds,Th,Ns,vh,wh,$h,ut,Is,Fh,uo,Eh,fa,Rh,Bh,Li,Mh,zh,Ch,en,qh,tn,xh,on,Ld,fo,nn,Oi,Ss,jh,Di,Ah,Od,vt,Ws,Ph,Ni,Lh,Oh,Us,Dh,Ks,Nh,Ih,Sh,zt,Hs,Wh,go,Uh,ga,Kh,Hh,Ii,Qh,Vh,Jh,sn,Gh,rn,Dd,_o,an,Si,Qs,Xh,Wi,Yh,Nd,wt,Vs,Zh,Ui,eu,tu,Js,ou,Gs,nu,su,ru,Ct,Xs,au,ko,iu,_a,lu,du,Ki,cu,pu,mu,ln,hu,dn,Id,bo,cn,Hi,Ys,uu,Qi,fu,Sd,$t,Zs,gu,yo,_u,Vi,ku,bu,Ji,yu,Tu,vu,er,wu,tr,$u,Fu,Eu,qt,or,Ru,To,Bu,ka,Mu,zu,Gi,Cu,qu,xu,pn,ju,mn,Wd,vo,hn,Xi,nr,Au,Yi,Pu,Ud,st,sr,Lu,Zi,Ou,Du,rr,Nu,ba,Iu,Su,Wu,ar,Uu,ir,Ku,Hu,Qu,un,Vu,xt,lr,Ju,wo,Gu,ya,Xu,Yu,el,Zu,ef,tf,fn,of,gn,Kd,$o,_n,tl,dr,nf,ol,sf,Hd,rt,cr,rf,pr,af,nl,lf,df,cf,mr,pf,Ta,mf,hf,uf,hr,ff,ur,gf,_f,kf,kn,bf,ft,fr,yf,Fo,Tf,va,vf,wf,sl,$f,Ff,Ef,bn,Rf,yn,Bf,Tn,Qd,Eo,vn,rl,gr,Mf,al,zf,Vd,at,_r,Cf,kr,qf,il,xf,jf,Af,br,Pf,wa,Lf,Of,Df,yr,Nf,Tr,If,Sf,Wf,wn,Uf,gt,vr,Kf,et,Hf,ll,Qf,Vf,dl,Jf,Gf,cl,Xf,Yf,pl,Zf,eg,ml,tg,og,hl,ng,sg,ul,rg,ag,ig,wr,$r,lg,fl,dg,cg,pg,Fr,mg,gl,hg,ug,fg,Y,gg,_l,_g,kg,kl,bg,yg,bl,Tg,vg,yl,wg,$g,Tl,Fg,Eg,vl,Rg,Bg,wl,Mg,zg,$l,Cg,qg,Fl,xg,jg,El,Ag,Pg,Rl,Lg,Og,Bl,Dg,Ng,Ml,Ig,Sg,zl,Wg,Ug,Cl,Kg,Hg,ql,Qg,Vg,xl,Jg,Gg,jl,Xg,Yg,Al,Zg,e_,Pl,t_,o_,n_,$n,Jd,Ro,Fn,Ll,Er,s_,Ol,r_,Gd,it,Rr,a_,Dl,i_,l_,Br,d_,$a,c_,p_,m_,Mr,h_,zr,u_,f_,g_,En,__,_t,Cr,k_,Bo,b_,Fa,y_,T_,Nl,v_,w_,$_,Rn,F_,Bn,E_,Mn,Xd,Mo,zn,Il,qr,R_,Sl,B_,Yd,lt,xr,M_,Wl,z_,C_,jr,q_,Ea,x_,j_,A_,Ar,P_,Pr,L_,O_,D_,Cn,N_,jt,Lr,I_,zo,S_,Ra,W_,U_,Ul,K_,H_,Q_,qn,V_,xn,Zd,Co,jn,Kl,Or,J_,Hl,G_,ec,dt,Dr,X_,Ql,Y_,Z_,Nr,ek,Ba,tk,ok,nk,Ir,sk,Sr,rk,ak,ik,An,lk,kt,Wr,dk,qo,ck,Ma,pk,mk,Vl,hk,uk,fk,Pn,gk,Ln,_k,On,tc,xo,Dn,Jl,Ur,kk,Gl,bk,oc,ct,Kr,yk,jo,Tk,Xl,vk,wk,Yl,$k,Fk,Ek,Hr,Rk,za,Bk,Mk,zk,Qr,Ck,Vr,qk,xk,jk,Nn,Ak,bt,Jr,Pk,Ao,Lk,Ca,Ok,Dk,Zl,Nk,Ik,Sk,In,Wk,Sn,Uk,Wn,nc;return l=new tt({}),T=new tt({}),x=new tt({}),pe=new se({props:{name:"class transformers.RemBertConfig",anchor:"transformers.RemBertConfig",parameters:[{name:"vocab_size",val:" = 250300"},{name:"hidden_size",val:" = 1152"},{name:"num_hidden_layers",val:" = 32"},{name:"num_attention_heads",val:" = 18"},{name:"input_embedding_size",val:" = 256"},{name:"output_embedding_size",val:" = 1664"},{name:"intermediate_size",val:" = 4608"},{name:"hidden_act",val:" = 'gelu'"},{name:"hidden_dropout_prob",val:" = 0.0"},{name:"attention_probs_dropout_prob",val:" = 0.0"},{name:"classifier_dropout_prob",val:" = 0.1"},{name:"max_position_embeddings",val:" = 512"},{name:"type_vocab_size",val:" = 2"},{name:"initializer_range",val:" = 0.02"},{name:"layer_norm_eps",val:" = 1e-12"},{name:"use_cache",val:" = True"},{name:"pad_token_id",val:" = 0"},{name:"bos_token_id",val:" = 312"},{name:"eos_token_id",val:" = 313"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.RemBertConfig.vocab_size",description:`<strong>vocab_size</strong> (<code>int</code>, <em>optional</em>, defaults to 250300) &#x2014;
Vocabulary size of the RemBERT 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/rembert#transformers.RemBertModel">RemBertModel</a> or <a href="/docs/transformers/main/en/model_doc/rembert#transformers.TFRemBertModel">TFRemBertModel</a>. Vocabulary size of the model.
Defines the different tokens that can be represented by the <em>inputs_ids</em> passed to the forward method of
<a href="/docs/transformers/main/en/model_doc/rembert#transformers.RemBertModel">RemBertModel</a>.`,name:"vocab_size"},{anchor:"transformers.RemBertConfig.hidden_size",description:`<strong>hidden_size</strong> (<code>int</code>, <em>optional</em>, defaults to 1152) &#x2014;
Dimensionality of the encoder layers and the pooler layer.`,name:"hidden_size"},{anchor:"transformers.RemBertConfig.num_hidden_layers",description:`<strong>num_hidden_layers</strong> (<code>int</code>, <em>optional</em>, defaults to 32) &#x2014;
Number of hidden layers in the Transformer encoder.`,name:"num_hidden_layers"},{anchor:"transformers.RemBertConfig.num_attention_heads",description:`<strong>num_attention_heads</strong> (<code>int</code>, <em>optional</em>, defaults to 18) &#x2014;
Number of attention heads for each attention layer in the Transformer encoder.`,name:"num_attention_heads"},{anchor:"transformers.RemBertConfig.input_embedding_size",description:`<strong>input_embedding_size</strong> (<code>int</code>, <em>optional</em>, defaults to 256) &#x2014;
Dimensionality of the input embeddings.`,name:"input_embedding_size"},{anchor:"transformers.RemBertConfig.output_embedding_size",description:`<strong>output_embedding_size</strong> (<code>int</code>, <em>optional</em>, defaults to 1664) &#x2014;
Dimensionality of the output embeddings.`,name:"output_embedding_size"},{anchor:"transformers.RemBertConfig.intermediate_size",description:`<strong>intermediate_size</strong> (<code>int</code>, <em>optional</em>, defaults to 4608) &#x2014;
Dimensionality of the &#x201C;intermediate&#x201D; (i.e., feed-forward) layer in the Transformer encoder.`,name:"intermediate_size"},{anchor:"transformers.RemBertConfig.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.RemBertConfig.hidden_dropout_prob",description:`<strong>hidden_dropout_prob</strong> (<code>float</code>, <em>optional</em>, defaults to 0) &#x2014;
The dropout probabilitiy for all fully connected layers in the embeddings, encoder, and pooler.`,name:"hidden_dropout_prob"},{anchor:"transformers.RemBertConfig.attention_probs_dropout_prob",description:`<strong>attention_probs_dropout_prob</strong> (<code>float</code>, <em>optional</em>, defaults to 0) &#x2014;
The dropout ratio for the attention probabilities.`,name:"attention_probs_dropout_prob"},{anchor:"transformers.RemBertConfig.classifier_dropout_prob",description:`<strong>classifier_dropout_prob</strong> (<code>float</code>, <em>optional</em>, defaults to 0.1) &#x2014;
The dropout ratio for the classifier layer when fine-tuning.`,name:"classifier_dropout_prob"},{anchor:"transformers.RemBertConfig.max_position_embeddings",description:`<strong>max_position_embeddings</strong> (<code>int</code>, <em>optional</em>, defaults to 512) &#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 2048).`,name:"max_position_embeddings"},{anchor:"transformers.RemBertConfig.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/rembert#transformers.RemBertModel">RemBertModel</a> or <a href="/docs/transformers/main/en/model_doc/rembert#transformers.TFRemBertModel">TFRemBertModel</a>.`,name:"type_vocab_size"},{anchor:"transformers.RemBertConfig.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.RemBertConfig.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.RemBertConfig.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.RemBertConfig.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"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/rembert/configuration_rembert.py#L32"}}),Oe=new Ge({props:{anchor:"transformers.RemBertConfig.example",$$slots:{default:[VT]},$$scope:{ctx:z}}}),W=new tt({}),me=new se({props:{name:"class transformers.RemBertTokenizer",anchor:"transformers.RemBertTokenizer",parameters:[{name:"vocab_file",val:""},{name:"do_lower_case",val:" = False"},{name:"remove_space",val:" = True"},{name:"keep_accents",val:" = True"},{name:"bos_token",val:" = '[CLS]'"},{name:"eos_token",val:" = '[SEP]'"},{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:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.RemBertTokenizer.vocab_file",description:`<strong>vocab_file</strong> (<code>str</code>) &#x2014;
<a href="https://github.com/google/sentencepiece" rel="nofollow">SentencePiece</a> file (generally has a <em>.spm</em> extension) that
contains the vocabulary necessary to instantiate a tokenizer.`,name:"vocab_file"},{anchor:"transformers.RemBertTokenizer.bos_token",description:`<strong>bos_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;[CLS]&quot;</code>) &#x2014;
The beginning of sequence token that was used during pretraining. Can be used a sequence classifier token.</p>
<div class="course-tip  bg-gradient-to-br dark:bg-gradient-to-r before:border-green-500 dark:before:border-green-800 from-green-50 dark:from-gray-900 to-white dark:to-gray-950 border border-green-50 text-green-700 dark:text-gray-400">
						
<p>When building a sequence using special tokens, this is not the token that is used for the beginning of
sequence. The token used is the <code>cls_token</code>.</p>

					</div>`,name:"bos_token"},{anchor:"transformers.RemBertTokenizer.eos_token",description:`<strong>eos_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;[SEP]&quot;</code>) &#x2014;
The end of sequence token.</p>
<div class="course-tip  bg-gradient-to-br dark:bg-gradient-to-r before:border-green-500 dark:before:border-green-800 from-green-50 dark:from-gray-900 to-white dark:to-gray-950 border border-green-50 text-green-700 dark:text-gray-400">
						
<p>When building a sequence using special tokens, this is not the token that is used for the end of sequence.
The token used is the <code>sep_token</code>.</p>

					</div>`,name:"eos_token"},{anchor:"transformers.RemBertTokenizer.unk_token",description:`<strong>unk_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;unk&gt;&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.RemBertTokenizer.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.RemBertTokenizer.pad_token",description:`<strong>pad_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;pad&gt;&quot;</code>) &#x2014;
The token used for padding, for example when batching sequences of different lengths.`,name:"pad_token"},{anchor:"transformers.RemBertTokenizer.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.RemBertTokenizer.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.RemBertTokenizer.sp_model",description:`<strong>sp_model</strong> (<code>SentencePieceProcessor</code>) &#x2014;
The <em>SentencePiece</em> processor that is used for every conversion (string, tokens and IDs).`,name:"sp_model"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/rembert/tokenization_rembert.py#L43"}}),is=new se({props:{name:"build_inputs_with_special_tokens",anchor:"transformers.RemBertTokenizer.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.RemBertTokenizer.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.RemBertTokenizer.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/rembert/tokenization_rembert.py#L172",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>
`}}),ds=new se({props:{name:"get_special_tokens_mask",anchor:"transformers.RemBertTokenizer.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.RemBertTokenizer.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.RemBertTokenizer.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.RemBertTokenizer.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/rembert/tokenization_rembert.py#L197",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>
`}}),ps=new se({props:{name:"create_token_type_ids_from_sequences",anchor:"transformers.RemBertTokenizer.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.RemBertTokenizer.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.RemBertTokenizer.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/rembert/tokenization_rembert.py#L228",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>
`}}),No=new Ge({props:{anchor:"transformers.RemBertTokenizer.create_token_type_ids_from_sequences.example",$$slots:{default:[JT]},$$scope:{ctx:z}}}),ms=new se({props:{name:"save_vocabulary",anchor:"transformers.RemBertTokenizer.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/rembert/tokenization_rembert.py#L258"}}),hs=new tt({}),us=new se({props:{name:"class transformers.RemBertTokenizerFast",anchor:"transformers.RemBertTokenizerFast",parameters:[{name:"vocab_file",val:" = None"},{name:"tokenizer_file",val:" = None"},{name:"do_lower_case",val:" = True"},{name:"remove_space",val:" = True"},{name:"keep_accents",val:" = False"},{name:"bos_token",val:" = '[CLS]'"},{name:"eos_token",val:" = '[SEP]'"},{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:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.RemBertTokenizerFast.vocab_file",description:`<strong>vocab_file</strong> (<code>str</code>) &#x2014;
<a href="https://github.com/google/sentencepiece" rel="nofollow">SentencePiece</a> file (generally has a <em>.spm</em> extension) that
contains the vocabulary necessary to instantiate a tokenizer.`,name:"vocab_file"},{anchor:"transformers.RemBertTokenizerFast.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.RemBertTokenizerFast.remove_space",description:`<strong>remove_space</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to strip the text when tokenizing (removing excess spaces before and after the string).`,name:"remove_space"},{anchor:"transformers.RemBertTokenizerFast.keep_accents",description:`<strong>keep_accents</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to keep accents when tokenizing.`,name:"keep_accents"},{anchor:"transformers.RemBertTokenizerFast.bos_token",description:`<strong>bos_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;[CLS]&quot;</code>) &#x2014;
The beginning of sequence token that was used during pretraining. Can be used a sequence classifier token.</p>
<div class="course-tip  bg-gradient-to-br dark:bg-gradient-to-r before:border-green-500 dark:before:border-green-800 from-green-50 dark:from-gray-900 to-white dark:to-gray-950 border border-green-50 text-green-700 dark:text-gray-400">
						
<p>When building a sequence using special tokens, this is not the token that is used for the beginning of
sequence. The token used is the <code>cls_token</code>.</p>

					</div>`,name:"bos_token"},{anchor:"transformers.RemBertTokenizerFast.eos_token",description:`<strong>eos_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;[SEP]&quot;</code>) &#x2014;
The end of sequence token. .. note:: When building a sequence using special tokens, this is not the token
that is used for the end of sequence. The token used is the <code>sep_token</code>.`,name:"eos_token"},{anchor:"transformers.RemBertTokenizerFast.unk_token",description:`<strong>unk_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;unk&gt;&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.RemBertTokenizerFast.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.RemBertTokenizerFast.pad_token",description:`<strong>pad_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;pad&gt;&quot;</code>) &#x2014;
The token used for padding, for example when batching sequences of different lengths.`,name:"pad_token"},{anchor:"transformers.RemBertTokenizerFast.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.RemBertTokenizerFast.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"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/rembert/tokenization_rembert_fast.py#L51"}}),gs=new se({props:{name:"build_inputs_with_special_tokens",anchor:"transformers.RemBertTokenizerFast.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.RemBertTokenizerFast.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.RemBertTokenizerFast.build_inputs_with_special_tokens.token_ids_1",description:`<strong>token_ids_1</strong> (<code>List[int]</code>, <em>optional</em>, defaults to <code>None</code>) &#x2014;
Optional second list of IDs for sequence pairs.`,name:"token_ids_1"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/rembert/tokenization_rembert_fast.py#L144",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>
`}}),ks=new se({props:{name:"get_special_tokens_mask",anchor:"transformers.RemBertTokenizerFast.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.RemBertTokenizerFast.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.RemBertTokenizerFast.get_special_tokens_mask.token_ids_1",description:`<strong>token_ids_1</strong> (<code>List[int]</code>, <em>optional</em>, defaults to <code>None</code>) &#x2014;
Optional second list of IDs for sequence pairs.`,name:"token_ids_1"},{anchor:"transformers.RemBertTokenizerFast.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;
Set to True if 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/rembert/tokenization_rembert_fast.py#L169",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>
`}}),ys=new se({props:{name:"create_token_type_ids_from_sequences",anchor:"transformers.RemBertTokenizerFast.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.RemBertTokenizerFast.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.RemBertTokenizerFast.create_token_type_ids_from_sequences.token_ids_1",description:`<strong>token_ids_1</strong> (<code>List[int]</code>, <em>optional</em>, defaults to <code>None</code>) &#x2014;
Optional second list of IDs for sequence pairs.`,name:"token_ids_1"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/rembert/tokenization_rembert_fast.py#L200",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>
`}}),Wo=new Ge({props:{anchor:"transformers.RemBertTokenizerFast.create_token_type_ids_from_sequences.example",$$slots:{default:[GT]},$$scope:{ctx:z}}}),Ts=new se({props:{name:"save_vocabulary",anchor:"transformers.RemBertTokenizerFast.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/rembert/tokenization_rembert_fast.py#L230"}}),vs=new tt({}),ws=new se({props:{name:"class transformers.RemBertModel",anchor:"transformers.RemBertModel",parameters:[{name:"config",val:""},{name:"add_pooling_layer",val:" = True"}],parametersDescription:[{anchor:"transformers.RemBertModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/rembert#transformers.RemBertConfig">RemBertConfig</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/rembert/modeling_rembert.py#L746"}}),Bs=new se({props:{name:"forward",anchor:"transformers.RemBertModel.forward",parameters:[{name:"input_ids",val:": LongTensor = None"},{name:"attention_mask",val:": typing.Optional[torch.LongTensor] = None"},{name:"token_type_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"position_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.RemBertModel.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.RemBertModel.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.RemBertModel.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.RemBertModel.forward.position_ids",description:`<strong>position_ids</strong> (<code>torch.LongTensor</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>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.RemBertModel.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.RemBertModel.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.RemBertModel.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.RemBertModel.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.RemBertModel.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.RemBertModel.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.RemBertModel.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.RemBertModel.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.RemBertModel.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/rembert/modeling_rembert.py#L785",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/rembert#transformers.RemBertConfig"
>RemBertConfig</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>
`}}),Ko=new Ze({props:{$$slots:{default:[XT]},$$scope:{ctx:z}}}),Ho=new Ge({props:{anchor:"transformers.RemBertModel.forward.example",$$slots:{default:[YT]},$$scope:{ctx:z}}}),Ms=new tt({}),zs=new se({props:{name:"class transformers.RemBertForCausalLM",anchor:"transformers.RemBertForCausalLM",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.RemBertForCausalLM.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/rembert#transformers.RemBertConfig">RemBertConfig</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/rembert/modeling_rembert.py#L1017"}}),qs=new se({props:{name:"forward",anchor:"transformers.RemBertForCausalLM.forward",parameters:[{name:"input_ids",val:": LongTensor = None"},{name:"attention_mask",val:": typing.Optional[torch.LongTensor] = None"},{name:"token_type_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"position_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:"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.RemBertForCausalLM.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.RemBertForCausalLM.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.RemBertForCausalLM.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.RemBertForCausalLM.forward.position_ids",description:`<strong>position_ids</strong> (<code>torch.LongTensor</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>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.RemBertForCausalLM.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.RemBertForCausalLM.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.RemBertForCausalLM.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.RemBertForCausalLM.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.RemBertForCausalLM.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.RemBertForCausalLM.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.RemBertForCausalLM.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.RemBertForCausalLM.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.RemBertForCausalLM.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.RemBertForCausalLM.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/rembert/modeling_rembert.py#L1039",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/rembert#transformers.RemBertConfig"
>RemBertConfig</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>
`}}),Vo=new Ze({props:{$$slots:{default:[ZT]},$$scope:{ctx:z}}}),Jo=new Ge({props:{anchor:"transformers.RemBertForCausalLM.forward.example",$$slots:{default:[ev]},$$scope:{ctx:z}}}),xs=new tt({}),js=new se({props:{name:"class transformers.RemBertForMaskedLM",anchor:"transformers.RemBertForMaskedLM",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.RemBertForMaskedLM.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/rembert#transformers.RemBertConfig">RemBertConfig</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/rembert/modeling_rembert.py#L915"}}),Ps=new se({props:{name:"forward",anchor:"transformers.RemBertForMaskedLM.forward",parameters:[{name:"input_ids",val:": LongTensor = None"},{name:"attention_mask",val:": typing.Optional[torch.LongTensor] = None"},{name:"token_type_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"position_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.RemBertForMaskedLM.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.RemBertForMaskedLM.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.RemBertForMaskedLM.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.RemBertForMaskedLM.forward.position_ids",description:`<strong>position_ids</strong> (<code>torch.LongTensor</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>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.RemBertForMaskedLM.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.RemBertForMaskedLM.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.RemBertForMaskedLM.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.RemBertForMaskedLM.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.RemBertForMaskedLM.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.RemBertForMaskedLM.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/rembert/modeling_rembert.py#L937",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/rembert#transformers.RemBertConfig"
>RemBertConfig</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>
`}}),Xo=new Ze({props:{$$slots:{default:[tv]},$$scope:{ctx:z}}}),Yo=new Ge({props:{anchor:"transformers.RemBertForMaskedLM.forward.example",$$slots:{default:[ov]},$$scope:{ctx:z}}}),Ls=new tt({}),Os=new se({props:{name:"class transformers.RemBertForSequenceClassification",anchor:"transformers.RemBertForSequenceClassification",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.RemBertForSequenceClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/rembert#transformers.RemBertConfig">RemBertConfig</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/rembert/modeling_rembert.py#L1170"}}),Is=new se({props:{name:"forward",anchor:"transformers.RemBertForSequenceClassification.forward",parameters:[{name:"input_ids",val:": FloatTensor = None"},{name:"attention_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"token_type_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"position_ids",val:": typing.Optional[torch.FloatTensor] = 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.RemBertForSequenceClassification.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.RemBertForSequenceClassification.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.RemBertForSequenceClassification.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.RemBertForSequenceClassification.forward.position_ids",description:`<strong>position_ids</strong> (<code>torch.LongTensor</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>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.RemBertForSequenceClassification.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.RemBertForSequenceClassification.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.RemBertForSequenceClassification.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.RemBertForSequenceClassification.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.RemBertForSequenceClassification.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.RemBertForSequenceClassification.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/rembert/modeling_rembert.py#L1181",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/rembert#transformers.RemBertConfig"
>RemBertConfig</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>
`}}),en=new Ze({props:{$$slots:{default:[nv]},$$scope:{ctx:z}}}),tn=new Ge({props:{anchor:"transformers.RemBertForSequenceClassification.forward.example",$$slots:{default:[sv]},$$scope:{ctx:z}}}),on=new Ge({props:{anchor:"transformers.RemBertForSequenceClassification.forward.example-2",$$slots:{default:[rv]},$$scope:{ctx:z}}}),Ss=new tt({}),Ws=new se({props:{name:"class transformers.RemBertForMultipleChoice",anchor:"transformers.RemBertForMultipleChoice",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.RemBertForMultipleChoice.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/rembert#transformers.RemBertConfig">RemBertConfig</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/rembert/modeling_rembert.py#L1266"}}),Hs=new se({props:{name:"forward",anchor:"transformers.RemBertForMultipleChoice.forward",parameters:[{name:"input_ids",val:": FloatTensor = None"},{name:"attention_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"token_type_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"position_ids",val:": typing.Optional[torch.FloatTensor] = 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.RemBertForMultipleChoice.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.RemBertForMultipleChoice.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.RemBertForMultipleChoice.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.RemBertForMultipleChoice.forward.position_ids",description:`<strong>position_ids</strong> (<code>torch.LongTensor</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>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.RemBertForMultipleChoice.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.RemBertForMultipleChoice.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.RemBertForMultipleChoice.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.RemBertForMultipleChoice.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.RemBertForMultipleChoice.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.RemBertForMultipleChoice.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/rembert/modeling_rembert.py#L1277",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/rembert#transformers.RemBertConfig"
>RemBertConfig</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>
`}}),sn=new Ze({props:{$$slots:{default:[av]},$$scope:{ctx:z}}}),rn=new Ge({props:{anchor:"transformers.RemBertForMultipleChoice.forward.example",$$slots:{default:[iv]},$$scope:{ctx:z}}}),Qs=new tt({}),Vs=new se({props:{name:"class transformers.RemBertForTokenClassification",anchor:"transformers.RemBertForTokenClassification",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.RemBertForTokenClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/rembert#transformers.RemBertConfig">RemBertConfig</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/rembert/modeling_rembert.py#L1357"}}),Xs=new se({props:{name:"forward",anchor:"transformers.RemBertForTokenClassification.forward",parameters:[{name:"input_ids",val:": FloatTensor = None"},{name:"attention_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"token_type_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"position_ids",val:": typing.Optional[torch.FloatTensor] = 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.RemBertForTokenClassification.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.RemBertForTokenClassification.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.RemBertForTokenClassification.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.RemBertForTokenClassification.forward.position_ids",description:`<strong>position_ids</strong> (<code>torch.LongTensor</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>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.RemBertForTokenClassification.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.RemBertForTokenClassification.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.RemBertForTokenClassification.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.RemBertForTokenClassification.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.RemBertForTokenClassification.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.RemBertForTokenClassification.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/rembert/modeling_rembert.py#L1369",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/rembert#transformers.RemBertConfig"
>RemBertConfig</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>
`}}),ln=new Ze({props:{$$slots:{default:[lv]},$$scope:{ctx:z}}}),dn=new Ge({props:{anchor:"transformers.RemBertForTokenClassification.forward.example",$$slots:{default:[dv]},$$scope:{ctx:z}}}),Ys=new tt({}),Zs=new se({props:{name:"class transformers.RemBertForQuestionAnswering",anchor:"transformers.RemBertForQuestionAnswering",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.RemBertForQuestionAnswering.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/rembert#transformers.RemBertConfig">RemBertConfig</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/rembert/modeling_rembert.py#L1435"}}),or=new se({props:{name:"forward",anchor:"transformers.RemBertForQuestionAnswering.forward",parameters:[{name:"input_ids",val:": FloatTensor = None"},{name:"attention_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"token_type_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"position_ids",val:": typing.Optional[torch.FloatTensor] = 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.RemBertForQuestionAnswering.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.RemBertForQuestionAnswering.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.RemBertForQuestionAnswering.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.RemBertForQuestionAnswering.forward.position_ids",description:`<strong>position_ids</strong> (<code>torch.LongTensor</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>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.RemBertForQuestionAnswering.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.RemBertForQuestionAnswering.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.RemBertForQuestionAnswering.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.RemBertForQuestionAnswering.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.RemBertForQuestionAnswering.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.RemBertForQuestionAnswering.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.RemBertForQuestionAnswering.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/rembert/modeling_rembert.py#L1447",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/rembert#transformers.RemBertConfig"
>RemBertConfig</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>
`}}),pn=new Ze({props:{$$slots:{default:[cv]},$$scope:{ctx:z}}}),mn=new Ge({props:{anchor:"transformers.RemBertForQuestionAnswering.forward.example",$$slots:{default:[pv]},$$scope:{ctx:z}}}),nr=new tt({}),sr=new se({props:{name:"class transformers.TFRemBertModel",anchor:"transformers.TFRemBertModel",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFRemBertModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/rembert#transformers.RemBertConfig">RemBertConfig</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/rembert/modeling_tf_rembert.py#L944"}}),un=new Ze({props:{$$slots:{default:[mv]},$$scope:{ctx:z}}}),lr=new se({props:{name:"call",anchor:"transformers.TFRemBertModel.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:"position_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:"encoder_hidden_states",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"encoder_attention_mask",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"past_key_values",val:": typing.Union[typing.Tuple[typing.Tuple[typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor]]], NoneType] = 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"},{name:"training",val:": typing.Optional[bool] = False"}],parametersDescription:[{anchor:"transformers.TFRemBertModel.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.TFRemBertModel.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.TFRemBertModel.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.TFRemBertModel.call.position_ids",description:`<strong>position_ids</strong> (<code>np.ndarray</code> or <code>tf.Tensor</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>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.TFRemBertModel.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.TFRemBertModel.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.TFRemBertModel.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.TFRemBertModel.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.TFRemBertModel.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.TFRemBertModel.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.TFRemBertModel.call.encoder_hidden_states",description:`<strong>encoder_hidden_states</strong>  (<code>tf.Tensor</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.TFRemBertModel.call.encoder_attention_mask",description:`<strong>encoder_attention_mask</strong> (<code>tf.Tensor</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.TFRemBertModel.call.past_key_values",description:`<strong>past_key_values</strong> (<code>Tuple[Tuple[tf.Tensor]]</code> of length <code>config.n_layers</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.TFRemBertModel.call.use_cache",description:`<strong>use_cache</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#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>). Set to <code>False</code> during training, <code>True</code> during generation`,name:"use_cache"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/rembert/modeling_tf_rembert.py#L950",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_tf_outputs.TFBaseModelOutputWithPoolingAndCrossAttentions"
>transformers.modeling_tf_outputs.TFBaseModelOutputWithPoolingAndCrossAttentions</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/rembert#transformers.RemBertConfig"
>RemBertConfig</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>past_key_values</strong> (<code>List[tf.Tensor]</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) \u2014 List of <code>tf.Tensor</code> of length <code>config.n_layers</code>, with each tensor of shape <code>(2, batch_size, num_heads, sequence_length, embed_size_per_head)</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>
<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>
<li>
<p><strong>cross_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 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_tf_outputs.TFBaseModelOutputWithPoolingAndCrossAttentions"
>transformers.modeling_tf_outputs.TFBaseModelOutputWithPoolingAndCrossAttentions</a> or <code>tuple(tf.Tensor)</code></p>
`}}),fn=new Ze({props:{$$slots:{default:[hv]},$$scope:{ctx:z}}}),gn=new Ge({props:{anchor:"transformers.TFRemBertModel.call.example",$$slots:{default:[uv]},$$scope:{ctx:z}}}),dr=new tt({}),cr=new se({props:{name:"class transformers.TFRemBertForMaskedLM",anchor:"transformers.TFRemBertForMaskedLM",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFRemBertForMaskedLM.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/rembert#transformers.RemBertConfig">RemBertConfig</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/rembert/modeling_tf_rembert.py#L1036"}}),kn=new Ze({props:{$$slots:{default:[fv]},$$scope:{ctx:z}}}),fr=new se({props:{name:"call",anchor:"transformers.TFRemBertForMaskedLM.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:"position_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.TFRemBertForMaskedLM.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.TFRemBertForMaskedLM.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.TFRemBertForMaskedLM.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.TFRemBertForMaskedLM.call.position_ids",description:`<strong>position_ids</strong> (<code>np.ndarray</code> or <code>tf.Tensor</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>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.TFRemBertForMaskedLM.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.TFRemBertForMaskedLM.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.TFRemBertForMaskedLM.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.TFRemBertForMaskedLM.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.TFRemBertForMaskedLM.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.TFRemBertForMaskedLM.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.TFRemBertForMaskedLM.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/rembert/modeling_tf_rembert.py#L1052",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/rembert#transformers.RemBertConfig"
>RemBertConfig</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>
`}}),bn=new Ze({props:{$$slots:{default:[gv]},$$scope:{ctx:z}}}),yn=new Ge({props:{anchor:"transformers.TFRemBertForMaskedLM.call.example",$$slots:{default:[_v]},$$scope:{ctx:z}}}),Tn=new Ge({props:{anchor:"transformers.TFRemBertForMaskedLM.call.example-2",$$slots:{default:[kv]},$$scope:{ctx:z}}}),gr=new tt({}),_r=new se({props:{name:"class transformers.TFRemBertForCausalLM",anchor:"transformers.TFRemBertForCausalLM",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFRemBertForCausalLM.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/rembert#transformers.RemBertConfig">RemBertConfig</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/rembert/modeling_tf_rembert.py#L1116"}}),wn=new Ze({props:{$$slots:{default:[bv]},$$scope:{ctx:z}}}),vr=new se({props:{name:"call",anchor:"transformers.TFRemBertForCausalLM.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:"position_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:"encoder_hidden_states",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"encoder_attention_mask",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"past_key_values",val:": typing.Union[typing.Tuple[typing.Tuple[typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor]]], NoneType] = 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"},{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/rembert/modeling_tf_rembert.py#L1142",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_tf_outputs.TFCausalLMOutputWithCrossAttentions"
>transformers.modeling_tf_outputs.TFCausalLMOutputWithCrossAttentions</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/rembert#transformers.RemBertConfig"
>RemBertConfig</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>
<li>
<p><strong>cross_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 of the decoder\u2019s cross-attention layer, 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>List[tf.Tensor]</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) \u2014 List of <code>tf.Tensor</code> of length <code>config.n_layers</code>, with each tensor of shape <code>(2, batch_size, num_heads, sequence_length, embed_size_per_head)</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_tf_outputs.TFCausalLMOutputWithCrossAttentions"
>transformers.modeling_tf_outputs.TFCausalLMOutputWithCrossAttentions</a> or <code>tuple(tf.Tensor)</code></p>
`}}),$n=new Ge({props:{anchor:"transformers.TFRemBertForCausalLM.call.example",$$slots:{default:[yv]},$$scope:{ctx:z}}}),Er=new tt({}),Rr=new se({props:{name:"class transformers.TFRemBertForSequenceClassification",anchor:"transformers.TFRemBertForSequenceClassification",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFRemBertForSequenceClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/rembert#transformers.RemBertConfig">RemBertConfig</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/rembert/modeling_tf_rembert.py#L1249"}}),En=new Ze({props:{$$slots:{default:[Tv]},$$scope:{ctx:z}}}),Cr=new se({props:{name:"call",anchor:"transformers.TFRemBertForSequenceClassification.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:"position_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.TFRemBertForSequenceClassification.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.TFRemBertForSequenceClassification.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.TFRemBertForSequenceClassification.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.TFRemBertForSequenceClassification.call.position_ids",description:`<strong>position_ids</strong> (<code>np.ndarray</code> or <code>tf.Tensor</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>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.TFRemBertForSequenceClassification.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.TFRemBertForSequenceClassification.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.TFRemBertForSequenceClassification.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.TFRemBertForSequenceClassification.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.TFRemBertForSequenceClassification.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.TFRemBertForSequenceClassification.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.TFRemBertForSequenceClassification.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/rembert/modeling_tf_rembert.py#L1263",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/rembert#transformers.RemBertConfig"
>RemBertConfig</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>
`}}),Rn=new Ze({props:{$$slots:{default:[vv]},$$scope:{ctx:z}}}),Bn=new Ge({props:{anchor:"transformers.TFRemBertForSequenceClassification.call.example",$$slots:{default:[wv]},$$scope:{ctx:z}}}),Mn=new Ge({props:{anchor:"transformers.TFRemBertForSequenceClassification.call.example-2",$$slots:{default:[$v]},$$scope:{ctx:z}}}),qr=new tt({}),xr=new se({props:{name:"class transformers.TFRemBertForMultipleChoice",anchor:"transformers.TFRemBertForMultipleChoice",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFRemBertForMultipleChoice.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/rembert#transformers.RemBertConfig">RemBertConfig</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/rembert/modeling_tf_rembert.py#L1332"}}),Cn=new Ze({props:{$$slots:{default:[Fv]},$$scope:{ctx:z}}}),Lr=new se({props:{name:"call",anchor:"transformers.TFRemBertForMultipleChoice.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:"position_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.TFRemBertForMultipleChoice.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.TFRemBertForMultipleChoice.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.TFRemBertForMultipleChoice.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.TFRemBertForMultipleChoice.call.position_ids",description:`<strong>position_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;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.TFRemBertForMultipleChoice.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.TFRemBertForMultipleChoice.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.TFRemBertForMultipleChoice.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.TFRemBertForMultipleChoice.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.TFRemBertForMultipleChoice.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.TFRemBertForMultipleChoice.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.TFRemBertForMultipleChoice.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/rembert/modeling_tf_rembert.py#L1352",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/rembert#transformers.RemBertConfig"
>RemBertConfig</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>
`}}),qn=new Ze({props:{$$slots:{default:[Ev]},$$scope:{ctx:z}}}),xn=new Ge({props:{anchor:"transformers.TFRemBertForMultipleChoice.call.example",$$slots:{default:[Rv]},$$scope:{ctx:z}}}),Or=new tt({}),Dr=new se({props:{name:"class transformers.TFRemBertForTokenClassification",anchor:"transformers.TFRemBertForTokenClassification",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFRemBertForTokenClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/rembert#transformers.RemBertConfig">RemBertConfig</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/rembert/modeling_tf_rembert.py#L1458"}}),An=new Ze({props:{$$slots:{default:[Bv]},$$scope:{ctx:z}}}),Wr=new se({props:{name:"call",anchor:"transformers.TFRemBertForTokenClassification.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:"position_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.TFRemBertForTokenClassification.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.TFRemBertForTokenClassification.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.TFRemBertForTokenClassification.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.TFRemBertForTokenClassification.call.position_ids",description:`<strong>position_ids</strong> (<code>np.ndarray</code> or <code>tf.Tensor</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>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.TFRemBertForTokenClassification.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.TFRemBertForTokenClassification.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.TFRemBertForTokenClassification.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.TFRemBertForTokenClassification.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.TFRemBertForTokenClassification.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.TFRemBertForTokenClassification.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.TFRemBertForTokenClassification.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/rembert/modeling_tf_rembert.py#L1470",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/rembert#transformers.RemBertConfig"
>RemBertConfig</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>
`}}),Pn=new Ze({props:{$$slots:{default:[Mv]},$$scope:{ctx:z}}}),Ln=new Ge({props:{anchor:"transformers.TFRemBertForTokenClassification.call.example",$$slots:{default:[zv]},$$scope:{ctx:z}}}),On=new Ge({props:{anchor:"transformers.TFRemBertForTokenClassification.call.example-2",$$slots:{default:[Cv]},$$scope:{ctx:z}}}),Ur=new tt({}),Kr=new se({props:{name:"class transformers.TFRemBertForQuestionAnswering",anchor:"transformers.TFRemBertForQuestionAnswering",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFRemBertForQuestionAnswering.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/rembert#transformers.RemBertConfig">RemBertConfig</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/rembert/modeling_tf_rembert.py#L1537"}}),Nn=new Ze({props:{$$slots:{default:[qv]},$$scope:{ctx:z}}}),Jr=new se({props:{name:"call",anchor:"transformers.TFRemBertForQuestionAnswering.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:"position_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.TFRemBertForQuestionAnswering.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.TFRemBertForQuestionAnswering.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.TFRemBertForQuestionAnswering.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.TFRemBertForQuestionAnswering.call.position_ids",description:`<strong>position_ids</strong> (<code>np.ndarray</code> or <code>tf.Tensor</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>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.TFRemBertForQuestionAnswering.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.TFRemBertForQuestionAnswering.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.TFRemBertForQuestionAnswering.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.TFRemBertForQuestionAnswering.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.TFRemBertForQuestionAnswering.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.TFRemBertForQuestionAnswering.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.TFRemBertForQuestionAnswering.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.TFRemBertForQuestionAnswering.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/rembert/modeling_tf_rembert.py#L1548",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/rembert#transformers.RemBertConfig"
>RemBertConfig</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>
`}}),In=new Ze({props:{$$slots:{default:[xv]},$$scope:{ctx:z}}}),Sn=new Ge({props:{anchor:"transformers.TFRemBertForQuestionAnswering.call.example",$$slots:{default:[jv]},$$scope:{ctx:z}}}),Wn=new Ge({props:{anchor:"transformers.TFRemBertForQuestionAnswering.call.example-2",$$slots:{default:[Av]},$$scope:{ctx:z}}}),{c(){d=s("meta"),k=m(),p=s("h1"),u=s("a"),b=s("span"),v(l.$$.fragment),c=m(),C=s("span"),ve=o("RemBERT"),fe=m(),N=s("h2"),le=s("a"),te=s("span"),v(T.$$.fragment),we=m(),V=s("span"),$e=o("Overview"),ge=m(),S=s("p"),Fe=o("The RemBERT model was proposed in "),ce=s("a"),G=o("Rethinking Embedding Coupling in Pre-trained Language Models"),Ee=o(" by Hyung Won Chung, Thibault F\xE9vry, Henry Tsai, Melvin Johnson, Sebastian Ruder."),_e=m(),U=s("p"),Re=o("The abstract from the paper is the following:"),ke=m(),K=s("p"),he=s("em"),Be=o(`We re-evaluate the standard practice of sharing weights between input and output embeddings in state-of-the-art
pre-trained language models. We show that decoupled embeddings provide increased modeling flexibility, allowing us to
significantly improve the efficiency of parameter allocation in the input embedding of multilingual models. By
reallocating the input embedding parameters in the Transformer layers, we achieve dramatically better performance on
standard natural language understanding tasks with the same number of parameters during fine-tuning. We also show that
allocating additional capacity to the output embedding provides benefits to the model that persist through the
fine-tuning stage even though the output embedding is discarded after pre-training. Our analysis shows that larger
output embeddings prevent the model\u2019s last layers from overspecializing to the pre-training task and encourage
Transformer representations to be more general and more transferable to other tasks and languages. Harnessing these
findings, we are able to train models that achieve strong performance on the XTREME benchmark without increasing the
number of parameters at the fine-tuning stage.`),ne=m(),q=s("p"),A=o("Tips:"),be=m(),H=s("p"),Me=o(`For fine-tuning, RemBERT can be thought of as a bigger version of mBERT with an ALBERT-like factorization of the
embedding layer. The embeddings are not tied in pre-training, in contrast with BERT, which enables smaller input
embeddings (preserved during fine-tuning) and bigger output embeddings (discarded at fine-tuning). The tokenizer is
also similar to the Albert one rather than the BERT one.`),ye=m(),I=s("h2"),de=s("a"),ue=s("span"),v(x.$$.fragment),ze=m(),J=s("span"),Ce=o("RemBertConfig"),Te=m(),O=s("div"),v(pe.$$.fragment),qe=m(),L=s("p"),xe=o("This is the configuration class to store the configuration of a "),Q=s("a"),je=o("RemBertModel"),re=o(`. It is used to instantiate an
RemBERT 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 RemBERT
`),j=s("a"),Ae=o("google/rembert"),P=o(" architecture."),Pe=m(),ie=s("p"),f=o("Configuration objects inherit from "),B=s("a"),Ue=o("PretrainedConfig"),ae=o(` and can be used to control the model outputs. Read the
documentation from `),Ne=s("a"),Ke=o("PretrainedConfig"),M=o(" for more information."),He=m(),v(Oe.$$.fragment),Se=m(),Le=s("h2"),De=s("a"),D=s("span"),v(W.$$.fragment),Qe=m(),Ie=s("span"),X=o("RemBertTokenizer"),We=m(),oe=s("div"),v(me.$$.fragment),Ve=m(),Z=s("p"),Je=o("Construct a RemBERT tokenizer. Based on "),rs=s("a"),Jc=o("SentencePiece"),Gc=o("."),Xc=m(),as=s("p"),Yc=o("This tokenizer inherits from "),sa=s("a"),Zc=o("PreTrainedTokenizer"),ep=o(` which contains most of the main methods. Users should refer to
this superclass for more information regarding those methods.`),tp=m(),Qt=s("div"),v(is.$$.fragment),op=m(),ti=s("p"),np=o(`Build model inputs from a sequence or a pair of sequence for sequence classification tasks by concatenating and
adding special tokens. A REMBERT sequence has the following format:`),sp=m(),ls=s("ul"),ra=s("li"),rp=o("single sequence: "),oi=s("code"),ap=o("[CLS] X [SEP]"),ip=m(),aa=s("li"),lp=o("pair of sequences: "),ni=s("code"),dp=o("[CLS] A [SEP] B [SEP]"),cp=m(),Do=s("div"),v(ds.$$.fragment),pp=m(),cs=s("p"),mp=o(`Retrieve sequence ids from a token list that has no special tokens added. This method is called when adding
special tokens using the tokenizer `),si=s("code"),hp=o("prepare_for_model"),up=o(" method."),fp=m(),Ft=s("div"),v(ps.$$.fragment),gp=m(),ri=s("p"),_p=o("Create a mask from the two sequences passed to be used in a sequence-pair classification task. A RemBERT"),kp=m(),v(No.$$.fragment),bp=m(),oo=s("p"),yp=o("If "),ai=s("code"),Tp=o("token_ids_1"),vp=o(" is "),ii=s("code"),wp=o("None"),$p=o(", this method only returns the first portion of the mask (0s)."),Fp=m(),ia=s("div"),v(ms.$$.fragment),Rd=m(),no=s("h2"),Io=s("a"),li=s("span"),v(hs.$$.fragment),Ep=m(),di=s("span"),Rp=o("RemBertTokenizerFast"),Bd=m(),ot=s("div"),v(us.$$.fragment),Bp=m(),Wt=s("p"),Mp=o("Construct a \u201Cfast\u201D RemBert tokenizer (backed by HuggingFace\u2019s "),ci=s("em"),zp=o("tokenizers"),Cp=o(` library). Based on
`),fs=s("a"),qp=o("Unigram"),xp=o(`. This
tokenizer inherits from `),la=s("a"),jp=o("PreTrainedTokenizerFast"),Ap=o(` which contains most of the main methods. Users should refer to
this superclass for more information regarding those methods`),Pp=m(),Vt=s("div"),v(gs.$$.fragment),Lp=m(),pi=s("p"),Op=o(`Build model inputs from a sequence or a pair of sequence for sequence classification tasks by concatenating and
adding special tokens. A RemBERT sequence has the following format:`),Dp=m(),_s=s("ul"),da=s("li"),Np=o("single sequence: "),mi=s("code"),Ip=o("[CLS] X [SEP]"),Sp=m(),ca=s("li"),Wp=o("pair of sequences: "),hi=s("code"),Up=o("[CLS] A [SEP] B [SEP]"),Kp=m(),So=s("div"),v(ks.$$.fragment),Hp=m(),bs=s("p"),Qp=o(`Retrieves sequence ids from a token list that has no special tokens added. This method is called when adding
special tokens using the tokenizer `),ui=s("code"),Vp=o("prepare_for_model"),Jp=o(" method."),Gp=m(),Et=s("div"),v(ys.$$.fragment),Xp=m(),fi=s("p"),Yp=o("Creates a mask from the two sequences passed to be used in a sequence-pair classification task. A RemBERT"),Zp=m(),v(Wo.$$.fragment),em=m(),gi=s("p"),tm=o("if token_ids_1 is None, only returns the first portion of the mask (0s)."),om=m(),pa=s("div"),v(Ts.$$.fragment),Md=m(),so=s("h2"),Uo=s("a"),_i=s("span"),v(vs.$$.fragment),nm=m(),ki=s("span"),sm=o("RemBertModel"),zd=m(),ht=s("div"),v(ws.$$.fragment),rm=m(),$s=s("p"),am=o(`The bare RemBERT Model transformer outputting raw hidden-states without any specific head on top.
This model is a PyTorch `),Fs=s("a"),im=o("torch.nn.Module"),lm=o(` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),dm=m(),Es=s("p"),cm=o(`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 `),Rs=s("a"),pm=o(`Attention is
all you need`),mm=o(` by Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit,
Llion Jones, Aidan N. Gomez, Lukasz Kaiser and Illia Polosukhin.`),hm=m(),nt=s("p"),um=o("To behave as an decoder the model needs to be initialized with the "),bi=s("code"),fm=o("is_decoder"),gm=o(` argument of the configuration set
to `),yi=s("code"),_m=o("True"),km=o(". To be used in a Seq2Seq model, the model needs to initialized with both "),Ti=s("code"),bm=o("is_decoder"),ym=o(` argument and
`),vi=s("code"),Tm=o("add_cross_attention"),vm=o(" set to "),wi=s("code"),wm=o("True"),$m=o("; an "),$i=s("code"),Fm=o("encoder_hidden_states"),Em=o(" is then expected as an input to the forward pass."),Rm=m(),Rt=s("div"),v(Bs.$$.fragment),Bm=m(),ro=s("p"),Mm=o("The "),ma=s("a"),zm=o("RemBertModel"),Cm=o(" forward method, overrides the "),Fi=s("code"),qm=o("__call__"),xm=o(" special method."),jm=m(),v(Ko.$$.fragment),Am=m(),v(Ho.$$.fragment),Cd=m(),ao=s("h2"),Qo=s("a"),Ei=s("span"),v(Ms.$$.fragment),Pm=m(),Ri=s("span"),Lm=o("RemBertForCausalLM"),qd=m(),Ut=s("div"),v(zs.$$.fragment),Om=m(),io=s("p"),Dm=o("RemBERT Model with a "),Bi=s("code"),Nm=o("language modeling"),Im=o(` head on top for CLM fine-tuning.
This model is a PyTorch `),Cs=s("a"),Sm=o("torch.nn.Module"),Wm=o(` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),Um=m(),Bt=s("div"),v(qs.$$.fragment),Km=m(),lo=s("p"),Hm=o("The "),ha=s("a"),Qm=o("RemBertForCausalLM"),Vm=o(" forward method, overrides the "),Mi=s("code"),Jm=o("__call__"),Gm=o(" special method."),Xm=m(),v(Vo.$$.fragment),Ym=m(),v(Jo.$$.fragment),xd=m(),co=s("h2"),Go=s("a"),zi=s("span"),v(xs.$$.fragment),Zm=m(),Ci=s("span"),eh=o("RemBertForMaskedLM"),jd=m(),Kt=s("div"),v(js.$$.fragment),th=m(),po=s("p"),oh=o("RemBERT Model with a "),qi=s("code"),nh=o("language modeling"),sh=o(` head on top.
This model is a PyTorch `),As=s("a"),rh=o("torch.nn.Module"),ah=o(` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),ih=m(),Mt=s("div"),v(Ps.$$.fragment),lh=m(),mo=s("p"),dh=o("The "),ua=s("a"),ch=o("RemBertForMaskedLM"),ph=o(" forward method, overrides the "),xi=s("code"),mh=o("__call__"),hh=o(" special method."),uh=m(),v(Xo.$$.fragment),fh=m(),v(Yo.$$.fragment),Ad=m(),ho=s("h2"),Zo=s("a"),ji=s("span"),v(Ls.$$.fragment),gh=m(),Ai=s("span"),_h=o("RemBertForSequenceClassification"),Pd=m(),Tt=s("div"),v(Os.$$.fragment),kh=m(),Pi=s("p"),bh=o(`RemBERT Model transformer with a sequence classification/regression head on top (a linear layer on top of the
pooled output) e.g. for GLUE tasks.`),yh=m(),Ds=s("p"),Th=o("This model is a PyTorch "),Ns=s("a"),vh=o("torch.nn.Module"),wh=o(` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),$h=m(),ut=s("div"),v(Is.$$.fragment),Fh=m(),uo=s("p"),Eh=o("The "),fa=s("a"),Rh=o("RemBertForSequenceClassification"),Bh=o(" forward method, overrides the "),Li=s("code"),Mh=o("__call__"),zh=o(" special method."),Ch=m(),v(en.$$.fragment),qh=m(),v(tn.$$.fragment),xh=m(),v(on.$$.fragment),Ld=m(),fo=s("h2"),nn=s("a"),Oi=s("span"),v(Ss.$$.fragment),jh=m(),Di=s("span"),Ah=o("RemBertForMultipleChoice"),Od=m(),vt=s("div"),v(Ws.$$.fragment),Ph=m(),Ni=s("p"),Lh=o(`RemBERT 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.`),Oh=m(),Us=s("p"),Dh=o("This model is a PyTorch "),Ks=s("a"),Nh=o("torch.nn.Module"),Ih=o(` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),Sh=m(),zt=s("div"),v(Hs.$$.fragment),Wh=m(),go=s("p"),Uh=o("The "),ga=s("a"),Kh=o("RemBertForMultipleChoice"),Hh=o(" forward method, overrides the "),Ii=s("code"),Qh=o("__call__"),Vh=o(" special method."),Jh=m(),v(sn.$$.fragment),Gh=m(),v(rn.$$.fragment),Dd=m(),_o=s("h2"),an=s("a"),Si=s("span"),v(Qs.$$.fragment),Xh=m(),Wi=s("span"),Yh=o("RemBertForTokenClassification"),Nd=m(),wt=s("div"),v(Vs.$$.fragment),Zh=m(),Ui=s("p"),eu=o(`RemBERT 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.`),tu=m(),Js=s("p"),ou=o("This model is a PyTorch "),Gs=s("a"),nu=o("torch.nn.Module"),su=o(` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),ru=m(),Ct=s("div"),v(Xs.$$.fragment),au=m(),ko=s("p"),iu=o("The "),_a=s("a"),lu=o("RemBertForTokenClassification"),du=o(" forward method, overrides the "),Ki=s("code"),cu=o("__call__"),pu=o(" special method."),mu=m(),v(ln.$$.fragment),hu=m(),v(dn.$$.fragment),Id=m(),bo=s("h2"),cn=s("a"),Hi=s("span"),v(Ys.$$.fragment),uu=m(),Qi=s("span"),fu=o("RemBertForQuestionAnswering"),Sd=m(),$t=s("div"),v(Zs.$$.fragment),gu=m(),yo=s("p"),_u=o(`RemBERT 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 `),Vi=s("code"),ku=o("span start logits"),bu=o(" and "),Ji=s("code"),yu=o("span end logits"),Tu=o(")."),vu=m(),er=s("p"),wu=o("This model is a PyTorch "),tr=s("a"),$u=o("torch.nn.Module"),Fu=o(` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),Eu=m(),qt=s("div"),v(or.$$.fragment),Ru=m(),To=s("p"),Bu=o("The "),ka=s("a"),Mu=o("RemBertForQuestionAnswering"),zu=o(" forward method, overrides the "),Gi=s("code"),Cu=o("__call__"),qu=o(" special method."),xu=m(),v(pn.$$.fragment),ju=m(),v(mn.$$.fragment),Wd=m(),vo=s("h2"),hn=s("a"),Xi=s("span"),v(nr.$$.fragment),Au=m(),Yi=s("span"),Pu=o("TFRemBertModel"),Ud=m(),st=s("div"),v(sr.$$.fragment),Lu=m(),Zi=s("p"),Ou=o("The bare RemBERT Model transformer outputing raw hidden-states without any specific head on top."),Du=m(),rr=s("p"),Nu=o("This model inherits from "),ba=s("a"),Iu=o("TFPreTrainedModel"),Su=o(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),Wu=m(),ar=s("p"),Uu=o("This model is also a "),ir=s("a"),Ku=o("tf.keras.Model"),Hu=o(` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),Qu=m(),v(un.$$.fragment),Vu=m(),xt=s("div"),v(lr.$$.fragment),Ju=m(),wo=s("p"),Gu=o("The "),ya=s("a"),Xu=o("TFRemBertModel"),Yu=o(" forward method, overrides the "),el=s("code"),Zu=o("__call__"),ef=o(" special method."),tf=m(),v(fn.$$.fragment),of=m(),v(gn.$$.fragment),Kd=m(),$o=s("h2"),_n=s("a"),tl=s("span"),v(dr.$$.fragment),nf=m(),ol=s("span"),sf=o("TFRemBertForMaskedLM"),Hd=m(),rt=s("div"),v(cr.$$.fragment),rf=m(),pr=s("p"),af=o("RemBERT Model with a "),nl=s("code"),lf=o("language modeling"),df=o(" head on top."),cf=m(),mr=s("p"),pf=o("This model inherits from "),Ta=s("a"),mf=o("TFPreTrainedModel"),hf=o(`. 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.)`),uf=m(),hr=s("p"),ff=o("This model is also a "),ur=s("a"),gf=o("tf.keras.Model"),_f=o(` 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.`),kf=m(),v(kn.$$.fragment),bf=m(),ft=s("div"),v(fr.$$.fragment),yf=m(),Fo=s("p"),Tf=o("The "),va=s("a"),vf=o("TFRemBertForMaskedLM"),wf=o(" forward method, overrides the "),sl=s("code"),$f=o("__call__"),Ff=o(" special method."),Ef=m(),v(bn.$$.fragment),Rf=m(),v(yn.$$.fragment),Bf=m(),v(Tn.$$.fragment),Qd=m(),Eo=s("h2"),vn=s("a"),rl=s("span"),v(gr.$$.fragment),Mf=m(),al=s("span"),zf=o("TFRemBertForCausalLM"),Vd=m(),at=s("div"),v(_r.$$.fragment),Cf=m(),kr=s("p"),qf=o("RemBERT Model with a "),il=s("code"),xf=o("language modeling"),jf=o(" head on top for CLM fine-tuning."),Af=m(),br=s("p"),Pf=o("This model inherits from "),wa=s("a"),Lf=o("TFPreTrainedModel"),Of=o(`. 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.)`),Df=m(),yr=s("p"),Nf=o("This model is also a "),Tr=s("a"),If=o("tf.keras.Model"),Sf=o(` 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.`),Wf=m(),v(wn.$$.fragment),Uf=m(),gt=s("div"),v(vr.$$.fragment),Kf=m(),et=s("p"),Hf=o("encoder_hidden_states  ("),ll=s("code"),Qf=o("tf.Tensor"),Vf=o(" of shape "),dl=s("code"),Jf=o("(batch_size, sequence_length, hidden_size)"),Gf=o(", "),cl=s("em"),Xf=o("optional"),Yf=o(`):
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.
encoder_attention_mask (`),pl=s("code"),Zf=o("tf.Tensor"),eg=o(" of shape "),ml=s("code"),tg=o("(batch_size, sequence_length)"),og=o(", "),hl=s("em"),ng=o("optional"),sg=o(`):
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 `),ul=s("code"),rg=o("[0, 1]"),ag=o(":"),ig=m(),wr=s("ul"),$r=s("li"),lg=o("1 for tokens that are "),fl=s("strong"),dg=o("not masked"),cg=o(","),pg=m(),Fr=s("li"),mg=o("0 for tokens that are "),gl=s("strong"),hg=o("masked"),ug=o("."),fg=m(),Y=s("p"),gg=o("past_key_values ("),_l=s("code"),_g=o("Tuple[Tuple[tf.Tensor]]"),kg=o(" of length "),kl=s("code"),bg=o("config.n_layers"),yg=o(`)
contains precomputed key and value hidden states of the attention blocks. Can be used to speed up decoding.
If `),bl=s("code"),Tg=o("past_key_values"),vg=o(" are used, the user can optionally input only the last "),yl=s("code"),wg=o("decoder_input_ids"),$g=o(` (those that
don\u2019t have their past key value states given to this model) of shape `),Tl=s("code"),Fg=o("(batch_size, 1)"),Eg=o(` instead of all
`),vl=s("code"),Rg=o("decoder_input_ids"),Bg=o(" of shape "),wl=s("code"),Mg=o("(batch_size, sequence_length)"),zg=o(`.
use_cache (`),$l=s("code"),Cg=o("bool"),qg=o(", "),Fl=s("em"),xg=o("optional"),jg=o(", defaults to "),El=s("code"),Ag=o("True"),Pg=o(`):
If set to `),Rl=s("code"),Lg=o("True"),Og=o(", "),Bl=s("code"),Dg=o("past_key_values"),Ng=o(` key value states are returned and can be used to speed up decoding (see
`),Ml=s("code"),Ig=o("past_key_values"),Sg=o("). Set to "),zl=s("code"),Wg=o("False"),Ug=o(" during training, "),Cl=s("code"),Kg=o("True"),Hg=o(` during generation
labels (`),ql=s("code"),Qg=o("tf.Tensor"),Vg=o(" or "),xl=s("code"),Jg=o("np.ndarray"),Gg=o(" of shape "),jl=s("code"),Xg=o("(batch_size, sequence_length)"),Yg=o(", "),Al=s("em"),Zg=o("optional"),e_=o(`):
Labels for computing the cross entropy classification loss. Indices should be in `),Pl=s("code"),t_=o("[0, ..., config.vocab_size - 1]"),o_=o("."),n_=m(),v($n.$$.fragment),Jd=m(),Ro=s("h2"),Fn=s("a"),Ll=s("span"),v(Er.$$.fragment),s_=m(),Ol=s("span"),r_=o("TFRemBertForSequenceClassification"),Gd=m(),it=s("div"),v(Rr.$$.fragment),a_=m(),Dl=s("p"),i_=o("RemBERT Model transformer with a sequence classification/regression head on top e.g., for GLUE tasks."),l_=m(),Br=s("p"),d_=o("This model inherits from "),$a=s("a"),c_=o("TFPreTrainedModel"),p_=o(`. 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.)`),m_=m(),Mr=s("p"),h_=o("This model is also a "),zr=s("a"),u_=o("tf.keras.Model"),f_=o(` 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.`),g_=m(),v(En.$$.fragment),__=m(),_t=s("div"),v(Cr.$$.fragment),k_=m(),Bo=s("p"),b_=o("The "),Fa=s("a"),y_=o("TFRemBertForSequenceClassification"),T_=o(" forward method, overrides the "),Nl=s("code"),v_=o("__call__"),w_=o(" special method."),$_=m(),v(Rn.$$.fragment),F_=m(),v(Bn.$$.fragment),E_=m(),v(Mn.$$.fragment),Xd=m(),Mo=s("h2"),zn=s("a"),Il=s("span"),v(qr.$$.fragment),R_=m(),Sl=s("span"),B_=o("TFRemBertForMultipleChoice"),Yd=m(),lt=s("div"),v(xr.$$.fragment),M_=m(),Wl=s("p"),z_=o(`RemBERT 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.`),C_=m(),jr=s("p"),q_=o("This model inherits from "),Ea=s("a"),x_=o("TFPreTrainedModel"),j_=o(`. 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.)`),A_=m(),Ar=s("p"),P_=o("This model is also a "),Pr=s("a"),L_=o("tf.keras.Model"),O_=o(` 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.`),D_=m(),v(Cn.$$.fragment),N_=m(),jt=s("div"),v(Lr.$$.fragment),I_=m(),zo=s("p"),S_=o("The "),Ra=s("a"),W_=o("TFRemBertForMultipleChoice"),U_=o(" forward method, overrides the "),Ul=s("code"),K_=o("__call__"),H_=o(" special method."),Q_=m(),v(qn.$$.fragment),V_=m(),v(xn.$$.fragment),Zd=m(),Co=s("h2"),jn=s("a"),Kl=s("span"),v(Or.$$.fragment),J_=m(),Hl=s("span"),G_=o("TFRemBertForTokenClassification"),ec=m(),dt=s("div"),v(Dr.$$.fragment),X_=m(),Ql=s("p"),Y_=o(`RemBERT 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.`),Z_=m(),Nr=s("p"),ek=o("This model inherits from "),Ba=s("a"),tk=o("TFPreTrainedModel"),ok=o(`. 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.)`),nk=m(),Ir=s("p"),sk=o("This model is also a "),Sr=s("a"),rk=o("tf.keras.Model"),ak=o(` 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.`),ik=m(),v(An.$$.fragment),lk=m(),kt=s("div"),v(Wr.$$.fragment),dk=m(),qo=s("p"),ck=o("The "),Ma=s("a"),pk=o("TFRemBertForTokenClassification"),mk=o(" forward method, overrides the "),Vl=s("code"),hk=o("__call__"),uk=o(" special method."),fk=m(),v(Pn.$$.fragment),gk=m(),v(Ln.$$.fragment),_k=m(),v(On.$$.fragment),tc=m(),xo=s("h2"),Dn=s("a"),Jl=s("span"),v(Ur.$$.fragment),kk=m(),Gl=s("span"),bk=o("TFRemBertForQuestionAnswering"),oc=m(),ct=s("div"),v(Kr.$$.fragment),yk=m(),jo=s("p"),Tk=o(`RemBERT 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 `),Xl=s("code"),vk=o("span start logits"),wk=o(" and "),Yl=s("code"),$k=o("span end logits"),Fk=o(")."),Ek=m(),Hr=s("p"),Rk=o("This model inherits from "),za=s("a"),Bk=o("TFPreTrainedModel"),Mk=o(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),zk=m(),Qr=s("p"),Ck=o("This model is also a "),Vr=s("a"),qk=o("tf.keras.Model"),xk=o(` 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.`),jk=m(),v(Nn.$$.fragment),Ak=m(),bt=s("div"),v(Jr.$$.fragment),Pk=m(),Ao=s("p"),Lk=o("The "),Ca=s("a"),Ok=o("TFRemBertForQuestionAnswering"),Dk=o(" forward method, overrides the "),Zl=s("code"),Nk=o("__call__"),Ik=o(" special method."),Sk=m(),v(In.$$.fragment),Wk=m(),v(Sn.$$.fragment),Uk=m(),v(Wn.$$.fragment),this.h()},l(i){const y=HT('[data-svelte="svelte-1phssyn"]',document.head);d=r(y,"META",{name:!0,content:!0}),y.forEach(t),k=h(i),p=r(i,"H1",{class:!0});var Gr=a(p);u=r(Gr,"A",{id:!0,class:!0,href:!0});var ed=a(u);b=r(ed,"SPAN",{});var td=a(b);w(l.$$.fragment,td),td.forEach(t),ed.forEach(t),c=h(Gr),C=r(Gr,"SPAN",{});var od=a(C);ve=n(od,"RemBERT"),od.forEach(t),Gr.forEach(t),fe=h(i),N=r(i,"H2",{class:!0});var Xr=a(N);le=r(Xr,"A",{id:!0,class:!0,href:!0});var nd=a(le);te=r(nd,"SPAN",{});var sd=a(te);w(T.$$.fragment,sd),sd.forEach(t),nd.forEach(t),we=h(Xr),V=r(Xr,"SPAN",{});var rd=a(V);$e=n(rd,"Overview"),rd.forEach(t),Xr.forEach(t),ge=h(i),S=r(i,"P",{});var Yr=a(S);Fe=n(Yr,"The RemBERT model was proposed in "),ce=r(Yr,"A",{href:!0,rel:!0});var ad=a(ce);G=n(ad,"Rethinking Embedding Coupling in Pre-trained Language Models"),ad.forEach(t),Ee=n(Yr," by Hyung Won Chung, Thibault F\xE9vry, Henry Tsai, Melvin Johnson, Sebastian Ruder."),Yr.forEach(t),_e=h(i),U=r(i,"P",{});var id=a(U);Re=n(id,"The abstract from the paper is the following:"),id.forEach(t),ke=h(i),K=r(i,"P",{});var ld=a(K);he=r(ld,"EM",{});var dd=a(he);Be=n(dd,`We re-evaluate the standard practice of sharing weights between input and output embeddings in state-of-the-art
pre-trained language models. We show that decoupled embeddings provide increased modeling flexibility, allowing us to
significantly improve the efficiency of parameter allocation in the input embedding of multilingual models. By
reallocating the input embedding parameters in the Transformer layers, we achieve dramatically better performance on
standard natural language understanding tasks with the same number of parameters during fine-tuning. We also show that
allocating additional capacity to the output embedding provides benefits to the model that persist through the
fine-tuning stage even though the output embedding is discarded after pre-training. Our analysis shows that larger
output embeddings prevent the model\u2019s last layers from overspecializing to the pre-training task and encourage
Transformer representations to be more general and more transferable to other tasks and languages. Harnessing these
findings, we are able to train models that achieve strong performance on the XTREME benchmark without increasing the
number of parameters at the fine-tuning stage.`),dd.forEach(t),ld.forEach(t),ne=h(i),q=r(i,"P",{});var cd=a(q);A=n(cd,"Tips:"),cd.forEach(t),be=h(i),H=r(i,"P",{});var pd=a(H);Me=n(pd,`For fine-tuning, RemBERT can be thought of as a bigger version of mBERT with an ALBERT-like factorization of the
embedding layer. The embeddings are not tied in pre-training, in contrast with BERT, which enables smaller input
embeddings (preserved during fine-tuning) and bigger output embeddings (discarded at fine-tuning). The tokenizer is
also similar to the Albert one rather than the BERT one.`),pd.forEach(t),ye=h(i),I=r(i,"H2",{class:!0});var Zr=a(I);de=r(Zr,"A",{id:!0,class:!0,href:!0});var md=a(de);ue=r(md,"SPAN",{});var hd=a(ue);w(x.$$.fragment,hd),hd.forEach(t),md.forEach(t),ze=h(Zr),J=r(Zr,"SPAN",{});var ud=a(J);Ce=n(ud,"RemBertConfig"),ud.forEach(t),Zr.forEach(t),Te=h(i),O=r(i,"DIV",{class:!0});var Ht=a(O);w(pe.$$.fragment,Ht),qe=h(Ht),L=r(Ht,"P",{});var Po=a(L);xe=n(Po,"This is the configuration class to store the configuration of a "),Q=r(Po,"A",{href:!0});var fd=a(Q);je=n(fd,"RemBertModel"),fd.forEach(t),re=n(Po,`. It is used to instantiate an
RemBERT 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 RemBERT
`),j=r(Po,"A",{href:!0,rel:!0});var gd=a(j);Ae=n(gd,"google/rembert"),gd.forEach(t),P=n(Po," architecture."),Po.forEach(t),Pe=h(Ht),ie=r(Ht,"P",{});var Lo=a(ie);f=n(Lo,"Configuration objects inherit from "),B=r(Lo,"A",{href:!0});var _d=a(B);Ue=n(_d,"PretrainedConfig"),_d.forEach(t),ae=n(Lo,` and can be used to control the model outputs. Read the
documentation from `),Ne=r(Lo,"A",{href:!0});var kd=a(Ne);Ke=n(kd,"PretrainedConfig"),kd.forEach(t),M=n(Lo," for more information."),Lo.forEach(t),He=h(Ht),w(Oe.$$.fragment,Ht),Ht.forEach(t),Se=h(i),Le=r(i,"H2",{class:!0});var ea=a(Le);De=r(ea,"A",{id:!0,class:!0,href:!0});var bd=a(De);D=r(bd,"SPAN",{});var yd=a(D);w(W.$$.fragment,yd),yd.forEach(t),bd.forEach(t),Qe=h(ea),Ie=r(ea,"SPAN",{});var Td=a(Ie);X=n(Td,"RemBertTokenizer"),Td.forEach(t),ea.forEach(t),We=h(i),oe=r(i,"DIV",{class:!0});var pt=a(oe);w(me.$$.fragment,pt),Ve=h(pt),Z=r(pt,"P",{});var ta=a(Z);Je=n(ta,"Construct a RemBERT tokenizer. Based on "),rs=r(ta,"A",{href:!0,rel:!0});var vd=a(rs);Jc=n(vd,"SentencePiece"),vd.forEach(t),Gc=n(ta,"."),ta.forEach(t),Xc=h(pt),as=r(pt,"P",{});var oa=a(as);Yc=n(oa,"This tokenizer inherits from "),sa=r(oa,"A",{href:!0});var wd=a(sa);Zc=n(wd,"PreTrainedTokenizer"),wd.forEach(t),ep=n(oa,` which contains most of the main methods. Users should refer to
this superclass for more information regarding those methods.`),oa.forEach(t),tp=h(pt),Qt=r(pt,"DIV",{class:!0});var Oo=a(Qt);w(is.$$.fragment,Oo),op=h(Oo),ti=r(Oo,"P",{});var $d=a(ti);np=n($d,`Build model inputs from a sequence or a pair of sequence for sequence classification tasks by concatenating and
adding special tokens. A REMBERT sequence has the following format:`),$d.forEach(t),sp=h(Oo),ls=r(Oo,"UL",{});var na=a(ls);ra=r(na,"LI",{});var qa=a(ra);rp=n(qa,"single sequence: "),oi=r(qa,"CODE",{});var Fd=a(oi);ap=n(Fd,"[CLS] X [SEP]"),Fd.forEach(t),qa.forEach(t),ip=h(na),aa=r(na,"LI",{});var xa=a(aa);lp=n(xa,"pair of sequences: "),ni=r(xa,"CODE",{});var Ed=a(ni);dp=n(Ed,"[CLS] A [SEP] B [SEP]"),Ed.forEach(t),xa.forEach(t),na.forEach(t),Oo.forEach(t),cp=h(pt),Do=r(pt,"DIV",{class:!0});var sc=a(Do);w(ds.$$.fragment,sc),pp=h(sc),cs=r(sc,"P",{});var rc=a(cs);mp=n(rc,`Retrieve sequence ids from a token list that has no special tokens added. This method is called when adding
special tokens using the tokenizer `),si=r(rc,"CODE",{});var Qk=a(si);hp=n(Qk,"prepare_for_model"),Qk.forEach(t),up=n(rc," method."),rc.forEach(t),sc.forEach(t),fp=h(pt),Ft=r(pt,"DIV",{class:!0});var Un=a(Ft);w(ps.$$.fragment,Un),gp=h(Un),ri=r(Un,"P",{});var Vk=a(ri);_p=n(Vk,"Create a mask from the two sequences passed to be used in a sequence-pair classification task. A RemBERT"),Vk.forEach(t),kp=h(Un),w(No.$$.fragment,Un),bp=h(Un),oo=r(Un,"P",{});var ja=a(oo);yp=n(ja,"If "),ai=r(ja,"CODE",{});var Jk=a(ai);Tp=n(Jk,"token_ids_1"),Jk.forEach(t),vp=n(ja," is "),ii=r(ja,"CODE",{});var Gk=a(ii);wp=n(Gk,"None"),Gk.forEach(t),$p=n(ja,", this method only returns the first portion of the mask (0s)."),ja.forEach(t),Un.forEach(t),Fp=h(pt),ia=r(pt,"DIV",{class:!0});var Xk=a(ia);w(ms.$$.fragment,Xk),Xk.forEach(t),pt.forEach(t),Rd=h(i),no=r(i,"H2",{class:!0});var ac=a(no);Io=r(ac,"A",{id:!0,class:!0,href:!0});var Yk=a(Io);li=r(Yk,"SPAN",{});var Zk=a(li);w(hs.$$.fragment,Zk),Zk.forEach(t),Yk.forEach(t),Ep=h(ac),di=r(ac,"SPAN",{});var eb=a(di);Rp=n(eb,"RemBertTokenizerFast"),eb.forEach(t),ac.forEach(t),Bd=h(i),ot=r(i,"DIV",{class:!0});var At=a(ot);w(us.$$.fragment,At),Bp=h(At),Wt=r(At,"P",{});var Kn=a(Wt);Mp=n(Kn,"Construct a \u201Cfast\u201D RemBert tokenizer (backed by HuggingFace\u2019s "),ci=r(Kn,"EM",{});var tb=a(ci);zp=n(tb,"tokenizers"),tb.forEach(t),Cp=n(Kn,` library). Based on
`),fs=r(Kn,"A",{href:!0,rel:!0});var ob=a(fs);qp=n(ob,"Unigram"),ob.forEach(t),xp=n(Kn,`. This
tokenizer inherits from `),la=r(Kn,"A",{href:!0});var nb=a(la);jp=n(nb,"PreTrainedTokenizerFast"),nb.forEach(t),Ap=n(Kn,` which contains most of the main methods. Users should refer to
this superclass for more information regarding those methods`),Kn.forEach(t),Pp=h(At),Vt=r(At,"DIV",{class:!0});var Aa=a(Vt);w(gs.$$.fragment,Aa),Lp=h(Aa),pi=r(Aa,"P",{});var sb=a(pi);Op=n(sb,`Build model inputs from a sequence or a pair of sequence for sequence classification tasks by concatenating and
adding special tokens. A RemBERT sequence has the following format:`),sb.forEach(t),Dp=h(Aa),_s=r(Aa,"UL",{});var ic=a(_s);da=r(ic,"LI",{});var Kk=a(da);Np=n(Kk,"single sequence: "),mi=r(Kk,"CODE",{});var rb=a(mi);Ip=n(rb,"[CLS] X [SEP]"),rb.forEach(t),Kk.forEach(t),Sp=h(ic),ca=r(ic,"LI",{});var Hk=a(ca);Wp=n(Hk,"pair of sequences: "),hi=r(Hk,"CODE",{});var ab=a(hi);Up=n(ab,"[CLS] A [SEP] B [SEP]"),ab.forEach(t),Hk.forEach(t),ic.forEach(t),Aa.forEach(t),Kp=h(At),So=r(At,"DIV",{class:!0});var lc=a(So);w(ks.$$.fragment,lc),Hp=h(lc),bs=r(lc,"P",{});var dc=a(bs);Qp=n(dc,`Retrieves sequence ids from a token list that has no special tokens added. This method is called when adding
special tokens using the tokenizer `),ui=r(dc,"CODE",{});var ib=a(ui);Vp=n(ib,"prepare_for_model"),ib.forEach(t),Jp=n(dc," method."),dc.forEach(t),lc.forEach(t),Gp=h(At),Et=r(At,"DIV",{class:!0});var Hn=a(Et);w(ys.$$.fragment,Hn),Xp=h(Hn),fi=r(Hn,"P",{});var lb=a(fi);Yp=n(lb,"Creates a mask from the two sequences passed to be used in a sequence-pair classification task. A RemBERT"),lb.forEach(t),Zp=h(Hn),w(Wo.$$.fragment,Hn),em=h(Hn),gi=r(Hn,"P",{});var db=a(gi);tm=n(db,"if token_ids_1 is None, only returns the first portion of the mask (0s)."),db.forEach(t),Hn.forEach(t),om=h(At),pa=r(At,"DIV",{class:!0});var cb=a(pa);w(Ts.$$.fragment,cb),cb.forEach(t),At.forEach(t),Md=h(i),so=r(i,"H2",{class:!0});var cc=a(so);Uo=r(cc,"A",{id:!0,class:!0,href:!0});var pb=a(Uo);_i=r(pb,"SPAN",{});var mb=a(_i);w(vs.$$.fragment,mb),mb.forEach(t),pb.forEach(t),nm=h(cc),ki=r(cc,"SPAN",{});var hb=a(ki);sm=n(hb,"RemBertModel"),hb.forEach(t),cc.forEach(t),zd=h(i),ht=r(i,"DIV",{class:!0});var Jt=a(ht);w(ws.$$.fragment,Jt),rm=h(Jt),$s=r(Jt,"P",{});var pc=a($s);am=n(pc,`The bare RemBERT Model transformer outputting raw hidden-states without any specific head on top.
This model is a PyTorch `),Fs=r(pc,"A",{href:!0,rel:!0});var ub=a(Fs);im=n(ub,"torch.nn.Module"),ub.forEach(t),lm=n(pc,` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),pc.forEach(t),dm=h(Jt),Es=r(Jt,"P",{});var mc=a(Es);cm=n(mc,`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 `),Rs=r(mc,"A",{href:!0,rel:!0});var fb=a(Rs);pm=n(fb,`Attention is
all you need`),fb.forEach(t),mm=n(mc,` by Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit,
Llion Jones, Aidan N. Gomez, Lukasz Kaiser and Illia Polosukhin.`),mc.forEach(t),hm=h(Jt),nt=r(Jt,"P",{});var yt=a(nt);um=n(yt,"To behave as an decoder the model needs to be initialized with the "),bi=r(yt,"CODE",{});var gb=a(bi);fm=n(gb,"is_decoder"),gb.forEach(t),gm=n(yt,` argument of the configuration set
to `),yi=r(yt,"CODE",{});var _b=a(yi);_m=n(_b,"True"),_b.forEach(t),km=n(yt,". To be used in a Seq2Seq model, the model needs to initialized with both "),Ti=r(yt,"CODE",{});var kb=a(Ti);bm=n(kb,"is_decoder"),kb.forEach(t),ym=n(yt,` argument and
`),vi=r(yt,"CODE",{});var bb=a(vi);Tm=n(bb,"add_cross_attention"),bb.forEach(t),vm=n(yt," set to "),wi=r(yt,"CODE",{});var yb=a(wi);wm=n(yb,"True"),yb.forEach(t),$m=n(yt,"; an "),$i=r(yt,"CODE",{});var Tb=a($i);Fm=n(Tb,"encoder_hidden_states"),Tb.forEach(t),Em=n(yt," is then expected as an input to the forward pass."),yt.forEach(t),Rm=h(Jt),Rt=r(Jt,"DIV",{class:!0});var Qn=a(Rt);w(Bs.$$.fragment,Qn),Bm=h(Qn),ro=r(Qn,"P",{});var Pa=a(ro);Mm=n(Pa,"The "),ma=r(Pa,"A",{href:!0});var vb=a(ma);zm=n(vb,"RemBertModel"),vb.forEach(t),Cm=n(Pa," forward method, overrides the "),Fi=r(Pa,"CODE",{});var wb=a(Fi);qm=n(wb,"__call__"),wb.forEach(t),xm=n(Pa," special method."),Pa.forEach(t),jm=h(Qn),w(Ko.$$.fragment,Qn),Am=h(Qn),w(Ho.$$.fragment,Qn),Qn.forEach(t),Jt.forEach(t),Cd=h(i),ao=r(i,"H2",{class:!0});var hc=a(ao);Qo=r(hc,"A",{id:!0,class:!0,href:!0});var $b=a(Qo);Ei=r($b,"SPAN",{});var Fb=a(Ei);w(Ms.$$.fragment,Fb),Fb.forEach(t),$b.forEach(t),Pm=h(hc),Ri=r(hc,"SPAN",{});var Eb=a(Ri);Lm=n(Eb,"RemBertForCausalLM"),Eb.forEach(t),hc.forEach(t),qd=h(i),Ut=r(i,"DIV",{class:!0});var La=a(Ut);w(zs.$$.fragment,La),Om=h(La),io=r(La,"P",{});var Oa=a(io);Dm=n(Oa,"RemBERT Model with a "),Bi=r(Oa,"CODE",{});var Rb=a(Bi);Nm=n(Rb,"language modeling"),Rb.forEach(t),Im=n(Oa,` head on top for CLM fine-tuning.
This model is a PyTorch `),Cs=r(Oa,"A",{href:!0,rel:!0});var Bb=a(Cs);Sm=n(Bb,"torch.nn.Module"),Bb.forEach(t),Wm=n(Oa,` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),Oa.forEach(t),Um=h(La),Bt=r(La,"DIV",{class:!0});var Vn=a(Bt);w(qs.$$.fragment,Vn),Km=h(Vn),lo=r(Vn,"P",{});var Da=a(lo);Hm=n(Da,"The "),ha=r(Da,"A",{href:!0});var Mb=a(ha);Qm=n(Mb,"RemBertForCausalLM"),Mb.forEach(t),Vm=n(Da," forward method, overrides the "),Mi=r(Da,"CODE",{});var zb=a(Mi);Jm=n(zb,"__call__"),zb.forEach(t),Gm=n(Da," special method."),Da.forEach(t),Xm=h(Vn),w(Vo.$$.fragment,Vn),Ym=h(Vn),w(Jo.$$.fragment,Vn),Vn.forEach(t),La.forEach(t),xd=h(i),co=r(i,"H2",{class:!0});var uc=a(co);Go=r(uc,"A",{id:!0,class:!0,href:!0});var Cb=a(Go);zi=r(Cb,"SPAN",{});var qb=a(zi);w(xs.$$.fragment,qb),qb.forEach(t),Cb.forEach(t),Zm=h(uc),Ci=r(uc,"SPAN",{});var xb=a(Ci);eh=n(xb,"RemBertForMaskedLM"),xb.forEach(t),uc.forEach(t),jd=h(i),Kt=r(i,"DIV",{class:!0});var Na=a(Kt);w(js.$$.fragment,Na),th=h(Na),po=r(Na,"P",{});var Ia=a(po);oh=n(Ia,"RemBERT Model with a "),qi=r(Ia,"CODE",{});var jb=a(qi);nh=n(jb,"language modeling"),jb.forEach(t),sh=n(Ia,` head on top.
This model is a PyTorch `),As=r(Ia,"A",{href:!0,rel:!0});var Ab=a(As);rh=n(Ab,"torch.nn.Module"),Ab.forEach(t),ah=n(Ia,` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),Ia.forEach(t),ih=h(Na),Mt=r(Na,"DIV",{class:!0});var Jn=a(Mt);w(Ps.$$.fragment,Jn),lh=h(Jn),mo=r(Jn,"P",{});var Sa=a(mo);dh=n(Sa,"The "),ua=r(Sa,"A",{href:!0});var Pb=a(ua);ch=n(Pb,"RemBertForMaskedLM"),Pb.forEach(t),ph=n(Sa," forward method, overrides the "),xi=r(Sa,"CODE",{});var Lb=a(xi);mh=n(Lb,"__call__"),Lb.forEach(t),hh=n(Sa," special method."),Sa.forEach(t),uh=h(Jn),w(Xo.$$.fragment,Jn),fh=h(Jn),w(Yo.$$.fragment,Jn),Jn.forEach(t),Na.forEach(t),Ad=h(i),ho=r(i,"H2",{class:!0});var fc=a(ho);Zo=r(fc,"A",{id:!0,class:!0,href:!0});var Ob=a(Zo);ji=r(Ob,"SPAN",{});var Db=a(ji);w(Ls.$$.fragment,Db),Db.forEach(t),Ob.forEach(t),gh=h(fc),Ai=r(fc,"SPAN",{});var Nb=a(Ai);_h=n(Nb,"RemBertForSequenceClassification"),Nb.forEach(t),fc.forEach(t),Pd=h(i),Tt=r(i,"DIV",{class:!0});var Gn=a(Tt);w(Os.$$.fragment,Gn),kh=h(Gn),Pi=r(Gn,"P",{});var Ib=a(Pi);bh=n(Ib,`RemBERT Model transformer with a sequence classification/regression head on top (a linear layer on top of the
pooled output) e.g. for GLUE tasks.`),Ib.forEach(t),yh=h(Gn),Ds=r(Gn,"P",{});var gc=a(Ds);Th=n(gc,"This model is a PyTorch "),Ns=r(gc,"A",{href:!0,rel:!0});var Sb=a(Ns);vh=n(Sb,"torch.nn.Module"),Sb.forEach(t),wh=n(gc,` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),gc.forEach(t),$h=h(Gn),ut=r(Gn,"DIV",{class:!0});var Gt=a(ut);w(Is.$$.fragment,Gt),Fh=h(Gt),uo=r(Gt,"P",{});var Wa=a(uo);Eh=n(Wa,"The "),fa=r(Wa,"A",{href:!0});var Wb=a(fa);Rh=n(Wb,"RemBertForSequenceClassification"),Wb.forEach(t),Bh=n(Wa," forward method, overrides the "),Li=r(Wa,"CODE",{});var Ub=a(Li);Mh=n(Ub,"__call__"),Ub.forEach(t),zh=n(Wa," special method."),Wa.forEach(t),Ch=h(Gt),w(en.$$.fragment,Gt),qh=h(Gt),w(tn.$$.fragment,Gt),xh=h(Gt),w(on.$$.fragment,Gt),Gt.forEach(t),Gn.forEach(t),Ld=h(i),fo=r(i,"H2",{class:!0});var _c=a(fo);nn=r(_c,"A",{id:!0,class:!0,href:!0});var Kb=a(nn);Oi=r(Kb,"SPAN",{});var Hb=a(Oi);w(Ss.$$.fragment,Hb),Hb.forEach(t),Kb.forEach(t),jh=h(_c),Di=r(_c,"SPAN",{});var Qb=a(Di);Ah=n(Qb,"RemBertForMultipleChoice"),Qb.forEach(t),_c.forEach(t),Od=h(i),vt=r(i,"DIV",{class:!0});var Xn=a(vt);w(Ws.$$.fragment,Xn),Ph=h(Xn),Ni=r(Xn,"P",{});var Vb=a(Ni);Lh=n(Vb,`RemBERT 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.`),Vb.forEach(t),Oh=h(Xn),Us=r(Xn,"P",{});var kc=a(Us);Dh=n(kc,"This model is a PyTorch "),Ks=r(kc,"A",{href:!0,rel:!0});var Jb=a(Ks);Nh=n(Jb,"torch.nn.Module"),Jb.forEach(t),Ih=n(kc,` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),kc.forEach(t),Sh=h(Xn),zt=r(Xn,"DIV",{class:!0});var Yn=a(zt);w(Hs.$$.fragment,Yn),Wh=h(Yn),go=r(Yn,"P",{});var Ua=a(go);Uh=n(Ua,"The "),ga=r(Ua,"A",{href:!0});var Gb=a(ga);Kh=n(Gb,"RemBertForMultipleChoice"),Gb.forEach(t),Hh=n(Ua," forward method, overrides the "),Ii=r(Ua,"CODE",{});var Xb=a(Ii);Qh=n(Xb,"__call__"),Xb.forEach(t),Vh=n(Ua," special method."),Ua.forEach(t),Jh=h(Yn),w(sn.$$.fragment,Yn),Gh=h(Yn),w(rn.$$.fragment,Yn),Yn.forEach(t),Xn.forEach(t),Dd=h(i),_o=r(i,"H2",{class:!0});var bc=a(_o);an=r(bc,"A",{id:!0,class:!0,href:!0});var Yb=a(an);Si=r(Yb,"SPAN",{});var Zb=a(Si);w(Qs.$$.fragment,Zb),Zb.forEach(t),Yb.forEach(t),Xh=h(bc),Wi=r(bc,"SPAN",{});var ey=a(Wi);Yh=n(ey,"RemBertForTokenClassification"),ey.forEach(t),bc.forEach(t),Nd=h(i),wt=r(i,"DIV",{class:!0});var Zn=a(wt);w(Vs.$$.fragment,Zn),Zh=h(Zn),Ui=r(Zn,"P",{});var ty=a(Ui);eu=n(ty,`RemBERT 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.`),ty.forEach(t),tu=h(Zn),Js=r(Zn,"P",{});var yc=a(Js);ou=n(yc,"This model is a PyTorch "),Gs=r(yc,"A",{href:!0,rel:!0});var oy=a(Gs);nu=n(oy,"torch.nn.Module"),oy.forEach(t),su=n(yc,` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),yc.forEach(t),ru=h(Zn),Ct=r(Zn,"DIV",{class:!0});var es=a(Ct);w(Xs.$$.fragment,es),au=h(es),ko=r(es,"P",{});var Ka=a(ko);iu=n(Ka,"The "),_a=r(Ka,"A",{href:!0});var ny=a(_a);lu=n(ny,"RemBertForTokenClassification"),ny.forEach(t),du=n(Ka," forward method, overrides the "),Ki=r(Ka,"CODE",{});var sy=a(Ki);cu=n(sy,"__call__"),sy.forEach(t),pu=n(Ka," special method."),Ka.forEach(t),mu=h(es),w(ln.$$.fragment,es),hu=h(es),w(dn.$$.fragment,es),es.forEach(t),Zn.forEach(t),Id=h(i),bo=r(i,"H2",{class:!0});var Tc=a(bo);cn=r(Tc,"A",{id:!0,class:!0,href:!0});var ry=a(cn);Hi=r(ry,"SPAN",{});var ay=a(Hi);w(Ys.$$.fragment,ay),ay.forEach(t),ry.forEach(t),uu=h(Tc),Qi=r(Tc,"SPAN",{});var iy=a(Qi);fu=n(iy,"RemBertForQuestionAnswering"),iy.forEach(t),Tc.forEach(t),Sd=h(i),$t=r(i,"DIV",{class:!0});var ts=a($t);w(Zs.$$.fragment,ts),gu=h(ts),yo=r(ts,"P",{});var Ha=a(yo);_u=n(Ha,`RemBERT 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 `),Vi=r(Ha,"CODE",{});var ly=a(Vi);ku=n(ly,"span start logits"),ly.forEach(t),bu=n(Ha," and "),Ji=r(Ha,"CODE",{});var dy=a(Ji);yu=n(dy,"span end logits"),dy.forEach(t),Tu=n(Ha,")."),Ha.forEach(t),vu=h(ts),er=r(ts,"P",{});var vc=a(er);wu=n(vc,"This model is a PyTorch "),tr=r(vc,"A",{href:!0,rel:!0});var cy=a(tr);$u=n(cy,"torch.nn.Module"),cy.forEach(t),Fu=n(vc,` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),vc.forEach(t),Eu=h(ts),qt=r(ts,"DIV",{class:!0});var os=a(qt);w(or.$$.fragment,os),Ru=h(os),To=r(os,"P",{});var Qa=a(To);Bu=n(Qa,"The "),ka=r(Qa,"A",{href:!0});var py=a(ka);Mu=n(py,"RemBertForQuestionAnswering"),py.forEach(t),zu=n(Qa," forward method, overrides the "),Gi=r(Qa,"CODE",{});var my=a(Gi);Cu=n(my,"__call__"),my.forEach(t),qu=n(Qa," special method."),Qa.forEach(t),xu=h(os),w(pn.$$.fragment,os),ju=h(os),w(mn.$$.fragment,os),os.forEach(t),ts.forEach(t),Wd=h(i),vo=r(i,"H2",{class:!0});var wc=a(vo);hn=r(wc,"A",{id:!0,class:!0,href:!0});var hy=a(hn);Xi=r(hy,"SPAN",{});var uy=a(Xi);w(nr.$$.fragment,uy),uy.forEach(t),hy.forEach(t),Au=h(wc),Yi=r(wc,"SPAN",{});var fy=a(Yi);Pu=n(fy,"TFRemBertModel"),fy.forEach(t),wc.forEach(t),Ud=h(i),st=r(i,"DIV",{class:!0});var Pt=a(st);w(sr.$$.fragment,Pt),Lu=h(Pt),Zi=r(Pt,"P",{});var gy=a(Zi);Ou=n(gy,"The bare RemBERT Model transformer outputing raw hidden-states without any specific head on top."),gy.forEach(t),Du=h(Pt),rr=r(Pt,"P",{});var $c=a(rr);Nu=n($c,"This model inherits from "),ba=r($c,"A",{href:!0});var _y=a(ba);Iu=n(_y,"TFPreTrainedModel"),_y.forEach(t),Su=n($c,`. 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.)`),$c.forEach(t),Wu=h(Pt),ar=r(Pt,"P",{});var Fc=a(ar);Uu=n(Fc,"This model is also a "),ir=r(Fc,"A",{href:!0,rel:!0});var ky=a(ir);Ku=n(ky,"tf.keras.Model"),ky.forEach(t),Hu=n(Fc,` 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.`),Fc.forEach(t),Qu=h(Pt),w(un.$$.fragment,Pt),Vu=h(Pt),xt=r(Pt,"DIV",{class:!0});var ns=a(xt);w(lr.$$.fragment,ns),Ju=h(ns),wo=r(ns,"P",{});var Va=a(wo);Gu=n(Va,"The "),ya=r(Va,"A",{href:!0});var by=a(ya);Xu=n(by,"TFRemBertModel"),by.forEach(t),Yu=n(Va," forward method, overrides the "),el=r(Va,"CODE",{});var yy=a(el);Zu=n(yy,"__call__"),yy.forEach(t),ef=n(Va," special method."),Va.forEach(t),tf=h(ns),w(fn.$$.fragment,ns),of=h(ns),w(gn.$$.fragment,ns),ns.forEach(t),Pt.forEach(t),Kd=h(i),$o=r(i,"H2",{class:!0});var Ec=a($o);_n=r(Ec,"A",{id:!0,class:!0,href:!0});var Ty=a(_n);tl=r(Ty,"SPAN",{});var vy=a(tl);w(dr.$$.fragment,vy),vy.forEach(t),Ty.forEach(t),nf=h(Ec),ol=r(Ec,"SPAN",{});var wy=a(ol);sf=n(wy,"TFRemBertForMaskedLM"),wy.forEach(t),Ec.forEach(t),Hd=h(i),rt=r(i,"DIV",{class:!0});var Lt=a(rt);w(cr.$$.fragment,Lt),rf=h(Lt),pr=r(Lt,"P",{});var Rc=a(pr);af=n(Rc,"RemBERT Model with a "),nl=r(Rc,"CODE",{});var $y=a(nl);lf=n($y,"language modeling"),$y.forEach(t),df=n(Rc," head on top."),Rc.forEach(t),cf=h(Lt),mr=r(Lt,"P",{});var Bc=a(mr);pf=n(Bc,"This model inherits from "),Ta=r(Bc,"A",{href:!0});var Fy=a(Ta);mf=n(Fy,"TFPreTrainedModel"),Fy.forEach(t),hf=n(Bc,`. 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.)`),Bc.forEach(t),uf=h(Lt),hr=r(Lt,"P",{});var Mc=a(hr);ff=n(Mc,"This model is also a "),ur=r(Mc,"A",{href:!0,rel:!0});var Ey=a(ur);gf=n(Ey,"tf.keras.Model"),Ey.forEach(t),_f=n(Mc,` 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.`),Mc.forEach(t),kf=h(Lt),w(kn.$$.fragment,Lt),bf=h(Lt),ft=r(Lt,"DIV",{class:!0});var Xt=a(ft);w(fr.$$.fragment,Xt),yf=h(Xt),Fo=r(Xt,"P",{});var Ja=a(Fo);Tf=n(Ja,"The "),va=r(Ja,"A",{href:!0});var Ry=a(va);vf=n(Ry,"TFRemBertForMaskedLM"),Ry.forEach(t),wf=n(Ja," forward method, overrides the "),sl=r(Ja,"CODE",{});var By=a(sl);$f=n(By,"__call__"),By.forEach(t),Ff=n(Ja," special method."),Ja.forEach(t),Ef=h(Xt),w(bn.$$.fragment,Xt),Rf=h(Xt),w(yn.$$.fragment,Xt),Bf=h(Xt),w(Tn.$$.fragment,Xt),Xt.forEach(t),Lt.forEach(t),Qd=h(i),Eo=r(i,"H2",{class:!0});var zc=a(Eo);vn=r(zc,"A",{id:!0,class:!0,href:!0});var My=a(vn);rl=r(My,"SPAN",{});var zy=a(rl);w(gr.$$.fragment,zy),zy.forEach(t),My.forEach(t),Mf=h(zc),al=r(zc,"SPAN",{});var Cy=a(al);zf=n(Cy,"TFRemBertForCausalLM"),Cy.forEach(t),zc.forEach(t),Vd=h(i),at=r(i,"DIV",{class:!0});var Ot=a(at);w(_r.$$.fragment,Ot),Cf=h(Ot),kr=r(Ot,"P",{});var Cc=a(kr);qf=n(Cc,"RemBERT Model with a "),il=r(Cc,"CODE",{});var qy=a(il);xf=n(qy,"language modeling"),qy.forEach(t),jf=n(Cc," head on top for CLM fine-tuning."),Cc.forEach(t),Af=h(Ot),br=r(Ot,"P",{});var qc=a(br);Pf=n(qc,"This model inherits from "),wa=r(qc,"A",{href:!0});var xy=a(wa);Lf=n(xy,"TFPreTrainedModel"),xy.forEach(t),Of=n(qc,`. 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.)`),qc.forEach(t),Df=h(Ot),yr=r(Ot,"P",{});var xc=a(yr);Nf=n(xc,"This model is also a "),Tr=r(xc,"A",{href:!0,rel:!0});var jy=a(Tr);If=n(jy,"tf.keras.Model"),jy.forEach(t),Sf=n(xc,` 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.`),xc.forEach(t),Wf=h(Ot),w(wn.$$.fragment,Ot),Uf=h(Ot),gt=r(Ot,"DIV",{class:!0});var Yt=a(gt);w(vr.$$.fragment,Yt),Kf=h(Yt),et=r(Yt,"P",{});var mt=a(et);Hf=n(mt,"encoder_hidden_states  ("),ll=r(mt,"CODE",{});var Ay=a(ll);Qf=n(Ay,"tf.Tensor"),Ay.forEach(t),Vf=n(mt," of shape "),dl=r(mt,"CODE",{});var Py=a(dl);Jf=n(Py,"(batch_size, sequence_length, hidden_size)"),Py.forEach(t),Gf=n(mt,", "),cl=r(mt,"EM",{});var Ly=a(cl);Xf=n(Ly,"optional"),Ly.forEach(t),Yf=n(mt,`):
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.
encoder_attention_mask (`),pl=r(mt,"CODE",{});var Oy=a(pl);Zf=n(Oy,"tf.Tensor"),Oy.forEach(t),eg=n(mt," of shape "),ml=r(mt,"CODE",{});var Dy=a(ml);tg=n(Dy,"(batch_size, sequence_length)"),Dy.forEach(t),og=n(mt,", "),hl=r(mt,"EM",{});var Ny=a(hl);ng=n(Ny,"optional"),Ny.forEach(t),sg=n(mt,`):
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 `),ul=r(mt,"CODE",{});var Iy=a(ul);rg=n(Iy,"[0, 1]"),Iy.forEach(t),ag=n(mt,":"),mt.forEach(t),ig=h(Yt),wr=r(Yt,"UL",{});var jc=a(wr);$r=r(jc,"LI",{});var Ac=a($r);lg=n(Ac,"1 for tokens that are "),fl=r(Ac,"STRONG",{});var Sy=a(fl);dg=n(Sy,"not masked"),Sy.forEach(t),cg=n(Ac,","),Ac.forEach(t),pg=h(jc),Fr=r(jc,"LI",{});var Pc=a(Fr);mg=n(Pc,"0 for tokens that are "),gl=r(Pc,"STRONG",{});var Wy=a(gl);hg=n(Wy,"masked"),Wy.forEach(t),ug=n(Pc,"."),Pc.forEach(t),jc.forEach(t),fg=h(Yt),Y=r(Yt,"P",{});var ee=a(Y);gg=n(ee,"past_key_values ("),_l=r(ee,"CODE",{});var Uy=a(_l);_g=n(Uy,"Tuple[Tuple[tf.Tensor]]"),Uy.forEach(t),kg=n(ee," of length "),kl=r(ee,"CODE",{});var Ky=a(kl);bg=n(Ky,"config.n_layers"),Ky.forEach(t),yg=n(ee,`)
contains precomputed key and value hidden states of the attention blocks. Can be used to speed up decoding.
If `),bl=r(ee,"CODE",{});var Hy=a(bl);Tg=n(Hy,"past_key_values"),Hy.forEach(t),vg=n(ee," are used, the user can optionally input only the last "),yl=r(ee,"CODE",{});var Qy=a(yl);wg=n(Qy,"decoder_input_ids"),Qy.forEach(t),$g=n(ee,` (those that
don\u2019t have their past key value states given to this model) of shape `),Tl=r(ee,"CODE",{});var Vy=a(Tl);Fg=n(Vy,"(batch_size, 1)"),Vy.forEach(t),Eg=n(ee,` instead of all
`),vl=r(ee,"CODE",{});var Jy=a(vl);Rg=n(Jy,"decoder_input_ids"),Jy.forEach(t),Bg=n(ee," of shape "),wl=r(ee,"CODE",{});var Gy=a(wl);Mg=n(Gy,"(batch_size, sequence_length)"),Gy.forEach(t),zg=n(ee,`.
use_cache (`),$l=r(ee,"CODE",{});var Xy=a($l);Cg=n(Xy,"bool"),Xy.forEach(t),qg=n(ee,", "),Fl=r(ee,"EM",{});var Yy=a(Fl);xg=n(Yy,"optional"),Yy.forEach(t),jg=n(ee,", defaults to "),El=r(ee,"CODE",{});var Zy=a(El);Ag=n(Zy,"True"),Zy.forEach(t),Pg=n(ee,`):
If set to `),Rl=r(ee,"CODE",{});var eT=a(Rl);Lg=n(eT,"True"),eT.forEach(t),Og=n(ee,", "),Bl=r(ee,"CODE",{});var tT=a(Bl);Dg=n(tT,"past_key_values"),tT.forEach(t),Ng=n(ee,` key value states are returned and can be used to speed up decoding (see
`),Ml=r(ee,"CODE",{});var oT=a(Ml);Ig=n(oT,"past_key_values"),oT.forEach(t),Sg=n(ee,"). Set to "),zl=r(ee,"CODE",{});var nT=a(zl);Wg=n(nT,"False"),nT.forEach(t),Ug=n(ee," during training, "),Cl=r(ee,"CODE",{});var sT=a(Cl);Kg=n(sT,"True"),sT.forEach(t),Hg=n(ee,` during generation
labels (`),ql=r(ee,"CODE",{});var rT=a(ql);Qg=n(rT,"tf.Tensor"),rT.forEach(t),Vg=n(ee," or "),xl=r(ee,"CODE",{});var aT=a(xl);Jg=n(aT,"np.ndarray"),aT.forEach(t),Gg=n(ee," of shape "),jl=r(ee,"CODE",{});var iT=a(jl);Xg=n(iT,"(batch_size, sequence_length)"),iT.forEach(t),Yg=n(ee,", "),Al=r(ee,"EM",{});var lT=a(Al);Zg=n(lT,"optional"),lT.forEach(t),e_=n(ee,`):
Labels for computing the cross entropy classification loss. Indices should be in `),Pl=r(ee,"CODE",{});var dT=a(Pl);t_=n(dT,"[0, ..., config.vocab_size - 1]"),dT.forEach(t),o_=n(ee,"."),ee.forEach(t),n_=h(Yt),w($n.$$.fragment,Yt),Yt.forEach(t),Ot.forEach(t),Jd=h(i),Ro=r(i,"H2",{class:!0});var Lc=a(Ro);Fn=r(Lc,"A",{id:!0,class:!0,href:!0});var cT=a(Fn);Ll=r(cT,"SPAN",{});var pT=a(Ll);w(Er.$$.fragment,pT),pT.forEach(t),cT.forEach(t),s_=h(Lc),Ol=r(Lc,"SPAN",{});var mT=a(Ol);r_=n(mT,"TFRemBertForSequenceClassification"),mT.forEach(t),Lc.forEach(t),Gd=h(i),it=r(i,"DIV",{class:!0});var Dt=a(it);w(Rr.$$.fragment,Dt),a_=h(Dt),Dl=r(Dt,"P",{});var hT=a(Dl);i_=n(hT,"RemBERT Model transformer with a sequence classification/regression head on top e.g., for GLUE tasks."),hT.forEach(t),l_=h(Dt),Br=r(Dt,"P",{});var Oc=a(Br);d_=n(Oc,"This model inherits from "),$a=r(Oc,"A",{href:!0});var uT=a($a);c_=n(uT,"TFPreTrainedModel"),uT.forEach(t),p_=n(Oc,`. 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.)`),Oc.forEach(t),m_=h(Dt),Mr=r(Dt,"P",{});var Dc=a(Mr);h_=n(Dc,"This model is also a "),zr=r(Dc,"A",{href:!0,rel:!0});var fT=a(zr);u_=n(fT,"tf.keras.Model"),fT.forEach(t),f_=n(Dc,` 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.`),Dc.forEach(t),g_=h(Dt),w(En.$$.fragment,Dt),__=h(Dt),_t=r(Dt,"DIV",{class:!0});var Zt=a(_t);w(Cr.$$.fragment,Zt),k_=h(Zt),Bo=r(Zt,"P",{});var Ga=a(Bo);b_=n(Ga,"The "),Fa=r(Ga,"A",{href:!0});var gT=a(Fa);y_=n(gT,"TFRemBertForSequenceClassification"),gT.forEach(t),T_=n(Ga," forward method, overrides the "),Nl=r(Ga,"CODE",{});var _T=a(Nl);v_=n(_T,"__call__"),_T.forEach(t),w_=n(Ga," special method."),Ga.forEach(t),$_=h(Zt),w(Rn.$$.fragment,Zt),F_=h(Zt),w(Bn.$$.fragment,Zt),E_=h(Zt),w(Mn.$$.fragment,Zt),Zt.forEach(t),Dt.forEach(t),Xd=h(i),Mo=r(i,"H2",{class:!0});var Nc=a(Mo);zn=r(Nc,"A",{id:!0,class:!0,href:!0});var kT=a(zn);Il=r(kT,"SPAN",{});var bT=a(Il);w(qr.$$.fragment,bT),bT.forEach(t),kT.forEach(t),R_=h(Nc),Sl=r(Nc,"SPAN",{});var yT=a(Sl);B_=n(yT,"TFRemBertForMultipleChoice"),yT.forEach(t),Nc.forEach(t),Yd=h(i),lt=r(i,"DIV",{class:!0});var Nt=a(lt);w(xr.$$.fragment,Nt),M_=h(Nt),Wl=r(Nt,"P",{});var TT=a(Wl);z_=n(TT,`RemBERT 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.`),TT.forEach(t),C_=h(Nt),jr=r(Nt,"P",{});var Ic=a(jr);q_=n(Ic,"This model inherits from "),Ea=r(Ic,"A",{href:!0});var vT=a(Ea);x_=n(vT,"TFPreTrainedModel"),vT.forEach(t),j_=n(Ic,`. 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.)`),Ic.forEach(t),A_=h(Nt),Ar=r(Nt,"P",{});var Sc=a(Ar);P_=n(Sc,"This model is also a "),Pr=r(Sc,"A",{href:!0,rel:!0});var wT=a(Pr);L_=n(wT,"tf.keras.Model"),wT.forEach(t),O_=n(Sc,` 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.`),Sc.forEach(t),D_=h(Nt),w(Cn.$$.fragment,Nt),N_=h(Nt),jt=r(Nt,"DIV",{class:!0});var ss=a(jt);w(Lr.$$.fragment,ss),I_=h(ss),zo=r(ss,"P",{});var Xa=a(zo);S_=n(Xa,"The "),Ra=r(Xa,"A",{href:!0});var $T=a(Ra);W_=n($T,"TFRemBertForMultipleChoice"),$T.forEach(t),U_=n(Xa," forward method, overrides the "),Ul=r(Xa,"CODE",{});var FT=a(Ul);K_=n(FT,"__call__"),FT.forEach(t),H_=n(Xa," special method."),Xa.forEach(t),Q_=h(ss),w(qn.$$.fragment,ss),V_=h(ss),w(xn.$$.fragment,ss),ss.forEach(t),Nt.forEach(t),Zd=h(i),Co=r(i,"H2",{class:!0});var Wc=a(Co);jn=r(Wc,"A",{id:!0,class:!0,href:!0});var ET=a(jn);Kl=r(ET,"SPAN",{});var RT=a(Kl);w(Or.$$.fragment,RT),RT.forEach(t),ET.forEach(t),J_=h(Wc),Hl=r(Wc,"SPAN",{});var BT=a(Hl);G_=n(BT,"TFRemBertForTokenClassification"),BT.forEach(t),Wc.forEach(t),ec=h(i),dt=r(i,"DIV",{class:!0});var It=a(dt);w(Dr.$$.fragment,It),X_=h(It),Ql=r(It,"P",{});var MT=a(Ql);Y_=n(MT,`RemBERT 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.`),MT.forEach(t),Z_=h(It),Nr=r(It,"P",{});var Uc=a(Nr);ek=n(Uc,"This model inherits from "),Ba=r(Uc,"A",{href:!0});var zT=a(Ba);tk=n(zT,"TFPreTrainedModel"),zT.forEach(t),ok=n(Uc,`. 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.)`),Uc.forEach(t),nk=h(It),Ir=r(It,"P",{});var Kc=a(Ir);sk=n(Kc,"This model is also a "),Sr=r(Kc,"A",{href:!0,rel:!0});var CT=a(Sr);rk=n(CT,"tf.keras.Model"),CT.forEach(t),ak=n(Kc,` 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.`),Kc.forEach(t),ik=h(It),w(An.$$.fragment,It),lk=h(It),kt=r(It,"DIV",{class:!0});var eo=a(kt);w(Wr.$$.fragment,eo),dk=h(eo),qo=r(eo,"P",{});var Ya=a(qo);ck=n(Ya,"The "),Ma=r(Ya,"A",{href:!0});var qT=a(Ma);pk=n(qT,"TFRemBertForTokenClassification"),qT.forEach(t),mk=n(Ya," forward method, overrides the "),Vl=r(Ya,"CODE",{});var xT=a(Vl);hk=n(xT,"__call__"),xT.forEach(t),uk=n(Ya," special method."),Ya.forEach(t),fk=h(eo),w(Pn.$$.fragment,eo),gk=h(eo),w(Ln.$$.fragment,eo),_k=h(eo),w(On.$$.fragment,eo),eo.forEach(t),It.forEach(t),tc=h(i),xo=r(i,"H2",{class:!0});var Hc=a(xo);Dn=r(Hc,"A",{id:!0,class:!0,href:!0});var jT=a(Dn);Jl=r(jT,"SPAN",{});var AT=a(Jl);w(Ur.$$.fragment,AT),AT.forEach(t),jT.forEach(t),kk=h(Hc),Gl=r(Hc,"SPAN",{});var PT=a(Gl);bk=n(PT,"TFRemBertForQuestionAnswering"),PT.forEach(t),Hc.forEach(t),oc=h(i),ct=r(i,"DIV",{class:!0});var St=a(ct);w(Kr.$$.fragment,St),yk=h(St),jo=r(St,"P",{});var Za=a(jo);Tk=n(Za,`RemBERT 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 `),Xl=r(Za,"CODE",{});var LT=a(Xl);vk=n(LT,"span start logits"),LT.forEach(t),wk=n(Za," and "),Yl=r(Za,"CODE",{});var OT=a(Yl);$k=n(OT,"span end logits"),OT.forEach(t),Fk=n(Za,")."),Za.forEach(t),Ek=h(St),Hr=r(St,"P",{});var Qc=a(Hr);Rk=n(Qc,"This model inherits from "),za=r(Qc,"A",{href:!0});var DT=a(za);Bk=n(DT,"TFPreTrainedModel"),DT.forEach(t),Mk=n(Qc,`. 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.)`),Qc.forEach(t),zk=h(St),Qr=r(St,"P",{});var Vc=a(Qr);Ck=n(Vc,"This model is also a "),Vr=r(Vc,"A",{href:!0,rel:!0});var NT=a(Vr);qk=n(NT,"tf.keras.Model"),NT.forEach(t),xk=n(Vc,` 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.`),Vc.forEach(t),jk=h(St),w(Nn.$$.fragment,St),Ak=h(St),bt=r(St,"DIV",{class:!0});var to=a(bt);w(Jr.$$.fragment,to),Pk=h(to),Ao=r(to,"P",{});var ei=a(Ao);Lk=n(ei,"The "),Ca=r(ei,"A",{href:!0});var IT=a(Ca);Ok=n(IT,"TFRemBertForQuestionAnswering"),IT.forEach(t),Dk=n(ei," forward method, overrides the "),Zl=r(ei,"CODE",{});var ST=a(Zl);Nk=n(ST,"__call__"),ST.forEach(t),Ik=n(ei," special method."),ei.forEach(t),Sk=h(to),w(In.$$.fragment,to),Wk=h(to),w(Sn.$$.fragment,to),Uk=h(to),w(Wn.$$.fragment,to),to.forEach(t),St.forEach(t),this.h()},h(){g(d,"name","hf:doc:metadata"),g(d,"content",JSON.stringify(Lv)),g(u,"id","rembert"),g(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"),g(u,"href","#rembert"),g(p,"class","relative group"),g(le,"id","overview"),g(le,"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"),g(le,"href","#overview"),g(N,"class","relative group"),g(ce,"href","https://arxiv.org/abs/2010.12821"),g(ce,"rel","nofollow"),g(de,"id","transformers.RemBertConfig"),g(de,"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"),g(de,"href","#transformers.RemBertConfig"),g(I,"class","relative group"),g(Q,"href","/docs/transformers/main/en/model_doc/rembert#transformers.RemBertModel"),g(j,"href","https://huggingface.co/google/rembert"),g(j,"rel","nofollow"),g(B,"href","/docs/transformers/main/en/main_classes/configuration#transformers.PretrainedConfig"),g(Ne,"href","/docs/transformers/main/en/main_classes/configuration#transformers.PretrainedConfig"),g(O,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),g(De,"id","transformers.RemBertTokenizer"),g(De,"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"),g(De,"href","#transformers.RemBertTokenizer"),g(Le,"class","relative group"),g(rs,"href","https://github.com/google/sentencepiece"),g(rs,"rel","nofollow"),g(sa,"href","/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizer"),g(Qt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),g(Do,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),g(Ft,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),g(ia,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),g(oe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),g(Io,"id","transformers.RemBertTokenizerFast"),g(Io,"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"),g(Io,"href","#transformers.RemBertTokenizerFast"),g(no,"class","relative group"),g(fs,"href","https://huggingface.co/docs/tokenizers/python/latest/components.html?highlight=unigram#models"),g(fs,"rel","nofollow"),g(la,"href","/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast"),g(Vt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),g(So,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),g(Et,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),g(pa,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),g(ot,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),g(Uo,"id","transformers.RemBertModel"),g(Uo,"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"),g(Uo,"href","#transformers.RemBertModel"),g(so,"class","relative group"),g(Fs,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),g(Fs,"rel","nofollow"),g(Rs,"href","https://arxiv.org/abs/1706.03762"),g(Rs,"rel","nofollow"),g(ma,"href","/docs/transformers/main/en/model_doc/rembert#transformers.RemBertModel"),g(Rt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),g(ht,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),g(Qo,"id","transformers.RemBertForCausalLM"),g(Qo,"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"),g(Qo,"href","#transformers.RemBertForCausalLM"),g(ao,"class","relative group"),g(Cs,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),g(Cs,"rel","nofollow"),g(ha,"href","/docs/transformers/main/en/model_doc/rembert#transformers.RemBertForCausalLM"),g(Bt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),g(Ut,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),g(Go,"id","transformers.RemBertForMaskedLM"),g(Go,"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"),g(Go,"href","#transformers.RemBertForMaskedLM"),g(co,"class","relative group"),g(As,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),g(As,"rel","nofollow"),g(ua,"href","/docs/transformers/main/en/model_doc/rembert#transformers.RemBertForMaskedLM"),g(Mt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),g(Kt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),g(Zo,"id","transformers.RemBertForSequenceClassification"),g(Zo,"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"),g(Zo,"href","#transformers.RemBertForSequenceClassification"),g(ho,"class","relative group"),g(Ns,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),g(Ns,"rel","nofollow"),g(fa,"href","/docs/transformers/main/en/model_doc/rembert#transformers.RemBertForSequenceClassification"),g(ut,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),g(Tt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),g(nn,"id","transformers.RemBertForMultipleChoice"),g(nn,"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"),g(nn,"href","#transformers.RemBertForMultipleChoice"),g(fo,"class","relative group"),g(Ks,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),g(Ks,"rel","nofollow"),g(ga,"href","/docs/transformers/main/en/model_doc/rembert#transformers.RemBertForMultipleChoice"),g(zt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),g(vt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),g(an,"id","transformers.RemBertForTokenClassification"),g(an,"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"),g(an,"href","#transformers.RemBertForTokenClassification"),g(_o,"class","relative group"),g(Gs,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),g(Gs,"rel","nofollow"),g(_a,"href","/docs/transformers/main/en/model_doc/rembert#transformers.RemBertForTokenClassification"),g(Ct,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),g(wt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),g(cn,"id","transformers.RemBertForQuestionAnswering"),g(cn,"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"),g(cn,"href","#transformers.RemBertForQuestionAnswering"),g(bo,"class","relative group"),g(tr,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),g(tr,"rel","nofollow"),g(ka,"href","/docs/transformers/main/en/model_doc/rembert#transformers.RemBertForQuestionAnswering"),g(qt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),g($t,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),g(hn,"id","transformers.TFRemBertModel"),g(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"),g(hn,"href","#transformers.TFRemBertModel"),g(vo,"class","relative group"),g(ba,"href","/docs/transformers/main/en/main_classes/model#transformers.TFPreTrainedModel"),g(ir,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),g(ir,"rel","nofollow"),g(ya,"href","/docs/transformers/main/en/model_doc/rembert#transformers.TFRemBertModel"),g(xt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),g(st,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),g(_n,"id","transformers.TFRemBertForMaskedLM"),g(_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"),g(_n,"href","#transformers.TFRemBertForMaskedLM"),g($o,"class","relative group"),g(Ta,"href","/docs/transformers/main/en/main_classes/model#transformers.TFPreTrainedModel"),g(ur,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),g(ur,"rel","nofollow"),g(va,"href","/docs/transformers/main/en/model_doc/rembert#transformers.TFRemBertForMaskedLM"),g(ft,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),g(rt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),g(vn,"id","transformers.TFRemBertForCausalLM"),g(vn,"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"),g(vn,"href","#transformers.TFRemBertForCausalLM"),g(Eo,"class","relative group"),g(wa,"href","/docs/transformers/main/en/main_classes/model#transformers.TFPreTrainedModel"),g(Tr,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),g(Tr,"rel","nofollow"),g(gt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),g(at,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),g(Fn,"id","transformers.TFRemBertForSequenceClassification"),g(Fn,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),g(Fn,"href","#transformers.TFRemBertForSequenceClassification"),g(Ro,"class","relative group"),g($a,"href","/docs/transformers/main/en/main_classes/model#transformers.TFPreTrainedModel"),g(zr,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),g(zr,"rel","nofollow"),g(Fa,"href","/docs/transformers/main/en/model_doc/rembert#transformers.TFRemBertForSequenceClassification"),g(_t,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),g(it,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),g(zn,"id","transformers.TFRemBertForMultipleChoice"),g(zn,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),g(zn,"href","#transformers.TFRemBertForMultipleChoice"),g(Mo,"class","relative group"),g(Ea,"href","/docs/transformers/main/en/main_classes/model#transformers.TFPreTrainedModel"),g(Pr,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),g(Pr,"rel","nofollow"),g(Ra,"href","/docs/transformers/main/en/model_doc/rembert#transformers.TFRemBertForMultipleChoice"),g(jt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),g(lt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),g(jn,"id","transformers.TFRemBertForTokenClassification"),g(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"),g(jn,"href","#transformers.TFRemBertForTokenClassification"),g(Co,"class","relative group"),g(Ba,"href","/docs/transformers/main/en/main_classes/model#transformers.TFPreTrainedModel"),g(Sr,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),g(Sr,"rel","nofollow"),g(Ma,"href","/docs/transformers/main/en/model_doc/rembert#transformers.TFRemBertForTokenClassification"),g(kt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),g(dt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),g(Dn,"id","transformers.TFRemBertForQuestionAnswering"),g(Dn,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),g(Dn,"href","#transformers.TFRemBertForQuestionAnswering"),g(xo,"class","relative group"),g(za,"href","/docs/transformers/main/en/main_classes/model#transformers.TFPreTrainedModel"),g(Vr,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),g(Vr,"rel","nofollow"),g(Ca,"href","/docs/transformers/main/en/model_doc/rembert#transformers.TFRemBertForQuestionAnswering"),g(bt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),g(ct,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(i,y){e(document.head,d),_(i,k,y),_(i,p,y),e(p,u),e(u,b),$(l,b,null),e(p,c),e(p,C),e(C,ve),_(i,fe,y),_(i,N,y),e(N,le),e(le,te),$(T,te,null),e(N,we),e(N,V),e(V,$e),_(i,ge,y),_(i,S,y),e(S,Fe),e(S,ce),e(ce,G),e(S,Ee),_(i,_e,y),_(i,U,y),e(U,Re),_(i,ke,y),_(i,K,y),e(K,he),e(he,Be),_(i,ne,y),_(i,q,y),e(q,A),_(i,be,y),_(i,H,y),e(H,Me),_(i,ye,y),_(i,I,y),e(I,de),e(de,ue),$(x,ue,null),e(I,ze),e(I,J),e(J,Ce),_(i,Te,y),_(i,O,y),$(pe,O,null),e(O,qe),e(O,L),e(L,xe),e(L,Q),e(Q,je),e(L,re),e(L,j),e(j,Ae),e(L,P),e(O,Pe),e(O,ie),e(ie,f),e(ie,B),e(B,Ue),e(ie,ae),e(ie,Ne),e(Ne,Ke),e(ie,M),e(O,He),$(Oe,O,null),_(i,Se,y),_(i,Le,y),e(Le,De),e(De,D),$(W,D,null),e(Le,Qe),e(Le,Ie),e(Ie,X),_(i,We,y),_(i,oe,y),$(me,oe,null),e(oe,Ve),e(oe,Z),e(Z,Je),e(Z,rs),e(rs,Jc),e(Z,Gc),e(oe,Xc),e(oe,as),e(as,Yc),e(as,sa),e(sa,Zc),e(as,ep),e(oe,tp),e(oe,Qt),$(is,Qt,null),e(Qt,op),e(Qt,ti),e(ti,np),e(Qt,sp),e(Qt,ls),e(ls,ra),e(ra,rp),e(ra,oi),e(oi,ap),e(ls,ip),e(ls,aa),e(aa,lp),e(aa,ni),e(ni,dp),e(oe,cp),e(oe,Do),$(ds,Do,null),e(Do,pp),e(Do,cs),e(cs,mp),e(cs,si),e(si,hp),e(cs,up),e(oe,fp),e(oe,Ft),$(ps,Ft,null),e(Ft,gp),e(Ft,ri),e(ri,_p),e(Ft,kp),$(No,Ft,null),e(Ft,bp),e(Ft,oo),e(oo,yp),e(oo,ai),e(ai,Tp),e(oo,vp),e(oo,ii),e(ii,wp),e(oo,$p),e(oe,Fp),e(oe,ia),$(ms,ia,null),_(i,Rd,y),_(i,no,y),e(no,Io),e(Io,li),$(hs,li,null),e(no,Ep),e(no,di),e(di,Rp),_(i,Bd,y),_(i,ot,y),$(us,ot,null),e(ot,Bp),e(ot,Wt),e(Wt,Mp),e(Wt,ci),e(ci,zp),e(Wt,Cp),e(Wt,fs),e(fs,qp),e(Wt,xp),e(Wt,la),e(la,jp),e(Wt,Ap),e(ot,Pp),e(ot,Vt),$(gs,Vt,null),e(Vt,Lp),e(Vt,pi),e(pi,Op),e(Vt,Dp),e(Vt,_s),e(_s,da),e(da,Np),e(da,mi),e(mi,Ip),e(_s,Sp),e(_s,ca),e(ca,Wp),e(ca,hi),e(hi,Up),e(ot,Kp),e(ot,So),$(ks,So,null),e(So,Hp),e(So,bs),e(bs,Qp),e(bs,ui),e(ui,Vp),e(bs,Jp),e(ot,Gp),e(ot,Et),$(ys,Et,null),e(Et,Xp),e(Et,fi),e(fi,Yp),e(Et,Zp),$(Wo,Et,null),e(Et,em),e(Et,gi),e(gi,tm),e(ot,om),e(ot,pa),$(Ts,pa,null),_(i,Md,y),_(i,so,y),e(so,Uo),e(Uo,_i),$(vs,_i,null),e(so,nm),e(so,ki),e(ki,sm),_(i,zd,y),_(i,ht,y),$(ws,ht,null),e(ht,rm),e(ht,$s),e($s,am),e($s,Fs),e(Fs,im),e($s,lm),e(ht,dm),e(ht,Es),e(Es,cm),e(Es,Rs),e(Rs,pm),e(Es,mm),e(ht,hm),e(ht,nt),e(nt,um),e(nt,bi),e(bi,fm),e(nt,gm),e(nt,yi),e(yi,_m),e(nt,km),e(nt,Ti),e(Ti,bm),e(nt,ym),e(nt,vi),e(vi,Tm),e(nt,vm),e(nt,wi),e(wi,wm),e(nt,$m),e(nt,$i),e($i,Fm),e(nt,Em),e(ht,Rm),e(ht,Rt),$(Bs,Rt,null),e(Rt,Bm),e(Rt,ro),e(ro,Mm),e(ro,ma),e(ma,zm),e(ro,Cm),e(ro,Fi),e(Fi,qm),e(ro,xm),e(Rt,jm),$(Ko,Rt,null),e(Rt,Am),$(Ho,Rt,null),_(i,Cd,y),_(i,ao,y),e(ao,Qo),e(Qo,Ei),$(Ms,Ei,null),e(ao,Pm),e(ao,Ri),e(Ri,Lm),_(i,qd,y),_(i,Ut,y),$(zs,Ut,null),e(Ut,Om),e(Ut,io),e(io,Dm),e(io,Bi),e(Bi,Nm),e(io,Im),e(io,Cs),e(Cs,Sm),e(io,Wm),e(Ut,Um),e(Ut,Bt),$(qs,Bt,null),e(Bt,Km),e(Bt,lo),e(lo,Hm),e(lo,ha),e(ha,Qm),e(lo,Vm),e(lo,Mi),e(Mi,Jm),e(lo,Gm),e(Bt,Xm),$(Vo,Bt,null),e(Bt,Ym),$(Jo,Bt,null),_(i,xd,y),_(i,co,y),e(co,Go),e(Go,zi),$(xs,zi,null),e(co,Zm),e(co,Ci),e(Ci,eh),_(i,jd,y),_(i,Kt,y),$(js,Kt,null),e(Kt,th),e(Kt,po),e(po,oh),e(po,qi),e(qi,nh),e(po,sh),e(po,As),e(As,rh),e(po,ah),e(Kt,ih),e(Kt,Mt),$(Ps,Mt,null),e(Mt,lh),e(Mt,mo),e(mo,dh),e(mo,ua),e(ua,ch),e(mo,ph),e(mo,xi),e(xi,mh),e(mo,hh),e(Mt,uh),$(Xo,Mt,null),e(Mt,fh),$(Yo,Mt,null),_(i,Ad,y),_(i,ho,y),e(ho,Zo),e(Zo,ji),$(Ls,ji,null),e(ho,gh),e(ho,Ai),e(Ai,_h),_(i,Pd,y),_(i,Tt,y),$(Os,Tt,null),e(Tt,kh),e(Tt,Pi),e(Pi,bh),e(Tt,yh),e(Tt,Ds),e(Ds,Th),e(Ds,Ns),e(Ns,vh),e(Ds,wh),e(Tt,$h),e(Tt,ut),$(Is,ut,null),e(ut,Fh),e(ut,uo),e(uo,Eh),e(uo,fa),e(fa,Rh),e(uo,Bh),e(uo,Li),e(Li,Mh),e(uo,zh),e(ut,Ch),$(en,ut,null),e(ut,qh),$(tn,ut,null),e(ut,xh),$(on,ut,null),_(i,Ld,y),_(i,fo,y),e(fo,nn),e(nn,Oi),$(Ss,Oi,null),e(fo,jh),e(fo,Di),e(Di,Ah),_(i,Od,y),_(i,vt,y),$(Ws,vt,null),e(vt,Ph),e(vt,Ni),e(Ni,Lh),e(vt,Oh),e(vt,Us),e(Us,Dh),e(Us,Ks),e(Ks,Nh),e(Us,Ih),e(vt,Sh),e(vt,zt),$(Hs,zt,null),e(zt,Wh),e(zt,go),e(go,Uh),e(go,ga),e(ga,Kh),e(go,Hh),e(go,Ii),e(Ii,Qh),e(go,Vh),e(zt,Jh),$(sn,zt,null),e(zt,Gh),$(rn,zt,null),_(i,Dd,y),_(i,_o,y),e(_o,an),e(an,Si),$(Qs,Si,null),e(_o,Xh),e(_o,Wi),e(Wi,Yh),_(i,Nd,y),_(i,wt,y),$(Vs,wt,null),e(wt,Zh),e(wt,Ui),e(Ui,eu),e(wt,tu),e(wt,Js),e(Js,ou),e(Js,Gs),e(Gs,nu),e(Js,su),e(wt,ru),e(wt,Ct),$(Xs,Ct,null),e(Ct,au),e(Ct,ko),e(ko,iu),e(ko,_a),e(_a,lu),e(ko,du),e(ko,Ki),e(Ki,cu),e(ko,pu),e(Ct,mu),$(ln,Ct,null),e(Ct,hu),$(dn,Ct,null),_(i,Id,y),_(i,bo,y),e(bo,cn),e(cn,Hi),$(Ys,Hi,null),e(bo,uu),e(bo,Qi),e(Qi,fu),_(i,Sd,y),_(i,$t,y),$(Zs,$t,null),e($t,gu),e($t,yo),e(yo,_u),e(yo,Vi),e(Vi,ku),e(yo,bu),e(yo,Ji),e(Ji,yu),e(yo,Tu),e($t,vu),e($t,er),e(er,wu),e(er,tr),e(tr,$u),e(er,Fu),e($t,Eu),e($t,qt),$(or,qt,null),e(qt,Ru),e(qt,To),e(To,Bu),e(To,ka),e(ka,Mu),e(To,zu),e(To,Gi),e(Gi,Cu),e(To,qu),e(qt,xu),$(pn,qt,null),e(qt,ju),$(mn,qt,null),_(i,Wd,y),_(i,vo,y),e(vo,hn),e(hn,Xi),$(nr,Xi,null),e(vo,Au),e(vo,Yi),e(Yi,Pu),_(i,Ud,y),_(i,st,y),$(sr,st,null),e(st,Lu),e(st,Zi),e(Zi,Ou),e(st,Du),e(st,rr),e(rr,Nu),e(rr,ba),e(ba,Iu),e(rr,Su),e(st,Wu),e(st,ar),e(ar,Uu),e(ar,ir),e(ir,Ku),e(ar,Hu),e(st,Qu),$(un,st,null),e(st,Vu),e(st,xt),$(lr,xt,null),e(xt,Ju),e(xt,wo),e(wo,Gu),e(wo,ya),e(ya,Xu),e(wo,Yu),e(wo,el),e(el,Zu),e(wo,ef),e(xt,tf),$(fn,xt,null),e(xt,of),$(gn,xt,null),_(i,Kd,y),_(i,$o,y),e($o,_n),e(_n,tl),$(dr,tl,null),e($o,nf),e($o,ol),e(ol,sf),_(i,Hd,y),_(i,rt,y),$(cr,rt,null),e(rt,rf),e(rt,pr),e(pr,af),e(pr,nl),e(nl,lf),e(pr,df),e(rt,cf),e(rt,mr),e(mr,pf),e(mr,Ta),e(Ta,mf),e(mr,hf),e(rt,uf),e(rt,hr),e(hr,ff),e(hr,ur),e(ur,gf),e(hr,_f),e(rt,kf),$(kn,rt,null),e(rt,bf),e(rt,ft),$(fr,ft,null),e(ft,yf),e(ft,Fo),e(Fo,Tf),e(Fo,va),e(va,vf),e(Fo,wf),e(Fo,sl),e(sl,$f),e(Fo,Ff),e(ft,Ef),$(bn,ft,null),e(ft,Rf),$(yn,ft,null),e(ft,Bf),$(Tn,ft,null),_(i,Qd,y),_(i,Eo,y),e(Eo,vn),e(vn,rl),$(gr,rl,null),e(Eo,Mf),e(Eo,al),e(al,zf),_(i,Vd,y),_(i,at,y),$(_r,at,null),e(at,Cf),e(at,kr),e(kr,qf),e(kr,il),e(il,xf),e(kr,jf),e(at,Af),e(at,br),e(br,Pf),e(br,wa),e(wa,Lf),e(br,Of),e(at,Df),e(at,yr),e(yr,Nf),e(yr,Tr),e(Tr,If),e(yr,Sf),e(at,Wf),$(wn,at,null),e(at,Uf),e(at,gt),$(vr,gt,null),e(gt,Kf),e(gt,et),e(et,Hf),e(et,ll),e(ll,Qf),e(et,Vf),e(et,dl),e(dl,Jf),e(et,Gf),e(et,cl),e(cl,Xf),e(et,Yf),e(et,pl),e(pl,Zf),e(et,eg),e(et,ml),e(ml,tg),e(et,og),e(et,hl),e(hl,ng),e(et,sg),e(et,ul),e(ul,rg),e(et,ag),e(gt,ig),e(gt,wr),e(wr,$r),e($r,lg),e($r,fl),e(fl,dg),e($r,cg),e(wr,pg),e(wr,Fr),e(Fr,mg),e(Fr,gl),e(gl,hg),e(Fr,ug),e(gt,fg),e(gt,Y),e(Y,gg),e(Y,_l),e(_l,_g),e(Y,kg),e(Y,kl),e(kl,bg),e(Y,yg),e(Y,bl),e(bl,Tg),e(Y,vg),e(Y,yl),e(yl,wg),e(Y,$g),e(Y,Tl),e(Tl,Fg),e(Y,Eg),e(Y,vl),e(vl,Rg),e(Y,Bg),e(Y,wl),e(wl,Mg),e(Y,zg),e(Y,$l),e($l,Cg),e(Y,qg),e(Y,Fl),e(Fl,xg),e(Y,jg),e(Y,El),e(El,Ag),e(Y,Pg),e(Y,Rl),e(Rl,Lg),e(Y,Og),e(Y,Bl),e(Bl,Dg),e(Y,Ng),e(Y,Ml),e(Ml,Ig),e(Y,Sg),e(Y,zl),e(zl,Wg),e(Y,Ug),e(Y,Cl),e(Cl,Kg),e(Y,Hg),e(Y,ql),e(ql,Qg),e(Y,Vg),e(Y,xl),e(xl,Jg),e(Y,Gg),e(Y,jl),e(jl,Xg),e(Y,Yg),e(Y,Al),e(Al,Zg),e(Y,e_),e(Y,Pl),e(Pl,t_),e(Y,o_),e(gt,n_),$($n,gt,null),_(i,Jd,y),_(i,Ro,y),e(Ro,Fn),e(Fn,Ll),$(Er,Ll,null),e(Ro,s_),e(Ro,Ol),e(Ol,r_),_(i,Gd,y),_(i,it,y),$(Rr,it,null),e(it,a_),e(it,Dl),e(Dl,i_),e(it,l_),e(it,Br),e(Br,d_),e(Br,$a),e($a,c_),e(Br,p_),e(it,m_),e(it,Mr),e(Mr,h_),e(Mr,zr),e(zr,u_),e(Mr,f_),e(it,g_),$(En,it,null),e(it,__),e(it,_t),$(Cr,_t,null),e(_t,k_),e(_t,Bo),e(Bo,b_),e(Bo,Fa),e(Fa,y_),e(Bo,T_),e(Bo,Nl),e(Nl,v_),e(Bo,w_),e(_t,$_),$(Rn,_t,null),e(_t,F_),$(Bn,_t,null),e(_t,E_),$(Mn,_t,null),_(i,Xd,y),_(i,Mo,y),e(Mo,zn),e(zn,Il),$(qr,Il,null),e(Mo,R_),e(Mo,Sl),e(Sl,B_),_(i,Yd,y),_(i,lt,y),$(xr,lt,null),e(lt,M_),e(lt,Wl),e(Wl,z_),e(lt,C_),e(lt,jr),e(jr,q_),e(jr,Ea),e(Ea,x_),e(jr,j_),e(lt,A_),e(lt,Ar),e(Ar,P_),e(Ar,Pr),e(Pr,L_),e(Ar,O_),e(lt,D_),$(Cn,lt,null),e(lt,N_),e(lt,jt),$(Lr,jt,null),e(jt,I_),e(jt,zo),e(zo,S_),e(zo,Ra),e(Ra,W_),e(zo,U_),e(zo,Ul),e(Ul,K_),e(zo,H_),e(jt,Q_),$(qn,jt,null),e(jt,V_),$(xn,jt,null),_(i,Zd,y),_(i,Co,y),e(Co,jn),e(jn,Kl),$(Or,Kl,null),e(Co,J_),e(Co,Hl),e(Hl,G_),_(i,ec,y),_(i,dt,y),$(Dr,dt,null),e(dt,X_),e(dt,Ql),e(Ql,Y_),e(dt,Z_),e(dt,Nr),e(Nr,ek),e(Nr,Ba),e(Ba,tk),e(Nr,ok),e(dt,nk),e(dt,Ir),e(Ir,sk),e(Ir,Sr),e(Sr,rk),e(Ir,ak),e(dt,ik),$(An,dt,null),e(dt,lk),e(dt,kt),$(Wr,kt,null),e(kt,dk),e(kt,qo),e(qo,ck),e(qo,Ma),e(Ma,pk),e(qo,mk),e(qo,Vl),e(Vl,hk),e(qo,uk),e(kt,fk),$(Pn,kt,null),e(kt,gk),$(Ln,kt,null),e(kt,_k),$(On,kt,null),_(i,tc,y),_(i,xo,y),e(xo,Dn),e(Dn,Jl),$(Ur,Jl,null),e(xo,kk),e(xo,Gl),e(Gl,bk),_(i,oc,y),_(i,ct,y),$(Kr,ct,null),e(ct,yk),e(ct,jo),e(jo,Tk),e(jo,Xl),e(Xl,vk),e(jo,wk),e(jo,Yl),e(Yl,$k),e(jo,Fk),e(ct,Ek),e(ct,Hr),e(Hr,Rk),e(Hr,za),e(za,Bk),e(Hr,Mk),e(ct,zk),e(ct,Qr),e(Qr,Ck),e(Qr,Vr),e(Vr,qk),e(Qr,xk),e(ct,jk),$(Nn,ct,null),e(ct,Ak),e(ct,bt),$(Jr,bt,null),e(bt,Pk),e(bt,Ao),e(Ao,Lk),e(Ao,Ca),e(Ca,Ok),e(Ao,Dk),e(Ao,Zl),e(Zl,Nk),e(Ao,Ik),e(bt,Sk),$(In,bt,null),e(bt,Wk),$(Sn,bt,null),e(bt,Uk),$(Wn,bt,null),nc=!0},p(i,[y]){const Gr={};y&2&&(Gr.$$scope={dirty:y,ctx:i}),Oe.$set(Gr);const ed={};y&2&&(ed.$$scope={dirty:y,ctx:i}),No.$set(ed);const td={};y&2&&(td.$$scope={dirty:y,ctx:i}),Wo.$set(td);const od={};y&2&&(od.$$scope={dirty:y,ctx:i}),Ko.$set(od);const Xr={};y&2&&(Xr.$$scope={dirty:y,ctx:i}),Ho.$set(Xr);const nd={};y&2&&(nd.$$scope={dirty:y,ctx:i}),Vo.$set(nd);const sd={};y&2&&(sd.$$scope={dirty:y,ctx:i}),Jo.$set(sd);const rd={};y&2&&(rd.$$scope={dirty:y,ctx:i}),Xo.$set(rd);const Yr={};y&2&&(Yr.$$scope={dirty:y,ctx:i}),Yo.$set(Yr);const ad={};y&2&&(ad.$$scope={dirty:y,ctx:i}),en.$set(ad);const id={};y&2&&(id.$$scope={dirty:y,ctx:i}),tn.$set(id);const ld={};y&2&&(ld.$$scope={dirty:y,ctx:i}),on.$set(ld);const dd={};y&2&&(dd.$$scope={dirty:y,ctx:i}),sn.$set(dd);const cd={};y&2&&(cd.$$scope={dirty:y,ctx:i}),rn.$set(cd);const pd={};y&2&&(pd.$$scope={dirty:y,ctx:i}),ln.$set(pd);const Zr={};y&2&&(Zr.$$scope={dirty:y,ctx:i}),dn.$set(Zr);const md={};y&2&&(md.$$scope={dirty:y,ctx:i}),pn.$set(md);const hd={};y&2&&(hd.$$scope={dirty:y,ctx:i}),mn.$set(hd);const ud={};y&2&&(ud.$$scope={dirty:y,ctx:i}),un.$set(ud);const Ht={};y&2&&(Ht.$$scope={dirty:y,ctx:i}),fn.$set(Ht);const Po={};y&2&&(Po.$$scope={dirty:y,ctx:i}),gn.$set(Po);const fd={};y&2&&(fd.$$scope={dirty:y,ctx:i}),kn.$set(fd);const gd={};y&2&&(gd.$$scope={dirty:y,ctx:i}),bn.$set(gd);const Lo={};y&2&&(Lo.$$scope={dirty:y,ctx:i}),yn.$set(Lo);const _d={};y&2&&(_d.$$scope={dirty:y,ctx:i}),Tn.$set(_d);const kd={};y&2&&(kd.$$scope={dirty:y,ctx:i}),wn.$set(kd);const ea={};y&2&&(ea.$$scope={dirty:y,ctx:i}),$n.$set(ea);const bd={};y&2&&(bd.$$scope={dirty:y,ctx:i}),En.$set(bd);const yd={};y&2&&(yd.$$scope={dirty:y,ctx:i}),Rn.$set(yd);const Td={};y&2&&(Td.$$scope={dirty:y,ctx:i}),Bn.$set(Td);const pt={};y&2&&(pt.$$scope={dirty:y,ctx:i}),Mn.$set(pt);const ta={};y&2&&(ta.$$scope={dirty:y,ctx:i}),Cn.$set(ta);const vd={};y&2&&(vd.$$scope={dirty:y,ctx:i}),qn.$set(vd);const oa={};y&2&&(oa.$$scope={dirty:y,ctx:i}),xn.$set(oa);const wd={};y&2&&(wd.$$scope={dirty:y,ctx:i}),An.$set(wd);const Oo={};y&2&&(Oo.$$scope={dirty:y,ctx:i}),Pn.$set(Oo);const $d={};y&2&&($d.$$scope={dirty:y,ctx:i}),Ln.$set($d);const na={};y&2&&(na.$$scope={dirty:y,ctx:i}),On.$set(na);const qa={};y&2&&(qa.$$scope={dirty:y,ctx:i}),Nn.$set(qa);const Fd={};y&2&&(Fd.$$scope={dirty:y,ctx:i}),In.$set(Fd);const xa={};y&2&&(xa.$$scope={dirty:y,ctx:i}),Sn.$set(xa);const Ed={};y&2&&(Ed.$$scope={dirty:y,ctx:i}),Wn.$set(Ed)},i(i){nc||(F(l.$$.fragment,i),F(T.$$.fragment,i),F(x.$$.fragment,i),F(pe.$$.fragment,i),F(Oe.$$.fragment,i),F(W.$$.fragment,i),F(me.$$.fragment,i),F(is.$$.fragment,i),F(ds.$$.fragment,i),F(ps.$$.fragment,i),F(No.$$.fragment,i),F(ms.$$.fragment,i),F(hs.$$.fragment,i),F(us.$$.fragment,i),F(gs.$$.fragment,i),F(ks.$$.fragment,i),F(ys.$$.fragment,i),F(Wo.$$.fragment,i),F(Ts.$$.fragment,i),F(vs.$$.fragment,i),F(ws.$$.fragment,i),F(Bs.$$.fragment,i),F(Ko.$$.fragment,i),F(Ho.$$.fragment,i),F(Ms.$$.fragment,i),F(zs.$$.fragment,i),F(qs.$$.fragment,i),F(Vo.$$.fragment,i),F(Jo.$$.fragment,i),F(xs.$$.fragment,i),F(js.$$.fragment,i),F(Ps.$$.fragment,i),F(Xo.$$.fragment,i),F(Yo.$$.fragment,i),F(Ls.$$.fragment,i),F(Os.$$.fragment,i),F(Is.$$.fragment,i),F(en.$$.fragment,i),F(tn.$$.fragment,i),F(on.$$.fragment,i),F(Ss.$$.fragment,i),F(Ws.$$.fragment,i),F(Hs.$$.fragment,i),F(sn.$$.fragment,i),F(rn.$$.fragment,i),F(Qs.$$.fragment,i),F(Vs.$$.fragment,i),F(Xs.$$.fragment,i),F(ln.$$.fragment,i),F(dn.$$.fragment,i),F(Ys.$$.fragment,i),F(Zs.$$.fragment,i),F(or.$$.fragment,i),F(pn.$$.fragment,i),F(mn.$$.fragment,i),F(nr.$$.fragment,i),F(sr.$$.fragment,i),F(un.$$.fragment,i),F(lr.$$.fragment,i),F(fn.$$.fragment,i),F(gn.$$.fragment,i),F(dr.$$.fragment,i),F(cr.$$.fragment,i),F(kn.$$.fragment,i),F(fr.$$.fragment,i),F(bn.$$.fragment,i),F(yn.$$.fragment,i),F(Tn.$$.fragment,i),F(gr.$$.fragment,i),F(_r.$$.fragment,i),F(wn.$$.fragment,i),F(vr.$$.fragment,i),F($n.$$.fragment,i),F(Er.$$.fragment,i),F(Rr.$$.fragment,i),F(En.$$.fragment,i),F(Cr.$$.fragment,i),F(Rn.$$.fragment,i),F(Bn.$$.fragment,i),F(Mn.$$.fragment,i),F(qr.$$.fragment,i),F(xr.$$.fragment,i),F(Cn.$$.fragment,i),F(Lr.$$.fragment,i),F(qn.$$.fragment,i),F(xn.$$.fragment,i),F(Or.$$.fragment,i),F(Dr.$$.fragment,i),F(An.$$.fragment,i),F(Wr.$$.fragment,i),F(Pn.$$.fragment,i),F(Ln.$$.fragment,i),F(On.$$.fragment,i),F(Ur.$$.fragment,i),F(Kr.$$.fragment,i),F(Nn.$$.fragment,i),F(Jr.$$.fragment,i),F(In.$$.fragment,i),F(Sn.$$.fragment,i),F(Wn.$$.fragment,i),nc=!0)},o(i){E(l.$$.fragment,i),E(T.$$.fragment,i),E(x.$$.fragment,i),E(pe.$$.fragment,i),E(Oe.$$.fragment,i),E(W.$$.fragment,i),E(me.$$.fragment,i),E(is.$$.fragment,i),E(ds.$$.fragment,i),E(ps.$$.fragment,i),E(No.$$.fragment,i),E(ms.$$.fragment,i),E(hs.$$.fragment,i),E(us.$$.fragment,i),E(gs.$$.fragment,i),E(ks.$$.fragment,i),E(ys.$$.fragment,i),E(Wo.$$.fragment,i),E(Ts.$$.fragment,i),E(vs.$$.fragment,i),E(ws.$$.fragment,i),E(Bs.$$.fragment,i),E(Ko.$$.fragment,i),E(Ho.$$.fragment,i),E(Ms.$$.fragment,i),E(zs.$$.fragment,i),E(qs.$$.fragment,i),E(Vo.$$.fragment,i),E(Jo.$$.fragment,i),E(xs.$$.fragment,i),E(js.$$.fragment,i),E(Ps.$$.fragment,i),E(Xo.$$.fragment,i),E(Yo.$$.fragment,i),E(Ls.$$.fragment,i),E(Os.$$.fragment,i),E(Is.$$.fragment,i),E(en.$$.fragment,i),E(tn.$$.fragment,i),E(on.$$.fragment,i),E(Ss.$$.fragment,i),E(Ws.$$.fragment,i),E(Hs.$$.fragment,i),E(sn.$$.fragment,i),E(rn.$$.fragment,i),E(Qs.$$.fragment,i),E(Vs.$$.fragment,i),E(Xs.$$.fragment,i),E(ln.$$.fragment,i),E(dn.$$.fragment,i),E(Ys.$$.fragment,i),E(Zs.$$.fragment,i),E(or.$$.fragment,i),E(pn.$$.fragment,i),E(mn.$$.fragment,i),E(nr.$$.fragment,i),E(sr.$$.fragment,i),E(un.$$.fragment,i),E(lr.$$.fragment,i),E(fn.$$.fragment,i),E(gn.$$.fragment,i),E(dr.$$.fragment,i),E(cr.$$.fragment,i),E(kn.$$.fragment,i),E(fr.$$.fragment,i),E(bn.$$.fragment,i),E(yn.$$.fragment,i),E(Tn.$$.fragment,i),E(gr.$$.fragment,i),E(_r.$$.fragment,i),E(wn.$$.fragment,i),E(vr.$$.fragment,i),E($n.$$.fragment,i),E(Er.$$.fragment,i),E(Rr.$$.fragment,i),E(En.$$.fragment,i),E(Cr.$$.fragment,i),E(Rn.$$.fragment,i),E(Bn.$$.fragment,i),E(Mn.$$.fragment,i),E(qr.$$.fragment,i),E(xr.$$.fragment,i),E(Cn.$$.fragment,i),E(Lr.$$.fragment,i),E(qn.$$.fragment,i),E(xn.$$.fragment,i),E(Or.$$.fragment,i),E(Dr.$$.fragment,i),E(An.$$.fragment,i),E(Wr.$$.fragment,i),E(Pn.$$.fragment,i),E(Ln.$$.fragment,i),E(On.$$.fragment,i),E(Ur.$$.fragment,i),E(Kr.$$.fragment,i),E(Nn.$$.fragment,i),E(Jr.$$.fragment,i),E(In.$$.fragment,i),E(Sn.$$.fragment,i),E(Wn.$$.fragment,i),nc=!1},d(i){t(d),i&&t(k),i&&t(p),R(l),i&&t(fe),i&&t(N),R(T),i&&t(ge),i&&t(S),i&&t(_e),i&&t(U),i&&t(ke),i&&t(K),i&&t(ne),i&&t(q),i&&t(be),i&&t(H),i&&t(ye),i&&t(I),R(x),i&&t(Te),i&&t(O),R(pe),R(Oe),i&&t(Se),i&&t(Le),R(W),i&&t(We),i&&t(oe),R(me),R(is),R(ds),R(ps),R(No),R(ms),i&&t(Rd),i&&t(no),R(hs),i&&t(Bd),i&&t(ot),R(us),R(gs),R(ks),R(ys),R(Wo),R(Ts),i&&t(Md),i&&t(so),R(vs),i&&t(zd),i&&t(ht),R(ws),R(Bs),R(Ko),R(Ho),i&&t(Cd),i&&t(ao),R(Ms),i&&t(qd),i&&t(Ut),R(zs),R(qs),R(Vo),R(Jo),i&&t(xd),i&&t(co),R(xs),i&&t(jd),i&&t(Kt),R(js),R(Ps),R(Xo),R(Yo),i&&t(Ad),i&&t(ho),R(Ls),i&&t(Pd),i&&t(Tt),R(Os),R(Is),R(en),R(tn),R(on),i&&t(Ld),i&&t(fo),R(Ss),i&&t(Od),i&&t(vt),R(Ws),R(Hs),R(sn),R(rn),i&&t(Dd),i&&t(_o),R(Qs),i&&t(Nd),i&&t(wt),R(Vs),R(Xs),R(ln),R(dn),i&&t(Id),i&&t(bo),R(Ys),i&&t(Sd),i&&t($t),R(Zs),R(or),R(pn),R(mn),i&&t(Wd),i&&t(vo),R(nr),i&&t(Ud),i&&t(st),R(sr),R(un),R(lr),R(fn),R(gn),i&&t(Kd),i&&t($o),R(dr),i&&t(Hd),i&&t(rt),R(cr),R(kn),R(fr),R(bn),R(yn),R(Tn),i&&t(Qd),i&&t(Eo),R(gr),i&&t(Vd),i&&t(at),R(_r),R(wn),R(vr),R($n),i&&t(Jd),i&&t(Ro),R(Er),i&&t(Gd),i&&t(it),R(Rr),R(En),R(Cr),R(Rn),R(Bn),R(Mn),i&&t(Xd),i&&t(Mo),R(qr),i&&t(Yd),i&&t(lt),R(xr),R(Cn),R(Lr),R(qn),R(xn),i&&t(Zd),i&&t(Co),R(Or),i&&t(ec),i&&t(dt),R(Dr),R(An),R(Wr),R(Pn),R(Ln),R(On),i&&t(tc),i&&t(xo),R(Ur),i&&t(oc),i&&t(ct),R(Kr),R(Nn),R(Jr),R(In),R(Sn),R(Wn)}}}const Lv={local:"rembert",sections:[{local:"overview",title:"Overview"},{local:"transformers.RemBertConfig",title:"RemBertConfig"},{local:"transformers.RemBertTokenizer",title:"RemBertTokenizer"},{local:"transformers.RemBertTokenizerFast",title:"RemBertTokenizerFast"},{local:"transformers.RemBertModel",title:"RemBertModel"},{local:"transformers.RemBertForCausalLM",title:"RemBertForCausalLM"},{local:"transformers.RemBertForMaskedLM",title:"RemBertForMaskedLM"},{local:"transformers.RemBertForSequenceClassification",title:"RemBertForSequenceClassification"},{local:"transformers.RemBertForMultipleChoice",title:"RemBertForMultipleChoice"},{local:"transformers.RemBertForTokenClassification",title:"RemBertForTokenClassification"},{local:"transformers.RemBertForQuestionAnswering",title:"RemBertForQuestionAnswering"},{local:"transformers.TFRemBertModel",title:"TFRemBertModel"},{local:"transformers.TFRemBertForMaskedLM",title:"TFRemBertForMaskedLM"},{local:"transformers.TFRemBertForCausalLM",title:"TFRemBertForCausalLM"},{local:"transformers.TFRemBertForSequenceClassification",title:"TFRemBertForSequenceClassification"},{local:"transformers.TFRemBertForMultipleChoice",title:"TFRemBertForMultipleChoice"},{local:"transformers.TFRemBertForTokenClassification",title:"TFRemBertForTokenClassification"},{local:"transformers.TFRemBertForQuestionAnswering",title:"TFRemBertForQuestionAnswering"}],title:"RemBERT"};function Ov(z){return QT(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Kv extends WT{constructor(d){super();UT(this,d,Ov,Pv,KT,{})}}export{Kv as default,Lv as metadata};
