import{S as Kh,i as Hh,s as Qh,e as i,k as h,w as z,t as r,M as Uh,c as l,d as s,m,a as d,x as q,h as a,b,G as e,g as k,y as $,q as w,o as v,B as y,v as Vh,L as B}from"../../chunks/vendor-hf-doc-builder.js";import{T as Qn}from"../../chunks/Tip-hf-doc-builder.js";import{D as L}from"../../chunks/Docstring-hf-doc-builder.js";import{C as E}from"../../chunks/CodeBlock-hf-doc-builder.js";import{I as oe}from"../../chunks/IconCopyLink-hf-doc-builder.js";import{E as S}from"../../chunks/ExampleCodeBlock-hf-doc-builder.js";function Gh(T){let o,f,p,c,g;return c=new E({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(){o=i("p"),f=r("Examples:"),p=h(),z(c.$$.fragment)},l(t){o=l(t,"P",{});var u=d(o);f=a(u,"Examples:"),u.forEach(s),p=m(t),q(c.$$.fragment,t)},m(t,u){k(t,o,u),e(o,f),k(t,p,u),$(c,t,u),g=!0},p:B,i(t){g||(w(c.$$.fragment,t),g=!0)},o(t){v(c.$$.fragment,t),g=!1},d(t){t&&s(o),t&&s(p),y(c,t)}}}function Jh(T){let o,f,p,c,g;return c=new E({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(){o=i("p"),f=r("sequence pair mask has the following format:"),p=h(),z(c.$$.fragment)},l(t){o=l(t,"P",{});var u=d(o);f=a(u,"sequence pair mask has the following format:"),u.forEach(s),p=m(t),q(c.$$.fragment,t)},m(t,u){k(t,o,u),e(o,f),k(t,p,u),$(c,t,u),g=!0},p:B,i(t){g||(w(c.$$.fragment,t),g=!0)},o(t){v(c.$$.fragment,t),g=!1},d(t){t&&s(o),t&&s(p),y(c,t)}}}function Xh(T){let o,f,p,c,g;return c=new E({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(){o=i("p"),f=r("sequence pair mask has the following format:"),p=h(),z(c.$$.fragment)},l(t){o=l(t,"P",{});var u=d(o);f=a(u,"sequence pair mask has the following format:"),u.forEach(s),p=m(t),q(c.$$.fragment,t)},m(t,u){k(t,o,u),e(o,f),k(t,p,u),$(c,t,u),g=!0},p:B,i(t){g||(w(c.$$.fragment,t),g=!0)},o(t){v(c.$$.fragment,t),g=!1},d(t){t&&s(o),t&&s(p),y(c,t)}}}function Yh(T){let o,f,p,c,g;return c=new E({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(){o=i("p"),f=r("Hierarchy:"),p=h(),z(c.$$.fragment)},l(t){o=l(t,"P",{});var u=d(o);f=a(u,"Hierarchy:"),u.forEach(s),p=m(t),q(c.$$.fragment,t)},m(t,u){k(t,o,u),e(o,f),k(t,p,u),$(c,t,u),g=!0},p:B,i(t){g||(w(c.$$.fragment,t),g=!0)},o(t){v(c.$$.fragment,t),g=!1},d(t){t&&s(o),t&&s(p),y(c,t)}}}function Zh(T){let o,f,p,c,g;return c=new E({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(){o=i("p"),f=r("Data layouts:"),p=h(),z(c.$$.fragment)},l(t){o=l(t,"P",{});var u=d(o);f=a(u,"Data layouts:"),u.forEach(s),p=m(t),q(c.$$.fragment,t)},m(t,u){k(t,o,u),e(o,f),k(t,p,u),$(c,t,u),g=!0},p:B,i(t){g||(w(c.$$.fragment,t),g=!0)},o(t){v(c.$$.fragment,t),g=!1},d(t){t&&s(o),t&&s(p),y(c,t)}}}function em(T){let o,f,p,c,g;return{c(){o=i("p"),f=r("Although the recipe for forward pass needs to be defined within this function, one should call the "),p=i("code"),c=r("Module"),g=r(`
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){o=l(t,"P",{});var u=d(o);f=a(u,"Although the recipe for forward pass needs to be defined within this function, one should call the "),p=l(u,"CODE",{});var j=d(p);c=a(j,"Module"),j.forEach(s),g=a(u,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),u.forEach(s)},m(t,u){k(t,o,u),e(o,f),e(o,p),e(p,c),e(o,g)},d(t){t&&s(o)}}}function tm(T){let o,f,p,c,g;return c=new E({props:{code:`from transformers import SqueezeBertTokenizer, SqueezeBertModel
import torch

tokenizer = SqueezeBertTokenizer.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> SqueezeBertTokenizer, 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 = SqueezeBertTokenizer.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(){o=i("p"),f=r("Example:"),p=h(),z(c.$$.fragment)},l(t){o=l(t,"P",{});var u=d(o);f=a(u,"Example:"),u.forEach(s),p=m(t),q(c.$$.fragment,t)},m(t,u){k(t,o,u),e(o,f),k(t,p,u),$(c,t,u),g=!0},p:B,i(t){g||(w(c.$$.fragment,t),g=!0)},o(t){v(c.$$.fragment,t),g=!1},d(t){t&&s(o),t&&s(p),y(c,t)}}}function sm(T){let o,f,p,c,g;return c=new E({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(){o=i("p"),f=r("Hierarchy:"),p=h(),z(c.$$.fragment)},l(t){o=l(t,"P",{});var u=d(o);f=a(u,"Hierarchy:"),u.forEach(s),p=m(t),q(c.$$.fragment,t)},m(t,u){k(t,o,u),e(o,f),k(t,p,u),$(c,t,u),g=!0},p:B,i(t){g||(w(c.$$.fragment,t),g=!0)},o(t){v(c.$$.fragment,t),g=!1},d(t){t&&s(o),t&&s(p),y(c,t)}}}function nm(T){let o,f,p,c,g;return c=new E({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(){o=i("p"),f=r("Data layouts:"),p=h(),z(c.$$.fragment)},l(t){o=l(t,"P",{});var u=d(o);f=a(u,"Data layouts:"),u.forEach(s),p=m(t),q(c.$$.fragment,t)},m(t,u){k(t,o,u),e(o,f),k(t,p,u),$(c,t,u),g=!0},p:B,i(t){g||(w(c.$$.fragment,t),g=!0)},o(t){v(c.$$.fragment,t),g=!1},d(t){t&&s(o),t&&s(p),y(c,t)}}}function om(T){let o,f,p,c,g;return{c(){o=i("p"),f=r("Although the recipe for forward pass needs to be defined within this function, one should call the "),p=i("code"),c=r("Module"),g=r(`
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){o=l(t,"P",{});var u=d(o);f=a(u,"Although the recipe for forward pass needs to be defined within this function, one should call the "),p=l(u,"CODE",{});var j=d(p);c=a(j,"Module"),j.forEach(s),g=a(u,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),u.forEach(s)},m(t,u){k(t,o,u),e(o,f),e(o,p),e(p,c),e(o,g)},d(t){t&&s(o)}}}function rm(T){let o,f,p,c,g;return c=new E({props:{code:`from transformers import SqueezeBertTokenizer, SqueezeBertForMaskedLM
import torch

tokenizer = SqueezeBertTokenizer.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)
tokenizer.decode(predicted_token_id)
`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> SqueezeBertTokenizer, 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 = SqueezeBertTokenizer.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>tokenizer.decode(predicted_token_id)
`}}),{c(){o=i("p"),f=r("Example:"),p=h(),z(c.$$.fragment)},l(t){o=l(t,"P",{});var u=d(o);f=a(u,"Example:"),u.forEach(s),p=m(t),q(c.$$.fragment,t)},m(t,u){k(t,o,u),e(o,f),k(t,p,u),$(c,t,u),g=!0},p:B,i(t){g||(w(c.$$.fragment,t),g=!0)},o(t){v(c.$$.fragment,t),g=!1},d(t){t&&s(o),t&&s(p),y(c,t)}}}function am(T){let o,f;return o=new E({props:{code:`labels = tokenizer("The capital of France is Paris.", return_tensors="pt")["input_ids"]
# mask labels of non-[MASK] tokens
labels = torch.where(inputs.input_ids == tokenizer.mask_token_id, labels, -100)

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

<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs, labels=labels)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">round</span>(outputs.loss.item(), <span class="hljs-number">2</span>)
`}}),{c(){z(o.$$.fragment)},l(p){q(o.$$.fragment,p)},m(p,c){$(o,p,c),f=!0},p:B,i(p){f||(w(o.$$.fragment,p),f=!0)},o(p){v(o.$$.fragment,p),f=!1},d(p){y(o,p)}}}function im(T){let o,f,p,c,g;return c=new E({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(){o=i("p"),f=r("Hierarchy:"),p=h(),z(c.$$.fragment)},l(t){o=l(t,"P",{});var u=d(o);f=a(u,"Hierarchy:"),u.forEach(s),p=m(t),q(c.$$.fragment,t)},m(t,u){k(t,o,u),e(o,f),k(t,p,u),$(c,t,u),g=!0},p:B,i(t){g||(w(c.$$.fragment,t),g=!0)},o(t){v(c.$$.fragment,t),g=!1},d(t){t&&s(o),t&&s(p),y(c,t)}}}function lm(T){let o,f,p,c,g;return c=new E({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(){o=i("p"),f=r("Data layouts:"),p=h(),z(c.$$.fragment)},l(t){o=l(t,"P",{});var u=d(o);f=a(u,"Data layouts:"),u.forEach(s),p=m(t),q(c.$$.fragment,t)},m(t,u){k(t,o,u),e(o,f),k(t,p,u),$(c,t,u),g=!0},p:B,i(t){g||(w(c.$$.fragment,t),g=!0)},o(t){v(c.$$.fragment,t),g=!1},d(t){t&&s(o),t&&s(p),y(c,t)}}}function dm(T){let o,f,p,c,g;return{c(){o=i("p"),f=r("Although the recipe for forward pass needs to be defined within this function, one should call the "),p=i("code"),c=r("Module"),g=r(`
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){o=l(t,"P",{});var u=d(o);f=a(u,"Although the recipe for forward pass needs to be defined within this function, one should call the "),p=l(u,"CODE",{});var j=d(p);c=a(j,"Module"),j.forEach(s),g=a(u,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),u.forEach(s)},m(t,u){k(t,o,u),e(o,f),e(o,p),e(p,c),e(o,g)},d(t){t&&s(o)}}}function cm(T){let o,f,p,c,g;return c=new E({props:{code:`import torch
from transformers import SqueezeBertTokenizer, SqueezeBertForSequenceClassification

tokenizer = SqueezeBertTokenizer.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()
model.config.id2label[predicted_class_id]
`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> SqueezeBertTokenizer, SqueezeBertForSequenceClassification

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = SqueezeBertTokenizer.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>model.config.id2label[predicted_class_id]
`}}),{c(){o=i("p"),f=r("Example of single-label classification:"),p=h(),z(c.$$.fragment)},l(t){o=l(t,"P",{});var u=d(o);f=a(u,"Example of single-label classification:"),u.forEach(s),p=m(t),q(c.$$.fragment,t)},m(t,u){k(t,o,u),e(o,f),k(t,p,u),$(c,t,u),g=!0},p:B,i(t){g||(w(c.$$.fragment,t),g=!0)},o(t){v(c.$$.fragment,t),g=!1},d(t){t&&s(o),t&&s(p),y(c,t)}}}function pm(T){let o,f;return o=new E({props:{code:`# To train a model on \`num_labels\` classes, you can pass \`num_labels=num_labels\` to \`.from_pretrained(...)\`
num_labels = len(model.config.id2label)
model = SqueezeBertForSequenceClassification.from_pretrained("squeezebert/squeezebert-uncased", num_labels=num_labels)

labels = torch.tensor([1])
loss = model(**inputs, labels=labels).loss
round(loss.item(), 2)
`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># To train a model on \`num_labels\` classes, you can pass \`num_labels=num_labels\` to \`.from_pretrained(...)\`</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>num_labels = <span class="hljs-built_in">len</span>(model.config.id2label)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = 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
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">round</span>(loss.item(), <span class="hljs-number">2</span>)
`}}),{c(){z(o.$$.fragment)},l(p){q(o.$$.fragment,p)},m(p,c){$(o,p,c),f=!0},p:B,i(p){f||(w(o.$$.fragment,p),f=!0)},o(p){v(o.$$.fragment,p),f=!1},d(p){y(o,p)}}}function um(T){let o,f,p,c,g;return c=new E({props:{code:`import torch
from transformers import SqueezeBertTokenizer, SqueezeBertForSequenceClassification

tokenizer = SqueezeBertTokenizer.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_id = logits.argmax().item()
model.config.id2label[predicted_class_id]
`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> SqueezeBertTokenizer, SqueezeBertForSequenceClassification

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = SqueezeBertTokenizer.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_id = logits.argmax().item()
<span class="hljs-meta">&gt;&gt;&gt; </span>model.config.id2label[predicted_class_id]
`}}),{c(){o=i("p"),f=r("Example of multi-label classification:"),p=h(),z(c.$$.fragment)},l(t){o=l(t,"P",{});var u=d(o);f=a(u,"Example of multi-label classification:"),u.forEach(s),p=m(t),q(c.$$.fragment,t)},m(t,u){k(t,o,u),e(o,f),k(t,p,u),$(c,t,u),g=!0},p:B,i(t){g||(w(c.$$.fragment,t),g=!0)},o(t){v(c.$$.fragment,t),g=!1},d(t){t&&s(o),t&&s(p),y(c,t)}}}function hm(T){let o,f;return o=new E({props:{code:`# To train a model on \`num_labels\` classes, you can pass \`num_labels=num_labels\` to \`.from_pretrained(...)\`
num_labels = len(model.config.id2label)
model = SqueezeBertForSequenceClassification.from_pretrained(
    "squeezebert/squeezebert-uncased", num_labels=num_labels, problem_type="multi_label_classification"
)

labels = torch.nn.functional.one_hot(torch.tensor([predicted_class_id]), num_classes=num_labels).to(
    torch.float
)
loss = model(**inputs, labels=labels).loss
loss.backward()`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># To train a model on \`num_labels\` classes, you can pass \`num_labels=num_labels\` to \`.from_pretrained(...)\`</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>num_labels = <span class="hljs-built_in">len</span>(model.config.id2label)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = 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.nn.functional.one_hot(torch.tensor([predicted_class_id]), num_classes=num_labels).to(
<span class="hljs-meta">... </span>    torch.<span class="hljs-built_in">float</span>
<span class="hljs-meta">... </span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>loss = model(**inputs, labels=labels).loss
<span class="hljs-meta">&gt;&gt;&gt; </span>loss.backward()`}}),{c(){z(o.$$.fragment)},l(p){q(o.$$.fragment,p)},m(p,c){$(o,p,c),f=!0},p:B,i(p){f||(w(o.$$.fragment,p),f=!0)},o(p){v(o.$$.fragment,p),f=!1},d(p){y(o,p)}}}function mm(T){let o,f,p,c,g;return c=new E({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(){o=i("p"),f=r("Hierarchy:"),p=h(),z(c.$$.fragment)},l(t){o=l(t,"P",{});var u=d(o);f=a(u,"Hierarchy:"),u.forEach(s),p=m(t),q(c.$$.fragment,t)},m(t,u){k(t,o,u),e(o,f),k(t,p,u),$(c,t,u),g=!0},p:B,i(t){g||(w(c.$$.fragment,t),g=!0)},o(t){v(c.$$.fragment,t),g=!1},d(t){t&&s(o),t&&s(p),y(c,t)}}}function fm(T){let o,f,p,c,g;return c=new E({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(){o=i("p"),f=r("Data layouts:"),p=h(),z(c.$$.fragment)},l(t){o=l(t,"P",{});var u=d(o);f=a(u,"Data layouts:"),u.forEach(s),p=m(t),q(c.$$.fragment,t)},m(t,u){k(t,o,u),e(o,f),k(t,p,u),$(c,t,u),g=!0},p:B,i(t){g||(w(c.$$.fragment,t),g=!0)},o(t){v(c.$$.fragment,t),g=!1},d(t){t&&s(o),t&&s(p),y(c,t)}}}function gm(T){let o,f,p,c,g;return{c(){o=i("p"),f=r("Although the recipe for forward pass needs to be defined within this function, one should call the "),p=i("code"),c=r("Module"),g=r(`
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){o=l(t,"P",{});var u=d(o);f=a(u,"Although the recipe for forward pass needs to be defined within this function, one should call the "),p=l(u,"CODE",{});var j=d(p);c=a(j,"Module"),j.forEach(s),g=a(u,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),u.forEach(s)},m(t,u){k(t,o,u),e(o,f),e(o,p),e(p,c),e(o,g)},d(t){t&&s(o)}}}function _m(T){let o,f,p,c,g;return c=new E({props:{code:`from transformers import SqueezeBertTokenizer, SqueezeBertForMultipleChoice
import torch

tokenizer = SqueezeBertTokenizer.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> SqueezeBertTokenizer, 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 = SqueezeBertTokenizer.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(){o=i("p"),f=r("Example:"),p=h(),z(c.$$.fragment)},l(t){o=l(t,"P",{});var u=d(o);f=a(u,"Example:"),u.forEach(s),p=m(t),q(c.$$.fragment,t)},m(t,u){k(t,o,u),e(o,f),k(t,p,u),$(c,t,u),g=!0},p:B,i(t){g||(w(c.$$.fragment,t),g=!0)},o(t){v(c.$$.fragment,t),g=!1},d(t){t&&s(o),t&&s(p),y(c,t)}}}function bm(T){let o,f,p,c,g;return c=new E({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(){o=i("p"),f=r("Hierarchy:"),p=h(),z(c.$$.fragment)},l(t){o=l(t,"P",{});var u=d(o);f=a(u,"Hierarchy:"),u.forEach(s),p=m(t),q(c.$$.fragment,t)},m(t,u){k(t,o,u),e(o,f),k(t,p,u),$(c,t,u),g=!0},p:B,i(t){g||(w(c.$$.fragment,t),g=!0)},o(t){v(c.$$.fragment,t),g=!1},d(t){t&&s(o),t&&s(p),y(c,t)}}}function km(T){let o,f,p,c,g;return c=new E({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(){o=i("p"),f=r("Data layouts:"),p=h(),z(c.$$.fragment)},l(t){o=l(t,"P",{});var u=d(o);f=a(u,"Data layouts:"),u.forEach(s),p=m(t),q(c.$$.fragment,t)},m(t,u){k(t,o,u),e(o,f),k(t,p,u),$(c,t,u),g=!0},p:B,i(t){g||(w(c.$$.fragment,t),g=!0)},o(t){v(c.$$.fragment,t),g=!1},d(t){t&&s(o),t&&s(p),y(c,t)}}}function zm(T){let o,f,p,c,g;return{c(){o=i("p"),f=r("Although the recipe for forward pass needs to be defined within this function, one should call the "),p=i("code"),c=r("Module"),g=r(`
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){o=l(t,"P",{});var u=d(o);f=a(u,"Although the recipe for forward pass needs to be defined within this function, one should call the "),p=l(u,"CODE",{});var j=d(p);c=a(j,"Module"),j.forEach(s),g=a(u,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),u.forEach(s)},m(t,u){k(t,o,u),e(o,f),e(o,p),e(p,c),e(o,g)},d(t){t&&s(o)}}}function qm(T){let o,f,p,c,g;return c=new E({props:{code:`from transformers import SqueezeBertTokenizer, SqueezeBertForTokenClassification
import torch

tokenizer = SqueezeBertTokenizer.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]]
predicted_tokens_classes
`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> SqueezeBertTokenizer, 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 = SqueezeBertTokenizer.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>predicted_tokens_classes
`}}),{c(){o=i("p"),f=r("Example:"),p=h(),z(c.$$.fragment)},l(t){o=l(t,"P",{});var u=d(o);f=a(u,"Example:"),u.forEach(s),p=m(t),q(c.$$.fragment,t)},m(t,u){k(t,o,u),e(o,f),k(t,p,u),$(c,t,u),g=!0},p:B,i(t){g||(w(c.$$.fragment,t),g=!0)},o(t){v(c.$$.fragment,t),g=!1},d(t){t&&s(o),t&&s(p),y(c,t)}}}function $m(T){let o,f;return o=new E({props:{code:`labels = predicted_token_class_ids
loss = model(**inputs, labels=labels).loss
round(loss.item(), 2)
`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span>labels = predicted_token_class_ids
<span class="hljs-meta">&gt;&gt;&gt; </span>loss = model(**inputs, labels=labels).loss
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">round</span>(loss.item(), <span class="hljs-number">2</span>)
`}}),{c(){z(o.$$.fragment)},l(p){q(o.$$.fragment,p)},m(p,c){$(o,p,c),f=!0},p:B,i(p){f||(w(o.$$.fragment,p),f=!0)},o(p){v(o.$$.fragment,p),f=!1},d(p){y(o,p)}}}function wm(T){let o,f,p,c,g;return c=new E({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(){o=i("p"),f=r("Hierarchy:"),p=h(),z(c.$$.fragment)},l(t){o=l(t,"P",{});var u=d(o);f=a(u,"Hierarchy:"),u.forEach(s),p=m(t),q(c.$$.fragment,t)},m(t,u){k(t,o,u),e(o,f),k(t,p,u),$(c,t,u),g=!0},p:B,i(t){g||(w(c.$$.fragment,t),g=!0)},o(t){v(c.$$.fragment,t),g=!1},d(t){t&&s(o),t&&s(p),y(c,t)}}}function vm(T){let o,f,p,c,g;return c=new E({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(){o=i("p"),f=r("Data layouts:"),p=h(),z(c.$$.fragment)},l(t){o=l(t,"P",{});var u=d(o);f=a(u,"Data layouts:"),u.forEach(s),p=m(t),q(c.$$.fragment,t)},m(t,u){k(t,o,u),e(o,f),k(t,p,u),$(c,t,u),g=!0},p:B,i(t){g||(w(c.$$.fragment,t),g=!0)},o(t){v(c.$$.fragment,t),g=!1},d(t){t&&s(o),t&&s(p),y(c,t)}}}function ym(T){let o,f,p,c,g;return{c(){o=i("p"),f=r("Although the recipe for forward pass needs to be defined within this function, one should call the "),p=i("code"),c=r("Module"),g=r(`
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){o=l(t,"P",{});var u=d(o);f=a(u,"Although the recipe for forward pass needs to be defined within this function, one should call the "),p=l(u,"CODE",{});var j=d(p);c=a(j,"Module"),j.forEach(s),g=a(u,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),u.forEach(s)},m(t,u){k(t,o,u),e(o,f),e(o,p),e(p,c),e(o,g)},d(t){t&&s(o)}}}function Tm(T){let o,f,p,c,g;return c=new E({props:{code:`from transformers import SqueezeBertTokenizer, SqueezeBertForQuestionAnswering
import torch

tokenizer = SqueezeBertTokenizer.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]
tokenizer.decode(predict_answer_tokens)
`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> SqueezeBertTokenizer, 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 = SqueezeBertTokenizer.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>tokenizer.decode(predict_answer_tokens)
`}}),{c(){o=i("p"),f=r("Example:"),p=h(),z(c.$$.fragment)},l(t){o=l(t,"P",{});var u=d(o);f=a(u,"Example:"),u.forEach(s),p=m(t),q(c.$$.fragment,t)},m(t,u){k(t,o,u),e(o,f),k(t,p,u),$(c,t,u),g=!0},p:B,i(t){g||(w(c.$$.fragment,t),g=!0)},o(t){v(c.$$.fragment,t),g=!1},d(t){t&&s(o),t&&s(p),y(c,t)}}}function Sm(T){let o,f;return o=new E({props:{code:`# target is "nice puppet"
target_start_index = torch.tensor([14])
target_end_index = torch.tensor([15])

outputs = model(**inputs, start_positions=target_start_index, end_positions=target_end_index)
loss = outputs.loss
round(loss.item(), 2)
`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># target is &quot;nice puppet&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>target_start_index = torch.tensor([<span class="hljs-number">14</span>])
<span class="hljs-meta">&gt;&gt;&gt; </span>target_end_index = torch.tensor([<span class="hljs-number">15</span>])

<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs, start_positions=target_start_index, end_positions=target_end_index)
<span class="hljs-meta">&gt;&gt;&gt; </span>loss = outputs.loss
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">round</span>(loss.item(), <span class="hljs-number">2</span>)
`}}),{c(){z(o.$$.fragment)},l(p){q(o.$$.fragment,p)},m(p,c){$(o,p,c),f=!0},p:B,i(p){f||(w(o.$$.fragment,p),f=!0)},o(p){v(o.$$.fragment,p),f=!1},d(p){y(o,p)}}}function Bm(T){let o,f,p,c,g,t,u,j,Ca,$r,he,Ie,Un,Ft,Pa,Vn,Aa,wr,re,La,Ct,Ia,Na,Pt,Da,Oa,vr,cn,Ra,yr,pn,Gn,Wa,Tr,un,Ka,Sr,ae,Jn,Ha,Qa,Xn,Ua,Va,At,Ga,Yn,Ja,Xa,Br,Ne,Ya,Lt,Za,ei,Er,me,De,Zn,It,ti,eo,si,jr,Q,Nt,ni,fe,oi,hn,ri,ai,Dt,ii,li,di,ge,ci,mn,pi,ui,fn,hi,mi,fi,Oe,gi,to,_i,xr,_e,Re,so,Ot,bi,no,ki,Mr,I,Rt,zi,oo,qi,$i,Wt,wi,gn,vi,yi,Ti,ie,Kt,Si,ro,Bi,Ei,Ht,_n,ji,ao,xi,Mi,bn,Fi,io,Ci,Pi,We,Qt,Ai,Ut,Li,lo,Ii,Ni,Di,ee,Vt,Oi,co,Ri,Wi,Ke,Ki,be,Hi,po,Qi,Ui,uo,Vi,Gi,Ji,kn,Gt,Fr,ke,He,ho,Jt,Xi,mo,Yi,Cr,U,Xt,Zi,Yt,el,fo,tl,sl,nl,Zt,ol,zn,rl,al,il,le,es,ll,go,dl,cl,ts,qn,pl,_o,ul,hl,$n,ml,bo,fl,gl,te,ss,_l,ko,bl,kl,Qe,zl,ze,ql,zo,$l,wl,qo,vl,yl,Pr,qe,Ue,$o,ns,Tl,wo,Sl,Ar,x,os,Bl,vo,El,jl,rs,xl,as,Ml,Fl,Cl,is,Pl,wn,Al,Ll,Il,ls,Nl,ds,Dl,Ol,Rl,cs,Wl,yo,Kl,Hl,Ql,Ve,Ul,Ge,Vl,se,ps,Gl,$e,Jl,vn,Xl,Yl,To,Zl,ed,td,Je,sd,Xe,Lr,we,Ye,So,us,nd,Bo,od,Ir,M,hs,rd,ms,ad,Eo,id,ld,dd,fs,cd,gs,pd,ud,hd,_s,md,yn,fd,gd,_d,bs,bd,ks,kd,zd,qd,zs,$d,jo,wd,vd,yd,Ze,Td,et,Sd,V,qs,Bd,ve,Ed,Tn,jd,xd,xo,Md,Fd,Cd,tt,Pd,st,Ad,nt,Nr,ye,ot,Mo,$s,Ld,Fo,Id,Dr,F,ws,Nd,Co,Dd,Od,vs,Rd,ys,Wd,Kd,Hd,Ts,Qd,Sn,Ud,Vd,Gd,Ss,Jd,Bs,Xd,Yd,Zd,Es,ec,Po,tc,sc,nc,rt,oc,at,rc,N,js,ac,Te,ic,Bn,lc,dc,Ao,cc,pc,uc,it,hc,lt,mc,dt,fc,ct,gc,pt,Or,Se,ut,Lo,xs,_c,Io,bc,Rr,C,Ms,kc,No,zc,qc,Fs,$c,Cs,wc,vc,yc,Ps,Tc,En,Sc,Bc,Ec,As,jc,Ls,xc,Mc,Fc,Is,Cc,Do,Pc,Ac,Lc,ht,Ic,mt,Nc,ne,Ns,Dc,Be,Oc,jn,Rc,Wc,Oo,Kc,Hc,Qc,ft,Uc,gt,Wr,Ee,_t,Ro,Ds,Vc,Wo,Gc,Kr,P,Os,Jc,Ko,Xc,Yc,Rs,Zc,Ws,ep,tp,sp,Ks,np,xn,op,rp,ap,Hs,ip,Qs,lp,dp,cp,Us,pp,Ho,up,hp,mp,bt,fp,kt,gp,G,Vs,_p,je,bp,Mn,kp,zp,Qo,qp,$p,wp,zt,vp,qt,yp,$t,Hr,xe,wt,Uo,Gs,Tp,Vo,Sp,Qr,A,Js,Bp,Me,Ep,Go,jp,xp,Jo,Mp,Fp,Cp,Xs,Pp,Ys,Ap,Lp,Ip,Zs,Np,Fn,Dp,Op,Rp,en,Wp,tn,Kp,Hp,Qp,sn,Up,Xo,Vp,Gp,Jp,vt,Xp,yt,Yp,J,nn,Zp,Fe,eu,Cn,tu,su,Yo,nu,ou,ru,Tt,au,St,iu,Bt,Ur;return t=new oe({}),Ft=new oe({}),It=new oe({}),Nt=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/pr_19907/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/pr_19907/en/model_doc/bert#transformers.BertModel">BertModel</a> or <a href="/docs/transformers/pr_19907/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/vr_19907/src/transformers/models/squeezebert/configuration_squeezebert.py#L37"}}),Oe=new S({props:{anchor:"transformers.SqueezeBertConfig.example",$$slots:{default:[Gh]},$$scope:{ctx:T}}}),Ot=new oe({}),Rt=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/vr_19907/src/transformers/models/squeezebert/tokenization_squeezebert.py#L79"}}),Kt=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/vr_19907/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>
`}}),Qt=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/vr_19907/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>
`}}),Vt=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/vr_19907/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>
`}}),Ke=new S({props:{anchor:"transformers.SqueezeBertTokenizer.create_token_type_ids_from_sequences.example",$$slots:{default:[Jh]},$$scope:{ctx:T}}}),Gt=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/vr_19907/src/transformers/models/squeezebert/tokenization_squeezebert.py#L292"}}),Jt=new oe({}),Xt=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/vr_19907/src/transformers/models/squeezebert/tokenization_squeezebert_fast.py#L69"}}),es=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/vr_19907/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>
`}}),ss=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/vr_19907/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>
`}}),Qe=new S({props:{anchor:"transformers.SqueezeBertTokenizerFast.create_token_type_ids_from_sequences.example",$$slots:{default:[Xh]},$$scope:{ctx:T}}}),ns=new oe({}),os=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/pr_19907/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/pr_19907/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/vr_19907/src/transformers/models/squeezebert/modeling_squeezebert.py#L549"}}),Ve=new S({props:{anchor:"transformers.SqueezeBertModel.example",$$slots:{default:[Yh]},$$scope:{ctx:T}}}),Ge=new S({props:{anchor:"transformers.SqueezeBertModel.example-2",$$slots:{default:[Zh]},$$scope:{ctx:T}}}),ps=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/pr_19907/en/model_doc/squeezebert#transformers.SqueezeBertTokenizer">SqueezeBertTokenizer</a>. See <a href="/docs/transformers/pr_19907/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_19907/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.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/pr_19907/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/vr_19907/src/transformers/models/squeezebert/modeling_squeezebert.py#L574",returnDescription:`
<p>A <a
  href="/docs/transformers/pr_19907/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/pr_19907/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/pr_19907/en/main_classes/output#transformers.modeling_outputs.BaseModelOutputWithPooling"
>transformers.modeling_outputs.BaseModelOutputWithPooling</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Je=new Qn({props:{$$slots:{default:[em]},$$scope:{ctx:T}}}),Xe=new S({props:{anchor:"transformers.SqueezeBertModel.forward.example",$$slots:{default:[tm]},$$scope:{ctx:T}}}),us=new oe({}),hs=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/pr_19907/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/pr_19907/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/vr_19907/src/transformers/models/squeezebert/modeling_squeezebert.py#L649"}}),Ze=new S({props:{anchor:"transformers.SqueezeBertForMaskedLM.example",$$slots:{default:[sm]},$$scope:{ctx:T}}}),et=new S({props:{anchor:"transformers.SqueezeBertForMaskedLM.example-2",$$slots:{default:[nm]},$$scope:{ctx:T}}}),qs=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/pr_19907/en/model_doc/squeezebert#transformers.SqueezeBertTokenizer">SqueezeBertTokenizer</a>. See <a href="/docs/transformers/pr_19907/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_19907/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.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/pr_19907/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/vr_19907/src/transformers/models/squeezebert/modeling_squeezebert.py#L668",returnDescription:`
<p>A <a
  href="/docs/transformers/pr_19907/en/main_classes/output#transformers.modeling_outputs.MaskedLMOutput"
>transformers.modeling_outputs.MaskedLMOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/pr_19907/en/model_doc/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/pr_19907/en/main_classes/output#transformers.modeling_outputs.MaskedLMOutput"
>transformers.modeling_outputs.MaskedLMOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),tt=new Qn({props:{$$slots:{default:[om]},$$scope:{ctx:T}}}),st=new S({props:{anchor:"transformers.SqueezeBertForMaskedLM.forward.example",$$slots:{default:[rm]},$$scope:{ctx:T}}}),nt=new S({props:{anchor:"transformers.SqueezeBertForMaskedLM.forward.example-2",$$slots:{default:[am]},$$scope:{ctx:T}}}),$s=new oe({}),ws=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/pr_19907/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/pr_19907/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/vr_19907/src/transformers/models/squeezebert/modeling_squeezebert.py#L735"}}),rt=new S({props:{anchor:"transformers.SqueezeBertForSequenceClassification.example",$$slots:{default:[im]},$$scope:{ctx:T}}}),at=new S({props:{anchor:"transformers.SqueezeBertForSequenceClassification.example-2",$$slots:{default:[lm]},$$scope:{ctx:T}}}),js=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/pr_19907/en/model_doc/squeezebert#transformers.SqueezeBertTokenizer">SqueezeBertTokenizer</a>. See <a href="/docs/transformers/pr_19907/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_19907/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.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/pr_19907/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/vr_19907/src/transformers/models/squeezebert/modeling_squeezebert.py#L748",returnDescription:`
<p>A <a
  href="/docs/transformers/pr_19907/en/main_classes/output#transformers.modeling_outputs.SequenceClassifierOutput"
>transformers.modeling_outputs.SequenceClassifierOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/pr_19907/en/model_doc/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/pr_19907/en/main_classes/output#transformers.modeling_outputs.SequenceClassifierOutput"
>transformers.modeling_outputs.SequenceClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),it=new Qn({props:{$$slots:{default:[dm]},$$scope:{ctx:T}}}),lt=new S({props:{anchor:"transformers.SqueezeBertForSequenceClassification.forward.example",$$slots:{default:[cm]},$$scope:{ctx:T}}}),dt=new S({props:{anchor:"transformers.SqueezeBertForSequenceClassification.forward.example-2",$$slots:{default:[pm]},$$scope:{ctx:T}}}),ct=new S({props:{anchor:"transformers.SqueezeBertForSequenceClassification.forward.example-3",$$slots:{default:[um]},$$scope:{ctx:T}}}),pt=new S({props:{anchor:"transformers.SqueezeBertForSequenceClassification.forward.example-4",$$slots:{default:[hm]},$$scope:{ctx:T}}}),xs=new oe({}),Ms=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/pr_19907/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/pr_19907/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/vr_19907/src/transformers/models/squeezebert/modeling_squeezebert.py#L835"}}),ht=new S({props:{anchor:"transformers.SqueezeBertForMultipleChoice.example",$$slots:{default:[mm]},$$scope:{ctx:T}}}),mt=new S({props:{anchor:"transformers.SqueezeBertForMultipleChoice.example-2",$$slots:{default:[fm]},$$scope:{ctx:T}}}),Ns=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/pr_19907/en/model_doc/squeezebert#transformers.SqueezeBertTokenizer">SqueezeBertTokenizer</a>. See <a href="/docs/transformers/pr_19907/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_19907/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.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/pr_19907/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/vr_19907/src/transformers/models/squeezebert/modeling_squeezebert.py#L846",returnDescription:`
<p>A <a
  href="/docs/transformers/pr_19907/en/main_classes/output#transformers.modeling_outputs.MultipleChoiceModelOutput"
>transformers.modeling_outputs.MultipleChoiceModelOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/pr_19907/en/model_doc/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/pr_19907/en/main_classes/output#transformers.modeling_outputs.MultipleChoiceModelOutput"
>transformers.modeling_outputs.MultipleChoiceModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),ft=new Qn({props:{$$slots:{default:[gm]},$$scope:{ctx:T}}}),gt=new S({props:{anchor:"transformers.SqueezeBertForMultipleChoice.forward.example",$$slots:{default:[_m]},$$scope:{ctx:T}}}),Ds=new oe({}),Os=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/pr_19907/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/pr_19907/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/vr_19907/src/transformers/models/squeezebert/modeling_squeezebert.py#L929"}}),bt=new S({props:{anchor:"transformers.SqueezeBertForTokenClassification.example",$$slots:{default:[bm]},$$scope:{ctx:T}}}),kt=new S({props:{anchor:"transformers.SqueezeBertForTokenClassification.example-2",$$slots:{default:[km]},$$scope:{ctx:T}}}),Vs=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/pr_19907/en/model_doc/squeezebert#transformers.SqueezeBertTokenizer">SqueezeBertTokenizer</a>. See <a href="/docs/transformers/pr_19907/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_19907/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.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/pr_19907/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/vr_19907/src/transformers/models/squeezebert/modeling_squeezebert.py#L941",returnDescription:`
<p>A <a
  href="/docs/transformers/pr_19907/en/main_classes/output#transformers.modeling_outputs.TokenClassifierOutput"
>transformers.modeling_outputs.TokenClassifierOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/pr_19907/en/model_doc/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/pr_19907/en/main_classes/output#transformers.modeling_outputs.TokenClassifierOutput"
>transformers.modeling_outputs.TokenClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),zt=new Qn({props:{$$slots:{default:[zm]},$$scope:{ctx:T}}}),qt=new S({props:{anchor:"transformers.SqueezeBertForTokenClassification.forward.example",$$slots:{default:[qm]},$$scope:{ctx:T}}}),$t=new S({props:{anchor:"transformers.SqueezeBertForTokenClassification.forward.example-2",$$slots:{default:[$m]},$$scope:{ctx:T}}}),Gs=new oe({}),Js=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/pr_19907/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/pr_19907/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/vr_19907/src/transformers/models/squeezebert/modeling_squeezebert.py#L1008"}}),vt=new S({props:{anchor:"transformers.SqueezeBertForQuestionAnswering.example",$$slots:{default:[wm]},$$scope:{ctx:T}}}),yt=new S({props:{anchor:"transformers.SqueezeBertForQuestionAnswering.example-2",$$slots:{default:[vm]},$$scope:{ctx:T}}}),nn=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/pr_19907/en/model_doc/squeezebert#transformers.SqueezeBertTokenizer">SqueezeBertTokenizer</a>. See <a href="/docs/transformers/pr_19907/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_19907/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.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/pr_19907/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/vr_19907/src/transformers/models/squeezebert/modeling_squeezebert.py#L1019",returnDescription:`
<p>A <a
  href="/docs/transformers/pr_19907/en/main_classes/output#transformers.modeling_outputs.QuestionAnsweringModelOutput"
>transformers.modeling_outputs.QuestionAnsweringModelOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/pr_19907/en/model_doc/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/pr_19907/en/main_classes/output#transformers.modeling_outputs.QuestionAnsweringModelOutput"
>transformers.modeling_outputs.QuestionAnsweringModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Tt=new Qn({props:{$$slots:{default:[ym]},$$scope:{ctx:T}}}),St=new S({props:{anchor:"transformers.SqueezeBertForQuestionAnswering.forward.example",$$slots:{default:[Tm]},$$scope:{ctx:T}}}),Bt=new S({props:{anchor:"transformers.SqueezeBertForQuestionAnswering.forward.example-2",$$slots:{default:[Sm]},$$scope:{ctx:T}}}),{c(){o=i("meta"),f=h(),p=i("h1"),c=i("a"),g=i("span"),z(t.$$.fragment),u=h(),j=i("span"),Ca=r("SqueezeBERT"),$r=h(),he=i("h2"),Ie=i("a"),Un=i("span"),z(Ft.$$.fragment),Pa=h(),Vn=i("span"),Aa=r("Overview"),wr=h(),re=i("p"),La=r("The SqueezeBERT model was proposed in "),Ct=i("a"),Ia=r("SqueezeBERT: What can computer vision teach NLP about efficient neural networks?"),Na=r(` 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 `),Pt=i("a"),Da=r("grouped convolutions"),Oa=r(`
instead of fully-connected layers for the Q, K, V and FFN layers.`),vr=h(),cn=i("p"),Ra=r("The abstract from the paper is the following:"),yr=h(),pn=i("p"),Gn=i("em"),Wa=r(`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.`),Tr=h(),un=i("p"),Ka=r("Tips:"),Sr=h(),ae=i("ul"),Jn=i("li"),Ha=r(`SqueezeBERT is a model with absolute position embeddings so it\u2019s usually advised to pad the inputs on the right
rather than the left.`),Qa=h(),Xn=i("li"),Ua=r(`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.`),Va=h(),At=i("li"),Ga=r(`For best results when finetuning on sequence classification tasks, it is recommended to start with the
`),Yn=i("em"),Ja=r("squeezebert/squeezebert-mnli-headless"),Xa=r(" checkpoint."),Br=h(),Ne=i("p"),Ya=r("This model was contributed by "),Lt=i("a"),Za=r("forresti"),ei=r("."),Er=h(),me=i("h2"),De=i("a"),Zn=i("span"),z(It.$$.fragment),ti=h(),eo=i("span"),si=r("SqueezeBertConfig"),jr=h(),Q=i("div"),z(Nt.$$.fragment),ni=h(),fe=i("p"),oi=r("This is the configuration class to store the configuration of a "),hn=i("a"),ri=r("SqueezeBertModel"),ai=r(`. 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
`),Dt=i("a"),ii=r("squeezebert/squeezebert-uncased"),li=r(" architecture."),di=h(),ge=i("p"),ci=r("Configuration objects inherit from "),mn=i("a"),pi=r("PretrainedConfig"),ui=r(` and can be used to control the model outputs. Read the
documentation from `),fn=i("a"),hi=r("PretrainedConfig"),mi=r(" for more information."),fi=h(),z(Oe.$$.fragment),gi=h(),to=i("p"),_i=r(`Attributes: pretrained_config_archive_map (Dict[str, str]): A dictionary containing all the available pre-trained
checkpoints.`),xr=h(),_e=i("h2"),Re=i("a"),so=i("span"),z(Ot.$$.fragment),bi=h(),no=i("span"),ki=r("SqueezeBertTokenizer"),Mr=h(),I=i("div"),z(Rt.$$.fragment),zi=h(),oo=i("p"),qi=r("Construct a SqueezeBERT tokenizer. Based on WordPiece."),$i=h(),Wt=i("p"),wi=r("This tokenizer inherits from "),gn=i("a"),vi=r("PreTrainedTokenizer"),yi=r(` which contains most of the main methods. Users should refer to
this superclass for more information regarding those methods.`),Ti=h(),ie=i("div"),z(Kt.$$.fragment),Si=h(),ro=i("p"),Bi=r(`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:`),Ei=h(),Ht=i("ul"),_n=i("li"),ji=r("single sequence: "),ao=i("code"),xi=r("[CLS] X [SEP]"),Mi=h(),bn=i("li"),Fi=r("pair of sequences: "),io=i("code"),Ci=r("[CLS] A [SEP] B [SEP]"),Pi=h(),We=i("div"),z(Qt.$$.fragment),Ai=h(),Ut=i("p"),Li=r(`Retrieve sequence ids from a token list that has no special tokens added. This method is called when adding
special tokens using the tokenizer `),lo=i("code"),Ii=r("prepare_for_model"),Ni=r(" method."),Di=h(),ee=i("div"),z(Vt.$$.fragment),Oi=h(),co=i("p"),Ri=r("Create a mask from the two sequences passed to be used in a sequence-pair classification task. A SqueezeBERT"),Wi=h(),z(Ke.$$.fragment),Ki=h(),be=i("p"),Hi=r("If "),po=i("code"),Qi=r("token_ids_1"),Ui=r(" is "),uo=i("code"),Vi=r("None"),Gi=r(", this method only returns the first portion of the mask (0s)."),Ji=h(),kn=i("div"),z(Gt.$$.fragment),Fr=h(),ke=i("h2"),He=i("a"),ho=i("span"),z(Jt.$$.fragment),Xi=h(),mo=i("span"),Yi=r("SqueezeBertTokenizerFast"),Cr=h(),U=i("div"),z(Xt.$$.fragment),Zi=h(),Yt=i("p"),el=r("Construct a \u201Cfast\u201D SqueezeBERT tokenizer (backed by HuggingFace\u2019s "),fo=i("em"),tl=r("tokenizers"),sl=r(" library). Based on WordPiece."),nl=h(),Zt=i("p"),ol=r("This tokenizer inherits from "),zn=i("a"),rl=r("PreTrainedTokenizerFast"),al=r(` which contains most of the main methods. Users should
refer to this superclass for more information regarding those methods.`),il=h(),le=i("div"),z(es.$$.fragment),ll=h(),go=i("p"),dl=r(`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:`),cl=h(),ts=i("ul"),qn=i("li"),pl=r("single sequence: "),_o=i("code"),ul=r("[CLS] X [SEP]"),hl=h(),$n=i("li"),ml=r("pair of sequences: "),bo=i("code"),fl=r("[CLS] A [SEP] B [SEP]"),gl=h(),te=i("div"),z(ss.$$.fragment),_l=h(),ko=i("p"),bl=r("Create a mask from the two sequences passed to be used in a sequence-pair classification task. A SqueezeBERT"),kl=h(),z(Qe.$$.fragment),zl=h(),ze=i("p"),ql=r("If "),zo=i("code"),$l=r("token_ids_1"),wl=r(" is "),qo=i("code"),vl=r("None"),yl=r(", this method only returns the first portion of the mask (0s)."),Pr=h(),qe=i("h2"),Ue=i("a"),$o=i("span"),z(ns.$$.fragment),Tl=h(),wo=i("span"),Sl=r("SqueezeBertModel"),Ar=h(),x=i("div"),z(os.$$.fragment),Bl=h(),vo=i("p"),El=r("The bare SqueezeBERT Model transformer outputting raw hidden-states without any specific head on top."),jl=h(),rs=i("p"),xl=r("The SqueezeBERT model was proposed in "),as=i("a"),Ml=r(`SqueezeBERT: What can computer vision teach NLP about efficient neural
networks?`),Fl=r(` by Forrest N. Iandola, Albert E. Shaw, Ravi Krishna, and Kurt W.
Keutzer`),Cl=h(),is=i("p"),Pl=r("This model inherits from "),wn=i("a"),Al=r("PreTrainedModel"),Ll=r(`. 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.)`),Il=h(),ls=i("p"),Nl=r("This model is also a PyTorch "),ds=i("a"),Dl=r("torch.nn.Module"),Ol=r(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Rl=h(),cs=i("p"),Wl=r(`For best results finetuning SqueezeBERT on text classification tasks, it is recommended to use the
`),yo=i("em"),Kl=r("squeezebert/squeezebert-mnli-headless"),Hl=r(" checkpoint as a starting point."),Ql=h(),z(Ve.$$.fragment),Ul=h(),z(Ge.$$.fragment),Vl=h(),se=i("div"),z(ps.$$.fragment),Gl=h(),$e=i("p"),Jl=r("The "),vn=i("a"),Xl=r("SqueezeBertModel"),Yl=r(" forward method, overrides the "),To=i("code"),Zl=r("__call__"),ed=r(" special method."),td=h(),z(Je.$$.fragment),sd=h(),z(Xe.$$.fragment),Lr=h(),we=i("h2"),Ye=i("a"),So=i("span"),z(us.$$.fragment),nd=h(),Bo=i("span"),od=r("SqueezeBertForMaskedLM"),Ir=h(),M=i("div"),z(hs.$$.fragment),rd=h(),ms=i("p"),ad=r("SqueezeBERT Model with a "),Eo=i("code"),id=r("language modeling"),ld=r(" head on top."),dd=h(),fs=i("p"),cd=r("The SqueezeBERT model was proposed in "),gs=i("a"),pd=r(`SqueezeBERT: What can computer vision teach NLP about efficient neural
networks?`),ud=r(` by Forrest N. Iandola, Albert E. Shaw, Ravi Krishna, and Kurt W.
Keutzer`),hd=h(),_s=i("p"),md=r("This model inherits from "),yn=i("a"),fd=r("PreTrainedModel"),gd=r(`. 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.)`),_d=h(),bs=i("p"),bd=r("This model is also a PyTorch "),ks=i("a"),kd=r("torch.nn.Module"),zd=r(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),qd=h(),zs=i("p"),$d=r(`For best results finetuning SqueezeBERT on text classification tasks, it is recommended to use the
`),jo=i("em"),wd=r("squeezebert/squeezebert-mnli-headless"),vd=r(" checkpoint as a starting point."),yd=h(),z(Ze.$$.fragment),Td=h(),z(et.$$.fragment),Sd=h(),V=i("div"),z(qs.$$.fragment),Bd=h(),ve=i("p"),Ed=r("The "),Tn=i("a"),jd=r("SqueezeBertForMaskedLM"),xd=r(" forward method, overrides the "),xo=i("code"),Md=r("__call__"),Fd=r(" special method."),Cd=h(),z(tt.$$.fragment),Pd=h(),z(st.$$.fragment),Ad=h(),z(nt.$$.fragment),Nr=h(),ye=i("h2"),ot=i("a"),Mo=i("span"),z($s.$$.fragment),Ld=h(),Fo=i("span"),Id=r("SqueezeBertForSequenceClassification"),Dr=h(),F=i("div"),z(ws.$$.fragment),Nd=h(),Co=i("p"),Dd=r(`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.`),Od=h(),vs=i("p"),Rd=r("The SqueezeBERT model was proposed in "),ys=i("a"),Wd=r(`SqueezeBERT: What can computer vision teach NLP about efficient neural
networks?`),Kd=r(` by Forrest N. Iandola, Albert E. Shaw, Ravi Krishna, and Kurt W.
Keutzer`),Hd=h(),Ts=i("p"),Qd=r("This model inherits from "),Sn=i("a"),Ud=r("PreTrainedModel"),Vd=r(`. 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.)`),Gd=h(),Ss=i("p"),Jd=r("This model is also a PyTorch "),Bs=i("a"),Xd=r("torch.nn.Module"),Yd=r(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Zd=h(),Es=i("p"),ec=r(`For best results finetuning SqueezeBERT on text classification tasks, it is recommended to use the
`),Po=i("em"),tc=r("squeezebert/squeezebert-mnli-headless"),sc=r(" checkpoint as a starting point."),nc=h(),z(rt.$$.fragment),oc=h(),z(at.$$.fragment),rc=h(),N=i("div"),z(js.$$.fragment),ac=h(),Te=i("p"),ic=r("The "),Bn=i("a"),lc=r("SqueezeBertForSequenceClassification"),dc=r(" forward method, overrides the "),Ao=i("code"),cc=r("__call__"),pc=r(" special method."),uc=h(),z(it.$$.fragment),hc=h(),z(lt.$$.fragment),mc=h(),z(dt.$$.fragment),fc=h(),z(ct.$$.fragment),gc=h(),z(pt.$$.fragment),Or=h(),Se=i("h2"),ut=i("a"),Lo=i("span"),z(xs.$$.fragment),_c=h(),Io=i("span"),bc=r("SqueezeBertForMultipleChoice"),Rr=h(),C=i("div"),z(Ms.$$.fragment),kc=h(),No=i("p"),zc=r(`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.`),qc=h(),Fs=i("p"),$c=r("The SqueezeBERT model was proposed in "),Cs=i("a"),wc=r(`SqueezeBERT: What can computer vision teach NLP about efficient neural
networks?`),vc=r(` by Forrest N. Iandola, Albert E. Shaw, Ravi Krishna, and Kurt W.
Keutzer`),yc=h(),Ps=i("p"),Tc=r("This model inherits from "),En=i("a"),Sc=r("PreTrainedModel"),Bc=r(`. 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.)`),Ec=h(),As=i("p"),jc=r("This model is also a PyTorch "),Ls=i("a"),xc=r("torch.nn.Module"),Mc=r(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Fc=h(),Is=i("p"),Cc=r(`For best results finetuning SqueezeBERT on text classification tasks, it is recommended to use the
`),Do=i("em"),Pc=r("squeezebert/squeezebert-mnli-headless"),Ac=r(" checkpoint as a starting point."),Lc=h(),z(ht.$$.fragment),Ic=h(),z(mt.$$.fragment),Nc=h(),ne=i("div"),z(Ns.$$.fragment),Dc=h(),Be=i("p"),Oc=r("The "),jn=i("a"),Rc=r("SqueezeBertForMultipleChoice"),Wc=r(" forward method, overrides the "),Oo=i("code"),Kc=r("__call__"),Hc=r(" special method."),Qc=h(),z(ft.$$.fragment),Uc=h(),z(gt.$$.fragment),Wr=h(),Ee=i("h2"),_t=i("a"),Ro=i("span"),z(Ds.$$.fragment),Vc=h(),Wo=i("span"),Gc=r("SqueezeBertForTokenClassification"),Kr=h(),P=i("div"),z(Os.$$.fragment),Jc=h(),Ko=i("p"),Xc=r(`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.`),Yc=h(),Rs=i("p"),Zc=r("The SqueezeBERT model was proposed in "),Ws=i("a"),ep=r(`SqueezeBERT: What can computer vision teach NLP about efficient neural
networks?`),tp=r(` by Forrest N. Iandola, Albert E. Shaw, Ravi Krishna, and Kurt W.
Keutzer`),sp=h(),Ks=i("p"),np=r("This model inherits from "),xn=i("a"),op=r("PreTrainedModel"),rp=r(`. 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.)`),ap=h(),Hs=i("p"),ip=r("This model is also a PyTorch "),Qs=i("a"),lp=r("torch.nn.Module"),dp=r(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),cp=h(),Us=i("p"),pp=r(`For best results finetuning SqueezeBERT on text classification tasks, it is recommended to use the
`),Ho=i("em"),up=r("squeezebert/squeezebert-mnli-headless"),hp=r(" checkpoint as a starting point."),mp=h(),z(bt.$$.fragment),fp=h(),z(kt.$$.fragment),gp=h(),G=i("div"),z(Vs.$$.fragment),_p=h(),je=i("p"),bp=r("The "),Mn=i("a"),kp=r("SqueezeBertForTokenClassification"),zp=r(" forward method, overrides the "),Qo=i("code"),qp=r("__call__"),$p=r(" special method."),wp=h(),z(zt.$$.fragment),vp=h(),z(qt.$$.fragment),yp=h(),z($t.$$.fragment),Hr=h(),xe=i("h2"),wt=i("a"),Uo=i("span"),z(Gs.$$.fragment),Tp=h(),Vo=i("span"),Sp=r("SqueezeBertForQuestionAnswering"),Qr=h(),A=i("div"),z(Js.$$.fragment),Bp=h(),Me=i("p"),Ep=r(`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 `),Go=i("code"),jp=r("span start logits"),xp=r(" and "),Jo=i("code"),Mp=r("span end logits"),Fp=r(")."),Cp=h(),Xs=i("p"),Pp=r("The SqueezeBERT model was proposed in "),Ys=i("a"),Ap=r(`SqueezeBERT: What can computer vision teach NLP about efficient neural
networks?`),Lp=r(` by Forrest N. Iandola, Albert E. Shaw, Ravi Krishna, and Kurt W.
Keutzer`),Ip=h(),Zs=i("p"),Np=r("This model inherits from "),Fn=i("a"),Dp=r("PreTrainedModel"),Op=r(`. 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.)`),Rp=h(),en=i("p"),Wp=r("This model is also a PyTorch "),tn=i("a"),Kp=r("torch.nn.Module"),Hp=r(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Qp=h(),sn=i("p"),Up=r(`For best results finetuning SqueezeBERT on text classification tasks, it is recommended to use the
`),Xo=i("em"),Vp=r("squeezebert/squeezebert-mnli-headless"),Gp=r(" checkpoint as a starting point."),Jp=h(),z(vt.$$.fragment),Xp=h(),z(yt.$$.fragment),Yp=h(),J=i("div"),z(nn.$$.fragment),Zp=h(),Fe=i("p"),eu=r("The "),Cn=i("a"),tu=r("SqueezeBertForQuestionAnswering"),su=r(" forward method, overrides the "),Yo=i("code"),nu=r("__call__"),ou=r(" special method."),ru=h(),z(Tt.$$.fragment),au=h(),z(St.$$.fragment),iu=h(),z(Bt.$$.fragment),this.h()},l(n){const _=Uh('[data-svelte="svelte-1phssyn"]',document.head);o=l(_,"META",{name:!0,content:!0}),_.forEach(s),f=m(n),p=l(n,"H1",{class:!0});var on=d(p);c=l(on,"A",{id:!0,class:!0,href:!0});var Zo=d(c);g=l(Zo,"SPAN",{});var er=d(g);q(t.$$.fragment,er),er.forEach(s),Zo.forEach(s),u=m(on),j=l(on,"SPAN",{});var tr=d(j);Ca=a(tr,"SqueezeBERT"),tr.forEach(s),on.forEach(s),$r=m(n),he=l(n,"H2",{class:!0});var rn=d(he);Ie=l(rn,"A",{id:!0,class:!0,href:!0});var sr=d(Ie);Un=l(sr,"SPAN",{});var nr=d(Un);q(Ft.$$.fragment,nr),nr.forEach(s),sr.forEach(s),Pa=m(rn),Vn=l(rn,"SPAN",{});var or=d(Vn);Aa=a(or,"Overview"),or.forEach(s),rn.forEach(s),wr=m(n),re=l(n,"P",{});var Ce=d(re);La=a(Ce,"The SqueezeBERT model was proposed in "),Ct=l(Ce,"A",{href:!0,rel:!0});var rr=d(Ct);Ia=a(rr,"SqueezeBERT: What can computer vision teach NLP about efficient neural networks?"),rr.forEach(s),Na=a(Ce,` 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 `),Pt=l(Ce,"A",{href:!0,rel:!0});var ar=d(Pt);Da=a(ar,"grouped convolutions"),ar.forEach(s),Oa=a(Ce,`
instead of fully-connected layers for the Q, K, V and FFN layers.`),Ce.forEach(s),vr=m(n),cn=l(n,"P",{});var ir=d(cn);Ra=a(ir,"The abstract from the paper is the following:"),ir.forEach(s),yr=m(n),pn=l(n,"P",{});var lr=d(pn);Gn=l(lr,"EM",{});var dr=d(Gn);Wa=a(dr,`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.`),dr.forEach(s),lr.forEach(s),Tr=m(n),un=l(n,"P",{});var cr=d(un);Ka=a(cr,"Tips:"),cr.forEach(s),Sr=m(n),ae=l(n,"UL",{});var Pe=d(ae);Jn=l(Pe,"LI",{});var pr=d(Jn);Ha=a(pr,`SqueezeBERT is a model with absolute position embeddings so it\u2019s usually advised to pad the inputs on the right
rather than the left.`),pr.forEach(s),Qa=m(Pe),Xn=l(Pe,"LI",{});var ur=d(Xn);Ua=a(ur,`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.`),ur.forEach(s),Va=m(Pe),At=l(Pe,"LI",{});var an=d(At);Ga=a(an,`For best results when finetuning on sequence classification tasks, it is recommended to start with the
`),Yn=l(an,"EM",{});var hr=d(Yn);Ja=a(hr,"squeezebert/squeezebert-mnli-headless"),hr.forEach(s),Xa=a(an," checkpoint."),an.forEach(s),Pe.forEach(s),Br=m(n),Ne=l(n,"P",{});var ln=d(Ne);Ya=a(ln,"This model was contributed by "),Lt=l(ln,"A",{href:!0,rel:!0});var mr=d(Lt);Za=a(mr,"forresti"),mr.forEach(s),ei=a(ln,"."),ln.forEach(s),Er=m(n),me=l(n,"H2",{class:!0});var dn=d(me);De=l(dn,"A",{id:!0,class:!0,href:!0});var fr=d(De);Zn=l(fr,"SPAN",{});var gr=d(Zn);q(It.$$.fragment,gr),gr.forEach(s),fr.forEach(s),ti=m(dn),eo=l(dn,"SPAN",{});var _r=d(eo);si=a(_r,"SqueezeBertConfig"),_r.forEach(s),dn.forEach(s),jr=m(n),Q=l(n,"DIV",{class:!0});var Z=d(Q);q(Nt.$$.fragment,Z),ni=m(Z),fe=l(Z,"P",{});var Ae=d(fe);oi=a(Ae,"This is the configuration class to store the configuration of a "),hn=l(Ae,"A",{href:!0});var br=d(hn);ri=a(br,"SqueezeBertModel"),br.forEach(s),ai=a(Ae,`. 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
`),Dt=l(Ae,"A",{href:!0,rel:!0});var kr=d(Dt);ii=a(kr,"squeezebert/squeezebert-uncased"),kr.forEach(s),li=a(Ae," architecture."),Ae.forEach(s),di=m(Z),ge=l(Z,"P",{});var Le=d(ge);ci=a(Le,"Configuration objects inherit from "),mn=l(Le,"A",{href:!0});var zr=d(mn);pi=a(zr,"PretrainedConfig"),zr.forEach(s),ui=a(Le,` and can be used to control the model outputs. Read the
documentation from `),fn=l(Le,"A",{href:!0});var qr=d(fn);hi=a(qr,"PretrainedConfig"),qr.forEach(s),mi=a(Le," for more information."),Le.forEach(s),fi=m(Z),q(Oe.$$.fragment,Z),gi=m(Z),to=l(Z,"P",{});var uu=d(to);_i=a(uu,`Attributes: pretrained_config_archive_map (Dict[str, str]): A dictionary containing all the available pre-trained
checkpoints.`),uu.forEach(s),Z.forEach(s),xr=m(n),_e=l(n,"H2",{class:!0});var Vr=d(_e);Re=l(Vr,"A",{id:!0,class:!0,href:!0});var hu=d(Re);so=l(hu,"SPAN",{});var mu=d(so);q(Ot.$$.fragment,mu),mu.forEach(s),hu.forEach(s),bi=m(Vr),no=l(Vr,"SPAN",{});var fu=d(no);ki=a(fu,"SqueezeBertTokenizer"),fu.forEach(s),Vr.forEach(s),Mr=m(n),I=l(n,"DIV",{class:!0});var X=d(I);q(Rt.$$.fragment,X),zi=m(X),oo=l(X,"P",{});var gu=d(oo);qi=a(gu,"Construct a SqueezeBERT tokenizer. Based on WordPiece."),gu.forEach(s),$i=m(X),Wt=l(X,"P",{});var Gr=d(Wt);wi=a(Gr,"This tokenizer inherits from "),gn=l(Gr,"A",{href:!0});var _u=d(gn);vi=a(_u,"PreTrainedTokenizer"),_u.forEach(s),yi=a(Gr,` which contains most of the main methods. Users should refer to
this superclass for more information regarding those methods.`),Gr.forEach(s),Ti=m(X),ie=l(X,"DIV",{class:!0});var Pn=d(ie);q(Kt.$$.fragment,Pn),Si=m(Pn),ro=l(Pn,"P",{});var bu=d(ro);Bi=a(bu,`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:`),bu.forEach(s),Ei=m(Pn),Ht=l(Pn,"UL",{});var Jr=d(Ht);_n=l(Jr,"LI",{});var lu=d(_n);ji=a(lu,"single sequence: "),ao=l(lu,"CODE",{});var ku=d(ao);xi=a(ku,"[CLS] X [SEP]"),ku.forEach(s),lu.forEach(s),Mi=m(Jr),bn=l(Jr,"LI",{});var du=d(bn);Fi=a(du,"pair of sequences: "),io=l(du,"CODE",{});var zu=d(io);Ci=a(zu,"[CLS] A [SEP] B [SEP]"),zu.forEach(s),du.forEach(s),Jr.forEach(s),Pn.forEach(s),Pi=m(X),We=l(X,"DIV",{class:!0});var Xr=d(We);q(Qt.$$.fragment,Xr),Ai=m(Xr),Ut=l(Xr,"P",{});var Yr=d(Ut);Li=a(Yr,`Retrieve sequence ids from a token list that has no special tokens added. This method is called when adding
special tokens using the tokenizer `),lo=l(Yr,"CODE",{});var qu=d(lo);Ii=a(qu,"prepare_for_model"),qu.forEach(s),Ni=a(Yr," method."),Yr.forEach(s),Xr.forEach(s),Di=m(X),ee=l(X,"DIV",{class:!0});var Et=d(ee);q(Vt.$$.fragment,Et),Oi=m(Et),co=l(Et,"P",{});var $u=d(co);Ri=a($u,"Create a mask from the two sequences passed to be used in a sequence-pair classification task. A SqueezeBERT"),$u.forEach(s),Wi=m(Et),q(Ke.$$.fragment,Et),Ki=m(Et),be=l(Et,"P",{});var An=d(be);Hi=a(An,"If "),po=l(An,"CODE",{});var wu=d(po);Qi=a(wu,"token_ids_1"),wu.forEach(s),Ui=a(An," is "),uo=l(An,"CODE",{});var vu=d(uo);Vi=a(vu,"None"),vu.forEach(s),Gi=a(An,", this method only returns the first portion of the mask (0s)."),An.forEach(s),Et.forEach(s),Ji=m(X),kn=l(X,"DIV",{class:!0});var yu=d(kn);q(Gt.$$.fragment,yu),yu.forEach(s),X.forEach(s),Fr=m(n),ke=l(n,"H2",{class:!0});var Zr=d(ke);He=l(Zr,"A",{id:!0,class:!0,href:!0});var Tu=d(He);ho=l(Tu,"SPAN",{});var Su=d(ho);q(Jt.$$.fragment,Su),Su.forEach(s),Tu.forEach(s),Xi=m(Zr),mo=l(Zr,"SPAN",{});var Bu=d(mo);Yi=a(Bu,"SqueezeBertTokenizerFast"),Bu.forEach(s),Zr.forEach(s),Cr=m(n),U=l(n,"DIV",{class:!0});var de=d(U);q(Xt.$$.fragment,de),Zi=m(de),Yt=l(de,"P",{});var ea=d(Yt);el=a(ea,"Construct a \u201Cfast\u201D SqueezeBERT tokenizer (backed by HuggingFace\u2019s "),fo=l(ea,"EM",{});var Eu=d(fo);tl=a(Eu,"tokenizers"),Eu.forEach(s),sl=a(ea," library). Based on WordPiece."),ea.forEach(s),nl=m(de),Zt=l(de,"P",{});var ta=d(Zt);ol=a(ta,"This tokenizer inherits from "),zn=l(ta,"A",{href:!0});var ju=d(zn);rl=a(ju,"PreTrainedTokenizerFast"),ju.forEach(s),al=a(ta,` which contains most of the main methods. Users should
refer to this superclass for more information regarding those methods.`),ta.forEach(s),il=m(de),le=l(de,"DIV",{class:!0});var Ln=d(le);q(es.$$.fragment,Ln),ll=m(Ln),go=l(Ln,"P",{});var xu=d(go);dl=a(xu,`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:`),xu.forEach(s),cl=m(Ln),ts=l(Ln,"UL",{});var sa=d(ts);qn=l(sa,"LI",{});var cu=d(qn);pl=a(cu,"single sequence: "),_o=l(cu,"CODE",{});var Mu=d(_o);ul=a(Mu,"[CLS] X [SEP]"),Mu.forEach(s),cu.forEach(s),hl=m(sa),$n=l(sa,"LI",{});var pu=d($n);ml=a(pu,"pair of sequences: "),bo=l(pu,"CODE",{});var Fu=d(bo);fl=a(Fu,"[CLS] A [SEP] B [SEP]"),Fu.forEach(s),pu.forEach(s),sa.forEach(s),Ln.forEach(s),gl=m(de),te=l(de,"DIV",{class:!0});var jt=d(te);q(ss.$$.fragment,jt),_l=m(jt),ko=l(jt,"P",{});var Cu=d(ko);bl=a(Cu,"Create a mask from the two sequences passed to be used in a sequence-pair classification task. A SqueezeBERT"),Cu.forEach(s),kl=m(jt),q(Qe.$$.fragment,jt),zl=m(jt),ze=l(jt,"P",{});var In=d(ze);ql=a(In,"If "),zo=l(In,"CODE",{});var Pu=d(zo);$l=a(Pu,"token_ids_1"),Pu.forEach(s),wl=a(In," is "),qo=l(In,"CODE",{});var Au=d(qo);vl=a(Au,"None"),Au.forEach(s),yl=a(In,", this method only returns the first portion of the mask (0s)."),In.forEach(s),jt.forEach(s),de.forEach(s),Pr=m(n),qe=l(n,"H2",{class:!0});var na=d(qe);Ue=l(na,"A",{id:!0,class:!0,href:!0});var Lu=d(Ue);$o=l(Lu,"SPAN",{});var Iu=d($o);q(ns.$$.fragment,Iu),Iu.forEach(s),Lu.forEach(s),Tl=m(na),wo=l(na,"SPAN",{});var Nu=d(wo);Sl=a(Nu,"SqueezeBertModel"),Nu.forEach(s),na.forEach(s),Ar=m(n),x=l(n,"DIV",{class:!0});var D=d(x);q(os.$$.fragment,D),Bl=m(D),vo=l(D,"P",{});var Du=d(vo);El=a(Du,"The bare SqueezeBERT Model transformer outputting raw hidden-states without any specific head on top."),Du.forEach(s),jl=m(D),rs=l(D,"P",{});var oa=d(rs);xl=a(oa,"The SqueezeBERT model was proposed in "),as=l(oa,"A",{href:!0,rel:!0});var Ou=d(as);Ml=a(Ou,`SqueezeBERT: What can computer vision teach NLP about efficient neural
networks?`),Ou.forEach(s),Fl=a(oa,` by Forrest N. Iandola, Albert E. Shaw, Ravi Krishna, and Kurt W.
Keutzer`),oa.forEach(s),Cl=m(D),is=l(D,"P",{});var ra=d(is);Pl=a(ra,"This model inherits from "),wn=l(ra,"A",{href:!0});var Ru=d(wn);Al=a(Ru,"PreTrainedModel"),Ru.forEach(s),Ll=a(ra,`. 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.)`),ra.forEach(s),Il=m(D),ls=l(D,"P",{});var aa=d(ls);Nl=a(aa,"This model is also a PyTorch "),ds=l(aa,"A",{href:!0,rel:!0});var Wu=d(ds);Dl=a(Wu,"torch.nn.Module"),Wu.forEach(s),Ol=a(aa,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),aa.forEach(s),Rl=m(D),cs=l(D,"P",{});var ia=d(cs);Wl=a(ia,`For best results finetuning SqueezeBERT on text classification tasks, it is recommended to use the
`),yo=l(ia,"EM",{});var Ku=d(yo);Kl=a(Ku,"squeezebert/squeezebert-mnli-headless"),Ku.forEach(s),Hl=a(ia," checkpoint as a starting point."),ia.forEach(s),Ql=m(D),q(Ve.$$.fragment,D),Ul=m(D),q(Ge.$$.fragment,D),Vl=m(D),se=l(D,"DIV",{class:!0});var xt=d(se);q(ps.$$.fragment,xt),Gl=m(xt),$e=l(xt,"P",{});var Nn=d($e);Jl=a(Nn,"The "),vn=l(Nn,"A",{href:!0});var Hu=d(vn);Xl=a(Hu,"SqueezeBertModel"),Hu.forEach(s),Yl=a(Nn," forward method, overrides the "),To=l(Nn,"CODE",{});var Qu=d(To);Zl=a(Qu,"__call__"),Qu.forEach(s),ed=a(Nn," special method."),Nn.forEach(s),td=m(xt),q(Je.$$.fragment,xt),sd=m(xt),q(Xe.$$.fragment,xt),xt.forEach(s),D.forEach(s),Lr=m(n),we=l(n,"H2",{class:!0});var la=d(we);Ye=l(la,"A",{id:!0,class:!0,href:!0});var Uu=d(Ye);So=l(Uu,"SPAN",{});var Vu=d(So);q(us.$$.fragment,Vu),Vu.forEach(s),Uu.forEach(s),nd=m(la),Bo=l(la,"SPAN",{});var Gu=d(Bo);od=a(Gu,"SqueezeBertForMaskedLM"),Gu.forEach(s),la.forEach(s),Ir=m(n),M=l(n,"DIV",{class:!0});var O=d(M);q(hs.$$.fragment,O),rd=m(O),ms=l(O,"P",{});var da=d(ms);ad=a(da,"SqueezeBERT Model with a "),Eo=l(da,"CODE",{});var Ju=d(Eo);id=a(Ju,"language modeling"),Ju.forEach(s),ld=a(da," head on top."),da.forEach(s),dd=m(O),fs=l(O,"P",{});var ca=d(fs);cd=a(ca,"The SqueezeBERT model was proposed in "),gs=l(ca,"A",{href:!0,rel:!0});var Xu=d(gs);pd=a(Xu,`SqueezeBERT: What can computer vision teach NLP about efficient neural
networks?`),Xu.forEach(s),ud=a(ca,` by Forrest N. Iandola, Albert E. Shaw, Ravi Krishna, and Kurt W.
Keutzer`),ca.forEach(s),hd=m(O),_s=l(O,"P",{});var pa=d(_s);md=a(pa,"This model inherits from "),yn=l(pa,"A",{href:!0});var Yu=d(yn);fd=a(Yu,"PreTrainedModel"),Yu.forEach(s),gd=a(pa,`. 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.)`),pa.forEach(s),_d=m(O),bs=l(O,"P",{});var ua=d(bs);bd=a(ua,"This model is also a PyTorch "),ks=l(ua,"A",{href:!0,rel:!0});var Zu=d(ks);kd=a(Zu,"torch.nn.Module"),Zu.forEach(s),zd=a(ua,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),ua.forEach(s),qd=m(O),zs=l(O,"P",{});var ha=d(zs);$d=a(ha,`For best results finetuning SqueezeBERT on text classification tasks, it is recommended to use the
`),jo=l(ha,"EM",{});var eh=d(jo);wd=a(eh,"squeezebert/squeezebert-mnli-headless"),eh.forEach(s),vd=a(ha," checkpoint as a starting point."),ha.forEach(s),yd=m(O),q(Ze.$$.fragment,O),Td=m(O),q(et.$$.fragment,O),Sd=m(O),V=l(O,"DIV",{class:!0});var ce=d(V);q(qs.$$.fragment,ce),Bd=m(ce),ve=l(ce,"P",{});var Dn=d(ve);Ed=a(Dn,"The "),Tn=l(Dn,"A",{href:!0});var th=d(Tn);jd=a(th,"SqueezeBertForMaskedLM"),th.forEach(s),xd=a(Dn," forward method, overrides the "),xo=l(Dn,"CODE",{});var sh=d(xo);Md=a(sh,"__call__"),sh.forEach(s),Fd=a(Dn," special method."),Dn.forEach(s),Cd=m(ce),q(tt.$$.fragment,ce),Pd=m(ce),q(st.$$.fragment,ce),Ad=m(ce),q(nt.$$.fragment,ce),ce.forEach(s),O.forEach(s),Nr=m(n),ye=l(n,"H2",{class:!0});var ma=d(ye);ot=l(ma,"A",{id:!0,class:!0,href:!0});var nh=d(ot);Mo=l(nh,"SPAN",{});var oh=d(Mo);q($s.$$.fragment,oh),oh.forEach(s),nh.forEach(s),Ld=m(ma),Fo=l(ma,"SPAN",{});var rh=d(Fo);Id=a(rh,"SqueezeBertForSequenceClassification"),rh.forEach(s),ma.forEach(s),Dr=m(n),F=l(n,"DIV",{class:!0});var R=d(F);q(ws.$$.fragment,R),Nd=m(R),Co=l(R,"P",{});var ah=d(Co);Dd=a(ah,`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.`),ah.forEach(s),Od=m(R),vs=l(R,"P",{});var fa=d(vs);Rd=a(fa,"The SqueezeBERT model was proposed in "),ys=l(fa,"A",{href:!0,rel:!0});var ih=d(ys);Wd=a(ih,`SqueezeBERT: What can computer vision teach NLP about efficient neural
networks?`),ih.forEach(s),Kd=a(fa,` by Forrest N. Iandola, Albert E. Shaw, Ravi Krishna, and Kurt W.
Keutzer`),fa.forEach(s),Hd=m(R),Ts=l(R,"P",{});var ga=d(Ts);Qd=a(ga,"This model inherits from "),Sn=l(ga,"A",{href:!0});var lh=d(Sn);Ud=a(lh,"PreTrainedModel"),lh.forEach(s),Vd=a(ga,`. 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.)`),ga.forEach(s),Gd=m(R),Ss=l(R,"P",{});var _a=d(Ss);Jd=a(_a,"This model is also a PyTorch "),Bs=l(_a,"A",{href:!0,rel:!0});var dh=d(Bs);Xd=a(dh,"torch.nn.Module"),dh.forEach(s),Yd=a(_a,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),_a.forEach(s),Zd=m(R),Es=l(R,"P",{});var ba=d(Es);ec=a(ba,`For best results finetuning SqueezeBERT on text classification tasks, it is recommended to use the
`),Po=l(ba,"EM",{});var ch=d(Po);tc=a(ch,"squeezebert/squeezebert-mnli-headless"),ch.forEach(s),sc=a(ba," checkpoint as a starting point."),ba.forEach(s),nc=m(R),q(rt.$$.fragment,R),oc=m(R),q(at.$$.fragment,R),rc=m(R),N=l(R,"DIV",{class:!0});var Y=d(N);q(js.$$.fragment,Y),ac=m(Y),Te=l(Y,"P",{});var On=d(Te);ic=a(On,"The "),Bn=l(On,"A",{href:!0});var ph=d(Bn);lc=a(ph,"SqueezeBertForSequenceClassification"),ph.forEach(s),dc=a(On," forward method, overrides the "),Ao=l(On,"CODE",{});var uh=d(Ao);cc=a(uh,"__call__"),uh.forEach(s),pc=a(On," special method."),On.forEach(s),uc=m(Y),q(it.$$.fragment,Y),hc=m(Y),q(lt.$$.fragment,Y),mc=m(Y),q(dt.$$.fragment,Y),fc=m(Y),q(ct.$$.fragment,Y),gc=m(Y),q(pt.$$.fragment,Y),Y.forEach(s),R.forEach(s),Or=m(n),Se=l(n,"H2",{class:!0});var ka=d(Se);ut=l(ka,"A",{id:!0,class:!0,href:!0});var hh=d(ut);Lo=l(hh,"SPAN",{});var mh=d(Lo);q(xs.$$.fragment,mh),mh.forEach(s),hh.forEach(s),_c=m(ka),Io=l(ka,"SPAN",{});var fh=d(Io);bc=a(fh,"SqueezeBertForMultipleChoice"),fh.forEach(s),ka.forEach(s),Rr=m(n),C=l(n,"DIV",{class:!0});var W=d(C);q(Ms.$$.fragment,W),kc=m(W),No=l(W,"P",{});var gh=d(No);zc=a(gh,`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.`),gh.forEach(s),qc=m(W),Fs=l(W,"P",{});var za=d(Fs);$c=a(za,"The SqueezeBERT model was proposed in "),Cs=l(za,"A",{href:!0,rel:!0});var _h=d(Cs);wc=a(_h,`SqueezeBERT: What can computer vision teach NLP about efficient neural
networks?`),_h.forEach(s),vc=a(za,` by Forrest N. Iandola, Albert E. Shaw, Ravi Krishna, and Kurt W.
Keutzer`),za.forEach(s),yc=m(W),Ps=l(W,"P",{});var qa=d(Ps);Tc=a(qa,"This model inherits from "),En=l(qa,"A",{href:!0});var bh=d(En);Sc=a(bh,"PreTrainedModel"),bh.forEach(s),Bc=a(qa,`. 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.)`),qa.forEach(s),Ec=m(W),As=l(W,"P",{});var $a=d(As);jc=a($a,"This model is also a PyTorch "),Ls=l($a,"A",{href:!0,rel:!0});var kh=d(Ls);xc=a(kh,"torch.nn.Module"),kh.forEach(s),Mc=a($a,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),$a.forEach(s),Fc=m(W),Is=l(W,"P",{});var wa=d(Is);Cc=a(wa,`For best results finetuning SqueezeBERT on text classification tasks, it is recommended to use the
`),Do=l(wa,"EM",{});var zh=d(Do);Pc=a(zh,"squeezebert/squeezebert-mnli-headless"),zh.forEach(s),Ac=a(wa," checkpoint as a starting point."),wa.forEach(s),Lc=m(W),q(ht.$$.fragment,W),Ic=m(W),q(mt.$$.fragment,W),Nc=m(W),ne=l(W,"DIV",{class:!0});var Mt=d(ne);q(Ns.$$.fragment,Mt),Dc=m(Mt),Be=l(Mt,"P",{});var Rn=d(Be);Oc=a(Rn,"The "),jn=l(Rn,"A",{href:!0});var qh=d(jn);Rc=a(qh,"SqueezeBertForMultipleChoice"),qh.forEach(s),Wc=a(Rn," forward method, overrides the "),Oo=l(Rn,"CODE",{});var $h=d(Oo);Kc=a($h,"__call__"),$h.forEach(s),Hc=a(Rn," special method."),Rn.forEach(s),Qc=m(Mt),q(ft.$$.fragment,Mt),Uc=m(Mt),q(gt.$$.fragment,Mt),Mt.forEach(s),W.forEach(s),Wr=m(n),Ee=l(n,"H2",{class:!0});var va=d(Ee);_t=l(va,"A",{id:!0,class:!0,href:!0});var wh=d(_t);Ro=l(wh,"SPAN",{});var vh=d(Ro);q(Ds.$$.fragment,vh),vh.forEach(s),wh.forEach(s),Vc=m(va),Wo=l(va,"SPAN",{});var yh=d(Wo);Gc=a(yh,"SqueezeBertForTokenClassification"),yh.forEach(s),va.forEach(s),Kr=m(n),P=l(n,"DIV",{class:!0});var K=d(P);q(Os.$$.fragment,K),Jc=m(K),Ko=l(K,"P",{});var Th=d(Ko);Xc=a(Th,`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.`),Th.forEach(s),Yc=m(K),Rs=l(K,"P",{});var ya=d(Rs);Zc=a(ya,"The SqueezeBERT model was proposed in "),Ws=l(ya,"A",{href:!0,rel:!0});var Sh=d(Ws);ep=a(Sh,`SqueezeBERT: What can computer vision teach NLP about efficient neural
networks?`),Sh.forEach(s),tp=a(ya,` by Forrest N. Iandola, Albert E. Shaw, Ravi Krishna, and Kurt W.
Keutzer`),ya.forEach(s),sp=m(K),Ks=l(K,"P",{});var Ta=d(Ks);np=a(Ta,"This model inherits from "),xn=l(Ta,"A",{href:!0});var Bh=d(xn);op=a(Bh,"PreTrainedModel"),Bh.forEach(s),rp=a(Ta,`. 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.)`),Ta.forEach(s),ap=m(K),Hs=l(K,"P",{});var Sa=d(Hs);ip=a(Sa,"This model is also a PyTorch "),Qs=l(Sa,"A",{href:!0,rel:!0});var Eh=d(Qs);lp=a(Eh,"torch.nn.Module"),Eh.forEach(s),dp=a(Sa,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Sa.forEach(s),cp=m(K),Us=l(K,"P",{});var Ba=d(Us);pp=a(Ba,`For best results finetuning SqueezeBERT on text classification tasks, it is recommended to use the
`),Ho=l(Ba,"EM",{});var jh=d(Ho);up=a(jh,"squeezebert/squeezebert-mnli-headless"),jh.forEach(s),hp=a(Ba," checkpoint as a starting point."),Ba.forEach(s),mp=m(K),q(bt.$$.fragment,K),fp=m(K),q(kt.$$.fragment,K),gp=m(K),G=l(K,"DIV",{class:!0});var pe=d(G);q(Vs.$$.fragment,pe),_p=m(pe),je=l(pe,"P",{});var Wn=d(je);bp=a(Wn,"The "),Mn=l(Wn,"A",{href:!0});var xh=d(Mn);kp=a(xh,"SqueezeBertForTokenClassification"),xh.forEach(s),zp=a(Wn," forward method, overrides the "),Qo=l(Wn,"CODE",{});var Mh=d(Qo);qp=a(Mh,"__call__"),Mh.forEach(s),$p=a(Wn," special method."),Wn.forEach(s),wp=m(pe),q(zt.$$.fragment,pe),vp=m(pe),q(qt.$$.fragment,pe),yp=m(pe),q($t.$$.fragment,pe),pe.forEach(s),K.forEach(s),Hr=m(n),xe=l(n,"H2",{class:!0});var Ea=d(xe);wt=l(Ea,"A",{id:!0,class:!0,href:!0});var Fh=d(wt);Uo=l(Fh,"SPAN",{});var Ch=d(Uo);q(Gs.$$.fragment,Ch),Ch.forEach(s),Fh.forEach(s),Tp=m(Ea),Vo=l(Ea,"SPAN",{});var Ph=d(Vo);Sp=a(Ph,"SqueezeBertForQuestionAnswering"),Ph.forEach(s),Ea.forEach(s),Qr=m(n),A=l(n,"DIV",{class:!0});var H=d(A);q(Js.$$.fragment,H),Bp=m(H),Me=l(H,"P",{});var Kn=d(Me);Ep=a(Kn,`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 `),Go=l(Kn,"CODE",{});var Ah=d(Go);jp=a(Ah,"span start logits"),Ah.forEach(s),xp=a(Kn," and "),Jo=l(Kn,"CODE",{});var Lh=d(Jo);Mp=a(Lh,"span end logits"),Lh.forEach(s),Fp=a(Kn,")."),Kn.forEach(s),Cp=m(H),Xs=l(H,"P",{});var ja=d(Xs);Pp=a(ja,"The SqueezeBERT model was proposed in "),Ys=l(ja,"A",{href:!0,rel:!0});var Ih=d(Ys);Ap=a(Ih,`SqueezeBERT: What can computer vision teach NLP about efficient neural
networks?`),Ih.forEach(s),Lp=a(ja,` by Forrest N. Iandola, Albert E. Shaw, Ravi Krishna, and Kurt W.
Keutzer`),ja.forEach(s),Ip=m(H),Zs=l(H,"P",{});var xa=d(Zs);Np=a(xa,"This model inherits from "),Fn=l(xa,"A",{href:!0});var Nh=d(Fn);Dp=a(Nh,"PreTrainedModel"),Nh.forEach(s),Op=a(xa,`. 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.)`),xa.forEach(s),Rp=m(H),en=l(H,"P",{});var Ma=d(en);Wp=a(Ma,"This model is also a PyTorch "),tn=l(Ma,"A",{href:!0,rel:!0});var Dh=d(tn);Kp=a(Dh,"torch.nn.Module"),Dh.forEach(s),Hp=a(Ma,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Ma.forEach(s),Qp=m(H),sn=l(H,"P",{});var Fa=d(sn);Up=a(Fa,`For best results finetuning SqueezeBERT on text classification tasks, it is recommended to use the
`),Xo=l(Fa,"EM",{});var Oh=d(Xo);Vp=a(Oh,"squeezebert/squeezebert-mnli-headless"),Oh.forEach(s),Gp=a(Fa," checkpoint as a starting point."),Fa.forEach(s),Jp=m(H),q(vt.$$.fragment,H),Xp=m(H),q(yt.$$.fragment,H),Yp=m(H),J=l(H,"DIV",{class:!0});var ue=d(J);q(nn.$$.fragment,ue),Zp=m(ue),Fe=l(ue,"P",{});var Hn=d(Fe);eu=a(Hn,"The "),Cn=l(Hn,"A",{href:!0});var Rh=d(Cn);tu=a(Rh,"SqueezeBertForQuestionAnswering"),Rh.forEach(s),su=a(Hn," forward method, overrides the "),Yo=l(Hn,"CODE",{});var Wh=d(Yo);nu=a(Wh,"__call__"),Wh.forEach(s),ou=a(Hn," special method."),Hn.forEach(s),ru=m(ue),q(Tt.$$.fragment,ue),au=m(ue),q(St.$$.fragment,ue),iu=m(ue),q(Bt.$$.fragment,ue),ue.forEach(s),H.forEach(s),this.h()},h(){b(o,"name","hf:doc:metadata"),b(o,"content",JSON.stringify(Em)),b(c,"id","squeezebert"),b(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"),b(c,"href","#squeezebert"),b(p,"class","relative group"),b(Ie,"id","overview"),b(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"),b(Ie,"href","#overview"),b(he,"class","relative group"),b(Ct,"href","https://arxiv.org/abs/2006.11316"),b(Ct,"rel","nofollow"),b(Pt,"href","https://blog.yani.io/filter-group-tutorial"),b(Pt,"rel","nofollow"),b(Lt,"href","https://huggingface.co/forresti"),b(Lt,"rel","nofollow"),b(De,"id","transformers.SqueezeBertConfig"),b(De,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),b(De,"href","#transformers.SqueezeBertConfig"),b(me,"class","relative group"),b(hn,"href","/docs/transformers/pr_19907/en/model_doc/squeezebert#transformers.SqueezeBertModel"),b(Dt,"href","https://huggingface.co/squeezebert/squeezebert-uncased"),b(Dt,"rel","nofollow"),b(mn,"href","/docs/transformers/pr_19907/en/main_classes/configuration#transformers.PretrainedConfig"),b(fn,"href","/docs/transformers/pr_19907/en/main_classes/configuration#transformers.PretrainedConfig"),b(Q,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),b(Re,"id","transformers.SqueezeBertTokenizer"),b(Re,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),b(Re,"href","#transformers.SqueezeBertTokenizer"),b(_e,"class","relative group"),b(gn,"href","/docs/transformers/pr_19907/en/main_classes/tokenizer#transformers.PreTrainedTokenizer"),b(ie,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),b(We,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),b(ee,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),b(kn,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),b(I,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),b(He,"id","transformers.SqueezeBertTokenizerFast"),b(He,"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"),b(He,"href","#transformers.SqueezeBertTokenizerFast"),b(ke,"class","relative group"),b(zn,"href","/docs/transformers/pr_19907/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast"),b(le,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),b(te,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),b(U,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),b(Ue,"id","transformers.SqueezeBertModel"),b(Ue,"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"),b(Ue,"href","#transformers.SqueezeBertModel"),b(qe,"class","relative group"),b(as,"href","https://arxiv.org/abs/2006.11316"),b(as,"rel","nofollow"),b(wn,"href","/docs/transformers/pr_19907/en/main_classes/model#transformers.PreTrainedModel"),b(ds,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),b(ds,"rel","nofollow"),b(vn,"href","/docs/transformers/pr_19907/en/model_doc/squeezebert#transformers.SqueezeBertModel"),b(se,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),b(x,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),b(Ye,"id","transformers.SqueezeBertForMaskedLM"),b(Ye,"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"),b(Ye,"href","#transformers.SqueezeBertForMaskedLM"),b(we,"class","relative group"),b(gs,"href","https://arxiv.org/abs/2006.11316"),b(gs,"rel","nofollow"),b(yn,"href","/docs/transformers/pr_19907/en/main_classes/model#transformers.PreTrainedModel"),b(ks,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),b(ks,"rel","nofollow"),b(Tn,"href","/docs/transformers/pr_19907/en/model_doc/squeezebert#transformers.SqueezeBertForMaskedLM"),b(V,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),b(M,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),b(ot,"id","transformers.SqueezeBertForSequenceClassification"),b(ot,"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"),b(ot,"href","#transformers.SqueezeBertForSequenceClassification"),b(ye,"class","relative group"),b(ys,"href","https://arxiv.org/abs/2006.11316"),b(ys,"rel","nofollow"),b(Sn,"href","/docs/transformers/pr_19907/en/main_classes/model#transformers.PreTrainedModel"),b(Bs,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),b(Bs,"rel","nofollow"),b(Bn,"href","/docs/transformers/pr_19907/en/model_doc/squeezebert#transformers.SqueezeBertForSequenceClassification"),b(N,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),b(F,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),b(ut,"id","transformers.SqueezeBertForMultipleChoice"),b(ut,"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"),b(ut,"href","#transformers.SqueezeBertForMultipleChoice"),b(Se,"class","relative group"),b(Cs,"href","https://arxiv.org/abs/2006.11316"),b(Cs,"rel","nofollow"),b(En,"href","/docs/transformers/pr_19907/en/main_classes/model#transformers.PreTrainedModel"),b(Ls,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),b(Ls,"rel","nofollow"),b(jn,"href","/docs/transformers/pr_19907/en/model_doc/squeezebert#transformers.SqueezeBertForMultipleChoice"),b(ne,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),b(C,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),b(_t,"id","transformers.SqueezeBertForTokenClassification"),b(_t,"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"),b(_t,"href","#transformers.SqueezeBertForTokenClassification"),b(Ee,"class","relative group"),b(Ws,"href","https://arxiv.org/abs/2006.11316"),b(Ws,"rel","nofollow"),b(xn,"href","/docs/transformers/pr_19907/en/main_classes/model#transformers.PreTrainedModel"),b(Qs,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),b(Qs,"rel","nofollow"),b(Mn,"href","/docs/transformers/pr_19907/en/model_doc/squeezebert#transformers.SqueezeBertForTokenClassification"),b(G,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),b(P,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),b(wt,"id","transformers.SqueezeBertForQuestionAnswering"),b(wt,"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"),b(wt,"href","#transformers.SqueezeBertForQuestionAnswering"),b(xe,"class","relative group"),b(Ys,"href","https://arxiv.org/abs/2006.11316"),b(Ys,"rel","nofollow"),b(Fn,"href","/docs/transformers/pr_19907/en/main_classes/model#transformers.PreTrainedModel"),b(tn,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),b(tn,"rel","nofollow"),b(Cn,"href","/docs/transformers/pr_19907/en/model_doc/squeezebert#transformers.SqueezeBertForQuestionAnswering"),b(J,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),b(A,"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,_){e(document.head,o),k(n,f,_),k(n,p,_),e(p,c),e(c,g),$(t,g,null),e(p,u),e(p,j),e(j,Ca),k(n,$r,_),k(n,he,_),e(he,Ie),e(Ie,Un),$(Ft,Un,null),e(he,Pa),e(he,Vn),e(Vn,Aa),k(n,wr,_),k(n,re,_),e(re,La),e(re,Ct),e(Ct,Ia),e(re,Na),e(re,Pt),e(Pt,Da),e(re,Oa),k(n,vr,_),k(n,cn,_),e(cn,Ra),k(n,yr,_),k(n,pn,_),e(pn,Gn),e(Gn,Wa),k(n,Tr,_),k(n,un,_),e(un,Ka),k(n,Sr,_),k(n,ae,_),e(ae,Jn),e(Jn,Ha),e(ae,Qa),e(ae,Xn),e(Xn,Ua),e(ae,Va),e(ae,At),e(At,Ga),e(At,Yn),e(Yn,Ja),e(At,Xa),k(n,Br,_),k(n,Ne,_),e(Ne,Ya),e(Ne,Lt),e(Lt,Za),e(Ne,ei),k(n,Er,_),k(n,me,_),e(me,De),e(De,Zn),$(It,Zn,null),e(me,ti),e(me,eo),e(eo,si),k(n,jr,_),k(n,Q,_),$(Nt,Q,null),e(Q,ni),e(Q,fe),e(fe,oi),e(fe,hn),e(hn,ri),e(fe,ai),e(fe,Dt),e(Dt,ii),e(fe,li),e(Q,di),e(Q,ge),e(ge,ci),e(ge,mn),e(mn,pi),e(ge,ui),e(ge,fn),e(fn,hi),e(ge,mi),e(Q,fi),$(Oe,Q,null),e(Q,gi),e(Q,to),e(to,_i),k(n,xr,_),k(n,_e,_),e(_e,Re),e(Re,so),$(Ot,so,null),e(_e,bi),e(_e,no),e(no,ki),k(n,Mr,_),k(n,I,_),$(Rt,I,null),e(I,zi),e(I,oo),e(oo,qi),e(I,$i),e(I,Wt),e(Wt,wi),e(Wt,gn),e(gn,vi),e(Wt,yi),e(I,Ti),e(I,ie),$(Kt,ie,null),e(ie,Si),e(ie,ro),e(ro,Bi),e(ie,Ei),e(ie,Ht),e(Ht,_n),e(_n,ji),e(_n,ao),e(ao,xi),e(Ht,Mi),e(Ht,bn),e(bn,Fi),e(bn,io),e(io,Ci),e(I,Pi),e(I,We),$(Qt,We,null),e(We,Ai),e(We,Ut),e(Ut,Li),e(Ut,lo),e(lo,Ii),e(Ut,Ni),e(I,Di),e(I,ee),$(Vt,ee,null),e(ee,Oi),e(ee,co),e(co,Ri),e(ee,Wi),$(Ke,ee,null),e(ee,Ki),e(ee,be),e(be,Hi),e(be,po),e(po,Qi),e(be,Ui),e(be,uo),e(uo,Vi),e(be,Gi),e(I,Ji),e(I,kn),$(Gt,kn,null),k(n,Fr,_),k(n,ke,_),e(ke,He),e(He,ho),$(Jt,ho,null),e(ke,Xi),e(ke,mo),e(mo,Yi),k(n,Cr,_),k(n,U,_),$(Xt,U,null),e(U,Zi),e(U,Yt),e(Yt,el),e(Yt,fo),e(fo,tl),e(Yt,sl),e(U,nl),e(U,Zt),e(Zt,ol),e(Zt,zn),e(zn,rl),e(Zt,al),e(U,il),e(U,le),$(es,le,null),e(le,ll),e(le,go),e(go,dl),e(le,cl),e(le,ts),e(ts,qn),e(qn,pl),e(qn,_o),e(_o,ul),e(ts,hl),e(ts,$n),e($n,ml),e($n,bo),e(bo,fl),e(U,gl),e(U,te),$(ss,te,null),e(te,_l),e(te,ko),e(ko,bl),e(te,kl),$(Qe,te,null),e(te,zl),e(te,ze),e(ze,ql),e(ze,zo),e(zo,$l),e(ze,wl),e(ze,qo),e(qo,vl),e(ze,yl),k(n,Pr,_),k(n,qe,_),e(qe,Ue),e(Ue,$o),$(ns,$o,null),e(qe,Tl),e(qe,wo),e(wo,Sl),k(n,Ar,_),k(n,x,_),$(os,x,null),e(x,Bl),e(x,vo),e(vo,El),e(x,jl),e(x,rs),e(rs,xl),e(rs,as),e(as,Ml),e(rs,Fl),e(x,Cl),e(x,is),e(is,Pl),e(is,wn),e(wn,Al),e(is,Ll),e(x,Il),e(x,ls),e(ls,Nl),e(ls,ds),e(ds,Dl),e(ls,Ol),e(x,Rl),e(x,cs),e(cs,Wl),e(cs,yo),e(yo,Kl),e(cs,Hl),e(x,Ql),$(Ve,x,null),e(x,Ul),$(Ge,x,null),e(x,Vl),e(x,se),$(ps,se,null),e(se,Gl),e(se,$e),e($e,Jl),e($e,vn),e(vn,Xl),e($e,Yl),e($e,To),e(To,Zl),e($e,ed),e(se,td),$(Je,se,null),e(se,sd),$(Xe,se,null),k(n,Lr,_),k(n,we,_),e(we,Ye),e(Ye,So),$(us,So,null),e(we,nd),e(we,Bo),e(Bo,od),k(n,Ir,_),k(n,M,_),$(hs,M,null),e(M,rd),e(M,ms),e(ms,ad),e(ms,Eo),e(Eo,id),e(ms,ld),e(M,dd),e(M,fs),e(fs,cd),e(fs,gs),e(gs,pd),e(fs,ud),e(M,hd),e(M,_s),e(_s,md),e(_s,yn),e(yn,fd),e(_s,gd),e(M,_d),e(M,bs),e(bs,bd),e(bs,ks),e(ks,kd),e(bs,zd),e(M,qd),e(M,zs),e(zs,$d),e(zs,jo),e(jo,wd),e(zs,vd),e(M,yd),$(Ze,M,null),e(M,Td),$(et,M,null),e(M,Sd),e(M,V),$(qs,V,null),e(V,Bd),e(V,ve),e(ve,Ed),e(ve,Tn),e(Tn,jd),e(ve,xd),e(ve,xo),e(xo,Md),e(ve,Fd),e(V,Cd),$(tt,V,null),e(V,Pd),$(st,V,null),e(V,Ad),$(nt,V,null),k(n,Nr,_),k(n,ye,_),e(ye,ot),e(ot,Mo),$($s,Mo,null),e(ye,Ld),e(ye,Fo),e(Fo,Id),k(n,Dr,_),k(n,F,_),$(ws,F,null),e(F,Nd),e(F,Co),e(Co,Dd),e(F,Od),e(F,vs),e(vs,Rd),e(vs,ys),e(ys,Wd),e(vs,Kd),e(F,Hd),e(F,Ts),e(Ts,Qd),e(Ts,Sn),e(Sn,Ud),e(Ts,Vd),e(F,Gd),e(F,Ss),e(Ss,Jd),e(Ss,Bs),e(Bs,Xd),e(Ss,Yd),e(F,Zd),e(F,Es),e(Es,ec),e(Es,Po),e(Po,tc),e(Es,sc),e(F,nc),$(rt,F,null),e(F,oc),$(at,F,null),e(F,rc),e(F,N),$(js,N,null),e(N,ac),e(N,Te),e(Te,ic),e(Te,Bn),e(Bn,lc),e(Te,dc),e(Te,Ao),e(Ao,cc),e(Te,pc),e(N,uc),$(it,N,null),e(N,hc),$(lt,N,null),e(N,mc),$(dt,N,null),e(N,fc),$(ct,N,null),e(N,gc),$(pt,N,null),k(n,Or,_),k(n,Se,_),e(Se,ut),e(ut,Lo),$(xs,Lo,null),e(Se,_c),e(Se,Io),e(Io,bc),k(n,Rr,_),k(n,C,_),$(Ms,C,null),e(C,kc),e(C,No),e(No,zc),e(C,qc),e(C,Fs),e(Fs,$c),e(Fs,Cs),e(Cs,wc),e(Fs,vc),e(C,yc),e(C,Ps),e(Ps,Tc),e(Ps,En),e(En,Sc),e(Ps,Bc),e(C,Ec),e(C,As),e(As,jc),e(As,Ls),e(Ls,xc),e(As,Mc),e(C,Fc),e(C,Is),e(Is,Cc),e(Is,Do),e(Do,Pc),e(Is,Ac),e(C,Lc),$(ht,C,null),e(C,Ic),$(mt,C,null),e(C,Nc),e(C,ne),$(Ns,ne,null),e(ne,Dc),e(ne,Be),e(Be,Oc),e(Be,jn),e(jn,Rc),e(Be,Wc),e(Be,Oo),e(Oo,Kc),e(Be,Hc),e(ne,Qc),$(ft,ne,null),e(ne,Uc),$(gt,ne,null),k(n,Wr,_),k(n,Ee,_),e(Ee,_t),e(_t,Ro),$(Ds,Ro,null),e(Ee,Vc),e(Ee,Wo),e(Wo,Gc),k(n,Kr,_),k(n,P,_),$(Os,P,null),e(P,Jc),e(P,Ko),e(Ko,Xc),e(P,Yc),e(P,Rs),e(Rs,Zc),e(Rs,Ws),e(Ws,ep),e(Rs,tp),e(P,sp),e(P,Ks),e(Ks,np),e(Ks,xn),e(xn,op),e(Ks,rp),e(P,ap),e(P,Hs),e(Hs,ip),e(Hs,Qs),e(Qs,lp),e(Hs,dp),e(P,cp),e(P,Us),e(Us,pp),e(Us,Ho),e(Ho,up),e(Us,hp),e(P,mp),$(bt,P,null),e(P,fp),$(kt,P,null),e(P,gp),e(P,G),$(Vs,G,null),e(G,_p),e(G,je),e(je,bp),e(je,Mn),e(Mn,kp),e(je,zp),e(je,Qo),e(Qo,qp),e(je,$p),e(G,wp),$(zt,G,null),e(G,vp),$(qt,G,null),e(G,yp),$($t,G,null),k(n,Hr,_),k(n,xe,_),e(xe,wt),e(wt,Uo),$(Gs,Uo,null),e(xe,Tp),e(xe,Vo),e(Vo,Sp),k(n,Qr,_),k(n,A,_),$(Js,A,null),e(A,Bp),e(A,Me),e(Me,Ep),e(Me,Go),e(Go,jp),e(Me,xp),e(Me,Jo),e(Jo,Mp),e(Me,Fp),e(A,Cp),e(A,Xs),e(Xs,Pp),e(Xs,Ys),e(Ys,Ap),e(Xs,Lp),e(A,Ip),e(A,Zs),e(Zs,Np),e(Zs,Fn),e(Fn,Dp),e(Zs,Op),e(A,Rp),e(A,en),e(en,Wp),e(en,tn),e(tn,Kp),e(en,Hp),e(A,Qp),e(A,sn),e(sn,Up),e(sn,Xo),e(Xo,Vp),e(sn,Gp),e(A,Jp),$(vt,A,null),e(A,Xp),$(yt,A,null),e(A,Yp),e(A,J),$(nn,J,null),e(J,Zp),e(J,Fe),e(Fe,eu),e(Fe,Cn),e(Cn,tu),e(Fe,su),e(Fe,Yo),e(Yo,nu),e(Fe,ou),e(J,ru),$(Tt,J,null),e(J,au),$(St,J,null),e(J,iu),$(Bt,J,null),Ur=!0},p(n,[_]){const on={};_&2&&(on.$$scope={dirty:_,ctx:n}),Oe.$set(on);const Zo={};_&2&&(Zo.$$scope={dirty:_,ctx:n}),Ke.$set(Zo);const er={};_&2&&(er.$$scope={dirty:_,ctx:n}),Qe.$set(er);const tr={};_&2&&(tr.$$scope={dirty:_,ctx:n}),Ve.$set(tr);const rn={};_&2&&(rn.$$scope={dirty:_,ctx:n}),Ge.$set(rn);const sr={};_&2&&(sr.$$scope={dirty:_,ctx:n}),Je.$set(sr);const nr={};_&2&&(nr.$$scope={dirty:_,ctx:n}),Xe.$set(nr);const or={};_&2&&(or.$$scope={dirty:_,ctx:n}),Ze.$set(or);const Ce={};_&2&&(Ce.$$scope={dirty:_,ctx:n}),et.$set(Ce);const rr={};_&2&&(rr.$$scope={dirty:_,ctx:n}),tt.$set(rr);const ar={};_&2&&(ar.$$scope={dirty:_,ctx:n}),st.$set(ar);const ir={};_&2&&(ir.$$scope={dirty:_,ctx:n}),nt.$set(ir);const lr={};_&2&&(lr.$$scope={dirty:_,ctx:n}),rt.$set(lr);const dr={};_&2&&(dr.$$scope={dirty:_,ctx:n}),at.$set(dr);const cr={};_&2&&(cr.$$scope={dirty:_,ctx:n}),it.$set(cr);const Pe={};_&2&&(Pe.$$scope={dirty:_,ctx:n}),lt.$set(Pe);const pr={};_&2&&(pr.$$scope={dirty:_,ctx:n}),dt.$set(pr);const ur={};_&2&&(ur.$$scope={dirty:_,ctx:n}),ct.$set(ur);const an={};_&2&&(an.$$scope={dirty:_,ctx:n}),pt.$set(an);const hr={};_&2&&(hr.$$scope={dirty:_,ctx:n}),ht.$set(hr);const ln={};_&2&&(ln.$$scope={dirty:_,ctx:n}),mt.$set(ln);const mr={};_&2&&(mr.$$scope={dirty:_,ctx:n}),ft.$set(mr);const dn={};_&2&&(dn.$$scope={dirty:_,ctx:n}),gt.$set(dn);const fr={};_&2&&(fr.$$scope={dirty:_,ctx:n}),bt.$set(fr);const gr={};_&2&&(gr.$$scope={dirty:_,ctx:n}),kt.$set(gr);const _r={};_&2&&(_r.$$scope={dirty:_,ctx:n}),zt.$set(_r);const Z={};_&2&&(Z.$$scope={dirty:_,ctx:n}),qt.$set(Z);const Ae={};_&2&&(Ae.$$scope={dirty:_,ctx:n}),$t.$set(Ae);const br={};_&2&&(br.$$scope={dirty:_,ctx:n}),vt.$set(br);const kr={};_&2&&(kr.$$scope={dirty:_,ctx:n}),yt.$set(kr);const Le={};_&2&&(Le.$$scope={dirty:_,ctx:n}),Tt.$set(Le);const zr={};_&2&&(zr.$$scope={dirty:_,ctx:n}),St.$set(zr);const qr={};_&2&&(qr.$$scope={dirty:_,ctx:n}),Bt.$set(qr)},i(n){Ur||(w(t.$$.fragment,n),w(Ft.$$.fragment,n),w(It.$$.fragment,n),w(Nt.$$.fragment,n),w(Oe.$$.fragment,n),w(Ot.$$.fragment,n),w(Rt.$$.fragment,n),w(Kt.$$.fragment,n),w(Qt.$$.fragment,n),w(Vt.$$.fragment,n),w(Ke.$$.fragment,n),w(Gt.$$.fragment,n),w(Jt.$$.fragment,n),w(Xt.$$.fragment,n),w(es.$$.fragment,n),w(ss.$$.fragment,n),w(Qe.$$.fragment,n),w(ns.$$.fragment,n),w(os.$$.fragment,n),w(Ve.$$.fragment,n),w(Ge.$$.fragment,n),w(ps.$$.fragment,n),w(Je.$$.fragment,n),w(Xe.$$.fragment,n),w(us.$$.fragment,n),w(hs.$$.fragment,n),w(Ze.$$.fragment,n),w(et.$$.fragment,n),w(qs.$$.fragment,n),w(tt.$$.fragment,n),w(st.$$.fragment,n),w(nt.$$.fragment,n),w($s.$$.fragment,n),w(ws.$$.fragment,n),w(rt.$$.fragment,n),w(at.$$.fragment,n),w(js.$$.fragment,n),w(it.$$.fragment,n),w(lt.$$.fragment,n),w(dt.$$.fragment,n),w(ct.$$.fragment,n),w(pt.$$.fragment,n),w(xs.$$.fragment,n),w(Ms.$$.fragment,n),w(ht.$$.fragment,n),w(mt.$$.fragment,n),w(Ns.$$.fragment,n),w(ft.$$.fragment,n),w(gt.$$.fragment,n),w(Ds.$$.fragment,n),w(Os.$$.fragment,n),w(bt.$$.fragment,n),w(kt.$$.fragment,n),w(Vs.$$.fragment,n),w(zt.$$.fragment,n),w(qt.$$.fragment,n),w($t.$$.fragment,n),w(Gs.$$.fragment,n),w(Js.$$.fragment,n),w(vt.$$.fragment,n),w(yt.$$.fragment,n),w(nn.$$.fragment,n),w(Tt.$$.fragment,n),w(St.$$.fragment,n),w(Bt.$$.fragment,n),Ur=!0)},o(n){v(t.$$.fragment,n),v(Ft.$$.fragment,n),v(It.$$.fragment,n),v(Nt.$$.fragment,n),v(Oe.$$.fragment,n),v(Ot.$$.fragment,n),v(Rt.$$.fragment,n),v(Kt.$$.fragment,n),v(Qt.$$.fragment,n),v(Vt.$$.fragment,n),v(Ke.$$.fragment,n),v(Gt.$$.fragment,n),v(Jt.$$.fragment,n),v(Xt.$$.fragment,n),v(es.$$.fragment,n),v(ss.$$.fragment,n),v(Qe.$$.fragment,n),v(ns.$$.fragment,n),v(os.$$.fragment,n),v(Ve.$$.fragment,n),v(Ge.$$.fragment,n),v(ps.$$.fragment,n),v(Je.$$.fragment,n),v(Xe.$$.fragment,n),v(us.$$.fragment,n),v(hs.$$.fragment,n),v(Ze.$$.fragment,n),v(et.$$.fragment,n),v(qs.$$.fragment,n),v(tt.$$.fragment,n),v(st.$$.fragment,n),v(nt.$$.fragment,n),v($s.$$.fragment,n),v(ws.$$.fragment,n),v(rt.$$.fragment,n),v(at.$$.fragment,n),v(js.$$.fragment,n),v(it.$$.fragment,n),v(lt.$$.fragment,n),v(dt.$$.fragment,n),v(ct.$$.fragment,n),v(pt.$$.fragment,n),v(xs.$$.fragment,n),v(Ms.$$.fragment,n),v(ht.$$.fragment,n),v(mt.$$.fragment,n),v(Ns.$$.fragment,n),v(ft.$$.fragment,n),v(gt.$$.fragment,n),v(Ds.$$.fragment,n),v(Os.$$.fragment,n),v(bt.$$.fragment,n),v(kt.$$.fragment,n),v(Vs.$$.fragment,n),v(zt.$$.fragment,n),v(qt.$$.fragment,n),v($t.$$.fragment,n),v(Gs.$$.fragment,n),v(Js.$$.fragment,n),v(vt.$$.fragment,n),v(yt.$$.fragment,n),v(nn.$$.fragment,n),v(Tt.$$.fragment,n),v(St.$$.fragment,n),v(Bt.$$.fragment,n),Ur=!1},d(n){s(o),n&&s(f),n&&s(p),y(t),n&&s($r),n&&s(he),y(Ft),n&&s(wr),n&&s(re),n&&s(vr),n&&s(cn),n&&s(yr),n&&s(pn),n&&s(Tr),n&&s(un),n&&s(Sr),n&&s(ae),n&&s(Br),n&&s(Ne),n&&s(Er),n&&s(me),y(It),n&&s(jr),n&&s(Q),y(Nt),y(Oe),n&&s(xr),n&&s(_e),y(Ot),n&&s(Mr),n&&s(I),y(Rt),y(Kt),y(Qt),y(Vt),y(Ke),y(Gt),n&&s(Fr),n&&s(ke),y(Jt),n&&s(Cr),n&&s(U),y(Xt),y(es),y(ss),y(Qe),n&&s(Pr),n&&s(qe),y(ns),n&&s(Ar),n&&s(x),y(os),y(Ve),y(Ge),y(ps),y(Je),y(Xe),n&&s(Lr),n&&s(we),y(us),n&&s(Ir),n&&s(M),y(hs),y(Ze),y(et),y(qs),y(tt),y(st),y(nt),n&&s(Nr),n&&s(ye),y($s),n&&s(Dr),n&&s(F),y(ws),y(rt),y(at),y(js),y(it),y(lt),y(dt),y(ct),y(pt),n&&s(Or),n&&s(Se),y(xs),n&&s(Rr),n&&s(C),y(Ms),y(ht),y(mt),y(Ns),y(ft),y(gt),n&&s(Wr),n&&s(Ee),y(Ds),n&&s(Kr),n&&s(P),y(Os),y(bt),y(kt),y(Vs),y(zt),y(qt),y($t),n&&s(Hr),n&&s(xe),y(Gs),n&&s(Qr),n&&s(A),y(Js),y(vt),y(yt),y(nn),y(Tt),y(St),y(Bt)}}}const Em={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 jm(T){return Vh(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Lm extends Kh{constructor(o){super();Hh(this,o,jm,Bm,Qh,{})}}export{Lm as default,Em as metadata};
