본문 바로가기

huggingface

(8)
[huggingface] 대용량 데이터셋 로컬 다운로드 방법 https://huggingface.co/datasets/laion/laion-coco laion/laion-coco · Datasets at Hugging FaceYou need to agree to share your contact information to access this dataset This repository is publicly accessible, but you have to accept the conditions to access its files and content. Log in or Sign Up to review the conditions and access this dataset conhuggingface.co 위 데이터셋을 다운로드받고자 했다.그러면 아래와 같이 하면 된다..
[huggingface🤗] OSError: You are trying to access a gated repo 문제huggingface 에서 허가받아야 하는 저장소에 신원을 밝히지 않고 접근한 경우신원 확인 전까지는 막힌다 해결책huggingface 홈페이지에 로그인해서 내 설정에 가서 토큰을 생성한다 huggingface-cli login위 명령어를 터미널에 치면, 토큰을 입력하라고 한다그러면 아까 생성한 토큰을 복사해서 입력한다  다른 방법들은 아래 링크에 많다.코드 내에서 입력하는 방법도 있는데 그냥 터미널에 로그인해두면 얼마나 편해...  https://huggingface.co/docs/huggingface_hub/quick-start QuickstartThe Hugging Face Hub is the go-to place for sharing machine learning models, demos, d..
[error] PeftModelForCausalLM.generate() takes 1 positional argument and 2 were given 해결책 beam_output = model.generate( input_ids=input_ids, # 정확히 input_ids 인자라고 알려줘야 한다 do_sample=True, top_k=10, max_new_tokens=32, min_new_tokens=16, output_scores=True, num_beams=BEAM_SIZE, repetition_penalty=10.0, return_dict_in_generate=True, num_return_sequences=BEAM_SIZE, ) input_ids=input_ids 라고 정확히 이야기해야 한다 문제점 beam_output = model.generate( input_ids, # 기존 모델은 이렇게 명시하지 않아도 암묵적으로 수행했다 do_sam..
[huggingface🤗] Making LLMs even more accessible with bitsandbytes, 4-bit quantization and QLoRA 이 글은 huggingface blog 의 'Making LLMs even more accessible with bitsandbytes, 4-bit quantization and QLoRA' 이라는 글을 의역한 것입니다. https://huggingface.co/blog/4bit-transformers-bitsandbytes Making LLMs even more accessible with bitsandbytes, 4-bit quantization and QLoRA Making LLMs even more accessible with bitsandbytes, 4-bit quantization and QLoRA LLMs are known to be large, and running or training t..
[huggingface🤗] 8-bit Matrix Multiplication for transformers 해당 포스팅은 학습 차원에서 아래 글을 의역하여 작성합니다. 도입부와 배경은 가볍게 다루되, 이해해야 할 부분은 최대한 자세히 담아보고자 합니다. https://huggingface.co/blog/hf-bitsandbytes-integration A Gentle Introduction to 8-bit Matrix Multiplication for transformers at scale using transformers, accelerate and bitsandbytes A Gentle Introduction to 8-bit Matrix Multiplication for transformers at scale using Hugging Face Transformers, Accelerate and bitsan..
[논문이해] locally typical sampling 논문명: Locally Typical Sampling 논문링크: https://arxiv.org/abs/2202.00666 Locally Typical Sampling Today's probabilistic language generators fall short when it comes to producing coherent and fluent text despite the fact that the underlying models perform well under standard metrics, e.g., perplexity. This discrepancy has puzzled the language generation arxiv.org 수학적 증명과 이해는 건들지 않는다 논문에 수학적인 증명과 이해가 ..
[huggingface🤗] How to generate text #2 서론 huggingface 에서 제공하는 함수 'generate' 는 매우 훌륭하다. 이에 대해 처음 듣는다면, 다음 글을 먼저 읽어보길 바란다. https://heygeronimo.tistory.com/34 [huggingface🤗] How to generate text #1 자연어 처리 모델이 언어를 생성하는 방식에 관하여 잘 정리된 글이라서, 한글로 의역(수정)하고자 한다. 나에게도 공부가 되고, 이 글을 통해 한 사람이라도 도움이 된다면 기쁠 것 같다. 그리 heygeronimo.tistory.com 하지만, 아래 그림처럼 generate 의 parameter 개수만 45개다. 이걸 언제 다 읽고 사용해보나 싶더라. 하는 수 없이 좀 더 찾아보다가 이전 블로그에 없던 내용을 발견해서 이어서 소개하..
[huggingface🤗] How to generate text #1 자연어 처리 모델이 언어를 생성하는 방식에 관하여 잘 정리된 글이라서, 한글로 의역(수정)하고자 한다. 나에게도 공부가 되고, 이 글을 통해 한 사람이라도 도움이 된다면 기쁠 것 같다. 그리고 무엇보다 이렇게 좋은 글을 써준 patrickvonplaten 에게 감사드린다. 초록 초거대 언어 모델의 등장 자연어 처리 분야(NLP)에선 초거대 모델을 대거 등판하고 있다. 대표적으로 openAI 에서 공개한 GPT 시리즈가 있다. 사람들은 놀라운 성능을 몸소 확인했고, 이미 세상을 바꿀 준비를 하고 있다. 실제로 자연어 처리 관련 AI 서비스의 양과 질이 대폭 상승했다. 이게 가능했던 이유는 Transformer 의 등장과 pre-training 이다. 두 방식은 자연어 처리 근간을 이루는 혁신이었다. 텍스트..