Downloads · 30 days
0
adelpro/atm-v2-int8-onnx
atm-v2-int8-onnx is a feature extraction model from adelpro. Use it when you need embeddings to search or compare text. It is set up for onnx. The card lists the license as apache-2.0.
This is an INT8 dynamic-quantized ONNX export of Omartificial-Intelligence-Space/Arabic-Triplet-Matryoshka-V2, the state-of-the-art Arabic embedding model (ATM2). It is the runtime model bundled on-device by the open-…
Downloads · 30 days
0
Access
Public
Updated Aug 6, 2026
Repo size
135 MB
Likes
0
Public
Click a slice to open those files.
.onnx135 MB · 99%
From the Hugging Face model README
This is an INT8 dynamic-quantized ONNX export of
Omartificial-Intelligence-Space/Arabic-Triplet-Matryoshka-V2, the
state-of-the-art Arabic embedding model (ATM2). It is the runtime model
bundled on-device by the open-mushaf Quran reader app for its "بالذكاء
الاصطناعي" (AI) semantic-search tab.
The model maps Arabic sentences and verses to a 768-dimensional dense vector space for semantic search, similarity, IR, and clustering. It is fine-tuned from aubmindlab/bert-base-arabertv02 and described in the paper GATE: General Arabic Text Embedding for Enhanced Semantic Textual Similarity with Hybrid Loss Training.
Arabic-Triplet-Matryoshka-V2-Model is a state-of-the-art Arabic language embedding model based on the sentence-transformers framework and specifically designed to capture the rich semantic nuances of Arabic text.
| Attribute | Value |
|---|---|
| Base model | aubmindlab/bert-base-arabertv02 |
| Embedding dimension | 768 |
| Parameters | 135M |
| Pretrained model format | fp32 safetensors |
| This export | INT8 dynamic-quantized ONNX (~135 MB, graph opset 17) |
| License | Apache-2.0 |
onnxruntime-react-native.MatryoshkaLoss + MultipleNegativesRankingLoss.akhooli/arabic-triplets-1m-curated-sims-len (1M samples).From the original model card (Arabic semantic similarity benchmarks):
| Model | Dim | Params | STS17 | STS22-v2 | Avg |
|---|---|---|---|---|---|
| ATM-V2 (this repo base) | 768 | 135M | 85 | 64 | 75 |
See the upstream
Omartificial-Intelligence-Space/Arabic-Triplet-Matryoshka-V2
card for the full comparison table.
This repo hosts the native flat layout consumed by the React Native
app via expo-file-system + onnxruntime-react-native:
model.int8.onnx (~135 MB, INT8 dynamic-quantized)
tokenizer.json
tokenizer_config.json
special_tokens_map.json
These 4 files are streamed to the app cache on first AI-search use and reused
offline afterwards. A companion web layout lives in
adelpro/atm-v2-web.
import { InferenceSession, Tensor } from 'onnxruntime-react-native';
const session = await InferenceSession.create(modelPath, {
executionProviders: ['cpu'],
graphOptimizationLevel: 'all',
});
// Tokenize with the matching tokenizer.json, build input_ids + attention_mask.
const results = await session.run({ input_ids, attention_mask });
// Mean-pool the last hidden state over non-pad tokens, then L2-normalize
// to get the 768-dim embedding — identical to what the web runtime produces,
// so the two platforms share one vector space.
const embedding = meanPoolL2Normalize(results);
Note: the vector index built for this model uses mean pooling + L2 normalization with no
query:/passage:prefixes (the upstream model card shows plainencode(), not an E5-style prefix convention). Keep query and stored passages in the same unprefixed space.
Intended for research and applications that benefit Arabic language processing. Biases that may exist in the training data should be considered.
Cite the upstream paper when referencing this model's methodology:
@article{nacar2025gate,
title={GATE: General Arabic Text Embedding for Enhanced Semantic Textual Similarity with Matryoshka Representation Learning and Hybrid Loss Training},
author={Nacar, Omer and Koubaa, Anis and Sibaee, Serry and Al-Habashi, Yasser and Ammar, Adel and Boulila, Wadii},
journal={arXiv preprint arXiv:2505.24581},
year={2025}
}
Built on aubmindlab/bert-base-arabertv02 and the akhooli/arabic-triplets-1m-curated-sims-len dataset.
Derived from Omartificial-Intelligence-Space/Arabic-Triplet-Matryoshka-V2 (Apache-2.0). This ONNX export is the on-device runtime model for the open-mushaf-native Quran reader.