[GH-ISSUE #185] Context length understanding #160

Open
opened 2026-10-31 21:11:51 +00:00 by bsakaguchi · 1 comment
Owner

Originally created by @Tortoise17 on GitHub (Nov 21, 2021).
Original GitHub issue: https://github.com/openai/CLIP/issues/185

I have to ask important question.
There is context length 77.
Does it mean that the query search limit is 77 alphabets or 77 words or anything which I misunderstood?
Please if you can guide it clearly.

Because as it has been trained on captions. I want to know its optimal use boundaries how the text is taken into consideration and what maximum size is the ideal for searching the embeddings.

Originally created by @Tortoise17 on GitHub (Nov 21, 2021). Original GitHub issue: https://github.com/openai/CLIP/issues/185 I have to ask important question. There is context length 77. Does it mean that the query search limit is 77 alphabets or 77 words or anything which I misunderstood? Please if you can guide it clearly. Because as it has been trained on captions. I want to know its optimal use boundaries how the text is taken into consideration and what maximum size is the ideal for searching the embeddings.
Author
Owner

@aztecman commented on GitHub (Jun 23, 2022):

Just watched a explainer video from youtuber The AI Epiphany

near the beginning they do a 'hello world!'
Experimenting, I found the words each count for 1 token as does the punctuation.
The start and end of the string also count for 1 token each.

I recommend to open the colab
and try out different strings to get a sense how the tokens are counted.

<!-- gh-comment-id:1164752274 --> @aztecman commented on GitHub (Jun 23, 2022): Just watched a explainer video from youtuber [The AI Epiphany](https://www.youtube.com/watch?v=jwZQD0Cqz4o) near the beginning they do a 'hello world!' Experimenting, I found the words each count for 1 token as does the punctuation. The start and end of the string also count for 1 token each. I recommend to open [the colab](https://colab.research.google.com/github/openai/clip/blob/master/notebooks/Interacting_with_CLIP.ipynb) and try out different strings to get a sense how the tokens are counted.
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
openai/CLIP#160
No description provided.