AI Agent Architecture

Run Gemma 4 Locally in LM Studio on Integrated Graphics

You can run Gemma 4 locally on a computer with integrated graphics. The important decisions are not simply “CPU or GPU.” Choose a quantized model that fits in memory, keep the context only as large as the task requires, and accept the speed-versus-capability tradeoff.

Tested configuration: ExplainingComputers used a Ryzen 5 5600G with integrated graphics and 16GB RAM. A 4-bit 12B QAT model worked at roughly 5.5 to 6 tokens per second in the creator's tests; E4B reached roughly 11 to 12 tokens per second but failed one harder image-identification task that 12B completed.

The Direct Answer

Start with the classic LM Studio download, select an official or trusted Gemma 4 GGUF variant, and let the application estimate whether it fits. On a 16GB system, E4B Q4 is the safer first model. Try 12B QAT Q4 only when LM Studio says it can load and there is enough memory left for the operating system, context, and attached images or documents.

Use thinking mode selectively. Keep LM Studio's defaults first, measure a real task, then adjust one setting at a time. The creator spent hours changing low-level options and saw little benefit compared with simply disabling thinking for easy work.

Watch the Full Gemma 4 Tutorial

Source and credit: The embedded tutorial and performance tests are by ExplainingComputers. The measurements below describe that one machine and configuration, not a universal benchmark. The current product documentation and implementation guidance are added by JQ AI SYSTEMS.

Download the Right Application: LM Studio or Bionic?

The LM Studio download page now presents LM Studio Bionic first and the classic LM Studio application second. The video uses the classic application: it provides model discovery, per-model settings, a chat interface, and programmable local APIs.

LM Studio describes Bionic as a separate agent application for coding and document work. Bionic can run local models, connect to another device through LM Link, or use cloud models. Choose the classic application when following this tutorial or when you need direct control over model loading, context, GPU offload, and the local server.

Privacy check: “Using LM Studio” does not automatically mean every request stays local. Confirm the selected model and execution route. Downloaded local models can run offline; Bionic's web search and secure-cloud options are network services.

What Fits on Modest Hardware?

Google currently lists five Gemma 4 sizes: E2B, E4B, 12B, 31B, and 26B A4B. Smaller or lower-precision models require less memory and usually generate faster, while larger models generally offer more capability. The file size is only part of the memory requirement: the runtime, context or KV cache, vision inputs, and other applications also consume memory.

Starting pointWhy choose itWhat to watch
E2B or E4B Q4Better fit for laptops, mini PCs, and first experiments.Lower capability may show up on uncommon images, nuanced instructions, or complex code.
12B QAT Q4More capability while remaining practical on some 16GB systems.Leave headroom for Windows, LM Studio, context, and multimodal processing.
31B or 26B A4BHigher-capability local or workstation experiments.Not sensible defaults for the modest 16GB integrated-graphics machine demonstrated.

Google's official Gemma 4 documentation points to QAT Q4_0 GGUF variants for llama.cpp and LM Studio. In QAT, lower-precision behavior is simulated during training, allowing the model to compensate for quantization. PTQ instead compresses a trained model afterward and may lose more quality.

Five Sizes: Download Size Is Not RAM Required

The estimates below are Google's approximate Q4_0 memory to load base weights, including its stated loading overhead. They are not GGUF file downloads, minimum system RAM, or a promise that the full context and vision features will fit. Google says the runtime and KV cache add memory, and the operating system needs headroom too. The E2B and E4B names refer to effective parameters; their total stored weights are larger than the labels suggest. Source: Google model overview.

Gemma 4 E2B

Q4_0 base weights: 2.9 GB

Best starting role

The smallest edge-oriented option when memory is tight.

Check before choosing

The actual GGUF file and task quality; effective parameters do not equal total stored weights.

Gemma 4 E4B

Q4_0 base weights: 4.5 GB

Best starting role

A lighter laptop or mini-PC baseline for the tasks in this guide.

Check before choosing

Whether faster answers still meet your accuracy bar; the creator's E4B missed the okapi image.

Gemma 4 12B

Q4_0 base weights: 6.7 GB

Best starting role

The video's stronger 16GB integrated-graphics experiment.

Check before choosing

Leave room for Windows, LM Studio, context, and attached images. The creator's QAT download was 7.15GB.

Gemma 4 26B A4B

Q4_0 base weights: 14.4 GB

Best starting role

A higher-capability MoE experiment on substantially roomier hardware.

