Text Generation
Transformers
TensorBoard
Safetensors
English
gpt2
text-generation-inference
conversational
# Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("anktechsol/ankiGPT-small")
model = AutoModelForCausalLM.from_pretrained("anktechsol/ankiGPT-small")
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=40)
print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:]))Quick Links
anktechsol/ankiGPT-small
🧠 What is ankiGPT-small?
A conversational text-generation model fine-tuned from microsoft/DialoGPT-small for Indian scenarios—supporting English and Hinglish. Use it to generate stories, dialogue, quick responses, and creative text.
🚀 Quick Start
from transformers import pipeline
generator = pipeline("text-generation", model="anktechsol/ankiGPT-small")
prompt = "Write a short story about a day in the life of a student in a bustling Indian city."
result = generator(prompt, max_length=300, num_return_sequences=1)
print(result[0]['generated_text'])
Copy-paste this code to see instant results!
✨ Features
- Conversational: Tuned for chat, stories, and messages
- Language: English + Hinglish (Indian conversational flavor)
- Base Model: DialoGPT-small
- Size: 124M parameters (fast and lightweight)
- Dataset: ai4bharat/indic-align (Indian context data)
💡 Example Outputs
Prompt: "Describe the Diwali celebrations in Mumbai."
Output: "The city sparkled with thousands of lights, families prepared delicious sweets, and friends gathered for bursting crackers, laughter echoing through the alleys."
Try your own prompts above!
⚠️ Limitations & Considerations
- Tends to repeat on long text—adjust
max_lengthandno_repeat_ngram_sizeas needed - Biased towards Indian contexts due to training data
- Not for critical or factual information generation
🙌 Contributions & Community
- Suggestions? Open an issue or start a discussion. We welcome community feedback!
- Demo: Want a hands-on demo? Let us know!
🔗 References
- Downloads last month
- 9
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="anktechsol/ankiGPT-small") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)