Count conversations and tokens
This query reads the synthetic customer-service conversations inchowderai/cust-convo and profiles the convo_transcript column:
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_countcounts every row, including rows with a null transcript.total_tokenssums the token counts for non-null transcripts.avg_tokens_per_conversationaverages the non-null counts, rounded to two decimal places. Empty transcripts contribute zero; null transcripts do not contribute to the sum or average.
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:
Inspect how text splits
Usetokenize to inspect token strings for a small sample. Use tokens for aggregate counts so you do not materialize token arrays for the whole dataset.