ollama / ollama-python

Ollama Python library
https://ollama.com
MIT License
2.75k stars 227 forks source link

Add example using seed param to get consistent outputs #26

Open mrkiura opened 5 months ago

mrkiura commented 5 months ago

Updates the examples directory with an example that demonstrates how to reprodduce similar outputs.

mrkiura commented 5 months ago

I appreciate you taking a look.

mxyng commented 5 months ago

Setting seed alone won't achieve reproducible outputs.

The fill-in-middle example sets temperature=0 which is sufficient for generating reproducible outputs.

mrkiura commented 5 months ago

You are right. The temperature here should be zero. I observed little variance between a value of 0 and 0.1.