import{S as bi,i as ki,s as wi,e as n,k as f,w,t as i,M as yi,c as a,d as t,m as g,a as r,x as y,h as l,b as m,N as vi,G as e,g as _,y as v,q as $,o as T,B as Y,v as $i,L as Ue}from"../../chunks/vendor-hf-doc-builder.js";import{T as ct}from"../../chunks/Tip-hf-doc-builder.js";import{D as z}from"../../chunks/Docstring-hf-doc-builder.js";import{C as Re}from"../../chunks/CodeBlock-hf-doc-builder.js";import{I as he}from"../../chunks/IconCopyLink-hf-doc-builder.js";import{E as Qe}from"../../chunks/ExampleCodeBlock-hf-doc-builder.js";function Ti(M){let d,k,h,p,b;return p=new Re({props:{code:`from transformers import YosoConfig, YosoModel

# Initializing a YOSO uw-madison/yoso-4096 style configuration
configuration = YosoConfig()

# Initializing a model (with random weights) from the uw-madison/yoso-4096 style configuration
model = YosoModel(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> YosoConfig, YosoModel

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a YOSO uw-madison/yoso-4096 style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = YosoConfig()

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a model (with random weights) from the uw-madison/yoso-4096 style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = YosoModel(configuration)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Accessing the model configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = model.config`}}),{c(){d=n("p"),k=i("Example:"),h=f(),w(p.$$.fragment)},l(s){d=a(s,"P",{});var c=r(d);k=l(c,"Example:"),c.forEach(t),h=g(s),y(p.$$.fragment,s)},m(s,c){_(s,d,c),e(d,k),_(s,h,c),v(p,s,c),b=!0},p:Ue,i(s){b||($(p.$$.fragment,s),b=!0)},o(s){T(p.$$.fragment,s),b=!1},d(s){s&&t(d),s&&t(h),Y(p,s)}}}function Yi(M){let d,k,h,p,b;return{c(){d=n("p"),k=i("Although the recipe for forward pass needs to be defined within this function, one should call the "),h=n("code"),p=i("Module"),b=i(`
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(s){d=a(s,"P",{});var c=r(d);k=l(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),h=a(c,"CODE",{});var q=r(h);p=l(q,"Module"),q.forEach(t),b=l(c,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),c.forEach(t)},m(s,c){_(s,d,c),e(d,k),e(d,h),e(h,p),e(d,b)},d(s){s&&t(d)}}}function Mi(M){let d,k,h,p,b;return p=new Re({props:{code:`from transformers import AutoTokenizer, YosoModel
import torch

tokenizer = AutoTokenizer.from_pretrained("uw-madison/yoso-4096")
model = YosoModel.from_pretrained("uw-madison/yoso-4096")

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

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

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;uw-madison/yoso-4096&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = YosoModel.from_pretrained(<span class="hljs-string">&quot;uw-madison/yoso-4096&quot;</span>)

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

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

tokenizer = AutoTokenizer.from_pretrained("uw-madison/yoso-4096")
model = YosoForMaskedLM.from_pretrained("uw-madison/yoso-4096")

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

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

# retrieve index of [MASK]
mask_token_index = (inputs.input_ids == tokenizer.mask_token_id)[0].nonzero(as_tuple=True)[0]

predicted_token_id = logits[0, mask_token_index].argmax(axis=-1)

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

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

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;uw-madison/yoso-4096&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = YosoForMaskedLM.from_pretrained(<span class="hljs-string">&quot;uw-madison/yoso-4096&quot;</span>)

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

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

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

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

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

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

tokenizer = AutoTokenizer.from_pretrained("uw-madison/yoso-4096")
model = YosoForSequenceClassification.from_pretrained("uw-madison/yoso-4096")

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

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

predicted_class_id = logits.argmax().item()

# To train a model on \`num_labels\` classes, you can pass \`num_labels=num_labels\` to \`.from_pretrained(...)\`
num_labels = len(model.config.id2label)
model = YosoForSequenceClassification.from_pretrained("uw-madison/yoso-4096", num_labels=num_labels)

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

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;uw-madison/yoso-4096&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = YosoForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;uw-madison/yoso-4096&quot;</span>)

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

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

<span class="hljs-meta">&gt;&gt;&gt; </span>predicted_class_id = logits.argmax().item()

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># To train a model on \`num_labels\` classes, you can pass \`num_labels=num_labels\` to \`.from_pretrained(...)\`</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>num_labels = <span class="hljs-built_in">len</span>(model.config.id2label)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = YosoForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;uw-madison/yoso-4096&quot;</span>, num_labels=num_labels)

<span class="hljs-meta">&gt;&gt;&gt; </span>labels = torch.tensor([<span class="hljs-number">1</span>])
<span class="hljs-meta">&gt;&gt;&gt; </span>loss = model(**inputs, labels=labels).loss`}}),{c(){d=n("p"),k=i("Example of single-label classification:"),h=f(),w(p.$$.fragment)},l(s){d=a(s,"P",{});var c=r(d);k=l(c,"Example of single-label classification:"),c.forEach(t),h=g(s),y(p.$$.fragment,s)},m(s,c){_(s,d,c),e(d,k),_(s,h,c),v(p,s,c),b=!0},p:Ue,i(s){b||($(p.$$.fragment,s),b=!0)},o(s){T(p.$$.fragment,s),b=!1},d(s){s&&t(d),s&&t(h),Y(p,s)}}}function Ci(M){let d,k,h,p,b;return p=new Re({props:{code:`import torch
from transformers import AutoTokenizer, YosoForSequenceClassification

tokenizer = AutoTokenizer.from_pretrained("uw-madison/yoso-4096")
model = YosoForSequenceClassification.from_pretrained("uw-madison/yoso-4096", problem_type="multi_label_classification")

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

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

predicted_class_ids = torch.arange(0, logits.shape[-1])[torch.sigmoid(logits).squeeze(dim=0) > 0.5]

# To train a model on \`num_labels\` classes, you can pass \`num_labels=num_labels\` to \`.from_pretrained(...)\`
num_labels = len(model.config.id2label)
model = YosoForSequenceClassification.from_pretrained(
    "uw-madison/yoso-4096", num_labels=num_labels, problem_type="multi_label_classification"
)

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

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;uw-madison/yoso-4096&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = YosoForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;uw-madison/yoso-4096&quot;</span>, problem_type=<span class="hljs-string">&quot;multi_label_classification&quot;</span>)

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

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

<span class="hljs-meta">&gt;&gt;&gt; </span>predicted_class_ids = torch.arange(<span class="hljs-number">0</span>, logits.shape[-<span class="hljs-number">1</span>])[torch.sigmoid(logits).squeeze(dim=<span class="hljs-number">0</span>) &gt; <span class="hljs-number">0.5</span>]

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># To train a model on \`num_labels\` classes, you can pass \`num_labels=num_labels\` to \`.from_pretrained(...)\`</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>num_labels = <span class="hljs-built_in">len</span>(model.config.id2label)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = YosoForSequenceClassification.from_pretrained(
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;uw-madison/yoso-4096&quot;</span>, num_labels=num_labels, problem_type=<span class="hljs-string">&quot;multi_label_classification&quot;</span>
<span class="hljs-meta">... </span>)

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

tokenizer = AutoTokenizer.from_pretrained("uw-madison/yoso-4096")
model = YosoForMultipleChoice.from_pretrained("uw-madison/yoso-4096")

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

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

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

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;uw-madison/yoso-4096&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = YosoForMultipleChoice.from_pretrained(<span class="hljs-string">&quot;uw-madison/yoso-4096&quot;</span>)

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

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

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

tokenizer = AutoTokenizer.from_pretrained("uw-madison/yoso-4096")
model = YosoForTokenClassification.from_pretrained("uw-madison/yoso-4096")

inputs = tokenizer(
    "HuggingFace is a company based in Paris and New York", add_special_tokens=False, return_tensors="pt"
)

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

predicted_token_class_ids = logits.argmax(-1)

# Note that tokens are classified rather then input words which means that
# there might be more predicted token classes than words.
# Multiple token classes might account for the same word
predicted_tokens_classes = [model.config.id2label[t.item()] for t in predicted_token_class_ids[0]]

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

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;uw-madison/yoso-4096&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = YosoForTokenClassification.from_pretrained(<span class="hljs-string">&quot;uw-madison/yoso-4096&quot;</span>)

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

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

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

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

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

tokenizer = AutoTokenizer.from_pretrained("uw-madison/yoso-4096")
model = YosoForQuestionAnswering.from_pretrained("uw-madison/yoso-4096")

question, text = "Who was Jim Henson?", "Jim Henson was a nice puppet"

inputs = tokenizer(question, text, return_tensors="pt")
with torch.no_grad():
    outputs = model(**inputs)

answer_start_index = outputs.start_logits.argmax()
answer_end_index = outputs.end_logits.argmax()

predict_answer_tokens = inputs.input_ids[0, answer_start_index : answer_end_index + 1]

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

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

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;uw-madison/yoso-4096&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = YosoForQuestionAnswering.from_pretrained(<span class="hljs-string">&quot;uw-madison/yoso-4096&quot;</span>)

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

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

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

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

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

<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs, start_positions=target_start_index, end_positions=target_end_index)
<span class="hljs-meta">&gt;&gt;&gt; </span>loss = outputs.loss`}}),{c(){d=n("p"),k=i("Example:"),h=f(),w(p.$$.fragment)},l(s){d=a(s,"P",{});var c=r(d);k=l(c,"Example:"),c.forEach(t),h=g(s),y(p.$$.fragment,s)},m(s,c){_(s,d,c),e(d,k),_(s,h,c),v(p,s,c),b=!0},p:Ue,i(s){b||($(p.$$.fragment,s),b=!0)},o(s){T(p.$$.fragment,s),b=!1},d(s){s&&t(d),s&&t(h),Y(p,s)}}}function Li(M){let d,k,h,p,b,s,c,q,Es,Xt,U,me,pt,Ve,Ss,ht,Ps,es,R,Ls,Ge,Ns,Is,Ds,os,jo,Ws,ts,Oo,mt,Hs,ss,Ao,Bs,ns,H,ut,Qs,Us,V,Rs,ft,Vs,Gs,gt,Ks,Js,Zs,G,Xs,_t,en,on,bt,tn,sn,as,ue,_r,rs,fe,nn,Eo,an,rn,is,B,ln,Ke,dn,cn,Je,pn,hn,ls,K,ge,kt,Ze,mn,wt,un,ds,F,Xe,fn,J,gn,So,_n,bn,eo,kn,wn,yn,Z,vn,Po,$n,Tn,Lo,Yn,Mn,qn,_e,cs,X,be,yt,oo,xn,vt,Fn,ps,S,to,zn,so,Cn,no,jn,On,An,C,ao,En,ee,Sn,No,Pn,Ln,$t,Nn,In,Dn,ke,Wn,we,hs,oe,ye,Tt,ro,Hn,Yt,Bn,ms,P,io,Qn,te,Un,Mt,Rn,Vn,lo,Gn,Kn,Jn,j,co,Zn,se,Xn,Io,ea,oa,qt,ta,sa,na,ve,aa,$e,us,ne,Te,xt,po,ra,Ft,ia,fs,L,ho,la,mo,da,uo,ca,pa,ha,x,fo,ma,ae,ua,Do,fa,ga,zt,_a,ba,ka,Ye,wa,Me,ya,qe,gs,re,xe,Ct,go,va,jt,$a,_s,N,_o,Ta,bo,Ya,ko,Ma,qa,xa,O,wo,Fa,ie,za,Wo,Ca,ja,Ot,Oa,Aa,Ea,Fe,Sa,ze,bs,le,Ce,At,yo,Pa,Et,La,ks,I,vo,Na,$o,Ia,To,Da,Wa,Ha,A,Yo,Ba,de,Qa,Ho,Ua,Ra,St,Va,Ga,Ka,je,Ja,Oe,ws,ce,Ae,Pt,Mo,Za,Lt,Xa,ys,D,qo,er,W,or,Nt,tr,sr,It,nr,ar,xo,rr,ir,lr,E,Fo,dr,pe,cr,Bo,pr,hr,Dt,mr,ur,fr,Ee,gr,Se,vs;return s=new he({}),Ve=new he({}),Ze=new he({}),Xe=new z({props:{name:"class transformers.YosoConfig",anchor:"transformers.YosoConfig",parameters:[{name:"vocab_size",val:" = 50265"},{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:" = 4096"},{name:"type_vocab_size",val:" = 1"},{name:"initializer_range",val:" = 0.02"},{name:"layer_norm_eps",val:" = 1e-12"},{name:"position_embedding_type",val:" = 'absolute'"},{name:"use_expectation",val:" = True"},{name:"hash_code_len",val:" = 9"},{name:"num_hash",val:" = 64"},{name:"conv_window",val:" = None"},{name:"use_fast_hash",val:" = True"},{name:"lsh_backward",val:" = True"},{name:"pad_token_id",val:" = 1"},{name:"bos_token_id",val:" = 0"},{name:"eos_token_id",val:" = 2"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.YosoConfig.vocab_size",description:`<strong>vocab_size</strong> (<code>int</code>, <em>optional</em>, defaults to 50265) &#x2014;
Vocabulary size of the YOSO model. Defines the number of different tokens that can be represented by the
<code>inputs_ids</code> passed when calling <a href="/docs/transformers/main/en/model_doc/yoso#transformers.YosoModel">YosoModel</a>.`,name:"vocab_size"},{anchor:"transformers.YosoConfig.hidden_size",description:`<strong>hidden_size</strong> (<code>int</code>, <em>optional</em>, defaults to 768) &#x2014;
Dimension of the encoder layers and the pooler layer.`,name:"hidden_size"},{anchor:"transformers.YosoConfig.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.YosoConfig.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.YosoConfig.intermediate_size",description:`<strong>intermediate_size</strong> (<code>int</code>, <em>optional</em>, defaults to 3072) &#x2014;
Dimension of the &#x201C;intermediate&#x201D; (i.e., feed-forward) layer in the Transformer encoder.`,name:"intermediate_size"},{anchor:"transformers.YosoConfig.hidden_act",description:`<strong>hidden_act</strong> (<code>str</code> or <code>function</code>, <em>optional</em>, defaults to <code>&quot;gelu&quot;</code>) &#x2014;
The non-linear activation function (function or string) in the encoder and pooler. If string, <code>&quot;gelu&quot;</code>,
<code>&quot;relu&quot;</code>, <code>&quot;selu&quot;</code> and <code>&quot;gelu_new&quot;</code> are supported.`,name:"hidden_act"},{anchor:"transformers.YosoConfig.hidden_dropout_prob",description:`<strong>hidden_dropout_prob</strong> (<code>float</code>, <em>optional</em>, defaults to 0.1) &#x2014;
The dropout probabilitiy for all fully connected layers in the embeddings, encoder, and pooler.`,name:"hidden_dropout_prob"},{anchor:"transformers.YosoConfig.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.YosoConfig.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.YosoConfig.type_vocab_size",description:`<strong>type_vocab_size</strong> (<code>int</code>, <em>optional</em>, defaults to 2) &#x2014;
The vocabulary size of the <code>token_type_ids</code> passed when calling <a href="/docs/transformers/main/en/model_doc/yoso#transformers.YosoModel">YosoModel</a>.`,name:"type_vocab_size"},{anchor:"transformers.YosoConfig.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.YosoConfig.layer_norm_eps",description:`<strong>layer_norm_eps</strong> (<code>float</code>, <em>optional</em>, defaults to 1e-12) &#x2014;
The epsilon used by the layer normalization layers.`,name:"layer_norm_eps"},{anchor:"transformers.YosoConfig.position_embedding_type",description:`<strong>position_embedding_type</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;absolute&quot;</code>) &#x2014;
Type of position embedding. Choose one of <code>&quot;absolute&quot;</code>, <code>&quot;relative_key&quot;</code>, <code>&quot;relative_key_query&quot;</code>.`,name:"position_embedding_type"},{anchor:"transformers.YosoConfig.use_expectation",description:`<strong>use_expectation</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to use YOSO Expectation. Overrides any effect of num_hash.`,name:"use_expectation"},{anchor:"transformers.YosoConfig.hash_code_len",description:`<strong>hash_code_len</strong> (<code>int</code>, <em>optional</em>, defaults to 9) &#x2014;
The length of hashes generated by the hash functions.`,name:"hash_code_len"},{anchor:"transformers.YosoConfig.num_hash",description:`<strong>num_hash</strong> (<code>int</code>, <em>optional</em>, defaults to 64) &#x2014;
Number of hash functions used in <code>YosoSelfAttention</code>.`,name:"num_hash"},{anchor:"transformers.YosoConfig.conv_window",description:`<strong>conv_window</strong> (<code>int</code>, <em>optional</em>) &#x2014;
Kernel size of depth-wise convolution.`,name:"conv_window"},{anchor:"transformers.YosoConfig.use_fast_hash",description:`<strong>use_fast_hash</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to use custom cuda kernels which perform fast random projection via hadamard transform.`,name:"use_fast_hash"},{anchor:"transformers.YosoConfig.lsh_backward",description:`<strong>lsh_backward</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to perform backpropagation using Locality Sensitive Hashing.`,name:"lsh_backward"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/yoso/configuration_yoso.py#L29"}}),_e=new Qe({props:{anchor:"transformers.YosoConfig.example",$$slots:{default:[Ti]},$$scope:{ctx:M}}}),oo=new he({}),to=new z({props:{name:"class transformers.YosoModel",anchor:"transformers.YosoModel",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.YosoModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/yoso#transformers.YosoConfig">YosoConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/yoso/modeling_yoso.py#L741"}}),ao=new z({props:{name:"forward",anchor:"transformers.YosoModel.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:"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.YosoModel.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.YosoModel.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.YosoModel.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.YosoModel.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.YosoModel.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.YosoModel.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <em>input_ids</em> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.YosoModel.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.YosoModel.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.YosoModel.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/yoso/modeling_yoso.py#L766",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.BaseModelOutputWithCrossAttentions"
>transformers.modeling_outputs.BaseModelOutputWithCrossAttentions</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/main/en/model_doc/yoso#transformers.YosoConfig"
>YosoConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>last_hidden_state</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>) \u2014 Sequence of hidden-states at the output of the last layer of the model.</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
<li>
<p><strong>cross_attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> and <code>config.add_cross_attention=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights of the decoder\u2019s cross-attention layer, after the attention softmax, used to compute the
weighted average in the cross-attention heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.BaseModelOutputWithCrossAttentions"
>transformers.modeling_outputs.BaseModelOutputWithCrossAttentions</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),ke=new ct({props:{$$slots:{default:[Yi]},$$scope:{ctx:M}}}),we=new Qe({props:{anchor:"transformers.YosoModel.forward.example",$$slots:{default:[Mi]},$$scope:{ctx:M}}}),ro=new he({}),io=new z({props:{name:"class transformers.YosoForMaskedLM",anchor:"transformers.YosoForMaskedLM",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.YosoForMaskedLM.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/yoso#transformers.YosoConfig">YosoConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/yoso/modeling_yoso.py#L852"}}),co=new z({props:{name:"forward",anchor:"transformers.YosoForMaskedLM.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.YosoForMaskedLM.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.YosoForMaskedLM.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.YosoForMaskedLM.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.YosoForMaskedLM.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.YosoForMaskedLM.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.YosoForMaskedLM.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <em>input_ids</em> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.YosoForMaskedLM.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.YosoForMaskedLM.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.YosoForMaskedLM.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.YosoForMaskedLM.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Labels for computing the masked language modeling loss. Indices should be in <code>[-100, 0, ..., config.vocab_size]</code> (see <code>input_ids</code> docstring) Tokens with indices set to <code>-100</code> are ignored (masked), the
loss is only computed for the tokens with labels in <code>[0, ..., config.vocab_size]</code>.`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/yoso/modeling_yoso.py#L874",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.MaskedLMOutput"
>transformers.modeling_outputs.MaskedLMOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/main/en/model_doc/yoso#transformers.YosoConfig"
>YosoConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Masked language modeling (MLM) loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, config.vocab_size)</code>) \u2014 Prediction scores of the language modeling head (scores for each vocabulary token before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.MaskedLMOutput"
>transformers.modeling_outputs.MaskedLMOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),ve=new ct({props:{$$slots:{default:[qi]},$$scope:{ctx:M}}}),$e=new Qe({props:{anchor:"transformers.YosoForMaskedLM.forward.example",$$slots:{default:[xi]},$$scope:{ctx:M}}}),po=new he({}),ho=new z({props:{name:"class transformers.YosoForSequenceClassification",anchor:"transformers.YosoForSequenceClassification",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.YosoForSequenceClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/yoso#transformers.YosoConfig">YosoConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/yoso/modeling_yoso.py#L959"}}),fo=new z({props:{name:"forward",anchor:"transformers.YosoForSequenceClassification.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.YosoForSequenceClassification.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.YosoForSequenceClassification.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.YosoForSequenceClassification.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.YosoForSequenceClassification.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.YosoForSequenceClassification.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.YosoForSequenceClassification.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <em>input_ids</em> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.YosoForSequenceClassification.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.YosoForSequenceClassification.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.YosoForSequenceClassification.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.YosoForSequenceClassification.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for computing the sequence classification/regression loss. Indices should be in <code>[0, ..., config.num_labels - 1]</code>. If <code>config.num_labels == 1</code> a regression loss is computed (Mean-Square loss), If
<code>config.num_labels &gt; 1</code> a classification loss is computed (Cross-Entropy).`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/yoso/modeling_yoso.py#L969",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.SequenceClassifierOutput"
>transformers.modeling_outputs.SequenceClassifierOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/main/en/model_doc/yoso#transformers.YosoConfig"
>YosoConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Classification (or regression if config.num_labels==1) loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, config.num_labels)</code>) \u2014 Classification (or regression if config.num_labels==1) scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.SequenceClassifierOutput"
>transformers.modeling_outputs.SequenceClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Ye=new ct({props:{$$slots:{default:[Fi]},$$scope:{ctx:M}}}),Me=new Qe({props:{anchor:"transformers.YosoForSequenceClassification.forward.example",$$slots:{default:[zi]},$$scope:{ctx:M}}}),qe=new Qe({props:{anchor:"transformers.YosoForSequenceClassification.forward.example-2",$$slots:{default:[Ci]},$$scope:{ctx:M}}}),go=new he({}),_o=new z({props:{name:"class transformers.YosoForMultipleChoice",anchor:"transformers.YosoForMultipleChoice",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.YosoForMultipleChoice.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/yoso#transformers.YosoConfig">YosoConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/yoso/modeling_yoso.py#L1050"}}),wo=new z({props:{name:"forward",anchor:"transformers.YosoForMultipleChoice.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.YosoForMultipleChoice.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, num_choices, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.YosoForMultipleChoice.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.YosoForMultipleChoice.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.YosoForMultipleChoice.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.YosoForMultipleChoice.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.YosoForMultipleChoice.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_choices, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <em>input_ids</em> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.YosoForMultipleChoice.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.YosoForMultipleChoice.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.YosoForMultipleChoice.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.YosoForMultipleChoice.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for computing the multiple choice classification loss. Indices should be in <code>[0, ..., num_choices-1]</code> where <code>num_choices</code> is the size of the second dimension of the input tensors. (See
<code>input_ids</code> above)`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/yoso/modeling_yoso.py#L1061",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.MultipleChoiceModelOutput"
>transformers.modeling_outputs.MultipleChoiceModelOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/main/en/model_doc/yoso#transformers.YosoConfig"
>YosoConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <em>(1,)</em>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Classification loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_choices)</code>) \u2014 <em>num_choices</em> is the second dimension of the input tensors. (see <em>input_ids</em> above).</p>
<p>Classification scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.MultipleChoiceModelOutput"
>transformers.modeling_outputs.MultipleChoiceModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Fe=new ct({props:{$$slots:{default:[ji]},$$scope:{ctx:M}}}),ze=new Qe({props:{anchor:"transformers.YosoForMultipleChoice.forward.example",$$slots:{default:[Oi]},$$scope:{ctx:M}}}),yo=new he({}),vo=new z({props:{name:"class transformers.YosoForTokenClassification",anchor:"transformers.YosoForTokenClassification",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.YosoForTokenClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/yoso#transformers.YosoConfig">YosoConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/yoso/modeling_yoso.py#L1141"}}),Yo=new z({props:{name:"forward",anchor:"transformers.YosoForTokenClassification.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.YosoForTokenClassification.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.YosoForTokenClassification.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.YosoForTokenClassification.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.YosoForTokenClassification.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.YosoForTokenClassification.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.YosoForTokenClassification.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <em>input_ids</em> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.YosoForTokenClassification.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.YosoForTokenClassification.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.YosoForTokenClassification.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.YosoForTokenClassification.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Labels for computing the token classification loss. Indices should be in <code>[0, ..., config.num_labels - 1]</code>.`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/yoso/modeling_yoso.py#L1153",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.TokenClassifierOutput"
>transformers.modeling_outputs.TokenClassifierOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/main/en/model_doc/yoso#transformers.YosoConfig"
>YosoConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided)  \u2014 Classification loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, config.num_labels)</code>) \u2014 Classification scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.TokenClassifierOutput"
>transformers.modeling_outputs.TokenClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),je=new ct({props:{$$slots:{default:[Ai]},$$scope:{ctx:M}}}),Oe=new Qe({props:{anchor:"transformers.YosoForTokenClassification.forward.example",$$slots:{default:[Ei]},$$scope:{ctx:M}}}),Mo=new he({}),qo=new z({props:{name:"class transformers.YosoForQuestionAnswering",anchor:"transformers.YosoForQuestionAnswering",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.YosoForQuestionAnswering.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/yoso#transformers.YosoConfig">YosoConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/yoso/modeling_yoso.py#L1226"}}),Fo=new z({props:{name:"forward",anchor:"transformers.YosoForQuestionAnswering.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.YosoForQuestionAnswering.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.YosoForQuestionAnswering.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.YosoForQuestionAnswering.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.YosoForQuestionAnswering.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.YosoForQuestionAnswering.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.YosoForQuestionAnswering.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <em>input_ids</em> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.YosoForQuestionAnswering.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.YosoForQuestionAnswering.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.YosoForQuestionAnswering.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.YosoForQuestionAnswering.forward.start_positions",description:`<strong>start_positions</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for position (index) of the start of the labelled span for computing the token classification loss.
Positions are clamped to the length of the sequence (<code>sequence_length</code>). Position outside of the sequence
are not taken into account for computing the loss.`,name:"start_positions"},{anchor:"transformers.YosoForQuestionAnswering.forward.end_positions",description:`<strong>end_positions</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for position (index) of the end of the labelled span for computing the token classification loss.
Positions are clamped to the length of the sequence (<code>sequence_length</code>). Position outside of the sequence
are not taken into account for computing the loss.`,name:"end_positions"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/yoso/modeling_yoso.py#L1239",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.QuestionAnsweringModelOutput"
>transformers.modeling_outputs.QuestionAnsweringModelOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/main/en/model_doc/yoso#transformers.YosoConfig"
>YosoConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Total span extraction loss is the sum of a Cross-Entropy for the start and end positions.</p>
</li>
<li>
<p><strong>start_logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>) \u2014 Span-start scores (before SoftMax).</p>
</li>
<li>
<p><strong>end_logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>) \u2014 Span-end scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.QuestionAnsweringModelOutput"
>transformers.modeling_outputs.QuestionAnsweringModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Ee=new ct({props:{$$slots:{default:[Si]},$$scope:{ctx:M}}}),Se=new Qe({props:{anchor:"transformers.YosoForQuestionAnswering.forward.example",$$slots:{default:[Pi]},$$scope:{ctx:M}}}),{c(){d=n("meta"),k=f(),h=n("h1"),p=n("a"),b=n("span"),w(s.$$.fragment),c=f(),q=n("span"),Es=i("YOSO"),Xt=f(),U=n("h2"),me=n("a"),pt=n("span"),w(Ve.$$.fragment),Ss=f(),ht=n("span"),Ps=i("Overview"),es=f(),R=n("p"),Ls=i("The YOSO model was proposed in "),Ge=n("a"),Ns=i("You Only Sample (Almost) Once: Linear Cost Self-Attention Via Bernoulli Sampling"),Is=n("br"),Ds=i(`
by Zhanpeng Zeng, Yunyang Xiong, Sathya N. Ravi, Shailesh Acharya, Glenn Fung, Vikas Singh. YOSO approximates standard softmax self-attention
via a Bernoulli sampling scheme based on Locality Sensitive Hashing (LSH). In principle, all the Bernoulli random variables can be sampled with
a single hash.`),os=f(),jo=n("p"),Ws=i("The abstract from the paper is the following:"),ts=f(),Oo=n("p"),mt=n("em"),Hs=i(`Transformer-based models are widely used in natural language processing (NLP). Central to the transformer model is
the self-attention mechanism, which captures the interactions of token pairs in the input sequences and depends quadratically
on the sequence length. Training such models on longer sequences is expensive. In this paper, we show that a Bernoulli sampling
attention mechanism based on Locality Sensitive Hashing (LSH), decreases the quadratic complexity of such models to linear.
We bypass the quadratic cost by considering self-attention as a sum of individual tokens associated with Bernoulli random
variables that can, in principle, be sampled at once by a single hash (although in practice, this number may be a small constant).
This leads to an efficient sampling scheme to estimate self-attention which relies on specific modifications of
LSH (to enable deployment on GPU architectures). We evaluate our algorithm on the GLUE benchmark with standard 512 sequence
length where we see favorable performance relative to a standard pretrained Transformer. On the Long Range Arena (LRA) benchmark,
for evaluating performance on long sequences, our method achieves results consistent with softmax self-attention but with sizable
speed-ups and memory savings and often outperforms other efficient self-attention methods. Our code is available at this https URL`),ss=f(),Ao=n("p"),Bs=i("Tips:"),ns=f(),H=n("ul"),ut=n("li"),Qs=i(`The YOSO attention algorithm is implemented through custom CUDA kernels, functions written in CUDA C++ that can be executed multiple times
in parallel on a GPU.`),Us=f(),V=n("li"),Rs=i("The kernels provide a "),ft=n("code"),Vs=i("fast_hash"),Gs=i(` function, which approximates the random projections of the queries and keys using the Fast Hadamard Transform. Using these
hash codes, the `),gt=n("code"),Ks=i("lsh_cumulation"),Js=i(" function approximates self-attention via LSH-based Bernoulli sampling."),Zs=f(),G=n("li"),Xs=i("To use the custom kernels, the user should set "),_t=n("code"),en=i("config.use_expectation = False"),on=i(`. To ensure that the kernels are compiled successfully,
the user must install the correct version of PyTorch and cudatoolkit. By default, `),bt=n("code"),tn=i("config.use_expectation = True"),sn=i(`, which uses YOSO-E and
does not require compiling CUDA kernels.`),as=f(),ue=n("img"),rs=f(),fe=n("small"),nn=i("YOSO Attention Algorithm. Taken from the "),Eo=n("a"),an=i("original paper"),rn=i("."),is=f(),B=n("p"),ln=i("This model was contributed by "),Ke=n("a"),dn=i("novice03"),cn=i(". The original code can be found "),Je=n("a"),pn=i("here"),hn=i("."),ls=f(),K=n("h2"),ge=n("a"),kt=n("span"),w(Ze.$$.fragment),mn=f(),wt=n("span"),un=i("YosoConfig"),ds=f(),F=n("div"),w(Xe.$$.fragment),fn=f(),J=n("p"),gn=i("This is the configuration class to store the configuration of a "),So=n("a"),_n=i("YosoModel"),bn=i(`. It is used to instantiate an YOSO
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 YOSO
`),eo=n("a"),kn=i("uw-madison/yoso-4096"),wn=i(" architecture."),yn=f(),Z=n("p"),vn=i("Configuration objects inherit from "),Po=n("a"),$n=i("PretrainedConfig"),Tn=i(` and can be used to control the model outputs. Read the
documentation from `),Lo=n("a"),Yn=i("PretrainedConfig"),Mn=i(" for more information."),qn=f(),w(_e.$$.fragment),cs=f(),X=n("h2"),be=n("a"),yt=n("span"),w(oo.$$.fragment),xn=f(),vt=n("span"),Fn=i("YosoModel"),ps=f(),S=n("div"),w(to.$$.fragment),zn=f(),so=n("p"),Cn=i(`The bare YOSO Model transformer outputting raw hidden-states without any specific head on top.
This model is a PyTorch `),no=n("a"),jn=i("torch.nn.Module"),On=i(` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),An=f(),C=n("div"),w(ao.$$.fragment),En=f(),ee=n("p"),Sn=i("The "),No=n("a"),Pn=i("YosoModel"),Ln=i(" forward method, overrides the "),$t=n("code"),Nn=i("__call__"),In=i(" special method."),Dn=f(),w(ke.$$.fragment),Wn=f(),w(we.$$.fragment),hs=f(),oe=n("h2"),ye=n("a"),Tt=n("span"),w(ro.$$.fragment),Hn=f(),Yt=n("span"),Bn=i("YosoForMaskedLM"),ms=f(),P=n("div"),w(io.$$.fragment),Qn=f(),te=n("p"),Un=i("YOSO Model with a "),Mt=n("code"),Rn=i("language modeling"),Vn=i(` head on top.
This model is a PyTorch `),lo=n("a"),Gn=i("torch.nn.Module"),Kn=i(` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),Jn=f(),j=n("div"),w(co.$$.fragment),Zn=f(),se=n("p"),Xn=i("The "),Io=n("a"),ea=i("YosoForMaskedLM"),oa=i(" forward method, overrides the "),qt=n("code"),ta=i("__call__"),sa=i(" special method."),na=f(),w(ve.$$.fragment),aa=f(),w($e.$$.fragment),us=f(),ne=n("h2"),Te=n("a"),xt=n("span"),w(po.$$.fragment),ra=f(),Ft=n("span"),ia=i("YosoForSequenceClassification"),fs=f(),L=n("div"),w(ho.$$.fragment),la=f(),mo=n("p"),da=i(`YOSO Model transformer with a sequence classification/regression head on top (a linear layer on top of
the pooled output) e.g. for GLUE tasks.
This model is a PyTorch `),uo=n("a"),ca=i("torch.nn.Module"),pa=i(` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),ha=f(),x=n("div"),w(fo.$$.fragment),ma=f(),ae=n("p"),ua=i("The "),Do=n("a"),fa=i("YosoForSequenceClassification"),ga=i(" forward method, overrides the "),zt=n("code"),_a=i("__call__"),ba=i(" special method."),ka=f(),w(Ye.$$.fragment),wa=f(),w(Me.$$.fragment),ya=f(),w(qe.$$.fragment),gs=f(),re=n("h2"),xe=n("a"),Ct=n("span"),w(go.$$.fragment),va=f(),jt=n("span"),$a=i("YosoForMultipleChoice"),_s=f(),N=n("div"),w(_o.$$.fragment),Ta=f(),bo=n("p"),Ya=i(`YOSO 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.
This model is a PyTorch `),ko=n("a"),Ma=i("torch.nn.Module"),qa=i(` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),xa=f(),O=n("div"),w(wo.$$.fragment),Fa=f(),ie=n("p"),za=i("The "),Wo=n("a"),Ca=i("YosoForMultipleChoice"),ja=i(" forward method, overrides the "),Ot=n("code"),Oa=i("__call__"),Aa=i(" special method."),Ea=f(),w(Fe.$$.fragment),Sa=f(),w(ze.$$.fragment),bs=f(),le=n("h2"),Ce=n("a"),At=n("span"),w(yo.$$.fragment),Pa=f(),Et=n("span"),La=i("YosoForTokenClassification"),ks=f(),I=n("div"),w(vo.$$.fragment),Na=f(),$o=n("p"),Ia=i(`YOSO 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.
This model is a PyTorch `),To=n("a"),Da=i("torch.nn.Module"),Wa=i(` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),Ha=f(),A=n("div"),w(Yo.$$.fragment),Ba=f(),de=n("p"),Qa=i("The "),Ho=n("a"),Ua=i("YosoForTokenClassification"),Ra=i(" forward method, overrides the "),St=n("code"),Va=i("__call__"),Ga=i(" special method."),Ka=f(),w(je.$$.fragment),Ja=f(),w(Oe.$$.fragment),ws=f(),ce=n("h2"),Ae=n("a"),Pt=n("span"),w(Mo.$$.fragment),Za=f(),Lt=n("span"),Xa=i("YosoForQuestionAnswering"),ys=f(),D=n("div"),w(qo.$$.fragment),er=f(),W=n("p"),or=i(`YOSO 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 `),Nt=n("code"),tr=i("span start logits"),sr=i(" and "),It=n("code"),nr=i("span end logits"),ar=i(`).
This model is a PyTorch `),xo=n("a"),rr=i("torch.nn.Module"),ir=i(` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),lr=f(),E=n("div"),w(Fo.$$.fragment),dr=f(),pe=n("p"),cr=i("The "),Bo=n("a"),pr=i("YosoForQuestionAnswering"),hr=i(" forward method, overrides the "),Dt=n("code"),mr=i("__call__"),ur=i(" special method."),fr=f(),w(Ee.$$.fragment),gr=f(),w(Se.$$.fragment),this.h()},l(o){const u=yi('[data-svelte="svelte-1phssyn"]',document.head);d=a(u,"META",{name:!0,content:!0}),u.forEach(t),k=g(o),h=a(o,"H1",{class:!0});var zo=r(h);p=a(zo,"A",{id:!0,class:!0,href:!0});var Wt=r(p);b=a(Wt,"SPAN",{});var Ht=r(b);y(s.$$.fragment,Ht),Ht.forEach(t),Wt.forEach(t),c=g(zo),q=a(zo,"SPAN",{});var Bt=r(q);Es=l(Bt,"YOSO"),Bt.forEach(t),zo.forEach(t),Xt=g(o),U=a(o,"H2",{class:!0});var Co=r(U);me=a(Co,"A",{id:!0,class:!0,href:!0});var Qt=r(me);pt=a(Qt,"SPAN",{});var Ut=r(pt);y(Ve.$$.fragment,Ut),Ut.forEach(t),Qt.forEach(t),Ss=g(Co),ht=a(Co,"SPAN",{});var Rt=r(ht);Ps=l(Rt,"Overview"),Rt.forEach(t),Co.forEach(t),es=g(o),R=a(o,"P",{});var Pe=r(R);Ls=l(Pe,"The YOSO model was proposed in "),Ge=a(Pe,"A",{href:!0,rel:!0});var Vt=r(Ge);Ns=l(Vt,"You Only Sample (Almost) Once: Linear Cost Self-Attention Via Bernoulli Sampling"),Vt.forEach(t),Is=a(Pe,"BR",{}),Ds=l(Pe,`
by Zhanpeng Zeng, Yunyang Xiong, Sathya N. Ravi, Shailesh Acharya, Glenn Fung, Vikas Singh. YOSO approximates standard softmax self-attention
via a Bernoulli sampling scheme based on Locality Sensitive Hashing (LSH). In principle, all the Bernoulli random variables can be sampled with
a single hash.`),Pe.forEach(t),os=g(o),jo=a(o,"P",{});var Gt=r(jo);Ws=l(Gt,"The abstract from the paper is the following:"),Gt.forEach(t),ts=g(o),Oo=a(o,"P",{});var Kt=r(Oo);mt=a(Kt,"EM",{});var Jt=r(mt);Hs=l(Jt,`Transformer-based models are widely used in natural language processing (NLP). Central to the transformer model is
the self-attention mechanism, which captures the interactions of token pairs in the input sequences and depends quadratically
on the sequence length. Training such models on longer sequences is expensive. In this paper, we show that a Bernoulli sampling
attention mechanism based on Locality Sensitive Hashing (LSH), decreases the quadratic complexity of such models to linear.
We bypass the quadratic cost by considering self-attention as a sum of individual tokens associated with Bernoulli random
variables that can, in principle, be sampled at once by a single hash (although in practice, this number may be a small constant).
This leads to an efficient sampling scheme to estimate self-attention which relies on specific modifications of
LSH (to enable deployment on GPU architectures). We evaluate our algorithm on the GLUE benchmark with standard 512 sequence
length where we see favorable performance relative to a standard pretrained Transformer. On the Long Range Arena (LRA) benchmark,
for evaluating performance on long sequences, our method achieves results consistent with softmax self-attention but with sizable
speed-ups and memory savings and often outperforms other efficient self-attention methods. Our code is available at this https URL`),Jt.forEach(t),Kt.forEach(t),ss=g(o),Ao=a(o,"P",{});var Zt=r(Ao);Bs=l(Zt,"Tips:"),Zt.forEach(t),ns=g(o),H=a(o,"UL",{});var Qo=r(H);ut=a(Qo,"LI",{});var br=r(ut);Qs=l(br,`The YOSO attention algorithm is implemented through custom CUDA kernels, functions written in CUDA C++ that can be executed multiple times
in parallel on a GPU.`),br.forEach(t),Us=g(Qo),V=a(Qo,"LI",{});var Uo=r(V);Rs=l(Uo,"The kernels provide a "),ft=a(Uo,"CODE",{});var kr=r(ft);Vs=l(kr,"fast_hash"),kr.forEach(t),Gs=l(Uo,` function, which approximates the random projections of the queries and keys using the Fast Hadamard Transform. Using these
hash codes, the `),gt=a(Uo,"CODE",{});var wr=r(gt);Ks=l(wr,"lsh_cumulation"),wr.forEach(t),Js=l(Uo," function approximates self-attention via LSH-based Bernoulli sampling."),Uo.forEach(t),Zs=g(Qo),G=a(Qo,"LI",{});var Ro=r(G);Xs=l(Ro,"To use the custom kernels, the user should set "),_t=a(Ro,"CODE",{});var yr=r(_t);en=l(yr,"config.use_expectation = False"),yr.forEach(t),on=l(Ro,`. To ensure that the kernels are compiled successfully,
the user must install the correct version of PyTorch and cudatoolkit. By default, `),bt=a(Ro,"CODE",{});var vr=r(bt);tn=l(vr,"config.use_expectation = True"),vr.forEach(t),sn=l(Ro,`, which uses YOSO-E and
does not require compiling CUDA kernels.`),Ro.forEach(t),Qo.forEach(t),as=g(o),ue=a(o,"IMG",{src:!0,alt:!0,width:!0}),rs=g(o),fe=a(o,"SMALL",{});var $s=r(fe);nn=l($s,"YOSO Attention Algorithm. Taken from the "),Eo=a($s,"A",{href:!0});var $r=r(Eo);an=l($r,"original paper"),$r.forEach(t),rn=l($s,"."),$s.forEach(t),is=g(o),B=a(o,"P",{});var Vo=r(B);ln=l(Vo,"This model was contributed by "),Ke=a(Vo,"A",{href:!0,rel:!0});var Tr=r(Ke);dn=l(Tr,"novice03"),Tr.forEach(t),cn=l(Vo,". The original code can be found "),Je=a(Vo,"A",{href:!0,rel:!0});var Yr=r(Je);pn=l(Yr,"here"),Yr.forEach(t),hn=l(Vo,"."),Vo.forEach(t),ls=g(o),K=a(o,"H2",{class:!0});var Ts=r(K);ge=a(Ts,"A",{id:!0,class:!0,href:!0});var Mr=r(ge);kt=a(Mr,"SPAN",{});var qr=r(kt);y(Ze.$$.fragment,qr),qr.forEach(t),Mr.forEach(t),mn=g(Ts),wt=a(Ts,"SPAN",{});var xr=r(wt);un=l(xr,"YosoConfig"),xr.forEach(t),Ts.forEach(t),ds=g(o),F=a(o,"DIV",{class:!0});var Le=r(F);y(Xe.$$.fragment,Le),fn=g(Le),J=a(Le,"P",{});var Go=r(J);gn=l(Go,"This is the configuration class to store the configuration of a "),So=a(Go,"A",{href:!0});var Fr=r(So);_n=l(Fr,"YosoModel"),Fr.forEach(t),bn=l(Go,`. It is used to instantiate an YOSO
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 YOSO
`),eo=a(Go,"A",{href:!0,rel:!0});var zr=r(eo);kn=l(zr,"uw-madison/yoso-4096"),zr.forEach(t),wn=l(Go," architecture."),Go.forEach(t),yn=g(Le),Z=a(Le,"P",{});var Ko=r(Z);vn=l(Ko,"Configuration objects inherit from "),Po=a(Ko,"A",{href:!0});var Cr=r(Po);$n=l(Cr,"PretrainedConfig"),Cr.forEach(t),Tn=l(Ko,` and can be used to control the model outputs. Read the
documentation from `),Lo=a(Ko,"A",{href:!0});var jr=r(Lo);Yn=l(jr,"PretrainedConfig"),jr.forEach(t),Mn=l(Ko," for more information."),Ko.forEach(t),qn=g(Le),y(_e.$$.fragment,Le),Le.forEach(t),cs=g(o),X=a(o,"H2",{class:!0});var Ys=r(X);be=a(Ys,"A",{id:!0,class:!0,href:!0});var Or=r(be);yt=a(Or,"SPAN",{});var Ar=r(yt);y(oo.$$.fragment,Ar),Ar.forEach(t),Or.forEach(t),xn=g(Ys),vt=a(Ys,"SPAN",{});var Er=r(vt);Fn=l(Er,"YosoModel"),Er.forEach(t),Ys.forEach(t),ps=g(o),S=a(o,"DIV",{class:!0});var Jo=r(S);y(to.$$.fragment,Jo),zn=g(Jo),so=a(Jo,"P",{});var Ms=r(so);Cn=l(Ms,`The bare YOSO Model transformer outputting raw hidden-states without any specific head on top.
This model is a PyTorch `),no=a(Ms,"A",{href:!0,rel:!0});var Sr=r(no);jn=l(Sr,"torch.nn.Module"),Sr.forEach(t),On=l(Ms,` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),Ms.forEach(t),An=g(Jo),C=a(Jo,"DIV",{class:!0});var Ne=r(C);y(ao.$$.fragment,Ne),En=g(Ne),ee=a(Ne,"P",{});var Zo=r(ee);Sn=l(Zo,"The "),No=a(Zo,"A",{href:!0});var Pr=r(No);Pn=l(Pr,"YosoModel"),Pr.forEach(t),Ln=l(Zo," forward method, overrides the "),$t=a(Zo,"CODE",{});var Lr=r($t);Nn=l(Lr,"__call__"),Lr.forEach(t),In=l(Zo," special method."),Zo.forEach(t),Dn=g(Ne),y(ke.$$.fragment,Ne),Wn=g(Ne),y(we.$$.fragment,Ne),Ne.forEach(t),Jo.forEach(t),hs=g(o),oe=a(o,"H2",{class:!0});var qs=r(oe);ye=a(qs,"A",{id:!0,class:!0,href:!0});var Nr=r(ye);Tt=a(Nr,"SPAN",{});var Ir=r(Tt);y(ro.$$.fragment,Ir),Ir.forEach(t),Nr.forEach(t),Hn=g(qs),Yt=a(qs,"SPAN",{});var Dr=r(Yt);Bn=l(Dr,"YosoForMaskedLM"),Dr.forEach(t),qs.forEach(t),ms=g(o),P=a(o,"DIV",{class:!0});var Xo=r(P);y(io.$$.fragment,Xo),Qn=g(Xo),te=a(Xo,"P",{});var et=r(te);Un=l(et,"YOSO Model with a "),Mt=a(et,"CODE",{});var Wr=r(Mt);Rn=l(Wr,"language modeling"),Wr.forEach(t),Vn=l(et,` head on top.
This model is a PyTorch `),lo=a(et,"A",{href:!0,rel:!0});var Hr=r(lo);Gn=l(Hr,"torch.nn.Module"),Hr.forEach(t),Kn=l(et,` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),et.forEach(t),Jn=g(Xo),j=a(Xo,"DIV",{class:!0});var Ie=r(j);y(co.$$.fragment,Ie),Zn=g(Ie),se=a(Ie,"P",{});var ot=r(se);Xn=l(ot,"The "),Io=a(ot,"A",{href:!0});var Br=r(Io);ea=l(Br,"YosoForMaskedLM"),Br.forEach(t),oa=l(ot," forward method, overrides the "),qt=a(ot,"CODE",{});var Qr=r(qt);ta=l(Qr,"__call__"),Qr.forEach(t),sa=l(ot," special method."),ot.forEach(t),na=g(Ie),y(ve.$$.fragment,Ie),aa=g(Ie),y($e.$$.fragment,Ie),Ie.forEach(t),Xo.forEach(t),us=g(o),ne=a(o,"H2",{class:!0});var xs=r(ne);Te=a(xs,"A",{id:!0,class:!0,href:!0});var Ur=r(Te);xt=a(Ur,"SPAN",{});var Rr=r(xt);y(po.$$.fragment,Rr),Rr.forEach(t),Ur.forEach(t),ra=g(xs),Ft=a(xs,"SPAN",{});var Vr=r(Ft);ia=l(Vr,"YosoForSequenceClassification"),Vr.forEach(t),xs.forEach(t),fs=g(o),L=a(o,"DIV",{class:!0});var tt=r(L);y(ho.$$.fragment,tt),la=g(tt),mo=a(tt,"P",{});var Fs=r(mo);da=l(Fs,`YOSO Model transformer with a sequence classification/regression head on top (a linear layer on top of
the pooled output) e.g. for GLUE tasks.
This model is a PyTorch `),uo=a(Fs,"A",{href:!0,rel:!0});var Gr=r(uo);ca=l(Gr,"torch.nn.Module"),Gr.forEach(t),pa=l(Fs,` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),Fs.forEach(t),ha=g(tt),x=a(tt,"DIV",{class:!0});var Q=r(x);y(fo.$$.fragment,Q),ma=g(Q),ae=a(Q,"P",{});var st=r(ae);ua=l(st,"The "),Do=a(st,"A",{href:!0});var Kr=r(Do);fa=l(Kr,"YosoForSequenceClassification"),Kr.forEach(t),ga=l(st," forward method, overrides the "),zt=a(st,"CODE",{});var Jr=r(zt);_a=l(Jr,"__call__"),Jr.forEach(t),ba=l(st," special method."),st.forEach(t),ka=g(Q),y(Ye.$$.fragment,Q),wa=g(Q),y(Me.$$.fragment,Q),ya=g(Q),y(qe.$$.fragment,Q),Q.forEach(t),tt.forEach(t),gs=g(o),re=a(o,"H2",{class:!0});var zs=r(re);xe=a(zs,"A",{id:!0,class:!0,href:!0});var Zr=r(xe);Ct=a(Zr,"SPAN",{});var Xr=r(Ct);y(go.$$.fragment,Xr),Xr.forEach(t),Zr.forEach(t),va=g(zs),jt=a(zs,"SPAN",{});var ei=r(jt);$a=l(ei,"YosoForMultipleChoice"),ei.forEach(t),zs.forEach(t),_s=g(o),N=a(o,"DIV",{class:!0});var nt=r(N);y(_o.$$.fragment,nt),Ta=g(nt),bo=a(nt,"P",{});var Cs=r(bo);Ya=l(Cs,`YOSO 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.
This model is a PyTorch `),ko=a(Cs,"A",{href:!0,rel:!0});var oi=r(ko);Ma=l(oi,"torch.nn.Module"),oi.forEach(t),qa=l(Cs,` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),Cs.forEach(t),xa=g(nt),O=a(nt,"DIV",{class:!0});var De=r(O);y(wo.$$.fragment,De),Fa=g(De),ie=a(De,"P",{});var at=r(ie);za=l(at,"The "),Wo=a(at,"A",{href:!0});var ti=r(Wo);Ca=l(ti,"YosoForMultipleChoice"),ti.forEach(t),ja=l(at," forward method, overrides the "),Ot=a(at,"CODE",{});var si=r(Ot);Oa=l(si,"__call__"),si.forEach(t),Aa=l(at," special method."),at.forEach(t),Ea=g(De),y(Fe.$$.fragment,De),Sa=g(De),y(ze.$$.fragment,De),De.forEach(t),nt.forEach(t),bs=g(o),le=a(o,"H2",{class:!0});var js=r(le);Ce=a(js,"A",{id:!0,class:!0,href:!0});var ni=r(Ce);At=a(ni,"SPAN",{});var ai=r(At);y(yo.$$.fragment,ai),ai.forEach(t),ni.forEach(t),Pa=g(js),Et=a(js,"SPAN",{});var ri=r(Et);La=l(ri,"YosoForTokenClassification"),ri.forEach(t),js.forEach(t),ks=g(o),I=a(o,"DIV",{class:!0});var rt=r(I);y(vo.$$.fragment,rt),Na=g(rt),$o=a(rt,"P",{});var Os=r($o);Ia=l(Os,`YOSO 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.
This model is a PyTorch `),To=a(Os,"A",{href:!0,rel:!0});var ii=r(To);Da=l(ii,"torch.nn.Module"),ii.forEach(t),Wa=l(Os,` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),Os.forEach(t),Ha=g(rt),A=a(rt,"DIV",{class:!0});var We=r(A);y(Yo.$$.fragment,We),Ba=g(We),de=a(We,"P",{});var it=r(de);Qa=l(it,"The "),Ho=a(it,"A",{href:!0});var li=r(Ho);Ua=l(li,"YosoForTokenClassification"),li.forEach(t),Ra=l(it," forward method, overrides the "),St=a(it,"CODE",{});var di=r(St);Va=l(di,"__call__"),di.forEach(t),Ga=l(it," special method."),it.forEach(t),Ka=g(We),y(je.$$.fragment,We),Ja=g(We),y(Oe.$$.fragment,We),We.forEach(t),rt.forEach(t),ws=g(o),ce=a(o,"H2",{class:!0});var As=r(ce);Ae=a(As,"A",{id:!0,class:!0,href:!0});var ci=r(Ae);Pt=a(ci,"SPAN",{});var pi=r(Pt);y(Mo.$$.fragment,pi),pi.forEach(t),ci.forEach(t),Za=g(As),Lt=a(As,"SPAN",{});var hi=r(Lt);Xa=l(hi,"YosoForQuestionAnswering"),hi.forEach(t),As.forEach(t),ys=g(o),D=a(o,"DIV",{class:!0});var lt=r(D);y(qo.$$.fragment,lt),er=g(lt),W=a(lt,"P",{});var He=r(W);or=l(He,`YOSO 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 `),Nt=a(He,"CODE",{});var mi=r(Nt);tr=l(mi,"span start logits"),mi.forEach(t),sr=l(He," and "),It=a(He,"CODE",{});var ui=r(It);nr=l(ui,"span end logits"),ui.forEach(t),ar=l(He,`).
This model is a PyTorch `),xo=a(He,"A",{href:!0,rel:!0});var fi=r(xo);rr=l(fi,"torch.nn.Module"),fi.forEach(t),ir=l(He,` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),He.forEach(t),lr=g(lt),E=a(lt,"DIV",{class:!0});var Be=r(E);y(Fo.$$.fragment,Be),dr=g(Be),pe=a(Be,"P",{});var dt=r(pe);cr=l(dt,"The "),Bo=a(dt,"A",{href:!0});var gi=r(Bo);pr=l(gi,"YosoForQuestionAnswering"),gi.forEach(t),hr=l(dt," forward method, overrides the "),Dt=a(dt,"CODE",{});var _i=r(Dt);mr=l(_i,"__call__"),_i.forEach(t),ur=l(dt," special method."),dt.forEach(t),fr=g(Be),y(Ee.$$.fragment,Be),gr=g(Be),y(Se.$$.fragment,Be),Be.forEach(t),lt.forEach(t),this.h()},h(){m(d,"name","hf:doc:metadata"),m(d,"content",JSON.stringify(Ni)),m(p,"id","yoso"),m(p,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),m(p,"href","#yoso"),m(h,"class","relative group"),m(me,"id","overview"),m(me,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),m(me,"href","#overview"),m(U,"class","relative group"),m(Ge,"href","https://arxiv.org/abs/2111.09714"),m(Ge,"rel","nofollow"),vi(ue.src,_r="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/yoso_architecture.jpg")||m(ue,"src",_r),m(ue,"alt","drawing"),m(ue,"width","600"),m(Eo,"href","https://arxiv.org/abs/2111.09714"),m(Ke,"href","https://huggingface.co/novice03"),m(Ke,"rel","nofollow"),m(Je,"href","https://github.com/mlpen/YOSO"),m(Je,"rel","nofollow"),m(ge,"id","transformers.YosoConfig"),m(ge,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),m(ge,"href","#transformers.YosoConfig"),m(K,"class","relative group"),m(So,"href","/docs/transformers/main/en/model_doc/yoso#transformers.YosoModel"),m(eo,"href","https://huggingface.co/uw-madison/yoso-4096"),m(eo,"rel","nofollow"),m(Po,"href","/docs/transformers/main/en/main_classes/configuration#transformers.PretrainedConfig"),m(Lo,"href","/docs/transformers/main/en/main_classes/configuration#transformers.PretrainedConfig"),m(F,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(be,"id","transformers.YosoModel"),m(be,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),m(be,"href","#transformers.YosoModel"),m(X,"class","relative group"),m(no,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),m(no,"rel","nofollow"),m(No,"href","/docs/transformers/main/en/model_doc/yoso#transformers.YosoModel"),m(C,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(S,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(ye,"id","transformers.YosoForMaskedLM"),m(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"),m(ye,"href","#transformers.YosoForMaskedLM"),m(oe,"class","relative group"),m(lo,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),m(lo,"rel","nofollow"),m(Io,"href","/docs/transformers/main/en/model_doc/yoso#transformers.YosoForMaskedLM"),m(j,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(P,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(Te,"id","transformers.YosoForSequenceClassification"),m(Te,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),m(Te,"href","#transformers.YosoForSequenceClassification"),m(ne,"class","relative group"),m(uo,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),m(uo,"rel","nofollow"),m(Do,"href","/docs/transformers/main/en/model_doc/yoso#transformers.YosoForSequenceClassification"),m(x,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(L,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(xe,"id","transformers.YosoForMultipleChoice"),m(xe,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),m(xe,"href","#transformers.YosoForMultipleChoice"),m(re,"class","relative group"),m(ko,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),m(ko,"rel","nofollow"),m(Wo,"href","/docs/transformers/main/en/model_doc/yoso#transformers.YosoForMultipleChoice"),m(O,"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,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(Ce,"id","transformers.YosoForTokenClassification"),m(Ce,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),m(Ce,"href","#transformers.YosoForTokenClassification"),m(le,"class","relative group"),m(To,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),m(To,"rel","nofollow"),m(Ho,"href","/docs/transformers/main/en/model_doc/yoso#transformers.YosoForTokenClassification"),m(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(I,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(Ae,"id","transformers.YosoForQuestionAnswering"),m(Ae,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),m(Ae,"href","#transformers.YosoForQuestionAnswering"),m(ce,"class","relative group"),m(xo,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),m(xo,"rel","nofollow"),m(Bo,"href","/docs/transformers/main/en/model_doc/yoso#transformers.YosoForQuestionAnswering"),m(E,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(D,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(o,u){e(document.head,d),_(o,k,u),_(o,h,u),e(h,p),e(p,b),v(s,b,null),e(h,c),e(h,q),e(q,Es),_(o,Xt,u),_(o,U,u),e(U,me),e(me,pt),v(Ve,pt,null),e(U,Ss),e(U,ht),e(ht,Ps),_(o,es,u),_(o,R,u),e(R,Ls),e(R,Ge),e(Ge,Ns),e(R,Is),e(R,Ds),_(o,os,u),_(o,jo,u),e(jo,Ws),_(o,ts,u),_(o,Oo,u),e(Oo,mt),e(mt,Hs),_(o,ss,u),_(o,Ao,u),e(Ao,Bs),_(o,ns,u),_(o,H,u),e(H,ut),e(ut,Qs),e(H,Us),e(H,V),e(V,Rs),e(V,ft),e(ft,Vs),e(V,Gs),e(V,gt),e(gt,Ks),e(V,Js),e(H,Zs),e(H,G),e(G,Xs),e(G,_t),e(_t,en),e(G,on),e(G,bt),e(bt,tn),e(G,sn),_(o,as,u),_(o,ue,u),_(o,rs,u),_(o,fe,u),e(fe,nn),e(fe,Eo),e(Eo,an),e(fe,rn),_(o,is,u),_(o,B,u),e(B,ln),e(B,Ke),e(Ke,dn),e(B,cn),e(B,Je),e(Je,pn),e(B,hn),_(o,ls,u),_(o,K,u),e(K,ge),e(ge,kt),v(Ze,kt,null),e(K,mn),e(K,wt),e(wt,un),_(o,ds,u),_(o,F,u),v(Xe,F,null),e(F,fn),e(F,J),e(J,gn),e(J,So),e(So,_n),e(J,bn),e(J,eo),e(eo,kn),e(J,wn),e(F,yn),e(F,Z),e(Z,vn),e(Z,Po),e(Po,$n),e(Z,Tn),e(Z,Lo),e(Lo,Yn),e(Z,Mn),e(F,qn),v(_e,F,null),_(o,cs,u),_(o,X,u),e(X,be),e(be,yt),v(oo,yt,null),e(X,xn),e(X,vt),e(vt,Fn),_(o,ps,u),_(o,S,u),v(to,S,null),e(S,zn),e(S,so),e(so,Cn),e(so,no),e(no,jn),e(so,On),e(S,An),e(S,C),v(ao,C,null),e(C,En),e(C,ee),e(ee,Sn),e(ee,No),e(No,Pn),e(ee,Ln),e(ee,$t),e($t,Nn),e(ee,In),e(C,Dn),v(ke,C,null),e(C,Wn),v(we,C,null),_(o,hs,u),_(o,oe,u),e(oe,ye),e(ye,Tt),v(ro,Tt,null),e(oe,Hn),e(oe,Yt),e(Yt,Bn),_(o,ms,u),_(o,P,u),v(io,P,null),e(P,Qn),e(P,te),e(te,Un),e(te,Mt),e(Mt,Rn),e(te,Vn),e(te,lo),e(lo,Gn),e(te,Kn),e(P,Jn),e(P,j),v(co,j,null),e(j,Zn),e(j,se),e(se,Xn),e(se,Io),e(Io,ea),e(se,oa),e(se,qt),e(qt,ta),e(se,sa),e(j,na),v(ve,j,null),e(j,aa),v($e,j,null),_(o,us,u),_(o,ne,u),e(ne,Te),e(Te,xt),v(po,xt,null),e(ne,ra),e(ne,Ft),e(Ft,ia),_(o,fs,u),_(o,L,u),v(ho,L,null),e(L,la),e(L,mo),e(mo,da),e(mo,uo),e(uo,ca),e(mo,pa),e(L,ha),e(L,x),v(fo,x,null),e(x,ma),e(x,ae),e(ae,ua),e(ae,Do),e(Do,fa),e(ae,ga),e(ae,zt),e(zt,_a),e(ae,ba),e(x,ka),v(Ye,x,null),e(x,wa),v(Me,x,null),e(x,ya),v(qe,x,null),_(o,gs,u),_(o,re,u),e(re,xe),e(xe,Ct),v(go,Ct,null),e(re,va),e(re,jt),e(jt,$a),_(o,_s,u),_(o,N,u),v(_o,N,null),e(N,Ta),e(N,bo),e(bo,Ya),e(bo,ko),e(ko,Ma),e(bo,qa),e(N,xa),e(N,O),v(wo,O,null),e(O,Fa),e(O,ie),e(ie,za),e(ie,Wo),e(Wo,Ca),e(ie,ja),e(ie,Ot),e(Ot,Oa),e(ie,Aa),e(O,Ea),v(Fe,O,null),e(O,Sa),v(ze,O,null),_(o,bs,u),_(o,le,u),e(le,Ce),e(Ce,At),v(yo,At,null),e(le,Pa),e(le,Et),e(Et,La),_(o,ks,u),_(o,I,u),v(vo,I,null),e(I,Na),e(I,$o),e($o,Ia),e($o,To),e(To,Da),e($o,Wa),e(I,Ha),e(I,A),v(Yo,A,null),e(A,Ba),e(A,de),e(de,Qa),e(de,Ho),e(Ho,Ua),e(de,Ra),e(de,St),e(St,Va),e(de,Ga),e(A,Ka),v(je,A,null),e(A,Ja),v(Oe,A,null),_(o,ws,u),_(o,ce,u),e(ce,Ae),e(Ae,Pt),v(Mo,Pt,null),e(ce,Za),e(ce,Lt),e(Lt,Xa),_(o,ys,u),_(o,D,u),v(qo,D,null),e(D,er),e(D,W),e(W,or),e(W,Nt),e(Nt,tr),e(W,sr),e(W,It),e(It,nr),e(W,ar),e(W,xo),e(xo,rr),e(W,ir),e(D,lr),e(D,E),v(Fo,E,null),e(E,dr),e(E,pe),e(pe,cr),e(pe,Bo),e(Bo,pr),e(pe,hr),e(pe,Dt),e(Dt,mr),e(pe,ur),e(E,fr),v(Ee,E,null),e(E,gr),v(Se,E,null),vs=!0},p(o,[u]){const zo={};u&2&&(zo.$$scope={dirty:u,ctx:o}),_e.$set(zo);const Wt={};u&2&&(Wt.$$scope={dirty:u,ctx:o}),ke.$set(Wt);const Ht={};u&2&&(Ht.$$scope={dirty:u,ctx:o}),we.$set(Ht);const Bt={};u&2&&(Bt.$$scope={dirty:u,ctx:o}),ve.$set(Bt);const Co={};u&2&&(Co.$$scope={dirty:u,ctx:o}),$e.$set(Co);const Qt={};u&2&&(Qt.$$scope={dirty:u,ctx:o}),Ye.$set(Qt);const Ut={};u&2&&(Ut.$$scope={dirty:u,ctx:o}),Me.$set(Ut);const Rt={};u&2&&(Rt.$$scope={dirty:u,ctx:o}),qe.$set(Rt);const Pe={};u&2&&(Pe.$$scope={dirty:u,ctx:o}),Fe.$set(Pe);const Vt={};u&2&&(Vt.$$scope={dirty:u,ctx:o}),ze.$set(Vt);const Gt={};u&2&&(Gt.$$scope={dirty:u,ctx:o}),je.$set(Gt);const Kt={};u&2&&(Kt.$$scope={dirty:u,ctx:o}),Oe.$set(Kt);const Jt={};u&2&&(Jt.$$scope={dirty:u,ctx:o}),Ee.$set(Jt);const Zt={};u&2&&(Zt.$$scope={dirty:u,ctx:o}),Se.$set(Zt)},i(o){vs||($(s.$$.fragment,o),$(Ve.$$.fragment,o),$(Ze.$$.fragment,o),$(Xe.$$.fragment,o),$(_e.$$.fragment,o),$(oo.$$.fragment,o),$(to.$$.fragment,o),$(ao.$$.fragment,o),$(ke.$$.fragment,o),$(we.$$.fragment,o),$(ro.$$.fragment,o),$(io.$$.fragment,o),$(co.$$.fragment,o),$(ve.$$.fragment,o),$($e.$$.fragment,o),$(po.$$.fragment,o),$(ho.$$.fragment,o),$(fo.$$.fragment,o),$(Ye.$$.fragment,o),$(Me.$$.fragment,o),$(qe.$$.fragment,o),$(go.$$.fragment,o),$(_o.$$.fragment,o),$(wo.$$.fragment,o),$(Fe.$$.fragment,o),$(ze.$$.fragment,o),$(yo.$$.fragment,o),$(vo.$$.fragment,o),$(Yo.$$.fragment,o),$(je.$$.fragment,o),$(Oe.$$.fragment,o),$(Mo.$$.fragment,o),$(qo.$$.fragment,o),$(Fo.$$.fragment,o),$(Ee.$$.fragment,o),$(Se.$$.fragment,o),vs=!0)},o(o){T(s.$$.fragment,o),T(Ve.$$.fragment,o),T(Ze.$$.fragment,o),T(Xe.$$.fragment,o),T(_e.$$.fragment,o),T(oo.$$.fragment,o),T(to.$$.fragment,o),T(ao.$$.fragment,o),T(ke.$$.fragment,o),T(we.$$.fragment,o),T(ro.$$.fragment,o),T(io.$$.fragment,o),T(co.$$.fragment,o),T(ve.$$.fragment,o),T($e.$$.fragment,o),T(po.$$.fragment,o),T(ho.$$.fragment,o),T(fo.$$.fragment,o),T(Ye.$$.fragment,o),T(Me.$$.fragment,o),T(qe.$$.fragment,o),T(go.$$.fragment,o),T(_o.$$.fragment,o),T(wo.$$.fragment,o),T(Fe.$$.fragment,o),T(ze.$$.fragment,o),T(yo.$$.fragment,o),T(vo.$$.fragment,o),T(Yo.$$.fragment,o),T(je.$$.fragment,o),T(Oe.$$.fragment,o),T(Mo.$$.fragment,o),T(qo.$$.fragment,o),T(Fo.$$.fragment,o),T(Ee.$$.fragment,o),T(Se.$$.fragment,o),vs=!1},d(o){t(d),o&&t(k),o&&t(h),Y(s),o&&t(Xt),o&&t(U),Y(Ve),o&&t(es),o&&t(R),o&&t(os),o&&t(jo),o&&t(ts),o&&t(Oo),o&&t(ss),o&&t(Ao),o&&t(ns),o&&t(H),o&&t(as),o&&t(ue),o&&t(rs),o&&t(fe),o&&t(is),o&&t(B),o&&t(ls),o&&t(K),Y(Ze),o&&t(ds),o&&t(F),Y(Xe),Y(_e),o&&t(cs),o&&t(X),Y(oo),o&&t(ps),o&&t(S),Y(to),Y(ao),Y(ke),Y(we),o&&t(hs),o&&t(oe),Y(ro),o&&t(ms),o&&t(P),Y(io),Y(co),Y(ve),Y($e),o&&t(us),o&&t(ne),Y(po),o&&t(fs),o&&t(L),Y(ho),Y(fo),Y(Ye),Y(Me),Y(qe),o&&t(gs),o&&t(re),Y(go),o&&t(_s),o&&t(N),Y(_o),Y(wo),Y(Fe),Y(ze),o&&t(bs),o&&t(le),Y(yo),o&&t(ks),o&&t(I),Y(vo),Y(Yo),Y(je),Y(Oe),o&&t(ws),o&&t(ce),Y(Mo),o&&t(ys),o&&t(D),Y(qo),Y(Fo),Y(Ee),Y(Se)}}}const Ni={local:"yoso",sections:[{local:"overview",title:"Overview"},{local:"transformers.YosoConfig",title:"YosoConfig"},{local:"transformers.YosoModel",title:"YosoModel"},{local:"transformers.YosoForMaskedLM",title:"YosoForMaskedLM"},{local:"transformers.YosoForSequenceClassification",title:"YosoForSequenceClassification"},{local:"transformers.YosoForMultipleChoice",title:"YosoForMultipleChoice"},{local:"transformers.YosoForTokenClassification",title:"YosoForTokenClassification"},{local:"transformers.YosoForQuestionAnswering",title:"YosoForQuestionAnswering"}],title:"YOSO"};function Ii(M){return $i(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Ri extends bi{constructor(d){super();ki(this,d,Ii,Li,wi,{})}}export{Ri as default,Ni as metadata};
