Spaces:
Sleeping
Sleeping
File size: 1,226 Bytes
74f0a52 885ac01 74f0a52 885ac01 74f0a52 885ac01 74f0a52 885ac01 74f0a52 885ac01 74f0a52 885ac01 74f0a52 885ac01 74f0a52 885ac01 74f0a52 885ac01 74f0a52 885ac01 74f0a52 885ac01 74f0a52 885ac01 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 | ---
title: Tiny Transformer Trainer
emoji: 🧠
colorFrom: purple
colorTo: blue
sdk: docker
app_port: 7860
pinned: false
---
# Tiny Transformer Trainer 🧠
Train small GPT-style transformers from your own text data — directly in the browser.
## How to Use
1. **Upload data:**
- `.txt` — plain text files
- `.csv` — Q&A pairs with named columns
- `.json` — Q&A pairs as a list of objects
2. **Set column names** (for CSV/JSON): specify which columns hold questions/prompts and answers/responses.
3. **Configure model:** pick hidden size, layers, heads, vocab size, and max sequence length.
4. **Train:** click 🚀 **Start Training** and watch live logs.
5. **Download:** grab the `.zip` with model weights + tokenizer.
## Output Files
| File | Description |
|------|-------------|
| `model/` | Trained `GPT2LMHeadModel` weights + config |
| `tokenizer/` | Trained `PreTrainedTokenizerFast` vocab + config |
| `README.md` | Usage code snippet |
## Local Usage
```python
from transformers import GPT2LMHeadModel, PreTrainedTokenizerFast
model = GPT2LMHeadModel.from_pretrained("trained_model_output/model")
tokenizer = PreTrainedTokenizerFast.from_pretrained("trained_model_output/tokenizer")
```
|