Pinned Loading
-
-
GPT-2 inference implemented in pure ...
GPT-2 inference implemented in pure PyTorch tensors - no torch.nn/modules. Only imports gelu, layer_norm and softmax from torch.nn.functional + model weights & tokenizer from Hugging Face. Run with -> python gpt2_tensor.py --prompt "hello" 1import argparse
2import torch
3from torch.nn.functional import gelu, layer_norm, softmax
4from transformers import GPT2Model, AutoTokenizer
5from typing import TypedDict
Something went wrong, please refresh the page to try again.
If the problem persists, check the GitHub status page or contact support.
If the problem persists, check the GitHub status page or contact support.