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
FEATURE REQUEST: Local LLM endpoint integration (like Ollama and OpenAI API compatible) and Docker Container #2
Comments
For 1, you can change the LLM configuration according to https://github.com/stanford-oval/storm?tab=readme-ov-file#customize-the-storm-configurations. For 2, having a Docker release sounds like a good idea. We will consider this. |
for the point 1, it doesn't seem obvious because storm is calling the endpoint /v1/completions and not /v1/chat/completions so direct ollama is out-of-question. Maybe litellm could help. |
Hi @shuther , thanks for the info! Are you willing to help with ollama integration to see whether it's feasible? We develop STORM using dspy and I just found they support ollama in their codebase. New LM integration can be added in |
yes I can help. Today, I am using litellm (through docker) to ollama or the ollama openAI endpoint directly. |
Hi @shuther , thank you so much! I feel we can leverage the effort in https://github.com/stanfordnlp/dspy/blob/main/dsp/modules/ollama.py, though some testing is needed and we may need to create a wrapper instead of directly using it (you can check out examples in When testing Mistral 7B, I found although it's worth than GPT (which is as expected), it can do a pretty good job in the knowledge curation part (i.e., finding and organizing information). That's why I think ollama integration is interesting. |
Ollama provides an openAI compatible endpoint. It could make sense to focus on this one or you have a concern? I was running some tests with mistral and wizardlm2; llama3 may worth a try. |
No concern, this is good. I think https://github.com/stanfordnlp/dspy/blob/main/dsp/modules/ollama.py is also implemented based on it. You may check whether their implementation can directly work or not. If not, we also hope to inherit lm_configs = STORMWikiLMConfigs()
conv_simulator_lm = OllamaModel(...)
question_asker_lm = OllamaModel(...)
outline_gen_lm = OllamaModel(...)
article_gen_lm = OllamaModel(...)
article_polish_lm = OllamaModel(...)
# LM setup.
lm_configs.set_conv_simulator_lm(conv_simulator_lm)
lm_configs.set_question_asker_lm(question_asker_lm)
lm_configs.set_outline_gen_lm(outline_gen_lm)
lm_configs.set_article_gen_lm(article_gen_lm)
lm_configs.set_article_polish_lm(article_polish_lm)
# STORM pipeline setup (independent with LM setup).
engine_args = STORMWikiRunnerArguments(...)
# User / Other functions only need to call runner, and do not need to think about Ollama after they are set up.
runner = STORMWikiRunner(engine_args, lm_configs)
Totally. I only provide an example with Mistral because I haven't got time to configure llama3 yet - but it's really worth a try. |
to run:
Would it be possible to have a startingexample to run run_prewriting.py with ollama/mistral/generic open ai so we can test it further? |
Following my experience above: Then, I received this:
|
@shuther Also, note that the argument |
I checked the logs from you and it doesn't seem to be the case. Is there a way to print more debug statements/logs? |
@shuther Would you mind provide full log of running the command? Also please confirm that you are on the head of main branch. |
I did git pull |
seems like |
I did again a git pull, now it runs but I guess it is not complete:
then I tried
|
Hi @shuther , I haven't met this error before. Looking into your error log, I notice a few things:
|
This is possible, though you need to check its performance. This model is used to retrieve collected information to write each section. Here is an example for how to use
If you want to use https://docs.litellm.ai/docs/providers/ollama instead of https://github.com/ollama/ollama-python, you just need to change the |
so after a git pull again and running:
Maybe I am missing how to use it? |
Based on the log, it seems like the
|
the first description value seems strange? |
This project seems awesome. Thanks for building this.
Would it be possible to:
Thanks!
The text was updated successfully, but these errors were encountered: