Text Generation
Transformers
Safetensors
gpt2
philosophy
conversational
monk
wisdom
text-generation-inference
Instructions to use utpalendu/monk-gpt with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use utpalendu/monk-gpt with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="utpalendu/monk-gpt") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("utpalendu/monk-gpt") model = AutoModelForCausalLM.from_pretrained("utpalendu/monk-gpt") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use utpalendu/monk-gpt with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "utpalendu/monk-gpt" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "utpalendu/monk-gpt", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/utpalendu/monk-gpt
- SGLang
How to use utpalendu/monk-gpt with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "utpalendu/monk-gpt" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "utpalendu/monk-gpt", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "utpalendu/monk-gpt" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "utpalendu/monk-gpt", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use utpalendu/monk-gpt with Docker Model Runner:
docker model run hf.co/utpalendu/monk-gpt
Monk GPT - Philosophical Wisdom Assistant
Model Description
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.
- Developed by: Utpalendu Barman
- Model type: Causal Language Model (GPT-2)
- Language: English
- Base model: GPT-2
- License: MIT
Intended Uses
Direct Use:
This model is designed for philosophical Q&A and reflective conversation. It can be used for:
- Personal reflection and journaling
- Educational purposes
- Conversational AI applications
- Meditation and mindfulness tools
Out-of-Scope Use:
The model is not intended for:
- Medical, legal, or professional advice
- Factual information retrieval
- Harmful or manipulative content
Bias, Risks, and Limitations
- The model reflects the biases present in its training data and base GPT-2 model
- Responses are philosophical and reflective, not factual
- May generate unpredictable or inappropriate content
- Should be used with human oversight
How to Get Started
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?"))
- Downloads last month
- 35