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 a QuestionAnswering bert model for testing #19

Merged
merged 7 commits into from
Jul 2, 2024

Conversation

kevinwuTT
Copy link
Contributor

Ticket

#10

Problem description

We want a separate unit test for bert. The run_transformers.py script has the initial implementation, and this PR separates that into a unit test.

What's changed

  • Add a separate test_bert.py that runs the reference and compiled model using ttnn backend and compare the inference results.
  • Remove unneeded workarounds involving type conversion. We can directly make the model use bfloat16 when setting up the model.
  • Remove workaround that generated aten.full when scalars are passed to certain ops. Use ttnn.full instead
  • Convert aten._to_copy to ttnn.as_tensor

kwargs=new_kwargs,
new_kwargs = {
"fill_value": args[1],
"device": DummyDevice(),
Copy link
Member

Choose a reason for hiding this comment

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

Why do we need this?

Comment on lines +353 to +359
memory_config = g.call_function(
ttnn.MemoryConfig,
(
DummyTtlTensorTensorMemoryLayoutInterleaved(),
DummyTtlTensorBufferTypeDram(),
),
)
Copy link
Member

Choose a reason for hiding this comment

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

Can you help to understand whats going on here?

@kevinwuTT kevinwuTT added this pull request to the merge queue Jul 1, 2024
@kevinwuTT kevinwuTT removed this pull request from the merge queue due to a manual request Jul 1, 2024
@kevinwuTT kevinwuTT added this pull request to the merge queue Jul 1, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to no response for status checks Jul 2, 2024
@kevinwuTT kevinwuTT added this pull request to the merge queue Jul 2, 2024
Merged via the queue into tenstorrent:main with commit 4da248b Jul 2, 2024
1 check passed
@kevinwuTT kevinwuTT deleted the kevinwuTT/bert_model branch July 2, 2024 00:34
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