sgns::neoswarm::fp4¶
Classes¶
| Name | |
|---|---|
| class | sgns::neoswarm::fp4::FP4Codec Encodes and decodes FP32 weight matrices to/from FP4. |
| struct | sgns::neoswarm::fp4::FP4Tensor Packed FP4 tensor: each byte holds two nibbles (high = even index). |
Attributes¶
| Name | |
|---|---|
| constexpr size_t | kMacroblockRows |
| constexpr size_t | kMacroblockCols |
| constexpr size_t | kMacroblockSize |
| constexpr int | kScaleSearchSteps |
| constexpr float[16] | kFP4LUT NF4-style symmetric lookup table: 16 representable values in [-1, 1]. |
Attributes Documentation¶
variable kMacroblockRows¶
variable kMacroblockCols¶
variable kMacroblockSize¶
variable kScaleSearchSteps¶
variable kFP4LUT¶
static constexpr float[16] kFP4LUT = { -1.0f, -0.6962f, -0.5251f, -0.3949f, -0.2844f, -0.1848f, -0.0911f, 0.0f,
0.0796f, 0.1609f, 0.2461f, 0.3379f, 0.4407f, 0.5626f, 0.7230f, 1.0f };
NF4-style symmetric lookup table: 16 representable values in [-1, 1].
Updated on 2026-07-25 at 22:56:56 +0000