import{s as G,n as N,o as k}from"../chunks/scheduler.37c15a92.js";import{S as q,i as D,g as f,s as p,r as g,A as F,h as u,f as a,c as d,j as w,u as y,x as b,k as M,y as I,a as n,v as H,d as S,t as j,w as z}from"../chunks/index.2bf4358c.js";import{C as U}from"../chunks/CourseFloatingBanner.06521e8b.js";import{H as X}from"../chunks/Heading.8ada512a.js";function J(R){let s,T,c,_,r,$,l,C,o,L="在本章中，您了解了如何使用来自🤗Transformers的函数pipeline()处理不同的NLP任务。您还了解了如何在模型中心（hub）中搜索和使用模型，以及如何使用推理API直接在浏览器中测试模型。",P,i,A="我们讨论了Transformer模型如何在应用层上工作，并讨论了迁移学习和微调的重要性。您可以使用完整的体系结构，也可以仅使用编码器或解码器，具体取决于您要解决的任务类型。下表总结了这一点：",v,m,B="<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>文本摘要、翻译、生成问题的回答</td></tr></tbody>",x,h,E;return r=new X({props:{title:"总结",local:"总结",headingTag:"h1"}}),l=new U({props:{chapter:1,classNames:"absolute z-10 right-0 top-0"}}),{c(){s=f("meta"),T=p(),c=f("p"),_=p(),g(r.$$.fragment),$=p(),g(l.$$.fragment),C=p(),o=f("p"),o.textContent=L,P=p(),i=f("p"),i.textContent=A,v=p(),m=f("table"),m.innerHTML=B,x=p(),h=f("p"),this.h()},l(t){const e=F("svelte-u9bgzb",document.head);s=u(e,"META",{name:!0,content:!0}),e.forEach(a),T=d(t),c=u(t,"P",{}),w(c).forEach(a),_=d(t),y(r.$$.fragment,t),$=d(t),y(l.$$.fragment,t),C=d(t),o=u(t,"P",{"data-svelte-h":!0}),b(o)!=="svelte-fb27o5"&&(o.textContent=L),P=d(t),i=u(t,"P",{"data-svelte-h":!0}),b(i)!=="svelte-g4pvpp"&&(i.textContent=A),v=d(t),m=u(t,"TABLE",{"data-svelte-h":!0}),b(m)!=="svelte-16e7jpy"&&(m.innerHTML=B),x=d(t),h=u(t,"P",{}),w(h).forEach(a),this.h()},h(){M(s,"name","hf:doc:metadata"),M(s,"content",K)},m(t,e){I(document.head,s),n(t,T,e),n(t,c,e),n(t,_,e),H(r,t,e),n(t,$,e),H(l,t,e),n(t,C,e),n(t,o,e),n(t,P,e),n(t,i,e),n(t,v,e),n(t,m,e),n(t,x,e),n(t,h,e),E=!0},p:N,i(t){E||(S(r.$$.fragment,t),S(l.$$.fragment,t),E=!0)},o(t){j(r.$$.fragment,t),j(l.$$.fragment,t),E=!1},d(t){t&&(a(T),a(c),a(_),a($),a(C),a(o),a(P),a(i),a(v),a(m),a(x),a(h)),a(s),z(r,t),z(l,t)}}}const K='{"title":"总结","local":"总结","sections":[],"depth":1}';function O(R){return k(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Z extends q{constructor(s){super(),D(this,s,O,J,G,{})}}export{Z as component};
