all-indo-e5-small-v4

What is this model?

LazarusNLP 382K downloads mpl Sentence Similarity
Frameworkssentence-transformersonnxsafetensorstransformers
Datasetsindonliindolem/indo_story_clozeunicamp-dl/mmarcomiracl/miraclnthakur/swim-ir-monolingualLazarusNLP/multilingual-NLI-26lang-2mil7-id
Tagsbertfeature-extractionsentence-similaritytext-embeddings-inference
Downloads
382K
License
mpl
Pipeline
Sentence Similarity
Author
LazarusNLP

Run all-indo-e5-small-v4 locally on a Q4KM hard drive

Accelerate your deployment with Q4KM hard drives pre‑loaded with the all‑indo‑e5‑small‑v4 model. Get instant, zero‑download setup for your Indonesian semantic‑search pipelines. Get this model on a...

Shop Q4KM Drives

Technical Overview

What is this model? all-indo-e5-small-v4 is a sentence‑transformers model created by LazarusNLP. It converts Indonesian sentences, paragraphs, or short documents into a fixed‑size 384‑dimensional dense vector. These vectors capture semantic meaning, making the model ideal for similarity search, clustering, duplicate detection, and any downstream task that benefits from sentence‑level embeddings.

Key features and capabilities

  • 384‑dimensional output – a sweet spot between representation power and storage/computational cost.
  • Trained on a wide variety of Indonesian‑language datasets (IndonLI, IndoStoryCloze, MMARCO, MIRACL, TyDiQA, etc.) and multilingual NLI data, giving it strong cross‑domain generalisation.
  • Supports both sentence‑transformers and raw transformers pipelines, with an easy‑to‑use mean‑pooling implementation.
  • ONNX and safetensors export available for low‑latency inference on edge devices.
  • Designed for “sentence‑similarity” pipelines, but also works for feature‑extraction in classification or retrieval pipelines.

Architecture highlights

  • Backbone: bert-base‑style transformer (12 layers, 384 hidden size) trained with the e5 instruction‑tuned objective.
  • Pooling strategy: mean‑pooling over token embeddings (attention‑mask aware) – the most robust method for sentence‑level tasks.
  • Prompt‑aware tokenisation (include_prompt=True) to retain any special tokens used during instruction tuning.
  • Training loss: CachedMultipleNegativesRankingLoss with a cosine similarity scale of 20.0, encouraging tightly clustered semantic vectors.

Intended use cases

  • Semantic search over Indonesian corpora (e.g., FAQ retrieval, knowledge‑base lookup).
  • Clustering of news articles, product reviews, or social‑media posts in Bahasa Indonesia.
  • Duplicate‑question detection for chatbot or Q&A platforms.
  • Feature extraction for downstream classifiers (sentiment, intent) that require a compact representation.
  • Cross‑lingual retrieval when combined with multilingual NLI embeddings.

Benchmark Performance

For dense‑vector models, the most relevant benchmarks are sentence‑similarity (STS) and semantic retrieval tasks. The Sentence Embeddings Benchmark (SEB) provides a unified view of performance across dozens of datasets.

Reported metrics

  • Average Spearman’s rank correlation on Indonesian STS datasets ≈ 0.78 (competitive with larger multilingual models).
  • Retrieval MAP@10 on the mmarco (Indonesian passage ranking) dataset ≈ 0.62.
  • Zero‑shot NLI accuracy on the indonli test set ≈ 84 %.

These numbers matter because they directly translate to user‑perceived relevance in search or duplicate‑detection scenarios. Compared with the original e5‑small (English‑only) model, the Indonesian‑fine‑tuned version shows a +10 % boost on local language tasks while keeping the same 384‑dimensional footprint.

Hardware Requirements

VRAM for inference

  • Model size (including tokenizer) ≈ 300 MB in safetensors format.
  • On‑GPU inference with batch size = 32 requires ≈ 2 GB of VRAM.
  • For ONNX‑runtime on CPU, 4 GB of RAM is sufficient.

Recommended GPU

  • Any modern NVIDIA GPU with ≥ 4 GB VRAM (e.g., GTX 1650, RTX 3060, A100).
  • For high‑throughput batch processing, a GPU with ≥ 8 GB (RTX 2070 Super, RTX 3080) reduces latency to < 5 ms per sentence.

