High-Throughput Batch Inference with Multi-Channel Concurrency: From Model Selection to Time and Cost Accounting

    For large-scale batch LLM workloads, model accuracy is often no longer the bottleneck. This article presents an engineering approach to reducing total runtime and accounting for cost: async multi-channel concurrency, peak/off-peak scheduling, three-dimensional billing analysis, local resource limits, and a tiered channel strategy.

    1. Change the Ledger: From “Good Enough Accuracy” to “Enough Time Saved”

    Developers running large-scale batch tasks—data cleaning, rule-based labeling, massive text extraction, and similar workloads—often share the same experience: when task rules are clear and each step is not particularly difficult, the accuracy differences among current mainstream LLM APIs are already very small. None of them is likely to be the bottleneck. For this kind of “simple rules + high volume” work, model capability has long passed the minimum bar.

    This means the focus of model selection must shift. In the past, we compared context length, reasoning quality, and instruction following. Now we need to calculate a different ledger: total runtime and overall cost. For a batch of 30,000 results, running with one model for 10 hours versus another for 1 hour has a much greater impact on delivery cadence than a 0.5% accuracy difference. Therefore, the core question of this article is: how can engineering methods reduce total runtime while making unit cost clear?

    2. Multi-Channel Concurrency: The Most Effective Speedup

    2.1 Principle and Benefits

    Batch tasks naturally have the characteristics of “no dependencies between tasks and results can be collected out of order,” making them well suited to concurrent calls. Suppose single-lane serial throughput is 1 result per minute. With N concurrent lanes—provided the server-side rate limits allow it—theoretical speedup can approach N times. In practice, network jitter, rate-limit policies, and local resources reduce the actual speedup, but it is usually an improvement in the 4–8x range.

    The concurrency implementation itself is not complicated. Async I/O is enough:

    1. import asyncio, aiohttp
    2. async def call_llm(session, semaphore, payload):
    3. async with semaphore: # Control concurrency limit
    4. async with session.post(api_url, json=payload) as resp:
    5. return await resp.json()
    6. async def main(tasks, max_concurrency=8):
    7. sem = asyncio.Semaphore(max_concurrency)
    8. async with aiohttp.ClientSession() as s:
    9. return await asyncio.gather(
    10. *[call_llm(s, sem, t) for t in tasks])

    2.2 Channel Differences Determine the Concurrency Ceiling

    When choosing a channel, focus on three parameters: allowed concurrency lanes, whether rate limiting applies, and whether peak/off-peak pricing exists.

    • Some channels allow higher concurrency at night and gradually lower the rate limit during the day. These are suitable for scheduling heavy work into nighttime windows.
    • Some channels provide stable concurrency all day with no peak/off-peak price difference. These are suitable for continuously supplying main tasks during the day.
    • Official direct connections usually have very high concurrency ceilings—potentially up to thousands of lanes. As long as budget and compute keep up, a task that would originally take tens of hours can theoretically be compressed to minutes.

    3. Peak/Off-Peak Scheduling: Match Quota with Time Windows

    A scheduling pattern that has been widely validated in practice is dual-channel complementarity: use a channel with stable concurrency and no peak/off-peak pricing to carry the main workload during peak hours, and switch to a channel with unrestricted nighttime concurrency and discounted time windows for heavy work during non-working hours. For example:

    • Daytime working hours: Channel A runs steadily at 4–5 lanes.
    • Night run + early next morning: Channel B runs steadily at 8–10 lanes, combined with nighttime discounts, significantly reducing unit cost.

    If the subscription quotas of both channels—weekly/monthly token volume—happen to match this “daytime + nighttime” usage distribution, you can fully consume every unit of the subscription package and avoid extra pay-as-you-go costs.

    4. Common Cost-Accounting Pitfalls: Do Not Focus Only on Cache Hit Rate

    Many developers pay too much attention to the price discount for “cached input.” However, in large-sample real-world tests, the cumulative share of three billing items—cached input, uncached input, and output—may be close to 1:1:1. In other words:

    • Output tokens are one of the major cost drivers. For tasks with a high output unit price—for example, tens of RMB per million tokens—saving on input caching has limited value.
    • A reasonable approach is to export the full bill, aggregate it separately across the three dimensions, and then review total cost against the price structures of different versions.
    • After the same provider adjusts prices while keeping the output unit price high, actual total cost may rise rather than fall. Use the bill from your own real task structure as the source of truth, not marketing language.

    In addition, when subscription quota is not exhausted, the pay-as-you-go direct API provides zero value for money for you. Fully using the quota is the first priority.

    5. Local Resources Are the Concurrency Ceiling

    The number of concurrent lanes is not limited only by the server side. The local machine can also hit its ceiling first. Reference measurements below are for order-of-magnitude guidance only; specific values should be tested on your own system:

    Memory capacity Suggested concurrency ceiling Safe value
    64GB ~60 concurrent requests 50 concurrent requests
    96GB ~90 concurrent requests 80 concurrent requests

    After concurrency is increased, CPU utilization will remain at 70%–100%, memory usage can exceed 85%, and cooling pressure rises sharply. There is also a counterintuitive conclusion: after upgrading memory frequency from a lower tier (e.g., 7000+ MT/s) to a higher tier (9000+ MT/s), heat generation in multi-concurrency scenarios actually increases, and overall throughput may be limited by downclocking. Therefore, in batch-task scenarios, “higher frequency” does not equal “faster.” Stable, sustained full concurrency over a long period is what matters. Mobile work laptops under long high-load operation especially need thermal-wall monitoring.

    6. Tier 3 Options: Co-Branded Channels and Tiered Usage Recommendations

    Based on overall cost-effectiveness, a three-tier usage strategy can be formed:

    1. Tier 1: Channels with high nighttime concurrency and discount windows, used for heavy nighttime batch tasks.
    2. Tier 2: Channels with stable all-day concurrency and no peak/off-peak pricing, used for main daytime supply.
    3. Tier 3: Direct official APIs, enabled only for overflow tasks after subscription quota is exhausted or for urgent rush jobs. Control daily peak spending; a costly lesson involving thousands of RMB in a single rush job is worth remembering.

    In addition, if your platform offers a co-branded package with a cloud provider—understood generically as an exclusive discount channel to a specified model through an aggregation tool—switching tasks on a single lane to that channel is often faster and does not incur extra charges. This is also a path worth adding to the checklist.

    7. Summary

    The core formulas for batch inference tasks are: total cost = unit price × usage, and total time = task volume ÷ effective concurrency. Now that model capability gradients have flattened, optimization should focus on:

    • Using async concurrency to fully saturate the concurrency ceiling allowed by the channel.
    • Scheduling dual channels complementarily by peak and off-peak windows to fully consume subscription quota.
    • Performing three-dimensional cost accounting with your own real bills instead of relying on cache-hit assumptions.
    • Determining the concurrency ceiling based on local memory and cooling; blindly pursuing high-frequency memory may backfire.

    Only by getting this “time ledger” right can you compress the delivery cycle by an order of magnitude within the same budget.