Cache directory and device map for model used for perplexity evaluation

Using the evaluate model based on the example here,

results = perplexity.compute(data=input_texts, model_id='gpt2')

Is there a way to input the path to the local directory in which the model is stored instead of model_id?

For example, something like

results = perplexity.compute(data=["Please answer the question with True or False."], cache_dir="/path/to/flan-t5-xxl",device_map="balanced_low_0")