> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.nvidia.com/nemo/automodel/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.nvidia.com/nemo/automodel/_mcp/server.

# gemma-4-31B-it

> Fine-tune gemma-4-31B-it for image-text tasks with NeMo AutoModel using checked-in full-parameter, LoRA, tensor-parallel, and pipeline-parallel recipes.

[gemma-4-31B-it](https://huggingface.co/google/gemma-4-31B-it) is a multimodal Gemma 4 checkpoint for image-text inputs. NeMo AutoModel provides full-parameter and Low-Rank Adaptation (LoRA) recipes, including tensor-parallel and pipeline-parallel variants.

Set up NeMo AutoModel with the [latest container](https://catalog.ngc.nvidia.com/orgs/nvidia/containers/nemo-automodel) or follow the [installation instructions](/get-started/installation).

## Fine-Tune gemma-4-31B-it

From the repository root, run the 8-GPU recipe:

```bash
uv run automodel examples/vlm_finetune/gemma4/gemma4_31b.yaml --nproc-per-node 8
```

## Choose a Workflow

| Goal                                           | Start Here                                                                                                                                                                                                                                                                         |
| ---------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Fine-tune on MedPix-VQA                        | Use [gemma4\_31b.yaml](https://github.com/NVIDIA-NeMo/Automodel/blob/main/examples/vlm_finetune/gemma4/gemma4_31b.yaml).                                                                                                                                                           |
| Fine-tune with LoRA                            | Use [gemma4\_31b\_peft.yaml](https://github.com/NVIDIA-NeMo/Automodel/blob/main/examples/vlm_finetune/gemma4/gemma4_31b_peft.yaml).                                                                                                                                                |
| Fine-tune with tensor parallelism              | Use [gemma4\_31b\_tp4.yaml](https://github.com/NVIDIA-NeMo/Automodel/blob/main/examples/vlm_finetune/gemma4/gemma4_31b_tp4.yaml).                                                                                                                                                  |
| Fine-tune with tensor and pipeline parallelism | Use [gemma4\_31b\_tp4\_pp2.yaml](https://github.com/NVIDIA-NeMo/Automodel/blob/main/examples/vlm_finetune/gemma4/gemma4_31b_tp4_pp2.yaml) or the [multi-node PP4 recipe](https://github.com/NVIDIA-NeMo/Automodel/blob/main/examples/vlm_finetune/gemma4/gemma4_31b_tp4_pp4.yaml). |

## Model Reference

### Model Architecture

| Property                  | Value                                                                   |
| ------------------------- | ----------------------------------------------------------------------- |
| Task                      | Image-text-to-text                                                      |
| Hugging Face Architecture | `Gemma4ForConditionalGeneration`                                        |
| Checkpoint                | [`google/gemma-4-31B-it`](https://huggingface.co/google/gemma-4-31B-it) |

## Related Resources

* [Gemma 4 Fine-Tuning Guide](/recipes-e2e-examples/gemma-4)