[GH-ISSUE #2462] moondream1 model support #63478

Closed
opened 2026-05-03 13:46:58 -05:00 by GiteaMirror · 3 comments
Owner

Originally created by @questsin on GitHub (Feb 12, 2024).
Original GitHub issue: https://github.com/ollama/ollama/issues/2462

how to port the tiny vision model at https://huggingface.co/vikhyatk/moondream1
with Tensor type FP16 using SigLIP, Phi-1.5 and the LLaVa training dataset, to ollama for local ubuntu execution
moondream uses the following python3 libraries

  • accelerate==0.25.0
  • huggingface-hub==0.20.1
  • Pillow==10.1.0
  • torch==2.1.2
  • torchvision==0.16.2
  • transformers==4.36.2
  • einops==0.7.0
  • gradio==4.15.0
  • timm==0.9.12
gh repo clone ollama/ollama
cd ollama
git submodule init
git submodule update llm/llama.cpp

sudo apt install python3.11-venv

python3 -m venv llm/llama.cpp/.venv
source llm/llama.cpp/.venv/bin/activate
pip install -r llm/llama.cpp/requirements.txt

make -C llm/llama.cpp quantize
sudo apt-get install git-lfs
git lfs install
# git clone https://huggingface.co/mistralai/Mistral-7B-Instruct-v0.1 model
git clone https://huggingface.co/vikhyatk/moondream1
git lfs pull

# python3 llm/llama.cpp/convert.py ./model --outtype f16 --outfile converted.bin
python3 llm/llama.cpp/convert-hf-to-gguf.py ./model --outtype f16 --outfile converted.bin

# Error output bellow
# Loading model: model
# Traceback (most recent call last):
#   File "/home/questsin/repo/ollama/llm/llama.cpp/convert-hf-to-gguf.py", line 1612, in <module>
#     main()
#   File "/home/questsin/repo/ollama/llm/llama.cpp/convert-hf-to-gguf.py", line 1593, in main
#     model_instance = model_class(dir_model, ftype_map[args.outtype], fname_out, args.bigendian)
#                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
#   File "/home/questsin/repo/ollama/llm/llama.cpp/convert-hf-to-gguf.py", line 57, in __init__
#     self.model_arch = self._get_model_architecture()
#                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
#   File "/home/questsin/repo/ollama/llm/llama.cpp/convert-hf-to-gguf.py", line 262, in _get_model_architecture
#     raise NotImplementedError(f'Architecture "{arch}" not supported!')
# NotImplementedError: Architecture "Moondream" not supported!
Originally created by @questsin on GitHub (Feb 12, 2024). Original GitHub issue: https://github.com/ollama/ollama/issues/2462 how to port the tiny vision model at https://huggingface.co/vikhyatk/moondream1 with Tensor type FP16 using SigLIP, Phi-1.5 and the LLaVa training dataset, to ollama for local ubuntu execution moondream uses the following python3 libraries - accelerate==0.25.0 - huggingface-hub==0.20.1 - Pillow==10.1.0 - torch==2.1.2 - torchvision==0.16.2 - transformers==4.36.2 - einops==0.7.0 - gradio==4.15.0 - timm==0.9.12 ```bash gh repo clone ollama/ollama cd ollama git submodule init git submodule update llm/llama.cpp sudo apt install python3.11-venv python3 -m venv llm/llama.cpp/.venv source llm/llama.cpp/.venv/bin/activate pip install -r llm/llama.cpp/requirements.txt make -C llm/llama.cpp quantize sudo apt-get install git-lfs git lfs install # git clone https://huggingface.co/mistralai/Mistral-7B-Instruct-v0.1 model git clone https://huggingface.co/vikhyatk/moondream1 git lfs pull # python3 llm/llama.cpp/convert.py ./model --outtype f16 --outfile converted.bin python3 llm/llama.cpp/convert-hf-to-gguf.py ./model --outtype f16 --outfile converted.bin # Error output bellow # Loading model: model # Traceback (most recent call last): # File "/home/questsin/repo/ollama/llm/llama.cpp/convert-hf-to-gguf.py", line 1612, in <module> # main() # File "/home/questsin/repo/ollama/llm/llama.cpp/convert-hf-to-gguf.py", line 1593, in main # model_instance = model_class(dir_model, ftype_map[args.outtype], fname_out, args.bigendian) # ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ # File "/home/questsin/repo/ollama/llm/llama.cpp/convert-hf-to-gguf.py", line 57, in __init__ # self.model_arch = self._get_model_architecture() # ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ # File "/home/questsin/repo/ollama/llm/llama.cpp/convert-hf-to-gguf.py", line 262, in _get_model_architecture # raise NotImplementedError(f'Architecture "{arch}" not supported!') # NotImplementedError: Architecture "Moondream" not supported! ```
Author
Owner

@jmorganca commented on GitHub (Feb 13, 2024):

Merging with #2259

<!-- gh-comment-id:1942059348 --> @jmorganca commented on GitHub (Feb 13, 2024): Merging with #2259
Author
Owner

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

could moondream2 be done too?

<!-- gh-comment-id:1986507624 --> @Kreijstal commented on GitHub (Mar 8, 2024): could moondream2 be done too?
Author
Owner

@Seedmanc commented on GitHub (Jul 5, 2025):

A year passed.

<!-- gh-comment-id:3039069446 --> @Seedmanc commented on GitHub (Jul 5, 2025): A year passed.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#63478