{"id":15908639,"url":"https://github.com/capjamesg/bpe","last_synced_at":"2025-04-03T00:42:14.727Z","repository":{"id":214399550,"uuid":"735689400","full_name":"capjamesg/bpe","owner":"capjamesg","description":"Byte-pair encoding implementation in Python.","archived":false,"fork":false,"pushed_at":"2023-12-27T22:23:44.000Z","size":2,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-28T19:16:37.089Z","etag":null,"topics":["byte-pair-encoding","text-encoding"],"latest_commit_sha":null,"homepage":"","language":"Python","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/capjamesg.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}},"created_at":"2023-12-25T20:45:05.000Z","updated_at":"2023-12-27T22:24:08.000Z","dependencies_parsed_at":"2023-12-28T00:26:24.757Z","dependency_job_id":null,"html_url":"https://github.com/capjamesg/bpe","commit_stats":null,"previous_names":["capjamesg/bpe"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/capjamesg%2Fbpe","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/capjamesg%2Fbpe/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/capjamesg%2Fbpe/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/capjamesg%2Fbpe/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/capjamesg","download_url":"https://codeload.github.com/capjamesg/bpe/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246916740,"owners_count":20854511,"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":["byte-pair-encoding","text-encoding"],"created_at":"2024-10-06T14:23:02.380Z","updated_at":"2025-04-03T00:42:14.663Z","avatar_url":"https://github.com/capjamesg.png","language":"Python","readme":"# BPE\n\nAn implementation of byte-pair encoding in Python.\n\n\u003e [!WARNING]\n\u003e I wrote this project to learn about byte-pair encoding. This project is not intended for production use.\n\n## Setup\n\nTo set up this project, first clone the project and install the project from source:\n\n```\ngit clone https://github.com/capjamesg/bpe\ncd bpe/\npip3 install -e .\n```\n\n### Test the encoder\n\nOpen `bpe.py`. Update the `text` variable to be the text you want to use to train your byte-pair encoder.\n\nThen, update the `input_seq` value toward the end of `bpe.py` to include some demo text to encode using your encoder.\n\nRun the script to test the encoder.\n\n\u003e [!NOTE]\n\u003e This script doesn't save your encoding. I recommend adding your own saving logic if you want to use the encoder on large text samples.\n\n## License\n\nThis project is licensed under an [MIT license](LICENSE).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcapjamesg%2Fbpe","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcapjamesg%2Fbpe","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcapjamesg%2Fbpe/lists"}