What is the best way to get an approximate number of tokens for a piece of text?

This page summarizes the projects mentioned and recommended in the original post on /r/OpenAI

InfluxDB - Power Real-Time Data Analytics at Scale
Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
www.influxdata.com
featured
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured
  • tiktoken

    tiktoken is a fast BPE tokeniser for use with OpenAI's models.

  • I want to measure the approximate number of tokens in a piece of text to understand if I will need to modify it before passing it into the context of an OpenAI API call. Tiktoken can do this, but I'm not sure if it's overkill to use that library just for this simple task. I don't need to actually tokenize the text, I just need an approximate count (e.g. within like 1% of the text's actual token length for text that represents the visible text on a webpage).

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts

  • Ask HN: Founders who offer free/OS and paid SaaS, how do you manage your code?

    17 projects | news.ycombinator.com | 13 May 2024
  • Show HN: Julep: A platform to manage memories, knowledge and tools for LLM apps

    1 project | news.ycombinator.com | 14 May 2024
  • How to Send Emails with Mailgun in NestJS

    1 project | dev.to | 14 May 2024
  • Sakuga-42M Dataset: Scaling Up Cartoon Research

    1 project | news.ycombinator.com | 14 May 2024
  • Homoiconic Python

    12 projects | news.ycombinator.com | 12 May 2024