Downloads · 30 days
0
FredrikKarlssonSpeech/megatron-bert-large-swedish-cased-165k-onnx
megatron-bert-large-swedish-cased-165k-onnx is a feature extraction model from FredrikKarlssonSpeech. Use it when you need embeddings to search or compare text. It is set up for onnxruntime. The card lists the license as unknown.
ONNX export of KBLab/megatron-bert-large-swedish-cased-165k.
Downloads · 30 days
0
Access
Public
Updated Jul 20, 2026
Repo size
7.4 GB
Likes
0
Public
Click a slice to open those files.
.onnx7.4 GB · 100%
From the Hugging Face model README
ONNX export of KBLab/megatron-bert-large-swedish-cased-165k.
This package contains two task-specific exports:
fill-mask/onnx/model.onnx for masked language modeling logitsfeature-extraction/onnx/model.onnx for last_hidden_state and cls_embeddingEach task folder contains:
model.onnx - FP32 baselinemodel_fp16.onnx - FP16, recommendedmodel_int8.onnx - dynamic INT8model_uint8.onnx - dynamic UINT8model_q4.onnx - 4-bit MatMul quantizationmodel.onnx: 1741.6 MBmodel_fp16.onnx: 871.0 MBmodel_int8.onnx: 437.2 MBmodel_uint8.onnx: 437.2 MBmodel_q4.onnx: 497.2 MBmodel.onnx: 1474.4 MBmodel_fp16.onnx: 737.4 MBmodel_int8.onnx: 370.2 MBmodel_uint8.onnx: 370.2 MBmodel_q4.onnx: 455.2 MB0.000237last_hidden_state max diff: 0.000011cls_embedding cosine similarity: 1.0fp16: top-5 exact match, max diff 0.0173int8: top-5 drift after rank 2uint8: top-5 drift after rank 2q4: top-5 drift at rank 5fp16: CLS cosine 0.9999998q4: CLS cosine 0.9882int8: CLS cosine 0.9282uint8: CLS cosine 0.9298model_fp16.onnx by default.model_q4.onnx is plausible but lower fidelity than fp16.int8 and uint8 for fill-mask if token ranking fidelity matters.megatron-bert-large-swedish-cased-165k/
├── fill-mask/
│ ├── config.json
│ ├── tokenizer.json
│ ├── tokenizer_config.json
│ ├── special_tokens_map.json
│ └── onnx/
│ ├── model.onnx
│ ├── model_fp16.onnx
│ ├── model_int8.onnx
│ ├── model_uint8.onnx
│ └── model_q4.onnx
└── feature-extraction/
├── config.json
├── tokenizer.json
├── tokenizer_config.json
├── special_tokens_map.json
└── onnx/
├── model.onnx
├── model_fp16.onnx
├── model_int8.onnx
├── model_uint8.onnx
└── model_q4.onnx
optimum 2.1.0 task export does not support megatron-bert.torch.onnx.export wrappers using legacy TorchScript exporter (dynamo=False).cls_embedding = last_hidden_state[:, 0, :].MegatronBertModel from this MLM checkpoint would introduce randomly initialized pooler weights.