LLM MeasurementGitHub
Guides

Which user is driving my LLM token spike?

Compare two periods to see which users and sessions account for a token increase.

Get summary windows

Enable user/session rankings, then retain summary windows. For LiteLLM, use the gateway recipe.

Use a LiteLLM export

Use request-level spend.csv from the export recipe.

./bin/fleetdiff investigate --litellm-spend ./spend.csv --group-by user

Export 16 days for two seven-day UTC periods. user means key owner; use --group-by end-user for application users.

Security

See the security reference.

Try the sample

Linux or macOS; needs curl, gh, shasum and tar. The installer checks the release before unpacking it.

curl -fsSLo fleetdiff-source.tar.gz https://github.com/llm-measurement/fleetdiff/archive/refs/tags/v0.14.1.tar.gz
tar -xzf fleetdiff-source.tar.gz
cd fleetdiff-0.14.1
sh scripts/install.sh v0.14.1 ./release
./release/fleetdiff investigate --before examples/sessions/data/before \
  --after examples/sessions/data/after --expected app

What you'll see

Example output from this synthetic sample; your values will reflect your input.

fleetdiff shows the split between more model attempts and more tokens per attempt. In this example, the application's reported total rises from 400 to 3,300 tokens.

1 of 8 tracked sessions flagged for review: 90.91% of attributed tokens.
Reported tokens: 400 -> 3300; model attempts: 4 -> 13.
  +1592 tokens from attempt count; +1308 tokens from tokens per attempt.
  Tokens per attempt: 100.00 -> 253.85.

One user adds 3,000 reported tokens, accounting for 90.91% of the after-period's attributed tokens.

Which tracked users contribute tokens or model attempts?
  key / measurement   before -> after  after share  review
  user-1 / top_users  0 -> 3000        90.91%

To see who uses the most overall, rather than who changed, see Who is tokenmaxxing?

Source and reproduction: released session fixtures and generator. Verification record.

What the numbers mean

A flag marks a session worth a look. With real data, the report shows ranges wherever bounds differ.
Measurement notes

evijay+fleetdiff@gmail.com · Questions · Ran it on your data? Tell us what it found · Security issues (private)