import{S as za,i as Da,s as Ha,e as s,k as d,w as T,t as l,M as La,c as o,d as a,m as p,a as n,x as B,h as r,b as c,G as t,g as h,y as q,L as Oa,q as X,o as Y,B as Q,v as Ka}from"../../chunks/vendor-hf-doc-builder.js";import{I as Je}from"../../chunks/IconCopyLink-hf-doc-builder.js";import{C as Qa}from"../../chunks/CodeBlock-hf-doc-builder.js";function es(ha){let b,Se,y,j,ne,A,et,le,tt,Ae,E,x,re,P,at,ie,st,Pe,U,ot,Z,nt,lt,Ze,z,rt,Fe,D,he,it,Ve,C,$,ce,F,ht,de,ct,We,m,dt,pe,pt,ut,ue,mt,ft,V,gt,vt,me,Mt,wt,Ge,_,J,fe,W,bt,ge,yt,Ie,H,Et,Re,u,L,ve,Ct,_t,kt,O,Me,jt,xt,Ut,K,we,$t,Jt,St,ee,be,At,Pt,Zt,te,ye,Ft,Vt,Wt,ae,Ee,Gt,It,Ne,f,Rt,Ce,Nt,Tt,_e,Bt,qt,ke,Xt,Yt,je,Qt,zt,Te,se,Dt,Be,G,qe,k,S,xe,I,Ht,Ue,Lt,Xe,v,Ot,R,Kt,ea,$e,ta,aa,Ye,N,Qe;return A=new Je({}),P=new Je({}),F=new Je({}),W=new Je({}),G=new Qa({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Qcm9jZXNzb3IlMkMlMjBQaXgyU3RydWN0Rm9yQ29uZGl0aW9uYWxHZW5lcmF0aW9uJTBBaW1wb3J0JTIwcmVxdWVzdHMlMEFmcm9tJTIwUElMJTIwaW1wb3J0JTIwSW1hZ2UlMEElMEFtb2RlbCUyMCUzRCUyMFBpeDJTdHJ1Y3RGb3JDb25kaXRpb25hbEdlbmVyYXRpb24uZnJvbV9wcmV0cmFpbmVkKCUyMmdvb2dsZSUyRm1hdGNoYS1jaGFydHFhJTIyKS50bygwKSUwQXByb2Nlc3NvciUyMCUzRCUyMEF1dG9Qcm9jZXNzb3IuZnJvbV9wcmV0cmFpbmVkKCUyMmdvb2dsZSUyRm1hdGNoYS1jaGFydHFhJTIyKSUwQXVybCUyMCUzRCUyMCUyMmh0dHBzJTNBJTJGJTJGcmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSUyRnZpcy1ubHAlMkZDaGFydFFBJTJGbWFpbiUyRkNoYXJ0UUElMjUyMERhdGFzZXQlMkZ2YWwlMkZwbmclMkYyMDI5NDY3MTAwMjAxOS5wbmclMjIlMEFpbWFnZSUyMCUzRCUyMEltYWdlLm9wZW4ocmVxdWVzdHMuZ2V0KHVybCUyQyUyMHN0cmVhbSUzRFRydWUpLnJhdyklMEElMEFpbnB1dHMlMjAlM0QlMjBwcm9jZXNzb3IoaW1hZ2VzJTNEaW1hZ2UlMkMlMjB0ZXh0JTNEJTIySXMlMjB0aGUlMjBzdW0lMjBvZiUyMGFsbCUyMDQlMjBwbGFjZXMlMjBncmVhdGVyJTIwdGhhbiUyMExhb3MlM0YlMjIlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKS50bygwKSUwQXByZWRpY3Rpb25zJTIwJTNEJTIwbW9kZWwuZ2VuZXJhdGUoKippbnB1dHMlMkMlMjBtYXhfbmV3X3Rva2VucyUzRDUxMiklMEFwcmludChwcm9jZXNzb3IuZGVjb2RlKHByZWRpY3Rpb25zJTVCMCU1RCUyQyUyMHNraXBfc3BlY2lhbF90b2tlbnMlM0RUcnVlKSk=",highlighted:`<span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoProcessor, Pix2StructForConditionalGeneration
<span class="hljs-keyword">import</span> requests
<span class="hljs-keyword">from</span> PIL <span class="hljs-keyword">import</span> Image

model = Pix2StructForConditionalGeneration.from_pretrained(<span class="hljs-string">&quot;google/matcha-chartqa&quot;</span>).to(<span class="hljs-number">0</span>)
processor = AutoProcessor.from_pretrained(<span class="hljs-string">&quot;google/matcha-chartqa&quot;</span>)
url = <span class="hljs-string">&quot;https://raw.githubusercontent.com/vis-nlp/ChartQA/main/ChartQA%20Dataset/val/png/20294671002019.png&quot;</span>
image = Image.<span class="hljs-built_in">open</span>(requests.get(url, stream=<span class="hljs-literal">True</span>).raw)

inputs = processor(images=image, text=<span class="hljs-string">&quot;Is the sum of all 4 places greater than Laos?&quot;</span>, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>).to(<span class="hljs-number">0</span>)
predictions = model.generate(**inputs, max_new_tokens=<span class="hljs-number">512</span>)
<span class="hljs-built_in">print</span>(processor.decode(predictions[<span class="hljs-number">0</span>], skip_special_tokens=<span class="hljs-literal">True</span>))`}}),I=new Je({}),N=new Qa({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycy5vcHRpbWl6YXRpb24lMjBpbXBvcnQlMjBBZGFmYWN0b3IlMkMlMjBnZXRfY29zaW5lX3NjaGVkdWxlX3dpdGhfd2FybXVwJTBBJTBBb3B0aW1pemVyJTIwJTNEJTIwQWRhZmFjdG9yKHNlbGYucGFyYW1ldGVycygpJTJDJTIwc2NhbGVfcGFyYW1ldGVyJTNERmFsc2UlMkMlMjByZWxhdGl2ZV9zdGVwJTNERmFsc2UlMkMlMjBsciUzRDAuMDElMkMlMjB3ZWlnaHRfZGVjYXklM0QxZS0wNSklMEFzY2hlZHVsZXIlMjAlM0QlMjBnZXRfY29zaW5lX3NjaGVkdWxlX3dpdGhfd2FybXVwKG9wdGltaXplciUyQyUyMG51bV93YXJtdXBfc3RlcHMlM0QxMDAwJTJDJTIwbnVtX3RyYWluaW5nX3N0ZXBzJTNENDAwMDAp",highlighted:`<span class="hljs-keyword">from</span> transformers.optimization <span class="hljs-keyword">import</span> Adafactor, get_cosine_schedule_with_warmup

optimizer = Adafactor(self.parameters(), scale_parameter=<span class="hljs-literal">False</span>, relative_step=<span class="hljs-literal">False</span>, lr=<span class="hljs-number">0.01</span>, weight_decay=<span class="hljs-number">1e-05</span>)
scheduler = get_cosine_schedule_with_warmup(optimizer, num_warmup_steps=<span class="hljs-number">1000</span>, num_training_steps=<span class="hljs-number">40000</span>)`}}),{c(){b=s("meta"),Se=d(),y=s("h1"),j=s("a"),ne=s("span"),T(A.$$.fragment),et=d(),le=s("span"),tt=l("MatCha"),Ae=d(),E=s("h2"),x=s("a"),re=s("span"),T(P.$$.fragment),at=d(),ie=s("span"),st=l("Overview"),Pe=d(),U=s("p"),ot=l("MatCha has been proposed in the paper "),Z=s("a"),nt=l("MatCha: Enhancing Visual Language Pretraining with Math Reasoning and Chart Derendering"),lt=l(", from Fangyu Liu, Francesco Piccinno, Syrine Krichene, Chenxi Pang, Kenton Lee, Mandar Joshi, Yasemin Altun, Nigel Collier, Julian Martin Eisenschlos."),Ze=d(),z=s("p"),rt=l("The abstract of the paper states the following:"),Fe=d(),D=s("p"),he=s("em"),it=l("Visual language data such as plots, charts, and infographics are ubiquitous in the human world. However, state-of-the-art vision-language models do not perform well on these data. We propose MatCha (Math reasoning and Chart derendering pretraining) to enhance visual language models\u2019 capabilities in jointly modeling charts/plots and language data. Specifically, we propose several pretraining tasks that cover plot deconstruction and numerical reasoning which are the key capabilities in visual language modeling. We perform the MatCha pretraining starting from Pix2Struct, a recently proposed image-to-text visual language model. On standard benchmarks such as PlotQA and ChartQA, the MatCha model outperforms state-of-the-art methods by as much as nearly 20%. We also examine how well MatCha pretraining transfers to domains such as screenshots, textbook diagrams, and document figures and observe overall improvement, verifying the usefulness of MatCha pretraining on broader visual language tasks."),Ve=d(),C=s("h2"),$=s("a"),ce=s("span"),T(F.$$.fragment),ht=d(),de=s("span"),ct=l("Model description"),We=d(),m=s("p"),dt=l("MatCha is a model that is trained using "),pe=s("code"),pt=l("Pix2Struct"),ut=l(" architecture. You can find more information about "),ue=s("code"),mt=l("Pix2Struct"),ft=l(" in the "),V=s("a"),gt=l("Pix2Struct documentation"),vt=l(`.
MatCha is a Visual Question Answering subset of `),me=s("code"),Mt=l("Pix2Struct"),wt=l(" architecture. It renders the input question on the image and predicts the answer."),Ge=d(),_=s("h2"),J=s("a"),fe=s("span"),T(W.$$.fragment),bt=d(),ge=s("span"),yt=l("Usage"),Ie=d(),H=s("p"),Et=l("Currently 6 checkpoints are available for MatCha:"),Re=d(),u=s("ul"),L=s("li"),ve=s("code"),Ct=l("google/matcha"),_t=l(": the base MatCha model, used to fine-tune MatCha on downstream tasks"),kt=d(),O=s("li"),Me=s("code"),jt=l("google/matcha-chartqa"),xt=l(": MatCha model fine-tuned on ChartQA dataset. It can be used to answer questions about charts."),Ut=d(),K=s("li"),we=s("code"),$t=l("google/matcha-plotqa-v1"),Jt=l(": MatCha model fine-tuned on PlotQA dataset. It can be used to answer questions about plots."),St=d(),ee=s("li"),be=s("code"),At=l("google/matcha-plotqa-v2"),Pt=l(": MatCha model fine-tuned on PlotQA dataset. It can be used to answer questions about plots."),Zt=d(),te=s("li"),ye=s("code"),Ft=l("google/matcha-chart2text-statista"),Vt=l(": MatCha model fine-tuned on Statista dataset."),Wt=d(),ae=s("li"),Ee=s("code"),Gt=l("google/matcha-chart2text-pew"),It=l(": MatCha model fine-tuned on Pew dataset."),Ne=d(),f=s("p"),Rt=l("The models finetuned on "),Ce=s("code"),Nt=l("chart2text-pew"),Tt=l(" and "),_e=s("code"),Bt=l("chart2text-statista"),qt=l(" are more suited for summarization, whereas the models finetuned on "),ke=s("code"),Xt=l("plotqa"),Yt=l(" and "),je=s("code"),Qt=l("chartqa"),zt=l(" are more suited for question answering."),Te=d(),se=s("p"),Dt=l("You can use these models as follows (example on a ChatQA dataset):"),Be=d(),T(G.$$.fragment),qe=d(),k=s("h2"),S=s("a"),xe=s("span"),T(I.$$.fragment),Ht=d(),Ue=s("span"),Lt=l("Fine-tuning"),Xe=d(),v=s("p"),Ot=l("To fine-tune MatCha, refer to the pix2struct "),R=s("a"),Kt=l("fine-tuning notebook"),ea=l(". For "),$e=s("code"),ta=l("Pix2Struct"),aa=l(" models, we have found out that fine-tuning the model with Adafactor and cosine learning rate scheduler leads to faste convergence:"),Ye=d(),T(N.$$.fragment),this.h()},l(e){const i=La('[data-svelte="svelte-1phssyn"]',document.head);b=o(i,"META",{name:!0,content:!0}),i.forEach(a),Se=p(e),y=o(e,"H1",{class:!0});var ze=n(y);j=o(ze,"A",{id:!0,class:!0,href:!0});var ca=n(j);ne=o(ca,"SPAN",{});var da=n(ne);B(A.$$.fragment,da),da.forEach(a),ca.forEach(a),et=p(ze),le=o(ze,"SPAN",{});var pa=n(le);tt=r(pa,"MatCha"),pa.forEach(a),ze.forEach(a),Ae=p(e),E=o(e,"H2",{class:!0});var De=n(E);x=o(De,"A",{id:!0,class:!0,href:!0});var ua=n(x);re=o(ua,"SPAN",{});var ma=n(re);B(P.$$.fragment,ma),ma.forEach(a),ua.forEach(a),at=p(De),ie=o(De,"SPAN",{});var fa=n(ie);st=r(fa,"Overview"),fa.forEach(a),De.forEach(a),Pe=p(e),U=o(e,"P",{});var He=n(U);ot=r(He,"MatCha has been proposed in the paper "),Z=o(He,"A",{href:!0,rel:!0});var ga=n(Z);nt=r(ga,"MatCha: Enhancing Visual Language Pretraining with Math Reasoning and Chart Derendering"),ga.forEach(a),lt=r(He,", from Fangyu Liu, Francesco Piccinno, Syrine Krichene, Chenxi Pang, Kenton Lee, Mandar Joshi, Yasemin Altun, Nigel Collier, Julian Martin Eisenschlos."),He.forEach(a),Ze=p(e),z=o(e,"P",{});var va=n(z);rt=r(va,"The abstract of the paper states the following:"),va.forEach(a),Fe=p(e),D=o(e,"P",{});var Ma=n(D);he=o(Ma,"EM",{});var wa=n(he);it=r(wa,"Visual language data such as plots, charts, and infographics are ubiquitous in the human world. However, state-of-the-art vision-language models do not perform well on these data. We propose MatCha (Math reasoning and Chart derendering pretraining) to enhance visual language models\u2019 capabilities in jointly modeling charts/plots and language data. Specifically, we propose several pretraining tasks that cover plot deconstruction and numerical reasoning which are the key capabilities in visual language modeling. We perform the MatCha pretraining starting from Pix2Struct, a recently proposed image-to-text visual language model. On standard benchmarks such as PlotQA and ChartQA, the MatCha model outperforms state-of-the-art methods by as much as nearly 20%. We also examine how well MatCha pretraining transfers to domains such as screenshots, textbook diagrams, and document figures and observe overall improvement, verifying the usefulness of MatCha pretraining on broader visual language tasks."),wa.forEach(a),Ma.forEach(a),Ve=p(e),C=o(e,"H2",{class:!0});var Le=n(C);$=o(Le,"A",{id:!0,class:!0,href:!0});var ba=n($);ce=o(ba,"SPAN",{});var ya=n(ce);B(F.$$.fragment,ya),ya.forEach(a),ba.forEach(a),ht=p(Le),de=o(Le,"SPAN",{});var Ea=n(de);ct=r(Ea,"Model description"),Ea.forEach(a),Le.forEach(a),We=p(e),m=o(e,"P",{});var M=n(m);dt=r(M,"MatCha is a model that is trained using "),pe=o(M,"CODE",{});var Ca=n(pe);pt=r(Ca,"Pix2Struct"),Ca.forEach(a),ut=r(M," architecture. You can find more information about "),ue=o(M,"CODE",{});var _a=n(ue);mt=r(_a,"Pix2Struct"),_a.forEach(a),ft=r(M," in the "),V=o(M,"A",{href:!0,rel:!0});var ka=n(V);gt=r(ka,"Pix2Struct documentation"),ka.forEach(a),vt=r(M,`.
MatCha is a Visual Question Answering subset of `),me=o(M,"CODE",{});var ja=n(me);Mt=r(ja,"Pix2Struct"),ja.forEach(a),wt=r(M," architecture. It renders the input question on the image and predicts the answer."),M.forEach(a),Ge=p(e),_=o(e,"H2",{class:!0});var Oe=n(_);J=o(Oe,"A",{id:!0,class:!0,href:!0});var xa=n(J);fe=o(xa,"SPAN",{});var Ua=n(fe);B(W.$$.fragment,Ua),Ua.forEach(a),xa.forEach(a),bt=p(Oe),ge=o(Oe,"SPAN",{});var $a=n(ge);yt=r($a,"Usage"),$a.forEach(a),Oe.forEach(a),Ie=p(e),H=o(e,"P",{});var Ja=n(H);Et=r(Ja,"Currently 6 checkpoints are available for MatCha:"),Ja.forEach(a),Re=p(e),u=o(e,"UL",{});var g=n(u);L=o(g,"LI",{});var sa=n(L);ve=o(sa,"CODE",{});var Sa=n(ve);Ct=r(Sa,"google/matcha"),Sa.forEach(a),_t=r(sa,": the base MatCha model, used to fine-tune MatCha on downstream tasks"),sa.forEach(a),kt=p(g),O=o(g,"LI",{});var oa=n(O);Me=o(oa,"CODE",{});var Aa=n(Me);jt=r(Aa,"google/matcha-chartqa"),Aa.forEach(a),xt=r(oa,": MatCha model fine-tuned on ChartQA dataset. It can be used to answer questions about charts."),oa.forEach(a),Ut=p(g),K=o(g,"LI",{});var na=n(K);we=o(na,"CODE",{});var Pa=n(we);$t=r(Pa,"google/matcha-plotqa-v1"),Pa.forEach(a),Jt=r(na,": MatCha model fine-tuned on PlotQA dataset. It can be used to answer questions about plots."),na.forEach(a),St=p(g),ee=o(g,"LI",{});var la=n(ee);be=o(la,"CODE",{});var Za=n(be);At=r(Za,"google/matcha-plotqa-v2"),Za.forEach(a),Pt=r(la,": MatCha model fine-tuned on PlotQA dataset. It can be used to answer questions about plots."),la.forEach(a),Zt=p(g),te=o(g,"LI",{});var ra=n(te);ye=o(ra,"CODE",{});var Fa=n(ye);Ft=r(Fa,"google/matcha-chart2text-statista"),Fa.forEach(a),Vt=r(ra,": MatCha model fine-tuned on Statista dataset."),ra.forEach(a),Wt=p(g),ae=o(g,"LI",{});var ia=n(ae);Ee=o(ia,"CODE",{});var Va=n(Ee);Gt=r(Va,"google/matcha-chart2text-pew"),Va.forEach(a),It=r(ia,": MatCha model fine-tuned on Pew dataset."),ia.forEach(a),g.forEach(a),Ne=p(e),f=o(e,"P",{});var w=n(f);Rt=r(w,"The models finetuned on "),Ce=o(w,"CODE",{});var Wa=n(Ce);Nt=r(Wa,"chart2text-pew"),Wa.forEach(a),Tt=r(w," and "),_e=o(w,"CODE",{});var Ga=n(_e);Bt=r(Ga,"chart2text-statista"),Ga.forEach(a),qt=r(w," are more suited for summarization, whereas the models finetuned on "),ke=o(w,"CODE",{});var Ia=n(ke);Xt=r(Ia,"plotqa"),Ia.forEach(a),Yt=r(w," and "),je=o(w,"CODE",{});var Ra=n(je);Qt=r(Ra,"chartqa"),Ra.forEach(a),zt=r(w," are more suited for question answering."),w.forEach(a),Te=p(e),se=o(e,"P",{});var Na=n(se);Dt=r(Na,"You can use these models as follows (example on a ChatQA dataset):"),Na.forEach(a),Be=p(e),B(G.$$.fragment,e),qe=p(e),k=o(e,"H2",{class:!0});var Ke=n(k);S=o(Ke,"A",{id:!0,class:!0,href:!0});var Ta=n(S);xe=o(Ta,"SPAN",{});var Ba=n(xe);B(I.$$.fragment,Ba),Ba.forEach(a),Ta.forEach(a),Ht=p(Ke),Ue=o(Ke,"SPAN",{});var qa=n(Ue);Lt=r(qa,"Fine-tuning"),qa.forEach(a),Ke.forEach(a),Xe=p(e),v=o(e,"P",{});var oe=n(v);Ot=r(oe,"To fine-tune MatCha, refer to the pix2struct "),R=o(oe,"A",{href:!0,rel:!0});var Xa=n(R);Kt=r(Xa,"fine-tuning notebook"),Xa.forEach(a),ea=r(oe,". For "),$e=o(oe,"CODE",{});var Ya=n($e);ta=r(Ya,"Pix2Struct"),Ya.forEach(a),aa=r(oe," models, we have found out that fine-tuning the model with Adafactor and cosine learning rate scheduler leads to faste convergence:"),oe.forEach(a),Ye=p(e),B(N.$$.fragment,e),this.h()},h(){c(b,"name","hf:doc:metadata"),c(b,"content",JSON.stringify(ts)),c(j,"id","matcha"),c(j,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(j,"href","#matcha"),c(y,"class","relative group"),c(x,"id","overview"),c(x,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(x,"href","#overview"),c(E,"class","relative group"),c(Z,"href","https://arxiv.org/abs/2212.09662"),c(Z,"rel","nofollow"),c($,"id","model-description"),c($,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c($,"href","#model-description"),c(C,"class","relative group"),c(V,"href","https://huggingface.co/docs/transformers/main/en/model_doc/pix2struct"),c(V,"rel","nofollow"),c(J,"id","usage"),c(J,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(J,"href","#usage"),c(_,"class","relative group"),c(S,"id","finetuning"),c(S,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(S,"href","#finetuning"),c(k,"class","relative group"),c(R,"href","https://github.com/huggingface/notebooks/blob/main/examples/image_captioning_pix2struct.ipynb"),c(R,"rel","nofollow")},m(e,i){t(document.head,b),h(e,Se,i),h(e,y,i),t(y,j),t(j,ne),q(A,ne,null),t(y,et),t(y,le),t(le,tt),h(e,Ae,i),h(e,E,i),t(E,x),t(x,re),q(P,re,null),t(E,at),t(E,ie),t(ie,st),h(e,Pe,i),h(e,U,i),t(U,ot),t(U,Z),t(Z,nt),t(U,lt),h(e,Ze,i),h(e,z,i),t(z,rt),h(e,Fe,i),h(e,D,i),t(D,he),t(he,it),h(e,Ve,i),h(e,C,i),t(C,$),t($,ce),q(F,ce,null),t(C,ht),t(C,de),t(de,ct),h(e,We,i),h(e,m,i),t(m,dt),t(m,pe),t(pe,pt),t(m,ut),t(m,ue),t(ue,mt),t(m,ft),t(m,V),t(V,gt),t(m,vt),t(m,me),t(me,Mt),t(m,wt),h(e,Ge,i),h(e,_,i),t(_,J),t(J,fe),q(W,fe,null),t(_,bt),t(_,ge),t(ge,yt),h(e,Ie,i),h(e,H,i),t(H,Et),h(e,Re,i),h(e,u,i),t(u,L),t(L,ve),t(ve,Ct),t(L,_t),t(u,kt),t(u,O),t(O,Me),t(Me,jt),t(O,xt),t(u,Ut),t(u,K),t(K,we),t(we,$t),t(K,Jt),t(u,St),t(u,ee),t(ee,be),t(be,At),t(ee,Pt),t(u,Zt),t(u,te),t(te,ye),t(ye,Ft),t(te,Vt),t(u,Wt),t(u,ae),t(ae,Ee),t(Ee,Gt),t(ae,It),h(e,Ne,i),h(e,f,i),t(f,Rt),t(f,Ce),t(Ce,Nt),t(f,Tt),t(f,_e),t(_e,Bt),t(f,qt),t(f,ke),t(ke,Xt),t(f,Yt),t(f,je),t(je,Qt),t(f,zt),h(e,Te,i),h(e,se,i),t(se,Dt),h(e,Be,i),q(G,e,i),h(e,qe,i),h(e,k,i),t(k,S),t(S,xe),q(I,xe,null),t(k,Ht),t(k,Ue),t(Ue,Lt),h(e,Xe,i),h(e,v,i),t(v,Ot),t(v,R),t(R,Kt),t(v,ea),t(v,$e),t($e,ta),t(v,aa),h(e,Ye,i),q(N,e,i),Qe=!0},p:Oa,i(e){Qe||(X(A.$$.fragment,e),X(P.$$.fragment,e),X(F.$$.fragment,e),X(W.$$.fragment,e),X(G.$$.fragment,e),X(I.$$.fragment,e),X(N.$$.fragment,e),Qe=!0)},o(e){Y(A.$$.fragment,e),Y(P.$$.fragment,e),Y(F.$$.fragment,e),Y(W.$$.fragment,e),Y(G.$$.fragment,e),Y(I.$$.fragment,e),Y(N.$$.fragment,e),Qe=!1},d(e){a(b),e&&a(Se),e&&a(y),Q(A),e&&a(Ae),e&&a(E),Q(P),e&&a(Pe),e&&a(U),e&&a(Ze),e&&a(z),e&&a(Fe),e&&a(D),e&&a(Ve),e&&a(C),Q(F),e&&a(We),e&&a(m),e&&a(Ge),e&&a(_),Q(W),e&&a(Ie),e&&a(H),e&&a(Re),e&&a(u),e&&a(Ne),e&&a(f),e&&a(Te),e&&a(se),e&&a(Be),Q(G,e),e&&a(qe),e&&a(k),Q(I),e&&a(Xe),e&&a(v),e&&a(Ye),Q(N,e)}}}const ts={local:"matcha",sections:[{local:"overview",title:"Overview"},{local:"model-description",title:"Model description"},{local:"usage",title:"Usage"},{local:"finetuning",title:"Fine-tuning"}],title:"MatCha"};function as(ha){return Ka(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class ls extends za{constructor(b){super();Da(this,b,as,es,Ha,{})}}export{ls as default,ts as metadata};
