File size: 2,641 Bytes
33f0155 382e43c 33f0155 382e43c | 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 | ---
base_model: sentence-transformers/all-MiniLM-L6-v2
library_name: mobiletransformers
pipeline_tag: text-classification
tags:
- mobiletransformers
- onnx
- on-device
- android
- lora
- int4
---

# sentence-transformers/all-MiniLM-L6-v2 β MobileTransformers package
On-device (Android) package exported from **sentence-transformers/all-MiniLM-L6-v2** with MobileTransformers.
## What this package can do
- `core` β shared files every other group needs
- `inference` β generate or score on device
- `train` β **fine-tune on device**, then merge the adapter back into the base weights
- `rag` β retrieve over documents you ingest, and ground answers in them
## Fine-tuning method
- **lora** β LoRA β low-rank adapters on the attention projections.
- Rank: `8`
- Adapted modules: `query`, `value`
## Provenance
- Base model: `sentence-transformers/all-MiniLM-L6-v2`
- Selected task: `text-classification`
- Quantization: int4
- Toolchain: optimum-onnx 0.1.0, transformers 4.57.6, ort-training 1.23.0+cpu
## Licenses
- Framework: not declared in this package β see the repository
- Base model weights: see the base model above (this package redistributes an export of those weights, so their terms govern its contents)
## Android runtime
- Minimum API: 28
- Required ABIs: any
## Variants
| id | EP | quant | engines | features | min API | rec. RAM (MB) |
| --- | --- | --- | --- | --- | --- | --- |
| cpu-int4 | cpu | int4 | native | core, inference, train, rag | 28 | β |
Default variant: `cpu-int4`.
## Running this model
This is a **MobileTransformers package**, not a plain Hugging Face model: it is a manifest plus per-variant ONNX stages and a weight-handoff map. `transformers`, `optimum` and plain `onnxruntime` cannot load it. Use the framework:
**https://github.com/martinkorelic/mobiletransformers**
```kotlin
// Android β pulls, verifies and installs on first use.
val model = MobileTransformers.fromPretrained(
context = context,
repoId = "mobiletransformers/all-MiniLM-L6-v2",
)
```
```bash
# Host β download and inspect the package without a device.
mobiletransformers pull --repo-id mobiletransformers/all-MiniLM-L6-v2
```
## Citation
If you are using this framework for your own work, please cite:
```bibtex
@misc{mobiletransformers2025,
author = {Koreli\v{c}, Martin and Pejovi{\'c}, Veljko},
title = {MobileTransformers: An On-Device LLM PEFT Framework for Fine-Tuning and Inference},
year = {2025},
howpublished = {\url{https://gitlab.fri.uni-lj.si/lrk/mobiletransformers}}
}
```
|