Views
No views yet
PreTrainedModel from the Hugging Face Transformers library. It's designed as a learning example and template for building custom models.nn.Linear(1, 1)) for demonstration purposes{"text": "Hello World"} regardless of input1from transformers import AutoModel, AutoConfig
2
3# Load the model
4model = AutoModel.from_pretrained("vinothkannans/hello-world")
5config = AutoConfig.from_pretrained("vinothkannans/hello-world")
6
7# Use the model
8output = model.forward()
9print(output) # {'text': 'Hello World'}1import torch
2from transformers import AutoModel
3
4model = AutoModel.from_pretrained("vinothkannans/hello-world")
5model.eval()
6
7with torch.no_grad():
8 output = model.forward()
9 print(output) # {'text': 'Hello World'}1@misc{hello-world-model,
2 author = {Vinoth Kannan},
3 title = {Hello World AI Model},
4 year = {2025},
5 publisher = {Hugging Face},
6 howpublished = {\url{https://huggingface.co/vinothkannans/hello-world}}
7}