{"id":21589031,"url":"https://github.com/julienkay/com.doji.transformers","last_synced_at":"2025-04-10T21:53:08.246Z","repository":{"id":219845651,"uuid":"735426910","full_name":"julienkay/com.doji.transformers","owner":"julienkay","description":"A Unity package to run pretrained transformer models with Unity Sentis","archived":false,"fork":false,"pushed_at":"2025-04-10T19:37:53.000Z","size":731,"stargazers_count":22,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-10T21:52:57.177Z","etag":null,"topics":["ai","clip","machine-learning","sentis","tokenization","tokenizer","transformer-models","transformers","unity"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/julienkay.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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,"zenodo":null},"funding":{"github":"julienkay","patreon":"julienkay","ko_fi":"julienkay"}},"created_at":"2023-12-24T22:21:09.000Z","updated_at":"2025-04-10T19:37:57.000Z","dependencies_parsed_at":"2024-08-28T15:45:12.318Z","dependency_job_id":"0de6d14b-16c3-47d4-8cdd-cb649f6703c8","html_url":"https://github.com/julienkay/com.doji.transformers","commit_stats":null,"previous_names":["julienkay/com.doji.transformers"],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/julienkay%2Fcom.doji.transformers","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/julienkay%2Fcom.doji.transformers/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/julienkay%2Fcom.doji.transformers/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/julienkay%2Fcom.doji.transformers/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/julienkay","download_url":"https://codeload.github.com/julienkay/com.doji.transformers/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248305848,"owners_count":21081562,"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":["ai","clip","machine-learning","sentis","tokenization","tokenizer","transformer-models","transformers","unity"],"created_at":"2024-11-24T16:12:19.114Z","updated_at":"2025-04-10T21:53:08.237Z","avatar_url":"https://github.com/julienkay.png","language":"C#","funding_links":["https://github.com/sponsors/julienkay","https://patreon.com/julienkay","https://ko-fi.com/julienkay"],"categories":[],"sub_categories":[],"readme":"\u003ca href=\"https://www.doji-tech.com/\"\u003e\n  \u003cimg src=\"https://www.doji-tech.com/assets/favicon.ico\" alt=\"doji logo\" title=\"Doji\" align=\"right\" height=\"70\" /\u003e\n\u003c/a\u003e\n\n# Transformers\nA Unity package to run pretrained transformer models with Unity Sentis\n\n[OpenUPM] · [Documentation (coming soon)] · [Feedback/Questions]\n\n## About\n\nThis is essentially a C# port of Hugging Face’s [transformers] library.\n\nThere are two use cases for this package right now:\n- It's used by the [com.doji.diffusers] package to run Stable Diffusion models in Unity (most SD models use a ClipTokenizer for prompting, newer pipelines require additional ones like T5Tokenizer)\n- To run small LLMs like [Phi-3](https://huggingface.co/julienkay/Phi-3-mini-4k-instruct_no_cache_uint8) in Unity (WIP)\n\n### Installation\n\n\u003cdetails\u003e\n  \u003csummary\u003e via OpenUPM \u003c/summary\u003e\n  \n 1. In `Edit -\u003e Project Settings -\u003e Package Manager`, add a new scoped registry:\n\n        Name: Doji\n        URL: https://package.openupm.com\n        Scope(s): com.doji\n \n  4. In the Package Manager install `com.doji.transformers` either by name or select it in the list under `Package Manager -\u003e My Registries`\n  5. For the time being,  you also have to use a custom fork of Sentis: In the package Manager -\u003e `Package Manager -\u003e Install package from git URL -\u003e https://github.com/julienkay/com.unity.sentis.git`\n\n\u003c/details\u003e\n\n## Roadmap:\n\nTokenizers\n- [x] CLIPTokenizer\n- [x] LLamaTokenizer\n- [x] GPT2Tokenizer\n- [ ] T5Tokenizer\n\nLLMs\n- [ ] Phi-3\n\nThe intention is to provide a similar API like Hugging Face's transformers library, so usage in Unity will look something like this:\n\n ```csharp\nvar tokenizer = AutoTokenizer.FromPretrained(\"julienkay/Phi-3-mini-4k-instruct_no_cache_uint8\");\nvar model = Phi3ForCausalLM.FromPretrained(\"julienkay/Phi-3-mini-4k-instruct_no_cache_uint8\");\n\nvar inputs = tokenizer.Encode(\"\u003cinput-prompt\u003e\");\nvar outputs = model.Generate(inputs);\nvar predictedText = tokenizer.Decode(outputs);\n```\n\n[OpenUPM]: https://openupm.com/packages/com.doji.transformers\n[Documentation (coming soon)]: https://github.com/julienkay/com.doji.transformers\n[Feedback/Questions]: https://discussions.unity.com/t/stable-diffusion-diffusers-transformers-package/332701?u=julienkay\n[transformers]: https://github.com/huggingface/transformers\n[com.doji.diffusers]: https://github.com/julienkay/com.doji.diffusers\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjulienkay%2Fcom.doji.transformers","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjulienkay%2Fcom.doji.transformers","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjulienkay%2Fcom.doji.transformers/lists"}