BGE-M3 (Korean + English vocabulary) — Subnota ONNX int8 conversion
This is an unofficial conversion, not a model created by Subnota or an
official BAAI release. The original model was developed by BAAI:
BAAI/bge-m3, revision
5617a9f61b028005a4858fdac845db406aefb181.
What changed
- Vocabulary trimmed to Korean and English. Tokens whose text (without the
▁word-start marker) contains a letter outside Hangul and ASCII were removed. Symbols, digits, punctuation and emoji tokens were kept. The vocabulary shrank from 250,002 to 91,471 tokens; the embedding rows of the kept tokens are copied unchanged, and special tokens<s> <pad> </s> <unk>keep ids 0–3. No other weights were modified and no training was performed. - ONNX int8. Exported to ONNX (opset 17, output
last_hidden_state) and dynamically quantizedMatMulandGatherweights to signed int8. - Tokenizer.
tokenizer.jsonis the original Unigram tokenizer restricted to the kept tokens and renumbered. The other tokenizer files andconfig.jsoncome from Xenova/bge-m3 (revision4de13258303883538bd53b696b452bf8099f0858), withvocab_sizeupdated.
For Korean and English text the output is the same as the untrimmed model
quantized the same way (cosine ≥ 0.99999 on 422 of 423 test sentences with
Transformers.js; the remaining sentence contained a Chinese character). Text in
other scripts (Chinese, Japanese, accented Latin and so on) maps to <unk> and
should use the original model instead.
Use CLS pooling and L2 normalization, without a query or passage prefix, as with the original model.
The onnx/model_quantized.onnx file is 406,126,989 bytes and has SHA-256
1d2146b78742f6801528e971a2b4cd03f42d675d66d705c4e15fa34307f781c4.
License
The original model is licensed under the MIT License. A copy of that license
is included in this repository as LICENSE. This conversion is distributed
under the same license. BAAI has not endorsed this conversion or Subnota.