[{"data":1,"prerenderedAt":480},["ShallowReactive",2],{"navigation":3,"\u002Fconcepts\u002Fplanes":222,"\u002Fconcepts\u002Fplanes-surround":475},[4,8,168,206,210,214,218],{"title":5,"path":6,"stem":7},"Quickstart","\u002Fquickstart","01.quickstart",{"title":9,"path":10,"stem":11,"children":12},"Concepts","\u002Fconcepts","20.concepts",[13,15,19,23,84,88,92,96,100],{"title":9,"path":10,"stem":14},"20.concepts\u002Findex",{"title":16,"path":17,"stem":18},"Preprocessing Graph","\u002Fconcepts\u002Fppg","20.concepts\u002F2.ppg",{"title":20,"path":21,"stem":22},"Plane decomposition","\u002Fconcepts\u002Fplanes","20.concepts\u002F3.planes",{"title":24,"path":25,"stem":26,"children":27},"Codecs","\u002Fconcepts\u002Fcodecs","20.concepts\u002F4.codecs",[28,32,36,40,44,48,52,56,60,64,68,72,76,80],{"title":29,"path":30,"stem":31},"Arithmetic","\u002Fconcepts\u002Fcodecs\u002Farithmetic","20.concepts\u002Fcodecs\u002Farithmetic",{"title":33,"path":34,"stem":35},"Context Mixing Lite","\u002Fconcepts\u002Fcodecs\u002Fcontext-mixing-lite","20.concepts\u002Fcodecs\u002Fcontext-mixing-lite",{"title":37,"path":38,"stem":39},"FPC","\u002Fconcepts\u002Fcodecs\u002Ffpc","20.concepts\u002Fcodecs\u002Ffpc",{"title":41,"path":42,"stem":43},"Huffman LLM 5-Bit","\u002Fconcepts\u002Fcodecs\u002Fhuff-llm","20.concepts\u002Fcodecs\u002Fhuff-llm",{"title":45,"path":46,"stem":47},"Huffman","\u002Fconcepts\u002Fcodecs\u002Fhuffman","20.concepts\u002Fcodecs\u002Fhuffman",{"title":49,"path":50,"stem":51},"Identity","\u002Fconcepts\u002Fcodecs\u002Fidentity","20.concepts\u002Fcodecs\u002Fidentity",{"title":53,"path":54,"stem":55},"Neural Predictor","\u002Fconcepts\u002Fcodecs\u002Fneural-predictor","20.concepts\u002Fcodecs\u002Fneural-predictor",{"title":57,"path":58,"stem":59},"Order-1 Arithmetic","\u002Fconcepts\u002Fcodecs\u002Forder1-arithmetic","20.concepts\u002Fcodecs\u002Forder1-arithmetic",{"title":61,"path":62,"stem":63},"Order-1 Scale AC","\u002Fconcepts\u002Fcodecs\u002Forder1-scale-ac","20.concepts\u002Fcodecs\u002Forder1-scale-ac",{"title":65,"path":66,"stem":67},"Per-Group Codebook","\u002Fconcepts\u002Fcodecs\u002Fper-group-codebook","20.concepts\u002Fcodecs\u002Fper-group-codebook",{"title":69,"path":70,"stem":71},"rANS","\u002Fconcepts\u002Fcodecs\u002Frans","20.concepts\u002Fcodecs\u002Frans",{"title":73,"path":74,"stem":75},"tANS","\u002Fconcepts\u002Fcodecs\u002Ftans","20.concepts\u002Fcodecs\u002Ftans",{"title":77,"path":78,"stem":79},"Zstd","\u002Fconcepts\u002Fcodecs\u002Fzstd","20.concepts\u002Fcodecs\u002Fzstd",{"title":81,"path":82,"stem":83},"Zstd Dictionary","\u002Fconcepts\u002Fcodecs\u002Fzstd-dict","20.concepts\u002Fcodecs\u002Fzstd-dict",{"title":85,"path":86,"stem":87},"Container format","\u002Fconcepts\u002Fcontainer","20.concepts\u002F5.container",{"title":89,"path":90,"stem":91},"Delta compression","\u002Fconcepts\u002Fdelta","20.concepts\u002F6.delta",{"title":93,"path":94,"stem":95},"Extensibility","\u002Fconcepts\u002Fextensibility","20.concepts\u002F7.extensibility",{"title":24,"path":25,"stem":97,"children":98},"20.concepts\u002Fcodecs\u002Findex",[99],{"title":24,"path":25,"stem":97},{"title":101,"path":102,"stem":103,"children":104},"Transforms","\u002Fconcepts\u002Ftransforms","20.concepts\u002Ftransforms\u002Findex",[105,106,110,114,118,122,126,130,134,140,144,148,152,156,160,164],{"title":101,"path":102,"stem":103},{"title":107,"path":108,"stem":109},"Alpha-Stable Normalize","\u002Fconcepts\u002Ftransforms\u002Falpha-stable-normalize","20.concepts\u002Ftransforms\u002Falpha-stable-normalize",{"title":111,"path":112,"stem":113},"Bit Reorder","\u002Fconcepts\u002Ftransforms\u002Fbit-reorder","20.concepts\u002Ftransforms\u002Fbit-reorder",{"title":115,"path":116,"stem":117},"Block Microscaling Repack","\u002Fconcepts\u002Ftransforms\u002Fblock-microscaling-repack","20.concepts\u002Ftransforms\u002Fblock-microscaling-repack",{"title":119,"path":120,"stem":121},"Burrows-Wheeler","\u002Fconcepts\u002Ftransforms\u002Fburrows-wheeler","20.concepts\u002Ftransforms\u002Fburrows-wheeler",{"title":123,"path":124,"stem":125},"Byte Split & Nibble Split","\u002Fconcepts\u002Ftransforms\u002Fbyte-split","20.concepts\u002Ftransforms\u002Fbyte-split",{"title":127,"path":128,"stem":129},"Concat","\u002Fconcepts\u002Ftransforms\u002Fconcat","20.concepts\u002Ftransforms\u002Fconcat",{"title":131,"path":132,"stem":133},"Delta","\u002Fconcepts\u002Ftransforms\u002Fdelta","20.concepts\u002Ftransforms\u002Fdelta",{"title":135,"path":136,"stem":137,"children":138},"Index Bitwidth Pack","\u002Fconcepts\u002Ftransforms\u002Findex-bitwidth-pack","20.concepts\u002Ftransforms\u002Findex-bitwidth-pack",[139],{"title":135,"path":136,"stem":137},{"title":141,"path":142,"stem":143},"IntDelta","\u002Fconcepts\u002Ftransforms\u002Fint-delta","20.concepts\u002Ftransforms\u002Fint-delta",{"title":145,"path":146,"stem":147},"Mantissa Zero Strip","\u002Fconcepts\u002Ftransforms\u002Fmantissa-zero-strip","20.concepts\u002Ftransforms\u002Fmantissa-zero-strip",{"title":149,"path":150,"stem":151},"Move to Front","\u002Fconcepts\u002Ftransforms\u002Fmove-to-front","20.concepts\u002Ftransforms\u002Fmove-to-front",{"title":153,"path":154,"stem":155},"MxFp4 Deinterleave","\u002Fconcepts\u002Ftransforms\u002Fmxfp4-deinterleave","20.concepts\u002Ftransforms\u002Fmxfp4-deinterleave",{"title":157,"path":158,"stem":159},"Predictor XOR","\u002Fconcepts\u002Ftransforms\u002Fpredictor-xor","20.concepts\u002Ftransforms\u002Fpredictor-xor",{"title":161,"path":162,"stem":163},"Reshape","\u002Fconcepts\u002Ftransforms\u002Freshape","20.concepts\u002Ftransforms\u002Freshape",{"title":165,"path":166,"stem":167},"Spherical Normalize","\u002Fconcepts\u002Ftransforms\u002Fspherical-normalize","20.concepts\u002Ftransforms\u002Fspherical-normalize",{"title":169,"path":170,"stem":171,"children":172},"Guides","\u002Fguides","30.guides\u002F00.index",[173,174,178,182,186,190,194,198,202],{"title":169,"path":170,"stem":171},{"title":175,"path":176,"stem":177},"CLI usage","\u002Fguides\u002Fcli","30.guides\u002F01.cli",{"title":179,"path":180,"stem":181},"Python API","\u002Fguides\u002Fpython-api","30.guides\u002F02.python-api",{"title":183,"path":184,"stem":185},"Writing your first extension","\u002Fguides\u002Fextension-authoring","30.guides\u002F03.extension-authoring",{"title":187,"path":188,"stem":189},"Trust and security","\u002Fguides\u002Ftrust-and-security","30.guides\u002F04.trust-and-security",{"title":191,"path":192,"stem":193},"Random access","\u002Fguides\u002Frandom-access","30.guides\u002F10.random-access",{"title":195,"path":196,"stem":197},"Tuning","\u002Fguides\u002Ftuning","30.guides\u002F11.tuning",{"title":199,"path":200,"stem":201},"Safetensors","\u002Fguides\u002Fsafetensors","30.guides\u002F50.safetensors",{"title":203,"path":204,"stem":205},"Transformers","\u002Fguides\u002Ftransformers","30.guides\u002F51.transformers",{"title":207,"path":208,"stem":209},"API reference","\u002Fapi","40.api",{"title":211,"path":212,"stem":213},"Benchmarks","\u002Fbenchmarks","50.benchmarks",{"title":215,"path":216,"stem":217},"Extensions","\u002Fextensions","60.extensions",{"title":219,"path":220,"stem":221},"Contributing","\u002Fcontributing","90.contributing",{"id":223,"title":20,"body":224,"description":469,"extension":470,"kind":471,"language":471,"links":471,"meta":472,"navigation":471,"path":21,"seo":473,"stem":22,"summary":471,"__hash__":474},"docs\u002F20.concepts\u002F3.planes.md",{"type":225,"value":226,"toc":461},"minimark",[227,231,236,239,251,261,270,276,280,283,427,431,434,437,441,452],[228,229,230],"p",{},"PTWM's bread-and-butter transform is a two-step decomposition:",[232,233,235],"h2",{"id":234},"_1-bit-reorder","1. Bit reorder",[228,237,238],{},"IEEE 754 places the sign bit between the exponent and mantissa, straddling\na byte boundary. The bit reorder shifts the exponent to the most-significant\nposition with the sign tucked below it.",[228,240,241,242,246,247,250],{},"For ",[243,244,245],"code",{},"float32"," and ",[243,248,249],{},"bfloat16"," (8-bit exponent), the exponent occupies a\nfull byte after reorder:",[252,253,258],"pre",{"className":254,"code":256,"language":257},[255],"language-text","IEEE 754 fp32:  [S EEEEEEEE MMMMMMMMMMMMMMMMMMMMMMM]\nAfter reorder:  [EEEEEEEE S MMMMMMMMMMMMMMMMMMMMMMM]\n","text",[243,259,256],{"__ignoreMap":260},"",[228,262,241,263,246,266,269],{},[243,264,265],{},"float8_e4m3fn",[243,267,268],{},"float8_e5m2"," (4–5 bit exponent), the reorder\nmoves the exponent into the high nibble of each byte:",[252,271,274],{"className":272,"code":273,"language":257},[255],"FP8-E4M3FN:     [S EEEE MMM]\nAfter reorder:  [EEEE SMMM ]   ← exponent in high nibble\n",[243,275,273],{"__ignoreMap":260},[232,277,279],{"id":278},"_2-byte-nibble-split","2. Byte \u002F nibble split",[228,281,282],{},"The byte (or nibble) split deinterleaves the reordered data into separate\nplanes. The compressor then encodes each plane independently with\nwhichever codec compresses it smallest.",[284,285,286,302],"table",{},[287,288,289],"thead",{},[290,291,292,296,299],"tr",{},[293,294,295],"th",{},"Dtype",[293,297,298],{},"Strategy",[293,300,301],{},"Planes",[303,304,305,318,330,343,358,372,391,403,415],"tbody",{},[290,306,307,312,315],{},[308,309,310],"td",{},[243,311,245],{},[308,313,314],{},"bit reorder + 4-plane byte split",[308,316,317],{},"plane 3 = exponent",[290,319,320,324,327],{},[308,321,322],{},[243,323,249],{},[308,325,326],{},"bit reorder + 2-plane byte split",[308,328,329],{},"plane 1 = exponent",[290,331,332,337,340],{},[308,333,334],{},[243,335,336],{},"float16",[308,338,339],{},"2-plane byte split (no reorder)",[308,341,342],{},"sign + exp in MSB already",[290,344,345,352,355],{},[308,346,347,349,350],{},[243,348,265],{}," \u002F ",[243,351,268],{},[308,353,354],{},"bit reorder + 2-plane nibble split",[308,356,357],{},"plane 0 = exponent nibbles",[290,359,360,366,369],{},[308,361,362,365],{},[243,363,364],{},"float4_e2m1fn_x2"," (MXFP4 \u002F NVFP4)",[308,367,368],{},"PPG chain over nibble pairs",[308,370,371],{},"best chain selected per tensor",[290,373,374,385,388],{},[308,375,376,349,379,349,382],{},[243,377,378],{},"int8",[243,380,381],{},"uint8",[243,383,384],{},"bool",[308,386,387],{},"single stream",[308,389,390],{},"no reorder",[290,392,393,398,401],{},[308,394,395],{},[243,396,397],{},"int16",[308,399,400],{},"2-plane byte split",[308,402],{},[290,404,405,410,413],{},[308,406,407],{},[243,408,409],{},"int32",[308,411,412],{},"4-plane byte split",[308,414],{},[290,416,417,422,425],{},[308,418,419],{},[243,420,421],{},"int64",[308,423,424],{},"8-plane byte split",[308,426],{},[232,428,430],{"id":429},"why-this-works","Why this works",[228,432,433],{},"The exponent plane on a trained float weight typically holds about\n20 unique values out of 256 (≈ 2.6 bits\u002Fbyte entropy). The mantissa\nplanes are near-random. Coding the planes independently lets the\nentropy coder spend its bits where they buy compression and treat the\nnear-random planes cheaply.",[228,435,436],{},"The two-step decomposition is a standard byte-shuffle preprocessing\nstep, plus a bit-reorder step that cleanly separates the exponent from\nthe sign. Without it, the sign contaminates the exponent byte.",[232,438,440],{"id":439},"where-the-savings-come-from","Where the savings come from",[228,442,443,444,446,447,446,449,451],{},"For float weights (",[243,445,249],{},", ",[243,448,336],{},[243,450,245],{},"), nearly all the\ncompression savings come from the exponent plane.",[228,453,454,455,460],{},"For microscaling formats, the FP4 nibbles are near-uniform and the\nplane decomposition does little. The savings come from the ",[456,457,459],"a",{"href":458},"\u002Fconcepts\u002Fcodecs#order-1-scaleac","scale\ncodec"," applied to the paired E8M0\nor FP8-E4M3 scale tensor.",{"title":260,"searchDepth":462,"depth":462,"links":463},3,[464,466,467,468],{"id":234,"depth":465,"text":235},2,{"id":278,"depth":465,"text":279},{"id":429,"depth":465,"text":430},{"id":439,"depth":465,"text":440},"Bit reorder and byte \u002F nibble split isolate the exponent into its own plane.","md",null,{},{"title":20,"description":469},"4VfIDYuvVbpl5IhYgRX2vJNlUZ1OfHWbgRpEIPVA8oY",[476,478],{"title":16,"path":17,"stem":18,"description":477,"children":-1},"Typed DAG of preprocessing ops that runs on every tensor before entropy coding.",{"title":24,"path":25,"stem":26,"children":-1,"description":479},"Entropy coders used per plane — Huffman, rANS, Identity, Zstd, Order-1 ScaleAC.",1784796353501]