import{S as Xb,i as Yb,s as Zb,e as a,k as p,w,t as n,M as ek,c as r,d as t,m as h,a as i,x as T,h as s,b as u,G as e,g,y,q as $,o as D,B as E,v as tk,L as Oe}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 Ne}from"../../chunks/CodeBlock-hf-doc-builder.js";import{I as Xe}from"../../chunks/IconCopyLink-hf-doc-builder.js";import{E as Se}from"../../chunks/ExampleCodeBlock-hf-doc-builder.js";function ok(x){let d,k,m,f,v;return f=new Ne({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:"),m=p(),w(f.$$.fragment)},l(l){d=r(l,"P",{});var c=i(d);k=s(c,"Example:"),c.forEach(t),m=h(l),T(f.$$.fragment,l)},m(l,c){g(l,d,c),e(d,k),g(l,m,c),y(f,l,c),v=!0},p:Oe,i(l){v||($(f.$$.fragment,l),v=!0)},o(l){D(f.$$.fragment,l),v=!1},d(l){l&&t(d),l&&t(m),E(f,l)}}}function nk(x){let d,k,m,f,v;return f=new Ne({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:"),m=p(),w(f.$$.fragment)},l(l){d=r(l,"P",{});var c=i(d);k=s(c,"sequence pair mask has the following format:"),c.forEach(t),m=h(l),T(f.$$.fragment,l)},m(l,c){g(l,d,c),e(d,k),g(l,m,c),y(f,l,c),v=!0},p:Oe,i(l){v||($(f.$$.fragment,l),v=!0)},o(l){D(f.$$.fragment,l),v=!1},d(l){l&&t(d),l&&t(m),E(f,l)}}}function sk(x){let d,k,m,f,v;return f=new Ne({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:"),m=p(),w(f.$$.fragment)},l(l){d=r(l,"P",{});var c=i(d);k=s(c,"sequence pair mask has the following format:"),c.forEach(t),m=h(l),T(f.$$.fragment,l)},m(l,c){g(l,d,c),e(d,k),g(l,m,c),y(f,l,c),v=!0},p:Oe,i(l){v||($(f.$$.fragment,l),v=!0)},o(l){D(f.$$.fragment,l),v=!1},d(l){l&&t(d),l&&t(m),E(f,l)}}}function ak(x){let d,k,m,f,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 "),m=a("code"),f=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 c=i(d);k=s(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),m=r(c,"CODE",{});var z=i(m);f=s(z,"Module"),z.forEach(t),v=s(c,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),c.forEach(t)},m(l,c){g(l,d,c),e(d,k),e(d,m),e(m,f),e(d,v)},d(l){l&&t(d)}}}function rk(x){let d,k,m,f,v;return f=new Ne({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:"),m=p(),w(f.$$.fragment)},l(l){d=r(l,"P",{});var c=i(d);k=s(c,"Example:"),c.forEach(t),m=h(l),T(f.$$.fragment,l)},m(l,c){g(l,d,c),e(d,k),g(l,m,c),y(f,l,c),v=!0},p:Oe,i(l){v||($(f.$$.fragment,l),v=!0)},o(l){D(f.$$.fragment,l),v=!1},d(l){l&&t(d),l&&t(m),E(f,l)}}}function ik(x){let d,k,m,f,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 `),m=a("code"),f=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 c=i(d);k=s(c,`Although the recipe for forward pass needs to be defined within
this function, one should call the `),m=r(c,"CODE",{});var z=i(m);f=s(z,"Module"),z.forEach(t),v=s(c,` instance afterwards
instead of this since the former takes care of running the
registered hooks while the latter silently ignores them.`),c.forEach(t)},m(l,c){g(l,d,c),e(d,k),e(d,m),e(m,f),e(d,v)},d(l){l&&t(d)}}}function lk(x){let d,k,m,f,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 "),m=a("code"),f=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 c=i(d);k=s(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),m=r(c,"CODE",{});var z=i(m);f=s(z,"Module"),z.forEach(t),v=s(c,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),c.forEach(t)},m(l,c){g(l,d,c),e(d,k),e(d,m),e(m,f),e(d,v)},d(l){l&&t(d)}}}function dk(x){let d,k,m,f,v;return f=new Ne({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:"),m=p(),w(f.$$.fragment)},l(l){d=r(l,"P",{});var c=i(d);k=s(c,"Example:"),c.forEach(t),m=h(l),T(f.$$.fragment,l)},m(l,c){g(l,d,c),e(d,k),g(l,m,c),y(f,l,c),v=!0},p:Oe,i(l){v||($(f.$$.fragment,l),v=!0)},o(l){D(f.$$.fragment,l),v=!1},d(l){l&&t(d),l&&t(m),E(f,l)}}}function ck(x){let d,k,m,f,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 "),m=a("code"),f=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 c=i(d);k=s(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),m=r(c,"CODE",{});var z=i(m);f=s(z,"Module"),z.forEach(t),v=s(c,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),c.forEach(t)},m(l,c){g(l,d,c),e(d,k),e(d,m),e(m,f),e(d,v)},d(l){l&&t(d)}}}function pk(x){let d,k,m,f,v;return f=new Ne({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:"),m=p(),w(f.$$.fragment)},l(l){d=r(l,"P",{});var c=i(d);k=s(c,"Example of single-label classification:"),c.forEach(t),m=h(l),T(f.$$.fragment,l)},m(l,c){g(l,d,c),e(d,k),g(l,m,c),y(f,l,c),v=!0},p:Oe,i(l){v||($(f.$$.fragment,l),v=!0)},o(l){D(f.$$.fragment,l),v=!1},d(l){l&&t(d),l&&t(m),E(f,l)}}}function hk(x){let d,k,m,f,v;return f=new Ne({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:"),m=p(),w(f.$$.fragment)},l(l){d=r(l,"P",{});var c=i(d);k=s(c,"Example of multi-label classification:"),c.forEach(t),m=h(l),T(f.$$.fragment,l)},m(l,c){g(l,d,c),e(d,k),g(l,m,c),y(f,l,c),v=!0},p:Oe,i(l){v||($(f.$$.fragment,l),v=!0)},o(l){D(f.$$.fragment,l),v=!1},d(l){l&&t(d),l&&t(m),E(f,l)}}}function mk(x){let d,k,m,f,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 "),m=a("code"),f=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 c=i(d);k=s(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),m=r(c,"CODE",{});var z=i(m);f=s(z,"Module"),z.forEach(t),v=s(c,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),c.forEach(t)},m(l,c){g(l,d,c),e(d,k),e(d,m),e(m,f),e(d,v)},d(l){l&&t(d)}}}function fk(x){let d,k,m,f,v;return f=new Ne({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:"),m=p(),w(f.$$.fragment)},l(l){d=r(l,"P",{});var c=i(d);k=s(c,"Example:"),c.forEach(t),m=h(l),T(f.$$.fragment,l)},m(l,c){g(l,d,c),e(d,k),g(l,m,c),y(f,l,c),v=!0},p:Oe,i(l){v||($(f.$$.fragment,l),v=!0)},o(l){D(f.$$.fragment,l),v=!1},d(l){l&&t(d),l&&t(m),E(f,l)}}}function uk(x){let d,k,m,f,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 "),m=a("code"),f=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 c=i(d);k=s(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),m=r(c,"CODE",{});var z=i(m);f=s(z,"Module"),z.forEach(t),v=s(c,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),c.forEach(t)},m(l,c){g(l,d,c),e(d,k),e(d,m),e(m,f),e(d,v)},d(l){l&&t(d)}}}function gk(x){let d,k,m,f,v;return f=new Ne({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:"),m=p(),w(f.$$.fragment)},l(l){d=r(l,"P",{});var c=i(d);k=s(c,"Example:"),c.forEach(t),m=h(l),T(f.$$.fragment,l)},m(l,c){g(l,d,c),e(d,k),g(l,m,c),y(f,l,c),v=!0},p:Oe,i(l){v||($(f.$$.fragment,l),v=!0)},o(l){D(f.$$.fragment,l),v=!1},d(l){l&&t(d),l&&t(m),E(f,l)}}}function _k(x){let d,k,m,f,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 "),m=a("code"),f=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 c=i(d);k=s(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),m=r(c,"CODE",{});var z=i(m);f=s(z,"Module"),z.forEach(t),v=s(c,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),c.forEach(t)},m(l,c){g(l,d,c),e(d,k),e(d,m),e(m,f),e(d,v)},d(l){l&&t(d)}}}function bk(x){let d,k,m,f,v;return f=new Ne({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:"),m=p(),w(f.$$.fragment)},l(l){d=r(l,"P",{});var c=i(d);k=s(c,"Example:"),c.forEach(t),m=h(l),T(f.$$.fragment,l)},m(l,c){g(l,d,c),e(d,k),g(l,m,c),y(f,l,c),v=!0},p:Oe,i(l){v||($(f.$$.fragment,l),v=!0)},o(l){D(f.$$.fragment,l),v=!1},d(l){l&&t(d),l&&t(m),E(f,l)}}}function kk(x){let d,k,m,f,v,l,c,z,ke,pe,R,ne,oe,F,ve,U,we,he,L,Te,ie,G,ye,me,N,$e,fe,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,B,je,ce;return{c(){d=a("p"),k=n("TensorFlow models and layers in "),m=a("code"),f=n("transformers"),v=n(" accept two formats as input:"),l=p(),c=a("ul"),z=a("li"),ke=n("having all inputs as keyword arguments (like PyTorch models), or"),pe=p(),R=a("li"),ne=n("having all inputs as a list, tuple or dict in the first positional argument."),oe=p(),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()"),me=n(" and "),N=a("code"),$e=n("predict()"),fe=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=p(),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=p(),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=p(),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=p(),j=a("p"),Me=n(`Note that when creating models and layers with
`),B=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 "),m=r(q,"CODE",{});var We=i(m);f=s(We,"transformers"),We.forEach(t),v=s(q," accept two formats as input:"),q.forEach(t),l=h(b),c=r(b,"UL",{});var re=i(c);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=h(re),R=r(re,"LI",{});var Be=i(R);ne=s(Be,"having all inputs as a list, tuple or dict in the first positional argument."),Be.forEach(t),re.forEach(t),oe=h(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 He=i(U);we=s(He,"model.fit()"),He.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 Ue=i(L);Te=s(Ue,"model.fit()"),Ue.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),me=s(V," and "),N=r(V,"CODE",{});var Re=i(N);$e=s(Re,"predict()"),Re.forEach(t),fe=s(V,`, such as when creating your own layers or models with
the Keras `),W=r(V,"CODE",{});var Ke=i(W);De=s(Ke,"Functional"),Ke.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=h(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=h(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 Qe=i(O);xe=s(Qe,"model([input_ids, attention_mask])"),Qe.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=h(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 Ge=i(K);Ve=s(Ge,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),Ge.forEach(t),Z.forEach(t),S.forEach(t),ae=h(b),j=r(b,"P",{});var ee=i(j);Me=s(ee,`Note that when creating models and layers with
`),B=r(ee,"A",{href:!0,rel:!0});var Je=i(B);je=s(Je,"subclassing"),Je.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(){u(B,"href","https://keras.io/guides/making_new_layers_and_models_via_subclassing/"),u(B,"rel","nofollow")},m(b,q){g(b,d,q),e(d,k),e(d,m),e(m,f),e(d,v),g(b,l,q),g(b,c,q),e(c,z),e(z,ke),e(c,pe),e(c,R),e(R,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,me),e(F,N),e(N,$e),e(F,fe),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,B),e(B,je),e(j,ce)},d(b){b&&t(d),b&&t(l),b&&t(c),b&&t(oe),b&&t(F),b&&t(te),b&&t(M),b&&t(ae),b&&t(j)}}}function vk(x){let d,k,m,f,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 "),m=a("code"),f=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 c=i(d);k=s(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),m=r(c,"CODE",{});var z=i(m);f=s(z,"Module"),z.forEach(t),v=s(c,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),c.forEach(t)},m(l,c){g(l,d,c),e(d,k),e(d,m),e(m,f),e(d,v)},d(l){l&&t(d)}}}function wk(x){let d,k,m,f,v;return f=new Ne({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:"),m=p(),w(f.$$.fragment)},l(l){d=r(l,"P",{});var c=i(d);k=s(c,"Example:"),c.forEach(t),m=h(l),T(f.$$.fragment,l)},m(l,c){g(l,d,c),e(d,k),g(l,m,c),y(f,l,c),v=!0},p:Oe,i(l){v||($(f.$$.fragment,l),v=!0)},o(l){D(f.$$.fragment,l),v=!1},d(l){l&&t(d),l&&t(m),E(f,l)}}}function Tk(x){let d,k,m,f,v,l,c,z,ke,pe,R,ne,oe,F,ve,U,we,he,L,Te,ie,G,ye,me,N,$e,fe,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,B,je,ce;return{c(){d=a("p"),k=n("TensorFlow models and layers in "),m=a("code"),f=n("transformers"),v=n(" accept two formats as input:"),l=p(),c=a("ul"),z=a("li"),ke=n("having all inputs as keyword arguments (like PyTorch models), or"),pe=p(),R=a("li"),ne=n("having all inputs as a list, tuple or dict in the first positional argument."),oe=p(),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()"),me=n(" and "),N=a("code"),$e=n("predict()"),fe=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=p(),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=p(),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=p(),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=p(),j=a("p"),Me=n(`Note that when creating models and layers with
`),B=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 "),m=r(q,"CODE",{});var We=i(m);f=s(We,"transformers"),We.forEach(t),v=s(q," accept two formats as input:"),q.forEach(t),l=h(b),c=r(b,"UL",{});var re=i(c);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=h(re),R=r(re,"LI",{});var Be=i(R);ne=s(Be,"having all inputs as a list, tuple or dict in the first positional argument."),Be.forEach(t),re.forEach(t),oe=h(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 He=i(U);we=s(He,"model.fit()"),He.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 Ue=i(L);Te=s(Ue,"model.fit()"),Ue.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),me=s(V," and "),N=r(V,"CODE",{});var Re=i(N);$e=s(Re,"predict()"),Re.forEach(t),fe=s(V,`, such as when creating your own layers or models with
the Keras `),W=r(V,"CODE",{});var Ke=i(W);De=s(Ke,"Functional"),Ke.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=h(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=h(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 Qe=i(O);xe=s(Qe,"model([input_ids, attention_mask])"),Qe.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=h(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 Ge=i(K);Ve=s(Ge,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),Ge.forEach(t),Z.forEach(t),S.forEach(t),ae=h(b),j=r(b,"P",{});var ee=i(j);Me=s(ee,`Note that when creating models and layers with
`),B=r(ee,"A",{href:!0,rel:!0});var Je=i(B);je=s(Je,"subclassing"),Je.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(){u(B,"href","https://keras.io/guides/making_new_layers_and_models_via_subclassing/"),u(B,"rel","nofollow")},m(b,q){g(b,d,q),e(d,k),e(d,m),e(m,f),e(d,v),g(b,l,q),g(b,c,q),e(c,z),e(z,ke),e(c,pe),e(c,R),e(R,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,me),e(F,N),e(N,$e),e(F,fe),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,B),e(B,je),e(j,ce)},d(b){b&&t(d),b&&t(l),b&&t(c),b&&t(oe),b&&t(F),b&&t(te),b&&t(M),b&&t(ae),b&&t(j)}}}function yk(x){let d,k,m,f,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 "),m=a("code"),f=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 c=i(d);k=s(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),m=r(c,"CODE",{});var z=i(m);f=s(z,"Module"),z.forEach(t),v=s(c,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),c.forEach(t)},m(l,c){g(l,d,c),e(d,k),e(d,m),e(m,f),e(d,v)},d(l){l&&t(d)}}}function $k(x){let d,k,m,f,v;return f=new Ne({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:"),m=p(),w(f.$$.fragment)},l(l){d=r(l,"P",{});var c=i(d);k=s(c,"Example:"),c.forEach(t),m=h(l),T(f.$$.fragment,l)},m(l,c){g(l,d,c),e(d,k),g(l,m,c),y(f,l,c),v=!0},p:Oe,i(l){v||($(f.$$.fragment,l),v=!0)},o(l){D(f.$$.fragment,l),v=!1},d(l){l&&t(d),l&&t(m),E(f,l)}}}function Dk(x){let d,k;return d=new Ne({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(m){T(d.$$.fragment,m)},m(m,f){y(d,m,f),k=!0},p:Oe,i(m){k||($(d.$$.fragment,m),k=!0)},o(m){D(d.$$.fragment,m),k=!1},d(m){E(d,m)}}}function Ek(x){let d,k,m,f,v,l,c,z,ke,pe,R,ne,oe,F,ve,U,we,he,L,Te,ie,G,ye,me,N,$e,fe,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,B,je,ce;return{c(){d=a("p"),k=n("TensorFlow models and layers in "),m=a("code"),f=n("transformers"),v=n(" accept two formats as input:"),l=p(),c=a("ul"),z=a("li"),ke=n("having all inputs as keyword arguments (like PyTorch models), or"),pe=p(),R=a("li"),ne=n("having all inputs as a list, tuple or dict in the first positional argument."),oe=p(),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()"),me=n(" and "),N=a("code"),$e=n("predict()"),fe=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=p(),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=p(),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=p(),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=p(),j=a("p"),Me=n(`Note that when creating models and layers with
`),B=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 "),m=r(q,"CODE",{});var We=i(m);f=s(We,"transformers"),We.forEach(t),v=s(q," accept two formats as input:"),q.forEach(t),l=h(b),c=r(b,"UL",{});var re=i(c);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=h(re),R=r(re,"LI",{});var Be=i(R);ne=s(Be,"having all inputs as a list, tuple or dict in the first positional argument."),Be.forEach(t),re.forEach(t),oe=h(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 He=i(U);we=s(He,"model.fit()"),He.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 Ue=i(L);Te=s(Ue,"model.fit()"),Ue.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),me=s(V," and "),N=r(V,"CODE",{});var Re=i(N);$e=s(Re,"predict()"),Re.forEach(t),fe=s(V,`, such as when creating your own layers or models with
the Keras `),W=r(V,"CODE",{});var Ke=i(W);De=s(Ke,"Functional"),Ke.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=h(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=h(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 Qe=i(O);xe=s(Qe,"model([input_ids, attention_mask])"),Qe.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=h(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 Ge=i(K);Ve=s(Ge,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),Ge.forEach(t),Z.forEach(t),S.forEach(t),ae=h(b),j=r(b,"P",{});var ee=i(j);Me=s(ee,`Note that when creating models and layers with
`),B=r(ee,"A",{href:!0,rel:!0});var Je=i(B);je=s(Je,"subclassing"),Je.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(){u(B,"href","https://keras.io/guides/making_new_layers_and_models_via_subclassing/"),u(B,"rel","nofollow")},m(b,q){g(b,d,q),e(d,k),e(d,m),e(m,f),e(d,v),g(b,l,q),g(b,c,q),e(c,z),e(z,ke),e(c,pe),e(c,R),e(R,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,me),e(F,N),e(N,$e),e(F,fe),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,B),e(B,je),e(j,ce)},d(b){b&&t(d),b&&t(l),b&&t(c),b&&t(oe),b&&t(F),b&&t(te),b&&t(M),b&&t(ae),b&&t(j)}}}function Fk(x){let d,k,m,f,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 "),m=a("code"),f=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 c=i(d);k=s(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),m=r(c,"CODE",{});var z=i(m);f=s(z,"Module"),z.forEach(t),v=s(c,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),c.forEach(t)},m(l,c){g(l,d,c),e(d,k),e(d,m),e(m,f),e(d,v)},d(l){l&&t(d)}}}function qk(x){let d,k,m,f,v;return f=new Ne({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:"),m=p(),w(f.$$.fragment)},l(l){d=r(l,"P",{});var c=i(d);k=s(c,"Example:"),c.forEach(t),m=h(l),T(f.$$.fragment,l)},m(l,c){g(l,d,c),e(d,k),g(l,m,c),y(f,l,c),v=!0},p:Oe,i(l){v||($(f.$$.fragment,l),v=!0)},o(l){D(f.$$.fragment,l),v=!1},d(l){l&&t(d),l&&t(m),E(f,l)}}}function xk(x){let d,k;return d=new Ne({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(m){T(d.$$.fragment,m)},m(m,f){y(d,m,f),k=!0},p:Oe,i(m){k||($(d.$$.fragment,m),k=!0)},o(m){D(d.$$.fragment,m),k=!1},d(m){E(d,m)}}}function zk(x){let d,k,m,f,v,l,c,z,ke,pe,R,ne,oe,F,ve,U,we,he,L,Te,ie,G,ye,me,N,$e,fe,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,B,je,ce;return{c(){d=a("p"),k=n("TensorFlow models and layers in "),m=a("code"),f=n("transformers"),v=n(" accept two formats as input:"),l=p(),c=a("ul"),z=a("li"),ke=n("having all inputs as keyword arguments (like PyTorch models), or"),pe=p(),R=a("li"),ne=n("having all inputs as a list, tuple or dict in the first positional argument."),oe=p(),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()"),me=n(" and "),N=a("code"),$e=n("predict()"),fe=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=p(),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=p(),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=p(),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=p(),j=a("p"),Me=n(`Note that when creating models and layers with
`),B=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 "),m=r(q,"CODE",{});var We=i(m);f=s(We,"transformers"),We.forEach(t),v=s(q," accept two formats as input:"),q.forEach(t),l=h(b),c=r(b,"UL",{});var re=i(c);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=h(re),R=r(re,"LI",{});var Be=i(R);ne=s(Be,"having all inputs as a list, tuple or dict in the first positional argument."),Be.forEach(t),re.forEach(t),oe=h(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 He=i(U);we=s(He,"model.fit()"),He.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 Ue=i(L);Te=s(Ue,"model.fit()"),Ue.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),me=s(V," and "),N=r(V,"CODE",{});var Re=i(N);$e=s(Re,"predict()"),Re.forEach(t),fe=s(V,`, such as when creating your own layers or models with
the Keras `),W=r(V,"CODE",{});var Ke=i(W);De=s(Ke,"Functional"),Ke.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=h(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=h(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 Qe=i(O);xe=s(Qe,"model([input_ids, attention_mask])"),Qe.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=h(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 Ge=i(K);Ve=s(Ge,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),Ge.forEach(t),Z.forEach(t),S.forEach(t),ae=h(b),j=r(b,"P",{});var ee=i(j);Me=s(ee,`Note that when creating models and layers with
`),B=r(ee,"A",{href:!0,rel:!0});var Je=i(B);je=s(Je,"subclassing"),Je.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(){u(B,"href","https://keras.io/guides/making_new_layers_and_models_via_subclassing/"),u(B,"rel","nofollow")},m(b,q){g(b,d,q),e(d,k),e(d,m),e(m,f),e(d,v),g(b,l,q),g(b,c,q),e(c,z),e(z,ke),e(c,pe),e(c,R),e(R,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,me),e(F,N),e(N,$e),e(F,fe),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,B),e(B,je),e(j,ce)},d(b){b&&t(d),b&&t(l),b&&t(c),b&&t(oe),b&&t(F),b&&t(te),b&&t(M),b&&t(ae),b&&t(j)}}}function Vk(x){let d,k,m,f,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 "),m=a("code"),f=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 c=i(d);k=s(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),m=r(c,"CODE",{});var z=i(m);f=s(z,"Module"),z.forEach(t),v=s(c,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),c.forEach(t)},m(l,c){g(l,d,c),e(d,k),e(d,m),e(m,f),e(d,v)},d(l){l&&t(d)}}}function Mk(x){let d,k,m,f,v;return f=new Ne({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:"),m=p(),w(f.$$.fragment)},l(l){d=r(l,"P",{});var c=i(d);k=s(c,"Example:"),c.forEach(t),m=h(l),T(f.$$.fragment,l)},m(l,c){g(l,d,c),e(d,k),g(l,m,c),y(f,l,c),v=!0},p:Oe,i(l){v||($(f.$$.fragment,l),v=!0)},o(l){D(f.$$.fragment,l),v=!1},d(l){l&&t(d),l&&t(m),E(f,l)}}}function jk(x){let d,k;return d=new Ne({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(m){T(d.$$.fragment,m)},m(m,f){y(d,m,f),k=!0},p:Oe,i(m){k||($(d.$$.fragment,m),k=!0)},o(m){D(d.$$.fragment,m),k=!1},d(m){E(d,m)}}}function Ck(x){let d,k,m,f,v,l,c,z,ke,pe,R,ne,oe,F,ve,U,we,he,L,Te,ie,G,ye,me,N,$e,fe,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,B,je,ce;return{c(){d=a("p"),k=n("TensorFlow models and layers in "),m=a("code"),f=n("transformers"),v=n(" accept two formats as input:"),l=p(),c=a("ul"),z=a("li"),ke=n("having all inputs as keyword arguments (like PyTorch models), or"),pe=p(),R=a("li"),ne=n("having all inputs as a list, tuple or dict in the first positional argument."),oe=p(),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()"),me=n(" and "),N=a("code"),$e=n("predict()"),fe=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=p(),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=p(),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=p(),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=p(),j=a("p"),Me=n(`Note that when creating models and layers with
`),B=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 "),m=r(q,"CODE",{});var We=i(m);f=s(We,"transformers"),We.forEach(t),v=s(q," accept two formats as input:"),q.forEach(t),l=h(b),c=r(b,"UL",{});var re=i(c);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=h(re),R=r(re,"LI",{});var Be=i(R);ne=s(Be,"having all inputs as a list, tuple or dict in the first positional argument."),Be.forEach(t),re.forEach(t),oe=h(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 He=i(U);we=s(He,"model.fit()"),He.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 Ue=i(L);Te=s(Ue,"model.fit()"),Ue.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),me=s(V," and "),N=r(V,"CODE",{});var Re=i(N);$e=s(Re,"predict()"),Re.forEach(t),fe=s(V,`, such as when creating your own layers or models with
the Keras `),W=r(V,"CODE",{});var Ke=i(W);De=s(Ke,"Functional"),Ke.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=h(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=h(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 Qe=i(O);xe=s(Qe,"model([input_ids, attention_mask])"),Qe.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=h(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 Ge=i(K);Ve=s(Ge,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),Ge.forEach(t),Z.forEach(t),S.forEach(t),ae=h(b),j=r(b,"P",{});var ee=i(j);Me=s(ee,`Note that when creating models and layers with
`),B=r(ee,"A",{href:!0,rel:!0});var Je=i(B);je=s(Je,"subclassing"),Je.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(){u(B,"href","https://keras.io/guides/making_new_layers_and_models_via_subclassing/"),u(B,"rel","nofollow")},m(b,q){g(b,d,q),e(d,k),e(d,m),e(m,f),e(d,v),g(b,l,q),g(b,c,q),e(c,z),e(z,ke),e(c,pe),e(c,R),e(R,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,me),e(F,N),e(N,$e),e(F,fe),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,B),e(B,je),e(j,ce)},d(b){b&&t(d),b&&t(l),b&&t(c),b&&t(oe),b&&t(F),b&&t(te),b&&t(M),b&&t(ae),b&&t(j)}}}function Ak(x){let d,k,m,f,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 "),m=a("code"),f=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 c=i(d);k=s(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),m=r(c,"CODE",{});var z=i(m);f=s(z,"Module"),z.forEach(t),v=s(c,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),c.forEach(t)},m(l,c){g(l,d,c),e(d,k),e(d,m),e(m,f),e(d,v)},d(l){l&&t(d)}}}function Pk(x){let d,k,m,f,v;return f=new Ne({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:"),m=p(),w(f.$$.fragment)},l(l){d=r(l,"P",{});var c=i(d);k=s(c,"Example:"),c.forEach(t),m=h(l),T(f.$$.fragment,l)},m(l,c){g(l,d,c),e(d,k),g(l,m,c),y(f,l,c),v=!0},p:Oe,i(l){v||($(f.$$.fragment,l),v=!0)},o(l){D(f.$$.fragment,l),v=!1},d(l){l&&t(d),l&&t(m),E(f,l)}}}function Bk(x){let d,k;return d=new Ne({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(m){T(d.$$.fragment,m)},m(m,f){y(d,m,f),k=!0},p:Oe,i(m){k||($(d.$$.fragment,m),k=!0)},o(m){D(d.$$.fragment,m),k=!1},d(m){E(d,m)}}}function Rk(x){let d,k,m,f,v,l,c,z,ke,pe,R,ne,oe,F,ve,U,we,he,L,Te,ie,G,ye,me,N,$e,fe,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,B,je,ce,b,q,We,re,Ce,Be,V,He,Ue,Ae,Re,Ke,S,X,Pe,Ie,Y,Qe,Le,Z,Ge,ee,Je,Yd,Jn,Zd,ec,Xn,tc,oc,Ml,Xt,Co,Ir,Yn,nc,Lr,sc,jl,ft,Zn,ac,Yt,rc,Ja,ic,lc,es,dc,cc,pc,Zt,hc,Xa,mc,fc,Ya,uc,gc,_c,Ao,Cl,eo,Po,Sr,ts,bc,Or,kc,Al,Ye,os,vc,ns,wc,ss,Tc,yc,$c,Bt,as,Dc,Nr,Ec,Fc,rs,Wr,qc,xc,Hr,zc,Vc,Bo,is,Mc,to,jc,Ur,Cc,Ac,Kr,Pc,Bc,Rc,vt,ls,Ic,Qr,Lc,Sc,Ro,Oc,oo,Nc,Gr,Wc,Hc,Jr,Uc,Kc,Qc,Za,ds,Pl,no,Io,Xr,cs,Gc,Yr,Jc,Bl,ut,ps,Xc,hs,Yc,ms,Zc,ep,tp,Rt,fs,op,Zr,np,sp,us,ei,ap,rp,ti,ip,lp,wt,gs,dp,oi,cp,pp,Lo,hp,so,mp,ni,fp,up,si,gp,_p,Rl,ao,So,ai,_s,bp,ri,kp,Il,gt,bs,vp,ks,wp,vs,Tp,yp,$p,ws,Dp,Ts,Ep,Fp,qp,Tt,ys,xp,ro,zp,er,Vp,Mp,ii,jp,Cp,Ap,Oo,Pp,No,Ll,io,Wo,li,$s,Bp,di,Rp,Sl,Ct,Ds,Ip,ci,Lp,Sp,yt,Es,Op,pi,Np,Wp,hi,Hp,Up,Ho,Ol,lo,Uo,mi,Fs,Kp,fi,Qp,Nl,_t,qs,Gp,co,Jp,ui,Xp,Yp,xs,Zp,eh,th,zs,oh,Vs,nh,sh,ah,$t,Ms,rh,po,ih,tr,lh,dh,gi,ch,ph,hh,Ko,mh,Qo,Wl,ho,Go,_i,js,fh,bi,uh,Hl,nt,Cs,gh,ki,_h,bh,As,kh,Ps,vh,wh,Th,Bs,yh,Rs,$h,Dh,Eh,dt,Is,Fh,mo,qh,or,xh,zh,vi,Vh,Mh,jh,Jo,Ch,Xo,Ah,Yo,Ul,fo,Zo,wi,Ls,Ph,Ti,Bh,Kl,st,Ss,Rh,yi,Ih,Lh,Os,Sh,Ns,Oh,Nh,Wh,Ws,Hh,Hs,Uh,Kh,Qh,Dt,Us,Gh,uo,Jh,nr,Xh,Yh,$i,Zh,em,tm,en,om,tn,Ql,go,on,Di,Ks,nm,Ei,sm,Gl,at,Qs,am,_o,rm,Fi,im,lm,qi,dm,cm,pm,Gs,hm,Js,mm,fm,um,Xs,gm,Ys,_m,bm,km,Et,Zs,vm,bo,wm,sr,Tm,ym,xi,$m,Dm,Em,nn,Fm,sn,Jl,ko,an,zi,ea,qm,Vi,xm,Xl,rt,ta,zm,Mi,Vm,Mm,oa,jm,na,Cm,Am,Pm,sa,Bm,aa,Rm,Im,Lm,Ft,ra,Sm,vo,Om,ar,Nm,Wm,ji,Hm,Um,Km,rn,Qm,ln,Yl,wo,dn,Ci,ia,Gm,Ai,Jm,Zl,it,la,Xm,da,Ym,ca,Zm,ef,tf,pa,of,ha,nf,sf,af,cn,rf,qt,ma,lf,To,df,rr,cf,pf,Pi,hf,mf,ff,pn,uf,hn,ed,yo,mn,Bi,fa,gf,Ri,_f,td,At,ua,bf,Ii,kf,vf,xt,ga,wf,Li,Tf,yf,_a,$f,Si,Df,Ef,Ff,bt,qf,Oi,xf,zf,Ni,Vf,Mf,Wi,jf,Cf,Hi,Af,Pf,od,$o,fn,Ui,ba,Bf,Ki,Rf,nd,lt,ka,If,Do,Lf,Qi,Sf,Of,va,Nf,Wf,Hf,wa,Uf,Ta,Kf,Qf,Gf,un,Jf,ct,ya,Xf,Eo,Yf,ir,Zf,eu,Gi,tu,ou,nu,gn,su,_n,au,bn,sd,Fo,kn,Ji,$a,ru,Xi,iu,ad,Ze,Da,lu,Yi,du,cu,Ea,pu,Fa,hu,mu,fu,qa,uu,xa,gu,_u,bu,vn,ku,pt,za,vu,qo,wu,lr,Tu,yu,Zi,$u,Du,Eu,wn,Fu,Tn,qu,yn,rd,xo,$n,el,Va,xu,tl,zu,id,et,Ma,Vu,ol,Mu,ju,ja,Cu,Ca,Au,Pu,Bu,Aa,Ru,Pa,Iu,Lu,Su,Dn,Ou,ht,Ba,Nu,zo,Wu,dr,Hu,Uu,nl,Ku,Qu,Gu,En,Ju,Fn,Xu,qn,ld,Vo,xn,sl,Ra,Yu,al,Zu,dd,tt,Ia,eg,Mo,tg,rl,og,ng,il,sg,ag,rg,La,ig,Sa,lg,dg,cg,Oa,pg,Na,hg,mg,fg,zn,ug,mt,Wa,gg,jo,_g,cr,bg,kg,ll,vg,wg,Tg,Vn,yg,Mn,$g,jn,cd;return l=new Xe({}),F=new Xe({}),Yn=new Xe({}),Zn=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/main/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/main/en/model_doc/deberta#transformers.DebertaModel">DebertaModel</a> or <a href="/docs/transformers/main/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/main/src/transformers/models/deberta_v2/configuration_deberta_v2.py#L42"}}),Ao=new Se({props:{anchor:"transformers.DebertaV2Config.example",$$slots:{default:[ok]},$$scope:{ctx:x}}}),ts=new Xe({}),os=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/main/src/transformers/models/deberta_v2/tokenization_deberta_v2.py#L56"}}),as=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/main/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>
`}}),is=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/main/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>
`}}),ls=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/main/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>
`}}),Ro=new Se({props:{anchor:"transformers.DebertaV2Tokenizer.create_token_type_ids_from_sequences.example",$$slots:{default:[nk]},$$scope:{ctx:x}}}),ds=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/main/src/transformers/models/deberta_v2/tokenization_deberta_v2.py#L267"}}),cs=new Xe({}),ps=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/main/src/transformers/models/deberta_v2/tokenization_deberta_v2_fast.py#L63"}}),fs=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/main/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>
`}}),gs=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/main/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>
`}}),Lo=new Se({props:{anchor:"transformers.DebertaV2TokenizerFast.create_token_type_ids_from_sequences.example",$$slots:{default:[sk]},$$scope:{ctx:x}}}),_s=new Xe({}),bs=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/main/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/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/deberta_v2/modeling_deberta_v2.py#L1013"}}),ys=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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.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/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/deberta_v2/modeling_deberta_v2.py#L1037",returnDescription:`
<p>A <a
  href="/docs/transformers/main/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/main/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/main/en/main_classes/output#transformers.modeling_outputs.BaseModelOutput"
