import{S as E1,i as B1,s as x1,e as r,k as p,w as y,t as o,M as z1,c as a,d as t,m as h,a as i,x as w,h as n,b as g,G as e,g as _,y as $,q as M,o as F,B as E,v as q1,L as Je}from"../../chunks/vendor-hf-doc-builder.js";import{T as Ve}from"../../chunks/Tip-hf-doc-builder.js";import{D as ne}from"../../chunks/Docstring-hf-doc-builder.js";import{C as Ye}from"../../chunks/CodeBlock-hf-doc-builder.js";import{I as Xe}from"../../chunks/IconCopyLink-hf-doc-builder.js";import{E as Ge}from"../../chunks/ExampleCodeBlock-hf-doc-builder.js";function P1(q){let d,v,m,u,k;return u=new Ye({props:{code:`from transformers import MobileBertConfig, MobileBertModel

# Initializing a MobileBERT configuration
configuration = MobileBertConfig()

# Initializing a model (with random weights) from the configuration above
model = MobileBertModel(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> MobileBertConfig, MobileBertModel

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a MobileBERT configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = MobileBertConfig()

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a model (with random weights) from the configuration above</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = MobileBertModel(configuration)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Accessing the model configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = model.config`}}),{c(){d=r("p"),v=o("Examples:"),m=p(),y(u.$$.fragment)},l(l){d=a(l,"P",{});var c=i(d);v=n(c,"Examples:"),c.forEach(t),m=h(l),w(u.$$.fragment,l)},m(l,c){_(l,d,c),e(d,v),_(l,m,c),$(u,l,c),k=!0},p:Je,i(l){k||(M(u.$$.fragment,l),k=!0)},o(l){F(u.$$.fragment,l),k=!1},d(l){l&&t(d),l&&t(m),E(u,l)}}}function j1(q){let d,v,m,u,k;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=r("p"),v=o("sequence pair mask has the following format:"),m=p(),y(u.$$.fragment)},l(l){d=a(l,"P",{});var c=i(d);v=n(c,"sequence pair mask has the following format:"),c.forEach(t),m=h(l),w(u.$$.fragment,l)},m(l,c){_(l,d,c),e(d,v),_(l,m,c),$(u,l,c),k=!0},p:Je,i(l){k||(M(u.$$.fragment,l),k=!0)},o(l){F(u.$$.fragment,l),k=!1},d(l){l&&t(d),l&&t(m),E(u,l)}}}function C1(q){let d,v,m,u,k;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=r("p"),v=o("sequence pair mask has the following format:"),m=p(),y(u.$$.fragment)},l(l){d=a(l,"P",{});var c=i(d);v=n(c,"sequence pair mask has the following format:"),c.forEach(t),m=h(l),w(u.$$.fragment,l)},m(l,c){_(l,d,c),e(d,v),_(l,m,c),$(u,l,c),k=!0},p:Je,i(l){k||(M(u.$$.fragment,l),k=!0)},o(l){F(u.$$.fragment,l),k=!1},d(l){l&&t(d),l&&t(m),E(u,l)}}}function N1(q){let d,v,m,u,k;return{c(){d=r("p"),v=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),m=r("code"),u=o("Module"),k=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=a(l,"P",{});var c=i(d);v=n(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),m=a(c,"CODE",{});var z=i(m);u=n(z,"Module"),z.forEach(t),k=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,v),e(d,m),e(m,u),e(d,k)},d(l){l&&t(d)}}}function A1(q){let d,v,m,u,k;return u=new Ye({props:{code:`from transformers import AutoTokenizer, MobileBertModel
import torch

tokenizer = AutoTokenizer.from_pretrained("google/mobilebert-uncased")
model = MobileBertModel.from_pretrained("google/mobilebert-uncased")

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

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

<span class="hljs-meta">&gt;&gt;&gt; </span>last_hidden_states = outputs.last_hidden_state`}}),{c(){d=r("p"),v=o("Example:"),m=p(),y(u.$$.fragment)},l(l){d=a(l,"P",{});var c=i(d);v=n(c,"Example:"),c.forEach(t),m=h(l),w(u.$$.fragment,l)},m(l,c){_(l,d,c),e(d,v),_(l,m,c),$(u,l,c),k=!0},p:Je,i(l){k||(M(u.$$.fragment,l),k=!0)},o(l){F(u.$$.fragment,l),k=!1},d(l){l&&t(d),l&&t(m),E(u,l)}}}function O1(q){let d,v,m,u,k;return{c(){d=r("p"),v=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),m=r("code"),u=o("Module"),k=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=a(l,"P",{});var c=i(d);v=n(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),m=a(c,"CODE",{});var z=i(m);u=n(z,"Module"),z.forEach(t),k=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,v),e(d,m),e(m,u),e(d,k)},d(l){l&&t(d)}}}function D1(q){let d,v,m,u,k;return u=new Ye({props:{code:`from transformers import AutoTokenizer, MobileBertForPreTraining
import torch

tokenizer = AutoTokenizer.from_pretrained("google/mobilebert-uncased")
model = MobileBertForPreTraining.from_pretrained("google/mobilebert-uncased")

input_ids = torch.tensor(tokenizer.encode("Hello, my dog is cute", add_special_tokens=True)).unsqueeze(0)
# Batch size 1
outputs = model(input_ids)

prediction_logits = outputs.prediction_logits
seq_relationship_logits = outputs.seq_relationship_logits`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, MobileBertForPreTraining
<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/mobilebert-uncased&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = MobileBertForPreTraining.from_pretrained(<span class="hljs-string">&quot;google/mobilebert-uncased&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>input_ids = torch.tensor(tokenizer.encode(<span class="hljs-string">&quot;Hello, my dog is cute&quot;</span>, add_special_tokens=<span class="hljs-literal">True</span>)).unsqueeze(<span class="hljs-number">0</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Batch size 1</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(input_ids)

<span class="hljs-meta">&gt;&gt;&gt; </span>prediction_logits = outputs.prediction_logits
<span class="hljs-meta">&gt;&gt;&gt; </span>seq_relationship_logits = outputs.seq_relationship_logits`}}),{c(){d=r("p"),v=o("Examples:"),m=p(),y(u.$$.fragment)},l(l){d=a(l,"P",{});var c=i(d);v=n(c,"Examples:"),c.forEach(t),m=h(l),w(u.$$.fragment,l)},m(l,c){_(l,d,c),e(d,v),_(l,m,c),$(u,l,c),k=!0},p:Je,i(l){k||(M(u.$$.fragment,l),k=!0)},o(l){F(u.$$.fragment,l),k=!1},d(l){l&&t(d),l&&t(m),E(u,l)}}}function S1(q){let d,v,m,u,k;return{c(){d=r("p"),v=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),m=r("code"),u=o("Module"),k=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=a(l,"P",{});var c=i(d);v=n(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),m=a(c,"CODE",{});var z=i(m);u=n(z,"Module"),z.forEach(t),k=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,v),e(d,m),e(m,u),e(d,k)},d(l){l&&t(d)}}}function I1(q){let d,v,m,u,k;return u=new Ye({props:{code:`from transformers import AutoTokenizer, MobileBertForMaskedLM
import torch

tokenizer = AutoTokenizer.from_pretrained("google/mobilebert-uncased")
model = MobileBertForMaskedLM.from_pretrained("google/mobilebert-uncased")

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)
tokenizer.decode(predicted_token_id)

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)
round(outputs.loss.item(), 2)`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, MobileBertForMaskedLM
<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/mobilebert-uncased&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = MobileBertForMaskedLM.from_pretrained(<span class="hljs-string">&quot;google/mobilebert-uncased&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>tokenizer.decode(predicted_token_id)
<span class="hljs-string">&#x27;paris&#x27;</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)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">round</span>(outputs.loss.item(), <span class="hljs-number">2</span>)
<span class="hljs-number">0.57</span>`}}),{c(){d=r("p"),v=o("Example:"),m=p(),y(u.$$.fragment)},l(l){d=a(l,"P",{});var c=i(d);v=n(c,"Example:"),c.forEach(t),m=h(l),w(u.$$.fragment,l)},m(l,c){_(l,d,c),e(d,v),_(l,m,c),$(u,l,c),k=!0},p:Je,i(l){k||(M(u.$$.fragment,l),k=!0)},o(l){F(u.$$.fragment,l),k=!1},d(l){l&&t(d),l&&t(m),E(u,l)}}}function L1(q){let d,v,m,u,k;return{c(){d=r("p"),v=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),m=r("code"),u=o("Module"),k=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=a(l,"P",{});var c=i(d);v=n(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),m=a(c,"CODE",{});var z=i(m);u=n(z,"Module"),z.forEach(t),k=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,v),e(d,m),e(m,u),e(d,k)},d(l){l&&t(d)}}}function W1(q){let d,v,m,u,k;return u=new Ye({props:{code:`from transformers import AutoTokenizer, MobileBertForNextSentencePrediction
import torch

tokenizer = AutoTokenizer.from_pretrained("google/mobilebert-uncased")
model = MobileBertForNextSentencePrediction.from_pretrained("google/mobilebert-uncased")

prompt = "In Italy, pizza served in formal settings, such as at a restaurant, is presented unsliced."
next_sentence = "The sky is blue due to the shorter wavelength of blue light."
encoding = tokenizer(prompt, next_sentence, return_tensors="pt")

outputs = model(**encoding, labels=torch.LongTensor([1]))
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, MobileBertForNextSentencePrediction
<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/mobilebert-uncased&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = MobileBertForNextSentencePrediction.from_pretrained(<span class="hljs-string">&quot;google/mobilebert-uncased&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>next_sentence = <span class="hljs-string">&quot;The sky is blue due to the shorter wavelength of blue light.&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>encoding = tokenizer(prompt, next_sentence, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**encoding, labels=torch.LongTensor([<span class="hljs-number">1</span>]))
<span class="hljs-meta">&gt;&gt;&gt; </span>loss = outputs.loss
<span class="hljs-meta">&gt;&gt;&gt; </span>logits = outputs.logits`}}),{c(){d=r("p"),v=o("Examples:"),m=p(),y(u.$$.fragment)},l(l){d=a(l,"P",{});var c=i(d);v=n(c,"Examples:"),c.forEach(t),m=h(l),w(u.$$.fragment,l)},m(l,c){_(l,d,c),e(d,v),_(l,m,c),$(u,l,c),k=!0},p:Je,i(l){k||(M(u.$$.fragment,l),k=!0)},o(l){F(u.$$.fragment,l),k=!1},d(l){l&&t(d),l&&t(m),E(u,l)}}}function R1(q){let d,v,m,u,k;return{c(){d=r("p"),v=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),m=r("code"),u=o("Module"),k=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=a(l,"P",{});var c=i(d);v=n(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),m=a(c,"CODE",{});var z=i(m);u=n(z,"Module"),z.forEach(t),k=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,v),e(d,m),e(m,u),e(d,k)},d(l){l&&t(d)}}}function U1(q){let d,v,m,u,k;return u=new Ye({props:{code:`import torch
from transformers import AutoTokenizer, MobileBertForSequenceClassification

tokenizer = AutoTokenizer.from_pretrained("lordtt13/emo-mobilebert")
model = MobileBertForSequenceClassification.from_pretrained("lordtt13/emo-mobilebert")

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

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

predicted_class_id = logits.argmax().item()
model.config.id2label[predicted_class_id]

# 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 = MobileBertForSequenceClassification.from_pretrained("lordtt13/emo-mobilebert", num_labels=num_labels)

labels = torch.tensor([1])
loss = model(**inputs, labels=labels).loss
round(loss.item(), 2)`,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, MobileBertForSequenceClassification

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;lordtt13/emo-mobilebert&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = MobileBertForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;lordtt13/emo-mobilebert&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>model.config.id2label[predicted_class_id]
<span class="hljs-string">&#x27;others&#x27;</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 = MobileBertForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;lordtt13/emo-mobilebert&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
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">round</span>(loss.item(), <span class="hljs-number">2</span>)
<span class="hljs-number">4.72</span>`}}),{c(){d=r("p"),v=o("Example of single-label classification:"),m=p(),y(u.$$.fragment)},l(l){d=a(l,"P",{});var c=i(d);v=n(c,"Example of single-label classification:"),c.forEach(t),m=h(l),w(u.$$.fragment,l)},m(l,c){_(l,d,c),e(d,v),_(l,m,c),$(u,l,c),k=!0},p:Je,i(l){k||(M(u.$$.fragment,l),k=!0)},o(l){F(u.$$.fragment,l),k=!1},d(l){l&&t(d),l&&t(m),E(u,l)}}}function K1(q){let d,v,m,u,k;return u=new Ye({props:{code:`import torch
from transformers import AutoTokenizer, MobileBertForSequenceClassification

tokenizer = AutoTokenizer.from_pretrained("lordtt13/emo-mobilebert")
model = MobileBertForSequenceClassification.from_pretrained("lordtt13/emo-mobilebert", 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 = MobileBertForSequenceClassification.from_pretrained(
    "lordtt13/emo-mobilebert", 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, MobileBertForSequenceClassification

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

<span class="hljs-meta">&gt;&gt;&gt; </span>labels = torch.<span class="hljs-built_in">sum</span>(
<span class="hljs-meta">... </span>    torch.nn.functional.one_hot(predicted_class_ids[<span class="hljs-literal">None</span>, :].clone(), num_classes=num_labels), dim=<span class="hljs-number">1</span>
<span class="hljs-meta">... </span>).to(torch.<span class="hljs-built_in">float</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>loss = model(**inputs, labels=labels).loss`}}),{c(){d=r("p"),v=o("Example of multi-label classification:"),m=p(),y(u.$$.fragment)},l(l){d=a(l,"P",{});var c=i(d);v=n(c,"Example of multi-label classification:"),c.forEach(t),m=h(l),w(u.$$.fragment,l)},m(l,c){_(l,d,c),e(d,v),_(l,m,c),$(u,l,c),k=!0},p:Je,i(l){k||(M(u.$$.fragment,l),k=!0)},o(l){F(u.$$.fragment,l),k=!1},d(l){l&&t(d),l&&t(m),E(u,l)}}}function H1(q){let d,v,m,u,k;return{c(){d=r("p"),v=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),m=r("code"),u=o("Module"),k=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=a(l,"P",{});var c=i(d);v=n(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),m=a(c,"CODE",{});var z=i(m);u=n(z,"Module"),z.forEach(t),k=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,v),e(d,m),e(m,u),e(d,k)},d(l){l&&t(d)}}}function Q1(q){let d,v,m,u,k;return u=new Ye({props:{code:`from transformers import AutoTokenizer, MobileBertForMultipleChoice
import torch

tokenizer = AutoTokenizer.from_pretrained("google/mobilebert-uncased")
model = MobileBertForMultipleChoice.from_pretrained("google/mobilebert-uncased")

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

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

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

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># the linear classifier still needs to be trained</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>loss = outputs.loss
<span class="hljs-meta">&gt;&gt;&gt; </span>logits = outputs.logits`}}),{c(){d=r("p"),v=o("Example:"),m=p(),y(u.$$.fragment)},l(l){d=a(l,"P",{});var c=i(d);v=n(c,"Example:"),c.forEach(t),m=h(l),w(u.$$.fragment,l)},m(l,c){_(l,d,c),e(d,v),_(l,m,c),$(u,l,c),k=!0},p:Je,i(l){k||(M(u.$$.fragment,l),k=!0)},o(l){F(u.$$.fragment,l),k=!1},d(l){l&&t(d),l&&t(m),E(u,l)}}}function V1(q){let d,v,m,u,k;return{c(){d=r("p"),v=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),m=r("code"),u=o("Module"),k=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=a(l,"P",{});var c=i(d);v=n(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),m=a(c,"CODE",{});var z=i(m);u=n(z,"Module"),z.forEach(t),k=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,v),e(d,m),e(m,u),e(d,k)},d(l){l&&t(d)}}}function G1(q){let d,v,m,u,k;return u=new Ye({props:{code:`from transformers import AutoTokenizer, MobileBertForTokenClassification
import torch

tokenizer = AutoTokenizer.from_pretrained("mrm8488/mobilebert-finetuned-ner")
model = MobileBertForTokenClassification.from_pretrained("mrm8488/mobilebert-finetuned-ner")

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]]
predicted_tokens_classes

labels = predicted_token_class_ids
loss = model(**inputs, labels=labels).loss
round(loss.item(), 2)`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, MobileBertForTokenClassification
<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;mrm8488/mobilebert-finetuned-ner&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = MobileBertForTokenClassification.from_pretrained(<span class="hljs-string">&quot;mrm8488/mobilebert-finetuned-ner&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>predicted_tokens_classes
[<span class="hljs-string">&#x27;I-ORG&#x27;</span>, <span class="hljs-string">&#x27;I-ORG&#x27;</span>, <span class="hljs-string">&#x27;O&#x27;</span>, <span class="hljs-string">&#x27;O&#x27;</span>, <span class="hljs-string">&#x27;O&#x27;</span>, <span class="hljs-string">&#x27;O&#x27;</span>, <span class="hljs-string">&#x27;O&#x27;</span>, <span class="hljs-string">&#x27;I-LOC&#x27;</span>, <span class="hljs-string">&#x27;O&#x27;</span>, <span class="hljs-string">&#x27;I-LOC&#x27;</span>, <span class="hljs-string">&#x27;I-LOC&#x27;</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
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">round</span>(loss.item(), <span class="hljs-number">2</span>)
<span class="hljs-number">0.03</span>`}}),{c(){d=r("p"),v=o("Example:"),m=p(),y(u.$$.fragment)},l(l){d=a(l,"P",{});var c=i(d);v=n(c,"Example:"),c.forEach(t),m=h(l),w(u.$$.fragment,l)},m(l,c){_(l,d,c),e(d,v),_(l,m,c),$(u,l,c),k=!0},p:Je,i(l){k||(M(u.$$.fragment,l),k=!0)},o(l){F(u.$$.fragment,l),k=!1},d(l){l&&t(d),l&&t(m),E(u,l)}}}function J1(q){let d,v,m,u,k;return{c(){d=r("p"),v=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),m=r("code"),u=o("Module"),k=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=a(l,"P",{});var c=i(d);v=n(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),m=a(c,"CODE",{});var z=i(m);u=n(z,"Module"),z.forEach(t),k=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,v),e(d,m),e(m,u),e(d,k)},d(l){l&&t(d)}}}function Y1(q){let d,v,m,u,k;return u=new Ye({props:{code:`from transformers import AutoTokenizer, MobileBertForQuestionAnswering
import torch

tokenizer = AutoTokenizer.from_pretrained("csarron/mobilebert-uncased-squad-v2")
model = MobileBertForQuestionAnswering.from_pretrained("csarron/mobilebert-uncased-squad-v2")

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]
tokenizer.decode(predict_answer_tokens, skip_special_tokens=True)

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

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

tokenizer = AutoTokenizer.from_pretrained("google/mobilebert-uncased")
model = TFMobileBertModel.from_pretrained("google/mobilebert-uncased")

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

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

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

tokenizer = AutoTokenizer.from_pretrained("google/mobilebert-uncased")
model = TFMobileBertForPreTraining.from_pretrained("google/mobilebert-uncased")
input_ids = tf.constant(tokenizer.encode("Hello, my dog is cute"))[None, :]  # Batch size 1
outputs = model(input_ids)
prediction_scores, seq_relationship_scores = outputs[:2]`,highlighted:`<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><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, TFMobileBertForPreTraining

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

tokenizer = AutoTokenizer.from_pretrained("google/mobilebert-uncased")
model = TFMobileBertForMaskedLM.from_pretrained("google/mobilebert-uncased")

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

tokenizer = AutoTokenizer.from_pretrained("google/mobilebert-uncased")
model = TFMobileBertForNextSentencePrediction.from_pretrained("google/mobilebert-uncased")

prompt = "In Italy, pizza served in formal settings, such as at a restaurant, is presented unsliced."
next_sentence = "The sky is blue due to the shorter wavelength of blue light."
encoding = tokenizer(prompt, next_sentence, return_tensors="tf")

logits = model(encoding["input_ids"], token_type_ids=encoding["token_type_ids"])[0]`,highlighted:`<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><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, TFMobileBertForNextSentencePrediction

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;google/mobilebert-uncased&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFMobileBertForNextSentencePrediction.from_pretrained(<span class="hljs-string">&quot;google/mobilebert-uncased&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>next_sentence = <span class="hljs-string">&quot;The sky is blue due to the shorter wavelength of blue light.&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>encoding = tokenizer(prompt, next_sentence, return_tensors=<span class="hljs-string">&quot;tf&quot;</span>)

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

tokenizer = AutoTokenizer.from_pretrained("vumichien/emo-mobilebert")
model = TFMobileBertForSequenceClassification.from_pretrained("vumichien/emo-mobilebert")

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])
model.config.id2label[predicted_class_id]`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, TFMobileBertForSequenceClassification
<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;vumichien/emo-mobilebert&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFMobileBertForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;vumichien/emo-mobilebert&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>])
<span class="hljs-meta">&gt;&gt;&gt; </span>model.config.id2label[predicted_class_id]
<span class="hljs-string">&#x27;others&#x27;</span>`}}),{c(){d=r("p"),v=o("Example:"),m=p(),y(u.$$.fragment)},l(l){d=a(l,"P",{});var c=i(d);v=n(c,"Example:"),c.forEach(t),m=h(l),w(u.$$.fragment,l)},m(l,c){_(l,d,c),e(d,v),_(l,m,c),$(u,l,c),k=!0},p:Je,i(l){k||(M(u.$$.fragment,l),k=!0)},o(l){F(u.$$.fragment,l),k=!1},d(l){l&&t(d),l&&t(m),E(u,l)}}}function u2(q){let d,v;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 = TFMobileBertForSequenceClassification.from_pretrained("vumichien/emo-mobilebert", num_labels=num_labels)\n\nlabels = tf.constant(1)\nloss = model(**inputs, labels=labels).loss\nround(float(loss), 2)',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>
<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 = TFMobileBertForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;vumichien/emo-mobilebert&quot;</span>, num_labels=num_labels)

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

tokenizer = AutoTokenizer.from_pretrained("google/mobilebert-uncased")
model = TFMobileBertForMultipleChoice.from_pretrained("google/mobilebert-uncased")

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

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

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

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

tokenizer = AutoTokenizer.from_pretrained("vumichien/mobilebert-finetuned-ner")
model = TFMobileBertForTokenClassification.from_pretrained("vumichien/mobilebert-finetuned-ner")

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

tokenizer = AutoTokenizer.from_pretrained("vumichien/mobilebert-uncased-squad-v2")
model = TFMobileBertForQuestionAnswering.from_pretrained("vumichien/mobilebert-uncased-squad-v2")

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]
tokenizer.decode(predict_answer_tokens)`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, TFMobileBertForQuestionAnswering
<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;vumichien/mobilebert-uncased-squad-v2&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFMobileBertForQuestionAnswering.from_pretrained(<span class="hljs-string">&quot;vumichien/mobilebert-uncased-squad-v2&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>]
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer.decode(predict_answer_tokens)
<span class="hljs-string">&#x27;a nice puppet&#x27;</span>`}}),{c(){d=r("p"),v=o("Example:"),m=p(),y(u.$$.fragment)},l(l){d=a(l,"P",{});var c=i(d);v=n(c,"Example:"),c.forEach(t),m=h(l),w(u.$$.fragment,l)},m(l,c){_(l,d,c),e(d,v),_(l,m,c),$(u,l,c),k=!0},p:Je,i(l){k||(M(u.$$.fragment,l),k=!0)},o(l){F(u.$$.fragment,l),k=!1},d(l){l&&t(d),l&&t(m),E(u,l)}}}function M2(q){let d,v;return d=new Ye({props:{code:`# target is "nice puppet"
target_start_index = tf.constant([12])
target_end_index = tf.constant([13])

outputs = model(**inputs, start_positions=target_start_index, end_positions=target_end_index)
loss = tf.math.reduce_mean(outputs.loss)
round(float(loss), 2)`,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">12</span>])
<span class="hljs-meta">&gt;&gt;&gt; </span>target_end_index = tf.constant([<span class="hljs-number">13</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)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">round</span>(<span class="hljs-built_in">float</span>(loss), <span class="hljs-number">2</span>)
<span class="hljs-number">3.98</span>`}}),{c(){y(d.$$.fragment)},l(m){w(d.$$.fragment,m)},m(m,u){$(d,m,u),v=!0},p:Je,i(m){v||(M(d.$$.fragment,m),v=!0)},o(m){F(d.$$.fragment,m),v=!1},d(m){E(d,m)}}}function F2(q){let d,v,m,u,k,l,c,z,ve,me,S,re,Z,T,Te,K,ye,ue,L,we,ie,Q,$e,fe,R,Me,ge,U,ce,Fe,te,P,N,_e,W,pe,Ee,V,he,Be,C,se,G,le,xe,J,de,ze,O,be,I,ae,ee,j,qe,A,Pe,ke,f,B,Ne,oe,Re,Se,x,Ue,Ke,Ie,Ae,He,D,H,Oe,Qe,Y,Le,De,je,We,X,Ce,gl,js,Sh,_l,Ih,Sc,dt,Cs,Lh,Vt,Wh,oi,Rh,Uh,ni,Kh,Hh,Ns,Qh,Vh,Gh,ho,Jh,si,Yh,Xh,ri,Zh,em,tm,sn,om,bl,nm,Ic,mo,rn,kl,As,sm,vl,rm,Lc,Ze,Os,am,Tl,im,lm,Ds,dm,ai,cm,pm,hm,Jt,Ss,mm,yl,um,fm,Is,ii,gm,wl,_m,bm,li,km,$l,vm,Tm,an,Ls,ym,Ml,wm,$m,Ft,Ws,Mm,Fl,Fm,Em,ln,Bm,uo,xm,El,zm,qm,Bl,Pm,jm,Cm,dn,Rs,Nm,Us,Am,xl,Om,Dm,Wc,fo,cn,zl,Ks,Sm,ql,Im,Rc,ct,Hs,Lm,Qs,Wm,Pl,Rm,Um,Km,Vs,Hm,di,Qm,Vm,Gm,Yt,Gs,Jm,jl,Ym,Xm,Js,ci,Zm,Cl,eu,tu,pi,ou,Nl,nu,su,Et,Ys,ru,Al,au,iu,pn,lu,go,du,Ol,cu,pu,Dl,hu,mu,Uc,_o,hn,Sl,Xs,uu,Il,fu,Kc,bo,Zs,gu,er,_u,hi,bu,ku,Hc,ko,tr,vu,or,Tu,mi,yu,wu,Qc,vo,mn,Ll,nr,$u,Wl,Mu,Vc,et,sr,Fu,Rl,Eu,Bu,rr,xu,ui,zu,qu,Pu,ar,ju,ir,Cu,Nu,Au,Ul,lr,Ou,Du,Bt,dr,Su,To,Iu,fi,Lu,Wu,Kl,Ru,Uu,Ku,un,Hu,fn,Gc,yo,gn,Hl,cr,Qu,Ql,Vu,Jc,pt,pr,Gu,wo,Ju,Vl,Yu,Xu,Gl,Zu,ef,tf,hr,of,gi,nf,sf,rf,mr,af,ur,lf,df,cf,xt,fr,pf,$o,hf,_i,mf,uf,Jl,ff,gf,_f,_n,bf,bn,Yc,Mo,kn,Yl,gr,kf,Xl,vf,Xc,ht,_r,Tf,br,yf,Zl,wf,$f,Mf,kr,Ff,bi,Ef,Bf,xf,vr,zf,Tr,qf,Pf,jf,zt,yr,Cf,Fo,Nf,ki,Af,Of,ed,Df,Sf,If,vn,Lf,Tn,Zc,Eo,yn,td,wr,Wf,od,Rf,ep,mt,$r,Uf,Mr,Kf,nd,Hf,Qf,Vf,Fr,Gf,vi,Jf,Yf,Xf,Er,Zf,Br,eg,tg,og,qt,xr,ng,Bo,sg,Ti,rg,ag,sd,ig,lg,dg,wn,cg,$n,tp,xo,Mn,rd,zr,pg,ad,hg,op,ut,qr,mg,id,ug,fg,Pr,gg,yi,_g,bg,kg,jr,vg,Cr,Tg,yg,wg,bt,Nr,$g,zo,Mg,wi,Fg,Eg,ld,Bg,xg,zg,Fn,qg,En,Pg,Bn,np,qo,xn,dd,Ar,jg,cd,Cg,sp,ft,Or,Ng,pd,Ag,Og,Dr,Dg,$i,Sg,Ig,Lg,Sr,Wg,Ir,Rg,Ug,Kg,Pt,Lr,Hg,Po,Qg,Mi,Vg,Gg,hd,Jg,Yg,Xg,zn,Zg,qn,rp,jo,Pn,md,Wr,e_,ud,t_,ap,gt,Rr,o_,fd,n_,s_,Ur,r_,Fi,a_,i_,l_,Kr,d_,Hr,c_,p_,h_,jt,Qr,m_,Co,u_,Ei,f_,g_,gd,__,b_,k_,jn,v_,Cn,ip,No,Nn,_d,Vr,T_,bd,y_,lp,_t,Gr,w_,Ao,$_,kd,M_,F_,vd,E_,B_,x_,Jr,z_,Bi,q_,P_,j_,Yr,C_,Xr,N_,A_,O_,Ct,Zr,D_,Oo,S_,xi,I_,L_,Td,W_,R_,U_,An,K_,On,dp,Do,Dn,yd,ea,H_,wd,Q_,cp,tt,ta,V_,$d,G_,J_,oa,Y_,zi,X_,Z_,eb,na,tb,sa,ob,nb,sb,Sn,rb,Nt,ra,ab,So,ib,qi,lb,db,Md,cb,pb,hb,In,mb,Ln,pp,Io,Wn,Fd,aa,ub,Ed,fb,hp,ot,ia,gb,Lo,_b,Bd,bb,kb,xd,vb,Tb,yb,la,wb,Pi,$b,Mb,Fb,da,Eb,ca,Bb,xb,zb,Rn,qb,At,pa,Pb,Wo,jb,ji,Cb,Nb,zd,Ab,Ob,Db,Un,Sb,Kn,mp,Ro,Hn,qd,ha,Ib,Pd,Lb,up,nt,ma,Wb,ua,Rb,jd,Ub,Kb,Hb,fa,Qb,Ci,Vb,Gb,Jb,ga,Yb,_a,Xb,Zb,ek,Qn,tk,kt,ba,ok,Uo,nk,Ni,sk,rk,Cd,ak,ik,lk,Vn,dk,Gn,ck,Jn,fp,Ko,Yn,Nd,ka,pk,Ad,hk,gp,st,va,mk,Ta,uk,Od,fk,gk,_k,ya,bk,Ai,kk,vk,Tk,wa,yk,$a,wk,$k,Mk,Xn,Fk,Ot,Ma,Ek,Ho,Bk,Oi,xk,zk,Dd,qk,Pk,jk,Zn,Ck,es,_p,Qo,ts,Sd,Fa,Nk,Id,Ak,bp,rt,Ea,Ok,Ld,Dk,Sk,Ba,Ik,Di,Lk,Wk,Rk,xa,Uk,za,Kk,Hk,Qk,os,Vk,vt,qa,Gk,Vo,Jk,Si,Yk,Xk,Wd,Zk,ev,tv,ns,ov,ss,nv,rs,kp,Go,as,Rd,Pa,sv,Ud,rv,vp,at,ja,av,Kd,iv,lv,Ca,dv,Ii,cv,pv,hv,Na,mv,Aa,uv,fv,gv,is,_v,Dt,Oa,bv,Jo,kv,Li,vv,Tv,Hd,yv,wv,$v,ls,Mv,ds,Tp,Yo,cs,Qd,Da,Fv,Vd,Ev,yp,it,Sa,Bv,Gd,xv,zv,Ia,qv,Wi,Pv,jv,Cv,La,Nv,Wa,Av,Ov,Dv,ps,Sv,Tt,Ra,Iv,Xo,Lv,Ri,Wv,Rv,Jd,Uv,Kv,Hv,hs,Qv,ms,Vv,us,wp,Zo,fs,Yd,Ua,Gv,Xd,Jv,$p,lt,Ka,Yv,en,Xv,Zd,Zv,eT,ec,tT,oT,nT,Ha,sT,Ui,rT,aT,iT,Qa,lT,Va,dT,cT,pT,gs,hT,yt,Ga,mT,tn,uT,Ki,fT,gT,tc,_T,bT,kT,_s,vT,bs,TT,ks,Mp;return l=new Xe({}),T=new Xe({}),j=new Xe({}),js=new Xe({}),Cs=new ne({props:{name:"class transformers.MobileBertConfig",anchor:"transformers.MobileBertConfig",parameters:[{name:"vocab_size",val:" = 30522"},{name:"hidden_size",val:" = 512"},{name:"num_hidden_layers",val:" = 24"},{name:"num_attention_heads",val:" = 4"},{name:"intermediate_size",val:" = 512"},{name:"hidden_act",val:" = 'relu'"},{name:"hidden_dropout_prob",val:" = 0.0"},{name:"attention_probs_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:"pad_token_id",val:" = 0"},{name:"embedding_size",val:" = 128"},{name:"trigram_input",val:" = True"},{name:"use_bottleneck",val:" = True"},{name:"intra_bottleneck_size",val:" = 128"},{name:"use_bottleneck_attention",val:" = False"},{name:"key_query_shared_bottleneck",val:" = True"},{name:"num_feedforward_networks",val:" = 4"},{name:"normalization_type",val:" = 'no_norm'"},{name:"classifier_activation",val:" = True"},{name:"classifier_dropout",val:" = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.MobileBertConfig.vocab_size",description:`<strong>vocab_size</strong> (<code>int</code>, <em>optional</em>, defaults to 30522) &#x2014;
Vocabulary size of the MobileBERT model. Defines the number of different tokens that can be represented by
the <code>inputs_ids</code> passed when calling <a href="/docs/transformers/v4.27.1/en/model_doc/mobilebert#transformers.MobileBertModel">MobileBertModel</a> or <a href="/docs/transformers/v4.27.1/en/model_doc/mobilebert#transformers.TFMobileBertModel">TFMobileBertModel</a>.`,name:"vocab_size"},{anchor:"transformers.MobileBertConfig.hidden_size",description:`<strong>hidden_size</strong> (<code>int</code>, <em>optional</em>, defaults to 512) &#x2014;
Dimensionality of the encoder layers and the pooler layer.`,name:"hidden_size"},{anchor:"transformers.MobileBertConfig.num_hidden_layers",description:`<strong>num_hidden_layers</strong> (<code>int</code>, <em>optional</em>, defaults to 24) &#x2014;
Number of hidden layers in the Transformer encoder.`,name:"num_hidden_layers"},{anchor:"transformers.MobileBertConfig.num_attention_heads",description:`<strong>num_attention_heads</strong> (<code>int</code>, <em>optional</em>, defaults to 4) &#x2014;
Number of attention heads for each attention layer in the Transformer encoder.`,name:"num_attention_heads"},{anchor:"transformers.MobileBertConfig.intermediate_size",description:`<strong>intermediate_size</strong> (<code>int</code>, <em>optional</em>, defaults to 512) &#x2014;
Dimensionality of the &#x201C;intermediate&#x201D; (often named feed-forward) layer in the Transformer encoder.`,name:"intermediate_size"},{anchor:"transformers.MobileBertConfig.hidden_act",description:`<strong>hidden_act</strong> (<code>str</code> or <code>function</code>, <em>optional</em>, defaults to <code>&quot;relu&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;silu&quot;</code> and <code>&quot;gelu_new&quot;</code> are supported.`,name:"hidden_act"},{anchor:"transformers.MobileBertConfig.hidden_dropout_prob",description:`<strong>hidden_dropout_prob</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#x2014;
The dropout probability for all fully connected layers in the embeddings, encoder, and pooler.`,name:"hidden_dropout_prob"},{anchor:"transformers.MobileBertConfig.attention_probs_dropout_prob",description:`<strong>attention_probs_dropout_prob</strong> (<code>float</code>, <em>optional</em>, defaults to 0.1) &#x2014;
The dropout ratio for the attention probabilities.`,name:"attention_probs_dropout_prob"},{anchor:"transformers.MobileBertConfig.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.MobileBertConfig.type_vocab_size",description:`<strong>type_vocab_size</strong> (<code>int</code>, <em>optional</em>, defaults to 2) &#x2014;
The vocabulary size of the <code>token_type_ids</code> passed when calling <a href="/docs/transformers/v4.27.1/en/model_doc/mobilebert#transformers.MobileBertModel">MobileBertModel</a> or
<a href="/docs/transformers/v4.27.1/en/model_doc/mobilebert#transformers.TFMobileBertModel">TFMobileBertModel</a>.`,name:"type_vocab_size"},{anchor:"transformers.MobileBertConfig.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.MobileBertConfig.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.MobileBertConfig.pad_token_id",description:`<strong>pad_token_id</strong> (<code>int</code>, <em>optional</em>, defaults to 0) &#x2014;
The ID of the token in the word embedding to use as padding.`,name:"pad_token_id"},{anchor:"transformers.MobileBertConfig.embedding_size",description:`<strong>embedding_size</strong> (<code>int</code>, <em>optional</em>, defaults to 128) &#x2014;
The dimension of the word embedding vectors.`,name:"embedding_size"},{anchor:"transformers.MobileBertConfig.trigram_input",description:`<strong>trigram_input</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Use a convolution of trigram as input.`,name:"trigram_input"},{anchor:"transformers.MobileBertConfig.use_bottleneck",description:`<strong>use_bottleneck</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to use bottleneck in BERT.`,name:"use_bottleneck"},{anchor:"transformers.MobileBertConfig.intra_bottleneck_size",description:`<strong>intra_bottleneck_size</strong> (<code>int</code>, <em>optional</em>, defaults to 128) &#x2014;
Size of bottleneck layer output.`,name:"intra_bottleneck_size"},{anchor:"transformers.MobileBertConfig.use_bottleneck_attention",description:`<strong>use_bottleneck_attention</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether to use attention inputs from the bottleneck transformation.`,name:"use_bottleneck_attention"},{anchor:"transformers.MobileBertConfig.key_query_shared_bottleneck",description:`<strong>key_query_shared_bottleneck</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to use the same linear transformation for query&amp;key in the bottleneck.`,name:"key_query_shared_bottleneck"},{anchor:"transformers.MobileBertConfig.num_feedforward_networks",description:`<strong>num_feedforward_networks</strong> (<code>int</code>, <em>optional</em>, defaults to 4) &#x2014;
Number of FFNs in a block.`,name:"num_feedforward_networks"},{anchor:"transformers.MobileBertConfig.normalization_type",description:`<strong>normalization_type</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;no_norm&quot;</code>) &#x2014;
The normalization type in MobileBERT.`,name:"normalization_type"},{anchor:"transformers.MobileBertConfig.classifier_dropout",description:`<strong>classifier_dropout</strong> (<code>float</code>, <em>optional</em>) &#x2014;
The dropout ratio for the classification head.`,name:"classifier_dropout"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/mobilebert/configuration_mobilebert.py#L31"}}),sn=new Ge({props:{anchor:"transformers.MobileBertConfig.example",$$slots:{default:[P1]},$$scope:{ctx:q}}}),As=new Xe({}),Os=new ne({props:{name:"class transformers.MobileBertTokenizer",anchor:"transformers.MobileBertTokenizer",parameters:[{name:"vocab_file",val:""},{name:"do_lower_case",val:" = True"},{name:"do_basic_tokenize",val:" = True"},{name:"never_split",val:" = None"},{name:"unk_token",val:" = '[UNK]'"},{name:"sep_token",val:" = '[SEP]'"},{name:"pad_token",val:" = '[PAD]'"},{name:"cls_token",val:" = '[CLS]'"},{name:"mask_token",val:" = '[MASK]'"},{name:"tokenize_chinese_chars",val:" = True"},{name:"strip_accents",val:" = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.MobileBertTokenizer.vocab_file",description:`<strong>vocab_file</strong> (<code>str</code>) &#x2014;
File containing the vocabulary.`,name:"vocab_file"},{anchor:"transformers.MobileBertTokenizer.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.MobileBertTokenizer.do_basic_tokenize",description:`<strong>do_basic_tokenize</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to do basic tokenization before WordPiece.`,name:"do_basic_tokenize"},{anchor:"transformers.MobileBertTokenizer.never_split",description:`<strong>never_split</strong> (<code>Iterable</code>, <em>optional</em>) &#x2014;
Collection of tokens which will never be split during tokenization. Only has an effect when
<code>do_basic_tokenize=True</code>`,name:"never_split"},{anchor:"transformers.MobileBertTokenizer.unk_token",description:`<strong>unk_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;[UNK]&quot;</code>) &#x2014;
The unknown token. A token that is not in the vocabulary cannot be converted to an ID and is set to be this
token instead.`,name:"unk_token"},{anchor:"transformers.MobileBertTokenizer.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.MobileBertTokenizer.pad_token",description:`<strong>pad_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;[PAD]&quot;</code>) &#x2014;
The token used for padding, for example when batching sequences of different lengths.`,name:"pad_token"},{anchor:"transformers.MobileBertTokenizer.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.MobileBertTokenizer.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.MobileBertTokenizer.tokenize_chinese_chars",description:`<strong>tokenize_chinese_chars</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to tokenize Chinese characters.</p>
<p>This should likely be deactivated for Japanese (see this
<a href="https://github.com/huggingface/transformers/issues/328" rel="nofollow">issue</a>).`,name:"tokenize_chinese_chars"},{anchor:"transformers.MobileBertTokenizer.strip_accents",description:`<strong>strip_accents</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to strip all accents. If this option is not specified, then it will be determined by the
value for <code>lowercase</code> (as in the original MobileBERT).`,name:"strip_accents"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/mobilebert/tokenization_mobilebert.py#L65"}}),Ss=new ne({props:{name:"build_inputs_with_special_tokens",anchor:"transformers.MobileBertTokenizer.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.MobileBertTokenizer.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.MobileBertTokenizer.build_inputs_with_special_tokens.token_ids_1",description:`<strong>token_ids_1</strong> (<code>List[int]</code>, <em>optional</em>) &#x2014;
Optional second list of IDs for sequence pairs.`,name:"token_ids_1"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/mobilebert/tokenization_mobilebert.py#L195",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>
`}}),Ls=new ne({props:{name:"convert_tokens_to_string",anchor:"transformers.MobileBertTokenizer.convert_tokens_to_string",parameters:[{name:"tokens",val:""}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/mobilebert/tokenization_mobilebert.py#L190"}}),Ws=new ne({props:{name:"create_token_type_ids_from_sequences",anchor:"transformers.MobileBertTokenizer.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.MobileBertTokenizer.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.MobileBertTokenizer.create_token_type_ids_from_sequences.token_ids_1",description:`<strong>token_ids_1</strong> (<code>List[int]</code>, <em>optional</em>) &#x2014;
Optional second list of IDs for sequence pairs.`,name:"token_ids_1"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/mobilebert/tokenization_mobilebert.py#L248",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>
`}}),ln=new Ge({props:{anchor:"transformers.MobileBertTokenizer.create_token_type_ids_from_sequences.example",$$slots:{default:[j1]},$$scope:{ctx:q}}}),Rs=new ne({props:{name:"get_special_tokens_mask",anchor:"transformers.MobileBertTokenizer.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.MobileBertTokenizer.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.MobileBertTokenizer.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.MobileBertTokenizer.get_special_tokens_mask.already_has_special_tokens",description:`<strong>already_has_special_tokens</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not the token list is already formatted with special tokens for the model.`,name:"already_has_special_tokens"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/mobilebert/tokenization_mobilebert.py#L220",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>
`}}),Ks=new Xe({}),Hs=new ne({props:{name:"class transformers.MobileBertTokenizerFast",anchor:"transformers.MobileBertTokenizerFast",parameters:[{name:"vocab_file",val:" = None"},{name:"tokenizer_file",val:" = None"},{name:"do_lower_case",val:" = True"},{name:"unk_token",val:" = '[UNK]'"},{name:"sep_token",val:" = '[SEP]'"},{name:"pad_token",val:" = '[PAD]'"},{name:"cls_token",val:" = '[CLS]'"},{name:"mask_token",val:" = '[MASK]'"},{name:"tokenize_chinese_chars",val:" = True"},{name:"strip_accents",val:" = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.MobileBertTokenizerFast.vocab_file",description:`<strong>vocab_file</strong> (<code>str</code>) &#x2014;
File containing the vocabulary.`,name:"vocab_file"},{anchor:"transformers.MobileBertTokenizerFast.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.MobileBertTokenizerFast.unk_token",description:`<strong>unk_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;[UNK]&quot;</code>) &#x2014;
The unknown token. A token that is not in the vocabulary cannot be converted to an ID and is set to be this
token instead.`,name:"unk_token"},{anchor:"transformers.MobileBertTokenizerFast.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.MobileBertTokenizerFast.pad_token",description:`<strong>pad_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;[PAD]&quot;</code>) &#x2014;
The token used for padding, for example when batching sequences of different lengths.`,name:"pad_token"},{anchor:"transformers.MobileBertTokenizerFast.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.MobileBertTokenizerFast.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.MobileBertTokenizerFast.clean_text",description:`<strong>clean_text</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to clean the text before tokenization by removing any control characters and replacing all
whitespaces by the classic one.`,name:"clean_text"},{anchor:"transformers.MobileBertTokenizerFast.tokenize_chinese_chars",description:`<strong>tokenize_chinese_chars</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to tokenize Chinese characters. This should likely be deactivated for Japanese (see <a href="https://github.com/huggingface/transformers/issues/328" rel="nofollow">this
issue</a>).`,name:"tokenize_chinese_chars"},{anchor:"transformers.MobileBertTokenizerFast.strip_accents",description:`<strong>strip_accents</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to strip all accents. If this option is not specified, then it will be determined by the
value for <code>lowercase</code> (as in the original MobileBERT).`,name:"strip_accents"},{anchor:"transformers.MobileBertTokenizerFast.wordpieces_prefix",description:`<strong>wordpieces_prefix</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;##&quot;</code>) &#x2014;
The prefix for subwords.`,name:"wordpieces_prefix"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/mobilebert/tokenization_mobilebert_fast.py#L46"}}),Gs=new ne({props:{name:"build_inputs_with_special_tokens",anchor:"transformers.MobileBertTokenizerFast.build_inputs_with_special_tokens",parameters:[{name:"token_ids_0",val:""},{name:"token_ids_1",val:" = None"}],parametersDescription:[{anchor:"transformers.MobileBertTokenizerFast.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.MobileBertTokenizerFast.build_inputs_with_special_tokens.token_ids_1",description:`<strong>token_ids_1</strong> (<code>List[int]</code>, <em>optional</em>) &#x2014;
Optional second list of IDs for sequence pairs.`,name:"token_ids_1"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/mobilebert/tokenization_mobilebert_fast.py#L134",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>
`}}),Ys=new ne({props:{name:"create_token_type_ids_from_sequences",anchor:"transformers.MobileBertTokenizerFast.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.MobileBertTokenizerFast.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.MobileBertTokenizerFast.create_token_type_ids_from_sequences.token_ids_1",description:`<strong>token_ids_1</strong> (<code>List[int]</code>, <em>optional</em>) &#x2014;
Optional second list of IDs for sequence pairs.`,name:"token_ids_1"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/mobilebert/tokenization_mobilebert_fast.py#L158",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>
`}}),pn=new Ge({props:{anchor:"transformers.MobileBertTokenizerFast.create_token_type_ids_from_sequences.example",$$slots:{default:[C1]},$$scope:{ctx:q}}}),Xs=new Xe({}),Zs=new ne({props:{name:"class transformers.models.mobilebert.modeling_mobilebert.MobileBertForPreTrainingOutput",anchor:"transformers.models.mobilebert.modeling_mobilebert.MobileBertForPreTrainingOutput",parameters:[{name:"loss",val:": typing.Optional[torch.FloatTensor] = None"},{name:"prediction_logits",val:": FloatTensor = None"},{name:"seq_relationship_logits",val:": FloatTensor = None"},{name:"hidden_states",val:": typing.Optional[typing.Tuple[torch.FloatTensor]] = None"},{name:"attentions",val:": typing.Optional[typing.Tuple[torch.FloatTensor]] = None"}],parametersDescription:[{anchor:"transformers.models.mobilebert.modeling_mobilebert.MobileBertForPreTrainingOutput.loss",description:`<strong>loss</strong> (<em>optional</em>, returned when <code>labels</code> is provided, <code>torch.FloatTensor</code> of shape <code>(1,)</code>) &#x2014;
Total loss as the sum of the masked language modeling loss and the next sequence prediction
(classification) loss.`,name:"loss"},{anchor:"transformers.models.mobilebert.modeling_mobilebert.MobileBertForPreTrainingOutput.prediction_logits",description:`<strong>prediction_logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, config.vocab_size)</code>) &#x2014;
Prediction scores of the language modeling head (scores for each vocabulary token before SoftMax).`,name:"prediction_logits"},{anchor:"transformers.models.mobilebert.modeling_mobilebert.MobileBertForPreTrainingOutput.seq_relationship_logits",description:`<strong>seq_relationship_logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, 2)</code>) &#x2014;
Prediction scores of the next sequence prediction (classification) head (scores of True/False continuation
before SoftMax).`,name:"seq_relationship_logits"},{anchor:"transformers.models.mobilebert.modeling_mobilebert.MobileBertForPreTrainingOutput.hidden_states",description:`<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>) &#x2014;
Tuple of <code>torch.FloatTensor</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.`,name:"hidden_states"},{anchor:"transformers.models.mobilebert.modeling_mobilebert.MobileBertForPreTrainingOutput.attentions",description:`<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>) &#x2014;
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.`,name:"attentions"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/mobilebert/modeling_mobilebert.py#L709"}}),tr=new ne({props:{name:"class transformers.models.mobilebert.modeling_tf_mobilebert.TFMobileBertForPreTrainingOutput",anchor:"transformers.models.mobilebert.modeling_tf_mobilebert.TFMobileBertForPreTrainingOutput",parameters:[{name:"loss",val:": typing.Optional[tensorflow.python.framework.ops.Tensor] = None"},{name:"prediction_logits",val:": Tensor = None"},{name:"seq_relationship_logits",val:": Tensor = None"},{name:"hidden_states",val:": typing.Optional[typing.Tuple[tensorflow.python.framework.ops.Tensor]] = None"},{name:"attentions",val:": typing.Optional[typing.Tuple[tensorflow.python.framework.ops.Tensor]] = None"}],parametersDescription:[{anchor:"transformers.models.mobilebert.modeling_tf_mobilebert.TFMobileBertForPreTrainingOutput.prediction_logits",description:`<strong>prediction_logits</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, config.vocab_size)</code>) &#x2014;
Prediction scores of the language modeling head (scores for each vocabulary token before SoftMax).`,name:"prediction_logits"},{anchor:"transformers.models.mobilebert.modeling_tf_mobilebert.TFMobileBertForPreTrainingOutput.seq_relationship_logits",description:`<strong>seq_relationship_logits</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, 2)</code>) &#x2014;
Prediction scores of the next sequence prediction (classification) head (scores of True/False continuation
before SoftMax).`,name:"seq_relationship_logits"},{anchor:"transformers.models.mobilebert.modeling_tf_mobilebert.TFMobileBertForPreTrainingOutput.hidden_states",description:`<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>) &#x2014;
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.`,name:"hidden_states"},{anchor:"transformers.models.mobilebert.modeling_tf_mobilebert.TFMobileBertForPreTrainingOutput.attentions",description:`<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>) &#x2014;
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.`,name:"attentions"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/mobilebert/modeling_tf_mobilebert.py#L835"}}),nr=new Xe({}),sr=new ne({props:{name:"class transformers.MobileBertModel",anchor:"transformers.MobileBertModel",parameters:[{name:"config",val:""},{name:"add_pooling_layer",val:" = True"}],parametersDescription:[{anchor:"transformers.MobileBertModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.27.1/en/model_doc/mobilebert#transformers.MobileBertConfig">MobileBertConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.27.1/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/mobilebert/modeling_mobilebert.py#L812"}}),dr=new ne({props:{name:"forward",anchor:"transformers.MobileBertModel.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"token_type_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"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:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.MobileBertModel.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.27.1/en/model_doc/bert#transformers.BertTokenizer">BertTokenizer</a>. See <a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.MobileBertModel.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.MobileBertModel.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.MobileBertModel.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.MobileBertModel.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.MobileBertModel.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 <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.MobileBertModel.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.MobileBertModel.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.MobileBertModel.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/mobilebert/modeling_mobilebert.py#L842",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.modeling_outputs.BaseModelOutputWithPooling"
>transformers.modeling_outputs.BaseModelOutputWithPooling</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.27.1/en/model_doc/mobilebert#transformers.MobileBertConfig"
>MobileBertConfig</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>
</li>
<li>
<p><strong>pooler_output</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, hidden_size)</code>) \u2014 Last layer hidden-state of the first token of the sequence (classification token) after further processing
through the layers used for the auxiliary pretraining task. E.g. for BERT-family of models, this returns
the classification token after processing through a linear layer and a tanh activation function. The linear
layer weights are trained from the next sentence prediction (classification) objective during pretraining.</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.modeling_outputs.BaseModelOutputWithPooling"
>transformers.modeling_outputs.BaseModelOutputWithPooling</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),un=new Ve({props:{$$slots:{default:[N1]},$$scope:{ctx:q}}}),fn=new Ge({props:{anchor:"transformers.MobileBertModel.forward.example",$$slots:{default:[A1]},$$scope:{ctx:q}}}),cr=new Xe({}),pr=new ne({props:{name:"class transformers.MobileBertForPreTraining",anchor:"transformers.MobileBertForPreTraining",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.MobileBertForPreTraining.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.27.1/en/model_doc/mobilebert#transformers.MobileBertConfig">MobileBertConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.27.1/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/mobilebert/modeling_mobilebert.py#L925"}}),fr=new ne({props:{name:"forward",anchor:"transformers.MobileBertForPreTraining.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"token_type_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"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:"labels",val:": typing.Optional[torch.LongTensor] = None"},{name:"next_sentence_label",val:": typing.Optional[torch.LongTensor] = None"},{name:"output_attentions",val:": typing.Optional[torch.FloatTensor] = None"},{name:"output_hidden_states",val:": typing.Optional[torch.FloatTensor] = None"},{name:"return_dict",val:": typing.Optional[torch.FloatTensor] = None"}],parametersDescription:[{anchor:"transformers.MobileBertForPreTraining.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.27.1/en/model_doc/bert#transformers.BertTokenizer">BertTokenizer</a>. See <a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.MobileBertForPreTraining.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.MobileBertForPreTraining.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.MobileBertForPreTraining.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.MobileBertForPreTraining.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.MobileBertForPreTraining.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 <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.MobileBertForPreTraining.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.MobileBertForPreTraining.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.MobileBertForPreTraining.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.MobileBertForPreTraining.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"},{anchor:"transformers.MobileBertForPreTraining.forward.next_sentence_label",description:`<strong>next_sentence_label</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for computing the next sequence prediction (classification) loss. Input should be a sequence pair
(see <code>input_ids</code> docstring) Indices should be in <code>[0, 1]</code>:</p>
<ul>
<li>0 indicates sequence B is a continuation of sequence A,</li>
<li>1 indicates sequence B is a random sequence.</li>
</ul>`,name:"next_sentence_label"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/mobilebert/modeling_mobilebert.py#L954",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.27.1/en/model_doc/mobilebert#transformers.models.mobilebert.modeling_mobilebert.MobileBertForPreTrainingOutput"
>transformers.models.mobilebert.modeling_mobilebert.MobileBertForPreTrainingOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.27.1/en/model_doc/mobilebert#transformers.MobileBertConfig"
>MobileBertConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<em>optional</em>, returned when <code>labels</code> is provided, <code>torch.FloatTensor</code> of shape <code>(1,)</code>) \u2014 Total loss as the sum of the masked language modeling loss and the next sequence prediction
(classification) loss.</p>
</li>
<li>
<p><strong>prediction_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>seq_relationship_logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, 2)</code>) \u2014 Prediction scores of the next sequence prediction (classification) head (scores of True/False continuation
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 + 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(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.27.1/en/model_doc/mobilebert#transformers.models.mobilebert.modeling_mobilebert.MobileBertForPreTrainingOutput"
>transformers.models.mobilebert.modeling_mobilebert.MobileBertForPreTrainingOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),_n=new Ve({props:{$$slots:{default:[O1]},$$scope:{ctx:q}}}),bn=new Ge({props:{anchor:"transformers.MobileBertForPreTraining.forward.example",$$slots:{default:[D1]},$$scope:{ctx:q}}}),gr=new Xe({}),_r=new ne({props:{name:"class transformers.MobileBertForMaskedLM",anchor:"transformers.MobileBertForMaskedLM",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.MobileBertForMaskedLM.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.27.1/en/model_doc/mobilebert#transformers.MobileBertConfig">MobileBertConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.27.1/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/mobilebert/modeling_mobilebert.py#L1037"}}),yr=new ne({props:{name:"forward",anchor:"transformers.MobileBertForMaskedLM.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"token_type_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"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:"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.MobileBertForMaskedLM.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.27.1/en/model_doc/bert#transformers.BertTokenizer">BertTokenizer</a>. See <a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.MobileBertForMaskedLM.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.MobileBertForMaskedLM.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.MobileBertForMaskedLM.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.MobileBertForMaskedLM.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.MobileBertForMaskedLM.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 <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.MobileBertForMaskedLM.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.MobileBertForMaskedLM.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.MobileBertForMaskedLM.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.MobileBertForMaskedLM.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Labels for computing the masked language modeling loss. Indices should be in <code>[-100, 0, ..., config.vocab_size]</code> (see <code>input_ids</code> docstring) Tokens with indices set to <code>-100</code> are ignored (masked), the
loss is only computed for the tokens with labels in <code>[0, ..., config.vocab_size]</code>`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/mobilebert/modeling_mobilebert.py#L1067",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.modeling_outputs.MaskedLMOutput"
>transformers.modeling_outputs.MaskedLMOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.27.1/en/model_doc/mobilebert#transformers.MobileBertConfig"
>MobileBertConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Masked language modeling (MLM) loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, config.vocab_size)</code>) \u2014 Prediction scores of the language modeling head (scores for each vocabulary token before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.modeling_outputs.MaskedLMOutput"
>transformers.modeling_outputs.MaskedLMOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),vn=new Ve({props:{$$slots:{default:[S1]},$$scope:{ctx:q}}}),Tn=new Ge({props:{anchor:"transformers.MobileBertForMaskedLM.forward.example",$$slots:{default:[I1]},$$scope:{ctx:q}}}),wr=new Xe({}),$r=new ne({props:{name:"class transformers.MobileBertForNextSentencePrediction",anchor:"transformers.MobileBertForNextSentencePrediction",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.MobileBertForNextSentencePrediction.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.27.1/en/model_doc/mobilebert#transformers.MobileBertConfig">MobileBertConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.27.1/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/mobilebert/modeling_mobilebert.py#L1142"}}),xr=new ne({props:{name:"forward",anchor:"transformers.MobileBertForNextSentencePrediction.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"token_type_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"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:"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"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.MobileBertForNextSentencePrediction.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.27.1/en/model_doc/bert#transformers.BertTokenizer">BertTokenizer</a>. See <a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.MobileBertForNextSentencePrediction.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.MobileBertForNextSentencePrediction.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.MobileBertForNextSentencePrediction.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.MobileBertForNextSentencePrediction.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.MobileBertForNextSentencePrediction.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 <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.MobileBertForNextSentencePrediction.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.MobileBertForNextSentencePrediction.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.MobileBertForNextSentencePrediction.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.MobileBertForNextSentencePrediction.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for computing the next sequence prediction (classification) loss. Input should be a sequence pair
(see <code>input_ids</code> docstring) Indices should be in <code>[0, 1]</code>.</p>
<ul>
<li>0 indicates sequence B is a continuation of sequence A,</li>
<li>1 indicates sequence B is a random sequence.</li>
</ul>`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/mobilebert/modeling_mobilebert.py#L1152",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.modeling_outputs.NextSentencePredictorOutput"
>transformers.modeling_outputs.NextSentencePredictorOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.27.1/en/model_doc/mobilebert#transformers.MobileBertConfig"
>MobileBertConfig</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>next_sentence_label</code> is provided) \u2014 Next sequence prediction (classification) loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, 2)</code>) \u2014 Prediction scores of the next sequence prediction (classification) head (scores of True/False continuation
before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.modeling_outputs.NextSentencePredictorOutput"
>transformers.modeling_outputs.NextSentencePredictorOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),wn=new Ve({props:{$$slots:{default:[L1]},$$scope:{ctx:q}}}),$n=new Ge({props:{anchor:"transformers.MobileBertForNextSentencePrediction.forward.example",$$slots:{default:[W1]},$$scope:{ctx:q}}}),zr=new Xe({}),qr=new ne({props:{name:"class transformers.MobileBertForSequenceClassification",anchor:"transformers.MobileBertForSequenceClassification",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.MobileBertForSequenceClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.27.1/en/model_doc/mobilebert#transformers.MobileBertConfig">MobileBertConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.27.1/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/mobilebert/modeling_mobilebert.py#L1246"}}),Nr=new ne({props:{name:"forward",anchor:"transformers.MobileBertForSequenceClassification.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"token_type_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"position_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.Tensor] = None"},{name:"labels",val:": typing.Optional[torch.Tensor] = 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.MobileBertForSequenceClassification.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.27.1/en/model_doc/bert#transformers.BertTokenizer">BertTokenizer</a>. See <a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.MobileBertForSequenceClassification.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.MobileBertForSequenceClassification.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.MobileBertForSequenceClassification.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.MobileBertForSequenceClassification.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.MobileBertForSequenceClassification.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 <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.MobileBertForSequenceClassification.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.MobileBertForSequenceClassification.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.MobileBertForSequenceClassification.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.MobileBertForSequenceClassification.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for computing the sequence classification/regression loss. Indices should be in <code>[0, ..., config.num_labels - 1]</code>. If <code>config.num_labels == 1</code> a regression loss is computed (Mean-Square loss), If
<code>config.num_labels &gt; 1</code> a classification loss is computed (Cross-Entropy).`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/mobilebert/modeling_mobilebert.py#L1262",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.modeling_outputs.SequenceClassifierOutput"
>transformers.modeling_outputs.SequenceClassifierOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.27.1/en/model_doc/mobilebert#transformers.MobileBertConfig"
>MobileBertConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Classification (or regression if config.num_labels==1) loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, config.num_labels)</code>) \u2014 Classification (or regression if config.num_labels==1) scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.modeling_outputs.SequenceClassifierOutput"
>transformers.modeling_outputs.SequenceClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Fn=new Ve({props:{$$slots:{default:[R1]},$$scope:{ctx:q}}}),En=new Ge({props:{anchor:"transformers.MobileBertForSequenceClassification.forward.example",$$slots:{default:[U1]},$$scope:{ctx:q}}}),Bn=new Ge({props:{anchor:"transformers.MobileBertForSequenceClassification.forward.example-2",$$slots:{default:[K1]},$$scope:{ctx:q}}}),Ar=new Xe({}),Or=new ne({props:{name:"class transformers.MobileBertForMultipleChoice",anchor:"transformers.MobileBertForMultipleChoice",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.MobileBertForMultipleChoice.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.27.1/en/model_doc/mobilebert#transformers.MobileBertConfig">MobileBertConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.27.1/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/mobilebert/modeling_mobilebert.py#L1456"}}),Lr=new ne({props:{name:"forward",anchor:"transformers.MobileBertForMultipleChoice.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"token_type_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"position_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.Tensor] = None"},{name:"labels",val:": typing.Optional[torch.Tensor] = 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.MobileBertForMultipleChoice.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, num_choices, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.27.1/en/model_doc/bert#transformers.BertTokenizer">BertTokenizer</a>. See <a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.MobileBertForMultipleChoice.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.MobileBertForMultipleChoice.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.MobileBertForMultipleChoice.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.MobileBertForMultipleChoice.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.MobileBertForMultipleChoice.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 <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.MobileBertForMultipleChoice.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.MobileBertForMultipleChoice.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.MobileBertForMultipleChoice.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.MobileBertForMultipleChoice.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for computing the multiple choice classification loss. Indices should be in <code>[0, ..., num_choices-1]</code> where <code>num_choices</code> is the size of the second dimension of the input tensors. (See
<code>input_ids</code> above)`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/mobilebert/modeling_mobilebert.py#L1470",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.modeling_outputs.MultipleChoiceModelOutput"
>transformers.modeling_outputs.MultipleChoiceModelOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.27.1/en/model_doc/mobilebert#transformers.MobileBertConfig"
>MobileBertConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <em>(1,)</em>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Classification loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_choices)</code>) \u2014 <em>num_choices</em> is the second dimension of the input tensors. (see <em>input_ids</em> above).</p>
<p>Classification scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.modeling_outputs.MultipleChoiceModelOutput"
>transformers.modeling_outputs.MultipleChoiceModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),zn=new Ve({props:{$$slots:{default:[H1]},$$scope:{ctx:q}}}),qn=new Ge({props:{anchor:"transformers.MobileBertForMultipleChoice.forward.example",$$slots:{default:[Q1]},$$scope:{ctx:q}}}),Wr=new Xe({}),Rr=new ne({props:{name:"class transformers.MobileBertForTokenClassification",anchor:"transformers.MobileBertForTokenClassification",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.MobileBertForTokenClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.27.1/en/model_doc/mobilebert#transformers.MobileBertConfig">MobileBertConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.27.1/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/mobilebert/modeling_mobilebert.py#L1553"}}),Qr=new ne({props:{name:"forward",anchor:"transformers.MobileBertForTokenClassification.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"token_type_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"position_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.Tensor] = None"},{name:"labels",val:": typing.Optional[torch.Tensor] = 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.MobileBertForTokenClassification.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.27.1/en/model_doc/bert#transformers.BertTokenizer">BertTokenizer</a>. See <a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.MobileBertForTokenClassification.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.MobileBertForTokenClassification.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.MobileBertForTokenClassification.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.MobileBertForTokenClassification.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.MobileBertForTokenClassification.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 <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.MobileBertForTokenClassification.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.MobileBertForTokenClassification.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.MobileBertForTokenClassification.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.MobileBertForTokenClassification.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Labels for computing the token classification loss. Indices should be in <code>[0, ..., config.num_labels - 1]</code>.`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/mobilebert/modeling_mobilebert.py#L1570",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.modeling_outputs.TokenClassifierOutput"
>transformers.modeling_outputs.TokenClassifierOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.27.1/en/model_doc/mobilebert#transformers.MobileBertConfig"
>MobileBertConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided)  \u2014 Classification loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, config.num_labels)</code>) \u2014 Classification scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.modeling_outputs.TokenClassifierOutput"
>transformers.modeling_outputs.TokenClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),jn=new Ve({props:{$$slots:{default:[V1]},$$scope:{ctx:q}}}),Cn=new Ge({props:{anchor:"transformers.MobileBertForTokenClassification.forward.example",$$slots:{default:[G1]},$$scope:{ctx:q}}}),Vr=new Xe({}),Gr=new ne({props:{name:"class transformers.MobileBertForQuestionAnswering",anchor:"transformers.MobileBertForQuestionAnswering",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.MobileBertForQuestionAnswering.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.27.1/en/model_doc/mobilebert#transformers.MobileBertConfig">MobileBertConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.27.1/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/mobilebert/modeling_mobilebert.py#L1350"}}),Zr=new ne({props:{name:"forward",anchor:"transformers.MobileBertForQuestionAnswering.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"token_type_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"position_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.Tensor] = None"},{name:"start_positions",val:": typing.Optional[torch.Tensor] = None"},{name:"end_positions",val:": typing.Optional[torch.Tensor] = 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.MobileBertForQuestionAnswering.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.27.1/en/model_doc/bert#transformers.BertTokenizer">BertTokenizer</a>. See <a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.MobileBertForQuestionAnswering.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.MobileBertForQuestionAnswering.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.MobileBertForQuestionAnswering.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.MobileBertForQuestionAnswering.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.MobileBertForQuestionAnswering.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 <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.MobileBertForQuestionAnswering.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.MobileBertForQuestionAnswering.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.MobileBertForQuestionAnswering.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.MobileBertForQuestionAnswering.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.MobileBertForQuestionAnswering.forward.end_positions",description:`<strong>end_positions</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for position (index) of the end of the labelled span for computing the token classification loss.
Positions are clamped to the length of the sequence (<code>sequence_length</code>). Position outside of the sequence
are not taken into account for computing the loss.`,name:"end_positions"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/mobilebert/modeling_mobilebert.py#L1363",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.modeling_outputs.QuestionAnsweringModelOutput"
>transformers.modeling_outputs.QuestionAnsweringModelOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.27.1/en/model_doc/mobilebert#transformers.MobileBertConfig"
>MobileBertConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Total span extraction loss is the sum of a Cross-Entropy for the start and end positions.</p>
</li>
<li>
<p><strong>start_logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>) \u2014 Span-start scores (before SoftMax).</p>
</li>
<li>
<p><strong>end_logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>) \u2014 Span-end scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.modeling_outputs.QuestionAnsweringModelOutput"
>transformers.modeling_outputs.QuestionAnsweringModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),An=new Ve({props:{$$slots:{default:[J1]},$$scope:{ctx:q}}}),On=new Ge({props:{anchor:"transformers.MobileBertForQuestionAnswering.forward.example",$$slots:{default:[Y1]},$$scope:{ctx:q}}}),ea=new Xe({}),ta=new ne({props:{name:"class transformers.TFMobileBertModel",anchor:"transformers.TFMobileBertModel",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFMobileBertModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.27.1/en/model_doc/mobilebert#transformers.MobileBertConfig">MobileBertConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.27.1/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/mobilebert/modeling_tf_mobilebert.py#L967"}}),Sn=new Ve({props:{$$slots:{default:[X1]},$$scope:{ctx:q}}}),ra=new ne({props:{name:"call",anchor:"transformers.TFMobileBertModel.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:"training",val:": typing.Optional[bool] = False"}],parametersDescription:[{anchor:"transformers.TFMobileBertModel.call.input_ids",description:`<strong>input_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.27.1/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.TFMobileBertModel.call.attention_mask",description:`<strong>attention_mask</strong> (<code>Numpy array</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.TFMobileBertModel.call.token_type_ids",description:`<strong>token_type_ids</strong> (<code>Numpy array</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.TFMobileBertModel.call.position_ids",description:`<strong>position_ids</strong> (<code>Numpy array</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.TFMobileBertModel.call.head_mask",description:`<strong>head_mask</strong> (<code>Numpy array</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.TFMobileBertModel.call.inputs_embeds",description:`<strong>inputs_embeds</strong> (<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.TFMobileBertModel.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.TFMobileBertModel.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.TFMobileBertModel.call.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.TFMobileBertModel.call.training",description:`<strong>training</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to use the model in training mode (some modules like dropout modules have different
behaviors between training and evaluation).`,name:"training"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/mobilebert/modeling_tf_mobilebert.py#L972",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.modeling_tf_outputs.TFBaseModelOutputWithPooling"
>transformers.modeling_tf_outputs.TFBaseModelOutputWithPooling</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/v4.27.1/en/model_doc/mobilebert#transformers.MobileBertConfig"
>MobileBertConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>last_hidden_state</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>) \u2014 Sequence of hidden-states at the output of the last layer of the model.</p>
</li>
<li>
<p><strong>pooler_output</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, hidden_size)</code>) \u2014 Last layer hidden-state of the first token of the sequence (classification token) further processed by a
Linear layer and a Tanh activation function. The Linear layer weights are trained from the next sentence
prediction (classification) objective during pretraining.</p>
<p>This output is usually <em>not</em> a good summary of the semantic content of the input, you\u2019re often better with
averaging or pooling the sequence of hidden-states for the whole input sequence.</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.modeling_tf_outputs.TFBaseModelOutputWithPooling"
>transformers.modeling_tf_outputs.TFBaseModelOutputWithPooling</a> or <code>tuple(tf.Tensor)</code></p>
`}}),In=new Ve({props:{$$slots:{default:[Z1]},$$scope:{ctx:q}}}),Ln=new Ge({props:{anchor:"transformers.TFMobileBertModel.call.example",$$slots:{default:[e2]},$$scope:{ctx:q}}}),aa=new Xe({}),ia=new ne({props:{name:"class transformers.TFMobileBertForPreTraining",anchor:"transformers.TFMobileBertForPreTraining",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFMobileBertForPreTraining.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.27.1/en/model_doc/mobilebert#transformers.MobileBertConfig">MobileBertConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.27.1/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/mobilebert/modeling_tf_mobilebert.py#L1026"}}),Rn=new Ve({props:{$$slots:{default:[t2]},$$scope:{ctx:q}}}),pa=new ne({props:{name:"call",anchor:"transformers.TFMobileBertForPreTraining.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:"next_sentence_label",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"training",val:": typing.Optional[bool] = False"}],parametersDescription:[{anchor:"transformers.TFMobileBertForPreTraining.call.input_ids",description:`<strong>input_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.27.1/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.TFMobileBertForPreTraining.call.attention_mask",description:`<strong>attention_mask</strong> (<code>Numpy array</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.TFMobileBertForPreTraining.call.token_type_ids",description:`<strong>token_type_ids</strong> (<code>Numpy array</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.TFMobileBertForPreTraining.call.position_ids",description:`<strong>position_ids</strong> (<code>Numpy array</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.TFMobileBertForPreTraining.call.head_mask",description:`<strong>head_mask</strong> (<code>Numpy array</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.TFMobileBertForPreTraining.call.inputs_embeds",description:`<strong>inputs_embeds</strong> (<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.TFMobileBertForPreTraining.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.TFMobileBertForPreTraining.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.TFMobileBertForPreTraining.call.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.TFMobileBertForPreTraining.call.training",description:`<strong>training</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to use the model in training mode (some modules like dropout modules have different
behaviors between training and evaluation).`,name:"training"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/mobilebert/modeling_tf_mobilebert.py#L1040",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.27.1/en/model_doc/mobilebert#transformers.models.mobilebert.modeling_tf_mobilebert.TFMobileBertForPreTrainingOutput"
>transformers.models.mobilebert.modeling_tf_mobilebert.TFMobileBertForPreTrainingOutput</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/v4.27.1/en/model_doc/mobilebert#transformers.MobileBertConfig"
>MobileBertConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>prediction_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>seq_relationship_logits</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, 2)</code>) \u2014 Prediction scores of the next sequence prediction (classification) head (scores of True/False continuation
before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.27.1/en/model_doc/mobilebert#transformers.models.mobilebert.modeling_tf_mobilebert.TFMobileBertForPreTrainingOutput"
>transformers.models.mobilebert.modeling_tf_mobilebert.TFMobileBertForPreTrainingOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),Un=new Ve({props:{$$slots:{default:[o2]},$$scope:{ctx:q}}}),Kn=new Ge({props:{anchor:"transformers.TFMobileBertForPreTraining.call.example",$$slots:{default:[n2]},$$scope:{ctx:q}}}),ha=new Xe({}),ma=new ne({props:{name:"class transformers.TFMobileBertForMaskedLM",anchor:"transformers.TFMobileBertForMaskedLM",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFMobileBertForMaskedLM.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.27.1/en/model_doc/mobilebert#transformers.MobileBertConfig">MobileBertConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.27.1/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/mobilebert/modeling_tf_mobilebert.py#L1121"}}),Qn=new Ve({props:{$$slots:{default:[s2]},$$scope:{ctx:q}}}),ba=new ne({props:{name:"call",anchor:"transformers.TFMobileBertForMaskedLM.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.TFMobileBertForMaskedLM.call.input_ids",description:`<strong>input_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.27.1/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.TFMobileBertForMaskedLM.call.attention_mask",description:`<strong>attention_mask</strong> (<code>Numpy array</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.TFMobileBertForMaskedLM.call.token_type_ids",description:`<strong>token_type_ids</strong> (<code>Numpy array</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.TFMobileBertForMaskedLM.call.position_ids",description:`<strong>position_ids</strong> (<code>Numpy array</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.TFMobileBertForMaskedLM.call.head_mask",description:`<strong>head_mask</strong> (<code>Numpy array</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.TFMobileBertForMaskedLM.call.inputs_embeds",description:`<strong>inputs_embeds</strong> (<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.TFMobileBertForMaskedLM.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.TFMobileBertForMaskedLM.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.TFMobileBertForMaskedLM.call.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.TFMobileBertForMaskedLM.call.training",description:`<strong>training</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#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.TFMobileBertForMaskedLM.call.labels",description:`<strong>labels</strong> (<code>tf.Tensor</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`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/mobilebert/modeling_tf_mobilebert.py#L1142",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.modeling_tf_outputs.TFMaskedLMOutput"
>transformers.modeling_tf_outputs.TFMaskedLMOutput</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/v4.27.1/en/model_doc/mobilebert#transformers.MobileBertConfig"
>MobileBertConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>tf.Tensor</code> of shape <code>(n,)</code>, <em>optional</em>, where n is the number of non-masked labels, returned when <code>labels</code> is provided) \u2014 Masked language modeling (MLM) loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, config.vocab_size)</code>) \u2014 Prediction scores of the language modeling head (scores for each vocabulary token before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.modeling_tf_outputs.TFMaskedLMOutput"
>transformers.modeling_tf_outputs.TFMaskedLMOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),Vn=new Ve({props:{$$slots:{default:[r2]},$$scope:{ctx:q}}}),Gn=new Ge({props:{anchor:"transformers.TFMobileBertForMaskedLM.call.example",$$slots:{default:[a2]},$$scope:{ctx:q}}}),Jn=new Ge({props:{anchor:"transformers.TFMobileBertForMaskedLM.call.example-2",$$slots:{default:[i2]},$$scope:{ctx:q}}}),ka=new Xe({}),va=new ne({props:{name:"class transformers.TFMobileBertForNextSentencePrediction",anchor:"transformers.TFMobileBertForNextSentencePrediction",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFMobileBertForNextSentencePrediction.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.27.1/en/model_doc/mobilebert#transformers.MobileBertConfig">MobileBertConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.27.1/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/mobilebert/modeling_tf_mobilebert.py#L1221"}}),Xn=new Ve({props:{$$slots:{default:[l2]},$$scope:{ctx:q}}}),Ma=new ne({props:{name:"call",anchor:"transformers.TFMobileBertForNextSentencePrediction.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:"next_sentence_label",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"training",val:": typing.Optional[bool] = False"}],parametersDescription:[{anchor:"transformers.TFMobileBertForNextSentencePrediction.call.input_ids",description:`<strong>input_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.27.1/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.TFMobileBertForNextSentencePrediction.call.attention_mask",description:`<strong>attention_mask</strong> (<code>Numpy array</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.TFMobileBertForNextSentencePrediction.call.token_type_ids",description:`<strong>token_type_ids</strong> (<code>Numpy array</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.TFMobileBertForNextSentencePrediction.call.position_ids",description:`<strong>position_ids</strong> (<code>Numpy array</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.TFMobileBertForNextSentencePrediction.call.head_mask",description:`<strong>head_mask</strong> (<code>Numpy array</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.TFMobileBertForNextSentencePrediction.call.inputs_embeds",description:`<strong>inputs_embeds</strong> (<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.TFMobileBertForNextSentencePrediction.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.TFMobileBertForNextSentencePrediction.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.TFMobileBertForNextSentencePrediction.call.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.TFMobileBertForNextSentencePrediction.call.training",description:`<strong>training</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to use the model in training mode (some modules like dropout modules have different
behaviors between training and evaluation).`,name:"training"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/mobilebert/modeling_tf_mobilebert.py#L1231",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.modeling_tf_outputs.TFNextSentencePredictorOutput"
>transformers.modeling_tf_outputs.TFNextSentencePredictorOutput</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/v4.27.1/en/model_doc/mobilebert#transformers.MobileBertConfig"
>MobileBertConfig</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>next_sentence_label</code> is provided) \u2014 Next sentence prediction loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, 2)</code>) \u2014 Prediction scores of the next sequence prediction (classification) head (scores of True/False continuation
before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.modeling_tf_outputs.TFNextSentencePredictorOutput"
>transformers.modeling_tf_outputs.TFNextSentencePredictorOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),Zn=new Ve({props:{$$slots:{default:[d2]},$$scope:{ctx:q}}}),es=new Ge({props:{anchor:"transformers.TFMobileBertForNextSentencePrediction.call.example",$$slots:{default:[c2]},$$scope:{ctx:q}}}),Fa=new Xe({}),Ea=new ne({props:{name:"class transformers.TFMobileBertForSequenceClassification",anchor:"transformers.TFMobileBertForSequenceClassification",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFMobileBertForSequenceClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.27.1/en/model_doc/mobilebert#transformers.MobileBertConfig">MobileBertConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.27.1/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/mobilebert/modeling_tf_mobilebert.py#L1313"}}),os=new Ve({props:{$$slots:{default:[p2]},$$scope:{ctx:q}}}),qa=new ne({props:{name:"call",anchor:"transformers.TFMobileBertForSequenceClassification.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.TFMobileBertForSequenceClassification.call.input_ids",description:`<strong>input_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.27.1/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.TFMobileBertForSequenceClassification.call.attention_mask",description:`<strong>attention_mask</strong> (<code>Numpy array</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.TFMobileBertForSequenceClassification.call.token_type_ids",description:`<strong>token_type_ids</strong> (<code>Numpy array</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.TFMobileBertForSequenceClassification.call.position_ids",description:`<strong>position_ids</strong> (<code>Numpy array</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.TFMobileBertForSequenceClassification.call.head_mask",description:`<strong>head_mask</strong> (<code>Numpy array</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.TFMobileBertForSequenceClassification.call.inputs_embeds",description:`<strong>inputs_embeds</strong> (<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.TFMobileBertForSequenceClassification.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.TFMobileBertForSequenceClassification.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.TFMobileBertForSequenceClassification.call.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.TFMobileBertForSequenceClassification.call.training",description:`<strong>training</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#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.TFMobileBertForSequenceClassification.call.labels",description:`<strong>labels</strong> (<code>tf.Tensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for computing the sequence classification/regression loss. Indices should be in <code>[0, ..., config.num_labels - 1]</code>. If <code>config.num_labels == 1</code> a regression loss is computed (Mean-Square loss), If
<code>config.num_labels &gt; 1</code> a classification loss is computed (Cross-Entropy).`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/mobilebert/modeling_tf_mobilebert.py#L1336",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.modeling_tf_outputs.TFSequenceClassifierOutput"
>transformers.modeling_tf_outputs.TFSequenceClassifierOutput</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/v4.27.1/en/model_doc/mobilebert#transformers.MobileBertConfig"
>MobileBertConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, )</code>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Classification (or regression if config.num_labels==1) loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, config.num_labels)</code>) \u2014 Classification (or regression if config.num_labels==1) scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.modeling_tf_outputs.TFSequenceClassifierOutput"
>transformers.modeling_tf_outputs.TFSequenceClassifierOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),ns=new Ve({props:{$$slots:{default:[h2]},$$scope:{ctx:q}}}),ss=new Ge({props:{anchor:"transformers.TFMobileBertForSequenceClassification.call.example",$$slots:{default:[m2]},$$scope:{ctx:q}}}),rs=new Ge({props:{anchor:"transformers.TFMobileBertForSequenceClassification.call.example-2",$$slots:{default:[u2]},$$scope:{ctx:q}}}),Pa=new Xe({}),ja=new ne({props:{name:"class transformers.TFMobileBertForMultipleChoice",anchor:"transformers.TFMobileBertForMultipleChoice",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFMobileBertForMultipleChoice.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.27.1/en/model_doc/mobilebert#transformers.MobileBertConfig">MobileBertConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.27.1/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/mobilebert/modeling_tf_mobilebert.py#L1518"}}),is=new Ve({props:{$$slots:{default:[f2]},$$scope:{ctx:q}}}),Oa=new ne({props:{name:"call",anchor:"transformers.TFMobileBertForMultipleChoice.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.TFMobileBertForMultipleChoice.call.input_ids",description:`<strong>input_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, num_choices, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.27.1/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.TFMobileBertForMultipleChoice.call.attention_mask",description:`<strong>attention_mask</strong> (<code>Numpy array</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.TFMobileBertForMultipleChoice.call.token_type_ids",description:`<strong>token_type_ids</strong> (<code>Numpy array</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.TFMobileBertForMultipleChoice.call.position_ids",description:`<strong>position_ids</strong> (<code>Numpy array</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.TFMobileBertForMultipleChoice.call.head_mask",description:`<strong>head_mask</strong> (<code>Numpy array</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.TFMobileBertForMultipleChoice.call.inputs_embeds",description:`<strong>inputs_embeds</strong> (<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.TFMobileBertForMultipleChoice.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.TFMobileBertForMultipleChoice.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.TFMobileBertForMultipleChoice.call.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.TFMobileBertForMultipleChoice.call.training",description:`<strong>training</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#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.TFMobileBertForMultipleChoice.call.labels",description:`<strong>labels</strong> (<code>tf.Tensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for computing the multiple choice classification loss. Indices should be in <code>[0, ..., num_choices]</code>
where <code>num_choices</code> is the size of the second dimension of the input tensors. (See <code>input_ids</code> above)`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/mobilebert/modeling_tf_mobilebert.py#L1547",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.modeling_tf_outputs.TFMultipleChoiceModelOutput"
>transformers.modeling_tf_outputs.TFMultipleChoiceModelOutput</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/v4.27.1/en/model_doc/mobilebert#transformers.MobileBertConfig"
>MobileBertConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>tf.Tensor</code> of shape <em>(batch_size, )</em>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Classification loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, num_choices)</code>) \u2014 <em>num_choices</em> is the second dimension of the input tensors. (see <em>input_ids</em> above).</p>
<p>Classification scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.modeling_tf_outputs.TFMultipleChoiceModelOutput"
>transformers.modeling_tf_outputs.TFMultipleChoiceModelOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),ls=new Ve({props:{$$slots:{default:[g2]},$$scope:{ctx:q}}}),ds=new Ge({props:{anchor:"transformers.TFMobileBertForMultipleChoice.call.example",$$slots:{default:[_2]},$$scope:{ctx:q}}}),Da=new Xe({}),Sa=new ne({props:{name:"class transformers.TFMobileBertForTokenClassification",anchor:"transformers.TFMobileBertForTokenClassification",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFMobileBertForTokenClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.27.1/en/model_doc/mobilebert#transformers.MobileBertConfig">MobileBertConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.27.1/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/mobilebert/modeling_tf_mobilebert.py#L1651"}}),ps=new Ve({props:{$$slots:{default:[b2]},$$scope:{ctx:q}}}),Ra=new ne({props:{name:"call",anchor:"transformers.TFMobileBertForTokenClassification.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.TFMobileBertForTokenClassification.call.input_ids",description:`<strong>input_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.27.1/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.TFMobileBertForTokenClassification.call.attention_mask",description:`<strong>attention_mask</strong> (<code>Numpy array</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.TFMobileBertForTokenClassification.call.token_type_ids",description:`<strong>token_type_ids</strong> (<code>Numpy array</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.TFMobileBertForTokenClassification.call.position_ids",description:`<strong>position_ids</strong> (<code>Numpy array</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.TFMobileBertForTokenClassification.call.head_mask",description:`<strong>head_mask</strong> (<code>Numpy array</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.TFMobileBertForTokenClassification.call.inputs_embeds",description:`<strong>inputs_embeds</strong> (<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.TFMobileBertForTokenClassification.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.TFMobileBertForTokenClassification.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.TFMobileBertForTokenClassification.call.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.TFMobileBertForTokenClassification.call.training",description:`<strong>training</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#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.TFMobileBertForTokenClassification.call.labels",description:`<strong>labels</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Labels for computing the token classification loss. Indices should be in <code>[0, ..., config.num_labels - 1]</code>.`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/mobilebert/modeling_tf_mobilebert.py#L1675",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.modeling_tf_outputs.TFTokenClassifierOutput"
>transformers.modeling_tf_outputs.TFTokenClassifierOutput</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/v4.27.1/en/model_doc/mobilebert#transformers.MobileBertConfig"
>MobileBertConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>tf.Tensor</code> of shape <code>(n,)</code>, <em>optional</em>, where n is the number of unmasked labels, returned when <code>labels</code> is provided)  \u2014 Classification loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, config.num_labels)</code>) \u2014 Classification scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.modeling_tf_outputs.TFTokenClassifierOutput"
>transformers.modeling_tf_outputs.TFTokenClassifierOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),hs=new Ve({props:{$$slots:{default:[k2]},$$scope:{ctx:q}}}),ms=new Ge({props:{anchor:"transformers.TFMobileBertForTokenClassification.call.example",$$slots:{default:[v2]},$$scope:{ctx:q}}}),us=new Ge({props:{anchor:"transformers.TFMobileBertForTokenClassification.call.example-2",$$slots:{default:[T2]},$$scope:{ctx:q}}}),Ua=new Xe({}),Ka=new ne({props:{name:"class transformers.TFMobileBertForQuestionAnswering",anchor:"transformers.TFMobileBertForQuestionAnswering",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFMobileBertForQuestionAnswering.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.27.1/en/model_doc/mobilebert#transformers.MobileBertConfig">MobileBertConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.27.1/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/mobilebert/modeling_tf_mobilebert.py#L1410"}}),gs=new Ve({props:{$$slots:{default:[y2]},$$scope:{ctx:q}}}),Ga=new ne({props:{name:"call",anchor:"transformers.TFMobileBertForQuestionAnswering.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.TFMobileBertForQuestionAnswering.call.input_ids",description:`<strong>input_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.27.1/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.TFMobileBertForQuestionAnswering.call.attention_mask",description:`<strong>attention_mask</strong> (<code>Numpy array</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.TFMobileBertForQuestionAnswering.call.token_type_ids",description:`<strong>token_type_ids</strong> (<code>Numpy array</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.TFMobileBertForQuestionAnswering.call.position_ids",description:`<strong>position_ids</strong> (<code>Numpy array</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.TFMobileBertForQuestionAnswering.call.head_mask",description:`<strong>head_mask</strong> (<code>Numpy array</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.TFMobileBertForQuestionAnswering.call.inputs_embeds",description:`<strong>inputs_embeds</strong> (<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.TFMobileBertForQuestionAnswering.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.TFMobileBertForQuestionAnswering.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.TFMobileBertForQuestionAnswering.call.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.TFMobileBertForQuestionAnswering.call.training",description:`<strong>training</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#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.TFMobileBertForQuestionAnswering.call.start_positions",description:`<strong>start_positions</strong> (<code>tf.Tensor</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.TFMobileBertForQuestionAnswering.call.end_positions",description:`<strong>end_positions</strong> (<code>tf.Tensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for position (index) of the end of the labelled span for computing the token classification loss.
Positions are clamped to the length of the sequence (<code>sequence_length</code>). Position outside of the sequence
are not taken into account for computing the loss.`,name:"end_positions"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/mobilebert/modeling_tf_mobilebert.py#L1429",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.modeling_tf_outputs.TFQuestionAnsweringModelOutput"
>transformers.modeling_tf_outputs.TFQuestionAnsweringModelOutput</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/v4.27.1/en/model_doc/mobilebert#transformers.MobileBertConfig"
>MobileBertConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, )</code>, <em>optional</em>, returned when <code>start_positions</code> and <code>end_positions</code> are provided) \u2014 Total span extraction loss is the sum of a Cross-Entropy for the start and end positions.</p>
</li>
<li>
<p><strong>start_logits</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>) \u2014 Span-start scores (before SoftMax).</p>
</li>
<li>
<p><strong>end_logits</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>) \u2014 Span-end scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.modeling_tf_outputs.TFQuestionAnsweringModelOutput"
>transformers.modeling_tf_outputs.TFQuestionAnsweringModelOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),_s=new Ve({props:{$$slots:{default:[w2]},$$scope:{ctx:q}}}),bs=new Ge({props:{anchor:"transformers.TFMobileBertForQuestionAnswering.call.example",$$slots:{default:[$2]},$$scope:{ctx:q}}}),ks=new Ge({props:{anchor:"transformers.TFMobileBertForQuestionAnswering.call.example-2",$$slots:{default:[M2]},$$scope:{ctx:q}}}),{c(){d=r("meta"),v=p(),m=r("h1"),u=r("a"),k=r("span"),y(l.$$.fragment),c=p(),z=r("span"),ve=o("MobileBERT"),me=p(),S=r("h2"),re=r("a"),Z=r("span"),y(T.$$.fragment),Te=p(),K=r("span"),ye=o("Overview"),ue=p(),L=r("p"),we=o("The MobileBERT model was proposed in "),ie=r("a"),Q=o("MobileBERT: a Compact Task-Agnostic BERT for Resource-Limited Devices"),$e=o(` by Zhiqing Sun, Hongkun Yu, Xiaodan Song, Renjie Liu, Yiming Yang, and Denny
Zhou. It\u2019s a bidirectional transformer based on the BERT model, which is compressed and accelerated using several
approaches.`),fe=p(),R=r("p"),Me=o("The abstract from the paper is the following:"),ge=p(),U=r("p"),ce=r("em"),Fe=o(`Natural Language Processing (NLP) has recently achieved great success by using huge pre-trained models with hundreds
of millions of parameters. However, these models suffer from heavy model sizes and high latency such that they cannot
be deployed to resource-limited mobile devices. In this paper, we propose MobileBERT for compressing and accelerating
the popular BERT model. Like the original BERT, MobileBERT is task-agnostic, that is, it can be generically applied to
various downstream NLP tasks via simple fine-tuning. Basically, MobileBERT is a thin version of BERT_LARGE, while
equipped with bottleneck structures and a carefully designed balance between self-attentions and feed-forward networks.
To train MobileBERT, we first train a specially designed teacher model, an inverted-bottleneck incorporated BERT_LARGE
model. Then, we conduct knowledge transfer from this teacher to MobileBERT. Empirical studies show that MobileBERT is
4.3x smaller and 5.5x faster than BERT_BASE while achieving competitive results on well-known benchmarks. On the
natural language inference tasks of GLUE, MobileBERT achieves a GLUEscore o 77.7 (0.6 lower than BERT_BASE), and 62 ms
latency on a Pixel 4 phone. On the SQuAD v1.1/v2.0 question answering task, MobileBERT achieves a dev F1 score of
90.0/79.2 (1.5/2.1 higher than BERT_BASE).`),te=p(),P=r("p"),N=o("Tips:"),_e=p(),W=r("ul"),pe=r("li"),Ee=o(`MobileBERT is a model with absolute position embeddings so it\u2019s usually advised to pad the inputs on the right rather
than the left.`),V=p(),he=r("li"),Be=o(`MobileBERT is similar to BERT and therefore relies on the masked language modeling (MLM) objective. It is therefore
efficient at predicting masked tokens and at NLU in general, but is not optimal for text generation. Models trained
with a causal language modeling (CLM) objective are better in that regard.`),C=p(),se=r("p"),G=o("This model was contributed by "),le=r("a"),xe=o("vshampor"),J=o(". The original code can be found "),de=r("a"),ze=o("here"),O=o("."),be=p(),I=r("h2"),ae=r("a"),ee=r("span"),y(j.$$.fragment),qe=p(),A=r("span"),Pe=o("Documentation resources"),ke=p(),f=r("ul"),B=r("li"),Ne=r("a"),oe=o("Text classification task guide"),Re=p(),Se=r("li"),x=r("a"),Ue=o("Token classification task guide"),Ke=p(),Ie=r("li"),Ae=r("a"),He=o("Question answering task guide"),D=p(),H=r("li"),Oe=r("a"),Qe=o("Masked language modeling task guide"),Y=p(),Le=r("li"),De=r("a"),je=o("Multiple choice task guide"),We=p(),X=r("h2"),Ce=r("a"),gl=r("span"),y(js.$$.fragment),Sh=p(),_l=r("span"),Ih=o("MobileBertConfig"),Sc=p(),dt=r("div"),y(Cs.$$.fragment),Lh=p(),Vt=r("p"),Wh=o("This is the configuration class to store the configuration of a "),oi=r("a"),Rh=o("MobileBertModel"),Uh=o(" or a "),ni=r("a"),Kh=o("TFMobileBertModel"),Hh=o(`. It
is used to instantiate a MobileBERT 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 MobileBERT
`),Ns=r("a"),Qh=o("google/mobilebert-uncased"),Vh=o(" architecture."),Gh=p(),ho=r("p"),Jh=o("Configuration objects inherit from "),si=r("a"),Yh=o("PretrainedConfig"),Xh=o(` and can be used to control the model outputs. Read the
documentation from `),ri=r("a"),Zh=o("PretrainedConfig"),em=o(" for more information."),tm=p(),y(sn.$$.fragment),om=p(),bl=r("p"),nm=o(`Attributes: pretrained_config_archive_map (Dict[str, str]): A dictionary containing all the available pre-trained
checkpoints.`),Ic=p(),mo=r("h2"),rn=r("a"),kl=r("span"),y(As.$$.fragment),sm=p(),vl=r("span"),rm=o("MobileBertTokenizer"),Lc=p(),Ze=r("div"),y(Os.$$.fragment),am=p(),Tl=r("p"),im=o("Construct a MobileBERT tokenizer. Based on WordPiece."),lm=p(),Ds=r("p"),dm=o("This tokenizer inherits from "),ai=r("a"),cm=o("PreTrainedTokenizer"),pm=o(` which contains most of the main methods. Users should refer to
this superclass for more information regarding those methods.`),hm=p(),Jt=r("div"),y(Ss.$$.fragment),mm=p(),yl=r("p"),um=o(`Build model inputs from a sequence or a pair of sequence for sequence classification tasks by concatenating and
adding special tokens. A MobileBERT sequence has the following format:`),fm=p(),Is=r("ul"),ii=r("li"),gm=o("single sequence: "),wl=r("code"),_m=o("[CLS] X [SEP]"),bm=p(),li=r("li"),km=o("pair of sequences: "),$l=r("code"),vm=o("[CLS] A [SEP] B [SEP]"),Tm=p(),an=r("div"),y(Ls.$$.fragment),ym=p(),Ml=r("p"),wm=o("Converts a sequence of tokens (string) in a single string."),$m=p(),Ft=r("div"),y(Ws.$$.fragment),Mm=p(),Fl=r("p"),Fm=o("Create a mask from the two sequences passed to be used in a sequence-pair classification task. A MobileBERT"),Em=p(),y(ln.$$.fragment),Bm=p(),uo=r("p"),xm=o("If "),El=r("code"),zm=o("token_ids_1"),qm=o(" is "),Bl=r("code"),Pm=o("None"),jm=o(", this method only returns the first portion of the mask (0s)."),Cm=p(),dn=r("div"),y(Rs.$$.fragment),Nm=p(),Us=r("p"),Am=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 `),xl=r("code"),Om=o("prepare_for_model"),Dm=o(" method."),Wc=p(),fo=r("h2"),cn=r("a"),zl=r("span"),y(Ks.$$.fragment),Sm=p(),ql=r("span"),Im=o("MobileBertTokenizerFast"),Rc=p(),ct=r("div"),y(Hs.$$.fragment),Lm=p(),Qs=r("p"),Wm=o("Construct a \u201Cfast\u201D MobileBERT tokenizer (backed by HuggingFace\u2019s "),Pl=r("em"),Rm=o("tokenizers"),Um=o(" library). Based on WordPiece."),Km=p(),Vs=r("p"),Hm=o("This tokenizer inherits from "),di=r("a"),Qm=o("PreTrainedTokenizerFast"),Vm=o(` which contains most of the main methods. Users should
refer to this superclass for more information regarding those methods.`),Gm=p(),Yt=r("div"),y(Gs.$$.fragment),Jm=p(),jl=r("p"),Ym=o(`Build model inputs from a sequence or a pair of sequence for sequence classification tasks by concatenating and
adding special tokens. A MobileBERT sequence has the following format:`),Xm=p(),Js=r("ul"),ci=r("li"),Zm=o("single sequence: "),Cl=r("code"),eu=o("[CLS] X [SEP]"),tu=p(),pi=r("li"),ou=o("pair of sequences: "),Nl=r("code"),nu=o("[CLS] A [SEP] B [SEP]"),su=p(),Et=r("div"),y(Ys.$$.fragment),ru=p(),Al=r("p"),au=o("Create a mask from the two sequences passed to be used in a sequence-pair classification task. A MobileBERT"),iu=p(),y(pn.$$.fragment),lu=p(),go=r("p"),du=o("If "),Ol=r("code"),cu=o("token_ids_1"),pu=o(" is "),Dl=r("code"),hu=o("None"),mu=o(", this method only returns the first portion of the mask (0s)."),Uc=p(),_o=r("h2"),hn=r("a"),Sl=r("span"),y(Xs.$$.fragment),uu=p(),Il=r("span"),fu=o("MobileBert specific outputs"),Kc=p(),bo=r("div"),y(Zs.$$.fragment),gu=p(),er=r("p"),_u=o("Output type of "),hi=r("a"),bu=o("MobileBertForPreTraining"),ku=o("."),Hc=p(),ko=r("div"),y(tr.$$.fragment),vu=p(),or=r("p"),Tu=o("Output type of "),mi=r("a"),yu=o("TFMobileBertForPreTraining"),wu=o("."),Qc=p(),vo=r("h2"),mn=r("a"),Ll=r("span"),y(nr.$$.fragment),$u=p(),Wl=r("span"),Mu=o("MobileBertModel"),Vc=p(),et=r("div"),y(sr.$$.fragment),Fu=p(),Rl=r("p"),Eu=o("The bare MobileBert Model transformer outputting raw hidden-states without any specific head on top."),Bu=p(),rr=r("p"),xu=o("This model inherits from "),ui=r("a"),zu=o("PreTrainedModel"),qu=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.)`),Pu=p(),ar=r("p"),ju=o("This model is also a PyTorch "),ir=r("a"),Cu=o("torch.nn.Module"),Nu=o(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Au=p(),Ul=r("p"),lr=r("a"),Ou=o("https://arxiv.org/pdf/2004.02984.pdf"),Du=p(),Bt=r("div"),y(dr.$$.fragment),Su=p(),To=r("p"),Iu=o("The "),fi=r("a"),Lu=o("MobileBertModel"),Wu=o(" forward method, overrides the "),Kl=r("code"),Ru=o("__call__"),Uu=o(" special method."),Ku=p(),y(un.$$.fragment),Hu=p(),y(fn.$$.fragment),Gc=p(),yo=r("h2"),gn=r("a"),Hl=r("span"),y(cr.$$.fragment),Qu=p(),Ql=r("span"),Vu=o("MobileBertForPreTraining"),Jc=p(),pt=r("div"),y(pr.$$.fragment),Gu=p(),wo=r("p"),Ju=o("MobileBert Model with two heads on top as done during the pretraining: a "),Vl=r("code"),Yu=o("masked language modeling"),Xu=o(` head and a
`),Gl=r("code"),Zu=o("next sentence prediction (classification)"),ef=o(" head."),tf=p(),hr=r("p"),of=o("This model inherits from "),gi=r("a"),nf=o("PreTrainedModel"),sf=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.)`),rf=p(),mr=r("p"),af=o("This model is also a PyTorch "),ur=r("a"),lf=o("torch.nn.Module"),df=o(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),cf=p(),xt=r("div"),y(fr.$$.fragment),pf=p(),$o=r("p"),hf=o("The "),_i=r("a"),mf=o("MobileBertForPreTraining"),uf=o(" forward method, overrides the "),Jl=r("code"),ff=o("__call__"),gf=o(" special method."),_f=p(),y(_n.$$.fragment),bf=p(),y(bn.$$.fragment),Yc=p(),Mo=r("h2"),kn=r("a"),Yl=r("span"),y(gr.$$.fragment),kf=p(),Xl=r("span"),vf=o("MobileBertForMaskedLM"),Xc=p(),ht=r("div"),y(_r.$$.fragment),Tf=p(),br=r("p"),yf=o("MobileBert Model with a "),Zl=r("code"),wf=o("language modeling"),$f=o(" head on top."),Mf=p(),kr=r("p"),Ff=o("This model inherits from "),bi=r("a"),Ef=o("PreTrainedModel"),Bf=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.)`),xf=p(),vr=r("p"),zf=o("This model is also a PyTorch "),Tr=r("a"),qf=o("torch.nn.Module"),Pf=o(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),jf=p(),zt=r("div"),y(yr.$$.fragment),Cf=p(),Fo=r("p"),Nf=o("The "),ki=r("a"),Af=o("MobileBertForMaskedLM"),Of=o(" forward method, overrides the "),ed=r("code"),Df=o("__call__"),Sf=o(" special method."),If=p(),y(vn.$$.fragment),Lf=p(),y(Tn.$$.fragment),Zc=p(),Eo=r("h2"),yn=r("a"),td=r("span"),y(wr.$$.fragment),Wf=p(),od=r("span"),Rf=o("MobileBertForNextSentencePrediction"),ep=p(),mt=r("div"),y($r.$$.fragment),Uf=p(),Mr=r("p"),Kf=o("MobileBert Model with a "),nd=r("code"),Hf=o("next sentence prediction (classification)"),Qf=o(" head on top."),Vf=p(),Fr=r("p"),Gf=o("This model inherits from "),vi=r("a"),Jf=o("PreTrainedModel"),Yf=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.)`),Xf=p(),Er=r("p"),Zf=o("This model is also a PyTorch "),Br=r("a"),eg=o("torch.nn.Module"),tg=o(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),og=p(),qt=r("div"),y(xr.$$.fragment),ng=p(),Bo=r("p"),sg=o("The "),Ti=r("a"),rg=o("MobileBertForNextSentencePrediction"),ag=o(" forward method, overrides the "),sd=r("code"),ig=o("__call__"),lg=o(" special method."),dg=p(),y(wn.$$.fragment),cg=p(),y($n.$$.fragment),tp=p(),xo=r("h2"),Mn=r("a"),rd=r("span"),y(zr.$$.fragment),pg=p(),ad=r("span"),hg=o("MobileBertForSequenceClassification"),op=p(),ut=r("div"),y(qr.$$.fragment),mg=p(),id=r("p"),ug=o(`MobileBert Model transformer with a sequence classification/regression head on top (a linear layer on top of the
pooled output) e.g. for GLUE tasks.`),fg=p(),Pr=r("p"),gg=o("This model inherits from "),yi=r("a"),_g=o("PreTrainedModel"),bg=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.)`),kg=p(),jr=r("p"),vg=o("This model is also a PyTorch "),Cr=r("a"),Tg=o("torch.nn.Module"),yg=o(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),wg=p(),bt=r("div"),y(Nr.$$.fragment),$g=p(),zo=r("p"),Mg=o("The "),wi=r("a"),Fg=o("MobileBertForSequenceClassification"),Eg=o(" forward method, overrides the "),ld=r("code"),Bg=o("__call__"),xg=o(" special method."),zg=p(),y(Fn.$$.fragment),qg=p(),y(En.$$.fragment),Pg=p(),y(Bn.$$.fragment),np=p(),qo=r("h2"),xn=r("a"),dd=r("span"),y(Ar.$$.fragment),jg=p(),cd=r("span"),Cg=o("MobileBertForMultipleChoice"),sp=p(),ft=r("div"),y(Or.$$.fragment),Ng=p(),pd=r("p"),Ag=o(`MobileBert 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.`),Og=p(),Dr=r("p"),Dg=o("This model inherits from "),$i=r("a"),Sg=o("PreTrainedModel"),Ig=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.)`),Lg=p(),Sr=r("p"),Wg=o("This model is also a PyTorch "),Ir=r("a"),Rg=o("torch.nn.Module"),Ug=o(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Kg=p(),Pt=r("div"),y(Lr.$$.fragment),Hg=p(),Po=r("p"),Qg=o("The "),Mi=r("a"),Vg=o("MobileBertForMultipleChoice"),Gg=o(" forward method, overrides the "),hd=r("code"),Jg=o("__call__"),Yg=o(" special method."),Xg=p(),y(zn.$$.fragment),Zg=p(),y(qn.$$.fragment),rp=p(),jo=r("h2"),Pn=r("a"),md=r("span"),y(Wr.$$.fragment),e_=p(),ud=r("span"),t_=o("MobileBertForTokenClassification"),ap=p(),gt=r("div"),y(Rr.$$.fragment),o_=p(),fd=r("p"),n_=o(`MobileBert 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.`),s_=p(),Ur=r("p"),r_=o("This model inherits from "),Fi=r("a"),a_=o("PreTrainedModel"),i_=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.)`),l_=p(),Kr=r("p"),d_=o("This model is also a PyTorch "),Hr=r("a"),c_=o("torch.nn.Module"),p_=o(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),h_=p(),jt=r("div"),y(Qr.$$.fragment),m_=p(),Co=r("p"),u_=o("The "),Ei=r("a"),f_=o("MobileBertForTokenClassification"),g_=o(" forward method, overrides the "),gd=r("code"),__=o("__call__"),b_=o(" special method."),k_=p(),y(jn.$$.fragment),v_=p(),y(Cn.$$.fragment),ip=p(),No=r("h2"),Nn=r("a"),_d=r("span"),y(Vr.$$.fragment),T_=p(),bd=r("span"),y_=o("MobileBertForQuestionAnswering"),lp=p(),_t=r("div"),y(Gr.$$.fragment),w_=p(),Ao=r("p"),$_=o(`MobileBert 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 `),kd=r("code"),M_=o("span start logits"),F_=o(" and "),vd=r("code"),E_=o("span end logits"),B_=o(")."),x_=p(),Jr=r("p"),z_=o("This model inherits from "),Bi=r("a"),q_=o("PreTrainedModel"),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.)`),j_=p(),Yr=r("p"),C_=o("This model is also a PyTorch "),Xr=r("a"),N_=o("torch.nn.Module"),A_=o(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),O_=p(),Ct=r("div"),y(Zr.$$.fragment),D_=p(),Oo=r("p"),S_=o("The "),xi=r("a"),I_=o("MobileBertForQuestionAnswering"),L_=o(" forward method, overrides the "),Td=r("code"),W_=o("__call__"),R_=o(" special method."),U_=p(),y(An.$$.fragment),K_=p(),y(On.$$.fragment),dp=p(),Do=r("h2"),Dn=r("a"),yd=r("span"),y(ea.$$.fragment),H_=p(),wd=r("span"),Q_=o("TFMobileBertModel"),cp=p(),tt=r("div"),y(ta.$$.fragment),V_=p(),$d=r("p"),G_=o("The bare MobileBert Model transformer outputting raw hidden-states without any specific head on top."),J_=p(),oa=r("p"),Y_=o("This model inherits from "),zi=r("a"),X_=o("TFPreTrainedModel"),Z_=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.)`),eb=p(),na=r("p"),tb=o("This model is also a "),sa=r("a"),ob=o("tf.keras.Model"),nb=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.`),sb=p(),y(Sn.$$.fragment),rb=p(),Nt=r("div"),y(ra.$$.fragment),ab=p(),So=r("p"),ib=o("The "),qi=r("a"),lb=o("TFMobileBertModel"),db=o(" forward method, overrides the "),Md=r("code"),cb=o("__call__"),pb=o(" special method."),hb=p(),y(In.$$.fragment),mb=p(),y(Ln.$$.fragment),pp=p(),Io=r("h2"),Wn=r("a"),Fd=r("span"),y(aa.$$.fragment),ub=p(),Ed=r("span"),fb=o("TFMobileBertForPreTraining"),hp=p(),ot=r("div"),y(ia.$$.fragment),gb=p(),Lo=r("p"),_b=o("MobileBert Model with two heads on top as done during the pretraining: a "),Bd=r("code"),bb=o("masked language modeling"),kb=o(` head and a
`),xd=r("code"),vb=o("next sentence prediction (classification)"),Tb=o(" head."),yb=p(),la=r("p"),wb=o("This model inherits from "),Pi=r("a"),$b=o("TFPreTrainedModel"),Mb=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.)`),Fb=p(),da=r("p"),Eb=o("This model is also a "),ca=r("a"),Bb=o("tf.keras.Model"),xb=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.`),zb=p(),y(Rn.$$.fragment),qb=p(),At=r("div"),y(pa.$$.fragment),Pb=p(),Wo=r("p"),jb=o("The "),ji=r("a"),Cb=o("TFMobileBertForPreTraining"),Nb=o(" forward method, overrides the "),zd=r("code"),Ab=o("__call__"),Ob=o(" special method."),Db=p(),y(Un.$$.fragment),Sb=p(),y(Kn.$$.fragment),mp=p(),Ro=r("h2"),Hn=r("a"),qd=r("span"),y(ha.$$.fragment),Ib=p(),Pd=r("span"),Lb=o("TFMobileBertForMaskedLM"),up=p(),nt=r("div"),y(ma.$$.fragment),Wb=p(),ua=r("p"),Rb=o("MobileBert Model with a "),jd=r("code"),Ub=o("language modeling"),Kb=o(" head on top."),Hb=p(),fa=r("p"),Qb=o("This model inherits from "),Ci=r("a"),Vb=o("TFPreTrainedModel"),Gb=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.)`),Jb=p(),ga=r("p"),Yb=o("This model is also a "),_a=r("a"),Xb=o("tf.keras.Model"),Zb=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.`),ek=p(),y(Qn.$$.fragment),tk=p(),kt=r("div"),y(ba.$$.fragment),ok=p(),Uo=r("p"),nk=o("The "),Ni=r("a"),sk=o("TFMobileBertForMaskedLM"),rk=o(" forward method, overrides the "),Cd=r("code"),ak=o("__call__"),ik=o(" special method."),lk=p(),y(Vn.$$.fragment),dk=p(),y(Gn.$$.fragment),ck=p(),y(Jn.$$.fragment),fp=p(),Ko=r("h2"),Yn=r("a"),Nd=r("span"),y(ka.$$.fragment),pk=p(),Ad=r("span"),hk=o("TFMobileBertForNextSentencePrediction"),gp=p(),st=r("div"),y(va.$$.fragment),mk=p(),Ta=r("p"),uk=o("MobileBert Model with a "),Od=r("code"),fk=o("next sentence prediction (classification)"),gk=o(" head on top."),_k=p(),ya=r("p"),bk=o("This model inherits from "),Ai=r("a"),kk=o("TFPreTrainedModel"),vk=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.)`),Tk=p(),wa=r("p"),yk=o("This model is also a "),$a=r("a"),wk=o("tf.keras.Model"),$k=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.`),Mk=p(),y(Xn.$$.fragment),Fk=p(),Ot=r("div"),y(Ma.$$.fragment),Ek=p(),Ho=r("p"),Bk=o("The "),Oi=r("a"),xk=o("TFMobileBertForNextSentencePrediction"),zk=o(" forward method, overrides the "),Dd=r("code"),qk=o("__call__"),Pk=o(" special method."),jk=p(),y(Zn.$$.fragment),Ck=p(),y(es.$$.fragment),_p=p(),Qo=r("h2"),ts=r("a"),Sd=r("span"),y(Fa.$$.fragment),Nk=p(),Id=r("span"),Ak=o("TFMobileBertForSequenceClassification"),bp=p(),rt=r("div"),y(Ea.$$.fragment),Ok=p(),Ld=r("p"),Dk=o(`MobileBert Model transformer with a sequence classification/regression head on top (a linear layer on top of the
pooled output) e.g. for GLUE tasks.`),Sk=p(),Ba=r("p"),Ik=o("This model inherits from "),Di=r("a"),Lk=o("TFPreTrainedModel"),Wk=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.)`),Rk=p(),xa=r("p"),Uk=o("This model is also a "),za=r("a"),Kk=o("tf.keras.Model"),Hk=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.`),Qk=p(),y(os.$$.fragment),Vk=p(),vt=r("div"),y(qa.$$.fragment),Gk=p(),Vo=r("p"),Jk=o("The "),Si=r("a"),Yk=o("TFMobileBertForSequenceClassification"),Xk=o(" forward method, overrides the "),Wd=r("code"),Zk=o("__call__"),ev=o(" special method."),tv=p(),y(ns.$$.fragment),ov=p(),y(ss.$$.fragment),nv=p(),y(rs.$$.fragment),kp=p(),Go=r("h2"),as=r("a"),Rd=r("span"),y(Pa.$$.fragment),sv=p(),Ud=r("span"),rv=o("TFMobileBertForMultipleChoice"),vp=p(),at=r("div"),y(ja.$$.fragment),av=p(),Kd=r("p"),iv=o(`MobileBert 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.`),lv=p(),Ca=r("p"),dv=o("This model inherits from "),Ii=r("a"),cv=o("TFPreTrainedModel"),pv=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.)`),hv=p(),Na=r("p"),mv=o("This model is also a "),Aa=r("a"),uv=o("tf.keras.Model"),fv=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.`),gv=p(),y(is.$$.fragment),_v=p(),Dt=r("div"),y(Oa.$$.fragment),bv=p(),Jo=r("p"),kv=o("The "),Li=r("a"),vv=o("TFMobileBertForMultipleChoice"),Tv=o(" forward method, overrides the "),Hd=r("code"),yv=o("__call__"),wv=o(" special method."),$v=p(),y(ls.$$.fragment),Mv=p(),y(ds.$$.fragment),Tp=p(),Yo=r("h2"),cs=r("a"),Qd=r("span"),y(Da.$$.fragment),Fv=p(),Vd=r("span"),Ev=o("TFMobileBertForTokenClassification"),yp=p(),it=r("div"),y(Sa.$$.fragment),Bv=p(),Gd=r("p"),xv=o(`MobileBert 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.`),zv=p(),Ia=r("p"),qv=o("This model inherits from "),Wi=r("a"),Pv=o("TFPreTrainedModel"),jv=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.)`),Cv=p(),La=r("p"),Nv=o("This model is also a "),Wa=r("a"),Av=o("tf.keras.Model"),Ov=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.`),Dv=p(),y(ps.$$.fragment),Sv=p(),Tt=r("div"),y(Ra.$$.fragment),Iv=p(),Xo=r("p"),Lv=o("The "),Ri=r("a"),Wv=o("TFMobileBertForTokenClassification"),Rv=o(" forward method, overrides the "),Jd=r("code"),Uv=o("__call__"),Kv=o(" special method."),Hv=p(),y(hs.$$.fragment),Qv=p(),y(ms.$$.fragment),Vv=p(),y(us.$$.fragment),wp=p(),Zo=r("h2"),fs=r("a"),Yd=r("span"),y(Ua.$$.fragment),Gv=p(),Xd=r("span"),Jv=o("TFMobileBertForQuestionAnswering"),$p=p(),lt=r("div"),y(Ka.$$.fragment),Yv=p(),en=r("p"),Xv=o(`MobileBert 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 `),Zd=r("code"),Zv=o("span start logits"),eT=o(" and "),ec=r("code"),tT=o("span end logits"),oT=o(")."),nT=p(),Ha=r("p"),sT=o("This model inherits from "),Ui=r("a"),rT=o("TFPreTrainedModel"),aT=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.)`),iT=p(),Qa=r("p"),lT=o("This model is also a "),Va=r("a"),dT=o("tf.keras.Model"),cT=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.`),pT=p(),y(gs.$$.fragment),hT=p(),yt=r("div"),y(Ga.$$.fragment),mT=p(),tn=r("p"),uT=o("The "),Ki=r("a"),fT=o("TFMobileBertForQuestionAnswering"),gT=o(" forward method, overrides the "),tc=r("code"),_T=o("__call__"),bT=o(" special method."),kT=p(),y(_s.$$.fragment),vT=p(),y(bs.$$.fragment),TT=p(),y(ks.$$.fragment),this.h()},l(s){const b=z1('[data-svelte="svelte-1phssyn"]',document.head);d=a(b,"META",{name:!0,content:!0}),b.forEach(t),v=h(s),m=a(s,"H1",{class:!0});var Ja=i(m);u=a(Ja,"A",{id:!0,class:!0,href:!0});var oc=i(u);k=a(oc,"SPAN",{});var nc=i(k);w(l.$$.fragment,nc),nc.forEach(t),oc.forEach(t),c=h(Ja),z=a(Ja,"SPAN",{});var sc=i(z);ve=n(sc,"MobileBERT"),sc.forEach(t),Ja.forEach(t),me=h(s),S=a(s,"H2",{class:!0});var Ya=i(S);re=a(Ya,"A",{id:!0,class:!0,href:!0});var rc=i(re);Z=a(rc,"SPAN",{});var ac=i(Z);w(T.$$.fragment,ac),ac.forEach(t),rc.forEach(t),Te=h(Ya),K=a(Ya,"SPAN",{});var ic=i(K);ye=n(ic,"Overview"),ic.forEach(t),Ya.forEach(t),ue=h(s),L=a(s,"P",{});var Xa=i(L);we=n(Xa,"The MobileBERT model was proposed in "),ie=a(Xa,"A",{href:!0,rel:!0});var lc=i(ie);Q=n(lc,"MobileBERT: a Compact Task-Agnostic BERT for Resource-Limited Devices"),lc.forEach(t),$e=n(Xa,` by Zhiqing Sun, Hongkun Yu, Xiaodan Song, Renjie Liu, Yiming Yang, and Denny
Zhou. It\u2019s a bidirectional transformer based on the BERT model, which is compressed and accelerated using several
approaches.`),Xa.forEach(t),fe=h(s),R=a(s,"P",{});var dc=i(R);Me=n(dc,"The abstract from the paper is the following:"),dc.forEach(t),ge=h(s),U=a(s,"P",{});var cc=i(U);ce=a(cc,"EM",{});var pc=i(ce);Fe=n(pc,`Natural Language Processing (NLP) has recently achieved great success by using huge pre-trained models with hundreds
of millions of parameters. However, these models suffer from heavy model sizes and high latency such that they cannot
be deployed to resource-limited mobile devices. In this paper, we propose MobileBERT for compressing and accelerating
the popular BERT model. Like the original BERT, MobileBERT is task-agnostic, that is, it can be generically applied to
various downstream NLP tasks via simple fine-tuning. Basically, MobileBERT is a thin version of BERT_LARGE, while
equipped with bottleneck structures and a carefully designed balance between self-attentions and feed-forward networks.
To train MobileBERT, we first train a specially designed teacher model, an inverted-bottleneck incorporated BERT_LARGE
model. Then, we conduct knowledge transfer from this teacher to MobileBERT. Empirical studies show that MobileBERT is
4.3x smaller and 5.5x faster than BERT_BASE while achieving competitive results on well-known benchmarks. On the
natural language inference tasks of GLUE, MobileBERT achieves a GLUEscore o 77.7 (0.6 lower than BERT_BASE), and 62 ms
latency on a Pixel 4 phone. On the SQuAD v1.1/v2.0 question answering task, MobileBERT achieves a dev F1 score of
90.0/79.2 (1.5/2.1 higher than BERT_BASE).`),pc.forEach(t),cc.forEach(t),te=h(s),P=a(s,"P",{});var hc=i(P);N=n(hc,"Tips:"),hc.forEach(t),_e=h(s),W=a(s,"UL",{});var Za=i(W);pe=a(Za,"LI",{});var mc=i(pe);Ee=n(mc,`MobileBERT is a model with absolute position embeddings so it\u2019s usually advised to pad the inputs on the right rather
than the left.`),mc.forEach(t),V=h(Za),he=a(Za,"LI",{});var uc=i(he);Be=n(uc,`MobileBERT is similar to BERT and therefore relies on the masked language modeling (MLM) objective. It is therefore
efficient at predicting masked tokens and at NLU in general, but is not optimal for text generation. Models trained
with a causal language modeling (CLM) objective are better in that regard.`),uc.forEach(t),Za.forEach(t),C=h(s),se=a(s,"P",{});var on=i(se);G=n(on,"This model was contributed by "),le=a(on,"A",{href:!0,rel:!0});var fc=i(le);xe=n(fc,"vshampor"),fc.forEach(t),J=n(on,". The original code can be found "),de=a(on,"A",{href:!0,rel:!0});var gc=i(de);ze=n(gc,"here"),gc.forEach(t),O=n(on,"."),on.forEach(t),be=h(s),I=a(s,"H2",{class:!0});var ei=i(I);ae=a(ei,"A",{id:!0,class:!0,href:!0});var _c=i(ae);ee=a(_c,"SPAN",{});var bc=i(ee);w(j.$$.fragment,bc),bc.forEach(t),_c.forEach(t),qe=h(ei),A=a(ei,"SPAN",{});var kc=i(A);Pe=n(kc,"Documentation resources"),kc.forEach(t),ei.forEach(t),ke=h(s),f=a(s,"UL",{});var $t=i(f);B=a($t,"LI",{});var vc=i(B);Ne=a(vc,"A",{href:!0});var Tc=i(Ne);oe=n(Tc,"Text classification task guide"),Tc.forEach(t),vc.forEach(t),Re=h($t),Se=a($t,"LI",{});var yc=i(Se);x=a(yc,"A",{href:!0});var wc=i(x);Ue=n(wc,"Token classification task guide"),wc.forEach(t),yc.forEach(t),Ke=h($t),Ie=a($t,"LI",{});var $c=i(Ie);Ae=a($c,"A",{href:!0});var Mc=i(Ae);He=n(Mc,"Question answering task guide"),Mc.forEach(t),$c.forEach(t),D=h($t),H=a($t,"LI",{});var Fc=i(H);Oe=a(Fc,"A",{href:!0});var Ec=i(Oe);Qe=n(Ec,"Masked language modeling task guide"),Ec.forEach(t),Fc.forEach(t),Y=h($t),Le=a($t,"LI",{});var Bc=i(Le);De=a(Bc,"A",{href:!0});var xc=i(De);je=n(xc,"Multiple choice task guide"),xc.forEach(t),Bc.forEach(t),$t.forEach(t),We=h(s),X=a(s,"H2",{class:!0});var ti=i(X);Ce=a(ti,"A",{id:!0,class:!0,href:!0});var zc=i(Ce);gl=a(zc,"SPAN",{});var qc=i(gl);w(js.$$.fragment,qc),qc.forEach(t),zc.forEach(t),Sh=h(ti),_l=a(ti,"SPAN",{});var Pc=i(_l);Ih=n(Pc,"MobileBertConfig"),Pc.forEach(t),ti.forEach(t),Sc=h(s),dt=a(s,"DIV",{class:!0});var Mt=i(dt);w(Cs.$$.fragment,Mt),Lh=h(Mt),Vt=a(Mt,"P",{});var Gt=i(Vt);Wh=n(Gt,"This is the configuration class to store the configuration of a "),oi=a(Gt,"A",{href:!0});var jc=i(oi);Rh=n(jc,"MobileBertModel"),jc.forEach(t),Uh=n(Gt," or a "),ni=a(Gt,"A",{href:!0});var Cc=i(ni);Kh=n(Cc,"TFMobileBertModel"),Cc.forEach(t),Hh=n(Gt,`. It
is used to instantiate a MobileBERT 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 MobileBERT
`),Ns=a(Gt,"A",{href:!0,rel:!0});var Nc=i(Ns);Qh=n(Nc,"google/mobilebert-uncased"),Nc.forEach(t),Vh=n(Gt," architecture."),Gt.forEach(t),Gh=h(Mt),ho=a(Mt,"P",{});var nn=i(ho);Jh=n(nn,"Configuration objects inherit from "),si=a(nn,"A",{href:!0});var Ac=i(si);Yh=n(Ac,"PretrainedConfig"),Ac.forEach(t),Xh=n(nn,` and can be used to control the model outputs. Read the
documentation from `),ri=a(nn,"A",{href:!0});var Oc=i(ri);Zh=n(Oc,"PretrainedConfig"),Oc.forEach(t),em=n(nn," for more information."),nn.forEach(t),tm=h(Mt),w(sn.$$.fragment,Mt),om=h(Mt),bl=a(Mt,"P",{});var Dc=i(bl);nm=n(Dc,`Attributes: pretrained_config_archive_map (Dict[str, str]): A dictionary containing all the available pre-trained
checkpoints.`),Dc.forEach(t),Mt.forEach(t),Ic=h(s),mo=a(s,"H2",{class:!0});var Fp=i(mo);rn=a(Fp,"A",{id:!0,class:!0,href:!0});var FT=i(rn);kl=a(FT,"SPAN",{});var ET=i(kl);w(As.$$.fragment,ET),ET.forEach(t),FT.forEach(t),sm=h(Fp),vl=a(Fp,"SPAN",{});var BT=i(vl);rm=n(BT,"MobileBertTokenizer"),BT.forEach(t),Fp.forEach(t),Lc=h(s),Ze=a(s,"DIV",{class:!0});var wt=i(Ze);w(Os.$$.fragment,wt),am=h(wt),Tl=a(wt,"P",{});var xT=i(Tl);im=n(xT,"Construct a MobileBERT tokenizer. Based on WordPiece."),xT.forEach(t),lm=h(wt),Ds=a(wt,"P",{});var Ep=i(Ds);dm=n(Ep,"This tokenizer inherits from "),ai=a(Ep,"A",{href:!0});var zT=i(ai);cm=n(zT,"PreTrainedTokenizer"),zT.forEach(t),pm=n(Ep,` which contains most of the main methods. Users should refer to
this superclass for more information regarding those methods.`),Ep.forEach(t),hm=h(wt),Jt=a(wt,"DIV",{class:!0});var Hi=i(Jt);w(Ss.$$.fragment,Hi),mm=h(Hi),yl=a(Hi,"P",{});var qT=i(yl);um=n(qT,`Build model inputs from a sequence or a pair of sequence for sequence classification tasks by concatenating and
adding special tokens. A MobileBERT sequence has the following format:`),qT.forEach(t),fm=h(Hi),Is=a(Hi,"UL",{});var Bp=i(Is);ii=a(Bp,"LI",{});var yT=i(ii);gm=n(yT,"single sequence: "),wl=a(yT,"CODE",{});var PT=i(wl);_m=n(PT,"[CLS] X [SEP]"),PT.forEach(t),yT.forEach(t),bm=h(Bp),li=a(Bp,"LI",{});var wT=i(li);km=n(wT,"pair of sequences: "),$l=a(wT,"CODE",{});var jT=i($l);vm=n(jT,"[CLS] A [SEP] B [SEP]"),jT.forEach(t),wT.forEach(t),Bp.forEach(t),Hi.forEach(t),Tm=h(wt),an=a(wt,"DIV",{class:!0});var xp=i(an);w(Ls.$$.fragment,xp),ym=h(xp),Ml=a(xp,"P",{});var CT=i(Ml);wm=n(CT,"Converts a sequence of tokens (string) in a single string."),CT.forEach(t),xp.forEach(t),$m=h(wt),Ft=a(wt,"DIV",{class:!0});var vs=i(Ft);w(Ws.$$.fragment,vs),Mm=h(vs),Fl=a(vs,"P",{});var NT=i(Fl);Fm=n(NT,"Create a mask from the two sequences passed to be used in a sequence-pair classification task. A MobileBERT"),NT.forEach(t),Em=h(vs),w(ln.$$.fragment,vs),Bm=h(vs),uo=a(vs,"P",{});var Qi=i(uo);xm=n(Qi,"If "),El=a(Qi,"CODE",{});var AT=i(El);zm=n(AT,"token_ids_1"),AT.forEach(t),qm=n(Qi," is "),Bl=a(Qi,"CODE",{});var OT=i(Bl);Pm=n(OT,"None"),OT.forEach(t),jm=n(Qi,", this method only returns the first portion of the mask (0s)."),Qi.forEach(t),vs.forEach(t),Cm=h(wt),dn=a(wt,"DIV",{class:!0});var zp=i(dn);w(Rs.$$.fragment,zp),Nm=h(zp),Us=a(zp,"P",{});var qp=i(Us);Am=n(qp,`Retrieve sequence ids from a token list that has no special tokens added. This method is called when adding
special tokens using the tokenizer `),xl=a(qp,"CODE",{});var DT=i(xl);Om=n(DT,"prepare_for_model"),DT.forEach(t),Dm=n(qp," method."),qp.forEach(t),zp.forEach(t),wt.forEach(t),Wc=h(s),fo=a(s,"H2",{class:!0});var Pp=i(fo);cn=a(Pp,"A",{id:!0,class:!0,href:!0});var ST=i(cn);zl=a(ST,"SPAN",{});var IT=i(zl);w(Ks.$$.fragment,IT),IT.forEach(t),ST.forEach(t),Sm=h(Pp),ql=a(Pp,"SPAN",{});var LT=i(ql);Im=n(LT,"MobileBertTokenizerFast"),LT.forEach(t),Pp.forEach(t),Rc=h(s),ct=a(s,"DIV",{class:!0});var Xt=i(ct);w(Hs.$$.fragment,Xt),Lm=h(Xt),Qs=a(Xt,"P",{});var jp=i(Qs);Wm=n(jp,"Construct a \u201Cfast\u201D MobileBERT tokenizer (backed by HuggingFace\u2019s "),Pl=a(jp,"EM",{});var WT=i(Pl);Rm=n(WT,"tokenizers"),WT.forEach(t),Um=n(jp," library). Based on WordPiece."),jp.forEach(t),Km=h(Xt),Vs=a(Xt,"P",{});var Cp=i(Vs);Hm=n(Cp,"This tokenizer inherits from "),di=a(Cp,"A",{href:!0});var RT=i(di);Qm=n(RT,"PreTrainedTokenizerFast"),RT.forEach(t),Vm=n(Cp,` which contains most of the main methods. Users should
refer to this superclass for more information regarding those methods.`),Cp.forEach(t),Gm=h(Xt),Yt=a(Xt,"DIV",{class:!0});var Vi=i(Yt);w(Gs.$$.fragment,Vi),Jm=h(Vi),jl=a(Vi,"P",{});var UT=i(jl);Ym=n(UT,`Build model inputs from a sequence or a pair of sequence for sequence classification tasks by concatenating and
adding special tokens. A MobileBERT sequence has the following format:`),UT.forEach(t),Xm=h(Vi),Js=a(Vi,"UL",{});var Np=i(Js);ci=a(Np,"LI",{});var $T=i(ci);Zm=n($T,"single sequence: "),Cl=a($T,"CODE",{});var KT=i(Cl);eu=n(KT,"[CLS] X [SEP]"),KT.forEach(t),$T.forEach(t),tu=h(Np),pi=a(Np,"LI",{});var MT=i(pi);ou=n(MT,"pair of sequences: "),Nl=a(MT,"CODE",{});var HT=i(Nl);nu=n(HT,"[CLS] A [SEP] B [SEP]"),HT.forEach(t),MT.forEach(t),Np.forEach(t),Vi.forEach(t),su=h(Xt),Et=a(Xt,"DIV",{class:!0});var Ts=i(Et);w(Ys.$$.fragment,Ts),ru=h(Ts),Al=a(Ts,"P",{});var QT=i(Al);au=n(QT,"Create a mask from the two sequences passed to be used in a sequence-pair classification task. A MobileBERT"),QT.forEach(t),iu=h(Ts),w(pn.$$.fragment,Ts),lu=h(Ts),go=a(Ts,"P",{});var Gi=i(go);du=n(Gi,"If "),Ol=a(Gi,"CODE",{});var VT=i(Ol);cu=n(VT,"token_ids_1"),VT.forEach(t),pu=n(Gi," is "),Dl=a(Gi,"CODE",{});var GT=i(Dl);hu=n(GT,"None"),GT.forEach(t),mu=n(Gi,", this method only returns the first portion of the mask (0s)."),Gi.forEach(t),Ts.forEach(t),Xt.forEach(t),Uc=h(s),_o=a(s,"H2",{class:!0});var Ap=i(_o);hn=a(Ap,"A",{id:!0,class:!0,href:!0});var JT=i(hn);Sl=a(JT,"SPAN",{});var YT=i(Sl);w(Xs.$$.fragment,YT),YT.forEach(t),JT.forEach(t),uu=h(Ap),Il=a(Ap,"SPAN",{});var XT=i(Il);fu=n(XT,"MobileBert specific outputs"),XT.forEach(t),Ap.forEach(t),Kc=h(s),bo=a(s,"DIV",{class:!0});var Op=i(bo);w(Zs.$$.fragment,Op),gu=h(Op),er=a(Op,"P",{});var Dp=i(er);_u=n(Dp,"Output type of "),hi=a(Dp,"A",{href:!0});var ZT=i(hi);bu=n(ZT,"MobileBertForPreTraining"),ZT.forEach(t),ku=n(Dp,"."),Dp.forEach(t),Op.forEach(t),Hc=h(s),ko=a(s,"DIV",{class:!0});var Sp=i(ko);w(tr.$$.fragment,Sp),vu=h(Sp),or=a(Sp,"P",{});var Ip=i(or);Tu=n(Ip,"Output type of "),mi=a(Ip,"A",{href:!0});var ey=i(mi);yu=n(ey,"TFMobileBertForPreTraining"),ey.forEach(t),wu=n(Ip,"."),Ip.forEach(t),Sp.forEach(t),Qc=h(s),vo=a(s,"H2",{class:!0});var Lp=i(vo);mn=a(Lp,"A",{id:!0,class:!0,href:!0});var ty=i(mn);Ll=a(ty,"SPAN",{});var oy=i(Ll);w(nr.$$.fragment,oy),oy.forEach(t),ty.forEach(t),$u=h(Lp),Wl=a(Lp,"SPAN",{});var ny=i(Wl);Mu=n(ny,"MobileBertModel"),ny.forEach(t),Lp.forEach(t),Vc=h(s),et=a(s,"DIV",{class:!0});var St=i(et);w(sr.$$.fragment,St),Fu=h(St),Rl=a(St,"P",{});var sy=i(Rl);Eu=n(sy,"The bare MobileBert Model transformer outputting raw hidden-states without any specific head on top."),sy.forEach(t),Bu=h(St),rr=a(St,"P",{});var Wp=i(rr);xu=n(Wp,"This model inherits from "),ui=a(Wp,"A",{href:!0});var ry=i(ui);zu=n(ry,"PreTrainedModel"),ry.forEach(t),qu=n(Wp,`. 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.)`),Wp.forEach(t),Pu=h(St),ar=a(St,"P",{});var Rp=i(ar);ju=n(Rp,"This model is also a PyTorch "),ir=a(Rp,"A",{href:!0,rel:!0});var ay=i(ir);Cu=n(ay,"torch.nn.Module"),ay.forEach(t),Nu=n(Rp,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Rp.forEach(t),Au=h(St),Ul=a(St,"P",{});var iy=i(Ul);lr=a(iy,"A",{href:!0,rel:!0});var ly=i(lr);Ou=n(ly,"https://arxiv.org/pdf/2004.02984.pdf"),ly.forEach(t),iy.forEach(t),Du=h(St),Bt=a(St,"DIV",{class:!0});var ys=i(Bt);w(dr.$$.fragment,ys),Su=h(ys),To=a(ys,"P",{});var Ji=i(To);Iu=n(Ji,"The "),fi=a(Ji,"A",{href:!0});var dy=i(fi);Lu=n(dy,"MobileBertModel"),dy.forEach(t),Wu=n(Ji," forward method, overrides the "),Kl=a(Ji,"CODE",{});var cy=i(Kl);Ru=n(cy,"__call__"),cy.forEach(t),Uu=n(Ji," special method."),Ji.forEach(t),Ku=h(ys),w(un.$$.fragment,ys),Hu=h(ys),w(fn.$$.fragment,ys),ys.forEach(t),St.forEach(t),Gc=h(s),yo=a(s,"H2",{class:!0});var Up=i(yo);gn=a(Up,"A",{id:!0,class:!0,href:!0});var py=i(gn);Hl=a(py,"SPAN",{});var hy=i(Hl);w(cr.$$.fragment,hy),hy.forEach(t),py.forEach(t),Qu=h(Up),Ql=a(Up,"SPAN",{});var my=i(Ql);Vu=n(my,"MobileBertForPreTraining"),my.forEach(t),Up.forEach(t),Jc=h(s),pt=a(s,"DIV",{class:!0});var Zt=i(pt);w(pr.$$.fragment,Zt),Gu=h(Zt),wo=a(Zt,"P",{});var Yi=i(wo);Ju=n(Yi,"MobileBert Model with two heads on top as done during the pretraining: a "),Vl=a(Yi,"CODE",{});var uy=i(Vl);Yu=n(uy,"masked language modeling"),uy.forEach(t),Xu=n(Yi,` head and a
`),Gl=a(Yi,"CODE",{});var fy=i(Gl);Zu=n(fy,"next sentence prediction (classification)"),fy.forEach(t),ef=n(Yi," head."),Yi.forEach(t),tf=h(Zt),hr=a(Zt,"P",{});var Kp=i(hr);of=n(Kp,"This model inherits from "),gi=a(Kp,"A",{href:!0});var gy=i(gi);nf=n(gy,"PreTrainedModel"),gy.forEach(t),sf=n(Kp,`. 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.)`),Kp.forEach(t),rf=h(Zt),mr=a(Zt,"P",{});var Hp=i(mr);af=n(Hp,"This model is also a PyTorch "),ur=a(Hp,"A",{href:!0,rel:!0});var _y=i(ur);lf=n(_y,"torch.nn.Module"),_y.forEach(t),df=n(Hp,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Hp.forEach(t),cf=h(Zt),xt=a(Zt,"DIV",{class:!0});var ws=i(xt);w(fr.$$.fragment,ws),pf=h(ws),$o=a(ws,"P",{});var Xi=i($o);hf=n(Xi,"The "),_i=a(Xi,"A",{href:!0});var by=i(_i);mf=n(by,"MobileBertForPreTraining"),by.forEach(t),uf=n(Xi," forward method, overrides the "),Jl=a(Xi,"CODE",{});var ky=i(Jl);ff=n(ky,"__call__"),ky.forEach(t),gf=n(Xi," special method."),Xi.forEach(t),_f=h(ws),w(_n.$$.fragment,ws),bf=h(ws),w(bn.$$.fragment,ws),ws.forEach(t),Zt.forEach(t),Yc=h(s),Mo=a(s,"H2",{class:!0});var Qp=i(Mo);kn=a(Qp,"A",{id:!0,class:!0,href:!0});var vy=i(kn);Yl=a(vy,"SPAN",{});var Ty=i(Yl);w(gr.$$.fragment,Ty),Ty.forEach(t),vy.forEach(t),kf=h(Qp),Xl=a(Qp,"SPAN",{});var yy=i(Xl);vf=n(yy,"MobileBertForMaskedLM"),yy.forEach(t),Qp.forEach(t),Xc=h(s),ht=a(s,"DIV",{class:!0});var eo=i(ht);w(_r.$$.fragment,eo),Tf=h(eo),br=a(eo,"P",{});var Vp=i(br);yf=n(Vp,"MobileBert Model with a "),Zl=a(Vp,"CODE",{});var wy=i(Zl);wf=n(wy,"language modeling"),wy.forEach(t),$f=n(Vp," head on top."),Vp.forEach(t),Mf=h(eo),kr=a(eo,"P",{});var Gp=i(kr);Ff=n(Gp,"This model inherits from "),bi=a(Gp,"A",{href:!0});var $y=i(bi);Ef=n($y,"PreTrainedModel"),$y.forEach(t),Bf=n(Gp,`. 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.)`),Gp.forEach(t),xf=h(eo),vr=a(eo,"P",{});var Jp=i(vr);zf=n(Jp,"This model is also a PyTorch "),Tr=a(Jp,"A",{href:!0,rel:!0});var My=i(Tr);qf=n(My,"torch.nn.Module"),My.forEach(t),Pf=n(Jp,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Jp.forEach(t),jf=h(eo),zt=a(eo,"DIV",{class:!0});var $s=i(zt);w(yr.$$.fragment,$s),Cf=h($s),Fo=a($s,"P",{});var Zi=i(Fo);Nf=n(Zi,"The "),ki=a(Zi,"A",{href:!0});var Fy=i(ki);Af=n(Fy,"MobileBertForMaskedLM"),Fy.forEach(t),Of=n(Zi," forward method, overrides the "),ed=a(Zi,"CODE",{});var Ey=i(ed);Df=n(Ey,"__call__"),Ey.forEach(t),Sf=n(Zi," special method."),Zi.forEach(t),If=h($s),w(vn.$$.fragment,$s),Lf=h($s),w(Tn.$$.fragment,$s),$s.forEach(t),eo.forEach(t),Zc=h(s),Eo=a(s,"H2",{class:!0});var Yp=i(Eo);yn=a(Yp,"A",{id:!0,class:!0,href:!0});var By=i(yn);td=a(By,"SPAN",{});var xy=i(td);w(wr.$$.fragment,xy),xy.forEach(t),By.forEach(t),Wf=h(Yp),od=a(Yp,"SPAN",{});var zy=i(od);Rf=n(zy,"MobileBertForNextSentencePrediction"),zy.forEach(t),Yp.forEach(t),ep=h(s),mt=a(s,"DIV",{class:!0});var to=i(mt);w($r.$$.fragment,to),Uf=h(to),Mr=a(to,"P",{});var Xp=i(Mr);Kf=n(Xp,"MobileBert Model with a "),nd=a(Xp,"CODE",{});var qy=i(nd);Hf=n(qy,"next sentence prediction (classification)"),qy.forEach(t),Qf=n(Xp," head on top."),Xp.forEach(t),Vf=h(to),Fr=a(to,"P",{});var Zp=i(Fr);Gf=n(Zp,"This model inherits from "),vi=a(Zp,"A",{href:!0});var Py=i(vi);Jf=n(Py,"PreTrainedModel"),Py.forEach(t),Yf=n(Zp,`. 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.)`),Zp.forEach(t),Xf=h(to),Er=a(to,"P",{});var eh=i(Er);Zf=n(eh,"This model is also a PyTorch "),Br=a(eh,"A",{href:!0,rel:!0});var jy=i(Br);eg=n(jy,"torch.nn.Module"),jy.forEach(t),tg=n(eh,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),eh.forEach(t),og=h(to),qt=a(to,"DIV",{class:!0});var Ms=i(qt);w(xr.$$.fragment,Ms),ng=h(Ms),Bo=a(Ms,"P",{});var el=i(Bo);sg=n(el,"The "),Ti=a(el,"A",{href:!0});var Cy=i(Ti);rg=n(Cy,"MobileBertForNextSentencePrediction"),Cy.forEach(t),ag=n(el," forward method, overrides the "),sd=a(el,"CODE",{});var Ny=i(sd);ig=n(Ny,"__call__"),Ny.forEach(t),lg=n(el," special method."),el.forEach(t),dg=h(Ms),w(wn.$$.fragment,Ms),cg=h(Ms),w($n.$$.fragment,Ms),Ms.forEach(t),to.forEach(t),tp=h(s),xo=a(s,"H2",{class:!0});var th=i(xo);Mn=a(th,"A",{id:!0,class:!0,href:!0});var Ay=i(Mn);rd=a(Ay,"SPAN",{});var Oy=i(rd);w(zr.$$.fragment,Oy),Oy.forEach(t),Ay.forEach(t),pg=h(th),ad=a(th,"SPAN",{});var Dy=i(ad);hg=n(Dy,"MobileBertForSequenceClassification"),Dy.forEach(t),th.forEach(t),op=h(s),ut=a(s,"DIV",{class:!0});var oo=i(ut);w(qr.$$.fragment,oo),mg=h(oo),id=a(oo,"P",{});var Sy=i(id);ug=n(Sy,`MobileBert Model transformer with a sequence classification/regression head on top (a linear layer on top of the
pooled output) e.g. for GLUE tasks.`),Sy.forEach(t),fg=h(oo),Pr=a(oo,"P",{});var oh=i(Pr);gg=n(oh,"This model inherits from "),yi=a(oh,"A",{href:!0});var Iy=i(yi);_g=n(Iy,"PreTrainedModel"),Iy.forEach(t),bg=n(oh,`. 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.)`),oh.forEach(t),kg=h(oo),jr=a(oo,"P",{});var nh=i(jr);vg=n(nh,"This model is also a PyTorch "),Cr=a(nh,"A",{href:!0,rel:!0});var Ly=i(Cr);Tg=n(Ly,"torch.nn.Module"),Ly.forEach(t),yg=n(nh,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),nh.forEach(t),wg=h(oo),bt=a(oo,"DIV",{class:!0});var no=i(bt);w(Nr.$$.fragment,no),$g=h(no),zo=a(no,"P",{});var tl=i(zo);Mg=n(tl,"The "),wi=a(tl,"A",{href:!0});var Wy=i(wi);Fg=n(Wy,"MobileBertForSequenceClassification"),Wy.forEach(t),Eg=n(tl," forward method, overrides the "),ld=a(tl,"CODE",{});var Ry=i(ld);Bg=n(Ry,"__call__"),Ry.forEach(t),xg=n(tl," special method."),tl.forEach(t),zg=h(no),w(Fn.$$.fragment,no),qg=h(no),w(En.$$.fragment,no),Pg=h(no),w(Bn.$$.fragment,no),no.forEach(t),oo.forEach(t),np=h(s),qo=a(s,"H2",{class:!0});var sh=i(qo);xn=a(sh,"A",{id:!0,class:!0,href:!0});var Uy=i(xn);dd=a(Uy,"SPAN",{});var Ky=i(dd);w(Ar.$$.fragment,Ky),Ky.forEach(t),Uy.forEach(t),jg=h(sh),cd=a(sh,"SPAN",{});var Hy=i(cd);Cg=n(Hy,"MobileBertForMultipleChoice"),Hy.forEach(t),sh.forEach(t),sp=h(s),ft=a(s,"DIV",{class:!0});var so=i(ft);w(Or.$$.fragment,so),Ng=h(so),pd=a(so,"P",{});var Qy=i(pd);Ag=n(Qy,`MobileBert 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.`),Qy.forEach(t),Og=h(so),Dr=a(so,"P",{});var rh=i(Dr);Dg=n(rh,"This model inherits from "),$i=a(rh,"A",{href:!0});var Vy=i($i);Sg=n(Vy,"PreTrainedModel"),Vy.forEach(t),Ig=n(rh,`. 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.)`),rh.forEach(t),Lg=h(so),Sr=a(so,"P",{});var ah=i(Sr);Wg=n(ah,"This model is also a PyTorch "),Ir=a(ah,"A",{href:!0,rel:!0});var Gy=i(Ir);Rg=n(Gy,"torch.nn.Module"),Gy.forEach(t),Ug=n(ah,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),ah.forEach(t),Kg=h(so),Pt=a(so,"DIV",{class:!0});var Fs=i(Pt);w(Lr.$$.fragment,Fs),Hg=h(Fs),Po=a(Fs,"P",{});var ol=i(Po);Qg=n(ol,"The "),Mi=a(ol,"A",{href:!0});var Jy=i(Mi);Vg=n(Jy,"MobileBertForMultipleChoice"),Jy.forEach(t),Gg=n(ol," forward method, overrides the "),hd=a(ol,"CODE",{});var Yy=i(hd);Jg=n(Yy,"__call__"),Yy.forEach(t),Yg=n(ol," special method."),ol.forEach(t),Xg=h(Fs),w(zn.$$.fragment,Fs),Zg=h(Fs),w(qn.$$.fragment,Fs),Fs.forEach(t),so.forEach(t),rp=h(s),jo=a(s,"H2",{class:!0});var ih=i(jo);Pn=a(ih,"A",{id:!0,class:!0,href:!0});var Xy=i(Pn);md=a(Xy,"SPAN",{});var Zy=i(md);w(Wr.$$.fragment,Zy),Zy.forEach(t),Xy.forEach(t),e_=h(ih),ud=a(ih,"SPAN",{});var ew=i(ud);t_=n(ew,"MobileBertForTokenClassification"),ew.forEach(t),ih.forEach(t),ap=h(s),gt=a(s,"DIV",{class:!0});var ro=i(gt);w(Rr.$$.fragment,ro),o_=h(ro),fd=a(ro,"P",{});var tw=i(fd);n_=n(tw,`MobileBert 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.`),tw.forEach(t),s_=h(ro),Ur=a(ro,"P",{});var lh=i(Ur);r_=n(lh,"This model inherits from "),Fi=a(lh,"A",{href:!0});var ow=i(Fi);a_=n(ow,"PreTrainedModel"),ow.forEach(t),i_=n(lh,`. 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.)`),lh.forEach(t),l_=h(ro),Kr=a(ro,"P",{});var dh=i(Kr);d_=n(dh,"This model is also a PyTorch "),Hr=a(dh,"A",{href:!0,rel:!0});var nw=i(Hr);c_=n(nw,"torch.nn.Module"),nw.forEach(t),p_=n(dh,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),dh.forEach(t),h_=h(ro),jt=a(ro,"DIV",{class:!0});var Es=i(jt);w(Qr.$$.fragment,Es),m_=h(Es),Co=a(Es,"P",{});var nl=i(Co);u_=n(nl,"The "),Ei=a(nl,"A",{href:!0});var sw=i(Ei);f_=n(sw,"MobileBertForTokenClassification"),sw.forEach(t),g_=n(nl," forward method, overrides the "),gd=a(nl,"CODE",{});var rw=i(gd);__=n(rw,"__call__"),rw.forEach(t),b_=n(nl," special method."),nl.forEach(t),k_=h(Es),w(jn.$$.fragment,Es),v_=h(Es),w(Cn.$$.fragment,Es),Es.forEach(t),ro.forEach(t),ip=h(s),No=a(s,"H2",{class:!0});var ch=i(No);Nn=a(ch,"A",{id:!0,class:!0,href:!0});var aw=i(Nn);_d=a(aw,"SPAN",{});var iw=i(_d);w(Vr.$$.fragment,iw),iw.forEach(t),aw.forEach(t),T_=h(ch),bd=a(ch,"SPAN",{});var lw=i(bd);y_=n(lw,"MobileBertForQuestionAnswering"),lw.forEach(t),ch.forEach(t),lp=h(s),_t=a(s,"DIV",{class:!0});var ao=i(_t);w(Gr.$$.fragment,ao),w_=h(ao),Ao=a(ao,"P",{});var sl=i(Ao);$_=n(sl,`MobileBert 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 `),kd=a(sl,"CODE",{});var dw=i(kd);M_=n(dw,"span start logits"),dw.forEach(t),F_=n(sl," and "),vd=a(sl,"CODE",{});var cw=i(vd);E_=n(cw,"span end logits"),cw.forEach(t),B_=n(sl,")."),sl.forEach(t),x_=h(ao),Jr=a(ao,"P",{});var ph=i(Jr);z_=n(ph,"This model inherits from "),Bi=a(ph,"A",{href:!0});var pw=i(Bi);q_=n(pw,"PreTrainedModel"),pw.forEach(t),P_=n(ph,`. 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.)`),ph.forEach(t),j_=h(ao),Yr=a(ao,"P",{});var hh=i(Yr);C_=n(hh,"This model is also a PyTorch "),Xr=a(hh,"A",{href:!0,rel:!0});var hw=i(Xr);N_=n(hw,"torch.nn.Module"),hw.forEach(t),A_=n(hh,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),hh.forEach(t),O_=h(ao),Ct=a(ao,"DIV",{class:!0});var Bs=i(Ct);w(Zr.$$.fragment,Bs),D_=h(Bs),Oo=a(Bs,"P",{});var rl=i(Oo);S_=n(rl,"The "),xi=a(rl,"A",{href:!0});var mw=i(xi);I_=n(mw,"MobileBertForQuestionAnswering"),mw.forEach(t),L_=n(rl," forward method, overrides the "),Td=a(rl,"CODE",{});var uw=i(Td);W_=n(uw,"__call__"),uw.forEach(t),R_=n(rl," special method."),rl.forEach(t),U_=h(Bs),w(An.$$.fragment,Bs),K_=h(Bs),w(On.$$.fragment,Bs),Bs.forEach(t),ao.forEach(t),dp=h(s),Do=a(s,"H2",{class:!0});var mh=i(Do);Dn=a(mh,"A",{id:!0,class:!0,href:!0});var fw=i(Dn);yd=a(fw,"SPAN",{});var gw=i(yd);w(ea.$$.fragment,gw),gw.forEach(t),fw.forEach(t),H_=h(mh),wd=a(mh,"SPAN",{});var _w=i(wd);Q_=n(_w,"TFMobileBertModel"),_w.forEach(t),mh.forEach(t),cp=h(s),tt=a(s,"DIV",{class:!0});var It=i(tt);w(ta.$$.fragment,It),V_=h(It),$d=a(It,"P",{});var bw=i($d);G_=n(bw,"The bare MobileBert Model transformer outputting raw hidden-states without any specific head on top."),bw.forEach(t),J_=h(It),oa=a(It,"P",{});var uh=i(oa);Y_=n(uh,"This model inherits from "),zi=a(uh,"A",{href:!0});var kw=i(zi);X_=n(kw,"TFPreTrainedModel"),kw.forEach(t),Z_=n(uh,`. 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.)`),uh.forEach(t),eb=h(It),na=a(It,"P",{});var fh=i(na);tb=n(fh,"This model is also a "),sa=a(fh,"A",{href:!0,rel:!0});var vw=i(sa);ob=n(vw,"tf.keras.Model"),vw.forEach(t),nb=n(fh,` 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.`),fh.forEach(t),sb=h(It),w(Sn.$$.fragment,It),rb=h(It),Nt=a(It,"DIV",{class:!0});var xs=i(Nt);w(ra.$$.fragment,xs),ab=h(xs),So=a(xs,"P",{});var al=i(So);ib=n(al,"The "),qi=a(al,"A",{href:!0});var Tw=i(qi);lb=n(Tw,"TFMobileBertModel"),Tw.forEach(t),db=n(al," forward method, overrides the "),Md=a(al,"CODE",{});var yw=i(Md);cb=n(yw,"__call__"),yw.forEach(t),pb=n(al," special method."),al.forEach(t),hb=h(xs),w(In.$$.fragment,xs),mb=h(xs),w(Ln.$$.fragment,xs),xs.forEach(t),It.forEach(t),pp=h(s),Io=a(s,"H2",{class:!0});var gh=i(Io);Wn=a(gh,"A",{id:!0,class:!0,href:!0});var ww=i(Wn);Fd=a(ww,"SPAN",{});var $w=i(Fd);w(aa.$$.fragment,$w),$w.forEach(t),ww.forEach(t),ub=h(gh),Ed=a(gh,"SPAN",{});var Mw=i(Ed);fb=n(Mw,"TFMobileBertForPreTraining"),Mw.forEach(t),gh.forEach(t),hp=h(s),ot=a(s,"DIV",{class:!0});var Lt=i(ot);w(ia.$$.fragment,Lt),gb=h(Lt),Lo=a(Lt,"P",{});var il=i(Lo);_b=n(il,"MobileBert Model with two heads on top as done during the pretraining: a "),Bd=a(il,"CODE",{});var Fw=i(Bd);bb=n(Fw,"masked language modeling"),Fw.forEach(t),kb=n(il,` head and a
`),xd=a(il,"CODE",{});var Ew=i(xd);vb=n(Ew,"next sentence prediction (classification)"),Ew.forEach(t),Tb=n(il," head."),il.forEach(t),yb=h(Lt),la=a(Lt,"P",{});var _h=i(la);wb=n(_h,"This model inherits from "),Pi=a(_h,"A",{href:!0});var Bw=i(Pi);$b=n(Bw,"TFPreTrainedModel"),Bw.forEach(t),Mb=n(_h,`. 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.)`),_h.forEach(t),Fb=h(Lt),da=a(Lt,"P",{});var bh=i(da);Eb=n(bh,"This model is also a "),ca=a(bh,"A",{href:!0,rel:!0});var xw=i(ca);Bb=n(xw,"tf.keras.Model"),xw.forEach(t),xb=n(bh,` 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.`),bh.forEach(t),zb=h(Lt),w(Rn.$$.fragment,Lt),qb=h(Lt),At=a(Lt,"DIV",{class:!0});var zs=i(At);w(pa.$$.fragment,zs),Pb=h(zs),Wo=a(zs,"P",{});var ll=i(Wo);jb=n(ll,"The "),ji=a(ll,"A",{href:!0});var zw=i(ji);Cb=n(zw,"TFMobileBertForPreTraining"),zw.forEach(t),Nb=n(ll," forward method, overrides the "),zd=a(ll,"CODE",{});var qw=i(zd);Ab=n(qw,"__call__"),qw.forEach(t),Ob=n(ll," special method."),ll.forEach(t),Db=h(zs),w(Un.$$.fragment,zs),Sb=h(zs),w(Kn.$$.fragment,zs),zs.forEach(t),Lt.forEach(t),mp=h(s),Ro=a(s,"H2",{class:!0});var kh=i(Ro);Hn=a(kh,"A",{id:!0,class:!0,href:!0});var Pw=i(Hn);qd=a(Pw,"SPAN",{});var jw=i(qd);w(ha.$$.fragment,jw),jw.forEach(t),Pw.forEach(t),Ib=h(kh),Pd=a(kh,"SPAN",{});var Cw=i(Pd);Lb=n(Cw,"TFMobileBertForMaskedLM"),Cw.forEach(t),kh.forEach(t),up=h(s),nt=a(s,"DIV",{class:!0});var Wt=i(nt);w(ma.$$.fragment,Wt),Wb=h(Wt),ua=a(Wt,"P",{});var vh=i(ua);Rb=n(vh,"MobileBert Model with a "),jd=a(vh,"CODE",{});var Nw=i(jd);Ub=n(Nw,"language modeling"),Nw.forEach(t),Kb=n(vh," head on top."),vh.forEach(t),Hb=h(Wt),fa=a(Wt,"P",{});var Th=i(fa);Qb=n(Th,"This model inherits from "),Ci=a(Th,"A",{href:!0});var Aw=i(Ci);Vb=n(Aw,"TFPreTrainedModel"),Aw.forEach(t),Gb=n(Th,`. 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.)`),Th.forEach(t),Jb=h(Wt),ga=a(Wt,"P",{});var yh=i(ga);Yb=n(yh,"This model is also a "),_a=a(yh,"A",{href:!0,rel:!0});var Ow=i(_a);Xb=n(Ow,"tf.keras.Model"),Ow.forEach(t),Zb=n(yh,` 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.`),yh.forEach(t),ek=h(Wt),w(Qn.$$.fragment,Wt),tk=h(Wt),kt=a(Wt,"DIV",{class:!0});var io=i(kt);w(ba.$$.fragment,io),ok=h(io),Uo=a(io,"P",{});var dl=i(Uo);nk=n(dl,"The "),Ni=a(dl,"A",{href:!0});var Dw=i(Ni);sk=n(Dw,"TFMobileBertForMaskedLM"),Dw.forEach(t),rk=n(dl," forward method, overrides the "),Cd=a(dl,"CODE",{});var Sw=i(Cd);ak=n(Sw,"__call__"),Sw.forEach(t),ik=n(dl," special method."),dl.forEach(t),lk=h(io),w(Vn.$$.fragment,io),dk=h(io),w(Gn.$$.fragment,io),ck=h(io),w(Jn.$$.fragment,io),io.forEach(t),Wt.forEach(t),fp=h(s),Ko=a(s,"H2",{class:!0});var wh=i(Ko);Yn=a(wh,"A",{id:!0,class:!0,href:!0});var Iw=i(Yn);Nd=a(Iw,"SPAN",{});var Lw=i(Nd);w(ka.$$.fragment,Lw),Lw.forEach(t),Iw.forEach(t),pk=h(wh),Ad=a(wh,"SPAN",{});var Ww=i(Ad);hk=n(Ww,"TFMobileBertForNextSentencePrediction"),Ww.forEach(t),wh.forEach(t),gp=h(s),st=a(s,"DIV",{class:!0});var Rt=i(st);w(va.$$.fragment,Rt),mk=h(Rt),Ta=a(Rt,"P",{});var $h=i(Ta);uk=n($h,"MobileBert Model with a "),Od=a($h,"CODE",{});var Rw=i(Od);fk=n(Rw,"next sentence prediction (classification)"),Rw.forEach(t),gk=n($h," head on top."),$h.forEach(t),_k=h(Rt),ya=a(Rt,"P",{});var Mh=i(ya);bk=n(Mh,"This model inherits from "),Ai=a(Mh,"A",{href:!0});var Uw=i(Ai);kk=n(Uw,"TFPreTrainedModel"),Uw.forEach(t),vk=n(Mh,`. 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.)`),Mh.forEach(t),Tk=h(Rt),wa=a(Rt,"P",{});var Fh=i(wa);yk=n(Fh,"This model is also a "),$a=a(Fh,"A",{href:!0,rel:!0});var Kw=i($a);wk=n(Kw,"tf.keras.Model"),Kw.forEach(t),$k=n(Fh,` 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.`),Fh.forEach(t),Mk=h(Rt),w(Xn.$$.fragment,Rt),Fk=h(Rt),Ot=a(Rt,"DIV",{class:!0});var qs=i(Ot);w(Ma.$$.fragment,qs),Ek=h(qs),Ho=a(qs,"P",{});var cl=i(Ho);Bk=n(cl,"The "),Oi=a(cl,"A",{href:!0});var Hw=i(Oi);xk=n(Hw,"TFMobileBertForNextSentencePrediction"),Hw.forEach(t),zk=n(cl," forward method, overrides the "),Dd=a(cl,"CODE",{});var Qw=i(Dd);qk=n(Qw,"__call__"),Qw.forEach(t),Pk=n(cl," special method."),cl.forEach(t),jk=h(qs),w(Zn.$$.fragment,qs),Ck=h(qs),w(es.$$.fragment,qs),qs.forEach(t),Rt.forEach(t),_p=h(s),Qo=a(s,"H2",{class:!0});var Eh=i(Qo);ts=a(Eh,"A",{id:!0,class:!0,href:!0});var Vw=i(ts);Sd=a(Vw,"SPAN",{});var Gw=i(Sd);w(Fa.$$.fragment,Gw),Gw.forEach(t),Vw.forEach(t),Nk=h(Eh),Id=a(Eh,"SPAN",{});var Jw=i(Id);Ak=n(Jw,"TFMobileBertForSequenceClassification"),Jw.forEach(t),Eh.forEach(t),bp=h(s),rt=a(s,"DIV",{class:!0});var Ut=i(rt);w(Ea.$$.fragment,Ut),Ok=h(Ut),Ld=a(Ut,"P",{});var Yw=i(Ld);Dk=n(Yw,`MobileBert Model transformer with a sequence classification/regression head on top (a linear layer on top of the
pooled output) e.g. for GLUE tasks.`),Yw.forEach(t),Sk=h(Ut),Ba=a(Ut,"P",{});var Bh=i(Ba);Ik=n(Bh,"This model inherits from "),Di=a(Bh,"A",{href:!0});var Xw=i(Di);Lk=n(Xw,"TFPreTrainedModel"),Xw.forEach(t),Wk=n(Bh,`. 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.)`),Bh.forEach(t),Rk=h(Ut),xa=a(Ut,"P",{});var xh=i(xa);Uk=n(xh,"This model is also a "),za=a(xh,"A",{href:!0,rel:!0});var Zw=i(za);Kk=n(Zw,"tf.keras.Model"),Zw.forEach(t),Hk=n(xh,` 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.`),xh.forEach(t),Qk=h(Ut),w(os.$$.fragment,Ut),Vk=h(Ut),vt=a(Ut,"DIV",{class:!0});var lo=i(vt);w(qa.$$.fragment,lo),Gk=h(lo),Vo=a(lo,"P",{});var pl=i(Vo);Jk=n(pl,"The "),Si=a(pl,"A",{href:!0});var e1=i(Si);Yk=n(e1,"TFMobileBertForSequenceClassification"),e1.forEach(t),Xk=n(pl," forward method, overrides the "),Wd=a(pl,"CODE",{});var t1=i(Wd);Zk=n(t1,"__call__"),t1.forEach(t),ev=n(pl," special method."),pl.forEach(t),tv=h(lo),w(ns.$$.fragment,lo),ov=h(lo),w(ss.$$.fragment,lo),nv=h(lo),w(rs.$$.fragment,lo),lo.forEach(t),Ut.forEach(t),kp=h(s),Go=a(s,"H2",{class:!0});var zh=i(Go);as=a(zh,"A",{id:!0,class:!0,href:!0});var o1=i(as);Rd=a(o1,"SPAN",{});var n1=i(Rd);w(Pa.$$.fragment,n1),n1.forEach(t),o1.forEach(t),sv=h(zh),Ud=a(zh,"SPAN",{});var s1=i(Ud);rv=n(s1,"TFMobileBertForMultipleChoice"),s1.forEach(t),zh.forEach(t),vp=h(s),at=a(s,"DIV",{class:!0});var Kt=i(at);w(ja.$$.fragment,Kt),av=h(Kt),Kd=a(Kt,"P",{});var r1=i(Kd);iv=n(r1,`MobileBert 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.`),r1.forEach(t),lv=h(Kt),Ca=a(Kt,"P",{});var qh=i(Ca);dv=n(qh,"This model inherits from "),Ii=a(qh,"A",{href:!0});var a1=i(Ii);cv=n(a1,"TFPreTrainedModel"),a1.forEach(t),pv=n(qh,`. 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.)`),qh.forEach(t),hv=h(Kt),Na=a(Kt,"P",{});var Ph=i(Na);mv=n(Ph,"This model is also a "),Aa=a(Ph,"A",{href:!0,rel:!0});var i1=i(Aa);uv=n(i1,"tf.keras.Model"),i1.forEach(t),fv=n(Ph,` 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.`),Ph.forEach(t),gv=h(Kt),w(is.$$.fragment,Kt),_v=h(Kt),Dt=a(Kt,"DIV",{class:!0});var Ps=i(Dt);w(Oa.$$.fragment,Ps),bv=h(Ps),Jo=a(Ps,"P",{});var hl=i(Jo);kv=n(hl,"The "),Li=a(hl,"A",{href:!0});var l1=i(Li);vv=n(l1,"TFMobileBertForMultipleChoice"),l1.forEach(t),Tv=n(hl," forward method, overrides the "),Hd=a(hl,"CODE",{});var d1=i(Hd);yv=n(d1,"__call__"),d1.forEach(t),wv=n(hl," special method."),hl.forEach(t),$v=h(Ps),w(ls.$$.fragment,Ps),Mv=h(Ps),w(ds.$$.fragment,Ps),Ps.forEach(t),Kt.forEach(t),Tp=h(s),Yo=a(s,"H2",{class:!0});var jh=i(Yo);cs=a(jh,"A",{id:!0,class:!0,href:!0});var c1=i(cs);Qd=a(c1,"SPAN",{});var p1=i(Qd);w(Da.$$.fragment,p1),p1.forEach(t),c1.forEach(t),Fv=h(jh),Vd=a(jh,"SPAN",{});var h1=i(Vd);Ev=n(h1,"TFMobileBertForTokenClassification"),h1.forEach(t),jh.forEach(t),yp=h(s),it=a(s,"DIV",{class:!0});var Ht=i(it);w(Sa.$$.fragment,Ht),Bv=h(Ht),Gd=a(Ht,"P",{});var m1=i(Gd);xv=n(m1,`MobileBert Model with a token classification head on top (a linear layer on top of the hidden-states output) e.g.
for Named-Entity-Recognition (NER) tasks.`),m1.forEach(t),zv=h(Ht),Ia=a(Ht,"P",{});var Ch=i(Ia);qv=n(Ch,"This model inherits from "),Wi=a(Ch,"A",{href:!0});var u1=i(Wi);Pv=n(u1,"TFPreTrainedModel"),u1.forEach(t),jv=n(Ch,`. 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.)`),Ch.forEach(t),Cv=h(Ht),La=a(Ht,"P",{});var Nh=i(La);Nv=n(Nh,"This model is also a "),Wa=a(Nh,"A",{href:!0,rel:!0});var f1=i(Wa);Av=n(f1,"tf.keras.Model"),f1.forEach(t),Ov=n(Nh,` 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.`),Nh.forEach(t),Dv=h(Ht),w(ps.$$.fragment,Ht),Sv=h(Ht),Tt=a(Ht,"DIV",{class:!0});var co=i(Tt);w(Ra.$$.fragment,co),Iv=h(co),Xo=a(co,"P",{});var ml=i(Xo);Lv=n(ml,"The "),Ri=a(ml,"A",{href:!0});var g1=i(Ri);Wv=n(g1,"TFMobileBertForTokenClassification"),g1.forEach(t),Rv=n(ml," forward method, overrides the "),Jd=a(ml,"CODE",{});var _1=i(Jd);Uv=n(_1,"__call__"),_1.forEach(t),Kv=n(ml," special method."),ml.forEach(t),Hv=h(co),w(hs.$$.fragment,co),Qv=h(co),w(ms.$$.fragment,co),Vv=h(co),w(us.$$.fragment,co),co.forEach(t),Ht.forEach(t),wp=h(s),Zo=a(s,"H2",{class:!0});var Ah=i(Zo);fs=a(Ah,"A",{id:!0,class:!0,href:!0});var b1=i(fs);Yd=a(b1,"SPAN",{});var k1=i(Yd);w(Ua.$$.fragment,k1),k1.forEach(t),b1.forEach(t),Gv=h(Ah),Xd=a(Ah,"SPAN",{});var v1=i(Xd);Jv=n(v1,"TFMobileBertForQuestionAnswering"),v1.forEach(t),Ah.forEach(t),$p=h(s),lt=a(s,"DIV",{class:!0});var Qt=i(lt);w(Ka.$$.fragment,Qt),Yv=h(Qt),en=a(Qt,"P",{});var ul=i(en);Xv=n(ul,`MobileBert 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 `),Zd=a(ul,"CODE",{});var T1=i(Zd);Zv=n(T1,"span start logits"),T1.forEach(t),eT=n(ul," and "),ec=a(ul,"CODE",{});var y1=i(ec);tT=n(y1,"span end logits"),y1.forEach(t),oT=n(ul,")."),ul.forEach(t),nT=h(Qt),Ha=a(Qt,"P",{});var Oh=i(Ha);sT=n(Oh,"This model inherits from "),Ui=a(Oh,"A",{href:!0});var w1=i(Ui);rT=n(w1,"TFPreTrainedModel"),w1.forEach(t),aT=n(Oh,`. 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.)`),Oh.forEach(t),iT=h(Qt),Qa=a(Qt,"P",{});var Dh=i(Qa);lT=n(Dh,"This model is also a "),Va=a(Dh,"A",{href:!0,rel:!0});var $1=i(Va);dT=n($1,"tf.keras.Model"),$1.forEach(t),cT=n(Dh,` 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.`),Dh.forEach(t),pT=h(Qt),w(gs.$$.fragment,Qt),hT=h(Qt),yt=a(Qt,"DIV",{class:!0});var po=i(yt);w(Ga.$$.fragment,po),mT=h(po),tn=a(po,"P",{});var fl=i(tn);uT=n(fl,"The "),Ki=a(fl,"A",{href:!0});var M1=i(Ki);fT=n(M1,"TFMobileBertForQuestionAnswering"),M1.forEach(t),gT=n(fl," forward method, overrides the "),tc=a(fl,"CODE",{});var F1=i(tc);_T=n(F1,"__call__"),F1.forEach(t),bT=n(fl," special method."),fl.forEach(t),kT=h(po),w(_s.$$.fragment,po),vT=h(po),w(bs.$$.fragment,po),TT=h(po),w(ks.$$.fragment,po),po.forEach(t),Qt.forEach(t),this.h()},h(){g(d,"name","hf:doc:metadata"),g(d,"content",JSON.stringify(E2)),g(u,"id","mobilebert"),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","#mobilebert"),g(m,"class","relative group"),g(re,"id","overview"),g(re,"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(re,"href","#overview"),g(S,"class","relative group"),g(ie,"href","https://arxiv.org/abs/2004.02984"),g(ie,"rel","nofollow"),g(le,"href","https://huggingface.co/vshampor"),g(le,"rel","nofollow"),g(de,"href","https://github.com/google-research/mobilebert"),g(de,"rel","nofollow"),g(ae,"id","documentation-resources"),g(ae,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),g(ae,"href","#documentation-resources"),g(I,"class","relative group"),g(Ne,"href","./tasks/sequence_classification"),g(x,"href","./tasks/token_classification"),g(Ae,"href","./tasks/question_answering"),g(Oe,"href","./tasks/masked_language_modeling"),g(De,"href","./tasks/multiple_choice"),g(Ce,"id","transformers.MobileBertConfig"),g(Ce,"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(Ce,"href","#transformers.MobileBertConfig"),g(X,"class","relative group"),g(oi,"href","/docs/transformers/v4.27.1/en/model_doc/mobilebert#transformers.MobileBertModel"),g(ni,"href","/docs/transformers/v4.27.1/en/model_doc/mobilebert#transformers.TFMobileBertModel"),g(Ns,"href","https://huggingface.co/google/mobilebert-uncased"),g(Ns,"rel","nofollow"),g(si,"href","/docs/transformers/v4.27.1/en/main_classes/configuration#transformers.PretrainedConfig"),g(ri,"href","/docs/transformers/v4.27.1/en/main_classes/configuration#transformers.PretrainedConfig"),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(rn,"id","transformers.MobileBertTokenizer"),g(rn,"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(rn,"href","#transformers.MobileBertTokenizer"),g(mo,"class","relative group"),g(ai,"href","/docs/transformers/v4.27.1/en/main_classes/tokenizer#transformers.PreTrainedTokenizer"),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(an,"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(dn,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),g(Ze,"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.MobileBertTokenizerFast"),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.MobileBertTokenizerFast"),g(fo,"class","relative group"),g(di,"href","/docs/transformers/v4.27.1/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast"),g(Yt,"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(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(hn,"id","transformers.models.mobilebert.modeling_mobilebert.MobileBertForPreTrainingOutput"),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.models.mobilebert.modeling_mobilebert.MobileBertForPreTrainingOutput"),g(_o,"class","relative group"),g(hi,"href","/docs/transformers/v4.27.1/en/model_doc/mobilebert#transformers.MobileBertForPreTraining"),g(bo,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),g(mi,"href","/docs/transformers/v4.27.1/en/model_doc/mobilebert#transformers.TFMobileBertForPreTraining"),g(ko,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),g(mn,"id","transformers.MobileBertModel"),g(mn,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),g(mn,"href","#transformers.MobileBertModel"),g(vo,"class","relative group"),g(ui,"href","/docs/transformers/v4.27.1/en/main_classes/model#transformers.PreTrainedModel"),g(ir,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),g(ir,"rel","nofollow"),g(lr,"href","https://arxiv.org/pdf/2004.02984.pdf"),g(lr,"rel","nofollow"),g(fi,"href","/docs/transformers/v4.27.1/en/model_doc/mobilebert#transformers.MobileBertModel"),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(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(gn,"id","transformers.MobileBertForPreTraining"),g(gn,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),g(gn,"href","#transformers.MobileBertForPreTraining"),g(yo,"class","relative group"),g(gi,"href","/docs/transformers/v4.27.1/en/main_classes/model#transformers.PreTrainedModel"),g(ur,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),g(ur,"rel","nofollow"),g(_i,"href","/docs/transformers/v4.27.1/en/model_doc/mobilebert#transformers.MobileBertForPreTraining"),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(pt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),g(kn,"id","transformers.MobileBertForMaskedLM"),g(kn,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),g(kn,"href","#transformers.MobileBertForMaskedLM"),g(Mo,"class","relative group"),g(bi,"href","/docs/transformers/v4.27.1/en/main_classes/model#transformers.PreTrainedModel"),g(Tr,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),g(Tr,"rel","nofollow"),g(ki,"href","/docs/transformers/v4.27.1/en/model_doc/mobilebert#transformers.MobileBertForMaskedLM"),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(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(yn,"id","transformers.MobileBertForNextSentencePrediction"),g(yn,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),g(yn,"href","#transformers.MobileBertForNextSentencePrediction"),g(Eo,"class","relative group"),g(vi,"href","/docs/transformers/v4.27.1/en/main_classes/model#transformers.PreTrainedModel"),g(Br,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),g(Br,"rel","nofollow"),g(Ti,"href","/docs/transformers/v4.27.1/en/model_doc/mobilebert#transformers.MobileBertForNextSentencePrediction"),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(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(Mn,"id","transformers.MobileBertForSequenceClassification"),g(Mn,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),g(Mn,"href","#transformers.MobileBertForSequenceClassification"),g(xo,"class","relative group"),g(yi,"href","/docs/transformers/v4.27.1/en/main_classes/model#transformers.PreTrainedModel"),g(Cr,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),g(Cr,"rel","nofollow"),g(wi,"href","/docs/transformers/v4.27.1/en/model_doc/mobilebert#transformers.MobileBertForSequenceClassification"),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(xn,"id","transformers.MobileBertForMultipleChoice"),g(xn,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),g(xn,"href","#transformers.MobileBertForMultipleChoice"),g(qo,"class","relative group"),g($i,"href","/docs/transformers/v4.27.1/en/main_classes/model#transformers.PreTrainedModel"),g(Ir,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),g(Ir,"rel","nofollow"),g(Mi,"href","/docs/transformers/v4.27.1/en/model_doc/mobilebert#transformers.MobileBertForMultipleChoice"),g(Pt,"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(Pn,"id","transformers.MobileBertForTokenClassification"),g(Pn,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),g(Pn,"href","#transformers.MobileBertForTokenClassification"),g(jo,"class","relative group"),g(Fi,"href","/docs/transformers/v4.27.1/en/main_classes/model#transformers.PreTrainedModel"),g(Hr,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),g(Hr,"rel","nofollow"),g(Ei,"href","/docs/transformers/v4.27.1/en/model_doc/mobilebert#transformers.MobileBertForTokenClassification"),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(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(Nn,"id","transformers.MobileBertForQuestionAnswering"),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.MobileBertForQuestionAnswering"),g(No,"class","relative group"),g(Bi,"href","/docs/transformers/v4.27.1/en/main_classes/model#transformers.PreTrainedModel"),g(Xr,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),g(Xr,"rel","nofollow"),g(xi,"href","/docs/transformers/v4.27.1/en/model_doc/mobilebert#transformers.MobileBertForQuestionAnswering"),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(_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(Dn,"id","transformers.TFMobileBertModel"),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.TFMobileBertModel"),g(Do,"class","relative group"),g(zi,"href","/docs/transformers/v4.27.1/en/main_classes/model#transformers.TFPreTrainedModel"),g(sa,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),g(sa,"rel","nofollow"),g(qi,"href","/docs/transformers/v4.27.1/en/model_doc/mobilebert#transformers.TFMobileBertModel"),g(Nt,"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(Wn,"id","transformers.TFMobileBertForPreTraining"),g(Wn,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),g(Wn,"href","#transformers.TFMobileBertForPreTraining"),g(Io,"class","relative group"),g(Pi,"href","/docs/transformers/v4.27.1/en/main_classes/model#transformers.TFPreTrainedModel"),g(ca,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),g(ca,"rel","nofollow"),g(ji,"href","/docs/transformers/v4.27.1/en/model_doc/mobilebert#transformers.TFMobileBertForPreTraining"),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(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(Hn,"id","transformers.TFMobileBertForMaskedLM"),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.TFMobileBertForMaskedLM"),g(Ro,"class","relative group"),g(Ci,"href","/docs/transformers/v4.27.1/en/main_classes/model#transformers.TFPreTrainedModel"),g(_a,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),g(_a,"rel","nofollow"),g(Ni,"href","/docs/transformers/v4.27.1/en/model_doc/mobilebert#transformers.TFMobileBertForMaskedLM"),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(nt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),g(Yn,"id","transformers.TFMobileBertForNextSentencePrediction"),g(Yn,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),g(Yn,"href","#transformers.TFMobileBertForNextSentencePrediction"),g(Ko,"class","relative group"),g(Ai,"href","/docs/transformers/v4.27.1/en/main_classes/model#transformers.TFPreTrainedModel"),g($a,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),g($a,"rel","nofollow"),g(Oi,"href","/docs/transformers/v4.27.1/en/model_doc/mobilebert#transformers.TFMobileBertForNextSentencePrediction"),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(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(ts,"id","transformers.TFMobileBertForSequenceClassification"),g(ts,"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(ts,"href","#transformers.TFMobileBertForSequenceClassification"),g(Qo,"class","relative group"),g(Di,"href","/docs/transformers/v4.27.1/en/main_classes/model#transformers.TFPreTrainedModel"),g(za,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),g(za,"rel","nofollow"),g(Si,"href","/docs/transformers/v4.27.1/en/model_doc/mobilebert#transformers.TFMobileBertForSequenceClassification"),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(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(as,"id","transformers.TFMobileBertForMultipleChoice"),g(as,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),g(as,"href","#transformers.TFMobileBertForMultipleChoice"),g(Go,"class","relative group"),g(Ii,"href","/docs/transformers/v4.27.1/en/main_classes/model#transformers.TFPreTrainedModel"),g(Aa,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),g(Aa,"rel","nofollow"),g(Li,"href","/docs/transformers/v4.27.1/en/model_doc/mobilebert#transformers.TFMobileBertForMultipleChoice"),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(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(cs,"id","transformers.TFMobileBertForTokenClassification"),g(cs,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),g(cs,"href","#transformers.TFMobileBertForTokenClassification"),g(Yo,"class","relative group"),g(Wi,"href","/docs/transformers/v4.27.1/en/main_classes/model#transformers.TFPreTrainedModel"),g(Wa,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),g(Wa,"rel","nofollow"),g(Ri,"href","/docs/transformers/v4.27.1/en/model_doc/mobilebert#transformers.TFMobileBertForTokenClassification"),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(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(fs,"id","transformers.TFMobileBertForQuestionAnswering"),g(fs,"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(fs,"href","#transformers.TFMobileBertForQuestionAnswering"),g(Zo,"class","relative group"),g(Ui,"href","/docs/transformers/v4.27.1/en/main_classes/model#transformers.TFPreTrainedModel"),g(Va,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),g(Va,"rel","nofollow"),g(Ki,"href","/docs/transformers/v4.27.1/en/model_doc/mobilebert#transformers.TFMobileBertForQuestionAnswering"),g(yt,"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")},m(s,b){e(document.head,d),_(s,v,b),_(s,m,b),e(m,u),e(u,k),$(l,k,null),e(m,c),e(m,z),e(z,ve),_(s,me,b),_(s,S,b),e(S,re),e(re,Z),$(T,Z,null),e(S,Te),e(S,K),e(K,ye),_(s,ue,b),_(s,L,b),e(L,we),e(L,ie),e(ie,Q),e(L,$e),_(s,fe,b),_(s,R,b),e(R,Me),_(s,ge,b),_(s,U,b),e(U,ce),e(ce,Fe),_(s,te,b),_(s,P,b),e(P,N),_(s,_e,b),_(s,W,b),e(W,pe),e(pe,Ee),e(W,V),e(W,he),e(he,Be),_(s,C,b),_(s,se,b),e(se,G),e(se,le),e(le,xe),e(se,J),e(se,de),e(de,ze),e(se,O),_(s,be,b),_(s,I,b),e(I,ae),e(ae,ee),$(j,ee,null),e(I,qe),e(I,A),e(A,Pe),_(s,ke,b),_(s,f,b),e(f,B),e(B,Ne),e(Ne,oe),e(f,Re),e(f,Se),e(Se,x),e(x,Ue),e(f,Ke),e(f,Ie),e(Ie,Ae),e(Ae,He),e(f,D),e(f,H),e(H,Oe),e(Oe,Qe),e(f,Y),e(f,Le),e(Le,De),e(De,je),_(s,We,b),_(s,X,b),e(X,Ce),e(Ce,gl),$(js,gl,null),e(X,Sh),e(X,_l),e(_l,Ih),_(s,Sc,b),_(s,dt,b),$(Cs,dt,null),e(dt,Lh),e(dt,Vt),e(Vt,Wh),e(Vt,oi),e(oi,Rh),e(Vt,Uh),e(Vt,ni),e(ni,Kh),e(Vt,Hh),e(Vt,Ns),e(Ns,Qh),e(Vt,Vh),e(dt,Gh),e(dt,ho),e(ho,Jh),e(ho,si),e(si,Yh),e(ho,Xh),e(ho,ri),e(ri,Zh),e(ho,em),e(dt,tm),$(sn,dt,null),e(dt,om),e(dt,bl),e(bl,nm),_(s,Ic,b),_(s,mo,b),e(mo,rn),e(rn,kl),$(As,kl,null),e(mo,sm),e(mo,vl),e(vl,rm),_(s,Lc,b),_(s,Ze,b),$(Os,Ze,null),e(Ze,am),e(Ze,Tl),e(Tl,im),e(Ze,lm),e(Ze,Ds),e(Ds,dm),e(Ds,ai),e(ai,cm),e(Ds,pm),e(Ze,hm),e(Ze,Jt),$(Ss,Jt,null),e(Jt,mm),e(Jt,yl),e(yl,um),e(Jt,fm),e(Jt,Is),e(Is,ii),e(ii,gm),e(ii,wl),e(wl,_m),e(Is,bm),e(Is,li),e(li,km),e(li,$l),e($l,vm),e(Ze,Tm),e(Ze,an),$(Ls,an,null),e(an,ym),e(an,Ml),e(Ml,wm),e(Ze,$m),e(Ze,Ft),$(Ws,Ft,null),e(Ft,Mm),e(Ft,Fl),e(Fl,Fm),e(Ft,Em),$(ln,Ft,null),e(Ft,Bm),e(Ft,uo),e(uo,xm),e(uo,El),e(El,zm),e(uo,qm),e(uo,Bl),e(Bl,Pm),e(uo,jm),e(Ze,Cm),e(Ze,dn),$(Rs,dn,null),e(dn,Nm),e(dn,Us),e(Us,Am),e(Us,xl),e(xl,Om),e(Us,Dm),_(s,Wc,b),_(s,fo,b),e(fo,cn),e(cn,zl),$(Ks,zl,null),e(fo,Sm),e(fo,ql),e(ql,Im),_(s,Rc,b),_(s,ct,b),$(Hs,ct,null),e(ct,Lm),e(ct,Qs),e(Qs,Wm),e(Qs,Pl),e(Pl,Rm),e(Qs,Um),e(ct,Km),e(ct,Vs),e(Vs,Hm),e(Vs,di),e(di,Qm),e(Vs,Vm),e(ct,Gm),e(ct,Yt),$(Gs,Yt,null),e(Yt,Jm),e(Yt,jl),e(jl,Ym),e(Yt,Xm),e(Yt,Js),e(Js,ci),e(ci,Zm),e(ci,Cl),e(Cl,eu),e(Js,tu),e(Js,pi),e(pi,ou),e(pi,Nl),e(Nl,nu),e(ct,su),e(ct,Et),$(Ys,Et,null),e(Et,ru),e(Et,Al),e(Al,au),e(Et,iu),$(pn,Et,null),e(Et,lu),e(Et,go),e(go,du),e(go,Ol),e(Ol,cu),e(go,pu),e(go,Dl),e(Dl,hu),e(go,mu),_(s,Uc,b),_(s,_o,b),e(_o,hn),e(hn,Sl),$(Xs,Sl,null),e(_o,uu),e(_o,Il),e(Il,fu),_(s,Kc,b),_(s,bo,b),$(Zs,bo,null),e(bo,gu),e(bo,er),e(er,_u),e(er,hi),e(hi,bu),e(er,ku),_(s,Hc,b),_(s,ko,b),$(tr,ko,null),e(ko,vu),e(ko,or),e(or,Tu),e(or,mi),e(mi,yu),e(or,wu),_(s,Qc,b),_(s,vo,b),e(vo,mn),e(mn,Ll),$(nr,Ll,null),e(vo,$u),e(vo,Wl),e(Wl,Mu),_(s,Vc,b),_(s,et,b),$(sr,et,null),e(et,Fu),e(et,Rl),e(Rl,Eu),e(et,Bu),e(et,rr),e(rr,xu),e(rr,ui),e(ui,zu),e(rr,qu),e(et,Pu),e(et,ar),e(ar,ju),e(ar,ir),e(ir,Cu),e(ar,Nu),e(et,Au),e(et,Ul),e(Ul,lr),e(lr,Ou),e(et,Du),e(et,Bt),$(dr,Bt,null),e(Bt,Su),e(Bt,To),e(To,Iu),e(To,fi),e(fi,Lu),e(To,Wu),e(To,Kl),e(Kl,Ru),e(To,Uu),e(Bt,Ku),$(un,Bt,null),e(Bt,Hu),$(fn,Bt,null),_(s,Gc,b),_(s,yo,b),e(yo,gn),e(gn,Hl),$(cr,Hl,null),e(yo,Qu),e(yo,Ql),e(Ql,Vu),_(s,Jc,b),_(s,pt,b),$(pr,pt,null),e(pt,Gu),e(pt,wo),e(wo,Ju),e(wo,Vl),e(Vl,Yu),e(wo,Xu),e(wo,Gl),e(Gl,Zu),e(wo,ef),e(pt,tf),e(pt,hr),e(hr,of),e(hr,gi),e(gi,nf),e(hr,sf),e(pt,rf),e(pt,mr),e(mr,af),e(mr,ur),e(ur,lf),e(mr,df),e(pt,cf),e(pt,xt),$(fr,xt,null),e(xt,pf),e(xt,$o),e($o,hf),e($o,_i),e(_i,mf),e($o,uf),e($o,Jl),e(Jl,ff),e($o,gf),e(xt,_f),$(_n,xt,null),e(xt,bf),$(bn,xt,null),_(s,Yc,b),_(s,Mo,b),e(Mo,kn),e(kn,Yl),$(gr,Yl,null),e(Mo,kf),e(Mo,Xl),e(Xl,vf),_(s,Xc,b),_(s,ht,b),$(_r,ht,null),e(ht,Tf),e(ht,br),e(br,yf),e(br,Zl),e(Zl,wf),e(br,$f),e(ht,Mf),e(ht,kr),e(kr,Ff),e(kr,bi),e(bi,Ef),e(kr,Bf),e(ht,xf),e(ht,vr),e(vr,zf),e(vr,Tr),e(Tr,qf),e(vr,Pf),e(ht,jf),e(ht,zt),$(yr,zt,null),e(zt,Cf),e(zt,Fo),e(Fo,Nf),e(Fo,ki),e(ki,Af),e(Fo,Of),e(Fo,ed),e(ed,Df),e(Fo,Sf),e(zt,If),$(vn,zt,null),e(zt,Lf),$(Tn,zt,null),_(s,Zc,b),_(s,Eo,b),e(Eo,yn),e(yn,td),$(wr,td,null),e(Eo,Wf),e(Eo,od),e(od,Rf),_(s,ep,b),_(s,mt,b),$($r,mt,null),e(mt,Uf),e(mt,Mr),e(Mr,Kf),e(Mr,nd),e(nd,Hf),e(Mr,Qf),e(mt,Vf),e(mt,Fr),e(Fr,Gf),e(Fr,vi),e(vi,Jf),e(Fr,Yf),e(mt,Xf),e(mt,Er),e(Er,Zf),e(Er,Br),e(Br,eg),e(Er,tg),e(mt,og),e(mt,qt),$(xr,qt,null),e(qt,ng),e(qt,Bo),e(Bo,sg),e(Bo,Ti),e(Ti,rg),e(Bo,ag),e(Bo,sd),e(sd,ig),e(Bo,lg),e(qt,dg),$(wn,qt,null),e(qt,cg),$($n,qt,null),_(s,tp,b),_(s,xo,b),e(xo,Mn),e(Mn,rd),$(zr,rd,null),e(xo,pg),e(xo,ad),e(ad,hg),_(s,op,b),_(s,ut,b),$(qr,ut,null),e(ut,mg),e(ut,id),e(id,ug),e(ut,fg),e(ut,Pr),e(Pr,gg),e(Pr,yi),e(yi,_g),e(Pr,bg),e(ut,kg),e(ut,jr),e(jr,vg),e(jr,Cr),e(Cr,Tg),e(jr,yg),e(ut,wg),e(ut,bt),$(Nr,bt,null),e(bt,$g),e(bt,zo),e(zo,Mg),e(zo,wi),e(wi,Fg),e(zo,Eg),e(zo,ld),e(ld,Bg),e(zo,xg),e(bt,zg),$(Fn,bt,null),e(bt,qg),$(En,bt,null),e(bt,Pg),$(Bn,bt,null),_(s,np,b),_(s,qo,b),e(qo,xn),e(xn,dd),$(Ar,dd,null),e(qo,jg),e(qo,cd),e(cd,Cg),_(s,sp,b),_(s,ft,b),$(Or,ft,null),e(ft,Ng),e(ft,pd),e(pd,Ag),e(ft,Og),e(ft,Dr),e(Dr,Dg),e(Dr,$i),e($i,Sg),e(Dr,Ig),e(ft,Lg),e(ft,Sr),e(Sr,Wg),e(Sr,Ir),e(Ir,Rg),e(Sr,Ug),e(ft,Kg),e(ft,Pt),$(Lr,Pt,null),e(Pt,Hg),e(Pt,Po),e(Po,Qg),e(Po,Mi),e(Mi,Vg),e(Po,Gg),e(Po,hd),e(hd,Jg),e(Po,Yg),e(Pt,Xg),$(zn,Pt,null),e(Pt,Zg),$(qn,Pt,null),_(s,rp,b),_(s,jo,b),e(jo,Pn),e(Pn,md),$(Wr,md,null),e(jo,e_),e(jo,ud),e(ud,t_),_(s,ap,b),_(s,gt,b),$(Rr,gt,null),e(gt,o_),e(gt,fd),e(fd,n_),e(gt,s_),e(gt,Ur),e(Ur,r_),e(Ur,Fi),e(Fi,a_),e(Ur,i_),e(gt,l_),e(gt,Kr),e(Kr,d_),e(Kr,Hr),e(Hr,c_),e(Kr,p_),e(gt,h_),e(gt,jt),$(Qr,jt,null),e(jt,m_),e(jt,Co),e(Co,u_),e(Co,Ei),e(Ei,f_),e(Co,g_),e(Co,gd),e(gd,__),e(Co,b_),e(jt,k_),$(jn,jt,null),e(jt,v_),$(Cn,jt,null),_(s,ip,b),_(s,No,b),e(No,Nn),e(Nn,_d),$(Vr,_d,null),e(No,T_),e(No,bd),e(bd,y_),_(s,lp,b),_(s,_t,b),$(Gr,_t,null),e(_t,w_),e(_t,Ao),e(Ao,$_),e(Ao,kd),e(kd,M_),e(Ao,F_),e(Ao,vd),e(vd,E_),e(Ao,B_),e(_t,x_),e(_t,Jr),e(Jr,z_),e(Jr,Bi),e(Bi,q_),e(Jr,P_),e(_t,j_),e(_t,Yr),e(Yr,C_),e(Yr,Xr),e(Xr,N_),e(Yr,A_),e(_t,O_),e(_t,Ct),$(Zr,Ct,null),e(Ct,D_),e(Ct,Oo),e(Oo,S_),e(Oo,xi),e(xi,I_),e(Oo,L_),e(Oo,Td),e(Td,W_),e(Oo,R_),e(Ct,U_),$(An,Ct,null),e(Ct,K_),$(On,Ct,null),_(s,dp,b),_(s,Do,b),e(Do,Dn),e(Dn,yd),$(ea,yd,null),e(Do,H_),e(Do,wd),e(wd,Q_),_(s,cp,b),_(s,tt,b),$(ta,tt,null),e(tt,V_),e(tt,$d),e($d,G_),e(tt,J_),e(tt,oa),e(oa,Y_),e(oa,zi),e(zi,X_),e(oa,Z_),e(tt,eb),e(tt,na),e(na,tb),e(na,sa),e(sa,ob),e(na,nb),e(tt,sb),$(Sn,tt,null),e(tt,rb),e(tt,Nt),$(ra,Nt,null),e(Nt,ab),e(Nt,So),e(So,ib),e(So,qi),e(qi,lb),e(So,db),e(So,Md),e(Md,cb),e(So,pb),e(Nt,hb),$(In,Nt,null),e(Nt,mb),$(Ln,Nt,null),_(s,pp,b),_(s,Io,b),e(Io,Wn),e(Wn,Fd),$(aa,Fd,null),e(Io,ub),e(Io,Ed),e(Ed,fb),_(s,hp,b),_(s,ot,b),$(ia,ot,null),e(ot,gb),e(ot,Lo),e(Lo,_b),e(Lo,Bd),e(Bd,bb),e(Lo,kb),e(Lo,xd),e(xd,vb),e(Lo,Tb),e(ot,yb),e(ot,la),e(la,wb),e(la,Pi),e(Pi,$b),e(la,Mb),e(ot,Fb),e(ot,da),e(da,Eb),e(da,ca),e(ca,Bb),e(da,xb),e(ot,zb),$(Rn,ot,null),e(ot,qb),e(ot,At),$(pa,At,null),e(At,Pb),e(At,Wo),e(Wo,jb),e(Wo,ji),e(ji,Cb),e(Wo,Nb),e(Wo,zd),e(zd,Ab),e(Wo,Ob),e(At,Db),$(Un,At,null),e(At,Sb),$(Kn,At,null),_(s,mp,b),_(s,Ro,b),e(Ro,Hn),e(Hn,qd),$(ha,qd,null),e(Ro,Ib),e(Ro,Pd),e(Pd,Lb),_(s,up,b),_(s,nt,b),$(ma,nt,null),e(nt,Wb),e(nt,ua),e(ua,Rb),e(ua,jd),e(jd,Ub),e(ua,Kb),e(nt,Hb),e(nt,fa),e(fa,Qb),e(fa,Ci),e(Ci,Vb),e(fa,Gb),e(nt,Jb),e(nt,ga),e(ga,Yb),e(ga,_a),e(_a,Xb),e(ga,Zb),e(nt,ek),$(Qn,nt,null),e(nt,tk),e(nt,kt),$(ba,kt,null),e(kt,ok),e(kt,Uo),e(Uo,nk),e(Uo,Ni),e(Ni,sk),e(Uo,rk),e(Uo,Cd),e(Cd,ak),e(Uo,ik),e(kt,lk),$(Vn,kt,null),e(kt,dk),$(Gn,kt,null),e(kt,ck),$(Jn,kt,null),_(s,fp,b),_(s,Ko,b),e(Ko,Yn),e(Yn,Nd),$(ka,Nd,null),e(Ko,pk),e(Ko,Ad),e(Ad,hk),_(s,gp,b),_(s,st,b),$(va,st,null),e(st,mk),e(st,Ta),e(Ta,uk),e(Ta,Od),e(Od,fk),e(Ta,gk),e(st,_k),e(st,ya),e(ya,bk),e(ya,Ai),e(Ai,kk),e(ya,vk),e(st,Tk),e(st,wa),e(wa,yk),e(wa,$a),e($a,wk),e(wa,$k),e(st,Mk),$(Xn,st,null),e(st,Fk),e(st,Ot),$(Ma,Ot,null),e(Ot,Ek),e(Ot,Ho),e(Ho,Bk),e(Ho,Oi),e(Oi,xk),e(Ho,zk),e(Ho,Dd),e(Dd,qk),e(Ho,Pk),e(Ot,jk),$(Zn,Ot,null),e(Ot,Ck),$(es,Ot,null),_(s,_p,b),_(s,Qo,b),e(Qo,ts),e(ts,Sd),$(Fa,Sd,null),e(Qo,Nk),e(Qo,Id),e(Id,Ak),_(s,bp,b),_(s,rt,b),$(Ea,rt,null),e(rt,Ok),e(rt,Ld),e(Ld,Dk),e(rt,Sk),e(rt,Ba),e(Ba,Ik),e(Ba,Di),e(Di,Lk),e(Ba,Wk),e(rt,Rk),e(rt,xa),e(xa,Uk),e(xa,za),e(za,Kk),e(xa,Hk),e(rt,Qk),$(os,rt,null),e(rt,Vk),e(rt,vt),$(qa,vt,null),e(vt,Gk),e(vt,Vo),e(Vo,Jk),e(Vo,Si),e(Si,Yk),e(Vo,Xk),e(Vo,Wd),e(Wd,Zk),e(Vo,ev),e(vt,tv),$(ns,vt,null),e(vt,ov),$(ss,vt,null),e(vt,nv),$(rs,vt,null),_(s,kp,b),_(s,Go,b),e(Go,as),e(as,Rd),$(Pa,Rd,null),e(Go,sv),e(Go,Ud),e(Ud,rv),_(s,vp,b),_(s,at,b),$(ja,at,null),e(at,av),e(at,Kd),e(Kd,iv),e(at,lv),e(at,Ca),e(Ca,dv),e(Ca,Ii),e(Ii,cv),e(Ca,pv),e(at,hv),e(at,Na),e(Na,mv),e(Na,Aa),e(Aa,uv),e(Na,fv),e(at,gv),$(is,at,null),e(at,_v),e(at,Dt),$(Oa,Dt,null),e(Dt,bv),e(Dt,Jo),e(Jo,kv),e(Jo,Li),e(Li,vv),e(Jo,Tv),e(Jo,Hd),e(Hd,yv),e(Jo,wv),e(Dt,$v),$(ls,Dt,null),e(Dt,Mv),$(ds,Dt,null),_(s,Tp,b),_(s,Yo,b),e(Yo,cs),e(cs,Qd),$(Da,Qd,null),e(Yo,Fv),e(Yo,Vd),e(Vd,Ev),_(s,yp,b),_(s,it,b),$(Sa,it,null),e(it,Bv),e(it,Gd),e(Gd,xv),e(it,zv),e(it,Ia),e(Ia,qv),e(Ia,Wi),e(Wi,Pv),e(Ia,jv),e(it,Cv),e(it,La),e(La,Nv),e(La,Wa),e(Wa,Av),e(La,Ov),e(it,Dv),$(ps,it,null),e(it,Sv),e(it,Tt),$(Ra,Tt,null),e(Tt,Iv),e(Tt,Xo),e(Xo,Lv),e(Xo,Ri),e(Ri,Wv),e(Xo,Rv),e(Xo,Jd),e(Jd,Uv),e(Xo,Kv),e(Tt,Hv),$(hs,Tt,null),e(Tt,Qv),$(ms,Tt,null),e(Tt,Vv),$(us,Tt,null),_(s,wp,b),_(s,Zo,b),e(Zo,fs),e(fs,Yd),$(Ua,Yd,null),e(Zo,Gv),e(Zo,Xd),e(Xd,Jv),_(s,$p,b),_(s,lt,b),$(Ka,lt,null),e(lt,Yv),e(lt,en),e(en,Xv),e(en,Zd),e(Zd,Zv),e(en,eT),e(en,ec),e(ec,tT),e(en,oT),e(lt,nT),e(lt,Ha),e(Ha,sT),e(Ha,Ui),e(Ui,rT),e(Ha,aT),e(lt,iT),e(lt,Qa),e(Qa,lT),e(Qa,Va),e(Va,dT),e(Qa,cT),e(lt,pT),$(gs,lt,null),e(lt,hT),e(lt,yt),$(Ga,yt,null),e(yt,mT),e(yt,tn),e(tn,uT),e(tn,Ki),e(Ki,fT),e(tn,gT),e(tn,tc),e(tc,_T),e(tn,bT),e(yt,kT),$(_s,yt,null),e(yt,vT),$(bs,yt,null),e(yt,TT),$(ks,yt,null),Mp=!0},p(s,[b]){const Ja={};b&2&&(Ja.$$scope={dirty:b,ctx:s}),sn.$set(Ja);const oc={};b&2&&(oc.$$scope={dirty:b,ctx:s}),ln.$set(oc);const nc={};b&2&&(nc.$$scope={dirty:b,ctx:s}),pn.$set(nc);const sc={};b&2&&(sc.$$scope={dirty:b,ctx:s}),un.$set(sc);const Ya={};b&2&&(Ya.$$scope={dirty:b,ctx:s}),fn.$set(Ya);const rc={};b&2&&(rc.$$scope={dirty:b,ctx:s}),_n.$set(rc);const ac={};b&2&&(ac.$$scope={dirty:b,ctx:s}),bn.$set(ac);const ic={};b&2&&(ic.$$scope={dirty:b,ctx:s}),vn.$set(ic);const Xa={};b&2&&(Xa.$$scope={dirty:b,ctx:s}),Tn.$set(Xa);const lc={};b&2&&(lc.$$scope={dirty:b,ctx:s}),wn.$set(lc);const dc={};b&2&&(dc.$$scope={dirty:b,ctx:s}),$n.$set(dc);const cc={};b&2&&(cc.$$scope={dirty:b,ctx:s}),Fn.$set(cc);const pc={};b&2&&(pc.$$scope={dirty:b,ctx:s}),En.$set(pc);const hc={};b&2&&(hc.$$scope={dirty:b,ctx:s}),Bn.$set(hc);const Za={};b&2&&(Za.$$scope={dirty:b,ctx:s}),zn.$set(Za);const mc={};b&2&&(mc.$$scope={dirty:b,ctx:s}),qn.$set(mc);const uc={};b&2&&(uc.$$scope={dirty:b,ctx:s}),jn.$set(uc);const on={};b&2&&(on.$$scope={dirty:b,ctx:s}),Cn.$set(on);const fc={};b&2&&(fc.$$scope={dirty:b,ctx:s}),An.$set(fc);const gc={};b&2&&(gc.$$scope={dirty:b,ctx:s}),On.$set(gc);const ei={};b&2&&(ei.$$scope={dirty:b,ctx:s}),Sn.$set(ei);const _c={};b&2&&(_c.$$scope={dirty:b,ctx:s}),In.$set(_c);const bc={};b&2&&(bc.$$scope={dirty:b,ctx:s}),Ln.$set(bc);const kc={};b&2&&(kc.$$scope={dirty:b,ctx:s}),Rn.$set(kc);const $t={};b&2&&($t.$$scope={dirty:b,ctx:s}),Un.$set($t);const vc={};b&2&&(vc.$$scope={dirty:b,ctx:s}),Kn.$set(vc);const Tc={};b&2&&(Tc.$$scope={dirty:b,ctx:s}),Qn.$set(Tc);const yc={};b&2&&(yc.$$scope={dirty:b,ctx:s}),Vn.$set(yc);const wc={};b&2&&(wc.$$scope={dirty:b,ctx:s}),Gn.$set(wc);const $c={};b&2&&($c.$$scope={dirty:b,ctx:s}),Jn.$set($c);const Mc={};b&2&&(Mc.$$scope={dirty:b,ctx:s}),Xn.$set(Mc);const Fc={};b&2&&(Fc.$$scope={dirty:b,ctx:s}),Zn.$set(Fc);const Ec={};b&2&&(Ec.$$scope={dirty:b,ctx:s}),es.$set(Ec);const Bc={};b&2&&(Bc.$$scope={dirty:b,ctx:s}),os.$set(Bc);const xc={};b&2&&(xc.$$scope={dirty:b,ctx:s}),ns.$set(xc);const ti={};b&2&&(ti.$$scope={dirty:b,ctx:s}),ss.$set(ti);const zc={};b&2&&(zc.$$scope={dirty:b,ctx:s}),rs.$set(zc);const qc={};b&2&&(qc.$$scope={dirty:b,ctx:s}),is.$set(qc);const Pc={};b&2&&(Pc.$$scope={dirty:b,ctx:s}),ls.$set(Pc);const Mt={};b&2&&(Mt.$$scope={dirty:b,ctx:s}),ds.$set(Mt);const Gt={};b&2&&(Gt.$$scope={dirty:b,ctx:s}),ps.$set(Gt);const jc={};b&2&&(jc.$$scope={dirty:b,ctx:s}),hs.$set(jc);const Cc={};b&2&&(Cc.$$scope={dirty:b,ctx:s}),ms.$set(Cc);const Nc={};b&2&&(Nc.$$scope={dirty:b,ctx:s}),us.$set(Nc);const nn={};b&2&&(nn.$$scope={dirty:b,ctx:s}),gs.$set(nn);const Ac={};b&2&&(Ac.$$scope={dirty:b,ctx:s}),_s.$set(Ac);const Oc={};b&2&&(Oc.$$scope={dirty:b,ctx:s}),bs.$set(Oc);const Dc={};b&2&&(Dc.$$scope={dirty:b,ctx:s}),ks.$set(Dc)},i(s){Mp||(M(l.$$.fragment,s),M(T.$$.fragment,s),M(j.$$.fragment,s),M(js.$$.fragment,s),M(Cs.$$.fragment,s),M(sn.$$.fragment,s),M(As.$$.fragment,s),M(Os.$$.fragment,s),M(Ss.$$.fragment,s),M(Ls.$$.fragment,s),M(Ws.$$.fragment,s),M(ln.$$.fragment,s),M(Rs.$$.fragment,s),M(Ks.$$.fragment,s),M(Hs.$$.fragment,s),M(Gs.$$.fragment,s),M(Ys.$$.fragment,s),M(pn.$$.fragment,s),M(Xs.$$.fragment,s),M(Zs.$$.fragment,s),M(tr.$$.fragment,s),M(nr.$$.fragment,s),M(sr.$$.fragment,s),M(dr.$$.fragment,s),M(un.$$.fragment,s),M(fn.$$.fragment,s),M(cr.$$.fragment,s),M(pr.$$.fragment,s),M(fr.$$.fragment,s),M(_n.$$.fragment,s),M(bn.$$.fragment,s),M(gr.$$.fragment,s),M(_r.$$.fragment,s),M(yr.$$.fragment,s),M(vn.$$.fragment,s),M(Tn.$$.fragment,s),M(wr.$$.fragment,s),M($r.$$.fragment,s),M(xr.$$.fragment,s),M(wn.$$.fragment,s),M($n.$$.fragment,s),M(zr.$$.fragment,s),M(qr.$$.fragment,s),M(Nr.$$.fragment,s),M(Fn.$$.fragment,s),M(En.$$.fragment,s),M(Bn.$$.fragment,s),M(Ar.$$.fragment,s),M(Or.$$.fragment,s),M(Lr.$$.fragment,s),M(zn.$$.fragment,s),M(qn.$$.fragment,s),M(Wr.$$.fragment,s),M(Rr.$$.fragment,s),M(Qr.$$.fragment,s),M(jn.$$.fragment,s),M(Cn.$$.fragment,s),M(Vr.$$.fragment,s),M(Gr.$$.fragment,s),M(Zr.$$.fragment,s),M(An.$$.fragment,s),M(On.$$.fragment,s),M(ea.$$.fragment,s),M(ta.$$.fragment,s),M(Sn.$$.fragment,s),M(ra.$$.fragment,s),M(In.$$.fragment,s),M(Ln.$$.fragment,s),M(aa.$$.fragment,s),M(ia.$$.fragment,s),M(Rn.$$.fragment,s),M(pa.$$.fragment,s),M(Un.$$.fragment,s),M(Kn.$$.fragment,s),M(ha.$$.fragment,s),M(ma.$$.fragment,s),M(Qn.$$.fragment,s),M(ba.$$.fragment,s),M(Vn.$$.fragment,s),M(Gn.$$.fragment,s),M(Jn.$$.fragment,s),M(ka.$$.fragment,s),M(va.$$.fragment,s),M(Xn.$$.fragment,s),M(Ma.$$.fragment,s),M(Zn.$$.fragment,s),M(es.$$.fragment,s),M(Fa.$$.fragment,s),M(Ea.$$.fragment,s),M(os.$$.fragment,s),M(qa.$$.fragment,s),M(ns.$$.fragment,s),M(ss.$$.fragment,s),M(rs.$$.fragment,s),M(Pa.$$.fragment,s),M(ja.$$.fragment,s),M(is.$$.fragment,s),M(Oa.$$.fragment,s),M(ls.$$.fragment,s),M(ds.$$.fragment,s),M(Da.$$.fragment,s),M(Sa.$$.fragment,s),M(ps.$$.fragment,s),M(Ra.$$.fragment,s),M(hs.$$.fragment,s),M(ms.$$.fragment,s),M(us.$$.fragment,s),M(Ua.$$.fragment,s),M(Ka.$$.fragment,s),M(gs.$$.fragment,s),M(Ga.$$.fragment,s),M(_s.$$.fragment,s),M(bs.$$.fragment,s),M(ks.$$.fragment,s),Mp=!0)},o(s){F(l.$$.fragment,s),F(T.$$.fragment,s),F(j.$$.fragment,s),F(js.$$.fragment,s),F(Cs.$$.fragment,s),F(sn.$$.fragment,s),F(As.$$.fragment,s),F(Os.$$.fragment,s),F(Ss.$$.fragment,s),F(Ls.$$.fragment,s),F(Ws.$$.fragment,s),F(ln.$$.fragment,s),F(Rs.$$.fragment,s),F(Ks.$$.fragment,s),F(Hs.$$.fragment,s),F(Gs.$$.fragment,s),F(Ys.$$.fragment,s),F(pn.$$.fragment,s),F(Xs.$$.fragment,s),F(Zs.$$.fragment,s),F(tr.$$.fragment,s),F(nr.$$.fragment,s),F(sr.$$.fragment,s),F(dr.$$.fragment,s),F(un.$$.fragment,s),F(fn.$$.fragment,s),F(cr.$$.fragment,s),F(pr.$$.fragment,s),F(fr.$$.fragment,s),F(_n.$$.fragment,s),F(bn.$$.fragment,s),F(gr.$$.fragment,s),F(_r.$$.fragment,s),F(yr.$$.fragment,s),F(vn.$$.fragment,s),F(Tn.$$.fragment,s),F(wr.$$.fragment,s),F($r.$$.fragment,s),F(xr.$$.fragment,s),F(wn.$$.fragment,s),F($n.$$.fragment,s),F(zr.$$.fragment,s),F(qr.$$.fragment,s),F(Nr.$$.fragment,s),F(Fn.$$.fragment,s),F(En.$$.fragment,s),F(Bn.$$.fragment,s),F(Ar.$$.fragment,s),F(Or.$$.fragment,s),F(Lr.$$.fragment,s),F(zn.$$.fragment,s),F(qn.$$.fragment,s),F(Wr.$$.fragment,s),F(Rr.$$.fragment,s),F(Qr.$$.fragment,s),F(jn.$$.fragment,s),F(Cn.$$.fragment,s),F(Vr.$$.fragment,s),F(Gr.$$.fragment,s),F(Zr.$$.fragment,s),F(An.$$.fragment,s),F(On.$$.fragment,s),F(ea.$$.fragment,s),F(ta.$$.fragment,s),F(Sn.$$.fragment,s),F(ra.$$.fragment,s),F(In.$$.fragment,s),F(Ln.$$.fragment,s),F(aa.$$.fragment,s),F(ia.$$.fragment,s),F(Rn.$$.fragment,s),F(pa.$$.fragment,s),F(Un.$$.fragment,s),F(Kn.$$.fragment,s),F(ha.$$.fragment,s),F(ma.$$.fragment,s),F(Qn.$$.fragment,s),F(ba.$$.fragment,s),F(Vn.$$.fragment,s),F(Gn.$$.fragment,s),F(Jn.$$.fragment,s),F(ka.$$.fragment,s),F(va.$$.fragment,s),F(Xn.$$.fragment,s),F(Ma.$$.fragment,s),F(Zn.$$.fragment,s),F(es.$$.fragment,s),F(Fa.$$.fragment,s),F(Ea.$$.fragment,s),F(os.$$.fragment,s),F(qa.$$.fragment,s),F(ns.$$.fragment,s),F(ss.$$.fragment,s),F(rs.$$.fragment,s),F(Pa.$$.fragment,s),F(ja.$$.fragment,s),F(is.$$.fragment,s),F(Oa.$$.fragment,s),F(ls.$$.fragment,s),F(ds.$$.fragment,s),F(Da.$$.fragment,s),F(Sa.$$.fragment,s),F(ps.$$.fragment,s),F(Ra.$$.fragment,s),F(hs.$$.fragment,s),F(ms.$$.fragment,s),F(us.$$.fragment,s),F(Ua.$$.fragment,s),F(Ka.$$.fragment,s),F(gs.$$.fragment,s),F(Ga.$$.fragment,s),F(_s.$$.fragment,s),F(bs.$$.fragment,s),F(ks.$$.fragment,s),Mp=!1},d(s){t(d),s&&t(v),s&&t(m),E(l),s&&t(me),s&&t(S),E(T),s&&t(ue),s&&t(L),s&&t(fe),s&&t(R),s&&t(ge),s&&t(U),s&&t(te),s&&t(P),s&&t(_e),s&&t(W),s&&t(C),s&&t(se),s&&t(be),s&&t(I),E(j),s&&t(ke),s&&t(f),s&&t(We),s&&t(X),E(js),s&&t(Sc),s&&t(dt),E(Cs),E(sn),s&&t(Ic),s&&t(mo),E(As),s&&t(Lc),s&&t(Ze),E(Os),E(Ss),E(Ls),E(Ws),E(ln),E(Rs),s&&t(Wc),s&&t(fo),E(Ks),s&&t(Rc),s&&t(ct),E(Hs),E(Gs),E(Ys),E(pn),s&&t(Uc),s&&t(_o),E(Xs),s&&t(Kc),s&&t(bo),E(Zs),s&&t(Hc),s&&t(ko),E(tr),s&&t(Qc),s&&t(vo),E(nr),s&&t(Vc),s&&t(et),E(sr),E(dr),E(un),E(fn),s&&t(Gc),s&&t(yo),E(cr),s&&t(Jc),s&&t(pt),E(pr),E(fr),E(_n),E(bn),s&&t(Yc),s&&t(Mo),E(gr),s&&t(Xc),s&&t(ht),E(_r),E(yr),E(vn),E(Tn),s&&t(Zc),s&&t(Eo),E(wr),s&&t(ep),s&&t(mt),E($r),E(xr),E(wn),E($n),s&&t(tp),s&&t(xo),E(zr),s&&t(op),s&&t(ut),E(qr),E(Nr),E(Fn),E(En),E(Bn),s&&t(np),s&&t(qo),E(Ar),s&&t(sp),s&&t(ft),E(Or),E(Lr),E(zn),E(qn),s&&t(rp),s&&t(jo),E(Wr),s&&t(ap),s&&t(gt),E(Rr),E(Qr),E(jn),E(Cn),s&&t(ip),s&&t(No),E(Vr),s&&t(lp),s&&t(_t),E(Gr),E(Zr),E(An),E(On),s&&t(dp),s&&t(Do),E(ea),s&&t(cp),s&&t(tt),E(ta),E(Sn),E(ra),E(In),E(Ln),s&&t(pp),s&&t(Io),E(aa),s&&t(hp),s&&t(ot),E(ia),E(Rn),E(pa),E(Un),E(Kn),s&&t(mp),s&&t(Ro),E(ha),s&&t(up),s&&t(nt),E(ma),E(Qn),E(ba),E(Vn),E(Gn),E(Jn),s&&t(fp),s&&t(Ko),E(ka),s&&t(gp),s&&t(st),E(va),E(Xn),E(Ma),E(Zn),E(es),s&&t(_p),s&&t(Qo),E(Fa),s&&t(bp),s&&t(rt),E(Ea),E(os),E(qa),E(ns),E(ss),E(rs),s&&t(kp),s&&t(Go),E(Pa),s&&t(vp),s&&t(at),E(ja),E(is),E(Oa),E(ls),E(ds),s&&t(Tp),s&&t(Yo),E(Da),s&&t(yp),s&&t(it),E(Sa),E(ps),E(Ra),E(hs),E(ms),E(us),s&&t(wp),s&&t(Zo),E(Ua),s&&t($p),s&&t(lt),E(Ka),E(gs),E(Ga),E(_s),E(bs),E(ks)}}}const E2={local:"mobilebert",sections:[{local:"overview",title:"Overview"},{local:"documentation-resources",title:"Documentation resources"},{local:"transformers.MobileBertConfig",title:"MobileBertConfig"},{local:"transformers.MobileBertTokenizer",title:"MobileBertTokenizer"},{local:"transformers.MobileBertTokenizerFast",title:"MobileBertTokenizerFast"},{local:"transformers.models.mobilebert.modeling_mobilebert.MobileBertForPreTrainingOutput",title:"MobileBert specific outputs"},{local:"transformers.MobileBertModel",title:"MobileBertModel"},{local:"transformers.MobileBertForPreTraining",title:"MobileBertForPreTraining"},{local:"transformers.MobileBertForMaskedLM",title:"MobileBertForMaskedLM"},{local:"transformers.MobileBertForNextSentencePrediction",title:"MobileBertForNextSentencePrediction"},{local:"transformers.MobileBertForSequenceClassification",title:"MobileBertForSequenceClassification"},{local:"transformers.MobileBertForMultipleChoice",title:"MobileBertForMultipleChoice"},{local:"transformers.MobileBertForTokenClassification",title:"MobileBertForTokenClassification"},{local:"transformers.MobileBertForQuestionAnswering",title:"MobileBertForQuestionAnswering"},{local:"transformers.TFMobileBertModel",title:"TFMobileBertModel"},{local:"transformers.TFMobileBertForPreTraining",title:"TFMobileBertForPreTraining"},{local:"transformers.TFMobileBertForMaskedLM",title:"TFMobileBertForMaskedLM"},{local:"transformers.TFMobileBertForNextSentencePrediction",title:"TFMobileBertForNextSentencePrediction"},{local:"transformers.TFMobileBertForSequenceClassification",title:"TFMobileBertForSequenceClassification"},{local:"transformers.TFMobileBertForMultipleChoice",title:"TFMobileBertForMultipleChoice"},{local:"transformers.TFMobileBertForTokenClassification",title:"TFMobileBertForTokenClassification"},{local:"transformers.TFMobileBertForQuestionAnswering",title:"TFMobileBertForQuestionAnswering"}],title:"MobileBERT"};function B2(q){return q1(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class N2 extends E1{constructor(d){super();B1(this,d,B2,F2,x1,{})}}export{N2 as default,E2 as metadata};
