AfrimBert-QA - W8A8 QAT
amidblue/AfrimBert-QA fine-tuned with quantization-aware training on a language-balanced subset of AfriQuAD
(weights: symmetric int8, per-channel; activations: dynamic per-token int8).
Files
model.safetensors: standard checkpoint (weights adapted to the quantization grid), loadable withAutoModelForQuestionAnswering.quant_model.safetensors+quant_meta.json+quant_utils.py: real integer weights (int8) with scales; word embeddings stored as per-row int8.
import sys
from huggingface_hub import snapshot_download
p = snapshot_download("theophilusowiti/AfrimBert-QA-int8-qat", allow_patterns=["config.json", "quant_meta.json", "quant_model.safetensors", "quant_utils.py"])
sys.path.insert(0, p)
from quant_utils import load_quantized_model
model = load_quantized_model(p)
Note: weights are dequantized on the fly, so this saves storage; int8 compute speedups need a kernel backend (e.g. torchao, ONNX Runtime, TensorRT). The base model is gated; check its terms before making this repo public.