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 p,o as i,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.aa8a1a9b.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.`,y,J,w="A documentação abaixo reflete o formato do comando <strong>transformers-cli convert</strong>.";return{c(){U=a("p"),U.innerHTML=H,y=n(),J=a("p"),J.innerHTML=w},l(T){U=r(T,"P",{"data-svelte-h":!0}),h(U)!=="svelte-opr9ez"&&(U.innerHTML=H),y=s(T),J=r(T,"P",{"data-svelte-h":!0}),h(J)!=="svelte-12vk8vx"&&(J.innerHTML=w)},m(T,b){l(T,U,b),l(T,y,b),l(T,J,b)},p:Po,d(T){T&&(t(U),t(y),t(J))}}}function Qo(He){let U,H,y,J,w,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>\\
)`,pt,pe,it,E,S,Se,ie,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,po='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,io="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,wt,k,L,Le,we,Qt,xe,mo="T5",yt,ye,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`,wrap:!1}}),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`,wrap:!1}}),ne=new g({}),pe=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] \\`,wrap:!1}}),ie=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]`,wrap:!1}}),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]`,wrap:!1}}),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] \\`,wrap:!1}}),_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]`,wrap:!1}}),we=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`,wrap:!1}}),{c(){U=a("meta"),H=n(),y=a("p"),J=n(),w=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,pt=n(),m(pe.$$.fragment),it=n(),E=a("h2"),S=a("a"),Se=a("span"),m(ie.$$.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=po,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=io,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),wt=n(),k=a("h2"),L=a("a"),Le=a("span"),m(we.$$.fragment),Qt=n(),xe=a("span"),xe.textContent=mo,yt=n(),ye=a("p"),ye.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),y=r(e,"P",{}),c(y).forEach(t),J=s(e),w=r(e,"H1",{class:!0});var Ce=c(w);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 wo=c(Ne);f(ee.$$.fragment,wo),wo.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 yo=c(P);Pe=r(yo,"SPAN",{});var bo=c(Pe);f(ne.$$.fragment,bo),bo.forEach(t),yo.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),pt=s(e),f(pe.$$.fragment,e),it=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(ie.$$.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=po),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=io),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),wt=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(we.$$.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),yt=s(e),ye=r(e,"P",{"data-svelte-h":!0}),h(ye)!=="svelte-5kcfwq"&&(ye.textContent=fo),bt=s(e),f(be.$$.fragment,e),Ct=s(e),Qe=r(e,"P",{}),c(Qe).forEach(t),this.h()},h(){p(U,"name","hf:doc:metadata"),p(U,"content",JSON.stringify(Ho)),p(T,"id","convertendo-checkpoints-do-tensorflow-para-pytorch"),p(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"),p(T,"href","#convertendo-checkpoints-do-tensorflow-para-pytorch"),p(w,"class","relative group"),p(I,"id","bert"),p(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"),p(I,"href","#bert"),p(C,"class","relative group"),p(N,"id","albert"),p(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"),p(N,"href","#albert"),p(M,"class","relative group"),p(P,"id","openai-gpt"),p(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"),p(P,"href","#openai-gpt"),p($,"class","relative group"),p(S,"id","openai-gpt2"),p(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"),p(S,"href","#openai-gpt2"),p(E,"class","relative group"),p(B,"id","transformerxl"),p(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"),p(B,"href","#transformerxl"),p(V,"class","relative group"),p(A,"id","xlnet"),p(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"),p(A,"href","#xlnet"),p(R,"class","relative group"),p(X,"id","xlm"),p(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"),p(X,"href","#xlm"),p(F,"class","relative group"),p(L,"id","t5"),p(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"),p(L,"href","#t5"),p(k,"class","relative group")},m(e,o){i(document.head,U),l(e,H,o),l(e,y,o),l(e,J,o),l(e,w,o),i(w,T),i(T,b),d(Z,b,null),i(w,It),i(w,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),i(C,I),i(I,Ie),d(G,Ie,null),i(C,Nt),i(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),i(M,N),i(N,Ne),d(ee,Ne,null),i(M,Pt),i(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),i($,P),i(P,Pe),d(ne,Pe,null),i($,St),i($,Ve),l(e,st,o),l(e,se,o),l(e,pt,o),d(pe,e,o),l(e,it,o),l(e,E,o),i(E,S),i(S,Se),d(ie,Se,null),i(E,Bt),i(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),i(V,B),i(B,Be),d(Te,Be,null),i(V,At),i(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),i(R,A),i(A,Ae),d(de,Ae,null),i(R,Xt),i(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),i(F,X),i(X,Xe),d(_e,Xe,null),i(F,Lt),i(F,ge),l(e,Ut,o),l(e,Ue,o),l(e,Jt,o),d(Je,e,o),l(e,wt,o),l(e,k,o),i(k,L),i(L,Le),d(we,Le,null),i(k,Qt),i(k,xe),l(e,yt,o),l(e,ye,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(pe.$$.fragment,e),u(ie.$$.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(we.$$.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(pe.$$.fragment,e),v(ie.$$.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(we.$$.fragment,e),v(be.$$.fragment,e),Mt=!1},d(e){e&&(t(H),t(y),t(J),t(w),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(pt),t(it),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(wt),t(k),t(yt),t(ye),t(bt),t(Ct),t(Qe)),t(U),_(Z),_(x,e),_(G),_(z,e),_(ee),_(ae,e),_(ne),_(pe,e),_(ie),_(he,e),_(Te),_(fe,e),_(de),_(ve,e),_(_e),_(Je,e),_(we),_(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};
