import{S as S2,i as O2,s as N2,e as a,k as c,w,t as n,M as W2,c as r,d as t,m as p,a as i,x as T,h as s,b as m,G as e,g,y,q as $,o as D,B as E,v as H2,L as Ne}from"../../chunks/vendor-hf-doc-builder.js";import{T as ot}from"../../chunks/Tip-hf-doc-builder.js";import{D as Q}from"../../chunks/Docstring-hf-doc-builder.js";import{C as We}from"../../chunks/CodeBlock-hf-doc-builder.js";import{I as Se}from"../../chunks/IconCopyLink-hf-doc-builder.js";import{E as Oe}from"../../chunks/ExampleCodeBlock-hf-doc-builder.js";function U2(x){let d,k,f,u,v;return u=new We({props:{code:`from transformers import DebertaV2Config, DebertaV2Model

# Initializing a DeBERTa-v2 microsoft/deberta-v2-xlarge style configuration
configuration = DebertaV2Config()

# Initializing a model (with random weights) from the microsoft/deberta-v2-xlarge style configuration
model = DebertaV2Model(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> DebertaV2Config, DebertaV2Model

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a DeBERTa-v2 microsoft/deberta-v2-xlarge style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = DebertaV2Config()

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a model (with random weights) from the microsoft/deberta-v2-xlarge style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = DebertaV2Model(configuration)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Accessing the model configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = model.config`}}),{c(){d=a("p"),k=n("Example:"),f=c(),w(u.$$.fragment)},l(l){d=r(l,"P",{});var h=i(d);k=s(h,"Example:"),h.forEach(t),f=p(l),T(u.$$.fragment,l)},m(l,h){g(l,d,h),e(d,k),g(l,f,h),y(u,l,h),v=!0},p:Ne,i(l){v||($(u.$$.fragment,l),v=!0)},o(l){D(u.$$.fragment,l),v=!1},d(l){l&&t(d),l&&t(f),E(u,l)}}}function K2(x){let d,k,f,u,v;return u=new We({props:{code:`0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1
| first sequence    | second sequence |`,highlighted:`0<span class="hljs-number"> 0 </span>0<span class="hljs-number"> 0 </span>0<span class="hljs-number"> 0 </span>0<span class="hljs-number"> 0 </span>0<span class="hljs-number"> 0 </span>0<span class="hljs-number"> 1 </span>1<span class="hljs-number"> 1 </span>1<span class="hljs-number"> 1 </span>1<span class="hljs-number"> 1 </span>1 1
| first sequence    | second sequence |`}}),{c(){d=a("p"),k=n("sequence pair mask has the following format:"),f=c(),w(u.$$.fragment)},l(l){d=r(l,"P",{});var h=i(d);k=s(h,"sequence pair mask has the following format:"),h.forEach(t),f=p(l),T(u.$$.fragment,l)},m(l,h){g(l,d,h),e(d,k),g(l,f,h),y(u,l,h),v=!0},p:Ne,i(l){v||($(u.$$.fragment,l),v=!0)},o(l){D(u.$$.fragment,l),v=!1},d(l){l&&t(d),l&&t(f),E(u,l)}}}function Q2(x){let d,k,f,u,v;return u=new We({props:{code:`0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1
| first sequence    | second sequence |`,highlighted:`0<span class="hljs-number"> 0 </span>0<span class="hljs-number"> 0 </span>0<span class="hljs-number"> 0 </span>0<span class="hljs-number"> 0 </span>0<span class="hljs-number"> 0 </span>0<span class="hljs-number"> 1 </span>1<span class="hljs-number"> 1 </span>1<span class="hljs-number"> 1 </span>1<span class="hljs-number"> 1 </span>1 1
| first sequence    | second sequence |`}}),{c(){d=a("p"),k=n("sequence pair mask has the following format:"),f=c(),w(u.$$.fragment)},l(l){d=r(l,"P",{});var h=i(d);k=s(h,"sequence pair mask has the following format:"),h.forEach(t),f=p(l),T(u.$$.fragment,l)},m(l,h){g(l,d,h),e(d,k),g(l,f,h),y(u,l,h),v=!0},p:Ne,i(l){v||($(u.$$.fragment,l),v=!0)},o(l){D(u.$$.fragment,l),v=!1},d(l){l&&t(d),l&&t(f),E(u,l)}}}function G2(x){let d,k,f,u,v;return{c(){d=a("p"),k=n("Although the recipe for forward pass needs to be defined within this function, one should call the "),f=a("code"),u=n("Module"),v=n(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){d=r(l,"P",{});var h=i(d);k=s(h,"Although the recipe for forward pass needs to be defined within this function, one should call the "),f=r(h,"CODE",{});var z=i(f);u=s(z,"Module"),z.forEach(t),v=s(h,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),h.forEach(t)},m(l,h){g(l,d,h),e(d,k),e(d,f),e(f,u),e(d,v)},d(l){l&&t(d)}}}function J2(x){let d,k,f,u,v;return u=new We({props:{code:`from transformers import AutoTokenizer, DebertaV2Model
import torch

tokenizer = AutoTokenizer.from_pretrained("microsoft/deberta-v2-xlarge")
model = DebertaV2Model.from_pretrained("microsoft/deberta-v2-xlarge")

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, DebertaV2Model
<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;microsoft/deberta-v2-xlarge&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = DebertaV2Model.from_pretrained(<span class="hljs-string">&quot;microsoft/deberta-v2-xlarge&quot;</span>)

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

<span class="hljs-meta">&gt;&gt;&gt; </span>last_hidden_states = outputs.last_hidden_state`}}),{c(){d=a("p"),k=n("Example:"),f=c(),w(u.$$.fragment)},l(l){d=r(l,"P",{});var h=i(d);k=s(h,"Example:"),h.forEach(t),f=p(l),T(u.$$.fragment,l)},m(l,h){g(l,d,h),e(d,k),g(l,f,h),y(u,l,h),v=!0},p:Ne,i(l){v||($(u.$$.fragment,l),v=!0)},o(l){D(u.$$.fragment,l),v=!1},d(l){l&&t(d),l&&t(f),E(u,l)}}}function X2(x){let d,k,f,u,v;return{c(){d=a("p"),k=n(`Although the recipe for forward pass needs to be defined within
this function, one should call the `),f=a("code"),u=n("Module"),v=n(` instance afterwards
instead of this since the former takes care of running the
registered hooks while the latter silently ignores them.`)},l(l){d=r(l,"P",{});var h=i(d);k=s(h,`Although the recipe for forward pass needs to be defined within
this function, one should call the `),f=r(h,"CODE",{});var z=i(f);u=s(z,"Module"),z.forEach(t),v=s(h,` instance afterwards
instead of this since the former takes care of running the
registered hooks while the latter silently ignores them.`),h.forEach(t)},m(l,h){g(l,d,h),e(d,k),e(d,f),e(f,u),e(d,v)},d(l){l&&t(d)}}}function Y2(x){let d,k,f,u,v;return{c(){d=a("p"),k=n("Although the recipe for forward pass needs to be defined within this function, one should call the "),f=a("code"),u=n("Module"),v=n(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){d=r(l,"P",{});var h=i(d);k=s(h,"Although the recipe for forward pass needs to be defined within this function, one should call the "),f=r(h,"CODE",{});var z=i(f);u=s(z,"Module"),z.forEach(t),v=s(h,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),h.forEach(t)},m(l,h){g(l,d,h),e(d,k),e(d,f),e(f,u),e(d,v)},d(l){l&&t(d)}}}function Z2(x){let d,k,f,u,v;return u=new We({props:{code:`from transformers import AutoTokenizer, DebertaV2ForMaskedLM
import torch

tokenizer = AutoTokenizer.from_pretrained("microsoft/deberta-v2-xlarge")
model = DebertaV2ForMaskedLM.from_pretrained("microsoft/deberta-v2-xlarge")

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, DebertaV2ForMaskedLM
<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;microsoft/deberta-v2-xlarge&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = DebertaV2ForMaskedLM.from_pretrained(<span class="hljs-string">&quot;microsoft/deberta-v2-xlarge&quot;</span>)

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

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

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

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

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

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

tokenizer = AutoTokenizer.from_pretrained("microsoft/deberta-v2-xlarge")
model = DebertaV2ForSequenceClassification.from_pretrained("microsoft/deberta-v2-xlarge")

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 = DebertaV2ForSequenceClassification.from_pretrained("microsoft/deberta-v2-xlarge", 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, DebertaV2ForSequenceClassification

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;microsoft/deberta-v2-xlarge&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = DebertaV2ForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;microsoft/deberta-v2-xlarge&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 = DebertaV2ForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;microsoft/deberta-v2-xlarge&quot;</span>, num_labels=num_labels)

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

tokenizer = AutoTokenizer.from_pretrained("microsoft/deberta-v2-xlarge")
model = DebertaV2ForSequenceClassification.from_pretrained("microsoft/deberta-v2-xlarge", 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 = DebertaV2ForSequenceClassification.from_pretrained(
    "microsoft/deberta-v2-xlarge", 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, DebertaV2ForSequenceClassification

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;microsoft/deberta-v2-xlarge&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = DebertaV2ForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;microsoft/deberta-v2-xlarge&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 = DebertaV2ForSequenceClassification.from_pretrained(
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;microsoft/deberta-v2-xlarge&quot;</span>, num_labels=num_labels, problem_type=<span class="hljs-string">&quot;multi_label_classification&quot;</span>
<span class="hljs-meta">... </span>)

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

tokenizer = AutoTokenizer.from_pretrained("microsoft/deberta-v2-xlarge")
model = DebertaV2ForTokenClassification.from_pretrained("microsoft/deberta-v2-xlarge")

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, DebertaV2ForTokenClassification
<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;microsoft/deberta-v2-xlarge&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = DebertaV2ForTokenClassification.from_pretrained(<span class="hljs-string">&quot;microsoft/deberta-v2-xlarge&quot;</span>)

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

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

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

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

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

tokenizer = AutoTokenizer.from_pretrained("microsoft/deberta-v2-xlarge")
model = DebertaV2ForQuestionAnswering.from_pretrained("microsoft/deberta-v2-xlarge")

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([2])
target_end_index = torch.tensor([9])

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, DebertaV2ForQuestionAnswering
<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;microsoft/deberta-v2-xlarge&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = DebertaV2ForQuestionAnswering.from_pretrained(<span class="hljs-string">&quot;microsoft/deberta-v2-xlarge&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">2</span>])
<span class="hljs-meta">&gt;&gt;&gt; </span>target_end_index = torch.tensor([<span class="hljs-number">9</span>])

<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs, start_positions=target_start_index, end_positions=target_end_index)
<span class="hljs-meta">&gt;&gt;&gt; </span>loss = outputs.loss`}}),{c(){d=a("p"),k=n("Example:"),f=c(),w(u.$$.fragment)},l(l){d=r(l,"P",{});var h=i(d);k=s(h,"Example:"),h.forEach(t),f=p(l),T(u.$$.fragment,l)},m(l,h){g(l,d,h),e(d,k),g(l,f,h),y(u,l,h),v=!0},p:Ne,i(l){v||($(u.$$.fragment,l),v=!0)},o(l){D(u.$$.fragment,l),v=!1},d(l){l&&t(d),l&&t(f),E(u,l)}}}function ik(x){let d,k,f,u,v;return{c(){d=a("p"),k=n("Although the recipe for forward pass needs to be defined within this function, one should call the "),f=a("code"),u=n("Module"),v=n(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){d=r(l,"P",{});var h=i(d);k=s(h,"Although the recipe for forward pass needs to be defined within this function, one should call the "),f=r(h,"CODE",{});var z=i(f);u=s(z,"Module"),z.forEach(t),v=s(h,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),h.forEach(t)},m(l,h){g(l,d,h),e(d,k),e(d,f),e(f,u),e(d,v)},d(l){l&&t(d)}}}function lk(x){let d,k,f,u,v;return u=new We({props:{code:`from transformers import AutoTokenizer, DebertaV2ForMultipleChoice
import torch

tokenizer = AutoTokenizer.from_pretrained("microsoft/deberta-v2-xlarge")
model = DebertaV2ForMultipleChoice.from_pretrained("microsoft/deberta-v2-xlarge")

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, DebertaV2ForMultipleChoice
<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;microsoft/deberta-v2-xlarge&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = DebertaV2ForMultipleChoice.from_pretrained(<span class="hljs-string">&quot;microsoft/deberta-v2-xlarge&quot;</span>)

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

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

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

tokenizer = AutoTokenizer.from_pretrained("kamalkraj/deberta-v2-xlarge")
model = TFDebertaV2Model.from_pretrained("kamalkraj/deberta-v2-xlarge")

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

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

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;kamalkraj/deberta-v2-xlarge&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFDebertaV2Model.from_pretrained(<span class="hljs-string">&quot;kamalkraj/deberta-v2-xlarge&quot;</span>)

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

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

tokenizer = AutoTokenizer.from_pretrained("kamalkraj/deberta-v2-xlarge")
model = TFDebertaV2ForMaskedLM.from_pretrained("kamalkraj/deberta-v2-xlarge")

inputs = tokenizer("The capital of France is [MASK].", return_tensors="tf")
logits = model(**inputs).logits

# retrieve index of [MASK]
mask_token_index = tf.where((inputs.input_ids == tokenizer.mask_token_id)[0])
selected_logits = tf.gather_nd(logits[0], indices=mask_token_index)

predicted_token_id = tf.math.argmax(selected_logits, axis=-1)`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, TFDebertaV2ForMaskedLM
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> tensorflow <span class="hljs-keyword">as</span> tf

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;kamalkraj/deberta-v2-xlarge&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFDebertaV2ForMaskedLM.from_pretrained(<span class="hljs-string">&quot;kamalkraj/deberta-v2-xlarge&quot;</span>)

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

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># retrieve index of [MASK]</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>mask_token_index = tf.where((inputs.input_ids == tokenizer.mask_token_id)[<span class="hljs-number">0</span>])
<span class="hljs-meta">&gt;&gt;&gt; </span>selected_logits = tf.gather_nd(logits[<span class="hljs-number">0</span>], indices=mask_token_index)

<span class="hljs-meta">&gt;&gt;&gt; </span>predicted_token_id = tf.math.argmax(selected_logits, axis=-<span class="hljs-number">1</span>)`}}),{c(){d=a("p"),k=n("Example:"),f=c(),w(u.$$.fragment)},l(l){d=r(l,"P",{});var h=i(d);k=s(h,"Example:"),h.forEach(t),f=p(l),T(u.$$.fragment,l)},m(l,h){g(l,d,h),e(d,k),g(l,f,h),y(u,l,h),v=!0},p:Ne,i(l){v||($(u.$$.fragment,l),v=!0)},o(l){D(u.$$.fragment,l),v=!1},d(l){l&&t(d),l&&t(f),E(u,l)}}}function uk(x){let d,k;return d=new We({props:{code:`labels = tokenizer("The capital of France is Paris.", return_tensors="tf")["input_ids"]
# mask labels of non-[MASK] tokens
labels = tf.where(inputs.input_ids == tokenizer.mask_token_id, labels, -100)

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

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

tokenizer = AutoTokenizer.from_pretrained("kamalkraj/deberta-v2-xlarge")
model = TFDebertaV2ForSequenceClassification.from_pretrained("kamalkraj/deberta-v2-xlarge")

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

logits = model(**inputs).logits

predicted_class_id = int(tf.math.argmax(logits, axis=-1)[0])`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, TFDebertaV2ForSequenceClassification
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> tensorflow <span class="hljs-keyword">as</span> tf

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;kamalkraj/deberta-v2-xlarge&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFDebertaV2ForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;kamalkraj/deberta-v2-xlarge&quot;</span>)

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

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

<span class="hljs-meta">&gt;&gt;&gt; </span>predicted_class_id = <span class="hljs-built_in">int</span>(tf.math.argmax(logits, axis=-<span class="hljs-number">1</span>)[<span class="hljs-number">0</span>])`}}),{c(){d=a("p"),k=n("Example:"),f=c(),w(u.$$.fragment)},l(l){d=r(l,"P",{});var h=i(d);k=s(h,"Example:"),h.forEach(t),f=p(l),T(u.$$.fragment,l)},m(l,h){g(l,d,h),e(d,k),g(l,f,h),y(u,l,h),v=!0},p:Ne,i(l){v||($(u.$$.fragment,l),v=!0)},o(l){D(u.$$.fragment,l),v=!1},d(l){l&&t(d),l&&t(f),E(u,l)}}}function kk(x){let d,k;return d=new We({props:{code:'# To train a model on `num_labels` classes, you can pass `num_labels=num_labels` to `.from_pretrained(...)`\nnum_labels = len(model.config.id2label)\nmodel = TFDebertaV2ForSequenceClassification.from_pretrained("kamalkraj/deberta-v2-xlarge", num_labels=num_labels)\n\nlabels = tf.constant(1)\nloss = model(**inputs, labels=labels).loss',highlighted:'<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># To train a model on `num_labels` classes, you can pass `num_labels=num_labels` to `.from_pretrained(...)`</span>\n<span class="hljs-meta">&gt;&gt;&gt; </span>num_labels = <span class="hljs-built_in">len</span>(model.config.id2label)\n<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFDebertaV2ForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;kamalkraj/deberta-v2-xlarge&quot;</span>, num_labels=num_labels)\n\n<span class="hljs-meta">&gt;&gt;&gt; </span>labels = tf.constant(<span class="hljs-number">1</span>)\n<span class="hljs-meta">&gt;&gt;&gt; </span>loss = model(**inputs, labels=labels).loss'}}),{c(){w(d.$$.fragment)},l(f){T(d.$$.fragment,f)},m(f,u){y(d,f,u),k=!0},p:Ne,i(f){k||($(d.$$.fragment,f),k=!0)},o(f){D(d.$$.fragment,f),k=!1},d(f){E(d,f)}}}function vk(x){let d,k,f,u,v,l,h,z,ke,pe,B,ne,oe,F,ve,U,we,he,L,Te,ie,G,ye,fe,N,$e,me,W,De,ue,te,M,A,le,J,Ee,ge,I,Fe,de,P,qe,O,xe,_e,H,ze,be,C,se,K,Ve,ae,j,Me,R,je,ce;return{c(){d=a("p"),k=n("TensorFlow models and layers in "),f=a("code"),u=n("transformers"),v=n(" accept two formats as input:"),l=c(),h=a("ul"),z=a("li"),ke=n("having all inputs as keyword arguments (like PyTorch models), or"),pe=c(),B=a("li"),ne=n("having all inputs as a list, tuple or dict in the first positional argument."),oe=c(),F=a("p"),ve=n(`The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
and layers. Because of this support, when using methods like `),U=a("code"),we=n("model.fit()"),he=n(` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),L=a("code"),Te=n("model.fit()"),ie=n(` supports! If, however, you want to use the second
format outside of Keras methods like `),G=a("code"),ye=n("fit()"),fe=n(" and "),N=a("code"),$e=n("predict()"),me=n(`, such as when creating your own layers or models with
the Keras `),W=a("code"),De=n("Functional"),ue=n(` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),te=c(),M=a("ul"),A=a("li"),le=n("a single Tensor with "),J=a("code"),Ee=n("input_ids"),ge=n(" only and nothing else: "),I=a("code"),Fe=n("model(input_ids)"),de=c(),P=a("li"),qe=n(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),O=a("code"),xe=n("model([input_ids, attention_mask])"),_e=n(" or "),H=a("code"),ze=n("model([input_ids, attention_mask, token_type_ids])"),be=c(),C=a("li"),se=n(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),K=a("code"),Ve=n('model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),ae=c(),j=a("p"),Me=n(`Note that when creating models and layers with
`),R=a("a"),je=n("subclassing"),ce=n(` then you don\u2019t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`),this.h()},l(b){d=r(b,"P",{});var q=i(d);k=s(q,"TensorFlow models and layers in "),f=r(q,"CODE",{});var He=i(f);u=s(He,"transformers"),He.forEach(t),v=s(q," accept two formats as input:"),q.forEach(t),l=p(b),h=r(b,"UL",{});var re=i(h);z=r(re,"LI",{});var Ce=i(z);ke=s(Ce,"having all inputs as keyword arguments (like PyTorch models), or"),Ce.forEach(t),pe=p(re),B=r(re,"LI",{});var Re=i(B);ne=s(Re,"having all inputs as a list, tuple or dict in the first positional argument."),Re.forEach(t),re.forEach(t),oe=p(b),F=r(b,"P",{});var V=i(F);ve=s(V,`The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
and layers. Because of this support, when using methods like `),U=r(V,"CODE",{});var Ue=i(U);we=s(Ue,"model.fit()"),Ue.forEach(t),he=s(V,` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),L=r(V,"CODE",{});var Ke=i(L);Te=s(Ke,"model.fit()"),Ke.forEach(t),ie=s(V,` supports! If, however, you want to use the second
format outside of Keras methods like `),G=r(V,"CODE",{});var Ae=i(G);ye=s(Ae,"fit()"),Ae.forEach(t),fe=s(V," and "),N=r(V,"CODE",{});var Be=i(N);$e=s(Be,"predict()"),Be.forEach(t),me=s(V,`, such as when creating your own layers or models with
the Keras `),W=r(V,"CODE",{});var Qe=i(W);De=s(Qe,"Functional"),Qe.forEach(t),ue=s(V,` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),V.forEach(t),te=p(b),M=r(b,"UL",{});var S=i(M);A=r(S,"LI",{});var X=i(A);le=s(X,"a single Tensor with "),J=r(X,"CODE",{});var Pe=i(J);Ee=s(Pe,"input_ids"),Pe.forEach(t),ge=s(X," only and nothing else: "),I=r(X,"CODE",{});var Ie=i(I);Fe=s(Ie,"model(input_ids)"),Ie.forEach(t),X.forEach(t),de=p(S),P=r(S,"LI",{});var Y=i(P);qe=s(Y,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),O=r(Y,"CODE",{});var Ge=i(O);xe=s(Ge,"model([input_ids, attention_mask])"),Ge.forEach(t),_e=s(Y," or "),H=r(Y,"CODE",{});var Le=i(H);ze=s(Le,"model([input_ids, attention_mask, token_type_ids])"),Le.forEach(t),Y.forEach(t),be=p(S),C=r(S,"LI",{});var Z=i(C);se=s(Z,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),K=r(Z,"CODE",{});var Je=i(K);Ve=s(Je,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),Je.forEach(t),Z.forEach(t),S.forEach(t),ae=p(b),j=r(b,"P",{});var ee=i(j);Me=s(ee,`Note that when creating models and layers with
`),R=r(ee,"A",{href:!0,rel:!0});var Xe=i(R);je=s(Xe,"subclassing"),Xe.forEach(t),ce=s(ee,` then you don\u2019t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`),ee.forEach(t),this.h()},h(){m(R,"href","https://keras.io/guides/making_new_layers_and_models_via_subclassing/"),m(R,"rel","nofollow")},m(b,q){g(b,d,q),e(d,k),e(d,f),e(f,u),e(d,v),g(b,l,q),g(b,h,q),e(h,z),e(z,ke),e(h,pe),e(h,B),e(B,ne),g(b,oe,q),g(b,F,q),e(F,ve),e(F,U),e(U,we),e(F,he),e(F,L),e(L,Te),e(F,ie),e(F,G),e(G,ye),e(F,fe),e(F,N),e(N,$e),e(F,me),e(F,W),e(W,De),e(F,ue),g(b,te,q),g(b,M,q),e(M,A),e(A,le),e(A,J),e(J,Ee),e(A,ge),e(A,I),e(I,Fe),e(M,de),e(M,P),e(P,qe),e(P,O),e(O,xe),e(P,_e),e(P,H),e(H,ze),e(M,be),e(M,C),e(C,se),e(C,K),e(K,Ve),g(b,ae,q),g(b,j,q),e(j,Me),e(j,R),e(R,je),e(j,ce)},d(b){b&&t(d),b&&t(l),b&&t(h),b&&t(oe),b&&t(F),b&&t(te),b&&t(M),b&&t(ae),b&&t(j)}}}function wk(x){let d,k,f,u,v;return{c(){d=a("p"),k=n("Although the recipe for forward pass needs to be defined within this function, one should call the "),f=a("code"),u=n("Module"),v=n(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){d=r(l,"P",{});var h=i(d);k=s(h,"Although the recipe for forward pass needs to be defined within this function, one should call the "),f=r(h,"CODE",{});var z=i(f);u=s(z,"Module"),z.forEach(t),v=s(h,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),h.forEach(t)},m(l,h){g(l,d,h),e(d,k),e(d,f),e(f,u),e(d,v)},d(l){l&&t(d)}}}function Tk(x){let d,k,f,u,v;return u=new We({props:{code:`from transformers import AutoTokenizer, TFDebertaV2ForTokenClassification
import tensorflow as tf

tokenizer = AutoTokenizer.from_pretrained("kamalkraj/deberta-v2-xlarge")
model = TFDebertaV2ForTokenClassification.from_pretrained("kamalkraj/deberta-v2-xlarge")

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

logits = model(**inputs).logits
predicted_token_class_ids = tf.math.argmax(logits, axis=-1)

# Note that tokens are classified rather then input words which means that
# there might be more predicted token classes than words.
# Multiple token classes might account for the same word
predicted_tokens_classes = [model.config.id2label[t] for t in predicted_token_class_ids[0].numpy().tolist()]`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, TFDebertaV2ForTokenClassification
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> tensorflow <span class="hljs-keyword">as</span> tf

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;kamalkraj/deberta-v2-xlarge&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFDebertaV2ForTokenClassification.from_pretrained(<span class="hljs-string">&quot;kamalkraj/deberta-v2-xlarge&quot;</span>)

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

<span class="hljs-meta">&gt;&gt;&gt; </span>logits = model(**inputs).logits
<span class="hljs-meta">&gt;&gt;&gt; </span>predicted_token_class_ids = tf.math.argmax(logits, axis=-<span class="hljs-number">1</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Note that tokens are classified rather then input words which means that</span>
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># there might be more predicted token classes than words.</span>
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Multiple token classes might account for the same word</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>predicted_tokens_classes = [model.config.id2label[t] <span class="hljs-keyword">for</span> t <span class="hljs-keyword">in</span> predicted_token_class_ids[<span class="hljs-number">0</span>].numpy().tolist()]`}}),{c(){d=a("p"),k=n("Example:"),f=c(),w(u.$$.fragment)},l(l){d=r(l,"P",{});var h=i(d);k=s(h,"Example:"),h.forEach(t),f=p(l),T(u.$$.fragment,l)},m(l,h){g(l,d,h),e(d,k),g(l,f,h),y(u,l,h),v=!0},p:Ne,i(l){v||($(u.$$.fragment,l),v=!0)},o(l){D(u.$$.fragment,l),v=!1},d(l){l&&t(d),l&&t(f),E(u,l)}}}function yk(x){let d,k;return d=new We({props:{code:`labels = predicted_token_class_ids
loss = tf.math.reduce_mean(model(**inputs, labels=labels).loss)`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span>labels = predicted_token_class_ids
<span class="hljs-meta">&gt;&gt;&gt; </span>loss = tf.math.reduce_mean(model(**inputs, labels=labels).loss)`}}),{c(){w(d.$$.fragment)},l(f){T(d.$$.fragment,f)},m(f,u){y(d,f,u),k=!0},p:Ne,i(f){k||($(d.$$.fragment,f),k=!0)},o(f){D(d.$$.fragment,f),k=!1},d(f){E(d,f)}}}function $k(x){let d,k,f,u,v,l,h,z,ke,pe,B,ne,oe,F,ve,U,we,he,L,Te,ie,G,ye,fe,N,$e,me,W,De,ue,te,M,A,le,J,Ee,ge,I,Fe,de,P,qe,O,xe,_e,H,ze,be,C,se,K,Ve,ae,j,Me,R,je,ce;return{c(){d=a("p"),k=n("TensorFlow models and layers in "),f=a("code"),u=n("transformers"),v=n(" accept two formats as input:"),l=c(),h=a("ul"),z=a("li"),ke=n("having all inputs as keyword arguments (like PyTorch models), or"),pe=c(),B=a("li"),ne=n("having all inputs as a list, tuple or dict in the first positional argument."),oe=c(),F=a("p"),ve=n(`The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
and layers. Because of this support, when using methods like `),U=a("code"),we=n("model.fit()"),he=n(` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),L=a("code"),Te=n("model.fit()"),ie=n(` supports! If, however, you want to use the second
format outside of Keras methods like `),G=a("code"),ye=n("fit()"),fe=n(" and "),N=a("code"),$e=n("predict()"),me=n(`, such as when creating your own layers or models with
the Keras `),W=a("code"),De=n("Functional"),ue=n(` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),te=c(),M=a("ul"),A=a("li"),le=n("a single Tensor with "),J=a("code"),Ee=n("input_ids"),ge=n(" only and nothing else: "),I=a("code"),Fe=n("model(input_ids)"),de=c(),P=a("li"),qe=n(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),O=a("code"),xe=n("model([input_ids, attention_mask])"),_e=n(" or "),H=a("code"),ze=n("model([input_ids, attention_mask, token_type_ids])"),be=c(),C=a("li"),se=n(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),K=a("code"),Ve=n('model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),ae=c(),j=a("p"),Me=n(`Note that when creating models and layers with
`),R=a("a"),je=n("subclassing"),ce=n(` then you don\u2019t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`),this.h()},l(b){d=r(b,"P",{});var q=i(d);k=s(q,"TensorFlow models and layers in "),f=r(q,"CODE",{});var He=i(f);u=s(He,"transformers"),He.forEach(t),v=s(q," accept two formats as input:"),q.forEach(t),l=p(b),h=r(b,"UL",{});var re=i(h);z=r(re,"LI",{});var Ce=i(z);ke=s(Ce,"having all inputs as keyword arguments (like PyTorch models), or"),Ce.forEach(t),pe=p(re),B=r(re,"LI",{});var Re=i(B);ne=s(Re,"having all inputs as a list, tuple or dict in the first positional argument."),Re.forEach(t),re.forEach(t),oe=p(b),F=r(b,"P",{});var V=i(F);ve=s(V,`The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
and layers. Because of this support, when using methods like `),U=r(V,"CODE",{});var Ue=i(U);we=s(Ue,"model.fit()"),Ue.forEach(t),he=s(V,` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),L=r(V,"CODE",{});var Ke=i(L);Te=s(Ke,"model.fit()"),Ke.forEach(t),ie=s(V,` supports! If, however, you want to use the second
format outside of Keras methods like `),G=r(V,"CODE",{});var Ae=i(G);ye=s(Ae,"fit()"),Ae.forEach(t),fe=s(V," and "),N=r(V,"CODE",{});var Be=i(N);$e=s(Be,"predict()"),Be.forEach(t),me=s(V,`, such as when creating your own layers or models with
the Keras `),W=r(V,"CODE",{});var Qe=i(W);De=s(Qe,"Functional"),Qe.forEach(t),ue=s(V,` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),V.forEach(t),te=p(b),M=r(b,"UL",{});var S=i(M);A=r(S,"LI",{});var X=i(A);le=s(X,"a single Tensor with "),J=r(X,"CODE",{});var Pe=i(J);Ee=s(Pe,"input_ids"),Pe.forEach(t),ge=s(X," only and nothing else: "),I=r(X,"CODE",{});var Ie=i(I);Fe=s(Ie,"model(input_ids)"),Ie.forEach(t),X.forEach(t),de=p(S),P=r(S,"LI",{});var Y=i(P);qe=s(Y,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),O=r(Y,"CODE",{});var Ge=i(O);xe=s(Ge,"model([input_ids, attention_mask])"),Ge.forEach(t),_e=s(Y," or "),H=r(Y,"CODE",{});var Le=i(H);ze=s(Le,"model([input_ids, attention_mask, token_type_ids])"),Le.forEach(t),Y.forEach(t),be=p(S),C=r(S,"LI",{});var Z=i(C);se=s(Z,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),K=r(Z,"CODE",{});var Je=i(K);Ve=s(Je,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),Je.forEach(t),Z.forEach(t),S.forEach(t),ae=p(b),j=r(b,"P",{});var ee=i(j);Me=s(ee,`Note that when creating models and layers with
`),R=r(ee,"A",{href:!0,rel:!0});var Xe=i(R);je=s(Xe,"subclassing"),Xe.forEach(t),ce=s(ee,` then you don\u2019t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`),ee.forEach(t),this.h()},h(){m(R,"href","https://keras.io/guides/making_new_layers_and_models_via_subclassing/"),m(R,"rel","nofollow")},m(b,q){g(b,d,q),e(d,k),e(d,f),e(f,u),e(d,v),g(b,l,q),g(b,h,q),e(h,z),e(z,ke),e(h,pe),e(h,B),e(B,ne),g(b,oe,q),g(b,F,q),e(F,ve),e(F,U),e(U,we),e(F,he),e(F,L),e(L,Te),e(F,ie),e(F,G),e(G,ye),e(F,fe),e(F,N),e(N,$e),e(F,me),e(F,W),e(W,De),e(F,ue),g(b,te,q),g(b,M,q),e(M,A),e(A,le),e(A,J),e(J,Ee),e(A,ge),e(A,I),e(I,Fe),e(M,de),e(M,P),e(P,qe),e(P,O),e(O,xe),e(P,_e),e(P,H),e(H,ze),e(M,be),e(M,C),e(C,se),e(C,K),e(K,Ve),g(b,ae,q),g(b,j,q),e(j,Me),e(j,R),e(R,je),e(j,ce)},d(b){b&&t(d),b&&t(l),b&&t(h),b&&t(oe),b&&t(F),b&&t(te),b&&t(M),b&&t(ae),b&&t(j)}}}function Dk(x){let d,k,f,u,v;return{c(){d=a("p"),k=n("Although the recipe for forward pass needs to be defined within this function, one should call the "),f=a("code"),u=n("Module"),v=n(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){d=r(l,"P",{});var h=i(d);k=s(h,"Although the recipe for forward pass needs to be defined within this function, one should call the "),f=r(h,"CODE",{});var z=i(f);u=s(z,"Module"),z.forEach(t),v=s(h,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),h.forEach(t)},m(l,h){g(l,d,h),e(d,k),e(d,f),e(f,u),e(d,v)},d(l){l&&t(d)}}}function Ek(x){let d,k,f,u,v;return u=new We({props:{code:`from transformers import AutoTokenizer, TFDebertaV2ForQuestionAnswering
import tensorflow as tf

tokenizer = AutoTokenizer.from_pretrained("kamalkraj/deberta-v2-xlarge")
model = TFDebertaV2ForQuestionAnswering.from_pretrained("kamalkraj/deberta-v2-xlarge")

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

inputs = tokenizer(question, text, return_tensors="tf")
outputs = model(**inputs)

answer_start_index = int(tf.math.argmax(outputs.start_logits, axis=-1)[0])
answer_end_index = int(tf.math.argmax(outputs.end_logits, axis=-1)[0])

predict_answer_tokens = inputs.input_ids[0, answer_start_index : answer_end_index + 1]`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, TFDebertaV2ForQuestionAnswering
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> tensorflow <span class="hljs-keyword">as</span> tf

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;kamalkraj/deberta-v2-xlarge&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFDebertaV2ForQuestionAnswering.from_pretrained(<span class="hljs-string">&quot;kamalkraj/deberta-v2-xlarge&quot;</span>)

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

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(question, text, return_tensors=<span class="hljs-string">&quot;tf&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs)

<span class="hljs-meta">&gt;&gt;&gt; </span>answer_start_index = <span class="hljs-built_in">int</span>(tf.math.argmax(outputs.start_logits, axis=-<span class="hljs-number">1</span>)[<span class="hljs-number">0</span>])
<span class="hljs-meta">&gt;&gt;&gt; </span>answer_end_index = <span class="hljs-built_in">int</span>(tf.math.argmax(outputs.end_logits, axis=-<span class="hljs-number">1</span>)[<span class="hljs-number">0</span>])

<span class="hljs-meta">&gt;&gt;&gt; </span>predict_answer_tokens = inputs.input_ids[<span class="hljs-number">0</span>, answer_start_index : answer_end_index + <span class="hljs-number">1</span>]`}}),{c(){d=a("p"),k=n("Example:"),f=c(),w(u.$$.fragment)},l(l){d=r(l,"P",{});var h=i(d);k=s(h,"Example:"),h.forEach(t),f=p(l),T(u.$$.fragment,l)},m(l,h){g(l,d,h),e(d,k),g(l,f,h),y(u,l,h),v=!0},p:Ne,i(l){v||($(u.$$.fragment,l),v=!0)},o(l){D(u.$$.fragment,l),v=!1},d(l){l&&t(d),l&&t(f),E(u,l)}}}function Fk(x){let d,k;return d=new We({props:{code:`# target is "nice puppet"
target_start_index = tf.constant([14])
target_end_index = tf.constant([15])

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

<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs, start_positions=target_start_index, end_positions=target_end_index)
<span class="hljs-meta">&gt;&gt;&gt; </span>loss = tf.math.reduce_mean(outputs.loss)`}}),{c(){w(d.$$.fragment)},l(f){T(d.$$.fragment,f)},m(f,u){y(d,f,u),k=!0},p:Ne,i(f){k||($(d.$$.fragment,f),k=!0)},o(f){D(d.$$.fragment,f),k=!1},d(f){E(d,f)}}}function qk(x){let d,k,f,u,v,l,h,z,ke,pe,B,ne,oe,F,ve,U,we,he,L,Te,ie,G,ye,fe,N,$e,me,W,De,ue,te,M,A,le,J,Ee,ge,I,Fe,de,P,qe,O,xe,_e,H,ze,be,C,se,K,Ve,ae,j,Me,R,je,ce,b,q,He,re,Ce,Re,V,Ue,Ke,Ae,Be,Qe,S,X,Pe,Ie,Y,Ge,Le,Z,Je,ee,Xe,bc,es,kc,vc,ts,wc,Tc,Gl,Zt,Ro,Gr,os,yc,Jr,$c,Jl,dt,Xr,tr,Dc,Ec,Yr,or,Fc,qc,Zr,nr,xc,zc,ei,sr,Vc,Mc,ti,ar,jc,Xl,eo,Bo,oi,ns,Cc,ni,Ac,Yl,ut,ss,Pc,to,Rc,rr,Bc,Ic,as,Lc,Sc,Oc,oo,Nc,ir,Wc,Hc,lr,Uc,Kc,Qc,Io,Zl,no,Lo,si,rs,Gc,ai,Jc,ed,Ye,is,Xc,ls,Yc,ds,Zc,ep,tp,Bt,cs,op,ri,np,sp,ps,ii,ap,rp,li,ip,lp,So,hs,dp,so,cp,di,pp,hp,ci,fp,mp,up,wt,fs,gp,pi,_p,bp,Oo,kp,ao,vp,hi,wp,Tp,fi,yp,$p,Dp,dr,ms,td,ro,No,mi,us,Ep,ui,Fp,od,gt,gs,qp,_s,xp,bs,zp,Vp,Mp,It,ks,jp,gi,Cp,Ap,vs,_i,Pp,Rp,bi,Bp,Ip,Tt,ws,Lp,ki,Sp,Op,Wo,Np,io,Wp,vi,Hp,Up,wi,Kp,Qp,nd,lo,Ho,Ti,Ts,Gp,yi,Jp,sd,_t,ys,Xp,$s,Yp,Ds,Zp,eh,th,Es,oh,Fs,nh,sh,ah,yt,qs,rh,co,ih,cr,lh,dh,$i,ch,ph,hh,Uo,fh,Ko,ad,po,Qo,Di,xs,mh,Ei,uh,rd,At,zs,gh,Fi,_h,bh,$t,Vs,kh,qi,vh,wh,xi,Th,yh,Go,id,ho,Jo,zi,Ms,$h,Vi,Dh,ld,bt,js,Eh,fo,Fh,Mi,qh,xh,Cs,zh,Vh,Mh,As,jh,Ps,Ch,Ah,Ph,Dt,Rs,Rh,mo,Bh,pr,Ih,Lh,ji,Sh,Oh,Nh,Xo,Wh,Yo,dd,uo,Zo,Ci,Bs,Hh,Ai,Uh,cd,nt,Is,Kh,Pi,Qh,Gh,Ls,Jh,Ss,Xh,Yh,Zh,Os,ef,Ns,tf,of,nf,ct,Ws,sf,go,af,hr,rf,lf,Ri,df,cf,pf,en,hf,tn,ff,on,pd,_o,nn,Bi,Hs,mf,Ii,uf,hd,st,Us,gf,Li,_f,bf,Ks,kf,Qs,vf,wf,Tf,Gs,yf,Js,$f,Df,Ef,Et,Xs,Ff,bo,qf,fr,xf,zf,Si,Vf,Mf,jf,sn,Cf,an,fd,ko,rn,Oi,Ys,Af,Ni,Pf,md,at,Zs,Rf,vo,Bf,Wi,If,Lf,Hi,Sf,Of,Nf,ea,Wf,ta,Hf,Uf,Kf,oa,Qf,na,Gf,Jf,Xf,Ft,sa,Yf,wo,Zf,mr,em,tm,Ui,om,nm,sm,ln,am,dn,ud,To,cn,Ki,aa,rm,Qi,im,gd,rt,ra,lm,Gi,dm,cm,ia,pm,la,hm,fm,mm,da,um,ca,gm,_m,bm,qt,pa,km,yo,vm,ur,wm,Tm,Ji,ym,$m,Dm,pn,Em,hn,_d,$o,fn,Xi,ha,Fm,Yi,qm,bd,it,fa,xm,ma,zm,ua,Vm,Mm,jm,ga,Cm,_a,Am,Pm,Rm,mn,Bm,xt,ba,Im,Do,Lm,gr,Sm,Om,Zi,Nm,Wm,Hm,un,Um,gn,kd,Eo,_n,el,ka,Km,tl,Qm,vd,Pt,va,Gm,ol,Jm,Xm,zt,wa,Ym,nl,Zm,eu,Ta,tu,sl,ou,nu,su,kt,au,al,ru,iu,rl,lu,du,il,cu,pu,ll,hu,fu,wd,Fo,bn,dl,ya,mu,cl,uu,Td,lt,$a,gu,qo,_u,pl,bu,ku,Da,vu,wu,Tu,Ea,yu,Fa,$u,Du,Eu,kn,Fu,pt,qa,qu,xo,xu,_r,zu,Vu,hl,Mu,ju,Cu,vn,Au,wn,Pu,Tn,yd,zo,yn,fl,xa,Ru,ml,Bu,$d,Ze,za,Iu,ul,Lu,Su,Va,Ou,Ma,Nu,Wu,Hu,ja,Uu,Ca,Ku,Qu,Gu,$n,Ju,ht,Aa,Xu,Vo,Yu,br,Zu,eg,gl,tg,og,ng,Dn,sg,En,ag,Fn,Dd,Mo,qn,_l,Pa,rg,bl,ig,Ed,et,Ra,lg,kl,dg,cg,Ba,pg,Ia,hg,fg,mg,La,ug,Sa,gg,_g,bg,xn,kg,ft,Oa,vg,jo,wg,kr,Tg,yg,vl,$g,Dg,Eg,zn,Fg,Vn,qg,Mn,Fd,Co,jn,wl,Na,xg,Tl,zg,qd,tt,Wa,Vg,Ao,Mg,yl,jg,Cg,$l,Ag,Pg,Rg,Ha,Bg,Ua,Ig,Lg,Sg,Ka,Og,Qa,Ng,Wg,Hg,Cn,Ug,mt,Ga,Kg,Po,Qg,vr,Gg,Jg,Dl,Xg,Yg,Zg,An,e_,Pn,t_,Rn,xd;return l=new Se({}),F=new Se({}),os=new Se({}),ns=new Se({}),ss=new Q({props:{name:"class transformers.DebertaV2Config",anchor:"transformers.DebertaV2Config",parameters:[{name:"vocab_size",val:" = 128100"},{name:"hidden_size",val:" = 1536"},{name:"num_hidden_layers",val:" = 24"},{name:"num_attention_heads",val:" = 24"},{name:"intermediate_size",val:" = 6144"},{name:"hidden_act",val:" = 'gelu'"},{name:"hidden_dropout_prob",val:" = 0.1"},{name:"attention_probs_dropout_prob",val:" = 0.1"},{name:"max_position_embeddings",val:" = 512"},{name:"type_vocab_size",val:" = 0"},{name:"initializer_range",val:" = 0.02"},{name:"layer_norm_eps",val:" = 1e-07"},{name:"relative_attention",val:" = False"},{name:"max_relative_positions",val:" = -1"},{name:"pad_token_id",val:" = 0"},{name:"position_biased_input",val:" = True"},{name:"pos_att_type",val:" = None"},{name:"pooler_dropout",val:" = 0"},{name:"pooler_hidden_act",val:" = 'gelu'"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.DebertaV2Config.vocab_size",description:`<strong>vocab_size</strong> (<code>int</code>, <em>optional</em>, defaults to 128100) &#x2014;
Vocabulary size of the DeBERTa-v2 model. Defines the number of different tokens that can be represented by
the <code>inputs_ids</code> passed when calling <a href="/docs/transformers/v4.29.0/en/model_doc/deberta-v2#transformers.DebertaV2Model">DebertaV2Model</a>.`,name:"vocab_size"},{anchor:"transformers.DebertaV2Config.hidden_size",description:`<strong>hidden_size</strong> (<code>int</code>, <em>optional</em>, defaults to 1536) &#x2014;
Dimensionality of the encoder layers and the pooler layer.`,name:"hidden_size"},{anchor:"transformers.DebertaV2Config.num_hidden_layers",description:`<strong>num_hidden_layers</strong> (<code>int</code>, <em>optional</em>, defaults to 24) &#x2014;
Number of hidden layers in the Transformer encoder.`,name:"num_hidden_layers"},{anchor:"transformers.DebertaV2Config.num_attention_heads",description:`<strong>num_attention_heads</strong> (<code>int</code>, <em>optional</em>, defaults to 24) &#x2014;
Number of attention heads for each attention layer in the Transformer encoder.`,name:"num_attention_heads"},{anchor:"transformers.DebertaV2Config.intermediate_size",description:`<strong>intermediate_size</strong> (<code>int</code>, <em>optional</em>, defaults to 6144) &#x2014;
Dimensionality of the &#x201C;intermediate&#x201D; (often named feed-forward) layer in the Transformer encoder.`,name:"intermediate_size"},{anchor:"transformers.DebertaV2Config.hidden_act",description:`<strong>hidden_act</strong> (<code>str</code> or <code>Callable</code>, <em>optional</em>, defaults to <code>&quot;gelu&quot;</code>) &#x2014;
The non-linear activation function (function or string) in the encoder and pooler. If string, <code>&quot;gelu&quot;</code>,
<code>&quot;relu&quot;</code>, <code>&quot;silu&quot;</code>, <code>&quot;gelu&quot;</code>, <code>&quot;tanh&quot;</code>, <code>&quot;gelu_fast&quot;</code>, <code>&quot;mish&quot;</code>, <code>&quot;linear&quot;</code>, <code>&quot;sigmoid&quot;</code> and <code>&quot;gelu_new&quot;</code>
are supported.`,name:"hidden_act"},{anchor:"transformers.DebertaV2Config.hidden_dropout_prob",description:`<strong>hidden_dropout_prob</strong> (<code>float</code>, <em>optional</em>, defaults to 0.1) &#x2014;
The dropout probability for all fully connected layers in the embeddings, encoder, and pooler.`,name:"hidden_dropout_prob"},{anchor:"transformers.DebertaV2Config.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.DebertaV2Config.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.DebertaV2Config.type_vocab_size",description:`<strong>type_vocab_size</strong> (<code>int</code>, <em>optional</em>, defaults to 0) &#x2014;
The vocabulary size of the <code>token_type_ids</code> passed when calling <a href="/docs/transformers/v4.29.0/en/model_doc/deberta#transformers.DebertaModel">DebertaModel</a> or <a href="/docs/transformers/v4.29.0/en/model_doc/deberta#transformers.TFDebertaModel">TFDebertaModel</a>.`,name:"type_vocab_size"},{anchor:"transformers.DebertaV2Config.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.DebertaV2Config.layer_norm_eps",description:`<strong>layer_norm_eps</strong> (<code>float</code>, <em>optional</em>, defaults to 1e-7) &#x2014;
The epsilon used by the layer normalization layers.`,name:"layer_norm_eps"},{anchor:"transformers.DebertaV2Config.relative_attention",description:`<strong>relative_attention</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether use relative position encoding.`,name:"relative_attention"},{anchor:"transformers.DebertaV2Config.max_relative_positions",description:`<strong>max_relative_positions</strong> (<code>int</code>, <em>optional</em>, defaults to -1) &#x2014;
The range of relative positions <code>[-max_position_embeddings, max_position_embeddings]</code>. Use the same value
as <code>max_position_embeddings</code>.`,name:"max_relative_positions"},{anchor:"transformers.DebertaV2Config.pad_token_id",description:`<strong>pad_token_id</strong> (<code>int</code>, <em>optional</em>, defaults to 0) &#x2014;
The value used to pad input_ids.`,name:"pad_token_id"},{anchor:"transformers.DebertaV2Config.position_biased_input",description:`<strong>position_biased_input</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether add absolute position embedding to content embedding.`,name:"position_biased_input"},{anchor:"transformers.DebertaV2Config.pos_att_type",description:`<strong>pos_att_type</strong> (<code>List[str]</code>, <em>optional</em>) &#x2014;
The type of relative position attention, it can be a combination of <code>[&quot;p2c&quot;, &quot;c2p&quot;]</code>, e.g. <code>[&quot;p2c&quot;]</code>,
<code>[&quot;p2c&quot;, &quot;c2p&quot;]</code>, <code>[&quot;p2c&quot;, &quot;c2p&quot;]</code>.`,name:"pos_att_type"},{anchor:"transformers.DebertaV2Config.layer_norm_eps",description:`<strong>layer_norm_eps</strong> (<code>float</code>, optional, defaults to 1e-12) &#x2014;
The epsilon used by the layer normalization layers.`,name:"layer_norm_eps"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/deberta_v2/configuration_deberta_v2.py#L42"}}),Io=new Oe({props:{anchor:"transformers.DebertaV2Config.example",$$slots:{default:[U2]},$$scope:{ctx:x}}}),rs=new Se({}),is=new Q({props:{name:"class transformers.DebertaV2Tokenizer",anchor:"transformers.DebertaV2Tokenizer",parameters:[{name:"vocab_file",val:""},{name:"do_lower_case",val:" = False"},{name:"split_by_punct",val:" = False"},{name:"bos_token",val:" = '[CLS]'"},{name:"eos_token",val:" = '[SEP]'"},{name:"unk_token",val:" = '[UNK]'"},{name:"sep_token",val:" = '[SEP]'"},{name:"pad_token",val:" = '[PAD]'"},{name:"cls_token",val:" = '[CLS]'"},{name:"mask_token",val:" = '[MASK]'"},{name:"sp_model_kwargs",val:": typing.Union[typing.Dict[str, typing.Any], NoneType] = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.DebertaV2Tokenizer.vocab_file",description:`<strong>vocab_file</strong> (<code>str</code>) &#x2014;
<a href="https://github.com/google/sentencepiece" rel="nofollow">SentencePiece</a> file (generally has a <em>.spm</em> extension) that
contains the vocabulary necessary to instantiate a tokenizer.`,name:"vocab_file"},{anchor:"transformers.DebertaV2Tokenizer.do_lower_case",description:`<strong>do_lower_case</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to lowercase the input when tokenizing.`,name:"do_lower_case"},{anchor:"transformers.DebertaV2Tokenizer.bos_token",description:`<strong>bos_token</strong> (<code>string</code>, <em>optional</em>, defaults to <code>&quot;[CLS]&quot;</code>) &#x2014;
The beginning of sequence token that was used during pre-training. Can be used a sequence classifier token.
When building a sequence using special tokens, this is not the token that is used for the beginning of
sequence. The token used is the <code>cls_token</code>.`,name:"bos_token"},{anchor:"transformers.DebertaV2Tokenizer.eos_token",description:`<strong>eos_token</strong> (<code>string</code>, <em>optional</em>, defaults to <code>&quot;[SEP]&quot;</code>) &#x2014;
The end of sequence token. When building a sequence using special tokens, this is not the token that is
used for the end of sequence. The token used is the <code>sep_token</code>.`,name:"eos_token"},{anchor:"transformers.DebertaV2Tokenizer.unk_token",description:`<strong>unk_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;[UNK]&quot;</code>) &#x2014;
The unknown token. A token that is not in the vocabulary cannot be converted to an ID and is set to be this
token instead.`,name:"unk_token"},{anchor:"transformers.DebertaV2Tokenizer.sep_token",description:`<strong>sep_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;[SEP]&quot;</code>) &#x2014;
The separator token, which is used when building a sequence from multiple sequences, e.g. two sequences for
sequence classification or for a text and a question for question answering. It is also used as the last
token of a sequence built with special tokens.`,name:"sep_token"},{anchor:"transformers.DebertaV2Tokenizer.pad_token",description:`<strong>pad_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;[PAD]&quot;</code>) &#x2014;
The token used for padding, for example when batching sequences of different lengths.`,name:"pad_token"},{anchor:"transformers.DebertaV2Tokenizer.cls_token",description:`<strong>cls_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;[CLS]&quot;</code>) &#x2014;
The classifier token which is used when doing sequence classification (classification of the whole sequence
instead of per-token classification). It is the first token of the sequence when built with special tokens.`,name:"cls_token"},{anchor:"transformers.DebertaV2Tokenizer.mask_token",description:`<strong>mask_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;[MASK]&quot;</code>) &#x2014;
The token used for masking values. This is the token used when training this model with masked language
modeling. This is the token which the model will try to predict.`,name:"mask_token"},{anchor:"transformers.DebertaV2Tokenizer.sp_model_kwargs",description:`<strong>sp_model_kwargs</strong> (<code>dict</code>, <em>optional</em>) &#x2014;
Will be passed to the <code>SentencePieceProcessor.__init__()</code> method. The <a href="https://github.com/google/sentencepiece/tree/master/python" rel="nofollow">Python wrapper for
SentencePiece</a> can be used, among other things,
to set:</p>
<ul>
<li>
<p><code>enable_sampling</code>: Enable subword regularization.</p>
</li>
<li>
<p><code>nbest_size</code>: Sampling parameters for unigram. Invalid for BPE-Dropout.</p>
<ul>
<li><code>nbest_size = {0,1}</code>: No sampling is performed.</li>
<li><code>nbest_size &gt; 1</code>: samples from the nbest_size results.</li>
<li><code>nbest_size &lt; 0</code>: assuming that nbest_size is infinite and samples from the all hypothesis (lattice)
using forward-filtering-and-backward-sampling algorithm.</li>
</ul>
</li>
<li>
<p><code>alpha</code>: Smoothing parameter for unigram sampling, and dropout probability of merge operations for
BPE-dropout.</p>
</li>
</ul>`,name:"sp_model_kwargs"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/deberta_v2/tokenization_deberta_v2.py#L56"}}),cs=new Q({props:{name:"build_inputs_with_special_tokens",anchor:"transformers.DebertaV2Tokenizer.build_inputs_with_special_tokens",parameters:[{name:"token_ids_0",val:""},{name:"token_ids_1",val:" = None"}],parametersDescription:[{anchor:"transformers.DebertaV2Tokenizer.build_inputs_with_special_tokens.token_ids_0",description:`<strong>token_ids_0</strong> (<code>List[int]</code>) &#x2014;
List of IDs to which the special tokens will be added.`,name:"token_ids_0"},{anchor:"transformers.DebertaV2Tokenizer.build_inputs_with_special_tokens.token_ids_1",description:`<strong>token_ids_1</strong> (<code>List[int]</code>, <em>optional</em>) &#x2014;
Optional second list of IDs for sequence pairs.`,name:"token_ids_1"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/deberta_v2/tokenization_deberta_v2.py#L184",returnDescription:`
<p>List of <a href="../glossary#input-ids">input IDs</a> with the appropriate special tokens.</p>
`,returnType:`
<p><code>List[int]</code></p>
`}}),hs=new Q({props:{name:"get_special_tokens_mask",anchor:"transformers.DebertaV2Tokenizer.get_special_tokens_mask",parameters:[{name:"token_ids_0",val:""},{name:"token_ids_1",val:" = None"},{name:"already_has_special_tokens",val:" = False"}],parametersDescription:[{anchor:"transformers.DebertaV2Tokenizer.get_special_tokens_mask.token_ids_0",description:`<strong>token_ids_0</strong> (<code>List[int]</code>) &#x2014;
List of IDs.`,name:"token_ids_0"},{anchor:"transformers.DebertaV2Tokenizer.get_special_tokens_mask.token_ids_1",description:`<strong>token_ids_1</strong> (<code>List[int]</code>, <em>optional</em>) &#x2014;
Optional second list of IDs for sequence pairs.`,name:"token_ids_1"},{anchor:"transformers.DebertaV2Tokenizer.get_special_tokens_mask.already_has_special_tokens",description:`<strong>already_has_special_tokens</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not the token list is already formatted with special tokens for the model.`,name:"already_has_special_tokens"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/deberta_v2/tokenization_deberta_v2.py#L208",returnDescription:`
<p>A list of integers in the range [0, 1]: 1 for a special token, 0 for a sequence token.</p>
`,returnType:`
<p><code>List[int]</code></p>
`}}),fs=new Q({props:{name:"create_token_type_ids_from_sequences",anchor:"transformers.DebertaV2Tokenizer.create_token_type_ids_from_sequences",parameters:[{name:"token_ids_0",val:""},{name:"token_ids_1",val:" = None"}],parametersDescription:[{anchor:"transformers.DebertaV2Tokenizer.create_token_type_ids_from_sequences.token_ids_0",description:`<strong>token_ids_0</strong> (<code>List[int]</code>) &#x2014;
List of IDs.`,name:"token_ids_0"},{anchor:"transformers.DebertaV2Tokenizer.create_token_type_ids_from_sequences.token_ids_1",description:`<strong>token_ids_1</strong> (<code>List[int]</code>, <em>optional</em>) &#x2014;
Optional second list of IDs for sequence pairs.`,name:"token_ids_1"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/deberta_v2/tokenization_deberta_v2.py#L234",returnDescription:`
<p>List of <a href="../glossary#token-type-ids">token type IDs</a> according to the given sequence(s).</p>
`,returnType:`
<p><code>List[int]</code></p>
`}}),Oo=new Oe({props:{anchor:"transformers.DebertaV2Tokenizer.create_token_type_ids_from_sequences.example",$$slots:{default:[K2]},$$scope:{ctx:x}}}),ms=new Q({props:{name:"save_vocabulary",anchor:"transformers.DebertaV2Tokenizer.save_vocabulary",parameters:[{name:"save_directory",val:": str"},{name:"filename_prefix",val:": typing.Optional[str] = None"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/deberta_v2/tokenization_deberta_v2.py#L267"}}),us=new Se({}),gs=new Q({props:{name:"class transformers.DebertaV2TokenizerFast",anchor:"transformers.DebertaV2TokenizerFast",parameters:[{name:"vocab_file",val:" = None"},{name:"tokenizer_file",val:" = None"},{name:"do_lower_case",val:" = False"},{name:"split_by_punct",val:" = False"},{name:"bos_token",val:" = '[CLS]'"},{name:"eos_token",val:" = '[SEP]'"},{name:"unk_token",val:" = '[UNK]'"},{name:"sep_token",val:" = '[SEP]'"},{name:"pad_token",val:" = '[PAD]'"},{name:"cls_token",val:" = '[CLS]'"},{name:"mask_token",val:" = '[MASK]'"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.DebertaV2TokenizerFast.vocab_file",description:`<strong>vocab_file</strong> (<code>str</code>) &#x2014;
<a href="https://github.com/google/sentencepiece" rel="nofollow">SentencePiece</a> file (generally has a <em>.spm</em> extension) that
contains the vocabulary necessary to instantiate a tokenizer.`,name:"vocab_file"},{anchor:"transformers.DebertaV2TokenizerFast.do_lower_case",description:`<strong>do_lower_case</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to lowercase the input when tokenizing.`,name:"do_lower_case"},{anchor:"transformers.DebertaV2TokenizerFast.bos_token",description:`<strong>bos_token</strong> (<code>string</code>, <em>optional</em>, defaults to <code>&quot;[CLS]&quot;</code>) &#x2014;
The beginning of sequence token that was used during pre-training. Can be used a sequence classifier token.
When building a sequence using special tokens, this is not the token that is used for the beginning of
sequence. The token used is the <code>cls_token</code>.`,name:"bos_token"},{anchor:"transformers.DebertaV2TokenizerFast.eos_token",description:`<strong>eos_token</strong> (<code>string</code>, <em>optional</em>, defaults to <code>&quot;[SEP]&quot;</code>) &#x2014;
The end of sequence token. When building a sequence using special tokens, this is not the token that is
used for the end of sequence. The token used is the <code>sep_token</code>.`,name:"eos_token"},{anchor:"transformers.DebertaV2TokenizerFast.unk_token",description:`<strong>unk_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;[UNK]&quot;</code>) &#x2014;
The unknown token. A token that is not in the vocabulary cannot be converted to an ID and is set to be this
token instead.`,name:"unk_token"},{anchor:"transformers.DebertaV2TokenizerFast.sep_token",description:`<strong>sep_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;[SEP]&quot;</code>) &#x2014;
The separator token, which is used when building a sequence from multiple sequences, e.g. two sequences for
sequence classification or for a text and a question for question answering. It is also used as the last
token of a sequence built with special tokens.`,name:"sep_token"},{anchor:"transformers.DebertaV2TokenizerFast.pad_token",description:`<strong>pad_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;[PAD]&quot;</code>) &#x2014;
The token used for padding, for example when batching sequences of different lengths.`,name:"pad_token"},{anchor:"transformers.DebertaV2TokenizerFast.cls_token",description:`<strong>cls_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;[CLS]&quot;</code>) &#x2014;
The classifier token which is used when doing sequence classification (classification of the whole sequence
instead of per-token classification). It is the first token of the sequence when built with special tokens.`,name:"cls_token"},{anchor:"transformers.DebertaV2TokenizerFast.mask_token",description:`<strong>mask_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;[MASK]&quot;</code>) &#x2014;
The token used for masking values. This is the token used when training this model with masked language
modeling. This is the token which the model will try to predict.`,name:"mask_token"},{anchor:"transformers.DebertaV2TokenizerFast.sp_model_kwargs",description:`<strong>sp_model_kwargs</strong> (<code>dict</code>, <em>optional</em>) &#x2014;
Will be passed to the <code>SentencePieceProcessor.__init__()</code> method. The <a href="https://github.com/google/sentencepiece/tree/master/python" rel="nofollow">Python wrapper for
SentencePiece</a> can be used, among other things,
to set:</p>
<ul>
<li>
<p><code>enable_sampling</code>: Enable subword regularization.</p>
</li>
<li>
<p><code>nbest_size</code>: Sampling parameters for unigram. Invalid for BPE-Dropout.</p>
<ul>
<li><code>nbest_size = {0,1}</code>: No sampling is performed.</li>
<li><code>nbest_size &gt; 1</code>: samples from the nbest_size results.</li>
<li><code>nbest_size &lt; 0</code>: assuming that nbest_size is infinite and samples from the all hypothesis (lattice)
using forward-filtering-and-backward-sampling algorithm.</li>
</ul>
</li>
<li>
<p><code>alpha</code>: Smoothing parameter for unigram sampling, and dropout probability of merge operations for
BPE-dropout.</p>
</li>
</ul>`,name:"sp_model_kwargs"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/deberta_v2/tokenization_deberta_v2_fast.py#L63"}}),ks=new Q({props:{name:"build_inputs_with_special_tokens",anchor:"transformers.DebertaV2TokenizerFast.build_inputs_with_special_tokens",parameters:[{name:"token_ids_0",val:""},{name:"token_ids_1",val:" = None"}],parametersDescription:[{anchor:"transformers.DebertaV2TokenizerFast.build_inputs_with_special_tokens.token_ids_0",description:`<strong>token_ids_0</strong> (<code>List[int]</code>) &#x2014;
List of IDs to which the special tokens will be added.`,name:"token_ids_0"},{anchor:"transformers.DebertaV2TokenizerFast.build_inputs_with_special_tokens.token_ids_1",description:`<strong>token_ids_1</strong> (<code>List[int]</code>, <em>optional</em>) &#x2014;
Optional second list of IDs for sequence pairs.`,name:"token_ids_1"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/deberta_v2/tokenization_deberta_v2_fast.py#L153",returnDescription:`
<p>List of <a href="../glossary#input-ids">input IDs</a> with the appropriate special tokens.</p>
`,returnType:`
<p><code>List[int]</code></p>
`}}),ws=new Q({props:{name:"create_token_type_ids_from_sequences",anchor:"transformers.DebertaV2TokenizerFast.create_token_type_ids_from_sequences",parameters:[{name:"token_ids_0",val:""},{name:"token_ids_1",val:" = None"}],parametersDescription:[{anchor:"transformers.DebertaV2TokenizerFast.create_token_type_ids_from_sequences.token_ids_0",description:`<strong>token_ids_0</strong> (<code>List[int]</code>) &#x2014;
List of IDs.`,name:"token_ids_0"},{anchor:"transformers.DebertaV2TokenizerFast.create_token_type_ids_from_sequences.token_ids_1",description:`<strong>token_ids_1</strong> (<code>List[int]</code>, <em>optional</em>) &#x2014;
Optional second list of IDs for sequence pairs.`,name:"token_ids_1"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/deberta_v2/tokenization_deberta_v2_fast.py#L203",returnDescription:`
<p>List of <a href="../glossary#token-type-ids">token type IDs</a> according to the given sequence(s).</p>
`,returnType:`
<p><code>List[int]</code></p>
`}}),Wo=new Oe({props:{anchor:"transformers.DebertaV2TokenizerFast.create_token_type_ids_from_sequences.example",$$slots:{default:[Q2]},$$scope:{ctx:x}}}),Ts=new Se({}),ys=new Q({props:{name:"class transformers.DebertaV2Model",anchor:"transformers.DebertaV2Model",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.DebertaV2Model.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.29.0/en/model_doc/deberta-v2#transformers.DebertaV2Config">DebertaV2Config</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.29.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/deberta_v2/modeling_deberta_v2.py#L1012"}}),qs=new Q({props:{name:"forward",anchor:"transformers.DebertaV2Model.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:"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.DebertaV2Model.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.29.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__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.DebertaV2Model.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.DebertaV2Model.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.DebertaV2Model.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.DebertaV2Model.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.DebertaV2Model.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.DebertaV2Model.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.DebertaV2Model.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.29.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/deberta_v2/modeling_deberta_v2.py#L1036",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.29.0/en/main_classes/output#transformers.modeling_outputs.BaseModelOutput"
>transformers.modeling_outputs.BaseModelOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.29.0/en/model_doc/deberta-v2#transformers.DebertaV2Config"
>DebertaV2Config</a>) and inputs.</p>
<ul>
<li>
<p><strong>last_hidden_state</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>) \u2014 Sequence of hidden-states at the output of the last layer of the model.</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.29.0/en/main_classes/output#transformers.modeling_outputs.BaseModelOutput"
>transformers.modeling_outputs.BaseModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Uo=new ot({props:{$$slots:{default:[G2]},$$scope:{ctx:x}}}),Ko=new Oe({props:{anchor:"transformers.DebertaV2Model.forward.example",$$slots:{default:[J2]},$$scope:{ctx:x}}}),xs=new Se({}),zs=new Q({props:{name:"class transformers.DebertaV2PreTrainedModel",anchor:"transformers.DebertaV2PreTrainedModel",parameters:[{name:"config",val:": PretrainedConfig"},{name:"*inputs",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/deberta_v2/modeling_deberta_v2.py#L916"}}),Vs=new Q({props:{name:"_forward_unimplemented",anchor:"transformers.DebertaV2PreTrainedModel.forward",parameters:[{name:"*input",val:": typing.Any"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/torch/nn/modules/module.py#L352"}}),Go=new ot({props:{$$slots:{default:[X2]},$$scope:{ctx:x}}}),Ms=new Se({}),js=new Q({props:{name:"class transformers.DebertaV2ForMaskedLM",anchor:"transformers.DebertaV2ForMaskedLM",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.DebertaV2ForMaskedLM.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.29.0/en/model_doc/deberta-v2#transformers.DebertaV2Config">DebertaV2Config</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.29.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/deberta_v2/modeling_deberta_v2.py#L1123"}}),Rs=new Q({props:{name:"forward",anchor:"transformers.DebertaV2ForMaskedLM.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:"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.DebertaV2ForMaskedLM.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.29.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__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.DebertaV2ForMaskedLM.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.DebertaV2ForMaskedLM.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.DebertaV2ForMaskedLM.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.DebertaV2ForMaskedLM.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.DebertaV2ForMaskedLM.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.DebertaV2ForMaskedLM.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.DebertaV2ForMaskedLM.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.29.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.DebertaV2ForMaskedLM.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Labels for computing the masked language modeling loss. Indices should be in <code>[-100, 0, ..., config.vocab_size]</code> (see <code>input_ids</code> docstring) Tokens with indices set to <code>-100</code> are ignored (masked), the
loss is only computed for the tokens with labels in <code>[0, ..., config.vocab_size]</code>`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/deberta_v2/modeling_deberta_v2.py#L1142",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.29.0/en/main_classes/output#transformers.modeling_outputs.MaskedLMOutput"
>transformers.modeling_outputs.MaskedLMOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.29.0/en/model_doc/deberta-v2#transformers.DebertaV2Config"
>DebertaV2Config</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Masked language modeling (MLM) loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, config.vocab_size)</code>) \u2014 Prediction scores of the language modeling head (scores for each vocabulary token before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.29.0/en/main_classes/output#transformers.modeling_outputs.MaskedLMOutput"
>transformers.modeling_outputs.MaskedLMOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Xo=new ot({props:{$$slots:{default:[Y2]},$$scope:{ctx:x}}}),Yo=new Oe({props:{anchor:"transformers.DebertaV2ForMaskedLM.forward.example",$$slots:{default:[Z2]},$$scope:{ctx:x}}}),Bs=new Se({}),Is=new Q({props:{name:"class transformers.DebertaV2ForSequenceClassification",anchor:"transformers.DebertaV2ForSequenceClassification",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.DebertaV2ForSequenceClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.29.0/en/model_doc/deberta-v2#transformers.DebertaV2Config">DebertaV2Config</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.29.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/deberta_v2/modeling_deberta_v2.py#L1259"}}),Ws=new Q({props:{name:"forward",anchor:"transformers.DebertaV2ForSequenceClassification.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:"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.DebertaV2ForSequenceClassification.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.29.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__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.DebertaV2ForSequenceClassification.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.DebertaV2ForSequenceClassification.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.DebertaV2ForSequenceClassification.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.DebertaV2ForSequenceClassification.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.DebertaV2ForSequenceClassification.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.DebertaV2ForSequenceClassification.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.DebertaV2ForSequenceClassification.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.29.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.DebertaV2ForSequenceClassification.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for computing the sequence classification/regression loss. Indices should be in <code>[0, ..., config.num_labels - 1]</code>. If <code>config.num_labels == 1</code> a regression loss is computed (Mean-Square loss), If
<code>config.num_labels &gt; 1</code> a classification loss is computed (Cross-Entropy).`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/deberta_v2/modeling_deberta_v2.py#L1284",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.29.0/en/main_classes/output#transformers.modeling_outputs.SequenceClassifierOutput"
>transformers.modeling_outputs.SequenceClassifierOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.29.0/en/model_doc/deberta-v2#transformers.DebertaV2Config"
>DebertaV2Config</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Classification (or regression if config.num_labels==1) loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, config.num_labels)</code>) \u2014 Classification (or regression if config.num_labels==1) scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.29.0/en/main_classes/output#transformers.modeling_outputs.SequenceClassifierOutput"
>transformers.modeling_outputs.SequenceClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),en=new ot({props:{$$slots:{default:[ek]},$$scope:{ctx:x}}}),tn=new Oe({props:{anchor:"transformers.DebertaV2ForSequenceClassification.forward.example",$$slots:{default:[tk]},$$scope:{ctx:x}}}),on=new Oe({props:{anchor:"transformers.DebertaV2ForSequenceClassification.forward.example-2",$$slots:{default:[ok]},$$scope:{ctx:x}}}),Hs=new Se({}),Us=new Q({props:{name:"class transformers.DebertaV2ForTokenClassification",anchor:"transformers.DebertaV2ForTokenClassification",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.DebertaV2ForTokenClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.29.0/en/model_doc/deberta-v2#transformers.DebertaV2Config">DebertaV2Config</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.29.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/deberta_v2/modeling_deberta_v2.py#L1379"}}),Xs=new Q({props:{name:"forward",anchor:"transformers.DebertaV2ForTokenClassification.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:"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.DebertaV2ForTokenClassification.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.29.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__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.DebertaV2ForTokenClassification.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.DebertaV2ForTokenClassification.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.DebertaV2ForTokenClassification.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.DebertaV2ForTokenClassification.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.DebertaV2ForTokenClassification.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.DebertaV2ForTokenClassification.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.DebertaV2ForTokenClassification.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.29.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.DebertaV2ForTokenClassification.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Labels for computing the token classification loss. Indices should be in <code>[0, ..., config.num_labels - 1]</code>.`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/deberta_v2/modeling_deberta_v2.py#L1393",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.29.0/en/main_classes/output#transformers.modeling_outputs.TokenClassifierOutput"
>transformers.modeling_outputs.TokenClassifierOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.29.0/en/model_doc/deberta-v2#transformers.DebertaV2Config"
>DebertaV2Config</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided)  \u2014 Classification loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, config.num_labels)</code>) \u2014 Classification scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.29.0/en/main_classes/output#transformers.modeling_outputs.TokenClassifierOutput"
>transformers.modeling_outputs.TokenClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),sn=new ot({props:{$$slots:{default:[nk]},$$scope:{ctx:x}}}),an=new Oe({props:{anchor:"transformers.DebertaV2ForTokenClassification.forward.example",$$slots:{default:[sk]},$$scope:{ctx:x}}}),Ys=new Se({}),Zs=new Q({props:{name:"class transformers.DebertaV2ForQuestionAnswering",anchor:"transformers.DebertaV2ForQuestionAnswering",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.DebertaV2ForQuestionAnswering.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.29.0/en/model_doc/deberta-v2#transformers.DebertaV2Config">DebertaV2Config</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.29.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/deberta_v2/modeling_deberta_v2.py#L1454"}}),sa=new Q({props:{name:"forward",anchor:"transformers.DebertaV2ForQuestionAnswering.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:"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.DebertaV2ForQuestionAnswering.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.29.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__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.DebertaV2ForQuestionAnswering.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.DebertaV2ForQuestionAnswering.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.DebertaV2ForQuestionAnswering.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.DebertaV2ForQuestionAnswering.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.DebertaV2ForQuestionAnswering.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.DebertaV2ForQuestionAnswering.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.DebertaV2ForQuestionAnswering.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.29.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.DebertaV2ForQuestionAnswering.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.DebertaV2ForQuestionAnswering.forward.end_positions",description:`<strong>end_positions</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for position (index) of the end of the labelled span for computing the token classification loss.
Positions are clamped to the length of the sequence (<code>sequence_length</code>). Position outside of the sequence
are not taken into account for computing the loss.`,name:"end_positions"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/deberta_v2/modeling_deberta_v2.py#L1467",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.29.0/en/main_classes/output#transformers.modeling_outputs.QuestionAnsweringModelOutput"
>transformers.modeling_outputs.QuestionAnsweringModelOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.29.0/en/model_doc/deberta-v2#transformers.DebertaV2Config"
>DebertaV2Config</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Total span extraction loss is the sum of a Cross-Entropy for the start and end positions.</p>
</li>
<li>
<p><strong>start_logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>) \u2014 Span-start scores (before SoftMax).</p>
</li>
<li>
<p><strong>end_logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>) \u2014 Span-end scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.29.0/en/main_classes/output#transformers.modeling_outputs.QuestionAnsweringModelOutput"
>transformers.modeling_outputs.QuestionAnsweringModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),ln=new ot({props:{$$slots:{default:[ak]},$$scope:{ctx:x}}}),dn=new Oe({props:{anchor:"transformers.DebertaV2ForQuestionAnswering.forward.example",$$slots:{default:[rk]},$$scope:{ctx:x}}}),aa=new Se({}),ra=new Q({props:{name:"class transformers.DebertaV2ForMultipleChoice",anchor:"transformers.DebertaV2ForMultipleChoice",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.DebertaV2ForMultipleChoice.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.29.0/en/model_doc/deberta-v2#transformers.DebertaV2Config">DebertaV2Config</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.29.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/deberta_v2/modeling_deberta_v2.py#L1556"}}),pa=new Q({props:{name:"forward",anchor:"transformers.DebertaV2ForMultipleChoice.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:"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.DebertaV2ForMultipleChoice.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.29.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__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.DebertaV2ForMultipleChoice.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.DebertaV2ForMultipleChoice.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.DebertaV2ForMultipleChoice.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.DebertaV2ForMultipleChoice.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.DebertaV2ForMultipleChoice.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.DebertaV2ForMultipleChoice.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.DebertaV2ForMultipleChoice.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.29.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.DebertaV2ForMultipleChoice.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for computing the multiple choice classification loss. Indices should be in <code>[0, ..., num_choices-1]</code> where <code>num_choices</code> is the size of the second dimension of the input tensors. (See
<code>input_ids</code> above)`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/deberta_v2/modeling_deberta_v2.py#L1580",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.29.0/en/main_classes/output#transformers.modeling_outputs.MultipleChoiceModelOutput"
>transformers.modeling_outputs.MultipleChoiceModelOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.29.0/en/model_doc/deberta-v2#transformers.DebertaV2Config"
>DebertaV2Config</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <em>(1,)</em>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Classification loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_choices)</code>) \u2014 <em>num_choices</em> is the second dimension of the input tensors. (see <em>input_ids</em> above).</p>
<p>Classification scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.29.0/en/main_classes/output#transformers.modeling_outputs.MultipleChoiceModelOutput"
>transformers.modeling_outputs.MultipleChoiceModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),pn=new ot({props:{$$slots:{default:[ik]},$$scope:{ctx:x}}}),hn=new Oe({props:{anchor:"transformers.DebertaV2ForMultipleChoice.forward.example",$$slots:{default:[lk]},$$scope:{ctx:x}}}),ha=new Se({}),fa=new Q({props:{name:"class transformers.TFDebertaV2Model",anchor:"transformers.TFDebertaV2Model",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFDebertaV2Model.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.29.0/en/model_doc/deberta-v2#transformers.DebertaV2Config">DebertaV2Config</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.29.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/deberta_v2/modeling_tf_deberta_v2.py#L1183"}}),mn=new ot({props:{$$slots:{default:[dk]},$$scope:{ctx:x}}}),ba=new Q({props:{name:"call",anchor:"transformers.TFDebertaV2Model.call",parameters:[{name:"input_ids",val:": typing.Union[typing.List[tensorflow.python.framework.ops.Tensor], typing.List[numpy.ndarray], typing.List[keras.engine.keras_tensor.KerasTensor], typing.Dict[str, tensorflow.python.framework.ops.Tensor], typing.Dict[str, numpy.ndarray], typing.Dict[str, keras.engine.keras_tensor.KerasTensor], tensorflow.python.framework.ops.Tensor, numpy.ndarray, keras.engine.keras_tensor.KerasTensor, NoneType] = None"},{name:"attention_mask",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"token_type_ids",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"position_ids",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"inputs_embeds",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"},{name:"training",val:": typing.Optional[bool] = False"}],parametersDescription:[{anchor:"transformers.TFDebertaV2Model.call.input_ids",description:`<strong>input_ids</strong> (<code>np.ndarray</code>, <code>tf.Tensor</code>, <code>List[tf.Tensor]</code> \`<code>Dict[str, tf.Tensor]</code> or <code>Dict[str, np.ndarray]</code> and each example must have the shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.29.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__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.TFDebertaV2Model.call.attention_mask",description:`<strong>attention_mask</strong> (<code>np.ndarray</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.TFDebertaV2Model.call.token_type_ids",description:`<strong>token_type_ids</strong> (<code>np.ndarray</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.TFDebertaV2Model.call.position_ids",description:`<strong>position_ids</strong> (<code>np.ndarray</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.TFDebertaV2Model.call.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>np.ndarray</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <em>input_ids</em> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.TFDebertaV2Model.call.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.TFDebertaV2Model.call.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.TFDebertaV2Model.call.return_dict",description:"<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;\nWhether or not to return a [`~utils.ModelOutput&#x201C;] instead of a plain tuple.",name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/deberta_v2/modeling_tf_deberta_v2.py#L1189",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.29.0/en/main_classes/output#transformers.modeling_tf_outputs.TFBaseModelOutput"
>transformers.modeling_tf_outputs.TFBaseModelOutput</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/v4.29.0/en/model_doc/deberta-v2#transformers.DebertaV2Config"
>DebertaV2Config</a>) and inputs.</p>
<ul>
<li>
<p><strong>last_hidden_state</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>) \u2014 Sequence of hidden-states at the output of the last layer of the model.</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(tf.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.29.0/en/main_classes/output#transformers.modeling_tf_outputs.TFBaseModelOutput"
>transformers.modeling_tf_outputs.TFBaseModelOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),un=new ot({props:{$$slots:{default:[ck]},$$scope:{ctx:x}}}),gn=new Oe({props:{anchor:"transformers.TFDebertaV2Model.call.example",$$slots:{default:[pk]},$$scope:{ctx:x}}}),ka=new Se({}),va=new Q({props:{name:"class transformers.TFDebertaV2PreTrainedModel",anchor:"transformers.TFDebertaV2PreTrainedModel",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/deberta_v2/modeling_tf_deberta_v2.py#L1082"}}),wa=new Q({props:{name:"call",anchor:"transformers.TFDebertaV2PreTrainedModel.call",parameters:[{name:"inputs",val:""},{name:"training",val:" = None"},{name:"mask",val:" = None"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/keras/engine/training.py#L563",returnDescription:`
<p>A tensor if there is a single output, or
a list of tensors if there are more than one outputs.</p>
`}}),ya=new Se({}),$a=new Q({props:{name:"class transformers.TFDebertaV2ForMaskedLM",anchor:"transformers.TFDebertaV2ForMaskedLM",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFDebertaV2ForMaskedLM.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.29.0/en/model_doc/deberta-v2#transformers.DebertaV2Config">DebertaV2Config</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.29.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/deberta_v2/modeling_tf_deberta_v2.py#L1231"}}),kn=new ot({props:{$$slots:{default:[hk]},$$scope:{ctx:x}}}),qa=new Q({props:{name:"call",anchor:"transformers.TFDebertaV2ForMaskedLM.call",parameters:[{name:"input_ids",val:": typing.Union[typing.List[tensorflow.python.framework.ops.Tensor], typing.List[numpy.ndarray], typing.List[keras.engine.keras_tensor.KerasTensor], typing.Dict[str, tensorflow.python.framework.ops.Tensor], typing.Dict[str, numpy.ndarray], typing.Dict[str, keras.engine.keras_tensor.KerasTensor], tensorflow.python.framework.ops.Tensor, numpy.ndarray, keras.engine.keras_tensor.KerasTensor, NoneType] = None"},{name:"attention_mask",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"token_type_ids",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"position_ids",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"inputs_embeds",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"},{name:"labels",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"training",val:": typing.Optional[bool] = False"}],parametersDescription:[{anchor:"transformers.TFDebertaV2ForMaskedLM.call.input_ids",description:`<strong>input_ids</strong> (<code>np.ndarray</code>, <code>tf.Tensor</code>, <code>List[tf.Tensor]</code> \`<code>Dict[str, tf.Tensor]</code> or <code>Dict[str, np.ndarray]</code> and each example must have the shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.29.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__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.TFDebertaV2ForMaskedLM.call.attention_mask",description:`<strong>attention_mask</strong> (<code>np.ndarray</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.TFDebertaV2ForMaskedLM.call.token_type_ids",description:`<strong>token_type_ids</strong> (<code>np.ndarray</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.TFDebertaV2ForMaskedLM.call.position_ids",description:`<strong>position_ids</strong> (<code>np.ndarray</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.TFDebertaV2ForMaskedLM.call.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>np.ndarray</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <em>input_ids</em> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.TFDebertaV2ForMaskedLM.call.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.TFDebertaV2ForMaskedLM.call.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.TFDebertaV2ForMaskedLM.call.return_dict",description:"<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;\nWhether or not to return a [`~utils.ModelOutput&#x201C;] instead of a plain tuple.",name:"return_dict"},{anchor:"transformers.TFDebertaV2ForMaskedLM.call.labels",description:`<strong>labels</strong> (<code>tf.Tensor</code> or <code>np.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Labels for computing the masked language modeling loss. Indices should be in <code>[-100, 0, ..., config.vocab_size]</code> (see <code>input_ids</code> docstring) Tokens with indices set to <code>-100</code> are ignored (masked), the
loss is only computed for the tokens with labels in <code>[0, ..., config.vocab_size]</code>`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/deberta_v2/modeling_tf_deberta_v2.py#L1247",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.29.0/en/main_classes/output#transformers.modeling_tf_outputs.TFMaskedLMOutput"
>transformers.modeling_tf_outputs.TFMaskedLMOutput</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/v4.29.0/en/model_doc/deberta-v2#transformers.DebertaV2Config"
>DebertaV2Config</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>tf.Tensor</code> of shape <code>(n,)</code>, <em>optional</em>, where n is the number of non-masked labels, returned when <code>labels</code> is provided) \u2014 Masked language modeling (MLM) loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, config.vocab_size)</code>) \u2014 Prediction scores of the language modeling head (scores for each vocabulary token before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.29.0/en/main_classes/output#transformers.modeling_tf_outputs.TFMaskedLMOutput"
>transformers.modeling_tf_outputs.TFMaskedLMOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),vn=new ot({props:{$$slots:{default:[fk]},$$scope:{ctx:x}}}),wn=new Oe({props:{anchor:"transformers.TFDebertaV2ForMaskedLM.call.example",$$slots:{default:[mk]},$$scope:{ctx:x}}}),Tn=new Oe({props:{anchor:"transformers.TFDebertaV2ForMaskedLM.call.example-2",$$slots:{default:[uk]},$$scope:{ctx:x}}}),xa=new Se({}),za=new Q({props:{name:"class transformers.TFDebertaV2ForSequenceClassification",anchor:"transformers.TFDebertaV2ForSequenceClassification",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFDebertaV2ForSequenceClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.29.0/en/model_doc/deberta-v2#transformers.DebertaV2Config">DebertaV2Config</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.29.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/deberta_v2/modeling_tf_deberta_v2.py#L1314"}}),$n=new ot({props:{$$slots:{default:[gk]},$$scope:{ctx:x}}}),Aa=new Q({props:{name:"call",anchor:"transformers.TFDebertaV2ForSequenceClassification.call",parameters:[{name:"input_ids",val:": typing.Union[typing.List[tensorflow.python.framework.ops.Tensor], typing.List[numpy.ndarray], typing.List[keras.engine.keras_tensor.KerasTensor], typing.Dict[str, tensorflow.python.framework.ops.Tensor], typing.Dict[str, numpy.ndarray], typing.Dict[str, keras.engine.keras_tensor.KerasTensor], tensorflow.python.framework.ops.Tensor, numpy.ndarray, keras.engine.keras_tensor.KerasTensor, NoneType] = None"},{name:"attention_mask",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"token_type_ids",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"position_ids",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"inputs_embeds",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"},{name:"labels",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"training",val:": typing.Optional[bool] = False"}],parametersDescription:[{anchor:"transformers.TFDebertaV2ForSequenceClassification.call.input_ids",description:`<strong>input_ids</strong> (<code>np.ndarray</code>, <code>tf.Tensor</code>, <code>List[tf.Tensor]</code> \`<code>Dict[str, tf.Tensor]</code> or <code>Dict[str, np.ndarray]</code> and each example must have the shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.29.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__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.TFDebertaV2ForSequenceClassification.call.attention_mask",description:`<strong>attention_mask</strong> (<code>np.ndarray</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.TFDebertaV2ForSequenceClassification.call.token_type_ids",description:`<strong>token_type_ids</strong> (<code>np.ndarray</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.TFDebertaV2ForSequenceClassification.call.position_ids",description:`<strong>position_ids</strong> (<code>np.ndarray</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.TFDebertaV2ForSequenceClassification.call.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>np.ndarray</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <em>input_ids</em> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.TFDebertaV2ForSequenceClassification.call.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.TFDebertaV2ForSequenceClassification.call.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.TFDebertaV2ForSequenceClassification.call.return_dict",description:"<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;\nWhether or not to return a [`~utils.ModelOutput&#x201C;] instead of a plain tuple.",name:"return_dict"},{anchor:"transformers.TFDebertaV2ForSequenceClassification.call.labels",description:`<strong>labels</strong> (<code>tf.Tensor</code> or <code>np.ndarray</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for computing the sequence classification/regression loss. Indices should be in <code>[0, ..., config.num_labels - 1]</code>. If <code>config.num_labels == 1</code> a regression loss is computed (Mean-Square loss), If
<code>config.num_labels &gt; 1</code> a classification loss is computed (Cross-Entropy).`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/deberta_v2/modeling_tf_deberta_v2.py#L1332",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.29.0/en/main_classes/output#transformers.modeling_tf_outputs.TFSequenceClassifierOutput"
>transformers.modeling_tf_outputs.TFSequenceClassifierOutput</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/v4.29.0/en/model_doc/deberta-v2#transformers.DebertaV2Config"
>DebertaV2Config</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, )</code>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Classification (or regression if config.num_labels==1) loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, config.num_labels)</code>) \u2014 Classification (or regression if config.num_labels==1) scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.29.0/en/main_classes/output#transformers.modeling_tf_outputs.TFSequenceClassifierOutput"
>transformers.modeling_tf_outputs.TFSequenceClassifierOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),Dn=new ot({props:{$$slots:{default:[_k]},$$scope:{ctx:x}}}),En=new Oe({props:{anchor:"transformers.TFDebertaV2ForSequenceClassification.call.example",$$slots:{default:[bk]},$$scope:{ctx:x}}}),Fn=new Oe({props:{anchor:"transformers.TFDebertaV2ForSequenceClassification.call.example-2",$$slots:{default:[kk]},$$scope:{ctx:x}}}),Pa=new Se({}),Ra=new Q({props:{name:"class transformers.TFDebertaV2ForTokenClassification",anchor:"transformers.TFDebertaV2ForTokenClassification",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFDebertaV2ForTokenClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.29.0/en/model_doc/deberta-v2#transformers.DebertaV2Config">DebertaV2Config</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.29.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/deberta_v2/modeling_tf_deberta_v2.py#L1402"}}),xn=new ot({props:{$$slots:{default:[vk]},$$scope:{ctx:x}}}),Oa=new Q({props:{name:"call",anchor:"transformers.TFDebertaV2ForTokenClassification.call",parameters:[{name:"input_ids",val:": typing.Union[typing.List[tensorflow.python.framework.ops.Tensor], typing.List[numpy.ndarray], typing.List[keras.engine.keras_tensor.KerasTensor], typing.Dict[str, tensorflow.python.framework.ops.Tensor], typing.Dict[str, numpy.ndarray], typing.Dict[str, keras.engine.keras_tensor.KerasTensor], tensorflow.python.framework.ops.Tensor, numpy.ndarray, keras.engine.keras_tensor.KerasTensor, NoneType] = None"},{name:"attention_mask",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"token_type_ids",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"position_ids",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"inputs_embeds",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"},{name:"labels",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"training",val:": typing.Optional[bool] = False"}],parametersDescription:[{anchor:"transformers.TFDebertaV2ForTokenClassification.call.input_ids",description:`<strong>input_ids</strong> (<code>np.ndarray</code>, <code>tf.Tensor</code>, <code>List[tf.Tensor]</code> \`<code>Dict[str, tf.Tensor]</code> or <code>Dict[str, np.ndarray]</code> and each example must have the shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.29.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__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.TFDebertaV2ForTokenClassification.call.attention_mask",description:`<strong>attention_mask</strong> (<code>np.ndarray</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.TFDebertaV2ForTokenClassification.call.token_type_ids",description:`<strong>token_type_ids</strong> (<code>np.ndarray</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.TFDebertaV2ForTokenClassification.call.position_ids",description:`<strong>position_ids</strong> (<code>np.ndarray</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.TFDebertaV2ForTokenClassification.call.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>np.ndarray</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <em>input_ids</em> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.TFDebertaV2ForTokenClassification.call.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.TFDebertaV2ForTokenClassification.call.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.TFDebertaV2ForTokenClassification.call.return_dict",description:"<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;\nWhether or not to return a [`~utils.ModelOutput&#x201C;] instead of a plain tuple.",name:"return_dict"},{anchor:"transformers.TFDebertaV2ForTokenClassification.call.labels",description:`<strong>labels</strong> (<code>tf.Tensor</code> or <code>np.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Labels for computing the token classification loss. Indices should be in <code>[0, ..., config.num_labels - 1]</code>.`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/deberta_v2/modeling_tf_deberta_v2.py#L1414",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.29.0/en/main_classes/output#transformers.modeling_tf_outputs.TFTokenClassifierOutput"
>transformers.modeling_tf_outputs.TFTokenClassifierOutput</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/v4.29.0/en/model_doc/deberta-v2#transformers.DebertaV2Config"
>DebertaV2Config</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>tf.Tensor</code> of shape <code>(n,)</code>, <em>optional</em>, where n is the number of unmasked labels, returned when <code>labels</code> is provided)  \u2014 Classification loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, config.num_labels)</code>) \u2014 Classification scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.29.0/en/main_classes/output#transformers.modeling_tf_outputs.TFTokenClassifierOutput"
>transformers.modeling_tf_outputs.TFTokenClassifierOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),zn=new ot({props:{$$slots:{default:[wk]},$$scope:{ctx:x}}}),Vn=new Oe({props:{anchor:"transformers.TFDebertaV2ForTokenClassification.call.example",$$slots:{default:[Tk]},$$scope:{ctx:x}}}),Mn=new Oe({props:{anchor:"transformers.TFDebertaV2ForTokenClassification.call.example-2",$$slots:{default:[yk]},$$scope:{ctx:x}}}),Na=new Se({}),Wa=new Q({props:{name:"class transformers.TFDebertaV2ForQuestionAnswering",anchor:"transformers.TFDebertaV2ForQuestionAnswering",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFDebertaV2ForQuestionAnswering.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.29.0/en/model_doc/deberta-v2#transformers.DebertaV2Config">DebertaV2Config</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.29.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/deberta_v2/modeling_tf_deberta_v2.py#L1480"}}),Cn=new ot({props:{$$slots:{default:[$k]},$$scope:{ctx:x}}}),Ga=new Q({props:{name:"call",anchor:"transformers.TFDebertaV2ForQuestionAnswering.call",parameters:[{name:"input_ids",val:": typing.Union[typing.List[tensorflow.python.framework.ops.Tensor], typing.List[numpy.ndarray], typing.List[keras.engine.keras_tensor.KerasTensor], typing.Dict[str, tensorflow.python.framework.ops.Tensor], typing.Dict[str, numpy.ndarray], typing.Dict[str, keras.engine.keras_tensor.KerasTensor], tensorflow.python.framework.ops.Tensor, numpy.ndarray, keras.engine.keras_tensor.KerasTensor, NoneType] = None"},{name:"attention_mask",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"token_type_ids",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"position_ids",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"inputs_embeds",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"},{name:"start_positions",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"end_positions",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"training",val:": typing.Optional[bool] = False"}],parametersDescription:[{anchor:"transformers.TFDebertaV2ForQuestionAnswering.call.input_ids",description:`<strong>input_ids</strong> (<code>np.ndarray</code>, <code>tf.Tensor</code>, <code>List[tf.Tensor]</code> \`<code>Dict[str, tf.Tensor]</code> or <code>Dict[str, np.ndarray]</code> and each example must have the shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.29.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__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.TFDebertaV2ForQuestionAnswering.call.attention_mask",description:`<strong>attention_mask</strong> (<code>np.ndarray</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.TFDebertaV2ForQuestionAnswering.call.token_type_ids",description:`<strong>token_type_ids</strong> (<code>np.ndarray</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.TFDebertaV2ForQuestionAnswering.call.position_ids",description:`<strong>position_ids</strong> (<code>np.ndarray</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.TFDebertaV2ForQuestionAnswering.call.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>np.ndarray</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <em>input_ids</em> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.TFDebertaV2ForQuestionAnswering.call.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.TFDebertaV2ForQuestionAnswering.call.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.TFDebertaV2ForQuestionAnswering.call.return_dict",description:"<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;\nWhether or not to return a [`~utils.ModelOutput&#x201C;] instead of a plain tuple.",name:"return_dict"},{anchor:"transformers.TFDebertaV2ForQuestionAnswering.call.start_positions",description:`<strong>start_positions</strong> (<code>tf.Tensor</code> or <code>np.ndarray</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.TFDebertaV2ForQuestionAnswering.call.end_positions",description:`<strong>end_positions</strong> (<code>tf.Tensor</code> or <code>np.ndarray</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for position (index) of the end of the labelled span for computing the token classification loss.
Positions are clamped to the length of the sequence (<code>sequence_length</code>). Position outside of the sequence
are not taken into account for computing the loss.`,name:"end_positions"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/deberta_v2/modeling_tf_deberta_v2.py#L1491",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.29.0/en/main_classes/output#transformers.modeling_tf_outputs.TFQuestionAnsweringModelOutput"
>transformers.modeling_tf_outputs.TFQuestionAnsweringModelOutput</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/v4.29.0/en/model_doc/deberta-v2#transformers.DebertaV2Config"
>DebertaV2Config</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, )</code>, <em>optional</em>, returned when <code>start_positions</code> and <code>end_positions</code> are provided) \u2014 Total span extraction loss is the sum of a Cross-Entropy for the start and end positions.</p>
</li>
<li>
<p><strong>start_logits</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>) \u2014 Span-start scores (before SoftMax).</p>
</li>
<li>
<p><strong>end_logits</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>) \u2014 Span-end scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.29.0/en/main_classes/output#transformers.modeling_tf_outputs.TFQuestionAnsweringModelOutput"
>transformers.modeling_tf_outputs.TFQuestionAnsweringModelOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),An=new ot({props:{$$slots:{default:[Dk]},$$scope:{ctx:x}}}),Pn=new Oe({props:{anchor:"transformers.TFDebertaV2ForQuestionAnswering.call.example",$$slots:{default:[Ek]},$$scope:{ctx:x}}}),Rn=new Oe({props:{anchor:"transformers.TFDebertaV2ForQuestionAnswering.call.example-2",$$slots:{default:[Fk]},$$scope:{ctx:x}}}),{c(){d=a("meta"),k=c(),f=a("h1"),u=a("a"),v=a("span"),w(l.$$.fragment),h=c(),z=a("span"),ke=n("DeBERTa-v2"),pe=c(),B=a("h2"),ne=a("a"),oe=a("span"),w(F.$$.fragment),ve=c(),U=a("span"),we=n("Overview"),he=c(),L=a("p"),Te=n("The DeBERTa model was proposed in "),ie=a("a"),G=n("DeBERTa: Decoding-enhanced BERT with Disentangled Attention"),ye=n(` by Pengcheng He, Xiaodong Liu, Jianfeng Gao, Weizhu Chen It is based on Google\u2019s
BERT model released in 2018 and Facebook\u2019s RoBERTa model released in 2019.`),fe=c(),N=a("p"),$e=n(`It builds on RoBERTa with disentangled attention and enhanced mask decoder training with half of the data used in
RoBERTa.`),me=c(),W=a("p"),De=n("The abstract from the paper is the following:"),ue=c(),te=a("p"),M=a("em"),A=n(`Recent progress in pre-trained neural language models has significantly improved the performance of many natural
language processing (NLP) tasks. In this paper we propose a new model architecture DeBERTa (Decoding-enhanced BERT with
disentangled attention) that improves the BERT and RoBERTa models using two novel techniques. The first is the
disentangled attention mechanism, where each word is represented using two vectors that encode its content and
position, respectively, and the attention weights among words are computed using disentangled matrices on their
contents and relative positions. Second, an enhanced mask decoder is used to replace the output softmax layer to
predict the masked tokens for model pretraining. We show that these two techniques significantly improve the efficiency
of model pretraining and performance of downstream tasks. Compared to RoBERTa-Large, a DeBERTa model trained on half of
the training data performs consistently better on a wide range of NLP tasks, achieving improvements on MNLI by +0.9%
(90.2% vs. 91.1%), on SQuAD v2.0 by +2.3% (88.4% vs. 90.7%) and RACE by +3.6% (83.2% vs. 86.8%). The DeBERTa code and
pre-trained models will be made publicly available at `),le=a("a"),J=n("https://github.com/microsoft/DeBERTa"),Ee=n("."),ge=c(),I=a("p"),Fe=n("The following information is visible directly on the "),de=a("a"),P=n(`original implementation
repository`),qe=n(`. DeBERTa v2 is the second version of the DeBERTa model. It includes
the 1.5B model used for the SuperGLUE single-model submission and achieving 89.9, versus human baseline 89.8. You can
find more details about this submission in the authors\u2019
`),O=a("a"),xe=n("blog"),_e=c(),H=a("p"),ze=n("New in v2:"),be=c(),C=a("ul"),se=a("li"),K=a("strong"),Ve=n("Vocabulary"),ae=n(` In v2 the tokenizer is changed to use a new vocabulary of size 128K built from the training data.
Instead of a GPT2-based tokenizer, the tokenizer is now
`),j=a("a"),Me=n("sentencepiece-based"),R=n(" tokenizer."),je=c(),ce=a("li"),b=a("strong"),q=n("nGiE(nGram Induced Input Encoding)"),He=n(` The DeBERTa-v2 model uses an additional convolution layer aside with the first
transformer layer to better learn the local dependency of input tokens.`),re=c(),Ce=a("li"),Re=a("strong"),V=n("Sharing position projection matrix with content projection matrix in attention layer"),Ue=n(` Based on previous
experiments, this can save parameters without affecting the performance.`),Ke=c(),Ae=a("li"),Be=a("strong"),Qe=n("Apply bucket to encode relative positions"),S=n(` The DeBERTa-v2 model uses log bucket to encode relative positions
similar to T5.`),X=c(),Pe=a("li"),Ie=a("strong"),Y=n("900M model & 1.5B model"),Ge=n(` Two additional model sizes are available: 900M and 1.5B, which significantly improves the
performance of downstream tasks.`),Le=c(),Z=a("p"),Je=n("This model was contributed by "),ee=a("a"),Xe=n("DeBERTa"),bc=n(`. This model TF 2.0 implementation was
contributed by `),es=a("a"),kc=n("kamalkraj"),vc=n(". The original code can be found "),ts=a("a"),wc=n("here"),Tc=n("."),Gl=c(),Zt=a("h2"),Ro=a("a"),Gr=a("span"),w(os.$$.fragment),yc=c(),Jr=a("span"),$c=n("Documentation resources"),Jl=c(),dt=a("ul"),Xr=a("li"),tr=a("a"),Dc=n("Text classification task guide"),Ec=c(),Yr=a("li"),or=a("a"),Fc=n("Token classification task guide"),qc=c(),Zr=a("li"),nr=a("a"),xc=n("Question answering task guide"),zc=c(),ei=a("li"),sr=a("a"),Vc=n("Masked language modeling task guide"),Mc=c(),ti=a("li"),ar=a("a"),jc=n("Multiple choice task guide"),Xl=c(),eo=a("h2"),Bo=a("a"),oi=a("span"),w(ns.$$.fragment),Cc=c(),ni=a("span"),Ac=n("DebertaV2Config"),Yl=c(),ut=a("div"),w(ss.$$.fragment),Pc=c(),to=a("p"),Rc=n("This is the configuration class to store the configuration of a "),rr=a("a"),Bc=n("DebertaV2Model"),Ic=n(`. It is used to instantiate a
DeBERTa-v2 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 DeBERTa
`),as=a("a"),Lc=n("microsoft/deberta-v2-xlarge"),Sc=n(" architecture."),Oc=c(),oo=a("p"),Nc=n("Configuration objects inherit from "),ir=a("a"),Wc=n("PretrainedConfig"),Hc=n(` and can be used to control the model outputs. Read the
documentation from `),lr=a("a"),Uc=n("PretrainedConfig"),Kc=n(" for more information."),Qc=c(),w(Io.$$.fragment),Zl=c(),no=a("h2"),Lo=a("a"),si=a("span"),w(rs.$$.fragment),Gc=c(),ai=a("span"),Jc=n("DebertaV2Tokenizer"),ed=c(),Ye=a("div"),w(is.$$.fragment),Xc=c(),ls=a("p"),Yc=n("Constructs a DeBERTa-v2 tokenizer. Based on "),ds=a("a"),Zc=n("SentencePiece"),ep=n("."),tp=c(),Bt=a("div"),w(cs.$$.fragment),op=c(),ri=a("p"),np=n(`Build model inputs from a sequence or a pair of sequence for sequence classification tasks by concatenating and
adding special tokens. A DeBERTa sequence has the following format:`),sp=c(),ps=a("ul"),ii=a("li"),ap=n("single sequence: [CLS] X [SEP]"),rp=c(),li=a("li"),ip=n("pair of sequences: [CLS] A [SEP] B [SEP]"),lp=c(),So=a("div"),w(hs.$$.fragment),dp=c(),so=a("p"),cp=n(`Retrieves sequence ids from a token list that has no special tokens added. This method is called when adding
special tokens using the tokenizer `),di=a("code"),pp=n("prepare_for_model"),hp=n(" or "),ci=a("code"),fp=n("encode_plus"),mp=n(" methods."),up=c(),wt=a("div"),w(fs.$$.fragment),gp=c(),pi=a("p"),_p=n("Create a mask from the two sequences passed to be used in a sequence-pair classification task. A DeBERTa"),bp=c(),w(Oo.$$.fragment),kp=c(),ao=a("p"),vp=n("If "),hi=a("code"),wp=n("token_ids_1"),Tp=n(" is "),fi=a("code"),yp=n("None"),$p=n(", this method only returns the first portion of the mask (0s)."),Dp=c(),dr=a("div"),w(ms.$$.fragment),td=c(),ro=a("h2"),No=a("a"),mi=a("span"),w(us.$$.fragment),Ep=c(),ui=a("span"),Fp=n("DebertaV2TokenizerFast"),od=c(),gt=a("div"),w(gs.$$.fragment),qp=c(),_s=a("p"),xp=n("Constructs a DeBERTa-v2 fast tokenizer. Based on "),bs=a("a"),zp=n("SentencePiece"),Vp=n("."),Mp=c(),It=a("div"),w(ks.$$.fragment),jp=c(),gi=a("p"),Cp=n(`Build model inputs from a sequence or a pair of sequence for sequence classification tasks by concatenating and
adding special tokens. A DeBERTa sequence has the following format:`),Ap=c(),vs=a("ul"),_i=a("li"),Pp=n("single sequence: [CLS] X [SEP]"),Rp=c(),bi=a("li"),Bp=n("pair of sequences: [CLS] A [SEP] B [SEP]"),Ip=c(),Tt=a("div"),w(ws.$$.fragment),Lp=c(),ki=a("p"),Sp=n("Create a mask from the two sequences passed to be used in a sequence-pair classification task. A DeBERTa"),Op=c(),w(Wo.$$.fragment),Np=c(),io=a("p"),Wp=n("If "),vi=a("code"),Hp=n("token_ids_1"),Up=n(" is "),wi=a("code"),Kp=n("None"),Qp=n(", this method only returns the first portion of the mask (0s)."),nd=c(),lo=a("h2"),Ho=a("a"),Ti=a("span"),w(Ts.$$.fragment),Gp=c(),yi=a("span"),Jp=n("DebertaV2Model"),sd=c(),_t=a("div"),w(ys.$$.fragment),Xp=c(),$s=a("p"),Yp=n(`The bare DeBERTa Model transformer outputting raw hidden-states without any specific head on top.
The DeBERTa model was proposed in `),Ds=a("a"),Zp=n(`DeBERTa: Decoding-enhanced BERT with Disentangled
Attention`),eh=n(` by Pengcheng He, Xiaodong Liu, Jianfeng Gao, Weizhu Chen. It\u2019s build
on top of BERT/RoBERTa with two improvements, i.e. disentangled attention and enhanced mask decoder. With those two
improvements, it out perform BERT/RoBERTa on a majority of tasks with 80GB pretraining data.`),th=c(),Es=a("p"),oh=n("This model is also a PyTorch "),Fs=a("a"),nh=n("torch.nn.Module"),sh=n(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),ah=c(),yt=a("div"),w(qs.$$.fragment),rh=c(),co=a("p"),ih=n("The "),cr=a("a"),lh=n("DebertaV2Model"),dh=n(" forward method, overrides the "),$i=a("code"),ch=n("__call__"),ph=n(" special method."),hh=c(),w(Uo.$$.fragment),fh=c(),w(Ko.$$.fragment),ad=c(),po=a("h2"),Qo=a("a"),Di=a("span"),w(xs.$$.fragment),mh=c(),Ei=a("span"),uh=n("DebertaV2PreTrainedModel"),rd=c(),At=a("div"),w(zs.$$.fragment),gh=c(),Fi=a("p"),_h=n(`An abstract class to handle weights initialization and a simple interface for downloading and loading pretrained
models.`),bh=c(),$t=a("div"),w(Vs.$$.fragment),kh=c(),qi=a("p"),vh=n("Defines the computation performed at every call."),wh=c(),xi=a("p"),Th=n("Should be overridden by all subclasses."),yh=c(),w(Go.$$.fragment),id=c(),ho=a("h2"),Jo=a("a"),zi=a("span"),w(Ms.$$.fragment),$h=c(),Vi=a("span"),Dh=n("DebertaV2ForMaskedLM"),ld=c(),bt=a("div"),w(js.$$.fragment),Eh=c(),fo=a("p"),Fh=n("DeBERTa Model with a "),Mi=a("code"),qh=n("language modeling"),xh=n(` head on top.
The DeBERTa model was proposed in `),Cs=a("a"),zh=n(`DeBERTa: Decoding-enhanced BERT with Disentangled
Attention`),Vh=n(` by Pengcheng He, Xiaodong Liu, Jianfeng Gao, Weizhu Chen. It\u2019s build
on top of BERT/RoBERTa with two improvements, i.e. disentangled attention and enhanced mask decoder. With those two
improvements, it out perform BERT/RoBERTa on a majority of tasks with 80GB pretraining data.`),Mh=c(),As=a("p"),jh=n("This model is also a PyTorch "),Ps=a("a"),Ch=n("torch.nn.Module"),Ah=n(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Ph=c(),Dt=a("div"),w(Rs.$$.fragment),Rh=c(),mo=a("p"),Bh=n("The "),pr=a("a"),Ih=n("DebertaV2ForMaskedLM"),Lh=n(" forward method, overrides the "),ji=a("code"),Sh=n("__call__"),Oh=n(" special method."),Nh=c(),w(Xo.$$.fragment),Wh=c(),w(Yo.$$.fragment),dd=c(),uo=a("h2"),Zo=a("a"),Ci=a("span"),w(Bs.$$.fragment),Hh=c(),Ai=a("span"),Uh=n("DebertaV2ForSequenceClassification"),cd=c(),nt=a("div"),w(Is.$$.fragment),Kh=c(),Pi=a("p"),Qh=n(`DeBERTa Model transformer with a sequence classification/regression head on top (a linear layer on top of the
pooled output) e.g. for GLUE tasks.`),Gh=c(),Ls=a("p"),Jh=n("The DeBERTa model was proposed in "),Ss=a("a"),Xh=n(`DeBERTa: Decoding-enhanced BERT with Disentangled
Attention`),Yh=n(` by Pengcheng He, Xiaodong Liu, Jianfeng Gao, Weizhu Chen. It\u2019s build
on top of BERT/RoBERTa with two improvements, i.e. disentangled attention and enhanced mask decoder. With those two
improvements, it out perform BERT/RoBERTa on a majority of tasks with 80GB pretraining data.`),Zh=c(),Os=a("p"),ef=n("This model is also a PyTorch "),Ns=a("a"),tf=n("torch.nn.Module"),of=n(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),nf=c(),ct=a("div"),w(Ws.$$.fragment),sf=c(),go=a("p"),af=n("The "),hr=a("a"),rf=n("DebertaV2ForSequenceClassification"),lf=n(" forward method, overrides the "),Ri=a("code"),df=n("__call__"),cf=n(" special method."),pf=c(),w(en.$$.fragment),hf=c(),w(tn.$$.fragment),ff=c(),w(on.$$.fragment),pd=c(),_o=a("h2"),nn=a("a"),Bi=a("span"),w(Hs.$$.fragment),mf=c(),Ii=a("span"),uf=n("DebertaV2ForTokenClassification"),hd=c(),st=a("div"),w(Us.$$.fragment),gf=c(),Li=a("p"),_f=n(`DeBERTa 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.`),bf=c(),Ks=a("p"),kf=n("The DeBERTa model was proposed in "),Qs=a("a"),vf=n(`DeBERTa: Decoding-enhanced BERT with Disentangled
Attention`),wf=n(` by Pengcheng He, Xiaodong Liu, Jianfeng Gao, Weizhu Chen. It\u2019s build
on top of BERT/RoBERTa with two improvements, i.e. disentangled attention and enhanced mask decoder. With those two
improvements, it out perform BERT/RoBERTa on a majority of tasks with 80GB pretraining data.`),Tf=c(),Gs=a("p"),yf=n("This model is also a PyTorch "),Js=a("a"),$f=n("torch.nn.Module"),Df=n(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Ef=c(),Et=a("div"),w(Xs.$$.fragment),Ff=c(),bo=a("p"),qf=n("The "),fr=a("a"),xf=n("DebertaV2ForTokenClassification"),zf=n(" forward method, overrides the "),Si=a("code"),Vf=n("__call__"),Mf=n(" special method."),jf=c(),w(sn.$$.fragment),Cf=c(),w(an.$$.fragment),fd=c(),ko=a("h2"),rn=a("a"),Oi=a("span"),w(Ys.$$.fragment),Af=c(),Ni=a("span"),Pf=n("DebertaV2ForQuestionAnswering"),md=c(),at=a("div"),w(Zs.$$.fragment),Rf=c(),vo=a("p"),Bf=n(`DeBERTa 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 `),Wi=a("code"),If=n("span start logits"),Lf=n(" and "),Hi=a("code"),Sf=n("span end logits"),Of=n(")."),Nf=c(),ea=a("p"),Wf=n("The DeBERTa model was proposed in "),ta=a("a"),Hf=n(`DeBERTa: Decoding-enhanced BERT with Disentangled
Attention`),Uf=n(` by Pengcheng He, Xiaodong Liu, Jianfeng Gao, Weizhu Chen. It\u2019s build
on top of BERT/RoBERTa with two improvements, i.e. disentangled attention and enhanced mask decoder. With those two
improvements, it out perform BERT/RoBERTa on a majority of tasks with 80GB pretraining data.`),Kf=c(),oa=a("p"),Qf=n("This model is also a PyTorch "),na=a("a"),Gf=n("torch.nn.Module"),Jf=n(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Xf=c(),Ft=a("div"),w(sa.$$.fragment),Yf=c(),wo=a("p"),Zf=n("The "),mr=a("a"),em=n("DebertaV2ForQuestionAnswering"),tm=n(" forward method, overrides the "),Ui=a("code"),om=n("__call__"),nm=n(" special method."),sm=c(),w(ln.$$.fragment),am=c(),w(dn.$$.fragment),ud=c(),To=a("h2"),cn=a("a"),Ki=a("span"),w(aa.$$.fragment),rm=c(),Qi=a("span"),im=n("DebertaV2ForMultipleChoice"),gd=c(),rt=a("div"),w(ra.$$.fragment),lm=c(),Gi=a("p"),dm=n(`DeBERTa 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.`),cm=c(),ia=a("p"),pm=n("The DeBERTa model was proposed in "),la=a("a"),hm=n(`DeBERTa: Decoding-enhanced BERT with Disentangled
Attention`),fm=n(` by Pengcheng He, Xiaodong Liu, Jianfeng Gao, Weizhu Chen. It\u2019s build
on top of BERT/RoBERTa with two improvements, i.e. disentangled attention and enhanced mask decoder. With those two
improvements, it out perform BERT/RoBERTa on a majority of tasks with 80GB pretraining data.`),mm=c(),da=a("p"),um=n("This model is also a PyTorch "),ca=a("a"),gm=n("torch.nn.Module"),_m=n(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),bm=c(),qt=a("div"),w(pa.$$.fragment),km=c(),yo=a("p"),vm=n("The "),ur=a("a"),wm=n("DebertaV2ForMultipleChoice"),Tm=n(" forward method, overrides the "),Ji=a("code"),ym=n("__call__"),$m=n(" special method."),Dm=c(),w(pn.$$.fragment),Em=c(),w(hn.$$.fragment),_d=c(),$o=a("h2"),fn=a("a"),Xi=a("span"),w(ha.$$.fragment),Fm=c(),Yi=a("span"),qm=n("TFDebertaV2Model"),bd=c(),it=a("div"),w(fa.$$.fragment),xm=c(),ma=a("p"),zm=n(`The bare DeBERTa Model transformer outputting raw hidden-states without any specific head on top.
The DeBERTa model was proposed in `),ua=a("a"),Vm=n(`DeBERTa: Decoding-enhanced BERT with Disentangled
Attention`),Mm=n(` by Pengcheng He, Xiaodong Liu, Jianfeng Gao, Weizhu Chen. It\u2019s build
on top of BERT/RoBERTa with two improvements, i.e. disentangled attention and enhanced mask decoder. With those two
improvements, it out perform BERT/RoBERTa on a majority of tasks with 80GB pretraining data.`),jm=c(),ga=a("p"),Cm=n("This model is also a "),_a=a("a"),Am=n("tf.keras.Model"),Pm=n(` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),Rm=c(),w(mn.$$.fragment),Bm=c(),xt=a("div"),w(ba.$$.fragment),Im=c(),Do=a("p"),Lm=n("The "),gr=a("a"),Sm=n("TFDebertaV2Model"),Om=n(" forward method, overrides the "),Zi=a("code"),Nm=n("__call__"),Wm=n(" special method."),Hm=c(),w(un.$$.fragment),Um=c(),w(gn.$$.fragment),kd=c(),Eo=a("h2"),_n=a("a"),el=a("span"),w(ka.$$.fragment),Km=c(),tl=a("span"),Qm=n("TFDebertaV2PreTrainedModel"),vd=c(),Pt=a("div"),w(va.$$.fragment),Gm=c(),ol=a("p"),Jm=n(`An abstract class to handle weights initialization and a simple interface for downloading and loading pretrained
models.`),Xm=c(),zt=a("div"),w(wa.$$.fragment),Ym=c(),nl=a("p"),Zm=n("Calls the model on new inputs and returns the outputs as tensors."),eu=c(),Ta=a("p"),tu=n("In this case "),sl=a("code"),ou=n("call()"),nu=n(` just reapplies
all ops in the graph to the new inputs
(e.g. build a new computational graph from the provided inputs).`),su=c(),kt=a("p"),au=n(`Note: This method should not be called directly. It is only meant to be
overridden when subclassing `),al=a("code"),ru=n("tf.keras.Model"),iu=n(`.
To call a model on an input, always use the `),rl=a("code"),lu=n("__call__()"),du=n(` method,
i.e. `),il=a("code"),cu=n("model(inputs)"),pu=n(", which relies on the underlying "),ll=a("code"),hu=n("call()"),fu=n(" method."),wd=c(),Fo=a("h2"),bn=a("a"),dl=a("span"),w(ya.$$.fragment),mu=c(),cl=a("span"),uu=n("TFDebertaV2ForMaskedLM"),Td=c(),lt=a("div"),w($a.$$.fragment),gu=c(),qo=a("p"),_u=n("DeBERTa Model with a "),pl=a("code"),bu=n("language modeling"),ku=n(` head on top.
The DeBERTa model was proposed in `),Da=a("a"),vu=n(`DeBERTa: Decoding-enhanced BERT with Disentangled
Attention`),wu=n(` by Pengcheng He, Xiaodong Liu, Jianfeng Gao, Weizhu Chen. It\u2019s build
on top of BERT/RoBERTa with two improvements, i.e. disentangled attention and enhanced mask decoder. With those two
improvements, it out perform BERT/RoBERTa on a majority of tasks with 80GB pretraining data.`),Tu=c(),Ea=a("p"),yu=n("This model is also a "),Fa=a("a"),$u=n("tf.keras.Model"),Du=n(` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),Eu=c(),w(kn.$$.fragment),Fu=c(),pt=a("div"),w(qa.$$.fragment),qu=c(),xo=a("p"),xu=n("The "),_r=a("a"),zu=n("TFDebertaV2ForMaskedLM"),Vu=n(" forward method, overrides the "),hl=a("code"),Mu=n("__call__"),ju=n(" special method."),Cu=c(),w(vn.$$.fragment),Au=c(),w(wn.$$.fragment),Pu=c(),w(Tn.$$.fragment),yd=c(),zo=a("h2"),yn=a("a"),fl=a("span"),w(xa.$$.fragment),Ru=c(),ml=a("span"),Bu=n("TFDebertaV2ForSequenceClassification"),$d=c(),Ze=a("div"),w(za.$$.fragment),Iu=c(),ul=a("p"),Lu=n(`DeBERTa Model transformer with a sequence classification/regression head on top (a linear layer on top of the
pooled output) e.g. for GLUE tasks.`),Su=c(),Va=a("p"),Ou=n("The DeBERTa model was proposed in "),Ma=a("a"),Nu=n(`DeBERTa: Decoding-enhanced BERT with Disentangled
Attention`),Wu=n(` by Pengcheng He, Xiaodong Liu, Jianfeng Gao, Weizhu Chen. It\u2019s build
on top of BERT/RoBERTa with two improvements, i.e. disentangled attention and enhanced mask decoder. With those two
improvements, it out perform BERT/RoBERTa on a majority of tasks with 80GB pretraining data.`),Hu=c(),ja=a("p"),Uu=n("This model is also a "),Ca=a("a"),Ku=n("tf.keras.Model"),Qu=n(` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),Gu=c(),w($n.$$.fragment),Ju=c(),ht=a("div"),w(Aa.$$.fragment),Xu=c(),Vo=a("p"),Yu=n("The "),br=a("a"),Zu=n("TFDebertaV2ForSequenceClassification"),eg=n(" forward method, overrides the "),gl=a("code"),tg=n("__call__"),og=n(" special method."),ng=c(),w(Dn.$$.fragment),sg=c(),w(En.$$.fragment),ag=c(),w(Fn.$$.fragment),Dd=c(),Mo=a("h2"),qn=a("a"),_l=a("span"),w(Pa.$$.fragment),rg=c(),bl=a("span"),ig=n("TFDebertaV2ForTokenClassification"),Ed=c(),et=a("div"),w(Ra.$$.fragment),lg=c(),kl=a("p"),dg=n(`DeBERTa 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.`),cg=c(),Ba=a("p"),pg=n("The DeBERTa model was proposed in "),Ia=a("a"),hg=n(`DeBERTa: Decoding-enhanced BERT with Disentangled
Attention`),fg=n(` by Pengcheng He, Xiaodong Liu, Jianfeng Gao, Weizhu Chen. It\u2019s build
on top of BERT/RoBERTa with two improvements, i.e. disentangled attention and enhanced mask decoder. With those two
improvements, it out perform BERT/RoBERTa on a majority of tasks with 80GB pretraining data.`),mg=c(),La=a("p"),ug=n("This model is also a "),Sa=a("a"),gg=n("tf.keras.Model"),_g=n(` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),bg=c(),w(xn.$$.fragment),kg=c(),ft=a("div"),w(Oa.$$.fragment),vg=c(),jo=a("p"),wg=n("The "),kr=a("a"),Tg=n("TFDebertaV2ForTokenClassification"),yg=n(" forward method, overrides the "),vl=a("code"),$g=n("__call__"),Dg=n(" special method."),Eg=c(),w(zn.$$.fragment),Fg=c(),w(Vn.$$.fragment),qg=c(),w(Mn.$$.fragment),Fd=c(),Co=a("h2"),jn=a("a"),wl=a("span"),w(Na.$$.fragment),xg=c(),Tl=a("span"),zg=n("TFDebertaV2ForQuestionAnswering"),qd=c(),tt=a("div"),w(Wa.$$.fragment),Vg=c(),Ao=a("p"),Mg=n(`DeBERTa 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 `),yl=a("code"),jg=n("span start logits"),Cg=n(" and "),$l=a("code"),Ag=n("span end logits"),Pg=n(")."),Rg=c(),Ha=a("p"),Bg=n("The DeBERTa model was proposed in "),Ua=a("a"),Ig=n(`DeBERTa: Decoding-enhanced BERT with Disentangled
Attention`),Lg=n(` by Pengcheng He, Xiaodong Liu, Jianfeng Gao, Weizhu Chen. It\u2019s build
on top of BERT/RoBERTa with two improvements, i.e. disentangled attention and enhanced mask decoder. With those two
improvements, it out perform BERT/RoBERTa on a majority of tasks with 80GB pretraining data.`),Sg=c(),Ka=a("p"),Og=n("This model is also a "),Qa=a("a"),Ng=n("tf.keras.Model"),Wg=n(` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),Hg=c(),w(Cn.$$.fragment),Ug=c(),mt=a("div"),w(Ga.$$.fragment),Kg=c(),Po=a("p"),Qg=n("The "),vr=a("a"),Gg=n("TFDebertaV2ForQuestionAnswering"),Jg=n(" forward method, overrides the "),Dl=a("code"),Xg=n("__call__"),Yg=n(" special method."),Zg=c(),w(An.$$.fragment),e_=c(),w(Pn.$$.fragment),t_=c(),w(Rn.$$.fragment),this.h()},l(o){const _=W2('[data-svelte="svelte-1phssyn"]',document.head);d=r(_,"META",{name:!0,content:!0}),_.forEach(t),k=p(o),f=r(o,"H1",{class:!0});var Ja=i(f);u=r(Ja,"A",{id:!0,class:!0,href:!0});var El=i(u);v=r(El,"SPAN",{});var Fl=i(v);T(l.$$.fragment,Fl),Fl.forEach(t),El.forEach(t),h=p(Ja),z=r(Ja,"SPAN",{});var ql=i(z);ke=s(ql,"DeBERTa-v2"),ql.forEach(t),Ja.forEach(t),pe=p(o),B=r(o,"H2",{class:!0});var Xa=i(B);ne=r(Xa,"A",{id:!0,class:!0,href:!0});var xl=i(ne);oe=r(xl,"SPAN",{});var zl=i(oe);T(F.$$.fragment,zl),zl.forEach(t),xl.forEach(t),ve=p(Xa),U=r(Xa,"SPAN",{});var Vl=i(U);we=s(Vl,"Overview"),Vl.forEach(t),Xa.forEach(t),he=p(o),L=r(o,"P",{});var Ya=i(L);Te=s(Ya,"The DeBERTa model was proposed in "),ie=r(Ya,"A",{href:!0,rel:!0});var Ml=i(ie);G=s(Ml,"DeBERTa: Decoding-enhanced BERT with Disentangled Attention"),Ml.forEach(t),ye=s(Ya,` by Pengcheng He, Xiaodong Liu, Jianfeng Gao, Weizhu Chen It is based on Google\u2019s
BERT model released in 2018 and Facebook\u2019s RoBERTa model released in 2019.`),Ya.forEach(t),fe=p(o),N=r(o,"P",{});var jl=i(N);$e=s(jl,`It builds on RoBERTa with disentangled attention and enhanced mask decoder training with half of the data used in
RoBERTa.`),jl.forEach(t),me=p(o),W=r(o,"P",{});var Cl=i(W);De=s(Cl,"The abstract from the paper is the following:"),Cl.forEach(t),ue=p(o),te=r(o,"P",{});var Al=i(te);M=r(Al,"EM",{});var Za=i(M);A=s(Za,`Recent progress in pre-trained neural language models has significantly improved the performance of many natural
language processing (NLP) tasks. In this paper we propose a new model architecture DeBERTa (Decoding-enhanced BERT with
disentangled attention) that improves the BERT and RoBERTa models using two novel techniques. The first is the
disentangled attention mechanism, where each word is represented using two vectors that encode its content and
position, respectively, and the attention weights among words are computed using disentangled matrices on their
contents and relative positions. Second, an enhanced mask decoder is used to replace the output softmax layer to
predict the masked tokens for model pretraining. We show that these two techniques significantly improve the efficiency
of model pretraining and performance of downstream tasks. Compared to RoBERTa-Large, a DeBERTa model trained on half of
the training data performs consistently better on a wide range of NLP tasks, achieving improvements on MNLI by +0.9%
(90.2% vs. 91.1%), on SQuAD v2.0 by +2.3% (88.4% vs. 90.7%) and RACE by +3.6% (83.2% vs. 86.8%). The DeBERTa code and
pre-trained models will be made publicly available at `),le=r(Za,"A",{href:!0,rel:!0});var Pl=i(le);J=s(Pl,"https://github.com/microsoft/DeBERTa"),Pl.forEach(t),Ee=s(Za,"."),Za.forEach(t),Al.forEach(t),ge=p(o),I=r(o,"P",{});var Bn=i(I);Fe=s(Bn,"The following information is visible directly on the "),de=r(Bn,"A",{href:!0,rel:!0});var Rl=i(de);P=s(Rl,`original implementation
repository`),Rl.forEach(t),qe=s(Bn,`. DeBERTa v2 is the second version of the DeBERTa model. It includes
the 1.5B model used for the SuperGLUE single-model submission and achieving 89.9, versus human baseline 89.8. You can
find more details about this submission in the authors\u2019
`),O=r(Bn,"A",{href:!0,rel:!0});var Bl=i(O);xe=s(Bl,"blog"),Bl.forEach(t),Bn.forEach(t),_e=p(o),H=r(o,"P",{});var Il=i(H);ze=s(Il,"New in v2:"),Il.forEach(t),be=p(o),C=r(o,"UL",{});var vt=i(C);se=r(vt,"LI",{});var In=i(se);K=r(In,"STRONG",{});var Ll=i(K);Ve=s(Ll,"Vocabulary"),Ll.forEach(t),ae=s(In,` In v2 the tokenizer is changed to use a new vocabulary of size 128K built from the training data.
Instead of a GPT2-based tokenizer, the tokenizer is now
`),j=r(In,"A",{href:!0,rel:!0});var Sl=i(j);Me=s(Sl,"sentencepiece-based"),Sl.forEach(t),R=s(In," tokenizer."),In.forEach(t),je=p(vt),ce=r(vt,"LI",{});var wr=i(ce);b=r(wr,"STRONG",{});var Ol=i(b);q=s(Ol,"nGiE(nGram Induced Input Encoding)"),Ol.forEach(t),He=s(wr,` The DeBERTa-v2 model uses an additional convolution layer aside with the first
transformer layer to better learn the local dependency of input tokens.`),wr.forEach(t),re=p(vt),Ce=r(vt,"LI",{});var Tr=i(Ce);Re=r(Tr,"STRONG",{});var Nl=i(Re);V=s(Nl,"Sharing position projection matrix with content projection matrix in attention layer"),Nl.forEach(t),Ue=s(Tr,` Based on previous
experiments, this can save parameters without affecting the performance.`),Tr.forEach(t),Ke=p(vt),Ae=r(vt,"LI",{});var yr=i(Ae);Be=r(yr,"STRONG",{});var Wl=i(Be);Qe=s(Wl,"Apply bucket to encode relative positions"),Wl.forEach(t),S=s(yr,` The DeBERTa-v2 model uses log bucket to encode relative positions
similar to T5.`),yr.forEach(t),X=p(vt),Pe=r(vt,"LI",{});var $r=i(Pe);Ie=r($r,"STRONG",{});var Hl=i(Ie);Y=s(Hl,"900M model & 1.5B model"),Hl.forEach(t),Ge=s($r,` Two additional model sizes are available: 900M and 1.5B, which significantly improves the
performance of downstream tasks.`),$r.forEach(t),vt.forEach(t),Le=p(o),Z=r(o,"P",{});var Rt=i(Z);Je=s(Rt,"This model was contributed by "),ee=r(Rt,"A",{href:!0,rel:!0});var Ul=i(ee);Xe=s(Ul,"DeBERTa"),Ul.forEach(t),bc=s(Rt,`. This model TF 2.0 implementation was
contributed by `),es=r(Rt,"A",{href:!0,rel:!0});var Kl=i(es);kc=s(Kl,"kamalkraj"),Kl.forEach(t),vc=s(Rt,". The original code can be found "),ts=r(Rt,"A",{href:!0,rel:!0});var Ql=i(ts);wc=s(Ql,"here"),Ql.forEach(t),Tc=s(Rt,"."),Rt.forEach(t),Gl=p(o),Zt=r(o,"H2",{class:!0});var er=i(Zt);Ro=r(er,"A",{id:!0,class:!0,href:!0});var o_=i(Ro);Gr=r(o_,"SPAN",{});var n_=i(Gr);T(os.$$.fragment,n_),n_.forEach(t),o_.forEach(t),yc=p(er),Jr=r(er,"SPAN",{});var s_=i(Jr);$c=s(s_,"Documentation resources"),s_.forEach(t),er.forEach(t),Jl=p(o),dt=r(o,"UL",{});var Lt=i(dt);Xr=r(Lt,"LI",{});var a_=i(Xr);tr=r(a_,"A",{href:!0});var r_=i(tr);Dc=s(r_,"Text classification task guide"),r_.forEach(t),a_.forEach(t),Ec=p(Lt),Yr=r(Lt,"LI",{});var i_=i(Yr);or=r(i_,"A",{href:!0});var l_=i(or);Fc=s(l_,"Token classification task guide"),l_.forEach(t),i_.forEach(t),qc=p(Lt),Zr=r(Lt,"LI",{});var d_=i(Zr);nr=r(d_,"A",{href:!0});var c_=i(nr);xc=s(c_,"Question answering task guide"),c_.forEach(t),d_.forEach(t),zc=p(Lt),ei=r(Lt,"LI",{});var p_=i(ei);sr=r(p_,"A",{href:!0});var h_=i(sr);Vc=s(h_,"Masked language modeling task guide"),h_.forEach(t),p_.forEach(t),Mc=p(Lt),ti=r(Lt,"LI",{});var f_=i(ti);ar=r(f_,"A",{href:!0});var m_=i(ar);jc=s(m_,"Multiple choice task guide"),m_.forEach(t),f_.forEach(t),Lt.forEach(t),Xl=p(o),eo=r(o,"H2",{class:!0});var zd=i(eo);Bo=r(zd,"A",{id:!0,class:!0,href:!0});var u_=i(Bo);oi=r(u_,"SPAN",{});var g_=i(oi);T(ns.$$.fragment,g_),g_.forEach(t),u_.forEach(t),Cc=p(zd),ni=r(zd,"SPAN",{});var __=i(ni);Ac=s(__,"DebertaV2Config"),__.forEach(t),zd.forEach(t),Yl=p(o),ut=r(o,"DIV",{class:!0});var Ln=i(ut);T(ss.$$.fragment,Ln),Pc=p(Ln),to=r(Ln,"P",{});var Dr=i(to);Rc=s(Dr,"This is the configuration class to store the configuration of a "),rr=r(Dr,"A",{href:!0});var b_=i(rr);Bc=s(b_,"DebertaV2Model"),b_.forEach(t),Ic=s(Dr,`. It is used to instantiate a
DeBERTa-v2 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 DeBERTa
`),as=r(Dr,"A",{href:!0,rel:!0});var k_=i(as);Lc=s(k_,"microsoft/deberta-v2-xlarge"),k_.forEach(t),Sc=s(Dr," architecture."),Dr.forEach(t),Oc=p(Ln),oo=r(Ln,"P",{});var Er=i(oo);Nc=s(Er,"Configuration objects inherit from "),ir=r(Er,"A",{href:!0});var v_=i(ir);Wc=s(v_,"PretrainedConfig"),v_.forEach(t),Hc=s(Er,` and can be used to control the model outputs. Read the
documentation from `),lr=r(Er,"A",{href:!0});var w_=i(lr);Uc=s(w_,"PretrainedConfig"),w_.forEach(t),Kc=s(Er," for more information."),Er.forEach(t),Qc=p(Ln),T(Io.$$.fragment,Ln),Ln.forEach(t),Zl=p(o),no=r(o,"H2",{class:!0});var Vd=i(no);Lo=r(Vd,"A",{id:!0,class:!0,href:!0});var T_=i(Lo);si=r(T_,"SPAN",{});var y_=i(si);T(rs.$$.fragment,y_),y_.forEach(t),T_.forEach(t),Gc=p(Vd),ai=r(Vd,"SPAN",{});var $_=i(ai);Jc=s($_,"DebertaV2Tokenizer"),$_.forEach(t),Vd.forEach(t),ed=p(o),Ye=r(o,"DIV",{class:!0});var Vt=i(Ye);T(is.$$.fragment,Vt),Xc=p(Vt),ls=r(Vt,"P",{});var Md=i(ls);Yc=s(Md,"Constructs a DeBERTa-v2 tokenizer. Based on "),ds=r(Md,"A",{href:!0,rel:!0});var D_=i(ds);Zc=s(D_,"SentencePiece"),D_.forEach(t),ep=s(Md,"."),Md.forEach(t),tp=p(Vt),Bt=r(Vt,"DIV",{class:!0});var Fr=i(Bt);T(cs.$$.fragment,Fr),op=p(Fr),ri=r(Fr,"P",{});var E_=i(ri);np=s(E_,`Build model inputs from a sequence or a pair of sequence for sequence classification tasks by concatenating and
adding special tokens. A DeBERTa sequence has the following format:`),E_.forEach(t),sp=p(Fr),ps=r(Fr,"UL",{});var jd=i(ps);ii=r(jd,"LI",{});var F_=i(ii);ap=s(F_,"single sequence: [CLS] X [SEP]"),F_.forEach(t),rp=p(jd),li=r(jd,"LI",{});var q_=i(li);ip=s(q_,"pair of sequences: [CLS] A [SEP] B [SEP]"),q_.forEach(t),jd.forEach(t),Fr.forEach(t),lp=p(Vt),So=r(Vt,"DIV",{class:!0});var Cd=i(So);T(hs.$$.fragment,Cd),dp=p(Cd),so=r(Cd,"P",{});var qr=i(so);cp=s(qr,`Retrieves sequence ids from a token list that has no special tokens added. This method is called when adding
special tokens using the tokenizer `),di=r(qr,"CODE",{});var x_=i(di);pp=s(x_,"prepare_for_model"),x_.forEach(t),hp=s(qr," or "),ci=r(qr,"CODE",{});var z_=i(ci);fp=s(z_,"encode_plus"),z_.forEach(t),mp=s(qr," methods."),qr.forEach(t),Cd.forEach(t),up=p(Vt),wt=r(Vt,"DIV",{class:!0});var Sn=i(wt);T(fs.$$.fragment,Sn),gp=p(Sn),pi=r(Sn,"P",{});var V_=i(pi);_p=s(V_,"Create a mask from the two sequences passed to be used in a sequence-pair classification task. A DeBERTa"),V_.forEach(t),bp=p(Sn),T(Oo.$$.fragment,Sn),kp=p(Sn),ao=r(Sn,"P",{});var xr=i(ao);vp=s(xr,"If "),hi=r(xr,"CODE",{});var M_=i(hi);wp=s(M_,"token_ids_1"),M_.forEach(t),Tp=s(xr," is "),fi=r(xr,"CODE",{});var j_=i(fi);yp=s(j_,"None"),j_.forEach(t),$p=s(xr,", this method only returns the first portion of the mask (0s)."),xr.forEach(t),Sn.forEach(t),Dp=p(Vt),dr=r(Vt,"DIV",{class:!0});var C_=i(dr);T(ms.$$.fragment,C_),C_.forEach(t),Vt.forEach(t),td=p(o),ro=r(o,"H2",{class:!0});var Ad=i(ro);No=r(Ad,"A",{id:!0,class:!0,href:!0});var A_=i(No);mi=r(A_,"SPAN",{});var P_=i(mi);T(us.$$.fragment,P_),P_.forEach(t),A_.forEach(t),Ep=p(Ad),ui=r(Ad,"SPAN",{});var R_=i(ui);Fp=s(R_,"DebertaV2TokenizerFast"),R_.forEach(t),Ad.forEach(t),od=p(o),gt=r(o,"DIV",{class:!0});var On=i(gt);T(gs.$$.fragment,On),qp=p(On),_s=r(On,"P",{});var Pd=i(_s);xp=s(Pd,"Constructs a DeBERTa-v2 fast tokenizer. Based on "),bs=r(Pd,"A",{href:!0,rel:!0});var B_=i(bs);zp=s(B_,"SentencePiece"),B_.forEach(t),Vp=s(Pd,"."),Pd.forEach(t),Mp=p(On),It=r(On,"DIV",{class:!0});var zr=i(It);T(ks.$$.fragment,zr),jp=p(zr),gi=r(zr,"P",{});var I_=i(gi);Cp=s(I_,`Build model inputs from a sequence or a pair of sequence for sequence classification tasks by concatenating and
adding special tokens. A DeBERTa sequence has the following format:`),I_.forEach(t),Ap=p(zr),vs=r(zr,"UL",{});var Rd=i(vs);_i=r(Rd,"LI",{});var L_=i(_i);Pp=s(L_,"single sequence: [CLS] X [SEP]"),L_.forEach(t),Rp=p(Rd),bi=r(Rd,"LI",{});var S_=i(bi);Bp=s(S_,"pair of sequences: [CLS] A [SEP] B [SEP]"),S_.forEach(t),Rd.forEach(t),zr.forEach(t),Ip=p(On),Tt=r(On,"DIV",{class:!0});var Nn=i(Tt);T(ws.$$.fragment,Nn),Lp=p(Nn),ki=r(Nn,"P",{});var O_=i(ki);Sp=s(O_,"Create a mask from the two sequences passed to be used in a sequence-pair classification task. A DeBERTa"),O_.forEach(t),Op=p(Nn),T(Wo.$$.fragment,Nn),Np=p(Nn),io=r(Nn,"P",{});var Vr=i(io);Wp=s(Vr,"If "),vi=r(Vr,"CODE",{});var N_=i(vi);Hp=s(N_,"token_ids_1"),N_.forEach(t),Up=s(Vr," is "),wi=r(Vr,"CODE",{});var W_=i(wi);Kp=s(W_,"None"),W_.forEach(t),Qp=s(Vr,", this method only returns the first portion of the mask (0s)."),Vr.forEach(t),Nn.forEach(t),On.forEach(t),nd=p(o),lo=r(o,"H2",{class:!0});var Bd=i(lo);Ho=r(Bd,"A",{id:!0,class:!0,href:!0});var H_=i(Ho);Ti=r(H_,"SPAN",{});var U_=i(Ti);T(Ts.$$.fragment,U_),U_.forEach(t),H_.forEach(t),Gp=p(Bd),yi=r(Bd,"SPAN",{});var K_=i(yi);Jp=s(K_,"DebertaV2Model"),K_.forEach(t),Bd.forEach(t),sd=p(o),_t=r(o,"DIV",{class:!0});var Wn=i(_t);T(ys.$$.fragment,Wn),Xp=p(Wn),$s=r(Wn,"P",{});var Id=i($s);Yp=s(Id,`The bare DeBERTa Model transformer outputting raw hidden-states without any specific head on top.
The DeBERTa model was proposed in `),Ds=r(Id,"A",{href:!0,rel:!0});var Q_=i(Ds);Zp=s(Q_,`DeBERTa: Decoding-enhanced BERT with Disentangled
Attention`),Q_.forEach(t),eh=s(Id,` by Pengcheng He, Xiaodong Liu, Jianfeng Gao, Weizhu Chen. It\u2019s build
on top of BERT/RoBERTa with two improvements, i.e. disentangled attention and enhanced mask decoder. With those two
improvements, it out perform BERT/RoBERTa on a majority of tasks with 80GB pretraining data.`),Id.forEach(t),th=p(Wn),Es=r(Wn,"P",{});var Ld=i(Es);oh=s(Ld,"This model is also a PyTorch "),Fs=r(Ld,"A",{href:!0,rel:!0});var G_=i(Fs);nh=s(G_,"torch.nn.Module"),G_.forEach(t),sh=s(Ld,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Ld.forEach(t),ah=p(Wn),yt=r(Wn,"DIV",{class:!0});var Hn=i(yt);T(qs.$$.fragment,Hn),rh=p(Hn),co=r(Hn,"P",{});var Mr=i(co);ih=s(Mr,"The "),cr=r(Mr,"A",{href:!0});var J_=i(cr);lh=s(J_,"DebertaV2Model"),J_.forEach(t),dh=s(Mr," forward method, overrides the "),$i=r(Mr,"CODE",{});var X_=i($i);ch=s(X_,"__call__"),X_.forEach(t),ph=s(Mr," special method."),Mr.forEach(t),hh=p(Hn),T(Uo.$$.fragment,Hn),fh=p(Hn),T(Ko.$$.fragment,Hn),Hn.forEach(t),Wn.forEach(t),ad=p(o),po=r(o,"H2",{class:!0});var Sd=i(po);Qo=r(Sd,"A",{id:!0,class:!0,href:!0});var Y_=i(Qo);Di=r(Y_,"SPAN",{});var Z_=i(Di);T(xs.$$.fragment,Z_),Z_.forEach(t),Y_.forEach(t),mh=p(Sd),Ei=r(Sd,"SPAN",{});var eb=i(Ei);uh=s(eb,"DebertaV2PreTrainedModel"),eb.forEach(t),Sd.forEach(t),rd=p(o),At=r(o,"DIV",{class:!0});var jr=i(At);T(zs.$$.fragment,jr),gh=p(jr),Fi=r(jr,"P",{});var tb=i(Fi);_h=s(tb,`An abstract class to handle weights initialization and a simple interface for downloading and loading pretrained
models.`),tb.forEach(t),bh=p(jr),$t=r(jr,"DIV",{class:!0});var Un=i($t);T(Vs.$$.fragment,Un),kh=p(Un),qi=r(Un,"P",{});var ob=i(qi);vh=s(ob,"Defines the computation performed at every call."),ob.forEach(t),wh=p(Un),xi=r(Un,"P",{});var nb=i(xi);Th=s(nb,"Should be overridden by all subclasses."),nb.forEach(t),yh=p(Un),T(Go.$$.fragment,Un),Un.forEach(t),jr.forEach(t),id=p(o),ho=r(o,"H2",{class:!0});var Od=i(ho);Jo=r(Od,"A",{id:!0,class:!0,href:!0});var sb=i(Jo);zi=r(sb,"SPAN",{});var ab=i(zi);T(Ms.$$.fragment,ab),ab.forEach(t),sb.forEach(t),$h=p(Od),Vi=r(Od,"SPAN",{});var rb=i(Vi);Dh=s(rb,"DebertaV2ForMaskedLM"),rb.forEach(t),Od.forEach(t),ld=p(o),bt=r(o,"DIV",{class:!0});var Kn=i(bt);T(js.$$.fragment,Kn),Eh=p(Kn),fo=r(Kn,"P",{});var Cr=i(fo);Fh=s(Cr,"DeBERTa Model with a "),Mi=r(Cr,"CODE",{});var ib=i(Mi);qh=s(ib,"language modeling"),ib.forEach(t),xh=s(Cr,` head on top.
The DeBERTa model was proposed in `),Cs=r(Cr,"A",{href:!0,rel:!0});var lb=i(Cs);zh=s(lb,`DeBERTa: Decoding-enhanced BERT with Disentangled
Attention`),lb.forEach(t),Vh=s(Cr,` by Pengcheng He, Xiaodong Liu, Jianfeng Gao, Weizhu Chen. It\u2019s build
on top of BERT/RoBERTa with two improvements, i.e. disentangled attention and enhanced mask decoder. With those two
improvements, it out perform BERT/RoBERTa on a majority of tasks with 80GB pretraining data.`),Cr.forEach(t),Mh=p(Kn),As=r(Kn,"P",{});var Nd=i(As);jh=s(Nd,"This model is also a PyTorch "),Ps=r(Nd,"A",{href:!0,rel:!0});var db=i(Ps);Ch=s(db,"torch.nn.Module"),db.forEach(t),Ah=s(Nd,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Nd.forEach(t),Ph=p(Kn),Dt=r(Kn,"DIV",{class:!0});var Qn=i(Dt);T(Rs.$$.fragment,Qn),Rh=p(Qn),mo=r(Qn,"P",{});var Ar=i(mo);Bh=s(Ar,"The "),pr=r(Ar,"A",{href:!0});var cb=i(pr);Ih=s(cb,"DebertaV2ForMaskedLM"),cb.forEach(t),Lh=s(Ar," forward method, overrides the "),ji=r(Ar,"CODE",{});var pb=i(ji);Sh=s(pb,"__call__"),pb.forEach(t),Oh=s(Ar," special method."),Ar.forEach(t),Nh=p(Qn),T(Xo.$$.fragment,Qn),Wh=p(Qn),T(Yo.$$.fragment,Qn),Qn.forEach(t),Kn.forEach(t),dd=p(o),uo=r(o,"H2",{class:!0});var Wd=i(uo);Zo=r(Wd,"A",{id:!0,class:!0,href:!0});var hb=i(Zo);Ci=r(hb,"SPAN",{});var fb=i(Ci);T(Bs.$$.fragment,fb),fb.forEach(t),hb.forEach(t),Hh=p(Wd),Ai=r(Wd,"SPAN",{});var mb=i(Ai);Uh=s(mb,"DebertaV2ForSequenceClassification"),mb.forEach(t),Wd.forEach(t),cd=p(o),nt=r(o,"DIV",{class:!0});var St=i(nt);T(Is.$$.fragment,St),Kh=p(St),Pi=r(St,"P",{});var ub=i(Pi);Qh=s(ub,`DeBERTa Model transformer with a sequence classification/regression head on top (a linear layer on top of the
pooled output) e.g. for GLUE tasks.`),ub.forEach(t),Gh=p(St),Ls=r(St,"P",{});var Hd=i(Ls);Jh=s(Hd,"The DeBERTa model was proposed in "),Ss=r(Hd,"A",{href:!0,rel:!0});var gb=i(Ss);Xh=s(gb,`DeBERTa: Decoding-enhanced BERT with Disentangled
Attention`),gb.forEach(t),Yh=s(Hd,` by Pengcheng He, Xiaodong Liu, Jianfeng Gao, Weizhu Chen. It\u2019s build
on top of BERT/RoBERTa with two improvements, i.e. disentangled attention and enhanced mask decoder. With those two
improvements, it out perform BERT/RoBERTa on a majority of tasks with 80GB pretraining data.`),Hd.forEach(t),Zh=p(St),Os=r(St,"P",{});var Ud=i(Os);ef=s(Ud,"This model is also a PyTorch "),Ns=r(Ud,"A",{href:!0,rel:!0});var _b=i(Ns);tf=s(_b,"torch.nn.Module"),_b.forEach(t),of=s(Ud,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Ud.forEach(t),nf=p(St),ct=r(St,"DIV",{class:!0});var Ot=i(ct);T(Ws.$$.fragment,Ot),sf=p(Ot),go=r(Ot,"P",{});var Pr=i(go);af=s(Pr,"The "),hr=r(Pr,"A",{href:!0});var bb=i(hr);rf=s(bb,"DebertaV2ForSequenceClassification"),bb.forEach(t),lf=s(Pr," forward method, overrides the "),Ri=r(Pr,"CODE",{});var kb=i(Ri);df=s(kb,"__call__"),kb.forEach(t),cf=s(Pr," special method."),Pr.forEach(t),pf=p(Ot),T(en.$$.fragment,Ot),hf=p(Ot),T(tn.$$.fragment,Ot),ff=p(Ot),T(on.$$.fragment,Ot),Ot.forEach(t),St.forEach(t),pd=p(o),_o=r(o,"H2",{class:!0});var Kd=i(_o);nn=r(Kd,"A",{id:!0,class:!0,href:!0});var vb=i(nn);Bi=r(vb,"SPAN",{});var wb=i(Bi);T(Hs.$$.fragment,wb),wb.forEach(t),vb.forEach(t),mf=p(Kd),Ii=r(Kd,"SPAN",{});var Tb=i(Ii);uf=s(Tb,"DebertaV2ForTokenClassification"),Tb.forEach(t),Kd.forEach(t),hd=p(o),st=r(o,"DIV",{class:!0});var Nt=i(st);T(Us.$$.fragment,Nt),gf=p(Nt),Li=r(Nt,"P",{});var yb=i(Li);_f=s(yb,`DeBERTa 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.`),yb.forEach(t),bf=p(Nt),Ks=r(Nt,"P",{});var Qd=i(Ks);kf=s(Qd,"The DeBERTa model was proposed in "),Qs=r(Qd,"A",{href:!0,rel:!0});var $b=i(Qs);vf=s($b,`DeBERTa: Decoding-enhanced BERT with Disentangled
Attention`),$b.forEach(t),wf=s(Qd,` by Pengcheng He, Xiaodong Liu, Jianfeng Gao, Weizhu Chen. It\u2019s build
on top of BERT/RoBERTa with two improvements, i.e. disentangled attention and enhanced mask decoder. With those two
improvements, it out perform BERT/RoBERTa on a majority of tasks with 80GB pretraining data.`),Qd.forEach(t),Tf=p(Nt),Gs=r(Nt,"P",{});var Gd=i(Gs);yf=s(Gd,"This model is also a PyTorch "),Js=r(Gd,"A",{href:!0,rel:!0});var Db=i(Js);$f=s(Db,"torch.nn.Module"),Db.forEach(t),Df=s(Gd,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Gd.forEach(t),Ef=p(Nt),Et=r(Nt,"DIV",{class:!0});var Gn=i(Et);T(Xs.$$.fragment,Gn),Ff=p(Gn),bo=r(Gn,"P",{});var Rr=i(bo);qf=s(Rr,"The "),fr=r(Rr,"A",{href:!0});var Eb=i(fr);xf=s(Eb,"DebertaV2ForTokenClassification"),Eb.forEach(t),zf=s(Rr," forward method, overrides the "),Si=r(Rr,"CODE",{});var Fb=i(Si);Vf=s(Fb,"__call__"),Fb.forEach(t),Mf=s(Rr," special method."),Rr.forEach(t),jf=p(Gn),T(sn.$$.fragment,Gn),Cf=p(Gn),T(an.$$.fragment,Gn),Gn.forEach(t),Nt.forEach(t),fd=p(o),ko=r(o,"H2",{class:!0});var Jd=i(ko);rn=r(Jd,"A",{id:!0,class:!0,href:!0});var qb=i(rn);Oi=r(qb,"SPAN",{});var xb=i(Oi);T(Ys.$$.fragment,xb),xb.forEach(t),qb.forEach(t),Af=p(Jd),Ni=r(Jd,"SPAN",{});var zb=i(Ni);Pf=s(zb,"DebertaV2ForQuestionAnswering"),zb.forEach(t),Jd.forEach(t),md=p(o),at=r(o,"DIV",{class:!0});var Wt=i(at);T(Zs.$$.fragment,Wt),Rf=p(Wt),vo=r(Wt,"P",{});var Br=i(vo);Bf=s(Br,`DeBERTa 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 `),Wi=r(Br,"CODE",{});var Vb=i(Wi);If=s(Vb,"span start logits"),Vb.forEach(t),Lf=s(Br," and "),Hi=r(Br,"CODE",{});var Mb=i(Hi);Sf=s(Mb,"span end logits"),Mb.forEach(t),Of=s(Br,")."),Br.forEach(t),Nf=p(Wt),ea=r(Wt,"P",{});var Xd=i(ea);Wf=s(Xd,"The DeBERTa model was proposed in "),ta=r(Xd,"A",{href:!0,rel:!0});var jb=i(ta);Hf=s(jb,`DeBERTa: Decoding-enhanced BERT with Disentangled
Attention`),jb.forEach(t),Uf=s(Xd,` by Pengcheng He, Xiaodong Liu, Jianfeng Gao, Weizhu Chen. It\u2019s build
on top of BERT/RoBERTa with two improvements, i.e. disentangled attention and enhanced mask decoder. With those two
improvements, it out perform BERT/RoBERTa on a majority of tasks with 80GB pretraining data.`),Xd.forEach(t),Kf=p(Wt),oa=r(Wt,"P",{});var Yd=i(oa);Qf=s(Yd,"This model is also a PyTorch "),na=r(Yd,"A",{href:!0,rel:!0});var Cb=i(na);Gf=s(Cb,"torch.nn.Module"),Cb.forEach(t),Jf=s(Yd,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Yd.forEach(t),Xf=p(Wt),Ft=r(Wt,"DIV",{class:!0});var Jn=i(Ft);T(sa.$$.fragment,Jn),Yf=p(Jn),wo=r(Jn,"P",{});var Ir=i(wo);Zf=s(Ir,"The "),mr=r(Ir,"A",{href:!0});var Ab=i(mr);em=s(Ab,"DebertaV2ForQuestionAnswering"),Ab.forEach(t),tm=s(Ir," forward method, overrides the "),Ui=r(Ir,"CODE",{});var Pb=i(Ui);om=s(Pb,"__call__"),Pb.forEach(t),nm=s(Ir," special method."),Ir.forEach(t),sm=p(Jn),T(ln.$$.fragment,Jn),am=p(Jn),T(dn.$$.fragment,Jn),Jn.forEach(t),Wt.forEach(t),ud=p(o),To=r(o,"H2",{class:!0});var Zd=i(To);cn=r(Zd,"A",{id:!0,class:!0,href:!0});var Rb=i(cn);Ki=r(Rb,"SPAN",{});var Bb=i(Ki);T(aa.$$.fragment,Bb),Bb.forEach(t),Rb.forEach(t),rm=p(Zd),Qi=r(Zd,"SPAN",{});var Ib=i(Qi);im=s(Ib,"DebertaV2ForMultipleChoice"),Ib.forEach(t),Zd.forEach(t),gd=p(o),rt=r(o,"DIV",{class:!0});var Ht=i(rt);T(ra.$$.fragment,Ht),lm=p(Ht),Gi=r(Ht,"P",{});var Lb=i(Gi);dm=s(Lb,`DeBERTa 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.`),Lb.forEach(t),cm=p(Ht),ia=r(Ht,"P",{});var ec=i(ia);pm=s(ec,"The DeBERTa model was proposed in "),la=r(ec,"A",{href:!0,rel:!0});var Sb=i(la);hm=s(Sb,`DeBERTa: Decoding-enhanced BERT with Disentangled
Attention`),Sb.forEach(t),fm=s(ec,` by Pengcheng He, Xiaodong Liu, Jianfeng Gao, Weizhu Chen. It\u2019s build
on top of BERT/RoBERTa with two improvements, i.e. disentangled attention and enhanced mask decoder. With those two
improvements, it out perform BERT/RoBERTa on a majority of tasks with 80GB pretraining data.`),ec.forEach(t),mm=p(Ht),da=r(Ht,"P",{});var tc=i(da);um=s(tc,"This model is also a PyTorch "),ca=r(tc,"A",{href:!0,rel:!0});var Ob=i(ca);gm=s(Ob,"torch.nn.Module"),Ob.forEach(t),_m=s(tc,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),tc.forEach(t),bm=p(Ht),qt=r(Ht,"DIV",{class:!0});var Xn=i(qt);T(pa.$$.fragment,Xn),km=p(Xn),yo=r(Xn,"P",{});var Lr=i(yo);vm=s(Lr,"The "),ur=r(Lr,"A",{href:!0});var Nb=i(ur);wm=s(Nb,"DebertaV2ForMultipleChoice"),Nb.forEach(t),Tm=s(Lr," forward method, overrides the "),Ji=r(Lr,"CODE",{});var Wb=i(Ji);ym=s(Wb,"__call__"),Wb.forEach(t),$m=s(Lr," special method."),Lr.forEach(t),Dm=p(Xn),T(pn.$$.fragment,Xn),Em=p(Xn),T(hn.$$.fragment,Xn),Xn.forEach(t),Ht.forEach(t),_d=p(o),$o=r(o,"H2",{class:!0});var oc=i($o);fn=r(oc,"A",{id:!0,class:!0,href:!0});var Hb=i(fn);Xi=r(Hb,"SPAN",{});var Ub=i(Xi);T(ha.$$.fragment,Ub),Ub.forEach(t),Hb.forEach(t),Fm=p(oc),Yi=r(oc,"SPAN",{});var Kb=i(Yi);qm=s(Kb,"TFDebertaV2Model"),Kb.forEach(t),oc.forEach(t),bd=p(o),it=r(o,"DIV",{class:!0});var Ut=i(it);T(fa.$$.fragment,Ut),xm=p(Ut),ma=r(Ut,"P",{});var nc=i(ma);zm=s(nc,`The bare DeBERTa Model transformer outputting raw hidden-states without any specific head on top.
The DeBERTa model was proposed in `),ua=r(nc,"A",{href:!0,rel:!0});var Qb=i(ua);Vm=s(Qb,`DeBERTa: Decoding-enhanced BERT with Disentangled
Attention`),Qb.forEach(t),Mm=s(nc,` by Pengcheng He, Xiaodong Liu, Jianfeng Gao, Weizhu Chen. It\u2019s build
on top of BERT/RoBERTa with two improvements, i.e. disentangled attention and enhanced mask decoder. With those two
improvements, it out perform BERT/RoBERTa on a majority of tasks with 80GB pretraining data.`),nc.forEach(t),jm=p(Ut),ga=r(Ut,"P",{});var sc=i(ga);Cm=s(sc,"This model is also a "),_a=r(sc,"A",{href:!0,rel:!0});var Gb=i(_a);Am=s(Gb,"tf.keras.Model"),Gb.forEach(t),Pm=s(sc,` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),sc.forEach(t),Rm=p(Ut),T(mn.$$.fragment,Ut),Bm=p(Ut),xt=r(Ut,"DIV",{class:!0});var Yn=i(xt);T(ba.$$.fragment,Yn),Im=p(Yn),Do=r(Yn,"P",{});var Sr=i(Do);Lm=s(Sr,"The "),gr=r(Sr,"A",{href:!0});var Jb=i(gr);Sm=s(Jb,"TFDebertaV2Model"),Jb.forEach(t),Om=s(Sr," forward method, overrides the "),Zi=r(Sr,"CODE",{});var Xb=i(Zi);Nm=s(Xb,"__call__"),Xb.forEach(t),Wm=s(Sr," special method."),Sr.forEach(t),Hm=p(Yn),T(un.$$.fragment,Yn),Um=p(Yn),T(gn.$$.fragment,Yn),Yn.forEach(t),Ut.forEach(t),kd=p(o),Eo=r(o,"H2",{class:!0});var ac=i(Eo);_n=r(ac,"A",{id:!0,class:!0,href:!0});var Yb=i(_n);el=r(Yb,"SPAN",{});var Zb=i(el);T(ka.$$.fragment,Zb),Zb.forEach(t),Yb.forEach(t),Km=p(ac),tl=r(ac,"SPAN",{});var e2=i(tl);Qm=s(e2,"TFDebertaV2PreTrainedModel"),e2.forEach(t),ac.forEach(t),vd=p(o),Pt=r(o,"DIV",{class:!0});var Or=i(Pt);T(va.$$.fragment,Or),Gm=p(Or),ol=r(Or,"P",{});var t2=i(ol);Jm=s(t2,`An abstract class to handle weights initialization and a simple interface for downloading and loading pretrained
models.`),t2.forEach(t),Xm=p(Or),zt=r(Or,"DIV",{class:!0});var Zn=i(zt);T(wa.$$.fragment,Zn),Ym=p(Zn),nl=r(Zn,"P",{});var o2=i(nl);Zm=s(o2,"Calls the model on new inputs and returns the outputs as tensors."),o2.forEach(t),eu=p(Zn),Ta=r(Zn,"P",{});var rc=i(Ta);tu=s(rc,"In this case "),sl=r(rc,"CODE",{});var n2=i(sl);ou=s(n2,"call()"),n2.forEach(t),nu=s(rc,` just reapplies
all ops in the graph to the new inputs
(e.g. build a new computational graph from the provided inputs).`),rc.forEach(t),su=p(Zn),kt=r(Zn,"P",{});var Kt=i(kt);au=s(Kt,`Note: This method should not be called directly. It is only meant to be
overridden when subclassing `),al=r(Kt,"CODE",{});var s2=i(al);ru=s(s2,"tf.keras.Model"),s2.forEach(t),iu=s(Kt,`.
To call a model on an input, always use the `),rl=r(Kt,"CODE",{});var a2=i(rl);lu=s(a2,"__call__()"),a2.forEach(t),du=s(Kt,` method,
i.e. `),il=r(Kt,"CODE",{});var r2=i(il);cu=s(r2,"model(inputs)"),r2.forEach(t),pu=s(Kt,", which relies on the underlying "),ll=r(Kt,"CODE",{});var i2=i(ll);hu=s(i2,"call()"),i2.forEach(t),fu=s(Kt," method."),Kt.forEach(t),Zn.forEach(t),Or.forEach(t),wd=p(o),Fo=r(o,"H2",{class:!0});var ic=i(Fo);bn=r(ic,"A",{id:!0,class:!0,href:!0});var l2=i(bn);dl=r(l2,"SPAN",{});var d2=i(dl);T(ya.$$.fragment,d2),d2.forEach(t),l2.forEach(t),mu=p(ic),cl=r(ic,"SPAN",{});var c2=i(cl);uu=s(c2,"TFDebertaV2ForMaskedLM"),c2.forEach(t),ic.forEach(t),Td=p(o),lt=r(o,"DIV",{class:!0});var Qt=i(lt);T($a.$$.fragment,Qt),gu=p(Qt),qo=r(Qt,"P",{});var Nr=i(qo);_u=s(Nr,"DeBERTa Model with a "),pl=r(Nr,"CODE",{});var p2=i(pl);bu=s(p2,"language modeling"),p2.forEach(t),ku=s(Nr,` head on top.
The DeBERTa model was proposed in `),Da=r(Nr,"A",{href:!0,rel:!0});var h2=i(Da);vu=s(h2,`DeBERTa: Decoding-enhanced BERT with Disentangled
Attention`),h2.forEach(t),wu=s(Nr,` by Pengcheng He, Xiaodong Liu, Jianfeng Gao, Weizhu Chen. It\u2019s build
on top of BERT/RoBERTa with two improvements, i.e. disentangled attention and enhanced mask decoder. With those two
improvements, it out perform BERT/RoBERTa on a majority of tasks with 80GB pretraining data.`),Nr.forEach(t),Tu=p(Qt),Ea=r(Qt,"P",{});var lc=i(Ea);yu=s(lc,"This model is also a "),Fa=r(lc,"A",{href:!0,rel:!0});var f2=i(Fa);$u=s(f2,"tf.keras.Model"),f2.forEach(t),Du=s(lc,` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),lc.forEach(t),Eu=p(Qt),T(kn.$$.fragment,Qt),Fu=p(Qt),pt=r(Qt,"DIV",{class:!0});var Gt=i(pt);T(qa.$$.fragment,Gt),qu=p(Gt),xo=r(Gt,"P",{});var Wr=i(xo);xu=s(Wr,"The "),_r=r(Wr,"A",{href:!0});var m2=i(_r);zu=s(m2,"TFDebertaV2ForMaskedLM"),m2.forEach(t),Vu=s(Wr," forward method, overrides the "),hl=r(Wr,"CODE",{});var u2=i(hl);Mu=s(u2,"__call__"),u2.forEach(t),ju=s(Wr," special method."),Wr.forEach(t),Cu=p(Gt),T(vn.$$.fragment,Gt),Au=p(Gt),T(wn.$$.fragment,Gt),Pu=p(Gt),T(Tn.$$.fragment,Gt),Gt.forEach(t),Qt.forEach(t),yd=p(o),zo=r(o,"H2",{class:!0});var dc=i(zo);yn=r(dc,"A",{id:!0,class:!0,href:!0});var g2=i(yn);fl=r(g2,"SPAN",{});var _2=i(fl);T(xa.$$.fragment,_2),_2.forEach(t),g2.forEach(t),Ru=p(dc),ml=r(dc,"SPAN",{});var b2=i(ml);Bu=s(b2,"TFDebertaV2ForSequenceClassification"),b2.forEach(t),dc.forEach(t),$d=p(o),Ze=r(o,"DIV",{class:!0});var Mt=i(Ze);T(za.$$.fragment,Mt),Iu=p(Mt),ul=r(Mt,"P",{});var k2=i(ul);Lu=s(k2,`DeBERTa Model transformer with a sequence classification/regression head on top (a linear layer on top of the
pooled output) e.g. for GLUE tasks.`),k2.forEach(t),Su=p(Mt),Va=r(Mt,"P",{});var cc=i(Va);Ou=s(cc,"The DeBERTa model was proposed in "),Ma=r(cc,"A",{href:!0,rel:!0});var v2=i(Ma);Nu=s(v2,`DeBERTa: Decoding-enhanced BERT with Disentangled
Attention`),v2.forEach(t),Wu=s(cc,` by Pengcheng He, Xiaodong Liu, Jianfeng Gao, Weizhu Chen. It\u2019s build
on top of BERT/RoBERTa with two improvements, i.e. disentangled attention and enhanced mask decoder. With those two
improvements, it out perform BERT/RoBERTa on a majority of tasks with 80GB pretraining data.`),cc.forEach(t),Hu=p(Mt),ja=r(Mt,"P",{});var pc=i(ja);Uu=s(pc,"This model is also a "),Ca=r(pc,"A",{href:!0,rel:!0});var w2=i(Ca);Ku=s(w2,"tf.keras.Model"),w2.forEach(t),Qu=s(pc,` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),pc.forEach(t),Gu=p(Mt),T($n.$$.fragment,Mt),Ju=p(Mt),ht=r(Mt,"DIV",{class:!0});var Jt=i(ht);T(Aa.$$.fragment,Jt),Xu=p(Jt),Vo=r(Jt,"P",{});var Hr=i(Vo);Yu=s(Hr,"The "),br=r(Hr,"A",{href:!0});var T2=i(br);Zu=s(T2,"TFDebertaV2ForSequenceClassification"),T2.forEach(t),eg=s(Hr," forward method, overrides the "),gl=r(Hr,"CODE",{});var y2=i(gl);tg=s(y2,"__call__"),y2.forEach(t),og=s(Hr," special method."),Hr.forEach(t),ng=p(Jt),T(Dn.$$.fragment,Jt),sg=p(Jt),T(En.$$.fragment,Jt),ag=p(Jt),T(Fn.$$.fragment,Jt),Jt.forEach(t),Mt.forEach(t),Dd=p(o),Mo=r(o,"H2",{class:!0});var hc=i(Mo);qn=r(hc,"A",{id:!0,class:!0,href:!0});var $2=i(qn);_l=r($2,"SPAN",{});var D2=i(_l);T(Pa.$$.fragment,D2),D2.forEach(t),$2.forEach(t),rg=p(hc),bl=r(hc,"SPAN",{});var E2=i(bl);ig=s(E2,"TFDebertaV2ForTokenClassification"),E2.forEach(t),hc.forEach(t),Ed=p(o),et=r(o,"DIV",{class:!0});var jt=i(et);T(Ra.$$.fragment,jt),lg=p(jt),kl=r(jt,"P",{});var F2=i(kl);dg=s(F2,`DeBERTa 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.`),F2.forEach(t),cg=p(jt),Ba=r(jt,"P",{});var fc=i(Ba);pg=s(fc,"The DeBERTa model was proposed in "),Ia=r(fc,"A",{href:!0,rel:!0});var q2=i(Ia);hg=s(q2,`DeBERTa: Decoding-enhanced BERT with Disentangled
Attention`),q2.forEach(t),fg=s(fc,` by Pengcheng He, Xiaodong Liu, Jianfeng Gao, Weizhu Chen. It\u2019s build
on top of BERT/RoBERTa with two improvements, i.e. disentangled attention and enhanced mask decoder. With those two
improvements, it out perform BERT/RoBERTa on a majority of tasks with 80GB pretraining data.`),fc.forEach(t),mg=p(jt),La=r(jt,"P",{});var mc=i(La);ug=s(mc,"This model is also a "),Sa=r(mc,"A",{href:!0,rel:!0});var x2=i(Sa);gg=s(x2,"tf.keras.Model"),x2.forEach(t),_g=s(mc,` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),mc.forEach(t),bg=p(jt),T(xn.$$.fragment,jt),kg=p(jt),ft=r(jt,"DIV",{class:!0});var Xt=i(ft);T(Oa.$$.fragment,Xt),vg=p(Xt),jo=r(Xt,"P",{});var Ur=i(jo);wg=s(Ur,"The "),kr=r(Ur,"A",{href:!0});var z2=i(kr);Tg=s(z2,"TFDebertaV2ForTokenClassification"),z2.forEach(t),yg=s(Ur," forward method, overrides the "),vl=r(Ur,"CODE",{});var V2=i(vl);$g=s(V2,"__call__"),V2.forEach(t),Dg=s(Ur," special method."),Ur.forEach(t),Eg=p(Xt),T(zn.$$.fragment,Xt),Fg=p(Xt),T(Vn.$$.fragment,Xt),qg=p(Xt),T(Mn.$$.fragment,Xt),Xt.forEach(t),jt.forEach(t),Fd=p(o),Co=r(o,"H2",{class:!0});var uc=i(Co);jn=r(uc,"A",{id:!0,class:!0,href:!0});var M2=i(jn);wl=r(M2,"SPAN",{});var j2=i(wl);T(Na.$$.fragment,j2),j2.forEach(t),M2.forEach(t),xg=p(uc),Tl=r(uc,"SPAN",{});var C2=i(Tl);zg=s(C2,"TFDebertaV2ForQuestionAnswering"),C2.forEach(t),uc.forEach(t),qd=p(o),tt=r(o,"DIV",{class:!0});var Ct=i(tt);T(Wa.$$.fragment,Ct),Vg=p(Ct),Ao=r(Ct,"P",{});var Kr=i(Ao);Mg=s(Kr,`DeBERTa 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 `),yl=r(Kr,"CODE",{});var A2=i(yl);jg=s(A2,"span start logits"),A2.forEach(t),Cg=s(Kr," and "),$l=r(Kr,"CODE",{});var P2=i($l);Ag=s(P2,"span end logits"),P2.forEach(t),Pg=s(Kr,")."),Kr.forEach(t),Rg=p(Ct),Ha=r(Ct,"P",{});var gc=i(Ha);Bg=s(gc,"The DeBERTa model was proposed in "),Ua=r(gc,"A",{href:!0,rel:!0});var R2=i(Ua);Ig=s(R2,`DeBERTa: Decoding-enhanced BERT with Disentangled
Attention`),R2.forEach(t),Lg=s(gc,` by Pengcheng He, Xiaodong Liu, Jianfeng Gao, Weizhu Chen. It\u2019s build
on top of BERT/RoBERTa with two improvements, i.e. disentangled attention and enhanced mask decoder. With those two
improvements, it out perform BERT/RoBERTa on a majority of tasks with 80GB pretraining data.`),gc.forEach(t),Sg=p(Ct),Ka=r(Ct,"P",{});var _c=i(Ka);Og=s(_c,"This model is also a "),Qa=r(_c,"A",{href:!0,rel:!0});var B2=i(Qa);Ng=s(B2,"tf.keras.Model"),B2.forEach(t),Wg=s(_c,` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),_c.forEach(t),Hg=p(Ct),T(Cn.$$.fragment,Ct),Ug=p(Ct),mt=r(Ct,"DIV",{class:!0});var Yt=i(mt);T(Ga.$$.fragment,Yt),Kg=p(Yt),Po=r(Yt,"P",{});var Qr=i(Po);Qg=s(Qr,"The "),vr=r(Qr,"A",{href:!0});var I2=i(vr);Gg=s(I2,"TFDebertaV2ForQuestionAnswering"),I2.forEach(t),Jg=s(Qr," forward method, overrides the "),Dl=r(Qr,"CODE",{});var L2=i(Dl);Xg=s(L2,"__call__"),L2.forEach(t),Yg=s(Qr," special method."),Qr.forEach(t),Zg=p(Yt),T(An.$$.fragment,Yt),e_=p(Yt),T(Pn.$$.fragment,Yt),t_=p(Yt),T(Rn.$$.fragment,Yt),Yt.forEach(t),Ct.forEach(t),this.h()},h(){m(d,"name","hf:doc:metadata"),m(d,"content",JSON.stringify(xk)),m(u,"id","debertav2"),m(u,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),m(u,"href","#debertav2"),m(f,"class","relative group"),m(ne,"id","overview"),m(ne,"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(ne,"href","#overview"),m(B,"class","relative group"),m(ie,"href","https://arxiv.org/abs/2006.03654"),m(ie,"rel","nofollow"),m(le,"href","https://github.com/microsoft/DeBERTa"),m(le,"rel","nofollow"),m(de,"href","https://github.com/microsoft/DeBERTa"),m(de,"rel","nofollow"),m(O,"href","https://www.microsoft.com/en-us/research/blog/microsoft-deberta-surpasses-human-performance-on-the-superglue-benchmark/"),m(O,"rel","nofollow"),m(j,"href","https://github.com/google/sentencepiece"),m(j,"rel","nofollow"),m(ee,"href","https://huggingface.co/DeBERTa"),m(ee,"rel","nofollow"),m(es,"href","https://huggingface.co/kamalkraj"),m(es,"rel","nofollow"),m(ts,"href","https://github.com/microsoft/DeBERTa"),m(ts,"rel","nofollow"),m(Ro,"id","documentation-resources"),m(Ro,"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(Ro,"href","#documentation-resources"),m(Zt,"class","relative group"),m(tr,"href","../tasks/sequence_classification"),m(or,"href","../tasks/token_classification"),m(nr,"href","../tasks/question_answering"),m(sr,"href","../tasks/masked_language_modeling"),m(ar,"href","../tasks/multiple_choice"),m(Bo,"id","transformers.DebertaV2Config"),m(Bo,"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(Bo,"href","#transformers.DebertaV2Config"),m(eo,"class","relative group"),m(rr,"href","/docs/transformers/v4.29.0/en/model_doc/deberta-v2#transformers.DebertaV2Model"),m(as,"href","https://huggingface.co/microsoft/deberta-v2-xlarge"),m(as,"rel","nofollow"),m(ir,"href","/docs/transformers/v4.29.0/en/main_classes/configuration#transformers.PretrainedConfig"),m(lr,"href","/docs/transformers/v4.29.0/en/main_classes/configuration#transformers.PretrainedConfig"),m(ut,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(Lo,"id","transformers.DebertaV2Tokenizer"),m(Lo,"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(Lo,"href","#transformers.DebertaV2Tokenizer"),m(no,"class","relative group"),m(ds,"href","https://github.com/google/sentencepiece"),m(ds,"rel","nofollow"),m(Bt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(So,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(wt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(dr,"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,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(No,"id","transformers.DebertaV2TokenizerFast"),m(No,"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(No,"href","#transformers.DebertaV2TokenizerFast"),m(ro,"class","relative group"),m(bs,"href","https://github.com/google/sentencepiece"),m(bs,"rel","nofollow"),m(It,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(Tt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(gt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(Ho,"id","transformers.DebertaV2Model"),m(Ho,"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(Ho,"href","#transformers.DebertaV2Model"),m(lo,"class","relative group"),m(Ds,"href","https://arxiv.org/abs/2006.03654"),m(Ds,"rel","nofollow"),m(Fs,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),m(Fs,"rel","nofollow"),m(cr,"href","/docs/transformers/v4.29.0/en/model_doc/deberta-v2#transformers.DebertaV2Model"),m(yt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(_t,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(Qo,"id","transformers.DebertaV2PreTrainedModel"),m(Qo,"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(Qo,"href","#transformers.DebertaV2PreTrainedModel"),m(po,"class","relative group"),m($t,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(At,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(Jo,"id","transformers.DebertaV2ForMaskedLM"),m(Jo,"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(Jo,"href","#transformers.DebertaV2ForMaskedLM"),m(ho,"class","relative group"),m(Cs,"href","https://arxiv.org/abs/2006.03654"),m(Cs,"rel","nofollow"),m(Ps,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),m(Ps,"rel","nofollow"),m(pr,"href","/docs/transformers/v4.29.0/en/model_doc/deberta-v2#transformers.DebertaV2ForMaskedLM"),m(Dt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(bt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(Zo,"id","transformers.DebertaV2ForSequenceClassification"),m(Zo,"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(Zo,"href","#transformers.DebertaV2ForSequenceClassification"),m(uo,"class","relative group"),m(Ss,"href","https://arxiv.org/abs/2006.03654"),m(Ss,"rel","nofollow"),m(Ns,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),m(Ns,"rel","nofollow"),m(hr,"href","/docs/transformers/v4.29.0/en/model_doc/deberta-v2#transformers.DebertaV2ForSequenceClassification"),m(ct,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(nt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(nn,"id","transformers.DebertaV2ForTokenClassification"),m(nn,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),m(nn,"href","#transformers.DebertaV2ForTokenClassification"),m(_o,"class","relative group"),m(Qs,"href","https://arxiv.org/abs/2006.03654"),m(Qs,"rel","nofollow"),m(Js,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),m(Js,"rel","nofollow"),m(fr,"href","/docs/transformers/v4.29.0/en/model_doc/deberta-v2#transformers.DebertaV2ForTokenClassification"),m(Et,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(st,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(rn,"id","transformers.DebertaV2ForQuestionAnswering"),m(rn,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),m(rn,"href","#transformers.DebertaV2ForQuestionAnswering"),m(ko,"class","relative group"),m(ta,"href","https://arxiv.org/abs/2006.03654"),m(ta,"rel","nofollow"),m(na,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),m(na,"rel","nofollow"),m(mr,"href","/docs/transformers/v4.29.0/en/model_doc/deberta-v2#transformers.DebertaV2ForQuestionAnswering"),m(Ft,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(at,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(cn,"id","transformers.DebertaV2ForMultipleChoice"),m(cn,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),m(cn,"href","#transformers.DebertaV2ForMultipleChoice"),m(To,"class","relative group"),m(la,"href","https://arxiv.org/abs/2006.03654"),m(la,"rel","nofollow"),m(ca,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),m(ca,"rel","nofollow"),m(ur,"href","/docs/transformers/v4.29.0/en/model_doc/deberta-v2#transformers.DebertaV2ForMultipleChoice"),m(qt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(rt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(fn,"id","transformers.TFDebertaV2Model"),m(fn,"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(fn,"href","#transformers.TFDebertaV2Model"),m($o,"class","relative group"),m(ua,"href","https://arxiv.org/abs/2006.03654"),m(ua,"rel","nofollow"),m(_a,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),m(_a,"rel","nofollow"),m(gr,"href","/docs/transformers/v4.29.0/en/model_doc/deberta-v2#transformers.TFDebertaV2Model"),m(xt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(it,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(_n,"id","transformers.TFDebertaV2PreTrainedModel"),m(_n,"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(_n,"href","#transformers.TFDebertaV2PreTrainedModel"),m(Eo,"class","relative group"),m(zt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(Pt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(bn,"id","transformers.TFDebertaV2ForMaskedLM"),m(bn,"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(bn,"href","#transformers.TFDebertaV2ForMaskedLM"),m(Fo,"class","relative group"),m(Da,"href","https://arxiv.org/abs/2006.03654"),m(Da,"rel","nofollow"),m(Fa,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),m(Fa,"rel","nofollow"),m(_r,"href","/docs/transformers/v4.29.0/en/model_doc/deberta-v2#transformers.TFDebertaV2ForMaskedLM"),m(pt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(lt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(yn,"id","transformers.TFDebertaV2ForSequenceClassification"),m(yn,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),m(yn,"href","#transformers.TFDebertaV2ForSequenceClassification"),m(zo,"class","relative group"),m(Ma,"href","https://arxiv.org/abs/2006.03654"),m(Ma,"rel","nofollow"),m(Ca,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),m(Ca,"rel","nofollow"),m(br,"href","/docs/transformers/v4.29.0/en/model_doc/deberta-v2#transformers.TFDebertaV2ForSequenceClassification"),m(ht,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(Ze,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(qn,"id","transformers.TFDebertaV2ForTokenClassification"),m(qn,"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(qn,"href","#transformers.TFDebertaV2ForTokenClassification"),m(Mo,"class","relative group"),m(Ia,"href","https://arxiv.org/abs/2006.03654"),m(Ia,"rel","nofollow"),m(Sa,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),m(Sa,"rel","nofollow"),m(kr,"href","/docs/transformers/v4.29.0/en/model_doc/deberta-v2#transformers.TFDebertaV2ForTokenClassification"),m(ft,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(et,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(jn,"id","transformers.TFDebertaV2ForQuestionAnswering"),m(jn,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),m(jn,"href","#transformers.TFDebertaV2ForQuestionAnswering"),m(Co,"class","relative group"),m(Ua,"href","https://arxiv.org/abs/2006.03654"),m(Ua,"rel","nofollow"),m(Qa,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),m(Qa,"rel","nofollow"),m(vr,"href","/docs/transformers/v4.29.0/en/model_doc/deberta-v2#transformers.TFDebertaV2ForQuestionAnswering"),m(mt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(tt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(o,_){e(document.head,d),g(o,k,_),g(o,f,_),e(f,u),e(u,v),y(l,v,null),e(f,h),e(f,z),e(z,ke),g(o,pe,_),g(o,B,_),e(B,ne),e(ne,oe),y(F,oe,null),e(B,ve),e(B,U),e(U,we),g(o,he,_),g(o,L,_),e(L,Te),e(L,ie),e(ie,G),e(L,ye),g(o,fe,_),g(o,N,_),e(N,$e),g(o,me,_),g(o,W,_),e(W,De),g(o,ue,_),g(o,te,_),e(te,M),e(M,A),e(M,le),e(le,J),e(M,Ee),g(o,ge,_),g(o,I,_),e(I,Fe),e(I,de),e(de,P),e(I,qe),e(I,O),e(O,xe),g(o,_e,_),g(o,H,_),e(H,ze),g(o,be,_),g(o,C,_),e(C,se),e(se,K),e(K,Ve),e(se,ae),e(se,j),e(j,Me),e(se,R),e(C,je),e(C,ce),e(ce,b),e(b,q),e(ce,He),e(C,re),e(C,Ce),e(Ce,Re),e(Re,V),e(Ce,Ue),e(C,Ke),e(C,Ae),e(Ae,Be),e(Be,Qe),e(Ae,S),e(C,X),e(C,Pe),e(Pe,Ie),e(Ie,Y),e(Pe,Ge),g(o,Le,_),g(o,Z,_),e(Z,Je),e(Z,ee),e(ee,Xe),e(Z,bc),e(Z,es),e(es,kc),e(Z,vc),e(Z,ts),e(ts,wc),e(Z,Tc),g(o,Gl,_),g(o,Zt,_),e(Zt,Ro),e(Ro,Gr),y(os,Gr,null),e(Zt,yc),e(Zt,Jr),e(Jr,$c),g(o,Jl,_),g(o,dt,_),e(dt,Xr),e(Xr,tr),e(tr,Dc),e(dt,Ec),e(dt,Yr),e(Yr,or),e(or,Fc),e(dt,qc),e(dt,Zr),e(Zr,nr),e(nr,xc),e(dt,zc),e(dt,ei),e(ei,sr),e(sr,Vc),e(dt,Mc),e(dt,ti),e(ti,ar),e(ar,jc),g(o,Xl,_),g(o,eo,_),e(eo,Bo),e(Bo,oi),y(ns,oi,null),e(eo,Cc),e(eo,ni),e(ni,Ac),g(o,Yl,_),g(o,ut,_),y(ss,ut,null),e(ut,Pc),e(ut,to),e(to,Rc),e(to,rr),e(rr,Bc),e(to,Ic),e(to,as),e(as,Lc),e(to,Sc),e(ut,Oc),e(ut,oo),e(oo,Nc),e(oo,ir),e(ir,Wc),e(oo,Hc),e(oo,lr),e(lr,Uc),e(oo,Kc),e(ut,Qc),y(Io,ut,null),g(o,Zl,_),g(o,no,_),e(no,Lo),e(Lo,si),y(rs,si,null),e(no,Gc),e(no,ai),e(ai,Jc),g(o,ed,_),g(o,Ye,_),y(is,Ye,null),e(Ye,Xc),e(Ye,ls),e(ls,Yc),e(ls,ds),e(ds,Zc),e(ls,ep),e(Ye,tp),e(Ye,Bt),y(cs,Bt,null),e(Bt,op),e(Bt,ri),e(ri,np),e(Bt,sp),e(Bt,ps),e(ps,ii),e(ii,ap),e(ps,rp),e(ps,li),e(li,ip),e(Ye,lp),e(Ye,So),y(hs,So,null),e(So,dp),e(So,so),e(so,cp),e(so,di),e(di,pp),e(so,hp),e(so,ci),e(ci,fp),e(so,mp),e(Ye,up),e(Ye,wt),y(fs,wt,null),e(wt,gp),e(wt,pi),e(pi,_p),e(wt,bp),y(Oo,wt,null),e(wt,kp),e(wt,ao),e(ao,vp),e(ao,hi),e(hi,wp),e(ao,Tp),e(ao,fi),e(fi,yp),e(ao,$p),e(Ye,Dp),e(Ye,dr),y(ms,dr,null),g(o,td,_),g(o,ro,_),e(ro,No),e(No,mi),y(us,mi,null),e(ro,Ep),e(ro,ui),e(ui,Fp),g(o,od,_),g(o,gt,_),y(gs,gt,null),e(gt,qp),e(gt,_s),e(_s,xp),e(_s,bs),e(bs,zp),e(_s,Vp),e(gt,Mp),e(gt,It),y(ks,It,null),e(It,jp),e(It,gi),e(gi,Cp),e(It,Ap),e(It,vs),e(vs,_i),e(_i,Pp),e(vs,Rp),e(vs,bi),e(bi,Bp),e(gt,Ip),e(gt,Tt),y(ws,Tt,null),e(Tt,Lp),e(Tt,ki),e(ki,Sp),e(Tt,Op),y(Wo,Tt,null),e(Tt,Np),e(Tt,io),e(io,Wp),e(io,vi),e(vi,Hp),e(io,Up),e(io,wi),e(wi,Kp),e(io,Qp),g(o,nd,_),g(o,lo,_),e(lo,Ho),e(Ho,Ti),y(Ts,Ti,null),e(lo,Gp),e(lo,yi),e(yi,Jp),g(o,sd,_),g(o,_t,_),y(ys,_t,null),e(_t,Xp),e(_t,$s),e($s,Yp),e($s,Ds),e(Ds,Zp),e($s,eh),e(_t,th),e(_t,Es),e(Es,oh),e(Es,Fs),e(Fs,nh),e(Es,sh),e(_t,ah),e(_t,yt),y(qs,yt,null),e(yt,rh),e(yt,co),e(co,ih),e(co,cr),e(cr,lh),e(co,dh),e(co,$i),e($i,ch),e(co,ph),e(yt,hh),y(Uo,yt,null),e(yt,fh),y(Ko,yt,null),g(o,ad,_),g(o,po,_),e(po,Qo),e(Qo,Di),y(xs,Di,null),e(po,mh),e(po,Ei),e(Ei,uh),g(o,rd,_),g(o,At,_),y(zs,At,null),e(At,gh),e(At,Fi),e(Fi,_h),e(At,bh),e(At,$t),y(Vs,$t,null),e($t,kh),e($t,qi),e(qi,vh),e($t,wh),e($t,xi),e(xi,Th),e($t,yh),y(Go,$t,null),g(o,id,_),g(o,ho,_),e(ho,Jo),e(Jo,zi),y(Ms,zi,null),e(ho,$h),e(ho,Vi),e(Vi,Dh),g(o,ld,_),g(o,bt,_),y(js,bt,null),e(bt,Eh),e(bt,fo),e(fo,Fh),e(fo,Mi),e(Mi,qh),e(fo,xh),e(fo,Cs),e(Cs,zh),e(fo,Vh),e(bt,Mh),e(bt,As),e(As,jh),e(As,Ps),e(Ps,Ch),e(As,Ah),e(bt,Ph),e(bt,Dt),y(Rs,Dt,null),e(Dt,Rh),e(Dt,mo),e(mo,Bh),e(mo,pr),e(pr,Ih),e(mo,Lh),e(mo,ji),e(ji,Sh),e(mo,Oh),e(Dt,Nh),y(Xo,Dt,null),e(Dt,Wh),y(Yo,Dt,null),g(o,dd,_),g(o,uo,_),e(uo,Zo),e(Zo,Ci),y(Bs,Ci,null),e(uo,Hh),e(uo,Ai),e(Ai,Uh),g(o,cd,_),g(o,nt,_),y(Is,nt,null),e(nt,Kh),e(nt,Pi),e(Pi,Qh),e(nt,Gh),e(nt,Ls),e(Ls,Jh),e(Ls,Ss),e(Ss,Xh),e(Ls,Yh),e(nt,Zh),e(nt,Os),e(Os,ef),e(Os,Ns),e(Ns,tf),e(Os,of),e(nt,nf),e(nt,ct),y(Ws,ct,null),e(ct,sf),e(ct,go),e(go,af),e(go,hr),e(hr,rf),e(go,lf),e(go,Ri),e(Ri,df),e(go,cf),e(ct,pf),y(en,ct,null),e(ct,hf),y(tn,ct,null),e(ct,ff),y(on,ct,null),g(o,pd,_),g(o,_o,_),e(_o,nn),e(nn,Bi),y(Hs,Bi,null),e(_o,mf),e(_o,Ii),e(Ii,uf),g(o,hd,_),g(o,st,_),y(Us,st,null),e(st,gf),e(st,Li),e(Li,_f),e(st,bf),e(st,Ks),e(Ks,kf),e(Ks,Qs),e(Qs,vf),e(Ks,wf),e(st,Tf),e(st,Gs),e(Gs,yf),e(Gs,Js),e(Js,$f),e(Gs,Df),e(st,Ef),e(st,Et),y(Xs,Et,null),e(Et,Ff),e(Et,bo),e(bo,qf),e(bo,fr),e(fr,xf),e(bo,zf),e(bo,Si),e(Si,Vf),e(bo,Mf),e(Et,jf),y(sn,Et,null),e(Et,Cf),y(an,Et,null),g(o,fd,_),g(o,ko,_),e(ko,rn),e(rn,Oi),y(Ys,Oi,null),e(ko,Af),e(ko,Ni),e(Ni,Pf),g(o,md,_),g(o,at,_),y(Zs,at,null),e(at,Rf),e(at,vo),e(vo,Bf),e(vo,Wi),e(Wi,If),e(vo,Lf),e(vo,Hi),e(Hi,Sf),e(vo,Of),e(at,Nf),e(at,ea),e(ea,Wf),e(ea,ta),e(ta,Hf),e(ea,Uf),e(at,Kf),e(at,oa),e(oa,Qf),e(oa,na),e(na,Gf),e(oa,Jf),e(at,Xf),e(at,Ft),y(sa,Ft,null),e(Ft,Yf),e(Ft,wo),e(wo,Zf),e(wo,mr),e(mr,em),e(wo,tm),e(wo,Ui),e(Ui,om),e(wo,nm),e(Ft,sm),y(ln,Ft,null),e(Ft,am),y(dn,Ft,null),g(o,ud,_),g(o,To,_),e(To,cn),e(cn,Ki),y(aa,Ki,null),e(To,rm),e(To,Qi),e(Qi,im),g(o,gd,_),g(o,rt,_),y(ra,rt,null),e(rt,lm),e(rt,Gi),e(Gi,dm),e(rt,cm),e(rt,ia),e(ia,pm),e(ia,la),e(la,hm),e(ia,fm),e(rt,mm),e(rt,da),e(da,um),e(da,ca),e(ca,gm),e(da,_m),e(rt,bm),e(rt,qt),y(pa,qt,null),e(qt,km),e(qt,yo),e(yo,vm),e(yo,ur),e(ur,wm),e(yo,Tm),e(yo,Ji),e(Ji,ym),e(yo,$m),e(qt,Dm),y(pn,qt,null),e(qt,Em),y(hn,qt,null),g(o,_d,_),g(o,$o,_),e($o,fn),e(fn,Xi),y(ha,Xi,null),e($o,Fm),e($o,Yi),e(Yi,qm),g(o,bd,_),g(o,it,_),y(fa,it,null),e(it,xm),e(it,ma),e(ma,zm),e(ma,ua),e(ua,Vm),e(ma,Mm),e(it,jm),e(it,ga),e(ga,Cm),e(ga,_a),e(_a,Am),e(ga,Pm),e(it,Rm),y(mn,it,null),e(it,Bm),e(it,xt),y(ba,xt,null),e(xt,Im),e(xt,Do),e(Do,Lm),e(Do,gr),e(gr,Sm),e(Do,Om),e(Do,Zi),e(Zi,Nm),e(Do,Wm),e(xt,Hm),y(un,xt,null),e(xt,Um),y(gn,xt,null),g(o,kd,_),g(o,Eo,_),e(Eo,_n),e(_n,el),y(ka,el,null),e(Eo,Km),e(Eo,tl),e(tl,Qm),g(o,vd,_),g(o,Pt,_),y(va,Pt,null),e(Pt,Gm),e(Pt,ol),e(ol,Jm),e(Pt,Xm),e(Pt,zt),y(wa,zt,null),e(zt,Ym),e(zt,nl),e(nl,Zm),e(zt,eu),e(zt,Ta),e(Ta,tu),e(Ta,sl),e(sl,ou),e(Ta,nu),e(zt,su),e(zt,kt),e(kt,au),e(kt,al),e(al,ru),e(kt,iu),e(kt,rl),e(rl,lu),e(kt,du),e(kt,il),e(il,cu),e(kt,pu),e(kt,ll),e(ll,hu),e(kt,fu),g(o,wd,_),g(o,Fo,_),e(Fo,bn),e(bn,dl),y(ya,dl,null),e(Fo,mu),e(Fo,cl),e(cl,uu),g(o,Td,_),g(o,lt,_),y($a,lt,null),e(lt,gu),e(lt,qo),e(qo,_u),e(qo,pl),e(pl,bu),e(qo,ku),e(qo,Da),e(Da,vu),e(qo,wu),e(lt,Tu),e(lt,Ea),e(Ea,yu),e(Ea,Fa),e(Fa,$u),e(Ea,Du),e(lt,Eu),y(kn,lt,null),e(lt,Fu),e(lt,pt),y(qa,pt,null),e(pt,qu),e(pt,xo),e(xo,xu),e(xo,_r),e(_r,zu),e(xo,Vu),e(xo,hl),e(hl,Mu),e(xo,ju),e(pt,Cu),y(vn,pt,null),e(pt,Au),y(wn,pt,null),e(pt,Pu),y(Tn,pt,null),g(o,yd,_),g(o,zo,_),e(zo,yn),e(yn,fl),y(xa,fl,null),e(zo,Ru),e(zo,ml),e(ml,Bu),g(o,$d,_),g(o,Ze,_),y(za,Ze,null),e(Ze,Iu),e(Ze,ul),e(ul,Lu),e(Ze,Su),e(Ze,Va),e(Va,Ou),e(Va,Ma),e(Ma,Nu),e(Va,Wu),e(Ze,Hu),e(Ze,ja),e(ja,Uu),e(ja,Ca),e(Ca,Ku),e(ja,Qu),e(Ze,Gu),y($n,Ze,null),e(Ze,Ju),e(Ze,ht),y(Aa,ht,null),e(ht,Xu),e(ht,Vo),e(Vo,Yu),e(Vo,br),e(br,Zu),e(Vo,eg),e(Vo,gl),e(gl,tg),e(Vo,og),e(ht,ng),y(Dn,ht,null),e(ht,sg),y(En,ht,null),e(ht,ag),y(Fn,ht,null),g(o,Dd,_),g(o,Mo,_),e(Mo,qn),e(qn,_l),y(Pa,_l,null),e(Mo,rg),e(Mo,bl),e(bl,ig),g(o,Ed,_),g(o,et,_),y(Ra,et,null),e(et,lg),e(et,kl),e(kl,dg),e(et,cg),e(et,Ba),e(Ba,pg),e(Ba,Ia),e(Ia,hg),e(Ba,fg),e(et,mg),e(et,La),e(La,ug),e(La,Sa),e(Sa,gg),e(La,_g),e(et,bg),y(xn,et,null),e(et,kg),e(et,ft),y(Oa,ft,null),e(ft,vg),e(ft,jo),e(jo,wg),e(jo,kr),e(kr,Tg),e(jo,yg),e(jo,vl),e(vl,$g),e(jo,Dg),e(ft,Eg),y(zn,ft,null),e(ft,Fg),y(Vn,ft,null),e(ft,qg),y(Mn,ft,null),g(o,Fd,_),g(o,Co,_),e(Co,jn),e(jn,wl),y(Na,wl,null),e(Co,xg),e(Co,Tl),e(Tl,zg),g(o,qd,_),g(o,tt,_),y(Wa,tt,null),e(tt,Vg),e(tt,Ao),e(Ao,Mg),e(Ao,yl),e(yl,jg),e(Ao,Cg),e(Ao,$l),e($l,Ag),e(Ao,Pg),e(tt,Rg),e(tt,Ha),e(Ha,Bg),e(Ha,Ua),e(Ua,Ig),e(Ha,Lg),e(tt,Sg),e(tt,Ka),e(Ka,Og),e(Ka,Qa),e(Qa,Ng),e(Ka,Wg),e(tt,Hg),y(Cn,tt,null),e(tt,Ug),e(tt,mt),y(Ga,mt,null),e(mt,Kg),e(mt,Po),e(Po,Qg),e(Po,vr),e(vr,Gg),e(Po,Jg),e(Po,Dl),e(Dl,Xg),e(Po,Yg),e(mt,Zg),y(An,mt,null),e(mt,e_),y(Pn,mt,null),e(mt,t_),y(Rn,mt,null),xd=!0},p(o,[_]){const Ja={};_&2&&(Ja.$$scope={dirty:_,ctx:o}),Io.$set(Ja);const El={};_&2&&(El.$$scope={dirty:_,ctx:o}),Oo.$set(El);const Fl={};_&2&&(Fl.$$scope={dirty:_,ctx:o}),Wo.$set(Fl);const ql={};_&2&&(ql.$$scope={dirty:_,ctx:o}),Uo.$set(ql);const Xa={};_&2&&(Xa.$$scope={dirty:_,ctx:o}),Ko.$set(Xa);const xl={};_&2&&(xl.$$scope={dirty:_,ctx:o}),Go.$set(xl);const zl={};_&2&&(zl.$$scope={dirty:_,ctx:o}),Xo.$set(zl);const Vl={};_&2&&(Vl.$$scope={dirty:_,ctx:o}),Yo.$set(Vl);const Ya={};_&2&&(Ya.$$scope={dirty:_,ctx:o}),en.$set(Ya);const Ml={};_&2&&(Ml.$$scope={dirty:_,ctx:o}),tn.$set(Ml);const jl={};_&2&&(jl.$$scope={dirty:_,ctx:o}),on.$set(jl);const Cl={};_&2&&(Cl.$$scope={dirty:_,ctx:o}),sn.$set(Cl);const Al={};_&2&&(Al.$$scope={dirty:_,ctx:o}),an.$set(Al);const Za={};_&2&&(Za.$$scope={dirty:_,ctx:o}),ln.$set(Za);const Pl={};_&2&&(Pl.$$scope={dirty:_,ctx:o}),dn.$set(Pl);const Bn={};_&2&&(Bn.$$scope={dirty:_,ctx:o}),pn.$set(Bn);const Rl={};_&2&&(Rl.$$scope={dirty:_,ctx:o}),hn.$set(Rl);const Bl={};_&2&&(Bl.$$scope={dirty:_,ctx:o}),mn.$set(Bl);const Il={};_&2&&(Il.$$scope={dirty:_,ctx:o}),un.$set(Il);const vt={};_&2&&(vt.$$scope={dirty:_,ctx:o}),gn.$set(vt);const In={};_&2&&(In.$$scope={dirty:_,ctx:o}),kn.$set(In);const Ll={};_&2&&(Ll.$$scope={dirty:_,ctx:o}),vn.$set(Ll);const Sl={};_&2&&(Sl.$$scope={dirty:_,ctx:o}),wn.$set(Sl);const wr={};_&2&&(wr.$$scope={dirty:_,ctx:o}),Tn.$set(wr);const Ol={};_&2&&(Ol.$$scope={dirty:_,ctx:o}),$n.$set(Ol);const Tr={};_&2&&(Tr.$$scope={dirty:_,ctx:o}),Dn.$set(Tr);const Nl={};_&2&&(Nl.$$scope={dirty:_,ctx:o}),En.$set(Nl);const yr={};_&2&&(yr.$$scope={dirty:_,ctx:o}),Fn.$set(yr);const Wl={};_&2&&(Wl.$$scope={dirty:_,ctx:o}),xn.$set(Wl);const $r={};_&2&&($r.$$scope={dirty:_,ctx:o}),zn.$set($r);const Hl={};_&2&&(Hl.$$scope={dirty:_,ctx:o}),Vn.$set(Hl);const Rt={};_&2&&(Rt.$$scope={dirty:_,ctx:o}),Mn.$set(Rt);const Ul={};_&2&&(Ul.$$scope={dirty:_,ctx:o}),Cn.$set(Ul);const Kl={};_&2&&(Kl.$$scope={dirty:_,ctx:o}),An.$set(Kl);const Ql={};_&2&&(Ql.$$scope={dirty:_,ctx:o}),Pn.$set(Ql);const er={};_&2&&(er.$$scope={dirty:_,ctx:o}),Rn.$set(er)},i(o){xd||($(l.$$.fragment,o),$(F.$$.fragment,o),$(os.$$.fragment,o),$(ns.$$.fragment,o),$(ss.$$.fragment,o),$(Io.$$.fragment,o),$(rs.$$.fragment,o),$(is.$$.fragment,o),$(cs.$$.fragment,o),$(hs.$$.fragment,o),$(fs.$$.fragment,o),$(Oo.$$.fragment,o),$(ms.$$.fragment,o),$(us.$$.fragment,o),$(gs.$$.fragment,o),$(ks.$$.fragment,o),$(ws.$$.fragment,o),$(Wo.$$.fragment,o),$(Ts.$$.fragment,o),$(ys.$$.fragment,o),$(qs.$$.fragment,o),$(Uo.$$.fragment,o),$(Ko.$$.fragment,o),$(xs.$$.fragment,o),$(zs.$$.fragment,o),$(Vs.$$.fragment,o),$(Go.$$.fragment,o),$(Ms.$$.fragment,o),$(js.$$.fragment,o),$(Rs.$$.fragment,o),$(Xo.$$.fragment,o),$(Yo.$$.fragment,o),$(Bs.$$.fragment,o),$(Is.$$.fragment,o),$(Ws.$$.fragment,o),$(en.$$.fragment,o),$(tn.$$.fragment,o),$(on.$$.fragment,o),$(Hs.$$.fragment,o),$(Us.$$.fragment,o),$(Xs.$$.fragment,o),$(sn.$$.fragment,o),$(an.$$.fragment,o),$(Ys.$$.fragment,o),$(Zs.$$.fragment,o),$(sa.$$.fragment,o),$(ln.$$.fragment,o),$(dn.$$.fragment,o),$(aa.$$.fragment,o),$(ra.$$.fragment,o),$(pa.$$.fragment,o),$(pn.$$.fragment,o),$(hn.$$.fragment,o),$(ha.$$.fragment,o),$(fa.$$.fragment,o),$(mn.$$.fragment,o),$(ba.$$.fragment,o),$(un.$$.fragment,o),$(gn.$$.fragment,o),$(ka.$$.fragment,o),$(va.$$.fragment,o),$(wa.$$.fragment,o),$(ya.$$.fragment,o),$($a.$$.fragment,o),$(kn.$$.fragment,o),$(qa.$$.fragment,o),$(vn.$$.fragment,o),$(wn.$$.fragment,o),$(Tn.$$.fragment,o),$(xa.$$.fragment,o),$(za.$$.fragment,o),$($n.$$.fragment,o),$(Aa.$$.fragment,o),$(Dn.$$.fragment,o),$(En.$$.fragment,o),$(Fn.$$.fragment,o),$(Pa.$$.fragment,o),$(Ra.$$.fragment,o),$(xn.$$.fragment,o),$(Oa.$$.fragment,o),$(zn.$$.fragment,o),$(Vn.$$.fragment,o),$(Mn.$$.fragment,o),$(Na.$$.fragment,o),$(Wa.$$.fragment,o),$(Cn.$$.fragment,o),$(Ga.$$.fragment,o),$(An.$$.fragment,o),$(Pn.$$.fragment,o),$(Rn.$$.fragment,o),xd=!0)},o(o){D(l.$$.fragment,o),D(F.$$.fragment,o),D(os.$$.fragment,o),D(ns.$$.fragment,o),D(ss.$$.fragment,o),D(Io.$$.fragment,o),D(rs.$$.fragment,o),D(is.$$.fragment,o),D(cs.$$.fragment,o),D(hs.$$.fragment,o),D(fs.$$.fragment,o),D(Oo.$$.fragment,o),D(ms.$$.fragment,o),D(us.$$.fragment,o),D(gs.$$.fragment,o),D(ks.$$.fragment,o),D(ws.$$.fragment,o),D(Wo.$$.fragment,o),D(Ts.$$.fragment,o),D(ys.$$.fragment,o),D(qs.$$.fragment,o),D(Uo.$$.fragment,o),D(Ko.$$.fragment,o),D(xs.$$.fragment,o),D(zs.$$.fragment,o),D(Vs.$$.fragment,o),D(Go.$$.fragment,o),D(Ms.$$.fragment,o),D(js.$$.fragment,o),D(Rs.$$.fragment,o),D(Xo.$$.fragment,o),D(Yo.$$.fragment,o),D(Bs.$$.fragment,o),D(Is.$$.fragment,o),D(Ws.$$.fragment,o),D(en.$$.fragment,o),D(tn.$$.fragment,o),D(on.$$.fragment,o),D(Hs.$$.fragment,o),D(Us.$$.fragment,o),D(Xs.$$.fragment,o),D(sn.$$.fragment,o),D(an.$$.fragment,o),D(Ys.$$.fragment,o),D(Zs.$$.fragment,o),D(sa.$$.fragment,o),D(ln.$$.fragment,o),D(dn.$$.fragment,o),D(aa.$$.fragment,o),D(ra.$$.fragment,o),D(pa.$$.fragment,o),D(pn.$$.fragment,o),D(hn.$$.fragment,o),D(ha.$$.fragment,o),D(fa.$$.fragment,o),D(mn.$$.fragment,o),D(ba.$$.fragment,o),D(un.$$.fragment,o),D(gn.$$.fragment,o),D(ka.$$.fragment,o),D(va.$$.fragment,o),D(wa.$$.fragment,o),D(ya.$$.fragment,o),D($a.$$.fragment,o),D(kn.$$.fragment,o),D(qa.$$.fragment,o),D(vn.$$.fragment,o),D(wn.$$.fragment,o),D(Tn.$$.fragment,o),D(xa.$$.fragment,o),D(za.$$.fragment,o),D($n.$$.fragment,o),D(Aa.$$.fragment,o),D(Dn.$$.fragment,o),D(En.$$.fragment,o),D(Fn.$$.fragment,o),D(Pa.$$.fragment,o),D(Ra.$$.fragment,o),D(xn.$$.fragment,o),D(Oa.$$.fragment,o),D(zn.$$.fragment,o),D(Vn.$$.fragment,o),D(Mn.$$.fragment,o),D(Na.$$.fragment,o),D(Wa.$$.fragment,o),D(Cn.$$.fragment,o),D(Ga.$$.fragment,o),D(An.$$.fragment,o),D(Pn.$$.fragment,o),D(Rn.$$.fragment,o),xd=!1},d(o){t(d),o&&t(k),o&&t(f),E(l),o&&t(pe),o&&t(B),E(F),o&&t(he),o&&t(L),o&&t(fe),o&&t(N),o&&t(me),o&&t(W),o&&t(ue),o&&t(te),o&&t(ge),o&&t(I),o&&t(_e),o&&t(H),o&&t(be),o&&t(C),o&&t(Le),o&&t(Z),o&&t(Gl),o&&t(Zt),E(os),o&&t(Jl),o&&t(dt),o&&t(Xl),o&&t(eo),E(ns),o&&t(Yl),o&&t(ut),E(ss),E(Io),o&&t(Zl),o&&t(no),E(rs),o&&t(ed),o&&t(Ye),E(is),E(cs),E(hs),E(fs),E(Oo),E(ms),o&&t(td),o&&t(ro),E(us),o&&t(od),o&&t(gt),E(gs),E(ks),E(ws),E(Wo),o&&t(nd),o&&t(lo),E(Ts),o&&t(sd),o&&t(_t),E(ys),E(qs),E(Uo),E(Ko),o&&t(ad),o&&t(po),E(xs),o&&t(rd),o&&t(At),E(zs),E(Vs),E(Go),o&&t(id),o&&t(ho),E(Ms),o&&t(ld),o&&t(bt),E(js),E(Rs),E(Xo),E(Yo),o&&t(dd),o&&t(uo),E(Bs),o&&t(cd),o&&t(nt),E(Is),E(Ws),E(en),E(tn),E(on),o&&t(pd),o&&t(_o),E(Hs),o&&t(hd),o&&t(st),E(Us),E(Xs),E(sn),E(an),o&&t(fd),o&&t(ko),E(Ys),o&&t(md),o&&t(at),E(Zs),E(sa),E(ln),E(dn),o&&t(ud),o&&t(To),E(aa),o&&t(gd),o&&t(rt),E(ra),E(pa),E(pn),E(hn),o&&t(_d),o&&t($o),E(ha),o&&t(bd),o&&t(it),E(fa),E(mn),E(ba),E(un),E(gn),o&&t(kd),o&&t(Eo),E(ka),o&&t(vd),o&&t(Pt),E(va),E(wa),o&&t(wd),o&&t(Fo),E(ya),o&&t(Td),o&&t(lt),E($a),E(kn),E(qa),E(vn),E(wn),E(Tn),o&&t(yd),o&&t(zo),E(xa),o&&t($d),o&&t(Ze),E(za),E($n),E(Aa),E(Dn),E(En),E(Fn),o&&t(Dd),o&&t(Mo),E(Pa),o&&t(Ed),o&&t(et),E(Ra),E(xn),E(Oa),E(zn),E(Vn),E(Mn),o&&t(Fd),o&&t(Co),E(Na),o&&t(qd),o&&t(tt),E(Wa),E(Cn),E(Ga),E(An),E(Pn),E(Rn)}}}const xk={local:"debertav2",sections:[{local:"overview",title:"Overview"},{local:"documentation-resources",title:"Documentation resources"},{local:"transformers.DebertaV2Config",title:"DebertaV2Config"},{local:"transformers.DebertaV2Tokenizer",title:"DebertaV2Tokenizer"},{local:"transformers.DebertaV2TokenizerFast",title:"DebertaV2TokenizerFast"},{local:"transformers.DebertaV2Model",title:"DebertaV2Model"},{local:"transformers.DebertaV2PreTrainedModel",title:"DebertaV2PreTrainedModel"},{local:"transformers.DebertaV2ForMaskedLM",title:"DebertaV2ForMaskedLM"},{local:"transformers.DebertaV2ForSequenceClassification",title:"DebertaV2ForSequenceClassification"},{local:"transformers.DebertaV2ForTokenClassification",title:"DebertaV2ForTokenClassification"},{local:"transformers.DebertaV2ForQuestionAnswering",title:"DebertaV2ForQuestionAnswering"},{local:"transformers.DebertaV2ForMultipleChoice",title:"DebertaV2ForMultipleChoice"},{local:"transformers.TFDebertaV2Model",title:"TFDebertaV2Model"},{local:"transformers.TFDebertaV2PreTrainedModel",title:"TFDebertaV2PreTrainedModel"},{local:"transformers.TFDebertaV2ForMaskedLM",title:"TFDebertaV2ForMaskedLM"},{local:"transformers.TFDebertaV2ForSequenceClassification",title:"TFDebertaV2ForSequenceClassification"},{local:"transformers.TFDebertaV2ForTokenClassification",title:"TFDebertaV2ForTokenClassification"},{local:"transformers.TFDebertaV2ForQuestionAnswering",title:"TFDebertaV2ForQuestionAnswering"}],title:"DeBERTa-v2"};function zk(x){return H2(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Rk extends S2{constructor(d){super();O2(this,d,zk,qk,N2,{})}}export{Rk as default,xk as metadata};
