CoolFace
Modelpublic

AMbaye018/sarvam-30b-AWQ-then-FP8

sourceHugging Faceapache-2.0updated 5mo agoView on Hugging Face
0likes26downloads
Model Card

Sarvam-30B AWQ→FP8 (Mixed-Precision)

Hybrid mixed-precision quantization of sarvamai/sarvam-30b for the Resilient AI Challenge.

Method: AWQ first, then FP8

Two-stage sequential compression:

  1. 1.AWQ W4A16 on MLP/expert layers (4-bit, activation-aware scaling)
  2. 2.FP8 Dynamic on remaining BF16 layers (attention + layer 0)

This produces a hybrid model where each component uses the optimal precision:

ComponentPrecisionWhy
MLP/Experts (layers 1-18)INT4 (AWQ)128 MoE experts tolerate 4-bit thanks to redundancy
Attention (layers 0-18)FP8Sensitive with only 4 KV heads, FP8 preserves quality
Layer 0 MLP (dense)FP8Dense layer (not MoE), more sensitive than experts
lm_headBF16Output layer, always kept at full precision

Quantization Details

SpecificationValue
MethodAWQ W4A16 → FP8 Dynamic (sequential)
AWQ Toolllm-compressor
AWQ RecipeQuantTrio recipe (ignore attention + layer 0)
AWQ Calibrationsarvamai/indivibe + cais/mmlu
FP8 SchemeFP8_DYNAMIC (no calibration needed)
Model Size~24 GB (vs 60 GB baseline, 26 GB AWQ-only, 37 GB FP8-only)
HardwareQuantized on NVIDIA H100 80GB

Usage with vLLM

bash
vllm serve AMbaye018/sarvam-30b-AWQ-then-FP8 \
    --trust-remote-code \
    --tensor-parallel-size 1 \
    --gpu-memory-utilization 0.90 \
    --max-model-len 32768 \
    --host 0.0.0.0 \
    --port 8000

vLLM Config (for challenge submission)

yaml
model: AMbaye018/sarvam-30b-AWQ-then-FP8
served_model_name: sarvam-30b-awq-fp8
trust_remote_code: true
tensor_parallel_size: 1
gpu_memory_utilization: 0.90
max_model_len: 32768
max_num_seqs: 64
host: 0.0.0.0
port: 8000

References

License

Apache License 2.0 (same as base model)