Skip to content

Billing and Service Units

What users see, since 2026-10-01

ai-session now shows you the tokens each session consumed -- at ai-session stop and again with ai-session receipt -- and no longer prints SU estimates or charges, before or after a session. SU is still computed under the policy below and recorded in the per-session summary JSON (~/.ai-session/state/logs/usage/<user>_<jobid>_<timestamp>_summary.json) and in the RCC staff ledger. RCC staff are revisiting this policy; the rest of this page describes how SU is computed today, not what is shown to you.

This page is the canonical statement of what an ai-session costs. It defines the Service Unit, gives the GPU-type multiplier table, states the charging formula, lists the measured throughput rates the formula uses, and shows how to read the usage receipt and the SU fields recorded in its summary file. The machine-readable sources ship with the service (billing/billing_policy.yaml for the policy numbers, billing/rate_table.json for the measured rates); the published rationale is in the service's BILLING_POLICY.md. How to start and stop sessions is documented on Getting Started (browser chat) and Coding Sessions; this page only explains what those sessions cost.

The unit: 1 SU = 1 A100-GPU-hour

A Service Unit (SU) is the internal accounting currency of the ai-session service: one A100-GPU-hour costs one SU, following the published convention at NCSA Delta and Purdue Anvil. SUs are fair-usage accounting, not dollars; no dollar figure is attached to them in Phase 1 (dollar_per_su: null in the policy file).

ai-session SUs are not RCC service units

The RCC user guide states that beagle3 and other dedicated systems do not consume RCC service units. The SUs on this page are the ai-session service's internal accounting, tracked by the service itself. They are separate from any RCC allocation balance and do not draw on it.

GPU-type multiplier w_gpu

w_gpu is a cost multiplier, not a performance index. Because 1 A100-GPU-hour is 1 SU, the A100 anchors at 1.0, and w_gpu(H200) = 3.0 means one H200-GPU-hour costs 3 SU. The values below are what the service charges today; RCC staff can adjust them in the policy file.

GPU type w_gpu Basis
H200 3.0 NCSA Delta exact; price ratio 4.75, dense-BF16 TFLOPS ratio 3.17
H100 2.0 PSC Bridges-2 and TACC Lonestar6 SU convention (TFLOPS and price ratios say 3.2-4.0; the HPC-SU value is used)
L40S 1.0 TFLOPS ratio 1.16, price ratio 1.13; Ada generation, bf16-capable
A100 1.0 Reference anchor; one tier for both memory sizes
A40 0.5 NCSA Delta discounted tier; TFLOPS ratio 0.48, price ratio 0.50

The A100 tier is not split by memory size: the 40 GB and 80 GB cards both bill 1.0. Both sizes are in service — the gemma4_31B a100 record was measured on a 40 GB PCIe card and the qwen2.5_72B and qwen3_4b records on 80 GB cards (see the provenance below) — and both normalize to the same a100 tier.

The table is synthesized from the peer conventions at NCSA Delta, PSC Bridges-2, TACC Lonestar6, Harvard FASRC, Caltech, and MSI, cross-checked against dense-BF16 TFLOPS and list price. The two checks agree closely except on the Hopper GPUs, where price and scarcity exceed raw FLOPS.

V100 and RTX6000 are excluded from Phase 1: both are fp16-only (no bf16 support), so some Qwen models are numerically shakier on them and would need --dtype half. Phase 1 serves only bf16-capable types (A40 and up).

What a session costs

A session reserves N GPUs for its whole wall-clock lifetime. The charge is the greater of two terms computed in the same unit:

token_su  = w_gpu(type) * N * (T_in / prefill_tps + T_out / decode_tps) / 3600
floor_su  = w_gpu(type) * N * hours_held
billed_su = max(token_su, floor_su)
  • T_in, T_out — prompt and completion tokens, taken from the serving API's usage field (authoritative).
  • prefill_tps, decode_tps — benchmarked aggregate throughput for that exact model-and-GPU configuration, from the rate table below.
  • N — the number of GPUs the session reserves; each model's configuration fixes it (see the model tables on the launch pages).
  • hours_held — how long the session held the GPUs, from the cluster's own accounting records.

