Downloads · 30 days
23
29% of all-time downloads
utpalendu/monk-gpt
monk-gpt is a text generation model from utpalendu. Use it when you need the model to write or continue text. It is set up for transformers.
Monk GPT is a fine-tuned GPT-2 model trained on philosophical conversations about life, death, relationships, career, education, and personal growth. The model responds as a wise monk, offering thoughtful, compassiona…
Downloads · 30 days
23
29% of all-time downloads
All-time downloads
79
Public
Parameters
124M
498 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors498 MB · 99%
From the Hugging Face model README
Monk GPT is a fine-tuned GPT-2 model trained on philosophical conversations about life, death, relationships, career, education, and personal growth. The model responds as a wise monk, offering thoughtful, compassionate, and reflective answers to user questions.
Direct Use:
This model is designed for philosophical Q&A and reflective conversation. It can be used for:
Out-of-Scope Use:
The model is not intended for:
from transformers import GPT2Tokenizer, GPT2LMHeadModel
model_name = "utpalendu/monk-gpt"
tokenizer = GPT2Tokenizer.from_pretrained(model_name)
model = GPT2LMHeadModel.from_pretrained(model_name)
def ask_monk(question):
prompt = f"Q: {question} A:"
inputs = tokenizer.encode(prompt, return_tensors="pt")
outputs = model.generate(
inputs,
max_length=200,
temperature=0.8,
do_sample=True,
pad_token_id=tokenizer.eos_token_id
)
response = tokenizer.decode(outputs[0], skip_special_tokens=True)
return response.split("A:")[-1].strip()
print(ask_monk("What is the meaning of life?"))