[GH-ISSUE #9559] SmolVLM #52746

Open
opened 2026-04-29 00:44:26 -05:00 by GiteaMirror · 5 comments
Owner

Originally created by @razvanab on GitHub (Mar 7, 2025).
Original GitHub issue: https://github.com/ollama/ollama/issues/9559

Please add support for SmolVLM2

HuggingFaceTB/SmolVLM2-2.2B-Instruct

Thank you.

Originally created by @razvanab on GitHub (Mar 7, 2025). Original GitHub issue: https://github.com/ollama/ollama/issues/9559 Please add support for SmolVLM2 [HuggingFaceTB/SmolVLM2-2.2B-Instruct](https://huggingface.co/HuggingFaceTB/SmolVLM2-2.2B-Instruct) Thank you.
GiteaMirror added the model label 2026-04-29 00:44:26 -05:00
Author
Owner

@rphle commented on GitHub (May 29, 2025):

Will ollama eventually support SmolVLM2?

<!-- gh-comment-id:2919833760 --> @rphle commented on GitHub (May 29, 2025): Will ollama eventually support SmolVLM2?
Author
Owner

@HamzaYslmn commented on GitHub (Aug 31, 2025):

ollama run hf.co/ggml-org/SmolVLM2-2.2B-Instruct-GGUF

<!-- gh-comment-id:3240439598 --> @HamzaYslmn commented on GitHub (Aug 31, 2025): ollama run hf.co/ggml-org/SmolVLM2-2.2B-Instruct-GGUF
Author
Owner

@rick-github commented on GitHub (Sep 4, 2025):

https://github.com/ggml-org/llama.cpp/pull/11292

<!-- gh-comment-id:3255892813 --> @rick-github commented on GitHub (Sep 4, 2025): https://github.com/ggml-org/llama.cpp/pull/11292
Author
Owner

@HamzaYslmn commented on GitHub (Oct 8, 2025):

ggml-org/llama.cpp#11292

So what's the solution? Should we not use Smolvlm?

<!-- gh-comment-id:3380727651 --> @HamzaYslmn commented on GitHub (Oct 8, 2025): > [ggml-org/llama.cpp#11292](https://github.com/ggml-org/llama.cpp/pull/11292) So what's the solution? Should we not use Smolvlm?
Author
Owner

@rick-github commented on GitHub (Oct 8, 2025):

Pull the model:

ollama pull hf.co/ggml-org/SmolVLM2-2.2B-Instruct-GGUF:Q4_K_M

Create a Modelfile:

FROM hf.co/ggml-org/SmolVLM2-2.2B-Instruct-GGUF:Q4_K_M
TEMPLATE """<|im_start|>
{{- range $index, $_ := .Messages }}
{{- $last := eq (len (slice $.Messages $index)) 1}}
{{- if eq .Role "system" }}System
{{- else if eq .Role "user" }}User
{{- else if eq .Role "assistant" }}Assistant
{{- else }}{{ .Role }}
{{- end }}
{{- `: ` }}
{{- .Content }}<end_of_utterance>
{{ if and $last (ne .Role "assistant") }}Assistant:
{{ end }}
{{- end -}}
"""

Create the model:

ollama create smolvlm2:2.2b-instruct-q4_K_M

Test it:

$ ollama run smolvlm2:2.2b-instruct-q4_K_M 
>>> hello
Hello! I'm an AI assistant designed to help with programming tasks. You 
can ask me for assistance in writing code, explaining concepts, or 
troubleshooting issues related to programming languages such as Java, 
Python, C++, etc. Let's get started and solve your programming problems 
together! What programming problem or topic would you like to discuss?

>>> describe this image: ./picture.png
Added image './picture.png'
This is a black background image of a white puppy sitting on the edge 
of a brick wall with its head turned slightly away from us, looking 
intently at something outside the frame. The puppy has a red collar 
around its neck and is wearing a bell on it's collar. It has large, 
expressive eyes that seem to be taking in every detail around it. Its 
ears are perked up, showing that it's alert. The puppy's fur is very 
smooth and fluffy. Its position relative to the brick wall suggests 
that it's sitting on an overhang or ledge, perhaps overlooking a 
courtyard or garden area, although this part of the image is slightly 
blurred, so we can't see what lies beyond.

The model sometimes runs off at a tangent (not unusual for small models) so could probably benefit from some closer attention to the Modelfile and parameters.

<!-- gh-comment-id:3381314234 --> @rick-github commented on GitHub (Oct 8, 2025): Pull the model: ``` ollama pull hf.co/ggml-org/SmolVLM2-2.2B-Instruct-GGUF:Q4_K_M ``` Create a Modelfile: ``` FROM hf.co/ggml-org/SmolVLM2-2.2B-Instruct-GGUF:Q4_K_M TEMPLATE """<|im_start|> {{- range $index, $_ := .Messages }} {{- $last := eq (len (slice $.Messages $index)) 1}} {{- if eq .Role "system" }}System {{- else if eq .Role "user" }}User {{- else if eq .Role "assistant" }}Assistant {{- else }}{{ .Role }} {{- end }} {{- `: ` }} {{- .Content }}<end_of_utterance> {{ if and $last (ne .Role "assistant") }}Assistant: {{ end }} {{- end -}} """ ``` Create the model: ``` ollama create smolvlm2:2.2b-instruct-q4_K_M ``` Test it: ```console $ ollama run smolvlm2:2.2b-instruct-q4_K_M >>> hello Hello! I'm an AI assistant designed to help with programming tasks. You can ask me for assistance in writing code, explaining concepts, or troubleshooting issues related to programming languages such as Java, Python, C++, etc. Let's get started and solve your programming problems together! What programming problem or topic would you like to discuss? >>> describe this image: ./picture.png Added image './picture.png' This is a black background image of a white puppy sitting on the edge of a brick wall with its head turned slightly away from us, looking intently at something outside the frame. The puppy has a red collar around its neck and is wearing a bell on it's collar. It has large, expressive eyes that seem to be taking in every detail around it. Its ears are perked up, showing that it's alert. The puppy's fur is very smooth and fluffy. Its position relative to the brick wall suggests that it's sitting on an overhang or ledge, perhaps overlooking a courtyard or garden area, although this part of the image is slightly blurred, so we can't see what lies beyond. ``` The model sometimes runs off at a tangent (not unusual for small models) so could probably benefit from some closer attention to the Modelfile and parameters.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#52746