-
Notifications
You must be signed in to change notification settings - Fork 40
Migrate some examples from Replicate to Ollama #522
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Signed-off-by: Jing Chen <[email protected]>
Signed-off-by: Jing Chen <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In addition to changing the model, if you leave Replicate and use Ollama you should change stop_sequences: '!'
to stop: ['!']
.
If you run Ollama in a terminal you will see that using stop_sequences
with it causes it to log
level=WARN source=types.go:509 msg="invalid option provided" option=stop_sequences
@esnible thanks for pointing this out. I thought we are calling ollama through the LiteLLM interface, which should make the requests OpenAPI compatible. However, I didn't find any example documentation regarding |
@jgchn I also have not found documentation for the differences in parameter passing between OpenAPI, Ollama, and Replicate. So far, the only way I can detect when LiteLLM passing something to Ollama that it doesn't expect is to watch Ollama's logs. It is possible that Ollama returns a warning through the REST interface, which could be caught by a LiteLLM callback, but I haven't found that yet. I strongly recommend setting the temperature to 0 for every example, because we are testing the examples and would like the testing to be as reliable as possible. I have a PR to skip the tests that are currently failing (#538 ). Once this PR goes in, my hope is that we can resume testing more examples. My hope is to have nearly all examples tested. |
@jgchn I introduced a pattern so that we can have default parameters for each model. We have no defaults yet for Ollama/granite-code!!! My feeling is when we identify good defaults for a model we should add them at https://github.com/IBM/prompt-declaration-language/blob/main/src/pdl/pdl_ast.py#L712 so that users do not need to know the best defaults for each model. |
Ah nice I wish these defaults were in the docs! |
Signed-off-by: Jing Chen <[email protected]>
Partially addresses #436 by moving from Replicate to Ollama.