A repository for pxia models
This repository is using HuggingFace's PyTorchModelHubMixin classes
pip install pxia
from pxia import GPT2
model = GPT2(block_size= 1024, vocab_size = 50257, n_layer= 11, n_head= 12, n_embed = 768) # or use default parameters
model.push_to_hub("phxia/gpt2")
pretrained_model = GPT2.from_pretrained("phxia/gpt2")
alternatively you can load weights from source gpt2 models from huggingface and convert them to pxia format
model = GPT2.from_origin("openai-community/gpt2")
we also support AutoModel
class in our repository
to load any pxia model either locally or from the hub you can
from pxia import AutoModel
model = AutoModel.from_pretrained("phxia/gpt2")