import{S as Ch,i as Ph,s as Ah,e as a,k as h,w as z,t as o,M as Lh,c as i,d as s,m,a as l,x as q,h as r,b as _,G as e,g as k,y as $,q as w,o as v,B as y,v as Ih,L as P}from"../../chunks/vendor-hf-doc-builder.js";import{T as On}from"../../chunks/Tip-hf-doc-builder.js";import{D as L}from"../../chunks/Docstring-hf-doc-builder.js";import{C as A}from"../../chunks/CodeBlock-hf-doc-builder.js";import{I as ne}from"../../chunks/IconCopyLink-hf-doc-builder.js";import{E as C}from"../../chunks/ExampleCodeBlock-hf-doc-builder.js";function Nh(T){let d,g,u,c,f;return c=new A({props:{code:`from transformers import SqueezeBertConfig, SqueezeBertModel

# Initializing a SqueezeBERT configuration
configuration = SqueezeBertConfig()

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

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

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a model (with random weights) from the configuration above</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = SqueezeBertModel(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=a("p"),g=o("Examples:"),u=h(),z(c.$$.fragment)},l(t){d=i(t,"P",{});var p=l(d);g=r(p,"Examples:"),p.forEach(s),u=m(t),q(c.$$.fragment,t)},m(t,p){k(t,d,p),e(d,g),k(t,u,p),$(c,t,p),f=!0},p:P,i(t){f||(w(c.$$.fragment,t),f=!0)},o(t){v(c.$$.fragment,t),f=!1},d(t){t&&s(d),t&&s(u),y(c,t)}}}function Dh(T){let d,g,u,c,f;return c=new A({props:{code:`0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1
| first sequence    | second sequence |`,highlighted:`0<span class="hljs-number"> 0 </span>0<span class="hljs-number"> 0 </span>0<span class="hljs-number"> 0 </span>0<span class="hljs-number"> 0 </span>0<span class="hljs-number"> 0 </span>0<span class="hljs-number"> 1 </span>1<span class="hljs-number"> 1 </span>1<span class="hljs-number"> 1 </span>1<span class="hljs-number"> 1 </span>1 1
| first sequence    | second sequence |`}}),{c(){d=a("p"),g=o("sequence pair mask has the following format:"),u=h(),z(c.$$.fragment)},l(t){d=i(t,"P",{});var p=l(d);g=r(p,"sequence pair mask has the following format:"),p.forEach(s),u=m(t),q(c.$$.fragment,t)},m(t,p){k(t,d,p),e(d,g),k(t,u,p),$(c,t,p),f=!0},p:P,i(t){f||(w(c.$$.fragment,t),f=!0)},o(t){v(c.$$.fragment,t),f=!1},d(t){t&&s(d),t&&s(u),y(c,t)}}}function Oh(T){let d,g,u,c,f;return c=new A({props:{code:`0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1
| first sequence    | second sequence |`,highlighted:`0<span class="hljs-number"> 0 </span>0<span class="hljs-number"> 0 </span>0<span class="hljs-number"> 0 </span>0<span class="hljs-number"> 0 </span>0<span class="hljs-number"> 0 </span>0<span class="hljs-number"> 1 </span>1<span class="hljs-number"> 1 </span>1<span class="hljs-number"> 1 </span>1<span class="hljs-number"> 1 </span>1 1
| first sequence    | second sequence |`}}),{c(){d=a("p"),g=o("sequence pair mask has the following format:"),u=h(),z(c.$$.fragment)},l(t){d=i(t,"P",{});var p=l(d);g=r(p,"sequence pair mask has the following format:"),p.forEach(s),u=m(t),q(c.$$.fragment,t)},m(t,p){k(t,d,p),e(d,g),k(t,u,p),$(c,t,p),f=!0},p:P,i(t){f||(w(c.$$.fragment,t),f=!0)},o(t){v(c.$$.fragment,t),f=!1},d(t){t&&s(d),t&&s(u),y(c,t)}}}function Rh(T){let d,g,u,c,f;return c=new A({props:{code:`Internal class hierarchy:
SqueezeBertModel
    SqueezeBertEncoder
        SqueezeBertModule
        SqueezeBertSelfAttention
            ConvActivation
            ConvDropoutLayerNorm`,highlighted:`Internal <span class="hljs-keyword">class</span> <span class="hljs-symbol">hierarchy:
<span class="hljs-symbol">SqueezeBertModel</span></span>
    <span class="hljs-symbol">SqueezeBertEncoder</span>
        <span class="hljs-symbol">SqueezeBertModule</span>
        <span class="hljs-symbol">SqueezeBertSelfAttention</span>
            <span class="hljs-symbol">ConvActivation</span>
            <span class="hljs-symbol">ConvDropoutLayerNorm</span>`}}),{c(){d=a("p"),g=o("Hierarchy:"),u=h(),z(c.$$.fragment)},l(t){d=i(t,"P",{});var p=l(d);g=r(p,"Hierarchy:"),p.forEach(s),u=m(t),q(c.$$.fragment,t)},m(t,p){k(t,d,p),e(d,g),k(t,u,p),$(c,t,p),f=!0},p:P,i(t){f||(w(c.$$.fragment,t),f=!0)},o(t){v(c.$$.fragment,t),f=!1},d(t){t&&s(d),t&&s(u),y(c,t)}}}function Wh(T){let d,g,u,c,f;return c=new A({props:{code:`Input data is in [batch, sequence_length, hidden_size] format.

Data inside the encoder is in [batch, hidden_size, sequence_length] format. But, if \`output_hidden_states == True\`, the data from inside the encoder is returned in [batch, sequence_length, hidden_size] format.

The final output of the encoder is in [batch, sequence_length, hidden_size] format.`,highlighted:`<span class="hljs-keyword">Input</span> data <span class="hljs-keyword">is</span> <span class="hljs-keyword">in</span> [batch, sequence_length, hidden_size] <span class="hljs-keyword">format</span>.

Data inside the encoder <span class="hljs-keyword">is</span> <span class="hljs-keyword">in</span> [batch, hidden_size, sequence_length] <span class="hljs-keyword">format</span>. But, <span class="hljs-keyword">if</span> \`output_hidden_states == <span class="hljs-keyword">True</span>\`, the data <span class="hljs-keyword">from</span> inside the encoder <span class="hljs-keyword">is</span> returned <span class="hljs-keyword">in</span> [batch, sequence_length, hidden_size] <span class="hljs-keyword">format</span>.

The final output <span class="hljs-keyword">of</span> the encoder <span class="hljs-keyword">is</span> <span class="hljs-keyword">in</span> [batch, sequence_length, hidden_size] <span class="hljs-keyword">format</span>.`}}),{c(){d=a("p"),g=o("Data layouts:"),u=h(),z(c.$$.fragment)},l(t){d=i(t,"P",{});var p=l(d);g=r(p,"Data layouts:"),p.forEach(s),u=m(t),q(c.$$.fragment,t)},m(t,p){k(t,d,p),e(d,g),k(t,u,p),$(c,t,p),f=!0},p:P,i(t){f||(w(c.$$.fragment,t),f=!0)},o(t){v(c.$$.fragment,t),f=!1},d(t){t&&s(d),t&&s(u),y(c,t)}}}function Kh(T){let d,g,u,c,f;return{c(){d=a("p"),g=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),u=a("code"),c=o("Module"),f=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(t){d=i(t,"P",{});var p=l(d);g=r(p,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=i(p,"CODE",{});var S=l(u);c=r(S,"Module"),S.forEach(s),f=r(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(s)},m(t,p){k(t,d,p),e(d,g),e(d,u),e(u,c),e(d,f)},d(t){t&&s(d)}}}function Hh(T){let d,g,u,c,f;return c=new A({props:{code:`from transformers import AutoTokenizer, SqueezeBertModel
import torch

tokenizer = AutoTokenizer.from_pretrained("squeezebert/squeezebert-uncased")
model = SqueezeBertModel.from_pretrained("squeezebert/squeezebert-uncased")

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

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

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;squeezebert/squeezebert-uncased&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = SqueezeBertModel.from_pretrained(<span class="hljs-string">&quot;squeezebert/squeezebert-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=a("p"),g=o("Example:"),u=h(),z(c.$$.fragment)},l(t){d=i(t,"P",{});var p=l(d);g=r(p,"Example:"),p.forEach(s),u=m(t),q(c.$$.fragment,t)},m(t,p){k(t,d,p),e(d,g),k(t,u,p),$(c,t,p),f=!0},p:P,i(t){f||(w(c.$$.fragment,t),f=!0)},o(t){v(c.$$.fragment,t),f=!1},d(t){t&&s(d),t&&s(u),y(c,t)}}}function Qh(T){let d,g,u,c,f;return c=new A({props:{code:`Internal class hierarchy:
SqueezeBertModel
    SqueezeBertEncoder
        SqueezeBertModule
        SqueezeBertSelfAttention
            ConvActivation
            ConvDropoutLayerNorm`,highlighted:`Internal <span class="hljs-keyword">class</span> <span class="hljs-symbol">hierarchy:
<span class="hljs-symbol">SqueezeBertModel</span></span>
    <span class="hljs-symbol">SqueezeBertEncoder</span>
        <span class="hljs-symbol">SqueezeBertModule</span>
        <span class="hljs-symbol">SqueezeBertSelfAttention</span>
            <span class="hljs-symbol">ConvActivation</span>
            <span class="hljs-symbol">ConvDropoutLayerNorm</span>`}}),{c(){d=a("p"),g=o("Hierarchy:"),u=h(),z(c.$$.fragment)},l(t){d=i(t,"P",{});var p=l(d);g=r(p,"Hierarchy:"),p.forEach(s),u=m(t),q(c.$$.fragment,t)},m(t,p){k(t,d,p),e(d,g),k(t,u,p),$(c,t,p),f=!0},p:P,i(t){f||(w(c.$$.fragment,t),f=!0)},o(t){v(c.$$.fragment,t),f=!1},d(t){t&&s(d),t&&s(u),y(c,t)}}}function Uh(T){let d,g,u,c,f;return c=new A({props:{code:`Input data is in [batch, sequence_length, hidden_size] format.

Data inside the encoder is in [batch, hidden_size, sequence_length] format. But, if \`output_hidden_states == True\`, the data from inside the encoder is returned in [batch, sequence_length, hidden_size] format.

The final output of the encoder is in [batch, sequence_length, hidden_size] format.`,highlighted:`<span class="hljs-keyword">Input</span> data <span class="hljs-keyword">is</span> <span class="hljs-keyword">in</span> [batch, sequence_length, hidden_size] <span class="hljs-keyword">format</span>.

Data inside the encoder <span class="hljs-keyword">is</span> <span class="hljs-keyword">in</span> [batch, hidden_size, sequence_length] <span class="hljs-keyword">format</span>. But, <span class="hljs-keyword">if</span> \`output_hidden_states == <span class="hljs-keyword">True</span>\`, the data <span class="hljs-keyword">from</span> inside the encoder <span class="hljs-keyword">is</span> returned <span class="hljs-keyword">in</span> [batch, sequence_length, hidden_size] <span class="hljs-keyword">format</span>.

The final output <span class="hljs-keyword">of</span> the encoder <span class="hljs-keyword">is</span> <span class="hljs-keyword">in</span> [batch, sequence_length, hidden_size] <span class="hljs-keyword">format</span>.`}}),{c(){d=a("p"),g=o("Data layouts:"),u=h(),z(c.$$.fragment)},l(t){d=i(t,"P",{});var p=l(d);g=r(p,"Data layouts:"),p.forEach(s),u=m(t),q(c.$$.fragment,t)},m(t,p){k(t,d,p),e(d,g),k(t,u,p),$(c,t,p),f=!0},p:P,i(t){f||(w(c.$$.fragment,t),f=!0)},o(t){v(c.$$.fragment,t),f=!1},d(t){t&&s(d),t&&s(u),y(c,t)}}}function Vh(T){let d,g,u,c,f;return{c(){d=a("p"),g=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),u=a("code"),c=o("Module"),f=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(t){d=i(t,"P",{});var p=l(d);g=r(p,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=i(p,"CODE",{});var S=l(u);c=r(S,"Module"),S.forEach(s),f=r(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(s)},m(t,p){k(t,d,p),e(d,g),e(d,u),e(u,c),e(d,f)},d(t){t&&s(d)}}}function Gh(T){let d,g,u,c,f;return c=new A({props:{code:`from transformers import AutoTokenizer, SqueezeBertForMaskedLM
import torch

tokenizer = AutoTokenizer.from_pretrained("squeezebert/squeezebert-uncased")
model = SqueezeBertForMaskedLM.from_pretrained("squeezebert/squeezebert-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)

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

outputs = model(**inputs, labels=labels)`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, SqueezeBertForMaskedLM
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch

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

<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs, labels=labels)`}}),{c(){d=a("p"),g=o("Example:"),u=h(),z(c.$$.fragment)},l(t){d=i(t,"P",{});var p=l(d);g=r(p,"Example:"),p.forEach(s),u=m(t),q(c.$$.fragment,t)},m(t,p){k(t,d,p),e(d,g),k(t,u,p),$(c,t,p),f=!0},p:P,i(t){f||(w(c.$$.fragment,t),f=!0)},o(t){v(c.$$.fragment,t),f=!1},d(t){t&&s(d),t&&s(u),y(c,t)}}}function Jh(T){let d,g,u,c,f;return c=new A({props:{code:`Internal class hierarchy:
SqueezeBertModel
    SqueezeBertEncoder
        SqueezeBertModule
        SqueezeBertSelfAttention
            ConvActivation
            ConvDropoutLayerNorm`,highlighted:`Internal <span class="hljs-keyword">class</span> <span class="hljs-symbol">hierarchy:
<span class="hljs-symbol">SqueezeBertModel</span></span>
    <span class="hljs-symbol">SqueezeBertEncoder</span>
        <span class="hljs-symbol">SqueezeBertModule</span>
        <span class="hljs-symbol">SqueezeBertSelfAttention</span>
            <span class="hljs-symbol">ConvActivation</span>
            <span class="hljs-symbol">ConvDropoutLayerNorm</span>`}}),{c(){d=a("p"),g=o("Hierarchy:"),u=h(),z(c.$$.fragment)},l(t){d=i(t,"P",{});var p=l(d);g=r(p,"Hierarchy:"),p.forEach(s),u=m(t),q(c.$$.fragment,t)},m(t,p){k(t,d,p),e(d,g),k(t,u,p),$(c,t,p),f=!0},p:P,i(t){f||(w(c.$$.fragment,t),f=!0)},o(t){v(c.$$.fragment,t),f=!1},d(t){t&&s(d),t&&s(u),y(c,t)}}}function Xh(T){let d,g,u,c,f;return c=new A({props:{code:`Input data is in [batch, sequence_length, hidden_size] format.

Data inside the encoder is in [batch, hidden_size, sequence_length] format. But, if \`output_hidden_states == True\`, the data from inside the encoder is returned in [batch, sequence_length, hidden_size] format.

The final output of the encoder is in [batch, sequence_length, hidden_size] format.`,highlighted:`<span class="hljs-keyword">Input</span> data <span class="hljs-keyword">is</span> <span class="hljs-keyword">in</span> [batch, sequence_length, hidden_size] <span class="hljs-keyword">format</span>.

Data inside the encoder <span class="hljs-keyword">is</span> <span class="hljs-keyword">in</span> [batch, hidden_size, sequence_length] <span class="hljs-keyword">format</span>. But, <span class="hljs-keyword">if</span> \`output_hidden_states == <span class="hljs-keyword">True</span>\`, the data <span class="hljs-keyword">from</span> inside the encoder <span class="hljs-keyword">is</span> returned <span class="hljs-keyword">in</span> [batch, sequence_length, hidden_size] <span class="hljs-keyword">format</span>.

The final output <span class="hljs-keyword">of</span> the encoder <span class="hljs-keyword">is</span> <span class="hljs-keyword">in</span> [batch, sequence_length, hidden_size] <span class="hljs-keyword">format</span>.`}}),{c(){d=a("p"),g=o("Data layouts:"),u=h(),z(c.$$.fragment)},l(t){d=i(t,"P",{});var p=l(d);g=r(p,"Data layouts:"),p.forEach(s),u=m(t),q(c.$$.fragment,t)},m(t,p){k(t,d,p),e(d,g),k(t,u,p),$(c,t,p),f=!0},p:P,i(t){f||(w(c.$$.fragment,t),f=!0)},o(t){v(c.$$.fragment,t),f=!1},d(t){t&&s(d),t&&s(u),y(c,t)}}}function Yh(T){let d,g,u,c,f;return{c(){d=a("p"),g=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),u=a("code"),c=o("Module"),f=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(t){d=i(t,"P",{});var p=l(d);g=r(p,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=i(p,"CODE",{});var S=l(u);c=r(S,"Module"),S.forEach(s),f=r(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(s)},m(t,p){k(t,d,p),e(d,g),e(d,u),e(u,c),e(d,f)},d(t){t&&s(d)}}}function Zh(T){let d,g,u,c,f;return c=new A({props:{code:`import torch
from transformers import AutoTokenizer, SqueezeBertForSequenceClassification

tokenizer = AutoTokenizer.from_pretrained("squeezebert/squeezebert-uncased")
model = SqueezeBertForSequenceClassification.from_pretrained("squeezebert/squeezebert-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()

# 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 = SqueezeBertForSequenceClassification.from_pretrained("squeezebert/squeezebert-uncased", num_labels=num_labels)

labels = torch.tensor([1])
loss = model(**inputs, labels=labels).loss`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, SqueezeBertForSequenceClassification

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;squeezebert/squeezebert-uncased&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = SqueezeBertForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;squeezebert/squeezebert-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><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 = SqueezeBertForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;squeezebert/squeezebert-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`}}),{c(){d=a("p"),g=o("Example of single-label classification:"),u=h(),z(c.$$.fragment)},l(t){d=i(t,"P",{});var p=l(d);g=r(p,"Example of single-label classification:"),p.forEach(s),u=m(t),q(c.$$.fragment,t)},m(t,p){k(t,d,p),e(d,g),k(t,u,p),$(c,t,p),f=!0},p:P,i(t){f||(w(c.$$.fragment,t),f=!0)},o(t){v(c.$$.fragment,t),f=!1},d(t){t&&s(d),t&&s(u),y(c,t)}}}function em(T){let d,g,u,c,f;return c=new A({props:{code:`import torch
from transformers import AutoTokenizer, SqueezeBertForSequenceClassification

tokenizer = AutoTokenizer.from_pretrained("squeezebert/squeezebert-uncased")
model = SqueezeBertForSequenceClassification.from_pretrained("squeezebert/squeezebert-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_ids = torch.arange(0, logits.shape[-1])[torch.sigmoid(logits).squeeze(dim=0) > 0.5]

# To train a model on \`num_labels\` classes, you can pass \`num_labels=num_labels\` to \`.from_pretrained(...)\`
num_labels = len(model.config.id2label)
model = SqueezeBertForSequenceClassification.from_pretrained(
    "squeezebert/squeezebert-uncased", num_labels=num_labels, problem_type="multi_label_classification"
)

labels = torch.sum(
    torch.nn.functional.one_hot(predicted_class_ids[None, :].clone(), num_classes=num_labels), dim=1
).to(torch.float)
loss = model(**inputs, labels=labels).loss`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, SqueezeBertForSequenceClassification

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;squeezebert/squeezebert-uncased&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = SqueezeBertForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;squeezebert/squeezebert-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_ids = torch.arange(<span class="hljs-number">0</span>, logits.shape[-<span class="hljs-number">1</span>])[torch.sigmoid(logits).squeeze(dim=<span class="hljs-number">0</span>) &gt; <span class="hljs-number">0.5</span>]

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># To train a model on \`num_labels\` classes, you can pass \`num_labels=num_labels\` to \`.from_pretrained(...)\`</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>num_labels = <span class="hljs-built_in">len</span>(model.config.id2label)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = SqueezeBertForSequenceClassification.from_pretrained(
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;squeezebert/squeezebert-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.<span class="hljs-built_in">sum</span>(
<span class="hljs-meta">... </span>    torch.nn.functional.one_hot(predicted_class_ids[<span class="hljs-literal">None</span>, :].clone(), num_classes=num_labels), dim=<span class="hljs-number">1</span>
<span class="hljs-meta">... </span>).to(torch.<span class="hljs-built_in">float</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>loss = model(**inputs, labels=labels).loss`}}),{c(){d=a("p"),g=o("Example of multi-label classification:"),u=h(),z(c.$$.fragment)},l(t){d=i(t,"P",{});var p=l(d);g=r(p,"Example of multi-label classification:"),p.forEach(s),u=m(t),q(c.$$.fragment,t)},m(t,p){k(t,d,p),e(d,g),k(t,u,p),$(c,t,p),f=!0},p:P,i(t){f||(w(c.$$.fragment,t),f=!0)},o(t){v(c.$$.fragment,t),f=!1},d(t){t&&s(d),t&&s(u),y(c,t)}}}function tm(T){let d,g,u,c,f;return c=new A({props:{code:`Internal class hierarchy:
SqueezeBertModel
    SqueezeBertEncoder
        SqueezeBertModule
        SqueezeBertSelfAttention
            ConvActivation
            ConvDropoutLayerNorm`,highlighted:`Internal <span class="hljs-keyword">class</span> <span class="hljs-symbol">hierarchy:
<span class="hljs-symbol">SqueezeBertModel</span></span>
    <span class="hljs-symbol">SqueezeBertEncoder</span>
        <span class="hljs-symbol">SqueezeBertModule</span>
        <span class="hljs-symbol">SqueezeBertSelfAttention</span>
            <span class="hljs-symbol">ConvActivation</span>
            <span class="hljs-symbol">ConvDropoutLayerNorm</span>`}}),{c(){d=a("p"),g=o("Hierarchy:"),u=h(),z(c.$$.fragment)},l(t){d=i(t,"P",{});var p=l(d);g=r(p,"Hierarchy:"),p.forEach(s),u=m(t),q(c.$$.fragment,t)},m(t,p){k(t,d,p),e(d,g),k(t,u,p),$(c,t,p),f=!0},p:P,i(t){f||(w(c.$$.fragment,t),f=!0)},o(t){v(c.$$.fragment,t),f=!1},d(t){t&&s(d),t&&s(u),y(c,t)}}}function sm(T){let d,g,u,c,f;return c=new A({props:{code:`Input data is in [batch, sequence_length, hidden_size] format.

Data inside the encoder is in [batch, hidden_size, sequence_length] format. But, if \`output_hidden_states == True\`, the data from inside the encoder is returned in [batch, sequence_length, hidden_size] format.

The final output of the encoder is in [batch, sequence_length, hidden_size] format.`,highlighted:`<span class="hljs-keyword">Input</span> data <span class="hljs-keyword">is</span> <span class="hljs-keyword">in</span> [batch, sequence_length, hidden_size] <span class="hljs-keyword">format</span>.

Data inside the encoder <span class="hljs-keyword">is</span> <span class="hljs-keyword">in</span> [batch, hidden_size, sequence_length] <span class="hljs-keyword">format</span>. But, <span class="hljs-keyword">if</span> \`output_hidden_states == <span class="hljs-keyword">True</span>\`, the data <span class="hljs-keyword">from</span> inside the encoder <span class="hljs-keyword">is</span> returned <span class="hljs-keyword">in</span> [batch, sequence_length, hidden_size] <span class="hljs-keyword">format</span>.

The final output <span class="hljs-keyword">of</span> the encoder <span class="hljs-keyword">is</span> <span class="hljs-keyword">in</span> [batch, sequence_length, hidden_size] <span class="hljs-keyword">format</span>.`}}),{c(){d=a("p"),g=o("Data layouts:"),u=h(),z(c.$$.fragment)},l(t){d=i(t,"P",{});var p=l(d);g=r(p,"Data layouts:"),p.forEach(s),u=m(t),q(c.$$.fragment,t)},m(t,p){k(t,d,p),e(d,g),k(t,u,p),$(c,t,p),f=!0},p:P,i(t){f||(w(c.$$.fragment,t),f=!0)},o(t){v(c.$$.fragment,t),f=!1},d(t){t&&s(d),t&&s(u),y(c,t)}}}function nm(T){let d,g,u,c,f;return{c(){d=a("p"),g=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),u=a("code"),c=o("Module"),f=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(t){d=i(t,"P",{});var p=l(d);g=r(p,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=i(p,"CODE",{});var S=l(u);c=r(S,"Module"),S.forEach(s),f=r(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(s)},m(t,p){k(t,d,p),e(d,g),e(d,u),e(u,c),e(d,f)},d(t){t&&s(d)}}}function om(T){let d,g,u,c,f;return c=new A({props:{code:`from transformers import AutoTokenizer, SqueezeBertForMultipleChoice
import torch

tokenizer = AutoTokenizer.from_pretrained("squeezebert/squeezebert-uncased")
model = SqueezeBertForMultipleChoice.from_pretrained("squeezebert/squeezebert-uncased")

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

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

# the linear classifier still needs to be trained
loss = outputs.loss
logits = outputs.logits`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, SqueezeBertForMultipleChoice
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;squeezebert/squeezebert-uncased&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = SqueezeBertForMultipleChoice.from_pretrained(<span class="hljs-string">&quot;squeezebert/squeezebert-uncased&quot;</span>)

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

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

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># the linear classifier still needs to be trained</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>loss = outputs.loss
<span class="hljs-meta">&gt;&gt;&gt; </span>logits = outputs.logits`}}),{c(){d=a("p"),g=o("Example:"),u=h(),z(c.$$.fragment)},l(t){d=i(t,"P",{});var p=l(d);g=r(p,"Example:"),p.forEach(s),u=m(t),q(c.$$.fragment,t)},m(t,p){k(t,d,p),e(d,g),k(t,u,p),$(c,t,p),f=!0},p:P,i(t){f||(w(c.$$.fragment,t),f=!0)},o(t){v(c.$$.fragment,t),f=!1},d(t){t&&s(d),t&&s(u),y(c,t)}}}function rm(T){let d,g,u,c,f;return c=new A({props:{code:`Internal class hierarchy:
SqueezeBertModel
    SqueezeBertEncoder
        SqueezeBertModule
        SqueezeBertSelfAttention
            ConvActivation
            ConvDropoutLayerNorm`,highlighted:`Internal <span class="hljs-keyword">class</span> <span class="hljs-symbol">hierarchy:
<span class="hljs-symbol">SqueezeBertModel</span></span>
    <span class="hljs-symbol">SqueezeBertEncoder</span>
        <span class="hljs-symbol">SqueezeBertModule</span>
        <span class="hljs-symbol">SqueezeBertSelfAttention</span>
            <span class="hljs-symbol">ConvActivation</span>
            <span class="hljs-symbol">ConvDropoutLayerNorm</span>`}}),{c(){d=a("p"),g=o("Hierarchy:"),u=h(),z(c.$$.fragment)},l(t){d=i(t,"P",{});var p=l(d);g=r(p,"Hierarchy:"),p.forEach(s),u=m(t),q(c.$$.fragment,t)},m(t,p){k(t,d,p),e(d,g),k(t,u,p),$(c,t,p),f=!0},p:P,i(t){f||(w(c.$$.fragment,t),f=!0)},o(t){v(c.$$.fragment,t),f=!1},d(t){t&&s(d),t&&s(u),y(c,t)}}}function am(T){let d,g,u,c,f;return c=new A({props:{code:`Input data is in [batch, sequence_length, hidden_size] format.

Data inside the encoder is in [batch, hidden_size, sequence_length] format. But, if \`output_hidden_states == True\`, the data from inside the encoder is returned in [batch, sequence_length, hidden_size] format.

The final output of the encoder is in [batch, sequence_length, hidden_size] format.`,highlighted:`<span class="hljs-keyword">Input</span> data <span class="hljs-keyword">is</span> <span class="hljs-keyword">in</span> [batch, sequence_length, hidden_size] <span class="hljs-keyword">format</span>.

Data inside the encoder <span class="hljs-keyword">is</span> <span class="hljs-keyword">in</span> [batch, hidden_size, sequence_length] <span class="hljs-keyword">format</span>. But, <span class="hljs-keyword">if</span> \`output_hidden_states == <span class="hljs-keyword">True</span>\`, the data <span class="hljs-keyword">from</span> inside the encoder <span class="hljs-keyword">is</span> returned <span class="hljs-keyword">in</span> [batch, sequence_length, hidden_size] <span class="hljs-keyword">format</span>.

The final output <span class="hljs-keyword">of</span> the encoder <span class="hljs-keyword">is</span> <span class="hljs-keyword">in</span> [batch, sequence_length, hidden_size] <span class="hljs-keyword">format</span>.`}}),{c(){d=a("p"),g=o("Data layouts:"),u=h(),z(c.$$.fragment)},l(t){d=i(t,"P",{});var p=l(d);g=r(p,"Data layouts:"),p.forEach(s),u=m(t),q(c.$$.fragment,t)},m(t,p){k(t,d,p),e(d,g),k(t,u,p),$(c,t,p),f=!0},p:P,i(t){f||(w(c.$$.fragment,t),f=!0)},o(t){v(c.$$.fragment,t),f=!1},d(t){t&&s(d),t&&s(u),y(c,t)}}}function im(T){let d,g,u,c,f;return{c(){d=a("p"),g=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),u=a("code"),c=o("Module"),f=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(t){d=i(t,"P",{});var p=l(d);g=r(p,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=i(p,"CODE",{});var S=l(u);c=r(S,"Module"),S.forEach(s),f=r(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(s)},m(t,p){k(t,d,p),e(d,g),e(d,u),e(u,c),e(d,f)},d(t){t&&s(d)}}}function lm(T){let d,g,u,c,f;return c=new A({props:{code:`from transformers import AutoTokenizer, SqueezeBertForTokenClassification
import torch

tokenizer = AutoTokenizer.from_pretrained("squeezebert/squeezebert-uncased")
model = SqueezeBertForTokenClassification.from_pretrained("squeezebert/squeezebert-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]]

labels = predicted_token_class_ids
loss = model(**inputs, labels=labels).loss`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, SqueezeBertForTokenClassification
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;squeezebert/squeezebert-uncased&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = SqueezeBertForTokenClassification.from_pretrained(<span class="hljs-string">&quot;squeezebert/squeezebert-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>labels = predicted_token_class_ids
<span class="hljs-meta">&gt;&gt;&gt; </span>loss = model(**inputs, labels=labels).loss`}}),{c(){d=a("p"),g=o("Example:"),u=h(),z(c.$$.fragment)},l(t){d=i(t,"P",{});var p=l(d);g=r(p,"Example:"),p.forEach(s),u=m(t),q(c.$$.fragment,t)},m(t,p){k(t,d,p),e(d,g),k(t,u,p),$(c,t,p),f=!0},p:P,i(t){f||(w(c.$$.fragment,t),f=!0)},o(t){v(c.$$.fragment,t),f=!1},d(t){t&&s(d),t&&s(u),y(c,t)}}}function dm(T){let d,g,u,c,f;return c=new A({props:{code:`Internal class hierarchy:
SqueezeBertModel
    SqueezeBertEncoder
        SqueezeBertModule
        SqueezeBertSelfAttention
            ConvActivation
            ConvDropoutLayerNorm`,highlighted:`Internal <span class="hljs-keyword">class</span> <span class="hljs-symbol">hierarchy:
<span class="hljs-symbol">SqueezeBertModel</span></span>
    <span class="hljs-symbol">SqueezeBertEncoder</span>
        <span class="hljs-symbol">SqueezeBertModule</span>
        <span class="hljs-symbol">SqueezeBertSelfAttention</span>
            <span class="hljs-symbol">ConvActivation</span>
            <span class="hljs-symbol">ConvDropoutLayerNorm</span>`}}),{c(){d=a("p"),g=o("Hierarchy:"),u=h(),z(c.$$.fragment)},l(t){d=i(t,"P",{});var p=l(d);g=r(p,"Hierarchy:"),p.forEach(s),u=m(t),q(c.$$.fragment,t)},m(t,p){k(t,d,p),e(d,g),k(t,u,p),$(c,t,p),f=!0},p:P,i(t){f||(w(c.$$.fragment,t),f=!0)},o(t){v(c.$$.fragment,t),f=!1},d(t){t&&s(d),t&&s(u),y(c,t)}}}function cm(T){let d,g,u,c,f;return c=new A({props:{code:`Input data is in [batch, sequence_length, hidden_size] format.

Data inside the encoder is in [batch, hidden_size, sequence_length] format. But, if \`output_hidden_states == True\`, the data from inside the encoder is returned in [batch, sequence_length, hidden_size] format.

The final output of the encoder is in [batch, sequence_length, hidden_size] format.`,highlighted:`<span class="hljs-keyword">Input</span> data <span class="hljs-keyword">is</span> <span class="hljs-keyword">in</span> [batch, sequence_length, hidden_size] <span class="hljs-keyword">format</span>.

Data inside the encoder <span class="hljs-keyword">is</span> <span class="hljs-keyword">in</span> [batch, hidden_size, sequence_length] <span class="hljs-keyword">format</span>. But, <span class="hljs-keyword">if</span> \`output_hidden_states == <span class="hljs-keyword">True</span>\`, the data <span class="hljs-keyword">from</span> inside the encoder <span class="hljs-keyword">is</span> returned <span class="hljs-keyword">in</span> [batch, sequence_length, hidden_size] <span class="hljs-keyword">format</span>.

The final output <span class="hljs-keyword">of</span> the encoder <span class="hljs-keyword">is</span> <span class="hljs-keyword">in</span> [batch, sequence_length, hidden_size] <span class="hljs-keyword">format</span>.`}}),{c(){d=a("p"),g=o("Data layouts:"),u=h(),z(c.$$.fragment)},l(t){d=i(t,"P",{});var p=l(d);g=r(p,"Data layouts:"),p.forEach(s),u=m(t),q(c.$$.fragment,t)},m(t,p){k(t,d,p),e(d,g),k(t,u,p),$(c,t,p),f=!0},p:P,i(t){f||(w(c.$$.fragment,t),f=!0)},o(t){v(c.$$.fragment,t),f=!1},d(t){t&&s(d),t&&s(u),y(c,t)}}}function pm(T){let d,g,u,c,f;return{c(){d=a("p"),g=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),u=a("code"),c=o("Module"),f=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(t){d=i(t,"P",{});var p=l(d);g=r(p,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=i(p,"CODE",{});var S=l(u);c=r(S,"Module"),S.forEach(s),f=r(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(s)},m(t,p){k(t,d,p),e(d,g),e(d,u),e(u,c),e(d,f)},d(t){t&&s(d)}}}function um(T){let d,g,u,c,f;return c=new A({props:{code:`from transformers import AutoTokenizer, SqueezeBertForQuestionAnswering
import torch

tokenizer = AutoTokenizer.from_pretrained("squeezebert/squeezebert-uncased")
model = SqueezeBertForQuestionAnswering.from_pretrained("squeezebert/squeezebert-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]

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

outputs = model(**inputs, start_positions=target_start_index, end_positions=target_end_index)
loss = outputs.loss`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, SqueezeBertForQuestionAnswering
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;squeezebert/squeezebert-uncased&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = SqueezeBertForQuestionAnswering.from_pretrained(<span class="hljs-string">&quot;squeezebert/squeezebert-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><span class="hljs-comment"># target is &quot;nice puppet&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>target_start_index = torch.tensor([<span class="hljs-number">14</span>])
<span class="hljs-meta">&gt;&gt;&gt; </span>target_end_index = torch.tensor([<span class="hljs-number">15</span>])

<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs, start_positions=target_start_index, end_positions=target_end_index)
<span class="hljs-meta">&gt;&gt;&gt; </span>loss = outputs.loss`}}),{c(){d=a("p"),g=o("Example:"),u=h(),z(c.$$.fragment)},l(t){d=i(t,"P",{});var p=l(d);g=r(p,"Example:"),p.forEach(s),u=m(t),q(c.$$.fragment,t)},m(t,p){k(t,d,p),e(d,g),k(t,u,p),$(c,t,p),f=!0},p:P,i(t){f||(w(c.$$.fragment,t),f=!0)},o(t){v(c.$$.fragment,t),f=!1},d(t){t&&s(d),t&&s(u),y(c,t)}}}function hm(T){let d,g,u,c,f,t,p,S,ya,hr,ce,Ce,Rn,St,Ta,Wn,Sa,mr,oe,Ba,Bt,Ea,ja,Et,xa,Ma,fr,nn,Fa,gr,on,Kn,Ca,_r,rn,Pa,br,re,Hn,Aa,La,Qn,Ia,Na,jt,Da,Un,Oa,Ra,kr,Pe,Wa,xt,Ka,Ha,zr,pe,Ae,Vn,Mt,Qa,Gn,Ua,qr,H,Ft,Va,ue,Ga,an,Ja,Xa,Ct,Ya,Za,ei,he,ti,ln,si,ni,dn,oi,ri,ai,Le,ii,Jn,li,$r,me,Ie,Xn,Pt,di,Yn,ci,wr,I,At,pi,Zn,ui,hi,Lt,mi,cn,fi,gi,_i,ae,It,bi,eo,ki,zi,Nt,pn,qi,to,$i,wi,un,vi,so,yi,Ti,Ne,Dt,Si,Ot,Bi,no,Ei,ji,xi,J,Rt,Mi,oo,Fi,Ci,De,Pi,fe,Ai,ro,Li,Ii,ao,Ni,Di,Oi,hn,Wt,vr,ge,Oe,io,Kt,Ri,lo,Wi,yr,Q,Ht,Ki,Qt,Hi,co,Qi,Ui,Vi,Ut,Gi,mn,Ji,Xi,Yi,ie,Vt,Zi,po,el,tl,Gt,fn,sl,uo,nl,ol,gn,rl,ho,al,il,X,Jt,ll,mo,dl,cl,Re,pl,_e,ul,fo,hl,ml,go,fl,gl,Tr,be,We,_o,Xt,_l,bo,bl,Sr,B,Yt,kl,ko,zl,ql,Zt,$l,es,wl,vl,yl,ts,Tl,_n,Sl,Bl,El,ss,jl,ns,xl,Ml,Fl,os,Cl,zo,Pl,Al,Ll,Ke,Il,He,Nl,Y,rs,Dl,ke,Ol,bn,Rl,Wl,qo,Kl,Hl,Ql,Qe,Ul,Ue,Br,ze,Ve,$o,as,Vl,wo,Gl,Er,E,is,Jl,ls,Xl,vo,Yl,Zl,ed,ds,td,cs,sd,nd,od,ps,rd,kn,ad,id,ld,us,dd,hs,cd,pd,ud,ms,hd,yo,md,fd,gd,Ge,_d,Je,bd,Z,fs,kd,qe,zd,zn,qd,$d,To,wd,vd,yd,Xe,Td,Ye,jr,$e,Ze,So,gs,Sd,Bo,Bd,xr,j,_s,Ed,Eo,jd,xd,bs,Md,ks,Fd,Cd,Pd,zs,Ad,qn,Ld,Id,Nd,qs,Dd,$s,Od,Rd,Wd,ws,Kd,jo,Hd,Qd,Ud,et,Vd,tt,Gd,U,vs,Jd,we,Xd,$n,Yd,Zd,xo,ec,tc,sc,st,nc,nt,oc,ot,Mr,ve,rt,Mo,ys,rc,Fo,ac,Fr,x,Ts,ic,Co,lc,dc,Ss,cc,Bs,pc,uc,hc,Es,mc,wn,fc,gc,_c,js,bc,xs,kc,zc,qc,Ms,$c,Po,wc,vc,yc,at,Tc,it,Sc,ee,Fs,Bc,ye,Ec,vn,jc,xc,Ao,Mc,Fc,Cc,lt,Pc,dt,Cr,Te,ct,Lo,Cs,Ac,Io,Lc,Pr,M,Ps,Ic,No,Nc,Dc,As,Oc,Ls,Rc,Wc,Kc,Is,Hc,yn,Qc,Uc,Vc,Ns,Gc,Ds,Jc,Xc,Yc,Os,Zc,Do,ep,tp,sp,pt,np,ut,op,te,Rs,rp,Se,ap,Tn,ip,lp,Oo,dp,cp,pp,ht,up,mt,Ar,Be,ft,Ro,Ws,hp,Wo,mp,Lr,F,Ks,fp,Ee,gp,Ko,_p,bp,Ho,kp,zp,qp,Hs,$p,Qs,wp,vp,yp,Us,Tp,Sn,Sp,Bp,Ep,Vs,jp,Gs,xp,Mp,Fp,Js,Cp,Qo,Pp,Ap,Lp,gt,Ip,_t,Np,se,Xs,Dp,je,Op,Bn,Rp,Wp,Uo,Kp,Hp,Qp,bt,Up,kt,Ir;return t=new ne({}),St=new ne({}),Mt=new ne({}),Ft=new L({props:{name:"class transformers.SqueezeBertConfig",anchor:"transformers.SqueezeBertConfig",parameters:[{name:"vocab_size",val:" = 30522"},{name:"hidden_size",val:" = 768"},{name:"num_hidden_layers",val:" = 12"},{name:"num_attention_heads",val:" = 12"},{name:"intermediate_size",val:" = 3072"},{name:"hidden_act",val:" = 'gelu'"},{name:"hidden_dropout_prob",val:" = 0.1"},{name:"attention_probs_dropout_prob",val:" = 0.1"},{name:"max_position_embeddings",val:" = 512"},{name:"type_vocab_size",val:" = 2"},{name:"initializer_range",val:" = 0.02"},{name:"layer_norm_eps",val:" = 1e-12"},{name:"pad_token_id",val:" = 0"},{name:"embedding_size",val:" = 768"},{name:"q_groups",val:" = 4"},{name:"k_groups",val:" = 4"},{name:"v_groups",val:" = 4"},{name:"post_attention_groups",val:" = 1"},{name:"intermediate_groups",val:" = 4"},{name:"output_groups",val:" = 4"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.SqueezeBertConfig.vocab_size",description:`<strong>vocab_size</strong> (<code>int</code>, <em>optional</em>, defaults to 30522) &#x2014;
Vocabulary size of the SqueezeBERT model. Defines the number of different tokens that can be represented by
the <code>inputs_ids</code> passed when calling <a href="/docs/transformers/main/en/model_doc/squeezebert#transformers.SqueezeBertModel">SqueezeBertModel</a>.`,name:"vocab_size"},{anchor:"transformers.SqueezeBertConfig.hidden_size",description:`<strong>hidden_size</strong> (<code>int</code>, <em>optional</em>, defaults to 768) &#x2014;
Dimensionality of the encoder layers and the pooler layer.`,name:"hidden_size"},{anchor:"transformers.SqueezeBertConfig.num_hidden_layers",description:`<strong>num_hidden_layers</strong> (<code>int</code>, <em>optional</em>, defaults to 12) &#x2014;
Number of hidden layers in the Transformer encoder.`,name:"num_hidden_layers"},{anchor:"transformers.SqueezeBertConfig.num_attention_heads",description:`<strong>num_attention_heads</strong> (<code>int</code>, <em>optional</em>, defaults to 12) &#x2014;
Number of attention heads for each attention layer in the Transformer encoder.`,name:"num_attention_heads"},{anchor:"transformers.SqueezeBertConfig.intermediate_size",description:`<strong>intermediate_size</strong> (<code>int</code>, <em>optional</em>, defaults to 3072) &#x2014;
Dimensionality of the &#x201C;intermediate&#x201D; (often named feed-forward) layer in the Transformer encoder.`,name:"intermediate_size"},{anchor:"transformers.SqueezeBertConfig.hidden_act",description:`<strong>hidden_act</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:"hidden_act"},{anchor:"transformers.SqueezeBertConfig.hidden_dropout_prob",description:`<strong>hidden_dropout_prob</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:"hidden_dropout_prob"},{anchor:"transformers.SqueezeBertConfig.attention_probs_dropout_prob",description:`<strong>attention_probs_dropout_prob</strong> (<code>float</code>, <em>optional</em>, defaults to 0.1) &#x2014;
The dropout ratio for the attention probabilities.`,name:"attention_probs_dropout_prob"},{anchor:"transformers.SqueezeBertConfig.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.SqueezeBertConfig.type_vocab_size",description:`<strong>type_vocab_size</strong> (<code>int</code>, <em>optional</em>, defaults to 2) &#x2014;
The vocabulary size of the <code>token_type_ids</code> passed when calling <a href="/docs/transformers/main/en/model_doc/bert#transformers.BertModel">BertModel</a> or <a href="/docs/transformers/main/en/model_doc/bert#transformers.TFBertModel">TFBertModel</a>.`,name:"type_vocab_size"},{anchor:"transformers.SqueezeBertConfig.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.SqueezeBertConfig.layer_norm_eps",description:"<strong>layer_norm_eps</strong> (<code>float</code>, <em>optional</em>, defaults to 1e-12) &#x2014;",name:"layer_norm_eps"},{anchor:"transformers.SqueezeBertConfig.pad_token_id",description:`<strong>pad_token_id</strong> (<code>int</code>, <em>optional</em>, defaults to 0) &#x2014;
The ID of the token in the word embedding to use as padding.`,name:"pad_token_id"},{anchor:"transformers.SqueezeBertConfig.embedding_size",description:`<strong>embedding_size</strong> (<code>int</code>, <em>optional</em>, defaults to 768) &#x2014;
The dimension of the word embedding vectors.`,name:"embedding_size"},{anchor:"transformers.SqueezeBertConfig.q_groups",description:`<strong>q_groups</strong> (<code>int</code>, <em>optional</em>, defaults to 4) &#x2014;
The number of groups in Q layer.`,name:"q_groups"},{anchor:"transformers.SqueezeBertConfig.k_groups",description:`<strong>k_groups</strong> (<code>int</code>, <em>optional</em>, defaults to 4) &#x2014;
The number of groups in K layer.`,name:"k_groups"},{anchor:"transformers.SqueezeBertConfig.v_groups",description:`<strong>v_groups</strong> (<code>int</code>, <em>optional</em>, defaults to 4) &#x2014;
The number of groups in V layer.`,name:"v_groups"},{anchor:"transformers.SqueezeBertConfig.post_attention_groups",description:`<strong>post_attention_groups</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
The number of groups in the first feed forward network layer.`,name:"post_attention_groups"},{anchor:"transformers.SqueezeBertConfig.intermediate_groups",description:`<strong>intermediate_groups</strong> (<code>int</code>, <em>optional</em>, defaults to 4) &#x2014;
The number of groups in the second feed forward network layer.`,name:"intermediate_groups"},{anchor:"transformers.SqueezeBertConfig.output_groups",description:`<strong>output_groups</strong> (<code>int</code>, <em>optional</em>, defaults to 4) &#x2014;
The number of groups in the third feed forward network layer.`,name:"output_groups"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/squeezebert/configuration_squeezebert.py#L37"}}),Le=new C({props:{anchor:"transformers.SqueezeBertConfig.example",$$slots:{default:[Nh]},$$scope:{ctx:T}}}),Pt=new ne({}),At=new L({props:{name:"class transformers.SqueezeBertTokenizer",anchor:"transformers.SqueezeBertTokenizer",parameters:[{name:"vocab_file",val:""},{name:"do_lower_case",val:" = True"},{name:"do_basic_tokenize",val:" = True"},{name:"never_split",val:" = None"},{name:"unk_token",val:" = '[UNK]'"},{name:"sep_token",val:" = '[SEP]'"},{name:"pad_token",val:" = '[PAD]'"},{name:"cls_token",val:" = '[CLS]'"},{name:"mask_token",val:" = '[MASK]'"},{name:"tokenize_chinese_chars",val:" = True"},{name:"strip_accents",val:" = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.SqueezeBertTokenizer.vocab_file",description:`<strong>vocab_file</strong> (<code>str</code>) &#x2014;
File containing the vocabulary.`,name:"vocab_file"},{anchor:"transformers.SqueezeBertTokenizer.do_lower_case",description:`<strong>do_lower_case</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to lowercase the input when tokenizing.`,name:"do_lower_case"},{anchor:"transformers.SqueezeBertTokenizer.do_basic_tokenize",description:`<strong>do_basic_tokenize</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to do basic tokenization before WordPiece.`,name:"do_basic_tokenize"},{anchor:"transformers.SqueezeBertTokenizer.never_split",description:`<strong>never_split</strong> (<code>Iterable</code>, <em>optional</em>) &#x2014;
Collection of tokens which will never be split during tokenization. Only has an effect when
<code>do_basic_tokenize=True</code>`,name:"never_split"},{anchor:"transformers.SqueezeBertTokenizer.unk_token",description:`<strong>unk_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;[UNK]&quot;</code>) &#x2014;
The unknown token. A token that is not in the vocabulary cannot be converted to an ID and is set to be this
token instead.`,name:"unk_token"},{anchor:"transformers.SqueezeBertTokenizer.sep_token",description:`<strong>sep_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;[SEP]&quot;</code>) &#x2014;
The separator token, which is used when building a sequence from multiple sequences, e.g. two sequences for
sequence classification or for a text and a question for question answering. It is also used as the last
token of a sequence built with special tokens.`,name:"sep_token"},{anchor:"transformers.SqueezeBertTokenizer.pad_token",description:`<strong>pad_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;[PAD]&quot;</code>) &#x2014;
The token used for padding, for example when batching sequences of different lengths.`,name:"pad_token"},{anchor:"transformers.SqueezeBertTokenizer.cls_token",description:`<strong>cls_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;[CLS]&quot;</code>) &#x2014;
The classifier token which is used when doing sequence classification (classification of the whole sequence
instead of per-token classification). It is the first token of the sequence when built with special tokens.`,name:"cls_token"},{anchor:"transformers.SqueezeBertTokenizer.mask_token",description:`<strong>mask_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;[MASK]&quot;</code>) &#x2014;
The token used for masking values. This is the token used when training this model with masked language
modeling. This is the token which the model will try to predict.`,name:"mask_token"},{anchor:"transformers.SqueezeBertTokenizer.tokenize_chinese_chars",description:`<strong>tokenize_chinese_chars</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to tokenize Chinese characters.</p>
<p>This should likely be deactivated for Japanese (see this
<a href="https://github.com/huggingface/transformers/issues/328" rel="nofollow">issue</a>).`,name:"tokenize_chinese_chars"},{anchor:"transformers.SqueezeBertTokenizer.strip_accents",description:`<strong>strip_accents</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to strip all accents. If this option is not specified, then it will be determined by the
value for <code>lowercase</code> (as in the original SqueezeBERT).`,name:"strip_accents"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/squeezebert/tokenization_squeezebert.py#L79"}}),It=new L({props:{name:"build_inputs_with_special_tokens",anchor:"transformers.SqueezeBertTokenizer.build_inputs_with_special_tokens",parameters:[{name:"token_ids_0",val:": typing.List[int]"},{name:"token_ids_1",val:": typing.Optional[typing.List[int]] = None"}],parametersDescription:[{anchor:"transformers.SqueezeBertTokenizer.build_inputs_with_special_tokens.token_ids_0",description:`<strong>token_ids_0</strong> (<code>List[int]</code>) &#x2014;
List of IDs to which the special tokens will be added.`,name:"token_ids_0"},{anchor:"transformers.SqueezeBertTokenizer.build_inputs_with_special_tokens.token_ids_1",description:`<strong>token_ids_1</strong> (<code>List[int]</code>, <em>optional</em>) &#x2014;
Optional second list of IDs for sequence pairs.`,name:"token_ids_1"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/squeezebert/tokenization_squeezebert.py#L210",returnDescription:`
<p>List of <a href="../glossary#input-ids">input IDs</a> with the appropriate special tokens.</p>
`,returnType:`
<p><code>List[int]</code></p>
`}}),Dt=new L({props:{name:"get_special_tokens_mask",anchor:"transformers.SqueezeBertTokenizer.get_special_tokens_mask",parameters:[{name:"token_ids_0",val:": typing.List[int]"},{name:"token_ids_1",val:": typing.Optional[typing.List[int]] = None"},{name:"already_has_special_tokens",val:": bool = False"}],parametersDescription:[{anchor:"transformers.SqueezeBertTokenizer.get_special_tokens_mask.token_ids_0",description:`<strong>token_ids_0</strong> (<code>List[int]</code>) &#x2014;
List of IDs.`,name:"token_ids_0"},{anchor:"transformers.SqueezeBertTokenizer.get_special_tokens_mask.token_ids_1",description:`<strong>token_ids_1</strong> (<code>List[int]</code>, <em>optional</em>) &#x2014;
Optional second list of IDs for sequence pairs.`,name:"token_ids_1"},{anchor:"transformers.SqueezeBertTokenizer.get_special_tokens_mask.already_has_special_tokens",description:`<strong>already_has_special_tokens</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not the token list is already formatted with special tokens for the model.`,name:"already_has_special_tokens"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/squeezebert/tokenization_squeezebert.py#L235",returnDescription:`
<p>A list of integers in the range [0, 1]: 1 for a special token, 0 for a sequence token.</p>
`,returnType:`
<p><code>List[int]</code></p>
`}}),Rt=new L({props:{name:"create_token_type_ids_from_sequences",anchor:"transformers.SqueezeBertTokenizer.create_token_type_ids_from_sequences",parameters:[{name:"token_ids_0",val:": typing.List[int]"},{name:"token_ids_1",val:": typing.Optional[typing.List[int]] = None"}],parametersDescription:[{anchor:"transformers.SqueezeBertTokenizer.create_token_type_ids_from_sequences.token_ids_0",description:`<strong>token_ids_0</strong> (<code>List[int]</code>) &#x2014;
List of IDs.`,name:"token_ids_0"},{anchor:"transformers.SqueezeBertTokenizer.create_token_type_ids_from_sequences.token_ids_1",description:`<strong>token_ids_1</strong> (<code>List[int]</code>, <em>optional</em>) &#x2014;
Optional second list of IDs for sequence pairs.`,name:"token_ids_1"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/squeezebert/tokenization_squeezebert.py#L263",returnDescription:`
<p>List of <a href="../glossary#token-type-ids">token type IDs</a> according to the given sequence(s).</p>
`,returnType:`
<p><code>List[int]</code></p>
`}}),De=new C({props:{anchor:"transformers.SqueezeBertTokenizer.create_token_type_ids_from_sequences.example",$$slots:{default:[Dh]},$$scope:{ctx:T}}}),Wt=new L({props:{name:"save_vocabulary",anchor:"transformers.SqueezeBertTokenizer.save_vocabulary",parameters:[{name:"save_directory",val:": str"},{name:"filename_prefix",val:": typing.Optional[str] = None"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/squeezebert/tokenization_squeezebert.py#L292"}}),Kt=new ne({}),Ht=new L({props:{name:"class transformers.SqueezeBertTokenizerFast",anchor:"transformers.SqueezeBertTokenizerFast",parameters:[{name:"vocab_file",val:" = None"},{name:"tokenizer_file",val:" = None"},{name:"do_lower_case",val:" = True"},{name:"unk_token",val:" = '[UNK]'"},{name:"sep_token",val:" = '[SEP]'"},{name:"pad_token",val:" = '[PAD]'"},{name:"cls_token",val:" = '[CLS]'"},{name:"mask_token",val:" = '[MASK]'"},{name:"tokenize_chinese_chars",val:" = True"},{name:"strip_accents",val:" = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.SqueezeBertTokenizerFast.vocab_file",description:`<strong>vocab_file</strong> (<code>str</code>) &#x2014;
File containing the vocabulary.`,name:"vocab_file"},{anchor:"transformers.SqueezeBertTokenizerFast.do_lower_case",description:`<strong>do_lower_case</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to lowercase the input when tokenizing.`,name:"do_lower_case"},{anchor:"transformers.SqueezeBertTokenizerFast.unk_token",description:`<strong>unk_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;[UNK]&quot;</code>) &#x2014;
The unknown token. A token that is not in the vocabulary cannot be converted to an ID and is set to be this
token instead.`,name:"unk_token"},{anchor:"transformers.SqueezeBertTokenizerFast.sep_token",description:`<strong>sep_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;[SEP]&quot;</code>) &#x2014;
The separator token, which is used when building a sequence from multiple sequences, e.g. two sequences for
sequence classification or for a text and a question for question answering. It is also used as the last
token of a sequence built with special tokens.`,name:"sep_token"},{anchor:"transformers.SqueezeBertTokenizerFast.pad_token",description:`<strong>pad_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;[PAD]&quot;</code>) &#x2014;
The token used for padding, for example when batching sequences of different lengths.`,name:"pad_token"},{anchor:"transformers.SqueezeBertTokenizerFast.cls_token",description:`<strong>cls_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;[CLS]&quot;</code>) &#x2014;
The classifier token which is used when doing sequence classification (classification of the whole sequence
instead of per-token classification). It is the first token of the sequence when built with special tokens.`,name:"cls_token"},{anchor:"transformers.SqueezeBertTokenizerFast.mask_token",description:`<strong>mask_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;[MASK]&quot;</code>) &#x2014;
The token used for masking values. This is the token used when training this model with masked language
modeling. This is the token which the model will try to predict.`,name:"mask_token"},{anchor:"transformers.SqueezeBertTokenizerFast.clean_text",description:`<strong>clean_text</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to clean the text before tokenization by removing any control characters and replacing all
whitespaces by the classic one.`,name:"clean_text"},{anchor:"transformers.SqueezeBertTokenizerFast.tokenize_chinese_chars",description:`<strong>tokenize_chinese_chars</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to tokenize Chinese characters. This should likely be deactivated for Japanese (see <a href="https://github.com/huggingface/transformers/issues/328" rel="nofollow">this
issue</a>).`,name:"tokenize_chinese_chars"},{anchor:"transformers.SqueezeBertTokenizerFast.strip_accents",description:`<strong>strip_accents</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to strip all accents. If this option is not specified, then it will be determined by the
value for <code>lowercase</code> (as in the original SqueezeBERT).`,name:"strip_accents"},{anchor:"transformers.SqueezeBertTokenizerFast.wordpieces_prefix",description:`<strong>wordpieces_prefix</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;##&quot;</code>) &#x2014;
The prefix for subwords.`,name:"wordpieces_prefix"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/squeezebert/tokenization_squeezebert_fast.py#L69"}}),Vt=new L({props:{name:"build_inputs_with_special_tokens",anchor:"transformers.SqueezeBertTokenizerFast.build_inputs_with_special_tokens",parameters:[{name:"token_ids_0",val:""},{name:"token_ids_1",val:" = None"}],parametersDescription:[{anchor:"transformers.SqueezeBertTokenizerFast.build_inputs_with_special_tokens.token_ids_0",description:`<strong>token_ids_0</strong> (<code>List[int]</code>) &#x2014;
List of IDs to which the special tokens will be added.`,name:"token_ids_0"},{anchor:"transformers.SqueezeBertTokenizerFast.build_inputs_with_special_tokens.token_ids_1",description:`<strong>token_ids_1</strong> (<code>List[int]</code>, <em>optional</em>) &#x2014;
Optional second list of IDs for sequence pairs.`,name:"token_ids_1"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/squeezebert/tokenization_squeezebert_fast.py#L157",returnDescription:`
<p>List of <a href="../glossary#input-ids">input IDs</a> with the appropriate special tokens.</p>
`,returnType:`
<p><code>List[int]</code></p>
`}}),Jt=new L({props:{name:"create_token_type_ids_from_sequences",anchor:"transformers.SqueezeBertTokenizerFast.create_token_type_ids_from_sequences",parameters:[{name:"token_ids_0",val:": typing.List[int]"},{name:"token_ids_1",val:": typing.Optional[typing.List[int]] = None"}],parametersDescription:[{anchor:"transformers.SqueezeBertTokenizerFast.create_token_type_ids_from_sequences.token_ids_0",description:`<strong>token_ids_0</strong> (<code>List[int]</code>) &#x2014;
List of IDs.`,name:"token_ids_0"},{anchor:"transformers.SqueezeBertTokenizerFast.create_token_type_ids_from_sequences.token_ids_1",description:`<strong>token_ids_1</strong> (<code>List[int]</code>, <em>optional</em>) &#x2014;
Optional second list of IDs for sequence pairs.`,name:"token_ids_1"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/squeezebert/tokenization_squeezebert_fast.py#L181",returnDescription:`
<p>List of <a href="../glossary#token-type-ids">token type IDs</a> according to the given sequence(s).</p>
`,returnType:`
<p><code>List[int]</code></p>
`}}),Re=new C({props:{anchor:"transformers.SqueezeBertTokenizerFast.create_token_type_ids_from_sequences.example",$$slots:{default:[Oh]},$$scope:{ctx:T}}}),Xt=new ne({}),Yt=new L({props:{name:"class transformers.SqueezeBertModel",anchor:"transformers.SqueezeBertModel",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.SqueezeBertModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/squeezebert#transformers.SqueezeBertConfig">SqueezeBertConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/squeezebert/modeling_squeezebert.py#L548"}}),Ke=new C({props:{anchor:"transformers.SqueezeBertModel.example",$$slots:{default:[Rh]},$$scope:{ctx:T}}}),He=new C({props:{anchor:"transformers.SqueezeBertModel.example-2",$$slots:{default:[Wh]},$$scope:{ctx:T}}}),rs=new L({props:{name:"forward",anchor:"transformers.SqueezeBertModel.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"token_type_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"position_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.FloatTensor] = 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.SqueezeBertModel.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.SqueezeBertModel.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.SqueezeBertModel.forward.token_type_ids",description:`<strong>token_type_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.SqueezeBertModel.forward.position_ids",description:`<strong>position_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.SqueezeBertModel.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.SqueezeBertModel.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.SqueezeBertModel.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.SqueezeBertModel.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.SqueezeBertModel.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/squeezebert/modeling_squeezebert.py#L573",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.BaseModelOutputWithPooling"
>transformers.modeling_outputs.BaseModelOutputWithPooling</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/main/en/model_doc/squeezebert#transformers.SqueezeBertConfig"
>SqueezeBertConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>last_hidden_state</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>) \u2014 Sequence of hidden-states at the output of the last layer of the model.</p>
</li>
<li>
<p><strong>pooler_output</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, hidden_size)</code>) \u2014 Last layer hidden-state of the first token of the sequence (classification token) after further processing
through the layers used for the auxiliary pretraining task. E.g. for BERT-family of models, this returns
the classification token after processing through a linear layer and a tanh activation function. The linear
layer weights are trained from the next sentence prediction (classification) objective during pretraining.</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.BaseModelOutputWithPooling"
>transformers.modeling_outputs.BaseModelOutputWithPooling</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Qe=new On({props:{$$slots:{default:[Kh]},$$scope:{ctx:T}}}),Ue=new C({props:{anchor:"transformers.SqueezeBertModel.forward.example",$$slots:{default:[Hh]},$$scope:{ctx:T}}}),as=new ne({}),is=new L({props:{name:"class transformers.SqueezeBertForMaskedLM",anchor:"transformers.SqueezeBertForMaskedLM",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.SqueezeBertForMaskedLM.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/squeezebert#transformers.SqueezeBertConfig">SqueezeBertConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/squeezebert/modeling_squeezebert.py#L647"}}),Ge=new C({props:{anchor:"transformers.SqueezeBertForMaskedLM.example",$$slots:{default:[Qh]},$$scope:{ctx:T}}}),Je=new C({props:{anchor:"transformers.SqueezeBertForMaskedLM.example-2",$$slots:{default:[Uh]},$$scope:{ctx:T}}}),fs=new L({props:{name:"forward",anchor:"transformers.SqueezeBertForMaskedLM.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"token_type_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"position_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.Tensor] = None"},{name:"labels",val:": typing.Optional[torch.Tensor] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.SqueezeBertForMaskedLM.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.SqueezeBertForMaskedLM.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.SqueezeBertForMaskedLM.forward.token_type_ids",description:`<strong>token_type_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.SqueezeBertForMaskedLM.forward.position_ids",description:`<strong>position_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.SqueezeBertForMaskedLM.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.SqueezeBertForMaskedLM.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.SqueezeBertForMaskedLM.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.SqueezeBertForMaskedLM.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.SqueezeBertForMaskedLM.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.SqueezeBertForMaskedLM.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Labels for computing the masked language modeling loss. Indices should be in <code>[-100, 0, ..., config.vocab_size]</code> (see <code>input_ids</code> docstring) Tokens with indices set to <code>-100</code> are ignored (masked), the
loss is only computed for the tokens with labels in <code>[0, ..., config.vocab_size]</code>`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/squeezebert/modeling_squeezebert.py#L670",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.MaskedLMOutput"
>transformers.modeling_outputs.MaskedLMOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/main/en/model_doc/squeezebert#transformers.SqueezeBertConfig"
>SqueezeBertConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Masked language modeling (MLM) loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, config.vocab_size)</code>) \u2014 Prediction scores of the language modeling head (scores for each vocabulary token before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.MaskedLMOutput"
>transformers.modeling_outputs.MaskedLMOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Xe=new On({props:{$$slots:{default:[Vh]},$$scope:{ctx:T}}}),Ye=new C({props:{anchor:"transformers.SqueezeBertForMaskedLM.forward.example",$$slots:{default:[Gh]},$$scope:{ctx:T}}}),gs=new ne({}),_s=new L({props:{name:"class transformers.SqueezeBertForSequenceClassification",anchor:"transformers.SqueezeBertForSequenceClassification",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.SqueezeBertForSequenceClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/squeezebert#transformers.SqueezeBertConfig">SqueezeBertConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/squeezebert/modeling_squeezebert.py#L736"}}),et=new C({props:{anchor:"transformers.SqueezeBertForSequenceClassification.example",$$slots:{default:[Jh]},$$scope:{ctx:T}}}),tt=new C({props:{anchor:"transformers.SqueezeBertForSequenceClassification.example-2",$$slots:{default:[Xh]},$$scope:{ctx:T}}}),vs=new L({props:{name:"forward",anchor:"transformers.SqueezeBertForSequenceClassification.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"token_type_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"position_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.Tensor] = None"},{name:"labels",val:": typing.Optional[torch.Tensor] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.SqueezeBertForSequenceClassification.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.SqueezeBertForSequenceClassification.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.SqueezeBertForSequenceClassification.forward.token_type_ids",description:`<strong>token_type_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.SqueezeBertForSequenceClassification.forward.position_ids",description:`<strong>position_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.SqueezeBertForSequenceClassification.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.SqueezeBertForSequenceClassification.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.SqueezeBertForSequenceClassification.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.SqueezeBertForSequenceClassification.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.SqueezeBertForSequenceClassification.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.SqueezeBertForSequenceClassification.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for computing the sequence classification/regression loss. Indices should be in <code>[0, ..., config.num_labels - 1]</code>. If <code>config.num_labels == 1</code> a regression loss is computed (Mean-Square loss), If
<code>config.num_labels &gt; 1</code> a classification loss is computed (Cross-Entropy).`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/squeezebert/modeling_squeezebert.py#L749",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.SequenceClassifierOutput"
>transformers.modeling_outputs.SequenceClassifierOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/main/en/model_doc/squeezebert#transformers.SqueezeBertConfig"
>SqueezeBertConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Classification (or regression if config.num_labels==1) loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, config.num_labels)</code>) \u2014 Classification (or regression if config.num_labels==1) scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.SequenceClassifierOutput"
>transformers.modeling_outputs.SequenceClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),st=new On({props:{$$slots:{default:[Yh]},$$scope:{ctx:T}}}),nt=new C({props:{anchor:"transformers.SqueezeBertForSequenceClassification.forward.example",$$slots:{default:[Zh]},$$scope:{ctx:T}}}),ot=new C({props:{anchor:"transformers.SqueezeBertForSequenceClassification.forward.example-2",$$slots:{default:[em]},$$scope:{ctx:T}}}),ys=new ne({}),Ts=new L({props:{name:"class transformers.SqueezeBertForMultipleChoice",anchor:"transformers.SqueezeBertForMultipleChoice",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.SqueezeBertForMultipleChoice.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/squeezebert#transformers.SqueezeBertConfig">SqueezeBertConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/squeezebert/modeling_squeezebert.py#L835"}}),at=new C({props:{anchor:"transformers.SqueezeBertForMultipleChoice.example",$$slots:{default:[tm]},$$scope:{ctx:T}}}),it=new C({props:{anchor:"transformers.SqueezeBertForMultipleChoice.example-2",$$slots:{default:[sm]},$$scope:{ctx:T}}}),Fs=new L({props:{name:"forward",anchor:"transformers.SqueezeBertForMultipleChoice.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"token_type_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"position_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.Tensor] = None"},{name:"labels",val:": typing.Optional[torch.Tensor] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.SqueezeBertForMultipleChoice.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, num_choices, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.SqueezeBertForMultipleChoice.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.SqueezeBertForMultipleChoice.forward.token_type_ids",description:`<strong>token_type_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, num_choices, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.SqueezeBertForMultipleChoice.forward.position_ids",description:`<strong>position_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, num_choices, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.SqueezeBertForMultipleChoice.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.SqueezeBertForMultipleChoice.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.SqueezeBertForMultipleChoice.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.SqueezeBertForMultipleChoice.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.SqueezeBertForMultipleChoice.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.SqueezeBertForMultipleChoice.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 <em>num_choices</em> is the size of the second dimension of the input tensors. (see
<em>input_ids</em> above)`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/squeezebert/modeling_squeezebert.py#L846",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.MultipleChoiceModelOutput"
>transformers.modeling_outputs.MultipleChoiceModelOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/main/en/model_doc/squeezebert#transformers.SqueezeBertConfig"
>SqueezeBertConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <em>(1,)</em>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Classification loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_choices)</code>) \u2014 <em>num_choices</em> is the second dimension of the input tensors. (see <em>input_ids</em> above).</p>
<p>Classification scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.MultipleChoiceModelOutput"
>transformers.modeling_outputs.MultipleChoiceModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),lt=new On({props:{$$slots:{default:[nm]},$$scope:{ctx:T}}}),dt=new C({props:{anchor:"transformers.SqueezeBertForMultipleChoice.forward.example",$$slots:{default:[om]},$$scope:{ctx:T}}}),Cs=new ne({}),Ps=new L({props:{name:"class transformers.SqueezeBertForTokenClassification",anchor:"transformers.SqueezeBertForTokenClassification",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.SqueezeBertForTokenClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/squeezebert#transformers.SqueezeBertConfig">SqueezeBertConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/squeezebert/modeling_squeezebert.py#L928"}}),pt=new C({props:{anchor:"transformers.SqueezeBertForTokenClassification.example",$$slots:{default:[rm]},$$scope:{ctx:T}}}),ut=new C({props:{anchor:"transformers.SqueezeBertForTokenClassification.example-2",$$slots:{default:[am]},$$scope:{ctx:T}}}),Rs=new L({props:{name:"forward",anchor:"transformers.SqueezeBertForTokenClassification.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"token_type_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"position_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.Tensor] = None"},{name:"labels",val:": typing.Optional[torch.Tensor] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.SqueezeBertForTokenClassification.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.SqueezeBertForTokenClassification.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.SqueezeBertForTokenClassification.forward.token_type_ids",description:`<strong>token_type_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.SqueezeBertForTokenClassification.forward.position_ids",description:`<strong>position_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.SqueezeBertForTokenClassification.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.SqueezeBertForTokenClassification.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.SqueezeBertForTokenClassification.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.SqueezeBertForTokenClassification.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.SqueezeBertForTokenClassification.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.SqueezeBertForTokenClassification.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Labels for computing the token classification loss. Indices should be in <code>[0, ..., config.num_labels - 1]</code>.`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/squeezebert/modeling_squeezebert.py#L940",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.TokenClassifierOutput"
>transformers.modeling_outputs.TokenClassifierOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/main/en/model_doc/squeezebert#transformers.SqueezeBertConfig"
>SqueezeBertConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided)  \u2014 Classification loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, config.num_labels)</code>) \u2014 Classification scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.TokenClassifierOutput"
>transformers.modeling_outputs.TokenClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),ht=new On({props:{$$slots:{default:[im]},$$scope:{ctx:T}}}),mt=new C({props:{anchor:"transformers.SqueezeBertForTokenClassification.forward.example",$$slots:{default:[lm]},$$scope:{ctx:T}}}),Ws=new ne({}),Ks=new L({props:{name:"class transformers.SqueezeBertForQuestionAnswering",anchor:"transformers.SqueezeBertForQuestionAnswering",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.SqueezeBertForQuestionAnswering.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/squeezebert#transformers.SqueezeBertConfig">SqueezeBertConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/squeezebert/modeling_squeezebert.py#L1006"}}),gt=new C({props:{anchor:"transformers.SqueezeBertForQuestionAnswering.example",$$slots:{default:[dm]},$$scope:{ctx:T}}}),_t=new C({props:{anchor:"transformers.SqueezeBertForQuestionAnswering.example-2",$$slots:{default:[cm]},$$scope:{ctx:T}}}),Xs=new L({props:{name:"forward",anchor:"transformers.SqueezeBertForQuestionAnswering.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"token_type_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"position_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.Tensor] = None"},{name:"start_positions",val:": typing.Optional[torch.Tensor] = None"},{name:"end_positions",val:": typing.Optional[torch.Tensor] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.SqueezeBertForQuestionAnswering.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.SqueezeBertForQuestionAnswering.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.SqueezeBertForQuestionAnswering.forward.token_type_ids",description:`<strong>token_type_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.SqueezeBertForQuestionAnswering.forward.position_ids",description:`<strong>position_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.SqueezeBertForQuestionAnswering.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.SqueezeBertForQuestionAnswering.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.SqueezeBertForQuestionAnswering.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.SqueezeBertForQuestionAnswering.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.SqueezeBertForQuestionAnswering.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.SqueezeBertForQuestionAnswering.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 (<em>sequence_length</em>). Position outside of the sequence
are not taken into account for computing the loss.`,name:"start_positions"},{anchor:"transformers.SqueezeBertForQuestionAnswering.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 (<em>sequence_length</em>). Position outside of the sequence
are not taken into account for computing the loss.`,name:"end_positions"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/squeezebert/modeling_squeezebert.py#L1017",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.QuestionAnsweringModelOutput"
>transformers.modeling_outputs.QuestionAnsweringModelOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/main/en/model_doc/squeezebert#transformers.SqueezeBertConfig"
>SqueezeBertConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Total span extraction loss is the sum of a Cross-Entropy for the start and end positions.</p>
</li>
<li>
<p><strong>start_logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>) \u2014 Span-start scores (before SoftMax).</p>
</li>
<li>
<p><strong>end_logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>) \u2014 Span-end scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.QuestionAnsweringModelOutput"
>transformers.modeling_outputs.QuestionAnsweringModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),bt=new On({props:{$$slots:{default:[pm]},$$scope:{ctx:T}}}),kt=new C({props:{anchor:"transformers.SqueezeBertForQuestionAnswering.forward.example",$$slots:{default:[um]},$$scope:{ctx:T}}}),{c(){d=a("meta"),g=h(),u=a("h1"),c=a("a"),f=a("span"),z(t.$$.fragment),p=h(),S=a("span"),ya=o("SqueezeBERT"),hr=h(),ce=a("h2"),Ce=a("a"),Rn=a("span"),z(St.$$.fragment),Ta=h(),Wn=a("span"),Sa=o("Overview"),mr=h(),oe=a("p"),Ba=o("The SqueezeBERT model was proposed in "),Bt=a("a"),Ea=o("SqueezeBERT: What can computer vision teach NLP about efficient neural networks?"),ja=o(` by Forrest N. Iandola, Albert E. Shaw, Ravi Krishna, Kurt W. Keutzer. It\u2019s a
bidirectional transformer similar to the BERT model. The key difference between the BERT architecture and the
SqueezeBERT architecture is that SqueezeBERT uses `),Et=a("a"),xa=o("grouped convolutions"),Ma=o(`
instead of fully-connected layers for the Q, K, V and FFN layers.`),fr=h(),nn=a("p"),Fa=o("The abstract from the paper is the following:"),gr=h(),on=a("p"),Kn=a("em"),Ca=o(`Humans read and write hundreds of billions of messages every day. Further, due to the availability of large datasets,
large computing systems, and better neural network models, natural language processing (NLP) technology has made
significant strides in understanding, proofreading, and organizing these messages. Thus, there is a significant
opportunity to deploy NLP in myriad applications to help web users, social networks, and businesses. In particular, we
consider smartphones and other mobile devices as crucial platforms for deploying NLP models at scale. However, today\u2019s
highly-accurate NLP neural network models such as BERT and RoBERTa are extremely computationally expensive, with
BERT-base taking 1.7 seconds to classify a text snippet on a Pixel 3 smartphone. In this work, we observe that methods
such as grouped convolutions have yielded significant speedups for computer vision networks, but many of these
techniques have not been adopted by NLP neural network designers. We demonstrate how to replace several operations in
self-attention layers with grouped convolutions, and we use this technique in a novel network architecture called
SqueezeBERT, which runs 4.3x faster than BERT-base on the Pixel 3 while achieving competitive accuracy on the GLUE test
set. The SqueezeBERT code will be released.`),_r=h(),rn=a("p"),Pa=o("Tips:"),br=h(),re=a("ul"),Hn=a("li"),Aa=o(`SqueezeBERT is a model with absolute position embeddings so it\u2019s usually advised to pad the inputs on the right
rather than the left.`),La=h(),Qn=a("li"),Ia=o(`SqueezeBERT is similar to BERT and therefore relies on the masked language modeling (MLM) objective. It is therefore
efficient at predicting masked tokens and at NLU in general, but is not optimal for text generation. Models trained
with a causal language modeling (CLM) objective are better in that regard.`),Na=h(),jt=a("li"),Da=o(`For best results when finetuning on sequence classification tasks, it is recommended to start with the
`),Un=a("em"),Oa=o("squeezebert/squeezebert-mnli-headless"),Ra=o(" checkpoint."),kr=h(),Pe=a("p"),Wa=o("This model was contributed by "),xt=a("a"),Ka=o("forresti"),Ha=o("."),zr=h(),pe=a("h2"),Ae=a("a"),Vn=a("span"),z(Mt.$$.fragment),Qa=h(),Gn=a("span"),Ua=o("SqueezeBertConfig"),qr=h(),H=a("div"),z(Ft.$$.fragment),Va=h(),ue=a("p"),Ga=o("This is the configuration class to store the configuration of a "),an=a("a"),Ja=o("SqueezeBertModel"),Xa=o(`. It is used to instantiate a
SqueezeBERT 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 SqueezeBERT
`),Ct=a("a"),Ya=o("squeezebert/squeezebert-uncased"),Za=o(" architecture."),ei=h(),he=a("p"),ti=o("Configuration objects inherit from "),ln=a("a"),si=o("PretrainedConfig"),ni=o(` and can be used to control the model outputs. Read the
documentation from `),dn=a("a"),oi=o("PretrainedConfig"),ri=o(" for more information."),ai=h(),z(Le.$$.fragment),ii=h(),Jn=a("p"),li=o(`Attributes: pretrained_config_archive_map (Dict[str, str]): A dictionary containing all the available pre-trained
checkpoints.`),$r=h(),me=a("h2"),Ie=a("a"),Xn=a("span"),z(Pt.$$.fragment),di=h(),Yn=a("span"),ci=o("SqueezeBertTokenizer"),wr=h(),I=a("div"),z(At.$$.fragment),pi=h(),Zn=a("p"),ui=o("Construct a SqueezeBERT tokenizer. Based on WordPiece."),hi=h(),Lt=a("p"),mi=o("This tokenizer inherits from "),cn=a("a"),fi=o("PreTrainedTokenizer"),gi=o(` which contains most of the main methods. Users should refer to
this superclass for more information regarding those methods.`),_i=h(),ae=a("div"),z(It.$$.fragment),bi=h(),eo=a("p"),ki=o(`Build model inputs from a sequence or a pair of sequence for sequence classification tasks by concatenating and
adding special tokens. A SqueezeBERT sequence has the following format:`),zi=h(),Nt=a("ul"),pn=a("li"),qi=o("single sequence: "),to=a("code"),$i=o("[CLS] X [SEP]"),wi=h(),un=a("li"),vi=o("pair of sequences: "),so=a("code"),yi=o("[CLS] A [SEP] B [SEP]"),Ti=h(),Ne=a("div"),z(Dt.$$.fragment),Si=h(),Ot=a("p"),Bi=o(`Retrieve sequence ids from a token list that has no special tokens added. This method is called when adding
special tokens using the tokenizer `),no=a("code"),Ei=o("prepare_for_model"),ji=o(" method."),xi=h(),J=a("div"),z(Rt.$$.fragment),Mi=h(),oo=a("p"),Fi=o("Create a mask from the two sequences passed to be used in a sequence-pair classification task. A SqueezeBERT"),Ci=h(),z(De.$$.fragment),Pi=h(),fe=a("p"),Ai=o("If "),ro=a("code"),Li=o("token_ids_1"),Ii=o(" is "),ao=a("code"),Ni=o("None"),Di=o(", this method only returns the first portion of the mask (0s)."),Oi=h(),hn=a("div"),z(Wt.$$.fragment),vr=h(),ge=a("h2"),Oe=a("a"),io=a("span"),z(Kt.$$.fragment),Ri=h(),lo=a("span"),Wi=o("SqueezeBertTokenizerFast"),yr=h(),Q=a("div"),z(Ht.$$.fragment),Ki=h(),Qt=a("p"),Hi=o("Construct a \u201Cfast\u201D SqueezeBERT tokenizer (backed by HuggingFace\u2019s "),co=a("em"),Qi=o("tokenizers"),Ui=o(" library). Based on WordPiece."),Vi=h(),Ut=a("p"),Gi=o("This tokenizer inherits from "),mn=a("a"),Ji=o("PreTrainedTokenizerFast"),Xi=o(` which contains most of the main methods. Users should
refer to this superclass for more information regarding those methods.`),Yi=h(),ie=a("div"),z(Vt.$$.fragment),Zi=h(),po=a("p"),el=o(`Build model inputs from a sequence or a pair of sequence for sequence classification tasks by concatenating and
adding special tokens. A SqueezeBERT sequence has the following format:`),tl=h(),Gt=a("ul"),fn=a("li"),sl=o("single sequence: "),uo=a("code"),nl=o("[CLS] X [SEP]"),ol=h(),gn=a("li"),rl=o("pair of sequences: "),ho=a("code"),al=o("[CLS] A [SEP] B [SEP]"),il=h(),X=a("div"),z(Jt.$$.fragment),ll=h(),mo=a("p"),dl=o("Create a mask from the two sequences passed to be used in a sequence-pair classification task. A SqueezeBERT"),cl=h(),z(Re.$$.fragment),pl=h(),_e=a("p"),ul=o("If "),fo=a("code"),hl=o("token_ids_1"),ml=o(" is "),go=a("code"),fl=o("None"),gl=o(", this method only returns the first portion of the mask (0s)."),Tr=h(),be=a("h2"),We=a("a"),_o=a("span"),z(Xt.$$.fragment),_l=h(),bo=a("span"),bl=o("SqueezeBertModel"),Sr=h(),B=a("div"),z(Yt.$$.fragment),kl=h(),ko=a("p"),zl=o("The bare SqueezeBERT Model transformer outputting raw hidden-states without any specific head on top."),ql=h(),Zt=a("p"),$l=o("The SqueezeBERT model was proposed in "),es=a("a"),wl=o(`SqueezeBERT: What can computer vision teach NLP about efficient neural
networks?`),vl=o(` by Forrest N. Iandola, Albert E. Shaw, Ravi Krishna, and Kurt W.
Keutzer`),yl=h(),ts=a("p"),Tl=o("This model inherits from "),_n=a("a"),Sl=o("PreTrainedModel"),Bl=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.)`),El=h(),ss=a("p"),jl=o("This model is also a PyTorch "),ns=a("a"),xl=o("torch.nn.Module"),Ml=o(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Fl=h(),os=a("p"),Cl=o(`For best results finetuning SqueezeBERT on text classification tasks, it is recommended to use the
`),zo=a("em"),Pl=o("squeezebert/squeezebert-mnli-headless"),Al=o(" checkpoint as a starting point."),Ll=h(),z(Ke.$$.fragment),Il=h(),z(He.$$.fragment),Nl=h(),Y=a("div"),z(rs.$$.fragment),Dl=h(),ke=a("p"),Ol=o("The "),bn=a("a"),Rl=o("SqueezeBertModel"),Wl=o(" forward method, overrides the "),qo=a("code"),Kl=o("__call__"),Hl=o(" special method."),Ql=h(),z(Qe.$$.fragment),Ul=h(),z(Ue.$$.fragment),Br=h(),ze=a("h2"),Ve=a("a"),$o=a("span"),z(as.$$.fragment),Vl=h(),wo=a("span"),Gl=o("SqueezeBertForMaskedLM"),Er=h(),E=a("div"),z(is.$$.fragment),Jl=h(),ls=a("p"),Xl=o("SqueezeBERT Model with a "),vo=a("code"),Yl=o("language modeling"),Zl=o(" head on top."),ed=h(),ds=a("p"),td=o("The SqueezeBERT model was proposed in "),cs=a("a"),sd=o(`SqueezeBERT: What can computer vision teach NLP about efficient neural
networks?`),nd=o(` by Forrest N. Iandola, Albert E. Shaw, Ravi Krishna, and Kurt W.
Keutzer`),od=h(),ps=a("p"),rd=o("This model inherits from "),kn=a("a"),ad=o("PreTrainedModel"),id=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.)`),ld=h(),us=a("p"),dd=o("This model is also a PyTorch "),hs=a("a"),cd=o("torch.nn.Module"),pd=o(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),ud=h(),ms=a("p"),hd=o(`For best results finetuning SqueezeBERT on text classification tasks, it is recommended to use the
`),yo=a("em"),md=o("squeezebert/squeezebert-mnli-headless"),fd=o(" checkpoint as a starting point."),gd=h(),z(Ge.$$.fragment),_d=h(),z(Je.$$.fragment),bd=h(),Z=a("div"),z(fs.$$.fragment),kd=h(),qe=a("p"),zd=o("The "),zn=a("a"),qd=o("SqueezeBertForMaskedLM"),$d=o(" forward method, overrides the "),To=a("code"),wd=o("__call__"),vd=o(" special method."),yd=h(),z(Xe.$$.fragment),Td=h(),z(Ye.$$.fragment),jr=h(),$e=a("h2"),Ze=a("a"),So=a("span"),z(gs.$$.fragment),Sd=h(),Bo=a("span"),Bd=o("SqueezeBertForSequenceClassification"),xr=h(),j=a("div"),z(_s.$$.fragment),Ed=h(),Eo=a("p"),jd=o(`SqueezeBERT Model transformer with a sequence classification/regression head on top (a linear layer on top of the
pooled output) e.g. for GLUE tasks.`),xd=h(),bs=a("p"),Md=o("The SqueezeBERT model was proposed in "),ks=a("a"),Fd=o(`SqueezeBERT: What can computer vision teach NLP about efficient neural
networks?`),Cd=o(` by Forrest N. Iandola, Albert E. Shaw, Ravi Krishna, and Kurt W.
Keutzer`),Pd=h(),zs=a("p"),Ad=o("This model inherits from "),qn=a("a"),Ld=o("PreTrainedModel"),Id=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.)`),Nd=h(),qs=a("p"),Dd=o("This model is also a PyTorch "),$s=a("a"),Od=o("torch.nn.Module"),Rd=o(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Wd=h(),ws=a("p"),Kd=o(`For best results finetuning SqueezeBERT on text classification tasks, it is recommended to use the
`),jo=a("em"),Hd=o("squeezebert/squeezebert-mnli-headless"),Qd=o(" checkpoint as a starting point."),Ud=h(),z(et.$$.fragment),Vd=h(),z(tt.$$.fragment),Gd=h(),U=a("div"),z(vs.$$.fragment),Jd=h(),we=a("p"),Xd=o("The "),$n=a("a"),Yd=o("SqueezeBertForSequenceClassification"),Zd=o(" forward method, overrides the "),xo=a("code"),ec=o("__call__"),tc=o(" special method."),sc=h(),z(st.$$.fragment),nc=h(),z(nt.$$.fragment),oc=h(),z(ot.$$.fragment),Mr=h(),ve=a("h2"),rt=a("a"),Mo=a("span"),z(ys.$$.fragment),rc=h(),Fo=a("span"),ac=o("SqueezeBertForMultipleChoice"),Fr=h(),x=a("div"),z(Ts.$$.fragment),ic=h(),Co=a("p"),lc=o(`SqueezeBERT 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.`),dc=h(),Ss=a("p"),cc=o("The SqueezeBERT model was proposed in "),Bs=a("a"),pc=o(`SqueezeBERT: What can computer vision teach NLP about efficient neural
networks?`),uc=o(` by Forrest N. Iandola, Albert E. Shaw, Ravi Krishna, and Kurt W.
Keutzer`),hc=h(),Es=a("p"),mc=o("This model inherits from "),wn=a("a"),fc=o("PreTrainedModel"),gc=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.)`),_c=h(),js=a("p"),bc=o("This model is also a PyTorch "),xs=a("a"),kc=o("torch.nn.Module"),zc=o(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),qc=h(),Ms=a("p"),$c=o(`For best results finetuning SqueezeBERT on text classification tasks, it is recommended to use the
`),Po=a("em"),wc=o("squeezebert/squeezebert-mnli-headless"),vc=o(" checkpoint as a starting point."),yc=h(),z(at.$$.fragment),Tc=h(),z(it.$$.fragment),Sc=h(),ee=a("div"),z(Fs.$$.fragment),Bc=h(),ye=a("p"),Ec=o("The "),vn=a("a"),jc=o("SqueezeBertForMultipleChoice"),xc=o(" forward method, overrides the "),Ao=a("code"),Mc=o("__call__"),Fc=o(" special method."),Cc=h(),z(lt.$$.fragment),Pc=h(),z(dt.$$.fragment),Cr=h(),Te=a("h2"),ct=a("a"),Lo=a("span"),z(Cs.$$.fragment),Ac=h(),Io=a("span"),Lc=o("SqueezeBertForTokenClassification"),Pr=h(),M=a("div"),z(Ps.$$.fragment),Ic=h(),No=a("p"),Nc=o(`SqueezeBERT 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.`),Dc=h(),As=a("p"),Oc=o("The SqueezeBERT model was proposed in "),Ls=a("a"),Rc=o(`SqueezeBERT: What can computer vision teach NLP about efficient neural
networks?`),Wc=o(` by Forrest N. Iandola, Albert E. Shaw, Ravi Krishna, and Kurt W.
Keutzer`),Kc=h(),Is=a("p"),Hc=o("This model inherits from "),yn=a("a"),Qc=o("PreTrainedModel"),Uc=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.)`),Vc=h(),Ns=a("p"),Gc=o("This model is also a PyTorch "),Ds=a("a"),Jc=o("torch.nn.Module"),Xc=o(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Yc=h(),Os=a("p"),Zc=o(`For best results finetuning SqueezeBERT on text classification tasks, it is recommended to use the
`),Do=a("em"),ep=o("squeezebert/squeezebert-mnli-headless"),tp=o(" checkpoint as a starting point."),sp=h(),z(pt.$$.fragment),np=h(),z(ut.$$.fragment),op=h(),te=a("div"),z(Rs.$$.fragment),rp=h(),Se=a("p"),ap=o("The "),Tn=a("a"),ip=o("SqueezeBertForTokenClassification"),lp=o(" forward method, overrides the "),Oo=a("code"),dp=o("__call__"),cp=o(" special method."),pp=h(),z(ht.$$.fragment),up=h(),z(mt.$$.fragment),Ar=h(),Be=a("h2"),ft=a("a"),Ro=a("span"),z(Ws.$$.fragment),hp=h(),Wo=a("span"),mp=o("SqueezeBertForQuestionAnswering"),Lr=h(),F=a("div"),z(Ks.$$.fragment),fp=h(),Ee=a("p"),gp=o(`SqueezeBERT 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 `),Ko=a("code"),_p=o("span start logits"),bp=o(" and "),Ho=a("code"),kp=o("span end logits"),zp=o(")."),qp=h(),Hs=a("p"),$p=o("The SqueezeBERT model was proposed in "),Qs=a("a"),wp=o(`SqueezeBERT: What can computer vision teach NLP about efficient neural
networks?`),vp=o(` by Forrest N. Iandola, Albert E. Shaw, Ravi Krishna, and Kurt W.
Keutzer`),yp=h(),Us=a("p"),Tp=o("This model inherits from "),Sn=a("a"),Sp=o("PreTrainedModel"),Bp=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.)`),Ep=h(),Vs=a("p"),jp=o("This model is also a PyTorch "),Gs=a("a"),xp=o("torch.nn.Module"),Mp=o(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Fp=h(),Js=a("p"),Cp=o(`For best results finetuning SqueezeBERT on text classification tasks, it is recommended to use the
`),Qo=a("em"),Pp=o("squeezebert/squeezebert-mnli-headless"),Ap=o(" checkpoint as a starting point."),Lp=h(),z(gt.$$.fragment),Ip=h(),z(_t.$$.fragment),Np=h(),se=a("div"),z(Xs.$$.fragment),Dp=h(),je=a("p"),Op=o("The "),Bn=a("a"),Rp=o("SqueezeBertForQuestionAnswering"),Wp=o(" forward method, overrides the "),Uo=a("code"),Kp=o("__call__"),Hp=o(" special method."),Qp=h(),z(bt.$$.fragment),Up=h(),z(kt.$$.fragment),this.h()},l(n){const b=Lh('[data-svelte="svelte-1phssyn"]',document.head);d=i(b,"META",{name:!0,content:!0}),b.forEach(s),g=m(n),u=i(n,"H1",{class:!0});var Ys=l(u);c=i(Ys,"A",{id:!0,class:!0,href:!0});var Vo=l(c);f=i(Vo,"SPAN",{});var Go=l(f);q(t.$$.fragment,Go),Go.forEach(s),Vo.forEach(s),p=m(Ys),S=i(Ys,"SPAN",{});var Jo=l(S);ya=r(Jo,"SqueezeBERT"),Jo.forEach(s),Ys.forEach(s),hr=m(n),ce=i(n,"H2",{class:!0});var Zs=l(ce);Ce=i(Zs,"A",{id:!0,class:!0,href:!0});var Xo=l(Ce);Rn=i(Xo,"SPAN",{});var Yo=l(Rn);q(St.$$.fragment,Yo),Yo.forEach(s),Xo.forEach(s),Ta=m(Zs),Wn=i(Zs,"SPAN",{});var Zo=l(Wn);Sa=r(Zo,"Overview"),Zo.forEach(s),Zs.forEach(s),mr=m(n),oe=i(n,"P",{});var xe=l(oe);Ba=r(xe,"The SqueezeBERT model was proposed in "),Bt=i(xe,"A",{href:!0,rel:!0});var er=l(Bt);Ea=r(er,"SqueezeBERT: What can computer vision teach NLP about efficient neural networks?"),er.forEach(s),ja=r(xe,` by Forrest N. Iandola, Albert E. Shaw, Ravi Krishna, Kurt W. Keutzer. It\u2019s a
bidirectional transformer similar to the BERT model. The key difference between the BERT architecture and the
SqueezeBERT architecture is that SqueezeBERT uses `),Et=i(xe,"A",{href:!0,rel:!0});var tr=l(Et);xa=r(tr,"grouped convolutions"),tr.forEach(s),Ma=r(xe,`
instead of fully-connected layers for the Q, K, V and FFN layers.`),xe.forEach(s),fr=m(n),nn=i(n,"P",{});var sr=l(nn);Fa=r(sr,"The abstract from the paper is the following:"),sr.forEach(s),gr=m(n),on=i(n,"P",{});var nr=l(on);Kn=i(nr,"EM",{});var or=l(Kn);Ca=r(or,`Humans read and write hundreds of billions of messages every day. Further, due to the availability of large datasets,
large computing systems, and better neural network models, natural language processing (NLP) technology has made
significant strides in understanding, proofreading, and organizing these messages. Thus, there is a significant
opportunity to deploy NLP in myriad applications to help web users, social networks, and businesses. In particular, we
consider smartphones and other mobile devices as crucial platforms for deploying NLP models at scale. However, today\u2019s
highly-accurate NLP neural network models such as BERT and RoBERTa are extremely computationally expensive, with
BERT-base taking 1.7 seconds to classify a text snippet on a Pixel 3 smartphone. In this work, we observe that methods
such as grouped convolutions have yielded significant speedups for computer vision networks, but many of these
techniques have not been adopted by NLP neural network designers. We demonstrate how to replace several operations in
self-attention layers with grouped convolutions, and we use this technique in a novel network architecture called
SqueezeBERT, which runs 4.3x faster than BERT-base on the Pixel 3 while achieving competitive accuracy on the GLUE test
set. The SqueezeBERT code will be released.`),or.forEach(s),nr.forEach(s),_r=m(n),rn=i(n,"P",{});var rr=l(rn);Pa=r(rr,"Tips:"),rr.forEach(s),br=m(n),re=i(n,"UL",{});var Me=l(re);Hn=i(Me,"LI",{});var ar=l(Hn);Aa=r(ar,`SqueezeBERT is a model with absolute position embeddings so it\u2019s usually advised to pad the inputs on the right
rather than the left.`),ar.forEach(s),La=m(Me),Qn=i(Me,"LI",{});var ir=l(Qn);Ia=r(ir,`SqueezeBERT is similar to BERT and therefore relies on the masked language modeling (MLM) objective. It is therefore
efficient at predicting masked tokens and at NLU in general, but is not optimal for text generation. Models trained
with a causal language modeling (CLM) objective are better in that regard.`),ir.forEach(s),Na=m(Me),jt=i(Me,"LI",{});var en=l(jt);Da=r(en,`For best results when finetuning on sequence classification tasks, it is recommended to start with the
`),Un=i(en,"EM",{});var lr=l(Un);Oa=r(lr,"squeezebert/squeezebert-mnli-headless"),lr.forEach(s),Ra=r(en," checkpoint."),en.forEach(s),Me.forEach(s),kr=m(n),Pe=i(n,"P",{});var tn=l(Pe);Wa=r(tn,"This model was contributed by "),xt=i(tn,"A",{href:!0,rel:!0});var dr=l(xt);Ka=r(dr,"forresti"),dr.forEach(s),Ha=r(tn,"."),tn.forEach(s),zr=m(n),pe=i(n,"H2",{class:!0});var sn=l(pe);Ae=i(sn,"A",{id:!0,class:!0,href:!0});var cr=l(Ae);Vn=i(cr,"SPAN",{});var pr=l(Vn);q(Mt.$$.fragment,pr),pr.forEach(s),cr.forEach(s),Qa=m(sn),Gn=i(sn,"SPAN",{});var ur=l(Gn);Ua=r(ur,"SqueezeBertConfig"),ur.forEach(s),sn.forEach(s),qr=m(n),H=i(n,"DIV",{class:!0});var G=l(H);q(Ft.$$.fragment,G),Va=m(G),ue=i(G,"P",{});var Fe=l(ue);Ga=r(Fe,"This is the configuration class to store the configuration of a "),an=i(Fe,"A",{href:!0});var Yp=l(an);Ja=r(Yp,"SqueezeBertModel"),Yp.forEach(s),Xa=r(Fe,`. It is used to instantiate a
SqueezeBERT 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 SqueezeBERT
`),Ct=i(Fe,"A",{href:!0,rel:!0});var Zp=l(Ct);Ya=r(Zp,"squeezebert/squeezebert-uncased"),Zp.forEach(s),Za=r(Fe," architecture."),Fe.forEach(s),ei=m(G),he=i(G,"P",{});var En=l(he);ti=r(En,"Configuration objects inherit from "),ln=i(En,"A",{href:!0});var eu=l(ln);si=r(eu,"PretrainedConfig"),eu.forEach(s),ni=r(En,` and can be used to control the model outputs. Read the
documentation from `),dn=i(En,"A",{href:!0});var tu=l(dn);oi=r(tu,"PretrainedConfig"),tu.forEach(s),ri=r(En," for more information."),En.forEach(s),ai=m(G),q(Le.$$.fragment,G),ii=m(G),Jn=i(G,"P",{});var su=l(Jn);li=r(su,`Attributes: pretrained_config_archive_map (Dict[str, str]): A dictionary containing all the available pre-trained
checkpoints.`),su.forEach(s),G.forEach(s),$r=m(n),me=i(n,"H2",{class:!0});var Nr=l(me);Ie=i(Nr,"A",{id:!0,class:!0,href:!0});var nu=l(Ie);Xn=i(nu,"SPAN",{});var ou=l(Xn);q(Pt.$$.fragment,ou),ou.forEach(s),nu.forEach(s),di=m(Nr),Yn=i(Nr,"SPAN",{});var ru=l(Yn);ci=r(ru,"SqueezeBertTokenizer"),ru.forEach(s),Nr.forEach(s),wr=m(n),I=i(n,"DIV",{class:!0});var V=l(I);q(At.$$.fragment,V),pi=m(V),Zn=i(V,"P",{});var au=l(Zn);ui=r(au,"Construct a SqueezeBERT tokenizer. Based on WordPiece."),au.forEach(s),hi=m(V),Lt=i(V,"P",{});var Dr=l(Lt);mi=r(Dr,"This tokenizer inherits from "),cn=i(Dr,"A",{href:!0});var iu=l(cn);fi=r(iu,"PreTrainedTokenizer"),iu.forEach(s),gi=r(Dr,` which contains most of the main methods. Users should refer to
this superclass for more information regarding those methods.`),Dr.forEach(s),_i=m(V),ae=i(V,"DIV",{class:!0});var jn=l(ae);q(It.$$.fragment,jn),bi=m(jn),eo=i(jn,"P",{});var lu=l(eo);ki=r(lu,`Build model inputs from a sequence or a pair of sequence for sequence classification tasks by concatenating and
adding special tokens. A SqueezeBERT sequence has the following format:`),lu.forEach(s),zi=m(jn),Nt=i(jn,"UL",{});var Or=l(Nt);pn=i(Or,"LI",{});var Vp=l(pn);qi=r(Vp,"single sequence: "),to=i(Vp,"CODE",{});var du=l(to);$i=r(du,"[CLS] X [SEP]"),du.forEach(s),Vp.forEach(s),wi=m(Or),un=i(Or,"LI",{});var Gp=l(un);vi=r(Gp,"pair of sequences: "),so=i(Gp,"CODE",{});var cu=l(so);yi=r(cu,"[CLS] A [SEP] B [SEP]"),cu.forEach(s),Gp.forEach(s),Or.forEach(s),jn.forEach(s),Ti=m(V),Ne=i(V,"DIV",{class:!0});var Rr=l(Ne);q(Dt.$$.fragment,Rr),Si=m(Rr),Ot=i(Rr,"P",{});var Wr=l(Ot);Bi=r(Wr,`Retrieve sequence ids from a token list that has no special tokens added. This method is called when adding
special tokens using the tokenizer `),no=i(Wr,"CODE",{});var pu=l(no);Ei=r(pu,"prepare_for_model"),pu.forEach(s),ji=r(Wr," method."),Wr.forEach(s),Rr.forEach(s),xi=m(V),J=i(V,"DIV",{class:!0});var zt=l(J);q(Rt.$$.fragment,zt),Mi=m(zt),oo=i(zt,"P",{});var uu=l(oo);Fi=r(uu,"Create a mask from the two sequences passed to be used in a sequence-pair classification task. A SqueezeBERT"),uu.forEach(s),Ci=m(zt),q(De.$$.fragment,zt),Pi=m(zt),fe=i(zt,"P",{});var xn=l(fe);Ai=r(xn,"If "),ro=i(xn,"CODE",{});var hu=l(ro);Li=r(hu,"token_ids_1"),hu.forEach(s),Ii=r(xn," is "),ao=i(xn,"CODE",{});var mu=l(ao);Ni=r(mu,"None"),mu.forEach(s),Di=r(xn,", this method only returns the first portion of the mask (0s)."),xn.forEach(s),zt.forEach(s),Oi=m(V),hn=i(V,"DIV",{class:!0});var fu=l(hn);q(Wt.$$.fragment,fu),fu.forEach(s),V.forEach(s),vr=m(n),ge=i(n,"H2",{class:!0});var Kr=l(ge);Oe=i(Kr,"A",{id:!0,class:!0,href:!0});var gu=l(Oe);io=i(gu,"SPAN",{});var _u=l(io);q(Kt.$$.fragment,_u),_u.forEach(s),gu.forEach(s),Ri=m(Kr),lo=i(Kr,"SPAN",{});var bu=l(lo);Wi=r(bu,"SqueezeBertTokenizerFast"),bu.forEach(s),Kr.forEach(s),yr=m(n),Q=i(n,"DIV",{class:!0});var le=l(Q);q(Ht.$$.fragment,le),Ki=m(le),Qt=i(le,"P",{});var Hr=l(Qt);Hi=r(Hr,"Construct a \u201Cfast\u201D SqueezeBERT tokenizer (backed by HuggingFace\u2019s "),co=i(Hr,"EM",{});var ku=l(co);Qi=r(ku,"tokenizers"),ku.forEach(s),Ui=r(Hr," library). Based on WordPiece."),Hr.forEach(s),Vi=m(le),Ut=i(le,"P",{});var Qr=l(Ut);Gi=r(Qr,"This tokenizer inherits from "),mn=i(Qr,"A",{href:!0});var zu=l(mn);Ji=r(zu,"PreTrainedTokenizerFast"),zu.forEach(s),Xi=r(Qr,` which contains most of the main methods. Users should
refer to this superclass for more information regarding those methods.`),Qr.forEach(s),Yi=m(le),ie=i(le,"DIV",{class:!0});var Mn=l(ie);q(Vt.$$.fragment,Mn),Zi=m(Mn),po=i(Mn,"P",{});var qu=l(po);el=r(qu,`Build model inputs from a sequence or a pair of sequence for sequence classification tasks by concatenating and
adding special tokens. A SqueezeBERT sequence has the following format:`),qu.forEach(s),tl=m(Mn),Gt=i(Mn,"UL",{});var Ur=l(Gt);fn=i(Ur,"LI",{});var Jp=l(fn);sl=r(Jp,"single sequence: "),uo=i(Jp,"CODE",{});var $u=l(uo);nl=r($u,"[CLS] X [SEP]"),$u.forEach(s),Jp.forEach(s),ol=m(Ur),gn=i(Ur,"LI",{});var Xp=l(gn);rl=r(Xp,"pair of sequences: "),ho=i(Xp,"CODE",{});var wu=l(ho);al=r(wu,"[CLS] A [SEP] B [SEP]"),wu.forEach(s),Xp.forEach(s),Ur.forEach(s),Mn.forEach(s),il=m(le),X=i(le,"DIV",{class:!0});var qt=l(X);q(Jt.$$.fragment,qt),ll=m(qt),mo=i(qt,"P",{});var vu=l(mo);dl=r(vu,"Create a mask from the two sequences passed to be used in a sequence-pair classification task. A SqueezeBERT"),vu.forEach(s),cl=m(qt),q(Re.$$.fragment,qt),pl=m(qt),_e=i(qt,"P",{});var Fn=l(_e);ul=r(Fn,"If "),fo=i(Fn,"CODE",{});var yu=l(fo);hl=r(yu,"token_ids_1"),yu.forEach(s),ml=r(Fn," is "),go=i(Fn,"CODE",{});var Tu=l(go);fl=r(Tu,"None"),Tu.forEach(s),gl=r(Fn,", this method only returns the first portion of the mask (0s)."),Fn.forEach(s),qt.forEach(s),le.forEach(s),Tr=m(n),be=i(n,"H2",{class:!0});var Vr=l(be);We=i(Vr,"A",{id:!0,class:!0,href:!0});var Su=l(We);_o=i(Su,"SPAN",{});var Bu=l(_o);q(Xt.$$.fragment,Bu),Bu.forEach(s),Su.forEach(s),_l=m(Vr),bo=i(Vr,"SPAN",{});var Eu=l(bo);bl=r(Eu,"SqueezeBertModel"),Eu.forEach(s),Vr.forEach(s),Sr=m(n),B=i(n,"DIV",{class:!0});var N=l(B);q(Yt.$$.fragment,N),kl=m(N),ko=i(N,"P",{});var ju=l(ko);zl=r(ju,"The bare SqueezeBERT Model transformer outputting raw hidden-states without any specific head on top."),ju.forEach(s),ql=m(N),Zt=i(N,"P",{});var Gr=l(Zt);$l=r(Gr,"The SqueezeBERT model was proposed in "),es=i(Gr,"A",{href:!0,rel:!0});var xu=l(es);wl=r(xu,`SqueezeBERT: What can computer vision teach NLP about efficient neural
networks?`),xu.forEach(s),vl=r(Gr,` by Forrest N. Iandola, Albert E. Shaw, Ravi Krishna, and Kurt W.
Keutzer`),Gr.forEach(s),yl=m(N),ts=i(N,"P",{});var Jr=l(ts);Tl=r(Jr,"This model inherits from "),_n=i(Jr,"A",{href:!0});var Mu=l(_n);Sl=r(Mu,"PreTrainedModel"),Mu.forEach(s),Bl=r(Jr,`. 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.)`),Jr.forEach(s),El=m(N),ss=i(N,"P",{});var Xr=l(ss);jl=r(Xr,"This model is also a PyTorch "),ns=i(Xr,"A",{href:!0,rel:!0});var Fu=l(ns);xl=r(Fu,"torch.nn.Module"),Fu.forEach(s),Ml=r(Xr,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Xr.forEach(s),Fl=m(N),os=i(N,"P",{});var Yr=l(os);Cl=r(Yr,`For best results finetuning SqueezeBERT on text classification tasks, it is recommended to use the
`),zo=i(Yr,"EM",{});var Cu=l(zo);Pl=r(Cu,"squeezebert/squeezebert-mnli-headless"),Cu.forEach(s),Al=r(Yr," checkpoint as a starting point."),Yr.forEach(s),Ll=m(N),q(Ke.$$.fragment,N),Il=m(N),q(He.$$.fragment,N),Nl=m(N),Y=i(N,"DIV",{class:!0});var $t=l(Y);q(rs.$$.fragment,$t),Dl=m($t),ke=i($t,"P",{});var Cn=l(ke);Ol=r(Cn,"The "),bn=i(Cn,"A",{href:!0});var Pu=l(bn);Rl=r(Pu,"SqueezeBertModel"),Pu.forEach(s),Wl=r(Cn," forward method, overrides the "),qo=i(Cn,"CODE",{});var Au=l(qo);Kl=r(Au,"__call__"),Au.forEach(s),Hl=r(Cn," special method."),Cn.forEach(s),Ql=m($t),q(Qe.$$.fragment,$t),Ul=m($t),q(Ue.$$.fragment,$t),$t.forEach(s),N.forEach(s),Br=m(n),ze=i(n,"H2",{class:!0});var Zr=l(ze);Ve=i(Zr,"A",{id:!0,class:!0,href:!0});var Lu=l(Ve);$o=i(Lu,"SPAN",{});var Iu=l($o);q(as.$$.fragment,Iu),Iu.forEach(s),Lu.forEach(s),Vl=m(Zr),wo=i(Zr,"SPAN",{});var Nu=l(wo);Gl=r(Nu,"SqueezeBertForMaskedLM"),Nu.forEach(s),Zr.forEach(s),Er=m(n),E=i(n,"DIV",{class:!0});var D=l(E);q(is.$$.fragment,D),Jl=m(D),ls=i(D,"P",{});var ea=l(ls);Xl=r(ea,"SqueezeBERT Model with a "),vo=i(ea,"CODE",{});var Du=l(vo);Yl=r(Du,"language modeling"),Du.forEach(s),Zl=r(ea," head on top."),ea.forEach(s),ed=m(D),ds=i(D,"P",{});var ta=l(ds);td=r(ta,"The SqueezeBERT model was proposed in "),cs=i(ta,"A",{href:!0,rel:!0});var Ou=l(cs);sd=r(Ou,`SqueezeBERT: What can computer vision teach NLP about efficient neural
networks?`),Ou.forEach(s),nd=r(ta,` by Forrest N. Iandola, Albert E. Shaw, Ravi Krishna, and Kurt W.
Keutzer`),ta.forEach(s),od=m(D),ps=i(D,"P",{});var sa=l(ps);rd=r(sa,"This model inherits from "),kn=i(sa,"A",{href:!0});var Ru=l(kn);ad=r(Ru,"PreTrainedModel"),Ru.forEach(s),id=r(sa,`. 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.)`),sa.forEach(s),ld=m(D),us=i(D,"P",{});var na=l(us);dd=r(na,"This model is also a PyTorch "),hs=i(na,"A",{href:!0,rel:!0});var Wu=l(hs);cd=r(Wu,"torch.nn.Module"),Wu.forEach(s),pd=r(na,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),na.forEach(s),ud=m(D),ms=i(D,"P",{});var oa=l(ms);hd=r(oa,`For best results finetuning SqueezeBERT on text classification tasks, it is recommended to use the
`),yo=i(oa,"EM",{});var Ku=l(yo);md=r(Ku,"squeezebert/squeezebert-mnli-headless"),Ku.forEach(s),fd=r(oa," checkpoint as a starting point."),oa.forEach(s),gd=m(D),q(Ge.$$.fragment,D),_d=m(D),q(Je.$$.fragment,D),bd=m(D),Z=i(D,"DIV",{class:!0});var wt=l(Z);q(fs.$$.fragment,wt),kd=m(wt),qe=i(wt,"P",{});var Pn=l(qe);zd=r(Pn,"The "),zn=i(Pn,"A",{href:!0});var Hu=l(zn);qd=r(Hu,"SqueezeBertForMaskedLM"),Hu.forEach(s),$d=r(Pn," forward method, overrides the "),To=i(Pn,"CODE",{});var Qu=l(To);wd=r(Qu,"__call__"),Qu.forEach(s),vd=r(Pn," special method."),Pn.forEach(s),yd=m(wt),q(Xe.$$.fragment,wt),Td=m(wt),q(Ye.$$.fragment,wt),wt.forEach(s),D.forEach(s),jr=m(n),$e=i(n,"H2",{class:!0});var ra=l($e);Ze=i(ra,"A",{id:!0,class:!0,href:!0});var Uu=l(Ze);So=i(Uu,"SPAN",{});var Vu=l(So);q(gs.$$.fragment,Vu),Vu.forEach(s),Uu.forEach(s),Sd=m(ra),Bo=i(ra,"SPAN",{});var Gu=l(Bo);Bd=r(Gu,"SqueezeBertForSequenceClassification"),Gu.forEach(s),ra.forEach(s),xr=m(n),j=i(n,"DIV",{class:!0});var O=l(j);q(_s.$$.fragment,O),Ed=m(O),Eo=i(O,"P",{});var Ju=l(Eo);jd=r(Ju,`SqueezeBERT Model transformer with a sequence classification/regression head on top (a linear layer on top of the
pooled output) e.g. for GLUE tasks.`),Ju.forEach(s),xd=m(O),bs=i(O,"P",{});var aa=l(bs);Md=r(aa,"The SqueezeBERT model was proposed in "),ks=i(aa,"A",{href:!0,rel:!0});var Xu=l(ks);Fd=r(Xu,`SqueezeBERT: What can computer vision teach NLP about efficient neural
networks?`),Xu.forEach(s),Cd=r(aa,` by Forrest N. Iandola, Albert E. Shaw, Ravi Krishna, and Kurt W.
Keutzer`),aa.forEach(s),Pd=m(O),zs=i(O,"P",{});var ia=l(zs);Ad=r(ia,"This model inherits from "),qn=i(ia,"A",{href:!0});var Yu=l(qn);Ld=r(Yu,"PreTrainedModel"),Yu.forEach(s),Id=r(ia,`. 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.)`),ia.forEach(s),Nd=m(O),qs=i(O,"P",{});var la=l(qs);Dd=r(la,"This model is also a PyTorch "),$s=i(la,"A",{href:!0,rel:!0});var Zu=l($s);Od=r(Zu,"torch.nn.Module"),Zu.forEach(s),Rd=r(la,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),la.forEach(s),Wd=m(O),ws=i(O,"P",{});var da=l(ws);Kd=r(da,`For best results finetuning SqueezeBERT on text classification tasks, it is recommended to use the
`),jo=i(da,"EM",{});var eh=l(jo);Hd=r(eh,"squeezebert/squeezebert-mnli-headless"),eh.forEach(s),Qd=r(da," checkpoint as a starting point."),da.forEach(s),Ud=m(O),q(et.$$.fragment,O),Vd=m(O),q(tt.$$.fragment,O),Gd=m(O),U=i(O,"DIV",{class:!0});var de=l(U);q(vs.$$.fragment,de),Jd=m(de),we=i(de,"P",{});var An=l(we);Xd=r(An,"The "),$n=i(An,"A",{href:!0});var th=l($n);Yd=r(th,"SqueezeBertForSequenceClassification"),th.forEach(s),Zd=r(An," forward method, overrides the "),xo=i(An,"CODE",{});var sh=l(xo);ec=r(sh,"__call__"),sh.forEach(s),tc=r(An," special method."),An.forEach(s),sc=m(de),q(st.$$.fragment,de),nc=m(de),q(nt.$$.fragment,de),oc=m(de),q(ot.$$.fragment,de),de.forEach(s),O.forEach(s),Mr=m(n),ve=i(n,"H2",{class:!0});var ca=l(ve);rt=i(ca,"A",{id:!0,class:!0,href:!0});var nh=l(rt);Mo=i(nh,"SPAN",{});var oh=l(Mo);q(ys.$$.fragment,oh),oh.forEach(s),nh.forEach(s),rc=m(ca),Fo=i(ca,"SPAN",{});var rh=l(Fo);ac=r(rh,"SqueezeBertForMultipleChoice"),rh.forEach(s),ca.forEach(s),Fr=m(n),x=i(n,"DIV",{class:!0});var R=l(x);q(Ts.$$.fragment,R),ic=m(R),Co=i(R,"P",{});var ah=l(Co);lc=r(ah,`SqueezeBERT 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.`),ah.forEach(s),dc=m(R),Ss=i(R,"P",{});var pa=l(Ss);cc=r(pa,"The SqueezeBERT model was proposed in "),Bs=i(pa,"A",{href:!0,rel:!0});var ih=l(Bs);pc=r(ih,`SqueezeBERT: What can computer vision teach NLP about efficient neural
networks?`),ih.forEach(s),uc=r(pa,` by Forrest N. Iandola, Albert E. Shaw, Ravi Krishna, and Kurt W.
Keutzer`),pa.forEach(s),hc=m(R),Es=i(R,"P",{});var ua=l(Es);mc=r(ua,"This model inherits from "),wn=i(ua,"A",{href:!0});var lh=l(wn);fc=r(lh,"PreTrainedModel"),lh.forEach(s),gc=r(ua,`. 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.)`),ua.forEach(s),_c=m(R),js=i(R,"P",{});var ha=l(js);bc=r(ha,"This model is also a PyTorch "),xs=i(ha,"A",{href:!0,rel:!0});var dh=l(xs);kc=r(dh,"torch.nn.Module"),dh.forEach(s),zc=r(ha,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),ha.forEach(s),qc=m(R),Ms=i(R,"P",{});var ma=l(Ms);$c=r(ma,`For best results finetuning SqueezeBERT on text classification tasks, it is recommended to use the
`),Po=i(ma,"EM",{});var ch=l(Po);wc=r(ch,"squeezebert/squeezebert-mnli-headless"),ch.forEach(s),vc=r(ma," checkpoint as a starting point."),ma.forEach(s),yc=m(R),q(at.$$.fragment,R),Tc=m(R),q(it.$$.fragment,R),Sc=m(R),ee=i(R,"DIV",{class:!0});var vt=l(ee);q(Fs.$$.fragment,vt),Bc=m(vt),ye=i(vt,"P",{});var Ln=l(ye);Ec=r(Ln,"The "),vn=i(Ln,"A",{href:!0});var ph=l(vn);jc=r(ph,"SqueezeBertForMultipleChoice"),ph.forEach(s),xc=r(Ln," forward method, overrides the "),Ao=i(Ln,"CODE",{});var uh=l(Ao);Mc=r(uh,"__call__"),uh.forEach(s),Fc=r(Ln," special method."),Ln.forEach(s),Cc=m(vt),q(lt.$$.fragment,vt),Pc=m(vt),q(dt.$$.fragment,vt),vt.forEach(s),R.forEach(s),Cr=m(n),Te=i(n,"H2",{class:!0});var fa=l(Te);ct=i(fa,"A",{id:!0,class:!0,href:!0});var hh=l(ct);Lo=i(hh,"SPAN",{});var mh=l(Lo);q(Cs.$$.fragment,mh),mh.forEach(s),hh.forEach(s),Ac=m(fa),Io=i(fa,"SPAN",{});var fh=l(Io);Lc=r(fh,"SqueezeBertForTokenClassification"),fh.forEach(s),fa.forEach(s),Pr=m(n),M=i(n,"DIV",{class:!0});var W=l(M);q(Ps.$$.fragment,W),Ic=m(W),No=i(W,"P",{});var gh=l(No);Nc=r(gh,`SqueezeBERT 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.`),gh.forEach(s),Dc=m(W),As=i(W,"P",{});var ga=l(As);Oc=r(ga,"The SqueezeBERT model was proposed in "),Ls=i(ga,"A",{href:!0,rel:!0});var _h=l(Ls);Rc=r(_h,`SqueezeBERT: What can computer vision teach NLP about efficient neural
networks?`),_h.forEach(s),Wc=r(ga,` by Forrest N. Iandola, Albert E. Shaw, Ravi Krishna, and Kurt W.
Keutzer`),ga.forEach(s),Kc=m(W),Is=i(W,"P",{});var _a=l(Is);Hc=r(_a,"This model inherits from "),yn=i(_a,"A",{href:!0});var bh=l(yn);Qc=r(bh,"PreTrainedModel"),bh.forEach(s),Uc=r(_a,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),_a.forEach(s),Vc=m(W),Ns=i(W,"P",{});var ba=l(Ns);Gc=r(ba,"This model is also a PyTorch "),Ds=i(ba,"A",{href:!0,rel:!0});var kh=l(Ds);Jc=r(kh,"torch.nn.Module"),kh.forEach(s),Xc=r(ba,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),ba.forEach(s),Yc=m(W),Os=i(W,"P",{});var ka=l(Os);Zc=r(ka,`For best results finetuning SqueezeBERT on text classification tasks, it is recommended to use the
`),Do=i(ka,"EM",{});var zh=l(Do);ep=r(zh,"squeezebert/squeezebert-mnli-headless"),zh.forEach(s),tp=r(ka," checkpoint as a starting point."),ka.forEach(s),sp=m(W),q(pt.$$.fragment,W),np=m(W),q(ut.$$.fragment,W),op=m(W),te=i(W,"DIV",{class:!0});var yt=l(te);q(Rs.$$.fragment,yt),rp=m(yt),Se=i(yt,"P",{});var In=l(Se);ap=r(In,"The "),Tn=i(In,"A",{href:!0});var qh=l(Tn);ip=r(qh,"SqueezeBertForTokenClassification"),qh.forEach(s),lp=r(In," forward method, overrides the "),Oo=i(In,"CODE",{});var $h=l(Oo);dp=r($h,"__call__"),$h.forEach(s),cp=r(In," special method."),In.forEach(s),pp=m(yt),q(ht.$$.fragment,yt),up=m(yt),q(mt.$$.fragment,yt),yt.forEach(s),W.forEach(s),Ar=m(n),Be=i(n,"H2",{class:!0});var za=l(Be);ft=i(za,"A",{id:!0,class:!0,href:!0});var wh=l(ft);Ro=i(wh,"SPAN",{});var vh=l(Ro);q(Ws.$$.fragment,vh),vh.forEach(s),wh.forEach(s),hp=m(za),Wo=i(za,"SPAN",{});var yh=l(Wo);mp=r(yh,"SqueezeBertForQuestionAnswering"),yh.forEach(s),za.forEach(s),Lr=m(n),F=i(n,"DIV",{class:!0});var K=l(F);q(Ks.$$.fragment,K),fp=m(K),Ee=i(K,"P",{});var Nn=l(Ee);gp=r(Nn,`SqueezeBERT 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 `),Ko=i(Nn,"CODE",{});var Th=l(Ko);_p=r(Th,"span start logits"),Th.forEach(s),bp=r(Nn," and "),Ho=i(Nn,"CODE",{});var Sh=l(Ho);kp=r(Sh,"span end logits"),Sh.forEach(s),zp=r(Nn,")."),Nn.forEach(s),qp=m(K),Hs=i(K,"P",{});var qa=l(Hs);$p=r(qa,"The SqueezeBERT model was proposed in "),Qs=i(qa,"A",{href:!0,rel:!0});var Bh=l(Qs);wp=r(Bh,`SqueezeBERT: What can computer vision teach NLP about efficient neural
networks?`),Bh.forEach(s),vp=r(qa,` by Forrest N. Iandola, Albert E. Shaw, Ravi Krishna, and Kurt W.
Keutzer`),qa.forEach(s),yp=m(K),Us=i(K,"P",{});var $a=l(Us);Tp=r($a,"This model inherits from "),Sn=i($a,"A",{href:!0});var Eh=l(Sn);Sp=r(Eh,"PreTrainedModel"),Eh.forEach(s),Bp=r($a,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),$a.forEach(s),Ep=m(K),Vs=i(K,"P",{});var wa=l(Vs);jp=r(wa,"This model is also a PyTorch "),Gs=i(wa,"A",{href:!0,rel:!0});var jh=l(Gs);xp=r(jh,"torch.nn.Module"),jh.forEach(s),Mp=r(wa,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),wa.forEach(s),Fp=m(K),Js=i(K,"P",{});var va=l(Js);Cp=r(va,`For best results finetuning SqueezeBERT on text classification tasks, it is recommended to use the
`),Qo=i(va,"EM",{});var xh=l(Qo);Pp=r(xh,"squeezebert/squeezebert-mnli-headless"),xh.forEach(s),Ap=r(va," checkpoint as a starting point."),va.forEach(s),Lp=m(K),q(gt.$$.fragment,K),Ip=m(K),q(_t.$$.fragment,K),Np=m(K),se=i(K,"DIV",{class:!0});var Tt=l(se);q(Xs.$$.fragment,Tt),Dp=m(Tt),je=i(Tt,"P",{});var Dn=l(je);Op=r(Dn,"The "),Bn=i(Dn,"A",{href:!0});var Mh=l(Bn);Rp=r(Mh,"SqueezeBertForQuestionAnswering"),Mh.forEach(s),Wp=r(Dn," forward method, overrides the "),Uo=i(Dn,"CODE",{});var Fh=l(Uo);Kp=r(Fh,"__call__"),Fh.forEach(s),Hp=r(Dn," special method."),Dn.forEach(s),Qp=m(Tt),q(bt.$$.fragment,Tt),Up=m(Tt),q(kt.$$.fragment,Tt),Tt.forEach(s),K.forEach(s),this.h()},h(){_(d,"name","hf:doc:metadata"),_(d,"content",JSON.stringify(mm)),_(c,"id","squeezebert"),_(c,"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"),_(c,"href","#squeezebert"),_(u,"class","relative group"),_(Ce,"id","overview"),_(Ce,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),_(Ce,"href","#overview"),_(ce,"class","relative group"),_(Bt,"href","https://arxiv.org/abs/2006.11316"),_(Bt,"rel","nofollow"),_(Et,"href","https://blog.yani.io/filter-group-tutorial"),_(Et,"rel","nofollow"),_(xt,"href","https://huggingface.co/forresti"),_(xt,"rel","nofollow"),_(Ae,"id","transformers.SqueezeBertConfig"),_(Ae,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),_(Ae,"href","#transformers.SqueezeBertConfig"),_(pe,"class","relative group"),_(an,"href","/docs/transformers/main/en/model_doc/squeezebert#transformers.SqueezeBertModel"),_(Ct,"href","https://huggingface.co/squeezebert/squeezebert-uncased"),_(Ct,"rel","nofollow"),_(ln,"href","/docs/transformers/main/en/main_classes/configuration#transformers.PretrainedConfig"),_(dn,"href","/docs/transformers/main/en/main_classes/configuration#transformers.PretrainedConfig"),_(H,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(Ie,"id","transformers.SqueezeBertTokenizer"),_(Ie,"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"),_(Ie,"href","#transformers.SqueezeBertTokenizer"),_(me,"class","relative group"),_(cn,"href","/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizer"),_(ae,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(Ne,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(J,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(hn,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(I,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(Oe,"id","transformers.SqueezeBertTokenizerFast"),_(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"),_(Oe,"href","#transformers.SqueezeBertTokenizerFast"),_(ge,"class","relative group"),_(mn,"href","/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast"),_(ie,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(X,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(Q,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(We,"id","transformers.SqueezeBertModel"),_(We,"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"),_(We,"href","#transformers.SqueezeBertModel"),_(be,"class","relative group"),_(es,"href","https://arxiv.org/abs/2006.11316"),_(es,"rel","nofollow"),_(_n,"href","/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel"),_(ns,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),_(ns,"rel","nofollow"),_(bn,"href","/docs/transformers/main/en/model_doc/squeezebert#transformers.SqueezeBertModel"),_(Y,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(B,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(Ve,"id","transformers.SqueezeBertForMaskedLM"),_(Ve,"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"),_(Ve,"href","#transformers.SqueezeBertForMaskedLM"),_(ze,"class","relative group"),_(cs,"href","https://arxiv.org/abs/2006.11316"),_(cs,"rel","nofollow"),_(kn,"href","/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel"),_(hs,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),_(hs,"rel","nofollow"),_(zn,"href","/docs/transformers/main/en/model_doc/squeezebert#transformers.SqueezeBertForMaskedLM"),_(Z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(E,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(Ze,"id","transformers.SqueezeBertForSequenceClassification"),_(Ze,"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"),_(Ze,"href","#transformers.SqueezeBertForSequenceClassification"),_($e,"class","relative group"),_(ks,"href","https://arxiv.org/abs/2006.11316"),_(ks,"rel","nofollow"),_(qn,"href","/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel"),_($s,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),_($s,"rel","nofollow"),_($n,"href","/docs/transformers/main/en/model_doc/squeezebert#transformers.SqueezeBertForSequenceClassification"),_(U,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(j,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(rt,"id","transformers.SqueezeBertForMultipleChoice"),_(rt,"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"),_(rt,"href","#transformers.SqueezeBertForMultipleChoice"),_(ve,"class","relative group"),_(Bs,"href","https://arxiv.org/abs/2006.11316"),_(Bs,"rel","nofollow"),_(wn,"href","/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel"),_(xs,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),_(xs,"rel","nofollow"),_(vn,"href","/docs/transformers/main/en/model_doc/squeezebert#transformers.SqueezeBertForMultipleChoice"),_(ee,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(x,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(ct,"id","transformers.SqueezeBertForTokenClassification"),_(ct,"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"),_(ct,"href","#transformers.SqueezeBertForTokenClassification"),_(Te,"class","relative group"),_(Ls,"href","https://arxiv.org/abs/2006.11316"),_(Ls,"rel","nofollow"),_(yn,"href","/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel"),_(Ds,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),_(Ds,"rel","nofollow"),_(Tn,"href","/docs/transformers/main/en/model_doc/squeezebert#transformers.SqueezeBertForTokenClassification"),_(te,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(M,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(ft,"id","transformers.SqueezeBertForQuestionAnswering"),_(ft,"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"),_(ft,"href","#transformers.SqueezeBertForQuestionAnswering"),_(Be,"class","relative group"),_(Qs,"href","https://arxiv.org/abs/2006.11316"),_(Qs,"rel","nofollow"),_(Sn,"href","/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel"),_(Gs,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),_(Gs,"rel","nofollow"),_(Bn,"href","/docs/transformers/main/en/model_doc/squeezebert#transformers.SqueezeBertForQuestionAnswering"),_(se,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(F,"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),k(n,g,b),k(n,u,b),e(u,c),e(c,f),$(t,f,null),e(u,p),e(u,S),e(S,ya),k(n,hr,b),k(n,ce,b),e(ce,Ce),e(Ce,Rn),$(St,Rn,null),e(ce,Ta),e(ce,Wn),e(Wn,Sa),k(n,mr,b),k(n,oe,b),e(oe,Ba),e(oe,Bt),e(Bt,Ea),e(oe,ja),e(oe,Et),e(Et,xa),e(oe,Ma),k(n,fr,b),k(n,nn,b),e(nn,Fa),k(n,gr,b),k(n,on,b),e(on,Kn),e(Kn,Ca),k(n,_r,b),k(n,rn,b),e(rn,Pa),k(n,br,b),k(n,re,b),e(re,Hn),e(Hn,Aa),e(re,La),e(re,Qn),e(Qn,Ia),e(re,Na),e(re,jt),e(jt,Da),e(jt,Un),e(Un,Oa),e(jt,Ra),k(n,kr,b),k(n,Pe,b),e(Pe,Wa),e(Pe,xt),e(xt,Ka),e(Pe,Ha),k(n,zr,b),k(n,pe,b),e(pe,Ae),e(Ae,Vn),$(Mt,Vn,null),e(pe,Qa),e(pe,Gn),e(Gn,Ua),k(n,qr,b),k(n,H,b),$(Ft,H,null),e(H,Va),e(H,ue),e(ue,Ga),e(ue,an),e(an,Ja),e(ue,Xa),e(ue,Ct),e(Ct,Ya),e(ue,Za),e(H,ei),e(H,he),e(he,ti),e(he,ln),e(ln,si),e(he,ni),e(he,dn),e(dn,oi),e(he,ri),e(H,ai),$(Le,H,null),e(H,ii),e(H,Jn),e(Jn,li),k(n,$r,b),k(n,me,b),e(me,Ie),e(Ie,Xn),$(Pt,Xn,null),e(me,di),e(me,Yn),e(Yn,ci),k(n,wr,b),k(n,I,b),$(At,I,null),e(I,pi),e(I,Zn),e(Zn,ui),e(I,hi),e(I,Lt),e(Lt,mi),e(Lt,cn),e(cn,fi),e(Lt,gi),e(I,_i),e(I,ae),$(It,ae,null),e(ae,bi),e(ae,eo),e(eo,ki),e(ae,zi),e(ae,Nt),e(Nt,pn),e(pn,qi),e(pn,to),e(to,$i),e(Nt,wi),e(Nt,un),e(un,vi),e(un,so),e(so,yi),e(I,Ti),e(I,Ne),$(Dt,Ne,null),e(Ne,Si),e(Ne,Ot),e(Ot,Bi),e(Ot,no),e(no,Ei),e(Ot,ji),e(I,xi),e(I,J),$(Rt,J,null),e(J,Mi),e(J,oo),e(oo,Fi),e(J,Ci),$(De,J,null),e(J,Pi),e(J,fe),e(fe,Ai),e(fe,ro),e(ro,Li),e(fe,Ii),e(fe,ao),e(ao,Ni),e(fe,Di),e(I,Oi),e(I,hn),$(Wt,hn,null),k(n,vr,b),k(n,ge,b),e(ge,Oe),e(Oe,io),$(Kt,io,null),e(ge,Ri),e(ge,lo),e(lo,Wi),k(n,yr,b),k(n,Q,b),$(Ht,Q,null),e(Q,Ki),e(Q,Qt),e(Qt,Hi),e(Qt,co),e(co,Qi),e(Qt,Ui),e(Q,Vi),e(Q,Ut),e(Ut,Gi),e(Ut,mn),e(mn,Ji),e(Ut,Xi),e(Q,Yi),e(Q,ie),$(Vt,ie,null),e(ie,Zi),e(ie,po),e(po,el),e(ie,tl),e(ie,Gt),e(Gt,fn),e(fn,sl),e(fn,uo),e(uo,nl),e(Gt,ol),e(Gt,gn),e(gn,rl),e(gn,ho),e(ho,al),e(Q,il),e(Q,X),$(Jt,X,null),e(X,ll),e(X,mo),e(mo,dl),e(X,cl),$(Re,X,null),e(X,pl),e(X,_e),e(_e,ul),e(_e,fo),e(fo,hl),e(_e,ml),e(_e,go),e(go,fl),e(_e,gl),k(n,Tr,b),k(n,be,b),e(be,We),e(We,_o),$(Xt,_o,null),e(be,_l),e(be,bo),e(bo,bl),k(n,Sr,b),k(n,B,b),$(Yt,B,null),e(B,kl),e(B,ko),e(ko,zl),e(B,ql),e(B,Zt),e(Zt,$l),e(Zt,es),e(es,wl),e(Zt,vl),e(B,yl),e(B,ts),e(ts,Tl),e(ts,_n),e(_n,Sl),e(ts,Bl),e(B,El),e(B,ss),e(ss,jl),e(ss,ns),e(ns,xl),e(ss,Ml),e(B,Fl),e(B,os),e(os,Cl),e(os,zo),e(zo,Pl),e(os,Al),e(B,Ll),$(Ke,B,null),e(B,Il),$(He,B,null),e(B,Nl),e(B,Y),$(rs,Y,null),e(Y,Dl),e(Y,ke),e(ke,Ol),e(ke,bn),e(bn,Rl),e(ke,Wl),e(ke,qo),e(qo,Kl),e(ke,Hl),e(Y,Ql),$(Qe,Y,null),e(Y,Ul),$(Ue,Y,null),k(n,Br,b),k(n,ze,b),e(ze,Ve),e(Ve,$o),$(as,$o,null),e(ze,Vl),e(ze,wo),e(wo,Gl),k(n,Er,b),k(n,E,b),$(is,E,null),e(E,Jl),e(E,ls),e(ls,Xl),e(ls,vo),e(vo,Yl),e(ls,Zl),e(E,ed),e(E,ds),e(ds,td),e(ds,cs),e(cs,sd),e(ds,nd),e(E,od),e(E,ps),e(ps,rd),e(ps,kn),e(kn,ad),e(ps,id),e(E,ld),e(E,us),e(us,dd),e(us,hs),e(hs,cd),e(us,pd),e(E,ud),e(E,ms),e(ms,hd),e(ms,yo),e(yo,md),e(ms,fd),e(E,gd),$(Ge,E,null),e(E,_d),$(Je,E,null),e(E,bd),e(E,Z),$(fs,Z,null),e(Z,kd),e(Z,qe),e(qe,zd),e(qe,zn),e(zn,qd),e(qe,$d),e(qe,To),e(To,wd),e(qe,vd),e(Z,yd),$(Xe,Z,null),e(Z,Td),$(Ye,Z,null),k(n,jr,b),k(n,$e,b),e($e,Ze),e(Ze,So),$(gs,So,null),e($e,Sd),e($e,Bo),e(Bo,Bd),k(n,xr,b),k(n,j,b),$(_s,j,null),e(j,Ed),e(j,Eo),e(Eo,jd),e(j,xd),e(j,bs),e(bs,Md),e(bs,ks),e(ks,Fd),e(bs,Cd),e(j,Pd),e(j,zs),e(zs,Ad),e(zs,qn),e(qn,Ld),e(zs,Id),e(j,Nd),e(j,qs),e(qs,Dd),e(qs,$s),e($s,Od),e(qs,Rd),e(j,Wd),e(j,ws),e(ws,Kd),e(ws,jo),e(jo,Hd),e(ws,Qd),e(j,Ud),$(et,j,null),e(j,Vd),$(tt,j,null),e(j,Gd),e(j,U),$(vs,U,null),e(U,Jd),e(U,we),e(we,Xd),e(we,$n),e($n,Yd),e(we,Zd),e(we,xo),e(xo,ec),e(we,tc),e(U,sc),$(st,U,null),e(U,nc),$(nt,U,null),e(U,oc),$(ot,U,null),k(n,Mr,b),k(n,ve,b),e(ve,rt),e(rt,Mo),$(ys,Mo,null),e(ve,rc),e(ve,Fo),e(Fo,ac),k(n,Fr,b),k(n,x,b),$(Ts,x,null),e(x,ic),e(x,Co),e(Co,lc),e(x,dc),e(x,Ss),e(Ss,cc),e(Ss,Bs),e(Bs,pc),e(Ss,uc),e(x,hc),e(x,Es),e(Es,mc),e(Es,wn),e(wn,fc),e(Es,gc),e(x,_c),e(x,js),e(js,bc),e(js,xs),e(xs,kc),e(js,zc),e(x,qc),e(x,Ms),e(Ms,$c),e(Ms,Po),e(Po,wc),e(Ms,vc),e(x,yc),$(at,x,null),e(x,Tc),$(it,x,null),e(x,Sc),e(x,ee),$(Fs,ee,null),e(ee,Bc),e(ee,ye),e(ye,Ec),e(ye,vn),e(vn,jc),e(ye,xc),e(ye,Ao),e(Ao,Mc),e(ye,Fc),e(ee,Cc),$(lt,ee,null),e(ee,Pc),$(dt,ee,null),k(n,Cr,b),k(n,Te,b),e(Te,ct),e(ct,Lo),$(Cs,Lo,null),e(Te,Ac),e(Te,Io),e(Io,Lc),k(n,Pr,b),k(n,M,b),$(Ps,M,null),e(M,Ic),e(M,No),e(No,Nc),e(M,Dc),e(M,As),e(As,Oc),e(As,Ls),e(Ls,Rc),e(As,Wc),e(M,Kc),e(M,Is),e(Is,Hc),e(Is,yn),e(yn,Qc),e(Is,Uc),e(M,Vc),e(M,Ns),e(Ns,Gc),e(Ns,Ds),e(Ds,Jc),e(Ns,Xc),e(M,Yc),e(M,Os),e(Os,Zc),e(Os,Do),e(Do,ep),e(Os,tp),e(M,sp),$(pt,M,null),e(M,np),$(ut,M,null),e(M,op),e(M,te),$(Rs,te,null),e(te,rp),e(te,Se),e(Se,ap),e(Se,Tn),e(Tn,ip),e(Se,lp),e(Se,Oo),e(Oo,dp),e(Se,cp),e(te,pp),$(ht,te,null),e(te,up),$(mt,te,null),k(n,Ar,b),k(n,Be,b),e(Be,ft),e(ft,Ro),$(Ws,Ro,null),e(Be,hp),e(Be,Wo),e(Wo,mp),k(n,Lr,b),k(n,F,b),$(Ks,F,null),e(F,fp),e(F,Ee),e(Ee,gp),e(Ee,Ko),e(Ko,_p),e(Ee,bp),e(Ee,Ho),e(Ho,kp),e(Ee,zp),e(F,qp),e(F,Hs),e(Hs,$p),e(Hs,Qs),e(Qs,wp),e(Hs,vp),e(F,yp),e(F,Us),e(Us,Tp),e(Us,Sn),e(Sn,Sp),e(Us,Bp),e(F,Ep),e(F,Vs),e(Vs,jp),e(Vs,Gs),e(Gs,xp),e(Vs,Mp),e(F,Fp),e(F,Js),e(Js,Cp),e(Js,Qo),e(Qo,Pp),e(Js,Ap),e(F,Lp),$(gt,F,null),e(F,Ip),$(_t,F,null),e(F,Np),e(F,se),$(Xs,se,null),e(se,Dp),e(se,je),e(je,Op),e(je,Bn),e(Bn,Rp),e(je,Wp),e(je,Uo),e(Uo,Kp),e(je,Hp),e(se,Qp),$(bt,se,null),e(se,Up),$(kt,se,null),Ir=!0},p(n,[b]){const Ys={};b&2&&(Ys.$$scope={dirty:b,ctx:n}),Le.$set(Ys);const Vo={};b&2&&(Vo.$$scope={dirty:b,ctx:n}),De.$set(Vo);const Go={};b&2&&(Go.$$scope={dirty:b,ctx:n}),Re.$set(Go);const Jo={};b&2&&(Jo.$$scope={dirty:b,ctx:n}),Ke.$set(Jo);const Zs={};b&2&&(Zs.$$scope={dirty:b,ctx:n}),He.$set(Zs);const Xo={};b&2&&(Xo.$$scope={dirty:b,ctx:n}),Qe.$set(Xo);const Yo={};b&2&&(Yo.$$scope={dirty:b,ctx:n}),Ue.$set(Yo);const Zo={};b&2&&(Zo.$$scope={dirty:b,ctx:n}),Ge.$set(Zo);const xe={};b&2&&(xe.$$scope={dirty:b,ctx:n}),Je.$set(xe);const er={};b&2&&(er.$$scope={dirty:b,ctx:n}),Xe.$set(er);const tr={};b&2&&(tr.$$scope={dirty:b,ctx:n}),Ye.$set(tr);const sr={};b&2&&(sr.$$scope={dirty:b,ctx:n}),et.$set(sr);const nr={};b&2&&(nr.$$scope={dirty:b,ctx:n}),tt.$set(nr);const or={};b&2&&(or.$$scope={dirty:b,ctx:n}),st.$set(or);const rr={};b&2&&(rr.$$scope={dirty:b,ctx:n}),nt.$set(rr);const Me={};b&2&&(Me.$$scope={dirty:b,ctx:n}),ot.$set(Me);const ar={};b&2&&(ar.$$scope={dirty:b,ctx:n}),at.$set(ar);const ir={};b&2&&(ir.$$scope={dirty:b,ctx:n}),it.$set(ir);const en={};b&2&&(en.$$scope={dirty:b,ctx:n}),lt.$set(en);const lr={};b&2&&(lr.$$scope={dirty:b,ctx:n}),dt.$set(lr);const tn={};b&2&&(tn.$$scope={dirty:b,ctx:n}),pt.$set(tn);const dr={};b&2&&(dr.$$scope={dirty:b,ctx:n}),ut.$set(dr);const sn={};b&2&&(sn.$$scope={dirty:b,ctx:n}),ht.$set(sn);const cr={};b&2&&(cr.$$scope={dirty:b,ctx:n}),mt.$set(cr);const pr={};b&2&&(pr.$$scope={dirty:b,ctx:n}),gt.$set(pr);const ur={};b&2&&(ur.$$scope={dirty:b,ctx:n}),_t.$set(ur);const G={};b&2&&(G.$$scope={dirty:b,ctx:n}),bt.$set(G);const Fe={};b&2&&(Fe.$$scope={dirty:b,ctx:n}),kt.$set(Fe)},i(n){Ir||(w(t.$$.fragment,n),w(St.$$.fragment,n),w(Mt.$$.fragment,n),w(Ft.$$.fragment,n),w(Le.$$.fragment,n),w(Pt.$$.fragment,n),w(At.$$.fragment,n),w(It.$$.fragment,n),w(Dt.$$.fragment,n),w(Rt.$$.fragment,n),w(De.$$.fragment,n),w(Wt.$$.fragment,n),w(Kt.$$.fragment,n),w(Ht.$$.fragment,n),w(Vt.$$.fragment,n),w(Jt.$$.fragment,n),w(Re.$$.fragment,n),w(Xt.$$.fragment,n),w(Yt.$$.fragment,n),w(Ke.$$.fragment,n),w(He.$$.fragment,n),w(rs.$$.fragment,n),w(Qe.$$.fragment,n),w(Ue.$$.fragment,n),w(as.$$.fragment,n),w(is.$$.fragment,n),w(Ge.$$.fragment,n),w(Je.$$.fragment,n),w(fs.$$.fragment,n),w(Xe.$$.fragment,n),w(Ye.$$.fragment,n),w(gs.$$.fragment,n),w(_s.$$.fragment,n),w(et.$$.fragment,n),w(tt.$$.fragment,n),w(vs.$$.fragment,n),w(st.$$.fragment,n),w(nt.$$.fragment,n),w(ot.$$.fragment,n),w(ys.$$.fragment,n),w(Ts.$$.fragment,n),w(at.$$.fragment,n),w(it.$$.fragment,n),w(Fs.$$.fragment,n),w(lt.$$.fragment,n),w(dt.$$.fragment,n),w(Cs.$$.fragment,n),w(Ps.$$.fragment,n),w(pt.$$.fragment,n),w(ut.$$.fragment,n),w(Rs.$$.fragment,n),w(ht.$$.fragment,n),w(mt.$$.fragment,n),w(Ws.$$.fragment,n),w(Ks.$$.fragment,n),w(gt.$$.fragment,n),w(_t.$$.fragment,n),w(Xs.$$.fragment,n),w(bt.$$.fragment,n),w(kt.$$.fragment,n),Ir=!0)},o(n){v(t.$$.fragment,n),v(St.$$.fragment,n),v(Mt.$$.fragment,n),v(Ft.$$.fragment,n),v(Le.$$.fragment,n),v(Pt.$$.fragment,n),v(At.$$.fragment,n),v(It.$$.fragment,n),v(Dt.$$.fragment,n),v(Rt.$$.fragment,n),v(De.$$.fragment,n),v(Wt.$$.fragment,n),v(Kt.$$.fragment,n),v(Ht.$$.fragment,n),v(Vt.$$.fragment,n),v(Jt.$$.fragment,n),v(Re.$$.fragment,n),v(Xt.$$.fragment,n),v(Yt.$$.fragment,n),v(Ke.$$.fragment,n),v(He.$$.fragment,n),v(rs.$$.fragment,n),v(Qe.$$.fragment,n),v(Ue.$$.fragment,n),v(as.$$.fragment,n),v(is.$$.fragment,n),v(Ge.$$.fragment,n),v(Je.$$.fragment,n),v(fs.$$.fragment,n),v(Xe.$$.fragment,n),v(Ye.$$.fragment,n),v(gs.$$.fragment,n),v(_s.$$.fragment,n),v(et.$$.fragment,n),v(tt.$$.fragment,n),v(vs.$$.fragment,n),v(st.$$.fragment,n),v(nt.$$.fragment,n),v(ot.$$.fragment,n),v(ys.$$.fragment,n),v(Ts.$$.fragment,n),v(at.$$.fragment,n),v(it.$$.fragment,n),v(Fs.$$.fragment,n),v(lt.$$.fragment,n),v(dt.$$.fragment,n),v(Cs.$$.fragment,n),v(Ps.$$.fragment,n),v(pt.$$.fragment,n),v(ut.$$.fragment,n),v(Rs.$$.fragment,n),v(ht.$$.fragment,n),v(mt.$$.fragment,n),v(Ws.$$.fragment,n),v(Ks.$$.fragment,n),v(gt.$$.fragment,n),v(_t.$$.fragment,n),v(Xs.$$.fragment,n),v(bt.$$.fragment,n),v(kt.$$.fragment,n),Ir=!1},d(n){s(d),n&&s(g),n&&s(u),y(t),n&&s(hr),n&&s(ce),y(St),n&&s(mr),n&&s(oe),n&&s(fr),n&&s(nn),n&&s(gr),n&&s(on),n&&s(_r),n&&s(rn),n&&s(br),n&&s(re),n&&s(kr),n&&s(Pe),n&&s(zr),n&&s(pe),y(Mt),n&&s(qr),n&&s(H),y(Ft),y(Le),n&&s($r),n&&s(me),y(Pt),n&&s(wr),n&&s(I),y(At),y(It),y(Dt),y(Rt),y(De),y(Wt),n&&s(vr),n&&s(ge),y(Kt),n&&s(yr),n&&s(Q),y(Ht),y(Vt),y(Jt),y(Re),n&&s(Tr),n&&s(be),y(Xt),n&&s(Sr),n&&s(B),y(Yt),y(Ke),y(He),y(rs),y(Qe),y(Ue),n&&s(Br),n&&s(ze),y(as),n&&s(Er),n&&s(E),y(is),y(Ge),y(Je),y(fs),y(Xe),y(Ye),n&&s(jr),n&&s($e),y(gs),n&&s(xr),n&&s(j),y(_s),y(et),y(tt),y(vs),y(st),y(nt),y(ot),n&&s(Mr),n&&s(ve),y(ys),n&&s(Fr),n&&s(x),y(Ts),y(at),y(it),y(Fs),y(lt),y(dt),n&&s(Cr),n&&s(Te),y(Cs),n&&s(Pr),n&&s(M),y(Ps),y(pt),y(ut),y(Rs),y(ht),y(mt),n&&s(Ar),n&&s(Be),y(Ws),n&&s(Lr),n&&s(F),y(Ks),y(gt),y(_t),y(Xs),y(bt),y(kt)}}}const mm={local:"squeezebert",sections:[{local:"overview",title:"Overview"},{local:"transformers.SqueezeBertConfig",title:"SqueezeBertConfig"},{local:"transformers.SqueezeBertTokenizer",title:"SqueezeBertTokenizer"},{local:"transformers.SqueezeBertTokenizerFast",title:"SqueezeBertTokenizerFast"},{local:"transformers.SqueezeBertModel",title:"SqueezeBertModel"},{local:"transformers.SqueezeBertForMaskedLM",title:"SqueezeBertForMaskedLM"},{local:"transformers.SqueezeBertForSequenceClassification",title:"SqueezeBertForSequenceClassification"},{local:"transformers.SqueezeBertForMultipleChoice",title:"SqueezeBertForMultipleChoice"},{local:"transformers.SqueezeBertForTokenClassification",title:"SqueezeBertForTokenClassification"},{local:"transformers.SqueezeBertForQuestionAnswering",title:"SqueezeBertForQuestionAnswering"}],title:"SqueezeBERT"};function fm(T){return Ih(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class $m extends Ch{constructor(d){super();Ph(this,d,fm,hm,Ah,{})}}export{$m as default,mm as metadata};
