sat-12l-sm-coreml / README.md
ukk0708's picture
Core ML conversion of segment-any-text/sat-12l-sm (int8 embeddings) with the XLM-R tokenizer
62c68b3 verified
|
Raw History Blame Contribute Delete
1.33 kB
metadata
license: mit
library_name: coreml
base_model: segment-any-text/sat-12l-sm
tags:
  - sentence-segmentation
  - coreml
  - multilingual

sat-12l-sm for Core ML

A Core ML conversion of segment-any-text/sat-12l-sm (Segment any Text, wtpsplit, MIT), used by the Vocena app to find sentence ends in speech-recognition text that has no punctuation.

  • SaTSegmenter.mlmodelc: compiled Core ML model. Inputs input_ids and attention_mask, Int32 [1, N] with N ∈ {64, 128, 256, 512}; output logits Float32 [1, N], one sentence-end logit per token. Wrap each block as <s> (0) + tokens + </s> (2) and pad with <pad> (1), mask 0.
  • Word and position embeddings are int8 (per-block, block 32); the 12 encoder layers stay fp16. On the validation texts (Thai, Chinese, English, Japanese) the cuts at thresholds 0.05 and 0.03 are identical to wtpsplit 2.2.2 with the original ONNX model. Runs on the CPU and Neural Engine (MLComputeUnits.cpuAndNeuralEngine).
  • tokenizer.json: the FacebookAI/xlm-roberta-base tokenizer (MIT), unchanged. tokenizer_config.json names its class for swift-transformers.

Licence: MIT, as the original model and tokenizer.