Check before choosing

Only 4B parameters are active per token, but the full model weights must still load.

Gemma 4 31B

Q4_0 base weights: 17.5 GB

Best starting role

A large dense model for a workstation rather than this 16GB tutorial PC.

Check before choosing

The weight estimate alone already exceeds the demo machine's total RAM, before runtime and context.

The tutorial's 7.15GB number is the specific 12B QAT file he downloaded in LM Studio, not Google's 6.7GB base-weight estimate. LM Studio's model listing can change with revisions, and Ollama's tags show different sizes for other packaged quantizations. Treat any chart promising a fixed minimum RAM requirement or a universal download size with caution: those numbers depend on the precise checkpoint, format, context, and runtime.

Where to Get the Model

  • Follow this video: get the classic LM Studio app, the second download on its current page, then find Gemma 4 in Discover. Bionic is a separate agent app, shown first, and is not the interface used in the tutorial.
  • Compare packaged versions: Ollama's Gemma 4 tags identify explicit sizes and formats. For example, its listed gemma4:12b package is around 7.7-8.0GB as checked on 15 October 2026. Select an explicit tag instead of assuming gemma4 will always mean the same variant.
  • Use source weights or GGUF files: Google's Gemma 4 collection contains the official model family; its QAT Q4_0 collection includes GGUF checkpoints for local runtimes. Choose the exact model and format your tool supports. Google also links Kaggle from its developer overview.

None of these apps turns a 16-bit checkpoint into a small Q4 file merely because you click Download: you select a prepared variant. After the model and runtime are installed, LM Studio can chat with local models and documents offline; searching or fetching new models requires a connection. Its current privacy policy distinguishes on-device chats from optional cloud services, so confirm the selected execution route before using private material.

Install LM Studio and Load Gemma 4

  1. Download the classic LM Studio application from the official download page. It appears below Bionic.
  2. Open Discover and search for Gemma 4. Prefer Google's official QAT collection or a clearly identified, trusted GGUF publisher.
  3. Open the available-downloads list and compare the model size, quantization, and LM Studio's fit warning.
  4. For the demonstrated 16GB computer, the creator downloaded a 7.15GB Gemma 4 12B QAT 4-bit file. E4B Q4 is a more conservative first download.
  5. Choose Use in New Chat, let the model load, and begin with a small, non-sensitive prompt.
  6. Enable Developer Mode if you want persistent timing and throughput statistics or need to verify detected hardware.

Thinking Mode Is the Largest Easy Speed Lever

With default thinking enabled, the creator's first 12B request spent about 18 seconds reasoning and reported 5.46 tokens per second. Disabling thinking made a simple conversational request begin answering almost immediately. That does not make the model intrinsically faster; it avoids generating an additional reasoning trace for a task that does not need one.

  • Thinking off: simple rewriting, translation, short summaries, extraction, and routine formatting.
  • Thinking on: difficult coding, planning, multi-step reasoning, and agentic work where the quality gain is measurable.
  • Evaluate both: compare accepted results, time, and memory on ten representative examples instead of choosing by feel.

The Settings That Actually Matter

Context length

The demonstrated model loaded with an 8,192-token context. Reducing it to 4,096 saves memory and can improve responsiveness; increasing it allows larger documents but consumes more memory and can reduce performance. The 3,900-word chapter test used the 8,192-token setting and occupied 65.9% of the available context.

CPU thread pool

The creator increased the thread pool from four to six, matching the 5600G's physical cores, but saw only a small change within normal run-to-run variation. Do not assume every logical thread improves generation. Measure before keeping the change.

GPU and KV-cache offload

The 12B QAT model could not be partially offloaded in the creator's setup. A partial E4B Q_K_M offload to the integrated GPU provided no practical advantage, likely because CPU and GPU shared the same system memory and introduced another bottleneck. Offloading the KV cache with 2GB allocated to the integrated GPU did help. Current LM Studio builds can estimate memory and automatically choose GPU usage, so defaults are the correct baseline.

What the Creator Actually Tested

TaskResult on 12B QATUseful lesson
Offline proseGenerated about 100 words on Southern Italy while the computer was disconnected.Once downloaded, model inference can run without an internet connection.
TranslationTranslated the answer into French.Offline multilingual work is possible, but a fluent reviewer should verify important output.
Image understandingIdentified both a giraffe and a less-common okapi.Multimodal capability is useful, but two images are a demonstration, not an accuracy benchmark.
Document summaryReduced a 3,900-word book chapter to roughly 200 words.Watch context use and compare summaries with the source before relying on them.
Python codingProduced a working BMI calculator in about 1 minute 50 seconds.Run and review generated code; one successful small program does not establish broader reliability.

