Update README.md
Browse files
README.md
CHANGED
|
@@ -1,3 +1,124 @@
|
|
| 1 |
---
|
|
|
|
|
|
|
| 2 |
license: mit
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
+
language:
|
| 3 |
+
- pt
|
| 4 |
license: mit
|
| 5 |
+
pipeline_tag: text-generation
|
| 6 |
+
tags:
|
| 7 |
+
- transformer
|
| 8 |
+
- pytorch
|
| 9 |
+
- portuguese
|
| 10 |
+
- clash-royale
|
| 11 |
+
- chatbot
|
| 12 |
+
- question-answering
|
| 13 |
+
- educational
|
| 14 |
---
|
| 15 |
+
|
| 16 |
+
# ClashAI-300k
|
| 17 |
+
|
| 18 |
+
**ClashAI-300k** is a lightweight Transformer language model with approximately **300,000 parameters**, designed to answer questions about **Clash Royale** in Portuguese.
|
| 19 |
+
|
| 20 |
+
This project was created as an educational experiment to demonstrate how a small language model can be trained from scratch using PyTorch, a custom tokenizer, and a handcrafted dataset.
|
| 21 |
+
|
| 22 |
+
## Features
|
| 23 |
+
|
| 24 |
+
- 🧠 Approximately **300K parameters**
|
| 25 |
+
- 🇧🇷 Portuguese language
|
| 26 |
+
- 🎮 Specialized in Clash Royale
|
| 27 |
+
- ⚡ Lightweight and fast inference
|
| 28 |
+
- 🔤 Custom BPE tokenizer
|
| 29 |
+
- 🔥 Built entirely with PyTorch
|
| 30 |
+
- 📚 Trained from scratch (no pretrained weights)
|
| 31 |
+
|
| 32 |
+
## Intended Use
|
| 33 |
+
|
| 34 |
+
ClashAI-300k is intended for:
|
| 35 |
+
|
| 36 |
+
- Answering Clash Royale questions
|
| 37 |
+
- Educational purposes
|
| 38 |
+
- Learning how Transformer models work
|
| 39 |
+
- Small AI experiments
|
| 40 |
+
- Running on low-end hardware
|
| 41 |
+
|
| 42 |
+
It is **not** intended to replace large language models or provide general-purpose knowledge.
|
| 43 |
+
|
| 44 |
+
## Model Details
|
| 45 |
+
|
| 46 |
+
| Property | Value |
|
| 47 |
+
|----------|-------|
|
| 48 |
+
| Model | Transformer Decoder |
|
| 49 |
+
| Parameters | ~300,000 |
|
| 50 |
+
| Framework | PyTorch |
|
| 51 |
+
| Tokenizer | Custom Byte Pair Encoding (BPE) |
|
| 52 |
+
| Language | Portuguese |
|
| 53 |
+
| Domain | Clash Royale |
|
| 54 |
+
|
| 55 |
+
## Training
|
| 56 |
+
|
| 57 |
+
The model was trained from scratch using a manually curated dataset containing hundreds of Clash Royale question-answer pairs.
|
| 58 |
+
|
| 59 |
+
Training includes:
|
| 60 |
+
|
| 61 |
+
- Custom tokenizer training
|
| 62 |
+
- Sequence-to-sequence language modeling
|
| 63 |
+
- Cross-entropy loss optimization
|
| 64 |
+
- Autoregressive text generation
|
| 65 |
+
|
| 66 |
+
## Example
|
| 67 |
+
|
| 68 |
+
**Input**
|
| 69 |
+
|
| 70 |
+
```
|
| 71 |
+
Como conseguir ouro?
|
| 72 |
+
```
|
| 73 |
+
|
| 74 |
+
**Output**
|
| 75 |
+
|
| 76 |
+
```
|
| 77 |
+
Você pode conseguir ouro vencendo batalhas, abrindo baús, participando de eventos e doando cartas ao clã.
|
| 78 |
+
```
|
| 79 |
+
|
| 80 |
+
---
|
| 81 |
+
|
| 82 |
+
**Input**
|
| 83 |
+
|
| 84 |
+
```
|
| 85 |
+
Como derrotar um Corredor?
|
| 86 |
+
```
|
| 87 |
+
|
| 88 |
+
**Output**
|
| 89 |
+
|
| 90 |
+
```
|
| 91 |
+
Use construções defensivas para desviar o Corredor e tropas de alto dano para eliminá-lo rapidamente.
|
| 92 |
+
```
|
| 93 |
+
|
| 94 |
+
## Limitations
|
| 95 |
+
|
| 96 |
+
ClashAI-300k is intentionally small.
|
| 97 |
+
|
| 98 |
+
Some limitations include:
|
| 99 |
+
|
| 100 |
+
- Limited world knowledge
|
| 101 |
+
- Specialized only in Clash Royale
|
| 102 |
+
- May generate incorrect or repetitive responses
|
| 103 |
+
- Performs best on questions similar to its training data
|
| 104 |
+
|
| 105 |
+
## Future Improvements
|
| 106 |
+
|
| 107 |
+
Planned improvements include:
|
| 108 |
+
|
| 109 |
+
- Larger training dataset
|
| 110 |
+
- Better sampling strategies
|
| 111 |
+
- Larger context window
|
| 112 |
+
- Improved architecture
|
| 113 |
+
- More gameplay knowledge
|
| 114 |
+
- Better generalization
|
| 115 |
+
|
| 116 |
+
## Disclaimer
|
| 117 |
+
|
| 118 |
+
This is an independent educational project.
|
| 119 |
+
|
| 120 |
+
Clash Royale is a trademark of Supercell. This project is not affiliated with, endorsed by, or sponsored by Supercell.
|
| 121 |
+
|
| 122 |
+
## License
|
| 123 |
+
|
| 124 |
+
MIT License
|