import{s as kt,o as _t,n as Vs}from"../chunks/scheduler.bdbef820.js";import{S as Zt,i as Ct,g as b,s as i,r as f,A as Wt,h as j,f as t,c as m,j as Jt,u as h,x as J,k as Tt,y as vt,a as e,v as u,d,t as y,w as g,m as Gt,n as Xt}from"../chunks/index.33f81d56.js";import{T as mt}from"../chunks/Tip.34194030.js";import{C as G}from"../chunks/CodeBlock.362b34a4.js";import{D as Rt}from"../chunks/DocNotebookDropdown.d5db5928.js";import{F as Ut,M as it}from"../chunks/Markdown.03194dea.js";import{H as Gs,E as xt}from"../chunks/EditOnGithub.a9246e21.js";function Vt(V){let a,M='<a href="/docs/transformers/main/ko/main_classes/trainer#transformers.Trainer">Trainer</a>로 모델을 미세 조정하는 데 익숙하지 않다면 기본 튜토리얼 <a href="../training#train-with-pytorch-trainer">여기</a>를 살펴보세요!';return{c(){a=b("p"),a.innerHTML=M},l(n){a=j(n,"P",{"data-svelte-h":!0}),J(a)!=="svelte-1rjfgif"&&(a.innerHTML=M)},m(n,c){e(n,a,c)},p:Vs,d(n){n&&t(a)}}}function It(V){let a,M,n,c='이제 모델 훈련을 시작할 준비가 되었습니다! <a href="/docs/transformers/main/ko/model_doc/auto#transformers.AutoModelForMultipleChoice">AutoModelForMultipleChoice</a>로 BERT를 로드합니다:',w,k,x,C,_="이제 세 단계만 남았습니다:",X,Z,I='<li>훈련 하이퍼파라미터를 <a href="/docs/transformers/main/ko/main_classes/trainer#transformers.TrainingArguments">TrainingArguments</a>에 정의합니다. 유일한 필수 매개변수는 모델을 저장할 위치를 지정하는 <code>output_dir</code>입니다. <code>push_to_hub=True</code>를 설정하여 이 모델을 허브에 푸시합니다(모델을 업로드하려면 허깅 페이스에 로그인해야 합니다). 각 에폭이 끝날 때마다 <a href="/docs/transformers/main/ko/main_classes/trainer#transformers.Trainer">Trainer</a>가 정확도를 평가하고 훈련 체크포인트를 저장합니다.</li> <li>모델, 데이터 세트, 토크나이저, 데이터 콜레이터, <code>compute_metrics</code> 함수와 함께 훈련 인자를 <a href="/docs/transformers/main/ko/main_classes/trainer#transformers.Trainer">Trainer</a>에 전달합니다.</li> <li><a href="/docs/transformers/main/ko/main_classes/trainer#transformers.Trainer.train">train()</a>을 사용하여 모델을 미세 조정합니다.</li>',R,U,W,r,T='훈련이 완료되면 모든 사람이 모델을 사용할 수 있도록 <a href="/docs/transformers/main/ko/main_classes/trainer#transformers.Trainer.push_to_hub">push_to_hub()</a> 메소드를 사용하여 모델을 허브에 공유하세요:',B,F,z;return a=new mt({props:{$$slots:{default:[Vt]},$$scope:{ctx:V}}}),k=new G({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Nb2RlbEZvck11bHRpcGxlQ2hvaWNlJTJDJTIwVHJhaW5pbmdBcmd1bWVudHMlMkMlMjBUcmFpbmVyJTBBJTBBbW9kZWwlMjAlM0QlMjBBdXRvTW9kZWxGb3JNdWx0aXBsZUNob2ljZS5mcm9tX3ByZXRyYWluZWQoJTIyZ29vZ2xlLWJlcnQlMkZiZXJ0LWJhc2UtdW5jYXNlZCUyMik=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoModelForMultipleChoice, TrainingArguments, Trainer

<span class="hljs-meta">&gt;&gt;&gt; </span>model = AutoModelForMultipleChoice.from_pretrained(<span class="hljs-string">&quot;google-bert/bert-base-uncased&quot;</span>)`,wrap:!1}}),U=new G({props:{code:"dHJhaW5pbmdfYXJncyUyMCUzRCUyMFRyYWluaW5nQXJndW1lbnRzKCUwQSUyMCUyMCUyMCUyMG91dHB1dF9kaXIlM0QlMjJteV9hd2Vzb21lX3N3YWdfbW9kZWwlMjIlMkMlMEElMjAlMjAlMjAlMjBldmFsX3N0cmF0ZWd5JTNEJTIyZXBvY2glMjIlMkMlMEElMjAlMjAlMjAlMjBzYXZlX3N0cmF0ZWd5JTNEJTIyZXBvY2glMjIlMkMlMEElMjAlMjAlMjAlMjBsb2FkX2Jlc3RfbW9kZWxfYXRfZW5kJTNEVHJ1ZSUyQyUwQSUyMCUyMCUyMCUyMGxlYXJuaW5nX3JhdGUlM0Q1ZS01JTJDJTBBJTIwJTIwJTIwJTIwcGVyX2RldmljZV90cmFpbl9iYXRjaF9zaXplJTNEMTYlMkMlMEElMjAlMjAlMjAlMjBwZXJfZGV2aWNlX2V2YWxfYmF0Y2hfc2l6ZSUzRDE2JTJDJTBBJTIwJTIwJTIwJTIwbnVtX3RyYWluX2Vwb2NocyUzRDMlMkMlMEElMjAlMjAlMjAlMjB3ZWlnaHRfZGVjYXklM0QwLjAxJTJDJTBBJTIwJTIwJTIwJTIwcHVzaF90b19odWIlM0RUcnVlJTJDJTBBKSUwQSUwQXRyYWluZXIlMjAlM0QlMjBUcmFpbmVyKCUwQSUyMCUyMCUyMCUyMG1vZGVsJTNEbW9kZWwlMkMlMEElMjAlMjAlMjAlMjBhcmdzJTNEdHJhaW5pbmdfYXJncyUyQyUwQSUyMCUyMCUyMCUyMHRyYWluX2RhdGFzZXQlM0R0b2tlbml6ZWRfc3dhZyU1QiUyMnRyYWluJTIyJTVEJTJDJTBBJTIwJTIwJTIwJTIwZXZhbF9kYXRhc2V0JTNEdG9rZW5pemVkX3N3YWclNUIlMjJ2YWxpZGF0aW9uJTIyJTVEJTJDJTBBJTIwJTIwJTIwJTIwcHJvY2Vzc2luZ19jbGFzcyUzRHRva2VuaXplciUyQyUwQSUyMCUyMCUyMCUyMGRhdGFfY29sbGF0b3IlM0Rjb2xsYXRvciUyQyUwQSUyMCUyMCUyMCUyMGNvbXB1dGVfbWV0cmljcyUzRGNvbXB1dGVfbWV0cmljcyUyQyUwQSklMEElMEF0cmFpbmVyLnRyYWluKCk=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span>training_args = TrainingArguments(
<span class="hljs-meta">... </span>    output_dir=<span class="hljs-string">&quot;my_awesome_swag_model&quot;</span>,
<span class="hljs-meta">... </span>    eval_strategy=<span class="hljs-string">&quot;epoch&quot;</span>,
<span class="hljs-meta">... </span>    save_strategy=<span class="hljs-string">&quot;epoch&quot;</span>,
<span class="hljs-meta">... </span>    load_best_model_at_end=<span class="hljs-literal">True</span>,
<span class="hljs-meta">... </span>    learning_rate=<span class="hljs-number">5e-5</span>,
<span class="hljs-meta">... </span>    per_device_train_batch_size=<span class="hljs-number">16</span>,
<span class="hljs-meta">... </span>    per_device_eval_batch_size=<span class="hljs-number">16</span>,
<span class="hljs-meta">... </span>    num_train_epochs=<span class="hljs-number">3</span>,
<span class="hljs-meta">... </span>    weight_decay=<span class="hljs-number">0.01</span>,
<span class="hljs-meta">... </span>    push_to_hub=<span class="hljs-literal">True</span>,
<span class="hljs-meta">... </span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>trainer = Trainer(
<span class="hljs-meta">... </span>    model=model,
<span class="hljs-meta">... </span>    args=training_args,
<span class="hljs-meta">... </span>    train_dataset=tokenized_swag[<span class="hljs-string">&quot;train&quot;</span>],
<span class="hljs-meta">... </span>    eval_dataset=tokenized_swag[<span class="hljs-string">&quot;validation&quot;</span>],
<span class="hljs-meta">... </span>    processing_class=tokenizer,
<span class="hljs-meta">... </span>    data_collator=collator,
<span class="hljs-meta">... </span>    compute_metrics=compute_metrics,
<span class="hljs-meta">... </span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>trainer.train()`,wrap:!1}}),F=new G({props:{code:"dHJhaW5lci5wdXNoX3RvX2h1Yigp",highlighted:'<span class="hljs-meta">&gt;&gt;&gt; </span>trainer.push_to_hub()',wrap:!1}}),{c(){f(a.$$.fragment),M=i(),n=b("p"),n.innerHTML=c,w=i(),f(k.$$.fragment),x=i(),C=b("p"),C.textContent=_,X=i(),Z=b("ol"),Z.innerHTML=I,R=i(),f(U.$$.fragment),W=i(),r=b("p"),r.innerHTML=T,B=i(),f(F.$$.fragment)},l(o){h(a.$$.fragment,o),M=m(o),n=j(o,"P",{"data-svelte-h":!0}),J(n)!=="svelte-1dp6eey"&&(n.innerHTML=c),w=m(o),h(k.$$.fragment,o),x=m(o),C=j(o,"P",{"data-svelte-h":!0}),J(C)!=="svelte-1vwg7jz"&&(C.textContent=_),X=m(o),Z=j(o,"OL",{"data-svelte-h":!0}),J(Z)!=="svelte-1cv3ig8"&&(Z.innerHTML=I),R=m(o),h(U.$$.fragment,o),W=m(o),r=j(o,"P",{"data-svelte-h":!0}),J(r)!=="svelte-3fyxm5"&&(r.innerHTML=T),B=m(o),h(F.$$.fragment,o)},m(o,v){u(a,o,v),e(o,M,v),e(o,n,v),e(o,w,v),u(k,o,v),e(o,x,v),e(o,C,v),e(o,X,v),e(o,Z,v),e(o,R,v),u(U,o,v),e(o,W,v),e(o,r,v),e(o,B,v),u(F,o,v),z=!0},p(o,v){const Y={};v&2&&(Y.$$scope={dirty:v,ctx:o}),a.$set(Y)},i(o){z||(d(a.$$.fragment,o),d(k.$$.fragment,o),d(U.$$.fragment,o),d(F.$$.fragment,o),z=!0)},o(o){y(a.$$.fragment,o),y(k.$$.fragment,o),y(U.$$.fragment,o),y(F.$$.fragment,o),z=!1},d(o){o&&(t(M),t(n),t(w),t(x),t(C),t(X),t(Z),t(R),t(W),t(r),t(B)),g(a,o),g(k,o),g(U,o),g(F,o)}}}function Bt(V){let a,M;return a=new it({props:{$$slots:{default:[It]},$$scope:{ctx:V}}}),{c(){f(a.$$.fragment)},l(n){h(a.$$.fragment,n)},m(n,c){u(a,n,c),M=!0},p(n,c){const w={};c&2&&(w.$$scope={dirty:c,ctx:n}),a.$set(w)},i(n){M||(d(a.$$.fragment,n),M=!0)},o(n){y(a.$$.fragment,n),M=!1},d(n){g(a,n)}}}function Yt(V){let a,M='Keras로 모델을 미세 조정하는 데 익숙하지 않다면 기본 튜토리얼 <a href="../training#train-a-tensorflow-model-with-keras">여기</a>를 살펴보시기 바랍니다!';return{c(){a=b("p"),a.innerHTML=M},l(n){a=j(n,"P",{"data-svelte-h":!0}),J(a)!=="svelte-16zjqtu"&&(a.innerHTML=M)},m(n,c){e(n,a,c)},p:Vs,d(n){n&&t(a)}}}function zt(V){let a,M,n,c,w,k='그리고 <a href="/docs/transformers/main/ko/model_doc/auto#transformers.TFAutoModelForMultipleChoice">TFAutoModelForMultipleChoice</a>로 BERT를 가져올 수 있습니다:',x,C,_,X,Z='<a href="/docs/transformers/main/ko/main_classes/model#transformers.TFPreTrainedModel.prepare_tf_dataset">prepare_tf_dataset()</a>을 사용하여 데이터 세트를 <code>tf.data.Dataset</code> 형식으로 변환합니다:',I,R,U,W,r='<a href="https://keras.io/api/models/model_training_apis/#compile-method" rel="nofollow"><code>compile</code></a>을 사용하여 훈련 모델을 구성합니다:',T,B,F,z,o='훈련을 시작하기 전에 설정해야 할 마지막 두 가지는 예측의 정확도를 계산하고 모델을 허브로 푸시하는 방법을 제공하는 것입니다. 이 두 가지 작업은 모두 <a href="../main_classes/keras_callbacks">Keras 콜백</a>을 사용하여 수행할 수 있습니다.',v,Y,Xs='<code>compute_metrics</code>함수를 <a href="/docs/transformers/main/ko/main_classes/keras_callbacks#transformers.KerasMetricCallback">KerasMetricCallback</a>에 전달하세요:',ss,N,ts,H,ms='모델과 토크나이저를 업로드할 위치를 <a href="/docs/transformers/main/ko/main_classes/keras_callbacks#transformers.PushToHubCallback">PushToHubCallback</a>에서 지정하세요:',q,P,es,Q,os="그리고 콜백을 함께 묶습니다:",S,D,ls,E,cs='이제 모델 훈련을 시작합니다! 훈련 및 검증 데이터 세트, 에폭 수, 콜백을 사용하여 <a href="https://keras.io/api/models/model_training_apis/#fit-method" rel="nofollow"><code>fit</code></a>을 호출하고 모델을 미세 조정합니다:',L,K,as,A,Rs="훈련이 완료되면 모델이 자동으로 허브에 업로드되어 누구나 사용할 수 있습니다!",ns;return a=new mt({props:{$$slots:{default:[Yt]},$$scope:{ctx:V}}}),n=new G({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMGNyZWF0ZV9vcHRpbWl6ZXIlMEElMEFiYXRjaF9zaXplJTIwJTNEJTIwMTYlMEFudW1fdHJhaW5fZXBvY2hzJTIwJTNEJTIwMiUwQXRvdGFsX3RyYWluX3N0ZXBzJTIwJTNEJTIwKGxlbih0b2tlbml6ZWRfc3dhZyU1QiUyMnRyYWluJTIyJTVEKSUyMCUyRiUyRiUyMGJhdGNoX3NpemUpJTIwKiUyMG51bV90cmFpbl9lcG9jaHMlMEFvcHRpbWl6ZXIlMkMlMjBzY2hlZHVsZSUyMCUzRCUyMGNyZWF0ZV9vcHRpbWl6ZXIoaW5pdF9sciUzRDVlLTUlMkMlMjBudW1fd2FybXVwX3N0ZXBzJTNEMCUyQyUyMG51bV90cmFpbl9zdGVwcyUzRHRvdGFsX3RyYWluX3N0ZXBzKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> create_optimizer

<span class="hljs-meta">&gt;&gt;&gt; </span>batch_size = <span class="hljs-number">16</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>num_train_epochs = <span class="hljs-number">2</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>total_train_steps = (<span class="hljs-built_in">len</span>(tokenized_swag[<span class="hljs-string">&quot;train&quot;</span>]) // batch_size) * num_train_epochs
<span class="hljs-meta">&gt;&gt;&gt; </span>optimizer, schedule = create_optimizer(init_lr=<span class="hljs-number">5e-5</span>, num_warmup_steps=<span class="hljs-number">0</span>, num_train_steps=total_train_steps)`,wrap:!1}}),C=new G({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMFRGQXV0b01vZGVsRm9yTXVsdGlwbGVDaG9pY2UlMEElMEFtb2RlbCUyMCUzRCUyMFRGQXV0b01vZGVsRm9yTXVsdGlwbGVDaG9pY2UuZnJvbV9wcmV0cmFpbmVkKCUyMmdvb2dsZS1iZXJ0JTJGYmVydC1iYXNlLXVuY2FzZWQlMjIp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> TFAutoModelForMultipleChoice

<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFAutoModelForMultipleChoice.from_pretrained(<span class="hljs-string">&quot;google-bert/bert-base-uncased&quot;</span>)`,wrap:!1}}),R=new G({props:{code:"ZGF0YV9jb2xsYXRvciUyMCUzRCUyMERhdGFDb2xsYXRvckZvck11bHRpcGxlQ2hvaWNlKHRva2VuaXplciUzRHRva2VuaXplciklMEF0Zl90cmFpbl9zZXQlMjAlM0QlMjBtb2RlbC5wcmVwYXJlX3RmX2RhdGFzZXQoJTBBJTIwJTIwJTIwJTIwdG9rZW5pemVkX3N3YWclNUIlMjJ0cmFpbiUyMiU1RCUyQyUwQSUyMCUyMCUyMCUyMHNodWZmbGUlM0RUcnVlJTJDJTBBJTIwJTIwJTIwJTIwYmF0Y2hfc2l6ZSUzRGJhdGNoX3NpemUlMkMlMEElMjAlMjAlMjAlMjBjb2xsYXRlX2ZuJTNEZGF0YV9jb2xsYXRvciUyQyUwQSklMEElMEF0Zl92YWxpZGF0aW9uX3NldCUyMCUzRCUyMG1vZGVsLnByZXBhcmVfdGZfZGF0YXNldCglMEElMjAlMjAlMjAlMjB0b2tlbml6ZWRfc3dhZyU1QiUyMnZhbGlkYXRpb24lMjIlNUQlMkMlMEElMjAlMjAlMjAlMjBzaHVmZmxlJTNERmFsc2UlMkMlMEElMjAlMjAlMjAlMjBiYXRjaF9zaXplJTNEYmF0Y2hfc2l6ZSUyQyUwQSUyMCUyMCUyMCUyMGNvbGxhdGVfZm4lM0RkYXRhX2NvbGxhdG9yJTJDJTBBKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span>data_collator = DataCollatorForMultipleChoice(tokenizer=tokenizer)
<span class="hljs-meta">&gt;&gt;&gt; </span>tf_train_set = model.prepare_tf_dataset(
<span class="hljs-meta">... </span>    tokenized_swag[<span class="hljs-string">&quot;train&quot;</span>],
<span class="hljs-meta">... </span>    shuffle=<span class="hljs-literal">True</span>,
<span class="hljs-meta">... </span>    batch_size=batch_size,
<span class="hljs-meta">... </span>    collate_fn=data_collator,
<span class="hljs-meta">... </span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>tf_validation_set = model.prepare_tf_dataset(
<span class="hljs-meta">... </span>    tokenized_swag[<span class="hljs-string">&quot;validation&quot;</span>],
<span class="hljs-meta">... </span>    shuffle=<span class="hljs-literal">False</span>,
<span class="hljs-meta">... </span>    batch_size=batch_size,
<span class="hljs-meta">... </span>    collate_fn=data_collator,
<span class="hljs-meta">... </span>)`,wrap:!1}}),B=new G({props:{code:"bW9kZWwuY29tcGlsZShvcHRpbWl6ZXIlM0RvcHRpbWl6ZXIp",highlighted:'<span class="hljs-meta">&gt;&gt;&gt; </span>model.<span class="hljs-built_in">compile</span>(optimizer=optimizer)',wrap:!1}}),N=new G({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycy5rZXJhc19jYWxsYmFja3MlMjBpbXBvcnQlMjBLZXJhc01ldHJpY0NhbGxiYWNrJTBBJTBBbWV0cmljX2NhbGxiYWNrJTIwJTNEJTIwS2VyYXNNZXRyaWNDYWxsYmFjayhtZXRyaWNfZm4lM0Rjb21wdXRlX21ldHJpY3MlMkMlMjBldmFsX2RhdGFzZXQlM0R0Zl92YWxpZGF0aW9uX3NldCk=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers.keras_callbacks <span class="hljs-keyword">import</span> KerasMetricCallback

<span class="hljs-meta">&gt;&gt;&gt; </span>metric_callback = KerasMetricCallback(metric_fn=compute_metrics, eval_dataset=tf_validation_set)`,wrap:!1}}),P=new G({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycy5rZXJhc19jYWxsYmFja3MlMjBpbXBvcnQlMjBQdXNoVG9IdWJDYWxsYmFjayUwQSUwQXB1c2hfdG9faHViX2NhbGxiYWNrJTIwJTNEJTIwUHVzaFRvSHViQ2FsbGJhY2soJTBBJTIwJTIwJTIwJTIwb3V0cHV0X2RpciUzRCUyMm15X2F3ZXNvbWVfbW9kZWwlMjIlMkMlMEElMjAlMjAlMjAlMjB0b2tlbml6ZXIlM0R0b2tlbml6ZXIlMkMlMEEp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers.keras_callbacks <span class="hljs-keyword">import</span> PushToHubCallback

<span class="hljs-meta">&gt;&gt;&gt; </span>push_to_hub_callback = PushToHubCallback(
<span class="hljs-meta">... </span>    output_dir=<span class="hljs-string">&quot;my_awesome_model&quot;</span>,
<span class="hljs-meta">... </span>    tokenizer=tokenizer,
<span class="hljs-meta">... </span>)`,wrap:!1}}),D=new G({props:{code:"Y2FsbGJhY2tzJTIwJTNEJTIwJTVCbWV0cmljX2NhbGxiYWNrJTJDJTIwcHVzaF90b19odWJfY2FsbGJhY2slNUQ=",highlighted:'<span class="hljs-meta">&gt;&gt;&gt; </span>callbacks = [metric_callback, push_to_hub_callback]',wrap:!1}}),K=new G({props:{code:"bW9kZWwuZml0KHglM0R0Zl90cmFpbl9zZXQlMkMlMjB2YWxpZGF0aW9uX2RhdGElM0R0Zl92YWxpZGF0aW9uX3NldCUyQyUyMGVwb2NocyUzRDIlMkMlMjBjYWxsYmFja3MlM0RjYWxsYmFja3Mp",highlighted:'<span class="hljs-meta">&gt;&gt;&gt; </span>model.fit(x=tf_train_set, validation_data=tf_validation_set, epochs=<span class="hljs-number">2</span>, callbacks=callbacks)',wrap:!1}}),{c(){f(a.$$.fragment),M=Gt(`
TensorFlow에서 모델을 미세 조정하려면 최적화 함수, 학습률 스케쥴 및 몇 가지 학습 하이퍼파라미터를 설정하는 것부터 시작하세요:

	`),f(n.$$.fragment),c=i(),w=b("p"),w.innerHTML=k,x=i(),f(C.$$.fragment),_=i(),X=b("p"),X.innerHTML=Z,I=i(),f(R.$$.fragment),U=i(),W=b("p"),W.innerHTML=r,T=i(),f(B.$$.fragment),F=i(),z=b("p"),z.innerHTML=o,v=i(),Y=b("p"),Y.innerHTML=Xs,ss=i(),f(N.$$.fragment),ts=i(),H=b("p"),H.innerHTML=ms,q=i(),f(P.$$.fragment),es=i(),Q=b("p"),Q.textContent=os,S=i(),f(D.$$.fragment),ls=i(),E=b("p"),E.innerHTML=cs,L=i(),f(K.$$.fragment),as=i(),A=b("p"),A.textContent=Rs},l(l){h(a.$$.fragment,l),M=Xt(l,`
TensorFlow에서 모델을 미세 조정하려면 최적화 함수, 학습률 스케쥴 및 몇 가지 학습 하이퍼파라미터를 설정하는 것부터 시작하세요:

	`),h(n.$$.fragment,l),c=m(l),w=j(l,"P",{"data-svelte-h":!0}),J(w)!=="svelte-1f7y2zh"&&(w.innerHTML=k),x=m(l),h(C.$$.fragment,l),_=m(l),X=j(l,"P",{"data-svelte-h":!0}),J(X)!=="svelte-cd3so6"&&(X.innerHTML=Z),I=m(l),h(R.$$.fragment,l),U=m(l),W=j(l,"P",{"data-svelte-h":!0}),J(W)!=="svelte-qo1enf"&&(W.innerHTML=r),T=m(l),h(B.$$.fragment,l),F=m(l),z=j(l,"P",{"data-svelte-h":!0}),J(z)!=="svelte-1nxoekh"&&(z.innerHTML=o),v=m(l),Y=j(l,"P",{"data-svelte-h":!0}),J(Y)!=="svelte-15opeyx"&&(Y.innerHTML=Xs),ss=m(l),h(N.$$.fragment,l),ts=m(l),H=j(l,"P",{"data-svelte-h":!0}),J(H)!=="svelte-14cj6df"&&(H.innerHTML=ms),q=m(l),h(P.$$.fragment,l),es=m(l),Q=j(l,"P",{"data-svelte-h":!0}),J(Q)!=="svelte-ernkdu"&&(Q.textContent=os),S=m(l),h(D.$$.fragment,l),ls=m(l),E=j(l,"P",{"data-svelte-h":!0}),J(E)!=="svelte-1illf6u"&&(E.innerHTML=cs),L=m(l),h(K.$$.fragment,l),as=m(l),A=j(l,"P",{"data-svelte-h":!0}),J(A)!=="svelte-ymmthz"&&(A.textContent=Rs)},m(l,$){u(a,l,$),e(l,M,$),u(n,l,$),e(l,c,$),e(l,w,$),e(l,x,$),u(C,l,$),e(l,_,$),e(l,X,$),e(l,I,$),u(R,l,$),e(l,U,$),e(l,W,$),e(l,T,$),u(B,l,$),e(l,F,$),e(l,z,$),e(l,v,$),e(l,Y,$),e(l,ss,$),u(N,l,$),e(l,ts,$),e(l,H,$),e(l,q,$),u(P,l,$),e(l,es,$),e(l,Q,$),e(l,S,$),u(D,l,$),e(l,ls,$),e(l,E,$),e(l,L,$),u(K,l,$),e(l,as,$),e(l,A,$),ns=!0},p(l,$){const O={};$&2&&(O.$$scope={dirty:$,ctx:l}),a.$set(O)},i(l){ns||(d(a.$$.fragment,l),d(n.$$.fragment,l),d(C.$$.fragment,l),d(R.$$.fragment,l),d(B.$$.fragment,l),d(N.$$.fragment,l),d(P.$$.fragment,l),d(D.$$.fragment,l),d(K.$$.fragment,l),ns=!0)},o(l){y(a.$$.fragment,l),y(n.$$.fragment,l),y(C.$$.fragment,l),y(R.$$.fragment,l),y(B.$$.fragment,l),y(N.$$.fragment,l),y(P.$$.fragment,l),y(D.$$.fragment,l),y(K.$$.fragment,l),ns=!1},d(l){l&&(t(M),t(c),t(w),t(x),t(_),t(X),t(I),t(U),t(W),t(T),t(F),t(z),t(v),t(Y),t(ss),t(ts),t(H),t(q),t(es),t(Q),t(S),t(ls),t(E),t(L),t(as),t(A)),g(a,l),g(n,l),g(C,l),g(R,l),g(B,l),g(N,l),g(P,l),g(D,l),g(K,l)}}}function Ft(V){let a,M;return a=new it({props:{$$slots:{default:[zt]},$$scope:{ctx:V}}}),{c(){f(a.$$.fragment)},l(n){h(a.$$.fragment,n)},m(n,c){u(a,n,c),M=!0},p(n,c){const w={};c&2&&(w.$$scope={dirty:c,ctx:n}),a.$set(w)},i(n){M||(d(a.$$.fragment,n),M=!0)},o(n){y(a.$$.fragment,n),M=!1},d(n){g(a,n)}}}function Nt(V){let a,M=`객관식 모델을 미세 조정하는 방법에 대한 보다 심층적인 예는 아래 문서를 참조하세요.
<a href="https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/multiple_choice.ipynb" rel="nofollow">PyTorch notebook</a>
또는 <a href="https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/multiple_choice-tf.ipynb" rel="nofollow">TensorFlow notebook</a>.`;return{c(){a=b("p"),a.innerHTML=M},l(n){a=j(n,"P",{"data-svelte-h":!0}),J(a)!=="svelte-i06vpg"&&(a.innerHTML=M)},m(n,c){e(n,a,c)},p:Vs,d(n){n&&t(a)}}}function Ht(V){let a,M="각 프롬프트와 후보 답변 쌍을 토큰화하여 PyTorch 텐서를 반환합니다. 또한 <code>labels</code>을 생성해야 합니다:",n,c,w,k,x="입력과 레이블을 모델에 전달하고 <code>logits</code>을 반환합니다:",C,_,X,Z,I="가장 높은 확률을 가진 클래스를 가져옵니다:",R,U,W;return c=new G({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMEElMEF0b2tlbml6ZXIlMjAlM0QlMjBBdXRvVG9rZW5pemVyLmZyb21fcHJldHJhaW5lZCglMjJteV9hd2Vzb21lX3N3YWdfbW9kZWwlMjIpJTBBaW5wdXRzJTIwJTNEJTIwdG9rZW5pemVyKCU1QiU1QnByb21wdCUyQyUyMGNhbmRpZGF0ZTElNUQlMkMlMjAlNUJwcm9tcHQlMkMlMjBjYW5kaWRhdGUyJTVEJTVEJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMiUyQyUyMHBhZGRpbmclM0RUcnVlKSUwQWxhYmVscyUyMCUzRCUyMHRvcmNoLnRlbnNvcigwKS51bnNxdWVlemUoMCk=",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>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;my_awesome_swag_model&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer([[prompt, candidate1], [prompt, candidate2]], return_tensors=<span class="hljs-string">&quot;pt&quot;</span>, padding=<span class="hljs-literal">True</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>labels = torch.tensor(<span class="hljs-number">0</span>).unsqueeze(<span class="hljs-number">0</span>)`,wrap:!1}}),_=new G({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Nb2RlbEZvck11bHRpcGxlQ2hvaWNlJTBBJTBBbW9kZWwlMjAlM0QlMjBBdXRvTW9kZWxGb3JNdWx0aXBsZUNob2ljZS5mcm9tX3ByZXRyYWluZWQoJTIybXlfYXdlc29tZV9zd2FnX21vZGVsJTIyKSUwQW91dHB1dHMlMjAlM0QlMjBtb2RlbCgqKiU3QmslM0ElMjB2LnVuc3F1ZWV6ZSgwKSUyMGZvciUyMGslMkMlMjB2JTIwaW4lMjBpbnB1dHMuaXRlbXMoKSU3RCUyQyUyMGxhYmVscyUzRGxhYmVscyklMEFsb2dpdHMlMjAlM0QlMjBvdXRwdXRzLmxvZ2l0cw==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoModelForMultipleChoice

<span class="hljs-meta">&gt;&gt;&gt; </span>model = AutoModelForMultipleChoice.from_pretrained(<span class="hljs-string">&quot;my_awesome_swag_model&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**{k: v.unsqueeze(<span class="hljs-number">0</span>) <span class="hljs-keyword">for</span> k, v <span class="hljs-keyword">in</span> inputs.items()}, labels=labels)
<span class="hljs-meta">&gt;&gt;&gt; </span>logits = outputs.logits`,wrap:!1}}),U=new G({props:{code:"cHJlZGljdGVkX2NsYXNzJTIwJTNEJTIwbG9naXRzLmFyZ21heCgpLml0ZW0oKSUwQXByZWRpY3RlZF9jbGFzcw==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span>predicted_class = logits.argmax().item()
<span class="hljs-meta">&gt;&gt;&gt; </span>predicted_class
<span class="hljs-string">&#x27;0&#x27;</span>`,wrap:!1}}),{c(){a=b("p"),a.innerHTML=M,n=i(),f(c.$$.fragment),w=i(),k=b("p"),k.innerHTML=x,C=i(),f(_.$$.fragment),X=i(),Z=b("p"),Z.textContent=I,R=i(),f(U.$$.fragment)},l(r){a=j(r,"P",{"data-svelte-h":!0}),J(a)!=="svelte-35m9oi"&&(a.innerHTML=M),n=m(r),h(c.$$.fragment,r),w=m(r),k=j(r,"P",{"data-svelte-h":!0}),J(k)!=="svelte-x6lqnk"&&(k.innerHTML=x),C=m(r),h(_.$$.fragment,r),X=m(r),Z=j(r,"P",{"data-svelte-h":!0}),J(Z)!=="svelte-for6x5"&&(Z.textContent=I),R=m(r),h(U.$$.fragment,r)},m(r,T){e(r,a,T),e(r,n,T),u(c,r,T),e(r,w,T),e(r,k,T),e(r,C,T),u(_,r,T),e(r,X,T),e(r,Z,T),e(r,R,T),u(U,r,T),W=!0},p:Vs,i(r){W||(d(c.$$.fragment,r),d(_.$$.fragment,r),d(U.$$.fragment,r),W=!0)},o(r){y(c.$$.fragment,r),y(_.$$.fragment,r),y(U.$$.fragment,r),W=!1},d(r){r&&(t(a),t(n),t(w),t(k),t(C),t(X),t(Z),t(R)),g(c,r),g(_,r),g(U,r)}}}function Qt(V){let a,M;return a=new it({props:{$$slots:{default:[Ht]},$$scope:{ctx:V}}}),{c(){f(a.$$.fragment)},l(n){h(a.$$.fragment,n)},m(n,c){u(a,n,c),M=!0},p(n,c){const w={};c&2&&(w.$$scope={dirty:c,ctx:n}),a.$set(w)},i(n){M||(d(a.$$.fragment,n),M=!0)},o(n){y(a.$$.fragment,n),M=!1},d(n){g(a,n)}}}function Et(V){let a,M="각 프롬프트와 후보 답안 쌍을 토큰화하여 텐서플로 텐서를 반환합니다:",n,c,w,k,x="모델에 입력을 전달하고 <code>logits</code>를 반환합니다:",C,_,X,Z,I="가장 높은 확률을 가진 클래스를 가져옵니다:",R,U,W;return c=new G({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMEElMEF0b2tlbml6ZXIlMjAlM0QlMjBBdXRvVG9rZW5pemVyLmZyb21fcHJldHJhaW5lZCglMjJteV9hd2Vzb21lX3N3YWdfbW9kZWwlMjIpJTBBaW5wdXRzJTIwJTNEJTIwdG9rZW5pemVyKCU1QiU1QnByb21wdCUyQyUyMGNhbmRpZGF0ZTElNUQlMkMlMjAlNUJwcm9tcHQlMkMlMjBjYW5kaWRhdGUyJTVEJTVEJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJ0ZiUyMiUyQyUyMHBhZGRpbmclM0RUcnVlKQ==",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>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;my_awesome_swag_model&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer([[prompt, candidate1], [prompt, candidate2]], return_tensors=<span class="hljs-string">&quot;tf&quot;</span>, padding=<span class="hljs-literal">True</span>)`,wrap:!1}}),_=new G({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMFRGQXV0b01vZGVsRm9yTXVsdGlwbGVDaG9pY2UlMEElMEFtb2RlbCUyMCUzRCUyMFRGQXV0b01vZGVsRm9yTXVsdGlwbGVDaG9pY2UuZnJvbV9wcmV0cmFpbmVkKCUyMm15X2F3ZXNvbWVfc3dhZ19tb2RlbCUyMiklMEFpbnB1dHMlMjAlM0QlMjAlN0JrJTNBJTIwdGYuZXhwYW5kX2RpbXModiUyQyUyMDApJTIwZm9yJTIwayUyQyUyMHYlMjBpbiUyMGlucHV0cy5pdGVtcygpJTdEJTBBb3V0cHV0cyUyMCUzRCUyMG1vZGVsKGlucHV0cyklMEFsb2dpdHMlMjAlM0QlMjBvdXRwdXRzLmxvZ2l0cw==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> TFAutoModelForMultipleChoice

<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFAutoModelForMultipleChoice.from_pretrained(<span class="hljs-string">&quot;my_awesome_swag_model&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = {k: tf.expand_dims(v, <span class="hljs-number">0</span>) <span class="hljs-keyword">for</span> k, v <span class="hljs-keyword">in</span> inputs.items()}
<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(inputs)
<span class="hljs-meta">&gt;&gt;&gt; </span>logits = outputs.logits`,wrap:!1}}),U=new G({props:{code:"cHJlZGljdGVkX2NsYXNzJTIwJTNEJTIwaW50KHRmLm1hdGguYXJnbWF4KGxvZ2l0cyUyQyUyMGF4aXMlM0QtMSklNUIwJTVEKSUwQXByZWRpY3RlZF9jbGFzcw==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span>predicted_class = <span class="hljs-built_in">int</span>(tf.math.argmax(logits, axis=-<span class="hljs-number">1</span>)[<span class="hljs-number">0</span>])
<span class="hljs-meta">&gt;&gt;&gt; </span>predicted_class
<span class="hljs-string">&#x27;0&#x27;</span>`,wrap:!1}}),{c(){a=b("p"),a.textContent=M,n=i(),f(c.$$.fragment),w=i(),k=b("p"),k.innerHTML=x,C=i(),f(_.$$.fragment),X=i(),Z=b("p"),Z.textContent=I,R=i(),f(U.$$.fragment)},l(r){a=j(r,"P",{"data-svelte-h":!0}),J(a)!=="svelte-1dzr36c"&&(a.textContent=M),n=m(r),h(c.$$.fragment,r),w=m(r),k=j(r,"P",{"data-svelte-h":!0}),J(k)!=="svelte-t69k4k"&&(k.innerHTML=x),C=m(r),h(_.$$.fragment,r),X=m(r),Z=j(r,"P",{"data-svelte-h":!0}),J(Z)!=="svelte-for6x5"&&(Z.textContent=I),R=m(r),h(U.$$.fragment,r)},m(r,T){e(r,a,T),e(r,n,T),u(c,r,T),e(r,w,T),e(r,k,T),e(r,C,T),u(_,r,T),e(r,X,T),e(r,Z,T),e(r,R,T),u(U,r,T),W=!0},p:Vs,i(r){W||(d(c.$$.fragment,r),d(_.$$.fragment,r),d(U.$$.fragment,r),W=!0)},o(r){y(c.$$.fragment,r),y(_.$$.fragment,r),y(U.$$.fragment,r),W=!1},d(r){r&&(t(a),t(n),t(w),t(k),t(C),t(X),t(Z),t(R)),g(c,r),g(_,r),g(U,r)}}}function At(V){let a,M;return a=new it({props:{$$slots:{default:[Et]},$$scope:{ctx:V}}}),{c(){f(a.$$.fragment)},l(n){h(a.$$.fragment,n)},m(n,c){u(a,n,c),M=!0},p(n,c){const w={};c&2&&(w.$$scope={dirty:c,ctx:n}),a.$set(w)},i(n){M||(d(a.$$.fragment,n),M=!0)},o(n){y(a.$$.fragment,n),M=!1},d(n){g(a,n)}}}function qt(V){let a,M,n,c,w,k,x,C,_,X="객관식 과제는 문맥과 함께 여러 개의 후보 답변이 제공되고 모델이 정답을 선택하도록 학습된다는 점을 제외하면 질의응답과 유사합니다.",Z,I,R="진행하는 방법은 아래와 같습니다:",U,W,r='<li><a href="https://huggingface.co/datasets/swag" rel="nofollow">SWAG</a> 데이터 세트의 ‘regular’ 구성으로 <a href="https://huggingface.co/google-bert/bert-base-uncased" rel="nofollow">BERT</a>를 미세 조정하여 여러 옵션과 일부 컨텍스트가 주어졌을 때 가장 적합한 답을 선택합니다.</li> <li>추론에 미세 조정된 모델을 사용합니다.</li>',T,B,F="시작하기 전에 필요한 라이브러리가 모두 설치되어 있는지 확인하세요:",z,o,v,Y,Xs="모델을 업로드하고 커뮤니티와 공유할 수 있도록 허깅페이스 계정에 로그인하는 것이 좋습니다. 메시지가 표시되면 토큰을 입력하여 로그인합니다:",ss,N,ts,H,ms,q,P="먼저 🤗 Datasets  라이브러리에서 SWAG 데이터셋의 ‘일반’ 구성을 가져옵니다:",es,Q,os,S,D="이제 데이터를 살펴봅니다:",ls,E,cs,L,K="여기에는 많은 필드가 있는 것처럼 보이지만 실제로는 매우 간단합니다:",as,A,Rs="<li><code>sent1</code> 및 <code>sent2</code>: 이 필드는 문장이 어떻게 시작되는지 보여주며, 이 두 필드를 합치면 <code>시작 구절(startphrase)</code> 필드가 됩니다.</li> <li><code>종료 구절(ending)</code>: 문장이 어떻게 끝날 수 있는지에 대한 가능한 종료 구절를 제시하지만 그 중 하나만 정답입니다.</li> <li><code>레이블(label)</code>: 올바른 문장 종료 구절을 식별합니다.</li>",ns,l,$,O,ot="다음 단계는 문장의 시작과 네 가지 가능한 구절을 처리하기 위해 BERT 토크나이저를 불러옵니다:",Is,Ms,Bs,fs,ct="생성하려는 전처리 함수는 다음과 같아야 합니다:",Ys,hs,Mt="<li><code>sent1</code> 필드를 네 개 복사한 다음 각각을 <code>sent2</code>와 결합하여 문장이 시작되는 방식을 재현합니다.</li> <li><code>sent2</code>를 네 가지 가능한 문장 구절 각각과 결합합니다.</li> <li>이 두 목록을 토큰화할 수 있도록 평탄화(flatten)하고, 각 예제에 해당하는 <code>input_ids</code>, <code>attention_mask</code> 및 <code>labels</code> 필드를 갖도록 다차원화(unflatten) 합니다.</li>",zs,us,Fs,ds,ft="전체 데이터 집합에 전처리 기능을 적용하려면 🤗 Datasets <code>map</code> 메소드를 사용합니다. <code>batched=True</code>를 설정하여 데이터 집합의 여러 요소를 한 번에 처리하면 <code>map</code> 함수의 속도를 높일 수 있습니다:",Ns,ys,Hs,gs,ht="<code>DataCollatorForMultipleChoice</code>는 모든 모델 입력을 평탄화하고 패딩을 적용하며 그 결과를 결과를 다차원화합니다:",Qs,bs,Es,js,As,$s,ut='훈련 중에 메트릭을 포함하면 모델의 성능을 평가하는 데 도움이 되는 경우가 많습니다. 🤗<a href="https://huggingface.co/docs/evaluate/index" rel="nofollow">Evaluate</a> 라이브러리를 사용하여 평가 방법을 빠르게 가져올 수 있습니다. 이 작업에서는 <a href="https://huggingface.co/spaces/evaluate-metric/accuracy" rel="nofollow">accuracy</a> 지표를 가져옵니다(🤗 Evaluate <a href="https://huggingface.co/docs/evaluate/a_quick_tour" rel="nofollow">둘러보기</a>를 참조하여 지표를 가져오고 계산하는 방법에 대해 자세히 알아보세요):',qs,ws,Ss,Js,dt="그리고 예측과 레이블을 <code>compute</code>에 전달하여 정확도를 계산하는 함수를 만듭니다:",Ls,Ts,Ps,Us,yt="이제 <code>compute_metrics</code> 함수를 사용할 준비가 되었으며, 훈련을 설정할 때 이 함수로 돌아가게 됩니다.",Ds,ks,Ks,ps,Os,rs,st,_s,tt,Zs,gt="이제 모델을 미세 조정했으니 추론에 사용할 수 있습니다!",et,Cs,bt="텍스트와 두 개의 후보 답안을 작성합니다:",lt,Ws,at,is,nt,vs,pt,xs,rt;return w=new Gs({props:{title:"객관식 문제",local:"multiple-choice",headingTag:"h1"}}),x=new Rt({props:{classNames:"absolute z-10 right-0 top-0",options:[{label:"Mixed",value:"https://colab.research.google.com/github/huggingface/notebooks/blob/main/transformers_doc/ko/multiple_choice.ipynb"},{label:"PyTorch",value:"https://colab.research.google.com/github/huggingface/notebooks/blob/main/transformers_doc/ko/pytorch/multiple_choice.ipynb"},{label:"TensorFlow",value:"https://colab.research.google.com/github/huggingface/notebooks/blob/main/transformers_doc/ko/tensorflow/multiple_choice.ipynb"},{label:"Mixed",value:"https://studiolab.sagemaker.aws/import/github/huggingface/notebooks/blob/main/transformers_doc/ko/multiple_choice.ipynb"},{label:"PyTorch",value:"https://studiolab.sagemaker.aws/import/github/huggingface/notebooks/blob/main/transformers_doc/ko/pytorch/multiple_choice.ipynb"},{label:"TensorFlow",value:"https://studiolab.sagemaker.aws/import/github/huggingface/notebooks/blob/main/transformers_doc/ko/tensorflow/multiple_choice.ipynb"}]}}),o=new G({props:{code:"cGlwJTIwaW5zdGFsbCUyMHRyYW5zZm9ybWVycyUyMGRhdGFzZXRzJTIwZXZhbHVhdGU=",highlighted:"pip install transformers datasets evaluate",wrap:!1}}),N=new G({props:{code:"ZnJvbSUyMGh1Z2dpbmdmYWNlX2h1YiUyMGltcG9ydCUyMG5vdGVib29rX2xvZ2luJTBBJTBBbm90ZWJvb2tfbG9naW4oKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> huggingface_hub <span class="hljs-keyword">import</span> notebook_login

<span class="hljs-meta">&gt;&gt;&gt; </span>notebook_login()`,wrap:!1}}),H=new Gs({props:{title:"SWAG 데이터 세트 가져오기",local:"load-swag-dataset",headingTag:"h2"}}),Q=new G({props:{code:"ZnJvbSUyMGRhdGFzZXRzJTIwaW1wb3J0JTIwbG9hZF9kYXRhc2V0JTBBJTBBc3dhZyUyMCUzRCUyMGxvYWRfZGF0YXNldCglMjJzd2FnJTIyJTJDJTIwJTIycmVndWxhciUyMik=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> load_dataset

<span class="hljs-meta">&gt;&gt;&gt; </span>swag = load_dataset(<span class="hljs-string">&quot;swag&quot;</span>, <span class="hljs-string">&quot;regular&quot;</span>)`,wrap:!1}}),E=new G({props:{code:"c3dhZyU1QiUyMnRyYWluJTIyJTVEJTVCMCU1RA==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span>swag[<span class="hljs-string">&quot;train&quot;</span>][<span class="hljs-number">0</span>]
{<span class="hljs-string">&#x27;ending0&#x27;</span>: <span class="hljs-string">&#x27;passes by walking down the street playing their instruments.&#x27;</span>,
 <span class="hljs-string">&#x27;ending1&#x27;</span>: <span class="hljs-string">&#x27;has heard approaching them.&#x27;</span>,
 <span class="hljs-string">&#x27;ending2&#x27;</span>: <span class="hljs-string">&quot;arrives and they&#x27;re outside dancing and asleep.&quot;</span>,
 <span class="hljs-string">&#x27;ending3&#x27;</span>: <span class="hljs-string">&#x27;turns the lead singer watches the performance.&#x27;</span>,
 <span class="hljs-string">&#x27;fold-ind&#x27;</span>: <span class="hljs-string">&#x27;3416&#x27;</span>,
 <span class="hljs-string">&#x27;gold-source&#x27;</span>: <span class="hljs-string">&#x27;gold&#x27;</span>,
 <span class="hljs-string">&#x27;label&#x27;</span>: <span class="hljs-number">0</span>,
 <span class="hljs-string">&#x27;sent1&#x27;</span>: <span class="hljs-string">&#x27;Members of the procession walk down the street holding small horn brass instruments.&#x27;</span>,
 <span class="hljs-string">&#x27;sent2&#x27;</span>: <span class="hljs-string">&#x27;A drum line&#x27;</span>,
 <span class="hljs-string">&#x27;startphrase&#x27;</span>: <span class="hljs-string">&#x27;Members of the procession walk down the street holding small horn brass instruments. A drum line&#x27;</span>,
 <span class="hljs-string">&#x27;video-id&#x27;</span>: <span class="hljs-string">&#x27;anetv_jkn6uvmqwh4&#x27;</span>}`,wrap:!1}}),l=new Gs({props:{title:"전처리",local:"preprocess",headingTag:"h2"}}),Ms=new G({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMEElMEF0b2tlbml6ZXIlMjAlM0QlMjBBdXRvVG9rZW5pemVyLmZyb21fcHJldHJhaW5lZCglMjJnb29nbGUtYmVydCUyRmJlcnQtYmFzZS11bmNhc2VkJTIyKQ==",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>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;google-bert/bert-base-uncased&quot;</span>)`,wrap:!1}}),us=new G({props:{code:"ZW5kaW5nX25hbWVzJTIwJTNEJTIwJTVCJTIyZW5kaW5nMCUyMiUyQyUyMCUyMmVuZGluZzElMjIlMkMlMjAlMjJlbmRpbmcyJTIyJTJDJTIwJTIyZW5kaW5nMyUyMiU1RCUwQSUwQSUwQWRlZiUyMHByZXByb2Nlc3NfZnVuY3Rpb24oZXhhbXBsZXMpJTNBJTBBJTIwJTIwJTIwJTIwZmlyc3Rfc2VudGVuY2VzJTIwJTNEJTIwJTVCJTVCY29udGV4dCU1RCUyMColMjA0JTIwZm9yJTIwY29udGV4dCUyMGluJTIwZXhhbXBsZXMlNUIlMjJzZW50MSUyMiU1RCU1RCUwQSUyMCUyMCUyMCUyMHF1ZXN0aW9uX2hlYWRlcnMlMjAlM0QlMjBleGFtcGxlcyU1QiUyMnNlbnQyJTIyJTVEJTBBJTIwJTIwJTIwJTIwc2Vjb25kX3NlbnRlbmNlcyUyMCUzRCUyMCU1QiUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCU1QmYlMjIlN0JoZWFkZXIlN0QlMjAlN0JleGFtcGxlcyU1QmVuZCU1RCU1QmklNUQlN0QlMjIlMjBmb3IlMjBlbmQlMjBpbiUyMGVuZGluZ19uYW1lcyU1RCUyMGZvciUyMGklMkMlMjBoZWFkZXIlMjBpbiUyMGVudW1lcmF0ZShxdWVzdGlvbl9oZWFkZXJzKSUwQSUyMCUyMCUyMCUyMCU1RCUwQSUwQSUyMCUyMCUyMCUyMGZpcnN0X3NlbnRlbmNlcyUyMCUzRCUyMHN1bShmaXJzdF9zZW50ZW5jZXMlMkMlMjAlNUIlNUQpJTBBJTIwJTIwJTIwJTIwc2Vjb25kX3NlbnRlbmNlcyUyMCUzRCUyMHN1bShzZWNvbmRfc2VudGVuY2VzJTJDJTIwJTVCJTVEKSUwQSUwQSUyMCUyMCUyMCUyMHRva2VuaXplZF9leGFtcGxlcyUyMCUzRCUyMHRva2VuaXplcihmaXJzdF9zZW50ZW5jZXMlMkMlMjBzZWNvbmRfc2VudGVuY2VzJTJDJTIwdHJ1bmNhdGlvbiUzRFRydWUpJTBBJTIwJTIwJTIwJTIwcmV0dXJuJTIwJTdCayUzQSUyMCU1QnYlNUJpJTIwJTNBJTIwaSUyMCUyQiUyMDQlNUQlMjBmb3IlMjBpJTIwaW4lMjByYW5nZSgwJTJDJTIwbGVuKHYpJTJDJTIwNCklNUQlMjBmb3IlMjBrJTJDJTIwdiUyMGluJTIwdG9rZW5pemVkX2V4YW1wbGVzLml0ZW1zKCklN0Q=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span>ending_names = [<span class="hljs-string">&quot;ending0&quot;</span>, <span class="hljs-string">&quot;ending1&quot;</span>, <span class="hljs-string">&quot;ending2&quot;</span>, <span class="hljs-string">&quot;ending3&quot;</span>]


<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">def</span> <span class="hljs-title function_">preprocess_function</span>(<span class="hljs-params">examples</span>):
<span class="hljs-meta">... </span>    first_sentences = [[context] * <span class="hljs-number">4</span> <span class="hljs-keyword">for</span> context <span class="hljs-keyword">in</span> examples[<span class="hljs-string">&quot;sent1&quot;</span>]]
<span class="hljs-meta">... </span>    question_headers = examples[<span class="hljs-string">&quot;sent2&quot;</span>]
<span class="hljs-meta">... </span>    second_sentences = [
<span class="hljs-meta">... </span>        [<span class="hljs-string">f&quot;<span class="hljs-subst">{header}</span> <span class="hljs-subst">{examples[end][i]}</span>&quot;</span> <span class="hljs-keyword">for</span> end <span class="hljs-keyword">in</span> ending_names] <span class="hljs-keyword">for</span> i, header <span class="hljs-keyword">in</span> <span class="hljs-built_in">enumerate</span>(question_headers)
<span class="hljs-meta">... </span>    ]

<span class="hljs-meta">... </span>    first_sentences = <span class="hljs-built_in">sum</span>(first_sentences, [])
<span class="hljs-meta">... </span>    second_sentences = <span class="hljs-built_in">sum</span>(second_sentences, [])

<span class="hljs-meta">... </span>    tokenized_examples = tokenizer(first_sentences, second_sentences, truncation=<span class="hljs-literal">True</span>)
<span class="hljs-meta">... </span>    <span class="hljs-keyword">return</span> {k: [v[i : i + <span class="hljs-number">4</span>] <span class="hljs-keyword">for</span> i <span class="hljs-keyword">in</span> <span class="hljs-built_in">range</span>(<span class="hljs-number">0</span>, <span class="hljs-built_in">len</span>(v), <span class="hljs-number">4</span>)] <span class="hljs-keyword">for</span> k, v <span class="hljs-keyword">in</span> tokenized_examples.items()}`,wrap:!1}}),ys=new G({props:{code:"dG9rZW5pemVkX3N3YWclMjAlM0QlMjBzd2FnLm1hcChwcmVwcm9jZXNzX2Z1bmN0aW9uJTJDJTIwYmF0Y2hlZCUzRFRydWUp",highlighted:'tokenized_swag = swag.<span class="hljs-built_in">map</span>(preprocess_function, batched=<span class="hljs-literal">True</span>)',wrap:!1}}),bs=new G({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMERhdGFDb2xsYXRvckZvck11bHRpcGxlQ2hvaWNlJTBBY29sbGF0b3IlMjAlM0QlMjBEYXRhQ29sbGF0b3JGb3JNdWx0aXBsZUNob2ljZSh0b2tlbml6ZXIlM0R0b2tlbml6ZXIp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> DataCollatorForMultipleChoice
<span class="hljs-meta">&gt;&gt;&gt; </span>collator = DataCollatorForMultipleChoice(tokenizer=tokenizer)`,wrap:!1}}),js=new Gs({props:{title:"평가 하기",local:"evaluate",headingTag:"h2"}}),ws=new G({props:{code:"aW1wb3J0JTIwZXZhbHVhdGUlMEElMEFhY2N1cmFjeSUyMCUzRCUyMGV2YWx1YXRlLmxvYWQoJTIyYWNjdXJhY3klMjIp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> evaluate

<span class="hljs-meta">&gt;&gt;&gt; </span>accuracy = evaluate.load(<span class="hljs-string">&quot;accuracy&quot;</span>)`,wrap:!1}}),Ts=new G({props:{code:"aW1wb3J0JTIwbnVtcHklMjBhcyUyMG5wJTBBJTBBJTBBZGVmJTIwY29tcHV0ZV9tZXRyaWNzKGV2YWxfcHJlZCklM0ElMEElMjAlMjAlMjAlMjBwcmVkaWN0aW9ucyUyQyUyMGxhYmVscyUyMCUzRCUyMGV2YWxfcHJlZCUwQSUyMCUyMCUyMCUyMHByZWRpY3Rpb25zJTIwJTNEJTIwbnAuYXJnbWF4KHByZWRpY3Rpb25zJTJDJTIwYXhpcyUzRDEpJTBBJTIwJTIwJTIwJTIwcmV0dXJuJTIwYWNjdXJhY3kuY29tcHV0ZShwcmVkaWN0aW9ucyUzRHByZWRpY3Rpb25zJTJDJTIwcmVmZXJlbmNlcyUzRGxhYmVscyk=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> numpy <span class="hljs-keyword">as</span> np


<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">def</span> <span class="hljs-title function_">compute_metrics</span>(<span class="hljs-params">eval_pred</span>):
<span class="hljs-meta">... </span>    predictions, labels = eval_pred
<span class="hljs-meta">... </span>    predictions = np.argmax(predictions, axis=<span class="hljs-number">1</span>)
<span class="hljs-meta">... </span>    <span class="hljs-keyword">return</span> accuracy.compute(predictions=predictions, references=labels)`,wrap:!1}}),ks=new Gs({props:{title:"훈련 하기",local:"train",headingTag:"h2"}}),ps=new Ut({props:{pytorch:!0,tensorflow:!0,jax:!1,$$slots:{tensorflow:[Ft],pytorch:[Bt]},$$scope:{ctx:V}}}),rs=new mt({props:{$$slots:{default:[Nt]},$$scope:{ctx:V}}}),_s=new Gs({props:{title:"추론 하기",local:"inference",headingTag:"h2"}}),Ws=new G({props:{code:"cHJvbXB0JTIwJTNEJTIwJTIyRnJhbmNlJTIwaGFzJTIwYSUyMGJyZWFkJTIwbGF3JTJDJTIwTGUlMjBEJUMzJUE5Y3JldCUyMFBhaW4lMkMlMjB3aXRoJTIwc3RyaWN0JTIwcnVsZXMlMjBvbiUyMHdoYXQlMjBpcyUyMGFsbG93ZWQlMjBpbiUyMGElMjB0cmFkaXRpb25hbCUyMGJhZ3VldHRlLiUyMiUwQWNhbmRpZGF0ZTElMjAlM0QlMjAlMjJUaGUlMjBsYXclMjBkb2VzJTIwbm90JTIwYXBwbHklMjB0byUyMGNyb2lzc2FudHMlMjBhbmQlMjBicmlvY2hlLiUyMiUwQWNhbmRpZGF0ZTIlMjAlM0QlMjAlMjJUaGUlMjBsYXclMjBhcHBsaWVzJTIwdG8lMjBiYWd1ZXR0ZXMuJTIy",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span>prompt = <span class="hljs-string">&quot;France has a bread law, Le Décret Pain, with strict rules on what is allowed in a traditional baguette.&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>candidate1 = <span class="hljs-string">&quot;The law does not apply to croissants and brioche.&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>candidate2 = <span class="hljs-string">&quot;The law applies to baguettes.&quot;</span>`,wrap:!1}}),is=new Ut({props:{pytorch:!0,tensorflow:!0,jax:!1,$$slots:{tensorflow:[At],pytorch:[Qt]},$$scope:{ctx:V}}}),vs=new xt({props:{source:"https://github.com/huggingface/transformers/blob/main/docs/source/ko/tasks/multiple_choice.md"}}),{c(){a=b("meta"),M=i(),n=b("p"),c=i(),f(w.$$.fragment),k=i(),f(x.$$.fragment),C=i(),_=b("p"),_.textContent=X,Z=i(),I=b("p"),I.textContent=R,U=i(),W=b("ol"),W.innerHTML=r,T=i(),B=b("p"),B.textContent=F,z=i(),f(o.$$.fragment),v=i(),Y=b("p"),Y.textContent=Xs,ss=i(),f(N.$$.fragment),ts=i(),f(H.$$.fragment),ms=i(),q=b("p"),q.textContent=P,es=i(),f(Q.$$.fragment),os=i(),S=b("p"),S.textContent=D,ls=i(),f(E.$$.fragment),cs=i(),L=b("p"),L.textContent=K,as=i(),A=b("ul"),A.innerHTML=Rs,ns=i(),f(l.$$.fragment),$=i(),O=b("p"),O.textContent=ot,Is=i(),f(Ms.$$.fragment),Bs=i(),fs=b("p"),fs.textContent=ct,Ys=i(),hs=b("ol"),hs.innerHTML=Mt,zs=i(),f(us.$$.fragment),Fs=i(),ds=b("p"),ds.innerHTML=ft,Ns=i(),f(ys.$$.fragment),Hs=i(),gs=b("p"),gs.innerHTML=ht,Qs=i(),f(bs.$$.fragment),Es=i(),f(js.$$.fragment),As=i(),$s=b("p"),$s.innerHTML=ut,qs=i(),f(ws.$$.fragment),Ss=i(),Js=b("p"),Js.innerHTML=dt,Ls=i(),f(Ts.$$.fragment),Ps=i(),Us=b("p"),Us.innerHTML=yt,Ds=i(),f(ks.$$.fragment),Ks=i(),f(ps.$$.fragment),Os=i(),f(rs.$$.fragment),st=i(),f(_s.$$.fragment),tt=i(),Zs=b("p"),Zs.textContent=gt,et=i(),Cs=b("p"),Cs.textContent=bt,lt=i(),f(Ws.$$.fragment),at=i(),f(is.$$.fragment),nt=i(),f(vs.$$.fragment),pt=i(),xs=b("p"),this.h()},l(s){const p=Wt("svelte-u9bgzb",document.head);a=j(p,"META",{name:!0,content:!0}),p.forEach(t),M=m(s),n=j(s,"P",{}),Jt(n).forEach(t),c=m(s),h(w.$$.fragment,s),k=m(s),h(x.$$.fragment,s),C=m(s),_=j(s,"P",{"data-svelte-h":!0}),J(_)!=="svelte-13wfm6g"&&(_.textContent=X),Z=m(s),I=j(s,"P",{"data-svelte-h":!0}),J(I)!=="svelte-10q09rv"&&(I.textContent=R),U=m(s),W=j(s,"OL",{"data-svelte-h":!0}),J(W)!=="svelte-1eak31y"&&(W.innerHTML=r),T=m(s),B=j(s,"P",{"data-svelte-h":!0}),J(B)!=="svelte-1k0z9pm"&&(B.textContent=F),z=m(s),h(o.$$.fragment,s),v=m(s),Y=j(s,"P",{"data-svelte-h":!0}),J(Y)!=="svelte-c0su0x"&&(Y.textContent=Xs),ss=m(s),h(N.$$.fragment,s),ts=m(s),h(H.$$.fragment,s),ms=m(s),q=j(s,"P",{"data-svelte-h":!0}),J(q)!=="svelte-3ax2l8"&&(q.textContent=P),es=m(s),h(Q.$$.fragment,s),os=m(s),S=j(s,"P",{"data-svelte-h":!0}),J(S)!=="svelte-z8zknl"&&(S.textContent=D),ls=m(s),h(E.$$.fragment,s),cs=m(s),L=j(s,"P",{"data-svelte-h":!0}),J(L)!=="svelte-uhrqn8"&&(L.textContent=K),as=m(s),A=j(s,"UL",{"data-svelte-h":!0}),J(A)!=="svelte-12h9927"&&(A.innerHTML=Rs),ns=m(s),h(l.$$.fragment,s),$=m(s),O=j(s,"P",{"data-svelte-h":!0}),J(O)!=="svelte-1ytvevd"&&(O.textContent=ot),Is=m(s),h(Ms.$$.fragment,s),Bs=m(s),fs=j(s,"P",{"data-svelte-h":!0}),J(fs)!=="svelte-dr5hbo"&&(fs.textContent=ct),Ys=m(s),hs=j(s,"OL",{"data-svelte-h":!0}),J(hs)!=="svelte-1ur4b3u"&&(hs.innerHTML=Mt),zs=m(s),h(us.$$.fragment,s),Fs=m(s),ds=j(s,"P",{"data-svelte-h":!0}),J(ds)!=="svelte-1yi4yhv"&&(ds.innerHTML=ft),Ns=m(s),h(ys.$$.fragment,s),Hs=m(s),gs=j(s,"P",{"data-svelte-h":!0}),J(gs)!=="svelte-q9au9u"&&(gs.innerHTML=ht),Qs=m(s),h(bs.$$.fragment,s),Es=m(s),h(js.$$.fragment,s),As=m(s),$s=j(s,"P",{"data-svelte-h":!0}),J($s)!=="svelte-fmkx3s"&&($s.innerHTML=ut),qs=m(s),h(ws.$$.fragment,s),Ss=m(s),Js=j(s,"P",{"data-svelte-h":!0}),J(Js)!=="svelte-ezofyo"&&(Js.innerHTML=dt),Ls=m(s),h(Ts.$$.fragment,s),Ps=m(s),Us=j(s,"P",{"data-svelte-h":!0}),J(Us)!=="svelte-7zql7p"&&(Us.innerHTML=yt),Ds=m(s),h(ks.$$.fragment,s),Ks=m(s),h(ps.$$.fragment,s),Os=m(s),h(rs.$$.fragment,s),st=m(s),h(_s.$$.fragment,s),tt=m(s),Zs=j(s,"P",{"data-svelte-h":!0}),J(Zs)!=="svelte-174wmmm"&&(Zs.textContent=gt),et=m(s),Cs=j(s,"P",{"data-svelte-h":!0}),J(Cs)!=="svelte-1h2wndb"&&(Cs.textContent=bt),lt=m(s),h(Ws.$$.fragment,s),at=m(s),h(is.$$.fragment,s),nt=m(s),h(vs.$$.fragment,s),pt=m(s),xs=j(s,"P",{}),Jt(xs).forEach(t),this.h()},h(){Tt(a,"name","hf:doc:metadata"),Tt(a,"content",St)},m(s,p){vt(document.head,a),e(s,M,p),e(s,n,p),e(s,c,p),u(w,s,p),e(s,k,p),u(x,s,p),e(s,C,p),e(s,_,p),e(s,Z,p),e(s,I,p),e(s,U,p),e(s,W,p),e(s,T,p),e(s,B,p),e(s,z,p),u(o,s,p),e(s,v,p),e(s,Y,p),e(s,ss,p),u(N,s,p),e(s,ts,p),u(H,s,p),e(s,ms,p),e(s,q,p),e(s,es,p),u(Q,s,p),e(s,os,p),e(s,S,p),e(s,ls,p),u(E,s,p),e(s,cs,p),e(s,L,p),e(s,as,p),e(s,A,p),e(s,ns,p),u(l,s,p),e(s,$,p),e(s,O,p),e(s,Is,p),u(Ms,s,p),e(s,Bs,p),e(s,fs,p),e(s,Ys,p),e(s,hs,p),e(s,zs,p),u(us,s,p),e(s,Fs,p),e(s,ds,p),e(s,Ns,p),u(ys,s,p),e(s,Hs,p),e(s,gs,p),e(s,Qs,p),u(bs,s,p),e(s,Es,p),u(js,s,p),e(s,As,p),e(s,$s,p),e(s,qs,p),u(ws,s,p),e(s,Ss,p),e(s,Js,p),e(s,Ls,p),u(Ts,s,p),e(s,Ps,p),e(s,Us,p),e(s,Ds,p),u(ks,s,p),e(s,Ks,p),u(ps,s,p),e(s,Os,p),u(rs,s,p),e(s,st,p),u(_s,s,p),e(s,tt,p),e(s,Zs,p),e(s,et,p),e(s,Cs,p),e(s,lt,p),u(Ws,s,p),e(s,at,p),u(is,s,p),e(s,nt,p),u(vs,s,p),e(s,pt,p),e(s,xs,p),rt=!0},p(s,[p]){const jt={};p&2&&(jt.$$scope={dirty:p,ctx:s}),ps.$set(jt);const $t={};p&2&&($t.$$scope={dirty:p,ctx:s}),rs.$set($t);const wt={};p&2&&(wt.$$scope={dirty:p,ctx:s}),is.$set(wt)},i(s){rt||(d(w.$$.fragment,s),d(x.$$.fragment,s),d(o.$$.fragment,s),d(N.$$.fragment,s),d(H.$$.fragment,s),d(Q.$$.fragment,s),d(E.$$.fragment,s),d(l.$$.fragment,s),d(Ms.$$.fragment,s),d(us.$$.fragment,s),d(ys.$$.fragment,s),d(bs.$$.fragment,s),d(js.$$.fragment,s),d(ws.$$.fragment,s),d(Ts.$$.fragment,s),d(ks.$$.fragment,s),d(ps.$$.fragment,s),d(rs.$$.fragment,s),d(_s.$$.fragment,s),d(Ws.$$.fragment,s),d(is.$$.fragment,s),d(vs.$$.fragment,s),rt=!0)},o(s){y(w.$$.fragment,s),y(x.$$.fragment,s),y(o.$$.fragment,s),y(N.$$.fragment,s),y(H.$$.fragment,s),y(Q.$$.fragment,s),y(E.$$.fragment,s),y(l.$$.fragment,s),y(Ms.$$.fragment,s),y(us.$$.fragment,s),y(ys.$$.fragment,s),y(bs.$$.fragment,s),y(js.$$.fragment,s),y(ws.$$.fragment,s),y(Ts.$$.fragment,s),y(ks.$$.fragment,s),y(ps.$$.fragment,s),y(rs.$$.fragment,s),y(_s.$$.fragment,s),y(Ws.$$.fragment,s),y(is.$$.fragment,s),y(vs.$$.fragment,s),rt=!1},d(s){s&&(t(M),t(n),t(c),t(k),t(C),t(_),t(Z),t(I),t(U),t(W),t(T),t(B),t(z),t(v),t(Y),t(ss),t(ts),t(ms),t(q),t(es),t(os),t(S),t(ls),t(cs),t(L),t(as),t(A),t(ns),t($),t(O),t(Is),t(Bs),t(fs),t(Ys),t(hs),t(zs),t(Fs),t(ds),t(Ns),t(Hs),t(gs),t(Qs),t(Es),t(As),t($s),t(qs),t(Ss),t(Js),t(Ls),t(Ps),t(Us),t(Ds),t(Ks),t(Os),t(st),t(tt),t(Zs),t(et),t(Cs),t(lt),t(at),t(nt),t(pt),t(xs)),t(a),g(w,s),g(x,s),g(o,s),g(N,s),g(H,s),g(Q,s),g(E,s),g(l,s),g(Ms,s),g(us,s),g(ys,s),g(bs,s),g(js,s),g(ws,s),g(Ts,s),g(ks,s),g(ps,s),g(rs,s),g(_s,s),g(Ws,s),g(is,s),g(vs,s)}}}const St='{"title":"객관식 문제","local":"multiple-choice","sections":[{"title":"SWAG 데이터 세트 가져오기","local":"load-swag-dataset","sections":[],"depth":2},{"title":"전처리","local":"preprocess","sections":[],"depth":2},{"title":"평가 하기","local":"evaluate","sections":[],"depth":2},{"title":"훈련 하기","local":"train","sections":[],"depth":2},{"title":"추론 하기","local":"inference","sections":[],"depth":2}],"depth":1}';function Lt(V){return _t(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class le extends Zt{constructor(a){super(),Ct(this,a,Lt,qt,kt,{})}}export{le as component};
