Views
No views yet
microsoft/harrier-oss-v1-0.6b,
fine-tuned for Arabic semantic similarity with
Matryoshka Representation Learning.| Field | Value |
|---|---|
| Base model | microsoft/harrier-oss-v1-0.6b |
| Parameters | ~0.6B |
| Full embedding dimension | 1024 |
| Matryoshka dims | 1024, 768, 512, 256, 128, 64 |
| Max sequence length | 32,768 |
| Pooling | inherited from base |
| Language | Arabic (cross-lingual capabilities inherited from base) |
1from sentence_transformers import SentenceTransformer
2
3model = SentenceTransformer(
4 "Omartificial-Intelligence-Space/Harrier-Arabic-Matryoshka-0.6B",
5 trust_remote_code=True,
6)
7
8sentences = [
9 "تعلم اللغة العربية ممتع ومثير.",
10 "دراسة العربية تجربة شيقة.",
11 "القطط تحب اللعب في الحديقة.",
12]
13
14embeddings = model.encode(sentences, normalize_embeddings=True)
15print(embeddings.shape) # (3, 1024)1from sentence_transformers import SentenceTransformer
2
3model = SentenceTransformer(
4 "Omartificial-Intelligence-Space/Harrier-Arabic-Matryoshka-0.6B",
5 trust_remote_code=True,
6 truncate_dim=256, # one of: 1024, 768, 512, 256, 128, 64
7)
8
9embeddings = model.encode(["..."], normalize_embeddings=True)
10print(embeddings.shape) # (1, 256)1from sentence_transformers import SentenceTransformer
2from sentence_transformers.util import cos_sim
3
4model = SentenceTransformer(
5 "Omartificial-Intelligence-Space/Harrier-Arabic-Matryoshka-0.6B",
6 trust_remote_code=True,
7)
8
9a = model.encode("تعلم اللغة العربية ممتع ومثير.", normalize_embeddings=True)
10b = model.encode("دراسة العربية تجربة شيقة.", normalize_embeddings=True)
11print(cos_sim(a, b))1@misc{harrieross,
2 title = {Harrier OSS v1},
3 author = {Microsoft},
4 url = {https://huggingface.co/microsoft/harrier-oss-v1-0.6b}
5}
6
7@inproceedings{kusupati2022matryoshka,
8 title = {Matryoshka Representation Learning},
9 author = {Kusupati, Aditya and others},
10 booktitle = {NeurIPS},
11 year = {2022}
12}microsoft/harrier-oss-v1-0.6b
for terms.