File size: 21,305 Bytes
a0299eb
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3a12212
a0299eb
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3a12212
 
a0299eb
 
 
 
 
 
 
3a12212
 
a0299eb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
{
  "schema": "qfs.upstream-code-audit.v1",
  "upstream": {
    "repository": "moonshotai/Kimi-K3",
    "revision": "f831ab66814297da540d832a5235f8e904f29d06"
  },
  "executed_during_audit": false,
  "weights_downloaded": false,
  "files": [
    {
      "file": "configuration_kimi_k3.py",
      "sha256": "735eb9ebe593e17d231e08e1df7f7be9b5ee0e079f511aa201f9572077b416ae",
      "bytes": 11343,
      "imports": [
        {
          "line": 1,
          "statement": "from typing import Optional"
        },
        {
          "line": 3,
          "statement": "from transformers.configuration_utils import PretrainedConfig"
        }
      ],
      "effect_related_calls": [],
      "top_level_nodes": []
    },
    {
      "file": "encoding_k3.py",
      "sha256": "49ff03305fdc4be26867972788d36150b67f8a9e852e62bb7959d87482223676",
      "bytes": 26304,
      "imports": [
        {
          "line": 9,
          "statement": "from __future__ import annotations"
        },
        {
          "line": 11,
          "statement": "import json"
        },
        {
          "line": 12,
          "statement": "from dataclasses import dataclass"
        },
        {
          "line": 13,
          "statement": "from typing import Any, Iterable, Optional"
        }
      ],
      "effect_related_calls": [
        {
          "line": 498,
          "call": "_open_tag"
        },
        {
          "line": 526,
          "call": "_open_tag"
        },
        {
          "line": 577,
          "call": "_open_tag"
        },
        {
          "line": 519,
          "call": "_open_tag"
        },
        {
          "line": 532,
          "call": "_open_tag"
        },
        {
          "line": 626,
          "call": "_internal_system_message"
        },
        {
          "line": 706,
          "call": "_internal_system_message"
        },
        {
          "line": 725,
          "call": "_internal_system_message"
        },
        {
          "line": 746,
          "call": "_open_tag"
        },
        {
          "line": 747,
          "call": "_open_tag"
        },
        {
          "line": 536,
          "call": "_open_tag"
        },
        {
          "line": 648,
          "call": "_open_tag"
        },
        {
          "line": 714,
          "call": "_internal_system_message"
        },
        {
          "line": 735,
          "call": "_internal_system_message"
        },
        {
          "line": 541,
          "call": "_open_tag"
        },
        {
          "line": 547,
          "call": "_open_tag"
        },
        {
          "line": 658,
          "call": "_open_tag"
        },
        {
          "line": 680,
          "call": "_open_tag"
        },
        {
          "line": 694,
          "call": "_open_tag"
        }
      ],
      "top_level_nodes": [
        {
          "line": 1,
          "code": "'Kimi K3 XTML encoding helpers.\\n\\nThis module keeps chat rendering in Python.\\nCallers that need token IDs should consume ``EncodeSegment`` objects directly:\\nstructural markers may be encoded as tiktoken special tokens, while user/tool\\ntext and attribute values are encoded as ordinary text.\\n'"
        },
        {
          "line": 15,
          "code": "OPEN_TOKEN = '<|open|>'"
        },
        {
          "line": 16,
          "code": "CLOSE_TOKEN = '<|close|>'"
        },
        {
          "line": 17,
          "code": "SEP_TOKEN = '<|sep|>'"
        },
        {
          "line": 18,
          "code": "END_OF_MSG_TOKEN = '<|end_of_msg|>'"
        },
        {
          "line": 19,
          "code": "IMAGE_PLACEHOLDER = '<|kimi_image_placeholder|>'"
        },
        {
          "line": 21,
          "code": "_VALID_THINKING_EFFORTS = {'low', 'high', 'max'}"
        },
        {
          "line": 193,
          "code": "XtmlArgument = tuple[str, str, str]"
        }
      ]
    },
    {
      "file": "kimi_k3_processor.py",
      "sha256": "ec9f7e86d2ab0eee07a8e7e7c037046e77ac3c25a710ad1298ec13be3b585b54",
      "bytes": 7660,
      "imports": [
        {
          "line": 7,
          "statement": "from transformers.feature_extraction_utils import BatchFeature"
        },
        {
          "line": 8,
          "statement": "from transformers.processing_utils import ProcessorMixin"
        },
        {
          "line": 9,
          "statement": "from transformers.utils import logging"
        },
        {
          "line": 11,
          "statement": "from .media_utils import ensure_media_type"
        }
      ],
      "effect_related_calls": [],
      "top_level_nodes": [
        {
          "line": 1,
          "code": "\"Kimi-K3 processor: wraps vision processor + tokenizer into a single interface.\\n\\nChat rendering (including XTML tool-result ordering) is handled by the\\ntokenizer's Python encoder; this processor adds multimodal media preprocessing.\\n\""
        },
        {
          "line": 13,
          "code": "logger = logging.get_logger(__name__)"
        }
      ]
    },
    {
      "file": "kimi_k3_vision_processing.py",
      "sha256": "d122b30bfd3a51a6f05d4bfcfda1e657827322b1353f7caefeebc2835d7736b5",
      "bytes": 6686,
      "imports": [
        {
          "line": 4,
          "statement": "import json"
        },
        {
          "line": 5,
          "statement": "from typing import Any, Dict, Optional, Union"
        },
        {
          "line": 7,
          "statement": "import numpy as np"
        },
        {
          "line": 8,
          "statement": "import torch"
        },
        {
          "line": 9,
          "statement": "from PIL import Image"
        },
        {
          "line": 10,
          "statement": "from transformers.image_processing_utils import BaseImageProcessor, BatchFeature"
        },
        {
          "line": 12,
          "statement": "from transformers.utils import TensorType"
        },
        {
          "line": 14,
          "statement": "from .media_utils import MediaInput, TransparentBgConfig, _to_tensor, ensure_media_type, image_to_np, navit_patchify, navit_resize_image, normalize"
        }
      ],
      "effect_related_calls": [
        {
          "line": 170,
          "call": "config_dict.copy"
        }
      ],
      "top_level_nodes": [
        {
          "line": 1,
          "code": "'Image processor class for Kimi-K3.\\n'"
        }
      ]
    },
    {
      "file": "media_utils.py",
      "sha256": "78403540328f9847d6b7ebc5c44eb2e6a752863de0afb7d0710728bb161dc60d",
      "bytes": 13844,
      "imports": [
        {
          "line": 1,
          "statement": "import base64"
        },
        {
          "line": 2,
          "statement": "import functools"
        },
        {
          "line": 3,
          "statement": "import io"
        },
        {
          "line": 4,
          "statement": "import math"
        },
        {
          "line": 5,
          "statement": "from dataclasses import dataclass"
        },
        {
          "line": 6,
          "statement": "from typing import Literal, TypedDict"
        },
        {
          "line": 8,
          "statement": "import numpy as np"
        },
        {
          "line": 9,
          "statement": "from PIL import Image"
        },
        {
          "line": 361,
          "statement": "import torch"
        }
      ],
      "effect_related_calls": [
        {
          "line": 182,
          "call": "Image.open"
        },
        {
          "line": 184,
          "call": "Image.open"
        },
        {
          "line": 186,
          "call": "Image.open"
        }
      ],
      "top_level_nodes": [
        {
          "line": 17,
          "code": "MediaInput = ImageInput"
        }
      ]
    },
    {
      "file": "modeling_kimi_k3.py",
      "sha256": "b9171c96726eda55234c92ac8dfae7e24c512fda68968ae8f2c3782b42665ea2",
      "bytes": 53444,
      "imports": [
        {
          "line": 25,
          "statement": "import math"
        },
        {
          "line": 26,
          "statement": "from collections.abc import Sequence"
        },
        {
          "line": 27,
          "statement": "from copy import deepcopy"
        },
        {
          "line": 28,
          "statement": "from typing import Optional"
        },
        {
          "line": 30,
          "statement": "import numpy as np"
        },
        {
          "line": 31,
          "statement": "import torch"
        },
        {
          "line": 32,
          "statement": "import torch.nn as nn"
        },
        {
          "line": 33,
          "statement": "import torch.nn.functional as F"
        },
        {
          "line": 34,
          "statement": "from transformers import activations"
        },
        {
          "line": 42,
          "statement": "from transformers.activations import PytorchGELUTanh"
        },
        {
          "line": 43,
          "statement": "from transformers.configuration_utils import PretrainedConfig"
        },
        {
          "line": 44,
          "statement": "from transformers.modeling_utils import PreTrainedModel"
        },
        {
          "line": 45,
          "statement": "from transformers.models.llava.modeling_llava import LlavaCausalLMOutputWithPast"
        },
        {
          "line": 47,
          "statement": "from transformers.utils import is_flash_attn_2_available"
        },
        {
          "line": 49,
          "statement": "from .configuration_kimi_k3 import KimiK3Config"
        },
        {
          "line": 50,
          "statement": "from .modeling_kimi_linear import KimiLinearForCausalLM"
        },
        {
          "line": 37,
          "statement": "from transformers.activations import PytorchGELUTanh"
        },
        {
          "line": 54,
          "statement": "from flash_attn import flash_attn_varlen_func"
        },
        {
          "line": 39,
          "statement": "from transformers.activations import GELUTanh"
        }
      ],
      "effect_related_calls": [
        {
          "line": 658,
          "call": "deepcopy"
        }
      ],
      "top_level_nodes": [
        {
          "line": 36,
          "code": "try:\n    from transformers.activations import PytorchGELUTanh\nexcept ImportError:\n    from transformers.activations import GELUTanh\n    activations.PytorchGELUTanh = GELUTanh\n    PytorchGELUTanh = GELUTanh"
        },
        {
          "line": 53,
          "code": "if is_flash_attn_2_available():\n    from flash_attn import flash_attn_varlen_func\nelse:\n    flash_attn_varlen_func = None"
        },
        {
          "line": 136,
          "code": "VL_VISION_ATTENTION_FUNCTIONS = {'flash_attention_2': multihead_attention, 'eager': eager_attention}"
        }
      ]
    },
    {
      "file": "modeling_kimi_linear.py",
      "sha256": "9e3564c70ac21854ce5a090cc946c5dc76b70d1050ef50840449181a20fff44a",
      "bytes": 51506,
      "imports": [
        {
          "line": 24,
          "statement": "import math"
        },
        {
          "line": 25,
          "statement": "from collections.abc import Callable"
        },
        {
          "line": 26,
          "statement": "from typing import Any"
        },
        {
          "line": 28,
          "statement": "import torch"
        },
        {
          "line": 29,
          "statement": "import torch.nn.functional as F"
        },
        {
          "line": 30,
          "statement": "import transformers"
        },
        {
          "line": 31,
          "statement": "from einops import rearrange"
        },
        {
          "line": 32,
          "statement": "from packaging import version"
        },
        {
          "line": 33,
          "statement": "from torch import nn"
        },
        {
          "line": 34,
          "statement": "from transformers.activations import ACT2FN"
        },
        {
          "line": 35,
          "statement": "from transformers.cache_utils import Cache"
        },
        {
          "line": 36,
          "statement": "from transformers.generation import GenerationMixin"
        },
        {
          "line": 37,
          "statement": "from transformers.masking_utils import create_causal_mask"
        },
        {
          "line": 38,
          "statement": "from transformers.modeling_flash_attention_utils import FlashAttentionKwargs"
        },
        {
          "line": 39,
          "statement": "from transformers.modeling_outputs import BaseModelOutputWithPast, CausalLMOutputWithPast"
        },
        {
          "line": 40,
          "statement": "from transformers.modeling_utils import ALL_ATTENTION_FUNCTIONS, PreTrainedModel"
        },
        {
          "line": 41,
          "statement": "from transformers.processing_utils import Unpack"
        },
        {
          "line": 42,
          "statement": "from transformers.pytorch_utils import ALL_LAYERNORM_LAYERS"
        },
        {
          "line": 43,
          "statement": "from transformers.utils import TransformersKwargs, auto_docstring, can_return_tuple, logging"
        },
        {
          "line": 44,
          "statement": "from transformers.utils.generic import OutputRecorder, check_model_inputs"
        },
        {
          "line": 55,
          "statement": "from .configuration_kimi_k3 import KimiLinearConfig"
        },
        {
          "line": 47,
          "statement": "from fla.modules import FusedRMSNormGated, ShortConvolution"
        },
        {
          "line": 48,
          "statement": "from fla.ops.kda import chunk_kda, fused_recurrent_kda"
        },
        {
          "line": 50,
          "statement": "from fla.ops.utils.index import prepare_cu_seqlens_from_mask, prepare_lens_from_mask"
        },
        {
          "line": 51,
          "statement": "from fla.utils import tensor_cache"
        },
        {
          "line": 699,
          "statement": "import torch.nn.init as init"
        }
      ],
      "effect_related_calls": [],
      "top_level_nodes": [
        {
          "line": 46,
          "code": "try:\n    from fla.modules import FusedRMSNormGated, ShortConvolution\n    from fla.ops.kda import chunk_kda, fused_recurrent_kda\n    from fla.ops.utils.index import prepare_cu_seqlens_from_mask, prepare_lens_from_mask\n    from fla.utils import tensor_cache\nexcept ImportError:\n    raise ImportError('Plese run `pip install -U fla-core`')"
        },
        {
          "line": 57,
          "code": "assert version.parse(transformers.__version__) >= version.parse('4.56.0'), 'Please upgrade transformers to >= 4.56.0'"
        },
        {
          "line": 60,
          "code": "logger = logging.get_logger(__name__)"
        },
        {
          "line": 85,
          "code": "ACT2FN['situ'] = SituAndMul"
        },
        {
          "line": 239,
          "code": "ALL_LAYERNORM_LAYERS.append(KimiRMSNorm)"
        }
      ]
    },
    {
      "file": "tokenization_kimi.py",
      "sha256": "f28ea66e2d862a2a5814970b2ce40c2f7d8296ff09aed90a7e7def689b906944",
      "bytes": 16145,
      "imports": [
        {
          "line": 1,
          "statement": "import os"
        },
        {
          "line": 2,
          "statement": "from logging import getLogger"
        },
        {
          "line": 3,
          "statement": "from pathlib import Path"
        },
        {
          "line": 4,
          "statement": "from shutil import copyfile"
        },
        {
          "line": 5,
          "statement": "from typing import Dict, Iterator, List, Optional, Tuple, Union, cast"
        },
        {
          "line": 7,
          "statement": "import tiktoken"
        },
        {
          "line": 8,
          "statement": "from tiktoken.load import load_tiktoken_bpe"
        },
        {
          "line": 9,
          "statement": "from tokenizers import AddedToken"
        },
        {
          "line": 10,
          "statement": "from transformers.convert_slow_tokenizer import bytes_to_unicode"
        },
        {
          "line": 11,
          "statement": "from transformers.tokenization_utils import PreTrainedTokenizer"
        },
        {
          "line": 14,
          "statement": "from .encoding_k3 import build_chat_segments, is_batched_conversation"
        },
        {
          "line": 16,
          "statement": "from encoding_k3 import build_chat_segments, is_batched_conversation"
        }
      ],
      "effect_related_calls": [
        {
          "line": 99,
          "call": "load_tiktoken_bpe"
        },
        {
          "line": 353,
          "call": "copyfile"
        }
      ],
      "top_level_nodes": [
        {
          "line": 13,
          "code": "try:\n    from .encoding_k3 import build_chat_segments, is_batched_conversation\nexcept ImportError:\n    from encoding_k3 import build_chat_segments, is_batched_conversation"
        },
        {
          "line": 18,
          "code": "logger = getLogger(__name__)"
        },
        {
          "line": 19,
          "code": "VOCAB_FILES_NAMES = {'vocab_file': 'tiktoken.model'}"
        }
      ]
    }
  ],
  "license": "Kimi K3 License for Moonshot code with Apache-2.0 adapted portions; FLA reference adaptations MIT. All three license texts retained.",
  "import_time_effects": [
    "Imports Python/NumPy/Torch/Transformers; upstream K3 hard imports FLA and imports/registry-mutates ACT2FN and ALL_LAYERNORM_LAYERS.",
    "Upstream processor/tokenizer closure is not used by fixture: byte tokenizer is authored independently. tiktoken load_tiktoken_bpe can read local or remote vocabulary at tokenizer construction. media_utils reads image filenames/data on explicit invocation, not import.",
    "No subprocess, shell, eval/exec, socket, network request, or model-weight load found in upstream module import-time statements. Decorators and dependency imports execute library initialization. This is source review, not sandboxing."
  ],
  "runtime_scope": "Four-file patched full Kimi K3 wrapper closure plus installed torch/numpy/transformers. CPU reference math replaces FLA imports entirely; no lazy or eager GPU dependency imports from text runtime. Vision keeps conditional flash-attn import and executes original eager or true Torch SDPA attention on CPU, according to the actual loaded backend.",
  "network_policy": "No upstream model weights fetched. Custom capture explicitly permits pinned code metadata/download from the selected private model repo; local model weights. Not entirely offline capture. Comparison independent of code and GPU.",
  "patch_provenance": "runtime-patches.json; cpu_reference.py; reference/pin.json",
  "review_limitations": "Static source review is not a security guarantee. Dependency implementations belong to the pinned environment. Main must run all runtime checks before release.",
  "reference_sources": {
    "LICENSE": {
      "sha256": "41a83c8187efc1e3ccc21909e806a9e52338e69448554d9754706c3d1cd610e7",
      "bytes": 1096
    },
    "convolution.py": {
      "sha256": "2ab60fc508097457a2ad01dd1f6602ed7e1b47d8a2468949944402b7d5451b8a",
      "bytes": 1194
    },
    "fused_norm_gate.py": {
      "sha256": "109de719d6f9b4e692e3fd504eda4a6e897156c8dc9ac464a6f94193fa94d677",
      "bytes": 40532
    },
    "gate.py": {
      "sha256": "7ea46d62149b8e28e0827e070fee327576de783cb981e3b855182f2b8198c16e",
      "bytes": 15758
    },
    "l2norm.py": {
      "sha256": "5160cc4ff716c9975c655b81fd0e1bae700501dff3b4d6b045680a93185a1e99",
      "bytes": 7792
    },
    "naive.py": {
      "sha256": "60a32285d4b67068ff633b48bbe8ab31028066d24f00d27e12199a88fc73f016",
      "bytes": 6339
    },
    "pin.json": {
      "sha256": "b99a0f4427f07729fc1bde070e48a1814c395f413a8103ff6828cb36bd94ca47",
      "bytes": 111
    },
    "short_conv.py": {
      "sha256": "e2ee319f11b0421545ea5eaa233f12f91e6904ce3dba83cee04a4b25110e6afe",
      "bytes": 10389
    }
  },
  "patched_runtime_sources": {
    "__init__.py": {
      "sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
      "bytes": 0
    },
    "configuration_kimi_k3.py": {
      "sha256": "735eb9ebe593e17d231e08e1df7f7be9b5ee0e079f511aa201f9572077b416ae",
      "bytes": 11343
    },
    "cpu_reference.py": {
      "sha256": "f5ab2904ea43b434bcc17fb61a104f6c2975e5f52a39cffbbcfa94b358350e4e",
      "bytes": 5976
    },
    "modeling_kimi_k3.py": {
      "sha256": "344de6dfed495bd6e66e1d16abac12ba6cfd222e872b15ad73003f38462f35af",
      "bytes": 54765
    },
    "modeling_kimi_linear.py": {
      "sha256": "94956f39cd28bf211acf70a3e38f469db5d24637b76a4f58b0b096527bb70df5",
      "bytes": 50914
    }
  },
  "generation_compatibility": "Root directly inherits GenerationMixin; keeps upstream prepare_inputs_for_generation slicing; migrates cached image mask and beam cache access to KimiDynamicCache.",
  "dtype_initialization": "Untouched FP32 initialization -> temporary FP32 checkpoint -> actual BF16 loader selecting FP32-retained parameters -> per-tensor original.to(target_dtype) equality -> final exact mixed-dtype save/reload. No pre-rounding of sensitive parameters.",
  "vision_backend": "Original eager/FlashAttention2 dispatch plus true Torch SDPA packed-clip path. Backend-specific floating-point equivalence is not claimed."
}