File size: 4,739 Bytes
aa841fb
 
 
26927b3
 
 
 
 
 
 
 
 
 
aa841fb
 
 
 
26927b3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
aa841fb
26927b3
aa841fb
26927b3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
aa841fb
 
 
26927b3
 
 
aa841fb
26927b3
aa841fb
26927b3
aa841fb
26927b3
 
 
 
 
 
 
 
 
aa841fb
 
 
 
 
 
 
 
 
 
 
 
26927b3
 
 
 
 
 
 
aa841fb
26927b3
 
 
 
 
 
 
 
 
aa841fb
26927b3
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
---
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.