# SPARK_BC dump # SPARK_BC is orchestration bytecode — not neural weights. # Not HuggingFace. Not imported tensors. Spark's own binary. # # Source: examples/spark_train_step.spark # Command: ./spark-bootstrap --compile examples/spark_train_step.spark -o docs/examples/spark-train-step.sparkbc # sha256: d08925b52bf8c840de626c9cfec619d4dbae5a674b94bb8c7c5837eb1ac64551 # size: 201 bytes # # First 32 hex bytes: # 53 50 42 43 01 09 00 04 00 63 6f 64 65 03 00 6a 6f 62 11 00 73 70 61 72 6b 5f 64 69 73 74 69 6c # # File layout (little-endian, docs/SPARK_BC.md): # offset 0 magic 'S''P''B''C' # offset 4 version 0x01 # then u16 nstrings, string pool, u16 nconsts, # const pool (u8 kind + u16 payload), u32 ncode, code ## xxd 00000000: 53 50 42 43 01 09 00 04 00 63 6f 64 65 03 00 6a SPBC.....code..j 00000010: 6f 62 11 00 73 70 61 72 6b 5f 64 69 73 74 69 6c ob..spark_distil 00000020: 6c 5f 63 70 75 15 00 6f 75 74 2f 74 72 61 69 6e l_cpu..out/train 00000030: 2f 6a 6f 62 2d 64 72 79 2d 30 30 31 0c 00 66 69 /job-dry-001..fi 00000040: 78 74 75 72 65 2d 62 61 73 65 25 00 65 78 61 6d xture-base%.exam 00000050: 70 6c 65 73 2f 66 69 78 74 75 72 65 73 2f 74 72 ples/fixtures/tr 00000060: 61 69 6e 2f 64 61 74 61 73 65 74 2e 6a 73 6f 6e ain/dataset.json 00000070: 6c 04 00 73 74 65 70 0b 00 6a 6f 62 2d 64 72 79 l..step..job-dry 00000080: 2d 30 30 31 06 00 73 74 61 74 75 73 09 00 00 00 -001..status.... 00000090: 00 00 01 00 00 02 00 00 03 00 00 04 00 00 05 00 ................ 000000a0: 00 06 00 00 07 00 00 08 00 1c 00 00 00 01 00 00 ................ 000000b0: 26 05 00 04 00 03 00 02 00 01 00 28 07 00 06 00 &..........(.... 000000c0: 27 07 00 08 00 03 01 00 00 '........ ## Header magic: SPBC version: 1 nstrings: 9 nconsts: 9 ncode: 28 code_off: 173 ## String pool 0: 'code' (4 bytes) 1: 'job' (3 bytes) 2: 'spark_distill_cpu' (17 bytes) 3: 'out/train/job-dry-001' (21 bytes) 4: 'fixture-base' (12 bytes) 5: 'examples/fixtures/train/dataset.jsonl' (37 bytes) 6: 'step' (4 bytes) 7: 'job-dry-001' (11 bytes) 8: 'status' (6 bytes) ## Constant pool (kind 0 = STR → string index) 0: kind=0 payload=0 → 'code' 1: kind=0 payload=1 → 'job' 2: kind=0 payload=2 → 'spark_distill_cpu' 3: kind=0 payload=3 → 'out/train/job-dry-001' 4: kind=0 payload=4 → 'fixture-base' 5: kind=0 payload=5 → 'examples/fixtures/train/dataset.jsonl' 6: kind=0 payload=6 → 'step' 7: kind=0 payload=7 → 'job-dry-001' 8: kind=0 payload=8 → 'status' ## Code (opcode + u16le const indices) code+0 01 00 00 MODEL (0x01) const0 "code" code+3 26 05 00 04 00 03 00 02 00 01 00 TRAIN (0x26) const5 "examples/fixtures/train/dataset.jsonl" const4 "fixture-base" const3 "out/train/job-dry-001" const2 "spark_distill_cpu" const1 "job" code+14 28 07 00 06 00 STEP (0x28) const7 "job-dry-001" const6 "step" code+19 27 07 00 08 00 TRAIN_STATUS (0x27) const7 "job-dry-001" const8 "status" code+24 03 01 00 PRINT (0x03) const1 "job" code+27 00 HALT (0x00)