raglite icon indicating copy to clipboard operation
raglite copied to clipboard

Difficulties when running local LLM backends

Open av opened this issue 1 year ago • 7 comments

Tried raglite chainlit with a few models via Ollama:

OLLAMA_API_BASE=http://ollama:11434
CHAINLIT_HOST=0.0.0.0

raglite
      --llm ollama/llama3.1:8b
      --embedder ollama/mxbai-embed-large:latest
      chainlit

I tried following models:

  • ollama/llama3.1:8b
  • ollama/llama3.2:3b-instruct-q8_0
  • ollama/mistral-small

Ollama context was set to 8k in all instances. All replies in chainlit UI were formatted like this:

Image

av avatar Mar 15 '25 11:03 av

Debugging further:

  • Installed version of litellm is 1.56 despite 1.60 is set in the pyproject
    • Raglite installed with raglite[chainlit,pandoc,ragas]
  • It appears that litellm has issues with tool calls when using ollama and ollama_chat provider with streaming enabled
  • When trying to use Ollama via OpenAI-compatible adapter in litellm - the latter can't serve get_emebedding_dim and get_context_size from _litellm
  • Using openrouter/openai/gpt-4o calls tools as intended

So, it doesn't appear there's a way to use RAGLite with a local Ollama for now

av avatar Mar 15 '25 12:03 av

Thanks for reporting this @av! We'll investigate and see what the best way to resolve this is.

lsorber avatar Mar 15 '25 19:03 lsorber

Upstream issue: https://github.com/BerriAI/litellm/issues/11104

lsorber avatar May 24 '25 16:05 lsorber

Follow-up upstream issue: https://github.com/BerriAI/litellm/issues/11262

lsorber avatar May 30 '25 10:05 lsorber

I verified that this was fixed by https://github.com/BerriAI/litellm/pull/11528, which is part of yesterday's LiteLLM v1.72.3 release. Example usage: raglite --llm ollama_chat/qwen3:8b chainlit (you may need to use /nothink to disable Qwen3's thinking).

You can expect a major v1.0 release this evening or tomorrow morning!

lsorber avatar Jun 11 '25 13:06 lsorber

Update: we released RAGLite v1.0 yesterday!

lsorber avatar Jun 12 '25 08:06 lsorber

This is still happening for me, using @av's Dockerfile

genevera avatar Aug 17 '25 09:08 genevera