Instructions to use WeReCooking/MiniGPT4-7B-WebGPU with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use WeReCooking/MiniGPT4-7B-WebGPU with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf WeReCooking/MiniGPT4-7B-WebGPU:BF16 # Run inference directly in the terminal: llama cli -hf WeReCooking/MiniGPT4-7B-WebGPU:BF16
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf WeReCooking/MiniGPT4-7B-WebGPU:BF16 # Run inference directly in the terminal: llama cli -hf WeReCooking/MiniGPT4-7B-WebGPU:BF16
Build from source code
git clone https://github.com/ggml-org/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-app # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama serve -hf WeReCooking/MiniGPT4-7B-WebGPU:BF16 # Run inference directly in the terminal: ./build/bin/llama cli -hf WeReCooking/MiniGPT4-7B-WebGPU:BF16
Use Docker
docker model run hf.co/WeReCooking/MiniGPT4-7B-WebGPU:BF16
- Llama new
- LM Studio
- Jan
- vLLM
How to use WeReCooking/MiniGPT4-7B-WebGPU with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "WeReCooking/MiniGPT4-7B-WebGPU" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "WeReCooking/MiniGPT4-7B-WebGPU", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/WeReCooking/MiniGPT4-7B-WebGPU:BF16
- Ollama
How to use WeReCooking/MiniGPT4-7B-WebGPU with Ollama:
ollama run hf.co/WeReCooking/MiniGPT4-7B-WebGPU:BF16
- Unsloth Desktop
- Docker Model Runner
How to use WeReCooking/MiniGPT4-7B-WebGPU with Docker Model Runner:
docker model run hf.co/WeReCooking/MiniGPT4-7B-WebGPU:BF16
- Lemonade
How to use WeReCooking/MiniGPT4-7B-WebGPU with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull WeReCooking/MiniGPT4-7B-WebGPU:BF16
Run and chat with the model
lemonade run user.MiniGPT4-7B-WebGPU-BF16
List all available models
lemonade list
- Atomic Chat
MiniGPT-4 7B for the browser: vision ONNX (q8) + Vicuna Q4_0 GGUF with F16 embeddings
Browse filesFiles changed (6)
- .gitattributes+2
- README.mdAdded+29
- config.jsonAdded+18
- vicuna-7b-v0-q4_0-embf16.ggufAdded+3
- vision/vision_q8b64.onnxAdded+3
- vision/vision_q8b64.onnx.dataAdded+3
32 unmodified lines333435363732 unmodified lines*.zip filter=lfs diff=lfs merge=lfs -text*.zst filter=lfs diff=lfs merge=lfs -text*tfevents* filter=lfs diff=lfs merge=lfs -textvicuna-7b-v0-q4_0-embf16.gguf filter=lfs diff=lfs merge=lfs -textvision/vision_q8b64.onnx.data filter=lfs diff=lfs merge=lfs -text1234567891011121314151617181920212223242526272829---license: otherlicense_name: llama-1-research-and-apache-2.0-componentslicense_link: https://github.com/facebookresearch/llama/blob/llama_v1/LICENSEbase_model: - Vision-CAIR/vicuna-7b - Vision-CAIR/MiniGPT-4tags: - minigpt4 - vicuna - gguf - onnx - webgpu - wllama - onnxruntime-webpipeline_tag: image-text-to-text---
# MiniGPT-4 (7B, Vicuna v0) for the browser
Weights for the [MiniGPT4-WebGPU Space](https://huggingface.co/spaces/WeReCooking/MiniGPT4-WebGPU). Nothing here is retrained: it is the original April 2023 MiniGPT-4 (frozen EVA ViT-G, frozen BLIP-2 Q-Former, one trained linear projection, Vicuna v0), converted.
| file | what ||---|---|| `vision/vision_q8b64.onnx` + `.data` | EVA ViT-G (39 blocks) + `ln_vision` + Q-Former (32 queries) + `llama_proj`, image `[1,3,224,224]` to embeddings `[1,32,4096]`. Weight-only 8-bit (`MatMulNBits`, block 64) of the fp32 export; cosine 0.99996 against PyTorch. || `vicuna-7b-v0-q4_0-embf16.gguf` | `Vision-CAIR/vicuna-7b` as Q4_0 GGUF, **token embeddings kept in F16** so the page can overwrite 32 rows (`<0x80>`..`<0x9F>`, ids 131..162) with image embeddings before loading. || `config.json` | byte offset of the embedding table and the reserved ids. |
Sources: `lainxx/eva_vit_g` (EVA ViT-G), the LAVIS BLIP-2 checkpoint (Q-Former), `ckpt/minigpt4-7B` (projection), `Vision-CAIR/vicuna-7b` (language model). Vicuna v0 derives from LLaMA-1 weights, so the language model keeps the LLaMA-1 non-commercial research terms; the vision parts keep their own licences (BSD-3 for BLIP-2/LAVIS, MIT for EVA-CLIP, BSD-3 for MiniGPT-4).123456789101112131415161718{ "gguf": { "path": "vicuna-7b-v0-q4_0-embf16.gguf", "bytes": 4014235040, "embd_offset": 108281248, "first_id": 131, "n_image": 32, "dim": 4096, "vocab_rows": 32001 }, "vision": { "model": "vision/vision_q8b64.onnx", "data": "vision/vision_q8b64.onnx.data", "data_name": "vision_q8b64.onnx.data", "model_bytes": 608826, "data_bytes": 1168850968 }}123version https://git-lfs.github.com/spec/v1oid sha256:bdb39769ba0ab23fbe3e117d61166de57ec9b95eb94fb6f031f6f2af07d7d3c7size 4014235040123version https://git-lfs.github.com/spec/v1oid sha256:68fd58936adf0af7dc58901ab1bc0f3c64d4bdbaf98741960f0857ac6287a50bsize 608826123version https://git-lfs.github.com/spec/v1oid sha256:92ce99f67151e0e067a474abb579dd493dde0ee4122d7828e76320b0f036a9e3size 1168850968.gitattributes+2
README.mdAdded+29
config.jsonAdded+18
vicuna-7b-v0-q4_0-embf16.ggufAdded+3
vision/vision_q8b64.onnxAdded+3
vision/vision_q8b64.onnx.dataAdded+3