Instructions to use mlabonne/gemma-3-27b-it-abliterated-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use mlabonne/gemma-3-27b-it-abliterated-GGUF with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="mlabonne/gemma-3-27b-it-abliterated-GGUF") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] pipe(text=messages)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("mlabonne/gemma-3-27b-it-abliterated-GGUF", dtype="auto") - llama-cpp-python
How to use mlabonne/gemma-3-27b-it-abliterated-GGUF with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="mlabonne/gemma-3-27b-it-abliterated-GGUF", filename="gemma-3-27b-it-abliterated.q2_k.gguf", )
llm.create_chat_completion( messages = [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] ) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use mlabonne/gemma-3-27b-it-abliterated-GGUF with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf mlabonne/gemma-3-27b-it-abliterated-GGUF:Q4_K_M # Run inference directly in the terminal: llama-cli -hf mlabonne/gemma-3-27b-it-abliterated-GGUF:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf mlabonne/gemma-3-27b-it-abliterated-GGUF:Q4_K_M # Run inference directly in the terminal: llama-cli -hf mlabonne/gemma-3-27b-it-abliterated-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 mlabonne/gemma-3-27b-it-abliterated-GGUF:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf mlabonne/gemma-3-27b-it-abliterated-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 mlabonne/gemma-3-27b-it-abliterated-GGUF:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf mlabonne/gemma-3-27b-it-abliterated-GGUF:Q4_K_M
Use Docker
docker model run hf.co/mlabonne/gemma-3-27b-it-abliterated-GGUF:Q4_K_M
- LM Studio
- Jan
- vLLM
How to use mlabonne/gemma-3-27b-it-abliterated-GGUF with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "mlabonne/gemma-3-27b-it-abliterated-GGUF" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "mlabonne/gemma-3-27b-it-abliterated-GGUF", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker
docker model run hf.co/mlabonne/gemma-3-27b-it-abliterated-GGUF:Q4_K_M
- SGLang
How to use mlabonne/gemma-3-27b-it-abliterated-GGUF with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "mlabonne/gemma-3-27b-it-abliterated-GGUF" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "mlabonne/gemma-3-27b-it-abliterated-GGUF", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "mlabonne/gemma-3-27b-it-abliterated-GGUF" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "mlabonne/gemma-3-27b-it-abliterated-GGUF", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }' - Ollama
How to use mlabonne/gemma-3-27b-it-abliterated-GGUF with Ollama:
ollama run hf.co/mlabonne/gemma-3-27b-it-abliterated-GGUF:Q4_K_M
- Unsloth Studio
How to use mlabonne/gemma-3-27b-it-abliterated-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 mlabonne/gemma-3-27b-it-abliterated-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 mlabonne/gemma-3-27b-it-abliterated-GGUF to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for mlabonne/gemma-3-27b-it-abliterated-GGUF to start chatting
- Atomic Chat new
- Docker Model Runner
How to use mlabonne/gemma-3-27b-it-abliterated-GGUF with Docker Model Runner:
docker model run hf.co/mlabonne/gemma-3-27b-it-abliterated-GGUF:Q4_K_M
- Lemonade
How to use mlabonne/gemma-3-27b-it-abliterated-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull mlabonne/gemma-3-27b-it-abliterated-GGUF:Q4_K_M
Run and chat with the model
lemonade run user.gemma-3-27b-it-abliterated-GGUF-Q4_K_M
List all available models
lemonade list
Need mmproj file
Hi, thank you for the model.
This needs to support image inputs via LMstudio user interface. For this the problem description I give you from LLM:
LM Studio's Multimodal Requirements:
LM Studio does support multimodal models (text + image), primarily those based on the LLaVA (Large Language and Vision Assistant) architecture or similar architectures compatible with llama.cpp's multimodal features.
For this to work, you typically need two files:
The main LLM GGUF file (e.g., model-q4_k_m.gguf) which has been specifically compiled with multimodal capabilities.
A separate CLIP Vision Encoder/Projector file (often named something like mmproj-<model_type>-f16.gguf or similar). This file processes the image and translates it into embeddings the LLM can understand.
LM Studio needs both files. It usually expects the mmproj file to be in the same directory as the main GGUF model file. When it detects both compatible files, it displays the little "eye" icon next to the model name, indicating vision capabilities are enabled.
Thanks! I stole bartowski's file and uploaded it here. Let me know if that works for you @notmebug
It works excellently in LM-Studio.
Thank you very much.
ollama fail to work with configuration in ollama version is 0.6.8
error message
Error: Failed to create new sequence: failed to process inputs: this model is missing data required for image input
FROM ~/Workspace/huggingface/gemma-3-27b-it-abliterated-GGUF/gemma-3-27b-it-abliterated.q8_0.gguf
ADAPTER ~/Workspace/huggingface/gemma-3-27b-it-abliterated-GGUF/mmproj-mlabonne_gemma-3-27b-it-abliterated-f16.gguf
TEMPLATE """{{- range $i, $_ := .Messages }}
{{- $last := eq (len (slice $.Messages $i)) 1 }}
{{- if or (eq .Role "user") (eq .Role "system") }}<start_of_turn>user
{{ .Content }}<end_of_turn>
{{ if $last }}<start_of_turn>model
{{ end }}
{{- else if eq .Role "assistant" }}<start_of_turn>model
{{ .Content }}{{ if not $last }}<end_of_turn>
{{ end }}
{{- end }}
{{- end }}"""
PARAMETER stop <end_of_turn>
PARAMETER temperature 1
PARAMETER top_k 64
PARAMETER top_p 0.95
ollama does not support llama.cpp's gemma 3 vision model, because ollama has their own gguf specs for that (long story short, they have partnership directly with google so they add the support before llama.cpp have it). unfortunately nothing we can do on our side to fix that.
Works in LM Studio.

