[Engineering] Core ML 디코딩 최적화: GQA의 repeat_kv가 만든 토큰당 1.9 GiB 복사를 없앤 방법
KV 헤드 8개를 32개로 복제하는 대신 쿼리 헤드 32개를 [8, 4]로 재배열해 tile 연산 60개를 없애고 처리량을 20.39에서 54.30 tok/s로 높였습니다.
자세히 보기Blog
KV 헤드 8개를 32개로 복제하는 대신 쿼리 헤드 32개를 [8, 4]로 재배열해 tile 연산 60개를 없애고 처리량을 20.39에서 54.30 tok/s로 높였습니다.
자세히 보기kv_head = query_head // group_size라는 같은 매핑도 백엔드마다 표현 수단이 다릅니다. 포인터 산술, 그래프 fan-out, 텐서 형상을 비교합니다.
자세히 보기같은 비동기 softmax도 적용 위치에 따라 HMX 할당과 실제 TPS가 달라집니다. Custom Op와 export 단계 접근을 비교합니다.
자세히 보기kv_head = query_head // group_size라는 같은 매핑도 백엔드마다 표현 수단이 다릅니다. 포인터 산술, 그래프 fan-out, 텐서 형상을 비교합니다.
자세히 보기같은 비동기 softmax도 적용 위치에 따라 HMX 할당과 실제 TPS가 달라집니다. Custom Op와 export 단계 접근을 비교합니다.
자세히 보기커스텀 커널은 구현보다 검증이 비쌉니다. HMX 할당, 양자화, HVX 레인 재배열과 누적 오차를 실측 데이터로 추적합니다.
자세히 보기통합 최댓값으로 블록 간 동기화를 제거하고, fallback으로 수치 안전성을 지키는 비동기 softmax의 원리를 살펴봅니다.
자세히 보기Core AI의 연산 장치는 런타임 플래그가 아니라 export 시점의 shape으로 결정됩니다. iPhone 17 Pro에서 네 가지 실행 경로를 비교했습니다.
자세히 보기Apple Core AI가 그래프 캡처, KV 캐시, 컴파일러 스택을 어떻게 다시 설계했는지 ANEMLL과 구조적으로 비교합니다.
자세히 보기LoRA 기반 파라미터 효율화에서 발생하는 랭크 붕괴 문제를 Fisher-guided layer selection과 Stiefel 제약으로 어떻게 완화할 수 있는지 분석합니다.
자세히 보기Limited memory, power budgets, latency constraints, and heterogeneous hardware environments make device deployment fundamentally different from cloud inference.
자세히 보기A practical explanation of general-purpose compute, parallel acceleration, and dedicated neural processing for sustained local inference.
자세히 보기How precision mapping, calibration, and mixed precision strategies reduce model size while preserving accuracy.
자세히 보기Why dynamic model graphs often fail on edge runtimes, and how static shape transformation improves deployment stability.
자세히 보기A technical overview of model compression, inference speed, context length, and accuracy validation for mobile sLM deployment.
자세히 보기How KV cache design affects memory pressure, latency, and context length in on-device LLM execution.
자세히 보기Latency, privacy, cloud cost, and network dependency are pushing AI deployment from centralized servers to local devices.
자세히 보기How mobile operators can use local inference for call intelligence, summarization, privacy-first assistants, and low-latency AI features.
자세히 보기A step-by-step view of model adaptation, quantization, compilation, and runtime optimization for real-device deployment.
자세히 보기