YAML Metadata
Warning:
empty or missing yaml metadata in repo card
(https://huggingface.co/docs/hub/model-cards#model-card-metadata)
π€ Delta - Tiny Helpful Assistant (GPT2-style)
Delta is a tiny transformer-based language model inspired by GPT-2, designed to be lightweight, fast, and helpful for simple natural language tasks.
This project demonstrates how to train a minimal GPT-2-like model using Hugging Face Transformers on custom text, then serve it locally via a FastAPI API or deploy it to Hugging Face Hub.
π§ Model Details
- Architecture: GPT2 (custom config)
- Parameters: ~4.7M
- Layers: 2
- Embedding Size: 128
- Heads: 2
- Max Sequence Length: 128
- Trained on: ~300 characters (demo text)
- Format:
PyTorch, ready for GGUF/Ollama conversion
π Files Included
config.json: GPT2 model configurationpytorch_model.bin: Fine-tuned model weightstokenizer_config.json,vocab.json,merges.txt: Tokenizer filesgeneration_config.json: Optional generation tuningREADME.md: Youβre reading it!main.py: (Optional) FastAPI local serving code
π Quick Start (Hugging Face Transformers)
Install dependencies:
pip install transformers torch
Load and use the model:
from transformers import GPT2Tokenizer, GPT2LMHeadModel
tokenizer = GPT2Tokenizer.from_pretrained("Vijay1303/delta")
model = GPT2LMHeadModel.from_pretrained("Vijay1303/delta")
model.eval()
input_ids = tokenizer("Hello Delta, can you help me?", return_tensors="pt").input_ids
outputs = model.generate(input_ids, max_length=50, do_sample=True)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
π Run Locally via FastAPI
- Install dependencies:
pip install fastapi uvicorn transformers torch
- Run server:
uvicorn main:app --reload --port 8000
- Query API:
curl -X POST http://localhost:8000/generate \
-H "Content-Type: application/json" \
-d '{"prompt": "Hello Delta,", "max_length": 50}'
π¦ Deployment
You can:
- Convert to GGUF for Ollama or llama.cpp
- Push to Hugging Face Hub
- Serve via an API (FastAPI, Flask, etc.)
β οΈ Limitations
- Trained on a small dataset (~300 characters)
- Not suitable for production tasks
- For experimentation and educational use
π References
π¨βπ» Author
Vijay1303
Hugging Face Profile
Feel free to β the repo if you find this useful!
- Downloads last month
- 8
Inference Providers
NEW
This model isn't deployed by any Inference Provider.
π
Ask for provider support