An open API service indexing awesome lists of open source software.

https://github.com/palnavneet/sheep

A android library for running Nlp models.
https://github.com/palnavneet/sheep

android distilbert kotlin nlp onnx

Last synced: 6 months ago
JSON representation

A android library for running Nlp models.

Awesome Lists containing this project

README

          

๐Ÿ‘ Sheep: An Android Library for Running NLP Models

๐Ÿšง Under Development




Sheep lets you run popular NLP models like DistilBERT directly on Android using ONNX Runtime.
It comes with built-in tokenizers (like WordPiece) and also supports custom pipelines and tokenizers out of the box.


---

| ๐Ÿง  Model | โš™๏ธ Type | ๐Ÿงฉ Pipelines Supported | ๐Ÿ”ค Tokenizer Support | ๐Ÿ“Š Status |
|---------------|------------------|-------------------------------|------------------------------|-----------------|
| [DistilBERT](https://huggingface.co/distilbert/distilbert-base-uncased) | Transformer | TextSimilarity, Custom | WordPiece, Custom | โœ… Working |
| [BERT (Planned)](https://huggingface.co/bert-base-uncased) | Classifier | TextClassification | WordPiece, SentencePiece | ๐Ÿšง Planned |
| [RoBERTa (Planned)](https://huggingface.co/roberta-base) | QA Model | QuestionAnswering | WordPiece | ๐Ÿšง Planned |
| [GPT-2 (Planned)](https://huggingface.co/gpt2) | Decoder | TextGeneration, Summarizer | BPE | ๐Ÿงช In Design |

---


## โš™๏ธ Basic Usage

```kotlin
val sheep = Sheep(
context = context,
pipeline = PipelineType.TextSimilarity("Hello", "World"),
tokenizer = TokenizerType.WordPiece
)

sheep.run(
assetModelFileName = "distilbert.onnx",
assetVocabFileName = "vocab.txt"
)
```


### ๐Ÿšง 3. **Roadmap**

```md
## ๐Ÿšง Roadmap

- [x] DistilBERT support
- [x] Text similarity pipeline
- [x] WordPiece tokenizer
- [ ] Add text classification pipeline
- [ ] Add GPT-style decoder model support
- [ ] SentencePiece / BPE tokenizer
- [ ] Upload to Maven Central
```


## ๐Ÿ“„ License

This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for more details.