Web上で走るLLM
An LLM Running on the Web
公開されているcdn(Hugging Face)を利用してWeb上でローカルに実行されるLLMを作ってみた(コードはこちら)。現在、普通に使えるLLMは皆クラウド上の高性能サーバー上で実行されているが、このLLMは完全にPC上で実行されている。処理速度は著しく遅いが、将来的にはローカルPCの性能アップで速くなるだろう。インテル第六世代以降か同等のPCの場合(*)、下のフィールドに入力してからEnterキーを押す前にWebGPUにチェックを入れておくと実行が早くなる。I built an LLM that runs locally in a web browser using publicly available (Hugging Face) CDN(CODE is here). Currently, most LLMs that are practical for everyday use run on high-performance cloud servers, but this one runs entirely on a local PC. Its processing speed is significantly slower, but it should become faster in the future as local PC performance improves. On PCs after Intel 6th generation or equivalent(*), performance can be improved by checking the WebGPU option before pressing the Enter key before entering text in the field below.
(*)i5-4590のwin11ではWebGPUは作動せず。i5-6200Uのwin11では次の操作を行った後のみWebGPUが動作した。On Windows 11 with an i5-4590, WebGPU does not work.On Windows 11 with an i5-6200U, WebGPU worked only after performing the following steps:
- Chromeのアドレスバーに chrome://flags と入力。Enter chrome://flags in the Chrome address bar.
- 「Unsafe WebGPU Support」を検索し、「Enabled」に変更。Search for “Unsafe WebGPU Support” and set it to “Enabled.”
