<meta charset="utf-8" /><meta http-equiv="content-security-policy" content=""><meta name="hf:doc:metadata" content="{&quot;local&quot;:&quot;questionrio-de-fim-de-captulo&quot;,&quot;title&quot;:&quot;Questionário de fim de capítulo&quot;}" data-svelte="svelte-1phssyn">
	<link rel="modulepreload" href="/docs/course/pr_92/pt/_app/assets/pages/__layout.svelte-048423b6.css">
	<link rel="modulepreload" href="/docs/course/pr_92/pt/_app/start-2da76e23.js">
	<link rel="modulepreload" href="/docs/course/pr_92/pt/_app/chunks/vendor-e6c5d93e.js">
	<link rel="modulepreload" href="/docs/course/pr_92/pt/_app/chunks/paths-4b3c6e7e.js">
	<link rel="modulepreload" href="/docs/course/pr_92/pt/_app/pages/__layout.svelte-20ef27ff.js">
	<link rel="modulepreload" href="/docs/course/pr_92/pt/_app/pages/chapter2/8.mdx-f26dc1c3.js">
	<link rel="modulepreload" href="/docs/course/pr_92/pt/_app/chunks/IconCopyLink-7b8d27fe.js">
	<link rel="modulepreload" href="/docs/course/pr_92/pt/_app/chunks/CodeBlock-37867453.js">
	<link rel="modulepreload" href="/docs/course/pr_92/pt/_app/chunks/FrameworkSwitchCourse-ab838f47.js"> 





<div class="bg-white leading-none border border-gray-100 rounded-lg flex p-0.5 w-56 text-sm mb-4"><a class="flex justify-center flex-1 py-1.5 px-2.5 focus:outline-none !no-underline rounded-l bg-red-50 dark:bg-transparent text-red-600" href="?fw=pt"><svg class="mr-1.5" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><defs><clipPath id="a"><rect x="3.05" y="0.5" width="25.73" height="31" fill="none"></rect></clipPath></defs><g clip-path="url(#a)"><path d="M24.94,9.51a12.81,12.81,0,0,1,0,18.16,12.68,12.68,0,0,1-18,0,12.81,12.81,0,0,1,0-18.16l9-9V5l-.84.83-6,6a9.58,9.58,0,1,0,13.55,0ZM20.44,9a1.68,1.68,0,1,1,1.67-1.67A1.68,1.68,0,0,1,20.44,9Z" fill="#ee4c2c"></path></g></svg>
			Pytorch
		</a><a class="flex justify-center flex-1 py-1.5 px-2.5 focus:outline-none !no-underline rounded-r text-gray-500 filter grayscale" href="?fw=tf"><svg class="mr-1.5" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" focusable="false" role="img" width="0.94em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 274"><path d="M145.726 42.065v42.07l72.861 42.07v-42.07l-72.86-42.07zM0 84.135v42.07l36.43 21.03V105.17L0 84.135zm109.291 21.035l-36.43 21.034v126.2l36.43 21.035v-84.135l36.435 21.035v-42.07l-36.435-21.034V105.17z" fill="#E55B2D"></path><path d="M145.726 42.065L36.43 105.17v42.065l72.861-42.065v42.065l36.435-21.03v-84.14zM255.022 63.1l-36.435 21.035v42.07l36.435-21.035V63.1zm-72.865 84.135l-36.43 21.035v42.07l36.43-21.036v-42.07zm-36.43 63.104l-36.436-21.035v84.135l36.435-21.035V210.34z" fill="#ED8E24"></path><path d="M145.726 0L0 84.135l36.43 21.035l109.296-63.105l72.861 42.07L255.022 63.1L145.726 0zm0 126.204l-36.435 21.03l36.435 21.036l36.43-21.035l-36.43-21.03z" fill="#F8BF3C"></path></svg>
			TensorFlow
		</a></div>

<h1 class="relative group"><a id="questionrio-de-fim-de-captulo" 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" href="#questionrio-de-fim-de-captulo"><span><svg class="" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z" fill="currentColor"></path></svg></span></a>
	<span>Questionário de fim de capítulo
	</span></h1>

<h3 class="relative group"><a id="1.-qual-é-a-ordem-do-pipeline-para-a-modelagem-de-linguagem?" 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" href="#1.-qual-é-a-ordem-do-pipeline-para-a-modelagem-de-linguagem?"><span><svg class="" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z" fill="currentColor"></path></svg></span></a>
	<span>1. Qual é a ordem do pipeline para a modelagem de linguagem?
	</span></h3>