LM Studio can extract text from PDFs and documents for chat even when the model itself natively expects text and images. That convenience belongs to the application layer, so file support and model modality should not be treated as the same claim.

E4B Versus 12B: Faster Is Not Always Better

On the same machine, E4B produced about 11.75 tokens per second versus roughly 6 for 12B. It still recognized the giraffe but failed to identify the okapi, describing the image as an abstract texture. The larger model was slower and succeeded.

This is the central hardware lesson: select the smallest model that reliably completes your task. A fast failure is not useful, and a larger model that swaps memory or stalls may also be the wrong choice. Build a compact evaluation set containing common inputs, difficult edge cases, and the errors you cannot accept.

Practical Starter Settings

ControlBegin withChange it when
ModelE4B QAT Q4 GGUFMove to 12B only if quality is insufficient and memory permits.
Context4K to 8KIncrease only when the actual input does not fit.
ThinkingOff for easy tasksEnable for complex reasoning, coding, or agentic work.
ThreadsLM Studio defaultTest physical-core count and retain it only if measured performance improves.
GPU offloadAutomaticAdjust only after checking LM Studio's memory estimate and hardware detection.
EvaluationTen representative examplesAdd every meaningful failure to the test set.

LM Studio's current Windows requirements recommend at least 16GB RAM and 4GB dedicated VRAM, but the tutorial demonstrates that CPU and integrated-graphics inference can still be useful. Treat “recommended” as a performance target and the creator's test as evidence of feasibility, not a compatibility promise for every laptop.

Related Lesson: What Changes With Agentic AI?

The local chat workflow above produces answers. Agentic systems add tools, actions, files, and longer task loops, which increases both capability and risk. This companion ExplainingComputers episode provides the broader context.

Video Chapters

Business Idea: A Private Document Workflow

The useful business angle is not selling "a local AI model." It is helping a team test one repetitive text workflow against clear quality and privacy requirements on hardware it already owns. This copy-ready prompt starts with a small pilot.

Business idea prompt

Test one private local-AI service

Measure answer quality, review effort, and speed before scaling.

Ready to copy

Sources and Links

Common questions

Can Gemma 4 run without a dedicated graphics card?
Yes. The creator ran quantized Gemma 4 models on a Ryzen 5 5600G computer with integrated graphics and 16GB of RAM. Speed and model fit depend on the exact model, quantization, context length, runtime, and available memory.
Which Gemma 4 model should a 16GB computer try first?
E4B at 4-bit precision is the lower-risk starting point. The creator also loaded a 7.15GB 12B QAT file on 16GB RAM, but the operating system, context, image processing, and runtime need memory too. Use LM Studio's fit estimate and close other heavy applications.
What is the difference between Gemma 4 QAT and PTQ?
Quantization-aware training simulates lower precision during training so the model can compensate for it. Post-training quantization compresses an already trained model. Google provides official QAT Q4 GGUF files for llama.cpp-compatible tools such as LM Studio.
Should thinking mode stay enabled?
Not for every request. The creator disabled it for simple writing and translation because the reasoning delay dominated the task, then recommended enabling it for harder work such as coding or agentic tasks. Test both modes on your own evaluation set.
Does LM Studio work fully offline?
Downloaded models can be loaded and used offline. Model discovery, downloads, updates, web search, cloud models, and other network features need connectivity. Verify the selected model and endpoint before processing sensitive material.
Is LM Studio Bionic the same application shown in the video?
No. Bionic is a newer, separate agent application that can use local models, remote devices, or LM Studio Secure Cloud. The video shows the classic LM Studio application for model discovery, low-level configuration, chat, and local APIs.
How much RAM do I need for each Gemma 4 model?
There is no universal RAM number. Google publishes approximate Q4_0 base-weight loading estimates from 2.9GB for E2B to 17.5GB for 31B, but the operating system, runtime, KV cache, context, and other applications need additional memory. A download file size is not a system-RAM requirement.
Share
X LinkedIn Reddit
Build Yours

Want a system
like this one?

Book a free 30-minute call. We map your situation, identify the highest-impact automation, and figure out if we are a fit.

Book Free 30-min Call