import{s as j,n as q,o as D}from"../chunks/scheduler.37c15a92.js";import{S as F,i as I,g as u,s as r,r as x,A as O,h as c,f as a,c as i,j as S,u as R,x as w,k,y as U,a as n,v as A,d as B,t as M,w as y}from"../chunks/index.2bf4358c.js";import{C as X}from"../chunks/CourseFloatingBanner.06521e8b.js";import{H as J,E as K}from"../chunks/EditOnGithub.8916dc7c.js";function Q(H){let s,T,h,_,m,b,o,g,l,z="在本章中，你了解了如何使用来自🤗Transformers 的高级函数 <code>pipeline()</code> 处理不同的 NLP 任务。你还了解了如何在模型中心（hub）中搜索和使用模型，以及如何使用推理 API 直接在浏览器中测试模型。",E,p,G="我们从最终的效果的角度讨论了 Transformer 模型的工作方式，并讨论了迁移学习和微调的重要性。一个关键的收获是：你可以使用完整的体系结构，也可以仅使用编码器或解码器，具体取决于你要解决的任务类型。下表总结了这一点：",P,d,N="<thead><tr><th>模型</th> <th>示例</th> <th>任务</th></tr></thead> <tbody><tr><td>编码器</td> <td>ALBERT，BERT，DistilBERT，ELECTRA，RoBERTa</td> <td>句子分类、命名实体识别、抽取式问答（从文本中提取答案）</td></tr> <tr><td>解码器</td> <td>CTRL，GPT，GPT－2，Transformer XL</td> <td>文本生成</td></tr> <tr><td>编码器-解码器</td> <td>BART，T5，Marian，mBART</td> <td>文本摘要、翻译、生成式问答（生成问题的回答类似 chatgpt）</td></tr></tbody>",C,f,L,$,v;return m=new J({props:{title:"总结",local:"总结",headingTag:"h1"}}),o=new X({props:{chapter:1,classNames:"absolute z-10 right-0 top-0"}}),f=new K({props:{source:"https://github.com/huggingface/course/blob/main/chapters/zh-CN/chapter1/9.mdx"}}),{c(){s=u("meta"),T=r(),h=u("p"),_=r(),x(m.$$.fragment),b=r(),x(o.$$.fragment),g=r(),l=u("p"),l.innerHTML=z,E=r(),p=u("p"),p.textContent=G,P=r(),d=u("table"),d.innerHTML=N,C=r(),x(f.$$.fragment),L=r(),$=u("p"),this.h()},l(t){const e=O("svelte-u9bgzb",document.head);s=c(e,"META",{name:!0,content:!0}),e.forEach(a),T=i(t),h=c(t,"P",{}),S(h).forEach(a),_=i(t),R(m.$$.fragment,t),b=i(t),R(o.$$.fragment,t),g=i(t),l=c(t,"P",{"data-svelte-h":!0}),w(l)!=="svelte-1k1dfpb"&&(l.innerHTML=z),E=i(t),p=c(t,"P",{"data-svelte-h":!0}),w(p)!=="svelte-10p7dzb"&&(p.textContent=G),P=i(t),d=c(t,"TABLE",{"data-svelte-h":!0}),w(d)!=="svelte-sd6soo"&&(d.innerHTML=N),C=i(t),R(f.$$.fragment,t),L=i(t),$=c(t,"P",{}),S($).forEach(a),this.h()},h(){k(s,"name","hf:doc:metadata"),k(s,"content",V)},m(t,e){U(document.head,s),n(t,T,e),n(t,h,e),n(t,_,e),A(m,t,e),n(t,b,e),A(o,t,e),n(t,g,e),n(t,l,e),n(t,E,e),n(t,p,e),n(t,P,e),n(t,d,e),n(t,C,e),A(f,t,e),n(t,L,e),n(t,$,e),v=!0},p:q,i(t){v||(B(m.$$.fragment,t),B(o.$$.fragment,t),B(f.$$.fragment,t),v=!0)},o(t){M(m.$$.fragment,t),M(o.$$.fragment,t),M(f.$$.fragment,t),v=!1},d(t){t&&(a(T),a(h),a(_),a(b),a(g),a(l),a(E),a(p),a(P),a(d),a(C),a(L),a($)),a(s),y(m,t),y(o,t),y(f,t)}}}const V='{"title":"总结","local":"总结","sections":[],"depth":1}';function W(H){return D(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class at extends F{constructor(s){super(),I(this,s,W,Q,j,{})}}export{at as component};
