feature-extraction · BertModel · 125.75 MB WASM q8 · MIT

indobert-base-p1 — Indonesian Foundation Encoder in Your Browser

Indonesian 12-layer uncased BertModel foundation encoder trained on the 23.43 GB Indo4B corpus (125.75 MB q8 CPU WASM via shared ../../lib/webai.js on @huggingface/transformers@3.7.5) for 768-d semantic embeddings, Indonesian affix tokenization, and Nusantara clustering.

Model Card & Runtime Contract

Loaded ONNX Repo
Xenova/indobert-base-p1
Task & Output
feature-extraction · [N, 768] L2-normalized vectors
Backend & Quant
WASM · q8 (125.04 MB ONNX + 0.71 MB tok = 125.75 MB)
Architecture
12L · 12H · 768-d · 3,072 FFN · 124.5M params · 30,521 WordPiece (config 50,000)
Corpus & License
Indo4B (23.43 GB) · 512 max_position · MIT
Bare BertModel Encoder (No [MASK] MLM Head): Xenova/indobert-base-p1 exports the 12-layer BertModel backbone for feature-extraction rather than BertForMaskedLM — it does not ship a vocabulary projection head for fill-mask. Its Indonesian uncased WordPiece dictionary contains 30,521 tokens (vocab.txt / tokenizer.json, with config.json padding capacity vocab_size: 50000 and custom special IDs [PAD]=0, [UNK]=1, [CLS]=2, [SEP]=3, [MASK]=4).

Load & Cache Status

Live Indonesian Semantic Scorer & Similarity Matrix

Drop, paste, or upload a .txt, .md, .csv, or .json list of Indonesian sentences.

Ranked Indonesian Cosine Similarity

Load the model to embed and rank Indonesian sentences locally.

    2D PCA Indonesian Constellation

    Diamond marks the anchor sentence; dashed rays connect top-3 closest Indonesian matches.

    See Inside the Model (768-d Tensor & Indo4B WordPiece)

    768-d Embedding Sparkline & Distribution

    Run inference to inspect live 768-d coordinate min, max, mean, std, and L2 norm.

    Pairwise Cosine Heatmap (All Sentences)

    Live Indonesian WordPiece (30,521 Vocab) & Affix Fertility Audit

    Inspects real uncased Indonesian WordPiece IDs ([CLS]=2, [SEP]=3, [UNK]=1, [PAD]=0) before truncation.

    Per-sentence register, WordPiece token count, fertility, [UNK] count, L2 norm, and cosine score
    ID Register Tokens Fertility [UNK] Window Norm Cosine
    Awaiting live inference…

    Why It Matters & Minimal Browser API

    Multilingual models often over-fragment Indonesian agglutinative affixes (meN-, di-, ber-, ke-…-an) and Jakarta slang (bahasa gaul). Because indobert-base-p1 was trained specifically on 23.43 GB of Indo4B news, Wikipedia, social media, and web text, whole Indonesian stems and slang terms stay compact inside a 125.75 MB browser download:

    import { pipeline } from "@huggingface/transformers";
    
    const extractor = await pipeline("feature-extraction", "Xenova/indobert-base-p1", {
      device: "wasm",
      dtype: "q8",
    });
    const out = await extractor(
      ["Pembayaran tagihan listrik gagal.", "Transaksi PLN tidak berhasil."],
      { pooling: "mean", normalize: true },
    );
    // out.dims -> [2, 768] L2-normalized Float32Array vectors

    Show the Code (Exact Worker & Pooling Pipeline)

    Show the code: Off-main-thread feature-extraction + mean/CLS pooling (worker.js)
    Show the code: FIFO IndobertEngine lifecycle & dispose client (indobert.js)

    References