import{s as hl,o as Ul,n as Pe}from"../chunks/scheduler.d586627e.js";import{S as Cl,i as $l,g as i,s as a,r as d,A as Jl,h as r,f as s,c as o,j as Tl,u as c,x as p,k as wl,y as vl,a as l,v as u,d as M,t as f,w as y}from"../chunks/index.8589a59c.js";import{T as Oe}from"../chunks/Tip.84e2336e.js";import{C as g}from"../chunks/CodeBlock.47c46d2c.js";import{H as I}from"../chunks/Heading.a70e045b.js";function xl(T){let n,j=`Uma vez exportado, um modelo pode ser otimizado para inferência por meio de técnicas como
quantização e poda. Se você estiver interessado em otimizar seus modelos para serem executados com
máxima eficiência, confira a biblioteca <a href="https://github.com/huggingface/optimum" rel="nofollow">🤗 Optimum
</a>.`;return{c(){n=i("p"),n.innerHTML=j},l(m){n=r(m,"P",{"data-svelte-h":!0}),p(n)!=="svelte-17ryloz"&&(n.innerHTML=j)},m(m,b){l(m,n,b)},p:Pe,d(m){m&&s(n)}}}function Zl(T){let n,j=`Os recursos que têm um sufixo <code>with-pass</code> (como <code>causal-lm-with-pass</code>) correspondem a
classes de modelo com estados ocultos pré-computados (chave e valores nos blocos de atenção)
que pode ser usado para decodificação autorregressiva rápida.`;return{c(){n=i("p"),n.innerHTML=j},l(m){n=r(m,"P",{"data-svelte-h":!0}),p(n)!=="svelte-frt6wh"&&(n.innerHTML=j)},m(m,b){l(m,n,b)},p:Pe,d(m){m&&s(n)}}}function Nl(T){let n,j=`Para modelos do tipo <code>VisionEncoderDecoder</code>, as partes do codificador e do decodificador são
exportados separadamente como dois arquivos ONNX chamados <code>encoder_model.onnx</code> e <code>decoder_model.onnx</code> respectivamente.`;return{c(){n=i("p"),n.innerHTML=j},l(m){n=r(m,"P",{"data-svelte-h":!0}),p(n)!=="svelte-7aqol8"&&(n.innerHTML=j)},m(m,b){l(m,n,b)},p:Pe,d(m){m&&s(n)}}}function Il(T){let n,j=`Uma boa maneira de implementar uma configuração ONNX personalizada é observar as
implementação no arquivo <code>configuration_&lt;model_name&gt;.py</code> de uma arquitetura semelhante.`;return{c(){n=i("p"),n.innerHTML=j},l(m){n=r(m,"P",{"data-svelte-h":!0}),p(n)!=="svelte-10qekhj"&&(n.innerHTML=j)},m(m,b){l(m,n,b)},p:Pe,d(m){m&&s(n)}}}function kl(T){let n,j=`Notice that <code>inputs</code> property for <code>DistilBertOnnxConfig</code> returns an <code>OrderedDict</code>. This
ensures that the inputs are matched with their relative position within the
<code>PreTrainedModel.forward()</code> method when tracing the graph. We recommend using an
<code>OrderedDict</code> for the <code>inputs</code> and <code>outputs</code> properties when implementing custom ONNX
configurations.`,m,b,U=`Observe que a propriedade <code>inputs</code> para <code>DistilBertOnnxConfig</code> retorna um <code>OrderedDict</code>. Este
garante que as entradas sejam combinadas com sua posição relativa dentro do
método <code>PreTrainedModel.forward()</code> ao traçar o grafo. Recomendamos o uso de um
<code>OrderedDict</code> para as propriedades <code>inputs</code> e <code>outputs</code> ao implementar configurações personalizadas ONNX.`;return{c(){n=i("p"),n.innerHTML=j,m=a(),b=i("p"),b.innerHTML=U},l(w){n=r(w,"P",{"data-svelte-h":!0}),p(n)!=="svelte-14shdz8"&&(n.innerHTML=j),m=o(w),b=r(w,"P",{"data-svelte-h":!0}),p(b)!=="svelte-ts6haw"&&(b.innerHTML=U)},m(w,h){l(w,n,h),l(w,m,h),l(w,b,h)},p:Pe,d(w){w&&(s(n),s(m),s(b))}}}function Wl(T){let n,j=`Todas as propriedades e métodos básicos associados a <code>OnnxConfig</code> e
as outras classes de configuração podem ser substituídas se necessário. Confira <code>BartOnnxConfig</code>
para um exemplo avançado.`;return{c(){n=i("p"),n.innerHTML=j},l(m){n=r(m,"P",{"data-svelte-h":!0}),p(n)!=="svelte-js6ttx"&&(n.innerHTML=j)},m(m,b){l(m,n,b)},p:Pe,d(m){m&&s(n)}}}function Al(T){let n,j=`Se o seu modelo for maior que 2GB, você verá que muitos arquivos adicionais são criados
durante a exportação. Isso é <em>esperado</em> porque o ONNX usa <a href="https://developers.google.com/protocol-buffers/" rel="nofollow">Protocol
Buffers</a> para armazenar o modelo e estes
têm um limite de tamanho de 2GB. Veja a <a href="https://github.com/onnx/onnx/blob/master/docs/ExternalData.md" rel="nofollow">ONNX
documentação</a> para
instruções sobre como carregar modelos com dados externos.`;return{c(){n=i("p"),n.innerHTML=j},l(m){n=r(m,"P",{"data-svelte-h":!0}),p(n)!=="svelte-1iua1gz"&&(n.innerHTML=j)},m(m,b){l(m,n,b)},p:Pe,d(m){m&&s(n)}}}function Bl(T){let n,j,m,b,U,w,h,Cs=`Se você precisar implantar modelos 🤗 Transformers em ambientes de produção, recomendamos
exporta-los para um formato serializado que pode ser carregado e executado em
tempos de execução e hardware. Neste guia, mostraremos como exportar modelos 🤗 Transformers
para <a href="http://onnx.ai" rel="nofollow">ONNX (Open Neural Network eXchange)</a>.`,De,C,Ke,k,$s=`ONNX é um padrão aberto que define um conjunto comum de operadores e um formato de arquivo comum
para representar modelos de aprendizado profundo em uma ampla variedade de estruturas, incluindo PyTorch e
TensorFlow. Quando um modelo é exportado para o formato ONNX, esses operadores são usados para
construir um grafo computacional (muitas vezes chamado de <em>representação intermediária</em>) que
representa o fluxo de dados através da rede neural.`,et,W,Js=`Ao expor um grafo com operadores e tipos de dados padronizados, o ONNX facilita a
alternar entre os frameworks. Por exemplo, um modelo treinado em PyTorch pode ser exportado para
formato ONNX e depois importado no TensorFlow (e vice-versa).`,tt,A,vs=`🤗 Transformers fornece um pacote <a href="main_classes/onnx"><code>transformers.onnx</code></a> que permite
que você converta os checkpoints do modelo em um grafo ONNX aproveitando os objetos de configuração.
Esses objetos de configuração vêm prontos para várias arquiteturas de modelo e são
projetado para ser facilmente extensível a outras arquiteturas.`,st,B,xs="As configurações prontas incluem as seguintes arquiteturas:",lt,X,Zs="<li>ALBERT</li> <li>BART</li> <li>BEiT</li> <li>BERT</li> <li>BigBird</li> <li>BigBird-Pegasus</li> <li>Blenderbot</li> <li>BlenderbotSmall</li> <li>BLOOM</li> <li>CamemBERT</li> <li>CLIP</li> <li>CodeGen</li> <li>Conditional DETR</li> <li>ConvBERT</li> <li>ConvNeXT</li> <li>ConvNeXTV2</li> <li>Data2VecText</li> <li>Data2VecVision</li> <li>DeBERTa</li> <li>DeBERTa-v2</li> <li>DeiT</li> <li>DETR</li> <li>DistilBERT</li> <li>ELECTRA</li> <li>ERNIE</li> <li>FlauBERT</li> <li>GPT Neo</li> <li>GPT-J</li> <li>GroupViT</li> <li>I-BERT</li> <li>LayoutLM</li> <li>LayoutLMv3</li> <li>LeViT</li> <li>Longformer</li> <li>LongT5</li> <li>M2M100</li> <li>Marian</li> <li>mBART</li> <li>MobileBERT</li> <li>MobileViT</li> <li>MT5</li> <li>OpenAI GPT-2</li> <li>OWL-ViT</li> <li>Perceiver</li> <li>PLBart</li> <li>ResNet</li> <li>RoBERTa</li> <li>RoFormer</li> <li>SegFormer</li> <li>SqueezeBERT</li> <li>Swin Transformer</li> <li>T5</li> <li>Table Transformer</li> <li>Vision Encoder decoder</li> <li>ViT</li> <li>XLM</li> <li>XLM-RoBERTa</li> <li>XLM-RoBERTa-XL</li> <li>YOLOS</li>",at,R,Ns="Nas próximas duas seções, mostraremos como:",ot,_,Is="<li>Exportar um modelo suportado usando o pacote <code>transformers.onnx</code>.</li> <li>Exportar um modelo personalizado para uma arquitetura sem suporte.</li>",nt,G,it,q,ks=`Para exportar um modelo 🤗 Transformers para o ONNX, primeiro você precisa instalar algumas
dependências extras:`,rt,V,pt,E,Ws="O pacote <code>transformers.onnx</code> pode então ser usado como um módulo Python:",mt,H,dt,L,As="A exportação de um checkpoint usando uma configuração pronta pode ser feita da seguinte forma:",ct,z,ut,F,Bs="Você deve ver os seguintes logs:",Mt,Q,ft,Y,Xs=`Isso exporta um grafo ONNX do ponto de verificação definido pelo argumento <code>--model</code>. Nisso
Por exemplo, é <code>distilbert-base-uncased</code>, mas pode ser qualquer checkpoint no Hugging
Face Hub ou um armazenado localmente.`,yt,O,Rs=`O arquivo <code>model.onnx</code> resultante pode ser executado em um dos <a href="https://onnx.ai/supported-tools.html#deployModel" rel="nofollow">muitos
aceleradores</a> que suportam o ONNX
padrão. Por exemplo, podemos carregar e executar o modelo com <a href="https://onnxruntime.ai/" rel="nofollow">ONNX
Tempo de execução</a> da seguinte forma:`,jt,P,bt,S,_s=`Os nomes de saída necessários (como <code>[&quot;last_hidden_state&quot;]</code>) podem ser obtidos pegando uma
configuração ONNX de cada modelo. Por exemplo, para DistilBERT temos:`,gt,D,Tt,K,Gs=`O processo é idêntico para os checkpoints do TensorFlow no Hub. Por exemplo, podemos
exportar um checkpoint TensorFlow puro do <a href="https://huggingface.co/keras-io" rel="nofollow">Keras</a> da seguinte forma:`,wt,ee,ht,te,qs=`Para exportar um modelo armazenado localmente, você precisará ter os pesos e
arquivos tokenizer armazenados em um diretório. Por exemplo, podemos carregar e salvar um checkpoint como:`,Ut,se,Ct,le,Vs=`Uma vez que o checkpoint é salvo, podemos exportá-lo para o ONNX apontando o <code>--model</code>
argumento do pacote <code>transformers.onnx</code> para o diretório desejado:`,$t,ae,Jt,oe,vt,ne,Es=`Uma vez que o checkpoint é salvo, podemos exportá-lo para o ONNX apontando o <code>--model</code>
argumento do pacote <code>transformers.onnx</code> para o diretório desejado:`,xt,ie,Zt,re,Nt,pe,Hs=`Cada configuração pronta vem com um conjunto de <em>features</em> que permitem exportar
modelos para diferentes tipos de tarefas. Conforme mostrado na tabela abaixo, cada recurso é
associado a uma <code>AutoClass</code> diferente:`,It,me,Ls="<thead><tr><th>Feature</th> <th>Auto Class</th></tr></thead> <tbody><tr><td><code>causal-lm</code>, <code>causal-lm-with-past</code></td> <td><code>AutoModelForCausalLM</code></td></tr> <tr><td><code>default</code>, <code>default-with-past</code></td> <td><code>AutoModel</code></td></tr> <tr><td><code>masked-lm</code></td> <td><code>AutoModelForMaskedLM</code></td></tr> <tr><td><code>question-answering</code></td> <td><code>AutoModelForQuestionAnswering</code></td></tr> <tr><td><code>seq2seq-lm</code>, <code>seq2seq-lm-with-past</code></td> <td><code>AutoModelForSeq2SeqLM</code></td></tr> <tr><td><code>sequence-classification</code></td> <td><code>AutoModelForSequenceClassification</code></td></tr> <tr><td><code>token-classification</code></td> <td><code>AutoModelForTokenClassification</code></td></tr></tbody>",kt,de,zs=`Para cada configuração, você pode encontrar a lista de recursos suportados por meio do
<code>FeaturesManager</code>. Por exemplo, para DistilBERT temos:`,Wt,ce,At,ue,Fs=`Você pode então passar um desses recursos para o argumento <code>--feature</code> no
pacote <code>transformers.onnx</code>. Por exemplo, para exportar um modelo de classificação de texto, podemos
escolher um modelo ajustado no Hub e executar:`,Bt,Me,Xt,fe,Qs="Isso exibe os seguintes logs:",Rt,ye,_t,je,Ys=`Observe que, neste caso, os nomes de saída do modelo ajustado são <code>logits</code>
em vez do <code>last_hidden_state</code> que vimos com o checkpoint <code>distilbert-base-uncased</code>
mais cedo. Isso é esperado, pois o modelo ajustado (fine-tuned) possui uma cabeça de classificação de sequência.`,Gt,$,qt,J,Vt,be,Et,ge,Os=`Se você deseja exportar um modelo cuja arquitetura não é suportada nativamente pela
biblioteca, há três etapas principais a seguir:`,Ht,Te,Ps="<li>Implemente uma configuração ONNX personalizada.</li> <li>Exporte o modelo para o ONNX.</li> <li>Valide as saídas do PyTorch e dos modelos exportados.</li>",Lt,we,Ss=`Nesta seção, veremos como o DistilBERT foi implementado para mostrar o que está envolvido
em cada passo.`,zt,he,Ft,Ue,Ds=`Vamos começar com o objeto de configuração ONNX. Fornecemos três classes abstratas que
você deve herdar, dependendo do tipo de arquitetura de modelo que deseja exportar:`,Qt,Ce,Ks="<li>Modelos baseados em codificador herdam de <code>OnnxConfig</code></li> <li>Modelos baseados em decodificador herdam de <code>OnnxConfigWithPast</code></li> <li>Os modelos codificador-decodificador herdam de <code>OnnxSeq2SeqConfigWithPast</code></li>",Yt,v,Ot,$e,el=`Como o DistilBERT é um modelo baseado em codificador, sua configuração é herdada de
<code>OnnxConfig</code>:`,Pt,Je,St,ve,tl=`Todo objeto de configuração deve implementar a propriedade <code>inputs</code> e retornar um mapeamento,
onde cada chave corresponde a uma entrada esperada e cada valor indica o eixo
dessa entrada. Para o DistilBERT, podemos ver que duas entradas são necessárias: <code>input_ids</code> e
<code>attention_mask</code>. Essas entradas têm a mesma forma de <code>(batch_size, sequence_length)</code>
é por isso que vemos os mesmos eixos usados na configuração.`,Dt,x,Kt,xe,sl=`Depois de implementar uma configuração ONNX, você pode instanciá-la fornecendo a
configuração do modelo base da seguinte forma:`,es,Ze,ts,Ne,ll=`O objeto resultante tem várias propriedades úteis. Por exemplo, você pode visualizar o conjunto de operadores ONNX
que será usado durante a exportação:`,ss,Ie,ls,ke,al="Você também pode visualizar as saídas associadas ao modelo da seguinte forma:",as,We,os,Ae,ol=`Observe que a propriedade outputs segue a mesma estrutura das entradas; ele retorna um
<code>OrderedDict</code> de saídas nomeadas e suas formas. A estrutura de saída está ligada a
escolha do recurso com o qual a configuração é inicializada. Por padrão, a configuração do ONNX
é inicializada com o recurso <code>default</code> que corresponde à exportação de um
modelo carregado com a classe <code>AutoModel</code>. Se você deseja exportar um modelo para outra tarefa,
apenas forneça um recurso diferente para o argumento <code>task</code> quando você inicializar a configuração ONNX
. Por exemplo, se quisermos exportar o DistilBERT com uma sequência
de classificação, poderíamos usar:`,ns,Be,is,Z,rs,Xe,ps,Re,nl=`Depois de ter implementado a configuração do ONNX, o próximo passo é exportar o modelo.
Aqui podemos usar a função <code>export()</code> fornecida pelo pacote <code>transformers.onnx</code>.
Esta função espera a configuração do ONNX, juntamente com o modelo base e o tokenizer,
e o caminho para salvar o arquivo exportado:`,ms,_e,ds,Ge,il=`Os <code>onnx_inputs</code> e <code>onnx_outputs</code> retornados pela função <code>export()</code> são listas de
chaves definidas nas propriedades <code>inputs</code> e <code>outputs</code> da configuração. Uma vez que o
modelo é exportado, você pode testar se o modelo está bem formado da seguinte forma:`,cs,qe,us,N,Ms,Ve,fs,Ee,rl=`A etapa final é validar se as saídas do modelo base e exportado concordam
dentro de alguma tolerância absoluta. Aqui podemos usar a função <code>validate_model_outputs()</code>
fornecida pelo pacote <code>transformers.onnx</code> da seguinte forma:`,ys,He,js,Le,pl=`Esta função usa o método <code>generate_dummy_inputs()</code> para
gerar entradas para o modelo base e o exportado, e a tolerância absoluta pode ser
definida na configuração. Geralmente encontramos concordância numérica em 1e-6 a 1e-4
de alcance, embora qualquer coisa menor que 1e-3 provavelmente esteja OK.`,bs,ze,gs,Fe,ml=`Estamos procurando expandir o conjunto de configurações prontas e receber contribuições
da comunidade! Se você gostaria de contribuir para a biblioteca, você
precisará:`,Ts,Qe,dl=`<li>Implemente a configuração do ONNX no arquivo <code>configuration_&lt;model_name&gt;.py</code> correspondente
Arquivo</li> <li>Incluir a arquitetura do modelo e recursos correspondentes em
<code>~onnx.features.FeatureManager</code></li> <li>Adicione sua arquitetura de modelo aos testes em <code>test_onnx_v2.py</code></li>`,ws,Ye,cl=`Confira como ficou a configuração do <a href="https://github.com/huggingface/transformers/pull/14868/files" rel="nofollow">IBERT</a> para obter uma
idéia do que está envolvido.`,hs,Se,Us;return U=new I({props:{title:"Exportando modelos para ONNX",local:"exportando-modelos-para-onnx",headingTag:"h1"}}),C=new Oe({props:{$$slots:{default:[xl]},$$scope:{ctx:T}}}),G=new I({props:{title:"Exportando um modelo para ONNX",local:"exportando-um-modelo-para-onnx",headingTag:"h2"}}),V=new g({props:{code:"cGlwJTIwaW5zdGFsbCUyMHRyYW5zZm9ybWVycyU1Qm9ubnglNUQ=",highlighted:"pip install transformers[onnx]",wrap:!1}}),H=new g({props:{code:"cHl0aG9uJTIwLW0lMjB0cmFuc2Zvcm1lcnMub25ueCUyMC0taGVscCUwQSUwQXVzYWdlJTNBJTIwSHVnZ2luZyUyMEZhY2UlMjBUcmFuc2Zvcm1lcnMlMjBPTk5YJTIwZXhwb3J0ZXIlMjAlNUItaCU1RCUyMC1tJTIwTU9ERUwlMjAlNUItLWZlYXR1cmUlMjAlN0JjYXVzYWwtbG0lMkMlMjAuLi4lN0QlNUQlMjAlNUItLW9wc2V0JTIwT1BTRVQlNUQlMjAlNUItLWF0b2wlMjBBVE9MJTVEJTIwb3V0cHV0JTBBJTBBcG9zaXRpb25hbCUyMGFyZ3VtZW50cyUzQSUwQSUyMCUyMG91dHB1dCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMFBhdGglMjBpbmRpY2F0aW5nJTIwd2hlcmUlMjB0byUyMHN0b3JlJTIwZ2VuZXJhdGVkJTIwT05OWCUyMG1vZGVsLiUwQSUwQW9wdGlvbmFsJTIwYXJndW1lbnRzJTNBJTBBJTIwJTIwLWglMkMlMjAtLWhlbHAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjBzaG93JTIwdGhpcyUyMGhlbHAlMjBtZXNzYWdlJTIwYW5kJTIwZXhpdCUwQSUyMCUyMC1tJTIwTU9ERUwlMkMlMjAtLW1vZGVsJTIwTU9ERUwlMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjBNb2RlbCUyMElEJTIwb24lMjBodWdnaW5nZmFjZS5jbyUyMG9yJTIwcGF0aCUyMG9uJTIwZGlzayUyMHRvJTIwbG9hZCUyMG1vZGVsJTIwZnJvbS4lMEElMjAlMjAtLWZlYXR1cmUlMjAlN0JjYXVzYWwtbG0lMkMlMjAuLi4lN0QlMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjBUaGUlMjB0eXBlJTIwb2YlMjBmZWF0dXJlcyUyMHRvJTIwZXhwb3J0JTIwdGhlJTIwbW9kZWwlMjB3aXRoLiUwQSUyMCUyMC0tb3BzZXQlMjBPUFNFVCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyME9OTlglMjBvcHNldCUyMHZlcnNpb24lMjB0byUyMGV4cG9ydCUyMHRoZSUyMG1vZGVsJTIwd2l0aC4lMEElMjAlMjAtLWF0b2wlMjBBVE9MJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwQWJzb2x1dGUlMjBkaWZmZXJlbmNlJTIwdG9sZXJhbmNlJTIwd2hlbiUyMHZhbGlkYXRpbmclMjB0aGUlMjBtb2RlbC4=",highlighted:`python -m transformers.onnx --<span class="hljs-built_in">help</span>

usage: Hugging Face Transformers ONNX exporter [-h] -m MODEL [--feature {causal-lm, ...}] [--opset OPSET] [--atol ATOL] output

positional arguments:
  output                Path indicating <span class="hljs-built_in">where</span> to store generated ONNX model.

optional arguments:
  -h, --<span class="hljs-built_in">help</span>            show this <span class="hljs-built_in">help</span> message and <span class="hljs-built_in">exit</span>
  -m MODEL, --model MODEL
                        Model ID on huggingface.co or path on disk to load model from.
  --feature {causal-lm, ...}
                        The <span class="hljs-built_in">type</span> of features to <span class="hljs-built_in">export</span> the model with.
  --opset OPSET         ONNX opset version to <span class="hljs-built_in">export</span> the model with.
  --atol ATOL           Absolute difference tolerance when validating the model.`,wrap:!1}}),z=new g({props:{code:"cHl0aG9uJTIwLW0lMjB0cmFuc2Zvcm1lcnMub25ueCUyMC0tbW9kZWwlM0RkaXN0aWxiZXJ0LWJhc2UtdW5jYXNlZCUyMG9ubnglMkY=",highlighted:"python -m transformers.onnx --model=distilbert-base-uncased onnx/",wrap:!1}}),Q=new g({props:{code:"VmFsaWRhdGluZyUyME9OTlglMjBtb2RlbC4uLiUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMC0lNUIlRTIlOUMlOTMlNUQlMjBPTk5YJTIwbW9kZWwlMjBvdXRwdXQlMjBuYW1lcyUyMG1hdGNoJTIwcmVmZXJlbmNlJTIwbW9kZWwlMjAoJTdCJ2xhc3RfaGlkZGVuX3N0YXRlJyU3RCklMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAtJTIwVmFsaWRhdGluZyUyME9OTlglMjBNb2RlbCUyMG91dHB1dCUyMCUyMmxhc3RfaGlkZGVuX3N0YXRlJTIyJTNBJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwLSU1QiVFMiU5QyU5MyU1RCUyMCgyJTJDJTIwOCUyQyUyMDc2OCklMjBtYXRjaGVzJTIwKDIlMkMlMjA4JTJDJTIwNzY4KSUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMC0lNUIlRTIlOUMlOTMlNUQlMjBhbGwlMjB2YWx1ZXMlMjBjbG9zZSUyMChhdG9sJTNBJTIwMWUtMDUpJTBBQWxsJTIwZ29vZCUyQyUyMG1vZGVsJTIwc2F2ZWQlMjBhdCUzQSUyMG9ubnglMkZtb2RlbC5vbm54",highlighted:`Validating ONNX model...
        -[✓] ONNX model output names match reference model ({<span class="hljs-string">&#x27;last_hidden_state&#x27;</span>})
        - Validating ONNX Model output <span class="hljs-string">&quot;last_hidden_state&quot;</span>:
                -[✓] (2, 8, 768) matches (2, 8, 768)
                -[✓] all values close (atol: 1e-05)
All good, model saved at: onnx/model.onnx`,wrap:!1}}),P=new g({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMEFmcm9tJTIwb25ueHJ1bnRpbWUlMjBpbXBvcnQlMjBJbmZlcmVuY2VTZXNzaW9uJTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIyZGlzdGlsYmVydC1iYXNlLXVuY2FzZWQlMjIpJTBBc2Vzc2lvbiUyMCUzRCUyMEluZmVyZW5jZVNlc3Npb24oJTIyb25ueCUyRm1vZGVsLm9ubnglMjIpJTBBJTIzJTIwT05OWCUyMFJ1bnRpbWUlMjBleHBlY3RzJTIwTnVtUHklMjBhcnJheXMlMjBhcyUyMGlucHV0JTBBaW5wdXRzJTIwJTNEJTIwdG9rZW5pemVyKCUyMlVzaW5nJTIwRGlzdGlsQkVSVCUyMHdpdGglMjBPTk5YJTIwUnVudGltZSElMjIlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMm5wJTIyKSUwQW91dHB1dHMlMjAlM0QlMjBzZXNzaW9uLnJ1bihvdXRwdXRfbmFtZXMlM0QlNUIlMjJsYXN0X2hpZGRlbl9zdGF0ZSUyMiU1RCUyQyUyMGlucHV0X2ZlZWQlM0RkaWN0KGlucHV0cykp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> onnxruntime <span class="hljs-keyword">import</span> InferenceSession

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;distilbert-base-uncased&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>session = InferenceSession(<span class="hljs-string">&quot;onnx/model.onnx&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># ONNX Runtime expects NumPy arrays as input</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(<span class="hljs-string">&quot;Using DistilBERT with ONNX Runtime!&quot;</span>, return_tensors=<span class="hljs-string">&quot;np&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = session.run(output_names=[<span class="hljs-string">&quot;last_hidden_state&quot;</span>], input_feed=<span class="hljs-built_in">dict</span>(inputs))`,wrap:!1}}),D=new g({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycy5tb2RlbHMuZGlzdGlsYmVydCUyMGltcG9ydCUyMERpc3RpbEJlcnRDb25maWclMkMlMjBEaXN0aWxCZXJ0T25ueENvbmZpZyUwQSUwQWNvbmZpZyUyMCUzRCUyMERpc3RpbEJlcnRDb25maWcoKSUwQW9ubnhfY29uZmlnJTIwJTNEJTIwRGlzdGlsQmVydE9ubnhDb25maWcoY29uZmlnKSUwQXByaW50KGxpc3Qob25ueF9jb25maWcub3V0cHV0cy5rZXlzKCkpKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers.models.distilbert <span class="hljs-keyword">import</span> DistilBertConfig, DistilBertOnnxConfig

<span class="hljs-meta">&gt;&gt;&gt; </span>config = DistilBertConfig()
<span class="hljs-meta">&gt;&gt;&gt; </span>onnx_config = DistilBertOnnxConfig(config)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">print</span>(<span class="hljs-built_in">list</span>(onnx_config.outputs.keys()))
[<span class="hljs-string">&quot;last_hidden_state&quot;</span>]`,wrap:!1}}),ee=new g({props:{code:"cHl0aG9uJTIwLW0lMjB0cmFuc2Zvcm1lcnMub25ueCUyMC0tbW9kZWwlM0RrZXJhcy1pbyUyRnRyYW5zZm9ybWVycy1xYSUyMG9ubnglMkY=",highlighted:"python -m transformers.onnx --model=keras-io/transformers-qa onnx/",wrap:!1}}),se=new g({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBBdXRvTW9kZWxGb3JTZXF1ZW5jZUNsYXNzaWZpY2F0aW9uJTBBJTBBJTIzJTIwTG9hZCUyMHRva2VuaXplciUyMGFuZCUyMFB5VG9yY2glMjB3ZWlnaHRzJTIwZm9ybSUyMHRoZSUyMEh1YiUwQXRva2VuaXplciUyMCUzRCUyMEF1dG9Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMmRpc3RpbGJlcnQtYmFzZS11bmNhc2VkJTIyKSUwQXB0X21vZGVsJTIwJTNEJTIwQXV0b01vZGVsRm9yU2VxdWVuY2VDbGFzc2lmaWNhdGlvbi5mcm9tX3ByZXRyYWluZWQoJTIyZGlzdGlsYmVydC1iYXNlLXVuY2FzZWQlMjIpJTBBJTIzJTIwU2F2ZSUyMHRvJTIwZGlzayUwQXRva2VuaXplci5zYXZlX3ByZXRyYWluZWQoJTIybG9jYWwtcHQtY2hlY2twb2ludCUyMiklMEFwdF9tb2RlbC5zYXZlX3ByZXRyYWluZWQoJTIybG9jYWwtcHQtY2hlY2twb2ludCUyMik=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, AutoModelForSequenceClassification

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Load tokenizer and PyTorch weights form the Hub</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;distilbert-base-uncased&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>pt_model = AutoModelForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;distilbert-base-uncased&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Save to disk</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer.save_pretrained(<span class="hljs-string">&quot;local-pt-checkpoint&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>pt_model.save_pretrained(<span class="hljs-string">&quot;local-pt-checkpoint&quot;</span>)`,wrap:!1}}),ae=new g({props:{code:"cHl0aG9uJTIwLW0lMjB0cmFuc2Zvcm1lcnMub25ueCUyMC0tbW9kZWwlM0Rsb2NhbC1wdC1jaGVja3BvaW50JTIwb25ueCUyRg==",highlighted:"python -m transformers.onnx --model=local-pt-checkpoint onnx/",wrap:!1}}),oe=new g({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBURkF1dG9Nb2RlbEZvclNlcXVlbmNlQ2xhc3NpZmljYXRpb24lMEElMEElMjMlMjBMb2FkJTIwdG9rZW5pemVyJTIwYW5kJTIwVGVuc29yRmxvdyUyMHdlaWdodHMlMjBmcm9tJTIwdGhlJTIwSHViJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIyZGlzdGlsYmVydC1iYXNlLXVuY2FzZWQlMjIpJTBBdGZfbW9kZWwlMjAlM0QlMjBURkF1dG9Nb2RlbEZvclNlcXVlbmNlQ2xhc3NpZmljYXRpb24uZnJvbV9wcmV0cmFpbmVkKCUyMmRpc3RpbGJlcnQtYmFzZS11bmNhc2VkJTIyKSUwQSUyMyUyMFNhdmUlMjB0byUyMGRpc2slMEF0b2tlbml6ZXIuc2F2ZV9wcmV0cmFpbmVkKCUyMmxvY2FsLXRmLWNoZWNrcG9pbnQlMjIpJTBBdGZfbW9kZWwuc2F2ZV9wcmV0cmFpbmVkKCUyMmxvY2FsLXRmLWNoZWNrcG9pbnQlMjIp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, TFAutoModelForSequenceClassification

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Load tokenizer and TensorFlow weights from the Hub</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;distilbert-base-uncased&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>tf_model = TFAutoModelForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;distilbert-base-uncased&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Save to disk</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer.save_pretrained(<span class="hljs-string">&quot;local-tf-checkpoint&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>tf_model.save_pretrained(<span class="hljs-string">&quot;local-tf-checkpoint&quot;</span>)`,wrap:!1}}),ie=new g({props:{code:"cHl0aG9uJTIwLW0lMjB0cmFuc2Zvcm1lcnMub25ueCUyMC0tbW9kZWwlM0Rsb2NhbC10Zi1jaGVja3BvaW50JTIwb25ueCUyRg==",highlighted:"python -m transformers.onnx --model=local-tf-checkpoint onnx/",wrap:!1}}),re=new I({props:{title:"Selecionando features para diferentes tarefas do modelo",local:"selecionando-features-para-diferentes-tarefas-do-modelo",headingTag:"h2"}}),ce=new g({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycy5vbm54LmZlYXR1cmVzJTIwaW1wb3J0JTIwRmVhdHVyZXNNYW5hZ2VyJTBBJTBBZGlzdGlsYmVydF9mZWF0dXJlcyUyMCUzRCUyMGxpc3QoRmVhdHVyZXNNYW5hZ2VyLmdldF9zdXBwb3J0ZWRfZmVhdHVyZXNfZm9yX21vZGVsX3R5cGUoJTIyZGlzdGlsYmVydCUyMikua2V5cygpKSUwQXByaW50KGRpc3RpbGJlcnRfZmVhdHVyZXMp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers.onnx.features <span class="hljs-keyword">import</span> FeaturesManager

<span class="hljs-meta">&gt;&gt;&gt; </span>distilbert_features = <span class="hljs-built_in">list</span>(FeaturesManager.get_supported_features_for_model_type(<span class="hljs-string">&quot;distilbert&quot;</span>).keys())
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">print</span>(distilbert_features)
[<span class="hljs-string">&quot;default&quot;</span>, <span class="hljs-string">&quot;masked-lm&quot;</span>, <span class="hljs-string">&quot;causal-lm&quot;</span>, <span class="hljs-string">&quot;sequence-classification&quot;</span>, <span class="hljs-string">&quot;token-classification&quot;</span>, <span class="hljs-string">&quot;question-answering&quot;</span>]`,wrap:!1}}),Me=new g({props:{code:"cHl0aG9uJTIwLW0lMjB0cmFuc2Zvcm1lcnMub25ueCUyMC0tbW9kZWwlM0RkaXN0aWxiZXJ0LWJhc2UtdW5jYXNlZC1maW5ldHVuZWQtc3N0LTItZW5nbGlzaCUyMCU1QyUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMC0tZmVhdHVyZSUzRHNlcXVlbmNlLWNsYXNzaWZpY2F0aW9uJTIwb25ueCUyRg==",highlighted:`python -m transformers.onnx --model=distilbert-base-uncased-finetuned-sst-2-english \\
                            --feature=sequence-classification onnx/`,wrap:!1}}),ye=new g({props:{code:"VmFsaWRhdGluZyUyME9OTlglMjBtb2RlbC4uLiUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMC0lNUIlRTIlOUMlOTMlNUQlMjBPTk5YJTIwbW9kZWwlMjBvdXRwdXQlMjBuYW1lcyUyMG1hdGNoJTIwcmVmZXJlbmNlJTIwbW9kZWwlMjAoJTdCJ2xvZ2l0cyclN0QpJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwLSUyMFZhbGlkYXRpbmclMjBPTk5YJTIwTW9kZWwlMjBvdXRwdXQlMjAlMjJsb2dpdHMlMjIlM0ElMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAtJTVCJUUyJTlDJTkzJTVEJTIwKDIlMkMlMjAyKSUyMG1hdGNoZXMlMjAoMiUyQyUyMDIpJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwLSU1QiVFMiU5QyU5MyU1RCUyMGFsbCUyMHZhbHVlcyUyMGNsb3NlJTIwKGF0b2wlM0ElMjAxZS0wNSklMEFBbGwlMjBnb29kJTJDJTIwbW9kZWwlMjBzYXZlZCUyMGF0JTNBJTIwb25ueCUyRm1vZGVsLm9ubng=",highlighted:`Validating ONNX model...
        -[✓] ONNX model output names match reference model ({<span class="hljs-string">&#x27;logits&#x27;</span>})
        - Validating ONNX Model output <span class="hljs-string">&quot;logits&quot;</span>:
                -[✓] (2, 2) matches (2, 2)
                -[✓] all values close (atol: 1e-05)
All good, model saved at: onnx/model.onnx`,wrap:!1}}),$=new Oe({props:{$$slots:{default:[Zl]},$$scope:{ctx:T}}}),J=new Oe({props:{$$slots:{default:[Nl]},$$scope:{ctx:T}}}),be=new I({props:{title:"Exportando um modelo para uma arquitetura sem suporte",local:"exportando-um-modelo-para-uma-arquitetura-sem-suporte",headingTag:"h2"}}),he=new I({props:{title:"Implementando uma configuração ONNX personalizada",local:"implementando-uma-configuração-onnx-personalizada",headingTag:"h3"}}),v=new Oe({props:{$$slots:{default:[Il]},$$scope:{ctx:T}}}),Je=new g({props:{code:"ZnJvbSUyMHR5cGluZyUyMGltcG9ydCUyME1hcHBpbmclMkMlMjBPcmRlcmVkRGljdCUwQWZyb20lMjB0cmFuc2Zvcm1lcnMub25ueCUyMGltcG9ydCUyME9ubnhDb25maWclMEElMEElMEFjbGFzcyUyMERpc3RpbEJlcnRPbm54Q29uZmlnKE9ubnhDb25maWcpJTNBJTBBJTIwJTIwJTIwJTIwJTQwcHJvcGVydHklMEElMjAlMjAlMjAlMjBkZWYlMjBpbnB1dHMoc2VsZiklMjAtJTNFJTIwTWFwcGluZyU1QnN0ciUyQyUyME1hcHBpbmclNUJpbnQlMkMlMjBzdHIlNUQlNUQlM0ElMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjByZXR1cm4lMjBPcmRlcmVkRGljdCglMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlNUIlMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAoJTIyaW5wdXRfaWRzJTIyJTJDJTIwJTdCMCUzQSUyMCUyMmJhdGNoJTIyJTJDJTIwMSUzQSUyMCUyMnNlcXVlbmNlJTIyJTdEKSUyQyUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCglMjJhdHRlbnRpb25fbWFzayUyMiUyQyUyMCU3QjAlM0ElMjAlMjJiYXRjaCUyMiUyQyUyMDElM0ElMjAlMjJzZXF1ZW5jZSUyMiU3RCklMkMlMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlNUQlMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> typing <span class="hljs-keyword">import</span> Mapping, OrderedDict
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers.onnx <span class="hljs-keyword">import</span> OnnxConfig


<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">class</span> <span class="hljs-title class_">DistilBertOnnxConfig</span>(<span class="hljs-title class_ inherited__">OnnxConfig</span>):
<span class="hljs-meta">... </span>    @<span class="hljs-built_in">property</span>
<span class="hljs-meta">... </span>    <span class="hljs-keyword">def</span> <span class="hljs-title function_">inputs</span>(<span class="hljs-params">self</span>) -&gt; Mapping[<span class="hljs-built_in">str</span>, Mapping[<span class="hljs-built_in">int</span>, <span class="hljs-built_in">str</span>]]:
<span class="hljs-meta">... </span>        <span class="hljs-keyword">return</span> OrderedDict(
<span class="hljs-meta">... </span>            [
<span class="hljs-meta">... </span>                (<span class="hljs-string">&quot;input_ids&quot;</span>, {<span class="hljs-number">0</span>: <span class="hljs-string">&quot;batch&quot;</span>, <span class="hljs-number">1</span>: <span class="hljs-string">&quot;sequence&quot;</span>}),
<span class="hljs-meta">... </span>                (<span class="hljs-string">&quot;attention_mask&quot;</span>, {<span class="hljs-number">0</span>: <span class="hljs-string">&quot;batch&quot;</span>, <span class="hljs-number">1</span>: <span class="hljs-string">&quot;sequence&quot;</span>}),
<span class="hljs-meta">... </span>            ]
<span class="hljs-meta">... </span>        )`,wrap:!1}}),x=new Oe({props:{$$slots:{default:[kl]},$$scope:{ctx:T}}}),Ze=new g({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Db25maWclMEElMEFjb25maWclMjAlM0QlMjBBdXRvQ29uZmlnLmZyb21fcHJldHJhaW5lZCglMjJkaXN0aWxiZXJ0LWJhc2UtdW5jYXNlZCUyMiklMEFvbm54X2NvbmZpZyUyMCUzRCUyMERpc3RpbEJlcnRPbm54Q29uZmlnKGNvbmZpZyk=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoConfig

<span class="hljs-meta">&gt;&gt;&gt; </span>config = AutoConfig.from_pretrained(<span class="hljs-string">&quot;distilbert-base-uncased&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>onnx_config = DistilBertOnnxConfig(config)`,wrap:!1}}),Ie=new g({props:{code:"cHJpbnQob25ueF9jb25maWcuZGVmYXVsdF9vbm54X29wc2V0KQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">print</span>(onnx_config.default_onnx_opset)
<span class="hljs-number">11</span>`,wrap:!1}}),We=new g({props:{code:"cHJpbnQob25ueF9jb25maWcub3V0cHV0cyk=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">print</span>(onnx_config.outputs)
OrderedDict([(<span class="hljs-string">&quot;last_hidden_state&quot;</span>, {<span class="hljs-number">0</span>: <span class="hljs-string">&quot;batch&quot;</span>, <span class="hljs-number">1</span>: <span class="hljs-string">&quot;sequence&quot;</span>})])`,wrap:!1}}),Be=new g({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Db25maWclMEElMEFjb25maWclMjAlM0QlMjBBdXRvQ29uZmlnLmZyb21fcHJldHJhaW5lZCglMjJkaXN0aWxiZXJ0LWJhc2UtdW5jYXNlZCUyMiklMEFvbm54X2NvbmZpZ19mb3Jfc2VxX2NsZiUyMCUzRCUyMERpc3RpbEJlcnRPbm54Q29uZmlnKGNvbmZpZyUyQyUyMHRhc2slM0QlMjJzZXF1ZW5jZS1jbGFzc2lmaWNhdGlvbiUyMiklMEFwcmludChvbm54X2NvbmZpZ19mb3Jfc2VxX2NsZi5vdXRwdXRzKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoConfig

<span class="hljs-meta">&gt;&gt;&gt; </span>config = AutoConfig.from_pretrained(<span class="hljs-string">&quot;distilbert-base-uncased&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>onnx_config_for_seq_clf = DistilBertOnnxConfig(config, task=<span class="hljs-string">&quot;sequence-classification&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">print</span>(onnx_config_for_seq_clf.outputs)
OrderedDict([(<span class="hljs-string">&#x27;logits&#x27;</span>, {<span class="hljs-number">0</span>: <span class="hljs-string">&#x27;batch&#x27;</span>})])`,wrap:!1}}),Z=new Oe({props:{$$slots:{default:[Wl]},$$scope:{ctx:T}}}),Xe=new I({props:{title:"Exportando um modelo",local:"exportando-um-modelo",headingTag:"h3"}}),_e=new g({props:{code:"ZnJvbSUyMHBhdGhsaWIlMjBpbXBvcnQlMjBQYXRoJTBBZnJvbSUyMHRyYW5zZm9ybWVycy5vbm54JTIwaW1wb3J0JTIwZXhwb3J0JTBBZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBBdXRvTW9kZWwlMEElMEFvbm54X3BhdGglMjAlM0QlMjBQYXRoKCUyMm1vZGVsLm9ubnglMjIpJTBBbW9kZWxfY2twdCUyMCUzRCUyMCUyMmRpc3RpbGJlcnQtYmFzZS11bmNhc2VkJTIyJTBBYmFzZV9tb2RlbCUyMCUzRCUyMEF1dG9Nb2RlbC5mcm9tX3ByZXRyYWluZWQobW9kZWxfY2twdCklMEF0b2tlbml6ZXIlMjAlM0QlMjBBdXRvVG9rZW5pemVyLmZyb21fcHJldHJhaW5lZChtb2RlbF9ja3B0KSUwQSUwQW9ubnhfaW5wdXRzJTJDJTIwb25ueF9vdXRwdXRzJTIwJTNEJTIwZXhwb3J0KHRva2VuaXplciUyQyUyMGJhc2VfbW9kZWwlMkMlMjBvbm54X2NvbmZpZyUyQyUyMG9ubnhfY29uZmlnLmRlZmF1bHRfb25ueF9vcHNldCUyQyUyMG9ubnhfcGF0aCk=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> pathlib <span class="hljs-keyword">import</span> Path
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers.onnx <span class="hljs-keyword">import</span> export
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, AutoModel

<span class="hljs-meta">&gt;&gt;&gt; </span>onnx_path = Path(<span class="hljs-string">&quot;model.onnx&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model_ckpt = <span class="hljs-string">&quot;distilbert-base-uncased&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>base_model = AutoModel.from_pretrained(model_ckpt)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(model_ckpt)

<span class="hljs-meta">&gt;&gt;&gt; </span>onnx_inputs, onnx_outputs = export(tokenizer, base_model, onnx_config, onnx_config.default_onnx_opset, onnx_path)`,wrap:!1}}),qe=new g({props:{code:"aW1wb3J0JTIwb25ueCUwQSUwQW9ubnhfbW9kZWwlMjAlM0QlMjBvbm54LmxvYWQoJTIybW9kZWwub25ueCUyMiklMEFvbm54LmNoZWNrZXIuY2hlY2tfbW9kZWwob25ueF9tb2RlbCk=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> onnx

<span class="hljs-meta">&gt;&gt;&gt; </span>onnx_model = onnx.load(<span class="hljs-string">&quot;model.onnx&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>onnx.checker.check_model(onnx_model)`,wrap:!1}}),N=new Oe({props:{$$slots:{default:[Al]},$$scope:{ctx:T}}}),Ve=new I({props:{title:"Validando a saída dos modelos",local:"validando-a-saída-dos-modelos",headingTag:"h3"}}),He=new g({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycy5vbm54JTIwaW1wb3J0JTIwdmFsaWRhdGVfbW9kZWxfb3V0cHV0cyUwQSUwQXZhbGlkYXRlX21vZGVsX291dHB1dHMoJTBBJTIwJTIwJTIwJTIwb25ueF9jb25maWclMkMlMjB0b2tlbml6ZXIlMkMlMjBiYXNlX21vZGVsJTJDJTIwb25ueF9wYXRoJTJDJTIwb25ueF9vdXRwdXRzJTJDJTIwb25ueF9jb25maWcuYXRvbF9mb3JfdmFsaWRhdGlvbiUwQSk=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers.onnx <span class="hljs-keyword">import</span> validate_model_outputs

<span class="hljs-meta">&gt;&gt;&gt; </span>validate_model_outputs(
<span class="hljs-meta">... </span>    onnx_config, tokenizer, base_model, onnx_path, onnx_outputs, onnx_config.atol_for_validation
<span class="hljs-meta">... </span>)`,wrap:!1}}),ze=new I({props:{title:"Contribuindo com uma nova configuração para 🤗 Transformers",local:"contribuindo-com-uma-nova-configuração-para--transformers",headingTag:"h2"}}),{c(){n=i("meta"),j=a(),m=i("p"),b=a(),d(U.$$.fragment),w=a(),h=i("p"),h.innerHTML=Cs,De=a(),d(C.$$.fragment),Ke=a(),k=i("p"),k.innerHTML=$s,et=a(),W=i("p"),W.textContent=Js,tt=a(),A=i("p"),A.innerHTML=vs,st=a(),B=i("p"),B.textContent=xs,lt=a(),X=i("ul"),X.innerHTML=Zs,at=a(),R=i("p"),R.textContent=Ns,ot=a(),_=i("ul"),_.innerHTML=Is,nt=a(),d(G.$$.fragment),it=a(),q=i("p"),q.textContent=ks,rt=a(),d(V.$$.fragment),pt=a(),E=i("p"),E.innerHTML=Ws,mt=a(),d(H.$$.fragment),dt=a(),L=i("p"),L.textContent=As,ct=a(),d(z.$$.fragment),ut=a(),F=i("p"),F.textContent=Bs,Mt=a(),d(Q.$$.fragment),ft=a(),Y=i("p"),Y.innerHTML=Xs,yt=a(),O=i("p"),O.innerHTML=Rs,jt=a(),d(P.$$.fragment),bt=a(),S=i("p"),S.innerHTML=_s,gt=a(),d(D.$$.fragment),Tt=a(),K=i("p"),K.innerHTML=Gs,wt=a(),d(ee.$$.fragment),ht=a(),te=i("p"),te.textContent=qs,Ut=a(),d(se.$$.fragment),Ct=a(),le=i("p"),le.innerHTML=Vs,$t=a(),d(ae.$$.fragment),Jt=a(),d(oe.$$.fragment),vt=a(),ne=i("p"),ne.innerHTML=Es,xt=a(),d(ie.$$.fragment),Zt=a(),d(re.$$.fragment),Nt=a(),pe=i("p"),pe.innerHTML=Hs,It=a(),me=i("table"),me.innerHTML=Ls,kt=a(),de=i("p"),de.innerHTML=zs,Wt=a(),d(ce.$$.fragment),At=a(),ue=i("p"),ue.innerHTML=Fs,Bt=a(),d(Me.$$.fragment),Xt=a(),fe=i("p"),fe.textContent=Qs,Rt=a(),d(ye.$$.fragment),_t=a(),je=i("p"),je.innerHTML=Ys,Gt=a(),d($.$$.fragment),qt=a(),d(J.$$.fragment),Vt=a(),d(be.$$.fragment),Et=a(),ge=i("p"),ge.textContent=Os,Ht=a(),Te=i("ol"),Te.innerHTML=Ps,Lt=a(),we=i("p"),we.textContent=Ss,zt=a(),d(he.$$.fragment),Ft=a(),Ue=i("p"),Ue.textContent=Ds,Qt=a(),Ce=i("ul"),Ce.innerHTML=Ks,Yt=a(),d(v.$$.fragment),Ot=a(),$e=i("p"),$e.innerHTML=el,Pt=a(),d(Je.$$.fragment),St=a(),ve=i("p"),ve.innerHTML=tl,Dt=a(),d(x.$$.fragment),Kt=a(),xe=i("p"),xe.textContent=sl,es=a(),d(Ze.$$.fragment),ts=a(),Ne=i("p"),Ne.textContent=ll,ss=a(),d(Ie.$$.fragment),ls=a(),ke=i("p"),ke.textContent=al,as=a(),d(We.$$.fragment),os=a(),Ae=i("p"),Ae.innerHTML=ol,ns=a(),d(Be.$$.fragment),is=a(),d(Z.$$.fragment),rs=a(),d(Xe.$$.fragment),ps=a(),Re=i("p"),Re.innerHTML=nl,ms=a(),d(_e.$$.fragment),ds=a(),Ge=i("p"),Ge.innerHTML=il,cs=a(),d(qe.$$.fragment),us=a(),d(N.$$.fragment),Ms=a(),d(Ve.$$.fragment),fs=a(),Ee=i("p"),Ee.innerHTML=rl,ys=a(),d(He.$$.fragment),js=a(),Le=i("p"),Le.innerHTML=pl,bs=a(),d(ze.$$.fragment),gs=a(),Fe=i("p"),Fe.textContent=ml,Ts=a(),Qe=i("ul"),Qe.innerHTML=dl,ws=a(),Ye=i("p"),Ye.innerHTML=cl,hs=a(),Se=i("p"),this.h()},l(e){const t=Jl("svelte-u9bgzb",document.head);n=r(t,"META",{name:!0,content:!0}),t.forEach(s),j=o(e),m=r(e,"P",{}),Tl(m).forEach(s),b=o(e),c(U.$$.fragment,e),w=o(e),h=r(e,"P",{"data-svelte-h":!0}),p(h)!=="svelte-780rag"&&(h.innerHTML=Cs),De=o(e),c(C.$$.fragment,e),Ke=o(e),k=r(e,"P",{"data-svelte-h":!0}),p(k)!=="svelte-kzaz5b"&&(k.innerHTML=$s),et=o(e),W=r(e,"P",{"data-svelte-h":!0}),p(W)!=="svelte-187fdkg"&&(W.textContent=Js),tt=o(e),A=r(e,"P",{"data-svelte-h":!0}),p(A)!=="svelte-18aznvk"&&(A.innerHTML=vs),st=o(e),B=r(e,"P",{"data-svelte-h":!0}),p(B)!=="svelte-g9dkld"&&(B.textContent=xs),lt=o(e),X=r(e,"UL",{"data-svelte-h":!0}),p(X)!=="svelte-hlbcru"&&(X.innerHTML=Zs),at=o(e),R=r(e,"P",{"data-svelte-h":!0}),p(R)!=="svelte-1um2ugk"&&(R.textContent=Ns),ot=o(e),_=r(e,"UL",{"data-svelte-h":!0}),p(_)!=="svelte-8ygt46"&&(_.innerHTML=Is),nt=o(e),c(G.$$.fragment,e),it=o(e),q=r(e,"P",{"data-svelte-h":!0}),p(q)!=="svelte-ldfupz"&&(q.textContent=ks),rt=o(e),c(V.$$.fragment,e),pt=o(e),E=r(e,"P",{"data-svelte-h":!0}),p(E)!=="svelte-unqqru"&&(E.innerHTML=Ws),mt=o(e),c(H.$$.fragment,e),dt=o(e),L=r(e,"P",{"data-svelte-h":!0}),p(L)!=="svelte-6uusn"&&(L.textContent=As),ct=o(e),c(z.$$.fragment,e),ut=o(e),F=r(e,"P",{"data-svelte-h":!0}),p(F)!=="svelte-1urlk3h"&&(F.textContent=Bs),Mt=o(e),c(Q.$$.fragment,e),ft=o(e),Y=r(e,"P",{"data-svelte-h":!0}),p(Y)!=="svelte-tuenxb"&&(Y.innerHTML=Xs),yt=o(e),O=r(e,"P",{"data-svelte-h":!0}),p(O)!=="svelte-11ias89"&&(O.innerHTML=Rs),jt=o(e),c(P.$$.fragment,e),bt=o(e),S=r(e,"P",{"data-svelte-h":!0}),p(S)!=="svelte-ehimya"&&(S.innerHTML=_s),gt=o(e),c(D.$$.fragment,e),Tt=o(e),K=r(e,"P",{"data-svelte-h":!0}),p(K)!=="svelte-1iginlu"&&(K.innerHTML=Gs),wt=o(e),c(ee.$$.fragment,e),ht=o(e),te=r(e,"P",{"data-svelte-h":!0}),p(te)!=="svelte-12w4y7b"&&(te.textContent=qs),Ut=o(e),c(se.$$.fragment,e),Ct=o(e),le=r(e,"P",{"data-svelte-h":!0}),p(le)!=="svelte-1hwlhij"&&(le.innerHTML=Vs),$t=o(e),c(ae.$$.fragment,e),Jt=o(e),c(oe.$$.fragment,e),vt=o(e),ne=r(e,"P",{"data-svelte-h":!0}),p(ne)!=="svelte-1hwlhij"&&(ne.innerHTML=Es),xt=o(e),c(ie.$$.fragment,e),Zt=o(e),c(re.$$.fragment,e),Nt=o(e),pe=r(e,"P",{"data-svelte-h":!0}),p(pe)!=="svelte-au9t2"&&(pe.innerHTML=Hs),It=o(e),me=r(e,"TABLE",{"data-svelte-h":!0}),p(me)!=="svelte-19g4mid"&&(me.innerHTML=Ls),kt=o(e),de=r(e,"P",{"data-svelte-h":!0}),p(de)!=="svelte-67rlav"&&(de.innerHTML=zs),Wt=o(e),c(ce.$$.fragment,e),At=o(e),ue=r(e,"P",{"data-svelte-h":!0}),p(ue)!=="svelte-zfw7vl"&&(ue.innerHTML=Fs),Bt=o(e),c(Me.$$.fragment,e),Xt=o(e),fe=r(e,"P",{"data-svelte-h":!0}),p(fe)!=="svelte-1qh1xkx"&&(fe.textContent=Qs),Rt=o(e),c(ye.$$.fragment,e),_t=o(e),je=r(e,"P",{"data-svelte-h":!0}),p(je)!=="svelte-14du68y"&&(je.innerHTML=Ys),Gt=o(e),c($.$$.fragment,e),qt=o(e),c(J.$$.fragment,e),Vt=o(e),c(be.$$.fragment,e),Et=o(e),ge=r(e,"P",{"data-svelte-h":!0}),p(ge)!=="svelte-srdmc5"&&(ge.textContent=Os),Ht=o(e),Te=r(e,"OL",{"data-svelte-h":!0}),p(Te)!=="svelte-119emik"&&(Te.innerHTML=Ps),Lt=o(e),we=r(e,"P",{"data-svelte-h":!0}),p(we)!=="svelte-1tntr09"&&(we.textContent=Ss),zt=o(e),c(he.$$.fragment,e),Ft=o(e),Ue=r(e,"P",{"data-svelte-h":!0}),p(Ue)!=="svelte-1yke088"&&(Ue.textContent=Ds),Qt=o(e),Ce=r(e,"UL",{"data-svelte-h":!0}),p(Ce)!=="svelte-16srizl"&&(Ce.innerHTML=Ks),Yt=o(e),c(v.$$.fragment,e),Ot=o(e),$e=r(e,"P",{"data-svelte-h":!0}),p($e)!=="svelte-1w3ieqz"&&($e.innerHTML=el),Pt=o(e),c(Je.$$.fragment,e),St=o(e),ve=r(e,"P",{"data-svelte-h":!0}),p(ve)!=="svelte-1dcv64l"&&(ve.innerHTML=tl),Dt=o(e),c(x.$$.fragment,e),Kt=o(e),xe=r(e,"P",{"data-svelte-h":!0}),p(xe)!=="svelte-1xs5c3l"&&(xe.textContent=sl),es=o(e),c(Ze.$$.fragment,e),ts=o(e),Ne=r(e,"P",{"data-svelte-h":!0}),p(Ne)!=="svelte-conxji"&&(Ne.textContent=ll),ss=o(e),c(Ie.$$.fragment,e),ls=o(e),ke=r(e,"P",{"data-svelte-h":!0}),p(ke)!=="svelte-1gla57i"&&(ke.textContent=al),as=o(e),c(We.$$.fragment,e),os=o(e),Ae=r(e,"P",{"data-svelte-h":!0}),p(Ae)!=="svelte-eqvgnl"&&(Ae.innerHTML=ol),ns=o(e),c(Be.$$.fragment,e),is=o(e),c(Z.$$.fragment,e),rs=o(e),c(Xe.$$.fragment,e),ps=o(e),Re=r(e,"P",{"data-svelte-h":!0}),p(Re)!=="svelte-scf0rn"&&(Re.innerHTML=nl),ms=o(e),c(_e.$$.fragment,e),ds=o(e),Ge=r(e,"P",{"data-svelte-h":!0}),p(Ge)!=="svelte-1clqbx4"&&(Ge.innerHTML=il),cs=o(e),c(qe.$$.fragment,e),us=o(e),c(N.$$.fragment,e),Ms=o(e),c(Ve.$$.fragment,e),fs=o(e),Ee=r(e,"P",{"data-svelte-h":!0}),p(Ee)!=="svelte-1fom1t1"&&(Ee.innerHTML=rl),ys=o(e),c(He.$$.fragment,e),js=o(e),Le=r(e,"P",{"data-svelte-h":!0}),p(Le)!=="svelte-1w48q5s"&&(Le.innerHTML=pl),bs=o(e),c(ze.$$.fragment,e),gs=o(e),Fe=r(e,"P",{"data-svelte-h":!0}),p(Fe)!=="svelte-nik27b"&&(Fe.textContent=ml),Ts=o(e),Qe=r(e,"UL",{"data-svelte-h":!0}),p(Qe)!=="svelte-aqybbn"&&(Qe.innerHTML=dl),ws=o(e),Ye=r(e,"P",{"data-svelte-h":!0}),p(Ye)!=="svelte-1uvyz3f"&&(Ye.innerHTML=cl),hs=o(e),Se=r(e,"P",{}),Tl(Se).forEach(s),this.h()},h(){wl(n,"name","hf:doc:metadata"),wl(n,"content",Xl)},m(e,t){vl(document.head,n),l(e,j,t),l(e,m,t),l(e,b,t),u(U,e,t),l(e,w,t),l(e,h,t),l(e,De,t),u(C,e,t),l(e,Ke,t),l(e,k,t),l(e,et,t),l(e,W,t),l(e,tt,t),l(e,A,t),l(e,st,t),l(e,B,t),l(e,lt,t),l(e,X,t),l(e,at,t),l(e,R,t),l(e,ot,t),l(e,_,t),l(e,nt,t),u(G,e,t),l(e,it,t),l(e,q,t),l(e,rt,t),u(V,e,t),l(e,pt,t),l(e,E,t),l(e,mt,t),u(H,e,t),l(e,dt,t),l(e,L,t),l(e,ct,t),u(z,e,t),l(e,ut,t),l(e,F,t),l(e,Mt,t),u(Q,e,t),l(e,ft,t),l(e,Y,t),l(e,yt,t),l(e,O,t),l(e,jt,t),u(P,e,t),l(e,bt,t),l(e,S,t),l(e,gt,t),u(D,e,t),l(e,Tt,t),l(e,K,t),l(e,wt,t),u(ee,e,t),l(e,ht,t),l(e,te,t),l(e,Ut,t),u(se,e,t),l(e,Ct,t),l(e,le,t),l(e,$t,t),u(ae,e,t),l(e,Jt,t),u(oe,e,t),l(e,vt,t),l(e,ne,t),l(e,xt,t),u(ie,e,t),l(e,Zt,t),u(re,e,t),l(e,Nt,t),l(e,pe,t),l(e,It,t),l(e,me,t),l(e,kt,t),l(e,de,t),l(e,Wt,t),u(ce,e,t),l(e,At,t),l(e,ue,t),l(e,Bt,t),u(Me,e,t),l(e,Xt,t),l(e,fe,t),l(e,Rt,t),u(ye,e,t),l(e,_t,t),l(e,je,t),l(e,Gt,t),u($,e,t),l(e,qt,t),u(J,e,t),l(e,Vt,t),u(be,e,t),l(e,Et,t),l(e,ge,t),l(e,Ht,t),l(e,Te,t),l(e,Lt,t),l(e,we,t),l(e,zt,t),u(he,e,t),l(e,Ft,t),l(e,Ue,t),l(e,Qt,t),l(e,Ce,t),l(e,Yt,t),u(v,e,t),l(e,Ot,t),l(e,$e,t),l(e,Pt,t),u(Je,e,t),l(e,St,t),l(e,ve,t),l(e,Dt,t),u(x,e,t),l(e,Kt,t),l(e,xe,t),l(e,es,t),u(Ze,e,t),l(e,ts,t),l(e,Ne,t),l(e,ss,t),u(Ie,e,t),l(e,ls,t),l(e,ke,t),l(e,as,t),u(We,e,t),l(e,os,t),l(e,Ae,t),l(e,ns,t),u(Be,e,t),l(e,is,t),u(Z,e,t),l(e,rs,t),u(Xe,e,t),l(e,ps,t),l(e,Re,t),l(e,ms,t),u(_e,e,t),l(e,ds,t),l(e,Ge,t),l(e,cs,t),u(qe,e,t),l(e,us,t),u(N,e,t),l(e,Ms,t),u(Ve,e,t),l(e,fs,t),l(e,Ee,t),l(e,ys,t),u(He,e,t),l(e,js,t),l(e,Le,t),l(e,bs,t),u(ze,e,t),l(e,gs,t),l(e,Fe,t),l(e,Ts,t),l(e,Qe,t),l(e,ws,t),l(e,Ye,t),l(e,hs,t),l(e,Se,t),Us=!0},p(e,[t]){const ul={};t&2&&(ul.$$scope={dirty:t,ctx:e}),C.$set(ul);const Ml={};t&2&&(Ml.$$scope={dirty:t,ctx:e}),$.$set(Ml);const fl={};t&2&&(fl.$$scope={dirty:t,ctx:e}),J.$set(fl);const yl={};t&2&&(yl.$$scope={dirty:t,ctx:e}),v.$set(yl);const jl={};t&2&&(jl.$$scope={dirty:t,ctx:e}),x.$set(jl);const bl={};t&2&&(bl.$$scope={dirty:t,ctx:e}),Z.$set(bl);const gl={};t&2&&(gl.$$scope={dirty:t,ctx:e}),N.$set(gl)},i(e){Us||(M(U.$$.fragment,e),M(C.$$.fragment,e),M(G.$$.fragment,e),M(V.$$.fragment,e),M(H.$$.fragment,e),M(z.$$.fragment,e),M(Q.$$.fragment,e),M(P.$$.fragment,e),M(D.$$.fragment,e),M(ee.$$.fragment,e),M(se.$$.fragment,e),M(ae.$$.fragment,e),M(oe.$$.fragment,e),M(ie.$$.fragment,e),M(re.$$.fragment,e),M(ce.$$.fragment,e),M(Me.$$.fragment,e),M(ye.$$.fragment,e),M($.$$.fragment,e),M(J.$$.fragment,e),M(be.$$.fragment,e),M(he.$$.fragment,e),M(v.$$.fragment,e),M(Je.$$.fragment,e),M(x.$$.fragment,e),M(Ze.$$.fragment,e),M(Ie.$$.fragment,e),M(We.$$.fragment,e),M(Be.$$.fragment,e),M(Z.$$.fragment,e),M(Xe.$$.fragment,e),M(_e.$$.fragment,e),M(qe.$$.fragment,e),M(N.$$.fragment,e),M(Ve.$$.fragment,e),M(He.$$.fragment,e),M(ze.$$.fragment,e),Us=!0)},o(e){f(U.$$.fragment,e),f(C.$$.fragment,e),f(G.$$.fragment,e),f(V.$$.fragment,e),f(H.$$.fragment,e),f(z.$$.fragment,e),f(Q.$$.fragment,e),f(P.$$.fragment,e),f(D.$$.fragment,e),f(ee.$$.fragment,e),f(se.$$.fragment,e),f(ae.$$.fragment,e),f(oe.$$.fragment,e),f(ie.$$.fragment,e),f(re.$$.fragment,e),f(ce.$$.fragment,e),f(Me.$$.fragment,e),f(ye.$$.fragment,e),f($.$$.fragment,e),f(J.$$.fragment,e),f(be.$$.fragment,e),f(he.$$.fragment,e),f(v.$$.fragment,e),f(Je.$$.fragment,e),f(x.$$.fragment,e),f(Ze.$$.fragment,e),f(Ie.$$.fragment,e),f(We.$$.fragment,e),f(Be.$$.fragment,e),f(Z.$$.fragment,e),f(Xe.$$.fragment,e),f(_e.$$.fragment,e),f(qe.$$.fragment,e),f(N.$$.fragment,e),f(Ve.$$.fragment,e),f(He.$$.fragment,e),f(ze.$$.fragment,e),Us=!1},d(e){e&&(s(j),s(m),s(b),s(w),s(h),s(De),s(Ke),s(k),s(et),s(W),s(tt),s(A),s(st),s(B),s(lt),s(X),s(at),s(R),s(ot),s(_),s(nt),s(it),s(q),s(rt),s(pt),s(E),s(mt),s(dt),s(L),s(ct),s(ut),s(F),s(Mt),s(ft),s(Y),s(yt),s(O),s(jt),s(bt),s(S),s(gt),s(Tt),s(K),s(wt),s(ht),s(te),s(Ut),s(Ct),s(le),s($t),s(Jt),s(vt),s(ne),s(xt),s(Zt),s(Nt),s(pe),s(It),s(me),s(kt),s(de),s(Wt),s(At),s(ue),s(Bt),s(Xt),s(fe),s(Rt),s(_t),s(je),s(Gt),s(qt),s(Vt),s(Et),s(ge),s(Ht),s(Te),s(Lt),s(we),s(zt),s(Ft),s(Ue),s(Qt),s(Ce),s(Yt),s(Ot),s($e),s(Pt),s(St),s(ve),s(Dt),s(Kt),s(xe),s(es),s(ts),s(Ne),s(ss),s(ls),s(ke),s(as),s(os),s(Ae),s(ns),s(is),s(rs),s(ps),s(Re),s(ms),s(ds),s(Ge),s(cs),s(us),s(Ms),s(fs),s(Ee),s(ys),s(js),s(Le),s(bs),s(gs),s(Fe),s(Ts),s(Qe),s(ws),s(Ye),s(hs),s(Se)),s(n),y(U,e),y(C,e),y(G,e),y(V,e),y(H,e),y(z,e),y(Q,e),y(P,e),y(D,e),y(ee,e),y(se,e),y(ae,e),y(oe,e),y(ie,e),y(re,e),y(ce,e),y(Me,e),y(ye,e),y($,e),y(J,e),y(be,e),y(he,e),y(v,e),y(Je,e),y(x,e),y(Ze,e),y(Ie,e),y(We,e),y(Be,e),y(Z,e),y(Xe,e),y(_e,e),y(qe,e),y(N,e),y(Ve,e),y(He,e),y(ze,e)}}}const Xl='{"title":"Exportando modelos para ONNX","local":"exportando-modelos-para-onnx","sections":[{"title":"Exportando um modelo para ONNX","local":"exportando-um-modelo-para-onnx","sections":[],"depth":2},{"title":"Selecionando features para diferentes tarefas do modelo","local":"selecionando-features-para-diferentes-tarefas-do-modelo","sections":[],"depth":2},{"title":"Exportando um modelo para uma arquitetura sem suporte","local":"exportando-um-modelo-para-uma-arquitetura-sem-suporte","sections":[{"title":"Implementando uma configuração ONNX personalizada","local":"implementando-uma-configuração-onnx-personalizada","sections":[],"depth":3},{"title":"Exportando um modelo","local":"exportando-um-modelo","sections":[],"depth":3},{"title":"Validando a saída dos modelos","local":"validando-a-saída-dos-modelos","sections":[],"depth":3}],"depth":2},{"title":"Contribuindo com uma nova configuração para 🤗 Transformers","local":"contribuindo-com-uma-nova-configuração-para--transformers","sections":[],"depth":2}],"depth":1}';function Rl(T){return Ul(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Hl extends Cl{constructor(n){super(),$l(this,n,Rl,Bl,hl,{})}}export{Hl as component};
