Uploaded July 2026 | Updated November 2026, 3 days ago
How to run Gemma 4 open local AI models in LM Studio on a computer with integrated graphics (like most laptops and mini PCs). Although everything here will also work just fine on a system with a dedicated graphics card.
You can download the version of LM Studio shown in the video here: lmstudio.ai/download -- where is the SECOND download on offer. I note this because, in the days since the video was made, a new agentic application called "LM Studio Bionic" was released, and it is this program that is now linked on the LM Studio homepage and is now listed first on the download page.
If you enjoy this video, you may also like my episode on Agentic AI: youtube.com/watch?v=Gvt4TwGpqOs
CONFIGURATION NOTES
There are lots of settings that you can experiment with when running LLMs like Gemma 4 locally, especially if you have a powerful dedicated GPU with a lot of VRAM. But on my system with integrated graphics, I experimented with the following changes:
CONTEXT LENGTH: Go to “My Models”, click on the gear icon to access the settings for a particular model, and then click on the “Load” tab. Here you can set the “Context Length” for a model, which on my system for Gemma 4 12B defaulted to 8192 tokens. However, I tried reducing this to 4096 to save resources and increase speed. But I put this back to 8196 for the test summarizing the 3900 word book chapter.
CPU THREAD POOL SIZE: in the settings for a model, under the “Inference” tab you will find a control for the “CPU Thread Pool Size”, which by default on my system was set to 4. I increased this to 6, which is the number of physical CPU cores in my Ryzen 5600G processor, and setting the CPU Thread Pool Size to your number of physical CPU cores is often advised.
Having made these two changes, I obtained a slight increase in tokens a second. But it was very slight, and less than the variance when running different tasks. So because of this I chose not to include a section in the video explaining this. The video was already long, and I thought it better to get to the practical use of Gemma 4 five minutes earlier! :)
I also conducted many experiments with my BIOS settings in attempt to run all or part of a Gemma 4 model on the 5600G’s integrated GPU (iGPU). But Gemma 4 12B QAT cannot be partially “offloaded”, and there are limits on the amount of RAM that an iGPU can access (well, at least on older/traditional hardware ike a 5600G APU). Using the GPU Offload setting, I did manage to offload part of the Gemma 4 E4B Q_K_M model to the iGPU, but with no practical advantage (due I imagine to the model remaining in the same RAM, and bottle necks being created with the model split between the CPU and GPU). I did find it beneficial to off-load the model’s Key-Value (KV) cache to the GPU, and did this with a fixed 2GB RAM allocated to the iGPU.
My conclusion this far is to trust LM Studio to get the settings right, and only to adjust the Context Length when required to process large text files.
---
You can access most ExplainingComputers videos by category from this page: explainingcomputers.com/videos.html
More videos on film and other making, plus retro tech, can be found on my Christopher Barnatt channel: youtube.com/@ChristopherBarnatt
Chapters:
00:00 Titles & Intro
00:56 Choosing Your Model
04:25 LM Studio
08:51 Speed & Application
13:55 Images & Text Files
17:20 Coding
18:57 Gemma 4 E4B
21:31 Wrap
#Gemma4 #12B #E4B #LMStudio #LocalAI
How to run Gemma 4 open local AI models in LM Studio on a computer with integrated graphics (like most laptops and mini PCs). Although everything here will also work just fine on a system with a dedicated graphics card.
You can download the version of LM Studio shown in the video here: lmstudio.ai/download -- where is the SECOND download on offer. I note this because, in the days since the video was made, a new agentic application called "LM Studio Bionic" was released, and it is this program that is now linked on the LM Studio homepage and is now listed first on the download page.
If you enjoy this video, you may also like my episode on Agentic AI: youtube.com/watch?v=Gvt4TwGpqOs
CONFIGURATION NOTES
There are lots of settings that you can experiment with when running LLMs like Gemma 4 locally, especially if you have a powerful dedicated GPU with a lot of VRAM. But on my system with integrated graphics, I experimented with the following changes:
CONTEXT LENGTH: Go to “My Models”, click on the gear icon to access the settings for a particular model, and then click on the “Load” tab. Here you can set the “Context Length” for a model, which on my system for Gemma 4 12B defaulted to 8192 tokens. However, I tried reducing this to 4096 to save resources and increase speed. But I put this back to 8196 for the test summarizing the 3900 word book chapter.
CPU THREAD POOL SIZE: in the settings for a model, under the “Inference” tab you will find a control for the “CPU Thread Pool Size”, which by default on my system was set to 4. I increased this to 6, which is the number of physical CPU cores in my Ryzen 5600G processor, and setting the CPU Thread Pool Size to your number of physical CPU cores is often advised.
Having made these two changes, I obtained a slight increase in tokens a second. But it was very slight, and less than the variance when running different tasks. So because of this I chose not to include a section in the video explaining this. The video was already long, and I thought it better to get to the practical use of Gemma 4 five minutes earlier! :)
I also conducted many experiments with my BIOS settings in attempt to run all or part of a Gemma 4 model on the 5600G’s integrated GPU (iGPU). But Gemma 4 12B QAT cannot be partially “offloaded”, and there are limits on the amount of RAM that an iGPU can access (well, at least on older/traditional hardware ike a 5600G APU). Using the GPU Offload setting, I did manage to offload part of the Gemma 4 E4B Q_K_M model to the iGPU, but with no practical advantage (due I imagine to the model remaining in the same RAM, and bottle necks being created with the model split between the CPU and GPU). I did find it beneficial to off-load the model’s Key-Value (KV) cache to the GPU, and did this with a fixed 2GB RAM allocated to the iGPU.
My conclusion this far is to trust LM Studio to get the settings right, and only to adjust the Context Length when required to process large text files.
---
You can access most ExplainingComputers videos by category from this page: explainingcomputers.com/videos.html
More videos on film and other making, plus retro tech, can be found on my Christopher Barnatt channel: youtube.com/@ChristopherBarnatt
Chapters:
00:00 Titles & Intro
00:56 Choosing Your Model
04:25 LM Studio
08:51 Speed & Application
13:55 Images & Text Files
17:20 Coding
18:57 Gemma 4 E4B
21:31 Wrap
#Gemma4 #12B #E4B #LMStudio #LocalAI