>transformers.modeling_outputs.BaseModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Oo=new ot({props:{$$slots:{default:[ak]},$$scope:{ctx:x}}}),No=new Se({props:{anchor:"transformers.DebertaV2Model.forward.example",$$slots:{default:[rk]},$$scope:{ctx:x}}}),$s=new Xe({}),Ds=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/main/src/transformers/models/deberta_v2/modeling_deberta_v2.py#L917"}}),Es=new Q({props:{name:"_forward_unimplemented",anchor:"transformers.DebertaV2PreTrainedModel.forward",parameters:[{name:"*input",val:": typing.Any"}],source:"https://github.com/huggingface/transformers/blob/main/src/torch/nn/modules/module.py#L235"}}),Ho=new ot({props:{$$slots:{default:[ik]},$$scope:{ctx:x}}}),Fs=new Xe({}),qs=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/main/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/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/deberta_v2/modeling_deberta_v2.py#L1124"}}),Ms=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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.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/main/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/main/src/transformers/models/deberta_v2/modeling_deberta_v2.py#L1143",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.MaskedLMOutput"
>transformers.modeling_outputs.MaskedLMOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/main/en/model_doc/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/main/en/main_classes/output#transformers.modeling_outputs.MaskedLMOutput"
>transformers.modeling_outputs.MaskedLMOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Ko=new ot({props:{$$slots:{default:[lk]},$$scope:{ctx:x}}}),Qo=new Se({props:{anchor:"transformers.DebertaV2ForMaskedLM.forward.example",$$slots:{default:[dk]},$$scope:{ctx:x}}}),js=new Xe({}),Cs=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/main/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/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/deberta_v2/modeling_deberta_v2.py#L1260"}}),Is=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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.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/main/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/main/src/transformers/models/deberta_v2/modeling_deberta_v2.py#L1285",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.SequenceClassifierOutput"
>transformers.modeling_outputs.SequenceClassifierOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/main/en/model_doc/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/main/en/main_classes/output#transformers.modeling_outputs.SequenceClassifierOutput"
>transformers.modeling_outputs.SequenceClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Jo=new ot({props:{$$slots:{default:[ck]},$$scope:{ctx:x}}}),Xo=new Se({props:{anchor:"transformers.DebertaV2ForSequenceClassification.forward.example",$$slots:{default:[pk]},$$scope:{ctx:x}}}),Yo=new Se({props:{anchor:"transformers.DebertaV2ForSequenceClassification.forward.example-2",$$slots:{default:[hk]},$$scope:{ctx:x}}}),Ls=new Xe({}),Ss=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/main/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/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/deberta_v2/modeling_deberta_v2.py#L1380"}}),Us=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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.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/main/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/main/src/transformers/models/deberta_v2/modeling_deberta_v2.py#L1394",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.TokenClassifierOutput"
>transformers.modeling_outputs.TokenClassifierOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/main/en/model_doc/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/main/en/main_classes/output#transformers.modeling_outputs.TokenClassifierOutput"
>transformers.modeling_outputs.TokenClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),en=new ot({props:{$$slots:{default:[mk]},$$scope:{ctx:x}}}),tn=new Se({props:{anchor:"transformers.DebertaV2ForTokenClassification.forward.example",$$slots:{default:[fk]},$$scope:{ctx:x}}}),Ks=new Xe({}),Qs=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/main/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/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/deberta_v2/modeling_deberta_v2.py#L1455"}}),Zs=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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.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/main/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/main/src/transformers/models/deberta_v2/modeling_deberta_v2.py#L1468",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.QuestionAnsweringModelOutput"
>transformers.modeling_outputs.QuestionAnsweringModelOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/main/en/model_doc/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/main/en/main_classes/output#transformers.modeling_outputs.QuestionAnsweringModelOutput"
>transformers.modeling_outputs.QuestionAnsweringModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),nn=new ot({props:{$$slots:{default:[uk]},$$scope:{ctx:x}}}),sn=new Se({props:{anchor:"transformers.DebertaV2ForQuestionAnswering.forward.example",$$slots:{default:[gk]},$$scope:{ctx:x}}}),ea=new Xe({}),ta=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/main/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/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/deberta_v2/modeling_deberta_v2.py#L1557"}}),ra=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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.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/main/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/main/src/transformers/models/deberta_v2/modeling_deberta_v2.py#L1581",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.MultipleChoiceModelOutput"
>transformers.modeling_outputs.MultipleChoiceModelOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/main/en/model_doc/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/main/en/main_classes/output#transformers.modeling_outputs.MultipleChoiceModelOutput"
>transformers.modeling_outputs.MultipleChoiceModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),rn=new ot({props:{$$slots:{default:[_k]},$$scope:{ctx:x}}}),ln=new Se({props:{anchor:"transformers.DebertaV2ForMultipleChoice.forward.example",$$slots:{default:[bk]},$$scope:{ctx:x}}}),ia=new Xe({}),la=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/main/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/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/deberta_v2/modeling_tf_deberta_v2.py#L1187"}}),cn=new ot({props:{$$slots:{default:[kk]},$$scope:{ctx:x}}}),ma=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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.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/main/src/transformers/models/deberta_v2/modeling_tf_deberta_v2.py#L1193",returnDescription:`
<p>A <a
  href="/docs/transformers/main/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/main/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/main/en/main_classes/output#transformers.modeling_tf_outputs.TFBaseModelOutput"
