import{s as oe,o as ce,n as Me}from"../chunks/scheduler.bdbef820.js";import{S as me,i as re,g as p,s as a,r as c,A as de,h as i,f as l,c as n,j as ie,u as m,x as M,k as N,y as he,a as e,v as r,d,t as h,w as j,m as je,n as ye}from"../chunks/index.33f81d56.js";import{T as ml}from"../chunks/Tip.34194030.js";import{C as g}from"../chunks/CodeBlock.3bad7fc9.js";import{D as Je}from"../chunks/DocNotebookDropdown.339158fb.js";import{H as u,E as ge}from"../chunks/index.e01163b6.js";function ue(T){let o;return{c(){o=je("다음 예제를 비양자화된 버전의 모델 체크포인트로 실행하려면 최소 20GB의 GPU 메모리가 필요합니다.")},l(J){o=ye(J,"다음 예제를 비양자화된 버전의 모델 체크포인트로 실행하려면 최소 20GB의 GPU 메모리가 필요합니다.")},m(J,y){e(J,o,y)},d(J){J&&l(o)}}}function Te(T){let o,J=`<code>max_new_tokens</code>의 크기를 증가시킬 때 발생할 수 있는 오류를 피하기 위해 <code>generate</code> 호출 시 <code>bad_words_ids</code>를 포함하는 것이 좋습니다. 모델로부터 생성된 이미지가 없을 때 새로운 <code>&lt;image&gt;</code> 또는 <code>&lt;fake_token_around_image&gt;</code> 토큰을 생성하려고 하기 때문입니다.
이 가이드에서처럼 <code>bad_words_ids</code>를 함수 호출 시에 매개변수로 설정하거나, <a href="../generation_strategies">텍스트 생성 전략</a> 가이드에 설명된 대로 <code>GenerationConfig</code>에 저장할 수도 있습니다.`;return{c(){o=p("p"),o.innerHTML=J},l(y){o=i(y,"P",{"data-svelte-h":!0}),M(o)!=="svelte-197yhnw"&&(o.innerHTML=J)},m(y,f){e(y,o,f)},p:Me,d(y){y&&l(o)}}}function fe(T){let o,J='이처럼 긴 텍스트를 생성할 때는 텍스트 생성 전략을 조정하는 것이 좋습니다. 이렇게 하면 생성된 결과물의 품질을 크게 향상시킬 수 있습니다. 자세한 내용은 <a href="../generation_strategies">텍스트 생성 전략</a>을 참조하세요.';return{c(){o=p("p"),o.innerHTML=J},l(y){o=i(y,"P",{"data-svelte-h":!0}),M(o)!=="svelte-tpw64k"&&(o.innerHTML=J)},m(y,f){e(y,o,f)},p:Me,d(y){y&&l(o)}}}function Ue(T){let o,J,y,f,_,Ys,x,Fs,G,rl="개별 작업은 특화된 모델을 미세 조정하여 처리할 수 있지만, 최근 등장하여 인기를 얻고 있는 방식은 대규모 모델을 미세 조정 없이 다양한 작업에 사용하는 것입니다. 예를 들어, 대규모 언어 모델은 요약, 번역, 분류 등과 같은 자연어처리 (NLP) 작업을 처리할 수 있습니다. 이 접근 방식은 텍스트와 같은 단일 모달리티에 국한되지 않으며, 이 가이드에서는 IDEFICS라는 대규모 멀티모달 모델을 사용하여 이미지-텍스트 작업을 다루는 방법을 설명합니다.",As,v,dl='<a href="../model_doc/idefics">IDEFICS</a>는 <a href="https://huggingface.co/papers/2204.14198" rel="nofollow">Flamingo</a>를 기반으로 하는 오픈 액세스 비전 및 언어 모델로, DeepMind에서 처음 개발한 최신 시각 언어 모델입니다. 이 모델은 임의의 이미지 및 텍스트 입력 시퀀스를 받아 일관성 있는 텍스트를 출력으로 생성합니다. 이미지에 대한 질문에 답변하고, 시각적인 내용을 설명하며, 여러 이미지에 기반한 이야기를 생성하는 등 다양한 작업을 수행할 수 있습니다. IDEFICS는 <a href="https://huggingface.co/HuggingFaceM4/idefics-80b" rel="nofollow">800억 파라미터</a>와 <a href="https://huggingface.co/HuggingFaceM4/idefics-9b" rel="nofollow">90억 파라미터</a> 두 가지 버전을 제공하며, 두 버전 모두 🤗 Hub에서 이용할 수 있습니다. 각 버전에는 대화형 사용 사례에 맞게 미세 조정된 버전도 있습니다.',qs,B,hl="이 모델은 매우 다재다능하며 광범위한 이미지 및 멀티모달 작업에 사용될 수 있습니다. 그러나 대규모 모델이기 때문에 상당한 컴퓨팅 자원과 인프라가 필요합니다. 각 개별 작업에 특화된 모델을 미세 조정하는 것보다 모델을 그대로 사용하는 것이 더 적합한지는 사용자가 판단해야 합니다.",Ss,Q,jl="이 가이드에서는 다음을 배우게 됩니다:",Ds,z,yl='<li><a href="#loading-the-model">IDEFICS 로드하기</a> 및 <a href="#quantized-model">양자화된 버전의 모델 로드하기</a></li> <li>IDEFICS를 사용하여:<ul><li><a href="#image-captioning">이미지 캡셔닝</a></li> <li><a href="#prompted-image-captioning">프롬프트 이미지 캡셔닝</a></li> <li><a href="#few-shot-prompting">퓨샷 프롬프트</a></li> <li><a href="#visual-question-answering">시각적 질의 응답</a></li> <li><a href="#image-classification">이미지 분류</a></li> <li><a href="#image-guided-text-generation">이미지 기반 텍스트 생성</a></li></ul></li> <li><a href="#running-inference-in-batch-mode">배치 모드에서 추론 실행</a></li> <li><a href="#idefics-instruct-for-conversational-use">대화형 사용을 위한 IDEFICS 인스트럭트 실행</a></li>',Ls,V,Jl="시작하기 전에 필요한 모든 라이브러리가 설치되어 있는지 확인하세요.",Ps,X,Os,U,Ks,H,st,$,gl="모델을 90억 파라미터 버전의 체크포인트로 로드해 봅시다:",tt,E,lt,Y,ul=`다른 Transformers 모델과 마찬가지로, 체크포인트에서 프로세서와 모델 자체를 로드해야 합니다.
IDEFICS 프로세서는 <a href="/docs/transformers/main/ko/model_doc/llama2#transformers.LlamaTokenizer">LlamaTokenizer</a>와 IDEFICS 이미지 프로세서를 하나의 프로세서로 감싸서 텍스트와 이미지 입력을 모델에 맞게 준비합니다.`,et,F,at,A,Tl="<code>device_map</code>을 <code>&quot;auto&quot;</code>로 설정하면 사용 중인 장치를 고려하여 모델 가중치를 가장 최적화된 방식으로 로드하고 저장하는 방법을 자동으로 결정합니다.",nt,q,pt,S,fl="고용량 GPU 사용이 어려운 경우, 모델의 양자화된 버전을 로드할 수 있습니다. 모델과 프로세서를 4비트 정밀도로 로드하기 위해서, <code>from_pretrained</code> 메소드에 <code>BitsAndBytesConfig</code>를 전달하면 모델이 로드되는 동안 실시간으로 압축됩니다.",it,D,Mt,L,Ul="이제 모델을 제안된 방법 중 하나로 로드했으니, IDEFICS를 사용할 수 있는 작업들을 탐구해봅시다.",ot,P,ct,O,wl="이미지 캡셔닝은 주어진 이미지에 대한 캡션을 예측하는 작업입니다. 일반적인 응용 분야는 시각 장애인이 다양한 상황을 탐색할 수 있도록 돕는 것입니다. 예를 들어, 온라인에서 이미지 콘텐츠를 탐색하는 데 도움을 줄 수 있습니다.",mt,K,bl="작업을 설명하기 위해 캡션을 달 이미지 예시를 가져옵니다. 예시:",rt,w,Zl='<img src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/transformers/tasks/idefics-im-captioning.jpg" alt="Image of a puppy in a flower bed"/>',dt,ss,Il='사진 제공: <a href="https://unsplash.com/@hendoo" rel="nofollow">Hendo Wang</a>.',ht,ts,Cl="IDEFICS는 텍스트 및 이미지 프롬프트를 모두 수용합니다. 그러나 이미지를 캡션하기 위해 모델에 텍스트 프롬프트를 제공할 필요는 없습니다. 전처리된 입력 이미지만 제공하면 됩니다. 텍스트 프롬프트 없이 모델은 BOS(시퀀스 시작) 토큰부터 텍스트 생성을 시작하여 캡션을 만듭니다.",jt,ls,kl="모델에 이미지 입력으로는 이미지 객체(<code>PIL.Image</code>) 또는 이미지를 가져올 수 있는 URL을 사용할 수 있습니다.",yt,es,Jt,b,gt,as,ut,ns,Rl="텍스트 프롬프트를 이용하여 이미지 캡셔닝을 확장할 수 있으며, 모델은 주어진 이미지를 바탕으로 텍스트를 계속 생성합니다. 다음 이미지를 예시로 들어보겠습니다:",Tt,Z,Wl='<img src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/transformers/tasks/idefics-prompted-im-captioning.jpg" alt="Image of the Eiffel Tower at night"/>',ft,ps,Nl='사진 제공: <a href="https://unsplash.com/@dnevozhai" rel="nofollow">Denys Nevozhai</a>.',Ut,is,_l="텍스트 및 이미지 프롬프트는 적절한 입력을 생성하기 위해 모델의 프로세서에 하나의 목록으로 전달될 수 있습니다.",wt,Ms,bt,os,Zt,cs,xl=`IDEFICS는 훌륭한 제로샷 결과를 보여주지만, 작업에 특정 형식의 캡션이 필요하거나 작업의 복잡성을 높이는 다른 제한 사항이나 요구 사항이 있을 수 있습니다. 이럴 때 퓨샷 프롬프트를 사용하여 맥락 내 학습(In-Context Learning)을 가능하게 할 수 있습니다.
프롬프트에 예시를 제공함으로써 모델이 주어진 예시의 형식을 모방한 결과를 생성하도록 유도할 수 있습니다.`,It,ms,Gl=`이전의 에펠탑 이미지를 모델에 예시로 사용하고, 모델에게 이미지의 객체를 학습하는 것 외에도 흥미로운 정보를 얻고 싶다는 것을 보여주는 프롬프트를 작성해 봅시다.
그런 다음 자유의 여신상 이미지에 대해 동일한 응답 형식을 얻을 수 있는지 확인해 봅시다:`,Ct,I,vl='<img src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/transformers/tasks/idefics-few-shot.jpg" alt="Image of the Statue of Liberty"/>',kt,rs,Bl='사진 제공: <a href="https://unsplash.com/@jmayobres" rel="nofollow">Juan Mayobre</a>.',Rt,ds,Wt,hs,Ql="단 하나의 예시만으로도(즉, 1-shot) 모델이 작업 수행 방법을 학습했다는 점이 주목할 만합니다. 더 복잡한 작업의 경우, 더 많은 예시(예: 3-shot, 5-shot 등)를 사용하여 실험해 보는 것도 좋은 방법입니다.",Nt,js,_t,ys,zl="시각적 질의 응답(VQA)은 이미지를 기반으로 개방형 질문에 답하는 작업입니다. 이미지 캡셔닝과 마찬가지로 접근성 애플리케이션에서 사용할 수 있지만, 교육(시각 자료에 대한 추론), 고객 서비스(이미지를 기반으로 한 제품 질문), 이미지 검색 등에서도 사용할 수 있습니다.",xt,Js,Vl="이 작업을 위해 새로운 이미지를 가져옵니다:",Gt,C,Xl='<img src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/transformers/tasks/idefics-vqa.jpg" alt="Image of a couple having a picnic"/>',vt,gs,Hl='사진 제공: <a href="https://unsplash.com/@jarritos" rel="nofollow">Jarritos Mexican Soda</a>.',Bt,us,$l="적절한 지시문을 사용하면 이미지 캡셔닝에서 시각적 질의 응답으로 모델을 유도할 수 있습니다:",Qt,Ts,zt,fs,Vt,Us,El="IDEFICS는 특정 카테고리의 라벨이 포함된 데이터로 명시적으로 학습되지 않아도 이미지를 다양한 카테고리로 분류할 수 있습니다. 카테고리 목록이 주어지면, 모델은 이미지와 텍스트 이해 능력을 사용하여 이미지가 속할 가능성이 높은 카테고리를 추론할 수 있습니다.",Xt,ws,Yl="여기에 야채 가판대 이미지가 있습니다.",Ht,k,Fl='<img src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/transformers/tasks/idefics-classification.jpg" alt="Image of a vegetable stand"/>',$t,bs,Al='사진 제공: <a href="https://unsplash.com/@peterwendt" rel="nofollow">Peter Wendt</a>.',Et,Zs,ql="우리는 모델에게 우리가 가진 카테고리 중 하나로 이미지를 분류하도록 지시할 수 있습니다:",Yt,Is,Ft,Cs,Sl="위 예제에서는 모델에게 이미지를 단일 카테고리로 분류하도록 지시했지만, 순위 분류를 하도록 모델에 프롬프트를 제공할 수도 있습니다.",At,ks,qt,Rs,Dl="이미지를 활용한 텍스트 생성 기술을 사용하면 더욱 창의적인 작업이 가능합니다. 이 기술은 이미지를 바탕으로 텍스트를 만들어내며, 제품 설명, 광고 문구, 장면 묘사 등 다양한 용도로 활용할 수 있습니다.",St,Ws,Ll="간단한 예로, 빨간 문 이미지를 IDEFICS에 입력하여 이야기를 만들어보겠습니다:",Dt,R,Pl='<img src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/transformers/tasks/idefics-story-generation.jpg" alt="Image of a red door with a pumpkin on the steps"/>',Lt,Ns,Ol='사진 제공: <a href="https://unsplash.com/@devonshiremedia" rel="nofollow">Craig Tidball</a>.',Pt,_s,Ot,xs,Kl="IDEFICS가 문 앞에 있는 호박을 보고 유령에 대한 으스스한 할로윈 이야기를 만든 것 같습니다.",Kt,W,sl,Gs,tl,vs,se="앞선 모든 섹션에서는 단일 예시에 대해 IDEFICS를 설명했습니다. 이와 매우 유사한 방식으로, 프롬프트 목록을 전달하여 여러 예시에 대한 추론을 실행할 수 있습니다:",ll,Bs,el,Qs,al,zs,te="대화형 사용 사례를 위해, 🤗 Hub에서 명령어 수행에 최적화된 버전의 모델을 찾을 수 있습니다. 이곳에는 <code>HuggingFaceM4/idefics-80b-instruct</code>와 <code>HuggingFaceM4/idefics-9b-instruct</code>가 있습니다.",nl,Vs,le="이 체크포인트는 지도 학습 및 명령어 미세 조정 데이터셋의 혼합으로 각각의 기본 모델을 미세 조정한 결과입니다. 이를 통해 모델의 하위 작업 성능을 향상시키는 동시에 대화형 환경에서 모델을 더 사용하기 쉽게 합니다.",pl,Xs,ee="대화형 사용을 위한 사용법 및 프롬프트는 기본 모델을 사용하는 것과 매우 유사합니다.",il,Hs,Ml,$s,ol,Es,cl;return _=new u({props:{title:"IDEFICS를 이용한 이미지 작업",local:"image-tasks-with-idefics",headingTag:"h1"}}),x=new Je({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/idefics.ipynb"},{label:"PyTorch",value:"https://colab.research.google.com/github/huggingface/notebooks/blob/main/transformers_doc/ko/pytorch/idefics.ipynb"},{label:"TensorFlow",value:"https://colab.research.google.com/github/huggingface/notebooks/blob/main/transformers_doc/ko/tensorflow/idefics.ipynb"},{label:"Mixed",value:"https://studiolab.sagemaker.aws/import/github/huggingface/notebooks/blob/main/transformers_doc/ko/idefics.ipynb"},{label:"PyTorch",value:"https://studiolab.sagemaker.aws/import/github/huggingface/notebooks/blob/main/transformers_doc/ko/pytorch/idefics.ipynb"},{label:"TensorFlow",value:"https://studiolab.sagemaker.aws/import/github/huggingface/notebooks/blob/main/transformers_doc/ko/tensorflow/idefics.ipynb"}]}}),X=new g({props:{code:"cGlwJTIwaW5zdGFsbCUyMC1xJTIwYml0c2FuZGJ5dGVzJTIwc2VudGVuY2VwaWVjZSUyMGFjY2VsZXJhdGUlMjB0cmFuc2Zvcm1lcnM=",highlighted:"pip install -q bitsandbytes sentencepiece accelerate transformers",wrap:!1}}),U=new ml({props:{$$slots:{default:[ue]},$$scope:{ctx:T}}}),H=new u({props:{title:"모델 로드",local:"loading-the-model",headingTag:"h2"}}),E=new g({props:{code:"Y2hlY2twb2ludCUyMCUzRCUyMCUyMkh1Z2dpbmdGYWNlTTQlMkZpZGVmaWNzLTliJTIy",highlighted:'<span class="hljs-meta">&gt;&gt;&gt; </span>checkpoint = <span class="hljs-string">&quot;HuggingFaceM4/idefics-9b&quot;</span>',wrap:!1}}),F=new g({props:{code:"aW1wb3J0JTIwdG9yY2glMEElMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwSWRlZmljc0ZvclZpc2lvblRleHQyVGV4dCUyQyUyMEF1dG9Qcm9jZXNzb3IlMEElMEFwcm9jZXNzb3IlMjAlM0QlMjBBdXRvUHJvY2Vzc29yLmZyb21fcHJldHJhaW5lZChjaGVja3BvaW50KSUwQSUwQW1vZGVsJTIwJTNEJTIwSWRlZmljc0ZvclZpc2lvblRleHQyVGV4dC5mcm9tX3ByZXRyYWluZWQoY2hlY2twb2ludCUyQyUyMHRvcmNoX2R0eXBlJTNEdG9yY2guYmZsb2F0MTYlMkMlMjBkZXZpY2VfbWFwJTNEJTIyYXV0byUyMik=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> IdeficsForVisionText2Text, AutoProcessor

<span class="hljs-meta">&gt;&gt;&gt; </span>processor = AutoProcessor.from_pretrained(checkpoint)

<span class="hljs-meta">&gt;&gt;&gt; </span>model = IdeficsForVisionText2Text.from_pretrained(checkpoint, torch_dtype=torch.bfloat16, device_map=<span class="hljs-string">&quot;auto&quot;</span>)`,wrap:!1}}),q=new u({props:{title:"양자화된 모델",local:"quantized-model",headingTag:"h3"}}),D=new g({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwSWRlZmljc0ZvclZpc2lvblRleHQyVGV4dCUyQyUyMEF1dG9Qcm9jZXNzb3IlMkMlMjBCaXRzQW5kQnl0ZXNDb25maWclMEElMEFxdWFudGl6YXRpb25fY29uZmlnJTIwJTNEJTIwQml0c0FuZEJ5dGVzQ29uZmlnKCUwQSUyMCUyMCUyMCUyMGxvYWRfaW5fNGJpdCUzRFRydWUlMkMlMEElMjAlMjAlMjAlMjBibmJfNGJpdF9jb21wdXRlX2R0eXBlJTNEdG9yY2guZmxvYXQxNiUyQyUwQSklMEElMEFwcm9jZXNzb3IlMjAlM0QlMjBBdXRvUHJvY2Vzc29yLmZyb21fcHJldHJhaW5lZChjaGVja3BvaW50KSUwQSUwQW1vZGVsJTIwJTNEJTIwSWRlZmljc0ZvclZpc2lvblRleHQyVGV4dC5mcm9tX3ByZXRyYWluZWQoJTBBJTIwJTIwJTIwJTIwY2hlY2twb2ludCUyQyUwQSUyMCUyMCUyMCUyMHF1YW50aXphdGlvbl9jb25maWclM0RxdWFudGl6YXRpb25fY29uZmlnJTJDJTBBJTIwJTIwJTIwJTIwZGV2aWNlX21hcCUzRCUyMmF1dG8lMjIlMEEp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> IdeficsForVisionText2Text, AutoProcessor, BitsAndBytesConfig

<span class="hljs-meta">&gt;&gt;&gt; </span>quantization_config = BitsAndBytesConfig(
<span class="hljs-meta">... </span>    load_in_4bit=<span class="hljs-literal">True</span>,
<span class="hljs-meta">... </span>    bnb_4bit_compute_dtype=torch.float16,
<span class="hljs-meta">... </span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>processor = AutoProcessor.from_pretrained(checkpoint)

<span class="hljs-meta">&gt;&gt;&gt; </span>model = IdeficsForVisionText2Text.from_pretrained(
<span class="hljs-meta">... </span>    checkpoint,
<span class="hljs-meta">... </span>    quantization_config=quantization_config,
<span class="hljs-meta">... </span>    device_map=<span class="hljs-string">&quot;auto&quot;</span>
<span class="hljs-meta">... </span>)`,wrap:!1}}),P=new u({props:{title:"이미지 캡셔닝",local:"image-captioning",headingTag:"h2"}}),es=new g({props:{code:"cHJvbXB0JTIwJTNEJTIwJTVCJTBBJTIwJTIwJTIwJTIwJTIyaHR0cHMlM0ElMkYlMkZpbWFnZXMudW5zcGxhc2guY29tJTJGcGhvdG8tMTU4MzE2MDI0NzcxMS0yMTkxNzc2YjRiOTElM0ZpeGxpYiUzRHJiLTQuMC4zJTI2aXhpZCUzRE0zd3hNakEzZkRCOE1IeHdhRzkwYnkxd1lXZGxmSHg4ZkdWdWZEQjhmSHg4ZkElMjUzRCUyNTNEJTI2YXV0byUzRGZvcm1hdCUyNmZpdCUzRGNyb3AlMjZ3JTNEMzU0MiUyNnElM0Q4MCUyMiUyQyUwQSU1RCUwQSUwQWlucHV0cyUyMCUzRCUyMHByb2Nlc3Nvcihwcm9tcHQlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKS50byglMjJjdWRhJTIyKSUwQWJhZF93b3Jkc19pZHMlMjAlM0QlMjBwcm9jZXNzb3IudG9rZW5pemVyKCU1QiUyMiUzQ2ltYWdlJTNFJTIyJTJDJTIwJTIyJTNDZmFrZV90b2tlbl9hcm91bmRfaW1hZ2UlM0UlMjIlNUQlMkMlMjBhZGRfc3BlY2lhbF90b2tlbnMlM0RGYWxzZSkuaW5wdXRfaWRzJTBBJTBBZ2VuZXJhdGVkX2lkcyUyMCUzRCUyMG1vZGVsLmdlbmVyYXRlKCoqaW5wdXRzJTJDJTIwbWF4X25ld190b2tlbnMlM0QxMCUyQyUyMGJhZF93b3Jkc19pZHMlM0RiYWRfd29yZHNfaWRzKSUwQWdlbmVyYXRlZF90ZXh0JTIwJTNEJTIwcHJvY2Vzc29yLmJhdGNoX2RlY29kZShnZW5lcmF0ZWRfaWRzJTJDJTIwc2tpcF9zcGVjaWFsX3Rva2VucyUzRFRydWUpJTBBcHJpbnQoZ2VuZXJhdGVkX3RleHQlNUIwJTVEKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span>prompt = [
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;https://images.unsplash.com/photo-1583160247711-2191776b4b91?ixlib=rb-4.0.3&amp;ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&amp;auto=format&amp;fit=crop&amp;w=3542&amp;q=80&quot;</span>,
<span class="hljs-meta">... </span>]

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = processor(prompt, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>).to(<span class="hljs-string">&quot;cuda&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>bad_words_ids = processor.tokenizer([<span class="hljs-string">&quot;&lt;image&gt;&quot;</span>, <span class="hljs-string">&quot;&lt;fake_token_around_image&gt;&quot;</span>], add_special_tokens=<span class="hljs-literal">False</span>).input_ids

<span class="hljs-meta">&gt;&gt;&gt; </span>generated_ids = model.generate(**inputs, max_new_tokens=<span class="hljs-number">10</span>, bad_words_ids=bad_words_ids)
<span class="hljs-meta">&gt;&gt;&gt; </span>generated_text = processor.batch_decode(generated_ids, skip_special_tokens=<span class="hljs-literal">True</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">print</span>(generated_text[<span class="hljs-number">0</span>])
A puppy <span class="hljs-keyword">in</span> a flower bed`,wrap:!1}}),b=new ml({props:{$$slots:{default:[Te]},$$scope:{ctx:T}}}),as=new u({props:{title:"프롬프트 이미지 캡셔닝",local:"prompted-image-captioning",headingTag:"h2"}}),Ms=new g({props:{code:"cHJvbXB0JTIwJTNEJTIwJTVCJTBBJTIwJTIwJTIwJTIwJTIyaHR0cHMlM0ElMkYlMkZpbWFnZXMudW5zcGxhc2guY29tJTJGcGhvdG8tMTU0MzM0OTY4OS05YTRkNDI2YmVlOGUlM0ZpeGxpYiUzRHJiLTQuMC4zJTI2aXhpZCUzRE0zd3hNakEzZkRCOE1IeHdhRzkwYnkxd1lXZGxmSHg4ZkdWdWZEQjhmSHg4ZkElMjUzRCUyNTNEJTI2YXV0byUzRGZvcm1hdCUyNmZpdCUzRGNyb3AlMjZ3JTNEMzUwMSUyNnElM0Q4MCUyMiUyQyUwQSUyMCUyMCUyMCUyMCUyMlRoaXMlMjBpcyUyMGFuJTIwaW1hZ2UlMjBvZiUyMCUyMiUyQyUwQSU1RCUwQSUwQWlucHV0cyUyMCUzRCUyMHByb2Nlc3Nvcihwcm9tcHQlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKS50byglMjJjdWRhJTIyKSUwQWJhZF93b3Jkc19pZHMlMjAlM0QlMjBwcm9jZXNzb3IudG9rZW5pemVyKCU1QiUyMiUzQ2ltYWdlJTNFJTIyJTJDJTIwJTIyJTNDZmFrZV90b2tlbl9hcm91bmRfaW1hZ2UlM0UlMjIlNUQlMkMlMjBhZGRfc3BlY2lhbF90b2tlbnMlM0RGYWxzZSkuaW5wdXRfaWRzJTBBJTBBZ2VuZXJhdGVkX2lkcyUyMCUzRCUyMG1vZGVsLmdlbmVyYXRlKCoqaW5wdXRzJTJDJTIwbWF4X25ld190b2tlbnMlM0QxMCUyQyUyMGJhZF93b3Jkc19pZHMlM0RiYWRfd29yZHNfaWRzKSUwQWdlbmVyYXRlZF90ZXh0JTIwJTNEJTIwcHJvY2Vzc29yLmJhdGNoX2RlY29kZShnZW5lcmF0ZWRfaWRzJTJDJTIwc2tpcF9zcGVjaWFsX3Rva2VucyUzRFRydWUpJTBBcHJpbnQoZ2VuZXJhdGVkX3RleHQlNUIwJTVEKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span>prompt = [
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;https://images.unsplash.com/photo-1543349689-9a4d426bee8e?ixlib=rb-4.0.3&amp;ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&amp;auto=format&amp;fit=crop&amp;w=3501&amp;q=80&quot;</span>,
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;This is an image of &quot;</span>,
<span class="hljs-meta">... </span>]

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = processor(prompt, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>).to(<span class="hljs-string">&quot;cuda&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>bad_words_ids = processor.tokenizer([<span class="hljs-string">&quot;&lt;image&gt;&quot;</span>, <span class="hljs-string">&quot;&lt;fake_token_around_image&gt;&quot;</span>], add_special_tokens=<span class="hljs-literal">False</span>).input_ids

<span class="hljs-meta">&gt;&gt;&gt; </span>generated_ids = model.generate(**inputs, max_new_tokens=<span class="hljs-number">10</span>, bad_words_ids=bad_words_ids)
<span class="hljs-meta">&gt;&gt;&gt; </span>generated_text = processor.batch_decode(generated_ids, skip_special_tokens=<span class="hljs-literal">True</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">print</span>(generated_text[<span class="hljs-number">0</span>])
This <span class="hljs-keyword">is</span> an image of the Eiffel Tower <span class="hljs-keyword">in</span> Paris, France.`,wrap:!1}}),os=new u({props:{title:"퓨샷 프롬프트",local:"few-shot-prompting",headingTag:"h2"}}),ds=new g({props:{code:"cHJvbXB0JTIwJTNEJTIwJTVCJTIyVXNlciUzQSUyMiUyQyUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMmh0dHBzJTNBJTJGJTJGaW1hZ2VzLnVuc3BsYXNoLmNvbSUyRnBob3RvLTE1NDMzNDk2ODktOWE0ZDQyNmJlZThlJTNGaXhsaWIlM0RyYi00LjAuMyUyNml4aWQlM0RNM3d4TWpBM2ZEQjhNSHh3YUc5MGJ5MXdZV2RsZkh4OGZHVnVmREI4Zkh4OGZBJTI1M0QlMjUzRCUyNmF1dG8lM0Rmb3JtYXQlMjZmaXQlM0Rjcm9wJTI2dy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2lkcyUyMCUzRCUyMHByb2Nlc3Nvci50b2tlbml6ZXIoJTVCJTIyJTNDaW1hZ2UlM0UlMjIlMkMlMjAlMjIlM0NmYWtlX3Rva2VuX2Fyb3VuZF9pbWFnZSUzRSUyMiU1RCUyQyUyMGFkZF9zcGVjaWFsX3Rva2VucyUzREZhbHNlKS5pbnB1dF9pZHMlMEElMEFnZW5lcmF0ZWRfaWRzJTIwJTNEJTIwbW9kZWwuZ2VuZXJhdGUoKippbnB1dHMlMkMlMjBtYXhfbmV3X3Rva2VucyUzRDMwJTJDJTIwYmFkX3dvcmRzX2lkcyUzRGJhZF93b3Jkc19pZHMpJTBBZ2VuZXJhdGVkX3RleHQlMjAlM0QlMjBwcm9jZXNzb3IuYmF0Y2hfZGVjb2RlKGdlbmVyYXRlZF9pZHMlMkMlMjBza2lwX3NwZWNpYWxfdG9rZW5zJTNEVHJ1ZSklMEFwcmludChnZW5lcmF0ZWRfdGV4dCU1QjAlNUQp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span>prompt = [<span class="hljs-string">&quot;User:&quot;</span>,
<span class="hljs-meta">... </span>           <span class="hljs-string">&quot;https://images.unsplash.com/photo-1543349689-9a4d426bee8e?ixlib=rb-4.0.3&amp;ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&amp;auto=format&amp;fit=crop&amp;w=3501&amp;q=80&quot;</span>,
<span class="hljs-meta">... </span>           <span class="hljs-string">&quot;Describe this image.\\nAssistant: An image of the Eiffel Tower at night. Fun fact: the Eiffel Tower is the same height as an 81-storey building.\\n&quot;</span>,
<span class="hljs-meta">... </span>           <span class="hljs-string">&quot;User:&quot;</span>,
<span class="hljs-meta">... </span>           <span class="hljs-string">&quot;https://images.unsplash.com/photo-1524099163253-32b7f0256868?ixlib=rb-4.0.3&amp;ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&amp;auto=format&amp;fit=crop&amp;w=3387&amp;q=80&quot;</span>,
<span class="hljs-meta">... </span>           <span class="hljs-string">&quot;Describe this image.\\nAssistant:&quot;</span>
<span class="hljs-meta">... </span>           ]

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = processor(prompt, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>).to(<span class="hljs-string">&quot;cuda&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>bad_words_ids = processor.tokenizer([<span class="hljs-string">&quot;&lt;image&gt;&quot;</span>, <span class="hljs-string">&quot;&lt;fake_token_around_image&gt;&quot;</span>], add_special_tokens=<span class="hljs-literal">False</span>).input_ids

<span class="hljs-meta">&gt;&gt;&gt; </span>generated_ids = model.generate(**inputs, max_new_tokens=<span class="hljs-number">30</span>, bad_words_ids=bad_words_ids)
<span class="hljs-meta">&gt;&gt;&gt; </span>generated_text = processor.batch_decode(generated_ids, skip_special_tokens=<span class="hljs-literal">True</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">print</span>(generated_text[<span class="hljs-number">0</span>])
User: Describe this image.
Assistant: An image of the Eiffel Tower at night. Fun fact: the Eiffel Tower <span class="hljs-keyword">is</span> the same height <span class="hljs-keyword">as</span> an <span class="hljs-number">81</span>-storey building. 
User: Describe this image.
Assistant: An image of the Statue of Liberty. Fun fact: the Statue of Liberty <span class="hljs-keyword">is</span> <span class="hljs-number">151</span> feet tall.`,wrap:!1}}),js=new u({props:{title:"시각적 질의 응답",local:"visual-question-answering",headingTag:"h2"}}),Ts=new g({props:{code:"cHJvbXB0JTIwJTNEJTIwJTVCJTBBJTIwJTIwJTIwJTIwJTIySW5zdHJ1Y3Rpb24lM0ElMjBQcm92aWRlJTIwYW4lMjBhbnN3ZXIlMjB0byUyMHRoZSUyMHF1ZXN0aW9uLiUyMFVzZSUyMHRoZSUyMGltYWdlJTIwdG8lMjBhbnN3ZXIuJTVDbiUyMiUyQyUwQSUyMCUyMCUyMCUyMCUyMmh0dHBzJTNBJTJGJTJGaW1hZ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IwJTVEKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span>prompt = [
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;Instruction: Provide an answer to the question. Use the image to answer.\\n&quot;</span>,
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;https://images.unsplash.com/photo-1623944889288-cd147dbb517c?ixlib=rb-4.0.3&amp;ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&amp;auto=format&amp;fit=crop&amp;w=3540&amp;q=80&quot;</span>,
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;Question: Where are these people and what&#x27;s the weather like? Answer:&quot;</span>
<span class="hljs-meta">... </span>]

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = processor(prompt, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>).to(<span class="hljs-string">&quot;cuda&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>bad_words_ids = processor.tokenizer([<span class="hljs-string">&quot;&lt;image&gt;&quot;</span>, <span class="hljs-string">&quot;&lt;fake_token_around_image&gt;&quot;</span>], add_special_tokens=<span class="hljs-literal">False</span>).input_ids

<span class="hljs-meta">&gt;&gt;&gt; </span>generated_ids = model.generate(**inputs, max_new_tokens=<span class="hljs-number">20</span>, bad_words_ids=bad_words_ids)
<span class="hljs-meta">&gt;&gt;&gt; </span>generated_text = processor.batch_decode(generated_ids, skip_special_tokens=<span class="hljs-literal">True</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">print</span>(generated_text[<span class="hljs-number">0</span>])
Instruction: Provide an answer to the question. Use the image to answer.
 Question: Where are these people <span class="hljs-keyword">and</span> what<span class="hljs-string">&#x27;s the weather like? Answer: They&#x27;</span>re <span class="hljs-keyword">in</span> a park <span class="hljs-keyword">in</span> New York City, <span class="hljs-keyword">and</span> it<span class="hljs-string">&#x27;s a beautiful day.</span>`,wrap:!1}}),fs=new u({props:{title:"이미지 분류",local:"image-classification",headingT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lM0RGYWxzZSkuaW5wdXRfaWRzJTBBJTBBZ2VuZXJhdGVkX2lkcyUyMCUzRCUyMG1vZGVsLmdlbmVyYXRlKCoqaW5wdXRzJTJDJTIwbWF4X25ld190b2tlbnMlM0Q2JTJDJTIwYmFkX3dvcmRzX2lkcyUzRGJhZF93b3Jkc19pZHMpJTBBZ2VuZXJhdGVkX3RleHQlMjAlM0QlMjBwcm9jZXNzb3IuYmF0Y2hfZGVjb2RlKGdlbmVyYXRlZF9pZHMlMkMlMjBza2lwX3NwZWNpYWxfdG9rZW5zJTNEVHJ1ZSklMEFwcmludChnZW5lcmF0ZWRfdGV4dCU1QjAlNUQp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span>categories = [<span class="hljs-string">&#x27;animals&#x27;</span>,<span class="hljs-string">&#x27;vegetables&#x27;</span>, <span class="hljs-string">&#x27;city landscape&#x27;</span>, <span class="hljs-string">&#x27;cars&#x27;</span>, <span class="hljs-string">&#x27;office&#x27;</span>]
<span class="hljs-meta">&gt;&gt;&gt; </span>prompt = [<span class="hljs-string">f&quot;Instruction: Classify the following image into a single category from the following list: <span class="hljs-subst">{categories}</span>.\\n&quot;</span>,
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;https://images.unsplash.com/photo-1471193945509-9ad0617afabf?ixlib=rb-4.0.3&amp;ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&amp;auto=format&amp;fit=crop&amp;w=3540&amp;q=80&quot;</span>,    
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;Category: &quot;</span>
<span class="hljs-meta">... </span>]

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = processor(prompt, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>).to(<span class="hljs-string">&quot;cuda&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>bad_words_ids = processor.tokenizer([<span class="hljs-string">&quot;&lt;image&gt;&quot;</span>, <span class="hljs-string">&quot;&lt;fake_token_around_image&gt;&quot;</span>], add_special_tokens=<span class="hljs-literal">False</span>).input_ids

<span class="hljs-meta">&gt;&gt;&gt; </span>generated_ids = model.generate(**inputs, max_new_tokens=<span class="hljs-number">6</span>, bad_words_ids=bad_words_ids)
<span class="hljs-meta">&gt;&gt;&gt; </span>generated_text = processor.batch_decode(generated_ids, skip_special_tokens=<span class="hljs-literal">True</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">print</span>(generated_text[<span class="hljs-number">0</span>])
Instruction: Classify the following image into a single category <span class="hljs-keyword">from</span> the following <span class="hljs-built_in">list</span>: [<span class="hljs-string">&#x27;animals&#x27;</span>, <span class="hljs-string">&#x27;vegetables&#x27;</span>, <span class="hljs-string">&#x27;city landscape&#x27;</span>, <span class="hljs-string">&#x27;cars&#x27;</span>, <span class="hljs-string">&#x27;office&#x27;</span>].
Category: Vegetables`,wrap:!1}}),ks=new u({props:{title:"이미지 기반 텍스트 생성",local:"image-guided-text-generation",headingTag:"h2"}}),_s=new g({props:{code:"cHJvbXB0JTIwJTNEJTIwJTVCJTIySW5zdHJ1Y3Rpb24lM0ElMjBVc2UlMjB0aGUlMjBpbWFnZSUyMHRvJTIwd3JpdGUlMjBhJTIwc3RvcnkuJTIwJTVDbiUyMiUyQyUwQSUyMCUyMCUyMCUyMCUyMmh0dHBzJTNBJTJGJTJGaW1hZ2VzLnVuc3BsYXNoLmNvbSUyRnBob3RvLTE1MTcwODY4MjIxNTctMmIwMzU4ZTc2ODRhJTNGaXhsaWIlM0RyYi00LjAuMyUyNml4aWQlM0RNM3d4TWpBM2ZEQjhNSHh3YUc5MGJ5MXdZV2RsZkh4OGZHVnVmREI4Zkh4OGZBJTI1M0QlMjUzRCUyNmF1dG8lM0Rmb3JtYXQlMjZmaXQlM0Rjcm9wJTI2dyUzRDIyMDMlMjZxJTNEODAlMjIlMkMlMEElMjAlMjAlMjAlMjAlMjJTdG9yeSUzQSUyMCU1Q24lMjIlNUQlMEElMEFpbnB1dHMlMjAlM0QlMjBwcm9jZXNzb3IocHJvbXB0JTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMikudG8oJTIyY3VkYSUyMiklMEFiYWRfd29yZHNfaWRzJTIwJTNEJTIwcHJvY2Vzc29yLnRva2VuaXplciglNUIlMjIlM0NpbWFnZSUzRSUyMiUyQyUyMCUyMiUzQ2Zha2VfdG9rZW5fYXJvdW5kX2ltYWdlJTNFJTIyJTVEJTJDJTIwYWRkX3NwZWNpYWxfdG9rZW5zJTNERmFsc2UpLmlucHV0X2lkcyUwQSUwQWdlbmVyYXRlZF9pZHMlMjAlM0QlMjBtb2RlbC5nZW5lcmF0ZSgqKmlucHV0cyUyQyUyMG51bV9iZWFtcyUzRDIlMkMlMjBtYXhfbmV3X3Rva2VucyUzRDIwMCUyQyUyMGJhZF93b3Jkc19pZHMlM0RiYWRfd29yZHNfaWRzKSUwQWdlbmVyYXRlZF90ZXh0JTIwJTNEJTIwcHJvY2Vzc29yLmJhdGNoX2RlY29kZShnZW5lcmF0ZWRfaWRzJTJDJTIwc2tpcF9zcGVjaWFsX3Rva2VucyUzRFRydWUpJTBBcHJpbnQoZ2VuZXJhdGVkX3RleHQlNUIwJTVEKSUyMCUwQSUwQSUwQSUwQSUwQSUwQSUwQSUwQQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span>prompt = [<span class="hljs-string">&quot;Instruction: Use the image to write a story. \\n&quot;</span>,
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;https://images.unsplash.com/photo-1517086822157-2b0358e7684a?ixlib=rb-4.0.3&amp;ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&amp;auto=format&amp;fit=crop&amp;w=2203&amp;q=80&quot;</span>,
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;Story: \\n&quot;</span>]

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = processor(prompt, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>).to(<span class="hljs-string">&quot;cuda&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>bad_words_ids = processor.tokenizer([<span class="hljs-string">&quot;&lt;image&gt;&quot;</span>, <span class="hljs-string">&quot;&lt;fake_token_around_image&gt;&quot;</span>], add_special_tokens=<span class="hljs-literal">False</span>).input_ids

<span class="hljs-meta">&gt;&gt;&gt; </span>generated_ids = model.generate(**inputs, num_beams=<span class="hljs-number">2</span>, max_new_tokens=<span class="hljs-number">200</span>, bad_words_ids=bad_words_ids)
<span class="hljs-meta">&gt;&gt;&gt; </span>generated_text = processor.batch_decode(generated_ids, skip_special_tokens=<span class="hljs-literal">True</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">print</span>(generated_text[<span class="hljs-number">0</span>]) 
Instruction: Use the image to write a story. 
 Story: 
Once upon a time, there was a little girl who lived <span class="hljs-keyword">in</span> a house <span class="hljs-keyword">with</span> a red door.  She loved her red door.  It was the prettiest door <span class="hljs-keyword">in</span> the whole world.

One day, the little girl was playing <span class="hljs-keyword">in</span> her yard when she noticed a man standing on her doorstep.  He was wearing a long black coat <span class="hljs-keyword">and</span> a top hat.

The little girl ran inside <span class="hljs-keyword">and</span> told her mother about the man.

Her mother said, “Don’t worry, honey.  He’s just a friendly ghost.”

The little girl wasn’t sure <span class="hljs-keyword">if</span> she believed her mother, but she went outside anyway.

When she got to the door, the man was gone.

The <span class="hljs-built_in">next</span> day, the little girl was playing <span class="hljs-keyword">in</span> her yard again when she noticed the man standing on her doorstep.

He was wearing a long black coat <span class="hljs-keyword">and</span> a top hat.

The little girl ran`,wrap:!1}}),W=new ml({props:{$$slots:{default:[fe]},$$scope:{ctx:T}}}),Gs=new u({props:{title:"배치 모드에서 추론 실행",local:"running-inference-in-batch-mode",headingTag:"h2"}}),Bs=new g({props:{code:"cHJvbXB0cyUyMCUzRCUyMCU1QiUwQSUyMCUyMCUyMCUyMCU1QiUyMCUyMCUyMCUyMmh0dHBzJTNBJTJGJ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kElMjUzRCUyNTNEJTI2YXV0byUzRGZvcm1hdCUyNmZpdCUzRGNyb3AlMjZ3JTNEMzU0MCUyNnElM0Q4MCUyMiUyQyUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMlRoaXMlMjBpcyUyMGFuJTIwaW1hZ2UlMjBvZiUyMCUyMiUyQyUwQSUyMCUyMCUyMCUyMCU1RCUyQyUwQSU1RCUwQSUwQWlucHV0cyUyMCUzRCUyMHByb2Nlc3Nvcihwcm9tcHRzJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMikudG8oJTIyY3VkYSUyMiklMEFiYWRfd29yZHNfaWRzJTIwJTNEJTIwcHJvY2Vzc29yLnRva2VuaXplciglNUIlMjIlM0NpbWFnZSUzRSUyMiUyQyUyMCUyMiUzQ2Zha2VfdG9rZW5fYXJvdW5kX2ltYWdlJTNFJTIyJTVEJTJDJTIwYWRkX3NwZWNpYWxfdG9rZW5zJTNERmFsc2UpLmlucHV0X2lkcyUwQSUwQWdlbmVyYXRlZF9pZHMlMjAlM0QlMjBtb2RlbC5nZW5lcmF0ZSgqKmlucHV0cyUyQyUyMG1heF9uZXdfdG9rZW5zJTNEMTAlMkMlMjBiYWRfd29yZHNfaWRzJTNEYmFkX3dvcmRzX2lkcyklMEFnZW5lcmF0ZWRfdGV4dCUyMCUzRCUyMHByb2Nlc3Nvci5iYXRjaF9kZWNvZGUoZ2VuZXJhdGVkX2lkcyUyQyUyMHNraXBfc3BlY2lhbF90b2tlbnMlM0RUcnVlKSUwQWZvciUyMGklMkN0JTIwaW4lMjBlbnVtZXJhdGUoZ2VuZXJhdGVkX3RleHQpJTNBJTBBJTIwJTIwJTIwJTIwcHJpbnQoZiUyMiU3QmklN0QlM0ElNUNuJTdCdCU3RCU1Q24lMjIpJTIwJTBBJTBB",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span>prompts = [
<span class="hljs-meta">... </span>    [   <span class="hljs-string">&quot;https://images.unsplash.com/photo-1543349689-9a4d426bee8e?ixlib=rb-4.0.3&amp;ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&amp;auto=format&amp;fit=crop&amp;w=3501&amp;q=80&quot;</span>,
<span class="hljs-meta">... </span>        <span class="hljs-string">&quot;This is an image of &quot;</span>,
<span class="hljs-meta">... </span>    ],
<span class="hljs-meta">... </span>    [   <span class="hljs-string">&quot;https://images.unsplash.com/photo-1623944889288-cd147dbb517c?ixlib=rb-4.0.3&amp;ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&amp;auto=format&amp;fit=crop&amp;w=3540&amp;q=80&quot;</span>,
<span class="hljs-meta">... </span>        <span class="hljs-string">&quot;This is an image of &quot;</span>,
<span class="hljs-meta">... </span>    ],
<span class="hljs-meta">... </span>    [   <span class="hljs-string">&quot;https://images.unsplash.com/photo-1471193945509-9ad0617afabf?ixlib=rb-4.0.3&amp;ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&amp;auto=format&amp;fit=crop&amp;w=3540&amp;q=80&quot;</span>,
<span class="hljs-meta">... </span>        <span class="hljs-string">&quot;This is an image of &quot;</span>,
<span class="hljs-meta">... </span>    ],
<span class="hljs-meta">... </span>]

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = processor(prompts, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>).to(<span class="hljs-string">&quot;cuda&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>bad_words_ids = processor.tokenizer([<span class="hljs-string">&quot;&lt;image&gt;&quot;</span>, <span class="hljs-string">&quot;&lt;fake_token_around_image&gt;&quot;</span>], add_special_tokens=<span class="hljs-literal">False</span>).input_ids

<span class="hljs-meta">&gt;&gt;&gt; </span>generated_ids = model.generate(**inputs, max_new_tokens=<span class="hljs-number">10</span>, bad_words_ids=bad_words_ids)
<span class="hljs-meta">&gt;&gt;&gt; </span>generated_text = processor.batch_decode(generated_ids, skip_special_tokens=<span class="hljs-literal">True</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">for</span> i,t <span class="hljs-keyword">in</span> <span class="hljs-built_in">enumerate</span>(generated_text):
<span class="hljs-meta">... </span>    <span class="hljs-built_in">print</span>(<span class="hljs-string">f&quot;<span class="hljs-subst">{i}</span>:\\n<span class="hljs-subst">{t}</span>\\n&quot;</span>) 
<span class="hljs-number">0</span>:
This <span class="hljs-keyword">is</span> an image of the Eiffel Tower <span class="hljs-keyword">in</span> Paris, France.

<span class="hljs-number">1</span>:
This <span class="hljs-keyword">is</span> an image of a couple on a picnic blanket.

<span class="hljs-number">2</span>:
This <span class="hljs-keyword">is</span> an image of a vegetable stand.`,wrap:!1}}),Qs=new u({props:{title:"대화형 사용을 위한 IDEFICS 인스트럭트 실행",local:"idefics-instruct-for-conversational-use",headingTag:"h2"}}),Hs=new g({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwSWRlZmljc0ZvclZpc2lvblRleHQyVGV4dCUyQyUyMEF1dG9Qcm9jZXNzb3IlMEElMEFkZXZpY2UlMjAlM0QlMjAlMjJjdWRhJTIyJTIwaWYlMjB0b3JjaC5jdWRhLmlzX2F2YWlsYWJsZSgpJTIwZWxzZSUyMCUyMmNwdSUyMiUwQSUwQWNoZWNrcG9pbnQlMjAlM0QlMjAlMjJIdWdnaW5nRmFjZU00JTJGaWRlZmljcy05Yi1pbnN0cnVjdCUyMiUwQW1vZGVsJTIwJTNEJTIwSWRlZmljc0ZvclZpc2lvblRleHQyVGV4dC5mcm9tX3ByZXRyYWluZWQoY2hlY2twb2ludCUyQyUyMHRvcmNoX2R0eXBlJTNEdG9yY2guYmZsb2F0MTYpLnRvKGRldmljZSklMEFwcm9jZXNzb3IlMjAlM0QlMjBBdXRvUHJvY2Vzc29yLmZyb21fcHJldHJhaW5lZChjaGVja3BvaW50KSUwQ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mRzX2lkcyUyQyUyMG1heF9sZW5ndGglM0QxMDApJTBBZ2VuZXJhdGVkX3RleHQlMjAlM0QlMjBwcm9jZXNzb3IuYmF0Y2hfZGVjb2RlKGdlbmVyYXRlZF9pZHMlMkMlMjBza2lwX3NwZWNpYWxfdG9rZW5zJTNEVHJ1ZSklMEFmb3IlMjBpJTJDJTIwdCUyMGluJTIwZW51bWVyYXRlKGdlbmVyYXRlZF90ZXh0KSUzQSUwQSUyMCUyMCUyMCUyMHByaW50KGYlMjIlN0JpJTdEJTNBJTVDbiU3QnQlN0QlNUNuJTIyKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> IdeficsForVisionText2Text, AutoProcessor

<span class="hljs-meta">&gt;&gt;&gt; </span>device = <span class="hljs-string">&quot;cuda&quot;</span> <span class="hljs-keyword">if</span> torch.cuda.is_available() <span class="hljs-keyword">else</span> <span class="hljs-string">&quot;cpu&quot;</span>

<span class="hljs-meta">&gt;&gt;&gt; </span>checkpoint = <span class="hljs-string">&quot;HuggingFaceM4/idefics-9b-instruct&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = IdeficsForVisionText2Text.from_pretrained(checkpoint, torch_dtype=torch.bfloat16).to(device)
<span class="hljs-meta">&gt;&gt;&gt; </span>processor = AutoProcessor.from_pretrained(checkpoint)

<span class="hljs-meta">&gt;&gt;&gt; </span>prompts = [
<span class="hljs-meta">... </span>    [
<span class="hljs-meta">... </span>        <span class="hljs-string">&quot;User: What is in this image?&quot;</span>,
<span class="hljs-meta">... </span>        <span class="hljs-string">&quot;https://upload.wikimedia.org/wikipedia/commons/8/86/Id%C3%A9fix.JPG&quot;</span>,
<span class="hljs-meta">... </span>        <span class="hljs-string">&quot;&lt;end_of_utterance&gt;&quot;</span>,

<span class="hljs-meta">... </span>        <span class="hljs-string">&quot;\\nAssistant: This picture depicts Idefix, the dog of Obelix in Asterix and Obelix. Idefix is running on the ground.&lt;end_of_utterance&gt;&quot;</span>,

<span class="hljs-meta">... </span>        <span class="hljs-string">&quot;\\nUser:&quot;</span>,
<span class="hljs-meta">... </span>        <span class="hljs-string">&quot;https://static.wikia.nocookie.net/asterix/images/2/25/R22b.gif/revision/latest?cb=20110815073052&quot;</span>,
<span class="hljs-meta">... </span>        <span class="hljs-string">&quot;And who is that?&lt;end_of_utterance&gt;&quot;</span>,

<span class="hljs-meta">... </span>        <span class="hljs-string">&quot;\\nAssistant:&quot;</span>,
<span class="hljs-meta">... </span>    ],
<span class="hljs-meta">... </span>]

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># --batched mode</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = processor(prompts, add_end_of_utterance_token=<span class="hljs-literal">False</span>, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>).to(device)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># --single sample mode</span>
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># inputs = processor(prompts[0], return_tensors=&quot;pt&quot;).to(device)</span>

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># args 생성</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>exit_condition = processor.tokenizer(<span class="hljs-string">&quot;&lt;end_of_utterance&gt;&quot;</span>, add_special_tokens=<span class="hljs-literal">False</span>).input_ids
<span class="hljs-meta">&gt;&gt;&gt; </span>bad_words_ids = processor.tokenizer([<span class="hljs-string">&quot;&lt;image&gt;&quot;</span>, <span class="hljs-string">&quot;&lt;fake_token_around_image&gt;&quot;</span>], add_special_tokens=<span class="hljs-literal">False</span>).input_ids

<span class="hljs-meta">&gt;&gt;&gt; </span>generated_ids = model.generate(**inputs, eos_token_id=exit_condition, bad_words_ids=bad_words_ids, max_length=<span class="hljs-number">100</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>generated_text = processor.batch_decode(generated_ids, skip_special_tokens=<span class="hljs-literal">True</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">for</span> i, t <span class="hljs-keyword">in</span> <span class="hljs-built_in">enumerate</span>(generated_text):
<span class="hljs-meta">... </span>    <span class="hljs-built_in">print</span>(<span class="hljs-string">f&quot;<span class="hljs-subst">{i}</span>:\\n<span class="hljs-subst">{t}</span>\\n&quot;</span>)`,wrap:!1}}),$s=new ge({props:{source:"https://github.com/huggingface/transformers/blob/main/docs/source/ko/tasks/idefics.md"}}),{c(){o=p("meta"),J=a(),y=p("p"),f=a(),c(_.$$.fragment),Ys=a(),c(x.$$.fragment),Fs=a(),G=p("p"),G.textContent=rl,As=a(),v=p("p"),v.innerHTML=dl,qs=a(),B=p("p"),B.textContent=hl,Ss=a(),Q=p("p"),Q.textContent=jl,Ds=a(),z=p("ul"),z.innerHTML=yl,Ls=a(),V=p("p"),V.textContent=Jl,Ps=a(),c(X.$$.fragment),Os=a(),c(U.$$.fragment),Ks=a(),c(H.$$.fragment),st=a(),$=p("p"),$.textContent=gl,tt=a(),c(E.$$.fragment),lt=a(),Y=p("p"),Y.innerHTML=ul,et=a(),c(F.$$.fragment),at=a(),A=p("p"),A.innerHTML=Tl,nt=a(),c(q.$$.fragment),pt=a(),S=p("p"),S.innerHTML=fl,it=a(),c(D.$$.fragment),Mt=a(),L=p("p"),L.textContent=Ul,ot=a(),c(P.$$.fragment),ct=a(),O=p("p"),O.textContent=wl,mt=a(),K=p("p"),K.textContent=bl,rt=a(),w=p("div"),w.innerHTML=Zl,dt=a(),ss=p("p"),ss.innerHTML=Il,ht=a(),ts=p("p"),ts.textContent=Cl,jt=a(),ls=p("p"),ls.innerHTML=kl,yt=a(),c(es.$$.fragment),Jt=a(),c(b.$$.fragment),gt=a(),c(as.$$.fragment),ut=a(),ns=p("p"),ns.textContent=Rl,Tt=a(),Z=p("div"),Z.innerHTML=Wl,ft=a(),ps=p("p"),ps.innerHTML=Nl,Ut=a(),is=p("p"),is.textContent=_l,wt=a(),c(Ms.$$.fragment),bt=a(),c(os.$$.fragment),Zt=a(),cs=p("p"),cs.textContent=xl,It=a(),ms=p("p"),ms.textContent=Gl,Ct=a(),I=p("div"),I.innerHTML=vl,kt=a(),rs=p("p"),rs.innerHTML=Bl,Rt=a(),c(ds.$$.fragment),Wt=a(),hs=p("p"),hs.textContent=Ql,Nt=a(),c(js.$$.fragment),_t=a(),ys=p("p"),ys.textContent=zl,xt=a(),Js=p("p"),Js.textContent=Vl,Gt=a(),C=p("div"),C.innerHTML=Xl,vt=a(),gs=p("p"),gs.innerHTML=Hl,Bt=a(),us=p("p"),us.textContent=$l,Qt=a(),c(Ts.$$.fragment),zt=a(),c(fs.$$.fragment),Vt=a(),Us=p("p"),Us.textContent=El,Xt=a(),ws=p("p"),ws.textContent=Yl,Ht=a(),k=p("div"),k.innerHTML=Fl,$t=a(),bs=p("p"),bs.innerHTML=Al,Et=a(),Zs=p("p"),Zs.textContent=ql,Yt=a(),c(Is.$$.fragment),Ft=a(),Cs=p("p"),Cs.textContent=Sl,At=a(),c(ks.$$.fragment),qt=a(),Rs=p("p"),Rs.textContent=Dl,St=a(),Ws=p("p"),Ws.textContent=Ll,Dt=a(),R=p("div"),R.innerHTML=Pl,Lt=a(),Ns=p("p"),Ns.innerHTML=Ol,Pt=a(),c(_s.$$.fragment),Ot=a(),xs=p("p"),xs.textContent=Kl,Kt=a(),c(W.$$.fragment),sl=a(),c(Gs.$$.fragment),tl=a(),vs=p("p"),vs.textContent=se,ll=a(),c(Bs.$$.fragment),el=a(),c(Qs.$$.fragment),al=a(),zs=p("p"),zs.innerHTML=te,nl=a(),Vs=p("p"),Vs.textContent=le,pl=a(),Xs=p("p"),Xs.textContent=ee,il=a(),c(Hs.$$.fragment),Ml=a(),c($s.$$.fragment),ol=a(),Es=p("p"),this.h()},l(s){const t=de("svelte-u9bgzb",document.head);o=i(t,"META",{name:!0,content:!0}),t.forEach(l),J=n(s),y=i(s,"P",{}),ie(y).forEach(l),f=n(s),m(_.$$.fragment,s),Ys=n(s),m(x.$$.fragment,s),Fs=n(s),G=i(s,"P",{"data-svelte-h":!0}),M(G)!=="svelte-192zl04"&&(G.textContent=rl),As=n(s),v=i(s,"P",{"data-svelte-h":!0}),M(v)!=="svelte-6ga4od"&&(v.innerHTML=dl),qs=n(s),B=i(s,"P",{"data-svelte-h":!0}),M(B)!=="svelte-1br8orr"&&(B.textContent=hl),Ss=n(s),Q=i(s,"P",{"data-svelte-h":!0}),M(Q)!=="svelte-1lptr1j"&&(Q.textContent=jl),Ds=n(s),z=i(s,"UL",{"data-svelte-h":!0}),M(z)!=="svelte-6sx3yz"&&(z.innerHTML=yl),Ls=n(s),V=i(s,"P",{"data-svelte-h":!0}),M(V)!=="svelte-1nxgok6"&&(V.textContent=Jl),Ps=n(s),m(X.$$.fragment,s),Os=n(s),m(U.$$.fragment,s),Ks=n(s),m(H.$$.fragment,s),st=n(s),$=i(s,"P",{"data-svelte-h":!0}),M($)!=="svelte-vbxrcp"&&($.textContent=gl),tt=n(s),m(E.$$.fragment,s),lt=n(s),Y=i(s,"P",{"data-svelte-h":!0}),M(Y)!=="svelte-1fzyk3s"&&(Y.innerHTML=ul),et=n(s),m(F.$$.fragment,s),at=n(s),A=i(s,"P",{"data-svelte-h":!0}),M(A)!=="svelte-kvjr8l"&&(A.innerHTML=Tl),nt=n(s),m(q.$$.fragment,s),pt=n(s),S=i(s,"P",{"data-svelte-h":!0}),M(S)!=="svelte-1su4p88"&&(S.innerHTML=fl),it=n(s),m(D.$$.fragment,s),Mt=n(s),L=i(s,"P",{"data-svelte-h":!0}),M(L)!=="svelte-1ve7k0"&&(L.textContent=Ul),ot=n(s),m(P.$$.fragment,s),ct=n(s),O=i(s,"P",{"data-svelte-h":!0}),M(O)!=="svelte-1qqb456"&&(O.textContent=wl),mt=n(s),K=i(s,"P",{"data-svelte-h":!0}),M(K)!=="svelte-5ubear"&&(K.textContent=bl),rt=n(s),w=i(s,"DIV",{class:!0,"data-svelte-h":!0}),M(w)!=="svelte-t8y7db"&&(w.innerHTML=Zl),dt=n(s),ss=i(s,"P",{"data-svelte-h":!0}),M(ss)!=="svelte-cqbxmp"&&(ss.innerHTML=Il),ht=n(s),ts=i(s,"P",{"data-svelte-h":!0}),M(ts)!=="svelte-cqnpwc"&&(ts.textContent=Cl),jt=n(s),ls=i(s,"P",{"data-svelte-h":!0}),M(ls)!=="svelte-1xlv5ti"&&(ls.innerHTML=kl),yt=n(s),m(es.$$.fragment,s),Jt=n(s),m(b.$$.fragment,s),gt=n(s),m(as.$$.fragment,s),ut=n(s),ns=i(s,"P",{"data-svelte-h":!0}),M(ns)!=="svelte-yxenqx"&&(ns.textContent=Rl),Tt=n(s),Z=i(s,"DIV",{class:!0,"data-svelte-h":!0}),M(Z)!=="svelte-1ritb1k"&&(Z.innerHTML=Wl),ft=n(s),ps=i(s,"P",{"data-svelte-h":!0}),M(ps)!=="svelte-2sdmkq"&&(ps.innerHTML=Nl),Ut=n(s),is=i(s,"P",{"data-svelte-h":!0}),M(is)!=="svelte-1qyvy5u"&&(is.textContent=_l),wt=n(s),m(Ms.$$.fragment,s),bt=n(s),m(os.$$.fragment,s),Zt=n(s),cs=i(s,"P",{"data-svelte-h":!0}),M(cs)!=="svelte-t289km"&&(cs.textContent=xl),It=n(s),ms=i(s,"P",{"data-svelte-h":!0}),M(ms)!=="svelte-3v80oi"&&(ms.textContent=Gl),Ct=n(s),I=i(s,"DIV",{class:!0,"data-svelte-h":!0}),M(I)!=="svelte-gin1vp"&&(I.innerHTML=vl),kt=n(s),rs=i(s,"P",{"data-svelte-h":!0}),M(rs)!=="svelte-1c7akyk"&&(rs.innerHTML=Bl),Rt=n(s),m(ds.$$.fragment,s),Wt=n(s),hs=i(s,"P",{"data-svelte-h":!0}),M(hs)!=="svelte-4qx2vi"&&(hs.textContent=Ql),Nt=n(s),m(js.$$.fragment,s),_t=n(s),ys=i(s,"P",{"data-svelte-h":!0}),M(ys)!=="svelte-1c8lsvj"&&(ys.textContent=zl),xt=n(s),Js=i(s,"P",{"data-svelte-h":!0}),M(Js)!=="svelte-i2mdmn"&&(Js.textContent=Vl),Gt=n(s),C=i(s,"DIV",{class:!0,"data-svelte-h":!0}),M(C)!=="svelte-1j2xr8e"&&(C.innerHTML=Xl),vt=n(s),gs=i(s,"P",{"data-svelte-h":!0}),M(gs)!=="svelte-1d2pqeh"&&(gs.innerHTML=Hl),Bt=n(s),us=i(s,"P",{"data-svelte-h":!0}),M(us)!=="svelte-1hqholj"&&(us.textContent=$l),Qt=n(s),m(Ts.$$.fragment,s),zt=n(s),m(fs.$$.fragment,s),Vt=n(s),Us=i(s,"P",{"data-svelte-h":!0}),M(Us)!=="svelte-1367av1"&&(Us.textContent=El),Xt=n(s),ws=i(s,"P",{"data-svelte-h":!0}),M(ws)!=="svelte-18ksnpv"&&(ws.textContent=Yl),Ht=n(s),k=i(s,"DIV",{class:!0,"data-svelte-h":!0}),M(k)!=="svelte-g02ga3"&&(k.innerHTML=Fl),$t=n(s),bs=i(s,"P",{"data-svelte-h":!0}),M(bs)!=="svelte-133qla9"&&(bs.innerHTML=Al),Et=n(s),Zs=i(s,"P",{"data-svelte-h":!0}),M(Zs)!=="svelte-cagop"&&(Zs.textContent=ql),Yt=n(s),m(Is.$$.fragment,s),Ft=n(s),Cs=i(s,"P",{"data-svelte-h":!0}),M(Cs)!=="svelte-pzk7p8"&&(Cs.textContent=Sl),At=n(s),m(ks.$$.fragment,s),qt=n(s),Rs=i(s,"P",{"data-svelte-h":!0}),M(Rs)!=="svelte-1snw1di"&&(Rs.textContent=Dl),St=n(s),Ws=i(s,"P",{"data-svelte-h":!0}),M(Ws)!=="svelte-1n1vxz8"&&(Ws.textContent=Ll),Dt=n(s),R=i(s,"DIV",{class:!0,"data-svelte-h":!0}),M(R)!=="svelte-1mf93u3"&&(R.innerHTML=Pl),Lt=n(s),Ns=i(s,"P",{"data-svelte-h":!0}),M(Ns)!=="svelte-s6ch7k"&&(Ns.innerHTML=Ol),Pt=n(s),m(_s.$$.fragment,s),Ot=n(s),xs=i(s,"P",{"data-svelte-h":!0}),M(xs)!=="svelte-1nhpk1e"&&(xs.textContent=Kl),Kt=n(s),m(W.$$.fragment,s),sl=n(s),m(Gs.$$.fragment,s),tl=n(s),vs=i(s,"P",{"data-svelte-h":!0}),M(vs)!=="svelte-jth63i"&&(vs.textContent=se),ll=n(s),m(Bs.$$.fragment,s),el=n(s),m(Qs.$$.fragment,s),al=n(s),zs=i(s,"P",{"data-svelte-h":!0}),M(zs)!=="svelte-me51t0"&&(zs.innerHTML=te),nl=n(s),Vs=i(s,"P",{"data-svelte-h":!0}),M(Vs)!=="svelte-18svak1"&&(Vs.textContent=le),pl=n(s),Xs=i(s,"P",{"data-svelte-h":!0}),M(Xs)!=="svelte-4akhs6"&&(Xs.textContent=ee),il=n(s),m(Hs.$$.fragment,s),Ml=n(s),m($s.$$.fragment,s),ol=n(s),Es=i(s,"P",{}),ie(Es).forEach(l),this.h()},h(){N(o,"name","hf:doc:metadata"),N(o,"content",we),N(w,"class","flex justify-center"),N(Z,"class","flex justify-center"),N(I,"class","flex justify-center"),N(C,"class","flex justify-center"),N(k,"class","flex justify-center"),N(R,"class","flex justify-center")},m(s,t){he(document.head,o),e(s,J,t),e(s,y,t),e(s,f,t),r(_,s,t),e(s,Ys,t),r(x,s,t),e(s,Fs,t),e(s,G,t),e(s,As,t),e(s,v,t),e(s,qs,t),e(s,B,t),e(s,Ss,t),e(s,Q,t),e(s,Ds,t),e(s,z,t),e(s,Ls,t),e(s,V,t),e(s,Ps,t),r(X,s,t),e(s,Os,t),r(U,s,t),e(s,Ks,t),r(H,s,t),e(s,st,t),e(s,$,t),e(s,tt,t),r(E,s,t),e(s,lt,t),e(s,Y,t),e(s,et,t),r(F,s,t),e(s,at,t),e(s,A,t),e(s,nt,t),r(q,s,t),e(s,pt,t),e(s,S,t),e(s,it,t),r(D,s,t),e(s,Mt,t),e(s,L,t),e(s,ot,t),r(P,s,t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,ctx:s}),U.$set(ae);const ne={};t&2&&(ne.$$scope={dirty:t,ctx:s}),b.$set(ne);const pe={};t&2&&(pe.$$scope={dirty:t,ctx:s}),W.$set(pe)},i(s){cl||(d(_.$$.fragment,s),d(x.$$.fragment,s),d(X.$$.fragment,s),d(U.$$.fragment,s),d(H.$$.fragment,s),d(E.$$.fragment,s),d(F.$$.fragment,s),d(q.$$.fragment,s),d(D.$$.fragment,s),d(P.$$.fragment,s),d(es.$$.fragment,s),d(b.$$.fragment,s),d(as.$$.fragment,s),d(Ms.$$.fragment,s),d(os.$$.fragment,s),d(ds.$$.fragment,s),d(js.$$.fragment,s),d(Ts.$$.fragment,s),d(fs.$$.fragment,s),d(Is.$$.fragment,s),d(ks.$$.fragment,s),d(_s.$$.fragment,s),d(W.$$.fragment,s),d(Gs.$$.fragment,s),d(Bs.$$.fragment,s),d(Qs.$$.fragment,s),d(Hs.$$.fragment,s),d($s.$$.fragment,s),cl=!0)},o(s){h(_.$$.fragment,s),h(x.$$.fragment,s),h(X.$$.fragment,s),h(U.$$.fragment,s),h(H.$$.fragment,s),h(E.$$.fragment,s),h(F.$$.fragment,s),h(q.$$.fragment,s),h(D.$$.fragment,s),h(P.$$.fragment,s),h(es.$$.fragment,s),h(b.$$.fragment,s),h(as.$$.fragment,s),h(Ms.$$.fragment,s),h(os.$$.fragment,s),h(ds.$$.fragment,s),h(js.$$.fragment,s),h(Ts.$$.fragment,s),h(fs.$$.fragment,s),h(Is.$$.fragment,s),h(ks.$$.fragment,s),h(_s.$$.fragment,s),h(W.$$.fragment,s),h(Gs.$$.fragment,s),h(Bs.$$.fragment,s),h(Qs.$$.fragment,s),h(Hs.$$.fragment,s),h($s.$$.fragment,s),cl=!1},d(s){s&&(l(J),l(y),l(f),l(Ys),l(Fs),l(G),l(As),l(v),l(qs),l(B),l(Ss),l(Q),l(Ds),l(z),l(Ls),l(V),l(Ps),l(Os),l(Ks),l(st),l($),l(tt),l(lt),l(Y),l(et),l(at),l(A),l(nt),l(pt),l(S),l(it),l(Mt),l(L),l(ot),l(ct),l(O),l(mt),l(K),l(rt),l(w),l(dt),l(ss),l(ht),l(ts),l(jt),l(ls),l(yt),l(Jt),l(gt),l(ut),l(ns),l(Tt),l(Z),l(ft),l(ps),l(Ut),l(is),l(wt),l(bt),l(Zt),l(cs),l(It),l(ms),l(Ct),l(I),l(kt),l(rs),l(Rt),l(Wt),l(hs),l(Nt),l(_t),l(ys),l(xt),l(Js),l(Gt),l(C),l(vt),l(gs),l(Bt),l(us),l(Qt),l(zt),l(Vt),l(Us),l(Xt),l(ws),l(Ht),l(k),l($t),l(bs),l(Et),l(Zs),l(Yt),l(Ft),l(Cs),l(At),l(qt),l(Rs),l(St),l(Ws),l(Dt),l(R),l(Lt),l(Ns),l(Pt),l(Ot),l(xs),l(Kt),l(sl),l(tl),l(vs),l(ll),l(el),l(al),l(zs),l(nl),l(Vs),l(pl),l(Xs),l(il),l(Ml),l(ol),l(Es)),l(o),j(_,s),j(x,s),j(X,s),j(U,s),j(H,s),j(E,s),j(F,s),j(q,s),j(D,s),j(P,s),j(es,s),j(b,s),j(as,s),j(Ms,s),j(os,s),j(ds,s),j(js,s),j(Ts,s),j(fs,s),j(Is,s),j(ks,s),j(_s,s),j(W,s),j(Gs,s),j(Bs,s),j(Qs,s),j(Hs,s),j($s,s)}}}const we='{"title":"IDEFICS를 이용한 이미지 작업","local":"image-tasks-with-idefics","sections":[{"title":"모델 로드","local":"loading-the-model","sections":[{"title":"양자화된 모델","local":"quantized-model","sections":[],"depth":3}],"depth":2},{"title":"이미지 캡셔닝","local":"image-captioning","sections":[],"depth":2},{"title":"프롬프트 이미지 캡셔닝","local":"prompted-image-captioning","sections":[],"depth":2},{"title":"퓨샷 프롬프트","local":"few-shot-prompting","sections":[],"depth":2},{"title":"시각적 질의 응답","local":"visual-question-answering","sections":[],"depth":2},{"title":"이미지 분류","local":"image-classification","sections":[],"depth":2},{"title":"이미지 기반 텍스트 생성","local":"image-guided-text-generation","sections":[],"depth":2},{"title":"배치 모드에서 추론 실행","local":"running-inference-in-batch-mode","sections":[],"depth":2},{"title":"대화형 사용을 위한 IDEFICS 인스트럭트 실행","local":"idefics-instruct-for-conversational-use","sections":[],"depth":2}],"depth":1}';function be(T){return ce(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Ne extends me{constructor(o){super(),re(this,o,be,Ue,oe,{})}}export{Ne as component};
