Loading…
Loading…
Native OpenVINO INT8 build of the wtpsplit SaT (sat-3l-sm) multilingual sentence segmenter. A drop-in replacement for the onnxruntime SaT that runs on OpenVINO with no onnxruntime dependency, quantized for CPU latency.
segment-any-text/sat-3l-sm (wtpsplit SaT, 3-layer subword XLM-R), converted ONNX → OpenVINO IR, then INT8 post-training quantization with NNCFinput_ids (int64), attention_mask (float32); output logits (per-token boundary scores)facebookAI/xlm-roberta-baseMeasured against the ONNX reference on a held-out, public VitaminC sample (300 texts, 31k characters) at the sat-3l-sm default threshold 0.25:
openvino_model.xml + openvino_model.bin - the INT8 OpenVINO IRconfig.json, openvino_config.json - model + quantization configtokenizer.json, tokenizer_config.json, special_tokens_map.json - the xlm-roberta-base tokenizerimport openvino as ov
from huggingface_hub import hf_hub_download
xml = hf_hub_download("stellars/sat-3l-sm-openvino-int8", "openvino_model.xml")
hf_hub_download("stellars/sat-3l-sm-openvino-int8", "openvino_model.bin")
core = ov.Core()
model = core.compile_model(core.read_model(xml), "CPU", {"PERFORMANCE_HINT": "LATENCY"})
# input_ids: int64 [batch, seq], attention_mask: float32 [batch, seq] -> logits
logits = list(model({"input_ids": ids, "attention_mask": mask}).values())[0]
The full tokenise → sliding-window → threshold → sentence-reconstruction pipeline follows wtpsplit's SaT; this repo only swaps the inference backend to OpenVINO INT8.
MIT. Derived from wtpsplit-lite (Superlinear) and the SaT model segment-any-text/sat-3l-sm. See the base model and wtpsplit for the segmentation method.
segment-any-text/sat-3l-sm