LLMLingua-2 bert-base multilingual cased (MeetingBank), ONNX
An ONNX export of microsoft/llmlingua-2-bert-base-multilingual-cased-meetingbank (LLMLingua-2: Pan et al., 2024, https://arxiv.org/abs/2403.12968), so that it can be run with ONNX Runtime without PyTorch. Microsoft publishes only the PyTorch weights.
- Task: per-token binary classification (
logits[..., 1]= keep the token), used to drop the least informative words of a text. - Inputs:
input_ids,attention_mask,token_type_ids(int64, shape[batch, seq], up to 512). Output:logits[batch, seq, 2]. - Precision: fp32 (709.6 MB). Dynamic int8 quantization was tried and rejected: it changed up to 31 % of the keep/drop decisions.
- Tokenizer: the original BERT WordPiece, cased, 119,547 tokens (
tokenizer.json,vocab.txt).
How it was made
torch.onnx.export (PyTorch 2.15, transformers 5.23, opset 17, dynamic batch and sequence axes) over AutoModelForTokenClassification,
inputs input_ids, attention_mask, token_type_ids, output logits. Checked against the PyTorch model on texts of 5, 31, 250 and 512
tokens: the largest difference in the logits is 4.5e-06.
License
Apache-2.0, as the original model. See LICENSE and NOTICE. The MeetingBank data the model was trained on is CC BY-NC-SA 4.0; see the
note in NOTICE.