<div><form><label class="block"><input autocomplete="off" class="form-input -mt-1.5 mr-2" name="choice" type="checkbox" value="0">
				<!-- HTML_TAG_START -->Primeiro, o modelo trata de textos e devolve previsões em bruto. O tokenizer, então, trás sentido a estas previsões e as converte de volta ao texto quando necessário.<!-- HTML_TAG_END --></label>
			<label class="block"><input autocomplete="off" class="form-input -mt-1.5 mr-2" name="choice" type="checkbox" value="1">
				<!-- HTML_TAG_START -->Primeiro, o tokenizer trata de textos e devolve as identificações (IDs). O modelo lida com estas identificações e produz uma predição, que pode ser algum texto.<!-- HTML_TAG_END --></label>
			<label class="block"><input autocomplete="off" class="form-input -mt-1.5 mr-2" name="choice" type="checkbox" value="2">
				<!-- HTML_TAG_START -->O tokenizer trata de textos e devolve os IDs. O modelo lida com estes IDs e produz uma predição. O tokenizer pode então ser usado mais uma vez para converter estas previsões de volta para algum texto.<!-- HTML_TAG_END --></label>
			
		<div class="flex flex-row items-center mt-3"><button class="btn px-4 mr-4" type="submit" disabled>Submit </button>

			</div></form></div>
<h3 class="relative group"><a id="2.-quantas-dimensões-tem-o-tensor-do-transformer-de-base,-e-quais-são-elas?" 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" href="#2.-quantas-dimensões-tem-o-tensor-do-transformer-de-base,-e-quais-são-elas?"><span><svg class="" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z" fill="currentColor"></path></svg></span></a>
	<span>2. Quantas dimensões tem o tensor do Transformer de base, e quais são elas?
	</span></h3>

<div><form><label class="block"><input autocomplete="off" class="form-input -mt-1.5 mr-2" name="choice" type="checkbox" value="0">
				<!-- HTML_TAG_START -->2: O comprimento da sequência e o tamanho do batch (lote)<!-- HTML_TAG_END --></label>
			<label class="block"><input autocomplete="off" class="form-input -mt-1.5 mr-2" name="choice" type="checkbox" value="1">
				<!-- HTML_TAG_START -->2: O comprimento da sequência e o tamanho das camadas ocultas<!-- HTML_TAG_END --></label>
			<label class="block"><input autocomplete="off" class="form-input -mt-1.5 mr-2" name="choice" type="checkbox" value="2">
				<!-- HTML_TAG_START -->3: O comprimento da sequência, o tamanho do batch (lote) e o tamanho das camadas ocultas<!-- HTML_TAG_END --></label>
			
		<div class="flex flex-row items-center mt-3"><button class="btn px-4 mr-4" type="submit" disabled>Submit </button>

			</div></form></div>
<h3 class="relative group"><a id="3.-qual-dos-seguintes-é-um-exemplo-de-tokenização-por-sub-palavras?" 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" href="#3.-qual-dos-seguintes-é-um-exemplo-de-tokenização-por-sub-palavras?"><span><svg class="" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z" fill="currentColor"></path></svg></span></a>
	<span>3. Qual dos seguintes é um exemplo de Tokenização por sub-palavras?
	</span></h3>

<div><form><label class="block"><input autocomplete="off" class="form-input -mt-1.5 mr-2" name="choice" type="checkbox" value="0">
				<!-- HTML_TAG_START -->WordPiece<!-- HTML_TAG_END --></label>
			<label class="block"><input autocomplete="off" class="form-input -mt-1.5 mr-2" name="choice" type="checkbox" value="1">
				<!-- HTML_TAG_START -->Character-based tokenization<!-- HTML_TAG_END --></label>
			<label class="block"><input autocomplete="off" class="form-input -mt-1.5 mr-2" name="choice" type="checkbox" value="2">
				<!-- HTML_TAG_START -->Divisão no espaço em branco e pontuação<!-- HTML_TAG_END --></label>
			<label class="block"><input autocomplete="off" class="form-input -mt-1.5 mr-2" name="choice" type="checkbox" value="3">
				<!-- HTML_TAG_START -->BPE<!-- HTML_TAG_END --></label>
			<label class="block"><input autocomplete="off" class="form-input -mt-1.5 mr-2" name="choice" type="checkbox" value="4">
				<!-- HTML_TAG_START -->Unigram<!-- HTML_TAG_END --></label>
			<label class="block"><input autocomplete="off" class="form-input -mt-1.5 mr-2" name="choice" type="checkbox" value="5">
				<!-- HTML_TAG_START -->Nenhuma das acimas<!-- HTML_TAG_END --></label>
			
		<div class="flex flex-row items-center mt-3"><button class="btn px-4 mr-4" type="submit" disabled>Submit </button>

			</div></form></div>
