Instructions to use dbishwarup/TagoreGPT-29M with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use dbishwarup/TagoreGPT-29M with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="dbishwarup/TagoreGPT-29M") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("dbishwarup/TagoreGPT-29M") model = AutoModelForCausalLM.from_pretrained("dbishwarup/TagoreGPT-29M", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use dbishwarup/TagoreGPT-29M with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf dbishwarup/TagoreGPT-29M:F16 # Run inference directly in the terminal: llama cli -hf dbishwarup/TagoreGPT-29M:F16
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf dbishwarup/TagoreGPT-29M:F16 # Run inference directly in the terminal: llama cli -hf dbishwarup/TagoreGPT-29M:F16
Build from source code
git clone https://github.com/ggml-org/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-app # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama serve -hf dbishwarup/TagoreGPT-29M:F16 # Run inference directly in the terminal: ./build/bin/llama cli -hf dbishwarup/TagoreGPT-29M:F16
Use Docker
docker model run hf.co/dbishwarup/TagoreGPT-29M:F16
- Llama new
- LM Studio
- Jan
- vLLM
How to use dbishwarup/TagoreGPT-29M with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "dbishwarup/TagoreGPT-29M" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "dbishwarup/TagoreGPT-29M", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/dbishwarup/TagoreGPT-29M:F16
- SGLang
How to use dbishwarup/TagoreGPT-29M 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 "dbishwarup/TagoreGPT-29M" \ --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": "dbishwarup/TagoreGPT-29M", "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 "dbishwarup/TagoreGPT-29M" \ --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": "dbishwarup/TagoreGPT-29M", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Ollama
How to use dbishwarup/TagoreGPT-29M with Ollama:
ollama run hf.co/dbishwarup/TagoreGPT-29M:F16
- Unsloth Desktop
- Docker Model Runner
How to use dbishwarup/TagoreGPT-29M with Docker Model Runner:
docker model run hf.co/dbishwarup/TagoreGPT-29M:F16
- Lemonade
How to use dbishwarup/TagoreGPT-29M with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull dbishwarup/TagoreGPT-29M:F16
Run and chat with the model
lemonade run user.TagoreGPT-29M-F16
List all available models
lemonade list
- Atomic Chat
TagoreGPT 29M
A small (29 million parameter) model that writes poems, songs, stories, letters, essays and plays in the style of Rabindranath Tagore (1861–1941), in Bengali or English. Trained from scratch on a laptop.
Sir Rabindranath Tagore (Gurudev) was the first non-European to win the Nobel Prize in Literature (1913, for Gitanjali) and wrote the national anthems of India and Bangladesh.
How to ask
Ask in plain words. The app/chat template wraps it as <|request|>…<|response|>:
write a poem about the river in Bengaliwrite a song about the rainএকটা কবিতা লেখো বৃষ্টি নিয়েwrite a letter to a friend in English
Settings that work well: temperature 0.8, top-k 40, repeat penalty 1.15 (last 256 tokens), up to ~400 new tokens. Without a repeat penalty the model can loop (LM Studio: set "Repeat Penalty" to 1.15).
LM Studio / llama.cpp / Ollama
- File:
tagoregpt-29m-f16.gguf(Llama layout, 58 MB). - llama.cpp:
llama-cli -m tagoregpt-29m-f16.gguf -cnv --temp 0.8 --top-k 40 - Ollama:
ollama create tagoregpt -f Modelfilethenollama run tagoregpt "write a poem about the river"
Transformers
from transformers import AutoTokenizer, AutoModelForCausalLM
tok = AutoTokenizer.from_pretrained("PATH_OR_REPO")
model = AutoModelForCausalLM.from_pretrained("PATH_OR_REPO")
ids = tok.apply_chat_template([{"role": "user", "content": "write a poem about the river"}], return_tensors="pt")
out = model.generate(ids, max_new_tokens=300)
print(tok.decode(out[0][ids.shape[1]:], skip_special_tokens=True))
What it cannot do
- It is not a chatbot: it does not answer questions, explain, or translate. It only writes.
- Topics given in English for a Bengali piece are not translated outside the TagoreGPT app.
- It sees about 1,024 word pieces (~3,300 letters) at a time; longer pieces can wander. (The TagoreGPT app also keeps the title and opening paragraph in view; plain llama.cpp / LM Studio do not.)
- It is small: lines can be beautiful or nonsensical. It is a style imitation, never Tagore's real words.
Training
- Llama layout: 8 layers, width 512, 8 heads, SwiGLU 1344, rotary positions, tied embeddings. 8,000 SentencePiece word pieces (Bengali + English).
- Phase 1 (warm-up): simple practice stories (TinyStories, CDLA-Sharing-1.0; Regional-TinyStories Bengali, Apache-2.0), other Bengali writers (Bengali Wikisource) + 19th-century English (Project Gutenberg) + Tagore.
- Phase 2: Tagore only (Bengali scans from the Digital Library of India / Internet Archive, English from Project Gutenberg).
- Every training piece starts with hidden labels (language, type, author); its title and opening paragraph stay in view, which keeps long pieces on their hero and topic.
- Weights in this release: tagore step 4999. Unseen-text loss per word piece: tagore_en: 3.426, tagore_bn: 3.912.
Data and licence
Tagore's works are in the public domain. The Bengali warm-up text comes from Bengali Wikisource (CC BY-SA 4.0), so this model is released under CC BY-SA 4.0. English text from Project Gutenberg (public domain).
- Downloads last month
- -
docker model run hf.co/dbishwarup/TagoreGPT-29M:F16