[GH-ISSUE #2259] Add moondream1 vision model #63334

Closed
opened 2026-05-03 13:02:03 -05:00 by GiteaMirror · 9 comments
Owner

Originally created by @thesanju on GitHub (Jan 29, 2024).
Original GitHub issue: https://github.com/ollama/ollama/issues/2259

Originally assigned to: @bmizerany on GitHub.

Originally created by @thesanju on GitHub (Jan 29, 2024). Original GitHub issue: https://github.com/ollama/ollama/issues/2259 Originally assigned to: @bmizerany on GitHub.
GiteaMirror added the model label 2026-05-03 13:02:03 -05:00
Author
Owner

@iplayfast commented on GitHub (Jan 29, 2024):

https://huggingface.co/vikhyatk/moondream1

<!-- gh-comment-id:1915402265 --> @iplayfast commented on GitHub (Jan 29, 2024): https://huggingface.co/vikhyatk/moondream1
Author
Owner

@cryptonicsurfer commented on GitHub (Jan 30, 2024):

I was also hoping to be able to try moondream1 vision model out, but could not find it. Would be great if you could add it to Ollama now with the python package as well! thanks for a great product!

<!-- gh-comment-id:1915994366 --> @cryptonicsurfer commented on GitHub (Jan 30, 2024): I was also hoping to be able to try moondream1 vision model out, but could not find it. Would be great if you could add it to Ollama now with the python package as well! thanks for a great product!
Author
Owner

@duracell80 commented on GitHub (Feb 2, 2024):

+1 for this in Ollama, this would really help speed up a script I'm attempting for the Nemo file manager to add searchable content in the image description field. Nemo can search on that but not keywords yet.

Has anyone seen how low hardware requirements can go for moondream? 2GB VRAM CUDA crapped out with a 1.7GB usage warning and segfaulted on CPU at 7.7GB DDR4. I expect 16GB RAM will be fine but disappointing that 8GB couldn't do it. There are so many 8GB laptops out there, a few soldered in and non-upgradable and it feels like 16GB is being baked in as a general base level. Even if RAM compression could help stabilize these models down at the low end that would be so cool.

<!-- gh-comment-id:1924895569 --> @duracell80 commented on GitHub (Feb 2, 2024): +1 for this in Ollama, this would really help speed up a script I'm attempting for the Nemo file manager to add searchable content in the image description field. Nemo can search on that but not keywords yet. Has anyone seen how low hardware requirements can go for moondream? 2GB VRAM CUDA crapped out with a 1.7GB usage warning and segfaulted on CPU at 7.7GB DDR4. I expect 16GB RAM will be fine but disappointing that 8GB couldn't do it. There are so many 8GB laptops out there, a few soldered in and non-upgradable and it feels like 16GB is being baked in as a general base level. Even if RAM compression could help stabilize these models down at the low end that would be so cool.
Author
Owner

@duracell80 commented on GitHub (Feb 3, 2024):

Ok I tested it in a Python venv on a 12th Gen Intel VivoBook even on battery and it's significantly faster than LLaVA.

Roughly 72 seconds using sample.py vs 5 minutes with LLaVA in Ollama. No GPU, 8 seconds to "load the shards". Again all on battery, i5-1240p, 40GB RAM with 14GB in use.

python sample.py --image /home/user/Pictures/test.jpg --prompt "describe this image"
https://github.com/vikhyat/moondream

Image from this article:
https://www.linkedin.com/pulse/elevating-your-professional-focus-impact-home-justin-brown

"The image features a modern and well-lit home office with a large desk situated in the center of the room. The desk is equipped with a computer monitor, keyboard, and mouse, creating a functional workspace. A chair is placed in front of the desk, providing a comfortable seating option for the user.

In addition to the main desk, there is a bookshelf filled with various books, adding a touch of organization and intellectual ambiance to the room. A potted plant is also present, adding a touch of greenery and life to the office."

<!-- gh-comment-id:1924924589 --> @duracell80 commented on GitHub (Feb 3, 2024): Ok I tested it in a Python venv on a 12th Gen Intel VivoBook even on battery and it's significantly faster than LLaVA. Roughly 72 seconds using sample.py vs 5 minutes with LLaVA in Ollama. No GPU, 8 seconds to "load the shards". Again all on battery, i5-1240p, 40GB RAM with 14GB in use. python sample.py --image /home/user/Pictures/test.jpg --prompt "describe this image" https://github.com/vikhyat/moondream Image from this article: https://www.linkedin.com/pulse/elevating-your-professional-focus-impact-home-justin-brown "The image features a modern and well-lit home office with a large desk situated in the center of the room. The desk is equipped with a computer monitor, keyboard, and mouse, creating a functional workspace. A chair is placed in front of the desk, providing a comfortable seating option for the user. In addition to the main desk, there is a bookshelf filled with various books, adding a touch of organization and intellectual ambiance to the room. A potted plant is also present, adding a touch of greenery and life to the office."
Author
Owner

@questsin commented on GitHub (Feb 16, 2024):

It is worth looking at https://github.com/haotian-liu/LLaVA to reverse engineer

<!-- gh-comment-id:1949112815 --> @questsin commented on GitHub (Feb 16, 2024): It is worth looking at <https://github.com/haotian-liu/LLaVA> to reverse engineer
Author
Owner

@PrasanthChowhan commented on GitHub (Feb 24, 2024):

@duracell80 can you please guide me to run moondream model locally?
When I cloned the repository and tried to run sample.py I got the following error!

image

Am I doing something wrong?

<!-- gh-comment-id:1962253785 --> @PrasanthChowhan commented on GitHub (Feb 24, 2024): @duracell80 can you please guide me to run moondream model locally? When I cloned the repository and tried to run sample.py I got the following error! ![image](https://github.com/ollama/ollama/assets/57288401/92e65830-0556-4047-8a39-b348e61aa57e) Am I doing something wrong?
Author
Owner

@duracell80 commented on GitHub (Feb 24, 2024):

Try this (I did this on Linux Mint 21.3):

#!/bin/bash

CWD=$(pwd)
NME="moondream"
ENV="${NME}-venv"
PTH="${CWD}/${NME}"
APP="${PTH}/${ENV}/app"
BIN="${PTH}/${ENV}/bin"
BIH="${HOME}/.local/bin"
INS="${HOME}/.local/share/oss-models/${NME}"
APH="${INS}/app"

sudo apt install lzma

echo "[i] Installing Moondream from GIT"

if [ -d "${PTH}" ]; then
        cd $NME
        git fetch
        git pull
        cd ../
else
        git clone https://github.com/vikhyat/moondream.git $NME
fi
cd "${PTH}" && chmod +x "${PTH}/sample.py"

echo "[i] Creating Python VENV"
python3.9 -m venv "${PTH}/${ENV}"
source "${BIN}/activate" && mkdir -p "${APP}"

pip install wheel
pip install -r "${PTH}/requirements.txt"

echo "[i] Running a test description ..."
python3 "${PTH}/sample.py" --image="${CWD}/media/test.jpg" --prompt="describe this image"

#deactivate
<!-- gh-comment-id:1962754501 --> @duracell80 commented on GitHub (Feb 24, 2024): Try this (I did this on Linux Mint 21.3): ``` #!/bin/bash CWD=$(pwd) NME="moondream" ENV="${NME}-venv" PTH="${CWD}/${NME}" APP="${PTH}/${ENV}/app" BIN="${PTH}/${ENV}/bin" BIH="${HOME}/.local/bin" INS="${HOME}/.local/share/oss-models/${NME}" APH="${INS}/app" sudo apt install lzma echo "[i] Installing Moondream from GIT" if [ -d "${PTH}" ]; then cd $NME git fetch git pull cd ../ else git clone https://github.com/vikhyat/moondream.git $NME fi cd "${PTH}" && chmod +x "${PTH}/sample.py" echo "[i] Creating Python VENV" python3.9 -m venv "${PTH}/${ENV}" source "${BIN}/activate" && mkdir -p "${APP}" pip install wheel pip install -r "${PTH}/requirements.txt" echo "[i] Running a test description ..." python3 "${PTH}/sample.py" --image="${CWD}/media/test.jpg" --prompt="describe this image" #deactivate ```
Author
Owner

@Kreijstal commented on GitHub (Mar 8, 2024):

Try this (I did this on Linux Mint 21.3):

#!/bin/bash

CWD=$(pwd)
NME="moondream"
ENV="${NME}-venv"
PTH="${CWD}/${NME}"
APP="${PTH}/${ENV}/app"
BIN="${PTH}/${ENV}/bin"
BIH="${HOME}/.local/bin"
INS="${HOME}/.local/share/oss-models/${NME}"
APH="${INS}/app"

sudo apt install lzma

echo "[i] Installing Moondream from GIT"

if [ -d "${PTH}" ]; then
        cd $NME
        git fetch
        git pull
        cd ../
else
        git clone https://github.com/vikhyat/moondream.git $NME
fi
cd "${PTH}" && chmod +x "${PTH}/sample.py"

echo "[i] Creating Python VENV"
python3.9 -m venv "${PTH}/${ENV}"
source "${BIN}/activate" && mkdir -p "${APP}"

pip install wheel
pip install -r "${PTH}/requirements.txt"

echo "[i] Running a test description ..."
python3 "${PTH}/sample.py" --image="${CWD}/media/test.jpg" --prompt="describe this image"

#deactivate

what about moondream2

<!-- gh-comment-id:1986508837 --> @Kreijstal commented on GitHub (Mar 8, 2024): > Try this (I did this on Linux Mint 21.3): > > ``` > #!/bin/bash > > CWD=$(pwd) > NME="moondream" > ENV="${NME}-venv" > PTH="${CWD}/${NME}" > APP="${PTH}/${ENV}/app" > BIN="${PTH}/${ENV}/bin" > BIH="${HOME}/.local/bin" > INS="${HOME}/.local/share/oss-models/${NME}" > APH="${INS}/app" > > sudo apt install lzma > > echo "[i] Installing Moondream from GIT" > > if [ -d "${PTH}" ]; then > cd $NME > git fetch > git pull > cd ../ > else > git clone https://github.com/vikhyat/moondream.git $NME > fi > cd "${PTH}" && chmod +x "${PTH}/sample.py" > > echo "[i] Creating Python VENV" > python3.9 -m venv "${PTH}/${ENV}" > source "${BIN}/activate" && mkdir -p "${APP}" > > pip install wheel > pip install -r "${PTH}/requirements.txt" > > echo "[i] Running a test description ..." > python3 "${PTH}/sample.py" --image="${CWD}/media/test.jpg" --prompt="describe this image" > > #deactivate > ``` what about moondream2
Author
Owner

@bmizerany commented on GitHub (Mar 11, 2024):

@thesanju If you have not had a chance already, do you mind trying https://github.com/ollama/ollama/blob/main/docs/import.md

<!-- gh-comment-id:1989195879 --> @bmizerany commented on GitHub (Mar 11, 2024): @thesanju If you have not had a chance already, do you mind trying https://github.com/ollama/ollama/blob/main/docs/import.md
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#63334