<h3 class="relative group"><a id="4.-o-que-é-uma-<em>model-head</em>?" 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" href="#4.-o-que-é-uma-<em>model-head</em>?"><span><svg class="" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z" fill="currentColor"></path></svg></span></a>
	<span>4. O que é uma <em>model head</em>?
	</span></h3>

<div><form><label class="block"><input autocomplete="off" class="form-input -mt-1.5 mr-2" name="choice" type="checkbox" value="0">
				<!-- HTML_TAG_START -->Um componente dos transformers de base que redireciona os tensores para suas camadas corretas<!-- HTML_TAG_END --></label>
			<label class="block"><input autocomplete="off" class="form-input -mt-1.5 mr-2" name="choice" type="checkbox" value="1">
				<!-- HTML_TAG_START -->Também conhecido como mecanismo de auto-atenção (*self-attention*), ele adapta a representação de um símbolo de acordo com os outros tokens da sequência<!-- HTML_TAG_END --></label>
			<label class="block"><input autocomplete="off" class="form-input -mt-1.5 mr-2" name="choice" type="checkbox" value="2">
				<!-- HTML_TAG_START -->Um componente adicional, geralmente composto de uma ou poucas camadas, para converter as previsões do Transformer em uma saída específica de tarefa<!-- HTML_TAG_END --></label>
			
		<div class="flex flex-row items-center mt-3"><button class="btn px-4 mr-4" type="submit" disabled>Submit </button>

			</div></form></div>
<h3 class="relative group"><a id="5.-o-que-seria-um-<code>automodel</code>?" 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" href="#5.-o-que-seria-um-<code>automodel</code>?"><span><svg class="" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z" fill="currentColor"></path></svg></span></a>
	<span>5. O que seria um <code>AutoModel</code>?
	</span></h3>

<div><form><label class="block"><input autocomplete="off" class="form-input -mt-1.5 mr-2" name="choice" type="checkbox" value="0">
				<!-- HTML_TAG_START -->Um modelo que treina automaticamente com seus dados<!-- HTML_TAG_END --></label>
			<label class="block"><input autocomplete="off" class="form-input -mt-1.5 mr-2" name="choice" type="checkbox" value="1">
				<!-- HTML_TAG_START -->Um objeto que devolve a arquitetura correta com base em um checkpoint<!-- HTML_TAG_END --></label>
			<label class="block"><input autocomplete="off" class="form-input -mt-1.5 mr-2" name="choice" type="checkbox" value="2">
				<!-- HTML_TAG_START -->Um modelo que detecta automaticamente a linguagem utilizada para suas entradas a fim de carregar os pesos corretos<!-- HTML_TAG_END --></label>
			
		<div class="flex flex-row items-center mt-3"><button class="btn px-4 mr-4" type="submit" disabled>Submit </button>

			</div></form></div>
<h3 class="relative group"><a id="6.-quais-são-as-técnicas-a-serem-observadas-quando-realizar-batches-com-sequências-de-diferentes-tamanhos?" 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" href="#6.-quais-são-as-técnicas-a-serem-observadas-quando-realizar-batches-com-sequências-de-diferentes-tamanhos?"><span><svg class="" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z" fill="currentColor"></path></svg></span></a>
	<span>6. Quais são as técnicas a serem observadas quando realizar batches com sequências de diferentes tamanhos?
	</span></h3>

<div><form><label class="block"><input autocomplete="off" class="form-input -mt-1.5 mr-2" name="choice" type="checkbox" value="0">
				<!-- HTML_TAG_START -->Truncar<!-- HTML_TAG_END --></label>
			<label class="block"><input autocomplete="off" class="form-input -mt-1.5 mr-2" name="choice" type="checkbox" value="1">
				<!-- HTML_TAG_START -->Retornar tensores<!-- HTML_TAG_END --></label>
			<label class="block"><input autocomplete="off" class="form-input -mt-1.5 mr-2" name="choice" type="checkbox" value="2">
				<!-- HTML_TAG_START -->Padding<!-- HTML_TAG_END --></label>
			<label class="block"><input autocomplete="off" class="form-input -mt-1.5 mr-2" name="choice" type="checkbox" value="3">
				<!-- HTML_TAG_START -->Attention masking<!-- HTML_TAG_END --></label>
			
		<div class="flex flex-row items-center mt-3"><button class="btn px-4 mr-4" type="submit" disabled>Submit </button>

			</div></form></div>
