import{S as rt,i as st,s as ht,e as n,k as p,w as et,t as r,M as ft,c as o,d as t,m as c,a as i,x as tt,h as s,b as f,F as a,g as h,y as at,L as pt,q as nt,o as ot,B as it}from"../../chunks/vendor-4833417e.js";import{I as lt}from"../../chunks/IconCopyLink-4b81c553.js";function ct(se){let m,$,u,d,N,b,he,W,fe,J,v,T,q,y,pe,j,ce,H,P,ue,x,de,me,Y,M,ge,z,A,O,ve,X,S,Te,Z,g,R,Pe,_e,B,we,Ge,D,be,E,ye,xe,U,C,De,K,_,Ee,F,ke,$e,Q,w,Me,L,Ae,Se,V,G,Ce,k,Le,Ie,ee;return b=new lt({}),y=new lt({}),{c(){m=n("meta"),$=p(),u=n("h1"),d=n("a"),N=n("span"),et(b.$$.fragment),he=p(),W=n("span"),fe=r("DialoGPT"),J=p(),v=n("h2"),T=n("a"),q=n("span"),et(y.$$.fragment),pe=p(),j=n("span"),ce=r("Overview"),H=p(),P=n("p"),ue=r("DialoGPT was proposed in "),x=n("a"),de=r("DialoGPT: Large-Scale Generative Pre-training for Conversational Response Generation"),me=r(` by Yizhe Zhang, Siqi Sun, Michel Galley, Yen-Chun Chen, Chris Brockett, Xiang Gao,
Jianfeng Gao, Jingjing Liu, Bill Dolan. It\u2019s a GPT2 Model trained on 147M conversation-like exchanges extracted from
Reddit.`),Y=p(),M=n("p"),ge=r("The abstract from the paper is the following:"),z=p(),A=n("p"),O=n("em"),ve=r(`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.`),X=p(),S=n("p"),Te=r("Tips:"),Z=p(),g=n("ul"),R=n("li"),Pe=r(`DialoGPT is a model with absolute position embeddings so it\u2019s usually advised to pad the inputs on the right rather
than the left.`),_e=p(),B=n("li"),we=r(`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.`),Ge=p(),D=n("li"),be=r("DialoGPT enables the user to create a chat bot in just 10 lines of code as shown on "),E=n("a"),ye=r("DialoGPT\u2019s model card"),xe=r("."),U=p(),C=n("p"),De=r("Training:"),K=p(),_=n("p"),Ee=r("In order to train or fine-tune DialoGPT, one can use causal language modeling training. To cite the official paper: "),F=n("em"),ke=r(`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,\u2026, x_N (N is the
sequence length), ended by the end-of-text token.`),$e=r(" For more information please confer to the original paper."),Q=p(),w=n("p"),Me=r("DialoGPT\u2019s architecture is based on the GPT2 model, so one can refer to "),L=n("a"),Ae=r("GPT2\u2019s documentation page"),Se=r("."),V=p(),G=n("p"),Ce=r("The original code can be found "),k=n("a"),Le=r("here"),Ie=r("."),this.h()},l(e){const l=ft('[data-svelte="svelte-1phssyn"]',document.head);m=o(l,"META",{name:!0,content:!0}),l.forEach(t),$=c(e),u=o(e,"H1",{class:!0});var te=i(u);d=o(te,"A",{id:!0,class:!0,href:!0});var Ne=i(d);N=o(Ne,"SPAN",{});var We=i(N);tt(b.$$.fragment,We),We.forEach(t),Ne.forEach(t),he=c(te),W=o(te,"SPAN",{});var qe=i(W);fe=s(qe,"DialoGPT"),qe.forEach(t),te.forEach(t),J=c(e),v=o(e,"H2",{class:!0});var ae=i(v);T=o(ae,"A",{id:!0,class:!0,href:!0});var je=i(T);q=o(je,"SPAN",{});var Oe=i(q);tt(y.$$.fragment,Oe),Oe.forEach(t),je.forEach(t),pe=c(ae),j=o(ae,"SPAN",{});var Re=i(j);ce=s(Re,"Overview"),Re.forEach(t),ae.forEach(t),H=c(e),P=o(e,"P",{});var ne=i(P);ue=s(ne,"DialoGPT was proposed in "),x=o(ne,"A",{href:!0,rel:!0});var Be=i(x);de=s(Be,"DialoGPT: Large-Scale Generative Pre-training for Conversational Response Generation"),Be.forEach(t),me=s(ne,` by Yizhe Zhang, Siqi Sun, Michel Galley, Yen-Chun Chen, Chris Brockett, Xiang Gao,
Jianfeng Gao, Jingjing Liu, Bill Dolan. It\u2019s a GPT2 Model trained on 147M conversation-like exchanges extracted from
Reddit.`),ne.forEach(t),Y=c(e),M=o(e,"P",{});var Fe=i(M);ge=s(Fe,"The abstract from the paper is the following:"),Fe.forEach(t),z=c(e),A=o(e,"P",{});var Je=i(A);O=o(Je,"EM",{});var He=i(O);ve=s(He,`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.`),He.forEach(t),Je.forEach(t),X=c(e),S=o(e,"P",{});var Ye=i(S);Te=s(Ye,"Tips:"),Ye.forEach(t),Z=c(e),g=o(e,"UL",{});var I=i(g);R=o(I,"LI",{});var ze=i(R);Pe=s(ze,`DialoGPT is a model with absolute position embeddings so it\u2019s usually advised to pad the inputs on the right rather
than the left.`),ze.forEach(t),_e=c(I),B=o(I,"LI",{});var Xe=i(B);we=s(Xe,`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.`),Xe.forEach(t),Ge=c(I),D=o(I,"LI",{});var oe=i(D);be=s(oe,"DialoGPT enables the user to create a chat bot in just 10 lines of code as shown on "),E=o(oe,"A",{href:!0,rel:!0});var Ze=i(E);ye=s(Ze,"DialoGPT\u2019s model card"),Ze.forEach(t),xe=s(oe,"."),oe.forEach(t),I.forEach(t),U=c(e),C=o(e,"P",{});var Ue=i(C);De=s(Ue,"Training:"),Ue.forEach(t),K=c(e),_=o(e,"P",{});var ie=i(_);Ee=s(ie,"In order to train or fine-tune DialoGPT, one can use causal language modeling training. To cite the official paper: "),F=o(ie,"EM",{});var Ke=i(F);ke=s(Ke,`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,\u2026, x_N (N is the
sequence length), ended by the end-of-text token.`),Ke.forEach(t),$e=s(ie," For more information please confer to the original paper."),ie.forEach(t),Q=c(e),w=o(e,"P",{});var le=i(w);Me=s(le,"DialoGPT\u2019s architecture is based on the GPT2 model, so one can refer to "),L=o(le,"A",{href:!0});var Qe=i(L);Ae=s(Qe,"GPT2\u2019s documentation page"),Qe.forEach(t),Se=s(le,"."),le.forEach(t),V=c(e),G=o(e,"P",{});var re=i(G);Ce=s(re,"The original code can be found "),k=o(re,"A",{href:!0,rel:!0});var Ve=i(k);Le=s(Ve,"here"),Ve.forEach(t),Ie=s(re,"."),re.forEach(t),this.h()},h(){f(m,"name","hf:doc:metadata"),f(m,"content",JSON.stringify(ut)),f(d,"id","dialogpt"),f(d,"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"),f(d,"href","#dialogpt"),f(u,"class","relative group"),f(T,"id","overview"),f(T,"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"),f(T,"href","#overview"),f(v,"class","relative group"),f(x,"href","https://arxiv.org/abs/1911.00536"),f(x,"rel","nofollow"),f(E,"href","https://huggingface.co/microsoft/DialoGPT-medium"),f(E,"rel","nofollow"),f(L,"href","gpt2"),f(k,"href","https://github.com/microsoft/DialoGPT"),f(k,"rel","nofollow")},m(e,l){a(document.head,m),h(e,$,l),h(e,u,l),a(u,d),a(d,N),at(b,N,null),a(u,he),a(u,W),a(W,fe),h(e,J,l),h(e,v,l),a(v,T),a(T,q),at(y,q,null),a(v,pe),a(v,j),a(j,ce),h(e,H,l),h(e,P,l),a(P,ue),a(P,x),a(x,de),a(P,me),h(e,Y,l),h(e,M,l),a(M,ge),h(e,z,l),h(e,A,l),a(A,O),a(O,ve),h(e,X,l),h(e,S,l),a(S,Te),h(e,Z,l),h(e,g,l),a(g,R),a(R,Pe),a(g,_e),a(g,B),a(B,we),a(g,Ge),a(g,D),a(D,be),a(D,E),a(E,ye),a(D,xe),h(e,U,l),h(e,C,l),a(C,De),h(e,K,l),h(e,_,l),a(_,Ee),a(_,F),a(F,ke),a(_,$e),h(e,Q,l),h(e,w,l),a(w,Me),a(w,L),a(L,Ae),a(w,Se),h(e,V,l),h(e,G,l),a(G,Ce),a(G,k),a(k,Le),a(G,Ie),ee=!0},p:pt,i(e){ee||(nt(b.$$.fragment,e),nt(y.$$.fragment,e),ee=!0)},o(e){ot(b.$$.fragment,e),ot(y.$$.fragment,e),ee=!1},d(e){t(m),e&&t($),e&&t(u),it(b),e&&t(J),e&&t(v),it(y),e&&t(H),e&&t(P),e&&t(Y),e&&t(M),e&&t(z),e&&t(A),e&&t(X),e&&t(S),e&&t(Z),e&&t(g),e&&t(U),e&&t(C),e&&t(K),e&&t(_),e&&t(Q),e&&t(w),e&&t(V),e&&t(G)}}}const ut={local:"dialogpt",sections:[{local:"overview",title:"Overview"}],title:"DialoGPT"};function dt(se,m,$){let{fw:u}=m;return se.$$set=d=>{"fw"in d&&$(0,u=d.fw)},[u]}class vt extends rt{constructor(m){super();st(this,m,dt,ct,ht,{fw:0})}}export{vt as default,ut as metadata};
