import{S as Z0,i as e2,s as t2,e as r,k as h,w,t as o,M as o2,c as a,d as t,m as u,a as i,x as T,h as s,b as m,G as e,g as _,y as $,q as y,o as D,B as F,v as s2,L as fe}from"../../chunks/vendor-hf-doc-builder.js";import{T as Le}from"../../chunks/Tip-hf-doc-builder.js";import{D as Z}from"../../chunks/Docstring-hf-doc-builder.js";import{C as me}from"../../chunks/CodeBlock-hf-doc-builder.js";import{I as Qe}from"../../chunks/IconCopyLink-hf-doc-builder.js";import{E as ue}from"../../chunks/ExampleCodeBlock-hf-doc-builder.js";function n2(E){let d,g,c,f,k;return f=new me({props:{code:`from transformers import DistilBertConfig, DistilBertModel

# Initializing a DistilBERT configuration
configuration = DistilBertConfig()

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

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

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a model (with random weights) from the configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = DistilBertModel(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"),g=o("Examples:"),c=h(),w(f.$$.fragment)},l(l){d=a(l,"P",{});var p=i(d);g=s(p,"Examples:"),p.forEach(t),c=u(l),T(f.$$.fragment,l)},m(l,p){_(l,d,p),e(d,g),_(l,c,p),$(f,l,p),k=!0},p:fe,i(l){k||(y(f.$$.fragment,l),k=!0)},o(l){D(f.$$.fragment,l),k=!1},d(l){l&&t(d),l&&t(c),F(f,l)}}}function r2(E){let d,g,c,f,k;return{c(){d=r("p"),g=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),c=r("code"),f=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 p=i(d);g=s(p,"Although the recipe for forward pass needs to be defined within this function, one should call the "),c=a(p,"CODE",{});var M=i(c);f=s(M,"Module"),M.forEach(t),k=s(p,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),p.forEach(t)},m(l,p){_(l,d,p),e(d,g),e(d,c),e(c,f),e(d,k)},d(l){l&&t(d)}}}function a2(E){let d,g,c,f,k;return f=new me({props:{code:`from transformers import DistilBertTokenizer, DistilBertModel
import torch

tokenizer = DistilBertTokenizer.from_pretrained("distilbert-base-uncased")
model = DistilBertModel.from_pretrained("distilbert-base-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> DistilBertTokenizer, DistilBertModel
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = DistilBertTokenizer.from_pretrained(<span class="hljs-string">&quot;distilbert-base-uncased&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = DistilBertModel.from_pretrained(<span class="hljs-string">&quot;distilbert-base-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"),g=o("Example:"),c=h(),w(f.$$.fragment)},l(l){d=a(l,"P",{});var p=i(d);g=s(p,"Example:"),p.forEach(t),c=u(l),T(f.$$.fragment,l)},m(l,p){_(l,d,p),e(d,g),_(l,c,p),$(f,l,p),k=!0},p:fe,i(l){k||(y(f.$$.fragment,l),k=!0)},o(l){D(f.$$.fragment,l),k=!1},d(l){l&&t(d),l&&t(c),F(f,l)}}}function i2(E){let d,g,c,f,k;return{c(){d=r("p"),g=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),c=r("code"),f=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 p=i(d);g=s(p,"Although the recipe for forward pass needs to be defined within this function, one should call the "),c=a(p,"CODE",{});var M=i(c);f=s(M,"Module"),M.forEach(t),k=s(p,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),p.forEach(t)},m(l,p){_(l,d,p),e(d,g),e(d,c),e(c,f),e(d,k)},d(l){l&&t(d)}}}function l2(E){let d,g,c,f,k;return f=new me({props:{code:`from transformers import DistilBertTokenizer, DistilBertForMaskedLM
import torch

tokenizer = DistilBertTokenizer.from_pretrained("distilbert-base-uncased")
model = DistilBertForMaskedLM.from_pretrained("distilbert-base-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)
`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> DistilBertTokenizer, DistilBertForMaskedLM
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = DistilBertTokenizer.from_pretrained(<span class="hljs-string">&quot;distilbert-base-uncased&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = DistilBertForMaskedLM.from_pretrained(<span class="hljs-string">&quot;distilbert-base-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)
`}}),{c(){d=r("p"),g=o("Example:"),c=h(),w(f.$$.fragment)},l(l){d=a(l,"P",{});var p=i(d);g=s(p,"Example:"),p.forEach(t),c=u(l),T(f.$$.fragment,l)},m(l,p){_(l,d,p),e(d,g),_(l,c,p),$(f,l,p),k=!0},p:fe,i(l){k||(y(f.$$.fragment,l),k=!0)},o(l){D(f.$$.fragment,l),k=!1},d(l){l&&t(d),l&&t(c),F(f,l)}}}function d2(E){let d,g;return d=new me({props:{code:`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>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>)
`}}),{c(){w(d.$$.fragment)},l(c){T(d.$$.fragment,c)},m(c,f){$(d,c,f),g=!0},p:fe,i(c){g||(y(d.$$.fragment,c),g=!0)},o(c){D(d.$$.fragment,c),g=!1},d(c){F(d,c)}}}function c2(E){let d,g,c,f,k;return{c(){d=r("p"),g=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),c=r("code"),f=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 p=i(d);g=s(p,"Although the recipe for forward pass needs to be defined within this function, one should call the "),c=a(p,"CODE",{});var M=i(c);f=s(M,"Module"),M.forEach(t),k=s(p,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),p.forEach(t)},m(l,p){_(l,d,p),e(d,g),e(d,c),e(c,f),e(d,k)},d(l){l&&t(d)}}}function p2(E){let d,g,c,f,k;return f=new me({props:{code:`import torch
from transformers import DistilBertTokenizer, DistilBertForSequenceClassification

tokenizer = DistilBertTokenizer.from_pretrained("distilbert-base-uncased")
model = DistilBertForSequenceClassification.from_pretrained("distilbert-base-uncased")

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]
`,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> DistilBertTokenizer, DistilBertForSequenceClassification

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = DistilBertTokenizer.from_pretrained(<span class="hljs-string">&quot;distilbert-base-uncased&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = DistilBertForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;distilbert-base-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><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]
`}}),{c(){d=r("p"),g=o("Example of single-label classification:"),c=h(),w(f.$$.fragment)},l(l){d=a(l,"P",{});var p=i(d);g=s(p,"Example of single-label classification:"),p.forEach(t),c=u(l),T(f.$$.fragment,l)},m(l,p){_(l,d,p),e(d,g),_(l,c,p),$(f,l,p),k=!0},p:fe,i(l){k||(y(f.$$.fragment,l),k=!0)},o(l){D(f.$$.fragment,l),k=!1},d(l){l&&t(d),l&&t(c),F(f,l)}}}function h2(E){let d,g;return d=new me({props:{code:`# 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 = DistilBertForSequenceClassification.from_pretrained("distilbert-base-uncased", 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-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 = DistilBertForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;distilbert-base-uncased&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>)
`}}),{c(){w(d.$$.fragment)},l(c){T(d.$$.fragment,c)},m(c,f){$(d,c,f),g=!0},p:fe,i(c){g||(y(d.$$.fragment,c),g=!0)},o(c){D(d.$$.fragment,c),g=!1},d(c){F(d,c)}}}function u2(E){let d,g,c,f,k;return f=new me({props:{code:`import torch
from transformers import DistilBertTokenizer, DistilBertForSequenceClassification

tokenizer = DistilBertTokenizer.from_pretrained("distilbert-base-uncased")
model = DistilBertForSequenceClassification.from_pretrained("distilbert-base-uncased", 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_id = logits.argmax().item()
model.config.id2label[predicted_class_id]
`,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> DistilBertTokenizer, DistilBertForSequenceClassification

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = DistilBertTokenizer.from_pretrained(<span class="hljs-string">&quot;distilbert-base-uncased&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = DistilBertForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;distilbert-base-uncased&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_id = logits.argmax().item()
<span class="hljs-meta">&gt;&gt;&gt; </span>model.config.id2label[predicted_class_id]
`}}),{c(){d=r("p"),g=o("Example of multi-label classification:"),c=h(),w(f.$$.fragment)},l(l){d=a(l,"P",{});var p=i(d);g=s(p,"Example of multi-label classification:"),p.forEach(t),c=u(l),T(f.$$.fragment,l)},m(l,p){_(l,d,p),e(d,g),_(l,c,p),$(f,l,p),k=!0},p:fe,i(l){k||(y(f.$$.fragment,l),k=!0)},o(l){D(f.$$.fragment,l),k=!1},d(l){l&&t(d),l&&t(c),F(f,l)}}}function f2(E){let d,g;return d=new me({props:{code:`# 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 = DistilBertForSequenceClassification.from_pretrained(
    "distilbert-base-uncased", num_labels=num_labels, problem_type="multi_label_classification"
)

labels = torch.nn.functional.one_hot(torch.tensor([predicted_class_id]), num_classes=num_labels).to(
    torch.float
)
loss = model(**inputs, labels=labels).loss
loss.backward()`,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 = DistilBertForSequenceClassification.from_pretrained(
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;distilbert-base-uncased&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.nn.functional.one_hot(torch.tensor([predicted_class_id]), num_classes=num_labels).to(
<span class="hljs-meta">... </span>    torch.<span class="hljs-built_in">float</span>
<span class="hljs-meta">... </span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>loss = model(**inputs, labels=labels).loss
<span class="hljs-meta">&gt;&gt;&gt; </span>loss.backward()`}}),{c(){w(d.$$.fragment)},l(c){T(d.$$.fragment,c)},m(c,f){$(d,c,f),g=!0},p:fe,i(c){g||(y(d.$$.fragment,c),g=!0)},o(c){D(d.$$.fragment,c),g=!1},d(c){F(d,c)}}}function m2(E){let d,g,c,f,k;return{c(){d=r("p"),g=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),c=r("code"),f=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 p=i(d);g=s(p,"Although the recipe for forward pass needs to be defined within this function, one should call the "),c=a(p,"CODE",{});var M=i(c);f=s(M,"Module"),M.forEach(t),k=s(p,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),p.forEach(t)},m(l,p){_(l,d,p),e(d,g),e(d,c),e(c,f),e(d,k)},d(l){l&&t(d)}}}function g2(E){let d,g,c,f,k;return f=new me({props:{code:`from transformers import DistilBertTokenizer, DistilBertForMultipleChoice
import torch

tokenizer = DistilBertTokenizer.from_pretrained("distilbert-base-cased")
model = DistilBertForMultipleChoice.from_pretrained("distilbert-base-cased")

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, choice0], [prompt, 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> DistilBertTokenizer, DistilBertForMultipleChoice
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = DistilBertTokenizer.from_pretrained(<span class="hljs-string">&quot;distilbert-base-cased&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = DistilBertForMultipleChoice.from_pretrained(<span class="hljs-string">&quot;distilbert-base-cased&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, choice0], [prompt, 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"),g=o("Examples:"),c=h(),w(f.$$.fragment)},l(l){d=a(l,"P",{});var p=i(d);g=s(p,"Examples:"),p.forEach(t),c=u(l),T(f.$$.fragment,l)},m(l,p){_(l,d,p),e(d,g),_(l,c,p),$(f,l,p),k=!0},p:fe,i(l){k||(y(f.$$.fragment,l),k=!0)},o(l){D(f.$$.fragment,l),k=!1},d(l){l&&t(d),l&&t(c),F(f,l)}}}function _2(E){let d,g,c,f,k;return{c(){d=r("p"),g=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),c=r("code"),f=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 p=i(d);g=s(p,"Although the recipe for forward pass needs to be defined within this function, one should call the "),c=a(p,"CODE",{});var M=i(c);f=s(M,"Module"),M.forEach(t),k=s(p,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),p.forEach(t)},m(l,p){_(l,d,p),e(d,g),e(d,c),e(c,f),e(d,k)},d(l){l&&t(d)}}}function b2(E){let d,g,c,f,k;return f=new me({props:{code:`from transformers import DistilBertTokenizer, DistilBertForTokenClassification
import torch

tokenizer = DistilBertTokenizer.from_pretrained("distilbert-base-uncased")
model = DistilBertForTokenClassification.from_pretrained("distilbert-base-uncased")

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
`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> DistilBertTokenizer, DistilBertForTokenClassification
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = DistilBertTokenizer.from_pretrained(<span class="hljs-string">&quot;distilbert-base-uncased&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = DistilBertForTokenClassification.from_pretrained(<span class="hljs-string">&quot;distilbert-base-uncased&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
`}}),{c(){d=r("p"),g=o("Example:"),c=h(),w(f.$$.fragment)},l(l){d=a(l,"P",{});var p=i(d);g=s(p,"Example:"),p.forEach(t),c=u(l),T(f.$$.fragment,l)},m(l,p){_(l,d,p),e(d,g),_(l,c,p),$(f,l,p),k=!0},p:fe,i(l){k||(y(f.$$.fragment,l),k=!0)},o(l){D(f.$$.fragment,l),k=!1},d(l){l&&t(d),l&&t(c),F(f,l)}}}function k2(E){let d,g;return d=new me({props:{code:`labels = predicted_token_class_ids
loss = model(**inputs, labels=labels).loss
round(loss.item(), 2)
`,highlighted:`<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>)
`}}),{c(){w(d.$$.fragment)},l(c){T(d.$$.fragment,c)},m(c,f){$(d,c,f),g=!0},p:fe,i(c){g||(y(d.$$.fragment,c),g=!0)},o(c){D(d.$$.fragment,c),g=!1},d(c){F(d,c)}}}function v2(E){let d,g,c,f,k;return{c(){d=r("p"),g=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),c=r("code"),f=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 p=i(d);g=s(p,"Although the recipe for forward pass needs to be defined within this function, one should call the "),c=a(p,"CODE",{});var M=i(c);f=s(M,"Module"),M.forEach(t),k=s(p,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),p.forEach(t)},m(l,p){_(l,d,p),e(d,g),e(d,c),e(c,f),e(d,k)},d(l){l&&t(d)}}}function w2(E){let d,g,c,f,k;return f=new me({props:{code:`from transformers import DistilBertTokenizer, DistilBertForQuestionAnswering
import torch

tokenizer = DistilBertTokenizer.from_pretrained("distilbert-base-uncased")
model = DistilBertForQuestionAnswering.from_pretrained("distilbert-base-uncased")

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)
`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> DistilBertTokenizer, DistilBertForQuestionAnswering
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = DistilBertTokenizer.from_pretrained(<span class="hljs-string">&quot;distilbert-base-uncased&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = DistilBertForQuestionAnswering.from_pretrained(<span class="hljs-string">&quot;distilbert-base-uncased&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)
`}}),{c(){d=r("p"),g=o("Example:"),c=h(),w(f.$$.fragment)},l(l){d=a(l,"P",{});var p=i(d);g=s(p,"Example:"),p.forEach(t),c=u(l),T(f.$$.fragment,l)},m(l,p){_(l,d,p),e(d,g),_(l,c,p),$(f,l,p),k=!0},p:fe,i(l){k||(y(f.$$.fragment,l),k=!0)},o(l){D(f.$$.fragment,l),k=!1},d(l){l&&t(d),l&&t(c),F(f,l)}}}function T2(E){let d,g;return d=new me({props:{code:`# target is "nice puppet"
target_start_index = torch.tensor([14])
target_end_index = torch.tensor([15])

outputs = model(**inputs, start_positions=target_start_index, end_positions=target_end_index)
loss = outputs.loss
round(loss.item(), 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 = torch.tensor([<span class="hljs-number">14</span>])
<span class="hljs-meta">&gt;&gt;&gt; </span>target_end_index = torch.tensor([<span class="hljs-number">15</span>])

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

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

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

tokenizer = DistilBertTokenizer.from_pretrained("distilbert-base-uncased")
model = TFDistilBertForSequenceClassification.from_pretrained("distilbert-base-uncased")

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> DistilBertTokenizer, TFDistilBertForSequenceClassification
<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 = DistilBertTokenizer.from_pretrained(<span class="hljs-string">&quot;distilbert-base-uncased&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFDistilBertForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;distilbert-base-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>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]
`}}),{c(){d=r("p"),g=o("Example:"),c=h(),w(f.$$.fragment)},l(l){d=a(l,"P",{});var p=i(d);g=s(p,"Example:"),p.forEach(t),c=u(l),T(f.$$.fragment,l)},m(l,p){_(l,d,p),e(d,g),_(l,c,p),$(f,l,p),k=!0},p:fe,i(l){k||(y(f.$$.fragment,l),k=!0)},o(l){D(f.$$.fragment,l),k=!1},d(l){l&&t(d),l&&t(c),F(f,l)}}}function C2(E){let d,g;return d=new me({props:{code:`# 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 = TFDistilBertForSequenceClassification.from_pretrained("distilbert-base-uncased", num_labels=num_labels)

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

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

tokenizer = DistilBertTokenizer.from_pretrained("distilbert-base-uncased")
model = TFDistilBertForTokenClassification.from_pretrained("distilbert-base-uncased")

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

tokenizer = DistilBertTokenizer.from_pretrained("distilbert-base-uncased")
model = TFDistilBertForQuestionAnswering.from_pretrained("distilbert-base-uncased")

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> DistilBertTokenizer, TFDistilBertForQuestionAnswering
<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 = DistilBertTokenizer.from_pretrained(<span class="hljs-string">&quot;distilbert-base-uncased&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFDistilBertForQuestionAnswering.from_pretrained(<span class="hljs-string">&quot;distilbert-base-uncased&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)
`}}),{c(){d=r("p"),g=o("Example:"),c=h(),w(f.$$.fragment)},l(l){d=a(l,"P",{});var p=i(d);g=s(p,"Example:"),p.forEach(t),c=u(l),T(f.$$.fragment,l)},m(l,p){_(l,d,p),e(d,g),_(l,c,p),$(f,l,p),k=!0},p:fe,i(l){k||(y(f.$$.fragment,l),k=!0)},o(l){D(f.$$.fragment,l),k=!1},d(l){l&&t(d),l&&t(c),F(f,l)}}}function R2(E){let d,g;return d=new me({props:{code:`# target is "nice puppet"
target_start_index = tf.constant([14])
target_end_index = tf.constant([15])

outputs = model(**inputs, start_positions=target_start_index, end_positions=target_end_index)
loss = tf.math.reduce_mean(outputs.loss)
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">14</span>])
<span class="hljs-meta">&gt;&gt;&gt; </span>target_end_index = tf.constant([<span class="hljs-number">15</span>])

<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs, start_positions=target_start_index, end_positions=target_end_index)
<span class="hljs-meta">&gt;&gt;&gt; </span>loss = tf.math.reduce_mean(outputs.loss)
<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>)
`}}),{c(){w(d.$$.fragment)},l(c){T(d.$$.fragment,c)},m(c,f){$(d,c,f),g=!0},p:fe,i(c){g||(y(d.$$.fragment,c),g=!0)},o(c){D(d.$$.fragment,c),g=!1},d(c){F(d,c)}}}function U2(E){let d,g,c,f,k;return{c(){d=r("p"),g=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),c=r("code"),f=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 p=i(d);g=s(p,"Although the recipe for forward pass needs to be defined within this function, one should call the "),c=a(p,"CODE",{});var M=i(c);f=s(M,"Module"),M.forEach(t),k=s(p,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),p.forEach(t)},m(l,p){_(l,d,p),e(d,g),e(d,c),e(c,f),e(d,k)},d(l){l&&t(d)}}}function K2(E){let d,g,c,f,k;return f=new me({props:{code:`from transformers import DistilBertTokenizer, FlaxDistilBertModel

tokenizer = DistilBertTokenizer.from_pretrained("distilbert-base-uncased")
model = FlaxDistilBertModel.from_pretrained("distilbert-base-uncased")

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

last_hidden_states = outputs.last_hidden_state`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> DistilBertTokenizer, FlaxDistilBertModel

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = DistilBertTokenizer.from_pretrained(<span class="hljs-string">&quot;distilbert-base-uncased&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = FlaxDistilBertModel.from_pretrained(<span class="hljs-string">&quot;distilbert-base-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;jax&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs)

<span class="hljs-meta">&gt;&gt;&gt; </span>last_hidden_states = outputs.last_hidden_state`}}),{c(){d=r("p"),g=o("Example:"),c=h(),w(f.$$.fragment)},l(l){d=a(l,"P",{});var p=i(d);g=s(p,"Example:"),p.forEach(t),c=u(l),T(f.$$.fragment,l)},m(l,p){_(l,d,p),e(d,g),_(l,c,p),$(f,l,p),k=!0},p:fe,i(l){k||(y(f.$$.fragment,l),k=!0)},o(l){D(f.$$.fragment,l),k=!1},d(l){l&&t(d),l&&t(c),F(f,l)}}}function H2(E){let d,g,c,f,k;return{c(){d=r("p"),g=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),c=r("code"),f=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 p=i(d);g=s(p,"Although the recipe for forward pass needs to be defined within this function, one should call the "),c=a(p,"CODE",{});var M=i(c);f=s(M,"Module"),M.forEach(t),k=s(p,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),p.forEach(t)},m(l,p){_(l,d,p),e(d,g),e(d,c),e(c,f),e(d,k)},d(l){l&&t(d)}}}function V2(E){let d,g,c,f,k;return f=new me({props:{code:`from transformers import DistilBertTokenizer, FlaxDistilBertForMaskedLM

tokenizer = DistilBertTokenizer.from_pretrained("distilbert-base-uncased")
model = FlaxDistilBertForMaskedLM.from_pretrained("distilbert-base-uncased")

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

outputs = model(**inputs)
logits = outputs.logits`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> DistilBertTokenizer, FlaxDistilBertForMaskedLM

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = DistilBertTokenizer.from_pretrained(<span class="hljs-string">&quot;distilbert-base-uncased&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = FlaxDistilBertForMaskedLM.from_pretrained(<span class="hljs-string">&quot;distilbert-base-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;jax&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs)
<span class="hljs-meta">&gt;&gt;&gt; </span>logits = outputs.logits`}}),{c(){d=r("p"),g=o("Example:"),c=h(),w(f.$$.fragment)},l(l){d=a(l,"P",{});var p=i(d);g=s(p,"Example:"),p.forEach(t),c=u(l),T(f.$$.fragment,l)},m(l,p){_(l,d,p),e(d,g),_(l,c,p),$(f,l,p),k=!0},p:fe,i(l){k||(y(f.$$.fragment,l),k=!0)},o(l){D(f.$$.fragment,l),k=!1},d(l){l&&t(d),l&&t(c),F(f,l)}}}function J2(E){let d,g,c,f,k;return{c(){d=r("p"),g=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),c=r("code"),f=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 p=i(d);g=s(p,"Although the recipe for forward pass needs to be defined within this function, one should call the "),c=a(p,"CODE",{});var M=i(c);f=s(M,"Module"),M.forEach(t),k=s(p,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),p.forEach(t)},m(l,p){_(l,d,p),e(d,g),e(d,c),e(c,f),e(d,k)},d(l){l&&t(d)}}}function G2(E){let d,g,c,f,k;return f=new me({props:{code:`from transformers import DistilBertTokenizer, FlaxDistilBertForSequenceClassification

tokenizer = DistilBertTokenizer.from_pretrained("distilbert-base-uncased")
model = FlaxDistilBertForSequenceClassification.from_pretrained("distilbert-base-uncased")

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

outputs = model(**inputs)
logits = outputs.logits`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> DistilBertTokenizer, FlaxDistilBertForSequenceClassification

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = DistilBertTokenizer.from_pretrained(<span class="hljs-string">&quot;distilbert-base-uncased&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = FlaxDistilBertForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;distilbert-base-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;jax&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs)
<span class="hljs-meta">&gt;&gt;&gt; </span>logits = outputs.logits`}}),{c(){d=r("p"),g=o("Example:"),c=h(),w(f.$$.fragment)},l(l){d=a(l,"P",{});var p=i(d);g=s(p,"Example:"),p.forEach(t),c=u(l),T(f.$$.fragment,l)},m(l,p){_(l,d,p),e(d,g),_(l,c,p),$(f,l,p),k=!0},p:fe,i(l){k||(y(f.$$.fragment,l),k=!0)},o(l){D(f.$$.fragment,l),k=!1},d(l){l&&t(d),l&&t(c),F(f,l)}}}function X2(E){let d,g,c,f,k;return{c(){d=r("p"),g=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),c=r("code"),f=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 p=i(d);g=s(p,"Although the recipe for forward pass needs to be defined within this function, one should call the "),c=a(p,"CODE",{});var M=i(c);f=s(M,"Module"),M.forEach(t),k=s(p,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),p.forEach(t)},m(l,p){_(l,d,p),e(d,g),e(d,c),e(c,f),e(d,k)},d(l){l&&t(d)}}}function Y2(E){let d,g,c,f,k;return f=new me({props:{code:`from transformers import DistilBertTokenizer, FlaxDistilBertForMultipleChoice

tokenizer = DistilBertTokenizer.from_pretrained("distilbert-base-uncased")
model = FlaxDistilBertForMultipleChoice.from_pretrained("distilbert-base-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="jax", padding=True)
outputs = model(**{k: v[None, :] for k, v in encoding.items()})

logits = outputs.logits`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> DistilBertTokenizer, FlaxDistilBertForMultipleChoice

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = DistilBertTokenizer.from_pretrained(<span class="hljs-string">&quot;distilbert-base-uncased&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = FlaxDistilBertForMultipleChoice.from_pretrained(<span class="hljs-string">&quot;distilbert-base-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;jax&quot;</span>, padding=<span class="hljs-literal">True</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**{k: v[<span class="hljs-literal">None</span>, :] <span class="hljs-keyword">for</span> k, v <span class="hljs-keyword">in</span> encoding.items()})

<span class="hljs-meta">&gt;&gt;&gt; </span>logits = outputs.logits`}}),{c(){d=r("p"),g=o("Example:"),c=h(),w(f.$$.fragment)},l(l){d=a(l,"P",{});var p=i(d);g=s(p,"Example:"),p.forEach(t),c=u(l),T(f.$$.fragment,l)},m(l,p){_(l,d,p),e(d,g),_(l,c,p),$(f,l,p),k=!0},p:fe,i(l){k||(y(f.$$.fragment,l),k=!0)},o(l){D(f.$$.fragment,l),k=!1},d(l){l&&t(d),l&&t(c),F(f,l)}}}function Z2(E){let d,g,c,f,k;return{c(){d=r("p"),g=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),c=r("code"),f=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 p=i(d);g=s(p,"Although the recipe for forward pass needs to be defined within this function, one should call the "),c=a(p,"CODE",{});var M=i(c);f=s(M,"Module"),M.forEach(t),k=s(p,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),p.forEach(t)},m(l,p){_(l,d,p),e(d,g),e(d,c),e(c,f),e(d,k)},d(l){l&&t(d)}}}function eD(E){let d,g,c,f,k;return f=new me({props:{code:`from transformers import DistilBertTokenizer, FlaxDistilBertForTokenClassification

tokenizer = DistilBertTokenizer.from_pretrained("distilbert-base-uncased")
model = FlaxDistilBertForTokenClassification.from_pretrained("distilbert-base-uncased")

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

outputs = model(**inputs)
logits = outputs.logits`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> DistilBertTokenizer, FlaxDistilBertForTokenClassification

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = DistilBertTokenizer.from_pretrained(<span class="hljs-string">&quot;distilbert-base-uncased&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = FlaxDistilBertForTokenClassification.from_pretrained(<span class="hljs-string">&quot;distilbert-base-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;jax&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs)
<span class="hljs-meta">&gt;&gt;&gt; </span>logits = outputs.logits`}}),{c(){d=r("p"),g=o("Example:"),c=h(),w(f.$$.fragment)},l(l){d=a(l,"P",{});var p=i(d);g=s(p,"Example:"),p.forEach(t),c=u(l),T(f.$$.fragment,l)},m(l,p){_(l,d,p),e(d,g),_(l,c,p),$(f,l,p),k=!0},p:fe,i(l){k||(y(f.$$.fragment,l),k=!0)},o(l){D(f.$$.fragment,l),k=!1},d(l){l&&t(d),l&&t(c),F(f,l)}}}function tD(E){let d,g,c,f,k;return{c(){d=r("p"),g=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),c=r("code"),f=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 p=i(d);g=s(p,"Although the recipe for forward pass needs to be defined within this function, one should call the "),c=a(p,"CODE",{});var M=i(c);f=s(M,"Module"),M.forEach(t),k=s(p,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),p.forEach(t)},m(l,p){_(l,d,p),e(d,g),e(d,c),e(c,f),e(d,k)},d(l){l&&t(d)}}}function oD(E){let d,g,c,f,k;return f=new me({props:{code:`from transformers import DistilBertTokenizer, FlaxDistilBertForQuestionAnswering

tokenizer = DistilBertTokenizer.from_pretrained("distilbert-base-uncased")
model = FlaxDistilBertForQuestionAnswering.from_pretrained("distilbert-base-uncased")

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

outputs = model(**inputs)
start_scores = outputs.start_logits
end_scores = outputs.end_logits`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> DistilBertTokenizer, FlaxDistilBertForQuestionAnswering

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = DistilBertTokenizer.from_pretrained(<span class="hljs-string">&quot;distilbert-base-uncased&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = FlaxDistilBertForQuestionAnswering.from_pretrained(<span class="hljs-string">&quot;distilbert-base-uncased&quot;</span>)

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

<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs)
<span class="hljs-meta">&gt;&gt;&gt; </span>start_scores = outputs.start_logits
<span class="hljs-meta">&gt;&gt;&gt; </span>end_scores = outputs.end_logits`}}),{c(){d=r("p"),g=o("Example:"),c=h(),w(f.$$.fragment)},l(l){d=a(l,"P",{});var p=i(d);g=s(p,"Example:"),p.forEach(t),c=u(l),T(f.$$.fragment,l)},m(l,p){_(l,d,p),e(d,g),_(l,c,p),$(f,l,p),k=!0},p:fe,i(l){k||(y(f.$$.fragment,l),k=!0)},o(l){D(f.$$.fragment,l),k=!1},d(l){l&&t(d),l&&t(c),F(f,l)}}}function sD(E){let d,g,c,f,k,l,p,M,we,ge,I,re,oe,B,Te,U,$e,_e,O,ye,ae,H,De,ie,V,Fe,de,J,Be,be,te,z,q,le,K,Ee,ke,R,xe,ve,C,se,G,ce,Me,X,pe,je,L,he,Y,ze,ne,P,Ce,A,Pe,qe,v,x,Ue,ee,Ke,He,j,Ve,Je,Ne,Ge,Xe,N,S,Oe,Se,W,Ye,We,Ae,Re,Q,Ie,Cu,Gt,Pu,Si,qu,Au,Wi,Ou,Nu,Yn,Iu,Lu,Su,$o,Wu,Qi,Qu,Ru,Ri,Uu,Ku,Hu,hs,Sp,yo,us,Vl,Zn,Vu,Jl,Ju,Wp,zt,er,Gu,Gl,Xu,Yu,fs,Ui,Zu,ef,Ki,tf,of,sf,tr,nf,Hi,rf,af,Qp,Do,ms,Xl,or,lf,Yl,df,Rp,Ct,sr,cf,nr,pf,Zl,hf,uf,ff,gs,Vi,mf,gf,Ji,_f,bf,kf,rr,vf,Gi,wf,Tf,Up,Fo,_s,ed,ar,$f,td,yf,Kp,ht,ir,Df,od,Ff,Bf,lr,Ef,Xi,xf,Mf,jf,dr,zf,cr,Cf,Pf,qf,Pt,pr,Af,Bo,Of,Yi,Nf,If,sd,Lf,Sf,Wf,bs,Qf,ks,Hp,Eo,vs,nd,hr,Rf,rd,Uf,Vp,ut,ur,Kf,fr,Hf,ad,Vf,Jf,Gf,mr,Xf,Zi,Yf,Zf,em,gr,tm,_r,om,sm,nm,bt,br,rm,xo,am,el,im,lm,id,dm,cm,pm,ws,hm,Ts,um,$s,Jp,Mo,ys,ld,kr,fm,dd,mm,Gp,ft,vr,gm,cd,_m,bm,wr,km,tl,vm,wm,Tm,Tr,$m,$r,ym,Dm,Fm,rt,yr,Bm,jo,Em,ol,xm,Mm,pd,jm,zm,Cm,Ds,Pm,Fs,qm,Bs,Am,Es,Om,xs,Xp,zo,Ms,hd,Dr,Nm,ud,Im,Yp,mt,Fr,Lm,fd,Sm,Wm,Br,Qm,sl,Rm,Um,Km,Er,Hm,xr,Vm,Jm,Gm,qt,Mr,Xm,Co,Ym,nl,Zm,eg,md,tg,og,sg,js,ng,zs,Zp,Po,Cs,gd,jr,rg,_d,ag,eh,gt,zr,ig,bd,lg,dg,Cr,cg,rl,pg,hg,ug,Pr,fg,qr,mg,gg,_g,kt,Ar,bg,qo,kg,al,vg,wg,kd,Tg,$g,yg,Ps,Dg,qs,Fg,As,th,Ao,Os,vd,Or,Bg,wd,Eg,oh,_t,Nr,xg,Oo,Mg,Td,jg,zg,$d,Cg,Pg,qg,Ir,Ag,il,Og,Ng,Ig,Lr,Lg,Sr,Sg,Wg,Qg,vt,Wr,Rg,No,Ug,ll,Kg,Hg,yd,Vg,Jg,Gg,Ns,Xg,Is,Yg,Ls,sh,Io,Ss,Dd,Qr,Zg,Fd,e_,nh,at,Rr,t_,Bd,o_,s_,Ur,n_,dl,r_,a_,i_,Kr,l_,Hr,d_,c_,p_,Ws,h_,At,Vr,u_,Lo,f_,cl,m_,g_,Ed,__,b_,k_,Qs,v_,Rs,rh,So,Us,xd,Jr,w_,Md,T_,ah,it,Gr,$_,Xr,y_,jd,D_,F_,B_,Yr,E_,pl,x_,M_,j_,Zr,z_,ea,C_,P_,q_,Ks,A_,wt,ta,O_,Wo,N_,hl,I_,L_,zd,S_,W_,Q_,Hs,R_,Vs,U_,Js,ih,Qo,Gs,Cd,oa,K_,Pd,H_,lh,lt,sa,V_,qd,J_,G_,na,X_,ul,Y_,Z_,eb,ra,tb,aa,ob,sb,nb,Xs,rb,Tt,ia,ab,Ro,ib,fl,lb,db,Ad,cb,pb,hb,Ys,ub,Zs,fb,en,dh,Uo,tn,Od,la,mb,Nd,gb,ch,dt,da,_b,Id,bb,kb,ca,vb,ml,wb,Tb,$b,pa,yb,ha,Db,Fb,Bb,on,Eb,Ot,ua,xb,Ko,Mb,gl,jb,zb,Ld,Cb,Pb,qb,sn,Ab,nn,ph,Ho,rn,Sd,fa,Ob,Wd,Nb,hh,ct,ma,Ib,Qd,Lb,Sb,ga,Wb,_l,Qb,Rb,Ub,_a,Kb,ba,Hb,Vb,Jb,an,Gb,$t,ka,Xb,Vo,Yb,bl,Zb,ek,Rd,tk,ok,sk,ln,nk,dn,rk,cn,uh,Jo,pn,Ud,va,ak,Kd,ik,fh,pt,wa,lk,Go,dk,Hd,ck,pk,Vd,hk,uk,fk,Ta,mk,kl,gk,_k,bk,$a,kk,ya,vk,wk,Tk,hn,$k,yt,Da,yk,Xo,Dk,vl,Fk,Bk,Jd,Ek,xk,Mk,un,jk,fn,zk,mn,mh,Yo,gn,Gd,Fa,Ck,Xd,Pk,gh,Ze,Ba,qk,Yd,Ak,Ok,Ea,Nk,wl,Ik,Lk,Sk,xa,Wk,Ma,Qk,Rk,Uk,Zd,Kk,Hk,Xt,ec,ja,Vk,Jk,tc,za,Gk,Xk,oc,Ca,Yk,Zk,sc,Pa,ev,tv,Nt,qa,ov,Zo,sv,nc,nv,rv,rc,av,iv,lv,_n,dv,bn,_h,es,kn,ac,Aa,cv,ic,pv,bh,et,Oa,hv,Na,uv,lc,fv,mv,gv,Ia,_v,Tl,bv,kv,vv,La,wv,Sa,Tv,$v,yv,dc,Dv,Fv,Yt,cc,Wa,Bv,Ev,pc,Qa,xv,Mv,hc,Ra,jv,zv,uc,Ua,Cv,Pv,It,Ka,qv,ts,Av,fc,Ov,Nv,mc,Iv,Lv,Sv,vn,Wv,wn,kh,os,Tn,gc,Ha,Qv,_c,Rv,vh,tt,Va,Uv,bc,Kv,Hv,Ja,Vv,$l,Jv,Gv,Xv,Ga,Yv,Xa,Zv,ew,tw,kc,ow,sw,Zt,vc,Ya,nw,rw,wc,Za,aw,iw,Tc,ei,lw,dw,$c,ti,cw,pw,Lt,oi,hw,ss,uw,yc,fw,mw,Dc,gw,_w,bw,$n,kw,yn,wh,ns,Dn,Fc,si,vw,Bc,ww,Th,ot,ni,Tw,Ec,$w,yw,ri,Dw,yl,Fw,Bw,Ew,ai,xw,ii,Mw,jw,zw,xc,Cw,Pw,eo,Mc,li,qw,Aw,jc,di,Ow,Nw,zc,ci,Iw,Lw,Cc,pi,Sw,Ww,St,hi,Qw,rs,Rw,Pc,Uw,Kw,qc,Hw,Vw,Jw,Fn,Gw,Bn,$h,as,En,Ac,ui,Xw,Oc,Yw,yh,st,fi,Zw,Nc,eT,tT,mi,oT,Dl,sT,nT,rT,gi,aT,_i,iT,lT,dT,Ic,cT,pT,to,Lc,bi,hT,uT,Sc,ki,fT,mT,Wc,vi,gT,_T,Qc,wi,bT,kT,Wt,Ti,vT,is,wT,Rc,TT,$T,Uc,yT,DT,FT,xn,BT,Mn,Dh,ls,jn,Kc,$i,ET,Hc,xT,Fh,nt,yi,MT,ds,jT,Vc,zT,CT,Jc,PT,qT,AT,Di,OT,Fl,NT,IT,LT,Fi,ST,Bi,WT,QT,RT,Gc,UT,KT,oo,Xc,Ei,HT,VT,Yc,xi,JT,GT,Zc,Mi,XT,YT,ep,ji,ZT,e$,Qt,zi,t$,cs,o$,tp,s$,n$,op,r$,a$,i$,zn,l$,Cn,Bh;return l=new Qe({}),B=new Qe({}),W=new Qe({}),Ie=new Z({props:{name:"class transformers.DistilBertConfig",anchor:"transformers.DistilBertConfig",parameters:[{name:"vocab_size",val:" = 30522"},{name:"max_position_embeddings",val:" = 512"},{name:"sinusoidal_pos_embds",val:" = False"},{name:"n_layers",val:" = 6"},{name:"n_heads",val:" = 12"},{name:"dim",val:" = 768"},{name:"hidden_dim",val:" = 3072"},{name:"dropout",val:" = 0.1"},{name:"attention_dropout",val:" = 0.1"},{name:"activation",val:" = 'gelu'"},{name:"initializer_range",val:" = 0.02"},{name:"qa_dropout",val:" = 0.1"},{name:"seq_classif_dropout",val:" = 0.2"},{name:"pad_token_id",val:" = 0"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.DistilBertConfig.vocab_size",description:`<strong>vocab_size</strong> (<code>int</code>, <em>optional</em>, defaults to 30522) &#x2014;
Vocabulary size of the DistilBERT model. Defines the number of different tokens that can be represented by
the <code>inputs_ids</code> passed when calling <a href="/docs/transformers/pr_19907/en/model_doc/distilbert#transformers.DistilBertModel">DistilBertModel</a> or <a href="/docs/transformers/pr_19907/en/model_doc/distilbert#transformers.TFDistilBertModel">TFDistilBertModel</a>.`,name:"vocab_size"},{anchor:"transformers.DistilBertConfig.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.DistilBertConfig.sinusoidal_pos_embds",description:`<strong>sinusoidal_pos_embds</strong> (<code>boolean</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether to use sinusoidal positional embeddings.`,name:"sinusoidal_pos_embds"},{anchor:"transformers.DistilBertConfig.n_layers",description:`<strong>n_layers</strong> (<code>int</code>, <em>optional</em>, defaults to 6) &#x2014;
Number of hidden layers in the Transformer encoder.`,name:"n_layers"},{anchor:"transformers.DistilBertConfig.n_heads",description:`<strong>n_heads</strong> (<code>int</code>, <em>optional</em>, defaults to 12) &#x2014;
Number of attention heads for each attention layer in the Transformer encoder.`,name:"n_heads"},{anchor:"transformers.DistilBertConfig.dim",description:`<strong>dim</strong> (<code>int</code>, <em>optional</em>, defaults to 768) &#x2014;
Dimensionality of the encoder layers and the pooler layer.`,name:"dim"},{anchor:"transformers.DistilBertConfig.hidden_dim",description:`<strong>hidden_dim</strong> (<code>int</code>, <em>optional</em>, defaults to 3072) &#x2014;
The size of the &#x201C;intermediate&#x201D; (often named feed-forward) layer in the Transformer encoder.`,name:"hidden_dim"},{anchor:"transformers.DistilBertConfig.dropout",description:`<strong>dropout</strong> (<code>float</code>, <em>optional</em>, defaults to 0.1) &#x2014;
The dropout probability for all fully connected layers in the embeddings, encoder, and pooler.`,name:"dropout"},{anchor:"transformers.DistilBertConfig.attention_dropout",description:`<strong>attention_dropout</strong> (<code>float</code>, <em>optional</em>, defaults to 0.1) &#x2014;
The dropout ratio for the attention probabilities.`,name:"attention_dropout"},{anchor:"transformers.DistilBertConfig.activation",description:`<strong>activation</strong> (<code>str</code> or <code>Callable</code>, <em>optional</em>, defaults to <code>&quot;gelu&quot;</code>) &#x2014;
The non-linear activation function (function or string) in the encoder and pooler. If string, <code>&quot;gelu&quot;</code>,
<code>&quot;relu&quot;</code>, <code>&quot;silu&quot;</code> and <code>&quot;gelu_new&quot;</code> are supported.`,name:"activation"},{anchor:"transformers.DistilBertConfig.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.DistilBertConfig.qa_dropout",description:`<strong>qa_dropout</strong> (<code>float</code>, <em>optional</em>, defaults to 0.1) &#x2014;
The dropout probabilities used in the question answering model <a href="/docs/transformers/pr_19907/en/model_doc/distilbert#transformers.DistilBertForQuestionAnswering">DistilBertForQuestionAnswering</a>.`,name:"qa_dropout"},{anchor:"transformers.DistilBertConfig.seq_classif_dropout",description:`<strong>seq_classif_dropout</strong> (<code>float</code>, <em>optional</em>, defaults to 0.2) &#x2014;
The dropout probabilities used in the sequence classification and the multiple choice model
<a href="/docs/transformers/pr_19907/en/model_doc/distilbert#transformers.DistilBertForSequenceClassification">DistilBertForSequenceClassification</a>.`,name:"seq_classif_dropout"}],source:"https://github.com/huggingface/transformers/blob/vr_19907/src/transformers/models/distilbert/configuration_distilbert.py#L45"}}),hs=new ue({props:{anchor:"transformers.DistilBertConfig.example",$$slots:{default:[n2]},$$scope:{ctx:E}}}),Zn=new Qe({}),er=new Z({props:{name:"class transformers.DistilBertTokenizer",anchor:"transformers.DistilBertTokenizer",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:""}],source:"https://github.com/huggingface/transformers/blob/vr_19907/src/transformers/models/distilbert/tokenization_distilbert.py#L62"}}),or=new Qe({}),sr=new Z({props:{name:"class transformers.DistilBertTokenizerFast",anchor:"transformers.DistilBertTokenizerFast",parameters:[{name:"vocab_file",val:" = None"},{name:"tokenizer_file",val:" = None"},{name:"do_lower_case",val:" = True"},{name:"unk_token",val:" = '[UNK]'"},{name:"sep_token",val:" = '[SEP]'"},{name:"pad_token",val:" = '[PAD]'"},{name:"cls_token",val:" = '[CLS]'"},{name:"mask_token",val:" = '[MASK]'"},{name:"tokenize_chinese_chars",val:" = True"},{name:"strip_accents",val:" = None"},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/vr_19907/src/transformers/models/distilbert/tokenization_distilbert_fast.py#L79"}}),ar=new Qe({}),ir=new Z({props:{name:"class transformers.DistilBertModel",anchor:"transformers.DistilBertModel",parameters:[{name:"config",val:": PretrainedConfig"}],parametersDescription:[{anchor:"transformers.DistilBertModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_19907/en/model_doc/distilbert#transformers.DistilBertConfig">DistilBertConfig</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/pr_19907/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/vr_19907/src/transformers/models/distilbert/modeling_distilbert.py#L453"}}),pr=new Z({props:{name:"forward",anchor:"transformers.DistilBertModel.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"attention_mask",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:"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.DistilBertModel.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, num_choices)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/pr_19907/en/model_doc/distilbert#transformers.DistilBertTokenizer">DistilBertTokenizer</a>. See <a href="/docs/transformers/pr_19907/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_19907/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.DistilBertModel.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_choices)</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.DistilBertModel.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.DistilBertModel.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_choices, 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.DistilBertModel.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.DistilBertModel.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.DistilBertModel.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/pr_19907/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/vr_19907/src/transformers/models/distilbert/modeling_distilbert.py#L525",returnDescription:`
<p>A <a
  href="/docs/transformers/pr_19907/en/main_classes/output#transformers.modeling_outputs.BaseModelOutput"
>transformers.modeling_outputs.BaseModelOutput</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/pr_19907/en/model_doc/distilbert#transformers.DistilBertConfig"
>DistilBertConfig</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>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/pr_19907/en/main_classes/output#transformers.modeling_outputs.BaseModelOutput"
>transformers.modeling_outputs.BaseModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),bs=new Le({props:{$$slots:{default:[r2]},$$scope:{ctx:E}}}),ks=new ue({props:{anchor:"transformers.DistilBertModel.forward.example",$$slots:{default:[a2]},$$scope:{ctx:E}}}),hr=new Qe({}),ur=new Z({props:{name:"class transformers.DistilBertForMaskedLM",anchor:"transformers.DistilBertForMaskedLM",parameters:[{name:"config",val:": PretrainedConfig"}],parametersDescription:[{anchor:"transformers.DistilBertForMaskedLM.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_19907/en/model_doc/distilbert#transformers.DistilBertConfig">DistilBertConfig</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/pr_19907/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/vr_19907/src/transformers/models/distilbert/modeling_distilbert.py#L581"}}),br=new Z({props:{name:"forward",anchor:"transformers.DistilBertForMaskedLM.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"attention_mask",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.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.DistilBertForMaskedLM.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, num_choices)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/pr_19907/en/model_doc/distilbert#transformers.DistilBertTokenizer">DistilBertTokenizer</a>. See <a href="/docs/transformers/pr_19907/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_19907/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.DistilBertForMaskedLM.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_choices)</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.DistilBertForMaskedLM.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.DistilBertForMaskedLM.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_choices, 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.DistilBertForMaskedLM.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.DistilBertForMaskedLM.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.DistilBertForMaskedLM.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/pr_19907/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.DistilBertForMaskedLM.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/vr_19907/src/transformers/models/distilbert/modeling_distilbert.py#L623",returnDescription:`
<p>A <a
  href="/docs/transformers/pr_19907/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/pr_19907/en/model_doc/distilbert#transformers.DistilBertConfig"
>DistilBertConfig</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/pr_19907/en/main_classes/output#transformers.modeling_outputs.MaskedLMOutput"
>transformers.modeling_outputs.MaskedLMOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),ws=new Le({props:{$$slots:{default:[i2]},$$scope:{ctx:E}}}),Ts=new ue({props:{anchor:"transformers.DistilBertForMaskedLM.forward.example",$$slots:{default:[l2]},$$scope:{ctx:E}}}),$s=new ue({props:{anchor:"transformers.DistilBertForMaskedLM.forward.example-2",$$slots:{default:[d2]},$$scope:{ctx:E}}}),kr=new Qe({}),vr=new Z({props:{name:"class transformers.DistilBertForSequenceClassification",anchor:"transformers.DistilBertForSequenceClassification",parameters:[{name:"config",val:": PretrainedConfig"}],parametersDescription:[{anchor:"transformers.DistilBertForSequenceClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_19907/en/model_doc/distilbert#transformers.DistilBertConfig">DistilBertConfig</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/pr_19907/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/vr_19907/src/transformers/models/distilbert/modeling_distilbert.py#L687"}}),yr=new Z({props:{name:"forward",anchor:"transformers.DistilBertForSequenceClassification.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"attention_mask",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.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.DistilBertForSequenceClassification.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/pr_19907/en/model_doc/distilbert#transformers.DistilBertTokenizer">DistilBertTokenizer</a>. See <a href="/docs/transformers/pr_19907/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_19907/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.DistilBertForSequenceClassification.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.DistilBertForSequenceClassification.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.DistilBertForSequenceClassification.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.DistilBertForSequenceClassification.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.DistilBertForSequenceClassification.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.DistilBertForSequenceClassification.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/pr_19907/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.DistilBertForSequenceClassification.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/vr_19907/src/transformers/models/distilbert/modeling_distilbert.py#L721",returnDescription:`
<p>A <a
  href="/docs/transformers/pr_19907/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/pr_19907/en/model_doc/distilbert#transformers.DistilBertConfig"
>DistilBertConfig</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/pr_19907/en/main_classes/output#transformers.modeling_outputs.SequenceClassifierOutput"
>transformers.modeling_outputs.SequenceClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Ds=new Le({props:{$$slots:{default:[c2]},$$scope:{ctx:E}}}),Fs=new ue({props:{anchor:"transformers.DistilBertForSequenceClassification.forward.example",$$slots:{default:[p2]},$$scope:{ctx:E}}}),Bs=new ue({props:{anchor:"transformers.DistilBertForSequenceClassification.forward.example-2",$$slots:{default:[h2]},$$scope:{ctx:E}}}),Es=new ue({props:{anchor:"transformers.DistilBertForSequenceClassification.forward.example-3",$$slots:{default:[u2]},$$scope:{ctx:E}}}),xs=new ue({props:{anchor:"transformers.DistilBertForSequenceClassification.forward.example-4",$$slots:{default:[f2]},$$scope:{ctx:E}}}),Dr=new Qe({}),Fr=new Z({props:{name:"class transformers.DistilBertForMultipleChoice",anchor:"transformers.DistilBertForMultipleChoice",parameters:[{name:"config",val:": PretrainedConfig"}],parametersDescription:[{anchor:"transformers.DistilBertForMultipleChoice.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_19907/en/model_doc/distilbert#transformers.DistilBertConfig">DistilBertConfig</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/pr_19907/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/vr_19907/src/transformers/models/distilbert/modeling_distilbert.py#L1017"}}),Mr=new Z({props:{name:"forward",anchor:"transformers.DistilBertForMultipleChoice.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"attention_mask",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.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.DistilBertForMultipleChoice.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/pr_19907/en/model_doc/distilbert#transformers.DistilBertTokenizer">DistilBertTokenizer</a>. See <a href="/docs/transformers/pr_19907/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_19907/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.DistilBertForMultipleChoice.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.DistilBertForMultipleChoice.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.DistilBertForMultipleChoice.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.DistilBertForMultipleChoice.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.DistilBertForMultipleChoice.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.DistilBertForMultipleChoice.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/pr_19907/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.DistilBertForMultipleChoice.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/vr_19907/src/transformers/models/distilbert/modeling_distilbert.py#L1049",returnDescription:`
<p>A <a
  href="/docs/transformers/pr_19907/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/pr_19907/en/model_doc/distilbert#transformers.DistilBertConfig"
>DistilBertConfig</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/pr_19907/en/main_classes/output#transformers.modeling_outputs.MultipleChoiceModelOutput"
>transformers.modeling_outputs.MultipleChoiceModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),js=new Le({props:{$$slots:{default:[m2]},$$scope:{ctx:E}}}),zs=new ue({props:{anchor:"transformers.DistilBertForMultipleChoice.forward.example",$$slots:{default:[g2]},$$scope:{ctx:E}}}),jr=new Qe({}),zr=new Z({props:{name:"class transformers.DistilBertForTokenClassification",anchor:"transformers.DistilBertForTokenClassification",parameters:[{name:"config",val:": PretrainedConfig"}],parametersDescription:[{anchor:"transformers.DistilBertForTokenClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_19907/en/model_doc/distilbert#transformers.DistilBertConfig">DistilBertConfig</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/pr_19907/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/vr_19907/src/transformers/models/distilbert/modeling_distilbert.py#L922"}}),Ar=new Z({props:{name:"forward",anchor:"transformers.DistilBertForTokenClassification.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"attention_mask",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.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.DistilBertForTokenClassification.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>({0})</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/pr_19907/en/model_doc/distilbert#transformers.DistilBertTokenizer">DistilBertTokenizer</a>. See <a href="/docs/transformers/pr_19907/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_19907/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.DistilBertForTokenClassification.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.FloatTensor</code> of shape <code>({0})</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.DistilBertForTokenClassification.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.DistilBertForTokenClassification.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>({0}, 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.DistilBertForTokenClassification.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.DistilBertForTokenClassification.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.DistilBertForTokenClassification.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/pr_19907/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.DistilBertForTokenClassification.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/vr_19907/src/transformers/models/distilbert/modeling_distilbert.py#L954",returnDescription:`
<p>A <a
  href="/docs/transformers/pr_19907/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/pr_19907/en/model_doc/distilbert#transformers.DistilBertConfig"
>DistilBertConfig</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/pr_19907/en/main_classes/output#transformers.modeling_outputs.TokenClassifierOutput"
>transformers.modeling_outputs.TokenClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Ps=new Le({props:{$$slots:{default:[_2]},$$scope:{ctx:E}}}),qs=new ue({props:{anchor:"transformers.DistilBertForTokenClassification.forward.example",$$slots:{default:[b2]},$$scope:{ctx:E}}}),As=new ue({props:{anchor:"transformers.DistilBertForTokenClassification.forward.example-2",$$slots:{default:[k2]},$$scope:{ctx:E}}}),Or=new Qe({}),Nr=new Z({props:{name:"class transformers.DistilBertForQuestionAnswering",anchor:"transformers.DistilBertForQuestionAnswering",parameters:[{name:"config",val:": PretrainedConfig"}],parametersDescription:[{anchor:"transformers.DistilBertForQuestionAnswering.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_19907/en/model_doc/distilbert#transformers.DistilBertConfig">DistilBertConfig</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/pr_19907/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/vr_19907/src/transformers/models/distilbert/modeling_distilbert.py#L805"}}),Wr=new Z({props:{name:"forward",anchor:"transformers.DistilBertForQuestionAnswering.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"attention_mask",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.DistilBertForQuestionAnswering.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, num_choices)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/pr_19907/en/model_doc/distilbert#transformers.DistilBertTokenizer">DistilBertTokenizer</a>. See <a href="/docs/transformers/pr_19907/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_19907/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.DistilBertForQuestionAnswering.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_choices)</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.DistilBertForQuestionAnswering.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.DistilBertForQuestionAnswering.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_choices, 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.DistilBertForQuestionAnswering.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.DistilBertForQuestionAnswering.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.DistilBertForQuestionAnswering.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/pr_19907/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.DistilBertForQuestionAnswering.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.DistilBertForQuestionAnswering.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/vr_19907/src/transformers/models/distilbert/modeling_distilbert.py#L837",returnDescription:`
<p>A <a
  href="/docs/transformers/pr_19907/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/pr_19907/en/model_doc/distilbert#transformers.DistilBertConfig"
>DistilBertConfig</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/pr_19907/en/main_classes/output#transformers.modeling_outputs.QuestionAnsweringModelOutput"
>transformers.modeling_outputs.QuestionAnsweringModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Ns=new Le({props:{$$slots:{default:[v2]},$$scope:{ctx:E}}}),Is=new ue({props:{anchor:"transformers.DistilBertForQuestionAnswering.forward.example",$$slots:{default:[w2]},$$scope:{ctx:E}}}),Ls=new ue({props:{anchor:"transformers.DistilBertForQuestionAnswering.forward.example-2",$$slots:{default:[T2]},$$scope:{ctx:E}}}),Qr=new Qe({}),Rr=new Z({props:{name:"class transformers.TFDistilBertModel",anchor:"transformers.TFDistilBertModel",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFDistilBertModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_19907/en/model_doc/distilbert#transformers.DistilBertConfig">DistilBertConfig</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/pr_19907/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/vr_19907/src/transformers/models/distilbert/modeling_tf_distilbert.py#L537"}}),Ws=new Le({props:{$$slots:{default:[$2]},$$scope:{ctx:E}}}),Vr=new Z({props:{name:"call",anchor:"transformers.TFDistilBertModel.call",parameters:[{name:"input_ids",val:": typing.Union[typing.List[tensorflow.python.framework.ops.Tensor], typing.List[numpy.ndarray], typing.List[tensorflow.python.keras.engine.keras_tensor.KerasTensor], typing.Dict[str, tensorflow.python.framework.ops.Tensor], typing.Dict[str, numpy.ndarray], typing.Dict[str, tensorflow.python.keras.engine.keras_tensor.KerasTensor], tensorflow.python.framework.ops.Tensor, numpy.ndarray, tensorflow.python.keras.engine.keras_tensor.KerasTensor, NoneType] = None"},{name:"attention_mask",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.TFDistilBertModel.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/pr_19907/en/model_doc/distilbert#transformers.DistilBertTokenizer">DistilBertTokenizer</a>. See <a href="/docs/transformers/pr_19907/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/pr_19907/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.TFDistilBertModel.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.TFDistilBertModel.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.TFDistilBertModel.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.TFDistilBertModel.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.TFDistilBertModel.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.TFDistilBertModel.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/pr_19907/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.TFDistilBertModel.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/vr_19907/src/transformers/models/distilbert/modeling_tf_distilbert.py#L542",returnDescription:`
<p>A <a
  href="/docs/transformers/pr_19907/en/main_classes/output#transformers.modeling_tf_outputs.TFBaseModelOutput"
>transformers.modeling_tf_outputs.TFBaseModelOutput</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/pr_19907/en/model_doc/distilbert#transformers.DistilBertConfig"
>DistilBertConfig</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>hidden_states</strong> (<code>tuple(tf.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>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/pr_19907/en/main_classes/output#transformers.modeling_tf_outputs.TFBaseModelOutput"
>transformers.modeling_tf_outputs.TFBaseModelOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),Qs=new Le({props:{$$slots:{default:[y2]},$$scope:{ctx:E}}}),Rs=new ue({props:{anchor:"transformers.TFDistilBertModel.call.example",$$slots:{default:[D2]},$$scope:{ctx:E}}}),Jr=new Qe({}),Gr=new Z({props:{name:"class transformers.TFDistilBertForMaskedLM",anchor:"transformers.TFDistilBertForMaskedLM",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFDistilBertForMaskedLM.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_19907/en/model_doc/distilbert#transformers.DistilBertConfig">DistilBertConfig</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/pr_19907/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/vr_19907/src/transformers/models/distilbert/modeling_tf_distilbert.py#L624"}}),Ks=new Le({props:{$$slots:{default:[F2]},$$scope:{ctx:E}}}),ta=new Z({props:{name:"call",anchor:"transformers.TFDistilBertForMaskedLM.call",parameters:[{name:"input_ids",val:": typing.Union[typing.List[tensorflow.python.framework.ops.Tensor], typing.List[numpy.ndarray], typing.List[tensorflow.python.keras.engine.keras_tensor.KerasTensor], typing.Dict[str, tensorflow.python.framework.ops.Tensor], typing.Dict[str, numpy.ndarray], typing.Dict[str, tensorflow.python.keras.engine.keras_tensor.KerasTensor], tensorflow.python.framework.ops.Tensor, numpy.ndarray, tensorflow.python.keras.engine.keras_tensor.KerasTensor, NoneType] = None"},{name:"attention_mask",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.TFDistilBertForMaskedLM.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/pr_19907/en/model_doc/distilbert#transformers.DistilBertTokenizer">DistilBertTokenizer</a>. See <a href="/docs/transformers/pr_19907/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/pr_19907/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.TFDistilBertForMaskedLM.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.TFDistilBertForMaskedLM.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.TFDistilBertForMaskedLM.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.TFDistilBertForMaskedLM.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.TFDistilBertForMaskedLM.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.TFDistilBertForMaskedLM.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/pr_19907/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.TFDistilBertForMaskedLM.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.TFDistilBertForMaskedLM.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 in <code>[0, ..., config.vocab_size]</code>`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/vr_19907/src/transformers/models/distilbert/modeling_tf_distilbert.py#L644",returnDescription:`
<p>A <a
  href="/docs/transformers/pr_19907/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/pr_19907/en/model_doc/distilbert#transformers.DistilBertConfig"
>DistilBertConfig</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/pr_19907/en/main_classes/output#transformers.modeling_tf_outputs.TFMaskedLMOutput"
>transformers.modeling_tf_outputs.TFMaskedLMOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),Hs=new Le({props:{$$slots:{default:[B2]},$$scope:{ctx:E}}}),Vs=new ue({props:{anchor:"transformers.TFDistilBertForMaskedLM.call.example",$$slots:{default:[E2]},$$scope:{ctx:E}}}),Js=new ue({props:{anchor:"transformers.TFDistilBertForMaskedLM.call.example-2",$$slots:{default:[x2]},$$scope:{ctx:E}}}),oa=new Qe({}),sa=new Z({props:{name:"class transformers.TFDistilBertForSequenceClassification",anchor:"transformers.TFDistilBertForSequenceClassification",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFDistilBertForSequenceClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_19907/en/model_doc/distilbert#transformers.DistilBertConfig">DistilBertConfig</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/pr_19907/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/vr_19907/src/transformers/models/distilbert/modeling_tf_distilbert.py#L714"}}),Xs=new Le({props:{$$slots:{default:[M2]},$$scope:{ctx:E}}}),ia=new Z({props:{name:"call",anchor:"transformers.TFDistilBertForSequenceClassification.call",parameters:[{name:"input_ids",val:": typing.Union[typing.List[tensorflow.python.framework.ops.Tensor], typing.List[numpy.ndarray], typing.List[tensorflow.python.keras.engine.keras_tensor.KerasTensor], typing.Dict[str, tensorflow.python.framework.ops.Tensor], typing.Dict[str, numpy.ndarray], typing.Dict[str, tensorflow.python.keras.engine.keras_tensor.KerasTensor], tensorflow.python.framework.ops.Tensor, numpy.ndarray, tensorflow.python.keras.engine.keras_tensor.KerasTensor, NoneType] = None"},{name:"attention_mask",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.TFDistilBertForSequenceClassification.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/pr_19907/en/model_doc/distilbert#transformers.DistilBertTokenizer">DistilBertTokenizer</a>. See <a href="/docs/transformers/pr_19907/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/pr_19907/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.TFDistilBertForSequenceClassification.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.TFDistilBertForSequenceClassification.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.TFDistilBertForSequenceClassification.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.TFDistilBertForSequenceClassification.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.TFDistilBertForSequenceClassification.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.TFDistilBertForSequenceClassification.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/pr_19907/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.TFDistilBertForSequenceClassification.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.TFDistilBertForSequenceClassification.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/vr_19907/src/transformers/models/distilbert/modeling_tf_distilbert.py#L731",returnDescription:`
<p>A <a
  href="/docs/transformers/pr_19907/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/pr_19907/en/model_doc/distilbert#transformers.DistilBertConfig"
>DistilBertConfig</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/pr_19907/en/main_classes/output#transformers.modeling_tf_outputs.TFSequenceClassifierOutput"
>transformers.modeling_tf_outputs.TFSequenceClassifierOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),Ys=new Le({props:{$$slots:{default:[j2]},$$scope:{ctx:E}}}),Zs=new ue({props:{anchor:"transformers.TFDistilBertForSequenceClassification.call.example",$$slots:{default:[z2]},$$scope:{ctx:E}}}),en=new ue({props:{anchor:"transformers.TFDistilBertForSequenceClassification.call.example-2",$$slots:{default:[C2]},$$scope:{ctx:E}}}),la=new Qe({}),da=new Z({props:{name:"class transformers.TFDistilBertForMultipleChoice",anchor:"transformers.TFDistilBertForMultipleChoice",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFDistilBertForMultipleChoice.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_19907/en/model_doc/distilbert#transformers.DistilBertConfig">DistilBertConfig</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/pr_19907/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/vr_19907/src/transformers/models/distilbert/modeling_tf_distilbert.py#L877"}}),on=new Le({props:{$$slots:{default:[P2]},$$scope:{ctx:E}}}),ua=new Z({props:{name:"call",anchor:"transformers.TFDistilBertForMultipleChoice.call",parameters:[{name:"input_ids",val:": typing.Union[typing.List[tensorflow.python.framework.ops.Tensor], typing.List[numpy.ndarray], typing.List[tensorflow.python.keras.engine.keras_tensor.KerasTensor], typing.Dict[str, tensorflow.python.framework.ops.Tensor], typing.Dict[str, numpy.ndarray], typing.Dict[str, tensorflow.python.keras.engine.keras_tensor.KerasTensor], tensorflow.python.framework.ops.Tensor, numpy.ndarray, tensorflow.python.keras.engine.keras_tensor.KerasTensor, NoneType] = None"},{name:"attention_mask",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.TFDistilBertForMultipleChoice.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/pr_19907/en/model_doc/distilbert#transformers.DistilBertTokenizer">DistilBertTokenizer</a>. See <a href="/docs/transformers/pr_19907/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/pr_19907/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.TFDistilBertForMultipleChoice.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.TFDistilBertForMultipleChoice.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.TFDistilBertForMultipleChoice.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.TFDistilBertForMultipleChoice.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.TFDistilBertForMultipleChoice.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.TFDistilBertForMultipleChoice.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/pr_19907/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.TFDistilBertForMultipleChoice.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.TFDistilBertForMultipleChoice.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/vr_19907/src/transformers/models/distilbert/modeling_tf_distilbert.py#L903",returnDescription:`
<p>A <a
  href="/docs/transformers/pr_19907/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/pr_19907/en/model_doc/distilbert#transformers.DistilBertConfig"
>DistilBertConfig</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/pr_19907/en/main_classes/output#transformers.modeling_tf_outputs.TFMultipleChoiceModelOutput"
>transformers.modeling_tf_outputs.TFMultipleChoiceModelOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),sn=new Le({props:{$$slots:{default:[q2]},$$scope:{ctx:E}}}),nn=new ue({props:{anchor:"transformers.TFDistilBertForMultipleChoice.call.example",$$slots:{default:[A2]},$$scope:{ctx:E}}}),fa=new Qe({}),ma=new Z({props:{name:"class transformers.TFDistilBertForTokenClassification",anchor:"transformers.TFDistilBertForTokenClassification",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFDistilBertForTokenClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_19907/en/model_doc/distilbert#transformers.DistilBertConfig">DistilBertConfig</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/pr_19907/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/vr_19907/src/transformers/models/distilbert/modeling_tf_distilbert.py#L801"}}),an=new Le({props:{$$slots:{default:[O2]},$$scope:{ctx:E}}}),ka=new Z({props:{name:"call",anchor:"transformers.TFDistilBertForTokenClassification.call",parameters:[{name:"input_ids",val:": typing.Union[typing.List[tensorflow.python.framework.ops.Tensor], typing.List[numpy.ndarray], typing.List[tensorflow.python.keras.engine.keras_tensor.KerasTensor], typing.Dict[str, tensorflow.python.framework.ops.Tensor], typing.Dict[str, numpy.ndarray], typing.Dict[str, tensorflow.python.keras.engine.keras_tensor.KerasTensor], tensorflow.python.framework.ops.Tensor, numpy.ndarray, tensorflow.python.keras.engine.keras_tensor.KerasTensor, NoneType] = None"},{name:"attention_mask",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.TFDistilBertForTokenClassification.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/pr_19907/en/model_doc/distilbert#transformers.DistilBertTokenizer">DistilBertTokenizer</a>. See <a href="/docs/transformers/pr_19907/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/pr_19907/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.TFDistilBertForTokenClassification.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.TFDistilBertForTokenClassification.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.TFDistilBertForTokenClassification.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.TFDistilBertForTokenClassification.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.TFDistilBertForTokenClassification.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.TFDistilBertForTokenClassification.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/pr_19907/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.TFDistilBertForTokenClassification.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.TFDistilBertForTokenClassification.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/vr_19907/src/transformers/models/distilbert/modeling_tf_distilbert.py#L812",returnDescription:`
<p>A <a
  href="/docs/transformers/pr_19907/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/pr_19907/en/model_doc/distilbert#transformers.DistilBertConfig"
>DistilBertConfig</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/pr_19907/en/main_classes/output#transformers.modeling_tf_outputs.TFTokenClassifierOutput"
>transformers.modeling_tf_outputs.TFTokenClassifierOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),ln=new Le({props:{$$slots:{default:[N2]},$$scope:{ctx:E}}}),dn=new ue({props:{anchor:"transformers.TFDistilBertForTokenClassification.call.example",$$slots:{default:[I2]},$$scope:{ctx:E}}}),cn=new ue({props:{anchor:"transformers.TFDistilBertForTokenClassification.call.example-2",$$slots:{default:[L2]},$$scope:{ctx:E}}}),va=new Qe({}),wa=new Z({props:{name:"class transformers.TFDistilBertForQuestionAnswering",anchor:"transformers.TFDistilBertForQuestionAnswering",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFDistilBertForQuestionAnswering.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_19907/en/model_doc/distilbert#transformers.DistilBertConfig">DistilBertConfig</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/pr_19907/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/vr_19907/src/transformers/models/distilbert/modeling_tf_distilbert.py#L1002"}}),hn=new Le({props:{$$slots:{default:[S2]},$$scope:{ctx:E}}}),Da=new Z({props:{name:"call",anchor:"transformers.TFDistilBertForQuestionAnswering.call",parameters:[{name:"input_ids",val:": typing.Union[typing.List[tensorflow.python.framework.ops.Tensor], typing.List[numpy.ndarray], typing.List[tensorflow.python.keras.engine.keras_tensor.KerasTensor], typing.Dict[str, tensorflow.python.framework.ops.Tensor], typing.Dict[str, numpy.ndarray], typing.Dict[str, tensorflow.python.keras.engine.keras_tensor.KerasTensor], tensorflow.python.framework.ops.Tensor, numpy.ndarray, tensorflow.python.keras.engine.keras_tensor.KerasTensor, NoneType] = None"},{name:"attention_mask",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.TFDistilBertForQuestionAnswering.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/pr_19907/en/model_doc/distilbert#transformers.DistilBertTokenizer">DistilBertTokenizer</a>. See <a href="/docs/transformers/pr_19907/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/pr_19907/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.TFDistilBertForQuestionAnswering.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.TFDistilBertForQuestionAnswering.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.TFDistilBertForQuestionAnswering.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.TFDistilBertForQuestionAnswering.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.TFDistilBertForQuestionAnswering.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.TFDistilBertForQuestionAnswering.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/pr_19907/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.TFDistilBertForQuestionAnswering.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.TFDistilBertForQuestionAnswering.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.TFDistilBertForQuestionAnswering.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/vr_19907/src/transformers/models/distilbert/modeling_tf_distilbert.py#L1013",returnDescription:`
<p>A <a
  href="/docs/transformers/pr_19907/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/pr_19907/en/model_doc/distilbert#transformers.DistilBertConfig"
>DistilBertConfig</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/pr_19907/en/main_classes/output#transformers.modeling_tf_outputs.TFQuestionAnsweringModelOutput"
>transformers.modeling_tf_outputs.TFQuestionAnsweringModelOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),un=new Le({props:{$$slots:{default:[W2]},$$scope:{ctx:E}}}),fn=new ue({props:{anchor:"transformers.TFDistilBertForQuestionAnswering.call.example",$$slots:{default:[Q2]},$$scope:{ctx:E}}}),mn=new ue({props:{anchor:"transformers.TFDistilBertForQuestionAnswering.call.example-2",$$slots:{default:[R2]},$$scope:{ctx:E}}}),Fa=new Qe({}),Ba=new Z({props:{name:"class transformers.FlaxDistilBertModel",anchor:"transformers.FlaxDistilBertModel",parameters:[{name:"config",val:": DistilBertConfig"},{name:"input_shape",val:": typing.Tuple = (1, 1)"},{name:"seed",val:": int = 0"},{name:"dtype",val:": dtype = <class 'jax.numpy.float32'>"},{name:"_do_init",val:": bool = True"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.FlaxDistilBertModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_19907/en/model_doc/distilbert#transformers.DistilBertConfig">DistilBertConfig</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/pr_19907/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/vr_19907/src/transformers/models/distilbert/modeling_flax_distilbert.py#L535"}}),qa=new Z({props:{name:"__call__",anchor:"transformers.FlaxDistilBertModel.__call__",parameters:[{name:"input_ids",val:""},{name:"attention_mask",val:" = None"},{name:"head_mask",val:" = None"},{name:"params",val:": dict = None"},{name:"dropout_rng",val:": PRNGKey = None"},{name:"train",val:": bool = False"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.FlaxDistilBertModel.__call__.input_ids",description:`<strong>input_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/pr_19907/en/model_doc/bert#transformers.BertTokenizer">BertTokenizer</a>. See <a href="/docs/transformers/pr_19907/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_19907/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.FlaxDistilBertModel.__call__.attention_mask",description:`<strong>attention_mask</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.FlaxDistilBertModel.__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.`,name:"output_attentions"},{anchor:"transformers.FlaxDistilBertModel.__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.`,name:"output_hidden_states"},{anchor:"transformers.FlaxDistilBertModel.__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/pr_19907/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/vr_19907/src/transformers/models/distilbert/modeling_flax_distilbert.py#L458"}}),_n=new Le({props:{$$slots:{default:[U2]},$$scope:{ctx:E}}}),bn=new ue({props:{anchor:"transformers.FlaxDistilBertModel.__call__.example",$$slots:{default:[K2]},$$scope:{ctx:E}}}),Aa=new Qe({}),Oa=new Z({props:{name:"class transformers.FlaxDistilBertForMaskedLM",anchor:"transformers.FlaxDistilBertForMaskedLM",parameters:[{name:"config",val:": DistilBertConfig"},{name:"input_shape",val:": typing.Tuple = (1, 1)"},{name:"seed",val:": int = 0"},{name:"dtype",val:": dtype = <class 'jax.numpy.float32'>"},{name:"_do_init",val:": bool = True"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.FlaxDistilBertForMaskedLM.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_19907/en/model_doc/distilbert#transformers.DistilBertConfig">DistilBertConfig</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/pr_19907/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/vr_19907/src/transformers/models/distilbert/modeling_flax_distilbert.py#L608"}}),Ka=new Z({props:{name:"__call__",anchor:"transformers.FlaxDistilBertForMaskedLM.__call__",parameters:[{name:"input_ids",val:""},{name:"attention_mask",val:" = None"},{name:"head_mask",val:" = None"},{name:"params",val:": dict = None"},{name:"dropout_rng",val:": PRNGKey = None"},{name:"train",val:": bool = False"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.FlaxDistilBertForMaskedLM.__call__.input_ids",description:`<strong>input_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/pr_19907/en/model_doc/bert#transformers.BertTokenizer">BertTokenizer</a>. See <a href="/docs/transformers/pr_19907/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_19907/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.FlaxDistilBertForMaskedLM.__call__.attention_mask",description:`<strong>attention_mask</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.FlaxDistilBertForMaskedLM.__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.`,name:"output_attentions"},{anchor:"transformers.FlaxDistilBertForMaskedLM.__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.`,name:"output_hidden_states"},{anchor:"transformers.FlaxDistilBertForMaskedLM.__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/pr_19907/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/vr_19907/src/transformers/models/distilbert/modeling_flax_distilbert.py#L458",returnDescription:`
<p>A <a
  href="/docs/transformers/pr_19907/en/main_classes/output#transformers.modeling_flax_outputs.FlaxMaskedLMOutput"
>transformers.modeling_flax_outputs.FlaxMaskedLMOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/pr_19907/en/model_doc/distilbert#transformers.DistilBertConfig"
>DistilBertConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>logits</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, sequence_length, config.vocab_size)</code>) \u2014 Prediction scores of the language modeling head (scores for each vocabulary token before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/pr_19907/en/main_classes/output#transformers.modeling_flax_outputs.FlaxMaskedLMOutput"
>transformers.modeling_flax_outputs.FlaxMaskedLMOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),vn=new Le({props:{$$slots:{default:[H2]},$$scope:{ctx:E}}}),wn=new ue({props:{anchor:"transformers.FlaxDistilBertForMaskedLM.__call__.example",$$slots:{default:[V2]},$$scope:{ctx:E}}}),Ha=new Qe({}),Va=new Z({props:{name:"class transformers.FlaxDistilBertForSequenceClassification",anchor:"transformers.FlaxDistilBertForSequenceClassification",parameters:[{name:"config",val:": DistilBertConfig"},{name:"input_shape",val:": typing.Tuple = (1, 1)"},{name:"seed",val:": int = 0"},{name:"dtype",val:": dtype = <class 'jax.numpy.float32'>"},{name:"_do_init",val:": bool = True"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.FlaxDistilBertForSequenceClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_19907/en/model_doc/distilbert#transformers.DistilBertConfig">DistilBertConfig</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/pr_19907/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/vr_19907/src/transformers/models/distilbert/modeling_flax_distilbert.py#L677"}}),oi=new Z({props:{name:"__call__",anchor:"transformers.FlaxDistilBertForSequenceClassification.__call__",parameters:[{name:"input_ids",val:""},{name:"attention_mask",val:" = None"},{name:"head_mask",val:" = None"},{name:"params",val:": dict = None"},{name:"dropout_rng",val:": PRNGKey = None"},{name:"train",val:": bool = False"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.FlaxDistilBertForSequenceClassification.__call__.input_ids",description:`<strong>input_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/pr_19907/en/model_doc/bert#transformers.BertTokenizer">BertTokenizer</a>. See <a href="/docs/transformers/pr_19907/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_19907/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.FlaxDistilBertForSequenceClassification.__call__.attention_mask",description:`<strong>attention_mask</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.FlaxDistilBertForSequenceClassification.__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.`,name:"output_attentions"},{anchor:"transformers.FlaxDistilBertForSequenceClassification.__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.`,name:"output_hidden_states"},{anchor:"transformers.FlaxDistilBertForSequenceClassification.__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/pr_19907/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/vr_19907/src/transformers/models/distilbert/modeling_flax_distilbert.py#L458",returnDescription:`
<p>A <a
  href="/docs/transformers/pr_19907/en/main_classes/output#transformers.modeling_flax_outputs.FlaxSequenceClassifierOutput"
>transformers.modeling_flax_outputs.FlaxSequenceClassifierOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/pr_19907/en/model_doc/distilbert#transformers.DistilBertConfig"
>DistilBertConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>logits</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, config.num_labels)</code>) \u2014 Classification (or regression if config.num_labels==1) scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/pr_19907/en/main_classes/output#transformers.modeling_flax_outputs.FlaxSequenceClassifierOutput"
>transformers.modeling_flax_outputs.FlaxSequenceClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),$n=new Le({props:{$$slots:{default:[J2]},$$scope:{ctx:E}}}),yn=new ue({props:{anchor:"transformers.FlaxDistilBertForSequenceClassification.__call__.example",$$slots:{default:[G2]},$$scope:{ctx:E}}}),si=new Qe({}),ni=new Z({props:{name:"class transformers.FlaxDistilBertForMultipleChoice",anchor:"transformers.FlaxDistilBertForMultipleChoice",parameters:[{name:"config",val:": DistilBertConfig"},{name:"input_shape",val:": typing.Tuple = (1, 1)"},{name:"seed",val:": int = 0"},{name:"dtype",val:": dtype = <class 'jax.numpy.float32'>"},{name:"_do_init",val:": bool = True"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.FlaxDistilBertForMultipleChoice.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_19907/en/model_doc/distilbert#transformers.DistilBertConfig">DistilBertConfig</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/pr_19907/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/vr_19907/src/transformers/models/distilbert/modeling_flax_distilbert.py#L757"}}),hi=new Z({props:{name:"__call__",anchor:"transformers.FlaxDistilBertForMultipleChoice.__call__",parameters:[{name:"input_ids",val:""},{name:"attention_mask",val:" = None"},{name:"head_mask",val:" = None"},{name:"params",val:": dict = None"},{name:"dropout_rng",val:": PRNGKey = None"},{name:"train",val:": bool = False"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.FlaxDistilBertForMultipleChoice.__call__.input_ids",description:`<strong>input_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, num_choices, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/pr_19907/en/model_doc/bert#transformers.BertTokenizer">BertTokenizer</a>. See <a href="/docs/transformers/pr_19907/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_19907/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.FlaxDistilBertForMultipleChoice.__call__.attention_mask",description:`<strong>attention_mask</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, num_choices, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.FlaxDistilBertForMultipleChoice.__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.`,name:"output_attentions"},{anchor:"transformers.FlaxDistilBertForMultipleChoice.__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.`,name:"output_hidden_states"},{anchor:"transformers.FlaxDistilBertForMultipleChoice.__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/pr_19907/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/vr_19907/src/transformers/models/distilbert/modeling_flax_distilbert.py#L458",returnDescription:`
<p>A <a
  href="/docs/transformers/pr_19907/en/main_classes/output#transformers.modeling_flax_outputs.FlaxMultipleChoiceModelOutput"
>transformers.modeling_flax_outputs.FlaxMultipleChoiceModelOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/pr_19907/en/model_doc/distilbert#transformers.DistilBertConfig"
>DistilBertConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>logits</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, num_choices)</code>) \u2014 <em>num_choices</em> is the second dimension of the input tensors. (see <em>input_ids</em> above).</p>
<p>Classification scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/pr_19907/en/main_classes/output#transformers.modeling_flax_outputs.FlaxMultipleChoiceModelOutput"
>transformers.modeling_flax_outputs.FlaxMultipleChoiceModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Fn=new Le({props:{$$slots:{default:[X2]},$$scope:{ctx:E}}}),Bn=new ue({props:{anchor:"transformers.FlaxDistilBertForMultipleChoice.__call__.example",$$slots:{default:[Y2]},$$scope:{ctx:E}}}),ui=new Qe({}),fi=new Z({props:{name:"class transformers.FlaxDistilBertForTokenClassification",anchor:"transformers.FlaxDistilBertForTokenClassification",parameters:[{name:"config",val:": DistilBertConfig"},{name:"input_shape",val:": typing.Tuple = (1, 1)"},{name:"seed",val:": int = 0"},{name:"dtype",val:": dtype = <class 'jax.numpy.float32'>"},{name:"_do_init",val:": bool = True"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.FlaxDistilBertForTokenClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_19907/en/model_doc/distilbert#transformers.DistilBertConfig">DistilBertConfig</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/pr_19907/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/vr_19907/src/transformers/models/distilbert/modeling_flax_distilbert.py#L823"}}),Ti=new Z({props:{name:"__call__",anchor:"transformers.FlaxDistilBertForTokenClassification.__call__",parameters:[{name:"input_ids",val:""},{name:"attention_mask",val:" = None"},{name:"head_mask",val:" = None"},{name:"params",val:": dict = None"},{name:"dropout_rng",val:": PRNGKey = None"},{name:"train",val:": bool = False"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.FlaxDistilBertForTokenClassification.__call__.input_ids",description:`<strong>input_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/pr_19907/en/model_doc/bert#transformers.BertTokenizer">BertTokenizer</a>. See <a href="/docs/transformers/pr_19907/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_19907/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.FlaxDistilBertForTokenClassification.__call__.attention_mask",description:`<strong>attention_mask</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.FlaxDistilBertForTokenClassification.__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.`,name:"output_attentions"},{anchor:"transformers.FlaxDistilBertForTokenClassification.__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.`,name:"output_hidden_states"},{anchor:"transformers.FlaxDistilBertForTokenClassification.__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/pr_19907/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/vr_19907/src/transformers/models/distilbert/modeling_flax_distilbert.py#L458",returnDescription:`
<p>A <a
  href="/docs/transformers/pr_19907/en/main_classes/output#transformers.modeling_flax_outputs.FlaxTokenClassifierOutput"
>transformers.modeling_flax_outputs.FlaxTokenClassifierOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/pr_19907/en/model_doc/distilbert#transformers.DistilBertConfig"
>DistilBertConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>logits</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, sequence_length, config.num_labels)</code>) \u2014 Classification scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/pr_19907/en/main_classes/output#transformers.modeling_flax_outputs.FlaxTokenClassifierOutput"
>transformers.modeling_flax_outputs.FlaxTokenClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),xn=new Le({props:{$$slots:{default:[Z2]},$$scope:{ctx:E}}}),Mn=new ue({props:{anchor:"transformers.FlaxDistilBertForTokenClassification.__call__.example",$$slots:{default:[eD]},$$scope:{ctx:E}}}),$i=new Qe({}),yi=new Z({props:{name:"class transformers.FlaxDistilBertForQuestionAnswering",anchor:"transformers.FlaxDistilBertForQuestionAnswering",parameters:[{name:"config",val:": DistilBertConfig"},{name:"input_shape",val:": typing.Tuple = (1, 1)"},{name:"seed",val:": int = 0"},{name:"dtype",val:": dtype = <class 'jax.numpy.float32'>"},{name:"_do_init",val:": bool = True"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.FlaxDistilBertForQuestionAnswering.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_19907/en/model_doc/distilbert#transformers.DistilBertConfig">DistilBertConfig</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/pr_19907/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/vr_19907/src/transformers/models/distilbert/modeling_flax_distilbert.py#L893"}}),zi=new Z({props:{name:"__call__",anchor:"transformers.FlaxDistilBertForQuestionAnswering.__call__",parameters:[{name:"input_ids",val:""},{name:"attention_mask",val:" = None"},{name:"head_mask",val:" = None"},{name:"params",val:": dict = None"},{name:"dropout_rng",val:": PRNGKey = None"},{name:"train",val:": bool = False"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.FlaxDistilBertForQuestionAnswering.__call__.input_ids",description:`<strong>input_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/pr_19907/en/model_doc/bert#transformers.BertTokenizer">BertTokenizer</a>. See <a href="/docs/transformers/pr_19907/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_19907/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.FlaxDistilBertForQuestionAnswering.__call__.attention_mask",description:`<strong>attention_mask</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.FlaxDistilBertForQuestionAnswering.__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.`,name:"output_attentions"},{anchor:"transformers.FlaxDistilBertForQuestionAnswering.__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.`,name:"output_hidden_states"},{anchor:"transformers.FlaxDistilBertForQuestionAnswering.__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/pr_19907/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/vr_19907/src/transformers/models/distilbert/modeling_flax_distilbert.py#L458",returnDescription:`
<p>A <a
  href="/docs/transformers/pr_19907/en/main_classes/output#transformers.modeling_flax_outputs.FlaxQuestionAnsweringModelOutput"
>transformers.modeling_flax_outputs.FlaxQuestionAnsweringModelOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/pr_19907/en/model_doc/distilbert#transformers.DistilBertConfig"
>DistilBertConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>start_logits</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, sequence_length)</code>) \u2014 Span-start scores (before SoftMax).</p>
</li>
<li>
<p><strong>end_logits</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, sequence_length)</code>) \u2014 Span-end scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/pr_19907/en/main_classes/output#transformers.modeling_flax_outputs.FlaxQuestionAnsweringModelOutput"
>transformers.modeling_flax_outputs.FlaxQuestionAnsweringModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),zn=new Le({props:{$$slots:{default:[tD]},$$scope:{ctx:E}}}),Cn=new ue({props:{anchor:"transformers.FlaxDistilBertForQuestionAnswering.__call__.example",$$slots:{default:[oD]},$$scope:{ctx:E}}}),{c(){d=r("meta"),g=h(),c=r("h1"),f=r("a"),k=r("span"),w(l.$$.fragment),p=h(),M=r("span"),we=o("DistilBERT"),ge=h(),I=r("h2"),re=r("a"),oe=r("span"),w(B.$$.fragment),Te=h(),U=r("span"),$e=o("Overview"),_e=h(),O=r("p"),ye=o("The DistilBERT model was proposed in the blog post "),ae=r("a"),H=o(`Smaller, faster, cheaper, lighter: Introducing DistilBERT, a
distilled version of BERT`),De=o(", and the paper "),ie=r("a"),V=o(`DistilBERT, a
distilled version of BERT: smaller, faster, cheaper and lighter`),Fe=o(`. DistilBERT is a
small, fast, cheap and light Transformer model trained by distilling BERT base. It has 40% less parameters than
`),de=r("em"),J=o("bert-base-uncased"),Be=o(`, runs 60% faster while preserving over 95% of BERT\u2019s performances as measured on the GLUE language
understanding benchmark.`),be=h(),te=r("p"),z=o("The abstract from the paper is the following:"),q=h(),le=r("p"),K=r("em"),Ee=o(`As Transfer Learning from large-scale pre-trained models becomes more prevalent in Natural Language Processing (NLP),
operating these large models in on-the-edge and/or under constrained computational training or inference budgets
remains challenging. In this work, we propose a method to pre-train a smaller general-purpose language representation
model, called DistilBERT, which can then be fine-tuned with good performances on a wide range of tasks like its larger
counterparts. While most prior work investigated the use of distillation for building task-specific models, we leverage
knowledge distillation during the pretraining phase and show that it is possible to reduce the size of a BERT model by
40%, while retaining 97% of its language understanding capabilities and being 60% faster. To leverage the inductive
biases learned by larger models during pretraining, we introduce a triple loss combining language modeling,
distillation and cosine-distance losses. Our smaller, faster and lighter model is cheaper to pre-train and we
demonstrate its capabilities for on-device computations in a proof-of-concept experiment and a comparative on-device
study.`),ke=h(),R=r("p"),xe=o("Tips:"),ve=h(),C=r("ul"),se=r("li"),G=o("DistilBERT doesn\u2019t have "),ce=r("code"),Me=o("token_type_ids"),X=o(`, you don\u2019t need to indicate which token belongs to which segment. Just
separate your segments with the separation token `),pe=r("code"),je=o("tokenizer.sep_token"),L=o(" (or "),he=r("code"),Y=o("[SEP]"),ze=o(")."),ne=h(),P=r("li"),Ce=o("DistilBERT doesn\u2019t have options to select the input positions ("),A=r("code"),Pe=o("position_ids"),qe=o(` input). This could be added if
necessary though, just let us know if you need this option.`),v=h(),x=r("p"),Ue=o("This model was contributed by "),ee=r("a"),Ke=o("victorsanh"),He=o(`. This model jax version was
contributed by `),j=r("a"),Ve=o("kamalkraj"),Je=o(". The original code can be found "),Ne=r("a"),Ge=o("here"),Xe=o("."),N=h(),S=r("h2"),Oe=r("a"),Se=r("span"),w(W.$$.fragment),Ye=h(),We=r("span"),Ae=o("DistilBertConfig"),Re=h(),Q=r("div"),w(Ie.$$.fragment),Cu=h(),Gt=r("p"),Pu=o("This is the configuration class to store the configuration of a "),Si=r("a"),qu=o("DistilBertModel"),Au=o(" or a "),Wi=r("a"),Ou=o("TFDistilBertModel"),Nu=o(`. It
is used to instantiate a DistilBERT 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 DistilBERT
`),Yn=r("a"),Iu=o("distilbert-base-uncased"),Lu=o(" architecture."),Su=h(),$o=r("p"),Wu=o("Configuration objects inherit from "),Qi=r("a"),Qu=o("PretrainedConfig"),Ru=o(` and can be used to control the model outputs. Read the
documentation from `),Ri=r("a"),Uu=o("PretrainedConfig"),Ku=o(" for more information."),Hu=h(),w(hs.$$.fragment),Sp=h(),yo=r("h2"),us=r("a"),Vl=r("span"),w(Zn.$$.fragment),Vu=h(),Jl=r("span"),Ju=o("DistilBertTokenizer"),Wp=h(),zt=r("div"),w(er.$$.fragment),Gu=h(),Gl=r("p"),Xu=o("Construct a DistilBERT tokenizer."),Yu=h(),fs=r("p"),Ui=r("a"),Zu=o("DistilBertTokenizer"),ef=o(" is identical to "),Ki=r("a"),tf=o("BertTokenizer"),of=o(` and runs end-to-end tokenization: punctuation splitting
and wordpiece.`),sf=h(),tr=r("p"),nf=o("Refer to superclass "),Hi=r("a"),rf=o("BertTokenizer"),af=o(" for usage examples and documentation concerning parameters."),Qp=h(),Do=r("h2"),ms=r("a"),Xl=r("span"),w(or.$$.fragment),lf=h(),Yl=r("span"),df=o("DistilBertTokenizerFast"),Rp=h(),Ct=r("div"),w(sr.$$.fragment),cf=h(),nr=r("p"),pf=o("Construct a \u201Cfast\u201D DistilBERT tokenizer (backed by HuggingFace\u2019s "),Zl=r("em"),hf=o("tokenizers"),uf=o(" library)."),ff=h(),gs=r("p"),Vi=r("a"),mf=o("DistilBertTokenizerFast"),gf=o(" is identical to "),Ji=r("a"),_f=o("BertTokenizerFast"),bf=o(` and runs end-to-end tokenization: punctuation
splitting and wordpiece.`),kf=h(),rr=r("p"),vf=o("Refer to superclass "),Gi=r("a"),wf=o("BertTokenizerFast"),Tf=o(" for usage examples and documentation concerning parameters."),Up=h(),Fo=r("h2"),_s=r("a"),ed=r("span"),w(ar.$$.fragment),$f=h(),td=r("span"),yf=o("DistilBertModel"),Kp=h(),ht=r("div"),w(ir.$$.fragment),Df=h(),od=r("p"),Ff=o("The bare DistilBERT encoder/transformer outputting raw hidden-states without any specific head on top."),Bf=h(),lr=r("p"),Ef=o("This model inherits from "),Xi=r("a"),xf=o("PreTrainedModel"),Mf=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.)`),jf=h(),dr=r("p"),zf=o("This model is also a PyTorch "),cr=r("a"),Cf=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.`),qf=h(),Pt=r("div"),w(pr.$$.fragment),Af=h(),Bo=r("p"),Of=o("The "),Yi=r("a"),Nf=o("DistilBertModel"),If=o(" forward method, overrides the "),sd=r("code"),Lf=o("__call__"),Sf=o(" special method."),Wf=h(),w(bs.$$.fragment),Qf=h(),w(ks.$$.fragment),Hp=h(),Eo=r("h2"),vs=r("a"),nd=r("span"),w(hr.$$.fragment),Rf=h(),rd=r("span"),Uf=o("DistilBertForMaskedLM"),Vp=h(),ut=r("div"),w(ur.$$.fragment),Kf=h(),fr=r("p"),Hf=o("DistilBert Model with a "),ad=r("code"),Vf=o("masked language modeling"),Jf=o(" head on top."),Gf=h(),mr=r("p"),Xf=o("This model inherits from "),Zi=r("a"),Yf=o("PreTrainedModel"),Zf=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.)`),em=h(),gr=r("p"),tm=o("This model is also a PyTorch "),_r=r("a"),om=o("torch.nn.Module"),sm=o(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),nm=h(),bt=r("div"),w(br.$$.fragment),rm=h(),xo=r("p"),am=o("The "),el=r("a"),im=o("DistilBertForMaskedLM"),lm=o(" forward method, overrides the "),id=r("code"),dm=o("__call__"),cm=o(" special method."),pm=h(),w(ws.$$.fragment),hm=h(),w(Ts.$$.fragment),um=h(),w($s.$$.fragment),Jp=h(),Mo=r("h2"),ys=r("a"),ld=r("span"),w(kr.$$.fragment),fm=h(),dd=r("span"),mm=o("DistilBertForSequenceClassification"),Gp=h(),ft=r("div"),w(vr.$$.fragment),gm=h(),cd=r("p"),_m=o(`DistilBert Model transformer with a sequence classification/regression head on top (a linear layer on top of the
pooled output) e.g. for GLUE tasks.`),bm=h(),wr=r("p"),km=o("This model inherits from "),tl=r("a"),vm=o("PreTrainedModel"),wm=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.)`),Tm=h(),Tr=r("p"),$m=o("This model is also a PyTorch "),$r=r("a"),ym=o("torch.nn.Module"),Dm=o(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Fm=h(),rt=r("div"),w(yr.$$.fragment),Bm=h(),jo=r("p"),Em=o("The "),ol=r("a"),xm=o("DistilBertForSequenceClassification"),Mm=o(" forward method, overrides the "),pd=r("code"),jm=o("__call__"),zm=o(" special method."),Cm=h(),w(Ds.$$.fragment),Pm=h(),w(Fs.$$.fragment),qm=h(),w(Bs.$$.fragment),Am=h(),w(Es.$$.fragment),Om=h(),w(xs.$$.fragment),Xp=h(),zo=r("h2"),Ms=r("a"),hd=r("span"),w(Dr.$$.fragment),Nm=h(),ud=r("span"),Im=o("DistilBertForMultipleChoice"),Yp=h(),mt=r("div"),w(Fr.$$.fragment),Lm=h(),fd=r("p"),Sm=o(`DistilBert 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.`),Wm=h(),Br=r("p"),Qm=o("This model inherits from "),sl=r("a"),Rm=o("PreTrainedModel"),Um=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.)`),Km=h(),Er=r("p"),Hm=o("This model is also a PyTorch "),xr=r("a"),Vm=o("torch.nn.Module"),Jm=o(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Gm=h(),qt=r("div"),w(Mr.$$.fragment),Xm=h(),Co=r("p"),Ym=o("The "),nl=r("a"),Zm=o("DistilBertForMultipleChoice"),eg=o(" forward method, overrides the "),md=r("code"),tg=o("__call__"),og=o(" special method."),sg=h(),w(js.$$.fragment),ng=h(),w(zs.$$.fragment),Zp=h(),Po=r("h2"),Cs=r("a"),gd=r("span"),w(jr.$$.fragment),rg=h(),_d=r("span"),ag=o("DistilBertForTokenClassification"),eh=h(),gt=r("div"),w(zr.$$.fragment),ig=h(),bd=r("p"),lg=o(`DistilBert 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.`),dg=h(),Cr=r("p"),cg=o("This model inherits from "),rl=r("a"),pg=o("PreTrainedModel"),hg=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.)`),ug=h(),Pr=r("p"),fg=o("This model is also a PyTorch "),qr=r("a"),mg=o("torch.nn.Module"),gg=o(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),_g=h(),kt=r("div"),w(Ar.$$.fragment),bg=h(),qo=r("p"),kg=o("The "),al=r("a"),vg=o("DistilBertForTokenClassification"),wg=o(" forward method, overrides the "),kd=r("code"),Tg=o("__call__"),$g=o(" special method."),yg=h(),w(Ps.$$.fragment),Dg=h(),w(qs.$$.fragment),Fg=h(),w(As.$$.fragment),th=h(),Ao=r("h2"),Os=r("a"),vd=r("span"),w(Or.$$.fragment),Bg=h(),wd=r("span"),Eg=o("DistilBertForQuestionAnswering"),oh=h(),_t=r("div"),w(Nr.$$.fragment),xg=h(),Oo=r("p"),Mg=o(`DistilBert 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 `),Td=r("code"),jg=o("span start logits"),zg=o(" and "),$d=r("code"),Cg=o("span end logits"),Pg=o(")."),qg=h(),Ir=r("p"),Ag=o("This model inherits from "),il=r("a"),Og=o("PreTrainedModel"),Ng=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.)`),Ig=h(),Lr=r("p"),Lg=o("This model is also a PyTorch "),Sr=r("a"),Sg=o("torch.nn.Module"),Wg=o(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Qg=h(),vt=r("div"),w(Wr.$$.fragment),Rg=h(),No=r("p"),Ug=o("The "),ll=r("a"),Kg=o("DistilBertForQuestionAnswering"),Hg=o(" forward method, overrides the "),yd=r("code"),Vg=o("__call__"),Jg=o(" special method."),Gg=h(),w(Ns.$$.fragment),Xg=h(),w(Is.$$.fragment),Yg=h(),w(Ls.$$.fragment),sh=h(),Io=r("h2"),Ss=r("a"),Dd=r("span"),w(Qr.$$.fragment),Zg=h(),Fd=r("span"),e_=o("TFDistilBertModel"),nh=h(),at=r("div"),w(Rr.$$.fragment),t_=h(),Bd=r("p"),o_=o("The bare DistilBERT encoder/transformer outputting raw hidden-states without any specific head on top."),s_=h(),Ur=r("p"),n_=o("This model inherits from "),dl=r("a"),r_=o("TFPreTrainedModel"),a_=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.)`),i_=h(),Kr=r("p"),l_=o("This model is also a "),Hr=r("a"),d_=o("tf.keras.Model"),c_=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.`),p_=h(),w(Ws.$$.fragment),h_=h(),At=r("div"),w(Vr.$$.fragment),u_=h(),Lo=r("p"),f_=o("The "),cl=r("a"),m_=o("TFDistilBertModel"),g_=o(" forward method, overrides the "),Ed=r("code"),__=o("__call__"),b_=o(" special method."),k_=h(),w(Qs.$$.fragment),v_=h(),w(Rs.$$.fragment),rh=h(),So=r("h2"),Us=r("a"),xd=r("span"),w(Jr.$$.fragment),w_=h(),Md=r("span"),T_=o("TFDistilBertForMaskedLM"),ah=h(),it=r("div"),w(Gr.$$.fragment),$_=h(),Xr=r("p"),y_=o("DistilBert Model with a "),jd=r("code"),D_=o("masked language modeling"),F_=o(" head on top."),B_=h(),Yr=r("p"),E_=o("This model inherits from "),pl=r("a"),x_=o("TFPreTrainedModel"),M_=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_=h(),Zr=r("p"),z_=o("This model is also a "),ea=r("a"),C_=o("tf.keras.Model"),P_=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.`),q_=h(),w(Ks.$$.fragment),A_=h(),wt=r("div"),w(ta.$$.fragment),O_=h(),Wo=r("p"),N_=o("The "),hl=r("a"),I_=o("TFDistilBertForMaskedLM"),L_=o(" forward method, overrides the "),zd=r("code"),S_=o("__call__"),W_=o(" special method."),Q_=h(),w(Hs.$$.fragment),R_=h(),w(Vs.$$.fragment),U_=h(),w(Js.$$.fragment),ih=h(),Qo=r("h2"),Gs=r("a"),Cd=r("span"),w(oa.$$.fragment),K_=h(),Pd=r("span"),H_=o("TFDistilBertForSequenceClassification"),lh=h(),lt=r("div"),w(sa.$$.fragment),V_=h(),qd=r("p"),J_=o(`DistilBert Model transformer with a sequence classification/regression head on top (a linear layer on top of the
pooled output) e.g. for GLUE tasks.`),G_=h(),na=r("p"),X_=o("This model inherits from "),ul=r("a"),Y_=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=h(),ra=r("p"),tb=o("This model is also a "),aa=r("a"),ob=o("tf.keras.Model"),sb=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.`),nb=h(),w(Xs.$$.fragment),rb=h(),Tt=r("div"),w(ia.$$.fragment),ab=h(),Ro=r("p"),ib=o("The "),fl=r("a"),lb=o("TFDistilBertForSequenceClassification"),db=o(" forward method, overrides the "),Ad=r("code"),cb=o("__call__"),pb=o(" special method."),hb=h(),w(Ys.$$.fragment),ub=h(),w(Zs.$$.fragment),fb=h(),w(en.$$.fragment),dh=h(),Uo=r("h2"),tn=r("a"),Od=r("span"),w(la.$$.fragment),mb=h(),Nd=r("span"),gb=o("TFDistilBertForMultipleChoice"),ch=h(),dt=r("div"),w(da.$$.fragment),_b=h(),Id=r("p"),bb=o(`DistilBert 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.`),kb=h(),ca=r("p"),vb=o("This model inherits from "),ml=r("a"),wb=o("TFPreTrainedModel"),Tb=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.)`),$b=h(),pa=r("p"),yb=o("This model is also a "),ha=r("a"),Db=o("tf.keras.Model"),Fb=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.`),Bb=h(),w(on.$$.fragment),Eb=h(),Ot=r("div"),w(ua.$$.fragment),xb=h(),Ko=r("p"),Mb=o("The "),gl=r("a"),jb=o("TFDistilBertForMultipleChoice"),zb=o(" forward method, overrides the "),Ld=r("code"),Cb=o("__call__"),Pb=o(" special method."),qb=h(),w(sn.$$.fragment),Ab=h(),w(nn.$$.fragment),ph=h(),Ho=r("h2"),rn=r("a"),Sd=r("span"),w(fa.$$.fragment),Ob=h(),Wd=r("span"),Nb=o("TFDistilBertForTokenClassification"),hh=h(),ct=r("div"),w(ma.$$.fragment),Ib=h(),Qd=r("p"),Lb=o(`DistilBert 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.`),Sb=h(),ga=r("p"),Wb=o("This model inherits from "),_l=r("a"),Qb=o("TFPreTrainedModel"),Rb=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.)`),Ub=h(),_a=r("p"),Kb=o("This model is also a "),ba=r("a"),Hb=o("tf.keras.Model"),Vb=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.`),Jb=h(),w(an.$$.fragment),Gb=h(),$t=r("div"),w(ka.$$.fragment),Xb=h(),Vo=r("p"),Yb=o("The "),bl=r("a"),Zb=o("TFDistilBertForTokenClassification"),ek=o(" forward method, overrides the "),Rd=r("code"),tk=o("__call__"),ok=o(" special method."),sk=h(),w(ln.$$.fragment),nk=h(),w(dn.$$.fragment),rk=h(),w(cn.$$.fragment),uh=h(),Jo=r("h2"),pn=r("a"),Ud=r("span"),w(va.$$.fragment),ak=h(),Kd=r("span"),ik=o("TFDistilBertForQuestionAnswering"),fh=h(),pt=r("div"),w(wa.$$.fragment),lk=h(),Go=r("p"),dk=o(`DistilBert Model with a span classification head on top for extractive question-answering tasks like SQuAD (a
linear layer on top of the hidden-states output to compute `),Hd=r("code"),ck=o("span start logits"),pk=o(" and "),Vd=r("code"),hk=o("span end logits"),uk=o(")."),fk=h(),Ta=r("p"),mk=o("This model inherits from "),kl=r("a"),gk=o("TFPreTrainedModel"),_k=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.)`),bk=h(),$a=r("p"),kk=o("This model is also a "),ya=r("a"),vk=o("tf.keras.Model"),wk=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.`),Tk=h(),w(hn.$$.fragment),$k=h(),yt=r("div"),w(Da.$$.fragment),yk=h(),Xo=r("p"),Dk=o("The "),vl=r("a"),Fk=o("TFDistilBertForQuestionAnswering"),Bk=o(" forward method, overrides the "),Jd=r("code"),Ek=o("__call__"),xk=o(" special method."),Mk=h(),w(un.$$.fragment),jk=h(),w(fn.$$.fragment),zk=h(),w(mn.$$.fragment),mh=h(),Yo=r("h2"),gn=r("a"),Gd=r("span"),w(Fa.$$.fragment),Ck=h(),Xd=r("span"),Pk=o("FlaxDistilBertModel"),gh=h(),Ze=r("div"),w(Ba.$$.fragment),qk=h(),Yd=r("p"),Ak=o("The bare DistilBert Model transformer outputting raw hidden-states without any specific head on top."),Ok=h(),Ea=r("p"),Nk=o("This model inherits from "),wl=r("a"),Ik=o("FlaxPreTrainedModel"),Lk=o(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading, saving and converting weights from PyTorch models)`),Sk=h(),xa=r("p"),Wk=o("This model is also a Flax Linen "),Ma=r("a"),Qk=o("flax.linen.Module"),Rk=o(`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),Uk=h(),Zd=r("p"),Kk=o("Finally, this model supports inherent JAX features such as:"),Hk=h(),Xt=r("ul"),ec=r("li"),ja=r("a"),Vk=o("Just-In-Time (JIT) compilation"),Jk=h(),tc=r("li"),za=r("a"),Gk=o("Automatic Differentiation"),Xk=h(),oc=r("li"),Ca=r("a"),Yk=o("Vectorization"),Zk=h(),sc=r("li"),Pa=r("a"),ev=o("Parallelization"),tv=h(),Nt=r("div"),w(qa.$$.fragment),ov=h(),Zo=r("p"),sv=o("The "),nc=r("code"),nv=o("FlaxDistilBertPreTrainedModel"),rv=o(" forward method, overrides the "),rc=r("code"),av=o("__call__"),iv=o(" special method."),lv=h(),w(_n.$$.fragment),dv=h(),w(bn.$$.fragment),_h=h(),es=r("h2"),kn=r("a"),ac=r("span"),w(Aa.$$.fragment),cv=h(),ic=r("span"),pv=o("FlaxDistilBertForMaskedLM"),bh=h(),et=r("div"),w(Oa.$$.fragment),hv=h(),Na=r("p"),uv=o("DistilBert Model with a "),lc=r("code"),fv=o("language modeling"),mv=o(" head on top."),gv=h(),Ia=r("p"),_v=o("This model inherits from "),Tl=r("a"),bv=o("FlaxPreTrainedModel"),kv=o(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading, saving and converting weights from PyTorch models)`),vv=h(),La=r("p"),wv=o("This model is also a Flax Linen "),Sa=r("a"),Tv=o("flax.linen.Module"),$v=o(`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),yv=h(),dc=r("p"),Dv=o("Finally, this model supports inherent JAX features such as:"),Fv=h(),Yt=r("ul"),cc=r("li"),Wa=r("a"),Bv=o("Just-In-Time (JIT) compilation"),Ev=h(),pc=r("li"),Qa=r("a"),xv=o("Automatic Differentiation"),Mv=h(),hc=r("li"),Ra=r("a"),jv=o("Vectorization"),zv=h(),uc=r("li"),Ua=r("a"),Cv=o("Parallelization"),Pv=h(),It=r("div"),w(Ka.$$.fragment),qv=h(),ts=r("p"),Av=o("The "),fc=r("code"),Ov=o("FlaxDistilBertPreTrainedModel"),Nv=o(" forward method, overrides the "),mc=r("code"),Iv=o("__call__"),Lv=o(" special method."),Sv=h(),w(vn.$$.fragment),Wv=h(),w(wn.$$.fragment),kh=h(),os=r("h2"),Tn=r("a"),gc=r("span"),w(Ha.$$.fragment),Qv=h(),_c=r("span"),Rv=o("FlaxDistilBertForSequenceClassification"),vh=h(),tt=r("div"),w(Va.$$.fragment),Uv=h(),bc=r("p"),Kv=o(`DistilBert Model transformer with a sequence classification/regression head on top (a linear layer on top of the
pooled output) e.g. for GLUE tasks.`),Hv=h(),Ja=r("p"),Vv=o("This model inherits from "),$l=r("a"),Jv=o("FlaxPreTrainedModel"),Gv=o(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading, saving and converting weights from PyTorch models)`),Xv=h(),Ga=r("p"),Yv=o("This model is also a Flax Linen "),Xa=r("a"),Zv=o("flax.linen.Module"),ew=o(`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),tw=h(),kc=r("p"),ow=o("Finally, this model supports inherent JAX features such as:"),sw=h(),Zt=r("ul"),vc=r("li"),Ya=r("a"),nw=o("Just-In-Time (JIT) compilation"),rw=h(),wc=r("li"),Za=r("a"),aw=o("Automatic Differentiation"),iw=h(),Tc=r("li"),ei=r("a"),lw=o("Vectorization"),dw=h(),$c=r("li"),ti=r("a"),cw=o("Parallelization"),pw=h(),Lt=r("div"),w(oi.$$.fragment),hw=h(),ss=r("p"),uw=o("The "),yc=r("code"),fw=o("FlaxDistilBertPreTrainedModel"),mw=o(" forward method, overrides the "),Dc=r("code"),gw=o("__call__"),_w=o(" special method."),bw=h(),w($n.$$.fragment),kw=h(),w(yn.$$.fragment),wh=h(),ns=r("h2"),Dn=r("a"),Fc=r("span"),w(si.$$.fragment),vw=h(),Bc=r("span"),ww=o("FlaxDistilBertForMultipleChoice"),Th=h(),ot=r("div"),w(ni.$$.fragment),Tw=h(),Ec=r("p"),$w=o(`DistilBert 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.`),yw=h(),ri=r("p"),Dw=o("This model inherits from "),yl=r("a"),Fw=o("FlaxPreTrainedModel"),Bw=o(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading, saving and converting weights from PyTorch models)`),Ew=h(),ai=r("p"),xw=o("This model is also a Flax Linen "),ii=r("a"),Mw=o("flax.linen.Module"),jw=o(`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),zw=h(),xc=r("p"),Cw=o("Finally, this model supports inherent JAX features such as:"),Pw=h(),eo=r("ul"),Mc=r("li"),li=r("a"),qw=o("Just-In-Time (JIT) compilation"),Aw=h(),jc=r("li"),di=r("a"),Ow=o("Automatic Differentiation"),Nw=h(),zc=r("li"),ci=r("a"),Iw=o("Vectorization"),Lw=h(),Cc=r("li"),pi=r("a"),Sw=o("Parallelization"),Ww=h(),St=r("div"),w(hi.$$.fragment),Qw=h(),rs=r("p"),Rw=o("The "),Pc=r("code"),Uw=o("FlaxDistilBertPreTrainedModel"),Kw=o(" forward method, overrides the "),qc=r("code"),Hw=o("__call__"),Vw=o(" special method."),Jw=h(),w(Fn.$$.fragment),Gw=h(),w(Bn.$$.fragment),$h=h(),as=r("h2"),En=r("a"),Ac=r("span"),w(ui.$$.fragment),Xw=h(),Oc=r("span"),Yw=o("FlaxDistilBertForTokenClassification"),yh=h(),st=r("div"),w(fi.$$.fragment),Zw=h(),Nc=r("p"),eT=o(`DistilBert 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.`),tT=h(),mi=r("p"),oT=o("This model inherits from "),Dl=r("a"),sT=o("FlaxPreTrainedModel"),nT=o(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading, saving and converting weights from PyTorch models)`),rT=h(),gi=r("p"),aT=o("This model is also a Flax Linen "),_i=r("a"),iT=o("flax.linen.Module"),lT=o(`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),dT=h(),Ic=r("p"),cT=o("Finally, this model supports inherent JAX features such as:"),pT=h(),to=r("ul"),Lc=r("li"),bi=r("a"),hT=o("Just-In-Time (JIT) compilation"),uT=h(),Sc=r("li"),ki=r("a"),fT=o("Automatic Differentiation"),mT=h(),Wc=r("li"),vi=r("a"),gT=o("Vectorization"),_T=h(),Qc=r("li"),wi=r("a"),bT=o("Parallelization"),kT=h(),Wt=r("div"),w(Ti.$$.fragment),vT=h(),is=r("p"),wT=o("The "),Rc=r("code"),TT=o("FlaxDistilBertPreTrainedModel"),$T=o(" forward method, overrides the "),Uc=r("code"),yT=o("__call__"),DT=o(" special method."),FT=h(),w(xn.$$.fragment),BT=h(),w(Mn.$$.fragment),Dh=h(),ls=r("h2"),jn=r("a"),Kc=r("span"),w($i.$$.fragment),ET=h(),Hc=r("span"),xT=o("FlaxDistilBertForQuestionAnswering"),Fh=h(),nt=r("div"),w(yi.$$.fragment),MT=h(),ds=r("p"),jT=o(`DistilBert Model with a span classification head on top for extractive question-answering tasks like SQuAD (a
linear layers on top of the hidden-states output to compute `),Vc=r("code"),zT=o("span start logits"),CT=o(" and "),Jc=r("code"),PT=o("span end logits"),qT=o(")."),AT=h(),Di=r("p"),OT=o("This model inherits from "),Fl=r("a"),NT=o("FlaxPreTrainedModel"),IT=o(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading, saving and converting weights from PyTorch models)`),LT=h(),Fi=r("p"),ST=o("This model is also a Flax Linen "),Bi=r("a"),WT=o("flax.linen.Module"),QT=o(`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),RT=h(),Gc=r("p"),UT=o("Finally, this model supports inherent JAX features such as:"),KT=h(),oo=r("ul"),Xc=r("li"),Ei=r("a"),HT=o("Just-In-Time (JIT) compilation"),VT=h(),Yc=r("li"),xi=r("a"),JT=o("Automatic Differentiation"),GT=h(),Zc=r("li"),Mi=r("a"),XT=o("Vectorization"),YT=h(),ep=r("li"),ji=r("a"),ZT=o("Parallelization"),e$=h(),Qt=r("div"),w(zi.$$.fragment),t$=h(),cs=r("p"),o$=o("The "),tp=r("code"),s$=o("FlaxDistilBertPreTrainedModel"),n$=o(" forward method, overrides the "),op=r("code"),r$=o("__call__"),a$=o(" special method."),i$=h(),w(zn.$$.fragment),l$=h(),w(Cn.$$.fragment),this.h()},l(n){const b=o2('[data-svelte="svelte-1phssyn"]',document.head);d=a(b,"META",{name:!0,content:!0}),b.forEach(t),g=u(n),c=a(n,"H1",{class:!0});var Ci=i(c);f=a(Ci,"A",{id:!0,class:!0,href:!0});var sp=i(f);k=a(sp,"SPAN",{});var np=i(k);T(l.$$.fragment,np),np.forEach(t),sp.forEach(t),p=u(Ci),M=a(Ci,"SPAN",{});var rp=i(M);we=s(rp,"DistilBERT"),rp.forEach(t),Ci.forEach(t),ge=u(n),I=a(n,"H2",{class:!0});var Pi=i(I);re=a(Pi,"A",{id:!0,class:!0,href:!0});var ap=i(re);oe=a(ap,"SPAN",{});var ip=i(oe);T(B.$$.fragment,ip),ip.forEach(t),ap.forEach(t),Te=u(Pi),U=a(Pi,"SPAN",{});var lp=i(U);$e=s(lp,"Overview"),lp.forEach(t),Pi.forEach(t),_e=u(n),O=a(n,"P",{});var so=i(O);ye=s(so,"The DistilBERT model was proposed in the blog post "),ae=a(so,"A",{href:!0,rel:!0});var dp=i(ae);H=s(dp,`Smaller, faster, cheaper, lighter: Introducing DistilBERT, a
distilled version of BERT`),dp.forEach(t),De=s(so,", and the paper "),ie=a(so,"A",{href:!0,rel:!0});var cp=i(ie);V=s(cp,`DistilBERT, a
distilled version of BERT: smaller, faster, cheaper and lighter`),cp.forEach(t),Fe=s(so,`. DistilBERT is a
small, fast, cheap and light Transformer model trained by distilling BERT base. It has 40% less parameters than
`),de=a(so,"EM",{});var pp=i(de);J=s(pp,"bert-base-uncased"),pp.forEach(t),Be=s(so,`, runs 60% faster while preserving over 95% of BERT\u2019s performances as measured on the GLUE language
understanding benchmark.`),so.forEach(t),be=u(n),te=a(n,"P",{});var hp=i(te);z=s(hp,"The abstract from the paper is the following:"),hp.forEach(t),q=u(n),le=a(n,"P",{});var up=i(le);K=a(up,"EM",{});var fp=i(K);Ee=s(fp,`As Transfer Learning from large-scale pre-trained models becomes more prevalent in Natural Language Processing (NLP),
operating these large models in on-the-edge and/or under constrained computational training or inference budgets
remains challenging. In this work, we propose a method to pre-train a smaller general-purpose language representation
model, called DistilBERT, which can then be fine-tuned with good performances on a wide range of tasks like its larger
counterparts. While most prior work investigated the use of distillation for building task-specific models, we leverage
knowledge distillation during the pretraining phase and show that it is possible to reduce the size of a BERT model by
40%, while retaining 97% of its language understanding capabilities and being 60% faster. To leverage the inductive
biases learned by larger models during pretraining, we introduce a triple loss combining language modeling,
distillation and cosine-distance losses. Our smaller, faster and lighter model is cheaper to pre-train and we
demonstrate its capabilities for on-device computations in a proof-of-concept experiment and a comparative on-device
study.`),fp.forEach(t),up.forEach(t),ke=u(n),R=a(n,"P",{});var mp=i(R);xe=s(mp,"Tips:"),mp.forEach(t),ve=u(n),C=a(n,"UL",{});var qi=i(C);se=a(qi,"LI",{});var no=i(se);G=s(no,"DistilBERT doesn\u2019t have "),ce=a(no,"CODE",{});var gp=i(ce);Me=s(gp,"token_type_ids"),gp.forEach(t),X=s(no,`, you don\u2019t need to indicate which token belongs to which segment. Just
separate your segments with the separation token `),pe=a(no,"CODE",{});var _p=i(pe);je=s(_p,"tokenizer.sep_token"),_p.forEach(t),L=s(no," (or "),he=a(no,"CODE",{});var bp=i(he);Y=s(bp,"[SEP]"),bp.forEach(t),ze=s(no,")."),no.forEach(t),ne=u(qi),P=a(qi,"LI",{});var Ai=i(P);Ce=s(Ai,"DistilBERT doesn\u2019t have options to select the input positions ("),A=a(Ai,"CODE",{});var kp=i(A);Pe=s(kp,"position_ids"),kp.forEach(t),qe=s(Ai,` input). This could be added if
necessary though, just let us know if you need this option.`),Ai.forEach(t),qi.forEach(t),v=u(n),x=a(n,"P",{});var ro=i(x);Ue=s(ro,"This model was contributed by "),ee=a(ro,"A",{href:!0,rel:!0});var vp=i(ee);Ke=s(vp,"victorsanh"),vp.forEach(t),He=s(ro,`. This model jax version was
contributed by `),j=a(ro,"A",{href:!0,rel:!0});var wp=i(j);Ve=s(wp,"kamalkraj"),wp.forEach(t),Je=s(ro,". The original code can be found "),Ne=a(ro,"A",{href:!0,rel:!0});var Tp=i(Ne);Ge=s(Tp,"here"),Tp.forEach(t),Xe=s(ro,"."),ro.forEach(t),N=u(n),S=a(n,"H2",{class:!0});var Oi=i(S);Oe=a(Oi,"A",{id:!0,class:!0,href:!0});var $p=i(Oe);Se=a($p,"SPAN",{});var yp=i(Se);T(W.$$.fragment,yp),yp.forEach(t),$p.forEach(t),Ye=u(Oi),We=a(Oi,"SPAN",{});var Dp=i(We);Ae=s(Dp,"DistilBertConfig"),Dp.forEach(t),Oi.forEach(t),Re=u(n),Q=a(n,"DIV",{class:!0});var ao=i(Q);T(Ie.$$.fragment,ao),Cu=u(ao),Gt=a(ao,"P",{});var io=i(Gt);Pu=s(io,"This is the configuration class to store the configuration of a "),Si=a(io,"A",{href:!0});var Fp=i(Si);qu=s(Fp,"DistilBertModel"),Fp.forEach(t),Au=s(io," or a "),Wi=a(io,"A",{href:!0});var Bp=i(Wi);Ou=s(Bp,"TFDistilBertModel"),Bp.forEach(t),Nu=s(io,`. It
is used to instantiate a DistilBERT 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 DistilBERT
`),Yn=a(io,"A",{href:!0,rel:!0});var Ep=i(Yn);Iu=s(Ep,"distilbert-base-uncased"),Ep.forEach(t),Lu=s(io," architecture."),io.forEach(t),Su=u(ao),$o=a(ao,"P",{});var ps=i($o);Wu=s(ps,"Configuration objects inherit from "),Qi=a(ps,"A",{href:!0});var xp=i(Qi);Qu=s(xp,"PretrainedConfig"),xp.forEach(t),Ru=s(ps,` and can be used to control the model outputs. Read the
documentation from `),Ri=a(ps,"A",{href:!0});var Mp=i(Ri);Uu=s(Mp,"PretrainedConfig"),Mp.forEach(t),Ku=s(ps," for more information."),ps.forEach(t),Hu=u(ao),T(hs.$$.fragment,ao),ao.forEach(t),Sp=u(n),yo=a(n,"H2",{class:!0});var Ni=i(yo);us=a(Ni,"A",{id:!0,class:!0,href:!0});var jp=i(us);Vl=a(jp,"SPAN",{});var zp=i(Vl);T(Zn.$$.fragment,zp),zp.forEach(t),jp.forEach(t),Vu=u(Ni),Jl=a(Ni,"SPAN",{});var Cp=i(Jl);Ju=s(Cp,"DistilBertTokenizer"),Cp.forEach(t),Ni.forEach(t),Wp=u(n),zt=a(n,"DIV",{class:!0});var lo=i(zt);T(er.$$.fragment,lo),Gu=u(lo),Gl=a(lo,"P",{});var Pp=i(Gl);Xu=s(Pp,"Construct a DistilBERT tokenizer."),Pp.forEach(t),Yu=u(lo),fs=a(lo,"P",{});var Pn=i(fs);Ui=a(Pn,"A",{href:!0});var qp=i(Ui);Zu=s(qp,"DistilBertTokenizer"),qp.forEach(t),ef=s(Pn," is identical to "),Ki=a(Pn,"A",{href:!0});var Ap=i(Ki);tf=s(Ap,"BertTokenizer"),Ap.forEach(t),of=s(Pn,` and runs end-to-end tokenization: punctuation splitting
and wordpiece.`),Pn.forEach(t),sf=u(lo),tr=a(lo,"P",{});var Ii=i(tr);nf=s(Ii,"Refer to superclass "),Hi=a(Ii,"A",{href:!0});var Op=i(Hi);rf=s(Op,"BertTokenizer"),Op.forEach(t),af=s(Ii," for usage examples and documentation concerning parameters."),Ii.forEach(t),lo.forEach(t),Qp=u(n),Do=a(n,"H2",{class:!0});var Li=i(Do);ms=a(Li,"A",{id:!0,class:!0,href:!0});var Np=i(ms);Xl=a(Np,"SPAN",{});var Ip=i(Xl);T(or.$$.fragment,Ip),Ip.forEach(t),Np.forEach(t),lf=u(Li),Yl=a(Li,"SPAN",{});var d$=i(Yl);df=s(d$,"DistilBertTokenizerFast"),d$.forEach(t),Li.forEach(t),Rp=u(n),Ct=a(n,"DIV",{class:!0});var qn=i(Ct);T(sr.$$.fragment,qn),cf=u(qn),nr=a(qn,"P",{});var Eh=i(nr);pf=s(Eh,"Construct a \u201Cfast\u201D DistilBERT tokenizer (backed by HuggingFace\u2019s "),Zl=a(Eh,"EM",{});var c$=i(Zl);hf=s(c$,"tokenizers"),c$.forEach(t),uf=s(Eh," library)."),Eh.forEach(t),ff=u(qn),gs=a(qn,"P",{});var Lp=i(gs);Vi=a(Lp,"A",{href:!0});var p$=i(Vi);mf=s(p$,"DistilBertTokenizerFast"),p$.forEach(t),gf=s(Lp," is identical to "),Ji=a(Lp,"A",{href:!0});var h$=i(Ji);_f=s(h$,"BertTokenizerFast"),h$.forEach(t),bf=s(Lp,` and runs end-to-end tokenization: punctuation
splitting and wordpiece.`),Lp.forEach(t),kf=u(qn),rr=a(qn,"P",{});var xh=i(rr);vf=s(xh,"Refer to superclass "),Gi=a(xh,"A",{href:!0});var u$=i(Gi);wf=s(u$,"BertTokenizerFast"),u$.forEach(t),Tf=s(xh," for usage examples and documentation concerning parameters."),xh.forEach(t),qn.forEach(t),Up=u(n),Fo=a(n,"H2",{class:!0});var Mh=i(Fo);_s=a(Mh,"A",{id:!0,class:!0,href:!0});var f$=i(_s);ed=a(f$,"SPAN",{});var m$=i(ed);T(ar.$$.fragment,m$),m$.forEach(t),f$.forEach(t),$f=u(Mh),td=a(Mh,"SPAN",{});var g$=i(td);yf=s(g$,"DistilBertModel"),g$.forEach(t),Mh.forEach(t),Kp=u(n),ht=a(n,"DIV",{class:!0});var co=i(ht);T(ir.$$.fragment,co),Df=u(co),od=a(co,"P",{});var _$=i(od);Ff=s(_$,"The bare DistilBERT encoder/transformer outputting raw hidden-states without any specific head on top."),_$.forEach(t),Bf=u(co),lr=a(co,"P",{});var jh=i(lr);Ef=s(jh,"This model inherits from "),Xi=a(jh,"A",{href:!0});var b$=i(Xi);xf=s(b$,"PreTrainedModel"),b$.forEach(t),Mf=s(jh,`. 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.)`),jh.forEach(t),jf=u(co),dr=a(co,"P",{});var zh=i(dr);zf=s(zh,"This model is also a PyTorch "),cr=a(zh,"A",{href:!0,rel:!0});var k$=i(cr);Cf=s(k$,"torch.nn.Module"),k$.forEach(t),Pf=s(zh,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),zh.forEach(t),qf=u(co),Pt=a(co,"DIV",{class:!0});var An=i(Pt);T(pr.$$.fragment,An),Af=u(An),Bo=a(An,"P",{});var Bl=i(Bo);Of=s(Bl,"The "),Yi=a(Bl,"A",{href:!0});var v$=i(Yi);Nf=s(v$,"DistilBertModel"),v$.forEach(t),If=s(Bl," forward method, overrides the "),sd=a(Bl,"CODE",{});var w$=i(sd);Lf=s(w$,"__call__"),w$.forEach(t),Sf=s(Bl," special method."),Bl.forEach(t),Wf=u(An),T(bs.$$.fragment,An),Qf=u(An),T(ks.$$.fragment,An),An.forEach(t),co.forEach(t),Hp=u(n),Eo=a(n,"H2",{class:!0});var Ch=i(Eo);vs=a(Ch,"A",{id:!0,class:!0,href:!0});var T$=i(vs);nd=a(T$,"SPAN",{});var $$=i(nd);T(hr.$$.fragment,$$),$$.forEach(t),T$.forEach(t),Rf=u(Ch),rd=a(Ch,"SPAN",{});var y$=i(rd);Uf=s(y$,"DistilBertForMaskedLM"),y$.forEach(t),Ch.forEach(t),Vp=u(n),ut=a(n,"DIV",{class:!0});var po=i(ut);T(ur.$$.fragment,po),Kf=u(po),fr=a(po,"P",{});var Ph=i(fr);Hf=s(Ph,"DistilBert Model with a "),ad=a(Ph,"CODE",{});var D$=i(ad);Vf=s(D$,"masked language modeling"),D$.forEach(t),Jf=s(Ph," head on top."),Ph.forEach(t),Gf=u(po),mr=a(po,"P",{});var qh=i(mr);Xf=s(qh,"This model inherits from "),Zi=a(qh,"A",{href:!0});var F$=i(Zi);Yf=s(F$,"PreTrainedModel"),F$.forEach(t),Zf=s(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),em=u(po),gr=a(po,"P",{});var Ah=i(gr);tm=s(Ah,"This model is also a PyTorch "),_r=a(Ah,"A",{href:!0,rel:!0});var B$=i(_r);om=s(B$,"torch.nn.Module"),B$.forEach(t),sm=s(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),nm=u(po),bt=a(po,"DIV",{class:!0});var ho=i(bt);T(br.$$.fragment,ho),rm=u(ho),xo=a(ho,"P",{});var El=i(xo);am=s(El,"The "),el=a(El,"A",{href:!0});var E$=i(el);im=s(E$,"DistilBertForMaskedLM"),E$.forEach(t),lm=s(El," forward method, overrides the "),id=a(El,"CODE",{});var x$=i(id);dm=s(x$,"__call__"),x$.forEach(t),cm=s(El," special method."),El.forEach(t),pm=u(ho),T(ws.$$.fragment,ho),hm=u(ho),T(Ts.$$.fragment,ho),um=u(ho),T($s.$$.fragment,ho),ho.forEach(t),po.forEach(t),Jp=u(n),Mo=a(n,"H2",{class:!0});var Oh=i(Mo);ys=a(Oh,"A",{id:!0,class:!0,href:!0});var M$=i(ys);ld=a(M$,"SPAN",{});var j$=i(ld);T(kr.$$.fragment,j$),j$.forEach(t),M$.forEach(t),fm=u(Oh),dd=a(Oh,"SPAN",{});var z$=i(dd);mm=s(z$,"DistilBertForSequenceClassification"),z$.forEach(t),Oh.forEach(t),Gp=u(n),ft=a(n,"DIV",{class:!0});var uo=i(ft);T(vr.$$.fragment,uo),gm=u(uo),cd=a(uo,"P",{});var C$=i(cd);_m=s(C$,`DistilBert Model transformer with a sequence classification/regression head on top (a linear layer on top of the
pooled output) e.g. for GLUE tasks.`),C$.forEach(t),bm=u(uo),wr=a(uo,"P",{});var Nh=i(wr);km=s(Nh,"This model inherits from "),tl=a(Nh,"A",{href:!0});var P$=i(tl);vm=s(P$,"PreTrainedModel"),P$.forEach(t),wm=s(Nh,`. 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.)`),Nh.forEach(t),Tm=u(uo),Tr=a(uo,"P",{});var Ih=i(Tr);$m=s(Ih,"This model is also a PyTorch "),$r=a(Ih,"A",{href:!0,rel:!0});var q$=i($r);ym=s(q$,"torch.nn.Module"),q$.forEach(t),Dm=s(Ih,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Ih.forEach(t),Fm=u(uo),rt=a(uo,"DIV",{class:!0});var Dt=i(rt);T(yr.$$.fragment,Dt),Bm=u(Dt),jo=a(Dt,"P",{});var xl=i(jo);Em=s(xl,"The "),ol=a(xl,"A",{href:!0});var A$=i(ol);xm=s(A$,"DistilBertForSequenceClassification"),A$.forEach(t),Mm=s(xl," forward method, overrides the "),pd=a(xl,"CODE",{});var O$=i(pd);jm=s(O$,"__call__"),O$.forEach(t),zm=s(xl," special method."),xl.forEach(t),Cm=u(Dt),T(Ds.$$.fragment,Dt),Pm=u(Dt),T(Fs.$$.fragment,Dt),qm=u(Dt),T(Bs.$$.fragment,Dt),Am=u(Dt),T(Es.$$.fragment,Dt),Om=u(Dt),T(xs.$$.fragment,Dt),Dt.forEach(t),uo.forEach(t),Xp=u(n),zo=a(n,"H2",{class:!0});var Lh=i(zo);Ms=a(Lh,"A",{id:!0,class:!0,href:!0});var N$=i(Ms);hd=a(N$,"SPAN",{});var I$=i(hd);T(Dr.$$.fragment,I$),I$.forEach(t),N$.forEach(t),Nm=u(Lh),ud=a(Lh,"SPAN",{});var L$=i(ud);Im=s(L$,"DistilBertForMultipleChoice"),L$.forEach(t),Lh.forEach(t),Yp=u(n),mt=a(n,"DIV",{class:!0});var fo=i(mt);T(Fr.$$.fragment,fo),Lm=u(fo),fd=a(fo,"P",{});var S$=i(fd);Sm=s(S$,`DistilBert 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.`),S$.forEach(t),Wm=u(fo),Br=a(fo,"P",{});var Sh=i(Br);Qm=s(Sh,"This model inherits from "),sl=a(Sh,"A",{href:!0});var W$=i(sl);Rm=s(W$,"PreTrainedModel"),W$.forEach(t),Um=s(Sh,`. 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.)`),Sh.forEach(t),Km=u(fo),Er=a(fo,"P",{});var Wh=i(Er);Hm=s(Wh,"This model is also a PyTorch "),xr=a(Wh,"A",{href:!0,rel:!0});var Q$=i(xr);Vm=s(Q$,"torch.nn.Module"),Q$.forEach(t),Jm=s(Wh,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Wh.forEach(t),Gm=u(fo),qt=a(fo,"DIV",{class:!0});var On=i(qt);T(Mr.$$.fragment,On),Xm=u(On),Co=a(On,"P",{});var Ml=i(Co);Ym=s(Ml,"The "),nl=a(Ml,"A",{href:!0});var R$=i(nl);Zm=s(R$,"DistilBertForMultipleChoice"),R$.forEach(t),eg=s(Ml," forward method, overrides the "),md=a(Ml,"CODE",{});var U$=i(md);tg=s(U$,"__call__"),U$.forEach(t),og=s(Ml," special method."),Ml.forEach(t),sg=u(On),T(js.$$.fragment,On),ng=u(On),T(zs.$$.fragment,On),On.forEach(t),fo.forEach(t),Zp=u(n),Po=a(n,"H2",{class:!0});var Qh=i(Po);Cs=a(Qh,"A",{id:!0,class:!0,href:!0});var K$=i(Cs);gd=a(K$,"SPAN",{});var H$=i(gd);T(jr.$$.fragment,H$),H$.forEach(t),K$.forEach(t),rg=u(Qh),_d=a(Qh,"SPAN",{});var V$=i(_d);ag=s(V$,"DistilBertForTokenClassification"),V$.forEach(t),Qh.forEach(t),eh=u(n),gt=a(n,"DIV",{class:!0});var mo=i(gt);T(zr.$$.fragment,mo),ig=u(mo),bd=a(mo,"P",{});var J$=i(bd);lg=s(J$,`DistilBert 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.`),J$.forEach(t),dg=u(mo),Cr=a(mo,"P",{});var Rh=i(Cr);cg=s(Rh,"This model inherits from "),rl=a(Rh,"A",{href:!0});var G$=i(rl);pg=s(G$,"PreTrainedModel"),G$.forEach(t),hg=s(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),ug=u(mo),Pr=a(mo,"P",{});var Uh=i(Pr);fg=s(Uh,"This model is also a PyTorch "),qr=a(Uh,"A",{href:!0,rel:!0});var X$=i(qr);mg=s(X$,"torch.nn.Module"),X$.forEach(t),gg=s(Uh,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Uh.forEach(t),_g=u(mo),kt=a(mo,"DIV",{class:!0});var go=i(kt);T(Ar.$$.fragment,go),bg=u(go),qo=a(go,"P",{});var jl=i(qo);kg=s(jl,"The "),al=a(jl,"A",{href:!0});var Y$=i(al);vg=s(Y$,"DistilBertForTokenClassification"),Y$.forEach(t),wg=s(jl," forward method, overrides the "),kd=a(jl,"CODE",{});var Z$=i(kd);Tg=s(Z$,"__call__"),Z$.forEach(t),$g=s(jl," special method."),jl.forEach(t),yg=u(go),T(Ps.$$.fragment,go),Dg=u(go),T(qs.$$.fragment,go),Fg=u(go),T(As.$$.fragment,go),go.forEach(t),mo.forEach(t),th=u(n),Ao=a(n,"H2",{class:!0});var Kh=i(Ao);Os=a(Kh,"A",{id:!0,class:!0,href:!0});var e1=i(Os);vd=a(e1,"SPAN",{});var t1=i(vd);T(Or.$$.fragment,t1),t1.forEach(t),e1.forEach(t),Bg=u(Kh),wd=a(Kh,"SPAN",{});var o1=i(wd);Eg=s(o1,"DistilBertForQuestionAnswering"),o1.forEach(t),Kh.forEach(t),oh=u(n),_t=a(n,"DIV",{class:!0});var _o=i(_t);T(Nr.$$.fragment,_o),xg=u(_o),Oo=a(_o,"P",{});var zl=i(Oo);Mg=s(zl,`DistilBert 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 `),Td=a(zl,"CODE",{});var s1=i(Td);jg=s(s1,"span start logits"),s1.forEach(t),zg=s(zl," and "),$d=a(zl,"CODE",{});var n1=i($d);Cg=s(n1,"span end logits"),n1.forEach(t),Pg=s(zl,")."),zl.forEach(t),qg=u(_o),Ir=a(_o,"P",{});var Hh=i(Ir);Ag=s(Hh,"This model inherits from "),il=a(Hh,"A",{href:!0});var r1=i(il);Og=s(r1,"PreTrainedModel"),r1.forEach(t),Ng=s(Hh,`. 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.)`),Hh.forEach(t),Ig=u(_o),Lr=a(_o,"P",{});var Vh=i(Lr);Lg=s(Vh,"This model is also a PyTorch "),Sr=a(Vh,"A",{href:!0,rel:!0});var a1=i(Sr);Sg=s(a1,"torch.nn.Module"),a1.forEach(t),Wg=s(Vh,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Vh.forEach(t),Qg=u(_o),vt=a(_o,"DIV",{class:!0});var bo=i(vt);T(Wr.$$.fragment,bo),Rg=u(bo),No=a(bo,"P",{});var Cl=i(No);Ug=s(Cl,"The "),ll=a(Cl,"A",{href:!0});var i1=i(ll);Kg=s(i1,"DistilBertForQuestionAnswering"),i1.forEach(t),Hg=s(Cl," forward method, overrides the "),yd=a(Cl,"CODE",{});var l1=i(yd);Vg=s(l1,"__call__"),l1.forEach(t),Jg=s(Cl," special method."),Cl.forEach(t),Gg=u(bo),T(Ns.$$.fragment,bo),Xg=u(bo),T(Is.$$.fragment,bo),Yg=u(bo),T(Ls.$$.fragment,bo),bo.forEach(t),_o.forEach(t),sh=u(n),Io=a(n,"H2",{class:!0});var Jh=i(Io);Ss=a(Jh,"A",{id:!0,class:!0,href:!0});var d1=i(Ss);Dd=a(d1,"SPAN",{});var c1=i(Dd);T(Qr.$$.fragment,c1),c1.forEach(t),d1.forEach(t),Zg=u(Jh),Fd=a(Jh,"SPAN",{});var p1=i(Fd);e_=s(p1,"TFDistilBertModel"),p1.forEach(t),Jh.forEach(t),nh=u(n),at=a(n,"DIV",{class:!0});var Rt=i(at);T(Rr.$$.fragment,Rt),t_=u(Rt),Bd=a(Rt,"P",{});var h1=i(Bd);o_=s(h1,"The bare DistilBERT encoder/transformer outputting raw hidden-states without any specific head on top."),h1.forEach(t),s_=u(Rt),Ur=a(Rt,"P",{});var Gh=i(Ur);n_=s(Gh,"This model inherits from "),dl=a(Gh,"A",{href:!0});var u1=i(dl);r_=s(u1,"TFPreTrainedModel"),u1.forEach(t),a_=s(Gh,`. 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.)`),Gh.forEach(t),i_=u(Rt),Kr=a(Rt,"P",{});var Xh=i(Kr);l_=s(Xh,"This model is also a "),Hr=a(Xh,"A",{href:!0,rel:!0});var f1=i(Hr);d_=s(f1,"tf.keras.Model"),f1.forEach(t),c_=s(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),p_=u(Rt),T(Ws.$$.fragment,Rt),h_=u(Rt),At=a(Rt,"DIV",{class:!0});var Nn=i(At);T(Vr.$$.fragment,Nn),u_=u(Nn),Lo=a(Nn,"P",{});var Pl=i(Lo);f_=s(Pl,"The "),cl=a(Pl,"A",{href:!0});var m1=i(cl);m_=s(m1,"TFDistilBertModel"),m1.forEach(t),g_=s(Pl," forward method, overrides the "),Ed=a(Pl,"CODE",{});var g1=i(Ed);__=s(g1,"__call__"),g1.forEach(t),b_=s(Pl," special method."),Pl.forEach(t),k_=u(Nn),T(Qs.$$.fragment,Nn),v_=u(Nn),T(Rs.$$.fragment,Nn),Nn.forEach(t),Rt.forEach(t),rh=u(n),So=a(n,"H2",{class:!0});var Yh=i(So);Us=a(Yh,"A",{id:!0,class:!0,href:!0});var _1=i(Us);xd=a(_1,"SPAN",{});var b1=i(xd);T(Jr.$$.fragment,b1),b1.forEach(t),_1.forEach(t),w_=u(Yh),Md=a(Yh,"SPAN",{});var k1=i(Md);T_=s(k1,"TFDistilBertForMaskedLM"),k1.forEach(t),Yh.forEach(t),ah=u(n),it=a(n,"DIV",{class:!0});var Ut=i(it);T(Gr.$$.fragment,Ut),$_=u(Ut),Xr=a(Ut,"P",{});var Zh=i(Xr);y_=s(Zh,"DistilBert Model with a "),jd=a(Zh,"CODE",{});var v1=i(jd);D_=s(v1,"masked language modeling"),v1.forEach(t),F_=s(Zh," head on top."),Zh.forEach(t),B_=u(Ut),Yr=a(Ut,"P",{});var eu=i(Yr);E_=s(eu,"This model inherits from "),pl=a(eu,"A",{href:!0});var w1=i(pl);x_=s(w1,"TFPreTrainedModel"),w1.forEach(t),M_=s(eu,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),eu.forEach(t),j_=u(Ut),Zr=a(Ut,"P",{});var tu=i(Zr);z_=s(tu,"This model is also a "),ea=a(tu,"A",{href:!0,rel:!0});var T1=i(ea);C_=s(T1,"tf.keras.Model"),T1.forEach(t),P_=s(tu,` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),tu.forEach(t),q_=u(Ut),T(Ks.$$.fragment,Ut),A_=u(Ut),wt=a(Ut,"DIV",{class:!0});var ko=i(wt);T(ta.$$.fragment,ko),O_=u(ko),Wo=a(ko,"P",{});var ql=i(Wo);N_=s(ql,"The "),hl=a(ql,"A",{href:!0});var $1=i(hl);I_=s($1,"TFDistilBertForMaskedLM"),$1.forEach(t),L_=s(ql," forward method, overrides the "),zd=a(ql,"CODE",{});var y1=i(zd);S_=s(y1,"__call__"),y1.forEach(t),W_=s(ql," special method."),ql.forEach(t),Q_=u(ko),T(Hs.$$.fragment,ko),R_=u(ko),T(Vs.$$.fragment,ko),U_=u(ko),T(Js.$$.fragment,ko),ko.forEach(t),Ut.forEach(t),ih=u(n),Qo=a(n,"H2",{class:!0});var ou=i(Qo);Gs=a(ou,"A",{id:!0,class:!0,href:!0});var D1=i(Gs);Cd=a(D1,"SPAN",{});var F1=i(Cd);T(oa.$$.fragment,F1),F1.forEach(t),D1.forEach(t),K_=u(ou),Pd=a(ou,"SPAN",{});var B1=i(Pd);H_=s(B1,"TFDistilBertForSequenceClassification"),B1.forEach(t),ou.forEach(t),lh=u(n),lt=a(n,"DIV",{class:!0});var Kt=i(lt);T(sa.$$.fragment,Kt),V_=u(Kt),qd=a(Kt,"P",{});var E1=i(qd);J_=s(E1,`DistilBert Model transformer with a sequence classification/regression head on top (a linear layer on top of the
pooled output) e.g. for GLUE tasks.`),E1.forEach(t),G_=u(Kt),na=a(Kt,"P",{});var su=i(na);X_=s(su,"This model inherits from "),ul=a(su,"A",{href:!0});var x1=i(ul);Y_=s(x1,"TFPreTrainedModel"),x1.forEach(t),Z_=s(su,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),su.forEach(t),eb=u(Kt),ra=a(Kt,"P",{});var nu=i(ra);tb=s(nu,"This model is also a "),aa=a(nu,"A",{href:!0,rel:!0});var M1=i(aa);ob=s(M1,"tf.keras.Model"),M1.forEach(t),sb=s(nu,` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),nu.forEach(t),nb=u(Kt),T(Xs.$$.fragment,Kt),rb=u(Kt),Tt=a(Kt,"DIV",{class:!0});var vo=i(Tt);T(ia.$$.fragment,vo),ab=u(vo),Ro=a(vo,"P",{});var Al=i(Ro);ib=s(Al,"The "),fl=a(Al,"A",{href:!0});var j1=i(fl);lb=s(j1,"TFDistilBertForSequenceClassification"),j1.forEach(t),db=s(Al," forward method, overrides the "),Ad=a(Al,"CODE",{});var z1=i(Ad);cb=s(z1,"__call__"),z1.forEach(t),pb=s(Al," special method."),Al.forEach(t),hb=u(vo),T(Ys.$$.fragment,vo),ub=u(vo),T(Zs.$$.fragment,vo),fb=u(vo),T(en.$$.fragment,vo),vo.forEach(t),Kt.forEach(t),dh=u(n),Uo=a(n,"H2",{class:!0});var ru=i(Uo);tn=a(ru,"A",{id:!0,class:!0,href:!0});var C1=i(tn);Od=a(C1,"SPAN",{});var P1=i(Od);T(la.$$.fragment,P1),P1.forEach(t),C1.forEach(t),mb=u(ru),Nd=a(ru,"SPAN",{});var q1=i(Nd);gb=s(q1,"TFDistilBertForMultipleChoice"),q1.forEach(t),ru.forEach(t),ch=u(n),dt=a(n,"DIV",{class:!0});var Ht=i(dt);T(da.$$.fragment,Ht),_b=u(Ht),Id=a(Ht,"P",{});var A1=i(Id);bb=s(A1,`DistilBert 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.`),A1.forEach(t),kb=u(Ht),ca=a(Ht,"P",{});var au=i(ca);vb=s(au,"This model inherits from "),ml=a(au,"A",{href:!0});var O1=i(ml);wb=s(O1,"TFPreTrainedModel"),O1.forEach(t),Tb=s(au,`. 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.)`),au.forEach(t),$b=u(Ht),pa=a(Ht,"P",{});var iu=i(pa);yb=s(iu,"This model is also a "),ha=a(iu,"A",{href:!0,rel:!0});var N1=i(ha);Db=s(N1,"tf.keras.Model"),N1.forEach(t),Fb=s(iu,` 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.`),iu.forEach(t),Bb=u(Ht),T(on.$$.fragment,Ht),Eb=u(Ht),Ot=a(Ht,"DIV",{class:!0});var In=i(Ot);T(ua.$$.fragment,In),xb=u(In),Ko=a(In,"P",{});var Ol=i(Ko);Mb=s(Ol,"The "),gl=a(Ol,"A",{href:!0});var I1=i(gl);jb=s(I1,"TFDistilBertForMultipleChoice"),I1.forEach(t),zb=s(Ol," forward method, overrides the "),Ld=a(Ol,"CODE",{});var L1=i(Ld);Cb=s(L1,"__call__"),L1.forEach(t),Pb=s(Ol," special method."),Ol.forEach(t),qb=u(In),T(sn.$$.fragment,In),Ab=u(In),T(nn.$$.fragment,In),In.forEach(t),Ht.forEach(t),ph=u(n),Ho=a(n,"H2",{class:!0});var lu=i(Ho);rn=a(lu,"A",{id:!0,class:!0,href:!0});var S1=i(rn);Sd=a(S1,"SPAN",{});var W1=i(Sd);T(fa.$$.fragment,W1),W1.forEach(t),S1.forEach(t),Ob=u(lu),Wd=a(lu,"SPAN",{});var Q1=i(Wd);Nb=s(Q1,"TFDistilBertForTokenClassification"),Q1.forEach(t),lu.forEach(t),hh=u(n),ct=a(n,"DIV",{class:!0});var Vt=i(ct);T(ma.$$.fragment,Vt),Ib=u(Vt),Qd=a(Vt,"P",{});var R1=i(Qd);Lb=s(R1,`DistilBert 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.`),R1.forEach(t),Sb=u(Vt),ga=a(Vt,"P",{});var du=i(ga);Wb=s(du,"This model inherits from "),_l=a(du,"A",{href:!0});var U1=i(_l);Qb=s(U1,"TFPreTrainedModel"),U1.forEach(t),Rb=s(du,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),du.forEach(t),Ub=u(Vt),_a=a(Vt,"P",{});var cu=i(_a);Kb=s(cu,"This model is also a "),ba=a(cu,"A",{href:!0,rel:!0});var K1=i(ba);Hb=s(K1,"tf.keras.Model"),K1.forEach(t),Vb=s(cu,` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),cu.forEach(t),Jb=u(Vt),T(an.$$.fragment,Vt),Gb=u(Vt),$t=a(Vt,"DIV",{class:!0});var wo=i($t);T(ka.$$.fragment,wo),Xb=u(wo),Vo=a(wo,"P",{});var Nl=i(Vo);Yb=s(Nl,"The "),bl=a(Nl,"A",{href:!0});var H1=i(bl);Zb=s(H1,"TFDistilBertForTokenClassification"),H1.forEach(t),ek=s(Nl," forward method, overrides the "),Rd=a(Nl,"CODE",{});var V1=i(Rd);tk=s(V1,"__call__"),V1.forEach(t),ok=s(Nl," special method."),Nl.forEach(t),sk=u(wo),T(ln.$$.fragment,wo),nk=u(wo),T(dn.$$.fragment,wo),rk=u(wo),T(cn.$$.fragment,wo),wo.forEach(t),Vt.forEach(t),uh=u(n),Jo=a(n,"H2",{class:!0});var pu=i(Jo);pn=a(pu,"A",{id:!0,class:!0,href:!0});var J1=i(pn);Ud=a(J1,"SPAN",{});var G1=i(Ud);T(va.$$.fragment,G1),G1.forEach(t),J1.forEach(t),ak=u(pu),Kd=a(pu,"SPAN",{});var X1=i(Kd);ik=s(X1,"TFDistilBertForQuestionAnswering"),X1.forEach(t),pu.forEach(t),fh=u(n),pt=a(n,"DIV",{class:!0});var Jt=i(pt);T(wa.$$.fragment,Jt),lk=u(Jt),Go=a(Jt,"P",{});var Il=i(Go);dk=s(Il,`DistilBert Model with a span classification head on top for extractive question-answering tasks like SQuAD (a
linear layer on top of the hidden-states output to compute `),Hd=a(Il,"CODE",{});var Y1=i(Hd);ck=s(Y1,"span start logits"),Y1.forEach(t),pk=s(Il," and "),Vd=a(Il,"CODE",{});var Z1=i(Vd);hk=s(Z1,"span end logits"),Z1.forEach(t),uk=s(Il,")."),Il.forEach(t),fk=u(Jt),Ta=a(Jt,"P",{});var hu=i(Ta);mk=s(hu,"This model inherits from "),kl=a(hu,"A",{href:!0});var ey=i(kl);gk=s(ey,"TFPreTrainedModel"),ey.forEach(t),_k=s(hu,`. 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.)`),hu.forEach(t),bk=u(Jt),$a=a(Jt,"P",{});var uu=i($a);kk=s(uu,"This model is also a "),ya=a(uu,"A",{href:!0,rel:!0});var ty=i(ya);vk=s(ty,"tf.keras.Model"),ty.forEach(t),wk=s(uu,` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),uu.forEach(t),Tk=u(Jt),T(hn.$$.fragment,Jt),$k=u(Jt),yt=a(Jt,"DIV",{class:!0});var To=i(yt);T(Da.$$.fragment,To),yk=u(To),Xo=a(To,"P",{});var Ll=i(Xo);Dk=s(Ll,"The "),vl=a(Ll,"A",{href:!0});var oy=i(vl);Fk=s(oy,"TFDistilBertForQuestionAnswering"),oy.forEach(t),Bk=s(Ll," forward method, overrides the "),Jd=a(Ll,"CODE",{});var sy=i(Jd);Ek=s(sy,"__call__"),sy.forEach(t),xk=s(Ll," special method."),Ll.forEach(t),Mk=u(To),T(un.$$.fragment,To),jk=u(To),T(fn.$$.fragment,To),zk=u(To),T(mn.$$.fragment,To),To.forEach(t),Jt.forEach(t),mh=u(n),Yo=a(n,"H2",{class:!0});var fu=i(Yo);gn=a(fu,"A",{id:!0,class:!0,href:!0});var ny=i(gn);Gd=a(ny,"SPAN",{});var ry=i(Gd);T(Fa.$$.fragment,ry),ry.forEach(t),ny.forEach(t),Ck=u(fu),Xd=a(fu,"SPAN",{});var ay=i(Xd);Pk=s(ay,"FlaxDistilBertModel"),ay.forEach(t),fu.forEach(t),gh=u(n),Ze=a(n,"DIV",{class:!0});var Ft=i(Ze);T(Ba.$$.fragment,Ft),qk=u(Ft),Yd=a(Ft,"P",{});var iy=i(Yd);Ak=s(iy,"The bare DistilBert Model transformer outputting raw hidden-states without any specific head on top."),iy.forEach(t),Ok=u(Ft),Ea=a(Ft,"P",{});var mu=i(Ea);Nk=s(mu,"This model inherits from "),wl=a(mu,"A",{href:!0});var ly=i(wl);Ik=s(ly,"FlaxPreTrainedModel"),ly.forEach(t),Lk=s(mu,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading, saving and converting weights from PyTorch models)`),mu.forEach(t),Sk=u(Ft),xa=a(Ft,"P",{});var gu=i(xa);Wk=s(gu,"This model is also a Flax Linen "),Ma=a(gu,"A",{href:!0,rel:!0});var dy=i(Ma);Qk=s(dy,"flax.linen.Module"),dy.forEach(t),Rk=s(gu,`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),gu.forEach(t),Uk=u(Ft),Zd=a(Ft,"P",{});var cy=i(Zd);Kk=s(cy,"Finally, this model supports inherent JAX features such as:"),cy.forEach(t),Hk=u(Ft),Xt=a(Ft,"UL",{});var Ln=i(Xt);ec=a(Ln,"LI",{});var py=i(ec);ja=a(py,"A",{href:!0,rel:!0});var hy=i(ja);Vk=s(hy,"Just-In-Time (JIT) compilation"),hy.forEach(t),py.forEach(t),Jk=u(Ln),tc=a(Ln,"LI",{});var uy=i(tc);za=a(uy,"A",{href:!0,rel:!0});var fy=i(za);Gk=s(fy,"Automatic Differentiation"),fy.forEach(t),uy.forEach(t),Xk=u(Ln),oc=a(Ln,"LI",{});var my=i(oc);Ca=a(my,"A",{href:!0,rel:!0});var gy=i(Ca);Yk=s(gy,"Vectorization"),gy.forEach(t),my.forEach(t),Zk=u(Ln),sc=a(Ln,"LI",{});var _y=i(sc);Pa=a(_y,"A",{href:!0,rel:!0});var by=i(Pa);ev=s(by,"Parallelization"),by.forEach(t),_y.forEach(t),Ln.forEach(t),tv=u(Ft),Nt=a(Ft,"DIV",{class:!0});var Sn=i(Nt);T(qa.$$.fragment,Sn),ov=u(Sn),Zo=a(Sn,"P",{});var Sl=i(Zo);sv=s(Sl,"The "),nc=a(Sl,"CODE",{});var ky=i(nc);nv=s(ky,"FlaxDistilBertPreTrainedModel"),ky.forEach(t),rv=s(Sl," forward method, overrides the "),rc=a(Sl,"CODE",{});var vy=i(rc);av=s(vy,"__call__"),vy.forEach(t),iv=s(Sl," special method."),Sl.forEach(t),lv=u(Sn),T(_n.$$.fragment,Sn),dv=u(Sn),T(bn.$$.fragment,Sn),Sn.forEach(t),Ft.forEach(t),_h=u(n),es=a(n,"H2",{class:!0});var _u=i(es);kn=a(_u,"A",{id:!0,class:!0,href:!0});var wy=i(kn);ac=a(wy,"SPAN",{});var Ty=i(ac);T(Aa.$$.fragment,Ty),Ty.forEach(t),wy.forEach(t),cv=u(_u),ic=a(_u,"SPAN",{});var $y=i(ic);pv=s($y,"FlaxDistilBertForMaskedLM"),$y.forEach(t),_u.forEach(t),bh=u(n),et=a(n,"DIV",{class:!0});var Bt=i(et);T(Oa.$$.fragment,Bt),hv=u(Bt),Na=a(Bt,"P",{});var bu=i(Na);uv=s(bu,"DistilBert Model with a "),lc=a(bu,"CODE",{});var yy=i(lc);fv=s(yy,"language modeling"),yy.forEach(t),mv=s(bu," head on top."),bu.forEach(t),gv=u(Bt),Ia=a(Bt,"P",{});var ku=i(Ia);_v=s(ku,"This model inherits from "),Tl=a(ku,"A",{href:!0});var Dy=i(Tl);bv=s(Dy,"FlaxPreTrainedModel"),Dy.forEach(t),kv=s(ku,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading, saving and converting weights from PyTorch models)`),ku.forEach(t),vv=u(Bt),La=a(Bt,"P",{});var vu=i(La);wv=s(vu,"This model is also a Flax Linen "),Sa=a(vu,"A",{href:!0,rel:!0});var Fy=i(Sa);Tv=s(Fy,"flax.linen.Module"),Fy.forEach(t),$v=s(vu,`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),vu.forEach(t),yv=u(Bt),dc=a(Bt,"P",{});var By=i(dc);Dv=s(By,"Finally, this model supports inherent JAX features such as:"),By.forEach(t),Fv=u(Bt),Yt=a(Bt,"UL",{});var Wn=i(Yt);cc=a(Wn,"LI",{});var Ey=i(cc);Wa=a(Ey,"A",{href:!0,rel:!0});var xy=i(Wa);Bv=s(xy,"Just-In-Time (JIT) compilation"),xy.forEach(t),Ey.forEach(t),Ev=u(Wn),pc=a(Wn,"LI",{});var My=i(pc);Qa=a(My,"A",{href:!0,rel:!0});var jy=i(Qa);xv=s(jy,"Automatic Differentiation"),jy.forEach(t),My.forEach(t),Mv=u(Wn),hc=a(Wn,"LI",{});var zy=i(hc);Ra=a(zy,"A",{href:!0,rel:!0});var Cy=i(Ra);jv=s(Cy,"Vectorization"),Cy.forEach(t),zy.forEach(t),zv=u(Wn),uc=a(Wn,"LI",{});var Py=i(uc);Ua=a(Py,"A",{href:!0,rel:!0});var qy=i(Ua);Cv=s(qy,"Parallelization"),qy.forEach(t),Py.forEach(t),Wn.forEach(t),Pv=u(Bt),It=a(Bt,"DIV",{class:!0});var Qn=i(It);T(Ka.$$.fragment,Qn),qv=u(Qn),ts=a(Qn,"P",{});var Wl=i(ts);Av=s(Wl,"The "),fc=a(Wl,"CODE",{});var Ay=i(fc);Ov=s(Ay,"FlaxDistilBertPreTrainedModel"),Ay.forEach(t),Nv=s(Wl," forward method, overrides the "),mc=a(Wl,"CODE",{});var Oy=i(mc);Iv=s(Oy,"__call__"),Oy.forEach(t),Lv=s(Wl," special method."),Wl.forEach(t),Sv=u(Qn),T(vn.$$.fragment,Qn),Wv=u(Qn),T(wn.$$.fragment,Qn),Qn.forEach(t),Bt.forEach(t),kh=u(n),os=a(n,"H2",{class:!0});var wu=i(os);Tn=a(wu,"A",{id:!0,class:!0,href:!0});var Ny=i(Tn);gc=a(Ny,"SPAN",{});var Iy=i(gc);T(Ha.$$.fragment,Iy),Iy.forEach(t),Ny.forEach(t),Qv=u(wu),_c=a(wu,"SPAN",{});var Ly=i(_c);Rv=s(Ly,"FlaxDistilBertForSequenceClassification"),Ly.forEach(t),wu.forEach(t),vh=u(n),tt=a(n,"DIV",{class:!0});var Et=i(tt);T(Va.$$.fragment,Et),Uv=u(Et),bc=a(Et,"P",{});var Sy=i(bc);Kv=s(Sy,`DistilBert 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),Hv=u(Et),Ja=a(Et,"P",{});var Tu=i(Ja);Vv=s(Tu,"This model inherits from "),$l=a(Tu,"A",{href:!0});var Wy=i($l);Jv=s(Wy,"FlaxPreTrainedModel"),Wy.forEach(t),Gv=s(Tu,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading, saving and converting weights from PyTorch models)`),Tu.forEach(t),Xv=u(Et),Ga=a(Et,"P",{});var $u=i(Ga);Yv=s($u,"This model is also a Flax Linen "),Xa=a($u,"A",{href:!0,rel:!0});var Qy=i(Xa);Zv=s(Qy,"flax.linen.Module"),Qy.forEach(t),ew=s($u,`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),$u.forEach(t),tw=u(Et),kc=a(Et,"P",{});var Ry=i(kc);ow=s(Ry,"Finally, this model supports inherent JAX features such as:"),Ry.forEach(t),sw=u(Et),Zt=a(Et,"UL",{});var Rn=i(Zt);vc=a(Rn,"LI",{});var Uy=i(vc);Ya=a(Uy,"A",{href:!0,rel:!0});var Ky=i(Ya);nw=s(Ky,"Just-In-Time (JIT) compilation"),Ky.forEach(t),Uy.forEach(t),rw=u(Rn),wc=a(Rn,"LI",{});var Hy=i(wc);Za=a(Hy,"A",{href:!0,rel:!0});var Vy=i(Za);aw=s(Vy,"Automatic Differentiation"),Vy.forEach(t),Hy.forEach(t),iw=u(Rn),Tc=a(Rn,"LI",{});var Jy=i(Tc);ei=a(Jy,"A",{href:!0,rel:!0});var Gy=i(ei);lw=s(Gy,"Vectorization"),Gy.forEach(t),Jy.forEach(t),dw=u(Rn),$c=a(Rn,"LI",{});var Xy=i($c);ti=a(Xy,"A",{href:!0,rel:!0});var Yy=i(ti);cw=s(Yy,"Parallelization"),Yy.forEach(t),Xy.forEach(t),Rn.forEach(t),pw=u(Et),Lt=a(Et,"DIV",{class:!0});var Un=i(Lt);T(oi.$$.fragment,Un),hw=u(Un),ss=a(Un,"P",{});var Ql=i(ss);uw=s(Ql,"The "),yc=a(Ql,"CODE",{});var Zy=i(yc);fw=s(Zy,"FlaxDistilBertPreTrainedModel"),Zy.forEach(t),mw=s(Ql," forward method, overrides the "),Dc=a(Ql,"CODE",{});var e0=i(Dc);gw=s(e0,"__call__"),e0.forEach(t),_w=s(Ql," special method."),Ql.forEach(t),bw=u(Un),T($n.$$.fragment,Un),kw=u(Un),T(yn.$$.fragment,Un),Un.forEach(t),Et.forEach(t),wh=u(n),ns=a(n,"H2",{class:!0});var yu=i(ns);Dn=a(yu,"A",{id:!0,class:!0,href:!0});var t0=i(Dn);Fc=a(t0,"SPAN",{});var o0=i(Fc);T(si.$$.fragment,o0),o0.forEach(t),t0.forEach(t),vw=u(yu),Bc=a(yu,"SPAN",{});var s0=i(Bc);ww=s(s0,"FlaxDistilBertForMultipleChoice"),s0.forEach(t),yu.forEach(t),Th=u(n),ot=a(n,"DIV",{class:!0});var xt=i(ot);T(ni.$$.fragment,xt),Tw=u(xt),Ec=a(xt,"P",{});var n0=i(Ec);$w=s(n0,`DistilBert 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.`),n0.forEach(t),yw=u(xt),ri=a(xt,"P",{});var Du=i(ri);Dw=s(Du,"This model inherits from "),yl=a(Du,"A",{href:!0});var r0=i(yl);Fw=s(r0,"FlaxPreTrainedModel"),r0.forEach(t),Bw=s(Du,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading, saving and converting weights from PyTorch models)`),Du.forEach(t),Ew=u(xt),ai=a(xt,"P",{});var Fu=i(ai);xw=s(Fu,"This model is also a Flax Linen "),ii=a(Fu,"A",{href:!0,rel:!0});var a0=i(ii);Mw=s(a0,"flax.linen.Module"),a0.forEach(t),jw=s(Fu,`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),Fu.forEach(t),zw=u(xt),xc=a(xt,"P",{});var i0=i(xc);Cw=s(i0,"Finally, this model supports inherent JAX features such as:"),i0.forEach(t),Pw=u(xt),eo=a(xt,"UL",{});var Kn=i(eo);Mc=a(Kn,"LI",{});var l0=i(Mc);li=a(l0,"A",{href:!0,rel:!0});var d0=i(li);qw=s(d0,"Just-In-Time (JIT) compilation"),d0.forEach(t),l0.forEach(t),Aw=u(Kn),jc=a(Kn,"LI",{});var c0=i(jc);di=a(c0,"A",{href:!0,rel:!0});var p0=i(di);Ow=s(p0,"Automatic Differentiation"),p0.forEach(t),c0.forEach(t),Nw=u(Kn),zc=a(Kn,"LI",{});var h0=i(zc);ci=a(h0,"A",{href:!0,rel:!0});var u0=i(ci);Iw=s(u0,"Vectorization"),u0.forEach(t),h0.forEach(t),Lw=u(Kn),Cc=a(Kn,"LI",{});var f0=i(Cc);pi=a(f0,"A",{href:!0,rel:!0});var m0=i(pi);Sw=s(m0,"Parallelization"),m0.forEach(t),f0.forEach(t),Kn.forEach(t),Ww=u(xt),St=a(xt,"DIV",{class:!0});var Hn=i(St);T(hi.$$.fragment,Hn),Qw=u(Hn),rs=a(Hn,"P",{});var Rl=i(rs);Rw=s(Rl,"The "),Pc=a(Rl,"CODE",{});var g0=i(Pc);Uw=s(g0,"FlaxDistilBertPreTrainedModel"),g0.forEach(t),Kw=s(Rl," forward method, overrides the "),qc=a(Rl,"CODE",{});var _0=i(qc);Hw=s(_0,"__call__"),_0.forEach(t),Vw=s(Rl," special method."),Rl.forEach(t),Jw=u(Hn),T(Fn.$$.fragment,Hn),Gw=u(Hn),T(Bn.$$.fragment,Hn),Hn.forEach(t),xt.forEach(t),$h=u(n),as=a(n,"H2",{class:!0});var Bu=i(as);En=a(Bu,"A",{id:!0,class:!0,href:!0});var b0=i(En);Ac=a(b0,"SPAN",{});var k0=i(Ac);T(ui.$$.fragment,k0),k0.forEach(t),b0.forEach(t),Xw=u(Bu),Oc=a(Bu,"SPAN",{});var v0=i(Oc);Yw=s(v0,"FlaxDistilBertForTokenClassification"),v0.forEach(t),Bu.forEach(t),yh=u(n),st=a(n,"DIV",{class:!0});var Mt=i(st);T(fi.$$.fragment,Mt),Zw=u(Mt),Nc=a(Mt,"P",{});var w0=i(Nc);eT=s(w0,`DistilBert 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.`),w0.forEach(t),tT=u(Mt),mi=a(Mt,"P",{});var Eu=i(mi);oT=s(Eu,"This model inherits from "),Dl=a(Eu,"A",{href:!0});var T0=i(Dl);sT=s(T0,"FlaxPreTrainedModel"),T0.forEach(t),nT=s(Eu,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading, saving and converting weights from PyTorch models)`),Eu.forEach(t),rT=u(Mt),gi=a(Mt,"P",{});var xu=i(gi);aT=s(xu,"This model is also a Flax Linen "),_i=a(xu,"A",{href:!0,rel:!0});var $0=i(_i);iT=s($0,"flax.linen.Module"),$0.forEach(t),lT=s(xu,`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),xu.forEach(t),dT=u(Mt),Ic=a(Mt,"P",{});var y0=i(Ic);cT=s(y0,"Finally, this model supports inherent JAX features such as:"),y0.forEach(t),pT=u(Mt),to=a(Mt,"UL",{});var Vn=i(to);Lc=a(Vn,"LI",{});var D0=i(Lc);bi=a(D0,"A",{href:!0,rel:!0});var F0=i(bi);hT=s(F0,"Just-In-Time (JIT) compilation"),F0.forEach(t),D0.forEach(t),uT=u(Vn),Sc=a(Vn,"LI",{});var B0=i(Sc);ki=a(B0,"A",{href:!0,rel:!0});var E0=i(ki);fT=s(E0,"Automatic Differentiation"),E0.forEach(t),B0.forEach(t),mT=u(Vn),Wc=a(Vn,"LI",{});var x0=i(Wc);vi=a(x0,"A",{href:!0,rel:!0});var M0=i(vi);gT=s(M0,"Vectorization"),M0.forEach(t),x0.forEach(t),_T=u(Vn),Qc=a(Vn,"LI",{});var j0=i(Qc);wi=a(j0,"A",{href:!0,rel:!0});var z0=i(wi);bT=s(z0,"Parallelization"),z0.forEach(t),j0.forEach(t),Vn.forEach(t),kT=u(Mt),Wt=a(Mt,"DIV",{class:!0});var Jn=i(Wt);T(Ti.$$.fragment,Jn),vT=u(Jn),is=a(Jn,"P",{});var Ul=i(is);wT=s(Ul,"The "),Rc=a(Ul,"CODE",{});var C0=i(Rc);TT=s(C0,"FlaxDistilBertPreTrainedModel"),C0.forEach(t),$T=s(Ul," forward method, overrides the "),Uc=a(Ul,"CODE",{});var P0=i(Uc);yT=s(P0,"__call__"),P0.forEach(t),DT=s(Ul," special method."),Ul.forEach(t),FT=u(Jn),T(xn.$$.fragment,Jn),BT=u(Jn),T(Mn.$$.fragment,Jn),Jn.forEach(t),Mt.forEach(t),Dh=u(n),ls=a(n,"H2",{class:!0});var Mu=i(ls);jn=a(Mu,"A",{id:!0,class:!0,href:!0});var q0=i(jn);Kc=a(q0,"SPAN",{});var A0=i(Kc);T($i.$$.fragment,A0),A0.forEach(t),q0.forEach(t),ET=u(Mu),Hc=a(Mu,"SPAN",{});var O0=i(Hc);xT=s(O0,"FlaxDistilBertForQuestionAnswering"),O0.forEach(t),Mu.forEach(t),Fh=u(n),nt=a(n,"DIV",{class:!0});var jt=i(nt);T(yi.$$.fragment,jt),MT=u(jt),ds=a(jt,"P",{});var Kl=i(ds);jT=s(Kl,`DistilBert Model with a span classification head on top for extractive question-answering tasks like SQuAD (a
linear layers on top of the hidden-states output to compute `),Vc=a(Kl,"CODE",{});var N0=i(Vc);zT=s(N0,"span start logits"),N0.forEach(t),CT=s(Kl," and "),Jc=a(Kl,"CODE",{});var I0=i(Jc);PT=s(I0,"span end logits"),I0.forEach(t),qT=s(Kl,")."),Kl.forEach(t),AT=u(jt),Di=a(jt,"P",{});var ju=i(Di);OT=s(ju,"This model inherits from "),Fl=a(ju,"A",{href:!0});var L0=i(Fl);NT=s(L0,"FlaxPreTrainedModel"),L0.forEach(t),IT=s(ju,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading, saving and converting weights from PyTorch models)`),ju.forEach(t),LT=u(jt),Fi=a(jt,"P",{});var zu=i(Fi);ST=s(zu,"This model is also a Flax Linen "),Bi=a(zu,"A",{href:!0,rel:!0});var S0=i(Bi);WT=s(S0,"flax.linen.Module"),S0.forEach(t),QT=s(zu,`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),zu.forEach(t),RT=u(jt),Gc=a(jt,"P",{});var W0=i(Gc);UT=s(W0,"Finally, this model supports inherent JAX features such as:"),W0.forEach(t),KT=u(jt),oo=a(jt,"UL",{});var Gn=i(oo);Xc=a(Gn,"LI",{});var Q0=i(Xc);Ei=a(Q0,"A",{href:!0,rel:!0});var R0=i(Ei);HT=s(R0,"Just-In-Time (JIT) compilation"),R0.forEach(t),Q0.forEach(t),VT=u(Gn),Yc=a(Gn,"LI",{});var U0=i(Yc);xi=a(U0,"A",{href:!0,rel:!0});var K0=i(xi);JT=s(K0,"Automatic Differentiation"),K0.forEach(t),U0.forEach(t),GT=u(Gn),Zc=a(Gn,"LI",{});var H0=i(Zc);Mi=a(H0,"A",{href:!0,rel:!0});var V0=i(Mi);XT=s(V0,"Vectorization"),V0.forEach(t),H0.forEach(t),YT=u(Gn),ep=a(Gn,"LI",{});var J0=i(ep);ji=a(J0,"A",{href:!0,rel:!0});var G0=i(ji);ZT=s(G0,"Parallelization"),G0.forEach(t),J0.forEach(t),Gn.forEach(t),e$=u(jt),Qt=a(jt,"DIV",{class:!0});var Xn=i(Qt);T(zi.$$.fragment,Xn),t$=u(Xn),cs=a(Xn,"P",{});var Hl=i(cs);o$=s(Hl,"The "),tp=a(Hl,"CODE",{});var X0=i(tp);s$=s(X0,"FlaxDistilBertPreTrainedModel"),X0.forEach(t),n$=s(Hl," forward method, overrides the "),op=a(Hl,"CODE",{});var Y0=i(op);r$=s(Y0,"__call__"),Y0.forEach(t),a$=s(Hl," special method."),Hl.forEach(t),i$=u(Xn),T(zn.$$.fragment,Xn),l$=u(Xn),T(Cn.$$.fragment,Xn),Xn.forEach(t),jt.forEach(t),this.h()},h(){m(d,"name","hf:doc:metadata"),m(d,"content",JSON.stringify(nD)),m(f,"id","distilbert"),m(f,"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"),m(f,"href","#distilbert"),m(c,"class","relative group"),m(re,"id","overview"),m(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"),m(re,"href","#overview"),m(I,"class","relative group"),m(ae,"href","https://medium.com/huggingface/distilbert-8cf3380435b5"),m(ae,"rel","nofollow"),m(ie,"href","https://arxiv.org/abs/1910.01108"),m(ie,"rel","nofollow"),m(ee,"href","https://huggingface.co/victorsanh"),m(ee,"rel","nofollow"),m(j,"href","https://huggingface.co/kamalkraj"),m(j,"rel","nofollow"),m(Ne,"href","https://github.com/huggingface/transformers/tree/main/examples/research_projects/distillation"),m(Ne,"rel","nofollow"),m(Oe,"id","transformers.DistilBertConfig"),m(Oe,"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"),m(Oe,"href","#transformers.DistilBertConfig"),m(S,"class","relative group"),m(Si,"href","/docs/transformers/pr_19907/en/model_doc/distilbert#transformers.DistilBertModel"),m(Wi,"href","/docs/transformers/pr_19907/en/model_doc/distilbert#transformers.TFDistilBertModel"),m(Yn,"href","https://huggingface.co/distilbert-base-uncased"),m(Yn,"rel","nofollow"),m(Qi,"href","/docs/transformers/pr_19907/en/main_classes/configuration#transformers.PretrainedConfig"),m(Ri,"href","/docs/transformers/pr_19907/en/main_classes/configuration#transformers.PretrainedConfig"),m(Q,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(us,"id","transformers.DistilBertTokenizer"),m(us,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),m(us,"href","#transformers.DistilBertTokenizer"),m(yo,"class","relative group"),m(Ui,"href","/docs/transformers/pr_19907/en/model_doc/distilbert#transformers.DistilBertTokenizer"),m(Ki,"href","/docs/transformers/pr_19907/en/model_doc/bert#transformers.BertTokenizer"),m(Hi,"href","/docs/transformers/pr_19907/en/model_doc/bert#transformers.BertTokenizer"),m(zt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(ms,"id","transformers.DistilBertTokenizerFast"),m(ms,"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"),m(ms,"href","#transformers.DistilBertTokenizerFast"),m(Do,"class","relative group"),m(Vi,"href","/docs/transformers/pr_19907/en/model_doc/distilbert#transformers.DistilBertTokenizerFast"),m(Ji,"href","/docs/transformers/pr_19907/en/model_doc/bert#transformers.BertTokenizerFast"),m(Gi,"href","/docs/transformers/pr_19907/en/model_doc/bert#transformers.BertTokenizerFast"),m(Ct,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(_s,"id","transformers.DistilBertModel"),m(_s,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),m(_s,"href","#transformers.DistilBertModel"),m(Fo,"class","relative group"),m(Xi,"href","/docs/transformers/pr_19907/en/main_classes/model#transformers.PreTrainedModel"),m(cr,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),m(cr,"rel","nofollow"),m(Yi,"href","/docs/transformers/pr_19907/en/model_doc/distilbert#transformers.DistilBertModel"),m(Pt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(ht,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(vs,"id","transformers.DistilBertForMaskedLM"),m(vs,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),m(vs,"href","#transformers.DistilBertForMaskedLM"),m(Eo,"class","relative group"),m(Zi,"href","/docs/transformers/pr_19907/en/main_classes/model#transformers.PreTrainedModel"),m(_r,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),m(_r,"rel","nofollow"),m(el,"href","/docs/transformers/pr_19907/en/model_doc/distilbert#transformers.DistilBertForMaskedLM"),m(bt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(ut,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(ys,"id","transformers.DistilBertForSequenceClassification"),m(ys,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),m(ys,"href","#transformers.DistilBertForSequenceClassification"),m(Mo,"class","relative group"),m(tl,"href","/docs/transformers/pr_19907/en/main_classes/model#transformers.PreTrainedModel"),m($r,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),m($r,"rel","nofollow"),m(ol,"href","/docs/transformers/pr_19907/en/model_doc/distilbert#transformers.DistilBertForSequenceClassification"),m(rt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(ft,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(Ms,"id","transformers.DistilBertForMultipleChoice"),m(Ms,"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"),m(Ms,"href","#transformers.DistilBertForMultipleChoice"),m(zo,"class","relative group"),m(sl,"href","/docs/transformers/pr_19907/en/main_classes/model#transformers.PreTrainedModel"),m(xr,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),m(xr,"rel","nofollow"),m(nl,"href","/docs/transformers/pr_19907/en/model_doc/distilbert#transformers.DistilBertForMultipleChoice"),m(qt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(mt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(Cs,"id","transformers.DistilBertForTokenClassification"),m(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"),m(Cs,"href","#transformers.DistilBertForTokenClassification"),m(Po,"class","relative group"),m(rl,"href","/docs/transformers/pr_19907/en/main_classes/model#transformers.PreTrainedModel"),m(qr,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),m(qr,"rel","nofollow"),m(al,"href","/docs/transformers/pr_19907/en/model_doc/distilbert#transformers.DistilBertForTokenClassification"),m(kt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(gt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(Os,"id","transformers.DistilBertForQuestionAnswering"),m(Os,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),m(Os,"href","#transformers.DistilBertForQuestionAnswering"),m(Ao,"class","relative group"),m(il,"href","/docs/transformers/pr_19907/en/main_classes/model#transformers.PreTrainedModel"),m(Sr,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),m(Sr,"rel","nofollow"),m(ll,"href","/docs/transformers/pr_19907/en/model_doc/distilbert#transformers.DistilBertForQuestionAnswering"),m(vt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(_t,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(Ss,"id","transformers.TFDistilBertModel"),m(Ss,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),m(Ss,"href","#transformers.TFDistilBertModel"),m(Io,"class","relative group"),m(dl,"href","/docs/transformers/pr_19907/en/main_classes/model#transformers.TFPreTrainedModel"),m(Hr,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),m(Hr,"rel","nofollow"),m(cl,"href","/docs/transformers/pr_19907/en/model_doc/distilbert#transformers.TFDistilBertModel"),m(At,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(at,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(Us,"id","transformers.TFDistilBertForMaskedLM"),m(Us,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),m(Us,"href","#transformers.TFDistilBertForMaskedLM"),m(So,"class","relative group"),m(pl,"href","/docs/transformers/pr_19907/en/main_classes/model#transformers.TFPreTrainedModel"),m(ea,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),m(ea,"rel","nofollow"),m(hl,"href","/docs/transformers/pr_19907/en/model_doc/distilbert#transformers.TFDistilBertForMaskedLM"),m(wt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(it,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(Gs,"id","transformers.TFDistilBertForSequenceClassification"),m(Gs,"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"),m(Gs,"href","#transformers.TFDistilBertForSequenceClassification"),m(Qo,"class","relative group"),m(ul,"href","/docs/transformers/pr_19907/en/main_classes/model#transformers.TFPreTrainedModel"),m(aa,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),m(aa,"rel","nofollow"),m(fl,"href","/docs/transformers/pr_19907/en/model_doc/distilbert#transformers.TFDistilBertForSequenceClassification"),m(Tt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(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(tn,"id","transformers.TFDistilBertForMultipleChoice"),m(tn,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),m(tn,"href","#transformers.TFDistilBertForMultipleChoice"),m(Uo,"class","relative group"),m(ml,"href","/docs/transformers/pr_19907/en/main_classes/model#transformers.TFPreTrainedModel"),m(ha,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),m(ha,"rel","nofollow"),m(gl,"href","/docs/transformers/pr_19907/en/model_doc/distilbert#transformers.TFDistilBertForMultipleChoice"),m(Ot,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(dt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(rn,"id","transformers.TFDistilBertForTokenClassification"),m(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"),m(rn,"href","#transformers.TFDistilBertForTokenClassification"),m(Ho,"class","relative group"),m(_l,"href","/docs/transformers/pr_19907/en/main_classes/model#transformers.TFPreTrainedModel"),m(ba,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),m(ba,"rel","nofollow"),m(bl,"href","/docs/transformers/pr_19907/en/model_doc/distilbert#transformers.TFDistilBertForTokenClassification"),m($t,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(ct,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(pn,"id","transformers.TFDistilBertForQuestionAnswering"),m(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"),m(pn,"href","#transformers.TFDistilBertForQuestionAnswering"),m(Jo,"class","relative group"),m(kl,"href","/docs/transformers/pr_19907/en/main_classes/model#transformers.TFPreTrainedModel"),m(ya,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),m(ya,"rel","nofollow"),m(vl,"href","/docs/transformers/pr_19907/en/model_doc/distilbert#transformers.TFDistilBertForQuestionAnswering"),m(yt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(pt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(gn,"id","transformers.FlaxDistilBertModel"),m(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"),m(gn,"href","#transformers.FlaxDistilBertModel"),m(Yo,"class","relative group"),m(wl,"href","/docs/transformers/pr_19907/en/main_classes/model#transformers.FlaxPreTrainedModel"),m(Ma,"href","https://flax.readthedocs.io/en/latest/flax.linen.html#module"),m(Ma,"rel","nofollow"),m(ja,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),m(ja,"rel","nofollow"),m(za,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),m(za,"rel","nofollow"),m(Ca,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),m(Ca,"rel","nofollow"),m(Pa,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),m(Pa,"rel","nofollow"),m(Nt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(Ze,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(kn,"id","transformers.FlaxDistilBertForMaskedLM"),m(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"),m(kn,"href","#transformers.FlaxDistilBertForMaskedLM"),m(es,"class","relative group"),m(Tl,"href","/docs/transformers/pr_19907/en/main_classes/model#transformers.FlaxPreTrainedModel"),m(Sa,"href","https://flax.readthedocs.io/en/latest/flax.linen.html#module"),m(Sa,"rel","nofollow"),m(Wa,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),m(Wa,"rel","nofollow"),m(Qa,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),m(Qa,"rel","nofollow"),m(Ra,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),m(Ra,"rel","nofollow"),m(Ua,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),m(Ua,"rel","nofollow"),m(It,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(et,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(Tn,"id","transformers.FlaxDistilBertForSequenceClassification"),m(Tn,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),m(Tn,"href","#transformers.FlaxDistilBertForSequenceClassification"),m(os,"class","relative group"),m($l,"href","/docs/transformers/pr_19907/en/main_classes/model#transformers.FlaxPreTrainedModel"),m(Xa,"href","https://flax.readthedocs.io/en/latest/flax.linen.html#module"),m(Xa,"rel","nofollow"),m(Ya,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),m(Ya,"rel","nofollow"),m(Za,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),m(Za,"rel","nofollow"),m(ei,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),m(ei,"rel","nofollow"),m(ti,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),m(ti,"rel","nofollow"),m(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(tt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(Dn,"id","transformers.FlaxDistilBertForMultipleChoice"),m(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"),m(Dn,"href","#transformers.FlaxDistilBertForMultipleChoice"),m(ns,"class","relative group"),m(yl,"href","/docs/transformers/pr_19907/en/main_classes/model#transformers.FlaxPreTrainedModel"),m(ii,"href","https://flax.readthedocs.io/en/latest/flax.linen.html#module"),m(ii,"rel","nofollow"),m(li,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),m(li,"rel","nofollow"),m(di,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),m(di,"rel","nofollow"),m(ci,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),m(ci,"rel","nofollow"),m(pi,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),m(pi,"rel","nofollow"),m(St,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(ot,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(En,"id","transformers.FlaxDistilBertForTokenClassification"),m(En,"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"),m(En,"href","#transformers.FlaxDistilBertForTokenClassification"),m(as,"class","relative group"),m(Dl,"href","/docs/transformers/pr_19907/en/main_classes/model#transformers.FlaxPreTrainedModel"),m(_i,"href","https://flax.readthedocs.io/en/latest/flax.linen.html#module"),m(_i,"rel","nofollow"),m(bi,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),m(bi,"rel","nofollow"),m(ki,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),m(ki,"rel","nofollow"),m(vi,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),m(vi,"rel","nofollow"),m(wi,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),m(wi,"rel","nofollow"),m(Wt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(st,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(jn,"id","transformers.FlaxDistilBertForQuestionAnswering"),m(jn,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),m(jn,"href","#transformers.FlaxDistilBertForQuestionAnswering"),m(ls,"class","relative group"),m(Fl,"href","/docs/transformers/pr_19907/en/main_classes/model#transformers.FlaxPreTrainedModel"),m(Bi,"href","https://flax.readthedocs.io/en/latest/flax.linen.html#module"),m(Bi,"rel","nofollow"),m(Ei,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),m(Ei,"rel","nofollow"),m(xi,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),m(xi,"rel","nofollow"),m(Mi,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),m(Mi,"rel","nofollow"),m(ji,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),m(ji,"rel","nofollow"),m(Qt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(nt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(n,b){e(document.head,d),_(n,g,b),_(n,c,b),e(c,f),e(f,k),$(l,k,null),e(c,p),e(c,M),e(M,we),_(n,ge,b),_(n,I,b),e(I,re),e(re,oe),$(B,oe,null),e(I,Te),e(I,U),e(U,$e),_(n,_e,b),_(n,O,b),e(O,ye),e(O,ae),e(ae,H),e(O,De),e(O,ie),e(ie,V),e(O,Fe),e(O,de),e(de,J),e(O,Be),_(n,be,b),_(n,te,b),e(te,z),_(n,q,b),_(n,le,b),e(le,K),e(K,Ee),_(n,ke,b),_(n,R,b),e(R,xe),_(n,ve,b),_(n,C,b),e(C,se),e(se,G),e(se,ce),e(ce,Me),e(se,X),e(se,pe),e(pe,je),e(se,L),e(se,he),e(he,Y),e(se,ze),e(C,ne),e(C,P),e(P,Ce),e(P,A),e(A,Pe),e(P,qe),_(n,v,b),_(n,x,b),e(x,Ue),e(x,ee),e(ee,Ke),e(x,He),e(x,j),e(j,Ve),e(x,Je),e(x,Ne),e(Ne,Ge),e(x,Xe),_(n,N,b),_(n,S,b),e(S,Oe),e(Oe,Se),$(W,Se,null),e(S,Ye),e(S,We),e(We,Ae),_(n,Re,b),_(n,Q,b),$(Ie,Q,null),e(Q,Cu),e(Q,Gt),e(Gt,Pu),e(Gt,Si),e(Si,qu),e(Gt,Au),e(Gt,Wi),e(Wi,Ou),e(Gt,Nu),e(Gt,Yn),e(Yn,Iu),e(Gt,Lu),e(Q,Su),e(Q,$o),e($o,Wu),e($o,Qi),e(Qi,Qu),e($o,Ru),e($o,Ri),e(Ri,Uu),e($o,Ku),e(Q,Hu),$(hs,Q,null),_(n,Sp,b),_(n,yo,b),e(yo,us),e(us,Vl),$(Zn,Vl,null),e(yo,Vu),e(yo,Jl),e(Jl,Ju),_(n,Wp,b),_(n,zt,b),$(er,zt,null),e(zt,Gu),e(zt,Gl),e(Gl,Xu),e(zt,Yu),e(zt,fs),e(fs,Ui),e(Ui,Zu),e(fs,ef),e(fs,Ki),e(Ki,tf),e(fs,of),e(zt,sf),e(zt,tr),e(tr,nf),e(tr,Hi),e(Hi,rf),e(tr,af),_(n,Qp,b),_(n,Do,b),e(Do,ms),e(ms,Xl),$(or,Xl,null),e(Do,lf),e(Do,Yl),e(Yl,df),_(n,Rp,b),_(n,Ct,b),$(sr,Ct,null),e(Ct,cf),e(Ct,nr),e(nr,pf),e(nr,Zl),e(Zl,hf),e(nr,uf),e(Ct,ff),e(Ct,gs),e(gs,Vi),e(Vi,mf),e(gs,gf),e(gs,Ji),e(Ji,_f),e(gs,bf),e(Ct,kf),e(Ct,rr),e(rr,vf),e(rr,Gi),e(Gi,wf),e(rr,Tf),_(n,Up,b),_(n,Fo,b),e(Fo,_s),e(_s,ed),$(ar,ed,null),e(Fo,$f),e(Fo,td),e(td,yf),_(n,Kp,b),_(n,ht,b),$(ir,ht,null),e(ht,Df),e(ht,od),e(od,Ff),e(ht,Bf),e(ht,lr),e(lr,Ef),e(lr,Xi),e(Xi,xf),e(lr,Mf),e(ht,jf),e(ht,dr),e(dr,zf),e(dr,cr),e(cr,Cf),e(dr,Pf),e(ht,qf),e(ht,Pt),$(pr,Pt,null),e(Pt,Af),e(Pt,Bo),e(Bo,Of),e(Bo,Yi),e(Yi,Nf),e(Bo,If),e(Bo,sd),e(sd,Lf),e(Bo,Sf),e(Pt,Wf),$(bs,Pt,null),e(Pt,Qf),$(ks,Pt,null),_(n,Hp,b),_(n,Eo,b),e(Eo,vs),e(vs,nd),$(hr,nd,null),e(Eo,Rf),e(Eo,rd),e(rd,Uf),_(n,Vp,b),_(n,ut,b),$(ur,ut,null),e(ut,Kf),e(ut,fr),e(fr,Hf),e(fr,ad),e(ad,Vf),e(fr,Jf),e(ut,Gf),e(ut,mr),e(mr,Xf),e(mr,Zi),e(Zi,Yf),e(mr,Zf),e(ut,em),e(ut,gr),e(gr,tm),e(gr,_r),e(_r,om),e(gr,sm),e(ut,nm),e(ut,bt),$(br,bt,null),e(bt,rm),e(bt,xo),e(xo,am),e(xo,el),e(el,im),e(xo,lm),e(xo,id),e(id,dm),e(xo,cm),e(bt,pm),$(ws,bt,null),e(bt,hm),$(Ts,bt,null),e(bt,um),$($s,bt,null),_(n,Jp,b),_(n,Mo,b),e(Mo,ys),e(ys,ld),$(kr,ld,null),e(Mo,fm),e(Mo,dd),e(dd,mm),_(n,Gp,b),_(n,ft,b),$(vr,ft,null),e(ft,gm),e(ft,cd),e(cd,_m),e(ft,bm),e(ft,wr),e(wr,km),e(wr,tl),e(tl,vm),e(wr,wm),e(ft,Tm),e(ft,Tr),e(Tr,$m),e(Tr,$r),e($r,ym),e(Tr,Dm),e(ft,Fm),e(ft,rt),$(yr,rt,null),e(rt,Bm),e(rt,jo),e(jo,Em),e(jo,ol),e(ol,xm),e(jo,Mm),e(jo,pd),e(pd,jm),e(jo,zm),e(rt,Cm),$(Ds,rt,null),e(rt,Pm),$(Fs,rt,null),e(rt,qm),$(Bs,rt,null),e(rt,Am),$(Es,rt,null),e(rt,Om),$(xs,rt,null),_(n,Xp,b),_(n,zo,b),e(zo,Ms),e(Ms,hd),$(Dr,hd,null),e(zo,Nm),e(zo,ud),e(ud,Im),_(n,Yp,b),_(n,mt,b),$(Fr,mt,null),e(mt,Lm),e(mt,fd),e(fd,Sm),e(mt,Wm),e(mt,Br),e(Br,Qm),e(Br,sl),e(sl,Rm),e(Br,Um),e(mt,Km),e(mt,Er),e(Er,Hm),e(Er,xr),e(xr,Vm),e(Er,Jm),e(mt,Gm),e(mt,qt),$(Mr,qt,null),e(qt,Xm),e(qt,Co),e(Co,Ym),e(Co,nl),e(nl,Zm),e(Co,eg),e(Co,md),e(md,tg),e(Co,og),e(qt,sg),$(js,qt,null),e(qt,ng),$(zs,qt,null),_(n,Zp,b),_(n,Po,b),e(Po,Cs),e(Cs,gd),$(jr,gd,null),e(Po,rg),e(Po,_d),e(_d,ag),_(n,eh,b),_(n,gt,b),$(zr,gt,null),e(gt,ig),e(gt,bd),e(bd,lg),e(gt,dg),e(gt,Cr),e(Cr,cg),e(Cr,rl),e(rl,pg),e(Cr,hg),e(gt,ug),e(gt,Pr),e(Pr,fg),e(Pr,qr),e(qr,mg),e(Pr,gg),e(gt,_g),e(gt,kt),$(Ar,kt,null),e(kt,bg),e(kt,qo),e(qo,kg),e(qo,al),e(al,vg),e(qo,wg),e(qo,kd),e(kd,Tg),e(qo,$g),e(kt,yg),$(Ps,kt,null),e(kt,Dg),$(qs,kt,null),e(kt,Fg),$(As,kt,null),_(n,th,b),_(n,Ao,b),e(Ao,Os),e(Os,vd),$(Or,vd,null),e(Ao,Bg),e(Ao,wd),e(wd,Eg),_(n,oh,b),_(n,_t,b),$(Nr,_t,null),e(_t,xg),e(_t,Oo),e(Oo,Mg),e(Oo,Td),e(Td,jg),e(Oo,zg),e(Oo,$d),e($d,Cg),e(Oo,Pg),e(_t,qg),e(_t,Ir),e(Ir,Ag),e(Ir,il),e(il,Og),e(Ir,Ng),e(_t,Ig),e(_t,Lr),e(Lr,Lg),e(Lr,Sr),e(Sr,Sg),e(Lr,Wg),e(_t,Qg),e(_t,vt),$(Wr,vt,null),e(vt,Rg),e(vt,No),e(No,Ug),e(No,ll),e(ll,Kg),e(No,Hg),e(No,yd),e(yd,Vg),e(No,Jg),e(vt,Gg),$(Ns,vt,null),e(vt,Xg),$(Is,vt,null),e(vt,Yg),$(Ls,vt,null),_(n,sh,b),_(n,Io,b),e(Io,Ss),e(Ss,Dd),$(Qr,Dd,null),e(Io,Zg),e(Io,Fd),e(Fd,e_),_(n,nh,b),_(n,at,b),$(Rr,at,null),e(at,t_),e(at,Bd),e(Bd,o_),e(at,s_),e(at,Ur),e(Ur,n_),e(Ur,dl),e(dl,r_),e(Ur,a_),e(at,i_),e(at,Kr),e(Kr,l_),e(Kr,Hr),e(Hr,d_),e(Kr,c_),e(at,p_),$(Ws,at,null),e(at,h_),e(at,At),$(Vr,At,null),e(At,u_),e(At,Lo),e(Lo,f_),e(Lo,cl),e(cl,m_),e(Lo,g_),e(Lo,Ed),e(Ed,__),e(Lo,b_),e(At,k_),$(Qs,At,null),e(At,v_),$(Rs,At,null),_(n,rh,b),_(n,So,b),e(So,Us),e(Us,xd),$(Jr,xd,null),e(So,w_),e(So,Md),e(Md,T_),_(n,ah,b),_(n,it,b),$(Gr,it,null),e(it,$_),e(it,Xr),e(Xr,y_),e(Xr,jd),e(jd,D_),e(Xr,F_),e(it,B_),e(it,Yr),e(Yr,E_),e(Yr,pl),e(pl,x_),e(Yr,M_),e(it,j_),e(it,Zr),e(Zr,z_),e(Zr,ea),e(ea,C_),e(Zr,P_),e(it,q_),$(Ks,it,null),e(it,A_),e(it,wt),$(ta,wt,null),e(wt,O_),e(wt,Wo),e(Wo,N_),e(Wo,hl),e(hl,I_),e(Wo,L_),e(Wo,zd),e(zd,S_),e(Wo,W_),e(wt,Q_),$(Hs,wt,null),e(wt,R_),$(Vs,wt,null),e(wt,U_),$(Js,wt,null),_(n,ih,b),_(n,Qo,b),e(Qo,Gs),e(Gs,Cd),$(oa,Cd,null),e(Qo,K_),e(Qo,Pd),e(Pd,H_),_(n,lh,b),_(n,lt,b),$(sa,lt,null),e(lt,V_),e(lt,qd),e(qd,J_),e(lt,G_),e(lt,na),e(na,X_),e(na,ul),e(ul,Y_),e(na,Z_),e(lt,eb),e(lt,ra),e(ra,tb),e(ra,aa),e(aa,ob),e(ra,sb),e(lt,nb),$(Xs,lt,null),e(lt,rb),e(lt,Tt),$(ia,Tt,null),e(Tt,ab),e(Tt,Ro),e(Ro,ib),e(Ro,fl),e(fl,lb),e(Ro,db),e(Ro,Ad),e(Ad,cb),e(Ro,pb),e(Tt,hb),$(Ys,Tt,null),e(Tt,ub),$(Zs,Tt,null),e(Tt,fb),$(en,Tt,null),_(n,dh,b),_(n,Uo,b),e(Uo,tn),e(tn,Od),$(la,Od,null),e(Uo,mb),e(Uo,Nd),e(Nd,gb),_(n,ch,b),_(n,dt,b),$(da,dt,null),e(dt,_b),e(dt,Id),e(Id,bb),e(dt,kb),e(dt,ca),e(ca,vb),e(ca,ml),e(ml,wb),e(ca,Tb),e(dt,$b),e(dt,pa),e(pa,yb),e(pa,ha),e(ha,Db),e(pa,Fb),e(dt,Bb),$(on,dt,null),e(dt,Eb),e(dt,Ot),$(ua,Ot,null),e(Ot,xb),e(Ot,Ko),e(Ko,Mb),e(Ko,gl),e(gl,jb),e(Ko,zb),e(Ko,Ld),e(Ld,Cb),e(Ko,Pb),e(Ot,qb),$(sn,Ot,null),e(Ot,Ab),$(nn,Ot,null),_(n,ph,b),_(n,Ho,b),e(Ho,rn),e(rn,Sd),$(fa,Sd,null),e(Ho,Ob),e(Ho,Wd),e(Wd,Nb),_(n,hh,b),_(n,ct,b),$(ma,ct,null),e(ct,Ib),e(ct,Qd),e(Qd,Lb),e(ct,Sb),e(ct,ga),e(ga,Wb),e(ga,_l),e(_l,Qb),e(ga,Rb),e(ct,Ub),e(ct,_a),e(_a,Kb),e(_a,ba),e(ba,Hb),e(_a,Vb),e(ct,Jb),$(an,ct,null),e(ct,Gb),e(ct,$t),$(ka,$t,null),e($t,Xb),e($t,Vo),e(Vo,Yb),e(Vo,bl),e(bl,Zb),e(Vo,ek),e(Vo,Rd),e(Rd,tk),e(Vo,ok),e($t,sk),$(ln,$t,null),e($t,nk),$(dn,$t,null),e($t,rk),$(cn,$t,null),_(n,uh,b),_(n,Jo,b),e(Jo,pn),e(pn,Ud),$(va,Ud,null),e(Jo,ak),e(Jo,Kd),e(Kd,ik),_(n,fh,b),_(n,pt,b),$(wa,pt,null),e(pt,lk),e(pt,Go),e(Go,dk),e(Go,Hd),e(Hd,ck),e(Go,pk),e(Go,Vd),e(Vd,hk),e(Go,uk),e(pt,fk),e(pt,Ta),e(Ta,mk),e(Ta,kl),e(kl,gk),e(Ta,_k),e(pt,bk),e(pt,$a),e($a,kk),e($a,ya),e(ya,vk),e($a,wk),e(pt,Tk),$(hn,pt,null),e(pt,$k),e(pt,yt),$(Da,yt,null),e(yt,yk),e(yt,Xo),e(Xo,Dk),e(Xo,vl),e(vl,Fk),e(Xo,Bk),e(Xo,Jd),e(Jd,Ek),e(Xo,xk),e(yt,Mk),$(un,yt,null),e(yt,jk),$(fn,yt,null),e(yt,zk),$(mn,yt,null),_(n,mh,b),_(n,Yo,b),e(Yo,gn),e(gn,Gd),$(Fa,Gd,null),e(Yo,Ck),e(Yo,Xd),e(Xd,Pk),_(n,gh,b),_(n,Ze,b),$(Ba,Ze,null),e(Ze,qk),e(Ze,Yd),e(Yd,Ak),e(Ze,Ok),e(Ze,Ea),e(Ea,Nk),e(Ea,wl),e(wl,Ik),e(Ea,Lk),e(Ze,Sk),e(Ze,xa),e(xa,Wk),e(xa,Ma),e(Ma,Qk),e(xa,Rk),e(Ze,Uk),e(Ze,Zd),e(Zd,Kk),e(Ze,Hk),e(Ze,Xt),e(Xt,ec),e(ec,ja),e(ja,Vk),e(Xt,Jk),e(Xt,tc),e(tc,za),e(za,Gk),e(Xt,Xk),e(Xt,oc),e(oc,Ca),e(Ca,Yk),e(Xt,Zk),e(Xt,sc),e(sc,Pa),e(Pa,ev),e(Ze,tv),e(Ze,Nt),$(qa,Nt,null),e(Nt,ov),e(Nt,Zo),e(Zo,sv),e(Zo,nc),e(nc,nv),e(Zo,rv),e(Zo,rc),e(rc,av),e(Zo,iv),e(Nt,lv),$(_n,Nt,null),e(Nt,dv),$(bn,Nt,null),_(n,_h,b),_(n,es,b),e(es,kn),e(kn,ac),$(Aa,ac,null),e(es,cv),e(es,ic),e(ic,pv),_(n,bh,b),_(n,et,b),$(Oa,et,null),e(et,hv),e(et,Na),e(Na,uv),e(Na,lc),e(lc,fv),e(Na,mv),e(et,gv),e(et,Ia),e(Ia,_v),e(Ia,Tl),e(Tl,bv),e(Ia,kv),e(et,vv),e(et,La),e(La,wv),e(La,Sa),e(Sa,Tv),e(La,$v),e(et,yv),e(et,dc),e(dc,Dv),e(et,Fv),e(et,Yt),e(Yt,cc),e(cc,Wa),e(Wa,Bv),e(Yt,Ev),e(Yt,pc),e(pc,Qa),e(Qa,xv),e(Yt,Mv),e(Yt,hc),e(hc,Ra),e(Ra,jv),e(Yt,zv),e(Yt,uc),e(uc,Ua),e(Ua,Cv),e(et,Pv),e(et,It),$(Ka,It,null),e(It,qv),e(It,ts),e(ts,Av),e(ts,fc),e(fc,Ov),e(ts,Nv),e(ts,mc),e(mc,Iv),e(ts,Lv),e(It,Sv),$(vn,It,null),e(It,Wv),$(wn,It,null),_(n,kh,b),_(n,os,b),e(os,Tn),e(Tn,gc),$(Ha,gc,null),e(os,Qv),e(os,_c),e(_c,Rv),_(n,vh,b),_(n,tt,b),$(Va,tt,null),e(tt,Uv),e(tt,bc),e(bc,Kv),e(tt,Hv),e(tt,Ja),e(Ja,Vv),e(Ja,$l),e($l,Jv),e(Ja,Gv),e(tt,Xv),e(tt,Ga),e(Ga,Yv),e(Ga,Xa),e(Xa,Zv),e(Ga,ew),e(tt,tw),e(tt,kc),e(kc,ow),e(tt,sw),e(tt,Zt),e(Zt,vc),e(vc,Ya),e(Ya,nw),e(Zt,rw),e(Zt,wc),e(wc,Za),e(Za,aw),e(Zt,iw),e(Zt,Tc),e(Tc,ei),e(ei,lw),e(Zt,dw),e(Zt,$c),e($c,ti),e(ti,cw),e(tt,pw),e(tt,Lt),$(oi,Lt,null),e(Lt,hw),e(Lt,ss),e(ss,uw),e(ss,yc),e(yc,fw),e(ss,mw),e(ss,Dc),e(Dc,gw),e(ss,_w),e(Lt,bw),$($n,Lt,null),e(Lt,kw),$(yn,Lt,null),_(n,wh,b),_(n,ns,b),e(ns,Dn),e(Dn,Fc),$(si,Fc,null),e(ns,vw),e(ns,Bc),e(Bc,ww),_(n,Th,b),_(n,ot,b),$(ni,ot,null),e(ot,Tw),e(ot,Ec),e(Ec,$w),e(ot,yw),e(ot,ri),e(ri,Dw),e(ri,yl),e(yl,Fw),e(ri,Bw),e(ot,Ew),e(ot,ai),e(ai,xw),e(ai,ii),e(ii,Mw),e(ai,jw),e(ot,zw),e(ot,xc),e(xc,Cw),e(ot,Pw),e(ot,eo),e(eo,Mc),e(Mc,li),e(li,qw),e(eo,Aw),e(eo,jc),e(jc,di),e(di,Ow),e(eo,Nw),e(eo,zc),e(zc,ci),e(ci,Iw),e(eo,Lw),e(eo,Cc),e(Cc,pi),e(pi,Sw),e(ot,Ww),e(ot,St),$(hi,St,null),e(St,Qw),e(St,rs),e(rs,Rw),e(rs,Pc),e(Pc,Uw),e(rs,Kw),e(rs,qc),e(qc,Hw),e(rs,Vw),e(St,Jw),$(Fn,St,null),e(St,Gw),$(Bn,St,null),_(n,$h,b),_(n,as,b),e(as,En),e(En,Ac),$(ui,Ac,null),e(as,Xw),e(as,Oc),e(Oc,Yw),_(n,yh,b),_(n,st,b),$(fi,st,null),e(st,Zw),e(st,Nc),e(Nc,eT),e(st,tT),e(st,mi),e(mi,oT),e(mi,Dl),e(Dl,sT),e(mi,nT),e(st,rT),e(st,gi),e(gi,aT),e(gi,_i),e(_i,iT),e(gi,lT),e(st,dT),e(st,Ic),e(Ic,cT),e(st,pT),e(st,to),e(to,Lc),e(Lc,bi),e(bi,hT),e(to,uT),e(to,Sc),e(Sc,ki),e(ki,fT),e(to,mT),e(to,Wc),e(Wc,vi),e(vi,gT),e(to,_T),e(to,Qc),e(Qc,wi),e(wi,bT),e(st,kT),e(st,Wt),$(Ti,Wt,null),e(Wt,vT),e(Wt,is),e(is,wT),e(is,Rc),e(Rc,TT),e(is,$T),e(is,Uc),e(Uc,yT),e(is,DT),e(Wt,FT),$(xn,Wt,null),e(Wt,BT),$(Mn,Wt,null),_(n,Dh,b),_(n,ls,b),e(ls,jn),e(jn,Kc),$($i,Kc,null),e(ls,ET),e(ls,Hc),e(Hc,xT),_(n,Fh,b),_(n,nt,b),$(yi,nt,null),e(nt,MT),e(nt,ds),e(ds,jT),e(ds,Vc),e(Vc,zT),e(ds,CT),e(ds,Jc),e(Jc,PT),e(ds,qT),e(nt,AT),e(nt,Di),e(Di,OT),e(Di,Fl),e(Fl,NT),e(Di,IT),e(nt,LT),e(nt,Fi),e(Fi,ST),e(Fi,Bi),e(Bi,WT),e(Fi,QT),e(nt,RT),e(nt,Gc),e(Gc,UT),e(nt,KT),e(nt,oo),e(oo,Xc),e(Xc,Ei),e(Ei,HT),e(oo,VT),e(oo,Yc),e(Yc,xi),e(xi,JT),e(oo,GT),e(oo,Zc),e(Zc,Mi),e(Mi,XT),e(oo,YT),e(oo,ep),e(ep,ji),e(ji,ZT),e(nt,e$),e(nt,Qt),$(zi,Qt,null),e(Qt,t$),e(Qt,cs),e(cs,o$),e(cs,tp),e(tp,s$),e(cs,n$),e(cs,op),e(op,r$),e(cs,a$),e(Qt,i$),$(zn,Qt,null),e(Qt,l$),$(Cn,Qt,null),Bh=!0},p(n,[b]){const Ci={};b&2&&(Ci.$$scope={dirty:b,ctx:n}),hs.$set(Ci);const sp={};b&2&&(sp.$$scope={dirty:b,ctx:n}),bs.$set(sp);const np={};b&2&&(np.$$scope={dirty:b,ctx:n}),ks.$set(np);const rp={};b&2&&(rp.$$scope={dirty:b,ctx:n}),ws.$set(rp);const Pi={};b&2&&(Pi.$$scope={dirty:b,ctx:n}),Ts.$set(Pi);const ap={};b&2&&(ap.$$scope={dirty:b,ctx:n}),$s.$set(ap);const ip={};b&2&&(ip.$$scope={dirty:b,ctx:n}),Ds.$set(ip);const lp={};b&2&&(lp.$$scope={dirty:b,ctx:n}),Fs.$set(lp);const so={};b&2&&(so.$$scope={dirty:b,ctx:n}),Bs.$set(so);const dp={};b&2&&(dp.$$scope={dirty:b,ctx:n}),Es.$set(dp);const cp={};b&2&&(cp.$$scope={dirty:b,ctx:n}),xs.$set(cp);const pp={};b&2&&(pp.$$scope={dirty:b,ctx:n}),js.$set(pp);const hp={};b&2&&(hp.$$scope={dirty:b,ctx:n}),zs.$set(hp);const up={};b&2&&(up.$$scope={dirty:b,ctx:n}),Ps.$set(up);const fp={};b&2&&(fp.$$scope={dirty:b,ctx:n}),qs.$set(fp);const mp={};b&2&&(mp.$$scope={dirty:b,ctx:n}),As.$set(mp);const qi={};b&2&&(qi.$$scope={dirty:b,ctx:n}),Ns.$set(qi);const no={};b&2&&(no.$$scope={dirty:b,ctx:n}),Is.$set(no);const gp={};b&2&&(gp.$$scope={dirty:b,ctx:n}),Ls.$set(gp);const _p={};b&2&&(_p.$$scope={dirty:b,ctx:n}),Ws.$set(_p);const bp={};b&2&&(bp.$$scope={dirty:b,ctx:n}),Qs.$set(bp);const Ai={};b&2&&(Ai.$$scope={dirty:b,ctx:n}),Rs.$set(Ai);const kp={};b&2&&(kp.$$scope={dirty:b,ctx:n}),Ks.$set(kp);const ro={};b&2&&(ro.$$scope={dirty:b,ctx:n}),Hs.$set(ro);const vp={};b&2&&(vp.$$scope={dirty:b,ctx:n}),Vs.$set(vp);const wp={};b&2&&(wp.$$scope={dirty:b,ctx:n}),Js.$set(wp);const Tp={};b&2&&(Tp.$$scope={dirty:b,ctx:n}),Xs.$set(Tp);const Oi={};b&2&&(Oi.$$scope={dirty:b,ctx:n}),Ys.$set(Oi);const $p={};b&2&&($p.$$scope={dirty:b,ctx:n}),Zs.$set($p);const yp={};b&2&&(yp.$$scope={dirty:b,ctx:n}),en.$set(yp);const Dp={};b&2&&(Dp.$$scope={dirty:b,ctx:n}),on.$set(Dp);const ao={};b&2&&(ao.$$scope={dirty:b,ctx:n}),sn.$set(ao);const io={};b&2&&(io.$$scope={dirty:b,ctx:n}),nn.$set(io);const Fp={};b&2&&(Fp.$$scope={dirty:b,ctx:n}),an.$set(Fp);const Bp={};b&2&&(Bp.$$scope={dirty:b,ctx:n}),ln.$set(Bp);const Ep={};b&2&&(Ep.$$scope={dirty:b,ctx:n}),dn.$set(Ep);const ps={};b&2&&(ps.$$scope={dirty:b,ctx:n}),cn.$set(ps);const xp={};b&2&&(xp.$$scope={dirty:b,ctx:n}),hn.$set(xp);const Mp={};b&2&&(Mp.$$scope={dirty:b,ctx:n}),un.$set(Mp);const Ni={};b&2&&(Ni.$$scope={dirty:b,ctx:n}),fn.$set(Ni);const jp={};b&2&&(jp.$$scope={dirty:b,ctx:n}),mn.$set(jp);const zp={};b&2&&(zp.$$scope={dirty:b,ctx:n}),_n.$set(zp);const Cp={};b&2&&(Cp.$$scope={dirty:b,ctx:n}),bn.$set(Cp);const lo={};b&2&&(lo.$$scope={dirty:b,ctx:n}),vn.$set(lo);const Pp={};b&2&&(Pp.$$scope={dirty:b,ctx:n}),wn.$set(Pp);const Pn={};b&2&&(Pn.$$scope={dirty:b,ctx:n}),$n.$set(Pn);const qp={};b&2&&(qp.$$scope={dirty:b,ctx:n}),yn.$set(qp);const Ap={};b&2&&(Ap.$$scope={dirty:b,ctx:n}),Fn.$set(Ap);const Ii={};b&2&&(Ii.$$scope={dirty:b,ctx:n}),Bn.$set(Ii);const Op={};b&2&&(Op.$$scope={dirty:b,ctx:n}),xn.$set(Op);const Li={};b&2&&(Li.$$scope={dirty:b,ctx:n}),Mn.$set(Li);const Np={};b&2&&(Np.$$scope={dirty:b,ctx:n}),zn.$set(Np);const Ip={};b&2&&(Ip.$$scope={dirty:b,ctx:n}),Cn.$set(Ip)},i(n){Bh||(y(l.$$.fragment,n),y(B.$$.fragment,n),y(W.$$.fragment,n),y(Ie.$$.fragment,n),y(hs.$$.fragment,n),y(Zn.$$.fragment,n),y(er.$$.fragment,n),y(or.$$.fragment,n),y(sr.$$.fragment,n),y(ar.$$.fragment,n),y(ir.$$.fragment,n),y(pr.$$.fragment,n),y(bs.$$.fragment,n),y(ks.$$.fragment,n),y(hr.$$.fragment,n),y(ur.$$.fragment,n),y(br.$$.fragment,n),y(ws.$$.fragment,n),y(Ts.$$.fragment,n),y($s.$$.fragment,n),y(kr.$$.fragment,n),y(vr.$$.fragment,n),y(yr.$$.fragment,n),y(Ds.$$.fragment,n),y(Fs.$$.fragment,n),y(Bs.$$.fragment,n),y(Es.$$.fragment,n),y(xs.$$.fragment,n),y(Dr.$$.fragment,n),y(Fr.$$.fragment,n),y(Mr.$$.fragment,n),y(js.$$.fragment,n),y(zs.$$.fragment,n),y(jr.$$.fragment,n),y(zr.$$.fragment,n),y(Ar.$$.fragment,n),y(Ps.$$.fragment,n),y(qs.$$.fragment,n),y(As.$$.fragment,n),y(Or.$$.fragment,n),y(Nr.$$.fragment,n),y(Wr.$$.fragment,n),y(Ns.$$.fragment,n),y(Is.$$.fragment,n),y(Ls.$$.fragment,n),y(Qr.$$.fragment,n),y(Rr.$$.fragment,n),y(Ws.$$.fragment,n),y(Vr.$$.fragment,n),y(Qs.$$.fragment,n),y(Rs.$$.fragment,n),y(Jr.$$.fragment,n),y(Gr.$$.fragment,n),y(Ks.$$.fragment,n),y(ta.$$.fragment,n),y(Hs.$$.fragment,n),y(Vs.$$.fragment,n),y(Js.$$.fragment,n),y(oa.$$.fragment,n),y(sa.$$.fragment,n),y(Xs.$$.fragment,n),y(ia.$$.fragment,n),y(Ys.$$.fragment,n),y(Zs.$$.fragment,n),y(en.$$.fragment,n),y(la.$$.fragment,n),y(da.$$.fragment,n),y(on.$$.fragment,n),y(ua.$$.fragment,n),y(sn.$$.fragment,n),y(nn.$$.fragment,n),y(fa.$$.fragment,n),y(ma.$$.fragment,n),y(an.$$.fragment,n),y(ka.$$.fragment,n),y(ln.$$.fragment,n),y(dn.$$.fragment,n),y(cn.$$.fragment,n),y(va.$$.fragment,n),y(wa.$$.fragment,n),y(hn.$$.fragment,n),y(Da.$$.fragment,n),y(un.$$.fragment,n),y(fn.$$.fragment,n),y(mn.$$.fragment,n),y(Fa.$$.fragment,n),y(Ba.$$.fragment,n),y(qa.$$.fragment,n),y(_n.$$.fragment,n),y(bn.$$.fragment,n),y(Aa.$$.fragment,n),y(Oa.$$.fragment,n),y(Ka.$$.fragment,n),y(vn.$$.fragment,n),y(wn.$$.fragment,n),y(Ha.$$.fragment,n),y(Va.$$.fragment,n),y(oi.$$.fragment,n),y($n.$$.fragment,n),y(yn.$$.fragment,n),y(si.$$.fragment,n),y(ni.$$.fragment,n),y(hi.$$.fragment,n),y(Fn.$$.fragment,n),y(Bn.$$.fragment,n),y(ui.$$.fragment,n),y(fi.$$.fragment,n),y(Ti.$$.fragment,n),y(xn.$$.fragment,n),y(Mn.$$.fragment,n),y($i.$$.fragment,n),y(yi.$$.fragment,n),y(zi.$$.fragment,n),y(zn.$$.fragment,n),y(Cn.$$.fragment,n),Bh=!0)},o(n){D(l.$$.fragment,n),D(B.$$.fragment,n),D(W.$$.fragment,n),D(Ie.$$.fragment,n),D(hs.$$.fragment,n),D(Zn.$$.fragment,n),D(er.$$.fragment,n),D(or.$$.fragment,n),D(sr.$$.fragment,n),D(ar.$$.fragment,n),D(ir.$$.fragment,n),D(pr.$$.fragment,n),D(bs.$$.fragment,n),D(ks.$$.fragment,n),D(hr.$$.fragment,n),D(ur.$$.fragment,n),D(br.$$.fragment,n),D(ws.$$.fragment,n),D(Ts.$$.fragment,n),D($s.$$.fragment,n),D(kr.$$.fragment,n),D(vr.$$.fragment,n),D(yr.$$.fragment,n),D(Ds.$$.fragment,n),D(Fs.$$.fragment,n),D(Bs.$$.fragment,n),D(Es.$$.fragment,n),D(xs.$$.fragment,n),D(Dr.$$.fragment,n),D(Fr.$$.fragment,n),D(Mr.$$.fragment,n),D(js.$$.fragment,n),D(zs.$$.fragment,n),D(jr.$$.fragment,n),D(zr.$$.fragment,n),D(Ar.$$.fragment,n),D(Ps.$$.fragment,n),D(qs.$$.fragment,n),D(As.$$.fragment,n),D(Or.$$.fragment,n),D(Nr.$$.fragment,n),D(Wr.$$.fragment,n),D(Ns.$$.fragment,n),D(Is.$$.fragment,n),D(Ls.$$.fragment,n),D(Qr.$$.fragment,n),D(Rr.$$.fragment,n),D(Ws.$$.fragment,n),D(Vr.$$.fragment,n),D(Qs.$$.fragment,n),D(Rs.$$.fragment,n),D(Jr.$$.fragment,n),D(Gr.$$.fragment,n),D(Ks.$$.fragment,n),D(ta.$$.fragment,n),D(Hs.$$.fragment,n),D(Vs.$$.fragment,n),D(Js.$$.fragment,n),D(oa.$$.fragment,n),D(sa.$$.fragment,n),D(Xs.$$.fragment,n),D(ia.$$.fragment,n),D(Ys.$$.fragment,n),D(Zs.$$.fragment,n),D(en.$$.fragment,n),D(la.$$.fragment,n),D(da.$$.fragment,n),D(on.$$.fragment,n),D(ua.$$.fragment,n),D(sn.$$.fragment,n),D(nn.$$.fragment,n),D(fa.$$.fragment,n),D(ma.$$.fragment,n),D(an.$$.fragment,n),D(ka.$$.fragment,n),D(ln.$$.fragment,n),D(dn.$$.fragment,n),D(cn.$$.fragment,n),D(va.$$.fragment,n),D(wa.$$.fragment,n),D(hn.$$.fragment,n),D(Da.$$.fragment,n),D(un.$$.fragment,n),D(fn.$$.fragment,n),D(mn.$$.fragment,n),D(Fa.$$.fragment,n),D(Ba.$$.fragment,n),D(qa.$$.fragment,n),D(_n.$$.fragment,n),D(bn.$$.fragment,n),D(Aa.$$.fragment,n),D(Oa.$$.fragment,n),D(Ka.$$.fragment,n),D(vn.$$.fragment,n),D(wn.$$.fragment,n),D(Ha.$$.fragment,n),D(Va.$$.fragment,n),D(oi.$$.fragment,n),D($n.$$.fragment,n),D(yn.$$.fragment,n),D(si.$$.fragment,n),D(ni.$$.fragment,n),D(hi.$$.fragment,n),D(Fn.$$.fragment,n),D(Bn.$$.fragment,n),D(ui.$$.fragment,n),D(fi.$$.fragment,n),D(Ti.$$.fragment,n),D(xn.$$.fragment,n),D(Mn.$$.fragment,n),D($i.$$.fragment,n),D(yi.$$.fragment,n),D(zi.$$.fragment,n),D(zn.$$.fragment,n),D(Cn.$$.fragment,n),Bh=!1},d(n){t(d),n&&t(g),n&&t(c),F(l),n&&t(ge),n&&t(I),F(B),n&&t(_e),n&&t(O),n&&t(be),n&&t(te),n&&t(q),n&&t(le),n&&t(ke),n&&t(R),n&&t(ve),n&&t(C),n&&t(v),n&&t(x),n&&t(N),n&&t(S),F(W),n&&t(Re),n&&t(Q),F(Ie),F(hs),n&&t(Sp),n&&t(yo),F(Zn),n&&t(Wp),n&&t(zt),F(er),n&&t(Qp),n&&t(Do),F(or),n&&t(Rp),n&&t(Ct),F(sr),n&&t(Up),n&&t(Fo),F(ar),n&&t(Kp),n&&t(ht),F(ir),F(pr),F(bs),F(ks),n&&t(Hp),n&&t(Eo),F(hr),n&&t(Vp),n&&t(ut),F(ur),F(br),F(ws),F(Ts),F($s),n&&t(Jp),n&&t(Mo),F(kr),n&&t(Gp),n&&t(ft),F(vr),F(yr),F(Ds),F(Fs),F(Bs),F(Es),F(xs),n&&t(Xp),n&&t(zo),F(Dr),n&&t(Yp),n&&t(mt),F(Fr),F(Mr),F(js),F(zs),n&&t(Zp),n&&t(Po),F(jr),n&&t(eh),n&&t(gt),F(zr),F(Ar),F(Ps),F(qs),F(As),n&&t(th),n&&t(Ao),F(Or),n&&t(oh),n&&t(_t),F(Nr),F(Wr),F(Ns),F(Is),F(Ls),n&&t(sh),n&&t(Io),F(Qr),n&&t(nh),n&&t(at),F(Rr),F(Ws),F(Vr),F(Qs),F(Rs),n&&t(rh),n&&t(So),F(Jr),n&&t(ah),n&&t(it),F(Gr),F(Ks),F(ta),F(Hs),F(Vs),F(Js),n&&t(ih),n&&t(Qo),F(oa),n&&t(lh),n&&t(lt),F(sa),F(Xs),F(ia),F(Ys),F(Zs),F(en),n&&t(dh),n&&t(Uo),F(la),n&&t(ch),n&&t(dt),F(da),F(on),F(ua),F(sn),F(nn),n&&t(ph),n&&t(Ho),F(fa),n&&t(hh),n&&t(ct),F(ma),F(an),F(ka),F(ln),F(dn),F(cn),n&&t(uh),n&&t(Jo),F(va),n&&t(fh),n&&t(pt),F(wa),F(hn),F(Da),F(un),F(fn),F(mn),n&&t(mh),n&&t(Yo),F(Fa),n&&t(gh),n&&t(Ze),F(Ba),F(qa),F(_n),F(bn),n&&t(_h),n&&t(es),F(Aa),n&&t(bh),n&&t(et),F(Oa),F(Ka),F(vn),F(wn),n&&t(kh),n&&t(os),F(Ha),n&&t(vh),n&&t(tt),F(Va),F(oi),F($n),F(yn),n&&t(wh),n&&t(ns),F(si),n&&t(Th),n&&t(ot),F(ni),F(hi),F(Fn),F(Bn),n&&t($h),n&&t(as),F(ui),n&&t(yh),n&&t(st),F(fi),F(Ti),F(xn),F(Mn),n&&t(Dh),n&&t(ls),F($i),n&&t(Fh),n&&t(nt),F(yi),F(zi),F(zn),F(Cn)}}}const nD={local:"distilbert",sections:[{local:"overview",title:"Overview"},{local:"transformers.DistilBertConfig",title:"DistilBertConfig"},{local:"transformers.DistilBertTokenizer",title:"DistilBertTokenizer"},{local:"transformers.DistilBertTokenizerFast",title:"DistilBertTokenizerFast"},{local:"transformers.DistilBertModel",title:"DistilBertModel"},{local:"transformers.DistilBertForMaskedLM",title:"DistilBertForMaskedLM"},{local:"transformers.DistilBertForSequenceClassification",title:"DistilBertForSequenceClassification"},{local:"transformers.DistilBertForMultipleChoice",title:"DistilBertForMultipleChoice"},{local:"transformers.DistilBertForTokenClassification",title:"DistilBertForTokenClassification"},{local:"transformers.DistilBertForQuestionAnswering",title:"DistilBertForQuestionAnswering"},{local:"transformers.TFDistilBertModel",title:"TFDistilBertModel"},{local:"transformers.TFDistilBertForMaskedLM",title:"TFDistilBertForMaskedLM"},{local:"transformers.TFDistilBertForSequenceClassification",title:"TFDistilBertForSequenceClassification"},{local:"transformers.TFDistilBertForMultipleChoice",title:"TFDistilBertForMultipleChoice"},{local:"transformers.TFDistilBertForTokenClassification",title:"TFDistilBertForTokenClassification"},{local:"transformers.TFDistilBertForQuestionAnswering",title:"TFDistilBertForQuestionAnswering"},{local:"transformers.FlaxDistilBertModel",title:"FlaxDistilBertModel"},{local:"transformers.FlaxDistilBertForMaskedLM",title:"FlaxDistilBertForMaskedLM"},{local:"transformers.FlaxDistilBertForSequenceClassification",title:"FlaxDistilBertForSequenceClassification"},{local:"transformers.FlaxDistilBertForMultipleChoice",title:"FlaxDistilBertForMultipleChoice"},{local:"transformers.FlaxDistilBertForTokenClassification",title:"FlaxDistilBertForTokenClassification"},{local:"transformers.FlaxDistilBertForQuestionAnswering",title:"FlaxDistilBertForQuestionAnswering"}],title:"DistilBERT"};function rD(E){return s2(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class hD extends Z0{constructor(d){super();e2(this,d,rD,sD,t2,{})}}export{hD as default,nD as metadata};
