WebLLM은 하드웨어 가속을 통해 언어 모델 채팅을 웹 브라우저에 직접 가져오는 모듈식 사용자 정의 가능 자바스크립트 패키지입니다. 모든 것이 서버 지원 없이 브라우저 내에서 실행되며 WebGPU로 가속화됩니다.

WebLLM 이라는 녀석을 알게 되었습니다.

베이스는 MLC LLM (https://github.com/mlc-ai/mlc-llm) 이라고 합니다. 다기종의 머신에서 작동하는 LLM 을 구현하는 것입니다. 이중에서 Web 관련 부분을 이용한 WebLLM은 서버없이 브라우저만으로 LLM을 구동한다고합니다. 이때 사용되는 것이 WebGPU 기술이고요 WebGL이 기반입니다.

간단하게 사용해본결과 Ryzen 5 의 내장 GPU 만으로도 빠르게 채팅을 하려면 TinyLLama 1B 모델이 좋았습니다.

enter image description here

정말 AI 의 발전은 대단한것 같습니다. 구현하고 싶었지만 못하고 있던것을 누군가는 진행하고 있으니까요.

아래는 WebGPU에대한 블로그 글을 써보라고 요청한 결과입니다.

When web pages were first created, they were simply text-based documents that were rendered on a browser's screen using a technique known as "cascading style sheets" (CSS). CSS allowed web designers to style the look and feel of a web page using simple rules and selectors, but it didn't offer any support for GPU-intensive tasks, such as rendering 3D graphics or graphics that required advanced graphics processing. That all changed in 2014 with the introduction of the WebGL technology standard. WebGL allowed developers to use the GPU for a wide range of graphics-intensive tasks, such as rendering 3D graphics, gaming graphics, and other graphics tasks that require advanced GPU processing. Since then, WebGPU has emerged as a subset of WebGL that allows web pages to benefit from the GPU's processing power and performance advantages. This technology allows web pages to perform complex graphics tasks that would otherwise require rendering on the client's CPU, such as blending, filtering, and shading, without having to make any changes to the client's code. WebGPU is currently in development and is not widely available, but there are a few examples of web applications that use this technology, such as the Red Bull Games Tetris 9000 and the Ubisoft Game Lab. These applications use WebGPU to perform graphics-intensive tasks that would otherwise require rendering on the client's CPU, improving performance and reducing the load on the client's CPU. In future, we can expect to see more applications and games using WebGPU to benefit from the increased performance and graphics capabilities of the GPU. In addition, with the advancement of AI and machine learning, we can expect to see more intelligent and adaptive graphics algorithms that can learn and adapt to the tasks at hand, improving performance and reducing the need for human input.