Gemma 4 / LM Studio

Gemma 4 LM Studio

LM Studio is a free desktop app that runs Gemma 4 on your own computer with no terminal: search, download, chat. This guide covers setup, the settings that matter, the built-in local API, and using EmbeddingGemma 2.

Windows, macOS and Linux · free · runs offline after the download ·

LM Studio gemma 4 google/gemma-4-12b 7.40 GB · vision · tool use · reasoning Download Loaded ✓ Explain MoE in one line running offline
Search, download, chat - no command line needed.
5 sizesEvery Gemma 4 model, plus QAT builds
4.20 GBSmallest download, E2B
4 GBMinimum memory LM Studio lists
:1234Local API port
Setup

Run Gemma 4 in LM Studio in five steps

  1. Install LM Studio

    Download the installer for your system from lmstudio.ai, run it and open the app.

  2. Find Gemma 4

    Open the model search with Ctrl + Shift + M (Cmd on Mac) and type "Gemma".

  3. Pick a size and download

    The app shows each download's size. Not sure? Choose the 12B on a 16 GB machine. Prefer the builds marked QAT.

  4. Load it

    Press Ctrl / Cmd + L and select your Gemma model. Loading takes a few seconds.

  5. Chat

    Type a message. Everything runs on your computer; nothing is sent anywhere.

Rather use a terminal or a phone? See the install guide and mobile downloads.

Choose

Gemma 4 models in LM Studio

Pick by memory. A model has to fit in memory to run well, not just on your disk.

ModelIdentifierDownloadContextInputs listedSuits
Gemma 4 E2Bgoogle/gemma-4-e2b4.20 GB128KText, image, audioAn 8 GB machine; quick replies
Gemma 4 E4Bgoogle/gemma-4-e4b5.90 GB128KText, image, audio8 to 12 GB of memory
Gemma 4 12Bgoogle/gemma-4-12b7.40 GB256KText, imageA 16 GB machine - the best starting point
Gemma 4 26B A4Bgoogle/gemma-4-26b-a4b15.60 GB256KText, imageA 24 GB graphics card or 32 GB Mac; fast for its size
Gemma 4 31Bgoogle/gemma-4-31b19.00 GB256KText, imageA 24 GB graphics card or 32 GB Mac; best quality
🗜️

Choose the QAT builds

Add -qat to an identifier, for example google/gemma-4-12b-qat. Same download size, trained by Google to hold quality at 4-bit. See QAT builds.

🎙️

Audio

LM Studio's page lists audio input for E2B and E4B. Google's model also supports audio on the 12B; whether an app exposes it depends on the app.

🧰

What LM Studio supports

Its Gemma 4 page lists tool use, vision input and reasoning.

Identifiers, sizes and inputs from LM Studio's Gemma 4 page; the "suits" column is this site's guidance. Compare the models on the models page, in the model comparison and on benchmarks; plan memory with the VRAM guide; the 12B has its own guide.

Settings

Five settings worth checking

You find these in the model's settings when you load it, and in the panel beside the chat.

📏

Context length

Gemma 4 can hold 128K or 256K tokens, but a new model usually loads with far less. Raise it if the chat forgets earlier messages. Around 32K is a sensible start; more uses more memory.

⚡

GPU offload

Turn it up as far as it goes. If the model does not fit your graphics memory, part of it runs on the processor and replies slow down.

🎚️

Sampling

Google recommends temperature 1.0, top-p 0.95 and top-k 64 for every Gemma 4 size. Check these if answers seem off.

🧭

System prompt

Gemma 4 has a real system role. Use the system prompt box to set tone and format once for the whole conversation.

🧠

Reasoning

Thinking helps with maths, code and planning, and slows simple chat. Switch it to suit the task.

🔄

Keep it current

Update LM Studio, and download the model again if you got it before July 2026, when Google refreshed the weights.

Sampling values from Google's model card; the rest is this site's guidance, and exact menu names vary between LM Studio versions. More in how to use Gemma 4 and prompting.

Vision

Asking about images

