Instructions to use lmstudio-ai/gemma-2b-it-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use lmstudio-ai/gemma-2b-it-GGUF with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf lmstudio-ai/gemma-2b-it-GGUF:Q4_K_M # Run inference directly in the terminal: llama cli -hf lmstudio-ai/gemma-2b-it-GGUF:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf lmstudio-ai/gemma-2b-it-GGUF:Q4_K_M # Run inference directly in the terminal: llama cli -hf lmstudio-ai/gemma-2b-it-GGUF:Q4_K_M
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf lmstudio-ai/gemma-2b-it-GGUF:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf lmstudio-ai/gemma-2b-it-GGUF:Q4_K_M
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf lmstudio-ai/gemma-2b-it-GGUF:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf lmstudio-ai/gemma-2b-it-GGUF:Q4_K_M
Use Docker
docker model run hf.co/lmstudio-ai/gemma-2b-it-GGUF:Q4_K_M
- LM Studio
- Jan
- Ollama
How to use lmstudio-ai/gemma-2b-it-GGUF with Ollama:
ollama run hf.co/lmstudio-ai/gemma-2b-it-GGUF:Q4_K_M
- Unsloth Studio
How to use lmstudio-ai/gemma-2b-it-GGUF with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for lmstudio-ai/gemma-2b-it-GGUF to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for lmstudio-ai/gemma-2b-it-GGUF to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for lmstudio-ai/gemma-2b-it-GGUF to start chatting
- Docker Model Runner
How to use lmstudio-ai/gemma-2b-it-GGUF with Docker Model Runner:
docker model run hf.co/lmstudio-ai/gemma-2b-it-GGUF:Q4_K_M
- Lemonade
How to use lmstudio-ai/gemma-2b-it-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull lmstudio-ai/gemma-2b-it-GGUF:Q4_K_M
Run and chat with the model
lemonade run user.gemma-2b-it-GGUF-Q4_K_M
List all available models
lemonade list
- Atomic Chat
[Solution: update to 0.2.15] unknown model architecture.
i am unable to load the model.
{
"cause": "llama.cpp error: 'unknown model architecture: 'gemma''",
"errorData": {
"n_ctx": 4096,
"n_batch": 512,
"n_gpu_layers": 21
},
"data": {
"memory": {
"ram_capacity": "15.69 GB",
"ram_unused": "6.44 GB"
},
"gpu": {
"type": "NvidiaCuda",
"vram_recommended_capacity": "6.00 GB",
"vram_unused": "4.96 GB"
},
If youβre running into this error it means youβre not yet on LM Studio 0.2.15. Get it from: https://lmstudio.ai
Issue with loading gemma. using latest version of lmstudio-v16
{
"cause": "(Exit code: 0). Some model operation failed. Try a different model and/or config.",
"suggestion": "",
"data": {
"memory": {
"ram_capacity": "127.12 GB",
"ram_unused": "113.71 GB"
},
"gpu": {
"type": "NvidiaCuda",
"vram_recommended_capacity": "12.00 GB",
"vram_unused": "11.01 GB"
},
"os": {
"platform": "win32",
"version": "10.0.22631",
"supports_avx2": true
},
"app": {
"version": "0.2.16",
"downloadsDir": "C:\\Users\\Win\\Downloads\\Gemma"
},
"model": {}
},
"title": "Model error"
}```
```json
{
"cause": "(Exit code: -1073740791). Unknown error. Try a different model and/or config.",
"suggestion": "",
"data": {
"memory": {
"ram_capacity": "127.12 GB",
"ram_unused": "113.55 GB"
},
"gpu": {
"type": "NvidiaCuda",
"vram_recommended_capacity": "12.00 GB",
"vram_unused": "11.01 GB"
},
"os": {
"platform": "win32",
"version": "10.0.22631",
"supports_avx2": true
},
"app": {
"version": "0.2.16",
"downloadsDir": "C:\\Users\\Win\\Downloads\\Gemma"
},
"model": {}
},
"title": "Model error"
}```

If youβre running into this error it means youβre not yet on LM Studio 0.2.15. Get it from: https://lmstudio.ai
I am getting the same error. and I have just installed a latest model 2.18
This also appears to be a bug in the version 0.2.21
@matheus-alegre can you please share a screenshot of the error you are getting? If possible, include the whole app screen in the image
Sure! I will also share a temporary "solution" people facing the same problem may use.
{
"cause": "(Exit code: 0). Some model operation failed. Try a different model and/or config.",
"suggestion": "",
"data": {
"memory": {
"ram_capacity": "15.29 GB",
"ram_unused": "6.41 GB"
},
"gpu": {
"type": "NvidiaCuda",
"vram_recommended_capacity": "12.00 GB",
"vram_unused": "11.01 GB"
},
"os": {
"platform": "win32",
"version": "10.0.22631",
"supports_avx2": true
},
"app": {
"version": "0.2.21",
"downloadsDir": "C:\\Users\\matheus.alegre.CDSSERVER\\.cache\\lm-studio\\models"
},
"model": {}
},
"title": "Error loading model."
}
Alternative solution that may work for some computers:
Nvidia CUDA isn't compatible with some computers using this new version of LM Studio.
You can use your integrated video card until they fix it or provide another solution. Here's how:
Go to "Hardware Settings" > "Detected GPU Type," right-click on your video card, and choose the integrated one if you have it.
@matheus-alegre
Hey i just want to ask where can i find the "Hardware Settings" because lm studio's interface is weirdly hard to understand. thank you
{
"cause": "(Exit code: -1073740791). Unknown error. Try a different model and/or config.",
"suggestion": "",
"data": {
"memory": {
"ram_capacity": "7.71 GB",
"ram_unused": "2.57 GB"
},
"gpu": {
"type": "NvidiaCuda",
"vram_recommended_capacity": "6.00 GB",
"vram_unused": "5.04 GB"
},
"os": {
"platform": "win32",
"version": "10.0.22631",
"supports_avx2": true
},
"app": {
"version": "0.2.21",
"downloadsDir": "C:\Users\wangz\.cache\lm-studio\models"
},
"model": {}
},
"title": "Error loading model."
}
@matheus-alegre
Hey i just want to ask where can i find the "Hardware Settings" because lm studio's interface is weirdly hard to understand. thank you
On the left side of the screen, go to Local Server and Stop Server if you started it:
Before you load the model, go to Advanced Configuration on the right side of the screen and you will find it:
version 0.2.23, was having the same issue - the above solution worked for me.
Local Server / Advanced Configuration / GPU Settings / Detected GPU Type - right-clicked to change this from Nvidia CUDA to OpenCL.
Solved it by changing the Detected GPU Type or GPU Backend Type to OpenCL llama.cpp
Just right click on it and manually select the above option instead of CUDA

