Files
gpt/models/gpt3_model.py

28 lines
684 B
Python

"""
Gpt3 model implementation
Parameters: {
"n_head": 96,
"n_embd": 12288,
"params": "175B",
"n_layer": 96,
"block_size": 2048,
"moe": false
}
"""
import torch
import torch.nn as nn
from configs.gpt3_config import Gpt3Config
# Standard transformer implementation
class Gpt3Transformer(nn.Module):
def __init__(self, config):
super().__init__()
self.config = config
# Standard architecture
print("Initializing {} model with {} parameters".format(
"Gpt3", config.parameter_count))
def forward(self, x, **kwargs):
# This implementation would handle the standard transformer forward pass
pass