import{s as Q,n as O,o as V}from"../chunks/scheduler.cd324960.js";import{S as K,i as tt,e as o,s as a,c as L,h as et,a as p,d as n,b as l,f as X,g as W,j as w,k as Y,l as nt,m as s,n as H,t as S,o as k,p as z}from"../chunks/index.d5c3adcc.js";import{C as st,H as at,E as lt}from"../chunks/MermaidChart.svelte_svelte_type_style_lang.e12d9735.js";import{C as it}from"../chunks/CodeBlock.111eae80.js";function ot(F){let i,g,y,C,m,I,r,M,u,N=`在本单元中，我们探讨了微调 ASR 模型的挑战，验证了在新语言上微调像 Whisper（即使是小型检查点）模型需要不少时间和资源。
为了提供实践经验，我们设计了一个练习，让您能够在使用较小数据集的情况下，体验微调 ASR 模型的过程。
这个练习的主要目的是让您熟悉过程，而不是取得生产级别的结果。我们故意设置了一个低指标，以确保即使在资源有限的情况下，您也应该能够达到它。`,x,c,A="以下是指导说明：",b,d,G="<li>使用 <code>&quot;PolyAI/minds14&quot;</code> 数据集的美式英语（“en-US”）子集，微调 <code>&quot;openai/whisper-tiny&quot;</code> 模型。</li> <li>使用 <strong>前450 个样本</strong>进行训练，其余的用于评估。确保在使用 <code>.map</code> 方法预处理数据集时设置 <code>num_proc=1</code>（这将确保您的模型正确提交以进行评估）。</li> <li>评估模型时，使用本单元描述的 <code>wer</code> 和 <code>wer_ortho</code> 指标。但是，<em>不要</em> 通过乘以 100 将指标转换为百分比（例如，如果 WER 是 42%，我们将期望在此练习中看到 0.42 的值）。</li>",q,f,R="您微调了一个模型后，请使用以下 <code>kwargs</code> 将其上传到 🤗 Hub：",v,T,P,J,Z="如果您的模型的标准化 WER（<code>wer</code>）低于 <strong>0.37</strong>，您将通过这个任务。",U,$,D="请随意构建您的模型 demo，并在 Discord 上分享！如果您有任何问题，欢迎在 #audio-study-group 频道发布。",j,h,B,_,E;return m=new st({props:{containerStyle:"float: right; margin-left: 10px; display: inline-flex; position: relative; z-index: 10;"}}),r=new at({props:{title:"实战练习",local:"实战练习",headingTag:"h1"}}),T=new it({props:{code:"a3dhcmdzJTIwJTNEJTIwJTdCJTBBJTIwJTIwJTIwJTIwJTIyZGF0YXNldF90YWdzJTIyJTNBJTIwJTIyUG9seUFJJTJGbWluZHMxNCUyMiUyQyUwQSUyMCUyMCUyMCUyMCUyMmZpbmV0dW5lZF9mcm9tJTIyJTNBJTIwJTIyb3BlbmFpJTJGd2hpc3Blci10aW55JTIyJTJDJTBBJTIwJTIwJTIwJTIwJTIydGFza3MlMjIlM0ElMjAlMjJhdXRvbWF0aWMtc3BlZWNoLXJlY29nbml0aW9uJTIyJTJDJTBBJTdE",highlighted:`<span class="hljs-attribute">kwargs</span> = {
    <span class="hljs-string">&quot;dataset_tags&quot;</span>: <span class="hljs-string">&quot;PolyAI/minds14&quot;</span>,
    <span class="hljs-string">&quot;finetuned_from&quot;</span>: <span class="hljs-string">&quot;openai/whisper-tiny&quot;</span>,
    <span class="hljs-string">&quot;tasks&quot;</span>: <span class="hljs-string">&quot;automatic-speech-recognition&quot;</span>,
}`,wrap:!1}}),h=new lt({props:{source:"https://github.com/huggingface/audio-transformers-course/blob/main/chapters/zh-CN/chapter5/hands_on.mdx"}}),{c(){i=o("meta"),g=a(),y=o("p"),C=a(),L(m.$$.fragment),I=a(),L(r.$$.fragment),M=a(),u=o("p"),u.textContent=N,x=a(),c=o("p"),c.textContent=A,b=a(),d=o("ul"),d.innerHTML=G,q=a(),f=o("p"),f.innerHTML=R,v=a(),L(T.$$.fragment),P=a(),J=o("p"),J.innerHTML=Z,U=a(),$=o("p"),$.textContent=D,j=a(),L(h.$$.fragment),B=a(),_=o("p"),this.h()},l(t){const e=et("svelte-u9bgzb",document.head);i=p(e,"META",{name:!0,content:!0}),e.forEach(n),g=l(t),y=p(t,"P",{}),X(y).forEach(n),C=l(t),W(m.$$.fragment,t),I=l(t),W(r.$$.fragment,t),M=l(t),u=p(t,"P",{"data-svelte-h":!0}),w(u)!=="svelte-skumjy"&&(u.textContent=N),x=l(t),c=p(t,"P",{"data-svelte-h":!0}),w(c)!=="svelte-rwaewa"&&(c.textContent=A),b=l(t),d=p(t,"UL",{"data-svelte-h":!0}),w(d)!=="svelte-w4rozn"&&(d.innerHTML=G),q=l(t),f=p(t,"P",{"data-svelte-h":!0}),w(f)!=="svelte-126ugt7"&&(f.innerHTML=R),v=l(t),W(T.$$.fragment,t),P=l(t),J=p(t,"P",{"data-svelte-h":!0}),w(J)!=="svelte-ebl5f4"&&(J.innerHTML=Z),U=l(t),$=p(t,"P",{"data-svelte-h":!0}),w($)!=="svelte-13eivqu"&&($.textContent=D),j=l(t),W(h.$$.fragment,t),B=l(t),_=p(t,"P",{}),X(_).forEach(n),this.h()},h(){Y(i,"name","hf:doc:metadata"),Y(i,"content",pt)},m(t,e){nt(document.head,i),s(t,g,e),s(t,y,e),s(t,C,e),H(m,t,e),s(t,I,e),H(r,t,e),s(t,M,e),s(t,u,e),s(t,x,e),s(t,c,e),s(t,b,e),s(t,d,e),s(t,q,e),s(t,f,e),s(t,v,e),H(T,t,e),s(t,P,e),s(t,J,e),s(t,U,e),s(t,$,e),s(t,j,e),H(h,t,e),s(t,B,e),s(t,_,e),E=!0},p:O,i(t){E||(S(m.$$.fragment,t),S(r.$$.fragment,t),S(T.$$.fragment,t),S(h.$$.fragment,t),E=!0)},o(t){k(m.$$.fragment,t),k(r.$$.fragment,t),k(T.$$.fragment,t),k(h.$$.fragment,t),E=!1},d(t){t&&(n(g),n(y),n(C),n(I),n(M),n(u),n(x),n(c),n(b),n(d),n(q),n(f),n(v),n(P),n(J),n(U),n($),n(j),n(B),n(_)),n(i),z(m,t),z(r,t),z(T,t),z(h,t)}}}const pt='{"title":"实战练习","local":"实战练习","sections":[],"depth":1}';function mt(F){return V(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class ft extends K{constructor(i){super(),tt(this,i,mt,ot,Q,{})}}export{ft as component};
