How do I run Gemma3_270M notebook result in Ollama? #3406
-
|
I went through the entire Gemma3_270M example notebook. As long as I stay in the notebook, I can perform inference successfully. However, when I export it to my local machine and load it into Ollama, no matter what question I ask the model, it always gets stuck in an infinite loop, spitting out nonsense text until I stop it. What do I need to do to be able to run the fine tuning locally in Ollama? Notebook: Steps to reproduce: Download gemma-3-finetune.Q8_0.gguf Download gemma-3-finetune.zip. Unzip gemma-3-finetune.zip. Copy gemma-3-finetune.Q8_0.gguf to gemma-3-finetune.zip. Save response from _ollama_modelfile as Modelfile to gemma-3-finetune directory. Edit Modelfile so that top FROM points to .gguf file without extra path. (FROM gemma-3-finetune.Q8_0.gguf) From gemma-3-finetune folder command prompt: ollama create unsloth_gemma3_model -f Modelfile At this point you can run Ollama and use the unsloth_gemma3_model model. Whatever I ask it, I always get an infinite amount of gibberish, where the model in the notebook works just fine. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
You need to use the exactly same chat template, see: https://docs.unsloth.ai/basics/running-and-saving-models/troubleshooting |
Beta Was this translation helpful? Give feedback.
You need to use the exactly same chat template, see: https://docs.unsloth.ai/basics/running-and-saving-models/troubleshooting