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 Phi-3 #116

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from
Draft

Add Phi-3 #116

wants to merge 4 commits into from

Conversation

mvkvc
Copy link

@mvkvc mvkvc commented Jul 21, 2024

Work-in-progress PR to add the Phi-3 model as discussed in #21.

I am running a Grayskull e75 on Ubuntu 20.04 and the output of tt-smi -s can be found here.

Currently the pipeline runs but the output is not correct in part due to missing sin, cos, and abs operations ex. 2024-07-21 17:48:48.253 | WARNING | Model - OpType 'abs' not found in params. Defaulting to nop params.. There was also an issue where TVM could not compile torch.bool for which I implemented a workaround.

The sin and cos operations are called in the rotary embedding implementations. I tested running without these calls to torch.Tensor.sin and torch.Tensor.cos in the Phi-3 model file and the warnings were not emitted. Here are the calls that trigger these missing operations:

The abs operation was not as easy to isolate but I suspect it is lower down the stack calling torch.Tensor.abs in a similar way.

Here is the terminal output for each of my different runs:

At this point I will raise an issue in the tt-buda repository to try and resolve the missing operations before continuing.

@mvkvc
Copy link
Author

mvkvc commented Jul 22, 2024

For additional context I am running Python 3.8.10 with pybuda and other dependencies downloaded from https://github.com/tenstorrent/tt-buda/releases/download/v0.18.2/pybuda-gs-v0.18.2-ubuntu-20-04-amd64-python3.8.zip.

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.

1 participant