Instructions to use CISCai/gemma-4-31B-it-NVFP4-turbo-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use CISCai/gemma-4-31B-it-NVFP4-turbo-GGUF with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="CISCai/gemma-4-31B-it-NVFP4-turbo-GGUF") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("CISCai/gemma-4-31B-it-NVFP4-turbo-GGUF", dtype="auto") - llama-cpp-python
How to use CISCai/gemma-4-31B-it-NVFP4-turbo-GGUF with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="CISCai/gemma-4-31B-it-NVFP4-turbo-GGUF", filename="gemma-4-31B-it-NVFP4-turbo-NVFP4.gguf", )
llm.create_chat_completion( messages = [ { "role": "user", "content": "What is the capital of France?" } ] ) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use CISCai/gemma-4-31B-it-NVFP4-turbo-GGUF with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf CISCai/gemma-4-31B-it-NVFP4-turbo-GGUF:NVFP4 # Run inference directly in the terminal: llama-cli -hf CISCai/gemma-4-31B-it-NVFP4-turbo-GGUF:NVFP4
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf CISCai/gemma-4-31B-it-NVFP4-turbo-GGUF:NVFP4 # Run inference directly in the terminal: llama-cli -hf CISCai/gemma-4-31B-it-NVFP4-turbo-GGUF:NVFP4
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 CISCai/gemma-4-31B-it-NVFP4-turbo-GGUF:NVFP4 # Run inference directly in the terminal: ./llama-cli -hf CISCai/gemma-4-31B-it-NVFP4-turbo-GGUF:NVFP4
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 CISCai/gemma-4-31B-it-NVFP4-turbo-GGUF:NVFP4 # Run inference directly in the terminal: ./build/bin/llama-cli -hf CISCai/gemma-4-31B-it-NVFP4-turbo-GGUF:NVFP4
Use Docker
docker model run hf.co/CISCai/gemma-4-31B-it-NVFP4-turbo-GGUF:NVFP4
- LM Studio
- Jan
- vLLM
How to use CISCai/gemma-4-31B-it-NVFP4-turbo-GGUF with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "CISCai/gemma-4-31B-it-NVFP4-turbo-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": "CISCai/gemma-4-31B-it-NVFP4-turbo-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/CISCai/gemma-4-31B-it-NVFP4-turbo-GGUF:NVFP4
- SGLang
How to use CISCai/gemma-4-31B-it-NVFP4-turbo-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 "CISCai/gemma-4-31B-it-NVFP4-turbo-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": "CISCai/gemma-4-31B-it-NVFP4-turbo-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'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 "CISCai/gemma-4-31B-it-NVFP4-turbo-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": "CISCai/gemma-4-31B-it-NVFP4-turbo-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Ollama
How to use CISCai/gemma-4-31B-it-NVFP4-turbo-GGUF with Ollama:
ollama run hf.co/CISCai/gemma-4-31B-it-NVFP4-turbo-GGUF:NVFP4
- Unsloth Studio
How to use CISCai/gemma-4-31B-it-NVFP4-turbo-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 CISCai/gemma-4-31B-it-NVFP4-turbo-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 CISCai/gemma-4-31B-it-NVFP4-turbo-GGUF to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for CISCai/gemma-4-31B-it-NVFP4-turbo-GGUF to start chatting
- Pi
How to use CISCai/gemma-4-31B-it-NVFP4-turbo-GGUF with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama-server -hf CISCai/gemma-4-31B-it-NVFP4-turbo-GGUF:NVFP4
Configure the model in Pi
# Install Pi: npm install -g @mariozechner/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "CISCai/gemma-4-31B-it-NVFP4-turbo-GGUF:NVFP4" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
How to use CISCai/gemma-4-31B-it-NVFP4-turbo-GGUF with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama-server -hf CISCai/gemma-4-31B-it-NVFP4-turbo-GGUF:NVFP4
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 CISCai/gemma-4-31B-it-NVFP4-turbo-GGUF:NVFP4
Run Hermes
hermes
- Docker Model Runner
How to use CISCai/gemma-4-31B-it-NVFP4-turbo-GGUF with Docker Model Runner:
docker model run hf.co/CISCai/gemma-4-31B-it-NVFP4-turbo-GGUF:NVFP4
- Lemonade
How to use CISCai/gemma-4-31B-it-NVFP4-turbo-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull CISCai/gemma-4-31B-it-NVFP4-turbo-GGUF:NVFP4
Run and chat with the model
lemonade run user.gemma-4-31B-it-NVFP4-turbo-GGUF-NVFP4
List all available models
lemonade list
⚡ Gemma 4 31B IT NVFP4 Turbo GGUF
Requires ggml-org/llama.cpp#21971
A repackaged nvidia/Gemma-4-31B-IT-NVFP4 that is 68% smaller in GPU memory and ~2.5× faster than the base model, while retaining nearly identical quality (1-3% loss). Fits on a single RTX 5090 (🎉).
Approach
Three changes were made:
- Quantized all self-attention weights from BF16 → FP4 (RTN, group_size=16, matching modelopt NVFP4 format)
- Updated architecture to
Gemma4ForCausalLMand quantization config accordingly - Stripped the vision and audio encoder
Everything else is untouched — MLP layers keep NVIDIA's calibrated FP4, embed_tokens stays BF16, all norms preserved, so we retain all the nvidia/Gemma-4-31B-IT-NVFP4 optimizations.
Why RTN didn't hurt quality
RTN (Round-To-Nearest) is the simplest quantization method — no calibration data, fully reproducible. It worked here because:
- FP4 with group_size=16 and per-group scaling preserves relative weight distributions well
- Self-attention weights tend to be normally distributed near zero, where the FP4 grid has finest resolution (0, 0.5, 1.0, 1.5)
- MLP layers (more sensitive to quantization) keep NVIDIA's calibrated FP4
embed_tokensstays BF16, preventing noise from propagating through all layers
License
Apache 2.0 — same as the base model.
Credits
- Google DeepMind for Gemma 4
- NVIDIA for the modelopt NVFP4 checkpoint
- Downloads last month
- 13,453
4-bit
Model tree for CISCai/gemma-4-31B-it-NVFP4-turbo-GGUF
Base model
google/gemma-4-31BEvaluation results
- Accuracy on GPQA Diamondself-reported72.730
- Accuracy on MMLU Proself-reported83.930