BLOGLLM Logo
Go Pro
Guest
Not signed in
All BlogsCoursesPracticeInterview prepSeriesTagsBookmarksPricing
Log in
All BlogsCoursesPracticeTagsBookmarksPricing
BlogsCourses
Practice
My PrepProblemsStudy PlansResearch PapersRoadmapInterviewContestsLeaderboardGames
Articles
Practice / Research papers
Transformers and LLMs · 2022

LLM.int8(): 8-bit Matrix Multiplication for Transformers at Scale

Tim Dettmers, Mike Lewis, Younes Belkada, Luke Zettlemoyer

NeurIPS 2022 · arXiv 2208.07339 · Read the paper ↗

Run big models in 8 bits by keeping the few outlier features in 16 bits.

3 steps · 0 solved

Start: Int8 weight quantization →
  1. 1Int8 weight quantizationAbsmax scaling to 8-bit integers.Quantize weights to int8 and measure the errorMediumPro
  2. 2Row-wise quantization, fastPer-row scales, vectorised.Per-row int8 quantization at speedMedium
  3. 3Mixed-precision decompositionSplit outlier columns into a 16-bit matmul.LLM.int8() outlier decomposition matmulHardPro

More transformers and llms papers

  • Attention Is All You Need 2017
  • LoRA: Low-Rank Adaptation of Large Language Models 2021
  • FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awareness 2022
  • RoFormer: Enhanced Transformer with Rotary Position Embedding 2021
  • Direct Preference Optimization: Your Language Model is Secretly a Reward Model 2023
  • Switch Transformers: Scaling to Trillion Parameter Models with Simple and Efficient Sparsity 2021
  • Fast Inference from Transformers via Speculative Decoding 2022
Goal
Quantize, then handle outliers
0 / 3 solved
Start: Int8 weight quantization →
How it works

Solve the steps in order. Each one is a small function with tests that run in your browser. Later steps reuse ideas from earlier ones.

© BlogLLM, Bengaluru, IndiaAboutTermsPrivacyRefundsDMCAContactRSS