Skip to content

Commit

Permalink
Added colab demo
Browse files Browse the repository at this point in the history
  • Loading branch information
Maknee committed Jul 23, 2023
1 parent 7c2e660 commit c15fc17
Show file tree
Hide file tree
Showing 2 changed files with 91 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# minigpt4.cpp

<a href='https://huggingface.co/spaces/maknee/minigpt4.cpp'><img src='https://img.shields.io/badge/%F0%9F%A4%97%20Hugging%20Face-Spaces-blue'>
[![Quickstart in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/Maknee/minigpt4.cpp/blob/master/minigpt4/colab_webui.ipynb)

Inference of [MiniGPT4](https://github.com/Vision-CAIR/MiniGPT-4) in pure C/C++.

Expand Down
90 changes: 90 additions & 0 deletions minigpt4/colab_webui.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
{
"cells": [
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"!git clone https://github.com/Maknee/minigpt4.cpp"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"cd minigpt4.cpp/"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"!wget https://github.com/Maknee/minigpt4.cpp/releases/download/release/libminigpt4.so"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"cd minigpt4/"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"!pip install -r requirements.txt"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"!wget https://huggingface.co/datasets/maknee/minigpt4-13b-ggml/resolve/main/minigpt4-13B-f16.bin\n",
"!wget https://huggingface.co/datasets/maknee/ggml-vicuna-v0-quantized/resolve/main/ggml-vicuna-13B-v0-q5_k.bin"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"!python webui.py minigpt4-13B-f16.bin ggml-vicuna-13B-v0-q5_k.bin --share_link=true"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "minigpt4",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.16"
},
"orig_nbformat": 4
},
"nbformat": 4,
"nbformat_minor": 2
}

0 comments on commit c15fc17

Please sign in to comment.