Skip to main content
A row count tells you how many conversations you have. Token counts tell you how much text your inference workload needs to process. Query a Hugging Face dataset with SQL to measure both before running inference.

Count conversations and tokens

This query reads the synthetic customer-service conversations in chowderai/cust-convo and profiles the convo_transcript column:
Across 71,314 conversations, that is about 245 million transcript tokens—an average of 3,442 tokens per conversation. A dataset with the same row count but longer conversations would have a larger input workload. The query scans every conversation; there is no sampling or inference call. tokens runs the tokenizer locally without loading an inference model or requiring a GPU. The first use may download the tokenizer.

Interpret the counts

  • conversation_count counts every row, including rows with a null transcript.
  • total_tokens sums the token counts for non-null transcripts.
  • avg_tokens_per_conversation averages the non-null counts, rounded to two decimal places. Empty transcripts contribute zero; null transcripts do not contribute to the sum or average.
These counts use Chowder’s default Qwen/Qwen3.5-0.8B tokenizer. Counts depend on the tokenizer: use the tokenizer for your intended model when comparing context limits or estimating input size. Pass a Hugging Face tokenizer repository or local tokenizer.json path as the second argument:
The counts cover transcript text only. They exclude instructions, chat templates, special tokens, and generated output. Use them to size the input workload; actual inference time and cost also depend on the model, output length, batching, and hardware.

Inspect how text splits

Use tokenize to inspect token strings for a small sample. Use tokens for aggregate counts so you do not materialize token arrays for the whole dataset.
Token strings may contain whitespace markers rather than readable words. A token is not necessarily a word. For access and authentication, see Hugging Face datasets. The dataset is licensed under CC BY-NC 4.0; its dataset card contains the usage terms.

Try inference on a bounded batch

Use these counts to choose an initial batch, then classify or extract fields with Chowder Cloud. Inspect AI response quality and observed usage before expanding to the whole dataset. Token counts size the input; they are not a complete Cloud price estimate.