Running our own AI model · October 2026
A free AI model on a rented computer can match Gemini on quality, but only saves money if kept busy.
Instead of paying Google per use for its Gemini model, we ran free, openly published AI models on a powerful computer rented by the hour, and repeated our tests. Round one used Qwen3-Coder-Next; round two the larger DeepSeek V4 Flash.
- 96–100%DeepSeek's score explaining code (our default Gemini model 98%, Devin 94%)
- 17 / 18hidden bugs caught by DeepSeek's tests
- ~$4round one's rental, at least $10 below Gemini's bill
- 57%how busy round two's computer must be to beat Gemini's cheapest model on cost (16% to beat our default Gemini model)
What we found
- DeepSeek explained code as well as our best Gemini setup.
- Both free models wrote better tests than Gemini's cheaper model: 93% and 94% of hidden bugs caught, against 81%.
- Round one's saving came almost all from the documentation study; for chat, costs roughly matched.
- As run in round two, a chat task cost $0.24: cheaper than Devin ($0.38), but dearer than our default Gemini model ($0.21).
Where we still fall short
- Slower: 209 to 334 seconds per chat task, against 88 for Gemini.
- Qwen twice changed the main codebase without review and made something up in 17.3% of documentation answers (Gemini 2.7%).
- DeepSeek never finished the automation and documentation tests.
Bottom line: Free models are now good enough. Renting our own computer pays off only with steady, heavy use; for light use, paying Google per use is cheaper.
Full technical write-up, for engineers
Module 04 · Self-hosted model · 2026-10-13
We ran our case studies again on one rented GPU, with no frontier model in the agent's seat.
Every earlier study ran NeoDevEx on Google's Gemini models, billed per token. This time the agent ran on Qwen3-Coder-Next, an open-weight (Apache-2.0) coding model, served by vLLM on one RTX PRO 6000 GPU rented from Runpod for $1.69 an hour. We changed nothing else: same tasks, same app settings, same graders, and the same Gemini or Claude judges where the original studies used them. The result is mixed, and we report it that way. On a flat-rate GPU the four studies cost about $4 in total. Against what Gemini actually charged in the original runs that saves at least $10, almost all of it in the KT docs study; for chat and the token benchmark the two roughly break even. The same tokens at Gemini list prices with no caching would have cost $23 (2.5 Flash) to $146 (4 Argon), but Gemini uses far fewer tokens and caches, so that is an upper bound. The self-hosted model wrote the best tests NeoDevEx has scored, and it passed more token-bench tasks than Gemini on the same settings. It was weaker at explaining code and writing docs, much slower, and in automations it twice pushed straight to main and once created a GitHub repository nobody asked for.
Round 2: DeepSeek V4 Flash on two H200 GPUs (2026-10-15)
We moved up to a much larger open model: DeepSeek-V4-Flash-0731 (MIT licence, 284B parameters, 13B active per token), served by vLLM 0.30.0 on 2× H200 from Runpod at $10.58 an hour. The tasks, app settings and graders are the same as round 1. The serving benchmark and the token benchmark ran in full, and chat ran on flask and hono (14 of 36 runs). Automations and KT docs did not finish, so we publish no score for them. The model was the most accurate self-hosted agent we have tested, but at this GPU price it only beats Gemini if the GPUs are kept busy.
Quality
| Study | DeepSeek V4 Flash | Qwen (round 1) | Gemini 2.5 Flash | Gemini 4 Argon | Devin |
|---|---|---|---|---|---|
| Chat: explain code (blind Gemini 2.5 Pro judge) | 96% without thinking (5 runs: flask 98%, hono 93%); 100% with high thinking (3 flask runs) | 74% | 83% | 98% | 94% |
| Chat: write tests (planted bugs caught, mutation graded) | 94%: all 6 tests pass on the real code; 11 of 12 bugs caught without thinking, 6 of 6 with | 93% | 81% | 18 of 18 pass | 100% |
| Token benchmark (5 tasks × 3 runs, app's own checks) | 15 / 15; the T2 answers were checked by hand | 14 / 15 | 13 / 20 same settings, 17 / 20 best | – | – |
| Automations, KT docs | Did not finish (111 and 24 model calls made); no score | 8 / 10, 71.7% | 10 / 10, 81.3% | – | 7 / 10, 71.3% |
What was tested, scenario by scenario
| Scenario | Planned | Ran and graded | How it was checked |
|---|---|---|---|
| Serving: 1, 2, 4, 8, 16 and 32 requests at once, cold prefill, 32k / 64k / 128k prompts | all | all, 0 errors | Real 11.8k-token agent prompt; vLLM metrics sampled every 15 s |
| Token bench T1 fix the failing tests | 3 | 3 / 3 pass | App's own check: the test suite passes afterwards |
| Token bench T2 answer a code question, no edits | 3 | 3 / 3 pass | App check, then every answer read by hand: both real bugs named, no file changed |
| Token bench T3 review a pull request | 3 | 3 / 3 pass | App check: REVIEW.md names the real defect (average price divides by item count, not units) |
| Token bench T4 triage a bug report | 3 | 3 / 3 pass | App check: TRIAGE.md names totalWithDiscount and the percent-vs-fraction cause |
| Token bench T5 add a feature with a test | 3 | 3 / 3 pass | App check: new test/tax.test.js exists and the suite passes |
| Chat F1 explain flask (no thinking / thinking) | 3 + 3 | 3 + 3: 98%, 100% | Blind checklist judge, Gemini 2.5 Pro |
| Chat F2 write a flask test (no thinking / thinking) | 3 + 3 | 3 + 2: 8 of 9, 6 of 6 bugs | Mutation grading: the test must pass on real code and fail on each of 3 planted bugs |
| Chat H1 explain hono | 3 + 3 | 2 + 0: 93% | Blind checklist judge |
| Chat H2 write a hono test | 3 + 3 | 1 + 0: 3 of 3 bugs | Mutation grading |
| Chat K1 / K2 explain and test ky | 12 | 0 | Not run |
| Automations (10 scenarios on a real GitHub repo) | 10 | 0 graded | Started (111 model calls), stopped before any scenario was judged |
| KT docs (75 questions on 3 repos) | 75 | 0 graded | Wiki generation started (24 calls), stopped before answers |
In total, 29 agent runs finished and every one was graded: 15 token-bench runs and 14 chat runs. Every chat test file passes on the unmodified code and touches only the requested file (the hono run also left a package-lock.json, as Qwen's did). We checked the grading setup first: the rebuilt repositories gave Qwen's round-1 tests the same 2 of 3 scores they were published with. The model was never tested on ky, automations or KT docs, so we draw no conclusions about those. The GPU pods and their disks were deleted after this round, so a re-run starts again with the 167 GB download.
Speed and tokens
| DeepSeek V4 Flash | Qwen (round 1) | Gemini 2.5 Flash | |
|---|---|---|---|
| Chat task, median wall time | 209 s (no thinking), 428 s (thinking) | 334 s | 88 s |
| Chat task, tokens (calls) | 584k (25), 796k (32) with thinking | 2.24M | 0.41M |
| Token-bench task, tokens / calls / median time | 213k / 11.3 / 115 s | 180k / 11.5 / 46 s | 121k / 7.6 / 33 s |
| Input served from prefix cache | 68–93% | not reported | 62% |
| Time to first token, median | 1.6 s (11.8k-token prompt) | ||
| Output speed per request | 108 tok/s alone, ~50 tok/s while the studies shared the GPUs |
Serving sweep with the real 11.8k-token first request and 512 output tokens: 80, 158, 258, 550, 808 and 1,474 output tok/s at 1, 2, 4, 8, 16 and 32 requests at once, with zero errors. At those rates the GPUs cost $37.0, $18.6, $11.4, $5.3, $3.6 and $2.0 per 1M output tokens. Cold prefill ran at about 6k tok/s and long prompts at about 11.6k tok/s (112k tokens in 9.6 s). The KV cache held 1.5M tokens.
Cost per task, three ways
| $ per task | Chat, no thinking | Chat, thinking | Token-bench task |
|---|---|---|---|
| GPU as we ran it (the $8.55 of study time split by token share, ~$0.41 per 1M tokens) | $0.24 | $0.33 | $0.087 |
| GPU kept fully busy (estimated from the sweep: 32 requests at once, decode plus uncached prefill) | ~$0.034 | ~$0.041 | ~$0.022 |
| Same tokens on DeepSeek's own API ($0.14 in / $0.28 out per 1M, no cache discount) | $0.083 | $0.11 | $0.030 |
| Gemini 2.5 Flash, measured in its own runs | $0.06 (83% explain, 81% tests) | ~$0.02 | |
| Gemini 4 Argon, measured | $0.21 (98%, 18 of 18) | – | |
| Devin | $0.38 (94%, 2 of 2) | – | |
How busy the GPUs must be to win (chat, no thinking, at ~$0.034 a task when fully busy): at least 57% of full load to beat Gemini Flash, 16% to beat Argon, and 9% to beat Devin. As we actually ran it (about 10 requests at once, $0.24 a task), it beat only Devin. A month flat out is about $7,720 (730 h) for roughly 230,000 chat tasks. Below about 40% load, DeepSeek's own API is cheaper than renting the GPUs.
Per 10,000 lines of tests written. Each test task produced 64 lines on average (44–86). That works out to $37 per 10k lines as we ran it, about $5 fully busy, and $13 on DeepSeek's API.
What it cost, and what went wrong
- $5.38Two failed pods before the working one. A mislabelled cu129 image had a CUDA 13.0 torch with CUDA 12.9 torchvision. Its startup errors were invisible until we saved the logs to the volume and served them over HTTP.
- $8.146 minutes from creating the working pod to the model serving: 167 GB download, then fixes for NCCL (
NCCL_NVLS_ENABLE=0,NCCL_CUMEM_ENABLE=0), a CUDA 13 image on a 12.8 driver (VLLM_ENABLE_CUDA_COMPATIBILITY=1), and a 600 s engine start timeout. - $8.5548.5 minutes of study work: the serving sweep, 15 token-bench runs, 14 chat runs, and part of automations and KT.
- $6.939 minutes with the GPUs idle at the end. A script meant to run the remaining chat tasks in parallel re-read its own PID file in a loop and started hundreds of processes, the session ended, and the pod kept billing until we stopped it by hand. The 6-hour self-stop was too loose a safety net; next time the stop should trigger on gateway inactivity.
- openLayouts we could not use: tensor parallel 3 (64 heads and 256 experts do not split by 3), pipeline parallel (vllm#52761), and the model's DSpark speculative decoding on H200 (vllm#52065, #61806). We used data parallel 2 with expert parallel.
Study by study
"Gemini" is the best published NeoDevEx result for that study, on the model it used (2.5 Flash for chat and tokens; 2.5 Flash with Pro for one automation; the v3 KT pipeline). Devin figures are from the original studies. Qwen figures are from today's re-runs.
main counts as a fail. Often better analysis than Flash, but it overreached.
10 / 10
7 / 10
Gemini ahead
What it cost, GPU by the hour against Gemini by the token
The two sides are billed differently, so comparing them takes three steps: turn the GPU's hourly price into a price per token and per task using the throughput we measured, check how busy the GPU has to be to win, and put it next to what Gemini actually charged in the original runs. Token counts come from the model server for every call. Gemini prices are Google's paid list prices on 2026-10-13 (the table in our chat study's summarize.py).
How each side is billed
| Self-hosted Qwen on Runpod | Gemini 2.5 Flash | Gemini 4 Argon | |
|---|---|---|---|
| Price model | $1.69 per GPU-hour, flat, busy or idle | per token | per token |
| Input / output per 1M tokens | no per-token price | $0.30 / $2.50 | $2.00 / $10.00 |
| Cached input per 1M tokens | not reported by the server | $0.03 | $0.10 |
| Fixed costs | about 6 minutes of model load per start ($0.17), disk about $1 a day while stopped; the pod stops itself after an hour | none | none |
Price per 1M tokens, over all four studies
68.2M input and 0.96M output tokens, 69.1M in total, against a $4.00 GPU bill.
| $ per 1M tokens | Compared with Qwen all-in | |
|---|---|---|
| Qwen, all-in ($4.00 of GPU time) | $0.058 | 1× |
| Qwen, without the 46 minutes of model loading ($2.70) | $0.039 | 0.7× |
| Gemini 2.5 Flash, uncached | $0.33 | 5.7× dearer |
| Gemini 2.5 Flash, 62% of input cached | $0.17 | 2.9× dearer |
| Gemini 4 Argon, uncached | $2.11 | 36× dearer |
| Gemini 4 Argon, 62% of input cached | $0.95 | 16× dearer |
62% is the share of input Gemini actually read from cache in the chat and token studies. Per token, the flat-rate GPU is far cheaper.
Price per chat task, which is what you pay for in practice
| $ per task | Tokens per task | Explain score | Test score | |
|---|---|---|---|---|
| Qwen, as billed (GPU bill share ÷ 18 tasks) | $0.09 | 2.24M | 74% | 93% |
| Qwen, GPU fully busy at 3 tasks at once | $0.052 | 2.24M | 74% | 93% |
| Gemini 2.5 Flash (rules v4) | $0.06 | 0.41M | 83% | 81% |
| Gemini 4 Argon (rules v5) | $0.21 | not measured | 98% | 18 of 18 pass |
| Devin | $0.38 | – | 94% | 2 of 2 pass |
Qwen uses 5.4 times as many tokens per chat task as Gemini Flash, so most of its per-token advantage goes on extra tokens. Against Flash it roughly breaks even. Against Argon it is about two times cheaper, with lower accuracy.
How busy the GPU has to be to win
At 3 chat tasks at once Qwen finishes about 32 tasks an hour, so a fully busy GPU costs $0.052 a task.
| Compared with | Utilization needed for Qwen to be cheaper |
|---|---|
| Gemini 2.5 Flash ($0.06 a task) | 87% |
| Gemini 4 Argon ($0.21 a task) | 25% |
| Devin ($0.38 a task) | 14% |
Run flat out for a month, the GPU would cost about $1,235 (730 hours) and finish about 23,600 chat tasks. Gemini Flash would charge about $1,420 for the same tasks and Argon about $4,970. An idle hour still costs $1.69, so these savings hold only with steady use. We measured 3 tasks at once; vLLM could batch more, which would lower the cost per task, but we did not test it.
Against what Gemini actually charged in the original studies
| Study | Qwen, GPU time used | Gemini 2.5 Flash, actual | Gemini 4 Argon, actual |
|---|---|---|---|
| Chat agent (18 runs) | ~$1.60 | $1.08 | $3.78 |
| Token benchmark (15 runs) | ~$0.25 | $0.32 | not measured |
| Automations (11 runs) | ~$1.00 | not measured | not measured |
| KT docs (3 wikis + 75 Q&A) | ~$1.47 | $13.27 | $13.27 |
| Studies with a measured Gemini cost | ~$3.30 | $14.67 | $17.05 or more |
| Total billed for Qwen, all four studies | $4.80: $2.70 GPU busy, $1.30 model loading, $0.80 disk | ||
The per-study GPU shares overlap because the studies ran at the same time on one GPU, so they add up to more than the time actually billed. Measured Gemini costs alone come to at least $14.67 on Flash and at least $17.05 on Argon, against $4.80 billed for Qwen, so the saving is at least $10 against Flash and at least $12 against Argon. Almost all of it comes from the KT docs study, where Gemini cost $13.27 and Qwen about $1.47. For chat and the token benchmark the two roughly break even. The GPU stopped itself after an hour of uptime each time, so an idle GPU could not keep billing; the disk keeps billing at about $1 a day until the pod is deleted.
What went wrong
- AUTOMATIONSTold to work in a repository that does not exist, the agent deleted its clone's
.git, rangh repo createand made the repository instead of reporting the error. Gemini and Devin both reported it. - AUTOMATIONSTwice it pushed commits straight to
maininstead of opening a pull request: the changelog task, and an issue reply that was meant to stop after replying. It also opened two fix PRs nobody asked for. - AUTOMATIONSTwo runs left out the final
RESULT:line the delivery contract asks for, so the app would show them as unverified. One PR body lost "$50" to shell expansion and read "exactly 0". - KT DOCSFive pages ran into the 32k-token output limit in repetition loops; one ky page is 16.5k words, mostly four bullets repeated.
- KT DOCSQ&A answers averaged 112–187 words against Gemini's 276–359, and some stated the opposite of the code they quoted (the order of Flask's error-handler lookup).
- CHATOne Flask explain run ended after a single call: the model handed the work to a sub-agent and never got a usable result back, so it answered nothing.
- ALLThe model often calls tools by names from its own training (
rg,read,cat,write). The agent rejects the call and the model corrects itself on the next turn, which costs a call each time. - CHATWhere it did well: it read the code before answering, re-ran its own tests, and never edited a file outside the one it was asked to write.
- AUTOMATIONSWhere it did well: an exact triage fix (
item.quantity ?? 1) that Gemini 2.5 Flash got wrong four times out of four, and a PR review backed by a real reproduction (expected 900, got 1000), which before only Gemini 2.5 Pro did.
How we tested
Model: RedHatAI/Qwen3-Coder-Next-NVFP4 (Apache-2.0, 4-bit weights) on vLLM 0.30.0 with native tool calling and a 128k context, on one RTX PRO 6000 Blackwell (96 GB) in Runpod Community Cloud. The endpoint is OpenAI-compatible and locked with an API key. NeoDevEx reaches it through an ordinary saved LLM profile, the same way it reaches Gemini.
Only the model under test changed. Each study ran its own harness unchanged, with a small wrapper that pointed the agent at the self-hosted endpoint and switched off provider features vLLM does not serve (prompt-cache flags, reasoning effort). Graders, judges, checklists, mutation tests and the KT neutral reader stayed on the models the original studies used. In the KT study, embeddings and search stayed on Gemini because the pod serves no embedding model. Runs cut off by the pod's hourly restart were re-run and not counted as model failures. Automations ran on a separate, isolated copy of the app. Each automation ran once; chat and token tasks ran three times each.
Not covered: the onboarding study, which was running on the same machine for another model at the time.