profile
거인의 어깨에 올라서서 더 넓은 세상을 바라보라 - 아이작 뉴턴

[llama3/llama/generation.py][class Llama] def sample_top_p

In the context of the sample_top_p function you've provided, "cumulative probability mass" refers to the sum of probabilities for a sequence of tokens

2024년 8월 30일
·
0개의 댓글
·

[llama3/llama/generation.py][class Llama] def text_completion

bos=True: Ensures the BOS token is added, marking the start of each prompt.eos=False: Ensures the EOS token is not added, allowing the model to contin

2024년 8월 30일
·
0개의 댓글
·

[llama3/llama/generation.py][class Llama] def generate

text sequences를 만들어내는 함수.prompt를 입력으로 받아서 텍스트를 만들어냄.prompt_tokens (List\\\[List\\\[int\\]\\]): tokenized된 prompt의 리스트를 의미함. 각 프롬프트는 list of integer를 의

2024년 8월 28일
·
0개의 댓글
·

[llama3/llama/tokenizer.py] class ChatFormat

The list.extend() method in Python is used to extend a list by appending all the elements from another iterable (such as another list, tuple, string,

2024년 8월 28일
·
0개의 댓글
·

[llama3/llama/model.py][class TransformerBlock] def __init__, def forward

RMSNorm (Root Mean Square Normalization) is a normalization technique used in the architecture of large language models like LLaMA (Large Language Mod

2024년 8월 28일
·
0개의 댓글
·

[llama3/llama/model.py][class Transformer] def __init__ and def forward

[llama3/llama/generate.py def build](https://velog.io/@ma-kjh/llama3llamageneration.pyclass-Llama-def-build) 에서 Transformer

2024년 8월 27일
·
0개의 댓글
·

[llama3/llama/generation.py][class Llama] def build def __init__

class llama에 대해 알아보자.해당 build 함수는 모델 체크포인트를 로딩하고 initializing해서 Llama instance를 빌드하는 과정.Args:가장 먼저 build가 정의되어 있다.ckpt_dir (str) : checkpoint file이 들어

2024년 8월 27일
·
0개의 댓글
·

[typing] Optional

Optional\[int] = None같은 코드는 뭘 의미하고 있을까..typing module의먼저 Optional의 사용은 몇가지 type hinting과 default value에 관련되어있다.Type Hinting : The Optional type is use

2024년 8월 27일
·
0개의 댓글
·

[latex] 수학 기호

$\\langle$ : \\langle$\\rangle$ : \\rangle

2024년 8월 27일
·
0개의 댓글
·

[conda] init

source /본인 PC에 아나콘다가 설치되어 있는 경로/etc/profile.d

2024년 8월 23일
·
0개의 댓글
·

[pytorch] 왜인지는 모르겠는데..

왜 얘만 deepspeed가 깔리냐

2024년 8월 23일
·
0개의 댓글
·

[pdb] 명령어

l: 주변 소스코드들을 출력, 현재 라인 표시.n: 다음 문장으로 이동.s: ‘Step Into’로 함수 내부로 들어감. 다 진행된 후에는 --Return--.c: 다음줄부터 중단점을 만날때까지 코드를 실행, 중단점이 없다면 끝까지 실행.r: 현재 함수의 return이

2024년 8월 21일
·
0개의 댓글
·

[latex]조건 표시

\\begin{cases}\\end{cases}$$\\begin{cases}hi \\hi\\end{cases}$$

2024년 8월 20일
·
0개의 댓글
·
post-thumbnail

[pytorch]torch.optim.RMSprop

https://pytorch.org/docs/stable/generated/torch.optim.RMSprop.htmlRMSprop 수도코드는 아래와 같다.차근차근 위 내용을 설명해보자.일단 RMSprop이 왜나왔나부터 보면AdaGrad의 학습이 진행될 때 학

2024년 8월 18일
·
0개의 댓글
·
post-thumbnail

[PEFT] LoRa - Low-Rank Adaptation of Large Language Models

Reference : https://pytorch.org/torchtune/stable/tutorials/lora_finetune.htmlLoRA의 기본적인 아이디어는 pre-trained matrices (i.e. paprameters of the origi

2024년 8월 13일
·
0개의 댓글
·
post-thumbnail

[Pytorch]torch.flatten()

torch.flatten(input, start_dim=0, end_dim=- 1) → Tensortorch.flatten 은 입력을 1차원 텐서로 reshape 해준다. start_dim과 end_dim을 입력해줄 수 있다.요런식으로 작동한다.start_dim을 설정

2024년 8월 13일
·
0개의 댓글
·

[HF_HOME] storage

HF_HOMETo configure where huggingface_hub will locally store data. In particular, your token and the cache will be stored in this folder.Defaults to "

2024년 8월 4일
·
0개의 댓글
·

[HF-Transformers] Fine-tune a pretrained model

https://huggingface.co/docs/transformers/training

2024년 8월 4일
·
0개의 댓글
·

[HF-NLP Course] Introduction

https://huggingface.co/learn/nlp-course/chapter1/1

2024년 8월 4일
·
0개의 댓글
·
post-thumbnail

[Hydra] 사용법

https://www.sscardapane.it/assets/images/draw/hydra.png!\[](https://velog.velcdn.com/images/ma-kjh/post/4e930f60-17f7-4ee4-a623-6802206a2038

2024년 8월 4일
·
0개의 댓글
·