Token consumption is an important factor when choosing AI models for coding. Models that use fewer tokens can potentially reduce inference costs, especially when handling complex development tasks. A recent experiment by developer AJ (@ItsmeAjayKV) compared Qwen4 Max Preview and DeepSeek V4.1 Flash 1017 across 103 Three.js generation tasks. The results show a noticeable difference: Qwen4 averaged 77,469 tokens per task, while DeepSeek averaged 115,306 tokens. That's approximately 32.8% fewer tokens with Qwen4 in this particular experiment. Let's examine the results and what they mean for developers.
1. Qwen4 vs DeepSeek: Token Consumption Results
Both models were tested on the same 103 Three.js tasks. The experiment measured total token consumption, including prompts, reasoning and generated answers.
| Metric | DeepSeek V4.1 Flash 1017 | Qwen4 Max Preview |
|---|---|---|
| Tasks tested | 103 | 103 |
| Average tokens | 115,306 | 77,469 |
| Median tokens | 113,772 | 79,812 |
| Standard deviation | 29,434 | 21,874 |
| Minimum tokens | 54,034 | 25,345 |
| Maximum tokens | 173,685 | 160,148 |
Qwen4 used an average of 37,837 fewer tokens per task, representing a 32.8% reduction compared with DeepSeek. The median results also favour Qwen4. Its median consumption was 79,812 tokens, compared with 113,772 for DeepSeek. This suggests that the difference is not simply the result of a few unusually expensive tasks.
2. Qwen4 Used Fewer Tokens in 87 Out of 103 Tasks
The task-by-task results provide another useful perspective. According to the experiment, Qwen4 consumed fewer tokens in 87 of the 103 tasks, approximately 84.5% of the test set. The reported average paired difference was 37,837 fewer tokens per task. The experiment also reports a 95% confidence interval corresponding to approximately 30,627–45,047 fewer tokens per task. Qwen4 additionally showed lower variation in consumption, with a standard deviation of 21,874 compared with DeepSeek's 29,434. These results indicate more consistent token consumption across this particular task set, although they do not establish the same pattern for other coding workloads.
Image Source: AJ (@ItsmeAjayKV) – Original 103-task Three.js token efficiency comparison.
3. Why Does This Matter for Three.js Development?
Three.js is a JavaScript library used to create interactive 3D graphics in web browsers. Generating a complete Three.js project can involve creating scenes, defining geometry, configuring lighting, implementing animations and adding interactive controls. Such tasks may require multiple reasoning steps and substantial code generation. The experiment measures total token consumption rather than only the final answer. This matters because a model can generate relatively short code while consuming considerably more tokens during reasoning. By combining prompt, reasoning and output tokens, the evaluation provides a broader view of resource consumption. For the tested Three.js tasks, Qwen4 completed the work with substantially fewer tokens. However, the experiment does not measure code correctness, visual quality or task completion quality. Lower consumption should not automatically be interpreted as better code.
4. Does Lower Token Consumption Mean Lower API Costs?
Not necessarily. API costs depend on the provider's billing structure, including input tokens, cached tokens, output tokens and applicable reasoning-token charges. The experiment combines prompt, reasoning and answer tokens without providing a separate breakdown for each category. Therefore, the 32.8% reduction in token consumption cannot be directly translated into an equivalent reduction in API spending. Developers should compare actual provider rates and measure costs using their own workloads. For managing multiple hosted models, CheapestToken provides an OpenAI-compatible API, a unified prepaid wallet and pay-per-token billing for supported models. Its centralized usage visibility helps developers monitor model consumption and spending. Check the live model catalogue for current model availability and pricing.
5. Important Limitations of the Experiment
The results are useful, but they need to be interpreted within their scope.
Task coverage: The experiment focuses on 103 Three.js generation tasks. It does not establish the same token savings for Python, backend development, debugging or repository-level coding.
Successful and failed attempts: Both are included, so the results represent total consumption across tested attempts rather than the cost of successful outputs alone.
Output quality: The chart measures token consumption, not code correctness, functionality or visual quality.
Reproducibility: This is a developer-run experiment. The published chart does not provide a complete evaluation package containing all prompts, configurations and task-level outputs.
It should therefore be treated as an informative practical comparison, not a universal coding benchmark.
Final Verdict: Qwen4 Uses Fewer Tokens in This Three.js Test
The 103-task experiment shows a clear difference between Qwen4 Max Preview and DeepSeek V4.1 Flash 1017. Qwen4 averaged 77,469 tokens per task, compared with 115,306 for DeepSeek. It also used fewer tokens in 87 of the 103 tasks. For this particular Three.js workload, Qwen4 demonstrated better token efficiency. This makes it worth considering for developers working on AI-assisted 3D generation and similar creative coding tasks. However, more testing across programming languages and development workflows is needed before generalising the result. The key finding is specific: Qwen4 Max Preview consumed approximately 32.8% fewer tokens than DeepSeek V4.1 Flash 1017 across the 103 tested Three.js tasks.
Disclaimer: This comparison is based on an independent, developer-run experiment and is not an official benchmark or an independently audited evaluation. The results reflect token consumption across 103 specific Three.js generation tasks and should not be interpreted as a measure of overall model performance, code quality, or API cost. Actual results may vary depending on prompts, task complexity, model configurations, and usage conditions.
