import{s as Io,o as No,n as Po}from"../chunks/scheduler.d586627e.js";import{S as So,i as Bo,g as a,s as n,u as m,A as Ao,h as r,f as t,c as s,j as c,v as f,y as h,k as i,o as p,a as l,w as d,d as u,t as v,x as _}from"../chunks/index.b757c891.js";import{T as Xo}from"../chunks/Tip.4380e997.js";import{I as g}from"../chunks/IconCopyLink.c074b82b.js";import{C as Q}from"../chunks/CodeBlock.36019a2e.js";function Lo(He){let U,H=`A partir da versão 2.3.0 o script de conversão agora faz parte do transformers CLI (<strong>transformers-cli</strong>) disponível em qualquer instalação
transformers &gt;= 2.3.0.`,w,J,y="A documentação abaixo reflete o formato do comando <strong>transformers-cli convert</strong>.";return{c(){U=a("p"),U.innerHTML=H,w=n(),J=a("p"),J.innerHTML=y},l(T){U=r(T,"P",{"data-svelte-h":!0}),h(U)!=="svelte-opr9ez"&&(U.innerHTML=H),w=s(T),J=r(T,"P",{"data-svelte-h":!0}),h(J)!=="svelte-12vk8vx"&&(J.innerHTML=y)},m(T,b){l(T,U,b),l(T,w,b),l(T,J,b)},p:Po,d(T){T&&(t(U),t(w),t(J))}}}function Qo(He){let U,H,w,J,y,T,b,Z,It,Me,Ht="Convertendo checkpoints do TensorFlow para Pytorch",Ze,j,Zt=`Uma interface de linha de comando é fornecida para converter os checkpoints originais Bert/GPT/GPT-2/Transformer-XL/XLNet/XLM em modelos
que podem ser carregados usando os métodos <code>from_pretrained</code> da biblioteca.`,je,x,Ge,C,I,Ie,G,Nt,$e,jt="BERT",Oe,O,Gt=`Você pode converter qualquer checkpoint do BERT em TensorFlow (em particular <a href="https://github.com/google-research/bert#pre-trained-models" rel="nofollow">os modelos pré-treinados lançados pelo Google</a>) em um arquivo PyTorch usando um
<a href="https://github.com/huggingface/transformers/tree/main/src/transformers/models/bert/convert_bert_original_tf_checkpoint_to_pytorch.py" rel="nofollow">convert_bert_original_tf_checkpoint_to_pytorch.py</a> script.`,We,W,Ot=`Esta Interface de Linha de Comando (CLI) recebe como entrada um checkpoint do TensorFlow (três arquivos começando com <code>bert_model.ckpt</code>) e o
arquivo de configuração (<code>bert_config.json</code>), e então cria um modelo PyTorch para esta configuração, carrega os pesos
do checkpoint do TensorFlow no modelo PyTorch e salva o modelo resultante em um arquivo PyTorch que pode
ser importado usando <code>from_pretrained()</code> (veja o exemplo em <a href="quicktour">quicktour</a> , <a href="https://github.com/huggingface/transformers/tree/main/examples/pytorch/text-classification/run_glue.py" rel="nofollow">run_glue.py</a> ).`,De,D,Wt=`Você só precisa executar este script de conversão <strong>uma vez</strong> para obter um modelo PyTorch. Você pode então desconsiderar o checkpoint em
TensorFlow (os três arquivos começando com <code>bert_model.ckpt</code>), mas certifique-se de manter o arquivo de configuração (\\
<code>bert_config.json</code>) e o arquivo de vocabulário (<code>vocab.txt</code>), pois eles também são necessários para o modelo PyTorch.`,Ye,Y,Dt="Para executar este script de conversão específico, você precisará ter o TensorFlow e o PyTorch instalados (<code>pip install tensorflow</code>). O resto do repositório requer apenas o PyTorch.",qe,q,Yt="Aqui está um exemplo do processo de conversão para um modelo <code>BERT-Base Uncased</code> pré-treinado:",ze,z,Ke,K,qt='Você pode baixar os modelos pré-treinados do Google para a conversão <a href="https://github.com/google-research/bert#pre-trained-models" rel="nofollow">aqui</a>.',et,M,N,Ne,ee,Pt,Ee,zt="ALBERT",tt,te,Kt=`Converta os checkpoints do modelo ALBERT em TensorFlow para PyTorch usando o
<a href="https://github.com/huggingface/transformers/tree/main/src/transformers/models/albert/convert_albert_original_tf_checkpoint_to_pytorch.py" rel="nofollow">convert_albert_original_tf_checkpoint_to_pytorch.py</a> script.`,ot,oe,eo=`A Interface de Linha de Comando (CLI) recebe como entrada um checkpoint do TensorFlow (três arquivos começando com <code>model.ckpt-best</code>) e o
arquivo de configuração (<code>albert_config.json</code>), então cria e salva um modelo PyTorch. Para executar esta conversão, você
precisa ter o TensorFlow e o PyTorch instalados.`,lt,le,to="Aqui está um exemplo do processo de conversão para o modelo <code>ALBERT Base</code> pré-treinado:",at,ae,rt,re,oo='Você pode baixar os modelos pré-treinados do Google para a conversão <a href="https://github.com/google-research/albert#pre-trained-models" rel="nofollow">aqui</a>.',nt,$,P,Pe,ne,St,Ve,lo="OpenAI GPT",st,se,ao=`Aqui está um exemplo do processo de conversão para um modelo OpenAI GPT pré-treinado, supondo que seu checkpoint NumPy
foi salvo com o mesmo formato do modelo pré-treinado OpenAI (veja <a href="https://github.com/openai/finetune-transformer-lm" rel="nofollow">aqui</a>\\
)`,it,ie,pt,E,S,Se,pe,Bt,Re,ro="OpenAI GPT-2",ct,ce,no='Aqui está um exemplo do processo de conversão para um modelo OpenAI GPT-2 pré-treinado (consulte <a href="https://github.com/openai/gpt-2" rel="nofollow">aqui</a>)',ht,he,Tt,V,B,Be,Te,At,Fe,so="Transformer-XL",mt,me,io='Aqui está um exemplo do processo de conversão para um modelo Transformer-XL pré-treinado (consulte <a href="https://github.com/kimiyoung/transformer-xl/tree/master/tf#obtain-and-evaluate-pretrained-modelos-sota" rel="nofollow">aqui</a>)',ft,fe,dt,R,A,Ae,de,Xt,ke,po="XLNet",ut,ue,co="Aqui está um exemplo do processo de conversão para um modelo XLNet pré-treinado:",vt,ve,_t,F,X,Xe,_e,Lt,ge,ho="XLM",Ut,Ue,To="Aqui está um exemplo do processo de conversão para um modelo XLM pré-treinado:",Jt,Je,yt,k,L,Le,ye,Qt,xe,mo="T5",wt,we,fo="Aqui está um exemplo do processo de conversão para um modelo T5 pré-treinado:",bt,be,Ct,Qe,Mt;return Z=new g({}),x=new Xo({props:{$$slots:{default:[Lo]},$$scope:{ctx:He}}}),G=new g({}),z=new Q({props:{code:"ZXhwb3J0JTIwQkVSVF9CQVNFX0RJUiUzRCUyRnBhdGglMkZ0byUyRmJlcnQlMkZ1bmNhc2VkX0wtMTJfSC03NjhfQS0xMiUwQSUwQXRyYW5zZm9ybWVycy1jbGklMjBjb252ZXJ0JTIwLS1tb2RlbF90eXBlJTIwYmVydCUyMCU1QyUwQSUyMCUyMC0tdGZfY2hlY2twb2ludCUyMCUyNEJFUlRfQkFTRV9ESVIlMkZiZXJ0X21vZGVsLmNrcHQlMjAlNUMlMEElMjAlMjAtLWNvbmZpZyUyMCUyNEJFUlRfQkFTRV9ESVIlMkZiZXJ0X2NvbmZpZy5qc29uJTIwJTVDJTBBJTIwJTIwLS1weXRvcmNoX2R1bXBfb3V0cHV0JTIwJTI0QkVSVF9CQVNFX0RJUiUyRnB5dG9yY2hfbW9kZWwuYmlu",highlighted:`<span class="hljs-built_in">export</span> BERT_BASE_DIR=/path/to/bert/uncased_L-12_H-768_A-12

transformers-cli convert --model_type bert \\
  --tf_checkpoint <span class="hljs-variable">$BERT_BASE_DIR</span>/bert_model.ckpt \\
  --config <span class="hljs-variable">$BERT_BASE_DIR</span>/bert_config.json \\
  --pytorch_dump_output <span class="hljs-variable">$BERT_BASE_DIR</span>/pytorch_model.bin`}}),ee=new g({}),ae=new Q({props:{code:"ZXhwb3J0JTIwQUxCRVJUX0JBU0VfRElSJTNEJTJGcGF0aCUyRnRvJTJGYWxiZXJ0JTJGYWxiZXJ0X2Jhc2UlMEElMEF0cmFuc2Zvcm1lcnMtY2xpJTIwY29udmVydCUyMC0tbW9kZWxfdHlwZSUyMGFsYmVydCUyMCU1QyUwQSUyMCUyMC0tdGZfY2hlY2twb2ludCUyMCUyNEFMQkVSVF9CQVNFX0RJUiUyRm1vZGVsLmNrcHQtYmVzdCUyMCU1QyUwQSUyMCUyMC0tY29uZmlnJTIwJTI0QUxCRVJUX0JBU0VfRElSJTJGYWxiZXJ0X2NvbmZpZy5qc29uJTIwJTVDJTBBJTIwJTIwLS1weXRvcmNoX2R1bXBfb3V0cHV0JTIwJTI0QUxCRVJUX0JBU0VfRElSJTJGcHl0b3JjaF9tb2RlbC5iaW4=",highlighted:`<span class="hljs-built_in">export</span> ALBERT_BASE_DIR=/path/to/albert/albert_base

transformers-cli convert --model_type albert \\
  --tf_checkpoint <span class="hljs-variable">$ALBERT_BASE_DIR</span>/model.ckpt-best \\
  --config <span class="hljs-variable">$ALBERT_BASE_DIR</span>/albert_config.json \\
  --pytorch_dump_output <span class="hljs-variable">$ALBERT_BASE_DIR</span>/pytorch_model.bin`}}),ne=new g({}),ie=new Q({props:{code:"ZXhwb3J0JTIwT1BFTkFJX0dQVF9DSEVDS1BPSU5UX0ZPTERFUl9QQVRIJTNEJTJGcGF0aCUyRnRvJTJGb3BlbmFpJTJGcHJldHJhaW5lZCUyRm51bXB5JTJGd2VpZ2h0cyUwQSUwQXRyYW5zZm9ybWVycy1jbGklMjBjb252ZXJ0JTIwLS1tb2RlbF90eXBlJTIwZ3B0JTIwJTVDJTBBJTIwJTIwLS10Zl9jaGVja3BvaW50JTIwJTI0T1BFTkFJX0dQVF9DSEVDS1BPSU5UX0ZPTERFUl9QQVRIJTIwJTVDJTBBJTIwJTIwLS1weXRvcmNoX2R1bXBfb3V0cHV0JTIwJTI0UFlUT1JDSF9EVU1QX09VVFBVVCUyMCU1QyUwQSUyMCUyMCU1Qi0tY29uZmlnJTIwT1BFTkFJX0dQVF9DT05GSUclNUQlMjAlNUMlMEElMjAlMjAlNUItLWZpbmV0dW5pbmdfdGFza19uYW1lJTIwT1BFTkFJX0dQVF9GSU5FVFVORURfVEFTSyU1RCUyMCU1Qw==",highlighted:`<span class="hljs-built_in">export</span> OPENAI_GPT_CHECKPOINT_FOLDER_PATH=/path/to/openai/pretrained/numpy/weights

transformers-cli convert --model_type gpt \\
  --tf_checkpoint <span class="hljs-variable">$OPENAI_GPT_CHECKPOINT_FOLDER_PATH</span> \\
  --pytorch_dump_output <span class="hljs-variable">$PYTORCH_DUMP_OUTPUT</span> \\
  [--config OPENAI_GPT_CONFIG] \\
  [--finetuning_task_name OPENAI_GPT_FINETUNED_TASK] \\`}}),pe=new g({}),he=new Q({props:{code:"ZXhwb3J0JTIwT1BFTkFJX0dQVDJfQ0hFQ0tQT0lOVF9QQVRIJTNEJTJGcGF0aCUyRnRvJTJGZ3B0MiUyRnByZXRyYWluZWQlMkZ3ZWlnaHRzJTBBJTBBdHJhbnNmb3JtZXJzLWNsaSUyMGNvbnZlcnQlMjAtLW1vZGVsX3R5cGUlMjBncHQyJTIwJTVDJTBBJTIwJTIwLS10Zl9jaGVja3BvaW50JTIwJTI0T1BFTkFJX0dQVDJfQ0hFQ0tQT0lOVF9QQVRIJTIwJTVDJTBBJTIwJTIwLS1weXRvcmNoX2R1bXBfb3V0cHV0JTIwJTI0UFlUT1JDSF9EVU1QX09VVFBVVCUyMCU1QyUwQSUyMCUyMCU1Qi0tY29uZmlnJTIwT1BFTkFJX0dQVDJfQ09ORklHJTVEJTIwJTVDJTBBJTIwJTIwJTVCLS1maW5ldHVuaW5nX3Rhc2tfbmFtZSUyME9QRU5BSV9HUFQyX0ZJTkVUVU5FRF9UQVNLJTVE",highlighted:`<span class="hljs-built_in">export</span> OPENAI_GPT2_CHECKPOINT_PATH=/path/to/gpt2/pretrained/weights

transformers-cli convert --model_type gpt2 \\
  --tf_checkpoint <span class="hljs-variable">$OPENAI_GPT2_CHECKPOINT_PATH</span> \\
  --pytorch_dump_output <span class="hljs-variable">$PYTORCH_DUMP_OUTPUT</span> \\
  [--config OPENAI_GPT2_CONFIG] \\
  [--finetuning_task_name OPENAI_GPT2_FINETUNED_TASK]`}}),Te=new g({}),fe=new Q({props:{code:"ZXhwb3J0JTIwVFJBTlNGT19YTF9DSEVDS1BPSU5UX0ZPTERFUl9QQVRIJTNEJTJGcGF0aCUyRnRvJTJGdHJhbnNmbyUyRnhsJTJGY2hlY2twb2ludCUwQSUwQXRyYW5zZm9ybWVycy1jbGklMjBjb252ZXJ0JTIwLS1tb2RlbF90eXBlJTIwdHJhbnNmb194bCUyMCU1QyUwQSUyMCUyMC0tdGZfY2hlY2twb2ludCUyMCUyNFRSQU5TRk9fWExfQ0hFQ0tQT0lOVF9GT0xERVJfUEFUSCUyMCU1QyUwQSUyMCUyMC0tcHl0b3JjaF9kdW1wX291dHB1dCUyMCUyNFBZVE9SQ0hfRFVNUF9PVVRQVVQlMjAlNUMlMEElMjAlMjAlNUItLWNvbmZpZyUyMFRSQU5TRk9fWExfQ09ORklHJTVEJTIwJTVDJTBBJTIwJTIwJTVCLS1maW5ldHVuaW5nX3Rhc2tfbmFtZSUyMFRSQU5TRk9fWExfRklORVRVTkVEX1RBU0slNUQ=",highlighted:`<span class="hljs-built_in">export</span> TRANSFO_XL_CHECKPOINT_FOLDER_PATH=/path/to/transfo/xl/checkpoint

transformers-cli convert --model_type transfo_xl \\
  --tf_checkpoint <span class="hljs-variable">$TRANSFO_XL_CHECKPOINT_FOLDER_PATH</span> \\
  --pytorch_dump_output <span class="hljs-variable">$PYTORCH_DUMP_OUTPUT</span> \\
  [--config TRANSFO_XL_CONFIG] \\
  [--finetuning_task_name TRANSFO_XL_FINETUNED_TASK]`}}),de=new g({}),ve=new Q({props:{code:"ZXhwb3J0JTIwVFJBTlNGT19YTF9DSEVDS1BPSU5UX1BBVEglM0QlMkZwYXRoJTJGdG8lMkZ4bG5ldCUyRmNoZWNrcG9pbnQlMEFleHBvcnQlMjBUUkFOU0ZPX1hMX0NPTkZJR19QQVRIJTNEJTJGcGF0aCUyRnRvJTJGeGxuZXQlMkZjb25maWclMEElMEF0cmFuc2Zvcm1lcnMtY2xpJTIwY29udmVydCUyMC0tbW9kZWxfdHlwZSUyMHhsbmV0JTIwJTVDJTBBJTIwJTIwLS10Zl9jaGVja3BvaW50JTIwJTI0VFJBTlNGT19YTF9DSEVDS1BPSU5UX1BBVEglMjAlNUMlMEElMjAlMjAtLWNvbmZpZyUyMCUyNFRSQU5TRk9fWExfQ09ORklHX1BBVEglMjAlNUMlMEElMjAlMjAtLXB5dG9yY2hfZHVtcF9vdXRwdXQlMjAlMjRQWVRPUkNIX0RVTVBfT1VUUFVUJTIwJTVDJTBBJTIwJTIwJTVCLS1maW5ldHVuaW5nX3Rhc2tfbmFtZSUyMFhMTkVUX0ZJTkVUVU5FRF9UQVNLJTVEJTIwJTVD",highlighted:`<span class="hljs-built_in">export</span> TRANSFO_XL_CHECKPOINT_PATH=/path/to/xlnet/checkpoint
<span class="hljs-built_in">export</span> TRANSFO_XL_CONFIG_PATH=/path/to/xlnet/config

transformers-cli convert --model_type xlnet \\
  --tf_checkpoint <span class="hljs-variable">$TRANSFO_XL_CHECKPOINT_PATH</span> \\
  --config <span class="hljs-variable">$TRANSFO_XL_CONFIG_PATH</span> \\
  --pytorch_dump_output <span class="hljs-variable">$PYTORCH_DUMP_OUTPUT</span> \\
  [--finetuning_task_name XLNET_FINETUNED_TASK] \\`}}),_e=new g({}),Je=new Q({props:{code:"ZXhwb3J0JTIwWExNX0NIRUNLUE9JTlRfUEFUSCUzRCUyRnBhdGglMkZ0byUyRnhsbSUyRmNoZWNrcG9pbnQlMEElMEF0cmFuc2Zvcm1lcnMtY2xpJTIwY29udmVydCUyMC0tbW9kZWxfdHlwZSUyMHhsbSUyMCU1QyUwQSUyMCUyMC0tdGZfY2hlY2twb2ludCUyMCUyNFhMTV9DSEVDS1BPSU5UX1BBVEglMjAlNUMlMEElMjAlMjAtLXB5dG9yY2hfZHVtcF9vdXRwdXQlMjAlMjRQWVRPUkNIX0RVTVBfT1VUUFVUJTBBJTIwJTVCLS1jb25maWclMjBYTUxfQ09ORklHJTVEJTIwJTVDJTBBJTIwJTVCLS1maW5ldHVuaW5nX3Rhc2tfbmFtZSUyMFhNTF9GSU5FVFVORURfVEFTSyU1RA==",highlighted:`<span class="hljs-built_in">export</span> XLM_CHECKPOINT_PATH=/path/to/xlm/checkpoint

transformers-cli convert --model_type xlm \\
  --tf_checkpoint <span class="hljs-variable">$XLM_CHECKPOINT_PATH</span> \\
  --pytorch_dump_output <span class="hljs-variable">$PYTORCH_DUMP_OUTPUT</span>
 [--config XML_CONFIG] \\
 [--finetuning_task_name XML_FINETUNED_TASK]`}}),ye=new g({}),be=new Q({props:{code:"ZXhwb3J0JTIwVDUlM0QlMkZwYXRoJTJGdG8lMkZ0NSUyRnVuY2FzZWRfTC0xMl9ILTc2OF9BLTEyJTBBJTBBdHJhbnNmb3JtZXJzLWNsaSUyMGNvbnZlcnQlMjAtLW1vZGVsX3R5cGUlMjB0NSUyMCU1QyUwQSUyMCUyMC0tdGZfY2hlY2twb2ludCUyMCUyNFQ1JTJGdDVfbW9kZWwuY2twdCUyMCU1QyUwQSUyMCUyMC0tY29uZmlnJTIwJTI0VDUlMkZ0NV9jb25maWcuanNvbiUyMCU1QyUwQSUyMCUyMC0tcHl0b3JjaF9kdW1wX291dHB1dCUyMCUyNFQ1JTJGcHl0b3JjaF9tb2RlbC5iaW4=",highlighted:`<span class="hljs-built_in">export</span> T5=/path/to/t5/uncased_L-12_H-768_A-12

transformers-cli convert --model_type t5 \\
  --tf_checkpoint <span class="hljs-variable">$T5</span>/t5_model.ckpt \\
  --config <span class="hljs-variable">$T5</span>/t5_config.json \\
  --pytorch_dump_output <span class="hljs-variable">$T5</span>/pytorch_model.bin`}}),{c(){U=a("meta"),H=n(),w=a("p"),J=n(),y=a("h1"),T=a("a"),b=a("span"),m(Z.$$.fragment),It=n(),Me=a("span"),Me.textContent=Ht,Ze=n(),j=a("p"),j.innerHTML=Zt,je=n(),m(x.$$.fragment),Ge=n(),C=a("h2"),I=a("a"),Ie=a("span"),m(G.$$.fragment),Nt=n(),$e=a("span"),$e.textContent=jt,Oe=n(),O=a("p"),O.innerHTML=Gt,We=n(),W=a("p"),W.innerHTML=Ot,De=n(),D=a("p"),D.innerHTML=Wt,Ye=n(),Y=a("p"),Y.innerHTML=Dt,qe=n(),q=a("p"),q.innerHTML=Yt,ze=n(),m(z.$$.fragment),Ke=n(),K=a("p"),K.innerHTML=qt,et=n(),M=a("h2"),N=a("a"),Ne=a("span"),m(ee.$$.fragment),Pt=n(),Ee=a("span"),Ee.textContent=zt,tt=n(),te=a("p"),te.innerHTML=Kt,ot=n(),oe=a("p"),oe.innerHTML=eo,lt=n(),le=a("p"),le.innerHTML=to,at=n(),m(ae.$$.fragment),rt=n(),re=a("p"),re.innerHTML=oo,nt=n(),$=a("h2"),P=a("a"),Pe=a("span"),m(ne.$$.fragment),St=n(),Ve=a("span"),Ve.textContent=lo,st=n(),se=a("p"),se.innerHTML=ao,it=n(),m(ie.$$.fragment),pt=n(),E=a("h2"),S=a("a"),Se=a("span"),m(pe.$$.fragment),Bt=n(),Re=a("span"),Re.textContent=ro,ct=n(),ce=a("p"),ce.innerHTML=no,ht=n(),m(he.$$.fragment),Tt=n(),V=a("h2"),B=a("a"),Be=a("span"),m(Te.$$.fragment),At=n(),Fe=a("span"),Fe.textContent=so,mt=n(),me=a("p"),me.innerHTML=io,ft=n(),m(fe.$$.fragment),dt=n(),R=a("h2"),A=a("a"),Ae=a("span"),m(de.$$.fragment),Xt=n(),ke=a("span"),ke.textContent=po,ut=n(),ue=a("p"),ue.textContent=co,vt=n(),m(ve.$$.fragment),_t=n(),F=a("h2"),X=a("a"),Xe=a("span"),m(_e.$$.fragment),Lt=n(),ge=a("span"),ge.textContent=ho,Ut=n(),Ue=a("p"),Ue.textContent=To,Jt=n(),m(Je.$$.fragment),yt=n(),k=a("h2"),L=a("a"),Le=a("span"),m(ye.$$.fragment),Qt=n(),xe=a("span"),xe.textContent=mo,wt=n(),we=a("p"),we.textContent=fo,bt=n(),m(be.$$.fragment),Ct=n(),Qe=a("p"),this.h()},l(e){const o=Ao("svelte-1phssyn",document.head);U=r(o,"META",{name:!0,content:!0}),o.forEach(t),H=s(e),w=r(e,"P",{}),c(w).forEach(t),J=s(e),y=r(e,"H1",{class:!0});var Ce=c(y);T=r(Ce,"A",{id:!0,class:!0,href:!0});var uo=c(T);b=r(uo,"SPAN",{});var vo=c(b);f(Z.$$.fragment,vo),vo.forEach(t),uo.forEach(t),It=s(Ce),Me=r(Ce,"SPAN",{"data-svelte-h":!0}),h(Me)!=="svelte-1ioca26"&&(Me.textContent=Ht),Ce.forEach(t),Ze=s(e),j=r(e,"P",{"data-svelte-h":!0}),h(j)!=="svelte-p2yt92"&&(j.innerHTML=Zt),je=s(e),f(x.$$.fragment,e),Ge=s(e),C=r(e,"H2",{class:!0});var $t=c(C);I=r($t,"A",{id:!0,class:!0,href:!0});var _o=c(I);Ie=r(_o,"SPAN",{});var Uo=c(Ie);f(G.$$.fragment,Uo),Uo.forEach(t),_o.forEach(t),Nt=s($t),$e=r($t,"SPAN",{"data-svelte-h":!0}),h($e)!=="svelte-d1aweg"&&($e.textContent=jt),$t.forEach(t),Oe=s(e),O=r(e,"P",{"data-svelte-h":!0}),h(O)!=="svelte-r87t7w"&&(O.innerHTML=Gt),We=s(e),W=r(e,"P",{"data-svelte-h":!0}),h(W)!=="svelte-cbmmh7"&&(W.innerHTML=Ot),De=s(e),D=r(e,"P",{"data-svelte-h":!0}),h(D)!=="svelte-b84z4n"&&(D.innerHTML=Wt),Ye=s(e),Y=r(e,"P",{"data-svelte-h":!0}),h(Y)!=="svelte-kemlzt"&&(Y.innerHTML=Dt),qe=s(e),q=r(e,"P",{"data-svelte-h":!0}),h(q)!=="svelte-10rkvg8"&&(q.innerHTML=Yt),ze=s(e),f(z.$$.fragment,e),Ke=s(e),K=r(e,"P",{"data-svelte-h":!0}),h(K)!=="svelte-12fpvhp"&&(K.innerHTML=qt),et=s(e),M=r(e,"H2",{class:!0});var Et=c(M);N=r(Et,"A",{id:!0,class:!0,href:!0});var Jo=c(N);Ne=r(Jo,"SPAN",{});var yo=c(Ne);f(ee.$$.fragment,yo),yo.forEach(t),Jo.forEach(t),Pt=s(Et),Ee=r(Et,"SPAN",{"data-svelte-h":!0}),h(Ee)!=="svelte-dnm4h3"&&(Ee.textContent=zt),Et.forEach(t),tt=s(e),te=r(e,"P",{"data-svelte-h":!0}),h(te)!=="svelte-19k3jdm"&&(te.innerHTML=Kt),ot=s(e),oe=r(e,"P",{"data-svelte-h":!0}),h(oe)!=="svelte-zkcyaa"&&(oe.innerHTML=eo),lt=s(e),le=r(e,"P",{"data-svelte-h":!0}),h(le)!=="svelte-73nhvy"&&(le.innerHTML=to),at=s(e),f(ae.$$.fragment,e),rt=s(e),re=r(e,"P",{"data-svelte-h":!0}),h(re)!=="svelte-1jgcpzg"&&(re.innerHTML=oo),nt=s(e),$=r(e,"H2",{class:!0});var Vt=c($);P=r(Vt,"A",{id:!0,class:!0,href:!0});var wo=c(P);Pe=r(wo,"SPAN",{});var bo=c(Pe);f(ne.$$.fragment,bo),bo.forEach(t),wo.forEach(t),St=s(Vt),Ve=r(Vt,"SPAN",{"data-svelte-h":!0}),h(Ve)!=="svelte-ihxqc"&&(Ve.textContent=lo),Vt.forEach(t),st=s(e),se=r(e,"P",{"data-svelte-h":!0}),h(se)!=="svelte-15p0tsr"&&(se.innerHTML=ao),it=s(e),f(ie.$$.fragment,e),pt=s(e),E=r(e,"H2",{class:!0});var Rt=c(E);S=r(Rt,"A",{id:!0,class:!0,href:!0});var Co=c(S);Se=r(Co,"SPAN",{});var Mo=c(Se);f(pe.$$.fragment,Mo),Mo.forEach(t),Co.forEach(t),Bt=s(Rt),Re=r(Rt,"SPAN",{"data-svelte-h":!0}),h(Re)!=="svelte-mi6htx"&&(Re.textContent=ro),Rt.forEach(t),ct=s(e),ce=r(e,"P",{"data-svelte-h":!0}),h(ce)!=="svelte-51129x"&&(ce.innerHTML=no),ht=s(e),f(he.$$.fragment,e),Tt=s(e),V=r(e,"H2",{class:!0});var Ft=c(V);B=r(Ft,"A",{id:!0,class:!0,href:!0});var $o=c(B);Be=r($o,"SPAN",{});var Eo=c(Be);f(Te.$$.fragment,Eo),Eo.forEach(t),$o.forEach(t),At=s(Ft),Fe=r(Ft,"SPAN",{"data-svelte-h":!0}),h(Fe)!=="svelte-1pbkpbv"&&(Fe.textContent=so),Ft.forEach(t),mt=s(e),me=r(e,"P",{"data-svelte-h":!0}),h(me)!=="svelte-4osoax"&&(me.innerHTML=io),ft=s(e),f(fe.$$.fragment,e),dt=s(e),R=r(e,"H2",{class:!0});var kt=c(R);A=r(kt,"A",{id:!0,class:!0,href:!0});var Vo=c(A);Ae=r(Vo,"SPAN",{});var Ro=c(Ae);f(de.$$.fragment,Ro),Ro.forEach(t),Vo.forEach(t),Xt=s(kt),ke=r(kt,"SPAN",{"data-svelte-h":!0}),h(ke)!=="svelte-1k6bowc"&&(ke.textContent=po),kt.forEach(t),ut=s(e),ue=r(e,"P",{"data-svelte-h":!0}),h(ue)!=="svelte-14ewucc"&&(ue.textContent=co),vt=s(e),f(ve.$$.fragment,e),_t=s(e),F=r(e,"H2",{class:!0});var gt=c(F);X=r(gt,"A",{id:!0,class:!0,href:!0});var Fo=c(X);Xe=r(Fo,"SPAN",{});var ko=c(Xe);f(_e.$$.fragment,ko),ko.forEach(t),Fo.forEach(t),Lt=s(gt),ge=r(gt,"SPAN",{"data-svelte-h":!0}),h(ge)!=="svelte-zmv7xk"&&(ge.textContent=ho),gt.forEach(t),Ut=s(e),Ue=r(e,"P",{"data-svelte-h":!0}),h(Ue)!=="svelte-1nhafvs"&&(Ue.textContent=To),Jt=s(e),f(Je.$$.fragment,e),yt=s(e),k=r(e,"H2",{class:!0});var xt=c(k);L=r(xt,"A",{id:!0,class:!0,href:!0});var go=c(L);Le=r(go,"SPAN",{});var xo=c(Le);f(ye.$$.fragment,xo),xo.forEach(t),go.forEach(t),Qt=s(xt),xe=r(xt,"SPAN",{"data-svelte-h":!0}),h(xe)!=="svelte-1cet0"&&(xe.textContent=mo),xt.forEach(t),wt=s(e),we=r(e,"P",{"data-svelte-h":!0}),h(we)!=="svelte-5kcfwq"&&(we.textContent=fo),bt=s(e),f(be.$$.fragment,e),Ct=s(e),Qe=r(e,"P",{}),c(Qe).forEach(t),this.h()},h(){i(U,"name","hf:doc:metadata"),i(U,"content",JSON.stringify(Ho)),i(T,"id","convertendo-checkpoints-do-tensorflow-para-pytorch"),i(T,"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"),i(T,"href","#convertendo-checkpoints-do-tensorflow-para-pytorch"),i(y,"class","relative group"),i(I,"id","bert"),i(I,"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"),i(I,"href","#bert"),i(C,"class","relative group"),i(N,"id","albert"),i(N,"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"),i(N,"href","#albert"),i(M,"class","relative group"),i(P,"id","openai-gpt"),i(P,"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"),i(P,"href","#openai-gpt"),i($,"class","relative group"),i(S,"id","openai-gpt2"),i(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"),i(S,"href","#openai-gpt2"),i(E,"class","relative group"),i(B,"id","transformerxl"),i(B,"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"),i(B,"href","#transformerxl"),i(V,"class","relative group"),i(A,"id","xlnet"),i(A,"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"),i(A,"href","#xlnet"),i(R,"class","relative group"),i(X,"id","xlm"),i(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"),i(X,"href","#xlm"),i(F,"class","relative group"),i(L,"id","t5"),i(L,"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"),i(L,"href","#t5"),i(k,"class","relative group")},m(e,o){p(document.head,U),l(e,H,o),l(e,w,o),l(e,J,o),l(e,y,o),p(y,T),p(T,b),d(Z,b,null),p(y,It),p(y,Me),l(e,Ze,o),l(e,j,o),l(e,je,o),d(x,e,o),l(e,Ge,o),l(e,C,o),p(C,I),p(I,Ie),d(G,Ie,null),p(C,Nt),p(C,$e),l(e,Oe,o),l(e,O,o),l(e,We,o),l(e,W,o),l(e,De,o),l(e,D,o),l(e,Ye,o),l(e,Y,o),l(e,qe,o),l(e,q,o),l(e,ze,o),d(z,e,o),l(e,Ke,o),l(e,K,o),l(e,et,o),l(e,M,o),p(M,N),p(N,Ne),d(ee,Ne,null),p(M,Pt),p(M,Ee),l(e,tt,o),l(e,te,o),l(e,ot,o),l(e,oe,o),l(e,lt,o),l(e,le,o),l(e,at,o),d(ae,e,o),l(e,rt,o),l(e,re,o),l(e,nt,o),l(e,$,o),p($,P),p(P,Pe),d(ne,Pe,null),p($,St),p($,Ve),l(e,st,o),l(e,se,o),l(e,it,o),d(ie,e,o),l(e,pt,o),l(e,E,o),p(E,S),p(S,Se),d(pe,Se,null),p(E,Bt),p(E,Re),l(e,ct,o),l(e,ce,o),l(e,ht,o),d(he,e,o),l(e,Tt,o),l(e,V,o),p(V,B),p(B,Be),d(Te,Be,null),p(V,At),p(V,Fe),l(e,mt,o),l(e,me,o),l(e,ft,o),d(fe,e,o),l(e,dt,o),l(e,R,o),p(R,A),p(A,Ae),d(de,Ae,null),p(R,Xt),p(R,ke),l(e,ut,o),l(e,ue,o),l(e,vt,o),d(ve,e,o),l(e,_t,o),l(e,F,o),p(F,X),p(X,Xe),d(_e,Xe,null),p(F,Lt),p(F,ge),l(e,Ut,o),l(e,Ue,o),l(e,Jt,o),d(Je,e,o),l(e,yt,o),l(e,k,o),p(k,L),p(L,Le),d(ye,Le,null),p(k,Qt),p(k,xe),l(e,wt,o),l(e,we,o),l(e,bt,o),d(be,e,o),l(e,Ct,o),l(e,Qe,o),Mt=!0},p(e,[o]){const Ce={};o&2&&(Ce.$$scope={dirty:o,ctx:e}),x.$set(Ce)},i(e){Mt||(u(Z.$$.fragment,e),u(x.$$.fragment,e),u(G.$$.fragment,e),u(z.$$.fragment,e),u(ee.$$.fragment,e),u(ae.$$.fragment,e),u(ne.$$.fragment,e),u(ie.$$.fragment,e),u(pe.$$.fragment,e),u(he.$$.fragment,e),u(Te.$$.fragment,e),u(fe.$$.fragment,e),u(de.$$.fragment,e),u(ve.$$.fragment,e),u(_e.$$.fragment,e),u(Je.$$.fragment,e),u(ye.$$.fragment,e),u(be.$$.fragment,e),Mt=!0)},o(e){v(Z.$$.fragment,e),v(x.$$.fragment,e),v(G.$$.fragment,e),v(z.$$.fragment,e),v(ee.$$.fragment,e),v(ae.$$.fragment,e),v(ne.$$.fragment,e),v(ie.$$.fragment,e),v(pe.$$.fragment,e),v(he.$$.fragment,e),v(Te.$$.fragment,e),v(fe.$$.fragment,e),v(de.$$.fragment,e),v(ve.$$.fragment,e),v(_e.$$.fragment,e),v(Je.$$.fragment,e),v(ye.$$.fragment,e),v(be.$$.fragment,e),Mt=!1},d(e){e&&(t(H),t(w),t(J),t(y),t(Ze),t(j),t(je),t(Ge),t(C),t(Oe),t(O),t(We),t(W),t(De),t(D),t(Ye),t(Y),t(qe),t(q),t(ze),t(Ke),t(K),t(et),t(M),t(tt),t(te),t(ot),t(oe),t(lt),t(le),t(at),t(rt),t(re),t(nt),t($),t(st),t(se),t(it),t(pt),t(E),t(ct),t(ce),t(ht),t(Tt),t(V),t(mt),t(me),t(ft),t(dt),t(R),t(ut),t(ue),t(vt),t(_t),t(F),t(Ut),t(Ue),t(Jt),t(yt),t(k),t(wt),t(we),t(bt),t(Ct),t(Qe)),t(U),_(Z),_(x,e),_(G),_(z,e),_(ee),_(ae,e),_(ne),_(ie,e),_(pe),_(he,e),_(Te),_(fe,e),_(de),_(ve,e),_(_e),_(Je,e),_(ye),_(be,e)}}}const Ho={local:"convertendo-checkpoints-do-tensorflow-para-pytorch",sections:[{local:"bert",title:"BERT"},{local:"albert",title:"ALBERT"},{local:"openai-gpt",title:"OpenAI GPT"},{local:"openai-gpt2",title:"OpenAI GPT-2"},{local:"transformerxl",title:"Transformer-XL"},{local:"xlnet",title:"XLNet"},{local:"xlm",title:"XLM"},{local:"t5",title:"T5"}],title:"Convertendo checkpoints do TensorFlow para Pytorch"};function Zo(He){return No(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Yo extends So{constructor(U){super(),Bo(this,U,Zo,Qo,Io,{})}}export{Yo as component};
