import{s as oe,o as se,n as re}from"../chunks/scheduler.01eeda35.js";import{S as pe,i as me,g as s,s as l,r as M,A as fe,h as r,f as a,c as o,j as le,u as y,x as m,k as j,y as ge,a as n,v as J,d as O,t as D,w as E}from"../chunks/index.6dd51b66.js";import{T as ue}from"../chunks/Tip.de9bae2b.js";import{H as V,E as ce}from"../chunks/EditOnGithub.7faefd25.js";function de(N){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=s("p"),i.innerHTML=u},l(p){i=r(p,"P",{"data-svelte-h":!0}),m(i)!=="svelte-c7ppar"&&(i.innerHTML=u)},m(p,C){n(p,i,C)},p:re,d(p){p&&a(i)}}}function he(N){let i,u,p,C,c,S,f,X=`<img alt="PyTorch" src="https://img.shields.io/badge/PyTorch-DE3412?style=flat&amp;logo=pytorch&amp;logoColor=white"/> <img alt="TensorFlow" src="https://img.shields.io/badge/TensorFlow-FF6F00?style=flat&amp;logo=tensorflow&amp;logoColor=white"/> <img alt="Flax" src="https://img.shields.io/badge/Flax-29a79b.svg?style=flat&amp;logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAC0AAAAtCAMAAAANxBKoAAAC7lBMVEUAAADg5vYHPVgAoJH+/v76+v39/f9JbLP///9+AIgAnY3///+mcqzt8fXy9fgkXa3Ax9709fr+///9/f8qXq49qp5AaLGMwrv8/P0eW60VWawxYq8yqJzG2dytt9Wyu9elzci519Lf3O3S2efY3OrY0+Xp7PT///////+dqNCexMc6Z7AGpJeGvbenstPZ5ejQ1OfJzOLa7ejh4+/r8fT29vpccbklWK8PVa0AS6ghW63O498vYa+lsdKz1NDRt9Kw1c672tbD3tnAxt7R6OHp5vDe7OrDyuDn6vLl6/EAQKak0MgATakkppo3ZK/Bz9y8w9yzu9jey97axdvHzeG21NHH4trTwthKZrVGZLSUSpuPQJiGAI+GAI8SWKydycLL4d7f2OTi1+S9xNzL0ePT6OLGzeEAo5U0qJw/aLEAo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nEMjxpL2NCwsYNBp+Q61PF43zyDg9Bm9+3NNySn78jMZUUkumqE4Gp7JmFOdP1vc8PpRrzj9+wPinCy8K1PiJ4aYbnTYpCCbDkBSbzhu2QJ1Gd82t8jI8TH51+OzvXoWbnXUOBkNW+0mWFwGcGOUVpU81/n3TOHb5oMt2FgYGjzau0Nif0Ss7Q3XB33hjjQHjHA5E5aOyIQc8CBrLdQSs3j92VG+3nNEjbkbdbBr9zm04ruvw37vh0QKOdeGIkckc80fX3KH/h7PT4BOjgCty8VZ5ux1MoO5Cf5naca2LAsEgehI+drX8o/0Nu+W0m6K/I9gGPd/dfx/EN/wN62AhsBWuAAAAAElFTkSuQmCC
"/>`,H,d,U,h,F=`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.`,Z,v,B="The abstract from the paper is the following:",K,T,_=`<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>`,k,A,ee='The original code can be found <a href="https://github.com/microsoft/DialoGPT" rel="nofollow">here</a>.',Q,P,$,x,te=`<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>`,q,b,ae="Training:",I,G,ne=`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,g,Y,w,z,L,R;return c=new V({props:{title:"DialoGPT",local:"dialogpt",headingTag:"h1"}}),d=new V({props:{title:"Overview",local:"overview",headingTag:"h2"}}),P=new V({props:{title:"Usage tips",local:"usage-tips",headingTag:"h2"}}),g=new ue({props:{$$slots:{default:[de]},$$scope:{ctx:N}}}),w=new ce({props:{source:"https://github.com/huggingface/transformers/blob/main/docs/source/en/model_doc/dialogpt.md"}}),{c(){i=s("meta"),u=l(),p=s("p"),C=l(),M(c.$$.fragment),S=l(),f=s("div"),f.innerHTML=X,H=l(),M(d.$$.fragment),U=l(),h=s("p"),h.innerHTML=F,Z=l(),v=s("p"),v.textContent=B,K=l(),T=s("p"),T.innerHTML=_,k=l(),A=s("p"),A.innerHTML=ee,Q=l(),M(P.$$.fragment),$=l(),x=s("ul"),x.innerHTML=te,q=l(),b=s("p"),b.textContent=ae,I=l(),G=s("p"),G.innerHTML=ne,W=l(),M(g.$$.fragment),Y=l(),M(w.$$.fragment),z=l(),L=s("p"),this.h()},l(e){const t=fe("svelte-u9bgzb",document.head);i=r(t,"META",{name:!0,content:!0}),t.forEach(a),u=o(e),p=r(e,"P",{}),le(p).forEach(a),C=o(e),y(c.$$.fragment,e),S=o(e),f=r(e,"DIV",{class:!0,"data-svelte-h":!0}),m(f)!=="svelte-1px1zvi"&&(f.innerHTML=X),H=o(e),y(d.$$.fragment,e),U=o(e),h=r(e,"P",{"data-svelte-h":!0}),m(h)!=="svelte-1r5vgq6"&&(h.innerHTML=F),Z=o(e),v=r(e,"P",{"data-svelte-h":!0}),m(v)!=="svelte-vfdo9a"&&(v.textContent=B),K=o(e),T=r(e,"P",{"data-svelte-h":!0}),m(T)!=="svelte-7bhez3"&&(T.innerHTML=_),k=o(e),A=r(e,"P",{"data-svelte-h":!0}),m(A)!=="svelte-17b2666"&&(A.innerHTML=ee),Q=o(e),y(P.$$.fragment,e),$=o(e),x=r(e,"UL",{"data-svelte-h":!0}),m(x)!=="svelte-1kdkvca"&&(x.innerHTML=te),q=o(e),b=r(e,"P",{"data-svelte-h":!0}),m(b)!=="svelte-1igpel8"&&(b.textContent=ae),I=o(e),G=r(e,"P",{"data-svelte-h":!0}),m(G)!=="svelte-1yc28b0"&&(G.innerHTML=ne),W=o(e),y(g.$$.fragment,e),Y=o(e),y(w.$$.fragment,e),z=o(e),L=r(e,"P",{}),le(L).forEach(a),this.h()},h(){j(i,"name","hf:doc:metadata"),j(i,"content",ve),j(f,"class","flex flex-wrap space-x-1")},m(e,t){ge(document.head,i),n(e,u,t),n(e,p,t),n(e,C,t),J(c,e,t),n(e,S,t),n(e,f,t),n(e,H,t),J(d,e,t),n(e,U,t),n(e,h,t),n(e,Z,t),n(e,v,t),n(e,K,t),n(e,T,t),n(e,k,t),n(e,A,t),n(e,Q,t),J(P,e,t),n(e,$,t),n(e,x,t),n(e,q,t),n(e,b,t),n(e,I,t),n(e,G,t),n(e,W,t),J(g,e,t),n(e,Y,t),J(w,e,t),n(e,z,t),n(e,L,t),R=!0},p(e,[t]){const ie={};t&2&&(ie.$$scope={dirty:t,ctx:e}),g.$set(ie)},i(e){R||(O(c.$$.fragment,e),O(d.$$.fragment,e),O(P.$$.fragment,e),O(g.$$.fragment,e),O(w.$$.fragment,e),R=!0)},o(e){D(c.$$.fragment,e),D(d.$$.fragment,e),D(P.$$.fragment,e),D(g.$$.fragment,e),D(w.$$.fragment,e),R=!1},d(e){e&&(a(u),a(p),a(C),a(S),a(f),a(H),a(U),a(h),a(Z),a(v),a(K),a(T),a(k),a(A),a(Q),a($),a(x),a(q),a(b),a(I),a(G),a(W),a(Y),a(z),a(L)),a(i),E(c,e),E(d,e),E(P,e),E(g,e),E(w,e)}}}const ve='{"title":"DialoGPT","local":"dialogpt","sections":[{"title":"Overview","local":"overview","sections":[],"depth":2},{"title":"Usage tips","local":"usage-tips","sections":[],"depth":2}],"depth":1}';function Te(N){return se(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Ge extends pe{constructor(i){super(),me(this,i,Te,he,oe,{})}}export{Ge as component};
