# Comparing Qwen 3.6 and Gemma 4: Practical Testing on a Local Machine
The new local models Qwen 3.6 from Alibaba and Gemma 4 deliver impressive performance even on an average laptop. We tested them in real-world development conditions, setting up an environment for working with tools and code. The results confirm: both models integrate effectively into the workflow with proper configuration, but they require fine-tuning for limited resources.
Hardware Setup and Tool Selection
Testing was conducted on an Asus Tuf Gaming laptop with a discrete NVIDIA RTX 4070 graphics card (8 GB VRAM). Key constraints: limited video memory and the need to balance GPU acceleration with system resources. The following were selected for running the models:
- LM Studio — for loading and managing local models
- Zed IDE — as the primary development environment with an integrated AI agent
Key requirement: support for tools to work with the file system and terminal. Alternative CLI clients (OpenCode, Claude CLI, pi.dev) were ruled out due to:
- Failures when launching system prompts
- Incorrect shell detection (Bash/PowerShell)
- Issues with real-time file editing
Zed IDE showed stable performance after activating the agent via the "star" icon in the bottom-right corner (settings in the AI section).
Configuring LM Studio for Qwen 3.6
For Qwen 3.6 to work correctly in LM Studio, the Jinja template needed modification. Steps:
- In the MyModels section, select the Qwen 3.6 model
- Open settings (gear icon)
- In the Inference tab, replace the template with an optimized one
Critical changes:
- Adding
{%- set enable_thinking = false %}at the beginning of the template to speed up responses - Limiting GPU offload to 80-90% of total VRAM
- Setting context length ≤60K taking available RAM into account
Original template (abridged for example):
{%- set enable_thinking = false %}
{%- set image_count = namespace(value=0) %}
{%- macro render_content(content, do_vision_count, is_system_content=false) %}
{%- if content is string %}
{{- content }}
{%- elif content is iterable and content is not mapping %}
{%- for item in content %}
{%- if 'image' in item or 'image_url' in item or item.type == 'image' %}
{%- if do_vision_count %}
{%- set image_count.value = image_count.value + 1 %}
{%- endif %}
{{- '<tool_call><tool_call><tool_call>' }}
{%- elif 'text' in item %}
{{- item.text }}
{%- endif %}
{%- endfor %}
{%- endif %}
{%- endmacro %}
Exceeding 90% VRAM led to hallucinations and switching to Chinese/Spanish. The red warning in the LM Studio interface indicates a critical configuration error.
System Prompt and Speed Optimization
To shorten response lengths and save tokens, a specialized system prompt was used:
You are a professional React/NextJS developer. Respond briefly, without explanations. Use only necessary tokens. When working with files: first check the project structure, then make changes. Avoid generating code outside the current directory.
Optimization effects:
- Average response length reduced by 30%
- Generation speed increased by 15-20% due to disabling
thinkingmode - Fewer errors when working with tools
Important: disabling thinking (enable_thinking = false) is critical for tasks that don't require multi-step reasoning. For complex algorithms, it's recommended to keep the mode enabled.
Performance Comparison
Testing was performed on tasks:
- Generating React components
- Debugging TypeScript
- Automating terminal commands
Qwen 3.6 (35B, Q4_K_M):
- Strength: accuracy when working with tools
- Weakness: high VRAM usage at context >48K
- Speed: 12-15 tokens/sec at 85% GPU offload
Gemma 4:
- Strength: stability at low VRAM
- Weakness: errors in multi-step tool calls
- Speed: 18-22 tokens/sec with the same settings
Both models handled prompts like this correctly:
Hi. You are a professional React/NextJS developer. In the current directory...
but Qwen 3.6 showed 25% fewer errors when working with the file system. Gemma 4 generated code faster but required manual fixes for tool calls.
Key Takeaways
- VRAM Balance: Never offload more than 90% of video memory to the GPU. For RTX 4070 (8 GB), 7 GB is optimal.
- Context Limit: 60K context length requires at least 16 GB RAM. On 32 GB systems, leave 4-5 GB for the OS.
- Tools: Qwen 3.6 is more stable with tools, but Gemma 4 is faster at code generation.
- Prompts: Disabling
thinkingspeeds up responses but reduces quality for complex tasks. - Environment: Zed IDE is preferable to CLI clients for integration with development tools.
— Editorial Team
No comments yet.