[日本語](README.md) # SBV2 Core ML shared BERT and dictionary Use this shared Japanese BERT/dictionary with the [SDK and samples](https://github.com/Corvelis/sbv2-coreml) and a separate [voice model](https://huggingface.co/AILogDev/sbv2-coreml-jvnv-f1-jp). ## Choose a variant **`int8/` contains INT8; `float32/` contains original FP32.** Each folder includes BERT, the dictionary, licenses and its download manifest. Both variants use the same compatible voice models. | Variant and files | Shared size | With JVNV | Choose when | App manifest | |---|---:|---:|---|---| | [INT8](https://huggingface.co/AILogDev/sbv2-coreml-common/tree/973d6e239af305f0d78a8bf30c6af5093c0fd47d/int8) | About 503 MB | About 797 MB | Storage size matters | [Download INT8](https://huggingface.co/AILogDev/sbv2-coreml-common/resolve/973d6e239af305f0d78a8bf30c6af5093c0fd47d/int8/download.json) | | [Original FP32](https://huggingface.co/AILogDev/sbv2-coreml-common/tree/973d6e239af305f0d78a8bf30c6af5093c0fd47d/float32) | About 1.52 GB | About 1.81 GB | Avoiding weight quantization or shorter preparation matters | [Download FP32](https://huggingface.co/AILogDev/sbv2-coreml-common/resolve/973d6e239af305f0d78a8bf30c6af5093c0fd47d/float32/download.json) | INT8 stores BERT weights in 8bit. BERT computation and tensor interfaces are FP32 for both variants. Requires iOS 18+ or macOS 15+ on Apple Silicon. Compilation caches need additional storage; file savings do not establish RAM savings. ## Download in the sample app Open **モデル設定 → URLからモデルを取得 → 共通モデル** and choose INT8 or FP32 under **共通モデルの版**. The URL is filled automatically; press **ダウンロード**. For a custom URL or SDK download, use these pinned manifests: **INT8** ```text https://huggingface.co/AILogDev/sbv2-coreml-common/resolve/973d6e239af305f0d78a8bf30c6af5093c0fd47d/int8/download.json ``` **Original FP32** ```text https://huggingface.co/AILogDev/sbv2-coreml-common/resolve/973d6e239af305f0d78a8bf30c6af5093c0fd47d/float32/download.json ``` Choose a separate voice and press **モデルを準備** after download. Synthesis works offline. ## Download one variant on Mac Use the [Hugging Face CLI](https://huggingface.co/docs/huggingface_hub/guides/cli). Keep `--include`: downloading the entire repository includes both variants and compatibility files. **INT8 → `models/int8/`** ```sh hf download AILogDev/sbv2-coreml-common \ --revision 973d6e239af305f0d78a8bf30c6af5093c0fd47d \ --include "int8/*" --local-dir models ``` **Original FP32 → `models/float32/`** ```sh hf download AILogDev/sbv2-coreml-common \ --revision 973d6e239af305f0d78a8bf30c6af5093c0fd47d \ --include "float32/*" --local-dir models ``` Select the downloaded `int8/` or `float32/` root in the sample app. For the SDK, pass its `bert/` and `dictionary/` subfolders and a separate voice folder. Download complete `.mlpackage` contents. ## Switch models and compare Stop synthesis/playback, choose the other shared root in **共通モデル**, and press **モデルを準備**. The shared-folder label shows INT8/FP32 from its metadata. Choosing a download variant alone does not switch a prepared model. For the SDK, await completion of existing work, then call `load` and `warmUp` with the selected shared folder. Old folders and caches are not removed automatically. Quit the app or call `unload` before deleting an unused shared folder; retain your separate voice folder. | iPhone 17 Pro / JVNV Neutral example | INT8 | Original FP32 | |---|---:|---:| | Cached reload + warm-up | About 18 seconds | About 6 seconds | | Warmed median RTF, three sentences | 0.071 | 0.067 | Initial compilation, playback and concurrent LLM execution are excluded. Texts, voices and devices vary; INT8 is not necessarily faster. BERT rounding can change prosody, timing, duration and waveform. Voice weights and the dictionary are unchanged. No concerning difference was heard in the JVNV Neutral comparison clips; compare your intended voices and texts. [SDK guide](https://github.com/Corvelis/sbv2-coreml/blob/main/docs/sdk-guide.ja.md) · [Getting started](https://github.com/Corvelis/sbv2-coreml/blob/main/docs/getting-started.ja.md) · [Create compressed shared models](https://github.com/Corvelis/sbv2-coreml/blob/main/docs/compression.md) ## Previous URLs Previous pinned URLs remain usable. Root `download.json`, `bert/` and `dictionary/` retain INT8 compatibility for existing URLs. For new downloads, choose `int8/` or `float32/` above. ## Attribution and terms BERT derives from Kyoto University's NLP group's [Japanese DeBERTa](https://huggingface.co/ku-nlp/deberta-v2-large-japanese-char-wwm), revision `547b0e8b044fba3f9b84d0ab9f990440bd130c8b`. BERT is **CC BY-SA 4.0**; see each variant's `LICENSE.md` and `provenance.json`. The Open JTalk 1.11 UTF-8 dictionary has separate BSD-style terms in each variant's `dictionary/COPYING`. File hashes are in `checksums.json`. Code is **AGPL-3.0**. This unofficial conversion is not endorsed by the original authors.