MiniLM_L6_v2_Text / README.md
Neelesh-Babu's picture
Match approved DINO minimal schema-v3 public package layout
26927b3 verified
|
Raw History Blame Contribute Delete
4.74 kB
---
pipeline_tag: feature-extraction
tags:
- eidora
- eidora-model-zoo
- onnx
- onnxruntime
- embeddings
- text
- modality:text
- minilm
license: apache-2.0
base_model: sentence-transformers/all-MiniLM-L6-v2
---
# MiniLM L6 v2 — Sentence Embeddings
MiniLM L6 v2 is a compact sentence-embedding model. EIDORA converts sentences into normalized 384-dimensional vectors for semantic comparison.
## Training Data and Checkpoint Provenance
- **Architecture:** Six-layer MiniLM Transformer with sentence-level mean pooling.
- **Original checkpoint:** [sentence-transformers/all-MiniLM-L6-v2](https://huggingface.co/sentence-transformers/all-MiniLM-L6-v2).
- **Pinned revision:** `1110a243fdf4706b3f48f1d95db1a4f5529b4d41`.
- **Training data:** Sentence-pair training data described by the upstream Sentence Transformers model card.
- **Training method:** Sentence-pair training described in the upstream Sentence Transformers model card.
- **Source:** all-MiniLM-L6-v2 (original author attribution retained).
## Model Overview
- **Model:** MiniLM L6 v2 — Sentence Embeddings
- **EIDORA identifier:** `eidora/text-minilm-l6-v2-light`
- **Modality:** Text
- **Embedding dimensions:** 384
- **Embedding normalization:** L2-normalized
- **Similarity measure:** Cosine similarity
- **Package schema:** Version 3
- **Model version:** `1.0.0`
## EIDORA Use and Supported Modalities
**Supported modality:** Text only.
Researchers can use this package to:
- Compare short sentences by semantic similarity.
- Build simple text retrieval or search workflows.
- Cluster or explore groups of related passages.
## Input and Preprocessing
EIDORA reads UTF-8 text and uses its packaged tokenizer from `tokenizer/`.
1. Add model-specific special tokens.
2. Pad or truncate to **256 tokens**, using right-side padding and right-side truncation.
3. Pass integer `input_ids` (sourced from `token_ids`) and `attention_mask` tensors to ONNX.
**Input tensor shapes:** `[batch, 256]` for each input, dtype `int64`. The tokenizer and its configuration are included in the repository. Text beyond the configured maximum is truncated; callers should chunk longer inputs when needed.
## Output Embeddings
The ONNX output is `float32` with shape `['batch', 384]`. Each vector has **384 dimensions**, is **L2-normalized**, and is intended for **cosine similarity** comparisons.
EIDORA encodes text using the packaged tokenizer and performs attention-mask-aware mean pooling with L2 normalization.
## Runtime and Compatibility
The package contains `model.onnx`, its tokenizer files and schema-v3 text input preparation.
It declares **`CPUExecutionProvider`**. Actual execution availability depends on the installed ONNX Runtime and EIDORA Desktop environment. `config.yaml` is authoritative for graph inputs, preprocessing, provider and embedding dimensions.
## Limitations
- Long text is truncated at 256 tokens unless it is split into chunks.
- Similarity is not a measurement of factual correctness or truth.
- The original training distribution can differ from a specialized collection.
Results should be evaluated against the intended research data and questions.
## Research Context and References
### Main paper
**Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks**
Paper: https://aclanthology.org/D19-1410/
The publication describes the upstream learning method and original model. The embeddings returned by EIDORA additionally depend on the specific preprocessing and output adaptation documented here.
### Primary citation (BibTeX)
```bibtex
@inproceedings{reimers-2019-sentence-bert,
title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
author = "Reimers, Nils and Gurevych, Iryna",
booktitle = "Proceedings of EMNLP-IJCNLP",
year = "2019",
pages = "3982--3992",
url = "https://aclanthology.org/D19-1410/"
}
```
## License and Attribution
The upstream sentence-transformers/all-MiniLM-L6-v2 checkpoint is distributed under Apache License 2.0. See the included `LICENSE`. EIDORA credits the Sentence Transformers contributors and provides the ONNX adaptation.
See the `LICENSE` file included in this repository.
## Package Information
- **Model repository:** `EIDORA/MiniLM_L6_v2_Text`
- **Package version:** `1.0.0`
- **Package schema:** `3`
- **EIDORA configuration:** `config.yaml`
- **ONNX graph(s):** `model.onnx`
- **Supported modality:** Text
- **License identifier:** `apache-2.0`
- **Declared provider:** CPUExecutionProvider
- **Required supplementary files:** `tokenizer/` (packaged tokenizer), `LICENSE`
The configuration defines the authoritative model-facing runtime contract. Other packaged assets, where present, do not introduce additional inference modalities.