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

使用fim后human eval分数很低? #84

Open
nullxjx opened this issue Dec 26, 2023 · 4 comments
Open

使用fim后human eval分数很低? #84

nullxjx opened this issue Dec 26, 2023 · 4 comments

Comments

@nullxjx
Copy link

nullxjx commented Dec 26, 2023

不使用fim,跑出来的分数跟官方给的比较接近,但是使用fim后分数很低,低了8个点,以下是我使用的fim格式,请问有啥问题吗?

def get_full_prompt(model_name, prompt_prefix, prompt, suffix="\n"):
    """
    get_full_prompt 通过匹配模型名,使用不同的FIM格式来准备prompt
    """
    output = prompt
    if "star-coder" in model_name.lower():
        ...
    elif "deep-seek" in model_name.lower() or "deepseek" in model_name.lower():
        template = Template("<|fim▁begin|>${preprefix}${prefix}<|fim▁hole|>${suffix}<|fim▁end|>")
        output = template.substitute(preprefix=prompt_prefix, prefix=prompt, suffix=suffix)
    else:
        if prompt_prefix:
            output = prompt_prefix + output
    return output
@guoday
Copy link
Collaborator

guoday commented Jan 26, 2024

看起来格式有点问题,请看这个readme
https://github.com/deepseek-ai/DeepSeek-Coder#2-code-insertion

@yiyepiaoling0715
Copy link

看起来格式有点问题,请看这个readme https://github.com/deepseek-ai/DeepSeek-Coder#2-code-insertion

看起来跟官方文档是一致的,他这种 fim格式问题出在哪里?

@guoday
Copy link
Collaborator

guoday commented Feb 29, 2024

"<|fim▁begin|>${preprefix}${prefix}<|fim▁hole|>${suffix}<|fim▁end|>"

"<|fim▁begin|>${prefix}<|fim▁hole|>${suffix}<|fim▁end|>"

看起来格式有点问题,请看这个readme https://github.com/deepseek-ai/DeepSeek-Coder#2-code-insertion

看起来跟官方文档是一致的,他这种 fim格式问题出在哪里?

"<|fim▁begin|>${prefix}<|fim▁hole|>${suffix}<|fim▁end|>" 多了${preprefix}

@yiyepiaoling0715
Copy link

ˇ

低了8个点,

@guoday 这个会有这么大影响么? 模型应该有足够的泛化能力吧

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

3 participants