Skip to content
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

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

meenakshiramanathan1
Copy link
Contributor

@meenakshiramanathan1 meenakshiramanathan1 commented Feb 26, 2025

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

Copy link

TestsPassedSkippedFailed ❌️
TT-Forge-FE Tests1 ran0 passed0 skipped1 failed
TestResult
TT-Forge-FE Tests
pytest
test_deepseek_vl_cache.forge.test.models.pytorch.multimodal.deepseek_vl.test_deepseek_vl_cache❌ failure

3 similar comments
Copy link

TestsPassedSkippedFailed ❌️
TT-Forge-FE Tests1 ran0 passed0 skipped1 failed
TestResult
TT-Forge-FE Tests
pytest
test_deepseek_vl_cache.forge.test.models.pytorch.multimodal.deepseek_vl.test_deepseek_vl_cache❌ failure

Copy link

TestsPassedSkippedFailed ❌️
TT-Forge-FE Tests1 ran0 passed0 skipped1 failed
TestResult
TT-Forge-FE Tests
pytest
test_deepseek_vl_cache.forge.test.models.pytorch.multimodal.deepseek_vl.test_deepseek_vl_cache❌ failure

Copy link

TestsPassedSkippedFailed ❌️
TT-Forge-FE Tests1 ran0 passed0 skipped1 failed
TestResult
TT-Forge-FE Tests
pytest
test_deepseek_vl_cache.forge.test.models.pytorch.multimodal.deepseek_vl.test_deepseek_vl_cache❌ failure

@meenakshiramanathan1 meenakshiramanathan1 force-pushed the mramanathan/deepseek_kv_cache branch from ec38d96 to ada5510 Compare February 26, 2025 14:37
Copy link

TestsPassed ✅Skipped ⚠️Failed
TT-Forge-FE Tests616 ran484 passed132 skipped0 failed
TestResult
No test annotations available

1 similar comment
Copy link

TestsPassed ✅Skipped ⚠️Failed
TT-Forge-FE Tests616 ran484 passed132 skipped0 failed
TestResult
No test annotations available

Copy link

TestsPassed ✅Skipped ⚠️Failed
TT-Forge-FE Tests675 ran538 passed137 skipped0 failed
TestResult
No test annotations available

1 similar comment
Copy link

TestsPassed ✅Skipped ⚠️Failed
TT-Forge-FE Tests675 ran538 passed137 skipped0 failed
TestResult
No test annotations available

vl_gpt: MultiModalityCausalLM = AutoModelForCausalLM.from_pretrained(model_path, trust_remote_code=True)
vl_gpt = vl_gpt.eval()

class Wrapper(torch.nn.Module):
Copy link
Contributor

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
):

Copy link
Contributor

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}")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove logger statements

Comment on lines +180 to +188
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)
]
)
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants