ONNX Model Zoo

lebchen/nb-sbert-base-onnx

By lebchen · ↓ 0 · ♥ 0 · Updated 2026-01-26

What's in this repo

This page lists the files in lebchen/nb-sbert-base-onnx, including model.onnx, model_quantized.onnx.

  • 2 ONNX models (.onnx files)
  • 10 files, including 5 .json, 2 .onnx, 1 .md, 1 .txt
  • Last updated 2026-01-26

ONNX files

File Size Download
onnx/model.onnx — Download
onnx/model_quantized.onnx — Download

How to use

These ONNX files can be loaded with ONNX Runtime. To inspect a model graph, upload the file to the Netron viewer. Download links point to the original files on Hugging Face.

README

ONNX version of NbAiLab/nb-sbert-base

This repository contains ONNX-converted weights for NbAiLab/nb-sbert-base, compatible with Transformers.js.

It includes both:

  1. Quantized (int8): Faster, smaller (default).
  2. Full Precision (float32): Higher theoretical accuracy, larger file size.

Usage (Node.js)

First, install the library:

npm install @huggingface/transformers

Option 1: Use Quantized Model (Recommended)

This is the default behavior. It loads model_quantized.onnx (approx. 4x smaller).

import { pipeline } from '@huggingface/transformers';

const embedder = await pipeline(
  'feature-extraction', 
  'lebchen/nb-sbert-base-onnx', 
  { device: 'auto' } // Defaults to { quantized: true }
);

const output = await embedder("Dette er en test.", { pooling: 'mean', normalize: true });

Option 2: Use Full Precision Model

import { pipeline } from '@huggingface/transformers';

const embedder = await pipeline(
  'feature-extraction', 
  'lebchen/nb-sbert-base-onnx', 
  { 
    device: 'auto', 
    quantized: false // Forces loading of model.onnx
  }
);

Credits & License

The original model was developed by the National Library of Norway (AI Lab). Original repository: https://huggingface.co/NbAiLab/nb-sbert-base

This distribution is licensed under Apache 2.0.

Model info

feature-extraction transformers.js
transformers.js onnx bert feature-extraction sentence-similarity no base_model:NbAiLab/nb-sbert-base base_model:quantized:NbAiLab/nb-sbert-base license:apache-2.0 region:us
↓ 0 ♥ 0

Created: 2026-01-26

Updated: 2026-01-26

View on Hugging Face

Files (10)

.gitattributes
README.md
config.json
onnx/model.onnx ONNX
onnx/model_quantized.onnx ONNX
onnx/ort_config.json
special_tokens_map.json
tokenizer.json
tokenizer_config.json
vocab.txt

Related models