>transformers.modeling_tf_outputs.TFBaseModelOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),pn=new ot({props:{$$slots:{default:[vk]},$$scope:{ctx:x}}}),hn=new Se({props:{anchor:"transformers.TFDebertaV2Model.call.example",$$slots:{default:[wk]},$$scope:{ctx:x}}}),fa=new Xe({}),ua=new Q({props:{name:"class transformers.TFDebertaV2PreTrainedModel",anchor:"transformers.TFDebertaV2PreTrainedModel",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/deberta_v2/modeling_tf_deberta_v2.py#L1086"}}),ga=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/main/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>
`}}),ba=new Xe({}),ka=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/main/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/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/deberta_v2/modeling_tf_deberta_v2.py#L1235"}}),un=new ot({props:{$$slots:{default:[Tk]},$$scope:{ctx:x}}}),ya=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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.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/main/src/transformers/models/deberta_v2/modeling_tf_deberta_v2.py#L1251",returnDescription:`
<p>A <a
  href="/docs/transformers/main/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/main/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/main/en/main_classes/output#transformers.modeling_tf_outputs.TFMaskedLMOutput"
>transformers.modeling_tf_outputs.TFMaskedLMOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),gn=new ot({props:{$$slots:{default:[yk]},$$scope:{ctx:x}}}),_n=new Se({props:{anchor:"transformers.TFDebertaV2ForMaskedLM.call.example",$$slots:{default:[$k]},$$scope:{ctx:x}}}),bn=new Se({props:{anchor:"transformers.TFDebertaV2ForMaskedLM.call.example-2",$$slots:{default:[Dk]},$$scope:{ctx:x}}}),$a=new Xe({}),Da=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/main/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/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/deberta_v2/modeling_tf_deberta_v2.py#L1318"}}),vn=new ot({props:{$$slots:{default:[Ek]},$$scope:{ctx:x}}}),za=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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.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/main/src/transformers/models/deberta_v2/modeling_tf_deberta_v2.py#L1336",returnDescription:`
<p>A <a
  href="/docs/transformers/main/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/main/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/main/en/main_classes/output#transformers.modeling_tf_outputs.TFSequenceClassifierOutput"
>transformers.modeling_tf_outputs.TFSequenceClassifierOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),wn=new ot({props:{$$slots:{default:[Fk]},$$scope:{ctx:x}}}),Tn=new Se({props:{anchor:"transformers.TFDebertaV2ForSequenceClassification.call.example",$$slots:{default:[qk]},$$scope:{ctx:x}}}),yn=new Se({props:{anchor:"transformers.TFDebertaV2ForSequenceClassification.call.example-2",$$slots:{default:[xk]},$$scope:{ctx:x}}}),Va=new Xe({}),Ma=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/main/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/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/deberta_v2/modeling_tf_deberta_v2.py#L1406"}}),Dn=new ot({props:{$$slots:{default:[zk]},$$scope:{ctx:x}}}),Ba=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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.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/main/src/transformers/models/deberta_v2/modeling_tf_deberta_v2.py#L1418",returnDescription:`
<p>A <a
  href="/docs/transformers/main/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/main/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/main/en/main_classes/output#transformers.modeling_tf_outputs.TFTokenClassifierOutput"
>transformers.modeling_tf_outputs.TFTokenClassifierOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),En=new ot({props:{$$slots:{default:[Vk]},$$scope:{ctx:x}}}),Fn=new Se({props:{anchor:"transformers.TFDebertaV2ForTokenClassification.call.example",$$slots:{default:[Mk]},$$scope:{ctx:x}}}),qn=new Se({props:{anchor:"transformers.TFDebertaV2ForTokenClassification.call.example-2",$$slots:{default:[jk]},$$scope:{ctx:x}}}),Ra=new Xe({}),Ia=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/main/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/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/deberta_v2/modeling_tf_deberta_v2.py#L1484"}}),zn=new ot({props:{$$slots:{default:[Ck]},$$scope:{ctx:x}}}),Wa=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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.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/main/src/transformers/models/deberta_v2/modeling_tf_deberta_v2.py#L1495",returnDescription:`
<p>A <a
  href="/docs/transformers/main/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/main/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/main/en/main_classes/output#transformers.modeling_tf_outputs.TFQuestionAnsweringModelOutput"
