Skip to content

output corruption and token repetition while using llamafile local model #1573

@SaraMashal

Description

@SaraMashal

Describe the bug

I am facing a weird bug when using the LLavA 1.5 model from llamafile.
Everything runs smoothly until the end, then eventually it will take a very long time generating "nobody" multiple time for no reason.

image

Reproduce

  1. install the llamafile model : LLavA 1.5
  2. open it to host the local server, you can follow the instructions here
  3. running this script:
from interpreter import interpreter

interpreter.offline = True

interpreter.llm.model = "openai/LLaMA_CPP"
interpreter.llm.api_key = "fake_key"
interpreter.llm.api_base = "http://localhost:8080/v1"

interpreter.auto_run = True

interpreter.chat("use your python coding skills to know what my current operating system, write it in code block")

Expected behavior

It is supposed to continue running normally or terminate without having the same output repeated many times.

Screenshots

No response

Open Interpreter version

0.4.3

Python version

3.11.2

Operating System name and version

Debian GNU/Linux 12 (bookworm)

Additional context

I have tried another solution using this line of code:

from interpreter import interpreter

interpreter.offline = False

interpreter.llm.model = "openai/LLaMA_CPP"
interpreter.llm.api_key = "fake_key"
interpreter.llm.api_base = "http://localhost:8080/v1"

interpreter.auto_run = True
interpreter.code_output_template = "Code output: {content}\nWhat does this output mean / what's next (if anything, or are we done)?"

interpreter.chat("use your python coding skills to know what my current operating system, write it in code block")
interpreter.loop = True

and I got this corrupted and repeated output as well:
image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions