Huggingface ๐Ÿค— Transformers ์†Œ๊ฐœ์™€ ์„ค์น˜

nkw011ยท2022๋…„ 8์›” 25์ผ
0

Hugging Face์˜ Transformers ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ๋ฅผ ํ™œ์šฉํ•˜์—ฌ SOTA ๋ชจ๋ธ๋“ค์„ ํ•™์Šตํ•ด๋ณด๊ณ  ์ž์—ฐ์–ด์ฒ˜๋ฆฌ Task๋ฅผ ์ˆ˜ํ–‰ํ•˜๋Š” ์‹œ๊ฐ„์„ ์•ž์œผ๋กœ ๊ฐ€์ ธ๋ณผ ๊ฒƒ์ž…๋‹ˆ๋‹ค.

  • Transformers ํ™ˆํŽ˜์ด์ง€์— ์žˆ๋Š” Tutorials์™€ How-To-Guides ๋“ฑ์„ ์ˆœ์ฐจ์ ์œผ๋กœ ์ˆ˜ํ–‰ํ•ฉ๋‹ˆ๋‹ค.

์ด๋ฒˆ ์‹œ๊ฐ„์—๋Š” Hugging Face์˜ Transformers ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ๋ฅผ ์†Œ๊ฐœํ•˜๊ณ  ์ง์ ‘ ์„ค์น˜ํ•ด๋ณด๋Š” ๊ฒƒ๊นŒ์ง€ ์ˆ˜ํ–‰ํ•ฉ๋‹ˆ๋‹ค.

๐Ÿค— Transformers

Transformers ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ๋Š” ์ด๋ฆ„์ฒ˜๋Ÿผ Transformer ๊ณ„์—ด์˜ ๋ชจ๋ธ๋“ค์„ ์‰ฝ๊ฒŒ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ๋„๋ก ๋‹ค์–‘ํ•œ ๊ธฐ๋Šฅ์„ ์ œ๊ณตํ•˜๋Š” ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ์ž…๋‹ˆ๋‹ค.
์ˆ˜๋ก๋œ ๋ชจ๋ธ์€ 132์—ฌ๊ฐ€์ง€ ์ •๋„ ๋˜๋ฉฐ ๊ด€๋ จ๋œ ์ฝ”๋“œ๋ฅผ ์ œ๊ณตํ•ด์ค„ ๋ฟ๋งŒ์•„๋‹ˆ๋ผ pretrained๋œ ๋ชจ๋ธ์„ ์‰ฝ๊ฒŒ ๋‹ค์šด๋กœ๋“œํ•˜์—ฌ fine-tuning์„ ํ†ตํ•ด ์—ฌ๋Ÿฌ๊ฐ€์ง€ task๋ฅผ ์†์‰ฝ๊ฒŒ ์ˆ˜ํ–‰ํ•  ์ˆ˜ ์žˆ๋„๋ก ๋„์™€์ค๋‹ˆ๋‹ค.

๋Œ€ํ‘œ์ ์œผ๋กœ ์ˆ˜ํ–‰ํ•  ์ˆ˜ ์žˆ๋Š” Task๋Š” ๋‹ค์Œ๊ณผ ๊ฐ™์Šต๋‹ˆ๋‹ค.

  • Text: text classification, information extraction, question answering, summarization, translation, and text generation in over 100 languages.

Hugging Face๋Š” Transformers ๋ฟ๋งŒ ์•„๋‹ˆ๋ผ Tokenizers, Datasets์™€ ๊ฐ™์€ ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ๋ฅผ ์ถ”๊ฐ€๋กœ ์ œ๊ณตํ•˜์—ฌ task๋ฅผ ์ˆ˜ํ–‰ํ•˜๊ธฐ ์œ„ํ•œ tokenizer, dataset์„ ์†์‰ฝ๊ฒŒ ๋‹ค์šด๋กœ๋“œ ๋ฐ›์•„ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ๋„๋ก ํ•˜๊ณ  ์žˆ์Šต๋‹ˆ๋‹ค.

๐Ÿค— Transformers ์„ค์น˜ํ•˜๊ธฐ

pip๋ฅผ ์ด์šฉํ•ด ์„ค์น˜ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

  • Installation Guide
  • transformers๋ฅผ ์„ค์น˜ํ•˜๋ฉด tokenizer๋„ ๊ฐ™์ด ์„ค์น˜๋ฉ๋‹ˆ๋‹ค.
  • datasets๋Š” ๋ณ„๋„๋กœ ๋‹ค์šด๋กœ๋“œ ๋ฐ›์•„์•ผํ•ฉ๋‹ˆ๋‹ค.
!pip install transformers
!pip install datasets
profile
Deep Dive into Development (GitHub Blog: https://nkw011.github.io/)

0๊ฐœ์˜ ๋Œ“๊ธ€