Skip to content

Getting the following error GGML_ASSERT(!grammar->stacks.empty()) failed #30

@nidhinkumar06

Description

@nidhinkumar06

System Info / 系統信息

I have installed the Longwriter and tried running it where i am getting the following error message

GGML_ASSERT(!grammar->stacks.empty()) failed

As well as sometimes i get the response as !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Here is my implmentation using ollama

Who can help? / 谁可以帮助到您?

No response

Information / 问题信息

  • The official example scripts / 官方的示例脚本
  • My own modified scripts / 我自己修改的脚本和任务

Reproduction / 复现过程

Pls find the implmentation code which i have used

`MODEL = "EntropyYue/longwriter-glm4:9b"
client = Client(host="http://xyz.*********")

messages = [
  {"role": "user", "content": "User Question : " + query + "\n\n CONTEXTS :\n\n" + contexts}
]

stream = client.chat(
          model=MODEL,
          messages=messages,
          stream=True,
          options={
            "temperature": 0,
          }
      )

      for chunk in stream:
          # print("chunk is", chunk)
          if chunk["message"]["content"] is not None:
              yield chunk["message"]["content"]

  except Exception as e:
      print(f"Error during get_answer_groq call: {e}")
      yield "data:" + json.dumps(
          {'type': 'error', 'data': "We are currently experiencing some issues. Please try again later."}) + "\n\n"``

### Expected behavior / 期待表现

It should provide the result unfortunately getting the error like GGML_ASSERT(!grammar->stacks.empty()) failed as well as sometimes the response as !!!!!!!!!!!!!!!!!!!!!!!!!!!!

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