Instructions to use Intel/gemma-4-31B-it-gguf-q4-k-m-AutoRound with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- llama-cpp-python
How to use Intel/gemma-4-31B-it-gguf-q4-k-m-AutoRound with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="Intel/gemma-4-31B-it-gguf-q4-k-m-AutoRound", filename="gemma-4-31B-it-Q4_K_M.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 Intel/gemma-4-31B-it-gguf-q4-k-m-AutoRound 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 Intel/gemma-4-31B-it-gguf-q4-k-m-AutoRound:Q4_K_M # Run inference directly in the terminal: llama cli -hf Intel/gemma-4-31B-it-gguf-q4-k-m-AutoRound:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf Intel/gemma-4-31B-it-gguf-q4-k-m-AutoRound:Q4_K_M # Run inference directly in the terminal: llama cli -hf Intel/gemma-4-31B-it-gguf-q4-k-m-AutoRound: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 Intel/gemma-4-31B-it-gguf-q4-k-m-AutoRound:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf Intel/gemma-4-31B-it-gguf-q4-k-m-AutoRound: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 Intel/gemma-4-31B-it-gguf-q4-k-m-AutoRound:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf Intel/gemma-4-31B-it-gguf-q4-k-m-AutoRound:Q4_K_M
Use Docker
docker model run hf.co/Intel/gemma-4-31B-it-gguf-q4-k-m-AutoRound:Q4_K_M
- LM Studio
- Jan
- vLLM
How to use Intel/gemma-4-31B-it-gguf-q4-k-m-AutoRound with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Intel/gemma-4-31B-it-gguf-q4-k-m-AutoRound" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Intel/gemma-4-31B-it-gguf-q4-k-m-AutoRound", "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/Intel/gemma-4-31B-it-gguf-q4-k-m-AutoRound:Q4_K_M
- Ollama
How to use Intel/gemma-4-31B-it-gguf-q4-k-m-AutoRound with Ollama:
ollama run hf.co/Intel/gemma-4-31B-it-gguf-q4-k-m-AutoRound:Q4_K_M
- Unsloth Studio
How to use Intel/gemma-4-31B-it-gguf-q4-k-m-AutoRound 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 Intel/gemma-4-31B-it-gguf-q4-k-m-AutoRound 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 Intel/gemma-4-31B-it-gguf-q4-k-m-AutoRound to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for Intel/gemma-4-31B-it-gguf-q4-k-m-AutoRound to start chatting
- Pi
How to use Intel/gemma-4-31B-it-gguf-q4-k-m-AutoRound with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf Intel/gemma-4-31B-it-gguf-q4-k-m-AutoRound:Q4_K_M
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": "Intel/gemma-4-31B-it-gguf-q4-k-m-AutoRound:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
How to use Intel/gemma-4-31B-it-gguf-q4-k-m-AutoRound with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf Intel/gemma-4-31B-it-gguf-q4-k-m-AutoRound: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 Intel/gemma-4-31B-it-gguf-q4-k-m-AutoRound:Q4_K_M
Run Hermes
hermes
- Atomic Chat new
- OpenClaw new
How to use Intel/gemma-4-31B-it-gguf-q4-k-m-AutoRound with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf Intel/gemma-4-31B-it-gguf-q4-k-m-AutoRound: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 "Intel/gemma-4-31B-it-gguf-q4-k-m-AutoRound: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"
- Docker Model Runner
How to use Intel/gemma-4-31B-it-gguf-q4-k-m-AutoRound with Docker Model Runner:
docker model run hf.co/Intel/gemma-4-31B-it-gguf-q4-k-m-AutoRound:Q4_K_M
- Lemonade
How to use Intel/gemma-4-31B-it-gguf-q4-k-m-AutoRound with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull Intel/gemma-4-31B-it-gguf-q4-k-m-AutoRound:Q4_K_M
Run and chat with the model
lemonade run user.gemma-4-31B-it-gguf-q4-k-m-AutoRound-Q4_K_M
List all available models
lemonade list
Model Details
This model is a gguf q4km format of google/gemma-4-31B-it generated by intel/auto-round algorithm using best recipe. Please refer to Section Generate the model for more details.
Please follow the license of the original model.
How To Use
Llama.cpp inference.
wget https://qianwen-res.oss-cn-beijing.aliyuncs.com/Qwen-VL/assets/demo.jpeg
./llama-cli -m gemma-4-31B-it-gguf-q4-k-m-AutoRound/gemma-4-31B-it-Q4_K_M.gguf -mm gemma-4-31B-it-gguf-q4-k-m-AutoRound/mmproj-model.gguf
> /image demo.jpeg
Loaded media from 'demo.jpeg'
> Describe this image.
[Start thinking]
Here's a thinking process that leads to the description:
1. **Analyze the Request:** The user wants a description of the provided image.
2. **Initial Scan/Overall Impression:**
* **Subject:** A woman and a dog.
* **Setting:** A sandy beach at sunset/sunrise.
* **Action:** The dog is giving the woman its paw.
* **Mood:** Peaceful, affectionate, warm, bonding.
3. **Detailed Breakdown (Deconstructing the image):**
* **The People/Animals (Subjects):**
* *The Dog:* A light-brown/golden Labrador Retriever (or similar breed). It's sitting and lifting its right front paw. It's wearing a blue/patterned harness with a red leash attached, lying on the sand.
* *The Woman:* A young woman with long brown hair. She's wearing a blue and white plaid (flannel) shirt and dark pants. She's sitting cross-legged (or with one knee up) on the sand, facing the dog. She has a gentle smile on her face.
* **The Action/Interaction:**
* The dog has its paw extended, and the woman is gently holding it. This is a classic "shake" or "give paw" behavior, symbolizing a bond and training.
* **The Environment (Setting):**
* *Foreground:* Pale, textured sand with some footprints and shadows.
* *Midground:* The interaction between the woman and dog.
* *Background:* The ocean with a gentle wave breaking.
* *Sky:* Bright, pale, almost washed out due to the light source (likely the sun low on the horizon).
* **Lighting and Color Palette:**
* *Lighting:* Golden hour light. The sun is low, coming from the right, creating a warm glow and long shadows. There's a bit of lens flare/overexposure on the right side.
* *Colors:* Muted and warm. Tans/beiges of the sand and dog, soft blues of the harness and shirt, white/grey of the ocean foam, and a bright white/yellow sky.
4. **Synthesizing into a Narrative Description (Drafting):**
* *Attempt 1 (Basic):* A woman is sitting on a beach with her golden retriever. The dog is giving her its paw. The woman is wearing a plaid shirt. It looks like sunset. The ocean is in the background.
* *Attempt 2 (More descriptive):* A heartwarming scene on a sandy beach during the golden hour. A young woman with long brown hair, wearing a blue and white plaid shirt, sits on the sand facing a light-brown Labrador. The dog, wearing a blue harness, is sitting up and offering its paw to the woman, who holds it
gently. In the background, soft waves are crashing on the shore under a bright, hazy sky.
* *Attempt 3 (Polishing for flow and detail - Final Version):* (This aligns with the final output provided to the user). I'll organize it logically: overall scene $\rightarrow$ subjects/action $\rightarrow$ background/lighting.
5. **Final Review:** Does the description accurately reflect everything in the image? Yes. Is the tone appropriate? Yes. Is it detailed enough without being overly wordy? Yes.
[End thinking]
A heartwarming image captures a quiet moment of bonding between a woman and her dog on a sandy beach during the "golden hour" of sunrise or sunset.
In the center of the frame, a young woman with long brown hair is sitting on the pale sand. She is wearing a blue and white plaid flannel shirt and dark trousers. Facing her is a light-brown Labrador Retriever, who is sitting upright and lifting its right front paw into the woman's hand in a "shake" gesture. The dog i
s wearing a blue patterned harness with a red leash lying on the sand beside it.
The background features the ocean, with a gentle white wave breaking on the shore. The sky is bright and hazy, with the warm, glowing light of the low sun coming from the right, casting soft shadows across the textured sand and creating a peaceful, affectionate atmosphere.
Generate the model
Here is the sample command to reproduce the model
auto_round_best google/gemma-4-31B-it/ --format "gguf:q4_k_m" --output_dir tmp_autoround --enable_alg_ext
Ethical Considerations and Limitations
The model can produce factually incorrect output, and should not be relied on to produce factually accurate information. Because of the limitations of the pretrained model and the finetuning datasets, it is possible that this model could generate lewd, biased or otherwise offensive outputs.
Therefore, before deploying any applications of the model, developers should perform safety testing.
Caveats and Recommendations
Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model.
Here are a couple of useful links to learn more about Intel's AI software:
- Intel Neural Compressor link
Disclaimer
The license on this model does not constitute legal advice. We are not responsible for the actions of third parties who use this model. Please consult an attorney before using this model for commercial purposes.
Cite
@article{cheng2023optimize, title={Optimize weight rounding via signed gradient descent for the quantization of llms}, author={Cheng, Wenhua and Zhang, Weiwei and Shen, Haihao and Cai, Yiyang and He, Xin and Lv, Kaokao and Liu, Yi}, journal={arXiv preprint arXiv:2309.05516}, year={2023} }
- Downloads last month
- -
4-bit