Language Models from Scratch

Problem: researchers are becoming disconnected f rom the underlying technology.

Building small language models might not be representative of large language models

โ€œ์ž‘์€ ๋ชจ๋ธ์—์„œ ๊ด€์ฐฐํ•œ ํŠน์„ฑ์ด ํฐ ๋ชจ๋ธ์—์„œ๋„ ๋™์ผํ•˜๋‹ค๊ณ  ๊ฐ€์ •ํ•  ์ˆ˜ ์—†๋‹ค.โ€

์ž‘์€ ๋ชจ๋ธ(760M) FLOPs ๋น„์œจ

  • MHA 35%, FFN 44% ํฐ ๋ชจ๋ธ(175B) FLOPs ๋น„์œจ
  • MHA 17%, FFN 80%

๋ชจ๋ธ์˜ Scale ๋ณ€ํ™”์— ๋”ฐ๋ฅธ ๋ชจ๋ธ์˜ ๊ณ„์‚ฐ ํŠน์„ฑ ๋ณ€ํ™”๊ฐ€ ์ผ์–ด๋‚  ์ˆ˜ ์žˆ๋‹ค. ์ฆ‰ FLOPS ๊ตฌ์„ฑ ๋ณ€ํ™”์— ๋”ฐ๋ฅธ ๊ณ„์‚ฐ/๋ฉ”๋ชจ๋ฆฌ/ํ•˜๋“œ์—์–ด ํŠน์„ฑ ๋ณ€ํ™”๊ฐ€ ์žˆ์„ ์ˆ˜ ์žˆ๊ณ , ์ด๋Š” ๋ณ‘๋ชฉ ๋ฐ ์ตœ์ ํ™” ํฌ์ธํŠธ์˜ ๋ณ€ํ™” ๊ฐ€๋Šฅ์„ฑ์ด๋‹ค.

Scale ์ฆ๊ฐ€์— ๋”ฐ๋ฅธ ๋ชจ๋ธ์˜ย taskย ์„ฑ๋Šฅ/ํ–‰๋™ย ๋ณ€ํ™”

Itโ€™s all about efficiency

How do you train the best model given a fixed set of resources?

Resources

  • Data
  • Compute
  • Memory
  • Communication bandwidth
    ํ˜„์žฌ๋Š” compute-constrained์ด๋ฏ€๋กœ, ์ œํ•œ๋œ Hardware์—์„œ ์ตœ๋Œ€ํ•œ์˜ ์„ฑ๋Šฅ์„ ์–ป๋Š” ๋ฐฉํ–ฅ์œผ๋กœ ์„ค๊ณ„ํ•œ๋‹ค.

Efficiency drives design decisions

  • Data processing โ†’ ๋‚˜์œ/๋ถˆํ•„์š”ํ•œ ๋ฐ์ดํ„ฐ์— Compute ๋‚ญ๋น„ํ•˜์ง€ ์•Š๊ธฐ
  • Tokenization โ†’ sequence length๋ฅผ ์ค„์—ฌ Compute ํšจ์œจ ํ–ฅ์ƒ
  • Model architecture โ†’ Memory/FLOPs ๊ฐ์†Œ
  • Training โ†’ ์ œํ•œ๋œ Compute๋ฅผ ํšจ์œจ์ ์œผ๋กœ ์‚ฌ์šฉ
  • Scaling laws โ†’ ์ž‘์€ ๋ชจ๋ธ๋กœ Hyperparameter ํƒ์ƒ‰
  • Alignment โ†’ ์›ํ•˜๋Š” ๋ชฉ์ ์— ๋งž๊ฒŒ ๋ชจ๋ธ์„ ์กฐ์ •ํ•˜์—ฌ ํ•„์š”ํ•œ Base Model ๊ทœ๋ชจ ๊ฐ์†Œ

Course Overview

systems() scaling_laws() data() alignment()