{"id":19466207,"url":"https://github.com/yoshoku/gpt_neox_client","last_synced_at":"2025-04-15T03:47:50.553Z","repository":{"id":191916816,"uuid":"684651424","full_name":"yoshoku/gpt_neox_client","owner":"yoshoku","description":"gpt_neox_client is a simple client for GPT-NeoX in Ruby","archived":false,"fork":false,"pushed_at":"2025-01-01T11:22:41.000Z","size":312,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-15T03:47:43.184Z","etag":null,"topics":["gem","gpt-neox","llm","ruby"],"latest_commit_sha":null,"homepage":"https://rubygems.org/gems/gpt_neox_client","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/yoshoku.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":"CODE_OF_CONDUCT.md","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":"2023-08-29T15:18:58.000Z","updated_at":"2025-01-22T23:51:10.000Z","dependencies_parsed_at":"2023-09-01T14:27:51.288Z","dependency_job_id":"66d11c6a-9b7f-465d-97c1-a751840f011b","html_url":"https://github.com/yoshoku/gpt_neox_client","commit_stats":null,"previous_names":["yoshoku/gpt_neox_client"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yoshoku%2Fgpt_neox_client","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yoshoku%2Fgpt_neox_client/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yoshoku%2Fgpt_neox_client/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yoshoku%2Fgpt_neox_client/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yoshoku","download_url":"https://codeload.github.com/yoshoku/gpt_neox_client/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249003941,"owners_count":21196794,"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":["gem","gpt-neox","llm","ruby"],"created_at":"2024-11-10T18:26:07.202Z","updated_at":"2025-04-15T03:47:50.538Z","avatar_url":"https://github.com/yoshoku.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GPTNeoXClient\n\n[![Gem Version](https://badge.fury.io/rb/gpt_neox_client.svg)](https://badge.fury.io/rb/gpt_neox_client)\n[![License](https://img.shields.io/badge/License-MIT-yellowgreen.svg)](https://github.com/yoshoku/gpt_neox_client/blob/main/LICENSE.txt)\n[![Documentation](https://img.shields.io/badge/api-reference-blue.svg)](https://yoshoku.github.io/gpt_neox_client/doc/)\n\ngpt_neox_client is a simple client for GPT-NeoX.\n\n## Installation\n\nInstall the gem and add to the application's Gemfile by executing:\n\n    $ bundle add gpt_neox_client\n\nIf bundler is not being used to manage dependencies, install the gem by executing:\n\n    $ gem install gpt_neox_client\n\n## Usage\n\nGPTNeoXClient supports ggml format model. Model files need to be converted to ggml format.\nThe following is an example of converting [the model published by LINE Corporation](https://huggingface.co/line-corporation/japanese-large-lm-3.6b-instruction-sft):\n\n```sh\n# Clone ggml.\n$ git clone https://github.com/ggerganov/ggml.git\n$ cd ggml\n\n# Install python dependencies.\n$ pip install -U protobuf~=3.20.0\n$ python -m pip install -r requirements.txt\n\n# Convert downloaded model to ggml format.\n$ git clone https://huggingface.co/line-corporation/japanese-large-lm-3.6b-instruction-sft\n$ python examples/gpt-neox/convert-h5-to-ggml.py japanese-large-lm-3.6b-instruction-sft 1\n$ ls japanese-large-lm-3.6b-instruction-sft/ggml-model-f16.bin\njapanese-large-lm-3.6b-instruction-sft/ggml-model-f16.bin\n```\n\n```ruby\nrequire 'gpt_neox_client'\n\nclient = GPTNeoXClient.new(path: 'japanese-large-lm-3.6b-instruction-sft/ggml-model-f16.bin', seed: 123456789, n_threads: 4)\nputs client.completions(\n  'ユーザー:四国の県名を全て列挙してください。\u003c0x0A\u003eシステム:',\n  top_p: 0.9,\n  top_k: 1,\n  temperature: 0.7\n).gsub('\u003c0x0A\u003e', \"\\n\").gsub('\u003c/s\u003e', '')\n#\n# ユーザー:四国の県名を全て列挙してください。\n# システム:徳島県、香川県、愛媛県、高知県\n\npp client.embeddings('こんにちは世界', normalize: true)\n#\n# [-0.00973147340118885,\n#  0.007523993495851755,\n# ...\n#  -0.004352027550339699,\n#  -0.024439003318548203]\n```\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/yoshoku/gpt_neox_client.\nThis project is intended to be a safe, welcoming space for collaboration,\nand contributors are expected to adhere to the [code of conduct](https://github.com/yoshoku/gpt_neox_client/blob/main/CODE_OF_CONDUCT.md).\n\n## License\n\nThe gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).\n\n## Code of Conduct\n\nEveryone interacting in the GPTNeoXClient project's codebases, issue trackers,\nchat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/yoshoku/gpt_neox_client/blob/main/CODE_OF_CONDUCT.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyoshoku%2Fgpt_neox_client","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyoshoku%2Fgpt_neox_client","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyoshoku%2Fgpt_neox_client/lists"}