Closed ZhaoxuanWu closed 1 year ago
It looks like transformers
relies of forward pass signature inspection to determine whether it's okay to use inputs_embeds
. Since TensorParallelPreTrainedModel
's forward's signature is (self, *args, **kwargs)
, it becomes a false negative. I'll try and think of a workaround.
has_inputs_embeds_forwarding = "inputs_embeds" in set(
inspect.signature(self.prepare_inputs_for_generation).parameters.keys()
)
Working on it in #113
It works like a charm. Many thanks!
Hi! A very easy-to-use library.
When I call
model.generate(inputs_embeds=...)
withinputs_embeds
instead ofinput_ids
, it does not seem to have been implemented.Can we have this feature? Thank you!