{"id":25715091,"url":"https://github.com/numq/text-generation","last_synced_at":"2026-04-29T22:37:42.744Z","repository":{"id":275060819,"uuid":"924946605","full_name":"numq/text-generation","owner":"numq","description":"JVM library for text generation, written in Kotlin and based on the C++ library llama.cpp","archived":false,"fork":false,"pushed_at":"2025-02-24T22:52:45.000Z","size":185,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-24T23:28:38.680Z","etag":null,"topics":["cpp","java","jni","jvm","kotlin","llama","ml","text-generation","text-to-text"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","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/numq.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":"2025-01-30T23:24:50.000Z","updated_at":"2025-02-24T22:55:54.000Z","dependencies_parsed_at":"2025-02-24T23:38:47.433Z","dependency_job_id":null,"html_url":"https://github.com/numq/text-generation","commit_stats":null,"previous_names":["numq/text-to-text","numq/text-generation"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/numq/text-generation","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/numq%2Ftext-generation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/numq%2Ftext-generation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/numq%2Ftext-generation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/numq%2Ftext-generation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/numq","download_url":"https://codeload.github.com/numq/text-generation/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/numq%2Ftext-generation/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":275062966,"owners_count":25398888,"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","status":"online","status_checked_at":"2025-09-14T02:00:10.474Z","response_time":75,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["cpp","java","jni","jvm","kotlin","llama","ml","text-generation","text-to-text"],"created_at":"2025-02-25T13:34:38.619Z","updated_at":"2026-04-29T22:37:42.740Z","avatar_url":"https://github.com/numq.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003eText generation\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003eJVM library for text generation, written in Kotlin and based on the C++ library \u003ca href=\"https://github.com/ggml-org/llama.cpp\"\u003ellama.cpp\u003c/a\u003e\u003c/p\u003e\n\n## Features\n\n- Generate text from a string\n\n## Installation\n\n- Download latest [release](https://github.com/numq/text-generation/releases)\n\n- Add library dependency\n   ```kotlin\n   dependencies {\n        implementation(file(\"/path/to/jar\"))\n   }\n   ```\n\n- Unzip binaries\n\n## Usage\n\n### TL;DR\n\n\u003e See the [example](example) module for implementation details\n\n- Call `generate` to process the string and get a generated output\n\n### Step-by-step\n\n- Load binaries\n    - CPU\n       ```kotlin\n       TextGeneration.Llama.loadCPU(\n        ggmlBase = \"/path/to/ggml-base\", \n        ggmlCpu = \"/path/to/ggml-cpu\",\n        ggmlRpc = \"/path/to/ggml-rpc\",\n        ggml = \"/path/to/ggml\",\n        llama = \"/path/to/llama\",\n        textGeneration = \"/path/to/text-generation\",\n      )\n       ```\n    - CUDA\n       ```kotlin\n       TextGeneration.Llama.loadCPU(\n        ggmlBase = \"/path/to/ggml-base\", \n        ggmlCpu = \"/path/to/ggml-cpu\",\n        ggmlCuda = \"/path/to/ggml-cuda\",\n        ggmlRpc = \"/path/to/ggml-rpc\",\n        ggml = \"/path/to/ggml\",\n        llama = \"/path/to/llama\",\n        textGeneration = \"/path/to/text-generation\",\n      )\n       ```\n\n- Create an instance\n\n  ```kotlin\n  TextGeneration.Llama.create(\n      modelPath = \"/path/to/model\"\n  )\n  ```\n\n- Call `history` to get the history of text generation\n\n\n- Call `generate` to process the string and get a generated output\n\n\n- Call `reset` to reset the internal state and history\n\n\n- Call `close` to release resources\n\n## Requirements\n\n- JVM version 9 or higher\n\n## License\n\nThis project is licensed under the [Apache License 2.0](LICENSE)\n\n## Acknowledgments\n\n- [llama.cpp](https://github.com/ggml-org/llama.cpp)\n\n___\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://numq.github.io/support\"\u003e\n    \u003cimg src=\"https://api.qrserver.com/v1/create-qr-code/?size=112x112\u0026data=https://numq.github.io/support\u0026bgcolor=1a1b26\u0026color=7aa2f7\" \n         width=\"112\" \n         height=\"112\" \n         style=\"border-radius: 4px;\" \n         alt=\"QR code\"\u003e\n  \u003c/a\u003e\n  \u003cbr\u003e\n  \u003ca href=\"https://numq.github.io/support\" style=\"text-decoration: none;\"\u003e\n    \u003ccode\u003e\u003cfont color=\"#bb9af7\"\u003enumq.github.io/support\u003c/font\u003e\u003c/code\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnumq%2Ftext-generation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnumq%2Ftext-generation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnumq%2Ftext-generation/lists"}