반응형

인공지능/자연어 처리 149

python 실습 - Huggingface SmolLM fine-tuning 하기 with LoRA - matlab data

https://huggingface.co/HuggingFaceTB/SmolLM-135M HuggingFaceTB/SmolLM-135M · Hugging FaceSmolLM Table of Contents Model Summary Limitations Training License Citation Model Summary SmolLM is a series of state-of-the-art small language models available in three sizes: 135M, 360M, and 1.7B parameters. These models are built on Cosmo-Corpus, a methuggingface.co제가 사용한 모델입니다.기존 모델들이 툭하면 GPU를 초과했다고 그래서..

SLM Phi-3 활용해서 Parameter efficient fine-tuning 진행하기

2024.07.22 - [소프트웨어] - LLaMa3 LoRA를 통해 parameter efficient fine-funing 진행하기 2(Matlab 도메인) - python LLaMa3 LoRA를 통해 parameter efficient fine-tuning 진행하기 2(Matlab 도메인) - python일단 저는 driving scenario tool box와 reinforcement learning에 대한 정보가 부족하기 때문에 그것에 대한 정보를 번갈아서 넣어 줄 예정입니다.url을 하나씩 남기면서 모아볼게요...아직 웹 크롤링은 잘 모yoonschallenge.tistory.com이전에 진행했던 내용이 아쉽게도 GPU용량 부족 때문에 진행하지 못해서 더 작은 모델을 생각해 봤습니다.https..

LLaMa3 LoRA를 통해 parameter efficient fine-tuning 진행하기 2(Matlab 도메인) - python

일단 저는 driving scenario tool box와 reinforcement learning에 대한 정보가 부족하기 때문에 그것에 대한 정보를 번갈아서 넣어 줄 예정입니다.url을 하나씩 남기면서 모아볼게요...아직 웹 크롤링은 잘 모르겠더라고여....https://kr.mathworks.com/help/driving/ref/drivingscenariodesigner-app.html Design driving scenarios, configure sensors, and generate synthetic data - MATLAB - MathWorks 한국Starting in R2018b, in the Camera Settings group of the Driving Scenario Designer ..

LLaMa3 LoRA를 통해 parameter efficient fine-tuning 진행하기 1(Matlab 도메인) - python

2024.07.22 - [인공지능/자연어 처리] - 자연어 처리 Python 실습 - Parameter Efficient Fine tuning 자연어 처리 Python 실습 - Parameter Efficient Fine tuning2024.06.05 - [인공지능/자연어 처리] - 자연어 처리 17강 - Parameter efficient Tuning 자연어 처리 17강 - Parameter efficient TuningLLM의 파라미터를 효율적으로, 효과적으로 튜닝하는 방법이다.언어 모델은 Semi syoonschallenge.tistory.com여기서 배운 내용을 토대로 파인튜닝을 진행해야 합니다.일단 LLaMa3 모델을 받아와야 하는데...리눅스에서 다운받아와서 옮기겠습니다.다 다운받고 보니까 어..

자연어 처리 Python 실습 - Parameter Efficient Fine tuning

2024.06.05 - [인공지능/자연어 처리] - 자연어 처리 17강 - Parameter efficient Tuning 자연어 처리 17강 - Parameter efficient TuningLLM의 파라미터를 효율적으로, 효과적으로 튜닝하는 방법이다.언어 모델은 Semi supervised learning (NSP, Masking)을 통해 Pre-trained하고, Supervised learning을 통해 fine tuning을 진행한다. 이전에는 각 task마다yoonschallenge.tistory.com여기에 정리된 내용이긴 한데 2024.07.21 - [인공지능/자연어 처리] - 자연어 처리 LLaMa 모델 분석하기 자연어 처리 LLaMa 모델 분석하기https://arxiv.org/abs/..

자연어 처리 python 실습 - LLaMa instruction Tuning

import torchdevice = torch.device('cuda' if torch.cuda.is_available() else 'cpu')device디바이스부터 진행한다. GPU가 너무너무 중요하네요..ㅠfrom transformers import LlamaForCausalLMfrom transformers import AutoTokenizertokenizer = AutoTokenizer.from_pretrained("daily_tokenizer_0721")model = LlamaForCausalLM.from_pretrained('daily_llama_721')model.to(device)/usr/lib/python3/dist-packages/requests/__init__.py:89: Reque..

자연어 처리 : LLaMa Pretrain하기 - python 실습

https://docs.google.com/forms/d/e/1FAIpQLSfqNECQnMkycAp2jP4Z9TFX0cGR4uf7b_fBxjY_OjhJILlKGA/viewform?pli=1&pli=1 Request FormThank you for your interest in Meta AI’s LLaMA (Large Language Model Meta AI) models. To request access to the models, please fill out this form, and we'll review and let you know if your use case is approved. The information you provide below will be usdocs.google.com여기에서 ..

자연어 처리 LLaMa 모델 분석하기

https://arxiv.org/abs/2203.15556 Training Compute-Optimal Large Language ModelsWe investigate the optimal model size and number of tokens for training a transformer language model under a given compute budget. We find that current large language models are significantly undertrained, a consequence of the recent focus on scaling languarxiv.orgLLM은 학습 한번 후 오래 사용하므로 추론 할 때의 비용도 중요하다!LLaMa는 큰 토큰과 작은..

자연어 처리 : 분산학습 - Distributed Training, Python 실습

Data Parallelism - GPU 마다 모델을 넣어서 각각의 연산에 따라 훈련시킨다Model Parallelism - Model을 쪼개서 GPU에 넣는다.Tensor Parallelism - 모델을 수평으로 나눈다.Pipeline Parallelism - 레이어 별로 다른 GPU에 넣는다.Data Parallelism 배치가 작을 수록 한 iteration을 빠르게 돌릴 수 있다. -> GPU에 잘 넣을 수 있도록 적당한 size를 가져온다. - GPU가 많을 수록 많은 배치 사이즈로 가져갈 수 있다. GPU가 3개라면 3개의 Loss를 가지게 된다. -> 평균 Gradient를 구해서 Back Propagation을 진행한다.Ring all reduce - 양 옆의 GPU의 Loss만 전달한다...

Gen AI LM - GPT

GPT의 Pretraining은 라벨이 존재할 수 없다. 데이터가 너무 방대하기 때문이다. 그래서 unsupervised pretraining을 진행하게 된다.NWP = Next Word Prediction == 다음에 올 단어 예측하기2024.06.05 - [인공지능/자연어 처리] - 자연어 처리 15강 - Large Language Model 자연어 처리 15강 - Large Language Model생성형 모델의 대부분은 Decoder 모델이다. input이 들어가면 차례대로 결과가 나오고, 질문에 대한 답을 생성하는데 목적이 있다. fine-tuning으로 말이 되는지 안되는지 supervised learning도 진행한다.yoonschallenge.tistory.com여기에도 설명해 놨습니다. ..

728x90
728x90