Delete codaBlock.py
Browse files- codaBlock.py +0 -14
codaBlock.py
DELETED
|
@@ -1,14 +0,0 @@
|
|
| 1 |
-
import torch
|
| 2 |
-
import torch.nn as nn
|
| 3 |
-
import torch.nn.functional as F
|
| 4 |
-
from typing import Optional, Tuple
|
| 5 |
-
|
| 6 |
-
# Final Projection Block
|
| 7 |
-
class CodaBlock(nn.Module):
|
| 8 |
-
def __init__(self, d_model: int, vocab_size: int):
|
| 9 |
-
super().__init__()
|
| 10 |
-
self.norm = nn.LayerNorm(d_model)
|
| 11 |
-
self.output_proj = nn.Linear(d_model, vocab_size)
|
| 12 |
-
|
| 13 |
-
def forward(self, x: torch.Tensor) -> torch.Tensor:
|
| 14 |
-
return self.output_proj(self.norm(x))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|