DeepSeek-Coder-V2 icon indicating copy to clipboard operation
DeepSeek-Coder-V2 copied to clipboard

Any changes on repo level concatenation?

Open IQ179 opened this issue 1 year ago • 13 comments

In deepseek coder v1, I was able to find a detailed explanation of repo level concat in an issue. Has anything changed from the method used in v1 to v2?

IQ179 avatar Jun 25 '24 04:06 IQ179

V2 switched from topological sorting concatenation to random concatenation mainly because random concatenation is more language-friendly.

guoday avatar Jul 03 '24 05:07 guoday

Thanks for answer. Can I ask few more questions?

  1. Random concatenation means you literally concatenate every file without any order? So it does not have to consider the dependency of functions or class?

  2. I'm not sure what 'language-friendly' means. Does "more language-friendly' mean "more natural", or "more similar to human codes"?

IQ179 avatar Jul 04 '24 02:07 IQ179

  1. Yes, because we believe that randomly concatenating files is more reflective of real-world scenarios. Programmers may not always write dependent functions or classes first; they might complete the logic of main.py first and then implement the code for the dependent files.
  2. Language-friendly refers to being easier to handle. Topological sorting concatenation needs to consider the dependency parsing for each programming language, making it challenging to extend to over 300 languages.

guoday avatar Jul 04 '24 03:07 guoday

Thanks a lot! Then you mean concatenation of codes on their dependency is not that important, right? I thought it was the key to improve the performance in very long codes.

IQ179 avatar Jul 04 '24 07:07 IQ179

  1. complete the logic of main.py

V1 mention, just 4 lang deal by repo-level dependence deal, why V2 not keep the 4 lang in V1? I thought repo-level depend parsing is a key point for the improvement. e.g.
file1: def func_a(a,b): return a,b file2: def main(): c=func_a(1,2) if model learn file2 before file1, model did not know what is func_a, it will memory the func_a(1,2) if model learn file1 before file2, when model lean c=func_a(1,2), because it learn func_a(,b) before,so maybe inspire it's reasoning ability

yiyepiaoling0715 avatar Jul 04 '24 14:07 yiyepiaoling0715

  1. Yes, because we believe that randomly concatenating files is more reflective of real-world scenarios. Programmers may not always write dependent functions or classes first; they might complete the logic of main.py first and then implement the code for the dependent files.
  2. Language-friendly refers to being easier to handle. Topological sorting concatenation needs to consider the dependency parsing for each programming language, making it challenging to extend to over 300 languages.

can you give a explantion for me? am i right with the thought

yiyepiaoling0715 avatar Jul 04 '24 14:07 yiyepiaoling0715

Dependencies between files are important. When randomly concatenating files, some cases may satisfy these dependencies and can help improve the performance in very long codes. Other cases may contribute to the robustness of the model because not all application scenarios provide complete dependencies.

guoday avatar Jul 08 '24 04:07 guoday

so remove file topological graph is not benificial inall? is this confirmed by experiments? the key point of my question is shuffled file has more halluciation case than dependpent files? because i think the biggest advantage of dependent files is hallucation and reasoning

Dependencies between files are important. When randomly concatenating files, some cases may satisfy these dependencies and can help improve the performance in very long codes. Other cases may contribute to the robustness of the model because not all application scenarios provide complete dependencies.

yiyepiaoling0715 avatar Jul 08 '24 10:07 yiyepiaoling0715

so remove file topological graph is not benificial inall? is this confirmed by experiments? the key point of my question is shuffled file has more halluciation case than dependpent files? because i think the biggest advantage of dependent files is hallucation and reasoning

Dependencies between files are important. When randomly concatenating files, some cases may satisfy these dependencies and can help improve the performance in very long codes. Other cases may contribute to the robustness of the model because not all application scenarios provide complete dependencies.

In our experiment, we did not observe significant differences between random ordering and topological sorting on the benchmarks.

guoday avatar Jul 08 '24 10:07 guoday

so remove file topological graph is not benificial inall? is this confirmed by experiments? the key point of my question is shuffled file has more halluciation case than dependpent files? because i think the biggest advantage of dependent files is hallucation and reasoning

Dependencies between files are important. When randomly concatenating files, some cases may satisfy these dependencies and can help improve the performance in very long codes. Other cases may contribute to the robustness of the model because not all application scenarios provide complete dependencies.

In our experiment, we did not observe significant differences between random ordering and topological sorting on the benchmarks.

Why deepdeek coder. V1. Mention. Toplogical. Graph. As. A. Good. Point?

yiyepiaoling0715 avatar Jul 08 '24 16:07 yiyepiaoling0715

so remove file topological graph is not benificial inall? is this confirmed by experiments? the key point of my question is shuffled file has more halluciation case than dependpent files? because i think the biggest advantage of dependent files is hallucation and reasoning

Dependencies between files are important. When randomly concatenating files, some cases may satisfy these dependencies and can help improve the performance in very long codes. Other cases may contribute to the robustness of the model because not all application scenarios provide complete dependencies.

In our experiment, we did not observe significant differences between random ordering and topological sorting on the benchmarks.

Why deepdeek coder. V1. Mention. Toplogical. Graph. As. A. Good. Point?

The Topological Graph is a good way to organize repo-level data, as you believe that "the biggest advantage of dependent files is alleviating hallucination and reasoning." However, based on our current experiments, the improvement of organizing repo-level data using a topological graph compared to random ordering on benchmarks is marginal, with no significant differences. Given the resources required to use topological sorting to parse hundreds of programming languages, random ordering is more efficient.

guoday avatar Jul 09 '24 01:07 guoday

so remove file topological graph is not benificial inall? is this confirmed by experiments? the key point of my question is shuffled file has more halluciation case than dependpent files? because i think the biggest advantage of dependent files is hallucation and reasoning

Dependencies between files are important. When randomly concatenating files, some cases may satisfy these dependencies and can help improve the performance in very long codes. Other cases may contribute to the robustness of the model because not all application scenarios provide complete dependencies.

In our experiment, we did not observe significant differences between random ordering and topological sorting on the benchmarks.

Why deepdeek coder. V1. Mention. Toplogical. Graph. As. A. Good. Point?

The Topological Graph is a good way to organize repo-level data, as you believe that "the biggest advantage of dependent files is alleviating hallucination and reasoning." However, based on our current experiments, the improvement of organizing repo-level data using a topological graph compared to random ordering on benchmarks is marginal, with no significant differences. Given the resources required to use topological sorting to parse hundreds of programming languages, random ordering is more efficient.

thanks,i see

yiyepiaoling0715 avatar Jul 10 '24 11:07 yiyepiaoling0715

so remove file topological graph is not benificial inall? is this confirmed by experiments? the key point of my question is shuffled file has more halluciation case than dependpent files? because i think the biggest advantage of dependent files is hallucation and reasoning

Dependencies between files are important. When randomly concatenating files, some cases may satisfy these dependencies and can help improve the performance in very long codes. Other cases may contribute to the robustness of the model because not all application scenarios provide complete dependencies.

In our experiment, we did not observe significant differences between random ordering and topological sorting on the benchmarks.

Why deepdeek coder. V1. Mention. Toplogical. Graph. As. A. Good. Point?

The Topological Graph is a good way to organize repo-level data, as you believe that "the biggest advantage of dependent files is alleviating hallucination and reasoning." However, based on our current experiments, the improvement of organizing repo-level data using a topological graph compared to random ordering on benchmarks is marginal, with no significant differences. Given the resources required to use topological sorting to parse hundreds of programming languages, random ordering is more efficient.

thanks

yiyepiaoling0715 avatar Jul 23 '24 11:07 yiyepiaoling0715