분류 전체보기 329

[논문 리뷰] SQUEEZED ATTENTION: Accelerating Long Context Length LLM Inference

Problem Definition- long context length 어플리케이션에서 inference cost는 seqlen에 비례하여 선형적으로 증가한다- LLM 추론이 상당한 computational resource 요구 / memory capacity, bandwidth 요구 => 거대한 사이즈의 KV cache 때문- in-context learning, document QA, code generation 등의 어플리케이션에서는 입력 컨텍스트의 상당 부분이 고정되어있다- 모델에 들어가는 것: "fixed context" => 연속된 프롬프트들에서 재사용 가능 + "user input" => online으로 들어오는 유저 요청들- 이 논문에서는 fixed context(코드, 문서 등등)가 추론..

AI/ML System 2025.05.26

[논문 리뷰] I-LLM: Efficient Integer-Only Inference for Fully-Quantized Low-Bit Large Language Models

Problem definition* 대부분의 Post Training Quantization 방법들은 simulated quantization을 활용한다, 연산은 dequantize 후 fp* integer-only inference 한다면 효율적인 efficient integer arithmetic unit을 극한으로 활용 가능할 것 + edge processor* 기존 Integer-only method는 CNN, ViT나 Bert 같은 작은 트랜스포머 모델에 제한됨, SwiGLU나 RMSNorm 같은 복잡한 비선형 연산을 다루기는 부족 => 요즘 나오는 트랜스포머 기반 거대 LLM ?* per-channel, per-token 으로 보면 값이 많이 튄다, 특히 non-linear 직후의 activa..

AI/ML System 2025.05.23

[논문 리뷰] I-BERT: Integer-only BERT Quantization

Integer-only Quantization의 필요성* 모델의 사이즈(파라미터 수)가 계속해서 커지는 중* 지금까지의 integer quantization method는 simulated quantization (=fake quantization), 모든(혹은 대부분의) 연산은 실질적으로 floating point arithmetic으로 이루어짐* Neural Accelarator 혹은 부동소수점 연산 지원하지 않는 edge processor에서 돌릴 수 없다 (ex. ARM Cortex-M)* 또한 low-precision integer의 효율적인 연산을 지원하는 Tensor Core를 fully leverage 하지 못함* 따라서 floating point arithmetic을 추론 과정에서 완벽히..

AI/ML System 2025.05.21

[논문 리뷰] Optimizing Distributed ML Communication with Fused Computation-Collective Operations

pdp 수업시간에 발표해야 돼서 더 꼼꼼히, 자세하게 읽어본 논문저자는 amd researcher, SC24 컨퍼런스에서 발표된 적이 있음30분 안에 발표 가능..? Introduction[trends]복잡한 문제를 풀기 위해 ML 모델의 사이즈는 계속 커지고 있다large ML 모델 등장으로 memory capacity와 compute requirement를 충족시키기 위해 distributed system 발전distributed system에서 ML 모델을 잘 돌리기 위한 parallelization technique들도 많이 등장 예전에는 CPU-GPU heterogeneous system이 왼쪽처럼 단순하게 구성되어 있었음. (CPU 쪽에서 통신을 담당)지금은 HPC/ML에 최적화된 노드 디자인..

AI/ML System 2025.04.19

GNN에서의 convolution

https://distill.pub/2021/understanding-gnns/ Understanding Convolutions on GraphsUnderstanding the building blocks and design choices of graph neural networks.distill.pub과거에는 그래프 분석에 graph kernel과 random-walk 기법이 사용되었다계산량이 많고, 알고리즘 기반으로 그래프의 구조적 특성을 미리 설계된 규칙(예: 서브트리, 최단 경로, 랜덤 워크 경로 등)을 활용해 추출하는 방식현재는 GNN으로 대체되었다데이터로부터 end-to-end 학습을 통해 입력 그래프의 노드, 엣지, 글로벌 속성 간의 복잡한 상호작용을 자동으로 모델링하는 방식graph는 특수..

AI/graph 2025.04.14

GNN이란 무엇인가

https://distill.pub/2021/gnn-intro/ A Gentle Introduction to Graph Neural NetworksWhat components are needed for building learning algorithms that leverage the structure and properties of graphs?distill.pub What's graph?- each node, edge, global information은 임베딩 형태로, 고차원 텐서 형태로 저장되어 있다- directed, undirected 두 종류의 edge가 있다 Graph Examples in the wild- 분자 구조: atom이 vertex, bond가 edge에 대응됨- social n..

AI/graph 2025.04.14

[논문리뷰] SqueezeLLM: Dense-andSparse Quantization

LLM inference은 compute-bound가 아니라 memory-bound이다즉 파라미터를 메모리에 load하고 store하는 속도가 핵심 bottleneck이다 = memory bandwidth가 latency에 직결됨"Memory Wall" 이라고 부르기도 함 (https://arxiv.org/pdf/2403.14123) cf) why memory-bound?- LLM inference는 대부분 matrix-vector operation이다- data reuse가 제한적이고, 서로 다른 토큰에 해당하는 벡터를 amortize하기도 힘들다Quantization?이를 해결하기 위한 하나의 approach가 quantization이다어차피 dequantization 및 FP16 computatio..

AI/ML System 2025.04.12

[논문리뷰] FlashAttention: Fast and Memory-Efficient Exact Attentionwith IO-Awareness

이전 attention approximation 관련 논문들은 compute complexity를 줄이는데 집중했다.더보기ex) block-sparse attentionhttps://velog.io/@nawnoes/sparse-attentionhttps://huggingface.co/blog/big-bird사전에 정해진 sparse pattern에 따라 어떤 블록을 계산 => 전체 연산량 및 메모리 사용량 줄이면서 로컬 및 글로벌 정보를 적절히 캡쳐할 수 있도록 디자인ex) low-rank approximation이래서는 wall-clock speedup은 없다. 단순히 FLOP 수만 줄일 뿐이다. runtime은 메모리 접근 시간(IO)에 더 관련이 있다 FlashAttention은 tiling이라는 ..

AI/ML System 2025.04.11

vllm 논문 리뷰 - Efficient Memory Management for Large Language Model Serving with PagedAttention

problem of original transformer architecture현재 대부분의 LLM은 autoregressive Transformer model에 기반을 둔다. 하지만 이 Transformer 기반의 sequential한 연산은 memory-bound하다 (DNN, CNN의 경우 conv 연산이나 GEMM 연산 때문에 compute-bound인 경우가 많음).위 사진에서 회색 부분은 model weight이고(serving 단계에서는 static하게 load되어 있음), 핑크색 부분은 attention mechanism에서 필요한 key와 value tensor를 저장하는 KV cache이다(request에 따라 dynamic하게 바뀜). 기타 부분은 activation 같은 임시 ten..

AI/ML System 2025.03.31

2025 겨울 가속기학교 - 딥러닝 추론 모델 병렬화/가속화 하기

연구실의 지원을 받아 ARC Lab 분들과 참여한 2025 겨울 가속기학교..수업 교재가 워낙 자세하기에 배운 내용들은 따로 정리를 안 할 예정이고, 프로젝트 관련해서는 기록용으로 작성해두려고 한다. Target 모델input sentence가 주어졌을 때 Conv - MoE - FC layer를 거쳐 긍정인지 부정인지 판단하는 간단한 딥러닝 모델을 가속화하는 프로젝트였다. 전부 cpu 버전으로 작성되어 있었다. 최적화 과정1. GPU 포팅하기- Conv1D, Linear, ReLU, GetMax, SoftMax 등의 layer를 전부 GPU로 포팅했다- 각 tensor에서 host memory는 pinned memory로 설정하여 DMA direct 전송이 가능하도록 하였고, gpu memory를 미리..

etc 2025.03.01
반응형