Tag index

#KVCache

07 entries
№007 llm-rag-foundations · 09

LLM 추론 입문: Prefill·Decode·KV Cache·Temperature 이해하기 (9/10)

프롬프트가 token이 된 뒤 prefill과 autoregressive decode를 거치는 과정을 설명하고, KV cache·TTFT·token latency·temperature·top-p가 RAG의 context 비용과 답변 안정성에 미치는 영향을 정리합니다.

#LLMInference #KVCache #Prefill #Decoding
긴 프롬프트를 병렬 처리하는 prefill과 KV cache를 재사용해 한 token씩 생성하는 decode 단계
№006 llm-training-serving-foundations · 09

효율적인 LLM 추론 서빙: Prefill·Decode·KV Cache (9/10)

LLM 추론을 queue·prefill·decode로 분해하고 TTFT·ITL·goodput을 계산하며 PagedAttention, continuous batching, prefix cache, speculative decoding, P/D 분리와 SLO를 설계합니다.

#LLM #InferenceServing #Prefill #Decoding
LLM 요청을 queue prefill decode로 나누고 KV cache scheduler와 batching을 TTFT ITL goodput SLO로 연결하는 추론 서빙 구조
№005 llm-training-serving-foundations · 07

LLM Quantization: GPTQ·AWQ·SmoothQuant·FP8·KV Cache (7/10)

LLM 양자화를 weight-only, weight·activation, KV cache로 나누고 scale·zero point·granularity를 계산하며 GPTQ, AWQ, SmoothQuant, FP8, KIVI의 memory·kernel·품질을 설계합니다.

#LLM #Quantization #GPTQ #AWQ
Floating point tensor를 quantize해 weight-only, weight·activation, KV cache를 calibration, hardware kernel, 품질 평가로 연결하는 구조
№004 llm-inference-systems-engineering · 06

Speculative Decoding: Draft·Verify·Acceptance와 Serving 설계 (6/10)

Speculative decoding의 draft·target verification과 acceptance/rejection 식을 설명합니다. Draft 길이, tree 후보, KV rollback, scheduler와 품질 검증을 연결해 decode 지연을 줄이는 조건을 찾습니다.

#LLM #Inference #SpeculativeDecoding #DraftModel
Draft model이 후보 token을 제안하고 target model이 한 번에 검증한 뒤 acceptance ratio로 prefix를 채택하며 rejected suffix KV를 rollback하는 구조
№003 llm-inference-systems-engineering · 05

Paged KV Cache·Prefix Caching: Block·Eviction·Reuse (5/10)

KV cache를 logical block과 physical page로 나눠 할당합니다. Prefix identity, copy-on-write, refcount, eviction, offload를 연결해 RAG Agent의 cache hit와 tenant 격리를 설계합니다.

#LLM #Inference #KVCache #PagedAttention
요청의 logical KV block을 불연속 physical GPU page에 매핑하고 radix prefix tree에서 공유한 뒤 refcount, copy-on-write, eviction과 CPU·SSD tier로 관리하는 구조
№002 llm-training-serving-foundations · 03

현대 Decoder LLM 구조: RMSNorm·RoPE·GQA·SwiGLU·MoE (3/10)

현대 decoder-only LLM block을 pre-norm·RMSNorm, RoPE, SwiGLU, MHA·MQA·GQA, KV cache, dense·MoE로 분해하고 각 구조가 학습 안정성, 메모리, 통신, latency에 미치는 영향을 계산합니다.

#LLM #Transformer #RMSNorm #RoPE
Residual stream이 pre-RMSNorm, RoPE와 GQA attention, SwiGLU 또는 routed MoE를 통과하며 KV cache와 token compute를 결정하는 decoder block