<h3 class="relative group"><a id="7.-qual-é-o-objetivo-de-aplicar-uma-função-softmax-à-saída-de-logits-para-um-modelo-de-classificação-sequencial??" 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" href="#7.-qual-é-o-objetivo-de-aplicar-uma-função-softmax-à-saída-de-logits-para-um-modelo-de-classificação-sequencial??"><span><svg class="" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z" fill="currentColor"></path></svg></span></a>
	<span>7. Qual é o objetivo de aplicar uma função SoftMax à saída de logits para um modelo de classificação sequencial??
	</span></h3>

<div><form><label class="block"><input autocomplete="off" class="form-input -mt-1.5 mr-2" name="choice" type="checkbox" value="0">
				<!-- HTML_TAG_START -->Suaviza os logits para que sejam mais confiáveis.<!-- HTML_TAG_END --></label>
			<label class="block"><input autocomplete="off" class="form-input -mt-1.5 mr-2" name="choice" type="checkbox" value="1">
				<!-- HTML_TAG_START -->Aplica um limite inferior e um limite superior para que eles sejam compreensíveis.<!-- HTML_TAG_END --></label>
			<label class="block"><input autocomplete="off" class="form-input -mt-1.5 mr-2" name="choice" type="checkbox" value="2">
				<!-- HTML_TAG_START -->A soma total da saída é 1, resultando em uma possível interpretação probabilística.<!-- HTML_TAG_END --></label>
			
		<div class="flex flex-row items-center mt-3"><button class="btn px-4 mr-4" type="submit" disabled>Submit </button>

			</div></form></div>
<h3 class="relative group"><a id="8.-qual-é-o-método-core-da-api-tokenizer?" 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" href="#8.-qual-é-o-método-core-da-api-tokenizer?"><span><svg class="" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z" fill="currentColor"></path></svg></span></a>
	<span>8. Qual é o método core da API tokenizer?
	</span></h3>

<div><form><label class="block"><input autocomplete="off" class="form-input -mt-1.5 mr-2" name="choice" type="checkbox" value="0">
				<!-- HTML_TAG_START --><code>encode</code>, pois pode codificar texto em IDs e IDs em predições<!-- HTML_TAG_END --></label>
			<label class="block"><input autocomplete="off" class="form-input -mt-1.5 mr-2" name="choice" type="checkbox" value="1">
				<!-- HTML_TAG_START -->Chamando diretamente o objeto de tokenização (tokenizer).<!-- HTML_TAG_END --></label>
			<label class="block"><input autocomplete="off" class="form-input -mt-1.5 mr-2" name="choice" type="checkbox" value="2">
				<!-- HTML_TAG_START --><code>padding</code><!-- HTML_TAG_END --></label>
			<label class="block"><input autocomplete="off" class="form-input -mt-1.5 mr-2" name="choice" type="checkbox" value="3">
				<!-- HTML_TAG_START --><code>tokenize</code><!-- HTML_TAG_END --></label>
			
		<div class="flex flex-row items-center mt-3"><button class="btn px-4 mr-4" type="submit" disabled>Submit </button>

			</div></form></div>
<h3 class="relative group"><a id="9.-o-que-a-variável-<code>result</code>-contém-nesta-pedaço-de-código?" 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" href="#9.-o-que-a-variável-<code>result</code>-contém-nesta-pedaço-de-código?"><span><svg class="" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z" fill="currentColor"></path></svg></span></a>
	<span>9. O que a variável <code>result</code> contém nesta pedaço de código?
	</span></h3>


	<div class="code-block relative"><div class="absolute top-2.5 right-4"><button class="inline-flex items-center relative text-sm focus:text-green-500 cursor-pointer focus:outline-none transition duration-200 ease-in-out opacity-0 mx-0.5   text-gray-600 " title="code excerpt" type="button"><svg class="" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" fill="currentColor" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><path d="M28,10V28H10V10H28m0-2H10a2,2,0,0,0-2,2V28a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V10a2,2,0,0,0-2-2Z" transform="translate(0)"></path><path d="M4,18H2V4A2,2,0,0,1,4,2H18V4H4Z" transform="translate(0)"></path><rect fill="none" width="32" height="32"></rect></svg>
	<div class="absolute pointer-events-none transition-opacity bg-black text-white py-1 px-2 leading-tight rounded font-normal shadow left-1/2 top-full transform -translate-x-1/2 translate-y-2 opacity-0"><div class="absolute bottom-full left-1/2 transform -translate-x-1/2 w-0 h-0 border-black border-4 border-t-0" style="border-left-color: transparent; border-right-color: transparent; "></div>
	Copied</div></button></div>
	<pre><!-- HTML_TAG_START --><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer

tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;bert-base-cased&quot;</span>)
result = tokenizer.tokenize(<span class="hljs-string">&quot;Hello!&quot;</span>)<!-- HTML_TAG_END --></pre></div>
<div><form><label class="block"><input autocomplete="off" class="form-input -mt-1.5 mr-2" name="choice" type="checkbox" value="0">
				<!-- HTML_TAG_START -->Uma lista de strings, sendo cada uma delas um token<!-- HTML_TAG_END --></label>
			<label class="block"><input autocomplete="off" class="form-input -mt-1.5 mr-2" name="choice" type="checkbox" value="1">
				<!-- HTML_TAG_START -->Uma lista de IDs<!-- HTML_TAG_END --></label>
			<label class="block"><input autocomplete="off" class="form-input -mt-1.5 mr-2" name="choice" type="checkbox" value="2">
				<!-- HTML_TAG_START -->Uma string contendo todos os tokens <!-- HTML_TAG_END --></label>
			
		<div class="flex flex-row items-center mt-3"><button class="btn px-4 mr-4" type="submit" disabled>Submit </button>

			</div></form></div>
<h3 class="relative group"><a id="10.-tem-algo-errado-com-o-código-abaixo?" 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" href="#10.-tem-algo-errado-com-o-código-abaixo?"><span><svg class="" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z" fill="currentColor"></path></svg></span></a>
	<span>10. Tem algo errado com o código abaixo?
	</span></h3>


	<div class="code-block relative"><div class="absolute top-2.5 right-4"><button class="inline-flex items-center relative text-sm focus:text-green-500 cursor-pointer focus:outline-none transition duration-200 ease-in-out opacity-0 mx-0.5   text-gray-600 " title="code excerpt" type="button"><svg class="" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" fill="currentColor" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><path d="M28,10V28H10V10H28m0-2H10a2,2,0,0,0-2,2V28a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V10a2,2,0,0,0-2-2Z" transform="translate(0)"></path><path d="M4,18H2V4A2,2,0,0,1,4,2H18V4H4Z" transform="translate(0)"></path><rect fill="none" width="32" height="32"></rect></svg>
	<div class="absolute pointer-events-none transition-opacity bg-black text-white py-1 px-2 leading-tight rounded font-normal shadow left-1/2 top-full transform -translate-x-1/2 translate-y-2 opacity-0"><div class="absolute bottom-full left-1/2 transform -translate-x-1/2 w-0 h-0 border-black border-4 border-t-0" style="border-left-color: transparent; border-right-color: transparent; "></div>
	Copied</div></button></div>
	<pre><!-- HTML_TAG_START --><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, AutoModel

tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;bert-base-cased&quot;</span>)
model = AutoModel.from_pretrained(<span class="hljs-string">&quot;gpt2&quot;</span>)

encoded = tokenizer(<span class="hljs-string">&quot;Hey!&quot;</span>, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)
result = model(**encoded)<!-- HTML_TAG_END --></pre></div>
<div><form><label class="block"><input autocomplete="off" class="form-input -mt-1.5 mr-2" name="choice" type="checkbox" value="0">
				<!-- HTML_TAG_START -->Não, parece correto.<!-- HTML_TAG_END --></label>
			<label class="block"><input autocomplete="off" class="form-input -mt-1.5 mr-2" name="choice" type="checkbox" value="1">
				<!-- HTML_TAG_START -->O tokenizer e o modelo devem ser sempre a partir do mesmo checkpoint.<!-- HTML_TAG_END --></label>
			<label class="block"><input autocomplete="off" class="form-input -mt-1.5 mr-2" name="choice" type="checkbox" value="2">
				<!-- HTML_TAG_START -->É uma boa prática realizar o padding e truncar com o tokenizer, pois cada entrada é um batch.<!-- HTML_TAG_END --></label>
			
		<div class="flex flex-row items-center mt-3"><button class="btn px-4 mr-4" type="submit" disabled>Submit </button>

			</div></form></div>


		<script type="module" data-hydrate="1artz93">
		import { start } from "/docs/course/pr_92/pt/_app/start-2da76e23.js";
		start({
			target: document.querySelector('[data-hydrate="1artz93"]').parentNode,
			paths: {"base":"/docs/course/pr_92/pt","assets":"/docs/course/pr_92/pt"},
			session: {},
			route: false,
			spa: false,
			trailing_slash: "never",
			hydrate: {
				status: 200,
				error: null,
				nodes: [
					import("/docs/course/pr_92/pt/_app/pages/__layout.svelte-20ef27ff.js"),
						import("/docs/course/pr_92/pt/_app/pages/chapter2/8.mdx-f26dc1c3.js")
				],
				params: {}
			}
		});
	</script>
