This is the model card of a model trained by Karpathy's
nanoGPT. The vocabulary size is 20_000 and the context window is 1024.
The model is trined on tripathysagar/odia-news, news paper article extracted from odia daily
Dharitri.
1>>> from huggingface_hub import snapshot_download
2>>> snapshot_download(repo_id="tripathysagar/odia-gpt", local_dir='.')
3
4>>> from model import GPT
5>>> import os, torch
6
7>>> from tokenizers import Tokenizer
8>>> tokenizer = Tokenizer.from_file('tokenizer.json')
9>>> nn, _ = GPT.from_file(os.path.join('model.pt'))
10>>> nn = nn.to('cuda')
11
12>>> s = 'କ୍ରେଡିଟ କାର୍ଡ ନେବା ସମୟରେ ଏହାର ସର୍ତ୍ତ ଏବଂ ନିୟମଗୁଡ଼ିକୁ ଧ୍ୟାନର ସହିତ ପଢ଼ିବା ଉଚିତ ।'
13>>> enc = torch.tensor(tokenizer.encode(s).ids).unsqueeze(0).to('cuda')
14
15>>> op = nn.generate(enc, 50, top_k=50)
16
17>>> print(tokenizer.decode(op[0].to('cpu').tolist()))