Instructions to use llmfan46/gemma-4-31B-it-uncensored-heretic-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use llmfan46/gemma-4-31B-it-uncensored-heretic-GGUF with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="llmfan46/gemma-4-31B-it-uncensored-heretic-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("llmfan46/gemma-4-31B-it-uncensored-heretic-GGUF", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use llmfan46/gemma-4-31B-it-uncensored-heretic-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 llmfan46/gemma-4-31B-it-uncensored-heretic-GGUF:Q4_K_M # Run inference directly in the terminal: llama cli -hf llmfan46/gemma-4-31B-it-uncensored-heretic-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 llmfan46/gemma-4-31B-it-uncensored-heretic-GGUF:Q4_K_M # Run inference directly in the terminal: llama cli -hf llmfan46/gemma-4-31B-it-uncensored-heretic-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 llmfan46/gemma-4-31B-it-uncensored-heretic-GGUF:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf llmfan46/gemma-4-31B-it-uncensored-heretic-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 llmfan46/gemma-4-31B-it-uncensored-heretic-GGUF:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf llmfan46/gemma-4-31B-it-uncensored-heretic-GGUF:Q4_K_M
Use Docker
docker model run hf.co/llmfan46/gemma-4-31B-it-uncensored-heretic-GGUF:Q4_K_M
- LM Studio
- Jan
- vLLM
How to use llmfan46/gemma-4-31B-it-uncensored-heretic-GGUF with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "llmfan46/gemma-4-31B-it-uncensored-heretic-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": "llmfan46/gemma-4-31B-it-uncensored-heretic-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/llmfan46/gemma-4-31B-it-uncensored-heretic-GGUF:Q4_K_M
- SGLang
How to use llmfan46/gemma-4-31B-it-uncensored-heretic-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 "llmfan46/gemma-4-31B-it-uncensored-heretic-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": "llmfan46/gemma-4-31B-it-uncensored-heretic-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 "llmfan46/gemma-4-31B-it-uncensored-heretic-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": "llmfan46/gemma-4-31B-it-uncensored-heretic-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 llmfan46/gemma-4-31B-it-uncensored-heretic-GGUF with Ollama:
ollama run hf.co/llmfan46/gemma-4-31B-it-uncensored-heretic-GGUF:Q4_K_M
- Unsloth Desktop
- Pi
How to use llmfan46/gemma-4-31B-it-uncensored-heretic-GGUF with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf llmfan46/gemma-4-31B-it-uncensored-heretic-GGUF:Q4_K_M
Configure the model in Pi
# Install Pi: npm install -g @earendil-works/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "llmfan46/gemma-4-31B-it-uncensored-heretic-GGUF:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use llmfan46/gemma-4-31B-it-uncensored-heretic-GGUF with Docker Model Runner:
docker model run hf.co/llmfan46/gemma-4-31B-it-uncensored-heretic-GGUF:Q4_K_M
- Lemonade
How to use llmfan46/gemma-4-31B-it-uncensored-heretic-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull llmfan46/gemma-4-31B-it-uncensored-heretic-GGUF:Q4_K_M
Run and chat with the model
lemonade run user.gemma-4-31B-it-uncensored-heretic-GGUF-Q4_K_M
List all available models
lemonade list
- Hermes Agent
How to use llmfan46/gemma-4-31B-it-uncensored-heretic-GGUF with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf llmfan46/gemma-4-31B-it-uncensored-heretic-GGUF:Q4_K_M
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:8080/v1 hermes config set model.default llmfan46/gemma-4-31B-it-uncensored-heretic-GGUF:Q4_K_M
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use llmfan46/gemma-4-31B-it-uncensored-heretic-GGUF with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf llmfan46/gemma-4-31B-it-uncensored-heretic-GGUF:Q4_K_M
Configure OpenClaw
# Install OpenClaw: npm install -g openclaw@latest # Register the local server and set it as the default model: openclaw onboard --non-interactive --mode local \ --auth-choice custom-api-key \ --custom-base-url http://127.0.0.1:8080/v1 \ --custom-model-id "llmfan46/gemma-4-31B-it-uncensored-heretic-GGUF:Q4_K_M" \ --custom-provider-id llama-cpp \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
how to use in ollama with vision
place gemma-4-31B-it-mmproj-BF16.gguf and gemma-4-31B-it-uncensored-heretic-Q4_K_M.gguf together and use modelfile to import but ollama get error when running models
time=2026-04-07T08:42:02.439Z level=INFO source=server.go:432 msg="starting runner" cmd="/usr/local/bin/ollama runner --ollama-engine --port 46743"
llama_model_loader: loaded meta data with 45 key-value pairs and 833 tensors from /root/.ollama/models/blobs/sha256-d50e6f2e836a47eb3c3c0166c830a482a4b089ef36d51fe229ab2a56b48c6a49 (version GGUF V3 (latest))
llama_model_loader: Dumping metadata keys/values. Note: KV overrides do not apply in this output.
llama_model_loader: - kv 0: general.architecture str = gemma4
llama_model_loader: - kv 1: general.type str = model
llama_model_loader: - kv 2: general.sampling.top_k i32 = 64
llama_model_loader: - kv 3: general.sampling.top_p f32 = 0.950000
llama_model_loader: - kv 4: general.sampling.temp f32 = 1.000000
llama_model_loader: - kv 5: general.name str = Gemma 4 31B It Uncensored Heretic v2
llama_model_loader: - kv 6: general.version str = v2
llama_model_loader: - kv 7: general.finetune str = it-uncensored-heretic
llama_model_loader: - kv 8: general.basename str = gemma-4
llama_model_loader: - kv 9: general.size_label str = 31B
llama_model_loader: - kv 10: gemma4.block_count u32 = 60
llama_model_loader: - kv 11: gemma4.context_length u32 = 262144
llama_model_loader: - kv 12: gemma4.embedding_length u32 = 5376
llama_model_loader: - kv 13: gemma4.feed_forward_length u32 = 21504
llama_model_loader: - kv 14: gemma4.attention.head_count u32 = 32
llama_model_loader: - kv 15: gemma4.attention.head_count_kv arr[i32,60] = [16, 16, 16, 16, 16, 4, 16, 16, 16, 1...
llama_model_loader: - kv 16: gemma4.rope.freq_base f32 = 1000000.000000
llama_model_loader: - kv 17: gemma4.rope.freq_base_swa f32 = 10000.000000
llama_model_loader: - kv 18: gemma4.attention.layer_norm_rms_epsilon f32 = 0.000001
llama_model_loader: - kv 19: gemma4.attention.key_length u32 = 512
llama_model_loader: - kv 20: gemma4.attention.value_length u32 = 512
llama_model_loader: - kv 21: gemma4.final_logit_softcapping f32 = 30.000000
llama_model_loader: - kv 22: gemma4.attention.sliding_window u32 = 1024
llama_model_loader: - kv 23: gemma4.attention.shared_kv_layers u32 = 0
llama_model_loader: - kv 24: gemma4.embedding_length_per_layer_input u32 = 0
llama_model_loader: - kv 25: gemma4.attention.sliding_window_pattern arr[bool,60] = [true, true, true, true, true, false,...
llama_model_loader: - kv 26: gemma4.attention.key_length_swa u32 = 256
llama_model_loader: - kv 27: gemma4.attention.value_length_swa u32 = 256
llama_model_loader: - kv 28: gemma4.rope.dimension_count u32 = 512
llama_model_loader: - kv 29: gemma4.rope.dimension_count_swa u32 = 256
llama_model_loader: - kv 30: tokenizer.ggml.model str = gemma4
llama_model_loader: - kv 31: tokenizer.ggml.tokens arr[str,262144] = ["", "", "", "", ...
llama_model_loader: - kv 32: tokenizer.ggml.scores arr[f32,262144] = [-1000.000000, -1000.000000, -1000.00...
llama_model_loader: - kv 33: tokenizer.ggml.token_type arr[i32,262144] = [3, 3, 3, 3, 3, 1, 1, 1, 1, 1, 1, 1, ...
llama_model_loader: - kv 34: tokenizer.ggml.merges arr[str,514906] = ["\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n", ...
llama_model_loader: - kv 35: tokenizer.ggml.bos_token_id u32 = 2
llama_model_loader: - kv 36: tokenizer.ggml.eos_token_id u32 = 1
llama_model_loader: - kv 37: tokenizer.ggml.unknown_token_id u32 = 3
llama_model_loader: - kv 38: tokenizer.ggml.padding_token_id u32 = 0
llama_model_loader: - kv 39: tokenizer.ggml.mask_token_id u32 = 4
llama_model_loader: - kv 40: tokenizer.chat_template str = {%- macro format_parameters(propertie...
llama_model_loader: - kv 41: tokenizer.ggml.add_space_prefix bool = false
llama_model_loader: - kv 42: tokenizer.ggml.add_bos_token bool = false
llama_model_loader: - kv 43: general.quantization_version u32 = 2
llama_model_loader: - kv 44: general.file_type u32 = 15
llama_model_loader: - type f32: 422 tensors
llama_model_loader: - type q4_K: 355 tensors
llama_model_loader: - type q6_K: 56 tensors
print_info: file format = GGUF V3 (latest)
print_info: file type = Q4_K - Medium
print_info: file size = 17.39 GiB (4.87 BPW)
llama_model_load: error loading model: error loading model architecture: unknown model architecture: 'gemma4'
llama_model_load_from_file_impl: failed to load model
time=2026-04-07T08:42:03.504Z level=INFO source=sched.go:462 msg="failed to create server" model=llmfan46/gemma-4-31B-it-uncensored-heretic:latest error="unable to load model: /root/.ollama/models/blobs/sha256-d50e6f2e836a47eb3c3c0166c830a482a4b089ef36d51fe229ab2a56b48c6a49"
I am wondering the same, did you find a fix?