AWS Lambda CPU inference for Qwen costs over 80x more
In a hands-on experiment, the author split H2O-Lightning, a fine-tune of Qwen3.5-4B, across 5,600 AWS Lambda invocations and processed about 4,000 tokens in 17 seconds. The run cost $8.40 per million tokens, more than 80 times the cited price of Google’s hosted Gemini Decision 1. The author concluded that although the distributed inference worked technically, CPU fan-out was poorly suited to the matrix computations involved.
The experiment provides a concrete cost and latency measurement showing that distributing transformer inference across serverless CPU functions can be substantially more expensive than using a hosted decision model.
Who needs a GPU?
In my work at Bevyl I was really impressed by the performance and cost characteristics of AWS Lambdas. They can massively distribute and fan out CPU-bound work, which is amazing for things like ffmpeg on long videos.
So I was curious if it was possible to run inference on self-hosted models using Lambdas. It was a random idea built on a hunch, and I like to prove such ideas right or wrong by building. In this case I was very wrong, but it was a good lesson!
I picked H2O-Lightning, a fine-tune of Qwen3.5-4B, because I wanted a small model built for decisions. I figured if this architecture had any legs, only doing decision models (a single forward pass) is the move. A decision model reads a document and answers a question about it by picking one option.
Fanning out
So the trick, if it's possible, would be fanning out. I was inspired how Remotion uses massively parallelized Lambdas to render videos.
#H2O-Lightning#Qwen3.5-4B#AWS Lambda#AWS#Gemini Decision 1#Google#Bevyl