Upload folder using huggingface_hub
Browse files
README.md
CHANGED
|
@@ -38,12 +38,19 @@ ONNX export of [LFM2.5-350M](https://huggingface.co/LiquidAI/LFM2.5-350M) for cr
|
|
| 38 |
| Variant | Size | Description |
|
| 39 |
|---------|------|-------------|
|
| 40 |
| FP16 | ~692MB | All weights in FP16 |
|
| 41 |
-
| Q4 | ~
|
| 42 |
-
|
|
|
|
|
| 43 |
|
| 44 |
-
Q4
|
| 45 |
-
|
| 46 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 47 |
|
| 48 |
## Model Files
|
| 49 |
|
|
@@ -52,7 +59,8 @@ onnx/
|
|
| 52 |
βββ model.onnx # FP32
|
| 53 |
βββ model_fp16.onnx # FP16
|
| 54 |
βββ model_q4.onnx # Q4
|
| 55 |
-
|
|
|
|
| 56 |
```
|
| 57 |
|
| 58 |
## Python
|
|
|
|
| 38 |
| Variant | Size | Description |
|
| 39 |
|---------|------|-------------|
|
| 40 |
| FP16 | ~692MB | All weights in FP16 |
|
| 41 |
+
| Q4 | ~276MB | INT4 embedding (GatherBlockQuantized), INT4 lm_head (MatMulNBits, shared), INT4 MatMul weights |
|
| 42 |
+
| Q4F32 | ~459MB | INT4 MatMul weights, FP32 embedding and norms |
|
| 43 |
+
| Q8 | ~604MB | INT8 MatMul weights, FP32 embedding and norms |
|
| 44 |
|
| 45 |
+
Q4 uses GatherBlockQuantized for the token embedding and MatMulNBits for the lm_head,
|
| 46 |
+
reusing the same quantized weights and scales. All other linear layers are quantized to
|
| 47 |
+
INT4 via post-export MatMulNBitsQuantizer. Block size is 32.
|
| 48 |
+
|
| 49 |
+
Q4F32 keeps the embedding as a FP32 Gather and the lm_head as FP32 Transpose + MatMul.
|
| 50 |
+
Only the internal linear layers (attention projections, conv projections, MLP) are
|
| 51 |
+
quantized to INT4 via post-export MatMulNBitsQuantizer.
|
| 52 |
+
|
| 53 |
+
Q8 is the same structure as Q4F32 but with INT8 weights (asymmetric quantization).
|
| 54 |
|
| 55 |
## Model Files
|
| 56 |
|
|
|
|
| 59 |
βββ model.onnx # FP32
|
| 60 |
βββ model_fp16.onnx # FP16
|
| 61 |
βββ model_q4.onnx # Q4
|
| 62 |
+
βββ model_q4f32.onnx # Q4F32
|
| 63 |
+
βββ model_q8.onnx # Q8
|
| 64 |
```
|
| 65 |
|
| 66 |
## Python
|