The token term converts your tokens into equivalent GPU-hours and prices them in the A100-hour currency. The floor term (the reservation floor) exists because the GPUs your session reserves are held for its entire lifetime — idle GPUs inside a running session cannot be given to anyone else — so you pay for the greater of the work done and the hardware held, whether or not you were actively using it. This matches how Delta, NERSC, TACC, and PSC bill reserved GPU time.

A running session accrues SU whether or not you send requests

The floor accrues for every hour the session holds its GPUs, idle or busy. It is recorded, not printed. Run ai-session stop as soon as you stop working.

Two honest consequences of the max():

  1. The floor is usually the whole bill for interactive use. A single request's token cost is on the order of 0.001 SU (see the worked example); a multi-hour reservation is 8-12 SU. The token term exceeds the floor only if you sustain higher concurrency than the benchmark reference, so for most users token billing is a marginal top-up.
  2. A more expensive GPU always costs more to hold. The floor is ordered by w_gpu * N across GPU types. The per-token rate is not ordered the same way — a fast enough H200 can have a lower per-1000-token cost, because throughput is in the denominator — so the floor, not the token rate, is the cross-type invariant.

The practical takeaway: the main cost lever is how long you hold the GPUs. Model choice and prompt length are second-order; session duration is first-order.

Output tokens cost more than input tokens, and the ratio is measured, not hand-set. Prefill (reading your prompt) is compute-bound and fast; decode (generating the reply) is memory-bandwidth-bound and slow, so decode_tps is well below prefill_tps. Each output token therefore costs alpha = prefill_tps / decode_tps times an input token. The measured alpha ranges from 2.1 (Qwen2.5-72B on H100) to 9.9 (Gemma-4-31B on A100) across the benchmarked configurations below. Commercial APIs price output 5-6 times input for the same physical reason.

Measured rates

The rate table holds one record per model-and-GPU configuration (billing/rate_table.json). The floor column is w_gpu * N, the SU cost per hour of holding that configuration.

Model key GPU type GPUs (N) Prefill (tok/s) Decode (tok/s) Floor (SU/h) Server
qwen2.5_72B a100 4 2913.57 1191.43 4.0 0.26.0
qwen2.5_72B h100 4 3787.33 1810.50 8.0 0.10.2
qwen3.8_27B h100 2 11827.90 3492.74 4.0 0.26.0
gemma4_31B a40 2 2301.17 348.67 1.0 0.26.0
gemma4_31B a100 2 3336.88 336.21 2.0 0.26.0
qwen3_4b a100 1 22166.80 5113.82 1.0 0.26.0

Provenance. A record is only valid for the model-server version it was measured under; if the running server reports a different version, the token term is dropped and the session bills the floor rather than being charged against a stale number. The 0.26.0 records were measured on 2026-08-19 and 2026-08-20: gemma4_31B on beagle3-0010 (A100 40 GB) and beagle3-0031 (A40), qwen2.5_72B and qwen3_4b on midway3-0377/0378 (A100 80 GB), and qwen3.8_27B on midway3-0423 (H100 NVL). The qwen2.5_72B h100 row was measured in June 2026 under 0.10.2 and therefore no longer applies to a running session; it is kept as measurement provenance.

Note the two gemma4_31B rows: A40 is both the faster and the cheaper tier for this model, which inverts the usual ordering. The reasoning is on Coding Sessions.

One current gap. qwen3.8_27B runs on A100 by default but its record is for h100, so coding sessions on the default configuration bill the floor until an a100 record is measured.

Each record in the rate table carries a full provenance block (GPU name, node, serve flags, profile parameters, a metrics cross-check, timestamp).

These are aggregate throughputs at concurrency 64, the basis for the token charge — not the single-stream speed one interactive user perceives. Session start commands and model choice are covered in Coding Sessions and Getting Started.

A model-and-GPU configuration without a measured record — qwen3.8_27B on A100, which is the default coding configuration, and qwen3.5_122B when it arrives — is billed on the reservation floor alone (w_gpu × N × hours), with no token term. The floor is the authoritative, dominant charge for interactive sessions in any case; a measured token rate is added later if a model is benchmarked. A rate record is only used when it matches the running engine version, so a version change also drops a session to floor-only until the record is refreshed.

