본문 바로가기
  • 컴공생의 공부 일기
  • 공부보단 일기에 가까운 것 같은
  • 블로그
🤖 AI/AI

😄 Hugging Face 탐색

by 정람지 2024. 10. 25.

카카오 gray 멘토님 / KDT해커톤 토스 이경엽 멘토님

멘토링의 나날


😄 Hugging Face

https://huggingface.co

 

Hugging Face – The AI community building the future.

The Home of Machine Learning Create, discover and collaborate on ML better. We provide paid Compute and Enterprise solutions. We are building the foundation of ML tooling with the community.

huggingface.co

트랜스포머데이터셋 같은 머신러닝 프레임워크를 제공하는 세계 최대의 인공지능 플랫폼 중 하나

인공지능계의 깃허브

 

- 공개된 머신러닝 레퍼런스를 통해 최신 모델을 스스로 구축 가능

- 코드를 작성할 필요 없이 트랜스포머 라이브러리를 가져와서 사용 가능

- 배포->리뷰->수정 단계를 거치도록 형성하는 오픈 소스 커뮤니티

 

Models

 

huggingface.co

 

 

Datasets

 

huggingface.co

모델, 데이터셋 등 다양한 카테고리


😄 모델

앵무말에 써 볼 모델을 한번 찾아보자.

 

언어는 한국어 선택해 주고

NLP 카테고리 중 무엇을 선택해야 할까?

 

Text Generation

기본적으로 주어진 시드 텍스트에서 이어질 다음 단어를 예측하면서 무작위로 텍스트를 생성

이야기, 시나리오, 또는 문장을 이어나가는 작업에서 사용

Text-to-Text Generation

입력된 텍스트에 직접적으로 반응하여 의미적 관계를 유지하면서, 번역, 요약, 질문 답변 등의 작업을 수행

 

Question Answering이나 Text2Text Generation이 적합해 보임

 

 

 

DeBERTa v3(Decoding-enhanced BERT with Disentangled Attention) 모델을 기반으로

 SQuAD 2.0 데이터셋에서 파인튜닝된 다국어 질문-응답 모델

 

timpal0l/mdeberta-v3-base-squad2 · Hugging Face

This model can be used for Extractive QA It has been finetuned for 3 epochs on SQuAD2.0. Usage from transformers import pipeline qa_model = pipeline("question-answering", "timpal0l/mdeberta-v3-base-squad2") question = "Where do I live?" context = "My name

huggingface.co

278M 파라미터

 

사용법

from transformers import pipeline

qa_model = pipeline("question-answering", "timpal0l/mdeberta-v3-base-squad2")
question = "Where do I live?"
context = "My name is Tim and I live in Sweden."
qa_model(question = question, context = context)
# {'score': 0.975547730922699, 'start': 28, 'end': 36, 'answer': ' Sweden.'}

 

+

DeBERTa v3(Decoding-enhanced BERT with Disentangled Attention) 모델

Microsoft에서 개발한 Transformer 모델의 최신 버전 중 하나

문맥을 보다 정밀하게 파악하기 위해 "디스엔탱글드 어텐션(disentangled attention)"과 절대 위치 임베딩 기술을 활용

DeBERTa v3는 질의응답(QA), 텍스트 분류 등의 작업에서 BERT, RoBERTa보다 우수한 성능


퇴실샷