Skip to content

Commit bb785de

Browse files
committed
[README]
1 parent e0d1bbe commit bb785de

File tree

4 files changed

+57
-21
lines changed

4 files changed

+57
-21
lines changed

README.md

Lines changed: 45 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -106,17 +106,53 @@ pip install omegavit
106106
## Quick Start
107107

108108
```python
109+
import sys
110+
from omegavit.main import create_advanced_vit, train_step
109111
import torch
110-
from omegavit import create_advanced_vit
112+
from loguru import logger
113+
114+
def main():
115+
"""Main training function."""
116+
logger.info("Starting training setup")
117+
118+
# Setup
119+
device = torch.device(
120+
"cuda" if torch.cuda.is_available() else "cpu"
121+
)
122+
model = create_advanced_vit().to(device)
123+
optimizer = torch.optim.AdamW(
124+
model.parameters(), lr=1e-4, weight_decay=0.05
125+
)
126+
127+
# Example input for testing
128+
batch_size = 8
129+
example_input = torch.randn(batch_size, 3, 224, 224).to(device)
130+
example_labels = torch.randint(0, 1000, (batch_size,)).to(device)
131+
132+
logger.info("Running forward pass with example input")
133+
output = model(example_input)
134+
logger.info(f"Output shape: {output.shape}")
135+
136+
# Example training step
137+
loss = train_step(
138+
model, optimizer, (example_input, example_labels), device
139+
)
140+
logger.info(f"Example training step loss: {loss:.4f}")
141+
142+
143+
if __name__ == "__main__":
144+
# Configure logger
145+
logger.remove()
146+
logger.add(
147+
"advanced_vit.log",
148+
rotation="500 MB",
149+
level="DEBUG",
150+
format="{time:YYYY-MM-DD HH:mm:ss} | {level} | {message}",
151+
)
152+
logger.add(sys.stdout, level="INFO")
153+
154+
main()
111155

112-
# Create model
113-
model = create_advanced_vit(num_classes=1000)
114-
115-
# Example forward pass
116-
batch_size = 8
117-
x = torch.randn(batch_size, 3, 224, 224)
118-
output = model(x)
119-
print(f"Output shape: {output.shape}") # [8, 1000]
120156
```
121157

122158
## Model Configurations

example.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
1+
import sys
2+
from omegavit.main import create_advanced_vit, train_step
3+
import torch
4+
from loguru import logger
15

2-
# Example training loop
36
def main():
47
"""Main training function."""
58
logger.info("Starting training setup")

omegavit/main.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import math
2-
import sys
32
from typing import Tuple, List
43
from dataclasses import dataclass
54
import torch

pyproject.toml

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@ requires = ["poetry-core>=1.0.0"]
33
build-backend = "poetry.core.masonry.api"
44

55
[tool.poetry]
6-
name = "paper"
6+
name = "omegavit"
77
version = "0.0.1"
8-
description = "Paper - Pytorch"
8+
description = "OmegaViT: A State-of-the-Art Vision Transformer with Multi-Query Attention, State Space Modeling, and Mixture of Experts"
99
license = "MIT"
1010
authors = ["Kye Gomez <kye@apac.ai>"]
11-
homepage = "https://github.com/kyegomez/paper"
12-
documentation = "https://github.com/kyegomez/paper" # Add this if you have documentation.
11+
homepage = "https://github.com/Agora-Lab-AI/OmegaViT"
12+
documentation = "https://github.com/Agora-Lab-AI/OmegaViT" # Add this if you have documentation.
1313
readme = "README.md" # Assuming you have a README.md
14-
repository = "https://github.com/kyegomez/paper"
14+
repository = "https://github.com/Agora-Lab-AI/OmegaViT"
1515
keywords = ["artificial intelligence", "deep learning", "optimizers", "Prompt Engineering"]
1616
classifiers = [
1717
"Development Status :: 4 - Beta",
@@ -23,11 +23,9 @@ classifiers = [
2323

2424
[tool.poetry.dependencies]
2525
python = "^3.10"
26-
swarms = "*"
27-
zetascale = "*"
28-
29-
[tool.poetry.dev-dependencies]
30-
# Add development dependencies here
26+
torch = "*"
27+
loguru = "*"
28+
einops = "*"
3129

3230

3331
[tool.poetry.group.lint.dependencies]

0 commit comments

Comments
 (0)