Downloading a Mistral Model

Mistral AI provides the Model files in a licensed bucket. To download them, you need your Mistral license file: .mistrallicense. The script downloads the main weights, the draft weights that are used for speculative decoding, and the tokenizers.

  • Install rclone on the host. For more information, see https://rclone.org/install/.
  • Make sure that the host has enough free disk space for the Model. For example, the mistral-medium-3-5-0 Model requires approximately 125 GB.
  • Make sure that the host can reach Amazon S3 over HTTPS. The Mistral bucket is hosted there.
  1. Store the license key in an environment variable and pass its name with --license-key-env.
    Do not pass the key on the command line.
    export MISTRAL_LICENSE_KEY="$(cat /path/to/.mistrallicense)"
    
  2. Optional: List the Model directories that your license can access.
    python3 import_to_airgap.py --list-bucket-weights --license-key-env MISTRAL_LICENSE_KEY

    The command lists the directories in the weights directory of the bucket. If the main weights directory of your Model is not listed, your license does not include the Model.

  3. Find the values for your Model in the following table. The repository ID is the name of the main weights directory.
    Table 1. Mistral Model values
    Registry model name Repository ID Draft weights directory
    mistral/medium-3.5 mistral-medium-3-5-0 weights/mistral-medium-3-5-0-eagle-260421
    mistral/small-4 mistral-small-2603 weights/mistral-small-2603-eagle-2603
    mistral/ministral-3-3b-instruct ministral-3b-instruct-2512 weights/mistral-draft-0.6b-2504
    mistral/ministral-3-3b-reasoning ministral-3b-reasoning-2512 weights/mistral-draft-0.6b-2504
    mistral/ministral-3-8b-instruct ministral-8b-instruct-2512 weights/mistral-draft-0.6b-2504
    mistral/ministral-3-8b-reasoning ministral-8b-reasoning-2512 weights/mistral-draft-0.6b-2504
  4. Download the Model.

    The following example downloads the mistral-medium-3-5-0 model. To enable detailed logging, add the -v parameter.

    python3 import_to_airgap.py --download --repo-type mistral \
      --repo-id mistral-medium-3-5-0 \
      --draft-weights-path weights/mistral-medium-3-5-0-eagle-260421 \
      --license-key-env MISTRAL_LICENSE_KEY \
      --path ./models

The script saves the files in the ./models/mistral/mistral-medium-3-5-0/artifacts directory:

  • weights/mistral-medium-3-5-0: main weights

  • weights/mistral-medium-3-5-0-eagle-260421: draft weights

  • tokenizers: tokenizers

  • mistral-staging.json: the weights directories that Cloudera AI Registry verifies during the import

If the script reports that no main weights were found, your license does not include the Model. List the Model directories that your license can access.