딥러닝3 Instruct learning, fine tuning, and T5 def preprocess_data(example): # Instruction, Input, Output 가져오기 instruction = example["instruction"] input_text = example["input"] output_text = example["output"] # Prompt 생성 prompt = f"Instruction: {instruction}\nInput: {input_text}\nOutput:" target = output_text # Prompt와 Target 텍스트를 각각 토큰화 tokenized_input = tokenizer(prompt, truncation=True, max_length=512, padd.. 2025. 1. 28. Memory Requirement of Deep Learning Models 최근 AI 모델, 특히 딥러닝 모델의 크기는 점점 커지고 있으며 GPU 메모리는 유한하기 때문에 모델의 메모리 요구량을 계산해봐야 한다. Floating Point and Memory fp32는 32bit floating point로 Exponent 8 bits와 Mantissa 23 bits가 있다. 나머지 1 bit는 sign으로 양수와 음수를 나타낸다. fp16은 16bit로 Exponent가 5 bits, Mantissa가 10 bits, 1 bit가 sign이다. Input, Activation, Parameter, Gradient, Optimize State (Adam의 경우 Parameter, Gradient, Momentum, Variance)를 모두 fp32로 나타낼 수도 있고, Opti.. 2024. 2. 1. 눈여겨 볼만한 NLP 모델들 NLP Seq2Seq Models 아래의 세 가지 자료를 참고하여 주요 NLP Models를 정리해보려고 합니다. 1. BERT and Related Models Map BERT를 중심으로 연관된 여러 Sequence to Sequence Model의 관계도입니다. 여기 나온 모델들을 정리해보면 다음과 같습니다. ELMo BERT GPT GPT-2 Grover ULMFiT XLM UDify MT-DNN MT-DNN_KD MASS UniLM SpanBERT RoBERTa XLNet ERINE (Tsinghua) KnowBert VideoBERT CBT ViLBERT VisualBERT B2T2 Unicoder-VL LXMERT VL-BERT UNITER ERINE (Baidu) BERT-wwm 2. Kor.. 2024. 1. 31. 이전 1 다음