static async from_pretrained(pretrained_model_name_or_path, {
        progress_callback = null,
        config = null,
        cache_dir = null,
        local_files_only = false,
        revision = 'main',
    } = {}) {
        if (config && !(config instanceof PretrainedConfig)) {
            config = new PretrainedConfig(config);
        }

        const data = config ?? await loadConfig(pretrained_model_name_or_path, {
            progress_callback,
            config,
            cache_dir,
            local_files_only,
            revision,
        })
        return new this(data);
    }
Loads a pre-trained config from the given `pretrained_model_name_or_path`. 

@param {string} pretrained_model_name_or_path The path to the pre-trained config.
@param {PretrainedOptions} options Additional options for loading the config.
@throws {Error} Throws an error if the config.json is not found in the `pretrained_model_name_or_path`.

@returns {Promise<PretrainedConfig>} A new instance of the `PretrainedConfig` class.