deepseek-ai / DeepSeek-Coder-V2

DeepSeek-Coder-V2: Breaking the Barrier of Closed-Source Models in Code Intelligence
MIT License
2.01k stars 100 forks source link

Any changes on repo level concatenation? #22

Open IQ179 opened 3 months ago

IQ179 commented 3 months ago

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?

guoday commented 3 months ago

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

IQ179 commented 2 months ago

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"?

guoday commented 2 months ago
  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.
IQ179 commented 2 months ago

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.

yiyepiaoling0715 commented 2 months ago
  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 commented 2 months ago
  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

guoday commented 2 months ago

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 commented 2 months ago

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.

guoday commented 2 months ago

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.

yiyepiaoling0715 commented 2 months ago

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?

guoday commented 2 months ago

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.

yiyepiaoling0715 commented 2 months ago

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 commented 2 months ago

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