alibaba / Pai-Megatron-Patch
Duplication

Places in code with 6 or more lines that are exactly the same.

Intro
Learn more...
Duplication Overall
system77% (53,670 lines)
dependency graphs: 2D graph | 3D graph | 3D graph (with duplicates)...
Duplication per Extension
py77% (53,670 lines)
Duplication per Component (primary)
megatron_patch79% (36,990 lines)
toolkits76% (16,664 lines)
rlhf1% (16 lines)

Duplication Between Components (50+ lines)

G megatron_patch megatron_patch toolkits toolkits megatron_patch--toolkits 78

Download: SVG DOT (open online Graphviz editor)

Open 2D force graph... Open 3D force graph...

Show more details on duplication between components...
Longest Duplicates
The list of 50 longest duplicates.
See data for all 10,214 duplicates...
Size#FoldersFilesLinesCode
1267 x 2 megatron_patch/model/llava
megatron_patch/model/qwen_vl
39:1870 (100%)
39:1870 (100%)
view
795 x 2 megatron_patch/model/llama2
megatron_patch/model/llava
732:1868 (62%)
731:1867 (62%)
view
795 x 2 megatron_patch/model/llama2
megatron_patch/model/qwen_vl
732:1868 (62%)
731:1867 (62%)
view
726 x 2 megatron_patch/model/llava
megatron_patch/model/mistral
838:1865 (57%)
836:1863 (57%)
view
726 x 2 megatron_patch/model/mistral
megatron_patch/model/qwen_vl
836:1863 (57%)
838:1865 (57%)
view
726 x 2 megatron_patch/model/llama2
megatron_patch/model/mistral
839:1866 (57%)
836:1863 (57%)
view
651 x 2 megatron_patch/model/deepseek_v2/moe
megatron_patch/model/mixtral/moe
16:832 (100%)
16:833 (100%)
view
481 x 2 megatron_patch/model/falcon
megatron_patch/model/falcon40b
29:696 (100%)
29:696 (100%)
view
463 x 2 megatron_patch/model/baichuan2
megatron_patch/model/qwen
1225:1863 (36%)
1167:1805 (37%)
view
452 x 2 megatron_patch/model/qwen2_vl
megatron_patch/model/qwen2_vl
114:744 (87%)
113:743 (88%)
view
442 x 2 megatron_patch/model/llama2
megatron_patch/model/qwen1_5_megablocks
30:651 (100%)
29:650 (100%)
view
416 x 2 megatron_patch/model/baichuan2
megatron_patch/model/qwen
56:644 (95%)
46:633 (97%)
view
387 x 2 megatron_patch/model/llama3/transformer
megatron_patch/model/qwen1_5/transformer
26:595 (100%)
26:595 (100%)
view
386 x 2 megatron_patch/model/mistral
megatron_patch/model/qwen_vl
39:616 (30%)
39:616 (30%)
view
386 x 2 megatron_patch/model/llava
megatron_patch/model/mistral
39:616 (30%)
39:616 (30%)
view
377 x 2 megatron_patch/model/falcon40b
megatron_patch/model/llama
29:558 (78%)
29:558 (76%)
view
377 x 2 megatron_patch/model/falcon
megatron_patch/model/llama
29:558 (78%)
29:558 (76%)
view
319 x 2 megatron_patch/model/baichuan2
megatron_patch/model/llava
1225:1652 (25%)
1224:1651 (25%)
view
319 x 2 megatron_patch/model/qwen
megatron_patch/model/qwen_vl
1167:1594 (26%)
1224:1651 (25%)
view
319 x 2 megatron_patch/model/llama2
megatron_patch/model/qwen
1225:1652 (25%)
1167:1594 (26%)
view
319 x 2 megatron_patch/model/baichuan2
megatron_patch/model/mistral
1225:1652 (25%)
1222:1649 (25%)
view
319 x 2 megatron_patch/model/mistral
megatron_patch/model/qwen
1222:1649 (25%)
1167:1594 (26%)
view
319 x 2 megatron_patch/model/baichuan2
megatron_patch/model/llama2
1225:1652 (25%)
1225:1652 (25%)
view
319 x 2 megatron_patch/model/baichuan2
megatron_patch/model/qwen_vl
1225:1652 (25%)
1224:1651 (25%)
view
319 x 2 megatron_patch/model/llava
megatron_patch/model/qwen
1224:1651 (25%)
1167:1594 (26%)
view
284 x 2 megatron_patch/model/llama2
megatron_patch/model/qwen
147:572 (22%)
141:566 (23%)
view
269 x 2 megatron_patch/model/llama2
megatron_patch/model/qwen1_5_megablocks
574:962 (21%)
465:852 (23%)
view
257 x 2 megatron_patch/model/llama3
megatron_patch/model/qwen
1172:1514 (20%)
1156:1498 (21%)
view
250 x 2 megatron_patch/model/llama2
megatron_patch/model/llama3
1225:1556 (19%)
1183:1514 (20%)
view
250 x 2 megatron_patch/model/llama3
megatron_patch/model/qwen_vl
1183:1514 (20%)
1224:1555 (19%)
view
250 x 2 megatron_patch/model/llama3
megatron_patch/model/llava
1183:1514 (20%)
1224:1555 (19%)
view
250 x 2 megatron_patch/model/baichuan2
megatron_patch/model/llama3
1225:1556 (19%)
1183:1514 (20%)
view
250 x 2 megatron_patch/model/llama3
megatron_patch/model/mistral
1183:1514 (20%)
1222:1553 (19%)
view
244 x 2 megatron_patch/model/llava
megatron_patch/model/qwen
845:1205 (19%)
791:1151 (20%)
view
244 x 2 megatron_patch/model/qwen
megatron_patch/model/qwen_vl
791:1151 (20%)
845:1205 (19%)
view
244 x 2 megatron_patch/model/llama2
megatron_patch/model/qwen
846:1206 (19%)
791:1151 (20%)
view
244 x 2 megatron_patch/model/mistral
megatron_patch/model/qwen
843:1203 (19%)
791:1151 (20%)
view
242 x 2 megatron_patch/model/llama2
megatron_patch/model/qwen_vl
39:391 (19%)
39:391 (19%)
view
242 x 2 megatron_patch/model/llama2
megatron_patch/model/mistral
39:391 (19%)
39:391 (19%)
view
242 x 2 megatron_patch/model/llama2
megatron_patch/model/llava
39:391 (19%)
39:391 (19%)
view
237 x 2 megatron_patch/model/qwen1_5/transformer
megatron_patch/model/qwen2/transformer
26:382 (61%)
22:378 (60%)
view
237 x 2 megatron_patch/model/llama3/transformer
megatron_patch/model/qwen2/transformer
26:382 (61%)
22:378 (60%)
view
223 x 2 megatron_patch/model/llama2
megatron_patch/model/qwen
30:369 (50%)
30:369 (52%)
view
223 x 2 megatron_patch/model/qwen
megatron_patch/model/qwen1_5_megablocks
30:369 (52%)
29:368 (50%)
view
222 x 2 megatron_patch/model/mistral
megatron_patch/model/qwen1_5_megablocks
981:1288 (17%)
868:1175 (19%)
view
222 x 2 megatron_patch/model/qwen1_5_megablocks
megatron_patch/model/qwen_vl
868:1175 (19%)
983:1290 (17%)
view
222 x 2 megatron_patch/model/llava
megatron_patch/model/qwen1_5_megablocks
983:1290 (17%)
868:1175 (19%)
view
222 x 2 megatron_patch/model/llama2
megatron_patch/model/qwen1_5_megablocks
984:1291 (17%)
868:1175 (19%)
view
215 x 2 megatron_patch/model/mistral
megatron_patch/model/qwen
31:360 (47%)
30:359 (50%)
view
215 x 2 megatron_patch/model/mistral
megatron_patch/model/qwen1_5_megablocks
31:360 (47%)
29:358 (48%)
view
Duplicated Units
The list of top 24 duplicated units.
See data for all 24 unit duplicates...
Size#FoldersFilesLinesCode
349 x 2 megatron_patch/model/mixtral/moe
megatron_patch/model/deepseek_v2/moe
0:0 
0:0 
view
192 x 6 megatron_patch/model/llava
megatron_patch/model/mistral
megatron_patch/model/baichuan2
megatron_patch/model/qwen_vl
megatron_patch/model/llama2
megatron_patch/model/qwen
0:0 
0:0 
0:0 
0:0 
0:0 
0:0 
view
134 x 2 toolkits/model_checkpoints_convertor/qwen
toolkits/model_checkpoints_convertor/qwen
0:0 
0:0 
view
100 x 2 toolkits/model_checkpoints_convertor/qwen
toolkits/model_checkpoints_convertor/qwen
0:0 
0:0 
view
102 x 3 megatron_patch/model/mixtral/transformer
megatron_patch/model/deepseek_v2
megatron_patch/model/qwen2/transformer
0:0 
0:0 
0:0 
view
91 x 2 megatron_patch/model/qwen1_5_megablocks
megatron_patch/model/llama2
0:0 
0:0 
view
89 x 2 megatron_patch/model/baichuan2
megatron_patch/model/qwen
0:0 
0:0 
view
77 x 3 megatron_patch/model/falcon40b
megatron_patch/model/galactica
megatron_patch/model/falcon
0:0 
0:0 
0:0 
view
60 x 3 megatron_patch/model/qwen2_vl
megatron_patch/model/qwen2_vl
megatron_patch/model/mixtral/transformer
0:0 
0:0 
0:0 
view
59 x 2 megatron_patch/model/qwen1_5/transformer
megatron_patch/model/llama3/transformer
0:0 
0:0 
view
58 x 2 megatron_patch/model/mixtral
megatron_patch/model/mixtral_bak
0:0 
0:0 
view
36 x 2 megatron_patch/model/mixtral
megatron_patch/model/mixtral_bak
0:0 
0:0 
view
23 x 4 megatron_patch/model/falcon40b
megatron_patch/model/galactica
megatron_patch/model/llama
megatron_patch/model/falcon
0:0 
0:0 
0:0 
0:0 
view
23 x 2 megatron_patch/model/mixtral/moe
megatron_patch/model/deepseek_v2/moe
0:0 
0:0 
view
25 x 2 megatron_patch/model/qwen1_5/transformer
megatron_patch/model/llama3/transformer
0:0 
0:0 
view
25 x 2 megatron_patch/model/qwen1_5_megablocks
megatron_patch/model/llama2
0:0 
0:0 
view
21 x 2 megatron_patch/model/qwen2_vl
megatron_patch/model/qwen2_5_vl
0:0 
0:0 
view
20 x 8 megatron_patch/model/llava
megatron_patch/model/qwen1_5_megablocks
megatron_patch/model/mistral
megatron_patch/model/baichuan
megatron_patch/model/qwen_vl
megatron_patch/model/llama2
megatron_patch/model/llama3
megatron_patch/model/qwen
0:0 
0:0 
0:0 
0:0 
0:0 
0:0 
0:0 
0:0 
view
23 x 2 megatron_patch/model/llava
megatron_patch/model/llama
0:0 
0:0 
view
19 x 2 megatron_patch/model/glm130b
megatron_patch/model/bloom
0:0 
0:0 
view
24 x 2 megatron_patch/model/mixtral_bak/moe
megatron_patch/model/qwen1_5/moe
0:0 
0:0 
view
17 x 2 toolkits/model_checkpoints_convertor/baichuan
toolkits/model_checkpoints_convertor/baichuan2
0:0 
0:0 
view
16 x 2 megatron_patch/tokenizer
megatron_patch/tokenizer
0:0 
0:0 
view
13 x 2 megatron_patch/model/qwen1_5
megatron_patch/model/llama3
0:0 
0:0 
view