import{s as D,n as F,o as I}from"../chunks/scheduler.cc52f4b9.js";import{S as O,i as U,e as $,s as r,c as y,h as X,a as c,d as a,b as i,f as j,g as M,j as z,k as q,l as J,m as n,n as w,t as B,o as A,p as H}from"../chunks/index.9480bb2b.js";import{C as K,H as Q,E as V}from"../chunks/MermaidChart.svelte_svelte_type_style_lang.009dc98d.js";import{C as W}from"../chunks/CourseFloatingBanner.6488bde3.js";function Y(S){let s,_,h,b,m,g,l,x,o,C,p,G="在本章中，你了解了如何使用来自🤗Transformers 的高级函数 <code>pipeline()</code> 处理不同的 NLP 任务。你还了解了如何在模型中心（hub）中搜索和使用模型，以及如何使用推理 API 直接在浏览器中测试模型。",E,f,N="我们从最终的效果的角度讨论了 Transformer 模型的工作方式，并讨论了迁移学习和微调的重要性。一个关键的收获是：你可以使用完整的体系结构，也可以仅使用编码器或解码器，具体取决于你要解决的任务类型。下表总结了这一点：",L,d,k="<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>",P,u,v,T,R;return m=new K({props:{containerStyle:"float: right; margin-left: 10px; display: inline-flex; position: relative; z-index: 10;"}}),l=new Q({props:{title:"总结",local:"总结",headingTag:"h1"}}),o=new W({props:{chapter:1,classNames:"absolute z-10 right-0 top-0"}}),u=new V({props:{source:"https://github.com/huggingface/course/blob/main/chapters/zh-CN/chapter1/9.mdx"}}),{c(){s=$("meta"),_=r(),h=$("p"),b=r(),y(m.$$.fragment),g=r(),y(l.$$.fragment),x=r(),y(o.$$.fragment),C=r(),p=$("p"),p.innerHTML=G,E=r(),f=$("p"),f.textContent=N,L=r(),d=$("table"),d.innerHTML=k,P=r(),y(u.$$.fragment),v=r(),T=$("p"),this.h()},l(t){const e=X("svelte-u9bgzb",document.head);s=c(e,"META",{name:!0,content:!0}),e.forEach(a),_=i(t),h=c(t,"P",{}),j(h).forEach(a),b=i(t),M(m.$$.fragment,t),g=i(t),M(l.$$.fragment,t),x=i(t),M(o.$$.fragment,t),C=i(t),p=c(t,"P",{"data-svelte-h":!0}),z(p)!=="svelte-1k1dfpb"&&(p.innerHTML=G),E=i(t),f=c(t,"P",{"data-svelte-h":!0}),z(f)!=="svelte-10p7dzb"&&(f.textContent=N),L=i(t),d=c(t,"TABLE",{"data-svelte-h":!0}),z(d)!=="svelte-sd6soo"&&(d.innerHTML=k),P=i(t),M(u.$$.fragment,t),v=i(t),T=c(t,"P",{}),j(T).forEach(a),this.h()},h(){q(s,"name","hf:doc:metadata"),q(s,"content",Z)},m(t,e){J(document.head,s),n(t,_,e),n(t,h,e),n(t,b,e),w(m,t,e),n(t,g,e),w(l,t,e),n(t,x,e),w(o,t,e),n(t,C,e),n(t,p,e),n(t,E,e),n(t,f,e),n(t,L,e),n(t,d,e),n(t,P,e),w(u,t,e),n(t,v,e),n(t,T,e),R=!0},p:F,i(t){R||(B(m.$$.fragment,t),B(l.$$.fragment,t),B(o.$$.fragment,t),B(u.$$.fragment,t),R=!0)},o(t){A(m.$$.fragment,t),A(l.$$.fragment,t),A(o.$$.fragment,t),A(u.$$.fragment,t),R=!1},d(t){t&&(a(_),a(h),a(b),a(g),a(x),a(C),a(p),a(E),a(f),a(L),a(d),a(P),a(v),a(T)),a(s),H(m,t),H(l,t),H(o,t),H(u,t)}}}const Z='{"title":"总结","local":"总结","sections":[],"depth":1}';function tt(S){return I(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class rt extends O{constructor(s){super(),U(this,s,tt,Y,D,{})}}export{rt as component};