A model-and-GPU configuration with no record bills the floor only; the token term is reported as UNRATED in the billing summary.

Worked example

One request with T_in = 2000 prompt tokens and T_out = 500 completion tokens to Qwen2.5-72B, on a 2-hour reservation. Token terms are computed from the measured rates in the table above.

Configuration w_gpu x N Token term (one request) 2 h floor Billed
Qwen2.5-72B, 2 x H200 (illustrative; H200 not available) 6.0 0.0008 SU 12.0 SU 12.0 SU
Qwen2.5-72B, 4 x A100 4.0 0.0013 SU 8.0 SU 8.0 SU

The floor is the charge; the token term is a rounding error, about one ten-thousandth of the bill, for a single request. The H200 session costs more than the A100 session for the same work because it costs more to hold — the intended behavior of the type multiplier.

The everyday number: a coding session on two GPUs costs 2.0 SU per hour held on A100s. A three-hour afternoon of coding is 6.0 SU regardless of how many requests you send, unless your request volume is high enough for the token term to exceed the floor.

The coding default qwen3.8_27B runs on two A100s, so that 2.0 SU/h floor is what a coding session holds. Its measured rate record is for the H100 tier, not A100, so an A100 coding session bills the reservation floor only — GPU time held, with no token-metered component. An a100 record is outstanding. In practice the floor dominates interactive coding anyway, so the effect on a typical session is small. The cheapest capable coding configuration is gemma4_31B on two A40s, at a 1.0 SU/h floor.

Edge cases

Case Billed Detail
Failed / 5xx request No The response carries no usage field and the engine's success counter is not incremented.
Cancelled streaming request Partially T_in is billed in full (prefill happened) plus the output tokens actually produced. The service asks the engine for per-request counts on streaming requests; without them, billing falls back to the engine's own session-total counters.
Prefix caching Yes, in full Full prompt_tokens are billed with no cache discount in Phase 1 — the engine reports the full prompt regardless of cache hits, matching OpenAI's practice. Since the floor dominates interactive use, caching lets you do more per reservation rather than pay less. A discount is a possible Phase-2 knob.
No rate record for the configuration Floor only The token term is reported UNRATED until the benchmark is run for that configuration; you are billed the reservation floor.

Reading your usage summary

ai-session stop meters the session and prints its token usage as its last output, so it cannot scroll off:

==============================================================
  TOKEN USAGE -- this session
    model  : <model_key> (<n> x <GPU type> GPU | cpu)
    tokens : in=<T_in> out=<T_out> total=<T_in + T_out> (<n> requests)
    session: <job id>
    receipt: <path to the summary JSON>
==============================================================

No SU figure is printed. The full record, including the SU computation, is written to the *_summary.json receipt file under your state directory (~/.ai-session/state/logs/usage/). The summary contains:

Field Meaning
token_source Where the token counts came from: per-request usage recorded by the service for the session window, or the engine's own session-total counters as the fallback.
total_input_tokens, total_output_tokens The token counts billed.
token_su The token term of the formula.
floor_su The reservation floor.
billed_su The charge: the maximum of the two terms.
basis Which term set the charge: floor or tokens. For an unrated configuration the basis names the missing rate record.
crosscheck Present when both per-request usage and the engine counters are available: the two are reconciled and a relative mismatch over 2% is flagged (reconciled: false).

To re-print any past receipt, run this on the login node:

ai-session receipt

This renders the token usage from your newest receipt; pass a specific summary-file path (ai-session receipt <file>) to render an older one. If there are no receipts it prints:

  TOKEN USAGE: none this run (no active session was ended).

If a session fails before it is metered, or a token count looks wrong, see Troubleshooting.

Central accounting (for staff)

Your own summary file above is a convenience copy. Each session's charge is also recorded to a staff-only ledger (AISESSION_BILLING_DIR), readable only by the rcc-staff group. Two records may exist per session: one written when you end the session (it carries the token detail), and one written by a staff sweep that reconstructs the reservation-floor charge directly from the cluster scheduler's own accounting records. The sweep is the authoritative floor because those elapsed-time records cannot be edited by users, so a charge is recorded even for a session that was never ended cleanly. Running the sweep and the ledger layout are described in the staff guide (ai-session/README.md).