How to find the token count of a prompt using meta/llama2-70b model
Open
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 19.3k
- Forks
- 1.6k
- PR merge metrics
- No merged PRs in 30d
Description
Is tiktoken supports meta/llama2-70b?
I want to find the token count of the prompt before passing the prompt to a meta/llama2-70b model
So how to do this with tiktoken
import tiktoken
enc = tiktoken.get_encoding("meta/llama2-70b")
is this possible?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the tiktoken get_encoding API shown in the issue and check the repository's documented encoding names. Confirm whether meta/llama2-70b is supported and identify the documented way to count a prompt's tokens; done means providing a clear answer or documentation reference.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- tooling
- Issue type
- Documentation
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100