{"id":19074044,"url":"https://github.com/zer0int/clip-tokenizer","last_synced_at":"2026-02-12T09:02:11.023Z","repository":{"id":258623845,"uuid":"874293621","full_name":"zer0int/CLIP-tokenizer","owner":"zer0int","description":"A simple CLIP tokenizer encode / decode script. For when you need to know CLIP's tokenization and / or token IDs for some reason.","archived":false,"fork":false,"pushed_at":"2024-10-18T09:57:31.000Z","size":1336,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"CLIP-vision","last_synced_at":"2025-09-10T03:10:10.465Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zer0int.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-10-17T15:14:40.000Z","updated_at":"2025-01-07T22:39:28.000Z","dependencies_parsed_at":"2024-10-21T15:36:16.487Z","dependency_job_id":null,"html_url":"https://github.com/zer0int/CLIP-tokenizer","commit_stats":null,"previous_names":["zer0int/clip-tokenizer"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/zer0int/CLIP-tokenizer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zer0int%2FCLIP-tokenizer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zer0int%2FCLIP-tokenizer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zer0int%2FCLIP-tokenizer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zer0int%2FCLIP-tokenizer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zer0int","download_url":"https://codeload.github.com/zer0int/CLIP-tokenizer/tar.gz/refs/heads/CLIP-vision","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zer0int%2FCLIP-tokenizer/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29362198,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-12T08:51:36.827Z","status":"ssl_error","status_checked_at":"2026-02-12T08:51:26.849Z","response_time":55,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":[],"created_at":"2024-11-09T01:49:28.924Z","updated_at":"2026-02-12T09:02:11.018Z","avatar_url":"https://github.com/zer0int.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"## CLIP-tokenizer\n\n- A simple CLIP tokenizer encode / decode script. For when you need to know CLIP's tokenization and / or IDs for some reason.\n---------\n- `python clip-tokenizer.py --text \"a photo of a cat\"` - returns:\n- 5: a photo of a cat   ['a\u003c/w\u003e', 'photo\u003c/w\u003e', 'of\u003c/w\u003e', 'a\u003c/w\u003e', 'cat\u003c/w\u003e']  320,1125,539,320,2368\n- Where `5:` is the total number of tokens (token count).\n---------\n- `python clip-tokenizer.py --text \"333, 6554, 5322\" --reverse` with `--reverse`, get tokens for comma-separated IDs:\n- 3: n kabrie  ['n\u003c/w\u003e', 'kab', 'rie\u003c/w\u003e']  333,6554,5322\n---------\n- `python clip-tokenizer.py --file exampleTEXT.txt` with `--file`, batch processes file (newline = separate input).\n- `python clip-tokenizer.py --file exampleIDs.txt --reverse` batch process, but for token IDs. Both save output as file.\n---------\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzer0int%2Fclip-tokenizer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzer0int%2Fclip-tokenizer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzer0int%2Fclip-tokenizer/lists"}