Unverified Commit 7036d6fc authored by Yueyang Pan's avatar Yueyang Pan Committed by GitHub
Browse files

[Bug]: Add missing clamp to llavavid (#3787)

parent 6ce9dbe8
......@@ -110,6 +110,9 @@ class LlavaVidForCausalLM(nn.Module):
if forward_batch.forward_mode.is_extend():
bs = forward_batch.batch_size
# Clamp input ids. See llava.py for more details
input_ids = input_ids.clamp_(min=0, max=self.config.vocab_size - 1)
# Embed text inputs
input_embeds = self.language_model.model.embed_tokens(input_ids)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment