Downloads · 30 days
0
0% of all-time downloads
tripathysagar/odia-gpt
odia-gpt is a machine learning model from tripathysagar. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for nanoGPT.
This is the model card of a model trained by Karpathy's nanoGPT. The vocabulary size is 20000 and the context window is 1024.<br The model is trined on tripathysagar/odia-news, news paper article extracted from odia d…
Downloads · 30 days
0
0% of all-time downloads
All-time downloads
67
Public
Repo size
2.5 GB
Likes
1
Public
Click a slice to open those files.
.pt404 MB · 100%
From the Hugging Face model README
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.<br> The model is trined on tripathysagar/odia-news, news paper article extracted from odia daily Dharitri.
>>> from huggingface_hub import snapshot_download
>>> snapshot_download(repo_id="tripathysagar/odia-gpt", local_dir='.')
>>> from model import GPT
>>> import os, torch
>>> from tokenizers import Tokenizer
>>> tokenizer = Tokenizer.from_file('tokenizer.json')
>>> nn, _ = GPT.from_file(os.path.join('model.pt'))
>>> nn = nn.to('cuda')
>>> s = 'କ୍ରେଡିଟ କାର୍ଡ ନେବା ସମୟରେ ଏହାର ସର୍ତ୍ତ ଏବଂ ନିୟମଗୁଡ଼ିକୁ ଧ୍ୟାନର ସହିତ ପଢ଼ିବା ଉଚିତ ।'
>>> enc = torch.tensor(tokenizer.encode(s).ids).unsqueeze(0).to('cuda')
>>> op = nn.generate(enc, 50, top_k=50)
>>> print(tokenizer.decode(op[0].to('cpu').tolist()))
[More Information Needed]
[More Information Needed]
[More Information Needed]
[More Information Needed]
[More Information Needed]
[More Information Needed]
[More Information Needed]