quantize::fp4_exporter¶
Classes¶
| Name | |
|---|---|
| class | quantize::fp4_exporter::FP4Exporter |
Attributes¶
Detailed Description¶
SGFP4 v1 fixed-payload and v2 adaptive-quadtree exporter.
Container layout v1::
headers[B] | offsets[B] | codes_blob[B * 2048]
Container layout v2::
magic[4] | version[1] | B[4] | pad0[7] | record_offsets[B] |
pad1[0..12] | records[0..B-1]
For v2, ``pad1`` aligns the record-region base to 16 bytes. Record offsets
are relative to that aligned base. Each record and each leaf payload is also
zero-padded to a 16-byte multiple.
Attributes Documentation¶
variable MODE_FP4_AFFINE¶
variable MODE_T158_AFFINE¶
variable LAYOUT_UNIFORM_64¶
variable LAYOUT_UNIFORM_32¶
variable LAYOUT_UNIFORM_16¶
variable LAYOUT_UNIFORM_8¶
variable LAYOUT_MIXED¶
variable LAYOUT_FULL_4x4¶
variable DEFAULT_V2_THRESHOLDS¶
dict DEFAULT_V2_THRESHOLDS = {
64: {"max_mse": 0.01, "max_relative": 0.05},
32: {"max_mse": 0.005, "max_relative": 0.03},
16: {"max_mse": 0.002, "max_relative": 0.02},
8: {"max_mse": 0.001, "max_relative": 0.01},
4: {"max_mse": 0.0005, "max_relative": 0.005},
};
variable parser¶
variable required¶
variable True¶
variable help¶
variable action¶
variable args¶
variable project_root¶
variable exporter¶
variable dummy_weights¶
variable output_dir¶
variable bin_path¶
variable stats¶
variable adaptive¶
variable manifest¶
dict manifest = {
"model_name": args.niche,
"niche": args.niche,
"base_model_ref": "",
"adapter_ref": "",
"quantization_params": {"format": "fp4_ultra"},
"encoder_version": "0.1.0",
"timestamp_utc": "",
};
Updated on 2026-10-09 at 03:59:43 +0000