hn.today

Serving Qwen via AWS Lambdas for fun and 80x negative profit

noahbuilt.it132 points20 comments
Screenshot of Serving Qwen via AWS Lambdas for fun and 80x negative profit

The experiment tests whether AWS Lambda’s ability to fan out CPU-heavy work can make self-hosted language-model inference practical without a GPU. The chosen model, H2O-Lightning, is a 9.3 GB fine-tune of Qwen3.5-4B, too large for a Lambda’s 3 GB limit. The workaround splits inference across its 32 layers: each invocation processes one layer and token block, reading intermediate data from and writing results to S3. Although much of the computation can run in parallel, dependencies between layers and token blocks create a sequential staircase. The approach successfully distributed one request across 5,600 Lambda invocations, but took 17 seconds to process roughly 4,000 tokens.

The economics make the experiment a clear failure as a serving strategy. That single document read cost 3.4 cents, equivalent to $8.40 per million tokens - more than 80 times the $0.10-per-million-token price of a hosted decision model from Google. The central lesson is that Lambda’s parallelism does not overcome the cost and latency of coordinating model computations; large matrix multiplications are precisely the work GPUs handle well. The experiment also shows that, with modern tooling, an application developer can work directly with model layers and transformer APIs. Open models may be accessible like ordinary APIs, but running them economically still requires suitable hardware.

Read on noahbuilt.it20 comments on Hacker News

Summary generated by AI from the linked article. hn.today is not affiliated with Hacker News or Y Combinator.

More in AI

The daily digest

Today's best Hacker News stories, summarized and screenshotted, one email a day.