Buckets:

hf-doc-build/doc / transformers /main /ko /contributing.html
HuggingFaceDocBuilder's picture
download
raw
73.5 kB
<meta charset="utf-8" /><meta name="hf:doc:metadata" content="{&quot;title&quot;:&quot;๐Ÿค— Transformers์— ๊ธฐ์—ฌํ•˜๊ธฐ&quot;,&quot;local&quot;:&quot;contribute-to-transformers&quot;,&quot;sections&quot;:[{&quot;title&quot;:&quot;๊ธฐ์—ฌํ•˜๋Š” ๋ฐฉ๋ฒ•&quot;,&quot;local&quot;:&quot;ways-to-contribute&quot;,&quot;sections&quot;:[],&quot;depth&quot;:2},{&quot;title&quot;:&quot;๋ฏธํ•ด๊ฒฐ๋œ ๋ฌธ์ œ ์ˆ˜์ •ํ•˜๊ธฐ&quot;,&quot;local&quot;:&quot;fixing-outstanding-issues&quot;,&quot;sections&quot;:[],&quot;depth&quot;:2},{&quot;title&quot;:&quot;๋ฒ„๊ทธ ๊ด€๋ จ ์ด์Šˆ๋ฅผ ์ œ๊ธฐํ•˜๊ฑฐ๋‚˜ ์ƒˆ๋กœ์šด ๊ธฐ๋Šฅ ์š”์ฒญํ•˜๊ธฐ&quot;,&quot;local&quot;:&quot;submitting-a-bugrelated-issue-or-feature-request&quot;,&quot;sections&quot;:[{&quot;title&quot;:&quot;๋ฒ„๊ทธ๋ฅผ ๋ฐœ๊ฒฌํ•˜์…จ๋‚˜์š”?&quot;,&quot;local&quot;:&quot;did-you-find-a-bug&quot;,&quot;sections&quot;:[],&quot;depth&quot;:3},{&quot;title&quot;:&quot;์ƒˆ๋กœ์šด ๊ธฐ๋Šฅ์„ ์›ํ•˜์‹œ๋‚˜์š”?&quot;,&quot;local&quot;:&quot;do-you-want-a-new-feature&quot;,&quot;sections&quot;:[],&quot;depth&quot;:3}],&quot;depth&quot;:2},{&quot;title&quot;:&quot;์ƒˆ๋กœ์šด ๋ชจ๋ธ์„ ๊ตฌํ˜„ํ•˜๊ณ  ์‹ถ์œผ์‹ ๊ฐ€์š”?&quot;,&quot;local&quot;:&quot;do-you-want-to-implement-a-new-model&quot;,&quot;sections&quot;:[],&quot;depth&quot;:2},{&quot;title&quot;:&quot;๋ฌธ์„œ๋ฅผ ์ถ”๊ฐ€ํ•˜๊ณ  ์‹ถ์œผ์‹ ๊ฐ€์š”?&quot;,&quot;local&quot;:&quot;do-you-want-to-add-documentation&quot;,&quot;sections&quot;:[],&quot;depth&quot;:2},{&quot;title&quot;:&quot;ํ’€ ๋ฆฌํ€˜์ŠคํŠธ(Pull Request) ์ƒ์„ฑํ•˜๊ธฐ&quot;,&quot;local&quot;:&quot;create-a-pull-request&quot;,&quot;sections&quot;:[{&quot;title&quot;:&quot;Pull Request ์ฒดํฌ๋ฆฌ์ŠคํŠธ&quot;,&quot;local&quot;:&quot;pull-request-checklist&quot;,&quot;sections&quot;:[],&quot;depth&quot;:3},{&quot;title&quot;:&quot;ํ…Œ์ŠคํŠธ&quot;,&quot;local&quot;:&quot;tests&quot;,&quot;sections&quot;:[],&quot;depth&quot;:3},{&quot;title&quot;:&quot;์Šคํƒ€์ผ ๊ฐ€์ด๋“œ&quot;,&quot;local&quot;:&quot;style-guide&quot;,&quot;sections&quot;:[],&quot;depth&quot;:3},{&quot;title&quot;:&quot;Windows์—์„œ ๊ฐœ๋ฐœ&quot;,&quot;local&quot;:&quot;develop-on-windows&quot;,&quot;sections&quot;:[],&quot;depth&quot;:3},{&quot;title&quot;:&quot;ํฌํฌํ•œ ์ €์žฅ์†Œ๋ฅผ ์ƒ์œ„ ์›๋ณธ ๋ธŒ๋žœ์น˜(main)๊ณผ ๋™๊ธฐํ™”ํ•˜๊ธฐ (Hugging Face ์ €์žฅ์†Œ)&quot;,&quot;local&quot;:&quot;sync-a-forked-repository-with-upstream-main-the-hugging-face-repository&quot;,&quot;sections&quot;:[],&quot;depth&quot;:3}],&quot;depth&quot;:2}],&quot;depth&quot;:1}"/>
<link href="/docs/transformers/main/ko/_app/immutable/entry/start.Vp-vTTcV.js" rel="modulepreload">
<link href="/docs/transformers/main/ko/_app/immutable/chunks/KOUSdg6y.js" rel="modulepreload">
<link href="/docs/transformers/main/ko/_app/immutable/chunks/BkyfusOu.js" rel="modulepreload">
<link href="/docs/transformers/main/ko/_app/immutable/entry/app.Drc0bE40.js" rel="modulepreload">
<link href="/docs/transformers/main/ko/_app/immutable/chunks/CDRgxHoV.js" rel="modulepreload">
<link href="/docs/transformers/main/ko/_app/immutable/chunks/1EV5EJPW.js" rel="modulepreload">
<link href="/docs/transformers/main/ko/_app/immutable/chunks/Cm2Dm0ZX.js" rel="modulepreload">
<link href="/docs/transformers/main/ko/_app/immutable/chunks/DsnmJJEf.js" rel="modulepreload">
<link href="/docs/transformers/main/ko/_app/immutable/nodes/0.BZrPG8ss.js" rel="modulepreload">
<link href="/docs/transformers/main/ko/_app/immutable/chunks/BoVSaMb7.js" rel="modulepreload">
<link href="/docs/transformers/main/ko/_app/immutable/nodes/10.B-lnGhh0.js" rel="modulepreload">
<link href="/docs/transformers/main/ko/_app/immutable/chunks/C529Avzz.js" rel="modulepreload">
<link href="/docs/transformers/main/ko/_app/immutable/chunks/_7Q5EL3T.js" rel="modulepreload">
<!--122tzrt--><meta name="hf:doc:metadata" content="{&quot;title&quot;:&quot;๐Ÿค— Transformers์— ๊ธฐ์—ฌํ•˜๊ธฐ&quot;,&quot;local&quot;:&quot;contribute-to-transformers&quot;,&quot;sections&quot;:[{&quot;title&quot;:&quot;๊ธฐ์—ฌํ•˜๋Š” ๋ฐฉ๋ฒ•&quot;,&quot;local&quot;:&quot;ways-to-contribute&quot;,&quot;sections&quot;:[],&quot;depth&quot;:2},{&quot;title&quot;:&quot;๋ฏธํ•ด๊ฒฐ๋œ ๋ฌธ์ œ ์ˆ˜์ •ํ•˜๊ธฐ&quot;,&quot;local&quot;:&quot;fixing-outstanding-issues&quot;,&quot;sections&quot;:[],&quot;depth&quot;:2},{&quot;title&quot;:&quot;๋ฒ„๊ทธ ๊ด€๋ จ ์ด์Šˆ๋ฅผ ์ œ๊ธฐํ•˜๊ฑฐ๋‚˜ ์ƒˆ๋กœ์šด ๊ธฐ๋Šฅ ์š”์ฒญํ•˜๊ธฐ&quot;,&quot;local&quot;:&quot;submitting-a-bugrelated-issue-or-feature-request&quot;,&quot;sections&quot;:[{&quot;title&quot;:&quot;๋ฒ„๊ทธ๋ฅผ ๋ฐœ๊ฒฌํ•˜์…จ๋‚˜์š”?&quot;,&quot;local&quot;:&quot;did-you-find-a-bug&quot;,&quot;sections&quot;:[],&quot;depth&quot;:3},{&quot;title&quot;:&quot;์ƒˆ๋กœ์šด ๊ธฐ๋Šฅ์„ ์›ํ•˜์‹œ๋‚˜์š”?&quot;,&quot;local&quot;:&quot;do-you-want-a-new-feature&quot;,&quot;sections&quot;:[],&quot;depth&quot;:3}],&quot;depth&quot;:2},{&quot;title&quot;:&quot;์ƒˆ๋กœ์šด ๋ชจ๋ธ์„ ๊ตฌํ˜„ํ•˜๊ณ  ์‹ถ์œผ์‹ ๊ฐ€์š”?&quot;,&quot;local&quot;:&quot;do-you-want-to-implement-a-new-model&quot;,&quot;sections&quot;:[],&quot;depth&quot;:2},{&quot;title&quot;:&quot;๋ฌธ์„œ๋ฅผ ์ถ”๊ฐ€ํ•˜๊ณ  ์‹ถ์œผ์‹ ๊ฐ€์š”?&quot;,&quot;local&quot;:&quot;do-you-want-to-add-documentation&quot;,&quot;sections&quot;:[],&quot;depth&quot;:2},{&quot;title&quot;:&quot;ํ’€ ๋ฆฌํ€˜์ŠคํŠธ(Pull Request) ์ƒ์„ฑํ•˜๊ธฐ&quot;,&quot;local&quot;:&quot;create-a-pull-request&quot;,&quot;sections&quot;:[{&quot;title&quot;:&quot;Pull Request ์ฒดํฌ๋ฆฌ์ŠคํŠธ&quot;,&quot;local&quot;:&quot;pull-request-checklist&quot;,&quot;sections&quot;:[],&quot;depth&quot;:3},{&quot;title&quot;:&quot;ํ…Œ์ŠคํŠธ&quot;,&quot;local&quot;:&quot;tests&quot;,&quot;sections&quot;:[],&quot;depth&quot;:3},{&quot;title&quot;:&quot;์Šคํƒ€์ผ ๊ฐ€์ด๋“œ&quot;,&quot;local&quot;:&quot;style-guide&quot;,&quot;sections&quot;:[],&quot;depth&quot;:3},{&quot;title&quot;:&quot;Windows์—์„œ ๊ฐœ๋ฐœ&quot;,&quot;local&quot;:&quot;develop-on-windows&quot;,&quot;sections&quot;:[],&quot;depth&quot;:3},{&quot;title&quot;:&quot;ํฌํฌํ•œ ์ €์žฅ์†Œ๋ฅผ ์ƒ์œ„ ์›๋ณธ ๋ธŒ๋žœ์น˜(main)๊ณผ ๋™๊ธฐํ™”ํ•˜๊ธฐ (Hugging Face ์ €์žฅ์†Œ)&quot;,&quot;local&quot;:&quot;sync-a-forked-repository-with-upstream-main-the-hugging-face-repository&quot;,&quot;sections&quot;:[],&quot;depth&quot;:3}],&quot;depth&quot;:2}],&quot;depth&quot;:1}"/><!---->
<link href="/docs/transformers/main/ko/_app/immutable/assets/0.tn0RQdqM.css" rel="modulepreload"> <!--[--><!--[0--><!--[--><!--[0--><!--[--><p></p> <div class="items-center shrink-0 min-w-[100px] max-sm:min-w-[50px] justify-end ml-auto flex" style="float: right; margin-left: 10px; display: inline-flex; position: relative; z-index: 10;"><div class="inline-flex rounded-md max-sm:rounded-sm"><button class="inline-flex items-center gap-1 h-7 max-sm:h-7 px-2 max-sm:px-1.5 text-sm font-medium text-gray-800 border border-r-0 rounded-l-md max-sm:rounded-l-sm border-gray-200 bg-white hover:shadow-inner dark:border-gray-850 dark:bg-gray-950 dark:text-gray-200 dark:hover:bg-gray-800" aria-live="polite"><span class="inline-flex items-center justify-center rounded-md p-0.5 max-sm:p-0 hover:text-gray-800 dark:hover:text-gray-200"><svg class="sm:size-3.5 size-3" 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><!----></span> <span>Copy page</span></button> <button class="inline-flex items-center justify-center w-6 max-sm:w-5 h-7 max-sm:h-7 disabled:pointer-events-none text-sm text-gray-500 hover:text-gray-700 dark:hover:text-white rounded-r-md max-sm:rounded-r-sm border border-l transition border-gray-200 bg-white hover:shadow-inner dark:border-gray-850 dark:bg-gray-950 dark:text-gray-200 dark:hover:bg-gray-800" aria-haspopup="menu" aria-expanded="false" aria-label="Open copy menu"><svg class="transition-transform text-gray-400 overflow-visible sm:size-3.5 size-3 rotate-0" width="1em" height="1em" viewBox="0 0 12 7" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M1 1L6 6L11 1" stroke="currentColor"></path></svg><!----></button></div> <!--[-1--><!--]--></div><!----> <!--[0--><h1 class="relative group"><a id="contribute-to-transformers" 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="#contribute-to-transformers"><span><svg 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>๐Ÿค— Transformers์— ๊ธฐ์—ฌํ•˜๊ธฐ</span></h1><!--]--><!----> <p>๋ˆ„๊ตฌ๋‚˜ ๐Ÿค— Transformers์— ๊ธฐ์—ฌํ•  ์ˆ˜ ์žˆ์œผ๋ฉฐ, ์šฐ๋ฆฌ๋Š” ๋ชจ๋“  ์‚ฌ๋žŒ์˜ ๊ธฐ์—ฌ๋ฅผ ์†Œ์ค‘ํžˆ ์ƒ๊ฐํ•ฉ๋‹ˆ๋‹ค. ์ฝ”๋“œ ๊ธฐ์—ฌ๋Š” ์ปค๋ฎค๋‹ˆํ‹ฐ๋ฅผ ๋•๋Š” ์œ ์ผํ•œ ๋ฐฉ๋ฒ•์ด ์•„๋‹™๋‹ˆ๋‹ค. ์งˆ๋ฌธ์— ๋‹ตํ•˜๊ฑฐ๋‚˜ ๋‹ค๋ฅธ ์‚ฌ๋žŒ์„ ๋„์™€ ๋ฌธ์„œ๋ฅผ ๊ฐœ์„ ํ•˜๋Š” ๊ฒƒ๋„ ๋งค์šฐ ๊ฐ€์น˜๊ฐ€ ์žˆ์Šต๋‹ˆ๋‹ค.</p> <p>๐Ÿค— Transformers๋ฅผ ๋„๋ฆฌ ์•Œ๋ฆฌ๋Š” ๊ฒƒ๋„ ํฐ ๋„์›€์ด ๋ฉ๋‹ˆ๋‹ค! ๋ฉ‹์ง„ ํ”„๋กœ์ ํŠธ๋“ค์„ ๊ฐ€๋Šฅํ•˜๊ฒŒ ํ•œ ๐Ÿค— Transformers ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ์— ๋Œ€ํ•ด ๋ธ”๋กœ๊ทธ ๊ฒŒ์‹œ๊ธ€์— ์–ธ๊ธ‰ํ•˜๊ฑฐ๋‚˜, ๋„์›€์ด ๋˜์—ˆ์„ ๋•Œ๋งˆ๋‹ค Twitter์— ์•Œ๋ฆฌ๊ฑฐ๋‚˜, ์ €์žฅ์†Œ์— โญ๏ธ ๋ฅผ ํ‘œ์‹œํ•˜์—ฌ ๊ฐ์‚ฌ ์ธ์‚ฌ๋ฅผ ์ „ํ•ด์ฃผ์„ธ์š”.</p> <p>์–ด๋–ค ๋ฐฉ์‹์œผ๋กœ ๊ธฐ์—ฌํ•˜๋“  <a href="https://github.com/huggingface/transformers/blob/main/CODE_OF_CONDUCT.md" rel="nofollow">ํ–‰๋™ ๊ทœ์น™</a>์„ ์ˆ™์ง€ํ•˜๊ณ  ์กด์ค‘ํ•ด์ฃผ์„ธ์š”.</p> <p><strong>์ด ์•ˆ๋‚ด์„œ๋Š” ๋ฉ‹์ง„ <a href="https://github.com/scikit-learn/scikit-learn/blob/main/CONTRIBUTING.md" rel="nofollow">scikit-learn ๊ธฐ์—ฌ ์•ˆ๋‚ด์„œ</a>์—์„œ ํฐ ์˜๊ฐ์„ ๋ฐ›์•˜์Šต๋‹ˆ๋‹ค.</strong></p> <!--[1--><h2 class="relative group"><a id="ways-to-contribute" 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="#ways-to-contribute"><span><svg 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>์—ฌ๋Ÿฌ ๊ฐ€์ง€ ๋ฐฉ๋ฒ•์œผ๋กœ ๐Ÿค— Transformers์— ๊ธฐ์—ฌํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค:</p> <ul><li>๊ธฐ์กด ์ฝ”๋“œ์˜ ๋ฏธํ•ด๊ฒฐ๋œ ๋ฌธ์ œ๋ฅผ ์ˆ˜์ •ํ•ฉ๋‹ˆ๋‹ค.</li> <li>๋ฒ„๊ทธ ๋˜๋Š” ์ƒˆ๋กœ ์ถ”๊ฐ€๋˜๊ธธ ์›ํ•˜๋Š” ๊ธฐ๋Šฅ๊ณผ ๊ด€๋ จ๋œ ์ด์Šˆ๋ฅผ ์ œ์ถœํ•ฉ๋‹ˆ๋‹ค.</li> <li>์ƒˆ๋กœ์šด ๋ชจ๋ธ์„ ๊ตฌํ˜„ํ•ฉ๋‹ˆ๋‹ค.</li> <li>์˜ˆ์ œ๋‚˜ ๋ฌธ์„œ์— ๊ธฐ์—ฌํ•ฉ๋‹ˆ๋‹ค.</li></ul> <p>์–ด๋””์„œ๋ถ€ํ„ฐ ์‹œ์ž‘ํ• ์ง€ ๋ชจ๋ฅด๊ฒ ๋‹ค๋ฉด, <a href="https://github.com/huggingface/transformers/contribute" rel="nofollow">Good First Issue</a> ๋ชฉ๋ก์„ ํ™•์ธํ•ด๋ณด์„ธ์š”. ์ด ๋ชฉ๋ก์€ ์ดˆ๋ณด์ž๋„ ์ฐธ์—ฌํ•˜๊ธฐ ์‰ฌ์šด ์˜คํ”ˆ ์ด์Šˆ ๋ชฉ๋ก์„ ์ œ๊ณตํ•˜๋ฉฐ, ๋‹น์‹ ์ด ์˜คํ”ˆ์†Œ์Šค์— ์ฒ˜์Œ์œผ๋กœ ๊ธฐ์—ฌํ•˜๋Š” ๋ฐ ํฐ ๋„์›€์ด ๋  ๊ฒƒ์ž…๋‹ˆ๋‹ค. ๊ทธ์ € ์ž‘์—…ํ•˜๊ณ  ์‹ถ์€ ์ด์Šˆ์— ๋Œ“๊ธ€๋งŒ ๋‹ฌ์•„์ฃผ๋ฉด ๋ฉ๋‹ˆ๋‹ค.</p> <p>์กฐ๊ธˆ ๋” ๋„์ „์ ์ธ ์ž‘์—…์„ ์›ํ•œ๋‹ค๋ฉด, <a href="https://github.com/huggingface/transformers/labels/Good%20Second%20Issue" rel="nofollow">Good Second Issue</a> ๋ชฉ๋ก๋„ ํ™•์ธํ•ด๋ณด์„ธ์š”. ์ด๋ฏธ ๋‹น์‹ ์ด ์ž˜ ํ•˜๊ณ  ์žˆ๋‹ค๊ณ  ์ƒ๊ฐ๋˜๋”๋ผ๋„, ํ•œ ๋ฒˆ ์‹œ๋„ํ•ด๋ณด์„ธ์š”! ์šฐ๋ฆฌ๋„ ์—ฌ๋Ÿฌ๋ถ„์„ ๋„์šธ ๊ฒƒ์ž…๋‹ˆ๋‹ค. ๐Ÿš€</p> <blockquote><p>์ปค๋ฎค๋‹ˆํ‹ฐ์— ์ด๋ฃจ์–ด์ง€๋Š” ๋ชจ๋“  ๊ธฐ์—ฌ๋Š” ๋˜‘๊ฐ™์ด ์†Œ์ค‘ํ•ฉ๋‹ˆ๋‹ค. ๐Ÿฅฐ</p></blockquote> <!--[1--><h2 class="relative group"><a id="fixing-outstanding-issues" 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="#fixing-outstanding-issues"><span><svg 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>๊ธฐ์กด ์ฝ”๋“œ์—์„œ ๋ฐœ๊ฒฌํ•œ ๋ฌธ์ œ์ ์— ๋Œ€ํ•œ ํ•ด๊ฒฐ์ฑ…์ด ๋– ์˜ค๋ฅธ ๊ฒฝ์šฐ, ์–ธ์ œ๋“ ์ง€ <a href="https://github.com/huggingface/transformers/blob/main/CONTRIBUTING.md/#create-a-pull-request" rel="nofollow">๊ธฐ์—ฌ๋ฅผ ์‹œ์ž‘</a>ํ•˜๊ณ  Pull Request๋ฅผ ์ƒ์„ฑํ•ด์ฃผ์„ธ์š”!</p> <!--[1--><h2 class="relative group"><a id="submitting-a-bugrelated-issue-or-feature-request" 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="#submitting-a-bugrelated-issue-or-feature-request"><span><svg 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>๋ฒ„๊ทธ ๊ด€๋ จ ์ด์Šˆ๋ฅผ ์ œ๊ธฐํ•˜๊ฑฐ๋‚˜ ์ƒˆ๋กœ์šด ๊ธฐ๋Šฅ์„ ์š”์ฒญํ•  ๋•Œ๋Š” ๋‹ค์Œ ๊ฐ€์ด๋“œ๋ผ์ธ์„ ์ตœ๋Œ€ํ•œ ์ค€์ˆ˜ํ•ด์ฃผ์„ธ์š”. ์ด๋ ‡๊ฒŒ ํ•˜๋ฉด ์ข‹์€ ํ”ผ๋“œ๋ฐฑ๊ณผ ํ•จ๊ป˜ ๋น ๋ฅด๊ฒŒ ๋‹ต๋ณ€ํ•ด ๋“œ๋ฆด ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.</p> <!--[2--><h3 class="relative group"><a id="did-you-find-a-bug" 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="#did-you-find-a-bug"><span><svg 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>๐Ÿค— Transformers ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ๋Š” ์‚ฌ์šฉ ์ค‘์— ๊ฒช๋Š” ๋ฌธ์ œ๋ฅผ ๋ณด๊ณ ํ•ด์ฃผ๋Š” ์‚ฌ์šฉ์ž๋“ค ๋•๋ถ„์— ๋”์šฑ ๊ฒฌ๊ณ ํ•ด์ง€๊ณ  ์‹ ๋ขฐํ•  ์ˆ˜ ์žˆ๊ฒŒ ๋˜์—ˆ์Šต๋‹ˆ๋‹ค.</p> <p>์ด์Šˆ๋ฅผ ๋ณด๊ณ ํ•˜๊ธฐ ์ „์—, ๋ฒ„๊ทธ๊ฐ€ ์ด๋ฏธ <strong>๋ณด๊ณ ๋˜์ง€ ์•Š์•˜๋Š”์ง€</strong> ํ™•์ธํ•ด์ฃผ์„ธ์š”. (GitHub์˜ ์ด์Šˆ ํƒญ ์•„๋ž˜์˜ ๊ฒ€์ƒ‰ ๋ฐ”๋ฅผ ์‚ฌ์šฉํ•˜์„ธ์š”). ์ด์Šˆ๋Š” ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ ์ž์ฒด์—์„œ ๋ฐœ์ƒํ•œ ๋ฒ„๊ทธ์–ด์•ผ ํ•˜๋ฉฐ, ์ฝ”๋“œ์˜ ๋‹ค๋ฅธ ๋ถ€๋ถ„๊ณผ ๊ด€๋ จ๋œ ๊ฒƒ์ด ์•„๋‹ˆ์–ด์•ผ ํ•ฉ๋‹ˆ๋‹ค. ๋ฒ„๊ทธ๊ฐ€ ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ์˜ ๋ฌธ์ œ๋กœ ๋ฐœ์ƒํ•˜์˜€๋Š”์ง€ ํ™•์‹คํ•˜์ง€ ์•Š์€ ๊ฒฝ์šฐ ๋จผ์ € <a href="https://discuss.huggingface.co/" rel="nofollow">ํฌ๋Ÿผ</a>์—์„œ ์งˆ๋ฌธํ•ด ์ฃผ์„ธ์š”. ์ด๋ ‡๊ฒŒ ํ•˜๋ฉด ์ผ๋ฐ˜์ ์ธ ์งˆ๋ฌธ๋ณด๋‹ค ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ์™€ ๊ด€๋ จ๋œ ๋ฌธ์ œ๋ฅผ ๋” ๋น ๋ฅด๊ฒŒ ํ•ด๊ฒฐํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.</p> <p>๋ฒ„๊ทธ๊ฐ€ ์ด๋ฏธ ๋ณด๊ณ ๋˜์ง€ ์•Š์•˜๋‹ค๋Š” ๊ฒƒ์„ ํ™•์ธํ–ˆ๋‹ค๋ฉด, ๋‹ค์Œ ์ •๋ณด๋ฅผ ํฌํ•จํ•˜์—ฌ ์ด์Šˆ๋ฅผ ์ œ์ถœํ•ด ์ฃผ์„ธ์š”. ๊ทธ๋Ÿฌ๋ฉด ์šฐ๋ฆฌ๊ฐ€ ๋น ๋ฅด๊ฒŒ ํ•ด๊ฒฐํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค:</p> <ul><li>์‚ฌ์šฉ ์ค‘์ธ <strong>์šด์˜์ฒด์ œ ์ข…๋ฅ˜์™€ ๋ฒ„์ „</strong>, ๊ทธ๋ฆฌ๊ณ  <strong>Python</strong>, <strong>PyTorch</strong> ๋˜๋Š” <strong>TensorFlow</strong> ๋ฒ„์ „.</li> <li>๋ฒ„๊ทธ๋ฅผ 30์ดˆ ์ด๋‚ด๋กœ ์žฌํ˜„ํ•  ์ˆ˜ ์žˆ๋Š” ๊ฐ„๋‹จํ•˜๊ณ  ๋…๋ฆฝ์ ์ธ ์ฝ”๋“œ ์Šค๋‹ˆํŽซ.</li> <li>์˜ˆ์™ธ๊ฐ€ ๋ฐœ์ƒํ•œ ๊ฒฝ์šฐ <em>์ „์ฒด</em> ํŠธ๋ ˆ์ด์Šค๋ฐฑ.</li> <li>์Šคํฌ๋ฆฐ์ƒท๊ณผ ๊ฐ™์ด ๋„์›€์ด ๋  ๊ฒƒ์œผ๋กœ ์ƒ๊ฐ๋˜๋Š” ์ถ”๊ฐ€ ์ •๋ณด๋ฅผ ์ฒจ๋ถ€ํ•ด ์ฃผ์„ธ์š”.</li></ul> <p>์šด์˜์ฒด์ œ์™€ ์†Œํ”„ํŠธ์›จ์–ด ๋ฒ„์ „์„ ์ž๋™์œผ๋กœ ๊ฐ€์ ธ์˜ค๋ ค๋ฉด ๋‹ค์Œ ๋ช…๋ น์„ ์‹คํ–‰ํ•˜์„ธ์š”:</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 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="language-bash "><!---->transformers <span class="hljs-built_in">env</span><!----></pre></div><!----> <p>์ €์žฅ์†Œ์˜ ๋ฃจํŠธ ๋””๋ ‰ํ„ฐ๋ฆฌ์—์„œ๋„ ๊ฐ™์€ ๋ช…๋ น์„ ์‹คํ–‰ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค:</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 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="language-bash "><!---->python src/transformers/commands/transformers_cli.py <span class="hljs-built_in">env</span><!----></pre></div><!----> <!--[2--><h3 class="relative group"><a id="do-you-want-a-new-feature" 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="#do-you-want-a-new-feature"><span><svg 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>๐Ÿค— Transformers์—์„œ ์‚ฌ์šฉํ•˜๊ณ  ์‹ถ์€ ์ƒˆ๋กœ์šด ๊ธฐ๋Šฅ์ด ์žˆ๋‹ค๋ฉด, ๋‹ค์Œ ๋‚ด์šฉ์„ ํฌํ•จํ•˜์—ฌ ์ด์Šˆ๋ฅผ ์ œ์ถœํ•ด ์ฃผ์„ธ์š”:</p> <ol><li><p>์ด ๊ธฐ๋Šฅ์ด ํ•„์š”ํ•œ <em>์ด์œ </em>๋Š” ๋ฌด์—‡์ธ๊ฐ€์š”? ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ์— ๋Œ€ํ•œ ๋ฌธ์ œ๋‚˜ ๋ถˆ๋งŒ๊ณผ ๊ด€๋ จ์ด ์žˆ๋‚˜์š”? ํ”„๋กœ์ ํŠธ์— ํ•„์š”ํ•œ ๊ธฐ๋Šฅ์ธ๊ฐ€์š”? ์ปค๋ฎค๋‹ˆํ‹ฐ์— ๋„์›€์ด ๋  ๋งŒํ•œ ๊ธฐ๋Šฅ์ธ๊ฐ€์š”?</p> <p>์–ด๋–ค ๋‚ด์šฉ์ด๋“  ์—ฌ๋Ÿฌ๋ถ„์˜ ์ด์•ผ๊ธฐ๋ฅผ ๋“ฃ๊ณ  ์‹ถ์Šต๋‹ˆ๋‹ค!</p></li> <li><p>์š”์ฒญํ•˜๋Š” ๊ธฐ๋Šฅ์„ ์ตœ๋Œ€ํ•œ ์ž์„ธํžˆ ์„ค๋ช…ํ•ด ์ฃผ์„ธ์š”. ๋” ๋งŽ์€ ์ •๋ณด๋ฅผ ์ œ๊ณตํ• ์ˆ˜๋ก ๋” ๋‚˜์€ ๋„์›€์„ ๋“œ๋ฆด ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.</p></li> <li><p>ํ•ด๋‹น ๊ธฐ๋Šฅ์˜ ์‚ฌ์šฉ๋ฒ•์„ ๋ณด์—ฌ์ฃผ๋Š” <em>์ฝ”๋“œ ์Šค๋‹ˆํŽซ</em>์„ ์ œ๊ณตํ•ด ์ฃผ์„ธ์š”.</p></li> <li><p>๊ธฐ๋Šฅ๊ณผ ๊ด€๋ จ๋œ ๋…ผ๋ฌธ์ด ์žˆ๋Š” ๊ฒฝ์šฐ ๋งํฌ๋ฅผ ํฌํ•จํ•ด ์ฃผ์„ธ์š”.</p></li></ol> <p>์ด์Šˆ๊ฐ€ ์ž˜ ์ž‘์„ฑ๋˜์—ˆ๋‹ค๋ฉด ์ด์Šˆ๊ฐ€ ์ƒ์„ฑ๋œ ์ˆœ๊ฐ„, ์ด๋ฏธ 80% ์ •๋„์˜ ์ž‘์—…์ด ์™„๋ฃŒ๋œ ๊ฒƒ์ž…๋‹ˆ๋‹ค.</p> <p>์ด์Šˆ๋ฅผ ์ œ๊ธฐํ•˜๋Š” ๋ฐ ๋„์›€์ด ๋  ๋งŒํ•œ <a href="https://github.com/huggingface/transformers/tree/main/templates" rel="nofollow">ํ…œํ”Œ๋ฆฟ</a>๋„ ์ค€๋น„๋˜์–ด ์žˆ์Šต๋‹ˆ๋‹ค.</p> <!--[1--><h2 class="relative group"><a id="do-you-want-to-implement-a-new-model" 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="#do-you-want-to-implement-a-new-model"><span><svg 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>์ƒˆ๋กœ์šด ๋ชจ๋ธ์€ ๊ณ„์†ํ•ด์„œ ์ถœ์‹œ๋ฉ๋‹ˆ๋‹ค. ๋งŒ์•ฝ ์—ฌ๋Ÿฌ๋ถ„์ด ์ƒˆ๋กœ์šด ๋ชจ๋ธ์„ ๊ตฌํ˜„ํ•˜๊ณ  ์‹ถ๋‹ค๋ฉด ๋‹ค์Œ ์ •๋ณด๋ฅผ ์ œ๊ณตํ•ด ์ฃผ์„ธ์š”:</p> <ul><li>๋ชจ๋ธ์— ๋Œ€ํ•œ ๊ฐ„๋‹จํ•œ ์„ค๋ช…๊ณผ ๋…ผ๋ฌธ ๋งํฌ.</li> <li>๊ตฌํ˜„์ด ๊ณต๊ฐœ๋˜์–ด ์žˆ๋‹ค๋ฉด ๊ตฌํ˜„ ๋งํฌ.</li> <li>๋ชจ๋ธ ๊ฐ€์ค‘์น˜๊ฐ€ ์‚ฌ์šฉ ๊ฐ€๋Šฅํ•˜๋‹ค๋ฉด ๊ฐ€์ค‘์น˜ ๋งํฌ.</li></ul> <p>๋งŒ์•ฝ ๋ชจ๋ธ์„ ์ง์ ‘ ๊ธฐ์—ฌํ•˜๊ณ  ์‹ถ์œผ์‹œ๋‹ค๋ฉด, ์•Œ๋ ค์ฃผ์„ธ์š”. ๐Ÿค— Transformers์— ์ถ”๊ฐ€ํ•  ์ˆ˜ ์žˆ๋„๋ก ๋„์™€๋“œ๋ฆฌ๊ฒ ์Šต๋‹ˆ๋‹ค!</p> <p><a href="https://huggingface.co/docs/transformers/add_new_model" rel="nofollow">๐Ÿค— Transformers์— ์ƒˆ๋กœ์šด ๋ชจ๋ธ์„ ์ถ”๊ฐ€ํ•˜๋Š” ๋ฐฉ๋ฒ•</a>์— ๋Œ€ํ•œ ๊ธฐ์ˆ ์ ์ธ ์•ˆ๋‚ด์„œ๋„ ์žˆ์Šต๋‹ˆ๋‹ค.</p> <!--[1--><h2 class="relative group"><a id="do-you-want-to-add-documentation" 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="#do-you-want-to-add-documentation"><span><svg 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>์šฐ๋ฆฌ๋Š” ์–ธ์ œ๋‚˜ ๋” ๋ช…ํ™•ํ•˜๊ณ  ์ •ํ™•ํ•œ ๋ฌธ์„œ๋ฅผ ์ œ๊ณตํ•˜๊ธฐ ์œ„ํ•˜์—ฌ ๊ฐœ์„ ์ ์„ ์ฐพ๊ณ  ์žˆ์Šต๋‹ˆ๋‹ค. ์˜คํƒˆ์ž๋‚˜ ๋ถ€์กฑํ•œ ๋‚ด์šฉ, ๋ถ„๋ช…ํ•˜์ง€ ์•Š๊ฑฐ๋‚˜ ๋ถ€์ •ํ™•ํ•œ ๋‚ด์šฉ ๋“ฑ์„ ์•Œ๋ ค์ฃผ์‹œ๋ฉด ๊ฐœ์„ ํ•˜๋Š” ๋ฐ ๋„์›€์ด ๋ฉ๋‹ˆ๋‹ค. ๊ด€์‹ฌ์ด ์žˆ์œผ์‹œ๋‹ค๋ฉด ๋ณ€๊ฒฝํ•˜๊ฑฐ๋‚˜ ๊ธฐ์—ฌํ•˜์‹ค ์ˆ˜ ์žˆ๋„๋ก ๋„์™€๋“œ๋ฆฌ๊ฒ ์Šต๋‹ˆ๋‹ค!</p> <p>๋ฌธ์„œ๋ฅผ ์ƒ์„ฑ, ๋นŒ๋“œ ๋ฐ ์ž‘์„ฑํ•˜๋Š” ๋ฐฉ๋ฒ•์— ๋Œ€ํ•œ ์ž์„ธํ•œ ๋‚ด์šฉ์€ <a href="https://github.com/huggingface/transformers/tree/main/docs" rel="nofollow">README</a> ๋ฌธ์„œ๋ฅผ ํ™•์ธํ•ด ์ฃผ์„ธ์š”.</p> <!--[1--><h2 class="relative group"><a id="create-a-pull-request" 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="#create-a-pull-request"><span><svg 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>ํ’€ ๋ฆฌํ€˜์ŠคํŠธ(Pull Request) ์ƒ์„ฑํ•˜๊ธฐ</span></h2><!--]--><!----> <p>์ฝ”๋“œ๋ฅผ ์ž‘์„ฑํ•˜๊ธฐ ์ „์— ๊ธฐ์กด์˜ Pull Request๋‚˜ ์ด์Šˆ๋ฅผ ๊ฒ€์ƒ‰ํ•˜์—ฌ ๋ˆ„๊ตฐ๊ฐ€ ์ด๋ฏธ ๋™์ผํ•œ ์ž‘์—…์„ ํ•˜๊ณ  ์žˆ๋Š”์ง€ ํ™•์ธํ•˜๋Š” ๊ฒƒ์ด ์ข‹์Šต๋‹ˆ๋‹ค. ํ™•์‹คํ•˜์ง€ ์•Š๋‹ค๋ฉด ํ”ผ๋“œ๋ฐฑ์„ ๋ฐ›๊ธฐ ์œ„ํ•ด ์ด์Šˆ๋ฅผ ์—ด์–ด๋ณด๋Š” ๊ฒƒ์ด ์ข‹์Šต๋‹ˆ๋‹ค.</p> <p>๐Ÿค— Transformers์— ๊ธฐ์—ฌํ•˜๊ธฐ ์œ„ํ•ด์„œ๋Š” ๊ธฐ๋ณธ์ ์ธ <code>git</code> ์‚ฌ์šฉ ๋Šฅ๋ ฅ์ด ํ•„์š”ํ•ฉ๋‹ˆ๋‹ค. <code>git</code>์€ ์‚ฌ์šฉํ•˜๊ธฐ ์‰ฌ์šด ๋„๊ตฌ๋Š” ์•„๋‹ˆ์ง€๋งŒ, ๋งค์šฐ ํ›Œ๋ฅญํ•œ ๋งค๋‰ด์–ผ์„ ์ œ๊ณตํ•ฉ๋‹ˆ๋‹ค. ์‰˜(shell)์—์„œ <code>git --help</code>์„ ์ž…๋ ฅํ•˜์—ฌ ํ™•์ธํ•ด๋ณด์„ธ์š”! ๋งŒ์•ฝ ์ฑ…์„ ์„ ํ˜ธํ•œ๋‹ค๋ฉด, <a href="https://git-scm.com/book/en/v2" rel="nofollow">Pro Git</a>์€ ๋งค์šฐ ์ข‹์€ ์ฐธ๊ณ  ์ž๋ฃŒ๊ฐ€ ๋  ๊ฒƒ์ž…๋‹ˆ๋‹ค.</p> <p>๐Ÿค— Transformers์— ๊ธฐ์—ฌํ•˜๋ ค๋ฉด <strong><a href="https://github.com/huggingface/transformers/blob/main/setup.py#L426" rel="nofollow">Python 3.9</a></strong> ์ด์ƒ์˜ ๋ฒ„์ „์ด ํ•„์š”ํ•ฉ๋‹ˆ๋‹ค. ๊ธฐ์—ฌ๋ฅผ ์‹œ์ž‘ํ•˜๋ ค๋ฉด ๋‹ค์Œ ๋‹จ๊ณ„๋ฅผ ๋”ฐ๋ฅด์„ธ์š”:</p> <ol><li><p>์ €์žฅ์†Œ ํŽ˜์ด์ง€์—์„œ <strong><a href="https://github.com/huggingface/transformers/fork" rel="nofollow">Fork</a></strong> ๋ฒ„ํŠผ์„ ํด๋ฆญํ•˜์—ฌ ์ €์žฅ์†Œ๋ฅผ ํฌํฌํ•˜์„ธ์š”. ์ด๋ ‡๊ฒŒ ํ•˜๋ฉด ์ฝ”๋“œ์˜ ๋ณต์‚ฌ๋ณธ์ด ์—ฌ๋Ÿฌ๋ถ„์˜ GitHub ์‚ฌ์šฉ์ž ๊ณ„์ • ์•„๋ž˜์— ์ƒ์„ฑ๋ฉ๋‹ˆ๋‹ค.</p></li> <li><p>ํฌํฌํ•œ ์ €์žฅ์†Œ๋ฅผ ๋กœ์ปฌ ๋””์Šคํฌ๋กœ ํด๋ก ํ•˜๊ณ , ๊ธฐ๋ณธ ์ €์žฅ์†Œ๋ฅผ ์›๊ฒฉ(remote)์œผ๋กœ ์ถ”๊ฐ€ํ•˜์„ธ์š”:</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 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="language-bash "><!---->git <span class="hljs-built_in">clone</span> git@github.com:&lt;your Github handle&gt;/transformers.git
<span class="hljs-built_in">cd</span> transformers
git remote add upstream https://github.com/huggingface/transformers.git<!----></pre></div><!----></li> <li><p>๊ฐœ๋ฐœ ๋ณ€๊ฒฝ ์‚ฌํ•ญ์„ ์ €์žฅํ•  ์ƒˆ ๋ธŒ๋žœ์น˜๋ฅผ ์ƒ์„ฑํ•˜์„ธ์š”:</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 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="language-bash "><!---->git checkout -b a-descriptive-name-for-my-changes<!----></pre></div><!----> <p>๐Ÿšจ ์ ˆ๋Œ€ <code>main</code> ๋ธŒ๋žœ์น˜์—์„œ ์ž‘์—…ํ•˜์ง€ <strong>๋งˆ์„ธ์š”!</strong></p></li> <li><p>๊ฐ€์ƒ ํ™˜๊ฒฝ์—์„œ ๋‹ค์Œ ๋ช…๋ น์„ ์‹คํ–‰ํ•˜์—ฌ ๊ฐœ๋ฐœ ํ™˜๊ฒฝ์„ ์„ค์ •ํ•˜์„ธ์š”:</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 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="language-bash "><!---->pip install -e <span class="hljs-string">&quot;.[dev]&quot;</span><!----></pre></div><!----> <p>๋งŒ์•ฝ ์ด๋ฏธ ๊ฐ€์ƒ ํ™˜๊ฒฝ์— ๐Ÿค— Transformers๊ฐ€ ์„ค์น˜๋˜์–ด ์žˆ๋‹ค๋ฉด, <code>-e</code> ํ”Œ๋ž˜๊ทธ๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ์„ค์น˜ํ•˜๊ธฐ ์ „์— <code>pip uninstall transformers</code>๋กœ ์ œ๊ฑฐํ•ด์ฃผ์„ธ์š”.</p> <p>์—ฌ๋Ÿฌ๋ถ„์˜ ์šด์˜์ฒด์ œ์— ๋”ฐ๋ผ์„œ, ๊ทธ๋ฆฌ๊ณ  ๐Ÿค— Transformers์˜ ์„ ํƒ์  ์˜์กด์„ฑ์˜ ์ˆ˜๊ฐ€ ์ฆ๊ฐ€ํ•˜๋ฉด์„œ, ์ด ๋ช…๋ น์ด ์‹คํŒจํ•  ์ˆ˜๋„ ์žˆ์Šต๋‹ˆ๋‹ค. ๊ทธ๋Ÿด ๊ฒฝ์šฐ ์‚ฌ์šฉํ•˜๋ ค๋Š” ๋”ฅ๋Ÿฌ๋‹ ํ”„๋ ˆ์ž„์›Œํฌ(PyTorch, TensorFlow, ๊ทธ๋ฆฌ๊ณ /๋˜๋Š” Flax)๋ฅผ ์„ค์น˜ํ•œ ํ›„ ์•„๋ž˜ ๋ช…๋ น์„ ์‹คํ–‰ํ•ด์ฃผ์„ธ์š”:</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 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="language-bash "><!---->pip install -e <span class="hljs-string">&quot;.[quality]&quot;</span><!----></pre></div><!----> <p>๋Œ€๋ถ€๋ถ„์˜ ๊ฒฝ์šฐ ์ด๊ฒƒ์œผ๋กœ ์ถฉ๋ถ„ํ•  ๊ฒƒ์ž…๋‹ˆ๋‹ค.</p></li> <li><p>๋ธŒ๋žœ์น˜์—์„œ ๊ธฐ๋Šฅ์„ ๊ฐœ๋ฐœํ•˜์„ธ์š”.</p> <p>์ฝ”๋“œ๋ฅผ ์ž‘์—…ํ•˜๋Š” ๋™์•ˆ ํ…Œ์ŠคํŠธ ์Šค์œ„ํŠธ(test suite)๊ฐ€ ํ†ต๊ณผํ•˜๋Š”์ง€ ํ™•์ธํ•˜์„ธ์š”. ๋‹ค์Œ๊ณผ ๊ฐ™์ด ๋ณ€๊ฒฝ ์‚ฌํ•ญ์— ์˜ํ–ฅ์„ ๋ฐ›๋Š” ํ…Œ์ŠคํŠธ๋ฅผ ์‹คํ–‰ํ•˜์„ธ์š”:</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 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="language-bash "><!---->pytest tests/&lt;TEST_TO_RUN&gt;.py<!----></pre></div><!----> <p>ํ…Œ์ŠคํŠธ์— ๋Œ€ํ•œ ๋” ๋งŽ์€ ์ •๋ณด๋Š” <a href="https://huggingface.co/docs/transformers/testing" rel="nofollow">ํ…Œ์ŠคํŠธ</a> ๊ฐ€์ด๋“œ๋ฅผ ํ™•์ธํ•˜์„ธ์š”.</p> <p>๐Ÿค— Transformers๋Š” <code>black</code>๊ณผ <code>ruff</code>๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ์†Œ์Šค ์ฝ”๋“œ์˜ ํ˜•์‹์„ ์ผ๊ด€๋˜๊ฒŒ ์œ ์ง€ํ•ฉ๋‹ˆ๋‹ค. ๋ณ€๊ฒฝ ์‚ฌํ•ญ์„ ์ ์šฉํ•œ ํ›„์—๋Š” ๋‹ค์Œ ๋ช…๋ น์œผ๋กœ ์ž๋™์œผ๋กœ ์Šคํƒ€์ผ ๊ต์ • ๋ฐ ์ฝ”๋“œ ๊ฒ€์ฆ์„ ์ˆ˜ํ–‰ํ•˜์„ธ์š”:</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 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="language-bash "><!---->make style<!----></pre></div><!----> <p>์ด๊ฒƒ์€ ๋˜ํ•œ ์ž‘์—… ์ค‘์ธ PR์—์„œ ์ˆ˜์ •ํ•œ ํŒŒ์ผ์—์„œ๋งŒ ์ž‘๋™ํ•˜๋„๋ก ์ตœ์ ํ™”๋˜์–ด ์žˆ์Šต๋‹ˆ๋‹ค.</p> <p>๊ฒ€์‚ฌ๋ฅผ ํ•˜๋‚˜์”ฉ ์‹คํ–‰ํ•˜๋ ค๋Š” ๊ฒฝ์šฐ, ๋‹ค์Œ ๋ช…๋ น์œผ๋กœ ์Šคํƒ€์ผ ๊ต์ •์„ ์ ์šฉํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค:</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 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="language-bash "><!---->make style<!----></pre></div><!----> <p>๐Ÿค— Transformers๋Š” ๋˜ํ•œ <code>ruff</code>์™€ ๋ช‡ ๊ฐ€์ง€ ์‚ฌ์šฉ์ž ์ •์˜ ์Šคํฌ๋ฆฝํŠธ๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ์ฝ”๋”ฉ ์‹ค์ˆ˜๋ฅผ ํ™•์ธํ•ฉ๋‹ˆ๋‹ค. CI๋ฅผ ํ†ตํ•ด ํ’ˆ์งˆ ๊ด€๋ฆฌ๊ฐ€ ์ˆ˜ํ–‰๋˜์ง€๋งŒ, ๋‹ค์Œ ๋ช…๋ น์œผ๋กœ ๋™์ผํ•œ ๊ฒ€์‚ฌ๋ฅผ ์‹คํ–‰ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค:</p></li></ol> <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 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="language-bash "><!---->make check-repo<!----></pre></div><!----> <p>์ด๋Ÿฌํ•œ ๊ฒ€์‚ฌ์— ๋Œ€ํ•ด ์ž์„ธํžˆ ์•Œ์•„๋ณด๊ณ  ๊ด€๋ จ ๋ฌธ์ œ๋ฅผ ํ•ด๊ฒฐํ•˜๋Š” ๋ฐฉ๋ฒ•์€ <a href="https://huggingface.co/docs/transformers/pr_checks" rel="nofollow">Pull Request์— ๋Œ€ํ•œ ๊ฒ€์‚ฌ</a> ๊ฐ€์ด๋“œ๋ฅผ ํ™•์ธํ•˜์„ธ์š”.</p> <p>๋งŒ์•ฝ <code>docs/source</code> ๋””๋ ‰ํ„ฐ๋ฆฌ ์•„๋ž˜์˜ ๋ฌธ์„œ๋ฅผ ์ˆ˜์ •ํ•˜๋Š” ๊ฒฝ์šฐ, ๋ฌธ์„œ๊ฐ€ ๋นŒ๋“œ๋  ์ˆ˜ ์žˆ๋Š”์ง€ ํ™•์ธํ•˜์„ธ์š”. ์ด ๊ฒ€์‚ฌ๋Š” Pull Request๋ฅผ ์—ด ๋•Œ๋„ CI์—์„œ ์‹คํ–‰๋ฉ๋‹ˆ๋‹ค. ๋กœ์ปฌ ๊ฒ€์‚ฌ๋ฅผ ์‹คํ–‰ํ•˜๋ ค๋ฉด ๋ฌธ์„œ ๋นŒ๋”๋ฅผ ์„ค์น˜ํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค:</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 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="language-bash "><!---->pip install <span class="hljs-string">&quot;.[docs]&quot;</span><!----></pre></div><!----> <p>์ €์žฅ์†Œ์˜ ๋ฃจํŠธ ๋””๋ ‰ํ„ฐ๋ฆฌ์—์„œ ๋‹ค์Œ ๋ช…๋ น์„ ์‹คํ–‰ํ•˜์„ธ์š”:</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 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="language-bash "><!---->doc-builder build transformers docs/source/en --build_dir ~/tmp/test-build<!----></pre></div><!----> <p>์ด ๋ช…๋ น์€ <code>~/tmp/test-build</code> ํด๋”์— ๋ฌธ์„œ๋ฅผ ๋นŒ๋“œํ•˜๋ฉฐ, ์ƒ์„ฑ๋œ Markdown ํŒŒ์ผ์„ ์„ ํ˜ธํ•˜๋Š” ํŽธ์ง‘๊ธฐ๋กœ ํ™•์ธํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. Pull Request๋ฅผ ์—ด ๋•Œ GitHub์—์„œ ๋ฌธ์„œ๋ฅผ ๋ฏธ๋ฆฌ ๋ณผ ์ˆ˜๋„ ์žˆ์Šต๋‹ˆ๋‹ค.</p> <p>๋ณ€๊ฒฝ ์‚ฌํ•ญ์— ๋งŒ์กฑํ•˜๋ฉด <code>git add</code>๋กœ ๋ณ€๊ฒฝ๋œ ํŒŒ์ผ์„ ์ถ”๊ฐ€ํ•˜๊ณ , <code>git commit</code>์œผ๋กœ ๋ณ€๊ฒฝ ์‚ฌํ•ญ์„ ๋กœ์ปฌ์— ๊ธฐ๋กํ•˜์„ธ์š”:</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 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="language-bash "><!---->git add modified_file.py
git commit<!----></pre></div><!----> <p><a href="https://chris.beams.io/posts/git-commit/" rel="nofollow">์ข‹์€ ์ปค๋ฐ‹ ๋ฉ”์‹œ์ง€</a>๋ฅผ ์ž‘์„ฑํ•˜์—ฌ ๋ณ€๊ฒฝ ์‚ฌํ•ญ์„ ๋ช…ํ™•ํ•˜๊ฒŒ ์ „๋‹ฌํ•˜์„ธ์š”!</p> <p>๋ณ€๊ฒฝ ์‚ฌํ•ญ์„ ํ”„๋กœ์ ํŠธ ์›๋ณธ ์ €์žฅ์†Œ์™€ ๋™๊ธฐํ™”ํ•˜๋ ค๋ฉด, PR์„ <em>์—ด๊ธฐ ์ „์—</em> ๋ธŒ๋žœ์น˜๋ฅผ <code>upstream/branch</code>๋กœ ๋ฆฌ๋ฒ ์ด์Šค(rebase)ํ•˜์„ธ์š”. ๋˜๋Š” ๊ด€๋ฆฌ์ž์˜ ์š”์ฒญ์— ์ด ์ž‘์—…์ด ํ•„์š”ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค:</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 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="language-bash "><!---->git fetch upstream
git rebase upstream/main<!----></pre></div><!----> <p>๋ณ€๊ฒฝ ์‚ฌํ•ญ์„ ๋ธŒ๋žœ์น˜์— ํ‘ธ์‹œํ•˜์„ธ์š”:</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 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="language-bash "><!---->git push -u origin a-descriptive-name-for-my-changes<!----></pre></div><!----> <p>์ด๋ฏธ PR์„ ์—ด์—ˆ๋‹ค๋ฉด, <code>--force</code> ํ”Œ๋ž˜๊ทธ์™€ ํ•จ๊ป˜ ๊ฐ•์ œ ํ‘ธ์‹œํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค. ์•„์ง PR์ด ์—ด๋ฆฌ์ง€ ์•Š์•˜๋‹ค๋ฉด ์ •์ƒ์ ์œผ๋กœ ๋ณ€๊ฒฝ ์‚ฌํ•ญ์„ ํ‘ธ์‹œํ•˜๋ฉด ๋ฉ๋‹ˆ๋‹ค.</p> <ol start="6"><li><p>์ด์ œ GitHub์—์„œ ํฌํฌํ•œ ์ €์žฅ์†Œ๋กœ ์ด๋™ํ•˜๊ณ  <strong>Pull request(ํ’€ ๋ฆฌํ€˜์ŠคํŠธ)</strong>๋ฅผ ํด๋ฆญํ•˜์—ฌ Pull Request๋ฅผ ์—ด ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ์•„๋ž˜์˜ <a href="https://github.com/huggingface/transformers/blob/main/CONTRIBUTING.md/#pull-request-checklist" rel="nofollow">์ฒดํฌ๋ฆฌ์ŠคํŠธ</a>์—์„œ ๋ชจ๋“  ํ•ญ๋ชฉ์— ์ฒดํฌ ํ‘œ์‹œ๋ฅผ ํ•˜์„ธ์š”. ์ค€๋น„๊ฐ€ ์™„๋ฃŒ๋˜๋ฉด ํ”„๋กœ์ ํŠธ ๊ด€๋ฆฌ์ž์—๊ฒŒ ๋ณ€๊ฒฝ ์‚ฌํ•ญ์„ ๋ณด๋‚ด ๊ฒ€ํ† ๋ฅผ ์š”์ฒญํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.</p></li> <li><p>๊ด€๋ฆฌ์ž๊ฐ€ ๋ณ€๊ฒฝ ์‚ฌํ•ญ์„ ์š”์ฒญํ•ด๋„ ๊ดœ์ฐฎ์Šต๋‹ˆ๋‹ค. ํ•ต์‹ฌ ๊ธฐ์—ฌ์ž๋“ค๋„ ๋™์ผํ•œ ์ƒํ™ฉ์„ ๊ฒช์Šต๋‹ˆ๋‹ค! ๋ชจ๋‘๊ฐ€ ๋ณ€๊ฒฝ ์‚ฌํ•ญ์„ Pull Request์—์„œ ๋ณผ ์ˆ˜ ์žˆ๋„๋ก, ๋กœ์ปฌ ๋ธŒ๋žœ์น˜์—์„œ ์ž‘์—…ํ•˜๊ณ  ๋ณ€๊ฒฝ ์‚ฌํ•ญ์„ ํฌํฌํ•œ ์ €์žฅ์†Œ๋กœ ํ‘ธ์‹œํ•˜์„ธ์š”. ๊ทธ๋Ÿฌ๋ฉด ๋ณ€๊ฒฝ ์‚ฌํ•ญ์ด ์ž๋™์œผ๋กœ Pull Request์— ๋‚˜ํƒ€๋‚ฉ๋‹ˆ๋‹ค.</p></li></ol> <!--[2--><h3 class="relative group"><a id="pull-request-checklist" 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="#pull-request-checklist"><span><svg 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>Pull Request ์ฒดํฌ๋ฆฌ์ŠคํŠธ</span></h3><!--]--><!----> <p>โ˜ Pull Request ์ œ๋ชฉ์€ ๊ธฐ์—ฌ ๋‚ด์šฉ์„ ์š”์•ฝํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค.<br/> โ˜ Pull Request๊ฐ€ ์ด์Šˆ๋ฅผ ํ•ด๊ฒฐํ•˜๋Š” ๊ฒฝ์šฐ, Pull Request ์„ค๋ช…์— ์ด์Šˆ ๋ฒˆํ˜ธ๋ฅผ ์–ธ๊ธ‰ํ•˜์—ฌ ์—ฐ๊ด€๋˜์–ด ์žˆ์Œ์„ ์•Œ๋ ค์ฃผ์„ธ์š”. (์ด์Šˆ๋ฅผ ํ™•์ธํ•˜๋Š” ์‚ฌ๋žŒ๋“ค์ด ํ•ด๋‹น ์ด์Šˆ์— ๋Œ€ํ•œ ์ž‘์—…์ด ์ง„ํ–‰ ์ค‘์ž„์„ ์•Œ ์ˆ˜ ์žˆ๊ฒŒ ํ•ฉ๋‹ˆ๋‹ค).<br/> โ˜ ์ž‘์—…์ด ์ง„ํ–‰์ค‘์ด๋ผ๋ฉด ์ œ๋ชฉ ์•ž์— <code>[WIP]</code>๋ฅผ ๋ถ™์—ฌ์ฃผ์„ธ์š”. ์ค‘๋ณต ์ž‘์—…์„ ํ”ผํ•˜๊ณ  ๋ณ‘ํ•ฉํ•  ์ค€๋น„๊ฐ€ ๋œ PR๊ณผ ๊ตฌ๋ถ„ํ•˜๊ธฐ์— ์œ ์šฉํ•ฉ๋‹ˆ๋‹ค.<br/> โ˜ ๊ธฐ์กด ํ…Œ์ŠคํŠธ๋ฅผ ํ†ต๊ณผํ•˜๋Š”์ง€ ํ™•์ธํ•˜์„ธ์š”.<br/> โ˜ ์ƒˆ๋กœ์šด ๊ธฐ๋Šฅ์„ ์ถ”๊ฐ€ํ•˜๋Š” ๊ฒฝ์šฐ, ํ•ด๋‹น ๊ธฐ๋Šฅ์— ๋Œ€ํ•œ ํ…Œ์ŠคํŠธ๋„ ์ถ”๊ฐ€ํ•˜์„ธ์š”.<br/></p> <ul><li>์ƒˆ ๋ชจ๋ธ์„ ์ถ”๊ฐ€ํ•˜๋Š” ๊ฒฝ์šฐ, <code>ModelTester.all_model_classes = (MyModel, MyModelWithLMHead,...)</code>์„ ์‚ฌ์šฉํ•˜์—ฌ ์ผ๋ฐ˜์ ์ธ ํ…Œ์ŠคํŠธ๋ฅผ ํ™œ์„ฑํ™”ํ•˜์„ธ์š”.</li> <li>์ƒˆ <code>@slow</code> ํ…Œ์ŠคํŠธ๋ฅผ ์ถ”๊ฐ€ํ•˜๋Š” ๊ฒฝ์šฐ, ๋‹ค์Œ ๋ช…๋ น์œผ๋กœ ํ…Œ์ŠคํŠธ๋ฅผ ํ†ต๊ณผํ•˜๋Š”์ง€ ํ™•์ธํ•˜์„ธ์š”: <code>RUN_SLOW=1 python -m pytest tests/models/my_new_model/test_my_new_model.py</code>.</li> <li>์ƒˆ ํ† ํฌ๋‚˜์ด์ €๋ฅผ ์ถ”๊ฐ€ํ•˜๋Š” ๊ฒฝ์šฐ, ํ…Œ์ŠคํŠธ๋ฅผ ์ž‘์„ฑํ•˜๊ณ  ๋‹ค์Œ ๋ช…๋ น์œผ๋กœ ํ…Œ์ŠคํŠธ๋ฅผ ํ†ต๊ณผํ•˜๋Š”์ง€ ํ™•์ธํ•˜์„ธ์š”: <code>RUN_SLOW=1 python -m pytest tests/models/{your_model_name}/test_tokenization_{your_model_name}.py</code>.</li> <li>CircleCI์—์„œ๋Š” ๋А๋ฆฐ ํ…Œ์ŠคํŠธ๋ฅผ ์‹คํ–‰ํ•˜์ง€ ์•Š์ง€๋งŒ, GitHub Actions์—์„œ๋Š” ๋งค์ผ ๋ฐค ์‹คํ–‰๋ฉ๋‹ˆ๋‹ค!<br/></li></ul> <p>โ˜ ๋ชจ๋“  ๊ณต๊ฐœ ๋ฉ”์†Œ๋“œ๋Š” ์œ ์šฉํ•œ ๊ธฐ์ˆ ๋ฌธ์„œ๋ฅผ ๊ฐ€์ ธ์•ผ ํ•ฉ๋‹ˆ๋‹ค (์˜ˆ๋ฅผ ๋“ค์–ด <a href="https://github.com/huggingface/transformers/blob/main/src/transformers/models/bert/modeling_bert.py" rel="nofollow"><code>modeling_bert.py</code></a> ์ฐธ์กฐ).<br/> โ˜ ์ €์žฅ์†Œ๊ฐ€ ๋น ๋ฅด๊ฒŒ ์„ฑ์žฅํ•˜๊ณ  ์žˆ์œผ๋ฏ€๋กœ ์ €์žฅ์†Œ์— ์ƒ๋‹นํ•œ ๋ถ€๋‹ด์„ ์ฃผ๋Š” ์ด๋ฏธ์ง€, ๋™์˜์ƒ ๋ฐ ๊ธฐํƒ€ ํ…์ŠคํŠธ๊ฐ€ ์•„๋‹Œ ํŒŒ์ผ์€ ์ถ”๊ฐ€ํ•˜์ง€ ๋งˆ์„ธ์š”. ๋Œ€์‹  <a href="https://huggingface.co/hf-internal-testing" rel="nofollow"><code>hf-internal-testing</code></a>๊ณผ ๊ฐ™์€ Hub ์ €์žฅ์†Œ๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ์ด๋Ÿฌํ•œ ํŒŒ์ผ์„ ํ˜ธ์ŠคํŒ…ํ•˜๊ณ  URL๋กœ ์ฐธ์กฐํ•˜์„ธ์š”. ๋ฌธ์„œ์™€ ๊ด€๋ จ๋œ ์ด๋ฏธ์ง€๋Š” ๋‹ค์Œ ์ €์žฅ์†Œ์— ๋ฐฐ์น˜ํ•˜๋Š” ๊ฒƒ์„ ๊ถŒ์žฅํ•ฉ๋‹ˆ๋‹ค: <a href="https://huggingface.co/datasets/huggingface/documentation-images" rel="nofollow">huggingface/documentation-images</a>. ์ด ๋ฐ์ดํ„ฐ์…‹ ์ €์žฅ์†Œ์—์„œ PR์„ ์—ด์–ด์„œ Hugging Face ๋ฉค๋ฒ„์—๊ฒŒ ๋ณ‘ํ•ฉ์„ ์š”์ฒญํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.</p> <p>Pull Request์—์„œ ์‹คํ–‰๋˜๋Š” ๊ฒ€์‚ฌ์— ๋Œ€ํ•œ ์ž์„ธํ•œ ์ •๋ณด๋Š” <a href="https://huggingface.co/docs/transformers/pr_checks" rel="nofollow">Pull Request์— ๋Œ€ํ•œ ๊ฒ€์‚ฌ</a> ๊ฐ€์ด๋“œ๋ฅผ ํ™•์ธํ•˜์„ธ์š”.</p> <!--[2--><h3 class="relative group"><a id="tests" 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="#tests"><span><svg 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>๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ ๋™์ž‘๊ณผ ์—ฌ๋Ÿฌ ์˜ˆ์ œ๋ฅผ ํ…Œ์ŠคํŠธํ•  ์ˆ˜ ์žˆ๋Š” ๊ด‘๋ฒ”์œ„ํ•œ ํ…Œ์ŠคํŠธ ์Šค์œ„ํŠธ๊ฐ€ ํฌํ•จ๋˜์–ด ์žˆ์Šต๋‹ˆ๋‹ค. ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ ํ…Œ์ŠคํŠธ๋Š” <a href="https://github.com/huggingface/transformers/tree/main/tests" rel="nofollow">tests</a> ํด๋”์—, ์˜ˆ์ œ ํ…Œ์ŠคํŠธ๋Š” <a href="https://github.com/huggingface/transformers/tree/main/examples" rel="nofollow">examples</a> ํด๋”์— ์žˆ์Šต๋‹ˆ๋‹ค.</p> <p>์†๋„๊ฐ€ ๋น ๋ฅธ <code>pytest</code>์™€ <code>pytest-xdist</code>๋ฅผ ์„ ํ˜ธํ•ฉ๋‹ˆ๋‹ค. ์ €์žฅ์†Œ์˜ ๋ฃจํŠธ ๋””๋ ‰ํ„ฐ๋ฆฌ์—์„œ ํ…Œ์ŠคํŠธ๋ฅผ ์‹คํ–‰ํ•  <em>ํ•˜์œ„ ํด๋” ๊ฒฝ๋กœ ๋˜๋Š” ํ…Œ์ŠคํŠธ ํŒŒ์ผ ๊ฒฝ๋กœ</em>๋ฅผ ์ง€์ •ํ•˜์„ธ์š”:</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 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="language-bash "><!---->python -m pytest -n auto --dist=loadfile -s -v ./tests/models/my_new_model<!----></pre></div><!----> <p>๋งˆ์ฐฌ๊ฐ€์ง€๋กœ <code>examples</code> ๋””๋ ‰ํ„ฐ๋ฆฌ์—์„œ๋„ <em>ํ•˜์œ„ ํด๋” ๊ฒฝ๋กœ ๋˜๋Š” ํ…Œ์ŠคํŠธ ํŒŒ์ผ ๊ฒฝ๋กœ</em>๋ฅผ ์ง€์ •ํ•˜์„ธ์š”. ์˜ˆ๋ฅผ ๋“ค์–ด, ๋‹ค์Œ ๋ช…๋ น์€ PyTorch <code>examples</code> ๋””๋ ‰ํ„ฐ๋ฆฌ์˜ ํ…์ŠคํŠธ ๋ถ„๋ฅ˜ ํ•˜์œ„ ํด๋”๋ฅผ ํ…Œ์ŠคํŠธํ•ฉ๋‹ˆ๋‹ค:</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 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="language-bash "><!---->pip install -r examples/xxx/requirements.txt <span class="hljs-comment"># only needed the first time</span>
python -m pytest -n auto --dist=loadfile -s -v ./examples/pytorch/text-classification<!----></pre></div><!----> <p>์ด๊ฒƒ์ด ์‹ค์ œ๋กœ <code>make test</code> ๋ฐ <code>make test-examples</code> ๋ช…๋ น์ด ๊ตฌํ˜„๋˜๋Š” ๋ฐฉ์‹์ž…๋‹ˆ๋‹ค (<code>pip install</code>์€ ์ œ์™ธํ•ฉ๋‹ˆ๋‹ค)!</p> <p>๋˜ํ•œ ํŠน์ • ๊ธฐ๋Šฅ๋งŒ ํ…Œ์ŠคํŠธํ•˜๊ธฐ ์œ„ํ•œ ๋” ์ž‘์€ ํ…Œ์ŠคํŠธ๋ฅผ ์ง€์ •ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.</p> <p>๊ธฐ๋ณธ์ ์œผ๋กœ ๋А๋ฆฐ ํ…Œ์ŠคํŠธ๋Š” ๊ฑด๋„ˆ๋›ฐ์ง€๋งŒ <code>RUN_SLOW</code> ํ™˜๊ฒฝ ๋ณ€์ˆ˜๋ฅผ <code>yes</code>๋กœ ์„ค์ •ํ•˜์—ฌ ์‹คํ–‰ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ์ด๋ ‡๊ฒŒ ํ•˜๋ฉด ๋งŽ์€ ๊ธฐ๊ฐ€๋ฐ”์ดํŠธ ๋‹จ์œ„์˜ ๋ชจ๋ธ์ด ๋‹ค์šด๋กœ๋“œ๋˜๋ฏ€๋กœ ์ถฉ๋ถ„ํ•œ ๋””์Šคํฌ ๊ณต๊ฐ„, ์ข‹์€ ์ธํ„ฐ๋„ท ์—ฐ๊ฒฐ๊ณผ ๋งŽ์€ ์ธ๋‚ด๊ฐ€ ํ•„์š”ํ•ฉ๋‹ˆ๋‹ค!</p> <blockquote class="warning"><p>ํ…Œ์ŠคํŠธ๋ฅผ ์‹คํ–‰ํ•˜๋ ค๋ฉด <em>ํ•˜์œ„ ํด๋” ๊ฒฝ๋กœ ๋˜๋Š” ํ…Œ์ŠคํŠธ ํŒŒ์ผ ๊ฒฝ๋กœ</em>๋ฅผ ์ง€์ •ํ•˜์„ธ์š”. ๊ทธ๋ ‡์ง€ ์•Š์œผ๋ฉด <code>tests</code> ๋˜๋Š” <code>examples</code> ํด๋”์˜ ๋ชจ๋“  ํ…Œ์ŠคํŠธ๋ฅผ ์‹คํ–‰ํ•˜๊ฒŒ ๋˜์–ด ๋งค์šฐ ๊ธด ์‹œ๊ฐ„์ด ๊ฑธ๋ฆฝ๋‹ˆ๋‹ค!</p><!----></blockquote><!----> <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 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="language-bash "><!---->RUN_SLOW=<span class="hljs-built_in">yes</span> python -m pytest -n auto --dist=loadfile -s -v ./tests/models/my_new_model
RUN_SLOW=<span class="hljs-built_in">yes</span> python -m pytest -n auto --dist=loadfile -s -v ./examples/pytorch/text-classification<!----></pre></div><!----> <p>๋А๋ฆฐ ํ…Œ์ŠคํŠธ์™€ ๋งˆ์ฐฌ๊ฐ€์ง€๋กœ, ๋‹ค์Œ๊ณผ ๊ฐ™์ด ํ…Œ์ŠคํŠธ ์ค‘์— ๊ธฐ๋ณธ์ ์œผ๋กœ ํ™œ์„ฑํ™”๋˜์ง€ ์•Š๋Š” ๋‹ค๋ฅธ ํ™˜๊ฒฝ ๋ณ€์ˆ˜๋„ ์žˆ์Šต๋‹ˆ๋‹ค:</p> <ul><li><code>RUN_CUSTOM_TOKENIZERS</code>: ์‚ฌ์šฉ์ž ์ •์˜ ํ† ํฌ๋‚˜์ด์ € ํ…Œ์ŠคํŠธ๋ฅผ ํ™œ์„ฑํ™”ํ•ฉ๋‹ˆ๋‹ค.</li></ul> <p>๋” ๋งŽ์€ ํ™˜๊ฒฝ ๋ณ€์ˆ˜์™€ ์ถ”๊ฐ€ ์ •๋ณด๋Š” <a href="src/transformers/testing_utils.py">testing_utils.py</a>์—์„œ ์ฐพ์„ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.</p> <p>๐Ÿค— Transformers๋Š” ํ…Œ์ŠคํŠธ ์‹คํ–‰๊ธฐ๋กœ <code>pytest</code>๋ฅผ ์‚ฌ์šฉํ•ฉ๋‹ˆ๋‹ค. ๊ทธ๋Ÿฌ๋‚˜ ํ…Œ์ŠคํŠธ ์Šค์œ„ํŠธ ์ž์ฒด์—์„œ๋Š” <code>pytest</code> ๊ด€๋ จ ๊ธฐ๋Šฅ์„ ์‚ฌ์šฉํ•˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค.</p> <p>์ด๊ฒƒ์€ <code>unittest</code>๊ฐ€ ์™„์ „ํžˆ ์ง€์›๋œ๋‹ค๋Š” ๊ฒƒ์„ ์˜๋ฏธํ•ฉ๋‹ˆ๋‹ค. ๋‹ค์Œ์€ <code>unittest</code>๋กœ ํ…Œ์ŠคํŠธ๋ฅผ ์‹คํ–‰ํ•˜๋Š” ๋ฐฉ๋ฒ•์ž…๋‹ˆ๋‹ค:</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 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="language-bash "><!---->python -m unittest discover -s tests -t . -v
python -m unittest discover -s examples -t examples -v<!----></pre></div><!----> <!--[2--><h3 class="relative group"><a id="style-guide" 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="#style-guide"><span><svg 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>๋ฌธ์„œ๋Š” <a href="https://google.github.io/styleguide/pyguide.html" rel="nofollow">Google Python ์Šคํƒ€์ผ ๊ฐ€์ด๋“œ</a>๋ฅผ ๋”ฐ๋ฆ…๋‹ˆ๋‹ค. ์ž์„ธํ•œ ์ •๋ณด๋Š” <a href="https://github.com/huggingface/transformers/tree/main/docs#writing-documentation---specification" rel="nofollow">๋ฌธ์„œ ์ž‘์„ฑ ๊ฐ€์ด๋“œ</a>๋ฅผ ํ™•์ธํ•˜์„ธ์š”.</p> <!--[2--><h3 class="relative group"><a id="develop-on-windows" 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="#develop-on-windows"><span><svg 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>Windows์—์„œ ๊ฐœ๋ฐœ</span></h3><!--]--><!----> <p>Windows์—์„œ ๊ฐœ๋ฐœํ•  ๊ฒฝ์šฐ(<a href="https://learn.microsoft.com/en-us/windows/wsl/" rel="nofollow">Windows Subsystem for Linux</a> ๋˜๋Š” WSL์—์„œ ์ž‘์—…ํ•˜์ง€ ์•Š๋Š” ํ•œ) Windows <code>CRLF</code> ์ค„ ๋ฐ”๊ฟˆ์„ Linux <code>LF</code> ์ค„ ๋ฐ”๊ฟˆ์œผ๋กœ ๋ณ€ํ™˜ํ•˜๋„๋ก git์„ ๊ตฌ์„ฑํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค:</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 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="language-bash "><!---->git config core.autocrlf input<!----></pre></div><!----> <p>Windows์—์„œ <code>make</code> ๋ช…๋ น์„ ์‹คํ–‰ํ•˜๋Š” ํ•œ ๊ฐ€์ง€ ๋ฐฉ๋ฒ•์€ MSYS2๋ฅผ ์‚ฌ์šฉํ•˜๋Š” ๊ฒƒ์ž…๋‹ˆ๋‹ค:</p> <ol><li><a href="https://www.msys2.org/" rel="nofollow">MSYS2</a>๋ฅผ ๋‹ค์šด๋กœ๋“œํ•ฉ๋‹ˆ๋‹ค. <code>C:\msys64</code>์— ์„ค์น˜๋˜์—ˆ๋‹ค๊ณ  ๊ฐ€์ •ํ•ฉ๋‹ˆ๋‹ค.</li> <li>CLI์—์„œ <code>C:\msys64\msys2.exe</code>๋ฅผ ์—ฝ๋‹ˆ๋‹ค (์‹œ์ž‘ ๋ฉ”๋‰ด์—์„œ ์‚ฌ์šฉ ๊ฐ€๋Šฅํ•ด์•ผ ํ•จ).</li> <li>์‰˜์—์„œ ๋‹ค์Œ์„ ์‹คํ–‰ํ•˜์—ฌ: <code>pacman -Syu</code> ๋ฐ <code>pacman -S make</code>๋กœ <code>make</code>๋ฅผ ์„ค์น˜ํ•ฉ๋‹ˆ๋‹ค.</li> <li>ํ™˜๊ฒฝ ๋ณ€์ˆ˜ PATH์— <code>C:\msys64\usr\bin</code>์„ ์ถ”๊ฐ€ํ•˜์„ธ์š”.</li></ol> <p>์ด์ œ ๋ชจ๋“  ํ„ฐ๋ฏธ๋„ (PowerShell, cmd.exe ๋“ฑ)์—์„œ <code>make</code>๋ฅผ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค! ๐ŸŽ‰</p> <!--[2--><h3 class="relative group"><a id="sync-a-forked-repository-with-upstream-main-the-hugging-face-repository" 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="#sync-a-forked-repository-with-upstream-main-the-hugging-face-repository"><span><svg 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>ํฌํฌํ•œ ์ €์žฅ์†Œ๋ฅผ ์ƒ์œ„ ์›๋ณธ ๋ธŒ๋žœ์น˜(main)๊ณผ ๋™๊ธฐํ™”ํ•˜๊ธฐ (Hugging Face ์ €์žฅ์†Œ)</span></h3><!--]--><!----> <p>ํฌํฌํ•œ ์ €์žฅ์†Œ์˜ main ๋ธŒ๋žœ์น˜๋ฅผ ์—…๋ฐ์ดํŠธํ•  ๋•Œ, ๋‹ค์Œ ๋‹จ๊ณ„๋ฅผ ๋”ฐ๋ผ ์ˆ˜ํ–‰ํ•ด์ฃผ์„ธ์š”. ์ด๋ ‡๊ฒŒ ํ•˜๋ฉด ๊ฐ upstream PR์— ์ฐธ์กฐ ๋…ธํŠธ๊ฐ€ ์ถ”๊ฐ€๋˜๋Š” ๊ฒƒ์„ ํ”ผํ•˜๊ณ  ์ด๋Ÿฌํ•œ PR์— ๊ด€์—ฌํ•˜๋Š” ๊ฐœ๋ฐœ์ž๋“ค์—๊ฒŒ ๋ถˆํ•„์š”ํ•œ ์•Œ๋ฆผ์ด ์ „์†ก๋˜๋Š” ๊ฒƒ์„ ๋ฐฉ์ง€ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.</p> <ol><li><p>๊ฐ€๋Šฅํ•˜๋ฉด ํฌํฌ๋œ ์ €์žฅ์†Œ์˜ ๋ธŒ๋žœ์น˜ ๋ฐ PR์„ ์‚ฌ์šฉํ•˜์—ฌ upstream๊ณผ ๋™๊ธฐํ™”ํ•˜์ง€ ๋งˆ์„ธ์š”. ๋Œ€์‹  ํฌํฌ๋œ main ์ €์žฅ์†Œ์— ์ง์ ‘ ๋ณ‘ํ•ฉํ•˜์„ธ์š”.</p></li> <li><p>PR์ด ๋ฐ˜๋“œ์‹œ ํ•„์š”ํ•œ ๊ฒฝ์šฐ, ๋ธŒ๋žœ์น˜๋ฅผ ํ™•์ธํ•œ ํ›„ ๋‹ค์Œ ๋‹จ๊ณ„๋ฅผ ์‚ฌ์šฉํ•˜์„ธ์š”:</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 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="language-bash "><!---->git checkout -b your-branch-for-syncing
git pull --squash --no-commit upstream main
git commit -m <span class="hljs-string">&#x27;&lt;your message without GitHub references&gt;&#x27;</span>
git push --set-upstream origin your-branch-for-syncing<!----></pre></div><!----></li></ol> <a class="!text-gray-400 !no-underline text-sm flex items-center not-prose mt-4" href="https://github.com/huggingface/transformers/blob/main/docs/source/ko/contributing.md" target="_blank"><svg class="mr-1" 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="M31,16l-7,7l-1.41-1.41L28.17,16l-5.58-5.59L24,9l7,7z"></path><path d="M1,16l7-7l1.41,1.41L3.83,16l5.58,5.59L8,23l-7-7z"></path><path d="M12.419,25.484L17.639,6.552l1.932,0.518L14.351,26.002z"></path></svg><!----> <span><span class="underline">Update</span> on GitHub</span></a><!----> <p></p><!--]--><!----><!--]--><!--]--><!--]--> <!--[-1--><!--]--><!--]-->
<script>
{
__sveltekit_ewy7o5 = {
base: "/docs/transformers/main/ko",
assets: "/docs/transformers/main/ko"
};
const element = document.currentScript.parentElement;
Promise.all([
import("/docs/transformers/main/ko/_app/immutable/entry/start.Vp-vTTcV.js"),
import("/docs/transformers/main/ko/_app/immutable/entry/app.Drc0bE40.js")
]).then(([kit, app]) => {
kit.start(app, element, {
node_ids: [0, 10],
data: [null,null],
form: null,
error: null
});
});
}
</script>

Xet Storage Details

Size:
73.5 kB
ยท
Xet hash:
e6af69f4fa2bce3cf30564aabd6d0f45e0997d6f70a8a652de8420b3838d65b2

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.