Instruct - Code Completion
Hi,
I was wondering if Instruct supports code completion? I’ve tried various prompt formats, and while it does seem to perform code completion, it always includes the original code as well.
is there a way to use the tokens to only include the “new code” in the response?
Thank you!
You can try this example,and the instruct model should be used for code completion. https://github.com/deepseek-ai/DeepSeek-Coder#1-code-completion
Thanks I can try this with instruct, the example shows base as the model. Do you know if FIM would work the same? In my testing it seems to struggle a bit. Example:
### Instruction:
<|fim_begin|> const printHelloWorld = () => {} <|fim_hole|> <|fim_end|>
### Response:
<|EOT|>
Outputs this:
\n```javascript\nconst printHelloWorld = () => {\n console.log(\"Hello, World!\");\n};\nprintHelloWorld();\n``` \n
Although the code is correct and complete and it did fill in the middle, it outputs all the code and wraps it with markdown
Instruct model can't support FIM because we don't use FIM task during fine-tuning.
Thanks! I was confused based on this issue: https://github.com/deepseek-ai/DeepSeek-Coder/issues/71#issuecomment-1845563467
But if only base works, I can use that. Appreciate it!
Thanks! I was confused based on this issue: #71 (comment)
But if only base works, I can use that. Appreciate it!
me too
sft model still can work with "<|fim_begin|> const printHelloWorld = () => {} <|fim_hole|> <|fim_end|>", donot add ### instruction.
Instruct model can't support FIM because we don't use FIM task during fine-tuning.
why not use fim format during finetuning? if not use, how to get fim ability?
Instruct model can't support FIM because we don't use FIM task during fine-tuning.
why not use fim format during finetuning? if not use, how to get fim ability?
- Our initial idea was to apply the instruct model in chat scenarios, not in code completion, so we didn't use FIM during the fine-tuning phase. In the next versions, we will consider using FIM during fine-tuning.
- Even if FIM was not used during the finetuning stage, the current instruct model still retains a certain FIM capability, which comes from the pre-training stage. However, not using FIM tasks during the finetuning stage may reduce its FIM capability.
Instruct model can't support FIM because we don't use FIM task during fine-tuning.
why not use fim format during finetuning? if not use, how to get fim ability?
- Our initial idea was to apply the instruct model in chat scenarios, not in code completion, so we didn't use FIM during the fine-tuning phase. In the next versions, we will consider using FIM during fine-tuning.
- Even if FIM was not used during the finetuning stage, the current instruct model still retains a certain FIM capability, which comes from the pre-training stage. However, not using FIM tasks during the finetuning stage may reduce its FIM capability.
i see,thanks
Thanks! I am going to close the issue since this has been answered.