PyTorchKR Papers

최신 논문

총 2편
태그·기간 등 상세 필터

카테고리 탐색

로그인 후 이 태그 구독

arXiv:2607.15865v2cs.CL

MLIR 기반 대규모 언어 모델 컴파일 방법

An MLIR-Based Compilation Method for Large Language Models

대규모 언어 모델(LLM)은 현대 AI 가속기에서 지배적인 워크로드가 되었지만, 이를 특화 하드웨어에 배포할 때 여전히 두 가지 핵심 과제가 남아 있다: 학습된 모델을 컴파일러 친화적인 중간 표현(intermediate representation)으로 가져오는 방법, 그리고 제한된 온칩(on-chip) 메모리 하에서 자기회귀(autoregressive) 추론 루프를 효율적으로 스케줄링하는 방법이다. 본 논문은 대규모 언어 모델을 위한 MLIR(Multi-Level Intermediate Representation) 기반 컴파일 방법을 제안하며, TopOp와 TpuOp라는 두 가지 연산자(operator) dialect를 통해 이를 설명한다. TopOp는 소스 프레임워크와 타깃 칩 모두에 독립적인 고수준 그래프 dialect로서 모델 의미론(semantics)을 표현하는 역할을 하며, TpuOp는 타깃 하드웨어 dialect로서 양자화, 층 그룹, 메모리 레이아웃과 같은 칩 관련 결정을 담는다. 모델은 먼저 TopOp로 표현된 후, 층별로 TpuOp로 lowering되고, 최종적으로 배포 가능한 바이너리가 생성된다. 또한 각 트랜스포머 층은 정적 컴파일을 위해 prefill, prefill_kv(과거 key-value 캐시를 포함한 prefill), decode의 세 단계로 분할되어, 프롬프트 병렬 처리와 토큰별 생성의 서로 다른 계산 특성을 수용한다. 이 방법은 TPU-MLIR 컴파일러 {https://github.com/sophgo/tpu-mlir}와 LLM-TPU 배포 프로젝트 {https://github.com/sophgo/LLM-TPU}에 구현되었으며, Qwen, Llama, InternVL, MiniCPM-V 시리즈를 포함한 다양한 생성 모델과 GPTQ, AWQ, AutoRound 등 여러 양자화 및 배포 형태를 지원한다.

arXiv:2606.24780v1cs.AI

BluTrain: A C++/CUDA Framework for AI Systems

Progress in deep learning is, at scale, more a matter of systems engineering than of modelling: the behaviour of a model in training (its throughput, its memory footprint, and the numerical fidelity of the result) is determined less by the architecture itself than by how that architecture is expressed on the hardware. To achieve absolute control over this hardware expression while abstracting away systems complexity to make modelling seamless and eliminating the need for repetitive orchestration logic, BluTrain was architected from first principles as a robust, lightweight, and architecture-general training framework in standard C++ and the core CUDA programming model. Every layer is implemented natively: a typed tensor module with reverse-mode autograd, a linear-algebra library, a caching allocator, a multi-mode distributed-execution module, and an MLIR-based deep-learning compiler. In formal evaluations training a 124M-parameter GPT-2 baseline in FP32 on an 8-GPU 6000 Ada system, BluTrain outperforms industry-standard baselines in both throughput (sustaining an average of 407K tokens/s versus PyTorch's 395K tokens/s) and memory efficiency (achieving up to a 22% footprint reduction), while strictly preserving numerical fidelity and converging to a marginally lower final validation loss. With every layer explicitly open to native tuning, the performance ceiling is the framework's own to raise.