/MiniGPT-4-colab

Primary LanguageJupyter Notebook

🐣 Please follow me for new updates https://twitter.com/camenduru
🔥 Please join our discord server https://discord.gg/k5BwmmvJJU

🚦 WIP 🚦

🦒 Colab

Colab Info
Open In Colab Pro Colab we need more than 20GB vram 😭

Main Repo

https://github.com/Vision-CAIR/MiniGPT-4

Models License

Model License
https://huggingface.co/lmsys/vicuna-13b-delta-v0 From https://vicuna.lmsys.org: The online demo is a research preview intended for non-commercial use only, subject to the model License of LLaMA, Terms of Use of the data generated by OpenAI, and Privacy Practices of ShareGPT. Please contact us If you find any potential violation. The code is released under the Apache License 2.0.
https://huggingface.co/decapoda-research/llama-13b-hf https://huggingface.co/decapoda-research/llama-13b-hf/blob/main/LICENSE

Output

Screenshot 2023-04-20 182643 Screenshot 2023-04-20 182019

For RunPod

https://runpod.io/gsc?template=9m2wl11ypy&ref=iqi9iy8y

Please copy-paste the code below into a new notebook. (We need more than 20GB vram)

!apt update
!apt-get install git-lfs
!git lfs install

%env HF_HOME=/workspace/cache/huggingface

!git clone -b dev https://github.com/camenduru/minigpt4
!wget https://huggingface.co/ckpt/minigpt4/resolve/main/minigpt4.pth -O /workspace/minigpt4/checkpoint.pth
!wget https://huggingface.co/ckpt/minigpt4/resolve/main/blip2_pretrained_flant5xxl.pth -O /workspace/minigpt4/blip2_pretrained_flant5xxl.pth

!pip install -q salesforce-lavis
!pip install -q bitsandbytes
!pip install -q accelerate
!pip install -q gradio==3.27.0
!pip install -q git+https://github.com/huggingface/transformers -U

%cd /workspace/minigpt4
!python app.py