LLaMA.cpp가 이제 Apple 실리콘(M1/M2 칩)을 지원합니다! (Add full GPU inference of LLaMA on Apple Silicon using Metal)

1줄 요약

어제 있었던 릴리즈에서 Apple Silicon을 전격적으로 지원하는 Metal Inference PR이 머지되었습니다! :tada:

이것은... 몇 시간 뒤에 있을 WWDC 2023 떄문이려나요 :rofl:

(좀 더 긴) 소개

이 PR은 LLaMA.cpp에 텐서 조작 및 연산 그래프 내보내기/가져오기 등을 위한 라이브러리인 Metal 지원을 추가합니다. 여기에는 Apple 기기에서 LLaMA expression의 GPU 가속을 가능하게 하는 새로운 CMake 옵션 LLAMA_METAL과 새로운 헤더 파일 ggml-metal.h가 도입됩니다. 또한, 기존 코드와 문서의 가독성, 일관성, 사용성을 개선하고 몇 가지 새로운 기능과 예제를 추가했습니다. main 예제 프로그램의 버그를 수정하고, 정적으로 내보낸 ggml 계산 그래프를 Metal으로 평가하는 방법을 보여주는 새로운 metal 예제 프로그램을 추가했습니다. (DeepL의 도움을 받았습니다)

This pull request adds Metal support for llama, a library for tensor manipulation and computation graph export/import. It introduces a new CMake option LLAMA_METAL and a new header file ggml-metal.h that enable GPU acceleration of llama expressions on Apple devices. It also improves the readability, consistency, and usability of the existing code and documentation, and adds some new features and examples. It fixes a bug in the main example program and adds a new metal example program that demonstrates how to evaluate a statically exported ggml computation graph with Metal.

데모 영상

M1 Pro + 7B LLaMA:

M2 Max + 7B LLaMA:

M2 Max + 13B LLaMA:

M2 Max + 65B LLaMa

PR의 상세 내용

1개의 좋아요