Instructions to use OPEA/gemma-3-12b-it-AutoRound-gguf-q4-0 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- llama-cpp-python
How to use OPEA/gemma-3-12b-it-AutoRound-gguf-q4-0 with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="OPEA/gemma-3-12b-it-AutoRound-gguf-q4-0", filename="gemma-3-12b-it-12B-Q4_0.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 OPEA/gemma-3-12b-it-AutoRound-gguf-q4-0 with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf OPEA/gemma-3-12b-it-AutoRound-gguf-q4-0:Q4_0 # Run inference directly in the terminal: llama-cli -hf OPEA/gemma-3-12b-it-AutoRound-gguf-q4-0:Q4_0
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf OPEA/gemma-3-12b-it-AutoRound-gguf-q4-0:Q4_0 # Run inference directly in the terminal: llama-cli -hf OPEA/gemma-3-12b-it-AutoRound-gguf-q4-0:Q4_0
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 OPEA/gemma-3-12b-it-AutoRound-gguf-q4-0:Q4_0 # Run inference directly in the terminal: ./llama-cli -hf OPEA/gemma-3-12b-it-AutoRound-gguf-q4-0:Q4_0
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 OPEA/gemma-3-12b-it-AutoRound-gguf-q4-0:Q4_0 # Run inference directly in the terminal: ./build/bin/llama-cli -hf OPEA/gemma-3-12b-it-AutoRound-gguf-q4-0:Q4_0
Use Docker
docker model run hf.co/OPEA/gemma-3-12b-it-AutoRound-gguf-q4-0:Q4_0
- LM Studio
- Jan
- Ollama
How to use OPEA/gemma-3-12b-it-AutoRound-gguf-q4-0 with Ollama:
ollama run hf.co/OPEA/gemma-3-12b-it-AutoRound-gguf-q4-0:Q4_0
- Unsloth Studio
How to use OPEA/gemma-3-12b-it-AutoRound-gguf-q4-0 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 OPEA/gemma-3-12b-it-AutoRound-gguf-q4-0 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 OPEA/gemma-3-12b-it-AutoRound-gguf-q4-0 to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for OPEA/gemma-3-12b-it-AutoRound-gguf-q4-0 to start chatting
- Atomic Chat new
- Docker Model Runner
How to use OPEA/gemma-3-12b-it-AutoRound-gguf-q4-0 with Docker Model Runner:
docker model run hf.co/OPEA/gemma-3-12b-it-AutoRound-gguf-q4-0:Q4_0
- Lemonade
How to use OPEA/gemma-3-12b-it-AutoRound-gguf-q4-0 with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull OPEA/gemma-3-12b-it-AutoRound-gguf-q4-0:Q4_0
Run and chat with the model
lemonade run user.gemma-3-12b-it-AutoRound-gguf-q4-0-Q4_0
List all available models
lemonade list
Model Details
This model is an int4 model with group_size 32 and symmetric quantization of google/gemma-3-12b-it generated by intel/auto-round algorithm.
Please follow the license of the original model.
How To Use
Requirements
Please follow the Build llama.cpp locally to install the necessary dependencies.
INT4 Inference
This model has vision capabilities, more details here: https://github.com/ggml-org/llama.cpp/pull/12344
After building with Gemma 3 clip support, run the following command:
>>> wget https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/bee.jpg
>>> ./build/bin/llama-gemma3-cli -m gemma-3-12b-it-12B-Q4_0.gguf --mmproj mmproj-gemma-3-12b-it-12B-Q4_0.gguf
Output:
Running in chat mode, available commands:
/image <path> load an image
/clear clear the chat history
/quit or /exit exit the program
> /image bee.jpg
Encoding image bee.jpg
> Describe this image in detail.
Here's a detailed description of the image:
**Overall Impression:**
The image is a close-up shot of a cluster of pink cosmos flowers with a bumblebee actively foraging on one of them. The scene has a natural, slightly wild feel.
**Flowers:**
* **Type:** Cosmos flowers, identifiable by their characteristic daisy-like shape.
* **Color:** Primarily pink, with varying shades from a lighter, almost pastel pink to a slightly deeper, richer pink.
* **Condition:** Some flowers are in full bloom, while others are past their prime, showing signs of wilting and drying. Some have brown, dried seed heads.
* **Arrangement:** The flowers are clustered together, creating a dense, somewhat chaotic arrangement.
**Bumblebee:**
* **Position:** A bumblebee is positioned on the central, most prominent pink cosmos flower. It appears to be actively feeding, likely collecting nectar or pollen.
* **Appearance:** The bee has the classic fuzzy, black and yellow striped pattern of a bumblebee. Its legs are visible, and it seems to be deeply embedded within the flower.
**Background:**
* **Foliage:** The background is filled with green foliage, including large, broad leaves and smaller, more delicate stems.
* **Other Flowers:** There are hints of other flowers in the background, including a single red flower.
* **Depth of Field:** The depth of field is shallow, meaning the foreground flowers and the bee are in sharp focus, while the background is blurred, drawing attention to the main subject.
**Lighting and Composition:**
* **Lighting:** The lighting appears to be natural, likely daylight.
* **Composition:** The composition is well-balanced, with the central flower and bee serving as the focal point. The surrounding flowers and foliage create a visually interesting and natural frame.
**Overall Tone:**
The image evokes a sense of natural beauty, vibrancy, and the busy activity of pollinators in a garden setting.
Generate the model
Here is the sample command to reproduce the model.
pip install git+https://github.com/intel/auto-round.git@main
auto-round-mllm \
--model google/gemma-3-12b-it \
--device 0 \
--bits 4 \
--group_size 32 \
--batch_size 1 \
--gradient_accumulate_steps 8 \
--format 'gguf:q4_0' \
--output_dir "./tmp_autoround"
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
- 21
4-bit