kyegomez / zeta

Build high-performance AI models with modular building blocks

Home Page:https://zeta.apac.ai

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[BUG] [DOCS] [IMPORT] XPOS

evelynmitchell opened this issue · comments

Running the xpos first example from the docs has an import erro:

ModuleNotFoundError                       Traceback (most recent call last)
[<ipython-input-14-f2a7ff6796e7>](https://localhost:8080/#) in <cell line: 2>()
      1 import torch
----> 2 from xpos import XPOS
      3 
      4 # Create an instance of the XPOS module
      5 xpos = XPOS(head_dim=256)

ModuleNotFoundError: No module named 'xpos'

I checked the init in nn.embeddings, but it looks ok. Doing the full path in the example, resolves the issue:

import torch
from zeta.nn.embeddings.xpos_relative_position import XPOS

# Create an instance of the XPOS module
xpos = XPOS(head_dim=256)

# Generate a random input tensor
x = torch.randn(1, 10, 256)

# Apply the XPOS module to the input tensor
output = xpos(x)

Upvote & Fund

  • We're using Polar.sh so you can upvote and help fund this issue.
  • We receive the funding once the issue is completed & confirmed by you.
  • Thank you in advance for helping prioritize & fund our backlog.
Fund with Polar

It also appears that this import works:

from zeta import XPOS

So, the docs for zeta/nn/biases/xpos/ need to be fixed.