Update README.md
Browse files
README.md
CHANGED
|
@@ -1,3 +1,135 @@
|
|
| 1 |
-
---
|
| 2 |
-
license: apache-2.0
|
| 3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
language:
|
| 4 |
+
- my
|
| 5 |
+
pipeline_tag: sentence-similarity
|
| 6 |
+
tags:
|
| 7 |
+
- sentence-transformers
|
| 8 |
+
- sentence-similarity
|
| 9 |
+
- feature-extraction
|
| 10 |
+
- dense
|
| 11 |
+
- generated_from_trainer
|
| 12 |
+
- myanmar
|
| 13 |
+
- burmese
|
| 14 |
+
- nlp
|
| 15 |
+
library_name: sentence-transformers
|
| 16 |
+
dataset_size: 500000
|
| 17 |
+
loss: MSELoss
|
| 18 |
+
base_model: sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2
|
| 19 |
+
widget:
|
| 20 |
+
- source_sentence: ▁ထို့ကြောင့် ကြော်ငြာ ရှင် သည် နှိပ် လိုက်ပါ ကသာ ပေးချေ လိမ့်မည်။
|
| 21 |
+
sentences:
|
| 22 |
+
- ▁ကိုယ်ပိုင် စိတ်ကူး ဉာဏ် ဖြင့် ▁တီထွင် ရေးသား နိုင်သည်။
|
| 23 |
+
- ▁ထိုအရာ အားလုံးက ▁အလွန် စိတ်လေး စရာ၊ ▁ကြောက်စရာကောင်း လှ သည်ဟု ▁ခံစား မိသည်။
|
| 24 |
+
datasets:
|
| 25 |
+
- DatarrX/myX-Mega-Corpus
|
| 26 |
+
---
|
| 27 |
+
|
| 28 |
+
# 📝 myX-Semantic-Light: An Efficient Burmese Sentence Embedding Model
|
| 29 |
+
|
| 30 |
+
## Model Description
|
| 31 |
+
**myX-Semantic-Light** is a lightweight sentence-transformer model optimized for the Burmese (Myanmar 🇲🇲) language. It is designed for high-speed inference and low-resource environments while maintaining robust semantic understanding.
|
| 32 |
+
|
| 33 |
+
This model was trained using **Knowledge Distillation** from a multilingual teacher model. It maps Burmese sentences into a **384-dimensional dense vector space**, making it twice as memory-efficient as the standard 768-dimensional versions.
|
| 34 |
+
|
| 35 |
+
### Key Applications
|
| 36 |
+
* **Real-time Semantic Search:** Ideal for mobile or edge applications requiring fast retrieval.
|
| 37 |
+
* **Efficient Clustering:** Grouping large-scale Burmese datasets with reduced memory overhead.
|
| 38 |
+
* **Similarity Scoring:** Determining the relationship between short phrases and sentences.
|
| 39 |
+
|
| 40 |
+
## Development & Distribution
|
| 41 |
+
* **Developed by:** [Khant Sint Heinn (Kalix Louis)](https://huggingface.co/kalixlouiis)
|
| 42 |
+
* **Published by:** [DatarrX (Myanmar Open Source NGO)](https://huggingface.co/DatarrX)
|
| 43 |
+
* **Training Dataset:** [DatarrX/myX-Mega-Corpus](https://huggingface.co/datasets/DatarrX/myX-Mega-Corpus) (500,000 Rows)
|
| 44 |
+
* **Tokenization:** Processed using [DatarrX/myX-Tokenizer](https://huggingface.co/DatarrX/myX-Tokenizer).
|
| 45 |
+
|
| 46 |
+
## Technical Specifications
|
| 47 |
+
- **Base Model:** `sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2`
|
| 48 |
+
- **Max Sequence Length:** 128 tokens (Optimized for short-to-medium text)
|
| 49 |
+
- **Output Dimension:** 384 dimensions
|
| 50 |
+
- **Similarity Function:** Cosine Similarity
|
| 51 |
+
- **Loss Function:** MSELoss
|
| 52 |
+
|
| 53 |
+
### Model Architecture
|
| 54 |
+
```text
|
| 55 |
+
SentenceTransformer(
|
| 56 |
+
(0): Transformer({'max_seq_length': 128, 'do_lower_case': False, 'architecture': 'BertModel'})
|
| 57 |
+
(1): Pooling({'word_embedding_dimension': 384, 'pooling_mode_mean_tokens': True})
|
| 58 |
+
)
|
| 59 |
+
```
|
| 60 |
+
|
| 61 |
+
## Usage
|
| 62 |
+
|
| 63 |
+
### Installation
|
| 64 |
+
```bash
|
| 65 |
+
pip install -U sentence-transformers
|
| 66 |
+
```
|
| 67 |
+
|
| 68 |
+
### Direct Usage (Inference)
|
| 69 |
+
```python
|
| 70 |
+
from sentence_transformers import SentenceTransformer, util
|
| 71 |
+
|
| 72 |
+
# Load the lightweight model
|
| 73 |
+
model = SentenceTransformer("DatarrX/myX-Semantic-Light")
|
| 74 |
+
|
| 75 |
+
sentences = [
|
| 76 |
+
"ဝက်ခြံ ပျောက်ကင်းအောင် ဘယ်လိုလုပ်ရမလဲ။",
|
| 77 |
+
"မျက်နှာ အသားအရေ ထိန်းသိမ်းနည်းများ",
|
| 78 |
+
"နည်းပညာ သတင်းများ ဖတ်ရှုရန်"
|
| 79 |
+
]
|
| 80 |
+
|
| 81 |
+
embeddings = model.encode(sentences)
|
| 82 |
+
similarities = model.similarity(embeddings, embeddings)
|
| 83 |
+
print(similarities)
|
| 84 |
+
```
|
| 85 |
+
|
| 86 |
+
## Implementation Guidelines (Thresholds)
|
| 87 |
+
Because this model is a lightweight variant trained on a smaller subset (500K rows), its score distribution differs slightly from the 1M SOTA version.
|
| 88 |
+
|
| 89 |
+
* **Recommended Threshold:** A Cosine Similarity score of **0.40 or higher** is generally sufficient to indicate a semantic relationship.
|
| 90 |
+
* **Note:** For tasks requiring higher precision and deeper contextual reasoning, we recommend using the larger [myX-Semantic](https://huggingface.co/DatarrX/myX-Semantic) (1M) version with a threshold of 0.60.
|
| 91 |
+
|
| 92 |
+
## Training Details
|
| 93 |
+
* **Samples:** 500,000 training pairs.
|
| 94 |
+
* **Batch Size:** 64
|
| 95 |
+
* **Epochs:** 1
|
| 96 |
+
* **Optimizer:** AdamW (`adamw_torch_fused`)
|
| 97 |
+
* **Training Time:** ~37 minutes on multi-GPU setup.
|
| 98 |
+
|
| 99 |
+
### Training Logs
|
| 100 |
+
| Epoch | Step | Training Loss |
|
| 101 |
+
| :--- | :--- | :--- |
|
| 102 |
+
| 0.13 | 500 | 0.0035 |
|
| 103 |
+
| 0.51 | 2000 | 0.0029 |
|
| 104 |
+
| 0.90 | 3500 | 0.0027 |
|
| 105 |
+
|
| 106 |
+
## Limitations & Bias
|
| 107 |
+
* **Encoding:** Optimized for Unicode Burmese. Zawgyi encoding is not supported.
|
| 108 |
+
* **Sequence Length:** Performance may degrade for documents longer than 128 tokens due to the sequence length constraint during training.
|
| 109 |
+
|
| 110 |
+
## License
|
| 111 |
+
This model is licensed under the **Apache License 2.0**.
|
| 112 |
+
|
| 113 |
+
## Citation
|
| 114 |
+
```bibtex
|
| 115 |
+
@software{khantsintheinn2026myxsemantic_light,
|
| 116 |
+
author = {Khant Sint Heinn},
|
| 117 |
+
title = {myX-Semantic-Light: An Efficient Burmese Sentence Embedding Model},
|
| 118 |
+
year = {2026},
|
| 119 |
+
publisher = {DatarrX},
|
| 120 |
+
url = {[https://huggingface.co/DatarrX/myX-Semantic-Light}
|
| 121 |
+
}
|
| 122 |
+
```
|
| 123 |
+
|
| 124 |
+
## About the Author
|
| 125 |
+
|
| 126 |
+
**Khant Sint Heinn**, working under the name **Kalix Louis**, is a **Machine Learning Engineer focused on Natural Language Processing (NLP), data foundations, and open-source AI development**. His work is centered on improving support for the Burmese (Myanmar) language in modern AI systems by building high-quality datasets, practical tools, and scalable infrastructure for language technology.
|
| 127 |
+
|
| 128 |
+
He is currently the **Lead Developer at DatarrX**, where he develops data pipelines, manages large-scale data collection workflows, and helps create open-source resources for researchers, developers, and organizations. His experience includes data engineering, web scripting, dataset curation, and building systems that support real-world machine learning applications.
|
| 129 |
+
|
| 130 |
+
Khant Sint Heinn is especially interested in advancing low-resource languages and making AI more accessible to underrepresented communities. Through his open-source contributions, he works to strengthen the Burmese (Myanmar) tech ecosystem and provide reliable building blocks for future language models, search systems, and intelligent applications.
|
| 131 |
+
|
| 132 |
+
His goal is simple: to turn limited language resources into practical opportunities through clean data, useful tools, and community-driven innovation.
|
| 133 |
+
|
| 134 |
+
**Connect with the Author:**
|
| 135 |
+
[GitHub](https://github.com/kalixlouiis) | [Hugging Face](https://huggingface.co/kalixlouiis) | [Kaggle](https://www.kaggle.com/organizations/kalixlouiis)
|