tenstorrent / tt-metal

:metal: TT-NN operator library, and TT-Metalium low level kernel programming model.
https://docs.tenstorrent.com/ttnn/latest/index.html
Apache License 2.0
484 stars 79 forks source link

Porting Swin model to n300 #13333

Open saichandax opened 1 month ago

saichandax commented 1 month ago

Executive summary (as of Nov 5):

ToDo:

Sudharsan-V commented 1 month ago

The porting of swin model to n300 is in progress. The pcc of the swing model sub-modules are

Corresponding draft PR #13475

Sudharsan-V commented 1 month ago
Sudharsan-V commented 1 month ago

@mbahnasTT , The pipeline for the Swin for Image classification is enabled. The PCC of all sub-modules is >0.98, but the PCC of the entire model has dropped to ~0.91. Although this PCC value is slightly lower, the model's accuracy on the ImageNet dataset is as follows(for 40 samples):

Accuracy between TTNN model and ImageNet labels: 0.825 Accuracy between PyTorch model and ImageNet labels: 0.85 Accuracy between TTNN and PyTorch model: 0.90

Given these results, Can we go ahead with this model? Corresponding draft PR https://github.com/tenstorrent/tt-metal/pull/13475

mbahnasTT commented 1 month ago

@Sudharsan-V OK, please go ahead. Please keep record of current status and open a P2 issue. Please run the ImageNet on a larger set (500-1K images), you can look at ViT or RN50 script.

Sudharsan-V commented 1 month ago

@Sudharsan-V OK, please go ahead. Please keep record of current status and open a P2 issue. Please run the ImageNet on a larger set (500-1K images), you can look at ViT or RN50 script.

Sure, will run and update the results here

Sudharsan-V commented 1 month ago

@mbahnasTT , The demo is triggered for swin pipeline similar to ViT model for ImageNet-1k validation Dataset and the results are as follows(1000 images).

Accuracy between TTNN model and ImageNet labels: 0.775 Accuracy between PyTorch model and ImageNet labels: 0.787 Accuracy between TTNN and PyTorch model: 0.89