LLM
·
KT AIVLE School/언어지능 딥러닝
Hugging Face – The AI community building the future. Hugging Face – The AI community building the future. huggingface.co토큰 생성하기 - 설치 및 환경설정!pip install -qq -U transformers accelerate!pip install -qq datasets!pip install -qq peft!pip install -qq bitsandbytes!pip install -qq trlimport osimport pandas as pdfrom tqdm.auto import tqdmimport torchfrom datasets import load_datasetfrom transformers impo..
PLM NSMC Finetuning
·
KT AIVLE School/언어지능 딥러닝
Hugging Face 사용 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 1. 환경 설정 및 데이터 이해from google.colab import drivedrive.mount('/content/drive')# install datasets 라이브러리!pip install -qq datasets..
인공지능 신경망
·
KT AIVLE School/언어지능 딥러닝
1. 선형회귀import torchx_train = torch.FloatTensor([[1,1],[2,2],[3,3]])y_train = torch.FloatTensor([[10],[20],[30]])W = torch.randn([2,1], requires_grad=True)b = torch.randn(1, requires_grad=True)optimizer = torch.optim.SGD([W,b], lr=0.01)# [딥러닝 1단계] 모델을 만든다. Model Setupdef H(x): model = torch.matmul(x,W) +b return model# [딥러닝 2단계] 학습을 시킨다. Training - W,b찾기for i in range(2000): cost = torch.mean(..
영화 리뷰 가져오기
·
KT AIVLE School/언어지능 딥러닝
IMDb: Ratings, Reviews, and Where to Watch the Best Movies & TV ShowsIMDb is the world's most popular and authoritative source for movie, TV and celebrity content. Find ratings and reviews for the newest movie and TV shows. Get personalized recommendations, and learn where to watch across hundreds of streaming providers.www.imdb.com - 데이터 가져오기import os # 파일폴더경로등의 정보를 가져오기 위해서 사용import re # Regul..
RSS로 전자신문 검색기능 만들기
·
KT AIVLE School/언어지능 딥러닝
- 추천 알고리즘1. CF ( Collaborative Filtering )비슷한 취향을 가진 타 사용자의 선택을 기반으로 추천 항목을 결정장점 : 잠재적인 특징들을 고려해서 다양한 범위를 추천단점 : 아직 평가되지 않은 항목은 추천 대상으로 발견하긴 어려움, 초기 사용자에 대해선 믿을만한 추천을 하기 어려움, Gray Sheep(확고하지 않은) 평가는 도움이 안됨 2. CBF ( Content-based Filtering )사용자 개인의 과거 선호도와 항목의 콘텐츠 자체를 기반으로 추천장점 : 사용자의 명시적인 기호 정보를 직접적으로 반영, 새로 추가된 아이템도 추천 가능단점 : 질적인 부분을 포착하지 못함, 선호도와 취향을 특정단어로 표현하기 어려움, 추천하는 항목이 비슷한 장르에 머무는 한계가 있음..
언어지능
·
KT AIVLE School/언어지능 딥러닝
- TF- IDF ( Term Frequency-Inverse Document Frequency )중요한 단어만 먼저 뽑아내는 기법이다.TF: 현재 문서 중에 단어의 수IDF : 모든 문서 중 단어가 포함된 문서의 수 (모든 문서에 나오면 특징성이 없기 때문에) - 단어 표현 ( Word Representation, Word  Embedding, Word  Vector )자연어 처리를 위해 텍스트를 벡터로 표현한다. 하나의 벡터는 단어를 표현하는 특징이 된다. (인코딩 과정) One-Hot Encoding은 자연어 단어 표현에는 부적합하다.단점 3가지1. 단어의 수가 많기에 고차원 저밀도 벡터를 구성한다.2. 의미나 특성을 표현할 수 없다.3. 신조어가 생기면 다시 구조를 다시 바꿔야한다는 단점이 있다...