openai / openai/tiktoken

How to find the token count of a prompt using meta/llama2-70b model

Open
#274 3 comments 0 reactions 0 assignees View on GitHub

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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.