i am trying to double context length by upscaling my postional embeddings (in a test…
- User
i am trying to double context length by upscaling my postional embeddings (in a test case) but upsampling seems to be working really dumb? Look at the output: tensor([[[[0.1260, 0.6591], [0.4676, 0.8782], [0.3722, 0.7756], [0.6968, 0.2392], [0.4962, 0.1133]]]]) tensor([[0.1260, 0.3037], [0.4814, 0.6591], [0.4676, 0.6045], [0.7413, 0.8782], [0.3722, 0.5067], [0.6411, 0.7756], [0.6968, 0.5442], [0.3917, 0.2392], [0.4962, 0.3686], [0.2409, 0.1133]])
- Assistant
- User
what is the bilienar mode
- Assistant
- User
this is not working, for positonal embeddings i essneitally want to insert linear interprentations inbetween the original embeddings, This seems to be doing something terrible and changing the emddings alltogether
- Assistant
I understand your intention now — you want to perform linear interpolation directly between your original positional embeddings on a 1D level, rather than using a 2D spatial interpolation method which can distort the embeddings. This is often used in signal processing to upsample a 1D signal.
- User
is there any way to ensure it interpolates the hidden_state values but maintains their order? , align_corners=True
- Assistant
- User
- Assistant
- User
so theres no other function to achieve this? really?
- Assistant
- User
im not sure howt oset this up, essentially i want to create a new position embedding tensor populated with both the original PE and new linear interpolated ones inbetween, how? def create_positional_embd_interpolation(old_weights: torch.Tensor, new_block_size: int): org_cl, n_embd = old_weights.shape
ratio = new_block_size // org_cl for i in range(new_block_size): print(help()) return old_weights - Assistant