LLM Selection: Unit Cost and Speed Matter More Than Quota Size

    Free model credits can attract developers, but they do not prove low cost. This article explains how to compare API forwarding and self-hosting, evaluate inference optimizations and their trade-offs, convert quotas into usable tokens, measure TTFT and TPS with percentiles, and check multimodal support and other practical selection criteria.

    Conclusion First: Quota Does Not Equal Low Cost

    A coding assistant recently raised the free quota for a large language model several times, from tens of dollars to hundreds of dollars, sparking discussion among developers. A larger quota shows that the platform is willing to invest, but it does not directly prove unit cost. To judge whether a model is cost-effective, look at the actual cost per token, the percentiles of time to first token (TTFT) and tokens per second (TPS), and whether the model supports the multimodal capabilities required by the business.

    Two Supply Models: API Forwarding and Self-Hosting

    There are usually two ways for a platform to obtain model compute.

    Dimension API Forwarding Self-Hosting
    Cost structure Billed at upstream unit price; relatively fixed pricing Hardware, electricity, operations labor, and other fixed costs are spread across requests; unit cost may fall at high utilization
    Elasticity Depends on upstream rate limits and quotas Can scale with your own load, but you must handle peaks yourself
    Operations Basically no need to maintain inference services Requires model loading, monitoring, and failure recovery
    Data compliance Data passes through a third-party service Data can remain in your own environment
    Failure boundary Upstream failures directly affect service Your own failures must be isolated; upstream fluctuations have less impact

    It has been speculated that one platform’s early low quota may have been related to not yet having built its own cluster. Public information cannot confirm this. What is certain is that the two approaches have different cost structures, and the discount space a platform can offer differs accordingly.

    Common Inference Optimization Techniques and Their Trade-Offs

    In self-hosted scenarios, common optimization methods include the following. Each has its own applicable conditions and costs, and should be tested against the business workload.

    1. Memory management and continuous batching: Techniques such as PagedAttention reduce memory fragmentation, while continuous batching dynamically organizes request queues, improving GPU utilization. The trade-off is increased system complexity; concurrency and memory scale must match, and gains are limited under low load.
    2. Model quantization: Quantizing parameters from FP16 to INT8 or INT4 can reduce memory usage and computation. The trade-off is possible accuracy loss, especially in code generation and long-context reasoning tasks, so it should be validated with your own evaluation set.
    3. Operator fusion: Fusing operators for specific Transformer structures reduces kernel launch overhead and memory reads/writes. The trade-off is higher maintenance cost for custom kernels; re-adaptation may be needed when the model structure or framework is upgraded.

    When these techniques are combined, the cost reduction depends on hardware, concurrency, quantization version, and request length. This article does not cite specific discount numbers because public materials usually lack complete test conditions.

    Quota and Real Usage: Calculate by Usable Tokens

    Large models are usually billed by token, and unit prices vary significantly across models. The same voucher amount can generate fewer tokens on a higher-priced model. Therefore, when evaluating a quota, first convert it into the number of usable tokens, then compare it with similar models.

    The platform dashboard is a direct basis for judging actual demand. If a model’s call volume does not change noticeably after its quota is increased, price or experience may still be the bottleneck. Such observations can serve as clues, but they are not enough to judge whether the platform’s business decisions are reasonable. Teams should run small-scale trials and record actual consumption and completion quality.

    Performance Metrics: How to Measure TTFT and TPS

    Time to first token (TTFT) determines how long users wait before seeing the first character, while TPS determines generation speed. Both are affected by hardware, concurrency, input/output length, quantization method, and sampling parameters. Numbers without test conditions cannot be compared directly.

    Specific figures such as 180 TPS or TTFT of 8 seconds lack a stated test environment and cannot be verified, so this article does not use them as conclusions. Readers can use the following fields to record their own test results:

    Field Description
    Hardware and version GPU model, memory size, inference framework version
    Concurrency Number of requests processed simultaneously
    Input/output length Token counts for typical requests; short, medium, and long tiers are recommended
    Quantization and sampling parameters Precision, temperature, top_p, etc.
    TTFT P50/P90 Median and 90th percentile of time to first token
    TPS P50/P90 Median and 90th percentile of generation speed

    Reporting percentiles is more useful than averages. Tail latency often determines whether developers continue using a tool.

    Multimodal and Base Capabilities

    In code generation scenarios, more tasks require image and text input, such as generating code from UI screenshots or locating problems from error screenshots. If a model does not support image input, teams must integrate an additional vision model or give up such scenarios. This increases integration cost and should be confirmed early in model selection.

    For base capabilities, open-source models iterate quickly, and there are many options at the same price point. Evaluation should use datasets relevant to your own business, such as bug-fixing tasks in internal codebases or API documentation generation tasks, rather than relying only on public leaderboard scores.

    Selection Checklist

    Before deciding to use a model, confirm the following items one by one.

    1. Unit cost: calculate cost per million tokens or per task under real load, including operations and failed retries.
    2. Latency and throughput: measure TTFT and TPS P50 and P90 at target concurrency.
    3. Multimodal: whether image input is supported and whether it meets business scenarios.
    4. Context length: whether it covers the file scale of typical code repositories.
    5. Quality: pass rate on your own evaluation set.
    6. Stability: service availability commitments, rate-limiting policies, and failure recovery methods.
    7. Data compliance: whether data passes through third parties and whether it meets internal policies and relevant regulations.
    8. Supply model: API forwarding or self-hosting, and the fixed costs and operational burden of each.

    Summary

    Free quotas are suitable for trials, not as a direct basis for cost. Developers should focus on speed, multimodal support, and the real cost per token. Enterprise teams should compare API forwarding and self-hosting in the same table, calculate total cost of ownership based on their own load, and then decide whether to invest in self-built inference services. Whichever approach is chosen, start with small-scale real tests before scaling up.