Skip to main content

LM Studio Performance Benchmark Report: Gemma 4 E4B Instruct vs. DeepSeek R1 Qwen 8B

Date: October 2025 Models Tested: Gemma 4 E4B Instruct, DeepSeek R1 Qwen 8B Platform: LM Studio (Local Inference) Objective: To document and compare the inference performance of two leading open-source models across diverse hardware configurations.


🚀 Hardware Performance Benchmarks

The following benchmarks measure the token generation speed (t/s) under optimized conditions, demonstrating the efficiency gains achieved by modern acceleration techniques.

🖥️ Setup 1: High-Performance Desktop GPU

MetricSpecificationDetails
Hardwarer7-5700x CPU / RTX 3060 Ti 8GB VRAMOptimized for CUDA acceleration.
Acceleration100% CUDA OffloadMaximizes GPU utilization, minimizing CPU bottlenecking.
OptimizationFlash Attention EnabledSignificantly reduces memory bandwidth usage and improves speed.
Context Window8k TokensSupports complex tasks requiring long-range dependency tracking.
Benchmark Speed (Avg.)~84.5 t/sHigh throughput achieved by balancing VRAM capacity with optimized kernel execution.

🍎 Setup 2: Apple Silicon Laptop/Mini

MetricSpecificationDetails
HardwareMac Mini M4 16GB Unified MemoryOptimized for Metal acceleration and unified memory architecture.
AccelerationMetal AccelerationUtilizes the integrated GPU cores efficiently across the system memory.
Memory Headroom16GB (System)Provides ample space, allowing seamless operation of larger models (e.g., 12B/14B).
Benchmark Speed (Avg.)~80.5 t/sExcellent efficiency and stability, particularly beneficial for large context windows or multi-tasking environments.

📊 Comparative Task Performance Table

The models were evaluated across three distinct categories of complex reasoning and generation tasks. The scores reflect the model's ability to maintain high accuracy and coherence while generating output at speed.

Task CategoryDescriptionGemma 4 E4B Instruct (Performance)DeepSeek R1 Qwen 8B (Performance)Key Observation
Structured JSON ExtractionExtracting specific data points from unstructured text into a strict JSON format.Excellent. Highly reliable and fast, maintaining schema integrity even with noisy input.Very Good. Strong performance, but may occasionally require more prompt engineering for complex schemas.Both models excel here; the smaller context window of Gemma 4 can be highly efficient for structured tasks.
Code RefactoringTaking a block of code and improving its efficiency, readability, or security without changing core functionality.Excellent. Demonstrates strong understanding of common programming patterns (Python/JS). Output is clean and idiomatic.Superior. Shows deeper knowledge in multiple languages and complex architectural refactoring suggestions.DeepSeek R1 Qwen 8B shows a slight edge in depth and breadth of code knowledge.
Synthesis & Creative WritingGenerating long-form, coherent narratives or synthesizing information from multiple disparate sources.Very Good. Maintains coherence over medium lengths; highly creative and engaging tone.Superior. Exhibits superior narrative flow and contextual memory across longer outputs (up to 8k context).Qwen 8B's larger architecture provides a noticeable advantage in sustained, complex generation tasks.

🧠 Technical Deep Dive: Optimization Techniques

The high performance observed on limited VRAM setups is due to