LongWriter icon indicating copy to clipboard operation
LongWriter copied to clipboard

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

Open nidhinkumar06 opened this issue 5 months ago • 2 comments

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 / 官方的示例脚本
  • [X] 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 !!!!!!!!!!!!!!!!!!!!!!!!!!!!

nidhinkumar06 avatar Sep 18 '24 11:09 nidhinkumar06