Loading…
Loading…
OpenVINO int8 IR of BAAI/bge-reranker-v2-m3 (XLM-RoBERTa-large cross-encoder), quantized for CPU inference as the relevance reranker in a single-engine semantic grounding pipeline. The int8 preserves the fp32 max-over-chunks grounding signal at pearson 0.9976 - no measurable quality loss.
BAAI/bge-reranker-v2-m3 (XLM-RoBERTa-large cross-encoder)openvino_model.xml + openvino_model.bin), int8from huggingface_hub import snapshot_download
import numpy as np, openvino as ov
from transformers import AutoTokenizer
d = snapshot_download("stellars/bge-reranker-v2-m3-openvino-int8")
core = ov.Core()
model = core.compile_model(core.read_model(f"{d}/openvino_model.xml"), "CPU")
tok = AutoTokenizer.from_pretrained(d)
enc = tok(["a sentence"], ["another sentence"], return_tensors="np",
padding=True, truncation=True, max_length=512)
feed = {"input_ids": enc["input_ids"].astype(np.int64),
"attention_mask": enc["attention_mask"].astype(np.int64)}
logits = model(feed)[model.output(0)]
optimum-intelInherits the apache-2.0 license of the base model.
BAAI/bge-reranker-v2-m3