
This CodeLab provides a hands-on, end-to-end walkthrough of using Google’s Gemma 3 (4B instruction-tuned) model with Hugging Face. It focuses on practical experimentation—covering environment setup, model loading on GPU, tokenization, and text generation with different decoding strategies.
The notebook then moves beyond text generation to demonstrate structured outputs and tool (function) calling, showing how Gemma 3 can be integrated with real Python functions such as weather lookup and currency conversion.
Designed for data scientists and ML practitioners, this notebook emphasizes reproducible experiments, sanity checks, and patterns that can be directly extended to real-world LLM applications.
Join Stepwik
Create interactive labs and courses that help developers learn faster — then publish them to your network.
