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

Why generate "GGGGG...." ,when the input string is longer than a certain length in GGUF model? #151

Open
hzgdeerHo opened this issue Mar 26, 2024 · 3 comments

Comments

@hzgdeerHo
Copy link

hzgdeerHo commented Mar 26, 2024

TheBloke/deepseek-coder-33B-instruct-GGUF
deepseek-coder-33b-instruct.Q6_K.gguf
when I use llama cpp python to load the model , the model generates endless "GGGG...." ,But It works normally when the input question less than about 1000-2000 words.

   llm = Llama.from_pretrained(
        repo_id=args.model_name_or_path,
        # chat_format="llama-2",
        # chat_format="alpaca", 
        filename="deepseek-coder-33b-instruct.Q6_K.gguf",
        n_ctx=16000,            
        tokenizer=tokenizer,
         n_gpu_layers=-1,
         
        
        verbose=True
    )


    output = llm(
        user_prompt
       ,
        stream=True,
        max_tokens=12000,
        # max_new_tokens=4096,
        # do_sample=False, 
        top_k=50, 
        top_p=0.95,
        # num_return_sequences=1, 
        # eos_token_id=tokenizer.eos_token_id
        # repeat_penalty=1,
        
    )



    for chunk in output:
        delta = chunk['choices'][0]['text']
        print(delta,end='')

        bot_message+=delta
@fubz
Copy link

fubz commented Apr 4, 2024

Just know you are not the only one that experiences this.

@tastypear
Copy link

have a try, turn on flash attention

@anrgct
Copy link

anrgct commented Jul 21, 2024

I encountered the same issue when using LM Studio version 0.2.27. However, when I launched it using text-generation-webui, it worked normally and didn't produce the "GGGG" output even with long context.

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

No branches or pull requests

4 participants