Skip to content
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

moved to llama3.2 and moondream for local compute #54

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

meltyli
Copy link
Contributor

@meltyli meltyli commented Oct 1, 2024

removed groq and now completely relies on ollama for chat

src/loader.py Show resolved Hide resolved
src/loader.py Show resolved Hide resolved
src/loader.py Show resolved Hide resolved
Comment on lines +281 to +290
client = ollama.Client()
chat_completion = client.chat(
messages = [
{
"role": "system",
"content": PROMPT},
{
"role": "user",
"content": json.dumps(doc),
},
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Ollama SDK might not be the greatest tool to use. I'd strongly recommend using LiteLLM as the replacement and then setting the model to ollama/<model>

https://github.com/BerriAI/litellm
https://docs.litellm.ai/docs/providers/ollama

That said, LiteLLM has not updated the model registry to include llama 3.2.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will definitely look into this as I was unaware of it before.

I won't have time to work on this anytime soon, however.

src/loader.py Show resolved Hide resolved
src/loader.py Show resolved Hide resolved
src/loader.py Show resolved Hide resolved
requirements.txt Show resolved Hide resolved
@meltyli
Copy link
Contributor Author

meltyli commented Oct 3, 2024

Besides using LiteLLM instead of Ollama's Python library, it was working on Kubuntu 24.04 (CPU)

I tried running on windows and there were dependency issues (pyyaml iirc). I will try a sandboxed environment for windows later in the week.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants