You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As far as I understand it, this is currently not the case.
Having Jsonformer derive from PreTrainedModel would enable immediate use with e.g. pipeline and other ecosystem building blocks that require a PreTrainedModel.
It might even be possible to automatically derive directly from the (more specialized) base class loaded using from_pretrained (and automatically loading the tokenizer from the same path except specified otherwise). That way, almost no functions would need to be changed. Other ideas:
implement forward manually. This is probably tedious
automatically load all functions from the other model and set them, e.g. along the lines of
As far as I understand it, this is currently not the case.
Having
Jsonformer
derive fromPreTrainedModel
would enable immediate use with e.g.pipeline
and other ecosystem building blocks that require aPreTrainedModel
.It might even be possible to automatically derive directly from the (more specialized) base class loaded using
from_pretrained
(and automatically loading the tokenizer from the same path except specified otherwise). That way, almost no functions would need to be changed. Other ideas:Edit: Thinking about it some more (and understanding the
PreTrainedModel
interface better), it's probably not that easy.The text was updated successfully, but these errors were encountered: