import{S as Za,i as xa,s as La,e as r,k as f,w as h,t as s,M as ga,c as a,d as o,m,a as l,x as u,h as n,b as i,G as t,g as c,y as T,q as v,o as _,B as y,v as ja}from"../chunks/vendor-hf-doc-builder.js";import{T as Oa}from"../chunks/Tip-hf-doc-builder.js";import{I as g}from"../chunks/IconCopyLink-hf-doc-builder.js";import{C as me}from"../chunks/CodeBlock-hf-doc-builder.js";function Ha(Jo){let d,j,E,$,k,V,R,I,N,O,C;return{c(){d=r("p"),j=s("A partir da vers\xE3o 2.3.0 o script de convers\xE3o agora faz parte do transformers CLI ("),E=r("strong"),$=s("transformers-cli"),k=s(`) dispon\xEDvel em qualquer instala\xE7\xE3o
transformers >= 2.3.0.`),V=f(),R=r("p"),I=s("A documenta\xE7\xE3o abaixo reflete o formato do comando "),N=r("strong"),O=s("transformers-cli convert"),C=s(".")},l(J){d=a(J,"P",{});var b=l(d);j=n(b,"A partir da vers\xE3o 2.3.0 o script de convers\xE3o agora faz parte do transformers CLI ("),E=a(b,"STRONG",{});var Ge=l(E);$=n(Ge,"transformers-cli"),Ge.forEach(o),k=n(b,`) dispon\xEDvel em qualquer instala\xE7\xE3o
transformers >= 2.3.0.`),b.forEach(o),V=m(J),R=a(J,"P",{});var H=l(R);I=n(H,"A documenta\xE7\xE3o abaixo reflete o formato do comando "),N=a(H,"STRONG",{});var de=l(N);O=n(de,"transformers-cli convert"),de.forEach(o),C=n(H,"."),H.forEach(o)},m(J,b){c(J,d,b),t(d,j),t(d,E),t(E,$),t(d,k),c(J,V,b),c(J,R,b),t(R,I),t(R,N),t(N,O),t(R,C)},d(J){J&&o(d),J&&o(V),J&&o(R)}}}function qa(Jo){let d,j,E,$,k,V,R,I,N,O,C,J,b,Ge,H,de,q,bo,B,D,He,he,Ut,qe,Et,wo,F,Jt,ue,bt,wt,Te,$t,Vt,$o,U,Rt,De,Ct,Pt,We,Ft,Mt,Ye,At,kt,Ze,It,Nt,ve,Bt,St,Vo,w,Xt,ze,Qt,Gt,Ke,Zt,xt,eo,Lt,gt,oo,jt,Ot,Ro,W,Ht,to,qt,Dt,Co,Y,Wt,ro,Yt,zt,Po,_e,Fo,z,Kt,ye,er,or,Mo,S,K,ao,Ue,tr,lo,rr,Ao,ee,ar,Ee,lr,sr,ko,M,nr,so,pr,cr,no,ir,fr,Io,oe,mr,po,dr,hr,No,Je,Bo,te,ur,be,Tr,vr,So,X,re,co,we,_r,io,yr,Xo,ae,Ur,$e,Er,Jr,Qo,Ve,Go,Q,le,fo,Re,br,mo,wr,Zo,se,$r,Ce,Vr,Rr,xo,Pe,Lo,G,ne,ho,Fe,Cr,uo,Pr,go,pe,Fr,Me,Mr,Ar,jo,Ae,Oo,Z,ce,To,ke,kr,vo,Ir,Ho,xe,Nr,qo,Ie,Do,x,ie,_o,Ne,Br,yo,Sr,Wo,Le,Xr,Yo,Be,zo,L,fe,Uo,Se,Qr,Eo,Gr,Ko,ge,Zr,et,Xe,ot;return V=new g({}),q=new Oa({props:{$$slots:{default:[Ha]},$$scope:{ctx:Jo}}}),he=new g({}),_e=new me({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`}}),Ue=new g({}),Je=new me({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`}}),we=new g({}),Ve=new me({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] \\`}}),Re=new g({}),Pe=new me({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]`}}),Fe=new g({}),Ae=new me({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]`}}),ke=new g({}),Ie=new me({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] \\`}}),Ne=new g({}),Be=new me({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]`}}),Se=new g({}),Xe=new me({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(){d=r("meta"),j=f(),E=r("h1"),$=r("a"),k=r("span"),h(V.$$.fragment),R=f(),I=r("span"),N=s("Convertendo checkpoints do TensorFlow para Pytorch"),O=f(),C=r("p"),J=s(`Uma interface de linha de comando \xE9 fornecida para converter os checkpoints originais Bert/GPT/GPT-2/Transformer-XL/XLNet/XLM em modelos
que podem ser carregados usando os m\xE9todos `),b=r("code"),Ge=s("from_pretrained"),H=s(" da biblioteca."),de=f(),h(q.$$.fragment),bo=f(),B=r("h2"),D=r("a"),He=r("span"),h(he.$$.fragment),Ut=f(),qe=r("span"),Et=s("BERT"),wo=f(),F=r("p"),Jt=s("Voc\xEA pode converter qualquer checkpoint do BERT em TensorFlow (em particular "),ue=r("a"),bt=s("os modelos pr\xE9-treinados lan\xE7ados pelo Google"),wt=s(`) em um arquivo PyTorch usando um
`),Te=r("a"),$t=s("convert_bert_original_tf_checkpoint_to_pytorch.py"),Vt=s(" script."),$o=f(),U=r("p"),Rt=s("Esta Interface de Linha de Comando (CLI) recebe como entrada um checkpoint do TensorFlow (tr\xEAs arquivos come\xE7ando com "),De=r("code"),Ct=s("bert_model.ckpt"),Pt=s(`) e o
arquivo de configura\xE7\xE3o (`),We=r("code"),Ft=s("bert_config.json"),Mt=s(`), e ent\xE3o cria um modelo PyTorch para esta configura\xE7\xE3o, carrega os pesos
do checkpoint do TensorFlow no modelo PyTorch e salva o modelo resultante em um arquivo PyTorch que pode
ser importado usando `),Ye=r("code"),At=s("from_pretrained()"),kt=s(" (veja o exemplo em "),Ze=r("a"),It=s("quicktour"),Nt=s(" , "),ve=r("a"),Bt=s("run_glue.py"),St=s(" )."),Vo=f(),w=r("p"),Xt=s("Voc\xEA s\xF3 precisa executar este script de convers\xE3o "),ze=r("strong"),Qt=s("uma vez"),Gt=s(` para obter um modelo PyTorch. Voc\xEA pode ent\xE3o desconsiderar o checkpoint em
TensorFlow (os tr\xEAs arquivos come\xE7ando com `),Ke=r("code"),Zt=s("bert_model.ckpt"),xt=s(`), mas certifique-se de manter o arquivo de configura\xE7\xE3o (\\
`),eo=r("code"),Lt=s("bert_config.json"),gt=s(") e o arquivo de vocabul\xE1rio ("),oo=r("code"),jt=s("vocab.txt"),Ot=s("), pois eles tamb\xE9m s\xE3o necess\xE1rios para o modelo PyTorch."),Ro=f(),W=r("p"),Ht=s("Para executar este script de convers\xE3o espec\xEDfico, voc\xEA precisar\xE1 ter o TensorFlow e o PyTorch instalados ("),to=r("code"),qt=s("pip install tensorflow"),Dt=s("). O resto do reposit\xF3rio requer apenas o PyTorch."),Co=f(),Y=r("p"),Wt=s("Aqui est\xE1 um exemplo do processo de convers\xE3o para um modelo "),ro=r("code"),Yt=s("BERT-Base Uncased"),zt=s(" pr\xE9-treinado:"),Po=f(),h(_e.$$.fragment),Fo=f(),z=r("p"),Kt=s("Voc\xEA pode baixar os modelos pr\xE9-treinados do Google para a convers\xE3o "),ye=r("a"),er=s("aqui"),or=s("."),Mo=f(),S=r("h2"),K=r("a"),ao=r("span"),h(Ue.$$.fragment),tr=f(),lo=r("span"),rr=s("ALBERT"),Ao=f(),ee=r("p"),ar=s(`Converta os checkpoints do modelo ALBERT em TensorFlow para PyTorch usando o
`),Ee=r("a"),lr=s("convert_albert_original_tf_checkpoint_to_pytorch.py"),sr=s(" script."),ko=f(),M=r("p"),nr=s("A Interface de Linha de Comando (CLI) recebe como entrada um checkpoint do TensorFlow (tr\xEAs arquivos come\xE7ando com "),so=r("code"),pr=s("model.ckpt-best"),cr=s(`) e o
arquivo de configura\xE7\xE3o (`),no=r("code"),ir=s("albert_config.json"),fr=s(`), ent\xE3o cria e salva um modelo PyTorch. Para executar esta convers\xE3o, voc\xEA
precisa ter o TensorFlow e o PyTorch instalados.`),Io=f(),oe=r("p"),mr=s("Aqui est\xE1 um exemplo do processo de convers\xE3o para o modelo "),po=r("code"),dr=s("ALBERT Base"),hr=s(" pr\xE9-treinado:"),No=f(),h(Je.$$.fragment),Bo=f(),te=r("p"),ur=s("Voc\xEA pode baixar os modelos pr\xE9-treinados do Google para a convers\xE3o "),be=r("a"),Tr=s("aqui"),vr=s("."),So=f(),X=r("h2"),re=r("a"),co=r("span"),h(we.$$.fragment),_r=f(),io=r("span"),yr=s("OpenAI GPT"),Xo=f(),ae=r("p"),Ur=s(`Aqui est\xE1 um exemplo do processo de convers\xE3o para um modelo OpenAI GPT pr\xE9-treinado, supondo que seu checkpoint NumPy
foi salvo com o mesmo formato do modelo pr\xE9-treinado OpenAI (veja `),$e=r("a"),Er=s("aqui"),Jr=s(`\\
)`),Qo=f(),h(Ve.$$.fragment),Go=f(),Q=r("h2"),le=r("a"),fo=r("span"),h(Re.$$.fragment),br=f(),mo=r("span"),wr=s("OpenAI GPT-2"),Zo=f(),se=r("p"),$r=s("Aqui est\xE1 um exemplo do processo de convers\xE3o para um modelo OpenAI GPT-2 pr\xE9-treinado (consulte "),Ce=r("a"),Vr=s("aqui"),Rr=s(")"),xo=f(),h(Pe.$$.fragment),Lo=f(),G=r("h2"),ne=r("a"),ho=r("span"),h(Fe.$$.fragment),Cr=f(),uo=r("span"),Pr=s("Transformer-XL"),go=f(),pe=r("p"),Fr=s("Aqui est\xE1 um exemplo do processo de convers\xE3o para um modelo Transformer-XL pr\xE9-treinado (consulte "),Me=r("a"),Mr=s("aqui"),Ar=s(")"),jo=f(),h(Ae.$$.fragment),Oo=f(),Z=r("h2"),ce=r("a"),To=r("span"),h(ke.$$.fragment),kr=f(),vo=r("span"),Ir=s("XLNet"),Ho=f(),xe=r("p"),Nr=s("Aqui est\xE1 um exemplo do processo de convers\xE3o para um modelo XLNet pr\xE9-treinado:"),qo=f(),h(Ie.$$.fragment),Do=f(),x=r("h2"),ie=r("a"),_o=r("span"),h(Ne.$$.fragment),Br=f(),yo=r("span"),Sr=s("XLM"),Wo=f(),Le=r("p"),Xr=s("Aqui est\xE1 um exemplo do processo de convers\xE3o para um modelo XLM pr\xE9-treinado:"),Yo=f(),h(Be.$$.fragment),zo=f(),L=r("h2"),fe=r("a"),Uo=r("span"),h(Se.$$.fragment),Qr=f(),Eo=r("span"),Gr=s("T5"),Ko=f(),ge=r("p"),Zr=s("Aqui est\xE1 um exemplo do processo de convers\xE3o para um modelo T5 pr\xE9-treinado:"),et=f(),h(Xe.$$.fragment),this.h()},l(e){const p=ga('[data-svelte="svelte-1phssyn"]',document.head);d=a(p,"META",{name:!0,content:!0}),p.forEach(o),j=m(e),E=a(e,"H1",{class:!0});var Qe=l(E);$=a(Qe,"A",{id:!0,class:!0,href:!0});var xr=l($);k=a(xr,"SPAN",{});var Lr=l(k);u(V.$$.fragment,Lr),Lr.forEach(o),xr.forEach(o),R=m(Qe),I=a(Qe,"SPAN",{});var gr=l(I);N=n(gr,"Convertendo checkpoints do TensorFlow para Pytorch"),gr.forEach(o),Qe.forEach(o),O=m(e),C=a(e,"P",{});var tt=l(C);J=n(tt,`Uma interface de linha de comando \xE9 fornecida para converter os checkpoints originais Bert/GPT/GPT-2/Transformer-XL/XLNet/XLM em modelos
que podem ser carregados usando os m\xE9todos `),b=a(tt,"CODE",{});var jr=l(b);Ge=n(jr,"from_pretrained"),jr.forEach(o),H=n(tt," da biblioteca."),tt.forEach(o),de=m(e),u(q.$$.fragment,e),bo=m(e),B=a(e,"H2",{class:!0});var rt=l(B);D=a(rt,"A",{id:!0,class:!0,href:!0});var Or=l(D);He=a(Or,"SPAN",{});var Hr=l(He);u(he.$$.fragment,Hr),Hr.forEach(o),Or.forEach(o),Ut=m(rt),qe=a(rt,"SPAN",{});var qr=l(qe);Et=n(qr,"BERT"),qr.forEach(o),rt.forEach(o),wo=m(e),F=a(e,"P",{});var je=l(F);Jt=n(je,"Voc\xEA pode converter qualquer checkpoint do BERT em TensorFlow (em particular "),ue=a(je,"A",{href:!0,rel:!0});var Dr=l(ue);bt=n(Dr,"os modelos pr\xE9-treinados lan\xE7ados pelo Google"),Dr.forEach(o),wt=n(je,`) em um arquivo PyTorch usando um
`),Te=a(je,"A",{href:!0,rel:!0});var Wr=l(Te);$t=n(Wr,"convert_bert_original_tf_checkpoint_to_pytorch.py"),Wr.forEach(o),Vt=n(je," script."),je.forEach(o),$o=m(e),U=a(e,"P",{});var P=l(U);Rt=n(P,"Esta Interface de Linha de Comando (CLI) recebe como entrada um checkpoint do TensorFlow (tr\xEAs arquivos come\xE7ando com "),De=a(P,"CODE",{});var Yr=l(De);Ct=n(Yr,"bert_model.ckpt"),Yr.forEach(o),Pt=n(P,`) e o
arquivo de configura\xE7\xE3o (`),We=a(P,"CODE",{});var zr=l(We);Ft=n(zr,"bert_config.json"),zr.forEach(o),Mt=n(P,`), e ent\xE3o cria um modelo PyTorch para esta configura\xE7\xE3o, carrega os pesos
do checkpoint do TensorFlow no modelo PyTorch e salva o modelo resultante em um arquivo PyTorch que pode
ser importado usando `),Ye=a(P,"CODE",{});var Kr=l(Ye);At=n(Kr,"from_pretrained()"),Kr.forEach(o),kt=n(P," (veja o exemplo em "),Ze=a(P,"A",{href:!0});var ea=l(Ze);It=n(ea,"quicktour"),ea.forEach(o),Nt=n(P," , "),ve=a(P,"A",{href:!0,rel:!0});var oa=l(ve);Bt=n(oa,"run_glue.py"),oa.forEach(o),St=n(P," )."),P.forEach(o),Vo=m(e),w=a(e,"P",{});var A=l(w);Xt=n(A,"Voc\xEA s\xF3 precisa executar este script de convers\xE3o "),ze=a(A,"STRONG",{});var ta=l(ze);Qt=n(ta,"uma vez"),ta.forEach(o),Gt=n(A,` para obter um modelo PyTorch. Voc\xEA pode ent\xE3o desconsiderar o checkpoint em
TensorFlow (os tr\xEAs arquivos come\xE7ando com `),Ke=a(A,"CODE",{});var ra=l(Ke);Zt=n(ra,"bert_model.ckpt"),ra.forEach(o),xt=n(A,`), mas certifique-se de manter o arquivo de configura\xE7\xE3o (\\
`),eo=a(A,"CODE",{});var aa=l(eo);Lt=n(aa,"bert_config.json"),aa.forEach(o),gt=n(A,") e o arquivo de vocabul\xE1rio ("),oo=a(A,"CODE",{});var la=l(oo);jt=n(la,"vocab.txt"),la.forEach(o),Ot=n(A,"), pois eles tamb\xE9m s\xE3o necess\xE1rios para o modelo PyTorch."),A.forEach(o),Ro=m(e),W=a(e,"P",{});var at=l(W);Ht=n(at,"Para executar este script de convers\xE3o espec\xEDfico, voc\xEA precisar\xE1 ter o TensorFlow e o PyTorch instalados ("),to=a(at,"CODE",{});var sa=l(to);qt=n(sa,"pip install tensorflow"),sa.forEach(o),Dt=n(at,"). O resto do reposit\xF3rio requer apenas o PyTorch."),at.forEach(o),Co=m(e),Y=a(e,"P",{});var lt=l(Y);Wt=n(lt,"Aqui est\xE1 um exemplo do processo de convers\xE3o para um modelo "),ro=a(lt,"CODE",{});var na=l(ro);Yt=n(na,"BERT-Base Uncased"),na.forEach(o),zt=n(lt," pr\xE9-treinado:"),lt.forEach(o),Po=m(e),u(_e.$$.fragment,e),Fo=m(e),z=a(e,"P",{});var st=l(z);Kt=n(st,"Voc\xEA pode baixar os modelos pr\xE9-treinados do Google para a convers\xE3o "),ye=a(st,"A",{href:!0,rel:!0});var pa=l(ye);er=n(pa,"aqui"),pa.forEach(o),or=n(st,"."),st.forEach(o),Mo=m(e),S=a(e,"H2",{class:!0});var nt=l(S);K=a(nt,"A",{id:!0,class:!0,href:!0});var ca=l(K);ao=a(ca,"SPAN",{});var ia=l(ao);u(Ue.$$.fragment,ia),ia.forEach(o),ca.forEach(o),tr=m(nt),lo=a(nt,"SPAN",{});var fa=l(lo);rr=n(fa,"ALBERT"),fa.forEach(o),nt.forEach(o),Ao=m(e),ee=a(e,"P",{});var pt=l(ee);ar=n(pt,`Converta os checkpoints do modelo ALBERT em TensorFlow para PyTorch usando o
`),Ee=a(pt,"A",{href:!0,rel:!0});var ma=l(Ee);lr=n(ma,"convert_albert_original_tf_checkpoint_to_pytorch.py"),ma.forEach(o),sr=n(pt," script."),pt.forEach(o),ko=m(e),M=a(e,"P",{});var Oe=l(M);nr=n(Oe,"A Interface de Linha de Comando (CLI) recebe como entrada um checkpoint do TensorFlow (tr\xEAs arquivos come\xE7ando com "),so=a(Oe,"CODE",{});var da=l(so);pr=n(da,"model.ckpt-best"),da.forEach(o),cr=n(Oe,`) e o
arquivo de configura\xE7\xE3o (`),no=a(Oe,"CODE",{});var ha=l(no);ir=n(ha,"albert_config.json"),ha.forEach(o),fr=n(Oe,`), ent\xE3o cria e salva um modelo PyTorch. Para executar esta convers\xE3o, voc\xEA
precisa ter o TensorFlow e o PyTorch instalados.`),Oe.forEach(o),Io=m(e),oe=a(e,"P",{});var ct=l(oe);mr=n(ct,"Aqui est\xE1 um exemplo do processo de convers\xE3o para o modelo "),po=a(ct,"CODE",{});var ua=l(po);dr=n(ua,"ALBERT Base"),ua.forEach(o),hr=n(ct," pr\xE9-treinado:"),ct.forEach(o),No=m(e),u(Je.$$.fragment,e),Bo=m(e),te=a(e,"P",{});var it=l(te);ur=n(it,"Voc\xEA pode baixar os modelos pr\xE9-treinados do Google para a convers\xE3o "),be=a(it,"A",{href:!0,rel:!0});var Ta=l(be);Tr=n(Ta,"aqui"),Ta.forEach(o),vr=n(it,"."),it.forEach(o),So=m(e),X=a(e,"H2",{class:!0});var ft=l(X);re=a(ft,"A",{id:!0,class:!0,href:!0});var va=l(re);co=a(va,"SPAN",{});var _a=l(co);u(we.$$.fragment,_a),_a.forEach(o),va.forEach(o),_r=m(ft),io=a(ft,"SPAN",{});var ya=l(io);yr=n(ya,"OpenAI GPT"),ya.forEach(o),ft.forEach(o),Xo=m(e),ae=a(e,"P",{});var mt=l(ae);Ur=n(mt,`Aqui est\xE1 um exemplo do processo de convers\xE3o para um modelo OpenAI GPT pr\xE9-treinado, supondo que seu checkpoint NumPy
foi salvo com o mesmo formato do modelo pr\xE9-treinado OpenAI (veja `),$e=a(mt,"A",{href:!0,rel:!0});var Ua=l($e);Er=n(Ua,"aqui"),Ua.forEach(o),Jr=n(mt,`\\
)`),mt.forEach(o),Qo=m(e),u(Ve.$$.fragment,e),Go=m(e),Q=a(e,"H2",{class:!0});var dt=l(Q);le=a(dt,"A",{id:!0,class:!0,href:!0});var Ea=l(le);fo=a(Ea,"SPAN",{});var Ja=l(fo);u(Re.$$.fragment,Ja),Ja.forEach(o),Ea.forEach(o),br=m(dt),mo=a(dt,"SPAN",{});var ba=l(mo);wr=n(ba,"OpenAI GPT-2"),ba.forEach(o),dt.forEach(o),Zo=m(e),se=a(e,"P",{});var ht=l(se);$r=n(ht,"Aqui est\xE1 um exemplo do processo de convers\xE3o para um modelo OpenAI GPT-2 pr\xE9-treinado (consulte "),Ce=a(ht,"A",{href:!0,rel:!0});var wa=l(Ce);Vr=n(wa,"aqui"),wa.forEach(o),Rr=n(ht,")"),ht.forEach(o),xo=m(e),u(Pe.$$.fragment,e),Lo=m(e),G=a(e,"H2",{class:!0});var ut=l(G);ne=a(ut,"A",{id:!0,class:!0,href:!0});var $a=l(ne);ho=a($a,"SPAN",{});var Va=l(ho);u(Fe.$$.fragment,Va),Va.forEach(o),$a.forEach(o),Cr=m(ut),uo=a(ut,"SPAN",{});var Ra=l(uo);Pr=n(Ra,"Transformer-XL"),Ra.forEach(o),ut.forEach(o),go=m(e),pe=a(e,"P",{});var Tt=l(pe);Fr=n(Tt,"Aqui est\xE1 um exemplo do processo de convers\xE3o para um modelo Transformer-XL pr\xE9-treinado (consulte "),Me=a(Tt,"A",{href:!0,rel:!0});var Ca=l(Me);Mr=n(Ca,"aqui"),Ca.forEach(o),Ar=n(Tt,")"),Tt.forEach(o),jo=m(e),u(Ae.$$.fragment,e),Oo=m(e),Z=a(e,"H2",{class:!0});var vt=l(Z);ce=a(vt,"A",{id:!0,class:!0,href:!0});var Pa=l(ce);To=a(Pa,"SPAN",{});var Fa=l(To);u(ke.$$.fragment,Fa),Fa.forEach(o),Pa.forEach(o),kr=m(vt),vo=a(vt,"SPAN",{});var Ma=l(vo);Ir=n(Ma,"XLNet"),Ma.forEach(o),vt.forEach(o),Ho=m(e),xe=a(e,"P",{});var Aa=l(xe);Nr=n(Aa,"Aqui est\xE1 um exemplo do processo de convers\xE3o para um modelo XLNet pr\xE9-treinado:"),Aa.forEach(o),qo=m(e),u(Ie.$$.fragment,e),Do=m(e),x=a(e,"H2",{class:!0});var _t=l(x);ie=a(_t,"A",{id:!0,class:!0,href:!0});var ka=l(ie);_o=a(ka,"SPAN",{});var Ia=l(_o);u(Ne.$$.fragment,Ia),Ia.forEach(o),ka.forEach(o),Br=m(_t),yo=a(_t,"SPAN",{});var Na=l(yo);Sr=n(Na,"XLM"),Na.forEach(o),_t.forEach(o),Wo=m(e),Le=a(e,"P",{});var Ba=l(Le);Xr=n(Ba,"Aqui est\xE1 um exemplo do processo de convers\xE3o para um modelo XLM pr\xE9-treinado:"),Ba.forEach(o),Yo=m(e),u(Be.$$.fragment,e),zo=m(e),L=a(e,"H2",{class:!0});var yt=l(L);fe=a(yt,"A",{id:!0,class:!0,href:!0});var Sa=l(fe);Uo=a(Sa,"SPAN",{});var Xa=l(Uo);u(Se.$$.fragment,Xa),Xa.forEach(o),Sa.forEach(o),Qr=m(yt),Eo=a(yt,"SPAN",{});var Qa=l(Eo);Gr=n(Qa,"T5"),Qa.forEach(o),yt.forEach(o),Ko=m(e),ge=a(e,"P",{});var Ga=l(ge);Zr=n(Ga,"Aqui est\xE1 um exemplo do processo de convers\xE3o para um modelo T5 pr\xE9-treinado:"),Ga.forEach(o),et=m(e),u(Xe.$$.fragment,e),this.h()},h(){i(d,"name","hf:doc:metadata"),i(d,"content",JSON.stringify(Da)),i($,"id","convertendo-checkpoints-do-tensorflow-para-pytorch"),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($,"href","#convertendo-checkpoints-do-tensorflow-para-pytorch"),i(E,"class","relative group"),i(D,"id","bert"),i(D,"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(D,"href","#bert"),i(B,"class","relative group"),i(ue,"href","https://github.com/google-research/bert#pre-trained-models"),i(ue,"rel","nofollow"),i(Te,"href","https://github.com/huggingface/transformers/tree/main/src/transformers/models/bert/convert_bert_original_tf_checkpoint_to_pytorch.py"),i(Te,"rel","nofollow"),i(Ze,"href","quicktour"),i(ve,"href","https://github.com/huggingface/transformers/tree/main/examples/pytorch/text-classification/run_glue.py"),i(ve,"rel","nofollow"),i(ye,"href","https://github.com/google-research/bert#pre-trained-models"),i(ye,"rel","nofollow"),i(K,"id","albert"),i(K,"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(K,"href","#albert"),i(S,"class","relative group"),i(Ee,"href","https://github.com/huggingface/transformers/tree/main/src/transformers/models/albert/convert_albert_original_tf_checkpoint_to_pytorch.py"),i(Ee,"rel","nofollow"),i(be,"href","https://github.com/google-research/albert#pre-trained-models"),i(be,"rel","nofollow"),i(re,"id","openai-gpt"),i(re,"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(re,"href","#openai-gpt"),i(X,"class","relative group"),i($e,"href","https://github.com/openai/finetune-transformer-lm"),i($e,"rel","nofollow"),i(le,"id","openai-gpt2"),i(le,"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(le,"href","#openai-gpt2"),i(Q,"class","relative group"),i(Ce,"href","https://github.com/openai/gpt-2"),i(Ce,"rel","nofollow"),i(ne,"id","transformerxl"),i(ne,"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(ne,"href","#transformerxl"),i(G,"class","relative group"),i(Me,"href","https://github.com/kimiyoung/transformer-xl/tree/master/tf#obtain-and-evaluate-pretrained-modelos-sota"),i(Me,"rel","nofollow"),i(ce,"id","xlnet"),i(ce,"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(ce,"href","#xlnet"),i(Z,"class","relative group"),i(ie,"id","xlm"),i(ie,"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(ie,"href","#xlm"),i(x,"class","relative group"),i(fe,"id","t5"),i(fe,"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(fe,"href","#t5"),i(L,"class","relative group")},m(e,p){t(document.head,d),c(e,j,p),c(e,E,p),t(E,$),t($,k),T(V,k,null),t(E,R),t(E,I),t(I,N),c(e,O,p),c(e,C,p),t(C,J),t(C,b),t(b,Ge),t(C,H),c(e,de,p),T(q,e,p),c(e,bo,p),c(e,B,p),t(B,D),t(D,He),T(he,He,null),t(B,Ut),t(B,qe),t(qe,Et),c(e,wo,p),c(e,F,p),t(F,Jt),t(F,ue),t(ue,bt),t(F,wt),t(F,Te),t(Te,$t),t(F,Vt),c(e,$o,p),c(e,U,p),t(U,Rt),t(U,De),t(De,Ct),t(U,Pt),t(U,We),t(We,Ft),t(U,Mt),t(U,Ye),t(Ye,At),t(U,kt),t(U,Ze),t(Ze,It),t(U,Nt),t(U,ve),t(ve,Bt),t(U,St),c(e,Vo,p),c(e,w,p),t(w,Xt),t(w,ze),t(ze,Qt),t(w,Gt),t(w,Ke),t(Ke,Zt),t(w,xt),t(w,eo),t(eo,Lt),t(w,gt),t(w,oo),t(oo,jt),t(w,Ot),c(e,Ro,p),c(e,W,p),t(W,Ht),t(W,to),t(to,qt),t(W,Dt),c(e,Co,p),c(e,Y,p),t(Y,Wt),t(Y,ro),t(ro,Yt),t(Y,zt),c(e,Po,p),T(_e,e,p),c(e,Fo,p),c(e,z,p),t(z,Kt),t(z,ye),t(ye,er),t(z,or),c(e,Mo,p),c(e,S,p),t(S,K),t(K,ao),T(Ue,ao,null),t(S,tr),t(S,lo),t(lo,rr),c(e,Ao,p),c(e,ee,p),t(ee,ar),t(ee,Ee),t(Ee,lr),t(ee,sr),c(e,ko,p),c(e,M,p),t(M,nr),t(M,so),t(so,pr),t(M,cr),t(M,no),t(no,ir),t(M,fr),c(e,Io,p),c(e,oe,p),t(oe,mr),t(oe,po),t(po,dr),t(oe,hr),c(e,No,p),T(Je,e,p),c(e,Bo,p),c(e,te,p),t(te,ur),t(te,be),t(be,Tr),t(te,vr),c(e,So,p),c(e,X,p),t(X,re),t(re,co),T(we,co,null),t(X,_r),t(X,io),t(io,yr),c(e,Xo,p),c(e,ae,p),t(ae,Ur),t(ae,$e),t($e,Er),t(ae,Jr),c(e,Qo,p),T(Ve,e,p),c(e,Go,p),c(e,Q,p),t(Q,le),t(le,fo),T(Re,fo,null),t(Q,br),t(Q,mo),t(mo,wr),c(e,Zo,p),c(e,se,p),t(se,$r),t(se,Ce),t(Ce,Vr),t(se,Rr),c(e,xo,p),T(Pe,e,p),c(e,Lo,p),c(e,G,p),t(G,ne),t(ne,ho),T(Fe,ho,null),t(G,Cr),t(G,uo),t(uo,Pr),c(e,go,p),c(e,pe,p),t(pe,Fr),t(pe,Me),t(Me,Mr),t(pe,Ar),c(e,jo,p),T(Ae,e,p),c(e,Oo,p),c(e,Z,p),t(Z,ce),t(ce,To),T(ke,To,null),t(Z,kr),t(Z,vo),t(vo,Ir),c(e,Ho,p),c(e,xe,p),t(xe,Nr),c(e,qo,p),T(Ie,e,p),c(e,Do,p),c(e,x,p),t(x,ie),t(ie,_o),T(Ne,_o,null),t(x,Br),t(x,yo),t(yo,Sr),c(e,Wo,p),c(e,Le,p),t(Le,Xr),c(e,Yo,p),T(Be,e,p),c(e,zo,p),c(e,L,p),t(L,fe),t(fe,Uo),T(Se,Uo,null),t(L,Qr),t(L,Eo),t(Eo,Gr),c(e,Ko,p),c(e,ge,p),t(ge,Zr),c(e,et,p),T(Xe,e,p),ot=!0},p(e,[p]){const Qe={};p&2&&(Qe.$$scope={dirty:p,ctx:e}),q.$set(Qe)},i(e){ot||(v(V.$$.fragment,e),v(q.$$.fragment,e),v(he.$$.fragment,e),v(_e.$$.fragment,e),v(Ue.$$.fragment,e),v(Je.$$.fragment,e),v(we.$$.fragment,e),v(Ve.$$.fragment,e),v(Re.$$.fragment,e),v(Pe.$$.fragment,e),v(Fe.$$.fragment,e),v(Ae.$$.fragment,e),v(ke.$$.fragment,e),v(Ie.$$.fragment,e),v(Ne.$$.fragment,e),v(Be.$$.fragment,e),v(Se.$$.fragment,e),v(Xe.$$.fragment,e),ot=!0)},o(e){_(V.$$.fragment,e),_(q.$$.fragment,e),_(he.$$.fragment,e),_(_e.$$.fragment,e),_(Ue.$$.fragment,e),_(Je.$$.fragment,e),_(we.$$.fragment,e),_(Ve.$$.fragment,e),_(Re.$$.fragment,e),_(Pe.$$.fragment,e),_(Fe.$$.fragment,e),_(Ae.$$.fragment,e),_(ke.$$.fragment,e),_(Ie.$$.fragment,e),_(Ne.$$.fragment,e),_(Be.$$.fragment,e),_(Se.$$.fragment,e),_(Xe.$$.fragment,e),ot=!1},d(e){o(d),e&&o(j),e&&o(E),y(V),e&&o(O),e&&o(C),e&&o(de),y(q,e),e&&o(bo),e&&o(B),y(he),e&&o(wo),e&&o(F),e&&o($o),e&&o(U),e&&o(Vo),e&&o(w),e&&o(Ro),e&&o(W),e&&o(Co),e&&o(Y),e&&o(Po),y(_e,e),e&&o(Fo),e&&o(z),e&&o(Mo),e&&o(S),y(Ue),e&&o(Ao),e&&o(ee),e&&o(ko),e&&o(M),e&&o(Io),e&&o(oe),e&&o(No),y(Je,e),e&&o(Bo),e&&o(te),e&&o(So),e&&o(X),y(we),e&&o(Xo),e&&o(ae),e&&o(Qo),y(Ve,e),e&&o(Go),e&&o(Q),y(Re),e&&o(Zo),e&&o(se),e&&o(xo),y(Pe,e),e&&o(Lo),e&&o(G),y(Fe),e&&o(go),e&&o(pe),e&&o(jo),y(Ae,e),e&&o(Oo),e&&o(Z),y(ke),e&&o(Ho),e&&o(xe),e&&o(qo),y(Ie,e),e&&o(Do),e&&o(x),y(Ne),e&&o(Wo),e&&o(Le),e&&o(Yo),y(Be,e),e&&o(zo),e&&o(L),y(Se),e&&o(Ko),e&&o(ge),e&&o(et),y(Xe,e)}}}const Da={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 Wa(Jo){return ja(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class ol extends Za{constructor(d){super();xa(this,d,Wa,qa,La,{})}}export{ol as default,Da as metadata};
