import{S as Jf,i as Zf,s as em,e as s,k as l,w as T,t as n,M as tm,c as a,d as t,m as c,a as i,x as k,h as r,b as p,N as Xf,G as e,g as f,y as P,q as $,o as E,B as R,v as om,L as Ko}from"../../chunks/vendor-hf-doc-builder.js";import{T as Xt}from"../../chunks/Tip-hf-doc-builder.js";import{D as G}from"../../chunks/Docstring-hf-doc-builder.js";import{C as Uo}from"../../chunks/CodeBlock-hf-doc-builder.js";import{I as ze}from"../../chunks/IconCopyLink-hf-doc-builder.js";import{E as Ho}from"../../chunks/ExampleCodeBlock-hf-doc-builder.js";function nm(C){let h,w,_,g,b;return g=new Uo({props:{code:`from transformers import DPRConfig, DPRContextEncoder

# Initializing a DPR facebook/dpr-ctx_encoder-single-nq-base style configuration
configuration = DPRConfig()

# Initializing a model (with random weights) from the facebook/dpr-ctx_encoder-single-nq-base style configuration
model = DPRContextEncoder(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> DPRConfig, DPRContextEncoder

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a DPR facebook/dpr-ctx_encoder-single-nq-base style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = DPRConfig()

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a model (with random weights) from the facebook/dpr-ctx_encoder-single-nq-base style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = DPRContextEncoder(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(){h=s("p"),w=n("Example:"),_=l(),T(g.$$.fragment)},l(d){h=a(d,"P",{});var u=i(h);w=r(u,"Example:"),u.forEach(t),_=c(d),k(g.$$.fragment,d)},m(d,u){f(d,h,u),e(h,w),f(d,_,u),P(g,d,u),b=!0},p:Ko,i(d){b||($(g.$$.fragment,d),b=!0)},o(d){E(g.$$.fragment,d),b=!1},d(d){d&&t(h),d&&t(_),R(g,d)}}}function rm(C){let h,w,_,g,b;return g=new Uo({props:{code:"[CLS] <question token ids> [SEP] <titles ids> [SEP] <texts ids>",highlighted:'[CLS] <span class="hljs-tag">&lt;<span class="hljs-name">question</span> <span class="hljs-attr">token</span> <span class="hljs-attr">ids</span>&gt;</span> [SEP] <span class="hljs-tag">&lt;<span class="hljs-name">titles</span> <span class="hljs-attr">ids</span>&gt;</span> [SEP] <span class="hljs-tag">&lt;<span class="hljs-name">texts</span> <span class="hljs-attr">ids</span>&gt;</span>'}}),{c(){h=s("p"),w=n("with the format:"),_=l(),T(g.$$.fragment)},l(d){h=a(d,"P",{});var u=i(h);w=r(u,"with the format:"),u.forEach(t),_=c(d),k(g.$$.fragment,d)},m(d,u){f(d,h,u),e(h,w),f(d,_,u),P(g,d,u),b=!0},p:Ko,i(d){b||($(g.$$.fragment,d),b=!0)},o(d){E(g.$$.fragment,d),b=!1},d(d){d&&t(h),d&&t(_),R(g,d)}}}function sm(C){let h,w,_,g,b;return{c(){h=s("p"),w=n("Although the recipe for forward pass needs to be defined within this function, one should call the "),_=s("code"),g=n("Module"),b=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(d){h=a(d,"P",{});var u=i(h);w=r(u,"Although the recipe for forward pass needs to be defined within this function, one should call the "),_=a(u,"CODE",{});var z=i(_);g=r(z,"Module"),z.forEach(t),b=r(u,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),u.forEach(t)},m(d,u){f(d,h,u),e(h,w),e(h,_),e(_,g),e(h,b)},d(d){d&&t(h)}}}function am(C){let h,w,_,g,b;return g=new Uo({props:{code:`from transformers import DPRContextEncoder, DPRContextEncoderTokenizer

tokenizer = DPRContextEncoderTokenizer.from_pretrained("facebook/dpr-ctx_encoder-single-nq-base")
model = DPRContextEncoder.from_pretrained("facebook/dpr-ctx_encoder-single-nq-base")
input_ids = tokenizer("Hello, is my dog cute ?", return_tensors="pt")["input_ids"]
embeddings = model(input_ids).pooler_output`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> DPRContextEncoder, DPRContextEncoderTokenizer

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = DPRContextEncoderTokenizer.from_pretrained(<span class="hljs-string">&quot;facebook/dpr-ctx_encoder-single-nq-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = DPRContextEncoder.from_pretrained(<span class="hljs-string">&quot;facebook/dpr-ctx_encoder-single-nq-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>input_ids = tokenizer(<span class="hljs-string">&quot;Hello, is my dog cute ?&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>embeddings = model(input_ids).pooler_output`}}),{c(){h=s("p"),w=n("Examples:"),_=l(),T(g.$$.fragment)},l(d){h=a(d,"P",{});var u=i(h);w=r(u,"Examples:"),u.forEach(t),_=c(d),k(g.$$.fragment,d)},m(d,u){f(d,h,u),e(h,w),f(d,_,u),P(g,d,u),b=!0},p:Ko,i(d){b||($(g.$$.fragment,d),b=!0)},o(d){E(g.$$.fragment,d),b=!1},d(d){d&&t(h),d&&t(_),R(g,d)}}}function im(C){let h,w,_,g,b;return{c(){h=s("p"),w=n("Although the recipe for forward pass needs to be defined within this function, one should call the "),_=s("code"),g=n("Module"),b=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(d){h=a(d,"P",{});var u=i(h);w=r(u,"Although the recipe for forward pass needs to be defined within this function, one should call the "),_=a(u,"CODE",{});var z=i(_);g=r(z,"Module"),z.forEach(t),b=r(u,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),u.forEach(t)},m(d,u){f(d,h,u),e(h,w),e(h,_),e(_,g),e(h,b)},d(d){d&&t(h)}}}function dm(C){let h,w,_,g,b;return g=new Uo({props:{code:`from transformers import DPRQuestionEncoder, DPRQuestionEncoderTokenizer

tokenizer = DPRQuestionEncoderTokenizer.from_pretrained("facebook/dpr-question_encoder-single-nq-base")
model = DPRQuestionEncoder.from_pretrained("facebook/dpr-question_encoder-single-nq-base")
input_ids = tokenizer("Hello, is my dog cute ?", return_tensors="pt")["input_ids"]
embeddings = model(input_ids).pooler_output`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> DPRQuestionEncoder, DPRQuestionEncoderTokenizer

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = DPRQuestionEncoderTokenizer.from_pretrained(<span class="hljs-string">&quot;facebook/dpr-question_encoder-single-nq-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = DPRQuestionEncoder.from_pretrained(<span class="hljs-string">&quot;facebook/dpr-question_encoder-single-nq-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>input_ids = tokenizer(<span class="hljs-string">&quot;Hello, is my dog cute ?&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>embeddings = model(input_ids).pooler_output`}}),{c(){h=s("p"),w=n("Examples:"),_=l(),T(g.$$.fragment)},l(d){h=a(d,"P",{});var u=i(h);w=r(u,"Examples:"),u.forEach(t),_=c(d),k(g.$$.fragment,d)},m(d,u){f(d,h,u),e(h,w),f(d,_,u),P(g,d,u),b=!0},p:Ko,i(d){b||($(g.$$.fragment,d),b=!0)},o(d){E(g.$$.fragment,d),b=!1},d(d){d&&t(h),d&&t(_),R(g,d)}}}function lm(C){let h,w,_,g,b;return{c(){h=s("p"),w=n("Although the recipe for forward pass needs to be defined within this function, one should call the "),_=s("code"),g=n("Module"),b=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(d){h=a(d,"P",{});var u=i(h);w=r(u,"Although the recipe for forward pass needs to be defined within this function, one should call the "),_=a(u,"CODE",{});var z=i(_);g=r(z,"Module"),z.forEach(t),b=r(u,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),u.forEach(t)},m(d,u){f(d,h,u),e(h,w),e(h,_),e(_,g),e(h,b)},d(d){d&&t(h)}}}function cm(C){let h,w,_,g,b;return g=new Uo({props:{code:`from transformers import DPRReader, DPRReaderTokenizer

tokenizer = DPRReaderTokenizer.from_pretrained("facebook/dpr-reader-single-nq-base")
model = DPRReader.from_pretrained("facebook/dpr-reader-single-nq-base")
encoded_inputs = tokenizer(
    questions=["What is love ?"],
    titles=["Haddaway"],
    texts=["'What Is Love' is a song recorded by the artist Haddaway"],
    return_tensors="pt",
)
outputs = model(**encoded_inputs)
start_logits = outputs.start_logits
end_logits = outputs.end_logits
relevance_logits = outputs.relevance_logits`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> DPRReader, DPRReaderTokenizer

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = DPRReaderTokenizer.from_pretrained(<span class="hljs-string">&quot;facebook/dpr-reader-single-nq-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = DPRReader.from_pretrained(<span class="hljs-string">&quot;facebook/dpr-reader-single-nq-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>encoded_inputs = tokenizer(
<span class="hljs-meta">... </span>    questions=[<span class="hljs-string">&quot;What is love ?&quot;</span>],
<span class="hljs-meta">... </span>    titles=[<span class="hljs-string">&quot;Haddaway&quot;</span>],
<span class="hljs-meta">... </span>    texts=[<span class="hljs-string">&quot;&#x27;What Is Love&#x27; is a song recorded by the artist Haddaway&quot;</span>],
<span class="hljs-meta">... </span>    return_tensors=<span class="hljs-string">&quot;pt&quot;</span>,
<span class="hljs-meta">... </span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**encoded_inputs)
<span class="hljs-meta">&gt;&gt;&gt; </span>start_logits = outputs.start_logits
<span class="hljs-meta">&gt;&gt;&gt; </span>end_logits = outputs.end_logits
<span class="hljs-meta">&gt;&gt;&gt; </span>relevance_logits = outputs.relevance_logits`}}),{c(){h=s("p"),w=n("Examples:"),_=l(),T(g.$$.fragment)},l(d){h=a(d,"P",{});var u=i(h);w=r(u,"Examples:"),u.forEach(t),_=c(d),k(g.$$.fragment,d)},m(d,u){f(d,h,u),e(h,w),f(d,_,u),P(g,d,u),b=!0},p:Ko,i(d){b||($(g.$$.fragment,d),b=!0)},o(d){E(g.$$.fragment,d),b=!1},d(d){d&&t(h),d&&t(_),R(g,d)}}}function pm(C){let h,w,_,g,b,d,u,z,qe,$e,N,le,X,y,Ce,B,ce,We,V,J,se,K,ie,Fe,U,Ae,Ee,L,je,de,pe,F,j,he,Z,Re,ue,W,Oe,ye,q,Ne,Q,Ie,Le,M,Qe,Me,S,fe,ee,De,te,A,ge,I,Se,oe;return{c(){h=s("p"),w=n("TensorFlow models and layers in "),_=s("code"),g=n("transformers"),b=n(" accept two formats as input:"),d=l(),u=s("ul"),z=s("li"),qe=n("having all inputs as keyword arguments (like PyTorch models), or"),$e=l(),N=s("li"),le=n("having all inputs as a list, tuple or dict in the first positional argument."),X=l(),y=s("p"),Ce=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 `),B=s("code"),ce=n("model.fit()"),We=n(` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),V=s("code"),J=n("model.fit()"),se=n(` supports! If, however, you want to use the second
format outside of Keras methods like `),K=s("code"),ie=n("fit()"),Fe=n(" and "),U=s("code"),Ae=n("predict()"),Ee=n(`, such as when creating your own layers or models with
the Keras `),L=s("code"),je=n("Functional"),de=n(` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),pe=l(),F=s("ul"),j=s("li"),he=n("a single Tensor with "),Z=s("code"),Re=n("input_ids"),ue=n(" only and nothing else: "),W=s("code"),Oe=n("model(input_ids)"),ye=l(),q=s("li"),Ne=n(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),Q=s("code"),Ie=n("model([input_ids, attention_mask])"),Le=n(" or "),M=s("code"),Qe=n("model([input_ids, attention_mask, token_type_ids])"),Me=l(),S=s("li"),fe=n(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),ee=s("code"),De=n('model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),te=l(),A=s("p"),ge=n(`Note that when creating models and layers with
`),I=s("a"),Se=n("subclassing"),oe=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(v){h=a(v,"P",{});var D=i(h);w=r(D,"TensorFlow models and layers in "),_=a(D,"CODE",{});var ot=i(_);g=r(ot,"transformers"),ot.forEach(t),b=r(D," accept two formats as input:"),D.forEach(t),d=c(v),u=a(v,"UL",{});var ae=i(u);z=a(ae,"LI",{});var nt=i(z);qe=r(nt,"having all inputs as keyword arguments (like PyTorch models), or"),nt.forEach(t),$e=c(ae),N=a(ae,"LI",{});var rt=i(N);le=r(rt,"having all inputs as a list, tuple or dict in the first positional argument."),rt.forEach(t),ae.forEach(t),X=c(v),y=a(v,"P",{});var x=i(y);Ce=r(x,`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 `),B=a(x,"CODE",{});var st=i(B);ce=r(st,"model.fit()"),st.forEach(t),We=r(x,` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),V=a(x,"CODE",{});var Ge=i(V);J=r(Ge,"model.fit()"),Ge.forEach(t),se=r(x,` supports! If, however, you want to use the second
format outside of Keras methods like `),K=a(x,"CODE",{});var me=i(K);ie=r(me,"fit()"),me.forEach(t),Fe=r(x," and "),U=a(x,"CODE",{});var _e=i(U);Ae=r(_e,"predict()"),_e.forEach(t),Ee=r(x,`, such as when creating your own layers or models with
the Keras `),L=a(x,"CODE",{});var Ve=i(L);je=r(Ve,"Functional"),Ve.forEach(t),de=r(x,` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),x.forEach(t),pe=c(v),F=a(v,"UL",{});var O=i(F);j=a(O,"LI",{});var ne=i(j);he=r(ne,"a single Tensor with "),Z=a(ne,"CODE",{});var Ye=i(Z);Re=r(Ye,"input_ids"),Ye.forEach(t),ue=r(ne," only and nothing else: "),W=a(ne,"CODE",{});var at=i(W);Oe=r(at,"model(input_ids)"),at.forEach(t),ne.forEach(t),ye=c(O),q=a(O,"LI",{});var Y=i(q);Ne=r(Y,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),Q=a(Y,"CODE",{});var H=i(Q);Ie=r(H,"model([input_ids, attention_mask])"),H.forEach(t),Le=r(Y," or "),M=a(Y,"CODE",{});var xe=i(M);Qe=r(xe,"model([input_ids, attention_mask, token_type_ids])"),xe.forEach(t),Y.forEach(t),Me=c(O),S=a(O,"LI",{});var Be=i(S);fe=r(Be,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),ee=a(Be,"CODE",{});var ve=i(ee);De=r(ve,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),ve.forEach(t),Be.forEach(t),O.forEach(t),te=c(v),A=a(v,"P",{});var re=i(A);ge=r(re,`Note that when creating models and layers with
`),I=a(re,"A",{href:!0,rel:!0});var it=i(I);Se=r(it,"subclassing"),it.forEach(t),oe=r(re,` 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!`),re.forEach(t),this.h()},h(){p(I,"href","https://keras.io/guides/making_new_layers_and_models_via_subclassing/"),p(I,"rel","nofollow")},m(v,D){f(v,h,D),e(h,w),e(h,_),e(_,g),e(h,b),f(v,d,D),f(v,u,D),e(u,z),e(z,qe),e(u,$e),e(u,N),e(N,le),f(v,X,D),f(v,y,D),e(y,Ce),e(y,B),e(B,ce),e(y,We),e(y,V),e(V,J),e(y,se),e(y,K),e(K,ie),e(y,Fe),e(y,U),e(U,Ae),e(y,Ee),e(y,L),e(L,je),e(y,de),f(v,pe,D),f(v,F,D),e(F,j),e(j,he),e(j,Z),e(Z,Re),e(j,ue),e(j,W),e(W,Oe),e(F,ye),e(F,q),e(q,Ne),e(q,Q),e(Q,Ie),e(q,Le),e(q,M),e(M,Qe),e(F,Me),e(F,S),e(S,fe),e(S,ee),e(ee,De),f(v,te,D),f(v,A,D),e(A,ge),e(A,I),e(I,Se),e(A,oe)},d(v){v&&t(h),v&&t(d),v&&t(u),v&&t(X),v&&t(y),v&&t(pe),v&&t(F),v&&t(te),v&&t(A)}}}function hm(C){let h,w,_,g,b;return{c(){h=s("p"),w=n("Although the recipe for forward pass needs to be defined within this function, one should call the "),_=s("code"),g=n("Module"),b=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(d){h=a(d,"P",{});var u=i(h);w=r(u,"Although the recipe for forward pass needs to be defined within this function, one should call the "),_=a(u,"CODE",{});var z=i(_);g=r(z,"Module"),z.forEach(t),b=r(u,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),u.forEach(t)},m(d,u){f(d,h,u),e(h,w),e(h,_),e(_,g),e(h,b)},d(d){d&&t(h)}}}function um(C){let h,w,_,g,b;return g=new Uo({props:{code:`from transformers import TFDPRContextEncoder, DPRContextEncoderTokenizer

tokenizer = DPRContextEncoderTokenizer.from_pretrained("facebook/dpr-ctx_encoder-single-nq-base")
model = TFDPRContextEncoder.from_pretrained("facebook/dpr-ctx_encoder-single-nq-base", from_pt=True)
input_ids = tokenizer("Hello, is my dog cute ?", return_tensors="tf")["input_ids"]
embeddings = model(input_ids).pooler_output`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> TFDPRContextEncoder, DPRContextEncoderTokenizer

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = DPRContextEncoderTokenizer.from_pretrained(<span class="hljs-string">&quot;facebook/dpr-ctx_encoder-single-nq-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFDPRContextEncoder.from_pretrained(<span class="hljs-string">&quot;facebook/dpr-ctx_encoder-single-nq-base&quot;</span>, from_pt=<span class="hljs-literal">True</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>input_ids = tokenizer(<span class="hljs-string">&quot;Hello, is my dog cute ?&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>embeddings = model(input_ids).pooler_output`}}),{c(){h=s("p"),w=n("Examples:"),_=l(),T(g.$$.fragment)},l(d){h=a(d,"P",{});var u=i(h);w=r(u,"Examples:"),u.forEach(t),_=c(d),k(g.$$.fragment,d)},m(d,u){f(d,h,u),e(h,w),f(d,_,u),P(g,d,u),b=!0},p:Ko,i(d){b||($(g.$$.fragment,d),b=!0)},o(d){E(g.$$.fragment,d),b=!1},d(d){d&&t(h),d&&t(_),R(g,d)}}}function fm(C){let h,w,_,g,b,d,u,z,qe,$e,N,le,X,y,Ce,B,ce,We,V,J,se,K,ie,Fe,U,Ae,Ee,L,je,de,pe,F,j,he,Z,Re,ue,W,Oe,ye,q,Ne,Q,Ie,Le,M,Qe,Me,S,fe,ee,De,te,A,ge,I,Se,oe;return{c(){h=s("p"),w=n("TensorFlow models and layers in "),_=s("code"),g=n("transformers"),b=n(" accept two formats as input:"),d=l(),u=s("ul"),z=s("li"),qe=n("having all inputs as keyword arguments (like PyTorch models), or"),$e=l(),N=s("li"),le=n("having all inputs as a list, tuple or dict in the first positional argument."),X=l(),y=s("p"),Ce=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 `),B=s("code"),ce=n("model.fit()"),We=n(` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),V=s("code"),J=n("model.fit()"),se=n(` supports! If, however, you want to use the second
format outside of Keras methods like `),K=s("code"),ie=n("fit()"),Fe=n(" and "),U=s("code"),Ae=n("predict()"),Ee=n(`, such as when creating your own layers or models with
the Keras `),L=s("code"),je=n("Functional"),de=n(` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),pe=l(),F=s("ul"),j=s("li"),he=n("a single Tensor with "),Z=s("code"),Re=n("input_ids"),ue=n(" only and nothing else: "),W=s("code"),Oe=n("model(input_ids)"),ye=l(),q=s("li"),Ne=n(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),Q=s("code"),Ie=n("model([input_ids, attention_mask])"),Le=n(" or "),M=s("code"),Qe=n("model([input_ids, attention_mask, token_type_ids])"),Me=l(),S=s("li"),fe=n(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),ee=s("code"),De=n('model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),te=l(),A=s("p"),ge=n(`Note that when creating models and layers with
`),I=s("a"),Se=n("subclassing"),oe=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(v){h=a(v,"P",{});var D=i(h);w=r(D,"TensorFlow models and layers in "),_=a(D,"CODE",{});var ot=i(_);g=r(ot,"transformers"),ot.forEach(t),b=r(D," accept two formats as input:"),D.forEach(t),d=c(v),u=a(v,"UL",{});var ae=i(u);z=a(ae,"LI",{});var nt=i(z);qe=r(nt,"having all inputs as keyword arguments (like PyTorch models), or"),nt.forEach(t),$e=c(ae),N=a(ae,"LI",{});var rt=i(N);le=r(rt,"having all inputs as a list, tuple or dict in the first positional argument."),rt.forEach(t),ae.forEach(t),X=c(v),y=a(v,"P",{});var x=i(y);Ce=r(x,`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 `),B=a(x,"CODE",{});var st=i(B);ce=r(st,"model.fit()"),st.forEach(t),We=r(x,` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),V=a(x,"CODE",{});var Ge=i(V);J=r(Ge,"model.fit()"),Ge.forEach(t),se=r(x,` supports! If, however, you want to use the second
format outside of Keras methods like `),K=a(x,"CODE",{});var me=i(K);ie=r(me,"fit()"),me.forEach(t),Fe=r(x," and "),U=a(x,"CODE",{});var _e=i(U);Ae=r(_e,"predict()"),_e.forEach(t),Ee=r(x,`, such as when creating your own layers or models with
the Keras `),L=a(x,"CODE",{});var Ve=i(L);je=r(Ve,"Functional"),Ve.forEach(t),de=r(x,` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),x.forEach(t),pe=c(v),F=a(v,"UL",{});var O=i(F);j=a(O,"LI",{});var ne=i(j);he=r(ne,"a single Tensor with "),Z=a(ne,"CODE",{});var Ye=i(Z);Re=r(Ye,"input_ids"),Ye.forEach(t),ue=r(ne," only and nothing else: "),W=a(ne,"CODE",{});var at=i(W);Oe=r(at,"model(input_ids)"),at.forEach(t),ne.forEach(t),ye=c(O),q=a(O,"LI",{});var Y=i(q);Ne=r(Y,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),Q=a(Y,"CODE",{});var H=i(Q);Ie=r(H,"model([input_ids, attention_mask])"),H.forEach(t),Le=r(Y," or "),M=a(Y,"CODE",{});var xe=i(M);Qe=r(xe,"model([input_ids, attention_mask, token_type_ids])"),xe.forEach(t),Y.forEach(t),Me=c(O),S=a(O,"LI",{});var Be=i(S);fe=r(Be,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),ee=a(Be,"CODE",{});var ve=i(ee);De=r(ve,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),ve.forEach(t),Be.forEach(t),O.forEach(t),te=c(v),A=a(v,"P",{});var re=i(A);ge=r(re,`Note that when creating models and layers with
`),I=a(re,"A",{href:!0,rel:!0});var it=i(I);Se=r(it,"subclassing"),it.forEach(t),oe=r(re,` 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!`),re.forEach(t),this.h()},h(){p(I,"href","https://keras.io/guides/making_new_layers_and_models_via_subclassing/"),p(I,"rel","nofollow")},m(v,D){f(v,h,D),e(h,w),e(h,_),e(_,g),e(h,b),f(v,d,D),f(v,u,D),e(u,z),e(z,qe),e(u,$e),e(u,N),e(N,le),f(v,X,D),f(v,y,D),e(y,Ce),e(y,B),e(B,ce),e(y,We),e(y,V),e(V,J),e(y,se),e(y,K),e(K,ie),e(y,Fe),e(y,U),e(U,Ae),e(y,Ee),e(y,L),e(L,je),e(y,de),f(v,pe,D),f(v,F,D),e(F,j),e(j,he),e(j,Z),e(Z,Re),e(j,ue),e(j,W),e(W,Oe),e(F,ye),e(F,q),e(q,Ne),e(q,Q),e(Q,Ie),e(q,Le),e(q,M),e(M,Qe),e(F,Me),e(F,S),e(S,fe),e(S,ee),e(ee,De),f(v,te,D),f(v,A,D),e(A,ge),e(A,I),e(I,Se),e(A,oe)},d(v){v&&t(h),v&&t(d),v&&t(u),v&&t(X),v&&t(y),v&&t(pe),v&&t(F),v&&t(te),v&&t(A)}}}function mm(C){let h,w,_,g,b;return{c(){h=s("p"),w=n("Although the recipe for forward pass needs to be defined within this function, one should call the "),_=s("code"),g=n("Module"),b=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(d){h=a(d,"P",{});var u=i(h);w=r(u,"Although the recipe for forward pass needs to be defined within this function, one should call the "),_=a(u,"CODE",{});var z=i(_);g=r(z,"Module"),z.forEach(t),b=r(u,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),u.forEach(t)},m(d,u){f(d,h,u),e(h,w),e(h,_),e(_,g),e(h,b)},d(d){d&&t(h)}}}function gm(C){let h,w,_,g,b;return g=new Uo({props:{code:`from transformers import TFDPRQuestionEncoder, DPRQuestionEncoderTokenizer

tokenizer = DPRQuestionEncoderTokenizer.from_pretrained("facebook/dpr-question_encoder-single-nq-base")
model = TFDPRQuestionEncoder.from_pretrained("facebook/dpr-question_encoder-single-nq-base", from_pt=True)
input_ids = tokenizer("Hello, is my dog cute ?", return_tensors="tf")["input_ids"]
embeddings = model(input_ids).pooler_output`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> TFDPRQuestionEncoder, DPRQuestionEncoderTokenizer

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = DPRQuestionEncoderTokenizer.from_pretrained(<span class="hljs-string">&quot;facebook/dpr-question_encoder-single-nq-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFDPRQuestionEncoder.from_pretrained(<span class="hljs-string">&quot;facebook/dpr-question_encoder-single-nq-base&quot;</span>, from_pt=<span class="hljs-literal">True</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>input_ids = tokenizer(<span class="hljs-string">&quot;Hello, is my dog cute ?&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>embeddings = model(input_ids).pooler_output`}}),{c(){h=s("p"),w=n("Examples:"),_=l(),T(g.$$.fragment)},l(d){h=a(d,"P",{});var u=i(h);w=r(u,"Examples:"),u.forEach(t),_=c(d),k(g.$$.fragment,d)},m(d,u){f(d,h,u),e(h,w),f(d,_,u),P(g,d,u),b=!0},p:Ko,i(d){b||($(g.$$.fragment,d),b=!0)},o(d){E(g.$$.fragment,d),b=!1},d(d){d&&t(h),d&&t(_),R(g,d)}}}function _m(C){let h,w,_,g,b,d,u,z,qe,$e,N,le,X,y,Ce,B,ce,We,V,J,se,K,ie,Fe,U,Ae,Ee,L,je,de,pe,F,j,he,Z,Re,ue,W,Oe,ye,q,Ne,Q,Ie,Le,M,Qe,Me,S,fe,ee,De,te,A,ge,I,Se,oe;return{c(){h=s("p"),w=n("TensorFlow models and layers in "),_=s("code"),g=n("transformers"),b=n(" accept two formats as input:"),d=l(),u=s("ul"),z=s("li"),qe=n("having all inputs as keyword arguments (like PyTorch models), or"),$e=l(),N=s("li"),le=n("having all inputs as a list, tuple or dict in the first positional argument."),X=l(),y=s("p"),Ce=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 `),B=s("code"),ce=n("model.fit()"),We=n(` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),V=s("code"),J=n("model.fit()"),se=n(` supports! If, however, you want to use the second
format outside of Keras methods like `),K=s("code"),ie=n("fit()"),Fe=n(" and "),U=s("code"),Ae=n("predict()"),Ee=n(`, such as when creating your own layers or models with
the Keras `),L=s("code"),je=n("Functional"),de=n(` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),pe=l(),F=s("ul"),j=s("li"),he=n("a single Tensor with "),Z=s("code"),Re=n("input_ids"),ue=n(" only and nothing else: "),W=s("code"),Oe=n("model(input_ids)"),ye=l(),q=s("li"),Ne=n(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),Q=s("code"),Ie=n("model([input_ids, attention_mask])"),Le=n(" or "),M=s("code"),Qe=n("model([input_ids, attention_mask, token_type_ids])"),Me=l(),S=s("li"),fe=n(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),ee=s("code"),De=n('model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),te=l(),A=s("p"),ge=n(`Note that when creating models and layers with
`),I=s("a"),Se=n("subclassing"),oe=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(v){h=a(v,"P",{});var D=i(h);w=r(D,"TensorFlow models and layers in "),_=a(D,"CODE",{});var ot=i(_);g=r(ot,"transformers"),ot.forEach(t),b=r(D," accept two formats as input:"),D.forEach(t),d=c(v),u=a(v,"UL",{});var ae=i(u);z=a(ae,"LI",{});var nt=i(z);qe=r(nt,"having all inputs as keyword arguments (like PyTorch models), or"),nt.forEach(t),$e=c(ae),N=a(ae,"LI",{});var rt=i(N);le=r(rt,"having all inputs as a list, tuple or dict in the first positional argument."),rt.forEach(t),ae.forEach(t),X=c(v),y=a(v,"P",{});var x=i(y);Ce=r(x,`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 `),B=a(x,"CODE",{});var st=i(B);ce=r(st,"model.fit()"),st.forEach(t),We=r(x,` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),V=a(x,"CODE",{});var Ge=i(V);J=r(Ge,"model.fit()"),Ge.forEach(t),se=r(x,` supports! If, however, you want to use the second
format outside of Keras methods like `),K=a(x,"CODE",{});var me=i(K);ie=r(me,"fit()"),me.forEach(t),Fe=r(x," and "),U=a(x,"CODE",{});var _e=i(U);Ae=r(_e,"predict()"),_e.forEach(t),Ee=r(x,`, such as when creating your own layers or models with
the Keras `),L=a(x,"CODE",{});var Ve=i(L);je=r(Ve,"Functional"),Ve.forEach(t),de=r(x,` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),x.forEach(t),pe=c(v),F=a(v,"UL",{});var O=i(F);j=a(O,"LI",{});var ne=i(j);he=r(ne,"a single Tensor with "),Z=a(ne,"CODE",{});var Ye=i(Z);Re=r(Ye,"input_ids"),Ye.forEach(t),ue=r(ne," only and nothing else: "),W=a(ne,"CODE",{});var at=i(W);Oe=r(at,"model(input_ids)"),at.forEach(t),ne.forEach(t),ye=c(O),q=a(O,"LI",{});var Y=i(q);Ne=r(Y,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),Q=a(Y,"CODE",{});var H=i(Q);Ie=r(H,"model([input_ids, attention_mask])"),H.forEach(t),Le=r(Y," or "),M=a(Y,"CODE",{});var xe=i(M);Qe=r(xe,"model([input_ids, attention_mask, token_type_ids])"),xe.forEach(t),Y.forEach(t),Me=c(O),S=a(O,"LI",{});var Be=i(S);fe=r(Be,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),ee=a(Be,"CODE",{});var ve=i(ee);De=r(ve,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),ve.forEach(t),Be.forEach(t),O.forEach(t),te=c(v),A=a(v,"P",{});var re=i(A);ge=r(re,`Note that when creating models and layers with
`),I=a(re,"A",{href:!0,rel:!0});var it=i(I);Se=r(it,"subclassing"),it.forEach(t),oe=r(re,` 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!`),re.forEach(t),this.h()},h(){p(I,"href","https://keras.io/guides/making_new_layers_and_models_via_subclassing/"),p(I,"rel","nofollow")},m(v,D){f(v,h,D),e(h,w),e(h,_),e(_,g),e(h,b),f(v,d,D),f(v,u,D),e(u,z),e(z,qe),e(u,$e),e(u,N),e(N,le),f(v,X,D),f(v,y,D),e(y,Ce),e(y,B),e(B,ce),e(y,We),e(y,V),e(V,J),e(y,se),e(y,K),e(K,ie),e(y,Fe),e(y,U),e(U,Ae),e(y,Ee),e(y,L),e(L,je),e(y,de),f(v,pe,D),f(v,F,D),e(F,j),e(j,he),e(j,Z),e(Z,Re),e(j,ue),e(j,W),e(W,Oe),e(F,ye),e(F,q),e(q,Ne),e(q,Q),e(Q,Ie),e(q,Le),e(q,M),e(M,Qe),e(F,Me),e(F,S),e(S,fe),e(S,ee),e(ee,De),f(v,te,D),f(v,A,D),e(A,ge),e(A,I),e(I,Se),e(A,oe)},d(v){v&&t(h),v&&t(d),v&&t(u),v&&t(X),v&&t(y),v&&t(pe),v&&t(F),v&&t(te),v&&t(A)}}}function vm(C){let h,w,_,g,b;return{c(){h=s("p"),w=n("Although the recipe for forward pass needs to be defined within this function, one should call the "),_=s("code"),g=n("Module"),b=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(d){h=a(d,"P",{});var u=i(h);w=r(u,"Although the recipe for forward pass needs to be defined within this function, one should call the "),_=a(u,"CODE",{});var z=i(_);g=r(z,"Module"),z.forEach(t),b=r(u,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),u.forEach(t)},m(d,u){f(d,h,u),e(h,w),e(h,_),e(_,g),e(h,b)},d(d){d&&t(h)}}}function bm(C){let h,w,_,g,b;return g=new Uo({props:{code:`from transformers import TFDPRReader, DPRReaderTokenizer

tokenizer = DPRReaderTokenizer.from_pretrained("facebook/dpr-reader-single-nq-base")
model = TFDPRReader.from_pretrained("facebook/dpr-reader-single-nq-base", from_pt=True)
encoded_inputs = tokenizer(
    questions=["What is love ?"],
    titles=["Haddaway"],
    texts=["'What Is Love' is a song recorded by the artist Haddaway"],
    return_tensors="tf",
)
outputs = model(encoded_inputs)
start_logits = outputs.start_logits
end_logits = outputs.end_logits
relevance_logits = outputs.relevance_logits`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> TFDPRReader, DPRReaderTokenizer

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = DPRReaderTokenizer.from_pretrained(<span class="hljs-string">&quot;facebook/dpr-reader-single-nq-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFDPRReader.from_pretrained(<span class="hljs-string">&quot;facebook/dpr-reader-single-nq-base&quot;</span>, from_pt=<span class="hljs-literal">True</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>encoded_inputs = tokenizer(
<span class="hljs-meta">... </span>    questions=[<span class="hljs-string">&quot;What is love ?&quot;</span>],
<span class="hljs-meta">... </span>    titles=[<span class="hljs-string">&quot;Haddaway&quot;</span>],
<span class="hljs-meta">... </span>    texts=[<span class="hljs-string">&quot;&#x27;What Is Love&#x27; is a song recorded by the artist Haddaway&quot;</span>],
<span class="hljs-meta">... </span>    return_tensors=<span class="hljs-string">&quot;tf&quot;</span>,
<span class="hljs-meta">... </span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(encoded_inputs)
<span class="hljs-meta">&gt;&gt;&gt; </span>start_logits = outputs.start_logits
<span class="hljs-meta">&gt;&gt;&gt; </span>end_logits = outputs.end_logits
<span class="hljs-meta">&gt;&gt;&gt; </span>relevance_logits = outputs.relevance_logits`}}),{c(){h=s("p"),w=n("Examples:"),_=l(),T(g.$$.fragment)},l(d){h=a(d,"P",{});var u=i(h);w=r(u,"Examples:"),u.forEach(t),_=c(d),k(g.$$.fragment,d)},m(d,u){f(d,h,u),e(h,w),f(d,_,u),P(g,d,u),b=!0},p:Ko,i(d){b||($(g.$$.fragment,d),b=!0)},o(d){E(g.$$.fragment,d),b=!1},d(d){d&&t(h),d&&t(_),R(g,d)}}}function wm(C){let h,w,_,g,b,d,u,z,qe,$e,N,le,X,y,Ce,B,ce,We,V,J,se,K,ie,Fe,U,Ae,Ee,L,je,de,pe,F,j,he,Z,Re,ue,W,Oe,ye,q,Ne,Q,Ie,Le,M,Qe,Me,S,fe,ee,De,te,A,ge,I,Se,oe,v,D,ot,ae,nt,rt,x,st,Ge,me,_e,Ve,O,ne,Ye,at,Y,H,xe,Be,ve,re,it,Ii,ss,Li,Qi,Mi,Xe,Si,ur,Bi,Hi,fr,Ki,Ui,mr,Wi,Vi,Wo,Yi,Gi,Xi,Vo,Ji,gr,Zi,ed,td,Jt,wa,Dt,Zt,as,Yo,od,is,nd,Ta,Je,Go,rd,ds,sd,ad,eo,_r,id,dd,vr,ld,cd,pd,Xo,hd,br,ud,fd,ka,xt,to,ls,Jo,md,cs,gd,Pa,Ze,Zo,_d,en,vd,ps,bd,wd,Td,oo,wr,kd,Pd,Tr,$d,Ed,Rd,tn,yd,kr,Dd,xd,$a,zt,no,hs,on,zd,us,qd,Ea,et,nn,Cd,fs,Fd,Ad,ro,Pr,jd,Od,$r,Nd,Id,Ld,rn,Qd,Er,Md,Sd,Ra,qt,so,ms,sn,Bd,gs,Hd,ya,tt,an,Kd,dn,Ud,_s,Wd,Vd,Yd,ao,Rr,Gd,Xd,yr,Jd,Zd,el,ln,tl,Dr,ol,nl,Da,Ct,io,vs,cn,rl,bs,sl,xa,be,pn,al,ws,il,dl,wt,xr,ll,cl,zr,pl,hl,qr,ul,fl,ml,hn,gl,Cr,_l,vl,bl,Tt,wl,Ts,Tl,kl,ks,Pl,$l,Ps,El,Rl,lo,za,Ft,co,$s,un,yl,Es,Dl,qa,we,fn,xl,mn,zl,Rs,ql,Cl,Fl,kt,Fr,Al,jl,Ar,Ol,Nl,jr,Il,Ll,Ql,gn,Ml,Or,Sl,Bl,Hl,bt,Kl,ys,Ul,Wl,Ds,Vl,Yl,xs,Gl,Xl,Jl,zs,Zl,Ca,At,po,qs,_n,ec,Cs,tc,Fa,jt,vn,oc,bn,nc,Nr,rc,sc,Aa,Ot,wn,ac,Tn,ic,Ir,dc,lc,ja,Nt,kn,cc,Pn,pc,Lr,hc,uc,Oa,It,ho,Fs,$n,fc,As,mc,Na,He,En,gc,js,_c,vc,Rn,bc,Qr,wc,Tc,kc,yn,Pc,Dn,$c,Ec,Rc,dt,xn,yc,Lt,Dc,Mr,xc,zc,Os,qc,Cc,Fc,uo,Ac,fo,Ia,Qt,mo,Ns,zn,jc,Is,Oc,La,Ke,qn,Nc,Ls,Ic,Lc,Cn,Qc,Sr,Mc,Sc,Bc,Fn,Hc,An,Kc,Uc,Wc,lt,jn,Vc,Mt,Yc,Br,Gc,Xc,Qs,Jc,Zc,ep,go,tp,_o,Qa,St,vo,Ms,On,op,Ss,np,Ma,Ue,Nn,rp,Bs,sp,ap,In,ip,Hr,dp,lp,cp,Ln,pp,Qn,hp,up,fp,ct,Mn,mp,Bt,gp,Kr,_p,vp,Hs,bp,wp,Tp,bo,kp,wo,Sa,Ht,To,Ks,Sn,Pp,Us,$p,Ba,Te,Bn,Ep,Ws,Rp,yp,Hn,Dp,Ur,xp,zp,qp,Kn,Cp,Un,Fp,Ap,jp,ko,Op,pt,Wn,Np,Kt,Ip,Wr,Lp,Qp,Vs,Mp,Sp,Bp,Po,Hp,$o,Ha,Ut,Eo,Ys,Vn,Kp,Gs,Up,Ka,ke,Yn,Wp,Xs,Vp,Yp,Gn,Gp,Vr,Xp,Jp,Zp,Xn,eh,Jn,th,oh,nh,Ro,rh,ht,Zn,sh,Wt,ah,Yr,ih,dh,Js,lh,ch,ph,yo,hh,Do,Ua,Vt,xo,Zs,er,uh,ea,fh,Wa,Pe,tr,mh,ta,gh,_h,or,vh,Gr,bh,wh,Th,nr,kh,rr,Ph,$h,Eh,zo,Rh,ut,sr,yh,Yt,Dh,Xr,xh,zh,oa,qh,Ch,Fh,qo,Ah,Co,Va;return d=new ze({}),ie=new ze({}),O=new ze({}),xe=new G({props:{name:"class transformers.DPRConfig",anchor:"transformers.DPRConfig",parameters:[{name:"vocab_size",val:" = 30522"},{name:"hidden_size",val:" = 768"},{name:"num_hidden_layers",val:" = 12"},{name:"num_attention_heads",val:" = 12"},{name:"intermediate_size",val:" = 3072"},{name:"hidden_act",val:" = 'gelu'"},{name:"hidden_dropout_prob",val:" = 0.1"},{name:"attention_probs_dropout_prob",val:" = 0.1"},{name:"max_position_embeddings",val:" = 512"},{name:"type_vocab_size",val:" = 2"},{name:"initializer_range",val:" = 0.02"},{name:"layer_norm_eps",val:" = 1e-12"},{name:"pad_token_id",val:" = 0"},{name:"position_embedding_type",val:" = 'absolute'"},{name:"projection_dim",val:": int = 0"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.DPRConfig.vocab_size",description:`<strong>vocab_size</strong> (<code>int</code>, <em>optional</em>, defaults to 30522) &#x2014;
Vocabulary size of the DPR model. Defines the different tokens that can be represented by the <em>inputs_ids</em>
passed to the forward method of <a href="/docs/transformers/v4.27.1/en/model_doc/bert#transformers.BertModel">BertModel</a>.`,name:"vocab_size"},{anchor:"transformers.DPRConfig.hidden_size",description:`<strong>hidden_size</strong> (<code>int</code>, <em>optional</em>, defaults to 768) &#x2014;
Dimensionality of the encoder layers and the pooler layer.`,name:"hidden_size"},{anchor:"transformers.DPRConfig.num_hidden_layers",description:`<strong>num_hidden_layers</strong> (<code>int</code>, <em>optional</em>, defaults to 12) &#x2014;
Number of hidden layers in the Transformer encoder.`,name:"num_hidden_layers"},{anchor:"transformers.DPRConfig.num_attention_heads",description:`<strong>num_attention_heads</strong> (<code>int</code>, <em>optional</em>, defaults to 12) &#x2014;
Number of attention heads for each attention layer in the Transformer encoder.`,name:"num_attention_heads"},{anchor:"transformers.DPRConfig.intermediate_size",description:`<strong>intermediate_size</strong> (<code>int</code>, <em>optional</em>, defaults to 3072) &#x2014;
Dimensionality of the &#x201C;intermediate&#x201D; (i.e., feed-forward) layer in the Transformer encoder.`,name:"intermediate_size"},{anchor:"transformers.DPRConfig.hidden_act",description:`<strong>hidden_act</strong> (<code>str</code> or <code>function</code>, <em>optional</em>, defaults to <code>&quot;gelu&quot;</code>) &#x2014;
The non-linear activation function (function or string) in the encoder and pooler. If string, <code>&quot;gelu&quot;</code>,
<code>&quot;relu&quot;</code>, <code>&quot;silu&quot;</code> and <code>&quot;gelu_new&quot;</code> are supported.`,name:"hidden_act"},{anchor:"transformers.DPRConfig.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.DPRConfig.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.DPRConfig.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.DPRConfig.type_vocab_size",description:`<strong>type_vocab_size</strong> (<code>int</code>, <em>optional</em>, defaults to 2) &#x2014;
The vocabulary size of the <em>token_type_ids</em> passed into <a href="/docs/transformers/v4.27.1/en/model_doc/bert#transformers.BertModel">BertModel</a>.`,name:"type_vocab_size"},{anchor:"transformers.DPRConfig.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.DPRConfig.layer_norm_eps",description:`<strong>layer_norm_eps</strong> (<code>float</code>, <em>optional</em>, defaults to 1e-12) &#x2014;
The epsilon used by the layer normalization layers.`,name:"layer_norm_eps"},{anchor:"transformers.DPRConfig.position_embedding_type",description:`<strong>position_embedding_type</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;absolute&quot;</code>) &#x2014;
Type of position embedding. Choose one of <code>&quot;absolute&quot;</code>, <code>&quot;relative_key&quot;</code>, <code>&quot;relative_key_query&quot;</code>. For
positional embeddings use <code>&quot;absolute&quot;</code>. For more information on <code>&quot;relative_key&quot;</code>, please refer to
<a href="https://arxiv.org/abs/1803.02155" rel="nofollow">Self-Attention with Relative Position Representations (Shaw et al.)</a>.
For more information on <code>&quot;relative_key_query&quot;</code>, please refer to <em>Method 4</em> in <a href="https://arxiv.org/abs/2009.13658" rel="nofollow">Improve Transformer Models
with Better Relative Position Embeddings (Huang et al.)</a>.`,name:"position_embedding_type"},{anchor:"transformers.DPRConfig.projection_dim",description:`<strong>projection_dim</strong> (<code>int</code>, <em>optional</em>, defaults to 0) &#x2014;
Dimension of the projection for the context and question encoders. If it is set to zero (default), then no
projection is done.`,name:"projection_dim"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/dpr/configuration_dpr.py#L45"}}),Jt=new Ho({props:{anchor:"transformers.DPRConfig.example",$$slots:{default:[nm]},$$scope:{ctx:C}}}),Yo=new ze({}),Go=new G({props:{name:"class transformers.DPRContextEncoderTokenizer",anchor:"transformers.DPRContextEncoderTokenizer",parameters:[{name:"vocab_file",val:""},{name:"do_lower_case",val:" = True"},{name:"do_basic_tokenize",val:" = True"},{name:"never_split",val:" = None"},{name:"unk_token",val:" = '[UNK]'"},{name:"sep_token",val:" = '[SEP]'"},{name:"pad_token",val:" = '[PAD]'"},{name:"cls_token",val:" = '[CLS]'"},{name:"mask_token",val:" = '[MASK]'"},{name:"tokenize_chinese_chars",val:" = True"},{name:"strip_accents",val:" = None"},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/dpr/tokenization_dpr.py#L113"}}),Jo=new ze({}),Zo=new G({props:{name:"class transformers.DPRContextEncoderTokenizerFast",anchor:"transformers.DPRContextEncoderTokenizerFast",parameters:[{name:"vocab_file",val:" = None"},{name:"tokenizer_file",val:" = None"},{name:"do_lower_case",val:" = True"},{name:"unk_token",val:" = '[UNK]'"},{name:"sep_token",val:" = '[SEP]'"},{name:"pad_token",val:" = '[PAD]'"},{name:"cls_token",val:" = '[CLS]'"},{name:"mask_token",val:" = '[MASK]'"},{name:"tokenize_chinese_chars",val:" = True"},{name:"strip_accents",val:" = None"},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/dpr/tokenization_dpr_fast.py#L114"}}),on=new ze({}),nn=new G({props:{name:"class transformers.DPRQuestionEncoderTokenizer",anchor:"transformers.DPRQuestionEncoderTokenizer",parameters:[{name:"vocab_file",val:""},{name:"do_lower_case",val:" = True"},{name:"do_basic_tokenize",val:" = True"},{name:"never_split",val:" = None"},{name:"unk_token",val:" = '[UNK]'"},{name:"sep_token",val:" = '[SEP]'"},{name:"pad_token",val:" = '[PAD]'"},{name:"cls_token",val:" = '[CLS]'"},{name:"mask_token",val:" = '[MASK]'"},{name:"tokenize_chinese_chars",val:" = True"},{name:"strip_accents",val:" = None"},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/dpr/tokenization_dpr.py#L129"}}),sn=new ze({}),an=new G({props:{name:"class transformers.DPRQuestionEncoderTokenizerFast",anchor:"transformers.DPRQuestionEncoderTokenizerFast",parameters:[{name:"vocab_file",val:" = None"},{name:"tokenizer_file",val:" = None"},{name:"do_lower_case",val:" = True"},{name:"unk_token",val:" = '[UNK]'"},{name:"sep_token",val:" = '[SEP]'"},{name:"pad_token",val:" = '[PAD]'"},{name:"cls_token",val:" = '[CLS]'"},{name:"mask_token",val:" = '[MASK]'"},{name:"tokenize_chinese_chars",val:" = True"},{name:"strip_accents",val:" = None"},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/dpr/tokenization_dpr_fast.py#L131"}}),cn=new ze({}),pn=new G({props:{name:"class transformers.DPRReaderTokenizer",anchor:"transformers.DPRReaderTokenizer",parameters:[{name:"vocab_file",val:""},{name:"do_lower_case",val:" = True"},{name:"do_basic_tokenize",val:" = True"},{name:"never_split",val:" = None"},{name:"unk_token",val:" = '[UNK]'"},{name:"sep_token",val:" = '[SEP]'"},{name:"pad_token",val:" = '[PAD]'"},{name:"cls_token",val:" = '[CLS]'"},{name:"mask_token",val:" = '[MASK]'"},{name:"tokenize_chinese_chars",val:" = True"},{name:"strip_accents",val:" = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.DPRReaderTokenizer.questions",description:`<strong>questions</strong> (<code>str</code> or <code>List[str]</code>) &#x2014;
The questions to be encoded. You can specify one question for many passages. In this case, the question
will be duplicated like <code>[questions] * n_passages</code>. Otherwise you have to specify as many questions as in
<code>titles</code> or <code>texts</code>.`,name:"questions"},{anchor:"transformers.DPRReaderTokenizer.titles",description:`<strong>titles</strong> (<code>str</code> or <code>List[str]</code>) &#x2014;
The passages titles to be encoded. This can be a string or a list of strings if there are several passages.`,name:"titles"},{anchor:"transformers.DPRReaderTokenizer.texts",description:`<strong>texts</strong> (<code>str</code> or <code>List[str]</code>) &#x2014;
The passages texts to be encoded. This can be a string or a list of strings if there are several passages.`,name:"texts"},{anchor:"transformers.DPRReaderTokenizer.padding",description:`<strong>padding</strong> (<code>bool</code>, <code>str</code> or <a href="/docs/transformers/v4.27.1/en/internal/file_utils#transformers.utils.PaddingStrategy">PaddingStrategy</a>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Activates and controls padding. Accepts the following values:</p>
<ul>
<li><code>True</code> or <code>&apos;longest&apos;</code>: Pad to the longest sequence in the batch (or no padding if only a single sequence
if provided).</li>
<li><code>&apos;max_length&apos;</code>: Pad to a maximum length specified with the argument <code>max_length</code> or to the maximum
acceptable input length for the model if that argument is not provided.</li>
<li><code>False</code> or <code>&apos;do_not_pad&apos;</code> (default): No padding (i.e., can output a batch with sequences of different
lengths).</li>
</ul>`,name:"padding"},{anchor:"transformers.DPRReaderTokenizer.truncation",description:`<strong>truncation</strong> (<code>bool</code>, <code>str</code> or <a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.tokenization_utils_base.TruncationStrategy">TruncationStrategy</a>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Activates and controls truncation. Accepts the following values:</p>
<ul>
<li><code>True</code> or <code>&apos;longest_first&apos;</code>: Truncate to a maximum length specified with the argument <code>max_length</code> or to
the maximum acceptable input length for the model if that argument is not provided. This will truncate
token by token, removing a token from the longest sequence in the pair if a pair of sequences (or a batch
of pairs) is provided.</li>
<li><code>&apos;only_first&apos;</code>: Truncate to a maximum length specified with the argument <code>max_length</code> or to the maximum
acceptable input length for the model if that argument is not provided. This will only truncate the first
sequence of a pair if a pair of sequences (or a batch of pairs) is provided.</li>
<li><code>&apos;only_second&apos;</code>: Truncate to a maximum length specified with the argument <code>max_length</code> or to the maximum
acceptable input length for the model if that argument is not provided. This will only truncate the
second sequence of a pair if a pair of sequences (or a batch of pairs) is provided.</li>
<li><code>False</code> or <code>&apos;do_not_truncate&apos;</code> (default): No truncation (i.e., can output batch with sequence lengths
greater than the model maximum admissible input size).</li>
</ul>`,name:"truncation"},{anchor:"transformers.DPRReaderTokenizer.max_length",description:`<strong>max_length</strong> (<code>int</code>, <em>optional</em>) &#x2014;
Controls the maximum length to use by one of the truncation/padding parameters.</p>
<p>If left unset or set to <code>None</code>, this will use the predefined model maximum length if a maximum length
is required by one of the truncation/padding parameters. If the model has no specific maximum input
length (like XLNet) truncation/padding to a maximum length will be deactivated.`,name:"max_length"},{anchor:"transformers.DPRReaderTokenizer.return_tensors",description:`<strong>return_tensors</strong> (<code>str</code> or <a href="/docs/transformers/v4.27.1/en/internal/file_utils#transformers.TensorType">TensorType</a>, <em>optional</em>) &#x2014;
If set, will return tensors instead of list of python integers. Acceptable values are:</p>
<ul>
<li><code>&apos;tf&apos;</code>: Return TensorFlow <code>tf.constant</code> objects.</li>
<li><code>&apos;pt&apos;</code>: Return PyTorch <code>torch.Tensor</code> objects.</li>
<li><code>&apos;np&apos;</code>: Return Numpy <code>np.ndarray</code> objects.</li>
</ul>`,name:"return_tensors"},{anchor:"transformers.DPRReaderTokenizer.return_attention_mask",description:`<strong>return_attention_mask</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attention mask. If not set, will return the attention mask according to the
specific tokenizer&#x2019;s default, defined by the <code>return_outputs</code> attribute.</p>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"return_attention_mask"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/dpr/tokenization_dpr.py#L396",returnDescription:`
<p>A dictionary with the following keys:</p>
<ul>
<li><code>input_ids</code>: List of token ids to be fed to a model.</li>
<li><code>attention_mask</code>: List of indices specifying which tokens should be attended to by the model.</li>
</ul>
`,returnType:`
<p><code>Dict[str, List[List[int]]]</code></p>
`}}),lo=new Ho({props:{anchor:"transformers.DPRReaderTokenizer.example",$$slots:{default:[rm]},$$scope:{ctx:C}}}),un=new ze({}),fn=new G({props:{name:"class transformers.DPRReaderTokenizerFast",anchor:"transformers.DPRReaderTokenizerFast",parameters:[{name:"vocab_file",val:" = None"},{name:"tokenizer_file",val:" = None"},{name:"do_lower_case",val:" = True"},{name:"unk_token",val:" = '[UNK]'"},{name:"sep_token",val:" = '[SEP]'"},{name:"pad_token",val:" = '[PAD]'"},{name:"cls_token",val:" = '[CLS]'"},{name:"mask_token",val:" = '[MASK]'"},{name:"tokenize_chinese_chars",val:" = True"},{name:"strip_accents",val:" = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.DPRReaderTokenizerFast.questions",description:`<strong>questions</strong> (<code>str</code> or <code>List[str]</code>) &#x2014;
The questions to be encoded. You can specify one question for many passages. In this case, the question
will be duplicated like <code>[questions] * n_passages</code>. Otherwise you have to specify as many questions as in
<code>titles</code> or <code>texts</code>.`,name:"questions"},{anchor:"transformers.DPRReaderTokenizerFast.titles",description:`<strong>titles</strong> (<code>str</code> or <code>List[str]</code>) &#x2014;
The passages titles to be encoded. This can be a string or a list of strings if there are several passages.`,name:"titles"},{anchor:"transformers.DPRReaderTokenizerFast.texts",description:`<strong>texts</strong> (<code>str</code> or <code>List[str]</code>) &#x2014;
The passages texts to be encoded. This can be a string or a list of strings if there are several passages.`,name:"texts"},{anchor:"transformers.DPRReaderTokenizerFast.padding",description:`<strong>padding</strong> (<code>bool</code>, <code>str</code> or <a href="/docs/transformers/v4.27.1/en/internal/file_utils#transformers.utils.PaddingStrategy">PaddingStrategy</a>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Activates and controls padding. Accepts the following values:</p>
<ul>
<li><code>True</code> or <code>&apos;longest&apos;</code>: Pad to the longest sequence in the batch (or no padding if only a single sequence
if provided).</li>
<li><code>&apos;max_length&apos;</code>: Pad to a maximum length specified with the argument <code>max_length</code> or to the maximum
acceptable input length for the model if that argument is not provided.</li>
<li><code>False</code> or <code>&apos;do_not_pad&apos;</code> (default): No padding (i.e., can output a batch with sequences of different
lengths).</li>
</ul>`,name:"padding"},{anchor:"transformers.DPRReaderTokenizerFast.truncation",description:`<strong>truncation</strong> (<code>bool</code>, <code>str</code> or <a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.tokenization_utils_base.TruncationStrategy">TruncationStrategy</a>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Activates and controls truncation. Accepts the following values:</p>
<ul>
<li><code>True</code> or <code>&apos;longest_first&apos;</code>: Truncate to a maximum length specified with the argument <code>max_length</code> or to
the maximum acceptable input length for the model if that argument is not provided. This will truncate
token by token, removing a token from the longest sequence in the pair if a pair of sequences (or a batch
of pairs) is provided.</li>
<li><code>&apos;only_first&apos;</code>: Truncate to a maximum length specified with the argument <code>max_length</code> or to the maximum
acceptable input length for the model if that argument is not provided. This will only truncate the first
sequence of a pair if a pair of sequences (or a batch of pairs) is provided.</li>
<li><code>&apos;only_second&apos;</code>: Truncate to a maximum length specified with the argument <code>max_length</code> or to the maximum
acceptable input length for the model if that argument is not provided. This will only truncate the
second sequence of a pair if a pair of sequences (or a batch of pairs) is provided.</li>
<li><code>False</code> or <code>&apos;do_not_truncate&apos;</code> (default): No truncation (i.e., can output batch with sequence lengths
greater than the model maximum admissible input size).</li>
</ul>`,name:"truncation"},{anchor:"transformers.DPRReaderTokenizerFast.max_length",description:`<strong>max_length</strong> (<code>int</code>, <em>optional</em>) &#x2014;
Controls the maximum length to use by one of the truncation/padding parameters.</p>
<p>If left unset or set to <code>None</code>, this will use the predefined model maximum length if a maximum length
is required by one of the truncation/padding parameters. If the model has no specific maximum input
length (like XLNet) truncation/padding to a maximum length will be deactivated.`,name:"max_length"},{anchor:"transformers.DPRReaderTokenizerFast.return_tensors",description:`<strong>return_tensors</strong> (<code>str</code> or <a href="/docs/transformers/v4.27.1/en/internal/file_utils#transformers.TensorType">TensorType</a>, <em>optional</em>) &#x2014;
If set, will return tensors instead of list of python integers. Acceptable values are:</p>
<ul>
<li><code>&apos;tf&apos;</code>: Return TensorFlow <code>tf.constant</code> objects.</li>
<li><code>&apos;pt&apos;</code>: Return PyTorch <code>torch.Tensor</code> objects.</li>
<li><code>&apos;np&apos;</code>: Return Numpy <code>np.ndarray</code> objects.</li>
</ul>`,name:"return_tensors"},{anchor:"transformers.DPRReaderTokenizerFast.return_attention_mask",description:`<strong>return_attention_mask</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attention mask. If not set, will return the attention mask according to the
specific tokenizer&#x2019;s default, defined by the <code>return_outputs</code> attribute.</p>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"return_attention_mask"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/dpr/tokenization_dpr_fast.py#L394",returnDescription:`
<p>A dictionary with the following keys:</p>
<ul>
<li><code>input_ids</code>: List of token ids to be fed to a model.</li>
<li><code>attention_mask</code>: List of indices specifying which tokens should be attended to by the model.</li>
</ul>
`,returnType:`
<p><code>Dict[str, List[List[int]]]</code></p>
`}}),_n=new ze({}),vn=new G({props:{name:"class transformers.models.dpr.modeling_dpr.DPRContextEncoderOutput",anchor:"transformers.models.dpr.modeling_dpr.DPRContextEncoderOutput",parameters:[{name:"pooler_output",val:": FloatTensor"},{name:"hidden_states",val:": typing.Optional[typing.Tuple[torch.FloatTensor]] = None"},{name:"attentions",val:": typing.Optional[typing.Tuple[torch.FloatTensor]] = None"}],parametersDescription:[{anchor:"transformers.models.dpr.modeling_dpr.DPRContextEncoderOutput.pooler_output",description:`<strong>pooler_output</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, embeddings_size)</code>) &#x2014;
The DPR encoder outputs the <em>pooler_output</em> that corresponds to the context representation. Last layer
hidden-state of the first token of the sequence (classification token) further processed by a Linear layer.
This output is to be used to embed contexts for nearest neighbors queries with questions embeddings.`,name:"pooler_output"},{anchor:"transformers.models.dpr.modeling_dpr.DPRContextEncoderOutput.hidden_states",description:`<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>) &#x2014;
Tuple of <code>torch.FloatTensor</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.`,name:"hidden_states"},{anchor:"transformers.models.dpr.modeling_dpr.DPRContextEncoderOutput.attentions",description:`<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>) &#x2014;
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.`,name:"attentions"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/dpr/modeling_dpr.py#L62"}}),wn=new G({props:{name:"class transformers.models.dpr.modeling_dpr.DPRQuestionEncoderOutput",anchor:"transformers.models.dpr.modeling_dpr.DPRQuestionEncoderOutput",parameters:[{name:"pooler_output",val:": FloatTensor"},{name:"hidden_states",val:": typing.Optional[typing.Tuple[torch.FloatTensor]] = None"},{name:"attentions",val:": typing.Optional[typing.Tuple[torch.FloatTensor]] = None"}],parametersDescription:[{anchor:"transformers.models.dpr.modeling_dpr.DPRQuestionEncoderOutput.pooler_output",description:`<strong>pooler_output</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, embeddings_size)</code>) &#x2014;
The DPR encoder outputs the <em>pooler_output</em> that corresponds to the question representation. Last layer
hidden-state of the first token of the sequence (classification token) further processed by a Linear layer.
This output is to be used to embed questions for nearest neighbors queries with context embeddings.`,name:"pooler_output"},{anchor:"transformers.models.dpr.modeling_dpr.DPRQuestionEncoderOutput.hidden_states",description:`<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>) &#x2014;
Tuple of <code>torch.FloatTensor</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.`,name:"hidden_states"},{anchor:"transformers.models.dpr.modeling_dpr.DPRQuestionEncoderOutput.attentions",description:`<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>) &#x2014;
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.`,name:"attentions"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/dpr/modeling_dpr.py#L90"}}),kn=new G({props:{name:"class transformers.DPRReaderOutput",anchor:"transformers.DPRReaderOutput",parameters:[{name:"start_logits",val:": FloatTensor"},{name:"end_logits",val:": FloatTensor = None"},{name:"relevance_logits",val:": FloatTensor = None"},{name:"hidden_states",val:": typing.Optional[typing.Tuple[torch.FloatTensor]] = None"},{name:"attentions",val:": typing.Optional[typing.Tuple[torch.FloatTensor]] = None"}],parametersDescription:[{anchor:"transformers.DPRReaderOutput.start_logits",description:`<strong>start_logits</strong> (<code>torch.FloatTensor</code> of shape <code>(n_passages, sequence_length)</code>) &#x2014;
Logits of the start index of the span for each passage.`,name:"start_logits"},{anchor:"transformers.DPRReaderOutput.end_logits",description:`<strong>end_logits</strong> (<code>torch.FloatTensor</code> of shape <code>(n_passages, sequence_length)</code>) &#x2014;
Logits of the end index of the span for each passage.`,name:"end_logits"},{anchor:"transformers.DPRReaderOutput.relevance_logits",description:`<strong>relevance_logits</strong> (<code>torch.FloatTensor</code> of shape <code>(n_passages, )</code>) &#x2014;
Outputs of the QA classifier of the DPRReader that corresponds to the scores of each passage to answer the
question, compared to all the other passages.`,name:"relevance_logits"},{anchor:"transformers.DPRReaderOutput.hidden_states",description:`<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>) &#x2014;
Tuple of <code>torch.FloatTensor</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.`,name:"hidden_states"},{anchor:"transformers.DPRReaderOutput.attentions",description:`<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>) &#x2014;
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.`,name:"attentions"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/dpr/modeling_dpr.py#L118"}}),$n=new ze({}),En=new G({props:{name:"class transformers.DPRContextEncoder",anchor:"transformers.DPRContextEncoder",parameters:[{name:"config",val:": DPRConfig"}],parametersDescription:[{anchor:"transformers.DPRContextEncoder.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.27.1/en/model_doc/dpr#transformers.DPRConfig">DPRConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.27.1/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/dpr/modeling_dpr.py#L446"}}),xn=new G({props:{name:"forward",anchor:"transformers.DPRContextEncoder.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:"inputs_embeds",val:": typing.Optional[torch.Tensor] = None"},{name:"output_attentions",val:" = None"},{name:"output_hidden_states",val:" = None"},{name:"return_dict",val:" = None"}],parametersDescription:[{anchor:"transformers.DPRContextEncoder.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. To match pretraining, DPR input sequence should be
formatted with [CLS] and [SEP] tokens as follows:</p>
<p>(a) For sequence pairs (for a pair title+text for example):`,name:"input_ids"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/dpr/modeling_dpr.py#L454",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.27.1/en/model_doc/dpr#transformers.models.dpr.modeling_dpr.DPRContextEncoderOutput"
>transformers.models.dpr.modeling_dpr.DPRContextEncoderOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.27.1/en/model_doc/dpr#transformers.DPRConfig"
>DPRConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>pooler_output</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, embeddings_size)</code>) \u2014 The DPR encoder outputs the <em>pooler_output</em> that corresponds to the context representation. Last layer
hidden-state of the first token of the sequence (classification token) further processed by a Linear layer.
This output is to be used to embed contexts for nearest neighbors queries with questions embeddings.</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 + 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(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.27.1/en/model_doc/dpr#transformers.models.dpr.modeling_dpr.DPRContextEncoderOutput"
>transformers.models.dpr.modeling_dpr.DPRContextEncoderOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),uo=new Xt({props:{$$slots:{default:[sm]},$$scope:{ctx:C}}}),fo=new Ho({props:{anchor:"transformers.DPRContextEncoder.forward.example",$$slots:{default:[am]},$$scope:{ctx:C}}}),zn=new ze({}),qn=new G({props:{name:"class transformers.DPRQuestionEncoder",anchor:"transformers.DPRQuestionEncoder",parameters:[{name:"config",val:": DPRConfig"}],parametersDescription:[{anchor:"transformers.DPRQuestionEncoder.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.27.1/en/model_doc/dpr#transformers.DPRConfig">DPRConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.27.1/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/dpr/modeling_dpr.py#L527"}}),jn=new G({props:{name:"forward",anchor:"transformers.DPRQuestionEncoder.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:"inputs_embeds",val:": typing.Optional[torch.Tensor] = None"},{name:"output_attentions",val:" = None"},{name:"output_hidden_states",val:" = None"},{name:"return_dict",val:" = None"}],parametersDescription:[{anchor:"transformers.DPRQuestionEncoder.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. To match pretraining, DPR input sequence should be
formatted with [CLS] and [SEP] tokens as follows:</p>
<p>(a) For sequence pairs (for a pair title+text for example):`,name:"input_ids"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/dpr/modeling_dpr.py#L535",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.27.1/en/model_doc/dpr#transformers.models.dpr.modeling_dpr.DPRQuestionEncoderOutput"
>transformers.models.dpr.modeling_dpr.DPRQuestionEncoderOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.27.1/en/model_doc/dpr#transformers.DPRConfig"
>DPRConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>pooler_output</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, embeddings_size)</code>) \u2014 The DPR encoder outputs the <em>pooler_output</em> that corresponds to the question representation. Last layer
hidden-state of the first token of the sequence (classification token) further processed by a Linear layer.
This output is to be used to embed questions for nearest neighbors queries with context embeddings.</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 + 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(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.27.1/en/model_doc/dpr#transformers.models.dpr.modeling_dpr.DPRQuestionEncoderOutput"
>transformers.models.dpr.modeling_dpr.DPRQuestionEncoderOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),go=new Xt({props:{$$slots:{default:[im]},$$scope:{ctx:C}}}),_o=new Ho({props:{anchor:"transformers.DPRQuestionEncoder.forward.example",$$slots:{default:[dm]},$$scope:{ctx:C}}}),On=new ze({}),Nn=new G({props:{name:"class transformers.DPRReader",anchor:"transformers.DPRReader",parameters:[{name:"config",val:": DPRConfig"}],parametersDescription:[{anchor:"transformers.DPRReader.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.27.1/en/model_doc/dpr#transformers.DPRConfig">DPRConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.27.1/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/dpr/modeling_dpr.py#L608"}}),Mn=new G({props:{name:"forward",anchor:"transformers.DPRReader.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.Tensor] = None"},{name:"output_attentions",val:": bool = None"},{name:"output_hidden_states",val:": bool = None"},{name:"return_dict",val:" = None"}],parametersDescription:[{anchor:"transformers.DPRReader.forward.input_ids",description:`<strong>input_ids</strong> (<code>Tuple[torch.LongTensor]</code> of shapes <code>(n_passages, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary. It has to be a sequence triplet with 1) the question
and 2) the passages titles and 3) the passages texts To match pretraining, DPR <code>input_ids</code> sequence should
be formatted with [CLS] and [SEP] with the format:</p>
<p><code>[CLS] &lt;question token ids&gt; [SEP] &lt;titles ids&gt; [SEP] &lt;texts ids&gt;</code></p>
<p>DPR is a model with absolute position embeddings so it&#x2019;s usually advised to pad the inputs on the right
rather than the left.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.27.1/en/model_doc/dpr#transformers.DPRReaderTokenizer">DPRReaderTokenizer</a>. See this class documentation for more details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.DPRReader.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(n_passages, 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.DPRReader.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(n_passages, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.DPRReader.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.DPRReader.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.DPRReader.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/dpr/modeling_dpr.py#L616",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.27.1/en/model_doc/dpr#transformers.DPRReaderOutput"
>transformers.models.dpr.modeling_dpr.DPRReaderOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.27.1/en/model_doc/dpr#transformers.DPRConfig"
>DPRConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>start_logits</strong> (<code>torch.FloatTensor</code> of shape <code>(n_passages, sequence_length)</code>) \u2014 Logits of the start index of the span for each passage.</p>
</li>
<li>
<p><strong>end_logits</strong> (<code>torch.FloatTensor</code> of shape <code>(n_passages, sequence_length)</code>) \u2014 Logits of the end index of the span for each passage.</p>
</li>
<li>
<p><strong>relevance_logits</strong> (<code>torch.FloatTensor</code> of shape <code>(n_passages, )</code>) \u2014 Outputs of the QA classifier of the DPRReader that corresponds to the scores of each passage to answer the
question, compared to all the other passages.</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 + 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(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.27.1/en/model_doc/dpr#transformers.DPRReaderOutput"
>transformers.models.dpr.modeling_dpr.DPRReaderOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),bo=new Xt({props:{$$slots:{default:[lm]},$$scope:{ctx:C}}}),wo=new Ho({props:{anchor:"transformers.DPRReader.forward.example",$$slots:{default:[cm]},$$scope:{ctx:C}}}),Sn=new ze({}),Bn=new G({props:{name:"class transformers.TFDPRContextEncoder",anchor:"transformers.TFDPRContextEncoder",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFDPRContextEncoder.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.27.1/en/model_doc/dpr#transformers.DPRConfig">DPRConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.27.1/en/main_classes/model#transformers.TFPreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/dpr/modeling_tf_dpr.py#L537"}}),ko=new Xt({props:{$$slots:{default:[pm]},$$scope:{ctx:C}}}),Wn=new G({props:{name:"call",anchor:"transformers.TFDPRContextEncoder.call",parameters:[{name:"input_ids",val:" = None"},{name:"attention_mask",val:": typing.Optional[tensorflow.python.framework.ops.Tensor] = None"},{name:"token_type_ids",val:": typing.Optional[tensorflow.python.framework.ops.Tensor] = None"},{name:"inputs_embeds",val:": typing.Optional[tensorflow.python.framework.ops.Tensor] = None"},{name:"output_attentions",val:" = None"},{name:"output_hidden_states",val:" = None"},{name:"return_dict",val:" = None"},{name:"training",val:": bool = False"}],parametersDescription:[{anchor:"transformers.TFDPRContextEncoder.call.input_ids",description:`<strong>input_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary. To match pretraining, DPR input sequence should be
formatted with [CLS] and [SEP] tokens as follows:</p>
<p>(a) For sequence pairs (for a pair title+text for example):`,name:"input_ids"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/dpr/modeling_tf_dpr.py#L549",returnDescription:`
<p>A <code>transformers.models.dpr.modeling_tf_dpr.TFDPRContextEncoderOutput</code> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/v4.27.1/en/model_doc/dpr#transformers.DPRConfig"
>DPRConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>pooler_output</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, embeddings_size)</code>) \u2014 The DPR encoder outputs the <em>pooler_output</em> that corresponds to the context representation. Last layer
hidden-state of the first token of the sequence (classification token) further processed by a Linear layer.
This output is to be used to embed contexts for nearest neighbors queries with questions embeddings.</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><code>transformers.models.dpr.modeling_tf_dpr.TFDPRContextEncoderOutput</code> or <code>tuple(tf.Tensor)</code></p>
`}}),Po=new Xt({props:{$$slots:{default:[hm]},$$scope:{ctx:C}}}),$o=new Ho({props:{anchor:"transformers.TFDPRContextEncoder.call.example",$$slots:{default:[um]},$$scope:{ctx:C}}}),Vn=new ze({}),Yn=new G({props:{name:"class transformers.TFDPRQuestionEncoder",anchor:"transformers.TFDPRQuestionEncoder",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFDPRQuestionEncoder.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.27.1/en/model_doc/dpr#transformers.DPRConfig">DPRConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.27.1/en/main_classes/model#transformers.TFPreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/dpr/modeling_tf_dpr.py#L624"}}),Ro=new Xt({props:{$$slots:{default:[fm]},$$scope:{ctx:C}}}),Zn=new G({props:{name:"call",anchor:"transformers.TFDPRQuestionEncoder.call",parameters:[{name:"input_ids",val:" = None"},{name:"attention_mask",val:": typing.Optional[tensorflow.python.framework.ops.Tensor] = None"},{name:"token_type_ids",val:": typing.Optional[tensorflow.python.framework.ops.Tensor] = None"},{name:"inputs_embeds",val:": typing.Optional[tensorflow.python.framework.ops.Tensor] = None"},{name:"output_attentions",val:" = None"},{name:"output_hidden_states",val:" = None"},{name:"return_dict",val:" = None"},{name:"training",val:": bool = False"}],parametersDescription:[{anchor:"transformers.TFDPRQuestionEncoder.call.input_ids",description:`<strong>input_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary. To match pretraining, DPR input sequence should be
formatted with [CLS] and [SEP] tokens as follows:</p>
<p>(a) For sequence pairs (for a pair title+text for example):`,name:"input_ids"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/dpr/modeling_tf_dpr.py#L636",returnDescription:`
<p>A <code>transformers.models.dpr.modeling_tf_dpr.TFDPRQuestionEncoderOutput</code> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/v4.27.1/en/model_doc/dpr#transformers.DPRConfig"
>DPRConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>pooler_output</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, embeddings_size)</code>) \u2014 The DPR encoder outputs the <em>pooler_output</em> that corresponds to the question representation. Last layer
hidden-state of the first token of the sequence (classification token) further processed by a Linear layer.
This output is to be used to embed questions for nearest neighbors queries with context embeddings.</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><code>transformers.models.dpr.modeling_tf_dpr.TFDPRQuestionEncoderOutput</code> or <code>tuple(tf.Tensor)</code></p>
`}}),yo=new Xt({props:{$$slots:{default:[mm]},$$scope:{ctx:C}}}),Do=new Ho({props:{anchor:"transformers.TFDPRQuestionEncoder.call.example",$$slots:{default:[gm]},$$scope:{ctx:C}}}),er=new ze({}),tr=new G({props:{name:"class transformers.TFDPRReader",anchor:"transformers.TFDPRReader",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFDPRReader.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.27.1/en/model_doc/dpr#transformers.DPRConfig">DPRConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.27.1/en/main_classes/model#transformers.TFPreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/dpr/modeling_tf_dpr.py#L710"}}),zo=new Xt({props:{$$slots:{default:[_m]},$$scope:{ctx:C}}}),sr=new G({props:{name:"call",anchor:"transformers.TFDPRReader.call",parameters:[{name:"input_ids",val:" = None"},{name:"attention_mask",val:": typing.Optional[tensorflow.python.framework.ops.Tensor] = None"},{name:"inputs_embeds",val:": typing.Optional[tensorflow.python.framework.ops.Tensor] = None"},{name:"output_attentions",val:": bool = None"},{name:"output_hidden_states",val:": bool = None"},{name:"return_dict",val:" = None"},{name:"training",val:": bool = False"}],parametersDescription:[{anchor:"transformers.TFDPRReader.call.input_ids",description:`<strong>input_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shapes <code>(n_passages, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary. It has to be a sequence triplet with 1) the question
and 2) the passages titles and 3) the passages texts To match pretraining, DPR <code>input_ids</code> sequence should
be formatted with [CLS] and [SEP] with the format:</p>
<p><code>[CLS] &lt;question token ids&gt; [SEP] &lt;titles ids&gt; [SEP] &lt;texts ids&gt;</code></p>
<p>DPR is a model with absolute position embeddings so it&#x2019;s usually advised to pad the inputs on the right
rather than the left.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.27.1/en/model_doc/dpr#transformers.DPRReaderTokenizer">DPRReaderTokenizer</a>. See this class documentation for more details.`,name:"input_ids"},{anchor:"transformers.TFDPRReader.call.attention_mask",description:`<strong>attention_mask</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(n_passages, 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.TFDPRReader.call.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(n_passages, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.TFDPRReader.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. This argument can be used only in eager mode, in graph mode the value in the config will be
used instead.`,name:"output_hidden_states"},{anchor:"transformers.TFDPRReader.call.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.TFDPRReader.call.training",description:`<strong>training</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to use the model in training mode (some modules like dropout modules have different
behaviors between training and evaluation).`,name:"training"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/dpr/modeling_tf_dpr.py#L722",returnDescription:`
<p>A <code>transformers.models.dpr.modeling_tf_dpr.TFDPRReaderOutput</code> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/v4.27.1/en/model_doc/dpr#transformers.DPRConfig"
>DPRConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>start_logits</strong> (<code>tf.Tensor</code> of shape <code>(n_passages, sequence_length)</code>) \u2014 Logits of the start index of the span for each passage.</p>
</li>
<li>
<p><strong>end_logits</strong> (<code>tf.Tensor</code> of shape <code>(n_passages, sequence_length)</code>) \u2014 Logits of the end index of the span for each passage.</p>
</li>
<li>
<p><strong>relevance_logits</strong> (<code>tf.Tensor</code> of shape <code>(n_passages, )</code>) \u2014 Outputs of the QA classifier of the DPRReader that corresponds to the scores of each passage to answer the
question, compared to all the other passages.</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(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><code>transformers.models.dpr.modeling_tf_dpr.TFDPRReaderOutput</code> or <code>tuple(tf.Tensor)</code></p>
`}}),qo=new Xt({props:{$$slots:{default:[vm]},$$scope:{ctx:C}}}),Co=new Ho({props:{anchor:"transformers.TFDPRReader.call.example",$$slots:{default:[bm]},$$scope:{ctx:C}}}),{c(){h=s("meta"),w=l(),_=s("h1"),g=s("a"),b=s("span"),T(d.$$.fragment),u=l(),z=s("span"),qe=n("DPR"),$e=l(),N=s("div"),le=s("a"),X=s("img"),Ce=l(),B=s("a"),ce=s("img"),V=l(),J=s("h2"),se=s("a"),K=s("span"),T(ie.$$.fragment),Fe=l(),U=s("span"),Ae=n("Overview"),Ee=l(),L=s("p"),je=n(`Dense Passage Retrieval (DPR) is a set of tools and models for state-of-the-art open-domain Q&A research. It was
introduced in `),de=s("a"),pe=n("Dense Passage Retrieval for Open-Domain Question Answering"),F=n(` by
Vladimir Karpukhin, Barlas O\u011Fuz, Sewon Min, Patrick Lewis, Ledell Wu, Sergey Edunov, Danqi Chen, Wen-tau Yih.`),j=l(),he=s("p"),Z=n("The abstract from the paper is the following:"),Re=l(),ue=s("p"),W=s("em"),Oe=n(`Open-domain question answering relies on efficient passage retrieval to select candidate contexts, where traditional
sparse vector space models, such as TF-IDF or BM25, are the de facto method. In this work, we show that retrieval can
be practically implemented using dense representations alone, where embeddings are learned from a small number of
questions and passages by a simple dual-encoder framework. When evaluated on a wide range of open-domain QA datasets,
our dense retriever outperforms a strong Lucene-BM25 system largely by 9%-19% absolute in terms of top-20 passage
retrieval accuracy, and helps our end-to-end QA system establish new state-of-the-art on multiple open-domain QA
benchmarks.`),ye=l(),q=s("p"),Ne=n("This model was contributed by "),Q=s("a"),Ie=n("lhoestq"),Le=n(". The original code can be found "),M=s("a"),Qe=n("here"),Me=n("."),S=l(),fe=s("p"),ee=n("Tips:"),De=l(),te=s("ul"),A=s("li"),ge=s("p"),I=n("DPR consists in three models:"),Se=l(),oe=s("ul"),v=s("li"),D=n("Question encoder: encode questions as vectors"),ot=l(),ae=s("li"),nt=n("Context encoder: encode contexts as vectors"),rt=l(),x=s("li"),st=n("Reader: extract the answer of the questions inside retrieved contexts, along with a relevance score (high if the inferred span actually answers the question)."),Ge=l(),me=s("h2"),_e=s("a"),Ve=s("span"),T(O.$$.fragment),ne=l(),Ye=s("span"),at=n("DPRConfig"),Y=l(),H=s("div"),T(xe.$$.fragment),Be=l(),ve=s("p"),re=s("a"),it=n("DPRConfig"),Ii=n(" is the configuration class to store the configuration of a "),ss=s("em"),Li=n("DPRModel"),Qi=n("."),Mi=l(),Xe=s("p"),Si=n("This is the configuration class to store the configuration of a "),ur=s("a"),Bi=n("DPRContextEncoder"),Hi=n(", "),fr=s("a"),Ki=n("DPRQuestionEncoder"),Ui=n(`, or a
`),mr=s("a"),Wi=n("DPRReader"),Vi=n(`. It is used to instantiate the components of the DPR model according to the specified arguments,
defining the model component architectures. Instantiating a configuration with the defaults will yield a similar
configuration to that of the DPRContextEncoder
`),Wo=s("a"),Yi=n("facebook/dpr-ctx_encoder-single-nq-base"),Gi=n(`
architecture.`),Xi=l(),Vo=s("p"),Ji=n("This class is a subclass of "),gr=s("a"),Zi=n("BertConfig"),ed=n(". Please check the superclass for the documentation of all kwargs."),td=l(),T(Jt.$$.fragment),wa=l(),Dt=s("h2"),Zt=s("a"),as=s("span"),T(Yo.$$.fragment),od=l(),is=s("span"),nd=n("DPRContextEncoderTokenizer"),Ta=l(),Je=s("div"),T(Go.$$.fragment),rd=l(),ds=s("p"),sd=n("Construct a DPRContextEncoder tokenizer."),ad=l(),eo=s("p"),_r=s("a"),id=n("DPRContextEncoderTokenizer"),dd=n(" is identical to "),vr=s("a"),ld=n("BertTokenizer"),cd=n(` and runs end-to-end tokenization: punctuation
splitting and wordpiece.`),pd=l(),Xo=s("p"),hd=n("Refer to superclass "),br=s("a"),ud=n("BertTokenizer"),fd=n(" for usage examples and documentation concerning parameters."),ka=l(),xt=s("h2"),to=s("a"),ls=s("span"),T(Jo.$$.fragment),md=l(),cs=s("span"),gd=n("DPRContextEncoderTokenizerFast"),Pa=l(),Ze=s("div"),T(Zo.$$.fragment),_d=l(),en=s("p"),vd=n("Construct a \u201Cfast\u201D DPRContextEncoder tokenizer (backed by HuggingFace\u2019s "),ps=s("em"),bd=n("tokenizers"),wd=n(" library)."),Td=l(),oo=s("p"),wr=s("a"),kd=n("DPRContextEncoderTokenizerFast"),Pd=n(" is identical to "),Tr=s("a"),$d=n("BertTokenizerFast"),Ed=n(` and runs end-to-end tokenization:
punctuation splitting and wordpiece.`),Rd=l(),tn=s("p"),yd=n("Refer to superclass "),kr=s("a"),Dd=n("BertTokenizerFast"),xd=n(" for usage examples and documentation concerning parameters."),$a=l(),zt=s("h2"),no=s("a"),hs=s("span"),T(on.$$.fragment),zd=l(),us=s("span"),qd=n("DPRQuestionEncoderTokenizer"),Ea=l(),et=s("div"),T(nn.$$.fragment),Cd=l(),fs=s("p"),Fd=n("Constructs a DPRQuestionEncoder tokenizer."),Ad=l(),ro=s("p"),Pr=s("a"),jd=n("DPRQuestionEncoderTokenizer"),Od=n(" is identical to "),$r=s("a"),Nd=n("BertTokenizer"),Id=n(` and runs end-to-end tokenization: punctuation
splitting and wordpiece.`),Ld=l(),rn=s("p"),Qd=n("Refer to superclass "),Er=s("a"),Md=n("BertTokenizer"),Sd=n(" for usage examples and documentation concerning parameters."),Ra=l(),qt=s("h2"),so=s("a"),ms=s("span"),T(sn.$$.fragment),Bd=l(),gs=s("span"),Hd=n("DPRQuestionEncoderTokenizerFast"),ya=l(),tt=s("div"),T(an.$$.fragment),Kd=l(),dn=s("p"),Ud=n("Constructs a \u201Cfast\u201D DPRQuestionEncoder tokenizer (backed by HuggingFace\u2019s "),_s=s("em"),Wd=n("tokenizers"),Vd=n(" library)."),Yd=l(),ao=s("p"),Rr=s("a"),Gd=n("DPRQuestionEncoderTokenizerFast"),Xd=n(" is identical to "),yr=s("a"),Jd=n("BertTokenizerFast"),Zd=n(` and runs end-to-end tokenization:
punctuation splitting and wordpiece.`),el=l(),ln=s("p"),tl=n("Refer to superclass "),Dr=s("a"),ol=n("BertTokenizerFast"),nl=n(" for usage examples and documentation concerning parameters."),Da=l(),Ct=s("h2"),io=s("a"),vs=s("span"),T(cn.$$.fragment),rl=l(),bs=s("span"),sl=n("DPRReaderTokenizer"),xa=l(),be=s("div"),T(pn.$$.fragment),al=l(),ws=s("p"),il=n("Construct a DPRReader tokenizer."),dl=l(),wt=s("p"),xr=s("a"),ll=n("DPRReaderTokenizer"),cl=n(" is almost identical to "),zr=s("a"),pl=n("BertTokenizer"),hl=n(` and runs end-to-end tokenization: punctuation
splitting and wordpiece. The difference is that is has three inputs strings: question, titles and texts that are
combined to be fed to the `),qr=s("a"),ul=n("DPRReader"),fl=n(" model."),ml=l(),hn=s("p"),gl=n("Refer to superclass "),Cr=s("a"),_l=n("BertTokenizer"),vl=n(" for usage examples and documentation concerning parameters."),bl=l(),Tt=s("p"),wl=n("Return a dictionary with the token ids of the input strings and other information to give to "),Ts=s("code"),Tl=n(".decode_best_spans"),kl=n(`.
It converts the strings of a question and different passages (title and text) in a sequence of IDs (integers),
using the tokenizer and vocabulary. The resulting `),ks=s("code"),Pl=n("input_ids"),$l=n(" is a matrix of size "),Ps=s("code"),El=n("(n_passages, sequence_length)"),Rl=l(),T(lo.$$.fragment),za=l(),Ft=s("h2"),co=s("a"),$s=s("span"),T(un.$$.fragment),yl=l(),Es=s("span"),Dl=n("DPRReaderTokenizerFast"),qa=l(),we=s("div"),T(fn.$$.fragment),xl=l(),mn=s("p"),zl=n("Constructs a \u201Cfast\u201D DPRReader tokenizer (backed by HuggingFace\u2019s "),Rs=s("em"),ql=n("tokenizers"),Cl=n(" library)."),Fl=l(),kt=s("p"),Fr=s("a"),Al=n("DPRReaderTokenizerFast"),jl=n(" is almost identical to "),Ar=s("a"),Ol=n("BertTokenizerFast"),Nl=n(` and runs end-to-end tokenization:
punctuation splitting and wordpiece. The difference is that is has three inputs strings: question, titles and texts
that are combined to be fed to the `),jr=s("a"),Il=n("DPRReader"),Ll=n(" model."),Ql=l(),gn=s("p"),Ml=n("Refer to superclass "),Or=s("a"),Sl=n("BertTokenizerFast"),Bl=n(" for usage examples and documentation concerning parameters."),Hl=l(),bt=s("p"),Kl=n("Return a dictionary with the token ids of the input strings and other information to give to "),ys=s("code"),Ul=n(".decode_best_spans"),Wl=n(`.
It converts the strings of a question and different passages (title and text) in a sequence of IDs (integers),
using the tokenizer and vocabulary. The resulting `),Ds=s("code"),Vl=n("input_ids"),Yl=n(" is a matrix of size "),xs=s("code"),Gl=n("(n_passages, sequence_length)"),Xl=n(`
with the format:`),Jl=l(),zs=s("p"),Zl=n("[CLS] <question token ids> [SEP] <titles ids> [SEP] <texts ids>"),Ca=l(),At=s("h2"),po=s("a"),qs=s("span"),T(_n.$$.fragment),ec=l(),Cs=s("span"),tc=n("DPR specific outputs"),Fa=l(),jt=s("div"),T(vn.$$.fragment),oc=l(),bn=s("p"),nc=n("Class for outputs of "),Nr=s("a"),rc=n("DPRQuestionEncoder"),sc=n("."),Aa=l(),Ot=s("div"),T(wn.$$.fragment),ac=l(),Tn=s("p"),ic=n("Class for outputs of "),Ir=s("a"),dc=n("DPRQuestionEncoder"),lc=n("."),ja=l(),Nt=s("div"),T(kn.$$.fragment),cc=l(),Pn=s("p"),pc=n("Class for outputs of "),Lr=s("a"),hc=n("DPRQuestionEncoder"),uc=n("."),Oa=l(),It=s("h2"),ho=s("a"),Fs=s("span"),T($n.$$.fragment),fc=l(),As=s("span"),mc=n("DPRContextEncoder"),Na=l(),He=s("div"),T(En.$$.fragment),gc=l(),js=s("p"),_c=n("The bare DPRContextEncoder transformer outputting pooler outputs as context representations."),vc=l(),Rn=s("p"),bc=n("This model inherits from "),Qr=s("a"),wc=n("PreTrainedModel"),Tc=n(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),kc=l(),yn=s("p"),Pc=n("This model is also a PyTorch "),Dn=s("a"),$c=n("torch.nn.Module"),Ec=n(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Rc=l(),dt=s("div"),T(xn.$$.fragment),yc=l(),Lt=s("p"),Dc=n("The "),Mr=s("a"),xc=n("DPRContextEncoder"),zc=n(" forward method, overrides the "),Os=s("code"),qc=n("__call__"),Cc=n(" special method."),Fc=l(),T(uo.$$.fragment),Ac=l(),T(fo.$$.fragment),Ia=l(),Qt=s("h2"),mo=s("a"),Ns=s("span"),T(zn.$$.fragment),jc=l(),Is=s("span"),Oc=n("DPRQuestionEncoder"),La=l(),Ke=s("div"),T(qn.$$.fragment),Nc=l(),Ls=s("p"),Ic=n("The bare DPRQuestionEncoder transformer outputting pooler outputs as question representations."),Lc=l(),Cn=s("p"),Qc=n("This model inherits from "),Sr=s("a"),Mc=n("PreTrainedModel"),Sc=n(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),Bc=l(),Fn=s("p"),Hc=n("This model is also a PyTorch "),An=s("a"),Kc=n("torch.nn.Module"),Uc=n(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Wc=l(),lt=s("div"),T(jn.$$.fragment),Vc=l(),Mt=s("p"),Yc=n("The "),Br=s("a"),Gc=n("DPRQuestionEncoder"),Xc=n(" forward method, overrides the "),Qs=s("code"),Jc=n("__call__"),Zc=n(" special method."),ep=l(),T(go.$$.fragment),tp=l(),T(_o.$$.fragment),Qa=l(),St=s("h2"),vo=s("a"),Ms=s("span"),T(On.$$.fragment),op=l(),Ss=s("span"),np=n("DPRReader"),Ma=l(),Ue=s("div"),T(Nn.$$.fragment),rp=l(),Bs=s("p"),sp=n("The bare DPRReader transformer outputting span predictions."),ap=l(),In=s("p"),ip=n("This model inherits from "),Hr=s("a"),dp=n("PreTrainedModel"),lp=n(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),cp=l(),Ln=s("p"),pp=n("This model is also a PyTorch "),Qn=s("a"),hp=n("torch.nn.Module"),up=n(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),fp=l(),ct=s("div"),T(Mn.$$.fragment),mp=l(),Bt=s("p"),gp=n("The "),Kr=s("a"),_p=n("DPRReader"),vp=n(" forward method, overrides the "),Hs=s("code"),bp=n("__call__"),wp=n(" special method."),Tp=l(),T(bo.$$.fragment),kp=l(),T(wo.$$.fragment),Sa=l(),Ht=s("h2"),To=s("a"),Ks=s("span"),T(Sn.$$.fragment),Pp=l(),Us=s("span"),$p=n("TFDPRContextEncoder"),Ba=l(),Te=s("div"),T(Bn.$$.fragment),Ep=l(),Ws=s("p"),Rp=n("The bare DPRContextEncoder transformer outputting pooler outputs as context representations."),yp=l(),Hn=s("p"),Dp=n("This model inherits from "),Ur=s("a"),xp=n("TFPreTrainedModel"),zp=n(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),qp=l(),Kn=s("p"),Cp=n("This model is also a Tensorflow "),Un=s("a"),Fp=n("tf.keras.Model"),Ap=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.`),jp=l(),T(ko.$$.fragment),Op=l(),pt=s("div"),T(Wn.$$.fragment),Np=l(),Kt=s("p"),Ip=n("The "),Wr=s("a"),Lp=n("TFDPRContextEncoder"),Qp=n(" forward method, overrides the "),Vs=s("code"),Mp=n("__call__"),Sp=n(" special method."),Bp=l(),T(Po.$$.fragment),Hp=l(),T($o.$$.fragment),Ha=l(),Ut=s("h2"),Eo=s("a"),Ys=s("span"),T(Vn.$$.fragment),Kp=l(),Gs=s("span"),Up=n("TFDPRQuestionEncoder"),Ka=l(),ke=s("div"),T(Yn.$$.fragment),Wp=l(),Xs=s("p"),Vp=n("The bare DPRQuestionEncoder transformer outputting pooler outputs as question representations."),Yp=l(),Gn=s("p"),Gp=n("This model inherits from "),Vr=s("a"),Xp=n("TFPreTrainedModel"),Jp=n(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),Zp=l(),Xn=s("p"),eh=n("This model is also a Tensorflow "),Jn=s("a"),th=n("tf.keras.Model"),oh=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.`),nh=l(),T(Ro.$$.fragment),rh=l(),ht=s("div"),T(Zn.$$.fragment),sh=l(),Wt=s("p"),ah=n("The "),Yr=s("a"),ih=n("TFDPRQuestionEncoder"),dh=n(" forward method, overrides the "),Js=s("code"),lh=n("__call__"),ch=n(" special method."),ph=l(),T(yo.$$.fragment),hh=l(),T(Do.$$.fragment),Ua=l(),Vt=s("h2"),xo=s("a"),Zs=s("span"),T(er.$$.fragment),uh=l(),ea=s("span"),fh=n("TFDPRReader"),Wa=l(),Pe=s("div"),T(tr.$$.fragment),mh=l(),ta=s("p"),gh=n("The bare DPRReader transformer outputting span predictions."),_h=l(),or=s("p"),vh=n("This model inherits from "),Gr=s("a"),bh=n("TFPreTrainedModel"),wh=n(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),Th=l(),nr=s("p"),kh=n("This model is also a Tensorflow "),rr=s("a"),Ph=n("tf.keras.Model"),$h=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.`),Eh=l(),T(zo.$$.fragment),Rh=l(),ut=s("div"),T(sr.$$.fragment),yh=l(),Yt=s("p"),Dh=n("The "),Xr=s("a"),xh=n("TFDPRReader"),zh=n(" forward method, overrides the "),oa=s("code"),qh=n("__call__"),Ch=n(" special method."),Fh=l(),T(qo.$$.fragment),Ah=l(),T(Co.$$.fragment),this.h()},l(o){const m=tm('[data-svelte="svelte-1phssyn"]',document.head);h=a(m,"META",{name:!0,content:!0}),m.forEach(t),w=c(o),_=a(o,"H1",{class:!0});var ar=i(_);g=a(ar,"A",{id:!0,class:!0,href:!0});var na=i(g);b=a(na,"SPAN",{});var ra=i(b);k(d.$$.fragment,ra),ra.forEach(t),na.forEach(t),u=c(ar),z=a(ar,"SPAN",{});var sa=i(z);qe=r(sa,"DPR"),sa.forEach(t),ar.forEach(t),$e=c(o),N=a(o,"DIV",{class:!0});var ir=i(N);le=a(ir,"A",{href:!0});var aa=i(le);X=a(aa,"IMG",{alt:!0,src:!0}),aa.forEach(t),Ce=c(ir),B=a(ir,"A",{href:!0});var ia=i(B);ce=a(ia,"IMG",{alt:!0,src:!0}),ia.forEach(t),ir.forEach(t),V=c(o),J=a(o,"H2",{class:!0});var dr=i(J);se=a(dr,"A",{id:!0,class:!0,href:!0});var da=i(se);K=a(da,"SPAN",{});var la=i(K);k(ie.$$.fragment,la),la.forEach(t),da.forEach(t),Fe=c(dr),U=a(dr,"SPAN",{});var ca=i(U);Ae=r(ca,"Overview"),ca.forEach(t),dr.forEach(t),Ee=c(o),L=a(o,"P",{});var lr=i(L);je=r(lr,`Dense Passage Retrieval (DPR) is a set of tools and models for state-of-the-art open-domain Q&A research. It was
introduced in `),de=a(lr,"A",{href:!0,rel:!0});var pa=i(de);pe=r(pa,"Dense Passage Retrieval for Open-Domain Question Answering"),pa.forEach(t),F=r(lr,` by
Vladimir Karpukhin, Barlas O\u011Fuz, Sewon Min, Patrick Lewis, Ledell Wu, Sergey Edunov, Danqi Chen, Wen-tau Yih.`),lr.forEach(t),j=c(o),he=a(o,"P",{});var ha=i(he);Z=r(ha,"The abstract from the paper is the following:"),ha.forEach(t),Re=c(o),ue=a(o,"P",{});var ua=i(ue);W=a(ua,"EM",{});var fa=i(W);Oe=r(fa,`Open-domain question answering relies on efficient passage retrieval to select candidate contexts, where traditional
sparse vector space models, such as TF-IDF or BM25, are the de facto method. In this work, we show that retrieval can
be practically implemented using dense representations alone, where embeddings are learned from a small number of
questions and passages by a simple dual-encoder framework. When evaluated on a wide range of open-domain QA datasets,
our dense retriever outperforms a strong Lucene-BM25 system largely by 9%-19% absolute in terms of top-20 passage
retrieval accuracy, and helps our end-to-end QA system establish new state-of-the-art on multiple open-domain QA
benchmarks.`),fa.forEach(t),ua.forEach(t),ye=c(o),q=a(o,"P",{});var Gt=i(q);Ne=r(Gt,"This model was contributed by "),Q=a(Gt,"A",{href:!0,rel:!0});var jh=i(Q);Ie=r(jh,"lhoestq"),jh.forEach(t),Le=r(Gt,". The original code can be found "),M=a(Gt,"A",{href:!0,rel:!0});var Oh=i(M);Qe=r(Oh,"here"),Oh.forEach(t),Me=r(Gt,"."),Gt.forEach(t),S=c(o),fe=a(o,"P",{});var Nh=i(fe);ee=r(Nh,"Tips:"),Nh.forEach(t),De=c(o),te=a(o,"UL",{});var Ih=i(te);A=a(Ih,"LI",{});var Ya=i(A);ge=a(Ya,"P",{});var Lh=i(ge);I=r(Lh,"DPR consists in three models:"),Lh.forEach(t),Se=c(Ya),oe=a(Ya,"UL",{});var Jr=i(oe);v=a(Jr,"LI",{});var Qh=i(v);D=r(Qh,"Question encoder: encode questions as vectors"),Qh.forEach(t),ot=c(Jr),ae=a(Jr,"LI",{});var Mh=i(ae);nt=r(Mh,"Context encoder: encode contexts as vectors"),Mh.forEach(t),rt=c(Jr),x=a(Jr,"LI",{});var Sh=i(x);st=r(Sh,"Reader: extract the answer of the questions inside retrieved contexts, along with a relevance score (high if the inferred span actually answers the question)."),Sh.forEach(t),Jr.forEach(t),Ya.forEach(t),Ih.forEach(t),Ge=c(o),me=a(o,"H2",{class:!0});var Ga=i(me);_e=a(Ga,"A",{id:!0,class:!0,href:!0});var Bh=i(_e);Ve=a(Bh,"SPAN",{});var Hh=i(Ve);k(O.$$.fragment,Hh),Hh.forEach(t),Bh.forEach(t),ne=c(Ga),Ye=a(Ga,"SPAN",{});var Kh=i(Ye);at=r(Kh,"DPRConfig"),Kh.forEach(t),Ga.forEach(t),Y=c(o),H=a(o,"DIV",{class:!0});var Pt=i(H);k(xe.$$.fragment,Pt),Be=c(Pt),ve=a(Pt,"P",{});var ma=i(ve);re=a(ma,"A",{href:!0});var Uh=i(re);it=r(Uh,"DPRConfig"),Uh.forEach(t),Ii=r(ma," is the configuration class to store the configuration of a "),ss=a(ma,"EM",{});var Wh=i(ss);Li=r(Wh,"DPRModel"),Wh.forEach(t),Qi=r(ma,"."),ma.forEach(t),Mi=c(Pt),Xe=a(Pt,"P",{});var $t=i(Xe);Si=r($t,"This is the configuration class to store the configuration of a "),ur=a($t,"A",{href:!0});var Vh=i(ur);Bi=r(Vh,"DPRContextEncoder"),Vh.forEach(t),Hi=r($t,", "),fr=a($t,"A",{href:!0});var Yh=i(fr);Ki=r(Yh,"DPRQuestionEncoder"),Yh.forEach(t),Ui=r($t,`, or a
`),mr=a($t,"A",{href:!0});var Gh=i(mr);Wi=r(Gh,"DPRReader"),Gh.forEach(t),Vi=r($t,`. It is used to instantiate the components of the DPR model according to the specified arguments,
defining the model component architectures. Instantiating a configuration with the defaults will yield a similar
configuration to that of the DPRContextEncoder
`),Wo=a($t,"A",{href:!0,rel:!0});var Xh=i(Wo);Yi=r(Xh,"facebook/dpr-ctx_encoder-single-nq-base"),Xh.forEach(t),Gi=r($t,`
architecture.`),$t.forEach(t),Xi=c(Pt),Vo=a(Pt,"P",{});var Xa=i(Vo);Ji=r(Xa,"This class is a subclass of "),gr=a(Xa,"A",{href:!0});var Jh=i(gr);Zi=r(Jh,"BertConfig"),Jh.forEach(t),ed=r(Xa,". Please check the superclass for the documentation of all kwargs."),Xa.forEach(t),td=c(Pt),k(Jt.$$.fragment,Pt),Pt.forEach(t),wa=c(o),Dt=a(o,"H2",{class:!0});var Ja=i(Dt);Zt=a(Ja,"A",{id:!0,class:!0,href:!0});var Zh=i(Zt);as=a(Zh,"SPAN",{});var eu=i(as);k(Yo.$$.fragment,eu),eu.forEach(t),Zh.forEach(t),od=c(Ja),is=a(Ja,"SPAN",{});var tu=i(is);nd=r(tu,"DPRContextEncoderTokenizer"),tu.forEach(t),Ja.forEach(t),Ta=c(o),Je=a(o,"DIV",{class:!0});var Fo=i(Je);k(Go.$$.fragment,Fo),rd=c(Fo),ds=a(Fo,"P",{});var ou=i(ds);sd=r(ou,"Construct a DPRContextEncoder tokenizer."),ou.forEach(t),ad=c(Fo),eo=a(Fo,"P",{});var ga=i(eo);_r=a(ga,"A",{href:!0});var nu=i(_r);id=r(nu,"DPRContextEncoderTokenizer"),nu.forEach(t),dd=r(ga," is identical to "),vr=a(ga,"A",{href:!0});var ru=i(vr);ld=r(ru,"BertTokenizer"),ru.forEach(t),cd=r(ga,` and runs end-to-end tokenization: punctuation
splitting and wordpiece.`),ga.forEach(t),pd=c(Fo),Xo=a(Fo,"P",{});var Za=i(Xo);hd=r(Za,"Refer to superclass "),br=a(Za,"A",{href:!0});var su=i(br);ud=r(su,"BertTokenizer"),su.forEach(t),fd=r(Za," for usage examples and documentation concerning parameters."),Za.forEach(t),Fo.forEach(t),ka=c(o),xt=a(o,"H2",{class:!0});var ei=i(xt);to=a(ei,"A",{id:!0,class:!0,href:!0});var au=i(to);ls=a(au,"SPAN",{});var iu=i(ls);k(Jo.$$.fragment,iu),iu.forEach(t),au.forEach(t),md=c(ei),cs=a(ei,"SPAN",{});var du=i(cs);gd=r(du,"DPRContextEncoderTokenizerFast"),du.forEach(t),ei.forEach(t),Pa=c(o),Ze=a(o,"DIV",{class:!0});var Ao=i(Ze);k(Zo.$$.fragment,Ao),_d=c(Ao),en=a(Ao,"P",{});var ti=i(en);vd=r(ti,"Construct a \u201Cfast\u201D DPRContextEncoder tokenizer (backed by HuggingFace\u2019s "),ps=a(ti,"EM",{});var lu=i(ps);bd=r(lu,"tokenizers"),lu.forEach(t),wd=r(ti," library)."),ti.forEach(t),Td=c(Ao),oo=a(Ao,"P",{});var _a=i(oo);wr=a(_a,"A",{href:!0});var cu=i(wr);kd=r(cu,"DPRContextEncoderTokenizerFast"),cu.forEach(t),Pd=r(_a," is identical to "),Tr=a(_a,"A",{href:!0});var pu=i(Tr);$d=r(pu,"BertTokenizerFast"),pu.forEach(t),Ed=r(_a,` and runs end-to-end tokenization:
punctuation splitting and wordpiece.`),_a.forEach(t),Rd=c(Ao),tn=a(Ao,"P",{});var oi=i(tn);yd=r(oi,"Refer to superclass "),kr=a(oi,"A",{href:!0});var hu=i(kr);Dd=r(hu,"BertTokenizerFast"),hu.forEach(t),xd=r(oi," for usage examples and documentation concerning parameters."),oi.forEach(t),Ao.forEach(t),$a=c(o),zt=a(o,"H2",{class:!0});var ni=i(zt);no=a(ni,"A",{id:!0,class:!0,href:!0});var uu=i(no);hs=a(uu,"SPAN",{});var fu=i(hs);k(on.$$.fragment,fu),fu.forEach(t),uu.forEach(t),zd=c(ni),us=a(ni,"SPAN",{});var mu=i(us);qd=r(mu,"DPRQuestionEncoderTokenizer"),mu.forEach(t),ni.forEach(t),Ea=c(o),et=a(o,"DIV",{class:!0});var jo=i(et);k(nn.$$.fragment,jo),Cd=c(jo),fs=a(jo,"P",{});var gu=i(fs);Fd=r(gu,"Constructs a DPRQuestionEncoder tokenizer."),gu.forEach(t),Ad=c(jo),ro=a(jo,"P",{});var va=i(ro);Pr=a(va,"A",{href:!0});var _u=i(Pr);jd=r(_u,"DPRQuestionEncoderTokenizer"),_u.forEach(t),Od=r(va," is identical to "),$r=a(va,"A",{href:!0});var vu=i($r);Nd=r(vu,"BertTokenizer"),vu.forEach(t),Id=r(va,` and runs end-to-end tokenization: punctuation
splitting and wordpiece.`),va.forEach(t),Ld=c(jo),rn=a(jo,"P",{});var ri=i(rn);Qd=r(ri,"Refer to superclass "),Er=a(ri,"A",{href:!0});var bu=i(Er);Md=r(bu,"BertTokenizer"),bu.forEach(t),Sd=r(ri," for usage examples and documentation concerning parameters."),ri.forEach(t),jo.forEach(t),Ra=c(o),qt=a(o,"H2",{class:!0});var si=i(qt);so=a(si,"A",{id:!0,class:!0,href:!0});var wu=i(so);ms=a(wu,"SPAN",{});var Tu=i(ms);k(sn.$$.fragment,Tu),Tu.forEach(t),wu.forEach(t),Bd=c(si),gs=a(si,"SPAN",{});var ku=i(gs);Hd=r(ku,"DPRQuestionEncoderTokenizerFast"),ku.forEach(t),si.forEach(t),ya=c(o),tt=a(o,"DIV",{class:!0});var Oo=i(tt);k(an.$$.fragment,Oo),Kd=c(Oo),dn=a(Oo,"P",{});var ai=i(dn);Ud=r(ai,"Constructs a \u201Cfast\u201D DPRQuestionEncoder tokenizer (backed by HuggingFace\u2019s "),_s=a(ai,"EM",{});var Pu=i(_s);Wd=r(Pu,"tokenizers"),Pu.forEach(t),Vd=r(ai," library)."),ai.forEach(t),Yd=c(Oo),ao=a(Oo,"P",{});var ba=i(ao);Rr=a(ba,"A",{href:!0});var $u=i(Rr);Gd=r($u,"DPRQuestionEncoderTokenizerFast"),$u.forEach(t),Xd=r(ba," is identical to "),yr=a(ba,"A",{href:!0});var Eu=i(yr);Jd=r(Eu,"BertTokenizerFast"),Eu.forEach(t),Zd=r(ba,` and runs end-to-end tokenization:
punctuation splitting and wordpiece.`),ba.forEach(t),el=c(Oo),ln=a(Oo,"P",{});var ii=i(ln);tl=r(ii,"Refer to superclass "),Dr=a(ii,"A",{href:!0});var Ru=i(Dr);ol=r(Ru,"BertTokenizerFast"),Ru.forEach(t),nl=r(ii," for usage examples and documentation concerning parameters."),ii.forEach(t),Oo.forEach(t),Da=c(o),Ct=a(o,"H2",{class:!0});var di=i(Ct);io=a(di,"A",{id:!0,class:!0,href:!0});var yu=i(io);vs=a(yu,"SPAN",{});var Du=i(vs);k(cn.$$.fragment,Du),Du.forEach(t),yu.forEach(t),rl=c(di),bs=a(di,"SPAN",{});var xu=i(bs);sl=r(xu,"DPRReaderTokenizer"),xu.forEach(t),di.forEach(t),xa=c(o),be=a(o,"DIV",{class:!0});var ft=i(be);k(pn.$$.fragment,ft),al=c(ft),ws=a(ft,"P",{});var zu=i(ws);il=r(zu,"Construct a DPRReader tokenizer."),zu.forEach(t),dl=c(ft),wt=a(ft,"P",{});var cr=i(wt);xr=a(cr,"A",{href:!0});var qu=i(xr);ll=r(qu,"DPRReaderTokenizer"),qu.forEach(t),cl=r(cr," is almost identical to "),zr=a(cr,"A",{href:!0});var Cu=i(zr);pl=r(Cu,"BertTokenizer"),Cu.forEach(t),hl=r(cr,` and runs end-to-end tokenization: punctuation
splitting and wordpiece. The difference is that is has three inputs strings: question, titles and texts that are
combined to be fed to the `),qr=a(cr,"A",{href:!0});var Fu=i(qr);ul=r(Fu,"DPRReader"),Fu.forEach(t),fl=r(cr," model."),cr.forEach(t),ml=c(ft),hn=a(ft,"P",{});var li=i(hn);gl=r(li,"Refer to superclass "),Cr=a(li,"A",{href:!0});var Au=i(Cr);_l=r(Au,"BertTokenizer"),Au.forEach(t),vl=r(li," for usage examples and documentation concerning parameters."),li.forEach(t),bl=c(ft),Tt=a(ft,"P",{});var pr=i(Tt);wl=r(pr,"Return a dictionary with the token ids of the input strings and other information to give to "),Ts=a(pr,"CODE",{});var ju=i(Ts);Tl=r(ju,".decode_best_spans"),ju.forEach(t),kl=r(pr,`.
It converts the strings of a question and different passages (title and text) in a sequence of IDs (integers),
using the tokenizer and vocabulary. The resulting `),ks=a(pr,"CODE",{});var Ou=i(ks);Pl=r(Ou,"input_ids"),Ou.forEach(t),$l=r(pr," is a matrix of size "),Ps=a(pr,"CODE",{});var Nu=i(Ps);El=r(Nu,"(n_passages, sequence_length)"),Nu.forEach(t),pr.forEach(t),Rl=c(ft),k(lo.$$.fragment,ft),ft.forEach(t),za=c(o),Ft=a(o,"H2",{class:!0});var ci=i(Ft);co=a(ci,"A",{id:!0,class:!0,href:!0});var Iu=i(co);$s=a(Iu,"SPAN",{});var Lu=i($s);k(un.$$.fragment,Lu),Lu.forEach(t),Iu.forEach(t),yl=c(ci),Es=a(ci,"SPAN",{});var Qu=i(Es);Dl=r(Qu,"DPRReaderTokenizerFast"),Qu.forEach(t),ci.forEach(t),qa=c(o),we=a(o,"DIV",{class:!0});var mt=i(we);k(fn.$$.fragment,mt),xl=c(mt),mn=a(mt,"P",{});var pi=i(mn);zl=r(pi,"Constructs a \u201Cfast\u201D DPRReader tokenizer (backed by HuggingFace\u2019s "),Rs=a(pi,"EM",{});var Mu=i(Rs);ql=r(Mu,"tokenizers"),Mu.forEach(t),Cl=r(pi," library)."),pi.forEach(t),Fl=c(mt),kt=a(mt,"P",{});var hr=i(kt);Fr=a(hr,"A",{href:!0});var Su=i(Fr);Al=r(Su,"DPRReaderTokenizerFast"),Su.forEach(t),jl=r(hr," is almost identical to "),Ar=a(hr,"A",{href:!0});var Bu=i(Ar);Ol=r(Bu,"BertTokenizerFast"),Bu.forEach(t),Nl=r(hr,` and runs end-to-end tokenization:
punctuation splitting and wordpiece. The difference is that is has three inputs strings: question, titles and texts
that are combined to be fed to the `),jr=a(hr,"A",{href:!0});var Hu=i(jr);Il=r(Hu,"DPRReader"),Hu.forEach(t),Ll=r(hr," model."),hr.forEach(t),Ql=c(mt),gn=a(mt,"P",{});var hi=i(gn);Ml=r(hi,"Refer to superclass "),Or=a(hi,"A",{href:!0});var Ku=i(Or);Sl=r(Ku,"BertTokenizerFast"),Ku.forEach(t),Bl=r(hi," for usage examples and documentation concerning parameters."),hi.forEach(t),Hl=c(mt),bt=a(mt,"P",{});var No=i(bt);Kl=r(No,"Return a dictionary with the token ids of the input strings and other information to give to "),ys=a(No,"CODE",{});var Uu=i(ys);Ul=r(Uu,".decode_best_spans"),Uu.forEach(t),Wl=r(No,`.
It converts the strings of a question and different passages (title and text) in a sequence of IDs (integers),
using the tokenizer and vocabulary. The resulting `),Ds=a(No,"CODE",{});var Wu=i(Ds);Vl=r(Wu,"input_ids"),Wu.forEach(t),Yl=r(No," is a matrix of size "),xs=a(No,"CODE",{});var Vu=i(xs);Gl=r(Vu,"(n_passages, sequence_length)"),Vu.forEach(t),Xl=r(No,`
with the format:`),No.forEach(t),Jl=c(mt),zs=a(mt,"P",{});var Yu=i(zs);Zl=r(Yu,"[CLS] <question token ids> [SEP] <titles ids> [SEP] <texts ids>"),Yu.forEach(t),mt.forEach(t),Ca=c(o),At=a(o,"H2",{class:!0});var ui=i(At);po=a(ui,"A",{id:!0,class:!0,href:!0});var Gu=i(po);qs=a(Gu,"SPAN",{});var Xu=i(qs);k(_n.$$.fragment,Xu),Xu.forEach(t),Gu.forEach(t),ec=c(ui),Cs=a(ui,"SPAN",{});var Ju=i(Cs);tc=r(Ju,"DPR specific outputs"),Ju.forEach(t),ui.forEach(t),Fa=c(o),jt=a(o,"DIV",{class:!0});var fi=i(jt);k(vn.$$.fragment,fi),oc=c(fi),bn=a(fi,"P",{});var mi=i(bn);nc=r(mi,"Class for outputs of "),Nr=a(mi,"A",{href:!0});var Zu=i(Nr);rc=r(Zu,"DPRQuestionEncoder"),Zu.forEach(t),sc=r(mi,"."),mi.forEach(t),fi.forEach(t),Aa=c(o),Ot=a(o,"DIV",{class:!0});var gi=i(Ot);k(wn.$$.fragment,gi),ac=c(gi),Tn=a(gi,"P",{});var _i=i(Tn);ic=r(_i,"Class for outputs of "),Ir=a(_i,"A",{href:!0});var ef=i(Ir);dc=r(ef,"DPRQuestionEncoder"),ef.forEach(t),lc=r(_i,"."),_i.forEach(t),gi.forEach(t),ja=c(o),Nt=a(o,"DIV",{class:!0});var vi=i(Nt);k(kn.$$.fragment,vi),cc=c(vi),Pn=a(vi,"P",{});var bi=i(Pn);pc=r(bi,"Class for outputs of "),Lr=a(bi,"A",{href:!0});var tf=i(Lr);hc=r(tf,"DPRQuestionEncoder"),tf.forEach(t),uc=r(bi,"."),bi.forEach(t),vi.forEach(t),Oa=c(o),It=a(o,"H2",{class:!0});var wi=i(It);ho=a(wi,"A",{id:!0,class:!0,href:!0});var of=i(ho);Fs=a(of,"SPAN",{});var nf=i(Fs);k($n.$$.fragment,nf),nf.forEach(t),of.forEach(t),fc=c(wi),As=a(wi,"SPAN",{});var rf=i(As);mc=r(rf,"DPRContextEncoder"),rf.forEach(t),wi.forEach(t),Na=c(o),He=a(o,"DIV",{class:!0});var Et=i(He);k(En.$$.fragment,Et),gc=c(Et),js=a(Et,"P",{});var sf=i(js);_c=r(sf,"The bare DPRContextEncoder transformer outputting pooler outputs as context representations."),sf.forEach(t),vc=c(Et),Rn=a(Et,"P",{});var Ti=i(Rn);bc=r(Ti,"This model inherits from "),Qr=a(Ti,"A",{href:!0});var af=i(Qr);wc=r(af,"PreTrainedModel"),af.forEach(t),Tc=r(Ti,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),Ti.forEach(t),kc=c(Et),yn=a(Et,"P",{});var ki=i(yn);Pc=r(ki,"This model is also a PyTorch "),Dn=a(ki,"A",{href:!0,rel:!0});var df=i(Dn);$c=r(df,"torch.nn.Module"),df.forEach(t),Ec=r(ki,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),ki.forEach(t),Rc=c(Et),dt=a(Et,"DIV",{class:!0});var Io=i(dt);k(xn.$$.fragment,Io),yc=c(Io),Lt=a(Io,"P",{});var Zr=i(Lt);Dc=r(Zr,"The "),Mr=a(Zr,"A",{href:!0});var lf=i(Mr);xc=r(lf,"DPRContextEncoder"),lf.forEach(t),zc=r(Zr," forward method, overrides the "),Os=a(Zr,"CODE",{});var cf=i(Os);qc=r(cf,"__call__"),cf.forEach(t),Cc=r(Zr," special method."),Zr.forEach(t),Fc=c(Io),k(uo.$$.fragment,Io),Ac=c(Io),k(fo.$$.fragment,Io),Io.forEach(t),Et.forEach(t),Ia=c(o),Qt=a(o,"H2",{class:!0});var Pi=i(Qt);mo=a(Pi,"A",{id:!0,class:!0,href:!0});var pf=i(mo);Ns=a(pf,"SPAN",{});var hf=i(Ns);k(zn.$$.fragment,hf),hf.forEach(t),pf.forEach(t),jc=c(Pi),Is=a(Pi,"SPAN",{});var uf=i(Is);Oc=r(uf,"DPRQuestionEncoder"),uf.forEach(t),Pi.forEach(t),La=c(o),Ke=a(o,"DIV",{class:!0});var Rt=i(Ke);k(qn.$$.fragment,Rt),Nc=c(Rt),Ls=a(Rt,"P",{});var ff=i(Ls);Ic=r(ff,"The bare DPRQuestionEncoder transformer outputting pooler outputs as question representations."),ff.forEach(t),Lc=c(Rt),Cn=a(Rt,"P",{});var $i=i(Cn);Qc=r($i,"This model inherits from "),Sr=a($i,"A",{href:!0});var mf=i(Sr);Mc=r(mf,"PreTrainedModel"),mf.forEach(t),Sc=r($i,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),$i.forEach(t),Bc=c(Rt),Fn=a(Rt,"P",{});var Ei=i(Fn);Hc=r(Ei,"This model is also a PyTorch "),An=a(Ei,"A",{href:!0,rel:!0});var gf=i(An);Kc=r(gf,"torch.nn.Module"),gf.forEach(t),Uc=r(Ei,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Ei.forEach(t),Wc=c(Rt),lt=a(Rt,"DIV",{class:!0});var Lo=i(lt);k(jn.$$.fragment,Lo),Vc=c(Lo),Mt=a(Lo,"P",{});var es=i(Mt);Yc=r(es,"The "),Br=a(es,"A",{href:!0});var _f=i(Br);Gc=r(_f,"DPRQuestionEncoder"),_f.forEach(t),Xc=r(es," forward method, overrides the "),Qs=a(es,"CODE",{});var vf=i(Qs);Jc=r(vf,"__call__"),vf.forEach(t),Zc=r(es," special method."),es.forEach(t),ep=c(Lo),k(go.$$.fragment,Lo),tp=c(Lo),k(_o.$$.fragment,Lo),Lo.forEach(t),Rt.forEach(t),Qa=c(o),St=a(o,"H2",{class:!0});var Ri=i(St);vo=a(Ri,"A",{id:!0,class:!0,href:!0});var bf=i(vo);Ms=a(bf,"SPAN",{});var wf=i(Ms);k(On.$$.fragment,wf),wf.forEach(t),bf.forEach(t),op=c(Ri),Ss=a(Ri,"SPAN",{});var Tf=i(Ss);np=r(Tf,"DPRReader"),Tf.forEach(t),Ri.forEach(t),Ma=c(o),Ue=a(o,"DIV",{class:!0});var yt=i(Ue);k(Nn.$$.fragment,yt),rp=c(yt),Bs=a(yt,"P",{});var kf=i(Bs);sp=r(kf,"The bare DPRReader transformer outputting span predictions."),kf.forEach(t),ap=c(yt),In=a(yt,"P",{});var yi=i(In);ip=r(yi,"This model inherits from "),Hr=a(yi,"A",{href:!0});var Pf=i(Hr);dp=r(Pf,"PreTrainedModel"),Pf.forEach(t),lp=r(yi,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),yi.forEach(t),cp=c(yt),Ln=a(yt,"P",{});var Di=i(Ln);pp=r(Di,"This model is also a PyTorch "),Qn=a(Di,"A",{href:!0,rel:!0});var $f=i(Qn);hp=r($f,"torch.nn.Module"),$f.forEach(t),up=r(Di,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Di.forEach(t),fp=c(yt),ct=a(yt,"DIV",{class:!0});var Qo=i(ct);k(Mn.$$.fragment,Qo),mp=c(Qo),Bt=a(Qo,"P",{});var ts=i(Bt);gp=r(ts,"The "),Kr=a(ts,"A",{href:!0});var Ef=i(Kr);_p=r(Ef,"DPRReader"),Ef.forEach(t),vp=r(ts," forward method, overrides the "),Hs=a(ts,"CODE",{});var Rf=i(Hs);bp=r(Rf,"__call__"),Rf.forEach(t),wp=r(ts," special method."),ts.forEach(t),Tp=c(Qo),k(bo.$$.fragment,Qo),kp=c(Qo),k(wo.$$.fragment,Qo),Qo.forEach(t),yt.forEach(t),Sa=c(o),Ht=a(o,"H2",{class:!0});var xi=i(Ht);To=a(xi,"A",{id:!0,class:!0,href:!0});var yf=i(To);Ks=a(yf,"SPAN",{});var Df=i(Ks);k(Sn.$$.fragment,Df),Df.forEach(t),yf.forEach(t),Pp=c(xi),Us=a(xi,"SPAN",{});var xf=i(Us);$p=r(xf,"TFDPRContextEncoder"),xf.forEach(t),xi.forEach(t),Ba=c(o),Te=a(o,"DIV",{class:!0});var gt=i(Te);k(Bn.$$.fragment,gt),Ep=c(gt),Ws=a(gt,"P",{});var zf=i(Ws);Rp=r(zf,"The bare DPRContextEncoder transformer outputting pooler outputs as context representations."),zf.forEach(t),yp=c(gt),Hn=a(gt,"P",{});var zi=i(Hn);Dp=r(zi,"This model inherits from "),Ur=a(zi,"A",{href:!0});var qf=i(Ur);xp=r(qf,"TFPreTrainedModel"),qf.forEach(t),zp=r(zi,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),zi.forEach(t),qp=c(gt),Kn=a(gt,"P",{});var qi=i(Kn);Cp=r(qi,"This model is also a Tensorflow "),Un=a(qi,"A",{href:!0,rel:!0});var Cf=i(Un);Fp=r(Cf,"tf.keras.Model"),Cf.forEach(t),Ap=r(qi,`
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.`),qi.forEach(t),jp=c(gt),k(ko.$$.fragment,gt),Op=c(gt),pt=a(gt,"DIV",{class:!0});var Mo=i(pt);k(Wn.$$.fragment,Mo),Np=c(Mo),Kt=a(Mo,"P",{});var os=i(Kt);Ip=r(os,"The "),Wr=a(os,"A",{href:!0});var Ff=i(Wr);Lp=r(Ff,"TFDPRContextEncoder"),Ff.forEach(t),Qp=r(os," forward method, overrides the "),Vs=a(os,"CODE",{});var Af=i(Vs);Mp=r(Af,"__call__"),Af.forEach(t),Sp=r(os," special method."),os.forEach(t),Bp=c(Mo),k(Po.$$.fragment,Mo),Hp=c(Mo),k($o.$$.fragment,Mo),Mo.forEach(t),gt.forEach(t),Ha=c(o),Ut=a(o,"H2",{class:!0});var Ci=i(Ut);Eo=a(Ci,"A",{id:!0,class:!0,href:!0});var jf=i(Eo);Ys=a(jf,"SPAN",{});var Of=i(Ys);k(Vn.$$.fragment,Of),Of.forEach(t),jf.forEach(t),Kp=c(Ci),Gs=a(Ci,"SPAN",{});var Nf=i(Gs);Up=r(Nf,"TFDPRQuestionEncoder"),Nf.forEach(t),Ci.forEach(t),Ka=c(o),ke=a(o,"DIV",{class:!0});var _t=i(ke);k(Yn.$$.fragment,_t),Wp=c(_t),Xs=a(_t,"P",{});var If=i(Xs);Vp=r(If,"The bare DPRQuestionEncoder transformer outputting pooler outputs as question representations."),If.forEach(t),Yp=c(_t),Gn=a(_t,"P",{});var Fi=i(Gn);Gp=r(Fi,"This model inherits from "),Vr=a(Fi,"A",{href:!0});var Lf=i(Vr);Xp=r(Lf,"TFPreTrainedModel"),Lf.forEach(t),Jp=r(Fi,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),Fi.forEach(t),Zp=c(_t),Xn=a(_t,"P",{});var Ai=i(Xn);eh=r(Ai,"This model is also a Tensorflow "),Jn=a(Ai,"A",{href:!0,rel:!0});var Qf=i(Jn);th=r(Qf,"tf.keras.Model"),Qf.forEach(t),oh=r(Ai,`
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.`),Ai.forEach(t),nh=c(_t),k(Ro.$$.fragment,_t),rh=c(_t),ht=a(_t,"DIV",{class:!0});var So=i(ht);k(Zn.$$.fragment,So),sh=c(So),Wt=a(So,"P",{});var ns=i(Wt);ah=r(ns,"The "),Yr=a(ns,"A",{href:!0});var Mf=i(Yr);ih=r(Mf,"TFDPRQuestionEncoder"),Mf.forEach(t),dh=r(ns," forward method, overrides the "),Js=a(ns,"CODE",{});var Sf=i(Js);lh=r(Sf,"__call__"),Sf.forEach(t),ch=r(ns," special method."),ns.forEach(t),ph=c(So),k(yo.$$.fragment,So),hh=c(So),k(Do.$$.fragment,So),So.forEach(t),_t.forEach(t),Ua=c(o),Vt=a(o,"H2",{class:!0});var ji=i(Vt);xo=a(ji,"A",{id:!0,class:!0,href:!0});var Bf=i(xo);Zs=a(Bf,"SPAN",{});var Hf=i(Zs);k(er.$$.fragment,Hf),Hf.forEach(t),Bf.forEach(t),uh=c(ji),ea=a(ji,"SPAN",{});var Kf=i(ea);fh=r(Kf,"TFDPRReader"),Kf.forEach(t),ji.forEach(t),Wa=c(o),Pe=a(o,"DIV",{class:!0});var vt=i(Pe);k(tr.$$.fragment,vt),mh=c(vt),ta=a(vt,"P",{});var Uf=i(ta);gh=r(Uf,"The bare DPRReader transformer outputting span predictions."),Uf.forEach(t),_h=c(vt),or=a(vt,"P",{});var Oi=i(or);vh=r(Oi,"This model inherits from "),Gr=a(Oi,"A",{href:!0});var Wf=i(Gr);bh=r(Wf,"TFPreTrainedModel"),Wf.forEach(t),wh=r(Oi,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),Oi.forEach(t),Th=c(vt),nr=a(vt,"P",{});var Ni=i(nr);kh=r(Ni,"This model is also a Tensorflow "),rr=a(Ni,"A",{href:!0,rel:!0});var Vf=i(rr);Ph=r(Vf,"tf.keras.Model"),Vf.forEach(t),$h=r(Ni,`
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.`),Ni.forEach(t),Eh=c(vt),k(zo.$$.fragment,vt),Rh=c(vt),ut=a(vt,"DIV",{class:!0});var Bo=i(ut);k(sr.$$.fragment,Bo),yh=c(Bo),Yt=a(Bo,"P",{});var rs=i(Yt);Dh=r(rs,"The "),Xr=a(rs,"A",{href:!0});var Yf=i(Xr);xh=r(Yf,"TFDPRReader"),Yf.forEach(t),zh=r(rs," forward method, overrides the "),oa=a(rs,"CODE",{});var Gf=i(oa);qh=r(Gf,"__call__"),Gf.forEach(t),Ch=r(rs," special method."),rs.forEach(t),Fh=c(Bo),k(qo.$$.fragment,Bo),Ah=c(Bo),k(Co.$$.fragment,Bo),Bo.forEach(t),vt.forEach(t),this.h()},h(){p(h,"name","hf:doc:metadata"),p(h,"content",JSON.stringify(Tm)),p(g,"id","dpr"),p(g,"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"),p(g,"href","#dpr"),p(_,"class","relative group"),p(X,"alt","Models"),Xf(X.src,y="https://img.shields.io/badge/All_model_pages-dpr-blueviolet")||p(X,"src",y),p(le,"href","https://huggingface.co/models?filter=dpr"),p(ce,"alt","Spaces"),Xf(ce.src,We="https://img.shields.io/badge/%F0%9F%A4%97%20Hugging%20Face-Spaces-blue")||p(ce,"src",We),p(B,"href","https://huggingface.co/spaces/docs-demos/dpr-question_encoder-bert-base-multilingual"),p(N,"class","flex flex-wrap space-x-1"),p(se,"id","overview"),p(se,"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"),p(se,"href","#overview"),p(J,"class","relative group"),p(de,"href","https://arxiv.org/abs/2004.04906"),p(de,"rel","nofollow"),p(Q,"href","https://huggingface.co/lhoestq"),p(Q,"rel","nofollow"),p(M,"href","https://github.com/facebookresearch/DPR"),p(M,"rel","nofollow"),p(_e,"id","transformers.DPRConfig"),p(_e,"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"),p(_e,"href","#transformers.DPRConfig"),p(me,"class","relative group"),p(re,"href","/docs/transformers/v4.27.1/en/model_doc/dpr#transformers.DPRConfig"),p(ur,"href","/docs/transformers/v4.27.1/en/model_doc/dpr#transformers.DPRContextEncoder"),p(fr,"href","/docs/transformers/v4.27.1/en/model_doc/dpr#transformers.DPRQuestionEncoder"),p(mr,"href","/docs/transformers/v4.27.1/en/model_doc/dpr#transformers.DPRReader"),p(Wo,"href","https://huggingface.co/facebook/dpr-ctx_encoder-single-nq-base"),p(Wo,"rel","nofollow"),p(gr,"href","/docs/transformers/v4.27.1/en/model_doc/bert#transformers.BertConfig"),p(H,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(Zt,"id","transformers.DPRContextEncoderTokenizer"),p(Zt,"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"),p(Zt,"href","#transformers.DPRContextEncoderTokenizer"),p(Dt,"class","relative group"),p(_r,"href","/docs/transformers/v4.27.1/en/model_doc/dpr#transformers.DPRContextEncoderTokenizer"),p(vr,"href","/docs/transformers/v4.27.1/en/model_doc/bert#transformers.BertTokenizer"),p(br,"href","/docs/transformers/v4.27.1/en/model_doc/bert#transformers.BertTokenizer"),p(Je,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(to,"id","transformers.DPRContextEncoderTokenizerFast"),p(to,"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"),p(to,"href","#transformers.DPRContextEncoderTokenizerFast"),p(xt,"class","relative group"),p(wr,"href","/docs/transformers/v4.27.1/en/model_doc/dpr#transformers.DPRContextEncoderTokenizerFast"),p(Tr,"href","/docs/transformers/v4.27.1/en/model_doc/bert#transformers.BertTokenizerFast"),p(kr,"href","/docs/transformers/v4.27.1/en/model_doc/bert#transformers.BertTokenizerFast"),p(Ze,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(no,"id","transformers.DPRQuestionEncoderTokenizer"),p(no,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),p(no,"href","#transformers.DPRQuestionEncoderTokenizer"),p(zt,"class","relative group"),p(Pr,"href","/docs/transformers/v4.27.1/en/model_doc/dpr#transformers.DPRQuestionEncoderTokenizer"),p($r,"href","/docs/transformers/v4.27.1/en/model_doc/bert#transformers.BertTokenizer"),p(Er,"href","/docs/transformers/v4.27.1/en/model_doc/bert#transformers.BertTokenizer"),p(et,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(so,"id","transformers.DPRQuestionEncoderTokenizerFast"),p(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"),p(so,"href","#transformers.DPRQuestionEncoderTokenizerFast"),p(qt,"class","relative group"),p(Rr,"href","/docs/transformers/v4.27.1/en/model_doc/dpr#transformers.DPRQuestionEncoderTokenizerFast"),p(yr,"href","/docs/transformers/v4.27.1/en/model_doc/bert#transformers.BertTokenizerFast"),p(Dr,"href","/docs/transformers/v4.27.1/en/model_doc/bert#transformers.BertTokenizerFast"),p(tt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(io,"id","transformers.DPRReaderTokenizer"),p(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"),p(io,"href","#transformers.DPRReaderTokenizer"),p(Ct,"class","relative group"),p(xr,"href","/docs/transformers/v4.27.1/en/model_doc/dpr#transformers.DPRReaderTokenizer"),p(zr,"href","/docs/transformers/v4.27.1/en/model_doc/bert#transformers.BertTokenizer"),p(qr,"href","/docs/transformers/v4.27.1/en/model_doc/dpr#transformers.DPRReader"),p(Cr,"href","/docs/transformers/v4.27.1/en/model_doc/bert#transformers.BertTokenizer"),p(be,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(co,"id","transformers.DPRReaderTokenizerFast"),p(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"),p(co,"href","#transformers.DPRReaderTokenizerFast"),p(Ft,"class","relative group"),p(Fr,"href","/docs/transformers/v4.27.1/en/model_doc/dpr#transformers.DPRReaderTokenizerFast"),p(Ar,"href","/docs/transformers/v4.27.1/en/model_doc/bert#transformers.BertTokenizerFast"),p(jr,"href","/docs/transformers/v4.27.1/en/model_doc/dpr#transformers.DPRReader"),p(Or,"href","/docs/transformers/v4.27.1/en/model_doc/bert#transformers.BertTokenizerFast"),p(we,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(po,"id","transformers.models.dpr.modeling_dpr.DPRContextEncoderOutput"),p(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"),p(po,"href","#transformers.models.dpr.modeling_dpr.DPRContextEncoderOutput"),p(At,"class","relative group"),p(Nr,"href","/docs/transformers/v4.27.1/en/model_doc/dpr#transformers.DPRQuestionEncoder"),p(jt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(Ir,"href","/docs/transformers/v4.27.1/en/model_doc/dpr#transformers.DPRQuestionEncoder"),p(Ot,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(Lr,"href","/docs/transformers/v4.27.1/en/model_doc/dpr#transformers.DPRQuestionEncoder"),p(Nt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(ho,"id","transformers.DPRContextEncoder"),p(ho,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),p(ho,"href","#transformers.DPRContextEncoder"),p(It,"class","relative group"),p(Qr,"href","/docs/transformers/v4.27.1/en/main_classes/model#transformers.PreTrainedModel"),p(Dn,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),p(Dn,"rel","nofollow"),p(Mr,"href","/docs/transformers/v4.27.1/en/model_doc/dpr#transformers.DPRContextEncoder"),p(dt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(He,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(mo,"id","transformers.DPRQuestionEncoder"),p(mo,"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"),p(mo,"href","#transformers.DPRQuestionEncoder"),p(Qt,"class","relative group"),p(Sr,"href","/docs/transformers/v4.27.1/en/main_classes/model#transformers.PreTrainedModel"),p(An,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),p(An,"rel","nofollow"),p(Br,"href","/docs/transformers/v4.27.1/en/model_doc/dpr#transformers.DPRQuestionEncoder"),p(lt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(Ke,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(vo,"id","transformers.DPRReader"),p(vo,"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"),p(vo,"href","#transformers.DPRReader"),p(St,"class","relative group"),p(Hr,"href","/docs/transformers/v4.27.1/en/main_classes/model#transformers.PreTrainedModel"),p(Qn,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),p(Qn,"rel","nofollow"),p(Kr,"href","/docs/transformers/v4.27.1/en/model_doc/dpr#transformers.DPRReader"),p(ct,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(Ue,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(To,"id","transformers.TFDPRContextEncoder"),p(To,"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"),p(To,"href","#transformers.TFDPRContextEncoder"),p(Ht,"class","relative group"),p(Ur,"href","/docs/transformers/v4.27.1/en/main_classes/model#transformers.TFPreTrainedModel"),p(Un,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),p(Un,"rel","nofollow"),p(Wr,"href","/docs/transformers/v4.27.1/en/model_doc/dpr#transformers.TFDPRContextEncoder"),p(pt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(Te,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(Eo,"id","transformers.TFDPRQuestionEncoder"),p(Eo,"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"),p(Eo,"href","#transformers.TFDPRQuestionEncoder"),p(Ut,"class","relative group"),p(Vr,"href","/docs/transformers/v4.27.1/en/main_classes/model#transformers.TFPreTrainedModel"),p(Jn,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),p(Jn,"rel","nofollow"),p(Yr,"href","/docs/transformers/v4.27.1/en/model_doc/dpr#transformers.TFDPRQuestionEncoder"),p(ht,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(ke,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(xo,"id","transformers.TFDPRReader"),p(xo,"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"),p(xo,"href","#transformers.TFDPRReader"),p(Vt,"class","relative group"),p(Gr,"href","/docs/transformers/v4.27.1/en/main_classes/model#transformers.TFPreTrainedModel"),p(rr,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),p(rr,"rel","nofollow"),p(Xr,"href","/docs/transformers/v4.27.1/en/model_doc/dpr#transformers.TFDPRReader"),p(ut,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(Pe,"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,m){e(document.head,h),f(o,w,m),f(o,_,m),e(_,g),e(g,b),P(d,b,null),e(_,u),e(_,z),e(z,qe),f(o,$e,m),f(o,N,m),e(N,le),e(le,X),e(N,Ce),e(N,B),e(B,ce),f(o,V,m),f(o,J,m),e(J,se),e(se,K),P(ie,K,null),e(J,Fe),e(J,U),e(U,Ae),f(o,Ee,m),f(o,L,m),e(L,je),e(L,de),e(de,pe),e(L,F),f(o,j,m),f(o,he,m),e(he,Z),f(o,Re,m),f(o,ue,m),e(ue,W),e(W,Oe),f(o,ye,m),f(o,q,m),e(q,Ne),e(q,Q),e(Q,Ie),e(q,Le),e(q,M),e(M,Qe),e(q,Me),f(o,S,m),f(o,fe,m),e(fe,ee),f(o,De,m),f(o,te,m),e(te,A),e(A,ge),e(ge,I),e(A,Se),e(A,oe),e(oe,v),e(v,D),e(oe,ot),e(oe,ae),e(ae,nt),e(oe,rt),e(oe,x),e(x,st),f(o,Ge,m),f(o,me,m),e(me,_e),e(_e,Ve),P(O,Ve,null),e(me,ne),e(me,Ye),e(Ye,at),f(o,Y,m),f(o,H,m),P(xe,H,null),e(H,Be),e(H,ve),e(ve,re),e(re,it),e(ve,Ii),e(ve,ss),e(ss,Li),e(ve,Qi),e(H,Mi),e(H,Xe),e(Xe,Si),e(Xe,ur),e(ur,Bi),e(Xe,Hi),e(Xe,fr),e(fr,Ki),e(Xe,Ui),e(Xe,mr),e(mr,Wi),e(Xe,Vi),e(Xe,Wo),e(Wo,Yi),e(Xe,Gi),e(H,Xi),e(H,Vo),e(Vo,Ji),e(Vo,gr),e(gr,Zi),e(Vo,ed),e(H,td),P(Jt,H,null),f(o,wa,m),f(o,Dt,m),e(Dt,Zt),e(Zt,as),P(Yo,as,null),e(Dt,od),e(Dt,is),e(is,nd),f(o,Ta,m),f(o,Je,m),P(Go,Je,null),e(Je,rd),e(Je,ds),e(ds,sd),e(Je,ad),e(Je,eo),e(eo,_r),e(_r,id),e(eo,dd),e(eo,vr),e(vr,ld),e(eo,cd),e(Je,pd),e(Je,Xo),e(Xo,hd),e(Xo,br),e(br,ud),e(Xo,fd),f(o,ka,m),f(o,xt,m),e(xt,to),e(to,ls),P(Jo,ls,null),e(xt,md),e(xt,cs),e(cs,gd),f(o,Pa,m),f(o,Ze,m),P(Zo,Ze,null),e(Ze,_d),e(Ze,en),e(en,vd),e(en,ps),e(ps,bd),e(en,wd),e(Ze,Td),e(Ze,oo),e(oo,wr),e(wr,kd),e(oo,Pd),e(oo,Tr),e(Tr,$d),e(oo,Ed),e(Ze,Rd),e(Ze,tn),e(tn,yd),e(tn,kr),e(kr,Dd),e(tn,xd),f(o,$a,m),f(o,zt,m),e(zt,no),e(no,hs),P(on,hs,null),e(zt,zd),e(zt,us),e(us,qd),f(o,Ea,m),f(o,et,m),P(nn,et,null),e(et,Cd),e(et,fs),e(fs,Fd),e(et,Ad),e(et,ro),e(ro,Pr),e(Pr,jd),e(ro,Od),e(ro,$r),e($r,Nd),e(ro,Id),e(et,Ld),e(et,rn),e(rn,Qd),e(rn,Er),e(Er,Md),e(rn,Sd),f(o,Ra,m),f(o,qt,m),e(qt,so),e(so,ms),P(sn,ms,null),e(qt,Bd),e(qt,gs),e(gs,Hd),f(o,ya,m),f(o,tt,m),P(an,tt,null),e(tt,Kd),e(tt,dn),e(dn,Ud),e(dn,_s),e(_s,Wd),e(dn,Vd),e(tt,Yd),e(tt,ao),e(ao,Rr),e(Rr,Gd),e(ao,Xd),e(ao,yr),e(yr,Jd),e(ao,Zd),e(tt,el),e(tt,ln),e(ln,tl),e(ln,Dr),e(Dr,ol),e(ln,nl),f(o,Da,m),f(o,Ct,m),e(Ct,io),e(io,vs),P(cn,vs,null),e(Ct,rl),e(Ct,bs),e(bs,sl),f(o,xa,m),f(o,be,m),P(pn,be,null),e(be,al),e(be,ws),e(ws,il),e(be,dl),e(be,wt),e(wt,xr),e(xr,ll),e(wt,cl),e(wt,zr),e(zr,pl),e(wt,hl),e(wt,qr),e(qr,ul),e(wt,fl),e(be,ml),e(be,hn),e(hn,gl),e(hn,Cr),e(Cr,_l),e(hn,vl),e(be,bl),e(be,Tt),e(Tt,wl),e(Tt,Ts),e(Ts,Tl),e(Tt,kl),e(Tt,ks),e(ks,Pl),e(Tt,$l),e(Tt,Ps),e(Ps,El),e(be,Rl),P(lo,be,null),f(o,za,m),f(o,Ft,m),e(Ft,co),e(co,$s),P(un,$s,null),e(Ft,yl),e(Ft,Es),e(Es,Dl),f(o,qa,m),f(o,we,m),P(fn,we,null),e(we,xl),e(we,mn),e(mn,zl),e(mn,Rs),e(Rs,ql),e(mn,Cl),e(we,Fl),e(we,kt),e(kt,Fr),e(Fr,Al),e(kt,jl),e(kt,Ar),e(Ar,Ol),e(kt,Nl),e(kt,jr),e(jr,Il),e(kt,Ll),e(we,Ql),e(we,gn),e(gn,Ml),e(gn,Or),e(Or,Sl),e(gn,Bl),e(we,Hl),e(we,bt),e(bt,Kl),e(bt,ys),e(ys,Ul),e(bt,Wl),e(bt,Ds),e(Ds,Vl),e(bt,Yl),e(bt,xs),e(xs,Gl),e(bt,Xl),e(we,Jl),e(we,zs),e(zs,Zl),f(o,Ca,m),f(o,At,m),e(At,po),e(po,qs),P(_n,qs,null),e(At,ec),e(At,Cs),e(Cs,tc),f(o,Fa,m),f(o,jt,m),P(vn,jt,null),e(jt,oc),e(jt,bn),e(bn,nc),e(bn,Nr),e(Nr,rc),e(bn,sc),f(o,Aa,m),f(o,Ot,m),P(wn,Ot,null),e(Ot,ac),e(Ot,Tn),e(Tn,ic),e(Tn,Ir),e(Ir,dc),e(Tn,lc),f(o,ja,m),f(o,Nt,m),P(kn,Nt,null),e(Nt,cc),e(Nt,Pn),e(Pn,pc),e(Pn,Lr),e(Lr,hc),e(Pn,uc),f(o,Oa,m),f(o,It,m),e(It,ho),e(ho,Fs),P($n,Fs,null),e(It,fc),e(It,As),e(As,mc),f(o,Na,m),f(o,He,m),P(En,He,null),e(He,gc),e(He,js),e(js,_c),e(He,vc),e(He,Rn),e(Rn,bc),e(Rn,Qr),e(Qr,wc),e(Rn,Tc),e(He,kc),e(He,yn),e(yn,Pc),e(yn,Dn),e(Dn,$c),e(yn,Ec),e(He,Rc),e(He,dt),P(xn,dt,null),e(dt,yc),e(dt,Lt),e(Lt,Dc),e(Lt,Mr),e(Mr,xc),e(Lt,zc),e(Lt,Os),e(Os,qc),e(Lt,Cc),e(dt,Fc),P(uo,dt,null),e(dt,Ac),P(fo,dt,null),f(o,Ia,m),f(o,Qt,m),e(Qt,mo),e(mo,Ns),P(zn,Ns,null),e(Qt,jc),e(Qt,Is),e(Is,Oc),f(o,La,m),f(o,Ke,m),P(qn,Ke,null),e(Ke,Nc),e(Ke,Ls),e(Ls,Ic),e(Ke,Lc),e(Ke,Cn),e(Cn,Qc),e(Cn,Sr),e(Sr,Mc),e(Cn,Sc),e(Ke,Bc),e(Ke,Fn),e(Fn,Hc),e(Fn,An),e(An,Kc),e(Fn,Uc),e(Ke,Wc),e(Ke,lt),P(jn,lt,null),e(lt,Vc),e(lt,Mt),e(Mt,Yc),e(Mt,Br),e(Br,Gc),e(Mt,Xc),e(Mt,Qs),e(Qs,Jc),e(Mt,Zc),e(lt,ep),P(go,lt,null),e(lt,tp),P(_o,lt,null),f(o,Qa,m),f(o,St,m),e(St,vo),e(vo,Ms),P(On,Ms,null),e(St,op),e(St,Ss),e(Ss,np),f(o,Ma,m),f(o,Ue,m),P(Nn,Ue,null),e(Ue,rp),e(Ue,Bs),e(Bs,sp),e(Ue,ap),e(Ue,In),e(In,ip),e(In,Hr),e(Hr,dp),e(In,lp),e(Ue,cp),e(Ue,Ln),e(Ln,pp),e(Ln,Qn),e(Qn,hp),e(Ln,up),e(Ue,fp),e(Ue,ct),P(Mn,ct,null),e(ct,mp),e(ct,Bt),e(Bt,gp),e(Bt,Kr),e(Kr,_p),e(Bt,vp),e(Bt,Hs),e(Hs,bp),e(Bt,wp),e(ct,Tp),P(bo,ct,null),e(ct,kp),P(wo,ct,null),f(o,Sa,m),f(o,Ht,m),e(Ht,To),e(To,Ks),P(Sn,Ks,null),e(Ht,Pp),e(Ht,Us),e(Us,$p),f(o,Ba,m),f(o,Te,m),P(Bn,Te,null),e(Te,Ep),e(Te,Ws),e(Ws,Rp),e(Te,yp),e(Te,Hn),e(Hn,Dp),e(Hn,Ur),e(Ur,xp),e(Hn,zp),e(Te,qp),e(Te,Kn),e(Kn,Cp),e(Kn,Un),e(Un,Fp),e(Kn,Ap),e(Te,jp),P(ko,Te,null),e(Te,Op),e(Te,pt),P(Wn,pt,null),e(pt,Np),e(pt,Kt),e(Kt,Ip),e(Kt,Wr),e(Wr,Lp),e(Kt,Qp),e(Kt,Vs),e(Vs,Mp),e(Kt,Sp),e(pt,Bp),P(Po,pt,null),e(pt,Hp),P($o,pt,null),f(o,Ha,m),f(o,Ut,m),e(Ut,Eo),e(Eo,Ys),P(Vn,Ys,null),e(Ut,Kp),e(Ut,Gs),e(Gs,Up),f(o,Ka,m),f(o,ke,m),P(Yn,ke,null),e(ke,Wp),e(ke,Xs),e(Xs,Vp),e(ke,Yp),e(ke,Gn),e(Gn,Gp),e(Gn,Vr),e(Vr,Xp),e(Gn,Jp),e(ke,Zp),e(ke,Xn),e(Xn,eh),e(Xn,Jn),e(Jn,th),e(Xn,oh),e(ke,nh),P(Ro,ke,null),e(ke,rh),e(ke,ht),P(Zn,ht,null),e(ht,sh),e(ht,Wt),e(Wt,ah),e(Wt,Yr),e(Yr,ih),e(Wt,dh),e(Wt,Js),e(Js,lh),e(Wt,ch),e(ht,ph),P(yo,ht,null),e(ht,hh),P(Do,ht,null),f(o,Ua,m),f(o,Vt,m),e(Vt,xo),e(xo,Zs),P(er,Zs,null),e(Vt,uh),e(Vt,ea),e(ea,fh),f(o,Wa,m),f(o,Pe,m),P(tr,Pe,null),e(Pe,mh),e(Pe,ta),e(ta,gh),e(Pe,_h),e(Pe,or),e(or,vh),e(or,Gr),e(Gr,bh),e(or,wh),e(Pe,Th),e(Pe,nr),e(nr,kh),e(nr,rr),e(rr,Ph),e(nr,$h),e(Pe,Eh),P(zo,Pe,null),e(Pe,Rh),e(Pe,ut),P(sr,ut,null),e(ut,yh),e(ut,Yt),e(Yt,Dh),e(Yt,Xr),e(Xr,xh),e(Yt,zh),e(Yt,oa),e(oa,qh),e(Yt,Ch),e(ut,Fh),P(qo,ut,null),e(ut,Ah),P(Co,ut,null),Va=!0},p(o,[m]){const ar={};m&2&&(ar.$$scope={dirty:m,ctx:o}),Jt.$set(ar);const na={};m&2&&(na.$$scope={dirty:m,ctx:o}),lo.$set(na);const ra={};m&2&&(ra.$$scope={dirty:m,ctx:o}),uo.$set(ra);const sa={};m&2&&(sa.$$scope={dirty:m,ctx:o}),fo.$set(sa);const ir={};m&2&&(ir.$$scope={dirty:m,ctx:o}),go.$set(ir);const aa={};m&2&&(aa.$$scope={dirty:m,ctx:o}),_o.$set(aa);const ia={};m&2&&(ia.$$scope={dirty:m,ctx:o}),bo.$set(ia);const dr={};m&2&&(dr.$$scope={dirty:m,ctx:o}),wo.$set(dr);const da={};m&2&&(da.$$scope={dirty:m,ctx:o}),ko.$set(da);const la={};m&2&&(la.$$scope={dirty:m,ctx:o}),Po.$set(la);const ca={};m&2&&(ca.$$scope={dirty:m,ctx:o}),$o.$set(ca);const lr={};m&2&&(lr.$$scope={dirty:m,ctx:o}),Ro.$set(lr);const pa={};m&2&&(pa.$$scope={dirty:m,ctx:o}),yo.$set(pa);const ha={};m&2&&(ha.$$scope={dirty:m,ctx:o}),Do.$set(ha);const ua={};m&2&&(ua.$$scope={dirty:m,ctx:o}),zo.$set(ua);const fa={};m&2&&(fa.$$scope={dirty:m,ctx:o}),qo.$set(fa);const Gt={};m&2&&(Gt.$$scope={dirty:m,ctx:o}),Co.$set(Gt)},i(o){Va||($(d.$$.fragment,o),$(ie.$$.fragment,o),$(O.$$.fragment,o),$(xe.$$.fragment,o),$(Jt.$$.fragment,o),$(Yo.$$.fragment,o),$(Go.$$.fragment,o),$(Jo.$$.fragment,o),$(Zo.$$.fragment,o),$(on.$$.fragment,o),$(nn.$$.fragment,o),$(sn.$$.fragment,o),$(an.$$.fragment,o),$(cn.$$.fragment,o),$(pn.$$.fragment,o),$(lo.$$.fragment,o),$(un.$$.fragment,o),$(fn.$$.fragment,o),$(_n.$$.fragment,o),$(vn.$$.fragment,o),$(wn.$$.fragment,o),$(kn.$$.fragment,o),$($n.$$.fragment,o),$(En.$$.fragment,o),$(xn.$$.fragment,o),$(uo.$$.fragment,o),$(fo.$$.fragment,o),$(zn.$$.fragment,o),$(qn.$$.fragment,o),$(jn.$$.fragment,o),$(go.$$.fragment,o),$(_o.$$.fragment,o),$(On.$$.fragment,o),$(Nn.$$.fragment,o),$(Mn.$$.fragment,o),$(bo.$$.fragment,o),$(wo.$$.fragment,o),$(Sn.$$.fragment,o),$(Bn.$$.fragment,o),$(ko.$$.fragment,o),$(Wn.$$.fragment,o),$(Po.$$.fragment,o),$($o.$$.fragment,o),$(Vn.$$.fragment,o),$(Yn.$$.fragment,o),$(Ro.$$.fragment,o),$(Zn.$$.fragment,o),$(yo.$$.fragment,o),$(Do.$$.fragment,o),$(er.$$.fragment,o),$(tr.$$.fragment,o),$(zo.$$.fragment,o),$(sr.$$.fragment,o),$(qo.$$.fragment,o),$(Co.$$.fragment,o),Va=!0)},o(o){E(d.$$.fragment,o),E(ie.$$.fragment,o),E(O.$$.fragment,o),E(xe.$$.fragment,o),E(Jt.$$.fragment,o),E(Yo.$$.fragment,o),E(Go.$$.fragment,o),E(Jo.$$.fragment,o),E(Zo.$$.fragment,o),E(on.$$.fragment,o),E(nn.$$.fragment,o),E(sn.$$.fragment,o),E(an.$$.fragment,o),E(cn.$$.fragment,o),E(pn.$$.fragment,o),E(lo.$$.fragment,o),E(un.$$.fragment,o),E(fn.$$.fragment,o),E(_n.$$.fragment,o),E(vn.$$.fragment,o),E(wn.$$.fragment,o),E(kn.$$.fragment,o),E($n.$$.fragment,o),E(En.$$.fragment,o),E(xn.$$.fragment,o),E(uo.$$.fragment,o),E(fo.$$.fragment,o),E(zn.$$.fragment,o),E(qn.$$.fragment,o),E(jn.$$.fragment,o),E(go.$$.fragment,o),E(_o.$$.fragment,o),E(On.$$.fragment,o),E(Nn.$$.fragment,o),E(Mn.$$.fragment,o),E(bo.$$.fragment,o),E(wo.$$.fragment,o),E(Sn.$$.fragment,o),E(Bn.$$.fragment,o),E(ko.$$.fragment,o),E(Wn.$$.fragment,o),E(Po.$$.fragment,o),E($o.$$.fragment,o),E(Vn.$$.fragment,o),E(Yn.$$.fragment,o),E(Ro.$$.fragment,o),E(Zn.$$.fragment,o),E(yo.$$.fragment,o),E(Do.$$.fragment,o),E(er.$$.fragment,o),E(tr.$$.fragment,o),E(zo.$$.fragment,o),E(sr.$$.fragment,o),E(qo.$$.fragment,o),E(Co.$$.fragment,o),Va=!1},d(o){t(h),o&&t(w),o&&t(_),R(d),o&&t($e),o&&t(N),o&&t(V),o&&t(J),R(ie),o&&t(Ee),o&&t(L),o&&t(j),o&&t(he),o&&t(Re),o&&t(ue),o&&t(ye),o&&t(q),o&&t(S),o&&t(fe),o&&t(De),o&&t(te),o&&t(Ge),o&&t(me),R(O),o&&t(Y),o&&t(H),R(xe),R(Jt),o&&t(wa),o&&t(Dt),R(Yo),o&&t(Ta),o&&t(Je),R(Go),o&&t(ka),o&&t(xt),R(Jo),o&&t(Pa),o&&t(Ze),R(Zo),o&&t($a),o&&t(zt),R(on),o&&t(Ea),o&&t(et),R(nn),o&&t(Ra),o&&t(qt),R(sn),o&&t(ya),o&&t(tt),R(an),o&&t(Da),o&&t(Ct),R(cn),o&&t(xa),o&&t(be),R(pn),R(lo),o&&t(za),o&&t(Ft),R(un),o&&t(qa),o&&t(we),R(fn),o&&t(Ca),o&&t(At),R(_n),o&&t(Fa),o&&t(jt),R(vn),o&&t(Aa),o&&t(Ot),R(wn),o&&t(ja),o&&t(Nt),R(kn),o&&t(Oa),o&&t(It),R($n),o&&t(Na),o&&t(He),R(En),R(xn),R(uo),R(fo),o&&t(Ia),o&&t(Qt),R(zn),o&&t(La),o&&t(Ke),R(qn),R(jn),R(go),R(_o),o&&t(Qa),o&&t(St),R(On),o&&t(Ma),o&&t(Ue),R(Nn),R(Mn),R(bo),R(wo),o&&t(Sa),o&&t(Ht),R(Sn),o&&t(Ba),o&&t(Te),R(Bn),R(ko),R(Wn),R(Po),R($o),o&&t(Ha),o&&t(Ut),R(Vn),o&&t(Ka),o&&t(ke),R(Yn),R(Ro),R(Zn),R(yo),R(Do),o&&t(Ua),o&&t(Vt),R(er),o&&t(Wa),o&&t(Pe),R(tr),R(zo),R(sr),R(qo),R(Co)}}}const Tm={local:"dpr",sections:[{local:"overview",title:"Overview"},{local:"transformers.DPRConfig",title:"DPRConfig"},{local:"transformers.DPRContextEncoderTokenizer",title:"DPRContextEncoderTokenizer"},{local:"transformers.DPRContextEncoderTokenizerFast",title:"DPRContextEncoderTokenizerFast"},{local:"transformers.DPRQuestionEncoderTokenizer",title:"DPRQuestionEncoderTokenizer"},{local:"transformers.DPRQuestionEncoderTokenizerFast",title:"DPRQuestionEncoderTokenizerFast"},{local:"transformers.DPRReaderTokenizer",title:"DPRReaderTokenizer"},{local:"transformers.DPRReaderTokenizerFast",title:"DPRReaderTokenizerFast"},{local:"transformers.models.dpr.modeling_dpr.DPRContextEncoderOutput",title:"DPR specific outputs"},{local:"transformers.DPRContextEncoder",title:"DPRContextEncoder"},{local:"transformers.DPRQuestionEncoder",title:"DPRQuestionEncoder"},{local:"transformers.DPRReader",title:"DPRReader"},{local:"transformers.TFDPRContextEncoder",title:"TFDPRContextEncoder"},{local:"transformers.TFDPRQuestionEncoder",title:"TFDPRQuestionEncoder"},{local:"transformers.TFDPRReader",title:"TFDPRReader"}],title:"DPR"};function km(C){return om(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class xm extends Jf{constructor(h){super();Zf(this,h,km,wm,em,{})}}export{xm as default,Tm as metadata};
