Open sadra-barikbin opened 7 months ago
Hi!
Thanks for spotting this. This looks like a legacy code that shouldn't be there anymore.
I think, at least for decoder-only models, we should create a single output
with the last token of input to still be able to get activations when pre_encode_inputs=True
. I guess the easiest fix would be to replace the break
statement by _candidates = [""]
.
I need to properly test this to verify it is actually necessary.
Hi,
I opened this PR which should handle empty candidates.
Hi there! I couldn't understand why a
break
has been used (not acontinue
) during creatingbatch_inputs
andbatch_outputs
in the case there's no candidate for a context: https://github.com/flowersteam/lamorel/blob/b012e2e8f164145af80084955fc79344049bb9e1/lamorel/src/lamorel/server/llms/hf_llm.py#L255-L256This skips the next contexts and they don't come into
batch_inputs
andbatch_outputs
. Is this the desired behavior? If yes, could you please tell why is so? Furthermore, it seems that we would faceKeyError
during creatingbatch_input_representations
, this way. https://github.com/flowersteam/lamorel/blob/b012e2e8f164145af80084955fc79344049bb9e1/lamorel/src/lamorel/server/llms/hf_llm.py#L282-L286as we're iterating over
contexts
including those we skipped earlier but there's no entry for them in_ids_tables
.@ClementRomac