Pruna Token

The Pruna token acts as an identifier for pruna users. It is used to track the usage of the pruna package to ensure that the package is used within the limits of the free license.

Upon your first call to the smash function, you’ll receive your Pruna token. Be sure to save it securely, as it cannot be regenerated later.

When you call smash for the first time, you should specify your token as None:

Example

import torchvision
from pruna import smash, SmashConfig

# load any model
model = torchvision.models.vit_b_16(weights="ViT_B_16_Weights.DEFAULT").cuda()
smash_config = SmashConfig() # any SmashConfig, even an empty one, will do

# calling smash without a token will generate a new one
smashed_model = smash(model=model, token=None, smash_config=smash_config)

# ... the token will be printed in the console

# from now on, you can call smash with your token
smashed_model = smash(model=model, token="<your_token>", smash_config=smash_config)

You will then be asked to provide your email address and agree to the terms of use. After that, you will receive your Pruna token. Please note that you will not be able to generate a new token later, so save your token securely! If you lost your token, reach out to us on Discord or via email at [email protected] for further assistance.

Once you start using pruna, you’ll receive regular updates on your usage. The free license allows up to 100 hours per month. If you exceed this limit and wish to extend it, feel free to reach out to us via email at support@pruna.ai or on Discord.