How to load the ovis2.5 with transformer 5.x

#8
by victor4633 - opened

I tried to load ovis2.5 using transformer 5.x. but it has error saying that the "all_tied_weights_keys" attribute is not found. Then I add the attribute with model.all_tied_weights_keys={} and load the model successfully. BUT the model always gives rubbish responses!!!

The garbage output comes from Transformers v5 never tying lm_head (the custom model doesn't call post_init()) and leaving two non-persistent buffers uninitialized. Fixes are in #9 (and the same for Ovis2.5-9B in its #14); until they're merged you can load the fix with revision="refs/pr/9"

Sign up or log in to comment