-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add test for deepseek_vl with cache #1332
base: main
Are you sure you want to change the base?
Conversation
|
3 similar comments
|
|
|
ec38d96
to
ada5510
Compare
|
1 similar comment
|
|
1 similar comment
|
vl_gpt: MultiModalityCausalLM = AutoModelForCausalLM.from_pretrained(model_path, trust_remote_code=True) | ||
vl_gpt = vl_gpt.eval() | ||
|
||
class Wrapper(torch.nn.Module): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pls move this Wrapper class outside the function.
def calculate_attention_mask_and_postion_ids( | ||
padded_past_key_values_seq_length, non_padding_past_key_values_seq_length, input_seq_length | ||
): | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a comment why we are doing this here
model_inputs[1][idx][0][:, :, non_padding_past_key_values_seq_length, :] = model_inputs[1][idx][0][ | ||
:, :, -1, : | ||
] | ||
logger.info(f"shape of key_tensor = {model_inputs[1][idx][0].shape}") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove logger statements
tt_output = [tt_out.to("cpu") for tt_out in tt_output] | ||
|
||
# Validate TT result with Framework | ||
assert all( | ||
[ | ||
compare_with_golden(golden=fw_out, calculated=tt_out) | ||
for fw_out, tt_out in zip(framework_output, tt_output) | ||
] | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's use verify function
Model is failing with runtime error - issue
E RuntimeError: TT_THROW @ /proj_sw/user_dev/mramanathan/bgdlab07_feb26_forge/tt-forge-fe/third_party/tt-mlir/third_party/tt-metal/src/tt-metal/ttnn/cpp/ttnn/operations/eltwise/binary/device/broadcast_height_and_width_multi_core_program_factory.cpp:27: tt::exception E info: E BinaryOpType cannot be mapped to BcastOpMath