AMD GAIA - AI HX 370 MiniPC 를 위한 NPU사용 오픈소스 LLM 툴

 


설치를 해보자.




https://www.amd.com/en/developer/resources/technical-articles/gaia-an-open-source-project-from-amd-for-running-local-llms-on-ryzen-ai.html





(Claude 번역)
GAIA는 Windows PC에서 로컬 및 비공개 LLM을 실행하도록 설계된 생성형 AI 애플리케이션으로, AMD Ryzen AI 하드웨어(AMD Ryzen AI 300 시리즈 프로세서)에 최적화되어 있습니다. 이러한 통합을 통해 데이터를 로컬에서 안전하게 유지하면서 더 빠르고 효율적인 처리, 즉 더 낮은 전력 소비가 가능합니다. Ryzen AI PC에서 GAIA는 ONNX TurnkeyML의 오픈 소스 Lemonade(LLM-Aid) SDK를 사용하여 LLM 추론을 위해 NPU 및 iGPU와 상호 작용하여 모델을 원활하게 실행합니다. GAIA는 Ryzen AI PC에서 실행되도록 최적화된 다양한 로컬 LLM을 지원합니다. Llama 및 Phi 파생 모델과 같은 인기 있는 모델은 질의응답, 요약, 복잡한 추론 작업과 같은 다양한 사용 사례에 맞게 조정될 수 있습니다.

Introduction to GAIA

GAIA is a generative AI application designed to run local, private LLMs on Windows PCs and is optimized
for AMD Ryzen AI hardware (AMD Ryzen AI 300 Series Processors). This integration allows for faster, more efficient processing – i.e. lower power– while keeping your data local and secure. On Ryzen AI PCs, GAIA interacts with the NPU and iGPU to run models seamlessly by using the open-source Lemonade (LLM-Aid) SDK from ONNX TurnkeyML for LLM inference. GAIA supports a variety of local LLMs optimized to run on Ryzen AI PCs. Popular models like Llama and Phi derivatives can be tailored for different use cases, such as Q&A, summarization, and complex reasoning tasks.

Benefits of Running LLMs Locally

Running LLMs locally on the NPU offers several benefits:

  • Enhanced privacy, as no data needs to leave your machine. This eliminates the need to send sensitive information to the cloud, greatly enhancing data privacy and security while still delivering high-performance AI capabilities.
  • Reduced latency, since there's no need to communicate with the cloud.
  • Optimized performance with the NPU, leading to faster response times and lower power consumption.

Comparing NPU and iGPU

Running GAIA on the NPU results in improved performance for AI-specific tasks, as it is designed for inference workloads. Beginning with Ryzen AI Software Release 1.3, there is hybrid support for deploying quantized LLMs that utilize both the NPU and the iGPU. By using both components, each can be applied to the tasks and operations they are optimized for.




설치를 위해서는 다음 모듈이 필요함
- miniconda
- NPU Driver








GUI 버전과 CLI 버전이 있음
GUI버전은 그림 처럼 LLama3.2 1B Instruct (1.8GB)버전을 자동설치함





대화스타일을 설정할 수 있고,



현재 GAIA 에이전트는 옵션은 4개가 있음
  • 간단한 프롬프트 완성 : 테스트 및 평가를 위한 직접적인 모델 상호작용을 위한 에이전트가 없습니다.
  • Chaty : 사용자와 대화하며 과거 경험을 보유한 LLM 챗봇입니다.
  • Clip : YouTube 검색 및 Q&A 에이전트를 위한 Agentic RAG입니다.
  • Joker : RAG를 이용해 사용자에게 유머를 선사하는 간단한 농담 생성기입니다.


LLM Model을 설정할 수 있음. (오른쪽 hybrid 옵션은 1개 옵션밖에 없어 다른 선택 못해봄)



  • For Hybrid mode: AMD Ryzen AI 9 HX 370 with NPU Driver 32.0.203.237 or 32.0.203.240
  • For Generic mode: Any Windows PC meeting Ollama's system requirements


github 설명에 따르면, NPU가 있는 AMD MiniPC는 하이브리드Hybrid 모드를 사용할 수 있어서, 빠르게 동작하고 일반 ollama를 활용한 Generic 모드는 CPU/GPU만 사용하는 것으로 보임

  1. Hybrid Mode: Best overall performance

    • Combines NPU and GPU capabilities
    • Recommended for most users with supported hardware
    • Requires Ryzen AI driver
    • Optimized for AMD NPU hardware acceleration
    • Ideal for laptop users prioritizing battery life
    • Requires Ryzen AI driver
    • Standard GPU/CPU implementation
    • Works on any system
    • Uses Ollama for LLM support
    • No special hardware requirements

  2. NPU Mode: Best power efficiency

  3. Generic Mode (Default): Most compatible







사용성은 거의 뭐 챗봇 DEBUG를 위한 '오픈소스'이지 이걸 사용할 수 있을까? 싶은 정도이다. 아직 1년 정도 기다려봐야 하지 않을까 하는 생각이 든다.





거의 뭐.... 




claude 무료Plan을 사용한 번역 결과와 비교를 해도 
이 GAIA를 사용해 간단한 일에 쓰기나 싶을까 하는 생각이 든다.






NPU 사용성을 테스트 해보려 꽤 긴 문장을 영어번역 시켜본다.
하지만 NPU 사용량은 시작할 때만 잠시 올랐다가 계속 0%이다.








MS에서 제공하는 Phi-3.5 Mini instrut를 실행하면
자체 실행이 아니라, Huggingface 모델을 실행하는지 Token 관련정보를 넣어야 한다




허깅페이스에 들어가서 token을 하나 생성하고, (아무런 옵션도 체크하지 않았다)
입력해준다



{user} input variable이 정해지지 않아서 동작을 하지 않는다.
메뉴얼에도 뒤져봐야 하고, 코드를 뜯어봐야 하는데.... 그러기엔 좀 아쉽고 일단 NPU를 사용하고 안하고의 속도 차이를 먼저 점검해 보고 NPU+GPU 사용의 속도가 눈에띄는 효과가 있으면 고쳐봐야 겠다.


자세한 기능과 설명은 아래 github 링크를 참고.
https://github.com/amd/gaia/blob/main/docs/features.md





_

댓글