Component · for humans & their agents
clip-token-truncation-guard
verifiedactively maintainedFree
CLIP's text encoder holds 77 tokens: 75 for your words plus two markers. Write more and the tail is dropped in silence — the image still arrives, still plausible, and the clause you added because the
by voxpop · Code Recycle maintainer
CLIP's text encoder holds 77 tokens: 75 for your words plus two markers. Write more and the tail is dropped in silence — the image still arrives, still plausible, and the clause you added because the first four attempts were wrong never reached the model. This counts exactly, using the real byte-pair encoder against the vocabulary your own pipeline already ships, and names the text that did not survive. An ordinary prompt ending 'with a canon eos r5 and an 85mm f/1.2 lens' comes to 89 tokens: the camera body is cut in half and the lens spec is gone. The count is not the word count, because CLIP gives every digit its own token — '1920x1080 35mm f/1.4' is nineteen tokens, not four. It refuses to estimate: without a vocabulary it errors and says where to find one, since a guard that is sometimes wrong about the limit is the same silent failure wearing a hat. Verified against the reference tokenizer on 40 cases including emoji, accents, CJK, Cyrillic, digit runs and the literal marker text; all 40 agree. 19 tests run anywhere, 5 more against a real tokenizer.
CLIP's text encoder holds 77 tokens: 75 for your words plus two markers. Write more and the tail is dropped in silence — the image still arrives, still plausible, and the clause you added because the first four attempts were wrong never reached the model. This counts exactly, using the real byte-pair encoder against the vocabulary your own pipeline already ships, and names the text that did not survive. An ordinary prompt ending 'with a canon eos r5 and an 85mm f/1.2 lens' comes to 89 tokens: the camera body is cut in half and the lens spec is gone. The count is not the word count, because CLIP gives every digit its own token — '1920x1080 35mm f/1.4' is nineteen tokens, not four. It refuses to estimate: without a vocabulary it errors and says where to find one, since a guard that is sometimes wrong about the limit is the same silent failure wearing a hat. Verified against the reference tokenizer on 40 cases including emoji, accents, CJK, Cyrillic, digit runs and the literal marker text; all 40 agree. 19 tests run anywhere, 5 more against a real tokenizer.
Contributed by a community creator from https://github.com/michaelcho87/clip-token-truncation-guard at commit 9dde080edb9e. Packaged from the approved paths only: src, test, README.md, LICENSE, package.json.
01Capabilities
Does
- + Context budgeting
- + Prompt token budget
Doesn’t
- No exclusions declared
02Requirements & stack
Depends on
No declared dependencies
Credentials needed
None declared
Stack
03Community
No endorsements yetNo verified confirmations yet — be the first.
Confirmations come from verified purchasers, installers, vetted reviewers, or an installation outcome your org reported through the agent tools. They grade quality — security is verified separately, and community votes can never override the security gate.
Sign in to confirm — weight comes from verified usage, not vote count.
Issues 0
Open an issueNobody has reported anything yet — a success counts as a report too.
04Trust Passport
Full passport →0/0 automated components pass. An automated score is never a security guarantee.
- publisher identity Publisher status verified; 1 verification(s) on file
- malicious pattern scan No known malicious-behavior patterns across 6 source file(s) plus listing text
- capability contract All 0 observed capability reference(s) match the declared manifest
- agent safety scan No injection patterns in agent-readable content
- provenance No release signature or provenance attestation
- behavioral sandbox Not performed in this environment — requires the production isolated runner (docs/sandbox-requirements.md). No untrusted code is ever executed on the application host.
Every listing must pass this review before it can be sold, and it is re-run on every release. Verification describes what we checked — it is not a guarantee that the software is safe.
05Versions
Full history →| Version | Channel | Released | Notes |
|---|---|---|---|
| 1.0.0 | stable | Sep 20, 2026 | First release, from 9dde080edb9e. |