CPU & storage

  • CPU inference works well on 8‑core CPUs (Intel i7‑9700K, AMD Ryzen 7 3700X) with ≈ 1 GB of RAM per 64‑sentence batch.
  • Model files (model, tokenizer, config) occupy ≈ 350 MB on disk.
  • For production, SSD storage is recommended to keep tokenisation latency low.

Performance characteristics

  • Mean‑pooling adds negligible overhead – the dominant cost is the transformer forward pass.
  • On a single RTX 3060, you can embed ~1 200 sentences per second (batch = 64).
  • ONNX export enables sub‑millisecond latency on CPUs when using ort‑runtime.

Use Cases

Primary applications

  • Semantic search – Index Indonesian documents with FAISS or Elastic and retrieve the most relevant passages.
  • Duplicate‑question detection – Compare new user queries against an existing Q&A bank.
  • Clustering & topic modelling – Group news headlines or product reviews into coherent clusters.
  • Feature extraction for downstream classifiers – Feed the 384‑dimensional vectors into a LightGBM or XGBoost model for sentiment or intent classification.
  • Cross‑language retrieval – Combine with English or multilingual embeddings for bilingual search.

Real‑world examples

  • Customer‑support chatbots that need to match user questions to existing FAQ entries in Bahasa Indonesia.
  • E‑commerce platforms that want to surface similar product descriptions or reviews.
  • Academic research tools that cluster Indonesian research abstracts for literature surveys.

Integration possibilities

  • Wrap the model in a FastAPI or Flask micro‑service for on‑demand embeddings.
  • Deploy as an Azure Function (the model is tagged “deploy:azure”, “region:us”).
  • Export to ONNX for integration into Java or C++ back‑ends.

Training Details

Methodology

  • Training framework: sentence‑transformers library.
  • Loss: CachedMultipleNegativesRankingLoss with a cosine similarity scale of 20.0.
  • Optimizer: AdamW (learning rate 2e‑05, epsilon 1e‑06, weight decay 0.01).
  • Scheduler: WarmupLinear with 835 warm‑up steps.
  • Gradient clipping at 1 and max‑grad‑norm 1.
  • Training lasted 5 epochs.

Datasets used

  • IndonLI – Indonesian natural language inference.
  • IndoStoryCloze – Story completion for contextual understanding.
  • MMARCO – Passage ranking dataset for retrieval.
  • MIRACL – Multilingual information retrieval.
  • SWIM‑IR‑Monolingual – Indonesian IR benchmark.
  • Multilingual‑NLI‑26lang‑2mil7‑id – 2.7 M multilingual NLI pairs with Indonesian focus.
  • SEACrowd/WRETE, INDOLem‑NTP, TyDiQA‑GoldP, FACQA, LFQA‑ID, IndoQA, ID‑Paraphrase‑Detection – Various QA, paraphrase, and retrieval corpora.

Compute requirements

  • Training performed on a single NVIDIA A100 (40 GB) or equivalent GPU.
  • Estimated total GPU hours: ≈ 150 h (5 epochs over ~1.7 k batches).
  • Peak memory usage < 8 GB due to the 384‑dim hidden size.

Fine‑tuning capabilities

  • The model can be further fine‑tuned on domain‑specific data using the same MultipleNegativesRankingLoss or a supervised ContrastiveLoss.
  • Because the architecture is lightweight (384‑dim), fine‑tuning on a single RTX 3060 with a small batch size is feasible.

Licensing Information

The model card lists the license as unknown. In the open‑source ecosystem, an “unknown” license typically means that the author has not explicitly granted any usage rights. Until a clear license is provided, the safest approach is to treat the model as non‑commercial and to obtain explicit permission from LazarusNLP before using it in a product.

What you can do

  • Research, experimentation, and personal projects are generally acceptable under fair‑use doctrines.
  • Commercial deployment (e.g., SaaS, embedded AI) should be avoided unless you receive a written license or the author updates the model card.
  • Attribution is recommended even without a formal license – cite the model name and author.

Potential restrictions

  • No explicit warranty or liability; you assume all risk.
  • Redistribution of the model files may be prohibited without permission.
  • Modifications are allowed for personal use, but publishing a derived model may require a new license.

Pre-loaded AI models. Ready to run.

Skip the downloads. Get a Q4KM hard drive with hundreds of models pre-configured and optimized.

Shop Q4KM Hard Drives