Skip to content

代码生成和代码补全 #9

@leepengcheng

Description

@leepengcheng

楼主你好,我最近也在研究代码补全.但是发现大部分都是代码生成,二者还是有一些区别的
例如

  • 代码生成

用户输入完整的单词import tensorflow,然后生成后面的as tf
EXP:generate("import tensorflow") > import tensorflow as tf

  • 代码补全

用户输入 import ten,期望模型输出import tensorflow as tf
EXP:completion("import ten") > import tensorflow as tf

实际上 generate("import ten") > import ten_pence(0.01),会生成很多无意义的代码
我偶尔看到有人提到过可以在BPE分词前将 tensorflow这种词打断,但是自己实践后发现效果依然不佳.
想请教下有什么好的方法可以解决这种情况吗?
期待你的回复

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions