Technically Impossible

Lets look at the weak link in your statement. Anything "Technically Impossible" basically means we haven't figured out how yet.

GPU無し、コンテナも使わない、RAM=8GBでllama2.c - 実用抜き、モデル生成から推論実行まで

今春、8GBの環境で生成AIがどこまで動くのかを模索していた*1。パフォーマンスを気にしなければ、GPTだろうがDiffusionだろうが、GPUの無いRAM=8GBの環境、PCでもAndroidスマートフォンでも動作はするのだ。ただし推論であれば、という条件付きだった。つまり、誰かが提供してくれる小規模なモデルを用いる前提であり、そのモデルに独自の情報を付与する強化学習に対応することは現実的ではなかった。
そのような現状に微かな希望をもたらしてくれたのが、llama2.cだった。

github.com

llama-2アーキテクチャのシンプル、かつミニマムな推論エンジンを開発するという、Andrej Karpathy氏による週末のクリエイティブな活動は、学習モデルの小規模さから、推論だけでなく強化学習までもRAM=8GBの環境で実行できるのだ。

実用的なところは置いて、モデルの生成から、そのモデルを用いた推論まで、一連の流れをRAM=8GBの環境で追体験してみた。この投稿は、その手順と記録だ。
なお推論の実行については、LinuxでもWindowsでも簡単に実行できる。しかしモデルの生成について、Windowsでの実行は難しい。以下のような障害がある。

Windowsについては、推論エンジンの初回実行のみ取り上げる。

続きを読む

One solution in Adobe Digital Editions - Add to Library, and "Error! Check Activation"

Abstract

Adobe Digital Editions (ADE) handles DRM protected documents as ePub and PDF. Usually, they are downloaded from ACS (Adobe Content Server) with ACSM (Adobe Content Server Message). Opening ACSM on ADE and adding the protected document to ADE library, sometime next message pops up.

Typical responce of user support for this incident is

  1. delete certificate from ADE and certify computer again.
  2. uninstall and reinstall ADE.

This response would be appropriate, if it is caused by failure of Adobe ID authentication or installation of ADE. But they don't work for it in many cases. Sometime, extra steps are required to solve this incident.

This post introduces one solution for this incident. This case are based on following environment.

Windows 10 Pro 64bit version 1803
Adobe Digital Editions 4.5.10.186048
  • Abstract
  • Circumstance check
  • Clean up for authentication failure
    • Delete registry key
    • Delete ADE document folder
  • Clear cache of web browser
続きを読む

Stable Diffusion on Windows PC with 8GB RAM, No GPU, No Container - case of GIMP

Abstract

Running "AI" on PC requires rich computational resources as GPU with VRAM, and storage for its model. "bes-dev/stable_diffusion.openvino"*1 made running Stable Diffusion on poor consumer PC.
And "intel/openvino-ai-plugins-gimp" allows an user to operate Stable Diffusion via GUI of GIMP plugin. It provides 5 plugins including Stable Diffusion.
github.com

This post introduce how to run it on Windows PC only with 8GB RAM without GPU, and its performance. Even Microsoft Surface Pro 4 with specs below can run and output a single image per 10~12min.

OS Windows 11 Pro 22H2
CPU Intel Core i7-6650U
RAM 8GB
Storage SSD: 256GB
SD card: 32GB (D drive in this post)

Container and WSL are not used in this post. On limited resource environment, it is better run SDOV directly than to use them. Actually, SDOV can run stably even on a PC with RAM=8GB.

Computational resource assignment is done by Windows OS to them, and it sometime causes OOM kill, which a process is killed forcibly due to out of memory. Although there are workaround to avoid it, they are not recommended.

You should not try to circumvent these safeguards by manually setting --oom-score-adj to an extreme negative number on the daemon or a container, or by setting --oom-kill-disable on a container.

Runtime options with Memory, CPUs, and GPUs | Docker Documentation

  • Abstract
  • Tools
  • Folders
  • "intel/openvino-ai-plugins-gimp"
    • Download program
    • Edit "install.bat" and run it
    • Copy weighes
    • Download and copy Stable-Diffusion-1.4 model
    • Copy "gimp_openvino_config.json"
    • Configure GIMP plugin and restart GIMP
  • Run Stable Diffusion
続きを読む