Step 1 : Use Hugging Face Access Token

  1. Go to Hugging Face Tokens Page.
  2. Create a new token (choose read access).
  3. Copy the token.

Now run in PowerShell:

git clone <https://huggingface.co/google/gemma-3-270m>

When prompted for username and password:

NOTE : Make sure you have authorized access to use this model in hugging face , hence you will get the below restricted message.

image.png

Once authorized you will have the proper access to the model and it works well as shown below.

image.png

1.png

2.png

This creates a folder:

gemma-3-270m/

Step 2 : Simple Python Script to Run Base Model

Save this file as test_gemma_base.py inside your project folder: