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 (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -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 serve -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
Any way to make Vision work with ollama and openwebui?
Hello dear friends,
I'm kinda new to self-hosting LLM and I have a question regarding the vision capability of this model.
I'm running ollama with openwebui inside docker on a Linux server. This model, while supporting vision, seems not to work when I upload an image.
I've read that I require the mmproj GGUF for vision to work. The mmproj seems to be included here and I have downloaded it. Now the question, how can add it in ollama/openwebui to this model? The tutorials seem to be a little bit confusing. I have a "models" folder in my ollama instance. It includes two subfolders "blobs" and "manifests". How can I deploy the mmproj GGUF?
Just use llama.cpp, it has a web interface where you can upload images. I only tested it with Qwen2.5-VL-Instruct.
Just use llama.cpp, it has a web interface where you can upload images. I only tested it with Qwen2.5-VL-Instruct.
Can you please share, how can i launch this model with vision? I'm using llama cpp python like this
python -m llama_cpp.server --model app/mlabonne_gemma-3-27b-it-abliterated.q4_k_m.gguf --n_gpu_layers -1 --n_ctx 8192 --host 0.0.0.0 --clip_model_path app/mmproj-model-f16.gguf
Then i'm using Open Webui
devtool shows that message sent like
{
"role": "user",
"content": [
{
"type": "text",
"text": "What can you see here?"
},
{
"type": "image_url",
"image_url": {
"url": "data:image/png;base64,iVBORw0...
}
But model "can't see any image" It's just answering the text...
You need to download both files , put them in a new empty folder. Then create a Modelfile which can just have this:
FROM .
Then open terminal in that folder and do: ollama create YOUR_NAME_OF_MODEL:latest -f Modelfile
Unfortunately, even though I merged the mmproj file and the q4_k_m model with Ollama, the ComfyUI Ollama Vision loaders say that they do not recognize the image. :(
ollama run pidrilkin/gemma3_27b_abliterated
work well
ollama run pidrilkin/gemma3_27b_abliterated
work well
This one is the easiest solution. Thanks!