PyCharm 2024.2 Help

Hugging Face

Hugging Face is a machine learning and data science platform. It provides open-source tools and libraries for training, fine-tuning, and deploying machine learning models. The platform also hosts a repository of pre-trained models and datasets contributed by the community.

Use Hugging Face models

PyCharm allows you to browse and download Hugging Face models right in the IDE:

  1. Right-click in the editor to open the context menu and select Insert HF Model.

    Explore Models from Hugging Face dialog opens.

    Explore Hugging Face models
  2. Find a model that meets your criteria:

    • Use the search field to find the model by name

    • Select the task you need the model to perform in the left pane of the dialog

    • Sort the models by likes, downloads, creation date, or latest modification date

    • Filter the models by license or tags

  3. Select the model and click Use Model to insert a code snippet into the editor.

    Use Hugging Face model

If the Hugging Face platform currently does not provide a code snippet for the selected model, the Use Model button will become inactive, and you will see the following message when you hover over the button:

Model usage template is currently not available. To explore other integration options, please visit the model's page on the Hugging Face website.

View model and dataset cards

You can view detailed information about the models and datasets without leaving PyCharm:

  • To view the model or dataset card in a popup, hover over the model or dataset name.

    View model or dataset cards in a popup
  • To open the card in the Documentation tool window, click in the popup and choose Open in Documentation Tool Window or press Ctrl+Q twice.

    The Documentation tool window will open on the right side of the IDE.

    View model or dataset cards in tool window
Last modified: 08 August 2024