deepseek-ai / deepseek-ai/DeepSeek-Coder

对DeepSeek-Coder-V2-LIte sft之后输出会带上<|EOT|>然后一直打满

Open
#183 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
24.3k
Forks
2.9k
PR merge metrics
No merged PRs in 30d

Description

对DeepSeek-Coder-V2-LIte sft之后输出会带上<|EOT|>然后一直打满

<|EOT|>
生成的单测代码是:
go
Copy
package init_prompt

import (
"testing"

"github.com/bytedance/mockey"
"github.com/smartystreets/goconvey/convey"
)

func TestGetRuleSkill(t *testing.T) {
// 预期覆盖分支行:18 (行号对应commit b606b43c)
t.Run("cover 18", func(t *testing.T) {
mockey.PatchConvey("case 01", t, func() {
ruleName := "rule1"
expectedSkill := "skill1"
RuleMetaInfos = map[string]*RuleMetaInfo{
ruleName: {
RuleSkill: expectedSkill,
},
}
skill := GetRuleSkill(ruleName)
convey.So(skill, convey.ShouldEqual, expectedSkill)
})
})

// 预期不进入分支
t.Run("no branch", func(t *testing.T) {
mockey.PatchConvey("case 03", t, func() {
ruleName := "rule3"
expectedSkill := ""
RuleMetaInfos = map[string]*RuleMetaInfo{
ruleName: nil,
}
skill := GetRuleSkill(ruleName)
convey.So(skill, convey.ShouldEqual, expectedSkill)
})
})
}

<|EOT|>
<|EOT|>
<|EOT|>
<|EOT|>
<|EOT|>
<|EOT|>
<|EOT|>
<|EOT|>
<|EOT|>
<|EOT|>
<|EOT|>
<|EOT|>
<|EOT|>
<|EOT|>
<|EOT|>
<|tool▁call▁begin|>function<|tool▁sep|>GetRuleSkill
go
Copy
package init_prompt

import (
"testing"

"github.com/bytedance/mockey"
"github.com/smartystreets/goconvey/convey"
)

func TestGetRuleSkill(t *testing.T) {
// 预期覆盖分支行:18 (行号对应commit b606b43c)
t.Run("cover 18", func(t *testing.T) {
mockey.PatchConvey("case 1", t, func() {
// 模拟 RuleMetaInfos 中存在规则名对应的 RuleMetaInfo
RuleMetaInfos = map[string]*RuleMetaInfo{
"rule1": {
RuleSkill: "skill1",
},
}
res := GetRuleSkill("rule1")
convey.So(res, convey.ShouldEqual, "skill1")
})
})

}

<|EOT|>
<|EOT|>
<|tool▁call▁begin|>function<|tool▁sep|>GetRuleSkill
go
Copy
package init_prompt

import (
"testing"

"github.com/bytedance/mockey"
"github.com/smartystreets/goconvey/convey"
)

func TestGetRuleSkill(t *testing.T) {
// 预期覆盖分支行:18 (行号对应commit b606b43c)
t.Run("cover 18", func(t *testing.T) {
mockey.PatchConvey("case 01", t, func() {
ruleName := "rule1"
expectedSkill := "skill1"
RuleMetaInfos = map[string]*RuleMetaInfo{
ruleName: {
RuleSkill: expectedSkill,
},
}
skill := GetRuleSkill(ruleName)
convey.So(skill, convey.ShouldEqual, expectedSkill)
})
})

// 预期不进入分支
t.Run("no branch", func(t *testing.T) {
mockey.PatchConvey("case 02", t, func() {
ruleName := "rule2"
expectedSkill := ""
RuleMetaInfos = map[string]*RuleMetaInfo{
ruleName: {
RuleSkill: expectedSkill,
},
}
skill := GetRuleSkill(ruleName)
convey.So(skill, convey.ShouldEqual, expectedSkill)
})
})
}
<|EOT|>
<|EOT|>
<|tool▁call▁begin|>function<|tool▁sep|>GetRuleSkill
go
Copy
package init_prompt

import (
"testing"

"github.com/bytedance/mockey"
"github.com/smartystreets/goconvey/convey"
)

func TestGetRuleSkill(t *testing.T) {
// 预期覆盖分支行:18 (行号对应commit b606b43c)
t.Run("cover 18", func(t *testing.T) {
mockey.PatchConvey("case 1", t, func() {
// 模拟 RuleMetaInfos 中存在规则名对应的 RuleMetaInfo
RuleMetaInfos = map[string]*RuleMetaInfo{
"rule1": {
RuleSkill: "skill1",
},
}
res := GetRuleSkill("rule1")
convey.So(res, convey.ShouldEqual, "skill1")
})
})

}
<|EOT|>
<|tool▁call▁begin|>function<|tool▁sep|>GetRuleSkill
go
Copy
package init_prompt

import (
"testing"

"github.com/bytedance/mockey"
"github.com/smartystreets/goconvey/convey"
)

func

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.