PY-AI-Dev's picture
Add FP8 (dynamic) quantization for Nanbeige4.2-3B-DSpark
8bd13df verified
|
Raw
History Blame Contribute Delete
2.17 kB
metadata
license: other
base_model: Nanbeige/Nanbeige4.2-3B-DSpark
base_model_relation: quantized
library_name: transformers
pipeline_tag: text-generation
tags:
  - fp8
  - compressed-tensors
  - vllm
  - quantized
quantized_by: liodon-ai

Nanbeige4.2-3B-DSpark — FP8 (dynamic)

FP8 quantization of Nanbeige/Nanbeige4.2-3B-DSpark, published by Liodon AI.

Quantized with llm-compressor using the FP8_DYNAMIC scheme: weights are cast to FP8 (E4M3) per-channel ahead of time, activations are quantized to FP8 dynamically per-token at inference time. No calibration dataset is needed for this scheme, so the quantized weights are numerically just a direct cast of the original — no calibration-set bias to worry about. lm_head is left unquantized (standard practice — negligible size, disproportionate quality impact if quantized).

Original size: 1.7 GB → Quantized: 2.8 GB.

Quick Start

vLLM

vllm serve liodon-ai/Nanbeige4.2-3B-DSpark-FP8

Text Generation Inference (TGI)

docker run --gpus all -p 8080:80 ghcr.io/huggingface/text-generation-inference \
    --model-id liodon-ai/Nanbeige4.2-3B-DSpark-FP8

SGLang

python -m sglang.launch_server --model-path liodon-ai/Nanbeige4.2-3B-DSpark-FP8

FP8 execution requires an NVIDIA GPU with compute capability ≥ 8.9 (Ada/Hopper/Blackwell — RTX 40-series, L4/L40S, H100/H200, B100/B200/GB10). On older GPUs, vLLM/TGI will dequantize to run, which loses the speed/memory benefit.

Source

Citation

@misc{liodonai_nanbeige4_2_3b_dspark_fp8,
  title        = {Nanbeige4.2-3B-DSpark — FP8},
  author       = {{Liodon AI}},
  year         = {2026},
  howpublished = {\url{https://huggingface.co/liodon-ai/Nanbeige4.2-3B-DSpark-FP8}},
  note         = {FP8 (dynamic) quantization of Nanbeige/Nanbeige4.2-3B-DSpark}
}

Quantized by Liodon AI