Buckets:
| <meta charset="utf-8" /><meta name="hf:doc:metadata" content="{"title":"포럼에서 도움 요청하기","local":"포럼에서-도움-요청하기","sections":[{"title":"포럼에 포스팅 잘쓰는 법","local":"포럼에-포스팅-잘쓰는-법","sections":[{"title":"기술적인 제목 선택하기","local":"기술적인-제목-선택하기","sections":[],"depth":3},{"title":"코드 스니펫 형식 지정하기","local":"코드-스니펫-형식-지정하기","sections":[],"depth":3},{"title":"전체 traceback 포함하기","local":"전체-traceback-포함하기","sections":[],"depth":3},{"title":"재현 가능한 예제코드 제공","local":"재현-가능한-예제코드-제공","sections":[],"depth":3}],"depth":2}],"depth":1}"> | |
| <link href="/docs/course/pr_1069/ko/_app/immutable/assets/0.e3b0c442.css" rel="modulepreload"> | |
| <link rel="modulepreload" href="/docs/course/pr_1069/ko/_app/immutable/entry/start.667ba29b.js"> | |
| <link rel="modulepreload" href="/docs/course/pr_1069/ko/_app/immutable/chunks/scheduler.37c15a92.js"> | |
| <link rel="modulepreload" href="/docs/course/pr_1069/ko/_app/immutable/chunks/singletons.8de3d8e2.js"> | |
| <link rel="modulepreload" href="/docs/course/pr_1069/ko/_app/immutable/chunks/index.18351ede.js"> | |
| <link rel="modulepreload" href="/docs/course/pr_1069/ko/_app/immutable/chunks/paths.6047fff5.js"> | |
| <link rel="modulepreload" href="/docs/course/pr_1069/ko/_app/immutable/entry/app.65e35200.js"> | |
| <link rel="modulepreload" href="/docs/course/pr_1069/ko/_app/immutable/chunks/index.2bf4358c.js"> | |
| <link rel="modulepreload" href="/docs/course/pr_1069/ko/_app/immutable/nodes/0.9169bc8c.js"> | |
| <link rel="modulepreload" href="/docs/course/pr_1069/ko/_app/immutable/chunks/each.e59479a4.js"> | |
| <link rel="modulepreload" href="/docs/course/pr_1069/ko/_app/immutable/nodes/28.5ab16dfa.js"> | |
| <link rel="modulepreload" href="/docs/course/pr_1069/ko/_app/immutable/chunks/Youtube.1e50a667.js"> | |
| <link rel="modulepreload" href="/docs/course/pr_1069/ko/_app/immutable/chunks/CodeBlock.4e987730.js"> | |
| <link rel="modulepreload" href="/docs/course/pr_1069/ko/_app/immutable/chunks/CourseFloatingBanner.9ff4c771.js"> | |
| <link rel="modulepreload" href="/docs/course/pr_1069/ko/_app/immutable/chunks/DocNotebookDropdown.efc1fb7c.js"> | |
| <link rel="modulepreload" href="/docs/course/pr_1069/ko/_app/immutable/chunks/getInferenceSnippets.24b50994.js"><!-- HEAD_svelte-u9bgzb_START --><meta name="hf:doc:metadata" content="{"title":"포럼에서 도움 요청하기","local":"포럼에서-도움-요청하기","sections":[{"title":"포럼에 포스팅 잘쓰는 법","local":"포럼에-포스팅-잘쓰는-법","sections":[{"title":"기술적인 제목 선택하기","local":"기술적인-제목-선택하기","sections":[],"depth":3},{"title":"코드 스니펫 형식 지정하기","local":"코드-스니펫-형식-지정하기","sections":[],"depth":3},{"title":"전체 traceback 포함하기","local":"전체-traceback-포함하기","sections":[],"depth":3},{"title":"재현 가능한 예제코드 제공","local":"재현-가능한-예제코드-제공","sections":[],"depth":3}],"depth":2}],"depth":1}"><!-- HEAD_svelte-u9bgzb_END --> <p></p> <h1 class="relative group"><a id="포럼에서-도움-요청하기" class="header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full" href="#포럼에서-도움-요청하기"><span><svg class="" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z" fill="currentColor"></path></svg></span></a> <span>포럼에서 도움 요청하기</span></h1> <div class="flex space-x-1 absolute z-10 right-0 top-0"><a href="https://discuss.huggingface.co/t/chapter-8-questions" target="_blank"><img alt="Ask a Question" class="!m-0" src="https://img.shields.io/badge/Ask%20a%20question-ffcb4c.svg?logo=data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgLTEgMTA0IDEwNiI+PGRlZnM+PHN0eWxlPi5jbHMtMXtmaWxsOiMyMzFmMjA7fS5jbHMtMntmaWxsOiNmZmY5YWU7fS5jbHMtM3tmaWxsOiMwMGFlZWY7fS5jbHMtNHtmaWxsOiMwMGE5NGY7fS5jbHMtNXtmaWxsOiNmMTVkMjI7fS5jbHMtNntmaWxsOiNlMzFiMjM7fTwvc3R5bGU+PC9kZWZzPjx0aXRsZT5EaXNjb3Vyc2VfbG9nbzwvdGl0bGU+PGcgaWQ9IkxheWVyXzIiPjxnIGlkPSJMYXllcl8zIj48cGF0aCBjbGFzcz0iY2xzLTEiIGQ9Ik01MS44NywwQzIzLjcxLDAsMCwyMi44MywwLDUxYzAsLjkxLDAsNTIuODEsMCw1Mi44MWw1MS44Ni0uMDVjMjguMTYsMCw1MS0yMy43MSw1MS01MS44N1M4MCwwLDUxLjg3LDBaIi8+PHBhdGggY2xhc3M9ImNscy0yIiBkPSJNNTIuMzcsMTkuNzRBMzEuNjIsMzEuNjIsMCwwLDAsMjQuNTgsNjYuNDFsLTUuNzIsMTguNEwzOS40LDgwLjE3YTMxLjYxLDMxLjYxLDAsMSwwLDEzLTYwLjQzWiIvPjxwYXRoIGNsYXNzPSJjbHMtMyIgZD0iTTc3LjQ1LDMyLjEyYTMxLjYsMzEuNiwwLDAsMS0zOC4wNSw0OEwxOC44Niw4NC44MmwyMC45MS0yLjQ3QTMxLjYsMzEuNiwwLDAsMCw3Ny40NSwzMi4xMloiLz48cGF0aCBjbGFzcz0iY2xzLTQiIGQ9Ik03MS42MywyNi4yOUEzMS42LDMxLjYsMCwwLDEsMzguOCw3OEwxOC44Niw4NC44MiwzOS40LDgwLjE3QTMxLjYsMzEuNiwwLDAsMCw3MS42MywyNi4yOVoiLz48cGF0aCBjbGFzcz0iY2xzLTUiIGQ9Ik0yNi40Nyw2Ny4xMWEzMS42MSwzMS42MSwwLDAsMSw1MS0zNUEzMS42MSwzMS42MSwwLDAsMCwyNC41OCw2Ni40MWwtNS43MiwxOC40WiIvPjxwYXRoIGNsYXNzPSJjbHMtNiIgZD0iTTI0LjU4LDY2LjQxQTMxLjYxLDMxLjYxLDAsMCwxLDcxLjYzLDI2LjI5YTMxLjYxLDMxLjYxLDAsMCwwLTQ5LDM5LjYzbC0zLjc2LDE4LjlaIi8+PC9nPjwvZz48L3N2Zz4="></a> <a href="https://colab.research.google.com/github/huggingface/notebooks/blob/master/course/en/chapter8/section3.ipynb" target="_blank"><img alt="Open In Colab" class="!m-0" src="https://colab.research.google.com/assets/colab-badge.svg"></a> <a href="https://studiolab.sagemaker.aws/import/github/huggingface/notebooks/blob/master/course/en/chapter8/section3.ipynb" target="_blank"><img alt="Open In Studio Lab" class="!m-0" src="https://studiolab.sagemaker.aws/studiolab.svg"></a></div> <iframe class="w-full xl:w-4/6 h-80" src="https://www.youtube-nocookie.com/embed/S2EEG3JIt2A" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe> <p data-svelte-h="svelte-mna1ly"><a href="https://discuss.huggingface.co" rel="nofollow">HuggingFace 포럼</a>은 오픈 소스 팀과 더 거대한 Hugging Face 커뮤니티의 도움을 받을 수 있는 좋은 공간입니다. 특정 날짜의 메인 페이지는 다음과 같습니다:</p> <div class="flex justify-center" data-svelte-h="svelte-14n1ttz"><img src="https://huggingface.co/datasets/huggingface-course/documentation-images/resolve/main/en/chapter8/forums.png" alt="The Hugging Face forums." width="100%"></div> <p data-svelte-h="svelte-1d1h3p7">왼쪽에는 그룹화된 다양한 주제의 카테고리가 있으며 오른쪽에는 가장 최근 주제가 표시됩니다. 주제는 제목, 카테고리 및 설명이 포함된 게시물입니다. 이는 <a href="/course/chapter5">단원 5</a>에서 자체 데이터 세트를 생성할 때 본 GitHub 문제 형식과 매우 유사합니다. 이름에서 알 수 있듯이 <a href="https://discuss.huggingface.co/c/beginners/5" rel="nofollow">초보자</a> 카테고리는 주로 HuggingFace 라이브러리 및 에코시스템을 처음 시작하는 사람들을 대상으로 합니다. 라이브러리에 대한 모든 질문은 환영하는 곳이며 일부 코드를 디버그하거나 무언가를 수행하는 방법에 대한 도움을 요청하는 곳 입니다. (즉, 질문이 특히 한 라이브러리에 관한 것이라면 포럼에서 해당 라이브러리 카테고리로 이동해야 할 것입니다.)</p> <p data-svelte-h="svelte-prg4qp">마찬가지로 <a href="https://discuss.huggingface.co/c/intermediate/6" rel="nofollow">중급</a> 및 <a href="https://discuss.huggingface.co/c/research/7" rel="nofollow">연구</a> 카테고리는 어려운 질문용입니다. 멋진 새 NLP 연구나 라이브러리들에 대해 토론하고 싶을 때의 내용을 예로 들 수 있습니다.</p> <p data-svelte-h="svelte-1hvwpzb">이어서 허깅페이스 코스와 관련된 질문을 할 수 있는 <a href="https://discuss.huggingface.co/c/course/20" rel="nofollow">코스</a> 카테고리도 언급 안할 수가 없네요!!</p> <p data-svelte-h="svelte-vjy1jg">카테고리를 선택하고나면 첫 번째 주제를 작성할 준비가 되었습니다. 이 포스트를 작성하는 방법은 포럼의 <a href="https://discuss.huggingface.co/t/how-to-request-support/3128" rel="nofollow">가이드라인</a>에서 찾을 수 있으며 이 장에서는 좋은 주제를 작성하는 몇 가지 방법을 알아보겠습니다.</p> <h2 class="relative group"><a id="포럼에-포스팅-잘쓰는-법" class="header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full" href="#포럼에-포스팅-잘쓰는-법"><span><svg class="" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z" fill="currentColor"></path></svg></span></a> <span>포럼에 포스팅 잘쓰는 법</span></h2> <p data-svelte-h="svelte-1bvm9ud">실습 예제로 Wikipedia 기사에서 임베딩을 생성하여 커스텀 검색 엔진을 만든다고 가정해 보겠습니다. 평소처럼 토크나이저와 모델을 다음과 같이 로드합니다:</p> <div class="code-block relative "><div class="absolute top-2.5 right-4"><button class="inline-flex items-center relative text-sm focus:text-green-500 cursor-pointer focus:outline-none transition duration-200 ease-in-out opacity-0 mx-0.5 text-gray-600 " title="code excerpt" type="button"><svg class="" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" fill="currentColor" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><path d="M28,10V28H10V10H28m0-2H10a2,2,0,0,0-2,2V28a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V10a2,2,0,0,0-2-2Z" transform="translate(0)"></path><path d="M4,18H2V4A2,2,0,0,1,4,2H18V4H4Z" transform="translate(0)"></path><rect fill="none" width="32" height="32"></rect></svg> <div class="absolute pointer-events-none transition-opacity bg-black text-white py-1 px-2 leading-tight rounded font-normal shadow left-1/2 top-full transform -translate-x-1/2 translate-y-2 opacity-0"><div class="absolute bottom-full left-1/2 transform -translate-x-1/2 w-0 h-0 border-black border-4 border-t-0" style="border-left-color: transparent; border-right-color: transparent; "></div> Copied</div></button></div> <pre class=""><!-- HTML_TAG_START --><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, AutoModel | |
| model_checkpoint = <span class="hljs-string">"distilbert-base-uncased"</span> | |
| tokenizer = AutoTokenizer.from_pretrained(model_checkpoint) | |
| model = AutoModel.from_pretrained(model_checkpoint)<!-- HTML_TAG_END --></pre></div> <p data-svelte-h="svelte-148fb6b">이제 <a href="https://en.wikipedia.org/wiki/Transformers" rel="nofollow">Wikipedia 기사</a>의 전체 섹션을 Transformers(라이브러리가 아니라 프랜차이즈!)에 임베딩 한다고 가정합니다:</p> <div class="code-block relative "><div class="absolute top-2.5 right-4"><button class="inline-flex items-center relative text-sm focus:text-green-500 cursor-pointer focus:outline-none transition duration-200 ease-in-out opacity-0 mx-0.5 text-gray-600 " title="code excerpt" type="button"><svg class="" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" fill="currentColor" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><path d="M28,10V28H10V10H28m0-2H10a2,2,0,0,0-2,2V28a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V10a2,2,0,0,0-2-2Z" transform="translate(0)"></path><path d="M4,18H2V4A2,2,0,0,1,4,2H18V4H4Z" transform="translate(0)"></path><rect fill="none" width="32" height="32"></rect></svg> <div class="absolute pointer-events-none transition-opacity bg-black text-white py-1 px-2 leading-tight rounded font-normal shadow left-1/2 top-full transform -translate-x-1/2 translate-y-2 opacity-0"><div class="absolute bottom-full left-1/2 transform -translate-x-1/2 w-0 h-0 border-black border-4 border-t-0" style="border-left-color: transparent; border-right-color: transparent; "></div> Copied</div></button></div> <pre class=""><!-- HTML_TAG_START -->text = <span class="hljs-string">""" | |
| Generation One is a retroactive term for the Transformers characters that | |
| appeared between 1984 and 1993. The Transformers began with the 1980s Japanese | |
| toy lines Micro Change and Diaclone. They presented robots able to transform | |
| into everyday vehicles, electronic items or weapons. Hasbro bought the Micro | |
| Change and Diaclone toys, and partnered with Takara. Marvel Comics was hired by | |
| Hasbro to create the backstory; editor-in-chief Jim Shooter wrote an overall | |
| story, and gave the task of creating the characthers to writer Dennis O'Neil. | |
| Unhappy with O'Neil's work (although O'Neil created the name "Optimus Prime"), | |
| Shooter chose Bob Budiansky to create the characters. | |
| The Transformers mecha were largely designed by Shōji Kawamori, the creator of | |
| the Japanese mecha anime franchise Macross (which was adapted into the Robotech | |
| franchise in North America). Kawamori came up with the idea of transforming | |
| mechs while working on the Diaclone and Macross franchises in the early 1980s | |
| (such as the VF-1 Valkyrie in Macross and Robotech), with his Diaclone mechs | |
| later providing the basis for Transformers. | |
| The primary concept of Generation One is that the heroic Optimus Prime, the | |
| villainous Megatron, and their finest soldiers crash land on pre-historic Earth | |
| in the Ark and the Nemesis before awakening in 1985, Cybertron hurtling through | |
| the Neutral zone as an effect of the war. The Marvel comic was originally part | |
| of the main Marvel Universe, with appearances from Spider-Man and Nick Fury, | |
| plus some cameos, as well as a visit to the Savage Land. | |
| The Transformers TV series began around the same time. Produced by Sunbow | |
| Productions and Marvel Productions, later Hasbro Productions, from the start it | |
| contradicted Budiansky's backstories. The TV series shows the Autobots looking | |
| for new energy sources, and crash landing as the Decepticons attack. Marvel | |
| interpreted the Autobots as destroying a rogue asteroid approaching Cybertron. | |
| Shockwave is loyal to Megatron in the TV series, keeping Cybertron in a | |
| stalemate during his absence, but in the comic book he attempts to take command | |
| of the Decepticons. The TV series would also differ wildly from the origins | |
| Budiansky had created for the Dinobots, the Decepticon turned Autobot Jetfire | |
| (known as Skyfire on TV), the Constructicons (who combine to form | |
| Devastator),[19][20] and Omega Supreme. The Marvel comic establishes early on | |
| that Prime wields the Creation Matrix, which gives life to machines. In the | |
| second season, the two-part episode The Key to Vector Sigma introduced the | |
| ancient Vector Sigma computer, which served the same original purpose as the | |
| Creation Matrix (giving life to Transformers), and its guardian Alpha Trion. | |
| """</span> | |
| inputs = tokenizer(text, return_tensors=<span class="hljs-string">"pt"</span>) | |
| logits = model(**inputs).logits<!-- HTML_TAG_END --></pre></div> <div class="code-block relative "><div class="absolute top-2.5 right-4"><button class="inline-flex items-center relative text-sm focus:text-green-500 cursor-pointer focus:outline-none transition duration-200 ease-in-out opacity-0 mx-0.5 text-gray-600 " title="code excerpt" type="button"><svg class="" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" fill="currentColor" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><path d="M28,10V28H10V10H28m0-2H10a2,2,0,0,0-2,2V28a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V10a2,2,0,0,0-2-2Z" transform="translate(0)"></path><path d="M4,18H2V4A2,2,0,0,1,4,2H18V4H4Z" transform="translate(0)"></path><rect fill="none" width="32" height="32"></rect></svg> <div class="absolute pointer-events-none transition-opacity bg-black text-white py-1 px-2 leading-tight rounded font-normal shadow left-1/2 top-full transform -translate-x-1/2 translate-y-2 opacity-0"><div class="absolute bottom-full left-1/2 transform -translate-x-1/2 w-0 h-0 border-black border-4 border-t-0" style="border-left-color: transparent; border-right-color: transparent; "></div> Copied</div></button></div> <pre class=""><!-- HTML_TAG_START -->IndexError: index out of <span class="hljs-built_in">range</span> <span class="hljs-keyword">in</span> self<!-- HTML_TAG_END --></pre></div> <p data-svelte-h="svelte-gon26c">에고, 문제가 발생했습니다. 오류 메시지는 <a href="/course/chapter8/section2">2장</a>에서 본 것보다 훨씬 더 어렵네요! 우리는 전체 traceback을 이해할 수 없으므로 HuggingFace 포럼에 도움을 요청하기로 결정합니다. 주제를 어떻게 만들 수 있을까요?</p> <p data-svelte-h="svelte-1rkcsuy">주제를 작성하려면 오른쪽 상단 모서리에 있는 “새 주제” 버튼을 클릭해야 합니다(주제를 만들려면 로그인해야 함):</p> <div class="flex justify-center" data-svelte-h="svelte-1guiktj"><img src="https://huggingface.co/datasets/huggingface-course/documentation-images/resolve/main/en/chapter8/forums-new-topic.png" alt="Creating a new forum topic." width="100%"></div> <p data-svelte-h="svelte-ysj0o0">그러면 주제의 제목과 카테고리, 콘텐츠를 입력할 수 있는 화면이 나타나게 됩니다:</p> <div class="flex justify-center" data-svelte-h="svelte-xij8sp"><img src="https://huggingface.co/datasets/huggingface-course/documentation-images/resolve/main/en/chapter8/forum-topic01.png" alt="The interface for creating a forum topic." width="100%"></div> <p data-svelte-h="svelte-laa7aa">에러는 🤗 Transformers에 대한 것이므로 Transformers 카테고리로 선택하겠습니다. 문제를 설명하는 우리의 첫 시도는 아마 아래와 같을 겁니다:</p> <div class="flex justify-center" data-svelte-h="svelte-3f05is"><img src="https://huggingface.co/datasets/huggingface-course/documentation-images/resolve/main/en/chapter8/forum-topic02.png" alt="Drafting the content for a new forum topic." width="100%"></div> <p data-svelte-h="svelte-1lxpn7w">이 주제는 도움에 필요한 오류 메시지가 포함되어 있지만 작성 방식에 몇 가지 문제가 있습니다:</p> <ol data-svelte-h="svelte-1hnyf1f"><li>제목이 그다지 기술적이지 않으므로 포럼을 탐색하는 사람은 본문을 읽지 않고는 주제가 무엇인지 알 수 없습니다.</li> <li>본문이 오류가 <em>어디에서</em> 발생하고 <em>어떻게</em> 에러를 재현하는지에 대한 충분한 정보를 제공하지 않습니다.</li> <li>주제는 다소 요구하는 어조로 몇몇 사람들을 직접적으로 태그합니다.</li></ol> <p data-svelte-h="svelte-ha30pk">이와 같은 주제는 빠른 답변을 얻지 못할 것이므로(적어도 하나라도 받을 경우) 이를 개선할 수 있는 방법을 살펴보겠습니다. 좋은 타이틀을 선택하기 위해 첫번째 이슈글 부터 보겠습니다.</p> <h3 class="relative group"><a id="기술적인-제목-선택하기" class="header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full" href="#기술적인-제목-선택하기"><span><svg class="" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z" fill="currentColor"></path></svg></span></a> <span>기술적인 제목 선택하기</span></h3> <p data-svelte-h="svelte-1tdmkry">코드의 버그에 대한 도움을 받으려는 경우 다른 사람들이 질문에 답할 수 있는지 여부를 빠르게 결정할 수 있도록 제목에 충분한 정보를 포함하는 것이 좋습니다. 실습 예제에서 발생하는 예외의 이름을 알고 있으며 <code>model(**inputs)</code>을 호출하는 모델의 forward 과정에서 발생한다는 힌트를 얻었습니다. 이를 소통하기 위해 다음과 같은 제목이 가능하겠네요:</p> <blockquote data-svelte-h="svelte-qp1hky"><p>Source of IndexError in the AutoModel forward pass?</p></blockquote> <p data-svelte-h="svelte-s5xt59">이 제목은 읽는 사람에게 <em>어디에서</em> 버그가 발생했다고 생각하는지 알려주고, 이전에 ‘IndexError’를 본 적이 있다면 디버그 방법을 알고 있을 가능성이 큽니다. 물론 제목은 원하는 대로 지정할 수 있으며 다음과 같은 변형도 가능합니다:</p> <blockquote data-svelte-h="svelte-15dhjoh"><p>Why does my model produce an IndexError?</p></blockquote> <p data-svelte-h="svelte-1qgrgzc">와 같은 제목도 괜찮을 수 있습니다. 기술적인 제목을 만들었으니 본문 개선 방법을 살펴보겠습니다.</p> <h3 class="relative group"><a id="코드-스니펫-형식-지정하기" class="header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full" href="#코드-스니펫-형식-지정하기"><span><svg class="" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z" fill="currentColor"></path></svg></span></a> <span>코드 스니펫 형식 지정하기</span></h3> <p data-svelte-h="svelte-605p37">IDE에서 소스 코드를 읽는 것은 충분히 어렵지만 코드를 일반 텍스트로 복사하여 붙여넣으면 훨씬 더 어렵습니다! 다행히 HuggingFace 포럼은 Markdown 사용을 지원하므로 코드 블록을 항상 세 개의 백틱(```)으로 묶어서 더 쉽게 읽을 수 있도록 해야 합니다. 에러 메시지를 보기 좋게 만들기 위해 백틱안에 코드를 넣으면서 원본 보다 본문을 좀 더 정중하게 만들어 보겠습니다:</p> <div class="flex justify-center" data-svelte-h="svelte-pol4zs"><img src="https://huggingface.co/datasets/huggingface-course/documentation-images/resolve/main/en/chapter8/forum-topic03.png" alt="Our revised forum topic, with proper code formatting." width="100%"></div> <p data-svelte-h="svelte-o4nq6k">스크린샷에서 볼 수 있듯이 코드 블록을 백틱으로 묶으면 일반 텍스트가 코드로 변환되고 컬러 스타일링이 완성됩니다! 또한 <code>distilbert-base-uncased</code>에 했던 것처럼 하나의 백틱을 사용해 인라인 변수의 형식을 지정할 수 있습니다. 이 주제는 훨씬 나아지고 있으며 운이 좋으면 커뮤니티에서 에러가 무엇인지 추측할 수 있는 사람을 찾을 수 있습니다. 그러나 운에 맡기기 보단 traceback을 철저하고 세부적으로 포함해서 삶을 더 쉽게 만들도록 하죠!</p> <h3 class="relative group"><a id="전체-traceback-포함하기" class="header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full" href="#전체-traceback-포함하기"><span><svg class="" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z" fill="currentColor"></path></svg></span></a> <span>전체 traceback 포함하기</span></h3> <p data-svelte-h="svelte-xhlq40">traceback의 마지막 줄은 종종 코드를 디버그하기에 충분하기 때문에 주제에 “공간 절약”을 하고 싶을 수도 있습니다. 의도는 좋지만 traceback에서 상위에 있는 정보도 정말 유용할 수 있기 때문에 때론 다른 사람들이 문제를 디버그하는 것을 실제로 <em>더 어렵게</em> 합니다. 따라서 좋은 방법은 <em>전체</em> traceback을 복사하여 붙여넣으면서 형식이 제대로 지정되었는지 확인하는 것입니다. 이러한 traceback은 다소 길어질 수 있으므로 일부 사람들은 소스 코드를 설명한 후에 표시하는 것을 선호합니다. 이제 작성해봅시다. 포럼 주제는 다음과 같습니다:</p> <div class="flex justify-center" data-svelte-h="svelte-1oxns09"><img src="https://huggingface.co/datasets/huggingface-course/documentation-images/resolve/main/en/chapter8/forum-topic04.png" alt="Our example forum topic, with the complete traceback." width="100%"></div> <p data-svelte-h="svelte-1cwodlz">이게 훨씬 더 많은 정보를 제공하며, 섬세한 독자는 traceback에 있는 특정 행을 보고 긴 입력을 전달하기 때문에 문제가 있는 것으로 보인다는 점을 지적할 수 있습니다:</p> <blockquote data-svelte-h="svelte-1cf7hkp"><p>Token indices sequence length is longer than the specified maximum sequence length for this model (583 > 512).</p></blockquote> <p data-svelte-h="svelte-d4ybxl">하지만 에러를 발생한 실제 코드를 제공해 문제를 훨씬 더 쉽게 만들 수 있습니다. 같이 방법을 알아보죠.</p> <h3 class="relative group"><a id="재현-가능한-예제코드-제공" class="header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full" href="#재현-가능한-예제코드-제공"><span><svg class="" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z" fill="currentColor"></path></svg></span></a> <span>재현 가능한 예제코드 제공</span></h3> <p data-svelte-h="svelte-14oo71k">다른 사람의 코드를 디버그하려고 시도한 적이 있다면 아마 그 사람이 보고한 문제를 먼저 재현해서 traceback을 통해 오류를 정확하게 찾아내는 작업을 할 수 있습니다. 포럼에서 도움을 받는(또는 제공하는) 경우에도 다르지 않으므로 오류를 재현하는 작은 예시를 제공할 수 있다면 정말 도움이 됩니다. 절반은 이 연습을 진행하는 것만으로도 무엇이 문제인지 파악하는 데 도움이 될 것입니다. 어쨌든 우리 예제에서 누락된 부분은 모델에 입력한 <em>inputs</em>를 표시하는 것입니다. 그러면 다음과 같은 완성된 예가 나타납니다:</p> <div class="flex justify-center" data-svelte-h="svelte-1ckd2c8"><img src="https://huggingface.co/datasets/huggingface-course/documentation-images/resolve/main/en/chapter8/forum-topic05.png" alt="The final version of our forum topic." width="100%"></div> <p data-svelte-h="svelte-w32gsw">이 주제는 이제 상당히 많은 정보가 포함되어 있으며 커뮤니티의 관심을 끌고 유용한 답변을 얻을 가능성이 훨씬 높은 방식으로 작성되었습니다. 이 기본 가이드라인을 통해 이제 멋진 주제를 포스팅해서 🤗 Transformers 질문에 대한 답변을 찾을 수 있습니다!</p> <a class="!text-gray-400 !no-underline text-sm flex items-center not-prose mt-4" href="https://github.com/huggingface/course/blob/main/chapters/ko/chapter8/3.mdx" target="_blank"><span data-svelte-h="svelte-1kd6by1"><</span> <span data-svelte-h="svelte-x0xyl0">></span> <span data-svelte-h="svelte-1dajgef"><span class="underline ml-1.5">Update</span> on GitHub</span></a> <p></p> | |
| <script> | |
| { | |
| __sveltekit_5pcgyl = { | |
| assets: "/docs/course/pr_1069/ko", | |
| base: "/docs/course/pr_1069/ko", | |
| env: {} | |
| }; | |
| const element = document.currentScript.parentElement; | |
| const data = [null,null]; | |
| Promise.all([ | |
| import("/docs/course/pr_1069/ko/_app/immutable/entry/start.667ba29b.js"), | |
| import("/docs/course/pr_1069/ko/_app/immutable/entry/app.65e35200.js") | |
| ]).then(([kit, app]) => { | |
| kit.start(app, element, { | |
| node_ids: [0, 28], | |
| data, | |
| form: null, | |
| error: null | |
| }); | |
| }); | |
| } | |
| </script> | |
Xet Storage Details
- Size:
- 32.3 kB
- Xet hash:
- b00e73e9c54b9ce09ea346d3015e3e9ef8d1fba221808ddc4d4e03686c1436b7
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.