MiniGPT-4, the original April 2023 model, running on your GPU: a vision encoder and a 4-bit Vicuna-7B, nothing uploaded. First use downloads about 5 GB, kept in your browser.

Or try:

Pick an image to begin.

How it works, limits and credits

Model. The original MiniGPT-4 (Vision-CAIR, KAUST): a frozen EVA ViT-G, a frozen BLIP-2 Q-Former and one trained linear projection feed 32 image tokens to Vicuna-7B v0. The vision part runs as an 8-bit ONNX graph on ONNX Runtime Web (1.2 GB); the language model is a 4-bit GGUF (3.8 GB) on wllama (llama.cpp WebAssembly + WebGPU). Weights: the model repo. Sources: Luminia/MiniGPT-4, whose CPU/GPU version this mirrors, Vision-CAIR/vicuna-7b.

How the image gets in. llama.cpp (and so wllama) cannot take raw embeddings, so the 32 image vectors are written into 32 reserved rows of the model's token-embedding table (the byte tokens <0x80>…<0x9F>) before the model is loaded, and the prompt carries those 32 token ids. A new image therefore reloads the language model from your browser's cache (some seconds); more questions about the same image do not. Text containing those rare byte tokens is not supported.

Limits. About 6 GB of free memory and a GPU with 4 GB+ of video memory are needed; without WebGPU it runs on the CPU, at under one word a second. This is a 2023 model: captions are often wrong in details, and it is uncensored, so it describes whatever you give it. Vicuna v0 is derived from LLaMA-1 (non-commercial research licence).

If answers look wrong or refuse. Add ?vgpu=0 (vision on the CPU), ?llmgpu=0 (language model on the CPU) or ?check=1 (compare the GPU and CPU image embeddings) to the address to find out which part misbehaves on your GPU. The original Python version is on the python branch.