Text Generation
Transformers
TensorBoard
Safetensors
English
gpt2
text-generation-inference
conversational
Instructions to use anktechsol/ankiGPT-small with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use anktechsol/ankiGPT-small with Transformers:
# 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)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("anktechsol/ankiGPT-small") model = AutoModelForCausalLM.from_pretrained("anktechsol/ankiGPT-small", 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=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use anktechsol/ankiGPT-small with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "anktechsol/ankiGPT-small" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "anktechsol/ankiGPT-small", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/anktechsol/ankiGPT-small
- SGLang
How to use anktechsol/ankiGPT-small 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 "anktechsol/ankiGPT-small" \ --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": "anktechsol/ankiGPT-small", "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 "anktechsol/ankiGPT-small" \ --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": "anktechsol/ankiGPT-small", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use anktechsol/ankiGPT-small with Docker Model Runner:
docker model run hf.co/anktechsol/ankiGPT-small
Update README.md
Browse files
README.md
CHANGED
|
@@ -13,53 +13,65 @@ library_name: transformers
|
|
| 13 |
tags:
|
| 14 |
- text-generation-inference
|
| 15 |
---
|
| 16 |
-
# Model Card for AnkiGPT-small
|
| 17 |
|
| 18 |
-
#
|
| 19 |
|
| 20 |
-
##
|
|
|
|
| 21 |
|
| 22 |
-
-
|
| 23 |
-
- **Shared by:** [anktechsol]
|
| 24 |
-
- **Model type:** Causal Language Model
|
| 25 |
-
- **Language(s) (NLP):** English, potentially aspects of Indian languages/Hinglish due to fine-tuning data.
|
| 26 |
-
**Finetuned from model:** `microsoft/DialoGPT-small`
|
| 27 |
|
| 28 |
-
##
|
| 29 |
|
| 30 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 31 |
|
| 32 |
-
##
|
| 33 |
|
| 34 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 35 |
|
| 36 |
-
|
| 37 |
|
| 38 |
-
##
|
| 39 |
|
| 40 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 41 |
|
| 42 |
-
|
| 43 |
|
| 44 |
-
|
| 45 |
|
| 46 |
-
|
|
|
|
|
|
|
| 47 |
|
| 48 |
-
|
| 49 |
|
| 50 |
-
##
|
| 51 |
|
| 52 |
-
|
|
|
|
| 53 |
|
| 54 |
-
|
| 55 |
|
| 56 |
-
|
| 57 |
-
```python
|
| 58 |
-
from transformers import pipeline
|
| 59 |
-
generator = pipeline("text-generation", model="anktechsol/ankiGPT-small")
|
| 60 |
|
| 61 |
-
|
| 62 |
-
generated_text = generator(prompt, max_length=300, num_return_sequences=1)
|
| 63 |
|
| 64 |
-
|
| 65 |
-
```
|
|
|
|
| 13 |
tags:
|
| 14 |
- text-generation-inference
|
| 15 |
---
|
|
|
|
| 16 |
|
| 17 |
+
# anktechsol/ankiGPT-small
|
| 18 |
|
| 19 |
+
## 🧠 What is ankiGPT-small?
|
| 20 |
+
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.
|
| 21 |
|
| 22 |
+
---
|
|
|
|
|
|
|
|
|
|
|
|
|
| 23 |
|
| 24 |
+
## 🚀 Quick Start
|
| 25 |
|
| 26 |
+
```python
|
| 27 |
+
from transformers import pipeline
|
| 28 |
+
generator = pipeline("text-generation", model="anktechsol/ankiGPT-small")
|
| 29 |
+
prompt = "Write a short story about a day in the life of a student in a bustling Indian city."
|
| 30 |
+
result = generator(prompt, max_length=300, num_return_sequences=1)
|
| 31 |
+
print(result[0]['generated_text'])
|
| 32 |
+
```
|
| 33 |
+
|
| 34 |
+
*Copy-paste this code to see instant results!*
|
| 35 |
+
|
| 36 |
+
---
|
| 37 |
|
| 38 |
+
## ✨ Features
|
| 39 |
|
| 40 |
+
- **Conversational:** Tuned for chat, stories, and messages
|
| 41 |
+
- **Language:** English + Hinglish (Indian conversational flavor)
|
| 42 |
+
- **Base Model:** DialoGPT-small
|
| 43 |
+
- **Size:** 124M parameters (fast and lightweight)
|
| 44 |
+
- **Dataset:** ai4bharat/indic-align (Indian context data)
|
| 45 |
|
| 46 |
+
---
|
| 47 |
|
| 48 |
+
## 💡 Example Outputs
|
| 49 |
|
| 50 |
+
> **Prompt:** "Describe the Diwali celebrations in Mumbai."
|
| 51 |
+
>
|
| 52 |
+
> **Output:** "The city sparkled with thousands of lights, families prepared delicious sweets, and friends gathered for bursting crackers, laughter echoing through the alleys."
|
| 53 |
+
>
|
| 54 |
+
> *Try your own prompts above!*
|
| 55 |
|
| 56 |
+
---
|
| 57 |
|
| 58 |
+
## ⚠️ Limitations & Considerations
|
| 59 |
|
| 60 |
+
- Tends to repeat on long text—adjust `max_length` and `no_repeat_ngram_size` as needed
|
| 61 |
+
- Biased towards Indian contexts due to training data
|
| 62 |
+
- Not for critical or factual information generation
|
| 63 |
|
| 64 |
+
---
|
| 65 |
|
| 66 |
+
## 🙌 Contributions & Community
|
| 67 |
|
| 68 |
+
- **Suggestions?** Open an issue or start a discussion. We welcome community feedback!
|
| 69 |
+
- **Demo:** Want a hands-on demo? Let us know!
|
| 70 |
|
| 71 |
+
---
|
| 72 |
|
| 73 |
+
## 🔗 References
|
|
|
|
|
|
|
|
|
|
| 74 |
|
| 75 |
+
- [anktechsol.com](https://www.anktechsol.com)
|
|
|
|
| 76 |
|
| 77 |
+
---
|
|
|