Instructions to use Intel/gemma-4-31B-it-q4km-AutoRound-preview 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-q4km-AutoRound-preview 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-q4km-AutoRound-preview", filename="gemma-4-31B-it-Q4_K_M.gguf", )
llm.create_chat_completion( messages = "No input example has been defined for this model task." )
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use Intel/gemma-4-31B-it-q4km-AutoRound-preview with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf Intel/gemma-4-31B-it-q4km-AutoRound-preview:Q4_K_M # Run inference directly in the terminal: llama-cli -hf Intel/gemma-4-31B-it-q4km-AutoRound-preview:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf Intel/gemma-4-31B-it-q4km-AutoRound-preview:Q4_K_M # Run inference directly in the terminal: llama-cli -hf Intel/gemma-4-31B-it-q4km-AutoRound-preview: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-q4km-AutoRound-preview:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf Intel/gemma-4-31B-it-q4km-AutoRound-preview: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-q4km-AutoRound-preview:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf Intel/gemma-4-31B-it-q4km-AutoRound-preview:Q4_K_M
Use Docker
docker model run hf.co/Intel/gemma-4-31B-it-q4km-AutoRound-preview:Q4_K_M
- LM Studio
- Jan
- Ollama
How to use Intel/gemma-4-31B-it-q4km-AutoRound-preview with Ollama:
ollama run hf.co/Intel/gemma-4-31B-it-q4km-AutoRound-preview:Q4_K_M
- Unsloth Studio
How to use Intel/gemma-4-31B-it-q4km-AutoRound-preview 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-q4km-AutoRound-preview 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-q4km-AutoRound-preview to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open /spaces/unsloth/studio in your browser # Search for Intel/gemma-4-31B-it-q4km-AutoRound-preview to start chatting
- Pi
How to use Intel/gemma-4-31B-it-q4km-AutoRound-preview with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama-server -hf Intel/gemma-4-31B-it-q4km-AutoRound-preview: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-q4km-AutoRound-preview:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
How to use Intel/gemma-4-31B-it-q4km-AutoRound-preview with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama-server -hf Intel/gemma-4-31B-it-q4km-AutoRound-preview: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-q4km-AutoRound-preview:Q4_K_M
Run Hermes
hermes
- Atomic Chat new
- Docker Model Runner
How to use Intel/gemma-4-31B-it-q4km-AutoRound-preview with Docker Model Runner:
docker model run hf.co/Intel/gemma-4-31B-it-q4km-AutoRound-preview:Q4_K_M
- Lemonade
How to use Intel/gemma-4-31B-it-q4km-AutoRound-preview with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull Intel/gemma-4-31B-it-q4km-AutoRound-preview:Q4_K_M
Run and chat with the model
lemonade run user.gemma-4-31B-it-q4km-AutoRound-preview-Q4_K_M
List all available models
lemonade list
llm.create_chat_completion(
messages = "No input example has been defined for this model task."
)Model Details
This model is a gguf q4km of google/gemma-4-31B-it generated by intel/auto-round. Please follow the license of the original model.
Llamacpp inference
llama-cli -m ./gemma-4-31B-it-Q4_K_M.gguf --mmproj .mmproj-model.gguf
Loaded media from 'demo.jpeg'
what's in the image
[Start thinking] Here's a thinking process that leads to the description:
Analyze the Request: The user has provided an image and asked "what's in the image". This requires a comprehensive description of the visual elements.
Initial Scan (The Big Picture):
- Main subjects: A dog and a person.
- Setting: A beach at sunset/sunrise.
- Action: The dog is "shaking hands" or giving a paw to the person.
- Mood: Warm, peaceful, affectionate.
Detailed Breakdown (Breaking it down into components):
The Person:
- Gender/Appearance: A young woman with long dark hair.
- Expression: Smiling, looking at the dog.
- Clothing: Plaid/checkered button-down shirt (dark blue/grey and white), dark pants/leggings.
- Pose: Sitting on the sand, legs bent, interacting with the dog.
The Dog:
- Breed/Type: Looks like a yellow Labrador Retriever.
- Color: Pale yellow/cream.
- Pose: Sitting upright, facing the woman, lifting its right paw to meet her hand.
- Gear: Wearing a blue and red harness. There's a red leash lying on the sand behind it.
The Setting (Background & Environment):
- Foreground: Sandy beach with some footprints and texture.
- Midground: The shoreline where waves are gently breaking.
- Background: The ocean stretching to the horizon.
- Lighting/Sky: The sun is low (either sunrise or sunset), creating a warm, golden glow coming from the right side of the frame. The sky is bright and almost washed out due to the light.
Synthesize and Structure the Description:
- Start with a high-level summary: A heartwarming scene of a woman and her dog on a beach during a golden hour.
- Describe the main interaction: The woman is sitting on the sand, and her yellow Labrador is sitting in front of her, offering its paw for her to hold.
- Add details about the woman: Mention her long dark hair, smiling expression, and plaid shirt.
- Add details about the dog: Mention the breed (Labrador), the harness it's wearing, and the leash on the sand.
- Describe the environment: Detail the sandy beach, the ocean waves, and the bright, warm light of the setting or rising sun.
- Conclude with the overall mood: Mention the peaceful and affectionate atmosphere.
Final Review: Read through the generated description while looking at the image to ensure accuracy and completeness. (Self-correction: Ensure I mention the lighting specifically, as it's a key part of the mood). [End thinking]
This image shows a heartwarming scene of a woman and her dog on a sandy beach during the "golden hour" (either sunrise or sunset).
Here are the details:
- The Subjects: A young woman with long dark hair is sitting on the sand, smiling at her dog. She is wearing a dark plaid button-down shirt and dark pants. Facing her is a yellow Labrador Retriever sitting upright. The dog is wearing a blue and red harness and is lifting its right paw to "shake hands" with the woman. A red leash lies on the sand behind the dog.
- The Setting: They are on a wide, sandy beach. In the background, the ocean is visible with gentle waves breaking on the shore.
- Lighting and Mood: The sun is low on the horizon (to the right), casting a warm, bright golden light across the scene and creating a peaceful, affectionate atmosphere. The sky is very bright, almost white, due to the intensity of the light.
Generate the Model
auto-round
google/gemma-4-31B-it
--output_dir
"./quantized"
--iters 0
--format "gguf:q4_k_m"
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:
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
- 80
4-bit
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="Intel/gemma-4-31B-it-q4km-AutoRound-preview", filename="", )