Attach, then ask

Add an image to your message and ask a question about it. Every Gemma 4 size reads images.

Good for

Reading screenshots and documents, describing photos, explaining charts, and comparing several images.

Know the limits

It only writes text, it may estimate when counting in busy pictures, and small text needs a clear, high-resolution image.

What vision can do is covered under capabilities and features; known gaps are in limitations.

Local API

Use Gemma 4 from your own code

LM Studio includes a local server that speaks the OpenAI format. Load a model, start the server from the Developer tab, and any tool that accepts a custom OpenAI address can use Gemma 4.

Your editor Your script Another app LM Studio serverlocalhost:1234 Gemma 4 Anything that speaks the OpenAI format can use it - no key, no internet
One model, shared by every app on your machine.
# pip install openai
from openai import OpenAI

client = OpenAI(base_url="http://localhost:1234/v1", api_key="lm-studio")

reply = client.chat.completions.create(
    model="google/gemma-4-12b",
    messages=[
        {"role": "system", "content": "You are a concise assistant."},
        {"role": "user", "content": "Explain what a context window is."},
    ],
)
print(reply.choices[0].message.content)

The key can be any text; the local server does not check it.

curl http://localhost:1234/v1/chat/completions \
  -H "Content-Type: application/json" \
  -d '{
    "model": "google/gemma-4-12b",
    "messages": [
      {"role": "system", "content": "You are a concise assistant."},
      {"role": "user", "content": "Explain what a context window is."}
    ]
  }'
lms get google/gemma-4-12b-qat     # download
lms load google/gemma-4-12b-qat    # load into memory
lms server start                   # start the local API on port 1234

LM Studio ships a command-line tool called lms for people who want to script it.

EndpointUse it for
/v1/chat/completionsChat with Gemma 4
/v1/embeddingsEmbeddings, with an embedding model loaded
/v1/modelsList the models you have
/v1/responses · /v1/completionsThe other OpenAI-style routes

Base address http://localhost:1234/v1, from LM Studio's API documentation. To connect an editor see Gemma 4 coding; for the wider picture, the API page and Gemma 4 vs Claude Code.

EmbeddingGemma 2 · released October 6, 2026
Search, not chat

EmbeddingGemma 2 in LM Studio

EmbeddingGemma 2 is Google's new open model for search. It turns content into vectors instead of writing answers, and pairs with Gemma 4 to answer questions from your own files. Google's developer guide lists LM Studio among the supported tools.

Text Image Audio Video Embedding Gemma 2 one shared vector space query
Different formats, same meaning, neighbouring points.
Where things stand on October 7, 2026. The model is one day old. LM Studio's own catalogue did not yet list EmbeddingGemma 2 when this page was checked, but a GGUF build is on Hugging Face, and LM Studio can download GGUF files from there. The steps below follow that route and were not tested for this page.
  1. Update LM Studio

    A brand-new model type needs a current version of the app and its runtime.

  2. Search for the GGUF build

    In the model search, type ggml-org/embeddinggemma-2-GGUF. It comes in two sizes: 310 MB at 8-bit and 558 MB at full precision.

  3. Load it and start the server

    Embedding models are used through the local API, not the chat window.

  4. Call the embeddings endpoint

    Send text to /v1/embeddings and you get a vector back.

curl http://localhost:1234/v1/embeddings \
  -H "Content-Type: application/json" \
  -d '{
    "model": "the-name-LM-Studio-shows-for-the-model",
    "input": "task: search result | query: What causes the northern lights?"
  }'

Use the model name exactly as LM Studio shows it. Through a raw endpoint you add the task label yourself, as in this example; Google's model card lists the labels.

The GGUF build is text only

It is the 0.3B text-and-code part of the model. For images, audio and video, use Python or Ollama for now.

Pair it with Gemma 4

Load both: EmbeddingGemma 2 finds the right passages, Gemma 4 writes the answer. The pattern is shown in how to use both.

Keep vectors at 256 or more

Google reports little quality loss down to 256 numbers, and a sharp drop at 128 for images and video.

