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

The generated code has a special mark. <|endoftext|> <|cursor|> #161

Open
gaomeng20241028 opened this issue Nov 13, 2024 · 6 comments
Open

Comments

@gaomeng20241028
Copy link

I use the following template:

prompt_template = "<|fim_prefix|>{prefix}<|fim_suffix|>{suffix}<|fim_middle|>"

@cyente
Copy link
Collaborator

cyente commented Nov 13, 2024

you could simply remove the " <|cursor|>" and end the outputs at the "<|endoftext|>" .

By the way, which model you are using? and could you give as an example of this bad case?

@gaomeng20241028
Copy link
Author

you could simply remove the " <|cursor|>" and end the outputs at the "<|endoftext|>" .

By the way, which model you are using? and could you give as an example of this bad case?

this one, qwen2.5-coder:32b-instruct-q8_0. I use the code completion tool tabby to access the model, and the content of code completion includes " <|cursor|>" and "<|endoftext|>"

@gaomeng20241028
Copy link
Author

微信图片_20241114101159

@cyente
Copy link
Collaborator

cyente commented Nov 14, 2024

you could simply remove the " <|cursor|>" and end the outputs at the "<|endoftext|>" .
By the way, which model you are using? and could you give as an example of this bad case?

this one, qwen2.5-coder:32b-instruct-q8_0. I use the code completion tool tabby to access the model, and the content of code completion includes " <|cursor|>" and "<|endoftext|>"

We recommend using the base model rather than the instruct model for code completion.

@cyente
Copy link
Collaborator

cyente commented Nov 14, 2024

微信图片_20241114101159

Where is your input text located in the picture? and where is the output?

@gaomeng20241028
Copy link
Author

微信图片_20241114101159

Where is your input text located in the picture? and where is the output?

Only output is shown here. Input is a comment. Write a quick line.

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

2 participants