Using Hugging Face pre-trained models

Using Hugging Face pre-trained models#

This section shows you how to run pre-trained Hugging Face models. Hugging Face is large repository of pre-trained models, it is also a hub where the AI community collaborates.

Hugging Face models will be stored in:

$USER/.cache/huggingface
%USERPROFILE%\.cache\huggingface\hub

Note

In Docker, the models will be stored in /ROCM_APP/models/hf, this ensures that the model will be only downloaded once, even after stopping the Docker container.

See Hugging Face Environment Variables for more information.

Examples#

Make sure the environment is setup.

This guide provides a number of examples you can run out of the box. Navigate to get-started/hf/ and lunch jupyter lab. Some of of these notebooks can only run if you have an AMD GPU in your system.

More Pre-trained Models#

If you would like to run a different model, Hugging Face hosts hundred of thousands of models. Explore what Hugging Face has to offer https://huggingface.co/models.

Learn how to download Hugging Face models.


Copyright (C) 2025 Advanced Micro Devices, Inc. All rights reserved.

SPDX-License-Identifier: MIT