How to Estimate LLM Quotas: A Practical Guide to Multi-Model Tiered Scheduling

    On unified model-serving platforms, developers often face a shared resource constraint: the platform issues a batch of credits each cycle, and every model call draws from the same credit pool. Consumption rates vary dramatically across models—using the wrong model can mean the same quota delivers only a tenth of the workload. This article uses personal call records to fit consumption rates, then walks through quota cost estimation and a multi-model tiered scheduling strategy.

    On a unified model-serving platform, developers often run into a familiar resource constraint: the platform grants a batch of credits per cycle, and all model calls draw from the same credit pool. Consumption rates differ sharply between models. Pick the wrong model, and the same quota may only accomplish one-tenth of the work. This article fits consumption rates against personal call records, then discusses how to estimate quota costs and how to build a multi-model tiered scheduling strategy.

    1. Establish a Unified Billing Baseline

    The numbers in this article are based on the following assumptions:

    • 60,000 credits are issued per 5-hour window.
    • The weekly cap is 600,000 credits, so at most 10 full windows can be used per week.
    • The credit cost of a single call is linear in input tokens, output tokens, and cache-hit tokens.

    Rates are recorded as “credits per million tokens” and divided by one million to get the per-token consumption rate. The four tiers used throughout this article are:

    • Flagship reasoning tier: input 80,000, output 400,000.
    • Mid-tier reasoning: input 32,000, output 112,000.
    • Fast tier: input 4,000, output 8,000.
    • Lite tier: input 2,000, output 2,000.

    These rates are reverse-engineered from personal measurements. The platform may adjust them at any time, so they should not be treated as official pricing.

    2. Where the Consumption Rate Differences Come From

    Three factors drive the differences.

    1. Model size. More parameters mean higher compute cost per inference, which the platform converts into a higher credit price. In the table above, the flagship tier’s output rate is 200x the lite tier’s (400,000 vs. 2,000).
    2. Input and output are priced differently. Output tokens must be generated auto-regressively one by one, which is far more expensive than the parallel processing of input tokens. In the table, output is roughly 5x the input price for the flagship and mid tiers, while the fast and lite tiers charge the same for both.
    3. Cache hits. When a request prefix hits the cache, the input portion is billed at a lower rate. Multi-turn conversations and agent loops have highly repetitive prefixes, so the cache hit rate sets the floor for actual cost.

    3. Reverse-Engineering Consumption Rates from Call Records

    The platform’s price list may not be public, but changes in the credit balance are observable. The approach: record the input tokens, output tokens, cache-hit tokens, and the credit balance before and after each call, then use least squares to fit the consumption rates.

    Assume the credit cost of a single call is:

    1. cost = r_in * tokens_in + r_out * tokens_out + r_cache * tokens_cached

    The code below demonstrates the workflow with simulated data. The “true” rates are preset to verify that the fitting method can recover them—they do not represent any real platform’s records:

    1. import numpy as np
    2. rng = np.random.default_rng(42)
    3. n = 40 # simulate 40 records
    4. tokens_in = rng.integers(5_000, 120_000, n)
    5. tokens_out = rng.integers(500, 10_000, n)
    6. tokens_cached = rng.integers(0, 90_000, n)
    7. X = np.column_stack([tokens_in, tokens_out, tokens_cached]).astype(float)
    8. true_rates = np.array([0.08, 0.40, 0.0016]) # assumed credits per token
    9. y = X @ true_rates + rng.normal(0, 20, n) # add noise to simulate rounding error
    10. print("Matrix rank:", np.linalg.matrix_rank(X), "(should equal the 3 unknowns)")
    11. rates, *_ = np.linalg.lstsq(X, y, rcond=None)
    12. y_pred = X @ rates
    13. ss_res = np.sum((y - y_pred) ** 2)
    14. ss_tot = np.sum((y - y.mean()) ** 2)
    15. print("Fitted rates (credits/token):", rates)
    16. print("R2:", round(1 - ss_res / ss_tot, 4))
    17. print("Residual std:", round(np.std(y - y_pred), 2))

    When fitting real records, keep the following in mind:

    • Sample size. With 3 unknowns, collect at least 30 records covering different input/output ratios. If all records have nearly the same ratio, the matrix becomes near-singular and the three rates cannot be separated. If the matrix rank is below 3, the fit is unusable.
    • Consistent definition. Be clear about whether tokens_in includes the cache-hit portion, and keep the definition consistent throughout collection.
    • What R² means. R² only indicates how well the model fits the sample. With low noise and a correct definition, R² approaches 1—but that only shows a linear model holds for this batch of data. It does not prove the platform’s billing rules will never change.
    • Residual checks. If residuals are large, first check for missed calls or whether the platform adjusted rates partway through the collection period.

    4. Estimating Quota Capacity

    Once you have the rates, you can estimate how many tokens of work a quota can deliver. Assume a task is 80% input and 20% output, ignoring cache for now:

    1. usable tokens = total credits / (0.8 * r_in + 0.2 * r_out)

    Plugging in the rates above, the capacity of 60,000 credits per 5-hour window is:

    Tier Weighted rate (credits/token) Usable tokens (5-hour window) Usable tokens (weekly 600K credits)
    Flagship reasoning 0.144 ~417K ~4.17M
    Mid-tier reasoning 0.048 ~1.25M ~12.5M
    Fast tier 0.0048 ~12.5M ~125M
    Lite tier 0.002 ~30M ~300M

    With the same 60,000 credits, the lite tier processes roughly 72x more tokens than the flagship tier. The weekly 600K cap is tighter than the per-window limit, so weekly planning should be based on the last column. If every task goes to the flagship tier, a week’s quota will be exhausted quickly.

    5. How Much Does Caching Increase Capacity?

    The previous section ignored caching. Suppose cache-hit input is billed at 2% of the normal input rate, with hit rate h. Then the effective input rate is the normal rate multiplied by (1 - 0.98h). These figures are based on personal measurements; the actual ratio depends on the platform’s rules.

    Tier No cache 50% cache hits 80% cache hits
    Flagship reasoning ~417K ~533K ~639K
    Mid-tier reasoning ~1.25M ~1.69M ~2.15M
    Fast tier ~12.5M ~18.56M ~26.2M
    Lite tier ~30M ~49.3M ~80.5M

    Caching benefits the fast and lite tiers the most, because input makes up a large share of their cost and their unit prices are low. For stable content such as system prompts, tool definitions, and long documents, place it at the front of the prompt to maximize prefix hits. Put content that changes per request at the end, and reuse conversation context instead of rebuilding it every turn.

    6. Tiered Routing and Fallback Implementation

    The core idea of tiered scheduling: use the flagship tier for planning and final review, the mid tier for complex reasoning, the fast tier for code generation and modification, and the lite tier for formatting and classification. The rationale is that expensive models are called rarely but deliver high value, while cheap models handle the high-volume execution work.

    The routing function handles three things: selecting a tier by task type, checking whether the remaining balance is sufficient, and downgrading or queuing when it is not.

    1. import logging
    2. from dataclasses import dataclass
    3. logger = logging.getLogger("quota_router")
    4. RATES = { # credits/token, reverse-engineered from measurements; recalibrate regularly
    5. "flagship": {"in": 0.08, "out": 0.40},
    6. "mid_tier": {"in": 0.032, "out": 0.112},
    7. "fast_tier": {"in": 0.004, "out": 0.008},
    8. "lite_tier": {"in": 0.002, "out": 0.002},
    9. }
    10. CACHE_FACTOR = 0.02 # billing ratio for cache-hit input (personal measurement; check platform rules)
    11. SAFETY_MARGIN = 1.2 # reserve 20% headroom for estimation error
    12. LONG_TASK_TOKENS = 200_000 # tasks with longer inputs are not sent to the weakest tier
    13. BASE_TIER = {
    14. "planning": "flagship",
    15. "final_review": "flagship",
    16. "reasoning": "mid_tier",
    17. "debug_hard": "mid_tier",
    18. "code_gen": "fast_tier",
    19. "refactor": "fast_tier",
    20. "format": "lite_tier",
    21. "summary": "lite_tier",
    22. "classify": "lite_tier",
    23. }
    24. DOWNGRADE = {
    25. "flagship": "mid_tier",
    26. "mid_tier": "fast_tier",
    27. "fast_tier": "lite_tier",
    28. "lite_tier": None,
    29. }
    30. class QuotaExhausted(Exception):
    31. """Credits are insufficient for every available tier."""
    32. @dataclass
    33. class Task:
    34. type: str
    35. est_in: int # estimated input tokens; caller fills in the historical median if unknown
    36. est_out: int # estimated output tokens
    37. cache_ratio: float = 0.0 # estimated fraction of input served from cache, between 0 and 1
    38. critical: bool = False # critical tasks are never silently downgraded
    39. def estimate_credits(tier, task):
    40. rate = RATES[tier]
    41. cached = task.est_in * task.cache_ratio
    42. fresh = task.est_in - cached
    43. return (fresh * rate["in"]
    44. + cached * rate["in"] * CACHE_FACTOR
    45. + task.est_out * rate["out"])
    46. def route(task, pool_balance):
    47. """pool_balance is the remaining credits in the shared pool across all tiers."""
    48. if task.est_in < 0 or task.est_out < 0:
    49. raise ValueError("Token estimates must not be negative")
    50. if not 0 <= task.cache_ratio <= 1:
    51. raise ValueError("cache_ratio must be between 0 and 1")
    52. tier = BASE_TIER.get(task.type)
    53. if tier is None:
    54. logger.warning("Unknown task type %s, falling back to lite_tier", task.type)
    55. tier = "lite_tier"
    56. if task.est_in > LONG_TASK_TOKENS and tier == "lite_tier":
    57. tier = "fast_tier"
    58. while tier is not None:
    59. need = estimate_credits(tier, task) * SAFETY_MARGIN
    60. if need <= pool_balance:
    61. return tier, need
    62. logger.info("%s needs ~%.0f credits, balance %.0f", tier, need, pool_balance)
    63. if task.critical:
    64. break
    65. tier = DOWNGRADE[tier]
    66. raise QuotaExhausted("Insufficient credits; the task should be queued for the next window")

    A few implementation notes:

    • Recalibrate rates regularly. The rates in RATES come from reverse engineering and may drift when the platform adjusts pricing. Re-run the least-squares fit periodically with fresh records.
    • Estimate conservatively. SAFETY_MARGIN reserves headroom because token estimates are rough; underestimating output length is the most common failure mode.
    • Protect critical tasks. A task marked critical raises QuotaExhausted instead of silently dropping to a weaker tier, so quality-sensitive work never degrades without an explicit signal.

    With fitted consumption rates, capacity estimates, and a routing layer in place, the same weekly quota can support a far larger workload—high-value calls go to expensive tiers, while bulk execution stays on cheap ones.