smkrv's picture
fp16 Core ML conversion: ruBert-base Collection3 NER (PER/ORG/LOC), parity 99.98% tokens
0fe9ca9 verified
|
Raw
History Blame Contribute Delete
1.69 kB
metadata
license: apache-2.0
language:
  - ru
tags:
  - ner
  - token-classification
  - coreml
  - russian
base_model: ai-forever/ruBert-base

rubert-base-collection3-ner-coreml

Russian NER (PER / ORG / LOC) as a self-contained fp16 Core ML package for on-device inference on Apple Silicon. Converted for the Letopis macOS app (on-device PII redaction of call transcripts); usable by any Core ML consumer.

Lineage

Files

  • NERCollection3.mlpackage - BertForTokenClassification, fp16 mlprogram, fixed shape (1, 256): inputs input_ids + attention_mask (int32), output logits (1, 256, 7)
  • vocab.txt - WordPiece vocab (do_lower_case = true, accents stripped per BERT BasicTokenizer)
  • tokenizer_config.json - reference tokenizer settings
  • config.json - id2label: O, B-PER, I-PER, B-ORG, I-ORG, B-LOC, I-LOC; seq_len: 256
  • tokenizer_fixtures.json - reference tokenizations (ids + char offsets) for porting tokenizers

Conversion fidelity

Verified against the PyTorch original on 1500 conversational RU sentences (cased and lowercase/unpunctuated): token-level label agreement 99.98%, entity-span agreement 99.8%.

License

Apache-2.0, inherited from the fine-tune and base model. Conversion and packaging: © 2026 Sergey Makarov.