Slackbot
05/25/2023, 7:44 AMAaron Pham
05/25/2023, 8:00 AMAaron Pham
05/25/2023, 8:01 AMbentoml.transformers.save_model("model", model, custom_objects={"tokenizer": tokenizer})
And you can access this tokenizer like so
bentomodel = bentoml.models.get("model")
tokenizer = bentomodel.custom_objects['tokenizer']
Nuwan
05/25/2023, 8:02 AMAaron Pham
05/25/2023, 8:07 AMservice.py
will be forked to child process when running bentoml serve
, and you probably don’t want to save the model everytime you serve the service.Aaron Pham
05/25/2023, 8:07 AMNuwan
05/25/2023, 8:08 AM