![Best Value Ryzen PC Build
Ryzen 5 PC build, with a total cost of £234 / $270 + case and PSU (June 2023 prices).
All components used in this build are listed under “Ryzen PC Build” on the ExplainingComputers Amazon storefronts:
US Storefront: https://www.amazon.com/shop/explainingcomputers
UK Storefront: https://www.amazon.co.uk/shop/explainingcomputers
Alternatively, the components for my 5600G build, or an alternative 7600X build, are listed below. Note, as listed, that for the 5600G build you need DDR4 RAM, and for the 7600X you need DDR5.
FOR 5600G BUILD:
Ryzen 5 5600G:
Amazon US: https://amzn.to/3CSZpZO
Amazon UK: https://amzn.to/3PxXelV
Gigabyte A520M S2H:
Amazon UK https://amzn.to/42qneCu
Amazon US: https://amzn.to/3qvac9y
An alternative is the MSI A520M-A PRO Gaming: https://amzn.to/3PrHMrA
Samsung 970 EVO Plus 500GB:
Amazon US: https://amzn.to/43qsCqS
Amazon UK: https://amzn.to/3Cem4iQ
16GB Corsair Vengeance LPX DDR4 RAM (2x8GB):
Amazon UK: https://amzn.to/43C6Srq
Amazon.com: https://amzn.to/3qwvXFZ
An alternative is the Patriot Viper Steel kit (Amazon US): https://amzn.to/3XCTSQQ
FOR 7600G BUILD:
Ryzen 5 7600X:
Amazon US: https://amzn.to/46pFSO9
Amazon UK: https://amzn.to/3JCVT9X
Gigabyte A620M S2H motherboard
Amazon US: https://amzn.to/44a2OiA
Amazon UK: https://amzn.to/3XsLO4X
[A620 motherboards from other manufacturers could be used].
Samsung 970 EVO Plus 500GB
Amazon US: https://amzn.to/43qsCqS
Amazon UK: https://amzn.to/3Cem4iQ
Kingston Fury Beast / Renegade 16GB DDR5 RAM (2x8GB):
Amazon US: https://amzn.to/434mGmj
Amazon UK: https://amzn.to/42ZilAM
Please note that as an Amazon Associate, I earn a commission from any qualifying purchases that you may make if you click on the above links.
Also note that the above information has been carefully checked and, like the video, is provided in good faith. But you are always advised to check what you purchase before ordering, and in particular to check that any processor and RAM you order is compatible with your motherboard. You can do this by visiting the web page for the motherboard.
Zorin OS is available from:
https://zorin.com/os/
X-Plane is available (in both a demo and paid version) for Linux, Mac and PC from:
https://www.x-plane.com/
Other videos referenced during the build were:
Explaining Motherboard Chipsets:
https://www.youtube.com/watch?v=psQa3dSk4JY
Explaining PCIe Slots:
https://www.youtube.com/watch?v=PrXwe21biJo
Explaining USB: From 1.0 to USB4 V2.0:
https://www.youtube.com/watch?v=PctX3kcTj5U
Explaining PC Front Panel Connectors:
https://www.youtube.com/watch?v=nBJJj3FB2P8
Explaining PC Power Supplies:
Will post in July or August 2023. :)
Zorin OS 16 (includes OS installation):
https://www.youtube.com/watch?v=GTMBFtl_xs4
PC BIOS Settings:
https://www.youtube.com/watch?v=ezubjTO7rRI
IMPORTANT:
Since I made this video, I have read a report of a theoretical security risk in the firmware updater included in many Gigabyte motherboards, including the one in this build:
https://eclypsium.com/blog/supply-chain-risk-from-gigabyte-app-center-backdoor/ However, no exploitation of this risk has been reported, and Gigabyte have issued an advisory with a BIOS update fix: https://www.gigabyte.com/Press/News/2091
I have personally also disabled “APP Center Download” in the BIOS, which stops the updater running. I would advise doing this as follows:
Press “Del” on the Gigabyte splash screen on boot to enter the BIOS.
If it says “Easy Mode” at the top of the screen, press F2 to enter “Advanced Mode”.
Go to “Settings” (top menu, third across) and click on “IO Ports”.
Click on “APP Center Download and Install Configuration”.
Double click the “APP Center Download and Install Configuration” orange bar, and set to “Disabled”.
Click on “Save & Exit” (top menu, on the right) and then “Save & Exit” and select “Yes”.
Sorted. The firmware updater with a potential security risk is now disabled.
For additional ExplainingComputers videos and other content, you can become a channel member here:
https://www.youtube.com/channel/UCbiGcwDWZjz05njNPrJU7jA/join
More videos on computing and related topics can be found at:
http://www.youtube.com/@explainingcomputers
You may also like my ExplainingTheFuture channel at: http://www.youtube.com/@explainingthefuture
Chapters:
00:00 Introduction
00:53 Selecting Components
05:08 Motherboard Specification
10:36 Fitting the APU & Cooler
14:37 Fitting the RAM & SSD
17:20 A Metal Skin (installing in the case!)
21:47 5600G in Action (some tests)
24:37 Things to Come
#Ryzen #PCbuild #Ryzen5 #explainingcomputers Best Value Ryzen PC Build](https://i.ytimg.com/vi/Up4o9QQHJuY/mqdefault.jpg)





