Closed CorentinvdBdO closed 11 months ago
This works in the new release:
lm = models.Transformers('microsoft/phi-1_5', trust_remote_code=True)
lm + 'Hello ' + gen(max_tokens=10)
Hello fellow Redditors! Today, I want to talk,
Sorry it took us so long to get to it!
There's a simple hack to run phi-1_5:
in guidance/llms/transformers._py line 344:
Replace:
self._prefix_cache = streamer.generated_sequence[0][:self._past_key_values[0][0].shape[-2]]
byself._prefix_cache = streamer.generated_sequence[0][:self._past_key_values.key_value_memory_dict[0][0].shape[-2]]
I don't trust myself to make a proper change that'd not destroy everything so I leave this here for anyone interested.