This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
import matplotlib.pyplot as plt | |
group_size = 2048 | |
shift_amount = -group_size // 2 | |
boundary = 1024 # The boundary where the rolling operation causes a transition | |
# Select a head from the last four heads (head number 7 in this case) | |
selected_head = 7 | |
# initialize a 2D tensor with random values |