Importing a Model from Hugging Face

  • On the Import models list page, select Import model. If you need help finding the list page, see Listing Custom Models.

    Model definition

    1. (Optional) To save the imported model in a different compartment than the one listed, select another compartment.
    2. (Optional) Enter a name for the imported model. Start the name with a letter or underscore, followed by letters, numbers, hyphens, or underscores. The length can be 1–255 characters. If you don't enter a name, the system generates a name that you can change later.
      The generated name has the format generativeaiimportedmodel<timestamp>. For example: generativeaiimportedmodel20251107214133
    3. (Optional) Enter a description for the model.
    4. (Optional) Enter a version for the model. If you don't enter a version, the system generates a version that you can change later.
      The generated version has the format v<timestamp>. For example: v20251107214133
    5. (Optional) Enter the vendor for the model. If you don't enter a vendor name, this field remains blank and you can update it later.
    6. (Optional) Assign tags to this imported model. See Resource Tags.
    7. Select Next.

    Import configuration

    1. Select Hugging Face model for the location of the model that you want to import.
    2. Enter the Mode ID.

      The model ID is the string that's displayed for each model on the model card. For example, Qwen/Qwen3-4B. For a complete list of models supported by

    3. Select the Model artifact directory.
      If the directory contains the model and its artifacts, the content of the directory is displayed in the directory preview section.
    4. If the content of the directory is correct, select Submit.
    Tip

    After you import the model, perform the following tasks:
    1. Create a hosting dedicated AI cluster.
    2. Create an endpoint.
    3. Use the model in the playground.
  • Use the imported-model create-from-huggingface command and required parameters to import a model:

    oci generative-ai imported-model create-from-huggingface [OPTIONS]

    For a complete list of parameters and values for CLI commands, see the CLI Command Reference.

  • Run the CreateImportedModel operation to import a model.