Instructions to use ewald1976/gemma-4-12b-auto-v4 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ewald1976/gemma-4-12b-auto-v4 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="ewald1976/gemma-4-12b-auto-v4") 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 AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("ewald1976/gemma-4-12b-auto-v4") model = AutoModelForMultimodalLM.from_pretrained("ewald1976/gemma-4-12b-auto-v4", device_map="auto") 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?"} ] }, ] inputs = processor.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use ewald1976/gemma-4-12b-auto-v4 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "ewald1976/gemma-4-12b-auto-v4" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ewald1976/gemma-4-12b-auto-v4", "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/ewald1976/gemma-4-12b-auto-v4
- SGLang
How to use ewald1976/gemma-4-12b-auto-v4 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 "ewald1976/gemma-4-12b-auto-v4" \ --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": "ewald1976/gemma-4-12b-auto-v4", "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 "ewald1976/gemma-4-12b-auto-v4" \ --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": "ewald1976/gemma-4-12b-auto-v4", "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" } } ] } ] }' - Unsloth Desktop
- Docker Model Runner
How to use ewald1976/gemma-4-12b-auto-v4 with Docker Model Runner:
docker model run hf.co/ewald1976/gemma-4-12b-auto-v4
Gemma 12B Auto v4
This is the first proper release in an experimental fine-tuning series based on unsloth/gemma-4-12b-it.
Training started from the General Inquiry Thinking / Chain-of-Thought dataset and was supplemented with custom repair and broad-coverage examples created for this project. The goal is to help the model learn when reasoning is useful and when a short, direct answer is the better choice.
Small behavioral evaluation
We compared the model with the original Gemma 4 12B Instruct base on an internal suite of 40 fixed prompt/seed combinations. Both models were evaluated as Q6_K GGUFs with temperature 0.7, a maximum of 3,000 new tokens, and identical prompts and seeds.
| Model / mode | Separate reasoning used | Mean final answer | Median final answer | Empty finals | Token-limit stops |
|---|---|---|---|---|---|
| Base, Thinking enabled | 40/40 | 396.4 words | 375.5 words | 1 | 1 |
| Auto v4, Thinking enabled | 5/40 | 126.4 words | 43.0 words | 1 | 1 |
| Base, Instruct mode | 0/40 | 404.7 words | 381.5 words | 0 | 0 |
| Auto v4, Instruct mode | 0/40 | 294.4 words | 311.0 words | 0 | 0 |
Compared with the base model, Auto v4 produced final answers that were 68.1% shorter on average with Thinking enabled and 27.3% shorter in Instruct mode. With Thinking enabled, it answered directly in 35 of 40 cases while keeping a separate reasoning path available for selected tasks.
This is a small internal behavioral test focused on reasoning routing and verbosity, not a standardized benchmark or a comprehensive accuracy evaluation. The single empty, length-limited Thinking case came from a known ambiguous scheduling prompt shared by both runs.
The model was trained with Unsloth and Hugging Face TRL.
- Downloads last month
- 12
