How to directly load `Phi3Model` class?
#29
by
jrc
- opened
In the configuration file, it says I can do the following:
from transformers import Phi3Model, Phi3Config
configuration = Phi3Config.from_pretrained("microsoft/Phi-3-mini-4k-instruct")
model = Phi3Model(configuration)
However, even when I install transformers from source, I get the following error:
Traceback (most recent call last):
File "/home/jrcummings/projects/joe-torchtune/tests/torchtune/models/phi3/compare_hf_phi3_to_tune.py", line 20, in <module>
from transformers import Phi3Model, Phi3Config
ImportError: cannot import name 'Phi3Model' from 'transformers'
Ensure that you are in the bleeding-edge version of transformers
. Phi-3 will only be integrated on the next release.
gugarosa
changed discussion status to
closed