{"id":13628324,"url":"https://github.com/huggingface/tflite-android-transformers","last_synced_at":"2025-04-17T04:31:48.943Z","repository":{"id":41183361,"uuid":"221548664","full_name":"huggingface/tflite-android-transformers","owner":"huggingface","description":"DistilBERT / GPT-2 for on-device inference thanks to TensorFlow Lite with Android demo apps","archived":true,"fork":false,"pushed_at":"2023-07-25T06:47:24.000Z","size":93306,"stargazers_count":405,"open_issues_count":16,"forks_count":86,"subscribers_count":61,"default_branch":"master","last_synced_at":"2025-04-11T21:57:36.910Z","etag":null,"topics":["android","nlp","tensorflow","tensorflow-lite","transformers"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/huggingface.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-11-13T20:47:21.000Z","updated_at":"2025-03-21T14:39:47.000Z","dependencies_parsed_at":"2024-08-01T22:51:51.095Z","dependency_job_id":null,"html_url":"https://github.com/huggingface/tflite-android-transformers","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/huggingface%2Ftflite-android-transformers","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/huggingface%2Ftflite-android-transformers/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/huggingface%2Ftflite-android-transformers/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/huggingface%2Ftflite-android-transformers/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/huggingface","download_url":"https://codeload.github.com/huggingface/tflite-android-transformers/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249315933,"owners_count":21249860,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["android","nlp","tensorflow","tensorflow-lite","transformers"],"created_at":"2024-08-01T22:00:50.038Z","updated_at":"2025-04-17T04:31:43.932Z","avatar_url":"https://github.com/huggingface.png","language":"Java","funding_links":[],"categories":["Tutorials"],"sub_categories":["Other Efficient Transformers / BERT"],"readme":"# TensorFlow Lite Transformers w/ Android demos\n\nConvert Transformers models\nimported from the [🤗 Transformers](https://github.com/huggingface/transformers) library\nand use them on Android. You can also check out our\n[swift-coreml-transformers](https://github.com/huggingface/swift-coreml-transformers) repo\nif you're looking for Transformers on iOS.\n\n# [Question Answering with DistilBERT](bert)\n\nDemo of the [DistilBERT](https://arxiv.org/abs/1910.01108) model\n(97% of BERT’s performance on GLUE) fine-tuned for Question answering on the SQuAD dataset.\nIt provides 48 passages from the dataset for users to choose from.\n\n![demo gif](media/distilbert_qa.gif \"Demo running offline on a Samsung Galaxy S8\")\n\n# [Text Generation with GPT-2/DistilGPT2](gpt2)\n\nOn-device text generation using [GPT-2](https://d4mucfpksywv.cloudfront.net/better-language-models/language_models_are_unsupervised_multitask_learners.pdf) or [DistilGPT2](https://medium.com/huggingface/distilbert-8cf3380435b5) (same distillation process than DistilBERT, 2x faster and 33% smaller than GPT-2)\n\n![demo gif](media/gpt2_generation.gif \"Demo running offline on a Samsung Galaxy S8, accelerated\")\n\n---\n\n## Models generation\n\nExample scripts used to convert the models are available in the `models_generation` directory.\nPlease note that they require the nightly version of TensorFlow and might thus be unstable.\n\n## License\n\n[Apache License 2.0](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhuggingface%2Ftflite-android-transformers","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhuggingface%2Ftflite-android-transformers","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhuggingface%2Ftflite-android-transformers/lists"}