If it is not working in LM Studio yet

# The simpler route today: Ollama, full model, all input types
ollama pull embeddinggemma-2
curl http://localhost:11434/api/embed -d '{
  "model": "embeddinggemma-2",
  "input": "What causes the northern lights?"
}'

GGUF details from the ggml-org/embeddinggemma-2-GGUF page on Hugging Face; supported tools from Google's EmbeddingGemma 2 developer guide; Ollama sizes are in how to download. Everything else about the model is in this site's EmbeddingGemma 2 guide.

Formats

GGUF or MLX?

🧱

GGUF

Works on Windows, Linux and Mac. It is the format of Google's official QAT 4-bit builds, and the safe default everywhere.

🍎

MLX

Apple's format, for Macs with Apple silicon only. LM Studio can run Gemma 4 in MLX as well as GGUF. See Mac setup.

File types are explained on the models page; figures are in technical specs.

Choosing a tool

LM Studio or Ollama?

Both are free, both run Gemma 4 locally, and you can have both installed.

LM StudioOllama
How you use itA desktop app with a chat windowCommands in a terminal
Finding modelsBuilt-in search with sizes shownNames you type, such as gemma4:12b-it-qat
Changing settingsSliders and menusCommands and files
Local APIOpenAI format, port 1234OpenAI format, port 11434
EmbeddingGemma 2 todayThrough a text-only GGUF buildIn its library, all four sizes
Scripting and serversPossible with the lms toolWhat it is built for
12B download7.40 GB7.2 GB

Green marks the easier side for most people on that row; this is the site's view, not a test. Other options are compared in the runtime selector; shared deployments are under self-hosting.

When it goes wrong

Troubleshooting

ProblemLikely causeFix
The model will not loadNot enough memory for that sizeChoose a smaller model, or lower the context length
Replies are very slowPart of the model is running on the processorRaise GPU offload; if it is already at maximum, use a smaller size
It forgets earlier messagesThe context length is too smallRaise it and reload the model
Odd symbols or broken formattingAn old download or an old app versionUpdate LM Studio and download the model again
Reasoning appears in the answerThe app is not separating the thinkingUpdate the app, or turn reasoning off
My code cannot connectThe local server is not runningStart it from the Developer tab; check the address is http://localhost:1234/v1
EmbeddingGemma 2 will not loadThe app does not support the new model type yetUpdate LM Studio, or use Ollama for now

Causes and fixes are this site's guidance, not an official list. More in the install guide and the FAQ.

FAQ

LM Studio questions

Is LM Studio free?

The app is free to download, and Gemma 4 is free under Apache 2.0. There is no per-message charge. Check LM Studio's own terms if you plan to use it at work.

Which Gemma 4 model should I download in LM Studio?

The 12B on a 16 GB machine, E4B on 8 GB, and the 26B A4B or 31B with a 24 GB graphics card or a 32 GB Mac. Prefer the QAT builds.

How much memory do I need?

LM Studio lists 4 GB of RAM as the minimum for the smallest Gemma 4. Larger models need more: about 6.7 GB for the 12B's weights at 4-bit, and 17.5 GB for the 31B.

Does it work offline?

Yes. After the model is downloaded, chatting needs no connection, and your messages stay on your computer.

Can I use EmbeddingGemma 2 in LM Studio?

Google lists LM Studio as supported. On October 7, 2026 it was not yet in LM Studio's own catalogue, but a text-only GGUF build can be downloaded from Hugging Face inside the app.

Can I send images?

Yes. Every Gemma 4 size reads images, and LM Studio lists vision input for Gemma 4.

Can other apps use the model LM Studio is running?

Yes. Start the local server and point the app at http://localhost:1234/v1. It speaks the OpenAI format.

Where else can I run Gemma 4?

Ollama, Python, a phone, or a hosted service. See the download hub, Android, the playground, chat and pricing. Safety notes are under safety.

Search, download, chat

Get LM Studio, pick a Gemma 4 model that fits your memory, and you are running in minutes.

Top '