Closed jiqing-feng closed 2 weeks ago
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.
Hi @echarlaix . As we discussed before, I have removed _from_transformers
.
Hi @echarlaix . I have fixed all your comments, pls take a review thx!
Tests fixed! @echarlaix
Hi @echarlaix . The
IPEXModel
has 2 loading methods:_from_transformers
accepts a model_path_or_id with an original transformers model and exports this model._from_pretrained
only accepts an exported model; otherwise, it will raise ValueError.I was thinking of falling back the
_from_pretrained
to_from_transformers
if the model has not been exported yet and logging a warning to alert users. WDYT?Besides, check the model type before using
torch.jit.save
insave_pretrained
.