[TIL] In-context Learning with Long-context LLMs

2024. 9. 13. 05:10·NLP
반응형

☑️ Backgrounds 

Long-context LLMs 

  • GPT4o는 128k token을 take 할 수 있고, Gemini1.5의 경우 2M의 token을 take할 수 있다고 한다. 
  • LLama 3 405B를 pre-training 할 때는, context length를 6개의 stage로 gradually하게 늘려서 training함 (8k context window에서 시작해 -> 128k window로 마감)

In-context Learning 

  • [예시 1] [예시2] ... [Your real questions] 
  • 여기서 예시를 넣을 때는 Question + Solution 

 

☑️ Many-Shot In-Context Learning (May 2024)

  • Newly expanded context windows allow us to investigate ICL with hundreds or thousands of examples
    • Context window를 늘리는게 many-shot example 사용을 가능하게 한다. 
    • 그리고 이런 many-shot은 few-shot 보다 강력한 효과를 보인다. (Going from few-shot to many-shot, we observe significant performance gains across a wide variety of generative and discriminative tasks.)

  • 하지만 Many-shot ICL can be bottlenecked by the available amount of human-generated outputs.
    • 즉, many-shot은 Human-Written Rationale을 요구한다. 
    • --> Many-shot Learning without Human-Written Rationale이 가능할까? 에 대해 탐구한 페이퍼 

Methods 

  • 앞에서 ICL 예시는 question + answer로 구성된다고 언급함. 그렇다면
  • Reinforced ICL: human-written solution을 model generated solution으로 대체할 수 있을까? 
  • Unsupervised ICL: model은 answer가 없는 only "question" 만으로 improve 할 수 있을까? 

UICL 예시 -> 질문만 계속 던진다.

 

Results 

☑️ In-Context Learning with Long-Context Models: An In-Depth Exploration (Apr 2024)

  • Tested LLama2, classification task. 위 paper와 유사함. 
    • Motivation: in-context learning over large quantities of data becomes a potential alternative to finetuning. (Many-context learning은 finetuning의 대체제로서 potential을 지닌다) 
    • 하지만 many-shot ICL에는 efficiency & performance의 tradeoff가 존재한다. (The efficiency and performance tradeoff between many-shot ICL and finetuning on the same data is complex) 

위 figure처럼 context example이 증가하면 성능도 폭발적으로 증가한다.

 

  • 이 paper에서는 ICL demonstrantion(example들의 case) 숫자가 증가할수록, ICL의 behavior가 달라진다고 밝힘 
  1. In-context learning becomes less sensitive to example order: 순서에 덜 sensitive 해진다. 
  2. Retrieval에 대한 이득이 감소한다. (Long-context ICL은 careful retrieval의 중요성을 낮게한다.) 
    • 여기서 Retrieval ICL이란 -> test set example과 관련 있는 subset example을 retrieval 하는 것 (=A strong alternative for in-context learning is to retrieve a relevant subset of examples as demonstrations for each test set example.) 
  • ICL example이 늘어날수록, Random/Retrieval ICL의 performance gap이 아래처럼 줄어든다. 
    • Finetuning 성능은 특히 (a) plot에서는 아무리 많은 데이터셋이 있어도 long-context ICL을 능가하지 못함.

반응형
저작자표시 (새창열림)

'NLP' 카테고리의 다른 글

[LLM] 미뤄두었던 DeepSeek-R1, DeepSeek-V3에 대하여 (1)  (0) 2025.02.26
[TIL] RAG (Retrieval-Augmented Generation) 훑어보기  (2) 2025.01.12
[TIL] LLM as reward models/evaluators (#RLHF, #Self-improvement)  (0) 2024.08.30
[NLP] LORA : Low-Rank Adaptation of Large Language Models 논문 리뷰  (0) 2023.04.04
[NLP] Transformer(트랜스포머, Attention is all you need)  (0) 2021.02.09
'NLP' 카테고리의 다른 글
  • [LLM] 미뤄두었던 DeepSeek-R1, DeepSeek-V3에 대하여 (1)
  • [TIL] RAG (Retrieval-Augmented Generation) 훑어보기
  • [TIL] LLM as reward models/evaluators (#RLHF, #Self-improvement)
  • [NLP] LORA : Low-Rank Adaptation of Large Language Models 논문 리뷰
당니이
당니이
씩씩하게 공부하기 📚💻
  • 당니이
    다은이의 컴퓨터 공부
    당니이
  • 전체
    오늘
    어제
    • 분류 전체보기 (136)
      • Achieved 👩🏻 (14)
        • 생각들 (2)
        • TIL (6)
        • Trial and Error (1)
        • Inspiration ✨ (0)
        • 미국 박사 준비 🎓 (1)
      • Computer Vision💖 (39)
        • Basic (9)
        • Video (5)
        • Continual Learning (7)
        • Generative model (2)
        • Domain (DA & DG) (5)
        • Multimodal (8)
        • Multitask Learning (1)
        • Segmentation (1)
        • Colorization (1)
      • RL 🤖 (1)
      • Autonomous Driving 🚙 (11)
        • Geometry (4)
        • LiDAR 3D Detection (1)
        • Trajectory prediction (2)
        • Lane Detection (1)
        • HDmap (3)
      • Linux (15)
      • PyTorch👩🏻‍💻 (10)
      • Linear Algebra (2)
      • Python (5)
      • NLP (10)
        • Article 📑 (1)
      • Algorithms 💻 (22)
        • Basic (8)
        • BAEKJOON (8)
        • Programmers (2)
      • ML (1)
        • 통계적 머신러닝(20-2) (1)
      • SQL (3)
      • 기초금융 💵 (1)
  • 블로그 메뉴

    • 홈
    • About me
  • 링크

    • 나의 소박한 github
    • Naver 블로그
  • 공지사항

  • 인기 글

  • 태그

    conda
    CL
    코딩테스트
    domain generalization
    pytorch
    자료구조
    CV
    Linux
    continual learning
    domain adaptation
    Python
    dfs
    백트래킹
    리눅스
    LLM
    백준
    Incremental Learning
    알고리즘
    NLP
    til
  • 최근 댓글

  • 최근 글

  • hELLO· Designed By정상우.v4.10.3
당니이
[TIL] In-context Learning with Long-context LLMs
상단으로

티스토리툴바