>transformers.modeling_tf_outputs.TFQuestionAnsweringModelOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),Vn=new ot({props:{$$slots:{default:[Ak]},$$scope:{ctx:x}}}),Mn=new Se({props:{anchor:"transformers.TFDebertaV2ForQuestionAnswering.call.example",$$slots:{default:[Pk]},$$scope:{ctx:x}}}),jn=new Se({props:{anchor:"transformers.TFDebertaV2ForQuestionAnswering.call.example-2",$$slots:{default:[Bk]},$$scope:{ctx:x}}}),{c(){d=a("meta"),k=p(),m=a("h1"),f=a("a"),v=a("span"),w(l.$$.fragment),c=p(),z=a("span"),ke=n("DeBERTa-v2"),pe=p(),R=a("h2"),ne=a("a"),oe=a("span"),w(F.$$.fragment),ve=p(),U=a("span"),we=n("Overview"),he=p(),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.`),me=p(),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.`),fe=p(),W=a("p"),De=n("The abstract from the paper is the following:"),ue=p(),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=p(),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=p(),H=a("p"),ze=n("New in v2:"),be=p(),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"),B=n(" tokenizer."),je=p(),ce=a("li"),b=a("strong"),q=n("nGiE(nGram Induced Input Encoding)"),We=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=p(),Ce=a("li"),Be=a("strong"),V=n("Sharing position projection matrix with content projection matrix in attention layer"),He=n(` Based on previous
experiments, this can save parameters without affecting the performance.`),Ue=p(),Ae=a("li"),Re=a("strong"),Ke=n("Apply bucket to encode relative positions"),S=n(` The DeBERTa-v2 model uses log bucket to encode relative positions
similar to T5.`),X=p(),Pe=a("li"),Ie=a("strong"),Y=n("900M model & 1.5B model"),Qe=n(` Two additional model sizes are available: 900M and 1.5B, which significantly improves the
performance of downstream tasks.`),Le=p(),Z=a("p"),Ge=n("This model was contributed by "),ee=a("a"),Je=n("DeBERTa"),Yd=n(`. This model TF 2.0 implementation was
contributed by `),Jn=a("a"),Zd=n("kamalkraj"),ec=n(". The original code can be found "),Xn=a("a"),tc=n("here"),oc=n("."),Ml=p(),Xt=a("h2"),Co=a("a"),Ir=a("span"),w(Yn.$$.fragment),nc=p(),Lr=a("span"),sc=n("DebertaV2Config"),jl=p(),ft=a("div"),w(Zn.$$.fragment),ac=p(),Yt=a("p"),rc=n("This is the configuration class to store the configuration of a "),Ja=a("a"),ic=n("DebertaV2Model"),lc=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
`),es=a("a"),dc=n("microsoft/deberta-v2-xlarge"),cc=n(" architecture."),pc=p(),Zt=a("p"),hc=n("Configuration objects inherit from "),Xa=a("a"),mc=n("PretrainedConfig"),fc=n(` and can be used to control the model outputs. Read the
documentation from `),Ya=a("a"),uc=n("PretrainedConfig"),gc=n(" for more information."),_c=p(),w(Ao.$$.fragment),Cl=p(),eo=a("h2"),Po=a("a"),Sr=a("span"),w(ts.$$.fragment),bc=p(),Or=a("span"),kc=n("DebertaV2Tokenizer"),Al=p(),Ye=a("div"),w(os.$$.fragment),vc=p(),ns=a("p"),wc=n("Constructs a DeBERTa-v2 tokenizer. Based on "),ss=a("a"),Tc=n("SentencePiece"),yc=n("."),$c=p(),Bt=a("div"),w(as.$$.fragment),Dc=p(),Nr=a("p"),Ec=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:`),Fc=p(),rs=a("ul"),Wr=a("li"),qc=n("single sequence: [CLS] X [SEP]"),xc=p(),Hr=a("li"),zc=n("pair of sequences: [CLS] A [SEP] B [SEP]"),Vc=p(),Bo=a("div"),w(is.$$.fragment),Mc=p(),to=a("p"),jc=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 `),Ur=a("code"),Cc=n("prepare_for_model"),Ac=n(" or "),Kr=a("code"),Pc=n("encode_plus"),Bc=n(" methods."),Rc=p(),vt=a("div"),w(ls.$$.fragment),Ic=p(),Qr=a("p"),Lc=n("Create a mask from the two sequences passed to be used in a sequence-pair classification task. A DeBERTa"),Sc=p(),w(Ro.$$.fragment),Oc=p(),oo=a("p"),Nc=n("If "),Gr=a("code"),Wc=n("token_ids_1"),Hc=n(" is "),Jr=a("code"),Uc=n("None"),Kc=n(", this method only returns the first portion of the mask (0s)."),Qc=p(),Za=a("div"),w(ds.$$.fragment),Pl=p(),no=a("h2"),Io=a("a"),Xr=a("span"),w(cs.$$.fragment),Gc=p(),Yr=a("span"),Jc=n("DebertaV2TokenizerFast"),Bl=p(),ut=a("div"),w(ps.$$.fragment),Xc=p(),hs=a("p"),Yc=n("Constructs a DeBERTa-v2 fast tokenizer. Based on "),ms=a("a"),Zc=n("SentencePiece"),ep=n("."),tp=p(),Rt=a("div"),w(fs.$$.fragment),op=p(),Zr=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=p(),us=a("ul"),ei=a("li"),ap=n("single sequence: [CLS] X [SEP]"),rp=p(),ti=a("li"),ip=n("pair of sequences: [CLS] A [SEP] B [SEP]"),lp=p(),wt=a("div"),w(gs.$$.fragment),dp=p(),oi=a("p"),cp=n("Create a mask from the two sequences passed to be used in a sequence-pair classification task. A DeBERTa"),pp=p(),w(Lo.$$.fragment),hp=p(),so=a("p"),mp=n("If "),ni=a("code"),fp=n("token_ids_1"),up=n(" is "),si=a("code"),gp=n("None"),_p=n(", this method only returns the first portion of the mask (0s)."),Rl=p(),ao=a("h2"),So=a("a"),ai=a("span"),w(_s.$$.fragment),bp=p(),ri=a("span"),kp=n("DebertaV2Model"),Il=p(),gt=a("div"),w(bs.$$.fragment),vp=p(),ks=a("p"),wp=n(`The bare DeBERTa Model transformer outputting raw hidden-states without any specific head on top.
The DeBERTa model was proposed in `),vs=a("a"),Tp=n(`DeBERTa: Decoding-enhanced BERT with Disentangled
Attention`),yp=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.`),$p=p(),ws=a("p"),Dp=n("This model is also a PyTorch "),Ts=a("a"),Ep=n("torch.nn.Module"),Fp=n(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),qp=p(),Tt=a("div"),w(ys.$$.fragment),xp=p(),ro=a("p"),zp=n("The "),er=a("a"),Vp=n("DebertaV2Model"),Mp=n(" forward method, overrides the "),ii=a("code"),jp=n("__call__"),Cp=n(" special method."),Ap=p(),w(Oo.$$.fragment),Pp=p(),w(No.$$.fragment),Ll=p(),io=a("h2"),Wo=a("a"),li=a("span"),w($s.$$.fragment),Bp=p(),di=a("span"),Rp=n("DebertaV2PreTrainedModel"),Sl=p(),Ct=a("div"),w(Ds.$$.fragment),Ip=p(),ci=a("p"),Lp=n(`An abstract class to handle weights initialization and a simple interface for downloading and loading pretrained
models.`),Sp=p(),yt=a("div"),w(Es.$$.fragment),Op=p(),pi=a("p"),Np=n("Defines the computation performed at every call."),Wp=p(),hi=a("p"),Hp=n("Should be overridden by all subclasses."),Up=p(),w(Ho.$$.fragment),Ol=p(),lo=a("h2"),Uo=a("a"),mi=a("span"),w(Fs.$$.fragment),Kp=p(),fi=a("span"),Qp=n("DebertaV2ForMaskedLM"),Nl=p(),_t=a("div"),w(qs.$$.fragment),Gp=p(),co=a("p"),Jp=n("DeBERTa Model with a "),ui=a("code"),Xp=n("language modeling"),Yp=n(` head on top.
The DeBERTa model was proposed in `),xs=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=p(),zs=a("p"),oh=n("This model is also a PyTorch "),Vs=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=p(),$t=a("div"),w(Ms.$$.fragment),rh=p(),po=a("p"),ih=n("The "),tr=a("a"),lh=n("DebertaV2ForMaskedLM"),dh=n(" forward method, overrides the "),gi=a("code"),ch=n("__call__"),ph=n(" special method."),hh=p(),w(Ko.$$.fragment),mh=p(),w(Qo.$$.fragment),Wl=p(),ho=a("h2"),Go=a("a"),_i=a("span"),w(js.$$.fragment),fh=p(),bi=a("span"),uh=n("DebertaV2ForSequenceClassification"),Hl=p(),nt=a("div"),w(Cs.$$.fragment),gh=p(),ki=a("p"),_h=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.`),bh=p(),As=a("p"),kh=n("The DeBERTa model was proposed in "),Ps=a("a"),vh=n(`DeBERTa: Decoding-enhanced BERT with Disentangled
Attention`),wh=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=p(),Bs=a("p"),yh=n("This model is also a PyTorch "),Rs=a("a"),$h=n("torch.nn.Module"),Dh=n(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Eh=p(),dt=a("div"),w(Is.$$.fragment),Fh=p(),mo=a("p"),qh=n("The "),or=a("a"),xh=n("DebertaV2ForSequenceClassification"),zh=n(" forward method, overrides the "),vi=a("code"),Vh=n("__call__"),Mh=n(" special method."),jh=p(),w(Jo.$$.fragment),Ch=p(),w(Xo.$$.fragment),Ah=p(),w(Yo.$$.fragment),Ul=p(),fo=a("h2"),Zo=a("a"),wi=a("span"),w(Ls.$$.fragment),Ph=p(),Ti=a("span"),Bh=n("DebertaV2ForTokenClassification"),Kl=p(),st=a("div"),w(Ss.$$.fragment),Rh=p(),yi=a("p"),Ih=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.`),Lh=p(),Os=a("p"),Sh=n("The DeBERTa model was proposed in "),Ns=a("a"),Oh=n(`DeBERTa: Decoding-enhanced BERT with Disentangled
Attention`),Nh=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.`),Wh=p(),Ws=a("p"),Hh=n("This model is also a PyTorch "),Hs=a("a"),Uh=n("torch.nn.Module"),Kh=n(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Qh=p(),Dt=a("div"),w(Us.$$.fragment),Gh=p(),uo=a("p"),Jh=n("The "),nr=a("a"),Xh=n("DebertaV2ForTokenClassification"),Yh=n(" forward method, overrides the "),$i=a("code"),Zh=n("__call__"),em=n(" special method."),tm=p(),w(en.$$.fragment),om=p(),w(tn.$$.fragment),Ql=p(),go=a("h2"),on=a("a"),Di=a("span"),w(Ks.$$.fragment),nm=p(),Ei=a("span"),sm=n("DebertaV2ForQuestionAnswering"),Gl=p(),at=a("div"),w(Qs.$$.fragment),am=p(),_o=a("p"),rm=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 `),Fi=a("code"),im=n("span start logits"),lm=n(" and "),qi=a("code"),dm=n("span end logits"),cm=n(")."),pm=p(),Gs=a("p"),hm=n("The DeBERTa model was proposed in "),Js=a("a"),mm=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.`),um=p(),Xs=a("p"),gm=n("This model is also a PyTorch "),Ys=a("a"),_m=n("torch.nn.Module"),bm=n(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),km=p(),Et=a("div"),w(Zs.$$.fragment),vm=p(),bo=a("p"),wm=n("The "),sr=a("a"),Tm=n("DebertaV2ForQuestionAnswering"),ym=n(" forward method, overrides the "),xi=a("code"),$m=n("__call__"),Dm=n(" special method."),Em=p(),w(nn.$$.fragment),Fm=p(),w(sn.$$.fragment),Jl=p(),ko=a("h2"),an=a("a"),zi=a("span"),w(ea.$$.fragment),qm=p(),Vi=a("span"),xm=n("DebertaV2ForMultipleChoice"),Xl=p(),rt=a("div"),w(ta.$$.fragment),zm=p(),Mi=a("p"),Vm=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.`),Mm=p(),oa=a("p"),jm=n("The DeBERTa model was proposed in "),na=a("a"),Cm=n(`DeBERTa: Decoding-enhanced BERT with Disentangled
Attention`),Am=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.`),Pm=p(),sa=a("p"),Bm=n("This model is also a PyTorch "),aa=a("a"),Rm=n("torch.nn.Module"),Im=n(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Lm=p(),Ft=a("div"),w(ra.$$.fragment),Sm=p(),vo=a("p"),Om=n("The "),ar=a("a"),Nm=n("DebertaV2ForMultipleChoice"),Wm=n(" forward method, overrides the "),ji=a("code"),Hm=n("__call__"),Um=n(" special method."),Km=p(),w(rn.$$.fragment),Qm=p(),w(ln.$$.fragment),Yl=p(),wo=a("h2"),dn=a("a"),Ci=a("span"),w(ia.$$.fragment),Gm=p(),Ai=a("span"),Jm=n("TFDebertaV2Model"),Zl=p(),it=a("div"),w(la.$$.fragment),Xm=p(),da=a("p"),Ym=n(`The bare DeBERTa Model transformer outputting raw hidden-states without any specific head on top.
The DeBERTa model was proposed in `),ca=a("a"),Zm=n(`DeBERTa: Decoding-enhanced BERT with Disentangled
Attention`),ef=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=p(),pa=a("p"),of=n("This model is also a "),ha=a("a"),nf=n("tf.keras.Model"),sf=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.`),af=p(),w(cn.$$.fragment),rf=p(),qt=a("div"),w(ma.$$.fragment),lf=p(),To=a("p"),df=n("The "),rr=a("a"),cf=n("TFDebertaV2Model"),pf=n(" forward method, overrides the "),Pi=a("code"),hf=n("__call__"),mf=n(" special method."),ff=p(),w(pn.$$.fragment),uf=p(),w(hn.$$.fragment),ed=p(),yo=a("h2"),mn=a("a"),Bi=a("span"),w(fa.$$.fragment),gf=p(),Ri=a("span"),_f=n("TFDebertaV2PreTrainedModel"),td=p(),At=a("div"),w(ua.$$.fragment),bf=p(),Ii=a("p"),kf=n(`An abstract class to handle weights initialization and a simple interface for downloading and loading pretrained
models.`),vf=p(),xt=a("div"),w(ga.$$.fragment),wf=p(),Li=a("p"),Tf=n("Calls the model on new inputs and returns the outputs as tensors."),yf=p(),_a=a("p"),$f=n("In this case "),Si=a("code"),Df=n("call()"),Ef=n(` just reapplies
all ops in the graph to the new inputs
(e.g. build a new computational graph from the provided inputs).`),Ff=p(),bt=a("p"),qf=n(`Note: This method should not be called directly. It is only meant to be
overridden when subclassing `),Oi=a("code"),xf=n("tf.keras.Model"),zf=n(`.
To call a model on an input, always use the `),Ni=a("code"),Vf=n("__call__()"),Mf=n(` method,
i.e. `),Wi=a("code"),jf=n("model(inputs)"),Cf=n(", which relies on the underlying "),Hi=a("code"),Af=n("call()"),Pf=n(" method."),od=p(),$o=a("h2"),fn=a("a"),Ui=a("span"),w(ba.$$.fragment),Bf=p(),Ki=a("span"),Rf=n("TFDebertaV2ForMaskedLM"),nd=p(),lt=a("div"),w(ka.$$.fragment),If=p(),Do=a("p"),Lf=n("DeBERTa Model with a "),Qi=a("code"),Sf=n("language modeling"),Of=n(` head on top.
The DeBERTa model was proposed in `),va=a("a"),Nf=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.`),Hf=p(),wa=a("p"),Uf=n("This model is also a "),Ta=a("a"),Kf=n("tf.keras.Model"),Qf=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.`),Gf=p(),w(un.$$.fragment),Jf=p(),ct=a("div"),w(ya.$$.fragment),Xf=p(),Eo=a("p"),Yf=n("The "),ir=a("a"),Zf=n("TFDebertaV2ForMaskedLM"),eu=n(" forward method, overrides the "),Gi=a("code"),tu=n("__call__"),ou=n(" special method."),nu=p(),w(gn.$$.fragment),su=p(),w(_n.$$.fragment),au=p(),w(bn.$$.fragment),sd=p(),Fo=a("h2"),kn=a("a"),Ji=a("span"),w($a.$$.fragment),ru=p(),Xi=a("span"),iu=n("TFDebertaV2ForSequenceClassification"),ad=p(),Ze=a("div"),w(Da.$$.fragment),lu=p(),Yi=a("p"),du=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.`),cu=p(),Ea=a("p"),pu=n("The DeBERTa model was proposed in "),Fa=a("a"),hu=n(`DeBERTa: Decoding-enhanced BERT with Disentangled
Attention`),mu=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.`),fu=p(),qa=a("p"),uu=n("This model is also a "),xa=a("a"),gu=n("tf.keras.Model"),_u=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.`),bu=p(),w(vn.$$.fragment),ku=p(),pt=a("div"),w(za.$$.fragment),vu=p(),qo=a("p"),wu=n("The "),lr=a("a"),Tu=n("TFDebertaV2ForSequenceClassification"),yu=n(" forward method, overrides the "),Zi=a("code"),$u=n("__call__"),Du=n(" special method."),Eu=p(),w(wn.$$.fragment),Fu=p(),w(Tn.$$.fragment),qu=p(),w(yn.$$.fragment),rd=p(),xo=a("h2"),$n=a("a"),el=a("span"),w(Va.$$.fragment),xu=p(),tl=a("span"),zu=n("TFDebertaV2ForTokenClassification"),id=p(),et=a("div"),w(Ma.$$.fragment),Vu=p(),ol=a("p"),Mu=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.`),ju=p(),ja=a("p"),Cu=n("The DeBERTa model was proposed in "),Ca=a("a"),Au=n(`DeBERTa: Decoding-enhanced BERT with Disentangled
Attention`),Pu=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.`),Bu=p(),Aa=a("p"),Ru=n("This model is also a "),Pa=a("a"),Iu=n("tf.keras.Model"),Lu=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.`),Su=p(),w(Dn.$$.fragment),Ou=p(),ht=a("div"),w(Ba.$$.fragment),Nu=p(),zo=a("p"),Wu=n("The "),dr=a("a"),Hu=n("TFDebertaV2ForTokenClassification"),Uu=n(" forward method, overrides the "),nl=a("code"),Ku=n("__call__"),Qu=n(" special method."),Gu=p(),w(En.$$.fragment),Ju=p(),w(Fn.$$.fragment),Xu=p(),w(qn.$$.fragment),ld=p(),Vo=a("h2"),xn=a("a"),sl=a("span"),w(Ra.$$.fragment),Yu=p(),al=a("span"),Zu=n("TFDebertaV2ForQuestionAnswering"),dd=p(),tt=a("div"),w(Ia.$$.fragment),eg=p(),Mo=a("p"),tg=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 `),rl=a("code"),og=n("span start logits"),ng=n(" and "),il=a("code"),sg=n("span end logits"),ag=n(")."),rg=p(),La=a("p"),ig=n("The DeBERTa model was proposed in "),Sa=a("a"),lg=n(`DeBERTa: Decoding-enhanced BERT with Disentangled
Attention`),dg=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.`),cg=p(),Oa=a("p"),pg=n("This model is also a "),Na=a("a"),hg=n("tf.keras.Model"),mg=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.`),fg=p(),w(zn.$$.fragment),ug=p(),mt=a("div"),w(Wa.$$.fragment),gg=p(),jo=a("p"),_g=n("The "),cr=a("a"),bg=n("TFDebertaV2ForQuestionAnswering"),kg=n(" forward method, overrides the "),ll=a("code"),vg=n("__call__"),wg=n(" special method."),Tg=p(),w(Vn.$$.fragment),yg=p(),w(Mn.$$.fragment),$g=p(),w(jn.$$.fragment),this.h()},l(o){const _=ek('[data-svelte="svelte-1phssyn"]',document.head);d=r(_,"META",{name:!0,content:!0}),_.forEach(t),k=h(o),m=r(o,"H1",{class:!0});var Ha=i(m);f=r(Ha,"A",{id:!0,class:!0,href:!0});var dl=i(f);v=r(dl,"SPAN",{});var cl=i(v);T(l.$$.fragment,cl),cl.forEach(t),dl.forEach(t),c=h(Ha),z=r(Ha,"SPAN",{});var pl=i(z);ke=s(pl,"DeBERTa-v2"),pl.forEach(t),Ha.forEach(t),pe=h(o),R=r(o,"H2",{class:!0});var Ua=i(R);ne=r(Ua,"A",{id:!0,class:!0,href:!0});var hl=i(ne);oe=r(hl,"SPAN",{});var ml=i(oe);T(F.$$.fragment,ml),ml.forEach(t),hl.forEach(t),ve=h(Ua),U=r(Ua,"SPAN",{});var fl=i(U);we=s(fl,"Overview"),fl.forEach(t),Ua.forEach(t),he=h(o),L=r(o,"P",{});var Ka=i(L);Te=s(Ka,"The DeBERTa model was proposed in "),ie=r(Ka,"A",{href:!0,rel:!0});var ul=i(ie);G=s(ul,"DeBERTa: Decoding-enhanced BERT with Disentangled Attention"),ul.forEach(t),ye=s(Ka,` 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.`),Ka.forEach(t),me=h(o),N=r(o,"P",{});var gl=i(N);$e=s(gl,`It builds on RoBERTa with disentangled attention and enhanced mask decoder training with half of the data used in
RoBERTa.`),gl.forEach(t),fe=h(o),W=r(o,"P",{});var _l=i(W);De=s(_l,"The abstract from the paper is the following:"),_l.forEach(t),ue=h(o),te=r(o,"P",{});var bl=i(te);M=r(bl,"EM",{});var Qa=i(M);A=s(Qa,`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(Qa,"A",{href:!0,rel:!0});var kl=i(le);J=s(kl,"https://github.com/microsoft/DeBERTa"),kl.forEach(t),Ee=s(Qa,"."),Qa.forEach(t),bl.forEach(t),ge=h(o),I=r(o,"P",{});var Cn=i(I);Fe=s(Cn,"The following information is visible directly on the "),de=r(Cn,"A",{href:!0,rel:!0});var vl=i(de);P=s(vl,`original implementation
repository`),vl.forEach(t),qe=s(Cn,`. 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(Cn,"A",{href:!0,rel:!0});var wl=i(O);xe=s(wl,"blog"),wl.forEach(t),Cn.forEach(t),_e=h(o),H=r(o,"P",{});var Tl=i(H);ze=s(Tl,"New in v2:"),Tl.forEach(t),be=h(o),C=r(o,"UL",{});var kt=i(C);se=r(kt,"LI",{});var An=i(se);K=r(An,"STRONG",{});var yl=i(K);Ve=s(yl,"Vocabulary"),yl.forEach(t),ae=s(An,` 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(An,"A",{href:!0,rel:!0});var $l=i(j);Me=s($l,"sentencepiece-based"),$l.forEach(t),B=s(An," tokenizer."),An.forEach(t),je=h(kt),ce=r(kt,"LI",{});var pr=i(ce);b=r(pr,"STRONG",{});var Dl=i(b);q=s(Dl,"nGiE(nGram Induced Input Encoding)"),Dl.forEach(t),We=s(pr,` The DeBERTa-v2 model uses an additional convolution layer aside with the first
transformer layer to better learn the local dependency of input tokens.`),pr.forEach(t),re=h(kt),Ce=r(kt,"LI",{});var hr=i(Ce);Be=r(hr,"STRONG",{});var El=i(Be);V=s(El,"Sharing position projection matrix with content projection matrix in attention layer"),El.forEach(t),He=s(hr,` Based on previous
experiments, this can save parameters without affecting the performance.`),hr.forEach(t),Ue=h(kt),Ae=r(kt,"LI",{});var mr=i(Ae);Re=r(mr,"STRONG",{});var Fl=i(Re);Ke=s(Fl,"Apply bucket to encode relative positions"),Fl.forEach(t),S=s(mr,` The DeBERTa-v2 model uses log bucket to encode relative positions
similar to T5.`),mr.forEach(t),X=h(kt),Pe=r(kt,"LI",{});var fr=i(Pe);Ie=r(fr,"STRONG",{});var ql=i(Ie);Y=s(ql,"900M model & 1.5B model"),ql.forEach(t),Qe=s(fr,` Two additional model sizes are available: 900M and 1.5B, which significantly improves the
performance of downstream tasks.`),fr.forEach(t),kt.forEach(t),Le=h(o),Z=r(o,"P",{});var Pt=i(Z);Ge=s(Pt,"This model was contributed by "),ee=r(Pt,"A",{href:!0,rel:!0});var xl=i(ee);Je=s(xl,"DeBERTa"),xl.forEach(t),Yd=s(Pt,`. This model TF 2.0 implementation was
contributed by `),Jn=r(Pt,"A",{href:!0,rel:!0});var zl=i(Jn);Zd=s(zl,"kamalkraj"),zl.forEach(t),ec=s(Pt,". The original code can be found "),Xn=r(Pt,"A",{href:!0,rel:!0});var Vl=i(Xn);tc=s(Vl,"here"),Vl.forEach(t),oc=s(Pt,"."),Pt.forEach(t),Ml=h(o),Xt=r(o,"H2",{class:!0});var Ga=i(Xt);Co=r(Ga,"A",{id:!0,class:!0,href:!0});var Dg=i(Co);Ir=r(Dg,"SPAN",{});var Eg=i(Ir);T(Yn.$$.fragment,Eg),Eg.forEach(t),Dg.forEach(t),nc=h(Ga),Lr=r(Ga,"SPAN",{});var Fg=i(Lr);sc=s(Fg,"DebertaV2Config"),Fg.forEach(t),Ga.forEach(t),jl=h(o),ft=r(o,"DIV",{class:!0});var Pn=i(ft);T(Zn.$$.fragment,Pn),ac=h(Pn),Yt=r(Pn,"P",{});var ur=i(Yt);rc=s(ur,"This is the configuration class to store the configuration of a "),Ja=r(ur,"A",{href:!0});var qg=i(Ja);ic=s(qg,"DebertaV2Model"),qg.forEach(t),lc=s(ur,`. 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
`),es=r(ur,"A",{href:!0,rel:!0});var xg=i(es);dc=s(xg,"microsoft/deberta-v2-xlarge"),xg.forEach(t),cc=s(ur," architecture."),ur.forEach(t),pc=h(Pn),Zt=r(Pn,"P",{});var gr=i(Zt);hc=s(gr,"Configuration objects inherit from "),Xa=r(gr,"A",{href:!0});var zg=i(Xa);mc=s(zg,"PretrainedConfig"),zg.forEach(t),fc=s(gr,` and can be used to control the model outputs. Read the
documentation from `),Ya=r(gr,"A",{href:!0});var Vg=i(Ya);uc=s(Vg,"PretrainedConfig"),Vg.forEach(t),gc=s(gr," for more information."),gr.forEach(t),_c=h(Pn),T(Ao.$$.fragment,Pn),Pn.forEach(t),Cl=h(o),eo=r(o,"H2",{class:!0});var pd=i(eo);Po=r(pd,"A",{id:!0,class:!0,href:!0});var Mg=i(Po);Sr=r(Mg,"SPAN",{});var jg=i(Sr);T(ts.$$.fragment,jg),jg.forEach(t),Mg.forEach(t),bc=h(pd),Or=r(pd,"SPAN",{});var Cg=i(Or);kc=s(Cg,"DebertaV2Tokenizer"),Cg.forEach(t),pd.forEach(t),Al=h(o),Ye=r(o,"DIV",{class:!0});var zt=i(Ye);T(os.$$.fragment,zt),vc=h(zt),ns=r(zt,"P",{});var hd=i(ns);wc=s(hd,"Constructs a DeBERTa-v2 tokenizer. Based on "),ss=r(hd,"A",{href:!0,rel:!0});var Ag=i(ss);Tc=s(Ag,"SentencePiece"),Ag.forEach(t),yc=s(hd,"."),hd.forEach(t),$c=h(zt),Bt=r(zt,"DIV",{class:!0});var _r=i(Bt);T(as.$$.fragment,_r),Dc=h(_r),Nr=r(_r,"P",{});var Pg=i(Nr);Ec=s(Pg,`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:`),Pg.forEach(t),Fc=h(_r),rs=r(_r,"UL",{});var md=i(rs);Wr=r(md,"LI",{});var Bg=i(Wr);qc=s(Bg,"single sequence: [CLS] X [SEP]"),Bg.forEach(t),xc=h(md),Hr=r(md,"LI",{});var Rg=i(Hr);zc=s(Rg,"pair of sequences: [CLS] A [SEP] B [SEP]"),Rg.forEach(t),md.forEach(t),_r.forEach(t),Vc=h(zt),Bo=r(zt,"DIV",{class:!0});var fd=i(Bo);T(is.$$.fragment,fd),Mc=h(fd),to=r(fd,"P",{});var br=i(to);jc=s(br,`Retrieves sequence ids from a token list that has no special tokens added. This method is called when adding
special tokens using the tokenizer `),Ur=r(br,"CODE",{});var Ig=i(Ur);Cc=s(Ig,"prepare_for_model"),Ig.forEach(t),Ac=s(br," or "),Kr=r(br,"CODE",{});var Lg=i(Kr);Pc=s(Lg,"encode_plus"),Lg.forEach(t),Bc=s(br," methods."),br.forEach(t),fd.forEach(t),Rc=h(zt),vt=r(zt,"DIV",{class:!0});var Bn=i(vt);T(ls.$$.fragment,Bn),Ic=h(Bn),Qr=r(Bn,"P",{});var Sg=i(Qr);Lc=s(Sg,"Create a mask from the two sequences passed to be used in a sequence-pair classification task. A DeBERTa"),Sg.forEach(t),Sc=h(Bn),T(Ro.$$.fragment,Bn),Oc=h(Bn),oo=r(Bn,"P",{});var kr=i(oo);Nc=s(kr,"If "),Gr=r(kr,"CODE",{});var Og=i(Gr);Wc=s(Og,"token_ids_1"),Og.forEach(t),Hc=s(kr," is "),Jr=r(kr,"CODE",{});var Ng=i(Jr);Uc=s(Ng,"None"),Ng.forEach(t),Kc=s(kr,", this method only returns the first portion of the mask (0s)."),kr.forEach(t),Bn.forEach(t),Qc=h(zt),Za=r(zt,"DIV",{class:!0});var Wg=i(Za);T(ds.$$.fragment,Wg),Wg.forEach(t),zt.forEach(t),Pl=h(o),no=r(o,"H2",{class:!0});var ud=i(no);Io=r(ud,"A",{id:!0,class:!0,href:!0});var Hg=i(Io);Xr=r(Hg,"SPAN",{});var Ug=i(Xr);T(cs.$$.fragment,Ug),Ug.forEach(t),Hg.forEach(t),Gc=h(ud),Yr=r(ud,"SPAN",{});var Kg=i(Yr);Jc=s(Kg,"DebertaV2TokenizerFast"),Kg.forEach(t),ud.forEach(t),Bl=h(o),ut=r(o,"DIV",{class:!0});var Rn=i(ut);T(ps.$$.fragment,Rn),Xc=h(Rn),hs=r(Rn,"P",{});var gd=i(hs);Yc=s(gd,"Constructs a DeBERTa-v2 fast tokenizer. Based on "),ms=r(gd,"A",{href:!0,rel:!0});var Qg=i(ms);Zc=s(Qg,"SentencePiece"),Qg.forEach(t),ep=s(gd,"."),gd.forEach(t),tp=h(Rn),Rt=r(Rn,"DIV",{class:!0});var vr=i(Rt);T(fs.$$.fragment,vr),op=h(vr),Zr=r(vr,"P",{});var Gg=i(Zr);np=s(Gg,`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:`),Gg.forEach(t),sp=h(vr),us=r(vr,"UL",{});var _d=i(us);ei=r(_d,"LI",{});var Jg=i(ei);ap=s(Jg,"single sequence: [CLS] X [SEP]"),Jg.forEach(t),rp=h(_d),ti=r(_d,"LI",{});var Xg=i(ti);ip=s(Xg,"pair of sequences: [CLS] A [SEP] B [SEP]"),Xg.forEach(t),_d.forEach(t),vr.forEach(t),lp=h(Rn),wt=r(Rn,"DIV",{class:!0});var In=i(wt);T(gs.$$.fragment,In),dp=h(In),oi=r(In,"P",{});var Yg=i(oi);cp=s(Yg,"Create a mask from the two sequences passed to be used in a sequence-pair classification task. A DeBERTa"),Yg.forEach(t),pp=h(In),T(Lo.$$.fragment,In),hp=h(In),so=r(In,"P",{});var wr=i(so);mp=s(wr,"If "),ni=r(wr,"CODE",{});var Zg=i(ni);fp=s(Zg,"token_ids_1"),Zg.forEach(t),up=s(wr," is "),si=r(wr,"CODE",{});var e_=i(si);gp=s(e_,"None"),e_.forEach(t),_p=s(wr,", this method only returns the first portion of the mask (0s)."),wr.forEach(t),In.forEach(t),Rn.forEach(t),Rl=h(o),ao=r(o,"H2",{class:!0});var bd=i(ao);So=r(bd,"A",{id:!0,class:!0,href:!0});var t_=i(So);ai=r(t_,"SPAN",{});var o_=i(ai);T(_s.$$.fragment,o_),o_.forEach(t),t_.forEach(t),bp=h(bd),ri=r(bd,"SPAN",{});var n_=i(ri);kp=s(n_,"DebertaV2Model"),n_.forEach(t),bd.forEach(t),Il=h(o),gt=r(o,"DIV",{class:!0});var Ln=i(gt);T(bs.$$.fragment,Ln),vp=h(Ln),ks=r(Ln,"P",{});var kd=i(ks);wp=s(kd,`The bare DeBERTa Model transformer outputting raw hidden-states without any specific head on top.
The DeBERTa model was proposed in `),vs=r(kd,"A",{href:!0,rel:!0});var s_=i(vs);Tp=s(s_,`DeBERTa: Decoding-enhanced BERT with Disentangled
Attention`),s_.forEach(t),yp=s(kd,` 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.`),kd.forEach(t),$p=h(Ln),ws=r(Ln,"P",{});var vd=i(ws);Dp=s(vd,"This model is also a PyTorch "),Ts=r(vd,"A",{href:!0,rel:!0});var a_=i(Ts);Ep=s(a_,"torch.nn.Module"),a_.forEach(t),Fp=s(vd,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),vd.forEach(t),qp=h(Ln),Tt=r(Ln,"DIV",{class:!0});var Sn=i(Tt);T(ys.$$.fragment,Sn),xp=h(Sn),ro=r(Sn,"P",{});var Tr=i(ro);zp=s(Tr,"The "),er=r(Tr,"A",{href:!0});var r_=i(er);Vp=s(r_,"DebertaV2Model"),r_.forEach(t),Mp=s(Tr," forward method, overrides the "),ii=r(Tr,"CODE",{});var i_=i(ii);jp=s(i_,"__call__"),i_.forEach(t),Cp=s(Tr," special method."),Tr.forEach(t),Ap=h(Sn),T(Oo.$$.fragment,Sn),Pp=h(Sn),T(No.$$.fragment,Sn),Sn.forEach(t),Ln.forEach(t),Ll=h(o),io=r(o,"H2",{class:!0});var wd=i(io);Wo=r(wd,"A",{id:!0,class:!0,href:!0});var l_=i(Wo);li=r(l_,"SPAN",{});var d_=i(li);T($s.$$.fragment,d_),d_.forEach(t),l_.forEach(t),Bp=h(wd),di=r(wd,"SPAN",{});var c_=i(di);Rp=s(c_,"DebertaV2PreTrainedModel"),c_.forEach(t),wd.forEach(t),Sl=h(o),Ct=r(o,"DIV",{class:!0});var yr=i(Ct);T(Ds.$$.fragment,yr),Ip=h(yr),ci=r(yr,"P",{});var p_=i(ci);Lp=s(p_,`An abstract class to handle weights initialization and a simple interface for downloading and loading pretrained
models.`),p_.forEach(t),Sp=h(yr),yt=r(yr,"DIV",{class:!0});var On=i(yt);T(Es.$$.fragment,On),Op=h(On),pi=r(On,"P",{});var h_=i(pi);Np=s(h_,"Defines the computation performed at every call."),h_.forEach(t),Wp=h(On),hi=r(On,"P",{});var m_=i(hi);Hp=s(m_,"Should be overridden by all subclasses."),m_.forEach(t),Up=h(On),T(Ho.$$.fragment,On),On.forEach(t),yr.forEach(t),Ol=h(o),lo=r(o,"H2",{class:!0});var Td=i(lo);Uo=r(Td,"A",{id:!0,class:!0,href:!0});var f_=i(Uo);mi=r(f_,"SPAN",{});var u_=i(mi);T(Fs.$$.fragment,u_),u_.forEach(t),f_.forEach(t),Kp=h(Td),fi=r(Td,"SPAN",{});var g_=i(fi);Qp=s(g_,"DebertaV2ForMaskedLM"),g_.forEach(t),Td.forEach(t),Nl=h(o),_t=r(o,"DIV",{class:!0});var Nn=i(_t);T(qs.$$.fragment,Nn),Gp=h(Nn),co=r(Nn,"P",{});var $r=i(co);Jp=s($r,"DeBERTa Model with a "),ui=r($r,"CODE",{});var __=i(ui);Xp=s(__,"language modeling"),__.forEach(t),Yp=s($r,` head on top.
The DeBERTa model was proposed in `),xs=r($r,"A",{href:!0,rel:!0});var b_=i(xs);Zp=s(b_,`DeBERTa: Decoding-enhanced BERT with Disentangled
Attention`),b_.forEach(t),eh=s($r,` 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.`),$r.forEach(t),th=h(Nn),zs=r(Nn,"P",{});var yd=i(zs);oh=s(yd,"This model is also a PyTorch "),Vs=r(yd,"A",{href:!0,rel:!0});var k_=i(Vs);nh=s(k_,"torch.nn.Module"),k_.forEach(t),sh=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),ah=h(Nn),$t=r(Nn,"DIV",{class:!0});var Wn=i($t);T(Ms.$$.fragment,Wn),rh=h(Wn),po=r(Wn,"P",{});var Dr=i(po);ih=s(Dr,"The "),tr=r(Dr,"A",{href:!0});var v_=i(tr);lh=s(v_,"DebertaV2ForMaskedLM"),v_.forEach(t),dh=s(Dr," forward method, overrides the "),gi=r(Dr,"CODE",{});var w_=i(gi);ch=s(w_,"__call__"),w_.forEach(t),ph=s(Dr," special method."),Dr.forEach(t),hh=h(Wn),T(Ko.$$.fragment,Wn),mh=h(Wn),T(Qo.$$.fragment,Wn),Wn.forEach(t),Nn.forEach(t),Wl=h(o),ho=r(o,"H2",{class:!0});var $d=i(ho);Go=r($d,"A",{id:!0,class:!0,href:!0});var T_=i(Go);_i=r(T_,"SPAN",{});var y_=i(_i);T(js.$$.fragment,y_),y_.forEach(t),T_.forEach(t),fh=h($d),bi=r($d,"SPAN",{});var $_=i(bi);uh=s($_,"DebertaV2ForSequenceClassification"),$_.forEach(t),$d.forEach(t),Hl=h(o),nt=r(o,"DIV",{class:!0});var It=i(nt);T(Cs.$$.fragment,It),gh=h(It),ki=r(It,"P",{});var D_=i(ki);_h=s(D_,`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.`),D_.forEach(t),bh=h(It),As=r(It,"P",{});var Dd=i(As);kh=s(Dd,"The DeBERTa model was proposed in "),Ps=r(Dd,"A",{href:!0,rel:!0});var E_=i(Ps);vh=s(E_,`DeBERTa: Decoding-enhanced BERT with Disentangled
Attention`),E_.forEach(t),wh=s(Dd,` 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.`),Dd.forEach(t),Th=h(It),Bs=r(It,"P",{});var Ed=i(Bs);yh=s(Ed,"This model is also a PyTorch "),Rs=r(Ed,"A",{href:!0,rel:!0});var F_=i(Rs);$h=s(F_,"torch.nn.Module"),F_.forEach(t),Dh=s(Ed,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Ed.forEach(t),Eh=h(It),dt=r(It,"DIV",{class:!0});var Lt=i(dt);T(Is.$$.fragment,Lt),Fh=h(Lt),mo=r(Lt,"P",{});var Er=i(mo);qh=s(Er,"The "),or=r(Er,"A",{href:!0});var q_=i(or);xh=s(q_,"DebertaV2ForSequenceClassification"),q_.forEach(t),zh=s(Er," forward method, overrides the "),vi=r(Er,"CODE",{});var x_=i(vi);Vh=s(x_,"__call__"),x_.forEach(t),Mh=s(Er," special method."),Er.forEach(t),jh=h(Lt),T(Jo.$$.fragment,Lt),Ch=h(Lt),T(Xo.$$.fragment,Lt),Ah=h(Lt),T(Yo.$$.fragment,Lt),Lt.forEach(t),It.forEach(t),Ul=h(o),fo=r(o,"H2",{class:!0});var Fd=i(fo);Zo=r(Fd,"A",{id:!0,class:!0,href:!0});var z_=i(Zo);wi=r(z_,"SPAN",{});var V_=i(wi);T(Ls.$$.fragment,V_),V_.forEach(t),z_.forEach(t),Ph=h(Fd),Ti=r(Fd,"SPAN",{});var M_=i(Ti);Bh=s(M_,"DebertaV2ForTokenClassification"),M_.forEach(t),Fd.forEach(t),Kl=h(o),st=r(o,"DIV",{class:!0});var St=i(st);T(Ss.$$.fragment,St),Rh=h(St),yi=r(St,"P",{});var j_=i(yi);Ih=s(j_,`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.`),j_.forEach(t),Lh=h(St),Os=r(St,"P",{});var qd=i(Os);Sh=s(qd,"The DeBERTa model was proposed in "),Ns=r(qd,"A",{href:!0,rel:!0});var C_=i(Ns);Oh=s(C_,`DeBERTa: Decoding-enhanced BERT with Disentangled
Attention`),C_.forEach(t),Nh=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),Wh=h(St),Ws=r(St,"P",{});var xd=i(Ws);Hh=s(xd,"This model is also a PyTorch "),Hs=r(xd,"A",{href:!0,rel:!0});var A_=i(Hs);Uh=s(A_,"torch.nn.Module"),A_.forEach(t),Kh=s(xd,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),xd.forEach(t),Qh=h(St),Dt=r(St,"DIV",{class:!0});var Hn=i(Dt);T(Us.$$.fragment,Hn),Gh=h(Hn),uo=r(Hn,"P",{});var Fr=i(uo);Jh=s(Fr,"The "),nr=r(Fr,"A",{href:!0});var P_=i(nr);Xh=s(P_,"DebertaV2ForTokenClassification"),P_.forEach(t),Yh=s(Fr," forward method, overrides the "),$i=r(Fr,"CODE",{});var B_=i($i);Zh=s(B_,"__call__"),B_.forEach(t),em=s(Fr," special method."),Fr.forEach(t),tm=h(Hn),T(en.$$.fragment,Hn),om=h(Hn),T(tn.$$.fragment,Hn),Hn.forEach(t),St.forEach(t),Ql=h(o),go=r(o,"H2",{class:!0});var zd=i(go);on=r(zd,"A",{id:!0,class:!0,href:!0});var R_=i(on);Di=r(R_,"SPAN",{});var I_=i(Di);T(Ks.$$.fragment,I_),I_.forEach(t),R_.forEach(t),nm=h(zd),Ei=r(zd,"SPAN",{});var L_=i(Ei);sm=s(L_,"DebertaV2ForQuestionAnswering"),L_.forEach(t),zd.forEach(t),Gl=h(o),at=r(o,"DIV",{class:!0});var Ot=i(at);T(Qs.$$.fragment,Ot),am=h(Ot),_o=r(Ot,"P",{});var qr=i(_o);rm=s(qr,`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 `),Fi=r(qr,"CODE",{});var S_=i(Fi);im=s(S_,"span start logits"),S_.forEach(t),lm=s(qr," and "),qi=r(qr,"CODE",{});var O_=i(qi);dm=s(O_,"span end logits"),O_.forEach(t),cm=s(qr,")."),qr.forEach(t),pm=h(Ot),Gs=r(Ot,"P",{});var Vd=i(Gs);hm=s(Vd,"The DeBERTa model was proposed in "),Js=r(Vd,"A",{href:!0,rel:!0});var N_=i(Js);mm=s(N_,`DeBERTa: Decoding-enhanced BERT with Disentangled
Attention`),N_.forEach(t),fm=s(Vd,` 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.`),Vd.forEach(t),um=h(Ot),Xs=r(Ot,"P",{});var Md=i(Xs);gm=s(Md,"This model is also a PyTorch "),Ys=r(Md,"A",{href:!0,rel:!0});var W_=i(Ys);_m=s(W_,"torch.nn.Module"),W_.forEach(t),bm=s(Md,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Md.forEach(t),km=h(Ot),Et=r(Ot,"DIV",{class:!0});var Un=i(Et);T(Zs.$$.fragment,Un),vm=h(Un),bo=r(Un,"P",{});var xr=i(bo);wm=s(xr,"The "),sr=r(xr,"A",{href:!0});var H_=i(sr);Tm=s(H_,"DebertaV2ForQuestionAnswering"),H_.forEach(t),ym=s(xr," forward method, overrides the "),xi=r(xr,"CODE",{});var U_=i(xi);$m=s(U_,"__call__"),U_.forEach(t),Dm=s(xr," special method."),xr.forEach(t),Em=h(Un),T(nn.$$.fragment,Un),Fm=h(Un),T(sn.$$.fragment,Un),Un.forEach(t),Ot.forEach(t),Jl=h(o),ko=r(o,"H2",{class:!0});var jd=i(ko);an=r(jd,"A",{id:!0,class:!0,href:!0});var K_=i(an);zi=r(K_,"SPAN",{});var Q_=i(zi);T(ea.$$.fragment,Q_),Q_.forEach(t),K_.forEach(t),qm=h(jd),Vi=r(jd,"SPAN",{});var G_=i(Vi);xm=s(G_,"DebertaV2ForMultipleChoice"),G_.forEach(t),jd.forEach(t),Xl=h(o),rt=r(o,"DIV",{class:!0});var Nt=i(rt);T(ta.$$.fragment,Nt),zm=h(Nt),Mi=r(Nt,"P",{});var J_=i(Mi);Vm=s(J_,`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.`),J_.forEach(t),Mm=h(Nt),oa=r(Nt,"P",{});var Cd=i(oa);jm=s(Cd,"The DeBERTa model was proposed in "),na=r(Cd,"A",{href:!0,rel:!0});var X_=i(na);Cm=s(X_,`DeBERTa: Decoding-enhanced BERT with Disentangled
Attention`),X_.forEach(t),Am=s(Cd,` 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.`),Cd.forEach(t),Pm=h(Nt),sa=r(Nt,"P",{});var Ad=i(sa);Bm=s(Ad,"This model is also a PyTorch "),aa=r(Ad,"A",{href:!0,rel:!0});var Y_=i(aa);Rm=s(Y_,"torch.nn.Module"),Y_.forEach(t),Im=s(Ad,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Ad.forEach(t),Lm=h(Nt),Ft=r(Nt,"DIV",{class:!0});var Kn=i(Ft);T(ra.$$.fragment,Kn),Sm=h(Kn),vo=r(Kn,"P",{});var zr=i(vo);Om=s(zr,"The "),ar=r(zr,"A",{href:!0});var Z_=i(ar);Nm=s(Z_,"DebertaV2ForMultipleChoice"),Z_.forEach(t),Wm=s(zr," forward method, overrides the "),ji=r(zr,"CODE",{});var eb=i(ji);Hm=s(eb,"__call__"),eb.forEach(t),Um=s(zr," special method."),zr.forEach(t),Km=h(Kn),T(rn.$$.fragment,Kn),Qm=h(Kn),T(ln.$$.fragment,Kn),Kn.forEach(t),Nt.forEach(t),Yl=h(o),wo=r(o,"H2",{class:!0});var Pd=i(wo);dn=r(Pd,"A",{id:!0,class:!0,href:!0});var tb=i(dn);Ci=r(tb,"SPAN",{});var ob=i(Ci);T(ia.$$.fragment,ob),ob.forEach(t),tb.forEach(t),Gm=h(Pd),Ai=r(Pd,"SPAN",{});var nb=i(Ai);Jm=s(nb,"TFDebertaV2Model"),nb.forEach(t),Pd.forEach(t),Zl=h(o),it=r(o,"DIV",{class:!0});var Wt=i(it);T(la.$$.fragment,Wt),Xm=h(Wt),da=r(Wt,"P",{});var Bd=i(da);Ym=s(Bd,`The bare DeBERTa Model transformer outputting raw hidden-states without any specific head on top.
The DeBERTa model was proposed in `),ca=r(Bd,"A",{href:!0,rel:!0});var sb=i(ca);Zm=s(sb,`DeBERTa: Decoding-enhanced BERT with Disentangled
Attention`),sb.forEach(t),ef=s(Bd,` 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.`),Bd.forEach(t),tf=h(Wt),pa=r(Wt,"P",{});var Rd=i(pa);of=s(Rd,"This model is also a "),ha=r(Rd,"A",{href:!0,rel:!0});var ab=i(ha);nf=s(ab,"tf.keras.Model"),ab.forEach(t),sf=s(Rd,` 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.`),Rd.forEach(t),af=h(Wt),T(cn.$$.fragment,Wt),rf=h(Wt),qt=r(Wt,"DIV",{class:!0});var Qn=i(qt);T(ma.$$.fragment,Qn),lf=h(Qn),To=r(Qn,"P",{});var Vr=i(To);df=s(Vr,"The "),rr=r(Vr,"A",{href:!0});var rb=i(rr);cf=s(rb,"TFDebertaV2Model"),rb.forEach(t),pf=s(Vr," forward method, overrides the "),Pi=r(Vr,"CODE",{});var ib=i(Pi);hf=s(ib,"__call__"),ib.forEach(t),mf=s(Vr," special method."),Vr.forEach(t),ff=h(Qn),T(pn.$$.fragment,Qn),uf=h(Qn),T(hn.$$.fragment,Qn),Qn.forEach(t),Wt.forEach(t),ed=h(o),yo=r(o,"H2",{class:!0});var Id=i(yo);mn=r(Id,"A",{id:!0,class:!0,href:!0});var lb=i(mn);Bi=r(lb,"SPAN",{});var db=i(Bi);T(fa.$$.fragment,db),db.forEach(t),lb.forEach(t),gf=h(Id),Ri=r(Id,"SPAN",{});var cb=i(Ri);_f=s(cb,"TFDebertaV2PreTrainedModel"),cb.forEach(t),Id.forEach(t),td=h(o),At=r(o,"DIV",{class:!0});var Mr=i(At);T(ua.$$.fragment,Mr),bf=h(Mr),Ii=r(Mr,"P",{});var pb=i(Ii);kf=s(pb,`An abstract class to handle weights initialization and a simple interface for downloading and loading pretrained
models.`),pb.forEach(t),vf=h(Mr),xt=r(Mr,"DIV",{class:!0});var Gn=i(xt);T(ga.$$.fragment,Gn),wf=h(Gn),Li=r(Gn,"P",{});var hb=i(Li);Tf=s(hb,"Calls the model on new inputs and returns the outputs as tensors."),hb.forEach(t),yf=h(Gn),_a=r(Gn,"P",{});var Ld=i(_a);$f=s(Ld,"In this case "),Si=r(Ld,"CODE",{});var mb=i(Si);Df=s(mb,"call()"),mb.forEach(t),Ef=s(Ld,` just reapplies
all ops in the graph to the new inputs
(e.g. build a new computational graph from the provided inputs).`),Ld.forEach(t),Ff=h(Gn),bt=r(Gn,"P",{});var Ht=i(bt);qf=s(Ht,`Note: This method should not be called directly. It is only meant to be
overridden when subclassing `),Oi=r(Ht,"CODE",{});var fb=i(Oi);xf=s(fb,"tf.keras.Model"),fb.forEach(t),zf=s(Ht,`.
To call a model on an input, always use the `),Ni=r(Ht,"CODE",{});var ub=i(Ni);Vf=s(ub,"__call__()"),ub.forEach(t),Mf=s(Ht,` method,
i.e. `),Wi=r(Ht,"CODE",{});var gb=i(Wi);jf=s(gb,"model(inputs)"),gb.forEach(t),Cf=s(Ht,", which relies on the underlying "),Hi=r(Ht,"CODE",{});var _b=i(Hi);Af=s(_b,"call()"),_b.forEach(t),Pf=s(Ht," method."),Ht.forEach(t),Gn.forEach(t),Mr.forEach(t),od=h(o),$o=r(o,"H2",{class:!0});var Sd=i($o);fn=r(Sd,"A",{id:!0,class:!0,href:!0});var bb=i(fn);Ui=r(bb,"SPAN",{});var kb=i(Ui);T(ba.$$.fragment,kb),kb.forEach(t),bb.forEach(t),Bf=h(Sd),Ki=r(Sd,"SPAN",{});var vb=i(Ki);Rf=s(vb,"TFDebertaV2ForMaskedLM"),vb.forEach(t),Sd.forEach(t),nd=h(o),lt=r(o,"DIV",{class:!0});var Ut=i(lt);T(ka.$$.fragment,Ut),If=h(Ut),Do=r(Ut,"P",{});var jr=i(Do);Lf=s(jr,"DeBERTa Model with a "),Qi=r(jr,"CODE",{});var wb=i(Qi);Sf=s(wb,"language modeling"),wb.forEach(t),Of=s(jr,` head on top.
The DeBERTa model was proposed in `),va=r(jr,"A",{href:!0,rel:!0});var Tb=i(va);Nf=s(Tb,`DeBERTa: Decoding-enhanced BERT with Disentangled
Attention`),Tb.forEach(t),Wf=s(jr,` 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.`),jr.forEach(t),Hf=h(Ut),wa=r(Ut,"P",{});var Od=i(wa);Uf=s(Od,"This model is also a "),Ta=r(Od,"A",{href:!0,rel:!0});var yb=i(Ta);Kf=s(yb,"tf.keras.Model"),yb.forEach(t),Qf=s(Od,` 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.`),Od.forEach(t),Gf=h(Ut),T(un.$$.fragment,Ut),Jf=h(Ut),ct=r(Ut,"DIV",{class:!0});var Kt=i(ct);T(ya.$$.fragment,Kt),Xf=h(Kt),Eo=r(Kt,"P",{});var Cr=i(Eo);Yf=s(Cr,"The "),ir=r(Cr,"A",{href:!0});var $b=i(ir);Zf=s($b,"TFDebertaV2ForMaskedLM"),$b.forEach(t),eu=s(Cr," forward method, overrides the "),Gi=r(Cr,"CODE",{});var Db=i(Gi);tu=s(Db,"__call__"),Db.forEach(t),ou=s(Cr," special method."),Cr.forEach(t),nu=h(Kt),T(gn.$$.fragment,Kt),su=h(Kt),T(_n.$$.fragment,Kt),au=h(Kt),T(bn.$$.fragment,Kt),Kt.forEach(t),Ut.forEach(t),sd=h(o),Fo=r(o,"H2",{class:!0});var Nd=i(Fo);kn=r(Nd,"A",{id:!0,class:!0,href:!0});var Eb=i(kn);Ji=r(Eb,"SPAN",{});var Fb=i(Ji);T($a.$$.fragment,Fb),Fb.forEach(t),Eb.forEach(t),ru=h(Nd),Xi=r(Nd,"SPAN",{});var qb=i(Xi);iu=s(qb,"TFDebertaV2ForSequenceClassification"),qb.forEach(t),Nd.forEach(t),ad=h(o),Ze=r(o,"DIV",{class:!0});var Vt=i(Ze);T(Da.$$.fragment,Vt),lu=h(Vt),Yi=r(Vt,"P",{});var xb=i(Yi);du=s(xb,`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.`),xb.forEach(t),cu=h(Vt),Ea=r(Vt,"P",{});var Wd=i(Ea);pu=s(Wd,"The DeBERTa model was proposed in "),Fa=r(Wd,"A",{href:!0,rel:!0});var zb=i(Fa);hu=s(zb,`DeBERTa: Decoding-enhanced BERT with Disentangled
Attention`),zb.forEach(t),mu=s(Wd,` 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.`),Wd.forEach(t),fu=h(Vt),qa=r(Vt,"P",{});var Hd=i(qa);uu=s(Hd,"This model is also a "),xa=r(Hd,"A",{href:!0,rel:!0});var Vb=i(xa);gu=s(Vb,"tf.keras.Model"),Vb.forEach(t),_u=s(Hd,` 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.`),Hd.forEach(t),bu=h(Vt),T(vn.$$.fragment,Vt),ku=h(Vt),pt=r(Vt,"DIV",{class:!0});var Qt=i(pt);T(za.$$.fragment,Qt),vu=h(Qt),qo=r(Qt,"P",{});var Ar=i(qo);wu=s(Ar,"The "),lr=r(Ar,"A",{href:!0});var Mb=i(lr);Tu=s(Mb,"TFDebertaV2ForSequenceClassification"),Mb.forEach(t),yu=s(Ar," forward method, overrides the "),Zi=r(Ar,"CODE",{});var jb=i(Zi);$u=s(jb,"__call__"),jb.forEach(t),Du=s(Ar," special method."),Ar.forEach(t),Eu=h(Qt),T(wn.$$.fragment,Qt),Fu=h(Qt),T(Tn.$$.fragment,Qt),qu=h(Qt),T(yn.$$.fragment,Qt),Qt.forEach(t),Vt.forEach(t),rd=h(o),xo=r(o,"H2",{class:!0});var Ud=i(xo);$n=r(Ud,"A",{id:!0,class:!0,href:!0});var Cb=i($n);el=r(Cb,"SPAN",{});var Ab=i(el);T(Va.$$.fragment,Ab),Ab.forEach(t),Cb.forEach(t),xu=h(Ud),tl=r(Ud,"SPAN",{});var Pb=i(tl);zu=s(Pb,"TFDebertaV2ForTokenClassification"),Pb.forEach(t),Ud.forEach(t),id=h(o),et=r(o,"DIV",{class:!0});var Mt=i(et);T(Ma.$$.fragment,Mt),Vu=h(Mt),ol=r(Mt,"P",{});var Bb=i(ol);Mu=s(Bb,`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.`),Bb.forEach(t),ju=h(Mt),ja=r(Mt,"P",{});var Kd=i(ja);Cu=s(Kd,"The DeBERTa model was proposed in "),Ca=r(Kd,"A",{href:!0,rel:!0});var Rb=i(Ca);Au=s(Rb,`DeBERTa: Decoding-enhanced BERT with Disentangled
Attention`),Rb.forEach(t),Pu=s(Kd,` 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.`),Kd.forEach(t),Bu=h(Mt),Aa=r(Mt,"P",{});var Qd=i(Aa);Ru=s(Qd,"This model is also a "),Pa=r(Qd,"A",{href:!0,rel:!0});var Ib=i(Pa);Iu=s(Ib,"tf.keras.Model"),Ib.forEach(t),Lu=s(Qd,` 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.`),Qd.forEach(t),Su=h(Mt),T(Dn.$$.fragment,Mt),Ou=h(Mt),ht=r(Mt,"DIV",{class:!0});var Gt=i(ht);T(Ba.$$.fragment,Gt),Nu=h(Gt),zo=r(Gt,"P",{});var Pr=i(zo);Wu=s(Pr,"The "),dr=r(Pr,"A",{href:!0});var Lb=i(dr);Hu=s(Lb,"TFDebertaV2ForTokenClassification"),Lb.forEach(t),Uu=s(Pr," forward method, overrides the "),nl=r(Pr,"CODE",{});var Sb=i(nl);Ku=s(Sb,"__call__"),Sb.forEach(t),Qu=s(Pr," special method."),Pr.forEach(t),Gu=h(Gt),T(En.$$.fragment,Gt),Ju=h(Gt),T(Fn.$$.fragment,Gt),Xu=h(Gt),T(qn.$$.fragment,Gt),Gt.forEach(t),Mt.forEach(t),ld=h(o),Vo=r(o,"H2",{class:!0});var Gd=i(Vo);xn=r(Gd,"A",{id:!0,class:!0,href:!0});var Ob=i(xn);sl=r(Ob,"SPAN",{});var Nb=i(sl);T(Ra.$$.fragment,Nb),Nb.forEach(t),Ob.forEach(t),Yu=h(Gd),al=r(Gd,"SPAN",{});var Wb=i(al);Zu=s(Wb,"TFDebertaV2ForQuestionAnswering"),Wb.forEach(t),Gd.forEach(t),dd=h(o),tt=r(o,"DIV",{class:!0});var jt=i(tt);T(Ia.$$.fragment,jt),eg=h(jt),Mo=r(jt,"P",{});var Br=i(Mo);tg=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 `),rl=r(Br,"CODE",{});var Hb=i(rl);og=s(Hb,"span start logits"),Hb.forEach(t),ng=s(Br," and "),il=r(Br,"CODE",{});var Ub=i(il);sg=s(Ub,"span end logits"),Ub.forEach(t),ag=s(Br,")."),Br.forEach(t),rg=h(jt),La=r(jt,"P",{});var Jd=i(La);ig=s(Jd,"The DeBERTa model was proposed in "),Sa=r(Jd,"A",{href:!0,rel:!0});var Kb=i(Sa);lg=s(Kb,`DeBERTa: Decoding-enhanced BERT with Disentangled
Attention`),Kb.forEach(t),dg=s(Jd,` 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.`),Jd.forEach(t),cg=h(jt),Oa=r(jt,"P",{});var Xd=i(Oa);pg=s(Xd,"This model is also a "),Na=r(Xd,"A",{href:!0,rel:!0});var Qb=i(Na);hg=s(Qb,"tf.keras.Model"),Qb.forEach(t),mg=s(Xd,` 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.`),Xd.forEach(t),fg=h(jt),T(zn.$$.fragment,jt),ug=h(jt),mt=r(jt,"DIV",{class:!0});var Jt=i(mt);T(Wa.$$.fragment,Jt),gg=h(Jt),jo=r(Jt,"P",{});var Rr=i(jo);_g=s(Rr,"The "),cr=r(Rr,"A",{href:!0});var Gb=i(cr);bg=s(Gb,"TFDebertaV2ForQuestionAnswering"),Gb.forEach(t),kg=s(Rr," forward method, overrides the "),ll=r(Rr,"CODE",{});var Jb=i(ll);vg=s(Jb,"__call__"),Jb.forEach(t),wg=s(Rr," special method."),Rr.forEach(t),Tg=h(Jt),T(Vn.$$.fragment,Jt),yg=h(Jt),T(Mn.$$.fragment,Jt),$g=h(Jt),T(jn.$$.fragment,Jt),Jt.forEach(t),jt.forEach(t),this.h()},h(){u(d,"name","hf:doc:metadata"),u(d,"content",JSON.stringify(Ik)),u(f,"id","debertav2"),u(f,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),u(f,"href","#debertav2"),u(m,"class","relative group"),u(ne,"id","overview"),u(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"),u(ne,"href","#overview"),u(R,"class","relative group"),u(ie,"href","https://arxiv.org/abs/2006.03654"),u(ie,"rel","nofollow"),u(le,"href","https://github.com/microsoft/DeBERTa"),u(le,"rel","nofollow"),u(de,"href","https://github.com/microsoft/DeBERTa"),u(de,"rel","nofollow"),u(O,"href","https://www.microsoft.com/en-us/research/blog/microsoft-deberta-surpasses-human-performance-on-the-superglue-benchmark/"),u(O,"rel","nofollow"),u(j,"href","https://github.com/google/sentencepiece"),u(j,"rel","nofollow"),u(ee,"href","https://huggingface.co/DeBERTa"),u(ee,"rel","nofollow"),u(Jn,"href","https://huggingface.co/kamalkraj"),u(Jn,"rel","nofollow"),u(Xn,"href","https://github.com/microsoft/DeBERTa"),u(Xn,"rel","nofollow"),u(Co,"id","transformers.DebertaV2Config"),u(Co,"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"),u(Co,"href","#transformers.DebertaV2Config"),u(Xt,"class","relative group"),u(Ja,"href","/docs/transformers/main/en/model_doc/deberta-v2#transformers.DebertaV2Model"),u(es,"href","https://huggingface.co/microsoft/deberta-v2-xlarge"),u(es,"rel","nofollow"),u(Xa,"href","/docs/transformers/main/en/main_classes/configuration#transformers.PretrainedConfig"),u(Ya,"href","/docs/transformers/main/en/main_classes/configuration#transformers.PretrainedConfig"),u(ft,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(Po,"id","transformers.DebertaV2Tokenizer"),u(Po,"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"),u(Po,"href","#transformers.DebertaV2Tokenizer"),u(eo,"class","relative group"),u(ss,"href","https://github.com/google/sentencepiece"),u(ss,"rel","nofollow"),u(Bt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(Bo,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(vt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(Za,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(Ye,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(Io,"id","transformers.DebertaV2TokenizerFast"),u(Io,"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"),u(Io,"href","#transformers.DebertaV2TokenizerFast"),u(no,"class","relative group"),u(ms,"href","https://github.com/google/sentencepiece"),u(ms,"rel","nofollow"),u(Rt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(wt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(ut,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(So,"id","transformers.DebertaV2Model"),u(So,"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"),u(So,"href","#transformers.DebertaV2Model"),u(ao,"class","relative group"),u(vs,"href","https://arxiv.org/abs/2006.03654"),u(vs,"rel","nofollow"),u(Ts,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),u(Ts,"rel","nofollow"),u(er,"href","/docs/transformers/main/en/model_doc/deberta-v2#transformers.DebertaV2Model"),u(Tt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(gt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(Wo,"id","transformers.DebertaV2PreTrainedModel"),u(Wo,"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"),u(Wo,"href","#transformers.DebertaV2PreTrainedModel"),u(io,"class","relative group"),u(yt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(Ct,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(Uo,"id","transformers.DebertaV2ForMaskedLM"),u(Uo,"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"),u(Uo,"href","#transformers.DebertaV2ForMaskedLM"),u(lo,"class","relative group"),u(xs,"href","https://arxiv.org/abs/2006.03654"),u(xs,"rel","nofollow"),u(Vs,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),u(Vs,"rel","nofollow"),u(tr,"href","/docs/transformers/main/en/model_doc/deberta-v2#transformers.DebertaV2ForMaskedLM"),u($t,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(_t,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(Go,"id","transformers.DebertaV2ForSequenceClassification"),u(Go,"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"),u(Go,"href","#transformers.DebertaV2ForSequenceClassification"),u(ho,"class","relative group"),u(Ps,"href","https://arxiv.org/abs/2006.03654"),u(Ps,"rel","nofollow"),u(Rs,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),u(Rs,"rel","nofollow"),u(or,"href","/docs/transformers/main/en/model_doc/deberta-v2#transformers.DebertaV2ForSequenceClassification"),u(dt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(nt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(Zo,"id","transformers.DebertaV2ForTokenClassification"),u(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"),u(Zo,"href","#transformers.DebertaV2ForTokenClassification"),u(fo,"class","relative group"),u(Ns,"href","https://arxiv.org/abs/2006.03654"),u(Ns,"rel","nofollow"),u(Hs,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),u(Hs,"rel","nofollow"),u(nr,"href","/docs/transformers/main/en/model_doc/deberta-v2#transformers.DebertaV2ForTokenClassification"),u(Dt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(st,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(on,"id","transformers.DebertaV2ForQuestionAnswering"),u(on,"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"),u(on,"href","#transformers.DebertaV2ForQuestionAnswering"),u(go,"class","relative group"),u(Js,"href","https://arxiv.org/abs/2006.03654"),u(Js,"rel","nofollow"),u(Ys,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),u(Ys,"rel","nofollow"),u(sr,"href","/docs/transformers/main/en/model_doc/deberta-v2#transformers.DebertaV2ForQuestionAnswering"),u(Et,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(at,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(an,"id","transformers.DebertaV2ForMultipleChoice"),u(an,"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"),u(an,"href","#transformers.DebertaV2ForMultipleChoice"),u(ko,"class","relative group"),u(na,"href","https://arxiv.org/abs/2006.03654"),u(na,"rel","nofollow"),u(aa,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),u(aa,"rel","nofollow"),u(ar,"href","/docs/transformers/main/en/model_doc/deberta-v2#transformers.DebertaV2ForMultipleChoice"),u(Ft,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(rt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(dn,"id","transformers.TFDebertaV2Model"),u(dn,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),u(dn,"href","#transformers.TFDebertaV2Model"),u(wo,"class","relative group"),u(ca,"href","https://arxiv.org/abs/2006.03654"),u(ca,"rel","nofollow"),u(ha,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),u(ha,"rel","nofollow"),u(rr,"href","/docs/transformers/main/en/model_doc/deberta-v2#transformers.TFDebertaV2Model"),u(qt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(it,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(mn,"id","transformers.TFDebertaV2PreTrainedModel"),u(mn,"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"),u(mn,"href","#transformers.TFDebertaV2PreTrainedModel"),u(yo,"class","relative group"),u(xt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(At,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(fn,"id","transformers.TFDebertaV2ForMaskedLM"),u(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"),u(fn,"href","#transformers.TFDebertaV2ForMaskedLM"),u($o,"class","relative group"),u(va,"href","https://arxiv.org/abs/2006.03654"),u(va,"rel","nofollow"),u(Ta,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),u(Ta,"rel","nofollow"),u(ir,"href","/docs/transformers/main/en/model_doc/deberta-v2#transformers.TFDebertaV2ForMaskedLM"),u(ct,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(lt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(kn,"id","transformers.TFDebertaV2ForSequenceClassification"),u(kn,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),u(kn,"href","#transformers.TFDebertaV2ForSequenceClassification"),u(Fo,"class","relative group"),u(Fa,"href","https://arxiv.org/abs/2006.03654"),u(Fa,"rel","nofollow"),u(xa,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),u(xa,"rel","nofollow"),u(lr,"href","/docs/transformers/main/en/model_doc/deberta-v2#transformers.TFDebertaV2ForSequenceClassification"),u(pt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(Ze,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u($n,"id","transformers.TFDebertaV2ForTokenClassification"),u($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"),u($n,"href","#transformers.TFDebertaV2ForTokenClassification"),u(xo,"class","relative group"),u(Ca,"href","https://arxiv.org/abs/2006.03654"),u(Ca,"rel","nofollow"),u(Pa,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),u(Pa,"rel","nofollow"),u(dr,"href","/docs/transformers/main/en/model_doc/deberta-v2#transformers.TFDebertaV2ForTokenClassification"),u(ht,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(et,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(xn,"id","transformers.TFDebertaV2ForQuestionAnswering"),u(xn,"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"),u(xn,"href","#transformers.TFDebertaV2ForQuestionAnswering"),u(Vo,"class","relative group"),u(Sa,"href","https://arxiv.org/abs/2006.03654"),u(Sa,"rel","nofollow"),u(Na,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),u(Na,"rel","nofollow"),u(cr,"href","/docs/transformers/main/en/model_doc/deberta-v2#transformers.TFDebertaV2ForQuestionAnswering"),u(mt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(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,m,_),e(m,f),e(f,v),y(l,v,null),e(m,c),e(m,z),e(z,ke),g(o,pe,_),g(o,R,_),e(R,ne),e(ne,oe),y(F,oe,null),e(R,ve),e(R,U),e(U,we),g(o,he,_),g(o,L,_),e(L,Te),e(L,ie),e(ie,G),e(L,ye),g(o,me,_),g(o,N,_),e(N,$e),g(o,fe,_),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,B),e(C,je),e(C,ce),e(ce,b),e(b,q),e(ce,We),e(C,re),e(C,Ce),e(Ce,Be),e(Be,V),e(Ce,He),e(C,Ue),e(C,Ae),e(Ae,Re),e(Re,Ke),e(Ae,S),e(C,X),e(C,Pe),e(Pe,Ie),e(Ie,Y),e(Pe,Qe),g(o,Le,_),g(o,Z,_),e(Z,Ge),e(Z,ee),e(ee,Je),e(Z,Yd),e(Z,Jn),e(Jn,Zd),e(Z,ec),e(Z,Xn),e(Xn,tc),e(Z,oc),g(o,Ml,_),g(o,Xt,_),e(Xt,Co),e(Co,Ir),y(Yn,Ir,null),e(Xt,nc),e(Xt,Lr),e(Lr,sc),g(o,jl,_),g(o,ft,_),y(Zn,ft,null),e(ft,ac),e(ft,Yt),e(Yt,rc),e(Yt,Ja),e(Ja,ic),e(Yt,lc),e(Yt,es),e(es,dc),e(Yt,cc),e(ft,pc),e(ft,Zt),e(Zt,hc),e(Zt,Xa),e(Xa,mc),e(Zt,fc),e(Zt,Ya),e(Ya,uc),e(Zt,gc),e(ft,_c),y(Ao,ft,null),g(o,Cl,_),g(o,eo,_),e(eo,Po),e(Po,Sr),y(ts,Sr,null),e(eo,bc),e(eo,Or),e(Or,kc),g(o,Al,_),g(o,Ye,_),y(os,Ye,null),e(Ye,vc),e(Ye,ns),e(ns,wc),e(ns,ss),e(ss,Tc),e(ns,yc),e(Ye,$c),e(Ye,Bt),y(as,Bt,null),e(Bt,Dc),e(Bt,Nr),e(Nr,Ec),e(Bt,Fc),e(Bt,rs),e(rs,Wr),e(Wr,qc),e(rs,xc),e(rs,Hr),e(Hr,zc),e(Ye,Vc),e(Ye,Bo),y(is,Bo,null),e(Bo,Mc),e(Bo,to),e(to,jc),e(to,Ur),e(Ur,Cc),e(to,Ac),e(to,Kr),e(Kr,Pc),e(to,Bc),e(Ye,Rc),e(Ye,vt),y(ls,vt,null),e(vt,Ic),e(vt,Qr),e(Qr,Lc),e(vt,Sc),y(Ro,vt,null),e(vt,Oc),e(vt,oo),e(oo,Nc),e(oo,Gr),e(Gr,Wc),e(oo,Hc),e(oo,Jr),e(Jr,Uc),e(oo,Kc),e(Ye,Qc),e(Ye,Za),y(ds,Za,null),g(o,Pl,_),g(o,no,_),e(no,Io),e(Io,Xr),y(cs,Xr,null),e(no,Gc),e(no,Yr),e(Yr,Jc),g(o,Bl,_),g(o,ut,_),y(ps,ut,null),e(ut,Xc),e(ut,hs),e(hs,Yc),e(hs,ms),e(ms,Zc),e(hs,ep),e(ut,tp),e(ut,Rt),y(fs,Rt,null),e(Rt,op),e(Rt,Zr),e(Zr,np),e(Rt,sp),e(Rt,us),e(us,ei),e(ei,ap),e(us,rp),e(us,ti),e(ti,ip),e(ut,lp),e(ut,wt),y(gs,wt,null),e(wt,dp),e(wt,oi),e(oi,cp),e(wt,pp),y(Lo,wt,null),e(wt,hp),e(wt,so),e(so,mp),e(so,ni),e(ni,fp),e(so,up),e(so,si),e(si,gp),e(so,_p),g(o,Rl,_),g(o,ao,_),e(ao,So),e(So,ai),y(_s,ai,null),e(ao,bp),e(ao,ri),e(ri,kp),g(o,Il,_),g(o,gt,_),y(bs,gt,null),e(gt,vp),e(gt,ks),e(ks,wp),e(ks,vs),e(vs,Tp),e(ks,yp),e(gt,$p),e(gt,ws),e(ws,Dp),e(ws,Ts),e(Ts,Ep),e(ws,Fp),e(gt,qp),e(gt,Tt),y(ys,Tt,null),e(Tt,xp),e(Tt,ro),e(ro,zp),e(ro,er),e(er,Vp),e(ro,Mp),e(ro,ii),e(ii,jp),e(ro,Cp),e(Tt,Ap),y(Oo,Tt,null),e(Tt,Pp),y(No,Tt,null),g(o,Ll,_),g(o,io,_),e(io,Wo),e(Wo,li),y($s,li,null),e(io,Bp),e(io,di),e(di,Rp),g(o,Sl,_),g(o,Ct,_),y(Ds,Ct,null),e(Ct,Ip),e(Ct,ci),e(ci,Lp),e(Ct,Sp),e(Ct,yt),y(Es,yt,null),e(yt,Op),e(yt,pi),e(pi,Np),e(yt,Wp),e(yt,hi),e(hi,Hp),e(yt,Up),y(Ho,yt,null),g(o,Ol,_),g(o,lo,_),e(lo,Uo),e(Uo,mi),y(Fs,mi,null),e(lo,Kp),e(lo,fi),e(fi,Qp),g(o,Nl,_),g(o,_t,_),y(qs,_t,null),e(_t,Gp),e(_t,co),e(co,Jp),e(co,ui),e(ui,Xp),e(co,Yp),e(co,xs),e(xs,Zp),e(co,eh),e(_t,th),e(_t,zs),e(zs,oh),e(zs,Vs),e(Vs,nh),e(zs,sh),e(_t,ah),e(_t,$t),y(Ms,$t,null),e($t,rh),e($t,po),e(po,ih),e(po,tr),e(tr,lh),e(po,dh),e(po,gi),e(gi,ch),e(po,ph),e($t,hh),y(Ko,$t,null),e($t,mh),y(Qo,$t,null),g(o,Wl,_),g(o,ho,_),e(ho,Go),e(Go,_i),y(js,_i,null),e(ho,fh),e(ho,bi),e(bi,uh),g(o,Hl,_),g(o,nt,_),y(Cs,nt,null),e(nt,gh),e(nt,ki),e(ki,_h),e(nt,bh),e(nt,As),e(As,kh),e(As,Ps),e(Ps,vh),e(As,wh),e(nt,Th),e(nt,Bs),e(Bs,yh),e(Bs,Rs),e(Rs,$h),e(Bs,Dh),e(nt,Eh),e(nt,dt),y(Is,dt,null),e(dt,Fh),e(dt,mo),e(mo,qh),e(mo,or),e(or,xh),e(mo,zh),e(mo,vi),e(vi,Vh),e(mo,Mh),e(dt,jh),y(Jo,dt,null),e(dt,Ch),y(Xo,dt,null),e(dt,Ah),y(Yo,dt,null),g(o,Ul,_),g(o,fo,_),e(fo,Zo),e(Zo,wi),y(Ls,wi,null),e(fo,Ph),e(fo,Ti),e(Ti,Bh),g(o,Kl,_),g(o,st,_),y(Ss,st,null),e(st,Rh),e(st,yi),e(yi,Ih),e(st,Lh),e(st,Os),e(Os,Sh),e(Os,Ns),e(Ns,Oh),e(Os,Nh),e(st,Wh),e(st,Ws),e(Ws,Hh),e(Ws,Hs),e(Hs,Uh),e(Ws,Kh),e(st,Qh),e(st,Dt),y(Us,Dt,null),e(Dt,Gh),e(Dt,uo),e(uo,Jh),e(uo,nr),e(nr,Xh),e(uo,Yh),e(uo,$i),e($i,Zh),e(uo,em),e(Dt,tm),y(en,Dt,null),e(Dt,om),y(tn,Dt,null),g(o,Ql,_),g(o,go,_),e(go,on),e(on,Di),y(Ks,Di,null),e(go,nm),e(go,Ei),e(Ei,sm),g(o,Gl,_),g(o,at,_),y(Qs,at,null),e(at,am),e(at,_o),e(_o,rm),e(_o,Fi),e(Fi,im),e(_o,lm),e(_o,qi),e(qi,dm),e(_o,cm),e(at,pm),e(at,Gs),e(Gs,hm),e(Gs,Js),e(Js,mm),e(Gs,fm),e(at,um),e(at,Xs),e(Xs,gm),e(Xs,Ys),e(Ys,_m),e(Xs,bm),e(at,km),e(at,Et),y(Zs,Et,null),e(Et,vm),e(Et,bo),e(bo,wm),e(bo,sr),e(sr,Tm),e(bo,ym),e(bo,xi),e(xi,$m),e(bo,Dm),e(Et,Em),y(nn,Et,null),e(Et,Fm),y(sn,Et,null),g(o,Jl,_),g(o,ko,_),e(ko,an),e(an,zi),y(ea,zi,null),e(ko,qm),e(ko,Vi),e(Vi,xm),g(o,Xl,_),g(o,rt,_),y(ta,rt,null),e(rt,zm),e(rt,Mi),e(Mi,Vm),e(rt,Mm),e(rt,oa),e(oa,jm),e(oa,na),e(na,Cm),e(oa,Am),e(rt,Pm),e(rt,sa),e(sa,Bm),e(sa,aa),e(aa,Rm),e(sa,Im),e(rt,Lm),e(rt,Ft),y(ra,Ft,null),e(Ft,Sm),e(Ft,vo),e(vo,Om),e(vo,ar),e(ar,Nm),e(vo,Wm),e(vo,ji),e(ji,Hm),e(vo,Um),e(Ft,Km),y(rn,Ft,null),e(Ft,Qm),y(ln,Ft,null),g(o,Yl,_),g(o,wo,_),e(wo,dn),e(dn,Ci),y(ia,Ci,null),e(wo,Gm),e(wo,Ai),e(Ai,Jm),g(o,Zl,_),g(o,it,_),y(la,it,null),e(it,Xm),e(it,da),e(da,Ym),e(da,ca),e(ca,Zm),e(da,ef),e(it,tf),e(it,pa),e(pa,of),e(pa,ha),e(ha,nf),e(pa,sf),e(it,af),y(cn,it,null),e(it,rf),e(it,qt),y(ma,qt,null),e(qt,lf),e(qt,To),e(To,df),e(To,rr),e(rr,cf),e(To,pf),e(To,Pi),e(Pi,hf),e(To,mf),e(qt,ff),y(pn,qt,null),e(qt,uf),y(hn,qt,null),g(o,ed,_),g(o,yo,_),e(yo,mn),e(mn,Bi),y(fa,Bi,null),e(yo,gf),e(yo,Ri),e(Ri,_f),g(o,td,_),g(o,At,_),y(ua,At,null),e(At,bf),e(At,Ii),e(Ii,kf),e(At,vf),e(At,xt),y(ga,xt,null),e(xt,wf),e(xt,Li),e(Li,Tf),e(xt,yf),e(xt,_a),e(_a,$f),e(_a,Si),e(Si,Df),e(_a,Ef),e(xt,Ff),e(xt,bt),e(bt,qf),e(bt,Oi),e(Oi,xf),e(bt,zf),e(bt,Ni),e(Ni,Vf),e(bt,Mf),e(bt,Wi),e(Wi,jf),e(bt,Cf),e(bt,Hi),e(Hi,Af),e(bt,Pf),g(o,od,_),g(o,$o,_),e($o,fn),e(fn,Ui),y(ba,Ui,null),e($o,Bf),e($o,Ki),e(Ki,Rf),g(o,nd,_),g(o,lt,_),y(ka,lt,null),e(lt,If),e(lt,Do),e(Do,Lf),e(Do,Qi),e(Qi,Sf),e(Do,Of),e(Do,va),e(va,Nf),e(Do,Wf),e(lt,Hf),e(lt,wa),e(wa,Uf),e(wa,Ta),e(Ta,Kf),e(wa,Qf),e(lt,Gf),y(un,lt,null),e(lt,Jf),e(lt,ct),y(ya,ct,null),e(ct,Xf),e(ct,Eo),e(Eo,Yf),e(Eo,ir),e(ir,Zf),e(Eo,eu),e(Eo,Gi),e(Gi,tu),e(Eo,ou),e(ct,nu),y(gn,ct,null),e(ct,su),y(_n,ct,null),e(ct,au),y(bn,ct,null),g(o,sd,_),g(o,Fo,_),e(Fo,kn),e(kn,Ji),y($a,Ji,null),e(Fo,ru),e(Fo,Xi),e(Xi,iu),g(o,ad,_),g(o,Ze,_),y(Da,Ze,null),e(Ze,lu),e(Ze,Yi),e(Yi,du),e(Ze,cu),e(Ze,Ea),e(Ea,pu),e(Ea,Fa),e(Fa,hu),e(Ea,mu),e(Ze,fu),e(Ze,qa),e(qa,uu),e(qa,xa),e(xa,gu),e(qa,_u),e(Ze,bu),y(vn,Ze,null),e(Ze,ku),e(Ze,pt),y(za,pt,null),e(pt,vu),e(pt,qo),e(qo,wu),e(qo,lr),e(lr,Tu),e(qo,yu),e(qo,Zi),e(Zi,$u),e(qo,Du),e(pt,Eu),y(wn,pt,null),e(pt,Fu),y(Tn,pt,null),e(pt,qu),y(yn,pt,null),g(o,rd,_),g(o,xo,_),e(xo,$n),e($n,el),y(Va,el,null),e(xo,xu),e(xo,tl),e(tl,zu),g(o,id,_),g(o,et,_),y(Ma,et,null),e(et,Vu),e(et,ol),e(ol,Mu),e(et,ju),e(et,ja),e(ja,Cu),e(ja,Ca),e(Ca,Au),e(ja,Pu),e(et,Bu),e(et,Aa),e(Aa,Ru),e(Aa,Pa),e(Pa,Iu),e(Aa,Lu),e(et,Su),y(Dn,et,null),e(et,Ou),e(et,ht),y(Ba,ht,null),e(ht,Nu),e(ht,zo),e(zo,Wu),e(zo,dr),e(dr,Hu),e(zo,Uu),e(zo,nl),e(nl,Ku),e(zo,Qu),e(ht,Gu),y(En,ht,null),e(ht,Ju),y(Fn,ht,null),e(ht,Xu),y(qn,ht,null),g(o,ld,_),g(o,Vo,_),e(Vo,xn),e(xn,sl),y(Ra,sl,null),e(Vo,Yu),e(Vo,al),e(al,Zu),g(o,dd,_),g(o,tt,_),y(Ia,tt,null),e(tt,eg),e(tt,Mo),e(Mo,tg),e(Mo,rl),e(rl,og),e(Mo,ng),e(Mo,il),e(il,sg),e(Mo,ag),e(tt,rg),e(tt,La),e(La,ig),e(La,Sa),e(Sa,lg),e(La,dg),e(tt,cg),e(tt,Oa),e(Oa,pg),e(Oa,Na),e(Na,hg),e(Oa,mg),e(tt,fg),y(zn,tt,null),e(tt,ug),e(tt,mt),y(Wa,mt,null),e(mt,gg),e(mt,jo),e(jo,_g),e(jo,cr),e(cr,bg),e(jo,kg),e(jo,ll),e(ll,vg),e(jo,wg),e(mt,Tg),y(Vn,mt,null),e(mt,yg),y(Mn,mt,null),e(mt,$g),y(jn,mt,null),cd=!0},p(o,[_]){const Ha={};_&2&&(Ha.$$scope={dirty:_,ctx:o}),Ao.$set(Ha);const dl={};_&2&&(dl.$$scope={dirty:_,ctx:o}),Ro.$set(dl);const cl={};_&2&&(cl.$$scope={dirty:_,ctx:o}),Lo.$set(cl);const pl={};_&2&&(pl.$$scope={dirty:_,ctx:o}),Oo.$set(pl);const Ua={};_&2&&(Ua.$$scope={dirty:_,ctx:o}),No.$set(Ua);const hl={};_&2&&(hl.$$scope={dirty:_,ctx:o}),Ho.$set(hl);const ml={};_&2&&(ml.$$scope={dirty:_,ctx:o}),Ko.$set(ml);const fl={};_&2&&(fl.$$scope={dirty:_,ctx:o}),Qo.$set(fl);const Ka={};_&2&&(Ka.$$scope={dirty:_,ctx:o}),Jo.$set(Ka);const ul={};_&2&&(ul.$$scope={dirty:_,ctx:o}),Xo.$set(ul);const gl={};_&2&&(gl.$$scope={dirty:_,ctx:o}),Yo.$set(gl);const _l={};_&2&&(_l.$$scope={dirty:_,ctx:o}),en.$set(_l);const bl={};_&2&&(bl.$$scope={dirty:_,ctx:o}),tn.$set(bl);const Qa={};_&2&&(Qa.$$scope={dirty:_,ctx:o}),nn.$set(Qa);const kl={};_&2&&(kl.$$scope={dirty:_,ctx:o}),sn.$set(kl);const Cn={};_&2&&(Cn.$$scope={dirty:_,ctx:o}),rn.$set(Cn);const vl={};_&2&&(vl.$$scope={dirty:_,ctx:o}),ln.$set(vl);const wl={};_&2&&(wl.$$scope={dirty:_,ctx:o}),cn.$set(wl);const Tl={};_&2&&(Tl.$$scope={dirty:_,ctx:o}),pn.$set(Tl);const kt={};_&2&&(kt.$$scope={dirty:_,ctx:o}),hn.$set(kt);const An={};_&2&&(An.$$scope={dirty:_,ctx:o}),un.$set(An);const yl={};_&2&&(yl.$$scope={dirty:_,ctx:o}),gn.$set(yl);const $l={};_&2&&($l.$$scope={dirty:_,ctx:o}),_n.$set($l);const pr={};_&2&&(pr.$$scope={dirty:_,ctx:o}),bn.$set(pr);const Dl={};_&2&&(Dl.$$scope={dirty:_,ctx:o}),vn.$set(Dl);const hr={};_&2&&(hr.$$scope={dirty:_,ctx:o}),wn.$set(hr);const El={};_&2&&(El.$$scope={dirty:_,ctx:o}),Tn.$set(El);const mr={};_&2&&(mr.$$scope={dirty:_,ctx:o}),yn.$set(mr);const Fl={};_&2&&(Fl.$$scope={dirty:_,ctx:o}),Dn.$set(Fl);const fr={};_&2&&(fr.$$scope={dirty:_,ctx:o}),En.$set(fr);const ql={};_&2&&(ql.$$scope={dirty:_,ctx:o}),Fn.$set(ql);const Pt={};_&2&&(Pt.$$scope={dirty:_,ctx:o}),qn.$set(Pt);const xl={};_&2&&(xl.$$scope={dirty:_,ctx:o}),zn.$set(xl);const zl={};_&2&&(zl.$$scope={dirty:_,ctx:o}),Vn.$set(zl);const Vl={};_&2&&(Vl.$$scope={dirty:_,ctx:o}),Mn.$set(Vl);const Ga={};_&2&&(Ga.$$scope={dirty:_,ctx:o}),jn.$set(Ga)},i(o){cd||($(l.$$.fragment,o),$(F.$$.fragment,o),$(Yn.$$.fragment,o),$(Zn.$$.fragment,o),$(Ao.$$.fragment,o),$(ts.$$.fragment,o),$(os.$$.fragment,o),$(as.$$.fragment,o),$(is.$$.fragment,o),$(ls.$$.fragment,o),$(Ro.$$.fragment,o),$(ds.$$.fragment,o),$(cs.$$.fragment,o),$(ps.$$.fragment,o),$(fs.$$.fragment,o),$(gs.$$.fragment,o),$(Lo.$$.fragment,o),$(_s.$$.fragment,o),$(bs.$$.fragment,o),$(ys.$$.fragment,o),$(Oo.$$.fragment,o),$(No.$$.fragment,o),$($s.$$.fragment,o),$(Ds.$$.fragment,o),$(Es.$$.fragment,o),$(Ho.$$.fragment,o),$(Fs.$$.fragment,o),$(qs.$$.fragment,o),$(Ms.$$.fragment,o),$(Ko.$$.fragment,o),$(Qo.$$.fragment,o),$(js.$$.fragment,o),$(Cs.$$.fragment,o),$(Is.$$.fragment,o),$(Jo.$$.fragment,o),$(Xo.$$.fragment,o),$(Yo.$$.fragment,o),$(Ls.$$.fragment,o),$(Ss.$$.fragment,o),$(Us.$$.fragment,o),$(en.$$.fragment,o),$(tn.$$.fragment,o),$(Ks.$$.fragment,o),$(Qs.$$.fragment,o),$(Zs.$$.fragment,o),$(nn.$$.fragment,o),$(sn.$$.fragment,o),$(ea.$$.fragment,o),$(ta.$$.fragment,o),$(ra.$$.fragment,o),$(rn.$$.fragment,o),$(ln.$$.fragment,o),$(ia.$$.fragment,o),$(la.$$.fragment,o),$(cn.$$.fragment,o),$(ma.$$.fragment,o),$(pn.$$.fragment,o),$(hn.$$.fragment,o),$(fa.$$.fragment,o),$(ua.$$.fragment,o),$(ga.$$.fragment,o),$(ba.$$.fragment,o),$(ka.$$.fragment,o),$(un.$$.fragment,o),$(ya.$$.fragment,o),$(gn.$$.fragment,o),$(_n.$$.fragment,o),$(bn.$$.fragment,o),$($a.$$.fragment,o),$(Da.$$.fragment,o),$(vn.$$.fragment,o),$(za.$$.fragment,o),$(wn.$$.fragment,o),$(Tn.$$.fragment,o),$(yn.$$.fragment,o),$(Va.$$.fragment,o),$(Ma.$$.fragment,o),$(Dn.$$.fragment,o),$(Ba.$$.fragment,o),$(En.$$.fragment,o),$(Fn.$$.fragment,o),$(qn.$$.fragment,o),$(Ra.$$.fragment,o),$(Ia.$$.fragment,o),$(zn.$$.fragment,o),$(Wa.$$.fragment,o),$(Vn.$$.fragment,o),$(Mn.$$.fragment,o),$(jn.$$.fragment,o),cd=!0)},o(o){D(l.$$.fragment,o),D(F.$$.fragment,o),D(Yn.$$.fragment,o),D(Zn.$$.fragment,o),D(Ao.$$.fragment,o),D(ts.$$.fragment,o),D(os.$$.fragment,o),D(as.$$.fragment,o),D(is.$$.fragment,o),D(ls.$$.fragment,o),D(Ro.$$.fragment,o),D(ds.$$.fragment,o),D(cs.$$.fragment,o),D(ps.$$.fragment,o),D(fs.$$.fragment,o),D(gs.$$.fragment,o),D(Lo.$$.fragment,o),D(_s.$$.fragment,o),D(bs.$$.fragment,o),D(ys.$$.fragment,o),D(Oo.$$.fragment,o),D(No.$$.fragment,o),D($s.$$.fragment,o),D(Ds.$$.fragment,o),D(Es.$$.fragment,o),D(Ho.$$.fragment,o),D(Fs.$$.fragment,o),D(qs.$$.fragment,o),D(Ms.$$.fragment,o),D(Ko.$$.fragment,o),D(Qo.$$.fragment,o),D(js.$$.fragment,o),D(Cs.$$.fragment,o),D(Is.$$.fragment,o),D(Jo.$$.fragment,o),D(Xo.$$.fragment,o),D(Yo.$$.fragment,o),D(Ls.$$.fragment,o),D(Ss.$$.fragment,o),D(Us.$$.fragment,o),D(en.$$.fragment,o),D(tn.$$.fragment,o),D(Ks.$$.fragment,o),D(Qs.$$.fragment,o),D(Zs.$$.fragment,o),D(nn.$$.fragment,o),D(sn.$$.fragment,o),D(ea.$$.fragment,o),D(ta.$$.fragment,o),D(ra.$$.fragment,o),D(rn.$$.fragment,o),D(ln.$$.fragment,o),D(ia.$$.fragment,o),D(la.$$.fragment,o),D(cn.$$.fragment,o),D(ma.$$.fragment,o),D(pn.$$.fragment,o),D(hn.$$.fragment,o),D(fa.$$.fragment,o),D(ua.$$.fragment,o),D(ga.$$.fragment,o),D(ba.$$.fragment,o),D(ka.$$.fragment,o),D(un.$$.fragment,o),D(ya.$$.fragment,o),D(gn.$$.fragment,o),D(_n.$$.fragment,o),D(bn.$$.fragment,o),D($a.$$.fragment,o),D(Da.$$.fragment,o),D(vn.$$.fragment,o),D(za.$$.fragment,o),D(wn.$$.fragment,o),D(Tn.$$.fragment,o),D(yn.$$.fragment,o),D(Va.$$.fragment,o),D(Ma.$$.fragment,o),D(Dn.$$.fragment,o),D(Ba.$$.fragment,o),D(En.$$.fragment,o),D(Fn.$$.fragment,o),D(qn.$$.fragment,o),D(Ra.$$.fragment,o),D(Ia.$$.fragment,o),D(zn.$$.fragment,o),D(Wa.$$.fragment,o),D(Vn.$$.fragment,o),D(Mn.$$.fragment,o),D(jn.$$.fragment,o),cd=!1},d(o){t(d),o&&t(k),o&&t(m),E(l),o&&t(pe),o&&t(R),E(F),o&&t(he),o&&t(L),o&&t(me),o&&t(N),o&&t(fe),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(Ml),o&&t(Xt),E(Yn),o&&t(jl),o&&t(ft),E(Zn),E(Ao),o&&t(Cl),o&&t(eo),E(ts),o&&t(Al),o&&t(Ye),E(os),E(as),E(is),E(ls),E(Ro),E(ds),o&&t(Pl),o&&t(no),E(cs),o&&t(Bl),o&&t(ut),E(ps),E(fs),E(gs),E(Lo),o&&t(Rl),o&&t(ao),E(_s),o&&t(Il),o&&t(gt),E(bs),E(ys),E(Oo),E(No),o&&t(Ll),o&&t(io),E($s),o&&t(Sl),o&&t(Ct),E(Ds),E(Es),E(Ho),o&&t(Ol),o&&t(lo),E(Fs),o&&t(Nl),o&&t(_t),E(qs),E(Ms),E(Ko),E(Qo),o&&t(Wl),o&&t(ho),E(js),o&&t(Hl),o&&t(nt),E(Cs),E(Is),E(Jo),E(Xo),E(Yo),o&&t(Ul),o&&t(fo),E(Ls),o&&t(Kl),o&&t(st),E(Ss),E(Us),E(en),E(tn),o&&t(Ql),o&&t(go),E(Ks),o&&t(Gl),o&&t(at),E(Qs),E(Zs),E(nn),E(sn),o&&t(Jl),o&&t(ko),E(ea),o&&t(Xl),o&&t(rt),E(ta),E(ra),E(rn),E(ln),o&&t(Yl),o&&t(wo),E(ia),o&&t(Zl),o&&t(it),E(la),E(cn),E(ma),E(pn),E(hn),o&&t(ed),o&&t(yo),E(fa),o&&t(td),o&&t(At),E(ua),E(ga),o&&t(od),o&&t($o),E(ba),o&&t(nd),o&&t(lt),E(ka),E(un),E(ya),E(gn),E(_n),E(bn),o&&t(sd),o&&t(Fo),E($a),o&&t(ad),o&&t(Ze),E(Da),E(vn),E(za),E(wn),E(Tn),E(yn),o&&t(rd),o&&t(xo),E(Va),o&&t(id),o&&t(et),E(Ma),E(Dn),E(Ba),E(En),E(Fn),E(qn),o&&t(ld),o&&t(Vo),E(Ra),o&&t(dd),o&&t(tt),E(Ia),E(zn),E(Wa),E(Vn),E(Mn),E(jn)}}}const Ik={local:"debertav2",sections:[{local:"overview",title:"Overview"},{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 Lk(x){return tk(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Kk extends Xb{constructor(d){super();Yb(this,d,Lk,Rk,Zb,{})}}export{Kk as default,Ik as metadata};
