Great question — answering as the UphillTech team:
Your Qwen-2.5 model loops in Ollama might because the runtime setup does not exactly replicate the conditions it was fine-tuned under. Unlike Mistral or Llama, Qwen relies on extra chat tokens and long-context settings; if any of these are missing or renamed when you convert to GGUF or write the Modelfile, the model never sees a valid stop sequence and keeps generating. 5-Point Fix Checklist Chat template Must exactly match the Alpaca (or custom) template you used during fine-tuning. Stop sequences Put every delimiter that appeared in your training data into separate PARAMETER stop lines Special tokens Extra tokens added to the tokenizer vocabulary (e.g. <|im_start|> , <|im_end|> , <eos> ,...
Full answer by 喻楚喬: https://stackoverflow.stackexchange.com/a/79720769 (CC BY-SA 4.0).
Need it done for your business? UphillTech.