import{s as ae,o as ie,n as oe}from"../chunks/scheduler.25b97de1.js";import{S as le,i as se,g as r,s as o,r as M,A as re,h as m,f as n,c as l,j as te,u as C,x as f,k as ne,y as me,a,v as L,d as D,t as H,w as y}from"../chunks/index.d9030fc9.js";import{T as pe}from"../chunks/Tip.baa67368.js";import{H as J,E as fe}from"../chunks/EditOnGithub.91d95064.js";function ue(k){let i,u='DialoGPT’s architecture is based on the GPT2 model, refer to <a href="gpt2">GPT2’s documentation page</a> for API reference and examples.';return{c(){i=r("p"),i.innerHTML=u},l(s){i=m(s,"P",{"data-svelte-h":!0}),f(i)!=="svelte-c7ppar"&&(i.innerHTML=u)},m(s,b){a(s,i,b)},p:oe,d(s){s&&n(i)}}}function de(k){let i,u,s,b,d,E,g,S,c,N=`DialoGPT was proposed in <a href="https://arxiv.org/abs/1911.00536" rel="nofollow">DialoGPT: Large-Scale Generative Pre-training for Conversational Response Generation</a> by Yizhe Zhang, Siqi Sun, Michel Galley, Yen-Chun Chen, Chris Brockett, Xiang Gao,
Jianfeng Gao, Jingjing Liu, Bill Dolan. It’s a GPT2 Model trained on 147M conversation-like exchanges extracted from
Reddit.`,j,h,Y="The abstract from the paper is the following:",q,$,X=`<em>We present a large, tunable neural conversational response generation model, DialoGPT (dialogue generative pre-trained
transformer). Trained on 147M conversation-like exchanges extracted from Reddit comment chains over a period spanning
from 2005 through 2017, DialoGPT extends the Hugging Face PyTorch transformer to attain a performance close to human
both in terms of automatic and human evaluation in single-turn dialogue settings. We show that conversational systems
that leverage DialoGPT generate more relevant, contentful and context-consistent responses than strong baseline
systems. The pre-trained model and training pipeline are publicly released to facilitate research into neural response
generation and the development of more intelligent open-domain dialogue systems.</em>`,A,v,Z='The original code can be found <a href="https://github.com/microsoft/DialoGPT" rel="nofollow">here</a>.',I,T,O,P,K=`<li>DialoGPT is a model with absolute position embeddings so it’s usually advised to pad the inputs on the right rather
than the left.</li> <li>DialoGPT was trained with a causal language modeling (CLM) objective on conversational data and is therefore powerful
at response generation in open-domain dialogue systems.</li> <li>DialoGPT enables the user to create a chat bot in just 10 lines of code as shown on <a href="https://huggingface.co/microsoft/DialoGPT-medium" rel="nofollow">DialoGPT’s model card</a>.</li>`,R,x,Q="Training:",U,_,V=`In order to train or fine-tune DialoGPT, one can use causal language modeling training. To cite the official paper: <em>We
follow the OpenAI GPT-2 to model a multiturn dialogue session as a long text and frame the generation task as language
modeling. We first concatenate all dialog turns within a dialogue session into a long text x_1,…, x_N (N is the
sequence length), ended by the end-of-text token.</em> For more information please confer to the original paper.`,W,p,z,w,B,G,F;return d=new J({props:{title:"DialoGPT",local:"dialogpt",headingTag:"h1"}}),g=new J({props:{title:"Overview",local:"overview",headingTag:"h2"}}),T=new J({props:{title:"Usage tips",local:"usage-tips",headingTag:"h2"}}),p=new pe({props:{$$slots:{default:[ue]},$$scope:{ctx:k}}}),w=new fe({props:{source:"https://github.com/huggingface/transformers/blob/main/docs/source/en/model_doc/dialogpt.md"}}),{c(){i=r("meta"),u=o(),s=r("p"),b=o(),M(d.$$.fragment),E=o(),M(g.$$.fragment),S=o(),c=r("p"),c.innerHTML=N,j=o(),h=r("p"),h.textContent=Y,q=o(),$=r("p"),$.innerHTML=X,A=o(),v=r("p"),v.innerHTML=Z,I=o(),M(T.$$.fragment),O=o(),P=r("ul"),P.innerHTML=K,R=o(),x=r("p"),x.textContent=Q,U=o(),_=r("p"),_.innerHTML=V,W=o(),M(p.$$.fragment),z=o(),M(w.$$.fragment),B=o(),G=r("p"),this.h()},l(e){const t=re("svelte-u9bgzb",document.head);i=m(t,"META",{name:!0,content:!0}),t.forEach(n),u=l(e),s=m(e,"P",{}),te(s).forEach(n),b=l(e),C(d.$$.fragment,e),E=l(e),C(g.$$.fragment,e),S=l(e),c=m(e,"P",{"data-svelte-h":!0}),f(c)!=="svelte-1r5vgq6"&&(c.innerHTML=N),j=l(e),h=m(e,"P",{"data-svelte-h":!0}),f(h)!=="svelte-vfdo9a"&&(h.textContent=Y),q=l(e),$=m(e,"P",{"data-svelte-h":!0}),f($)!=="svelte-7bhez3"&&($.innerHTML=X),A=l(e),v=m(e,"P",{"data-svelte-h":!0}),f(v)!=="svelte-17b2666"&&(v.innerHTML=Z),I=l(e),C(T.$$.fragment,e),O=l(e),P=m(e,"UL",{"data-svelte-h":!0}),f(P)!=="svelte-1kdkvca"&&(P.innerHTML=K),R=l(e),x=m(e,"P",{"data-svelte-h":!0}),f(x)!=="svelte-1igpel8"&&(x.textContent=Q),U=l(e),_=m(e,"P",{"data-svelte-h":!0}),f(_)!=="svelte-1yc28b0"&&(_.innerHTML=V),W=l(e),C(p.$$.fragment,e),z=l(e),C(w.$$.fragment,e),B=l(e),G=m(e,"P",{}),te(G).forEach(n),this.h()},h(){ne(i,"name","hf:doc:metadata"),ne(i,"content",ge)},m(e,t){me(document.head,i),a(e,u,t),a(e,s,t),a(e,b,t),L(d,e,t),a(e,E,t),L(g,e,t),a(e,S,t),a(e,c,t),a(e,j,t),a(e,h,t),a(e,q,t),a(e,$,t),a(e,A,t),a(e,v,t),a(e,I,t),L(T,e,t),a(e,O,t),a(e,P,t),a(e,R,t),a(e,x,t),a(e,U,t),a(e,_,t),a(e,W,t),L(p,e,t),a(e,z,t),L(w,e,t),a(e,B,t),a(e,G,t),F=!0},p(e,[t]){const ee={};t&2&&(ee.$$scope={dirty:t,ctx:e}),p.$set(ee)},i(e){F||(D(d.$$.fragment,e),D(g.$$.fragment,e),D(T.$$.fragment,e),D(p.$$.fragment,e),D(w.$$.fragment,e),F=!0)},o(e){H(d.$$.fragment,e),H(g.$$.fragment,e),H(T.$$.fragment,e),H(p.$$.fragment,e),H(w.$$.fragment,e),F=!1},d(e){e&&(n(u),n(s),n(b),n(E),n(S),n(c),n(j),n(h),n(q),n($),n(A),n(v),n(I),n(O),n(P),n(R),n(x),n(U),n(_),n(W),n(z),n(B),n(G)),n(i),y(d,e),y(g,e),y(T,e),y(p,e),y(w,e)}}}const ge='{"title":"DialoGPT","local":"dialogpt","sections":[{"title":"Overview","local":"overview","sections":[],"depth":2},{"title":"Usage tips","local":"usage-tips","sections":[],"depth":2}],"depth":1}';function ce(k){return ie(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Pe extends le{constructor(i){super(),se(this,i,ce,de,ae,{})}}export{Pe as component};
