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| 7 |
+
- en
|
| 8 |
+
license:
|
| 9 |
+
- mit
|
| 10 |
+
multilinguality:
|
| 11 |
+
- monolingual
|
| 12 |
+
size_categories:
|
| 13 |
+
- n<1K
|
| 14 |
+
source_datasets:
|
| 15 |
+
- original
|
| 16 |
+
task_categories:
|
| 17 |
+
- text-generation
|
| 18 |
+
- question-answering
|
| 19 |
+
pretty_name: Nano-Start Learning Dataset
|
| 20 |
+
tags:
|
| 21 |
+
- educational
|
| 22 |
+
- llm-training
|
| 23 |
+
- chat
|
| 24 |
+
- completions
|
| 25 |
+
- oxidizr
|
| 26 |
+
configs:
|
| 27 |
+
- config_name: completions
|
| 28 |
+
data_files:
|
| 29 |
+
- split: train
|
| 30 |
+
path: completions.jsonl
|
| 31 |
+
- config_name: qa
|
| 32 |
+
data_files:
|
| 33 |
+
- split: train
|
| 34 |
+
path: qa.jsonl
|
| 35 |
+
- config_name: chat
|
| 36 |
+
data_files:
|
| 37 |
+
- split: train
|
| 38 |
+
path: chat.jsonl
|
| 39 |
+
---
|
| 40 |
+
|
| 41 |
+
# Nano-Start Learning Dataset
|
| 42 |
+
|
| 43 |
+
A small educational dataset for learning how to train language models from scratch.
|
| 44 |
+
|
| 45 |
+
## Dataset Description
|
| 46 |
+
|
| 47 |
+
This dataset contains simple, factual examples designed to demonstrate LLM training concepts:
|
| 48 |
+
|
| 49 |
+
- **Completions**: Factual statements the model learns to continue
|
| 50 |
+
- **Q&A**: Question-answer pairs using chat special tokens
|
| 51 |
+
- **Chat**: Multi-turn conversations with system prompts
|
| 52 |
+
|
| 53 |
+
The dataset is intentionally small (~276 examples) so models can be trained quickly on CPU. The goal is education, not production-quality models.
|
| 54 |
+
|
| 55 |
+
## Dataset Statistics
|
| 56 |
+
|
| 57 |
+
| Split | Examples | Description |
|
| 58 |
+
|-------|----------|-------------|
|
| 59 |
+
| completions | 129 | Factual statements about geography, math, science, etc. |
|
| 60 |
+
| qa | 96 | Q&A pairs with `<\|user\|>` and `<\|assistant\|>` tokens |
|
| 61 |
+
| chat | 51 | Multi-turn conversations with `<\|system\|>` prompts |
|
| 62 |
+
|
| 63 |
+
## Data Format
|
| 64 |
+
|
| 65 |
+
All files are JSONL (JSON Lines) with a single `text` field:
|
| 66 |
+
|
| 67 |
+
### Completions
|
| 68 |
+
```json
|
| 69 |
+
{"text": "The capital of France is Paris. Paris is known for the Eiffel Tower."}
|
| 70 |
+
{"text": "1 + 1 = 2. This is the most basic addition problem in mathematics."}
|
| 71 |
+
{"text": "Water boils at 100 degrees Celsius at sea level."}
|
| 72 |
+
```
|
| 73 |
+
|
| 74 |
+
### Q&A
|
| 75 |
+
```json
|
| 76 |
+
{"text": "<|user|>What is 1+1?<|assistant|>1+1 equals 2."}
|
| 77 |
+
{"text": "<|user|>What is the capital of France?<|assistant|>The capital of France is Paris."}
|
| 78 |
+
```
|
| 79 |
+
|
| 80 |
+
### Chat
|
| 81 |
+
```json
|
| 82 |
+
{"text": "<|system|>You are a helpful assistant.<|user|>Hello!<|assistant|>Hello! How can I help you today?"}
|
| 83 |
+
{"text": "<|system|>You are a math tutor.<|user|>What is 5x5?<|assistant|>5x5 equals 25."}
|
| 84 |
+
```
|
| 85 |
+
|
| 86 |
+
## Special Tokens
|
| 87 |
+
|
| 88 |
+
The dataset uses OpenAI-compatible special tokens from the `cl100k_base` vocabulary:
|
| 89 |
+
|
| 90 |
+
| Token | ID | Purpose |
|
| 91 |
+
|-------|------|---------|
|
| 92 |
+
| `<\|endoftext\|>` | 100257 | End of document (added during tokenization) |
|
| 93 |
+
| `<\|system\|>` | 100277 | System instructions |
|
| 94 |
+
| `<\|user\|>` | 100278 | User input |
|
| 95 |
+
| `<\|assistant\|>` | 100279 | Model response |
|
| 96 |
+
|
| 97 |
+
## Usage
|
| 98 |
+
|
| 99 |
+
### Download
|
| 100 |
+
|
| 101 |
+
**Option A: Using huggingface-cli**
|
| 102 |
+
```bash
|
| 103 |
+
pip install huggingface_hub
|
| 104 |
+
huggingface-cli download fs90/nano-start-data --local-dir raw --repo-type dataset
|
| 105 |
+
```
|
| 106 |
+
|
| 107 |
+
**Option B: Direct download**
|
| 108 |
+
|
| 109 |
+
Download files from the [Files tab](https://huggingface.co/datasets/fs90/nano-start-data/tree/main).
|
| 110 |
+
|
| 111 |
+
### View with Python
|
| 112 |
+
```python
|
| 113 |
+
from datasets import load_dataset
|
| 114 |
+
|
| 115 |
+
ds = load_dataset("fs90/nano-start-data", "completions")
|
| 116 |
+
for example in ds["train"][:3]:
|
| 117 |
+
print(example["text"])
|
| 118 |
+
```
|
| 119 |
+
|
| 120 |
+
### For Training
|
| 121 |
+
|
| 122 |
+
This raw data shows what the text looks like **before tokenization**. For training, use the pre-tokenized version: [fs90/nano-start-data-bin](https://huggingface.co/datasets/fs90/nano-start-data-bin)
|
| 123 |
+
|
| 124 |
+
To learn how to tokenize your own data, see the [splintr](https://github.com/farhan-syah/splintr) project.
|
| 125 |
+
|
| 126 |
+
## Related Resources
|
| 127 |
+
|
| 128 |
+
- **Pre-tokenized data**: [fs90/nano-start-data-bin](https://huggingface.co/datasets/fs90/nano-start-data-bin)
|
| 129 |
+
- **Training framework**: [oxidizr](https://github.com/farhan-syah/oxidizr)
|
| 130 |
+
- **Tokenization**: [splintr](https://github.com/farhan-syah/splintr) - Learn how to tokenize your own data
|
| 131 |
+
|
| 132 |
+
## License
|
| 133 |
+
|
| 134 |
+
MIT License
|
| 135 |
+
|
| 136 |
+
## Citation
|
| 137 |
+
|
| 138 |
+
```bibtex
|
| 139 |
+
@dataset{nano_start_2024,
|
| 140 |
+
title={Nano-Start: Educational Dataset for LLM Training},
|
| 141 |
+
author={fs90},
|
| 142 |
+
year={2024},
|
| 143 |
+
publisher={Hugging Face},
|
| 144 |
+
url={https://huggingface.co/datasets/fs90/nano-start-data}
|
| 145 |
+
}
|
| 146 |
+
```
|