mrkschtr commited on
Commit
5572c69
·
verified ·
1 Parent(s): 1dc4fba

Delete DATA_CARD.md

Browse files
Files changed (1) hide show
  1. DATA_CARD.md +0 -336
DATA_CARD.md DELETED
@@ -1,336 +0,0 @@
1
- ---
2
- license:
3
- - other # source content: public domain (Schiller, d. 1805)
4
- - mit # pipeline code (this repo)
5
- language:
6
- - de
7
- multilinguality:
8
- - monolingual
9
- size_categories:
10
- - 1M<n<10M
11
- source_datasets:
12
- - original
13
- task_categories:
14
- - text-generation
15
- - fill-mask
16
- task_ids:
17
- - language-modeling
18
- - masked-language-modeling
19
- pretty_name: tiny_schiller
20
- tags:
21
- - literature
22
- - drama
23
- - german
24
- - 19th-century
25
- - public-domain
26
- - schiller
27
- - tiny-language-models
28
- ---
29
-
30
- # Dataset Card for tiny_schiller
31
-
32
- > *"Das Leben ist nur ein Moment, der Tod ist auch nur einer!"* — Friedrich Schiller
33
-
34
- ## Dataset Description
35
-
36
- `tiny_schiller` is a small (~2 MB) plain-text corpus of Friedrich Schiller's
37
- dramatic works, intended as a German-language analogue to Andrej Karpathy's
38
- [`tiny_shakespeare`](https://huggingface.co/datasets/tiny_shakespeare). It is
39
- sized for tutorial-scale language models — character-level RNNs, small
40
- GPT-style transformers, BPE tokenizer experiments — where the goal is
41
- reproducibility and pedagogy, not state-of-the-art benchmarking.
42
-
43
- The corpus is a single concatenated file containing 13 works
44
- (10 dramas, the unfinished *Demetrius* scenario, plus *Briefe über Don Carlos*), drawn from Projekt
45
- Gutenberg-DE.
46
-
47
- - **Curated by:** Mark Schutera (`schutera`)
48
- - **Languages:** German (de), 19th-century editorial orthography
49
- - **License:** see *Licensing Information* below — dual: source content is
50
- public domain; pipeline code is MIT
51
- - **Repository:** <https://github.com/schutera/tiny_schiller>
52
-
53
- ### Intended Use
54
-
55
- **Tutorial and teaching**
56
-
57
- - Teaching language-model fundamentals on a non-English literary corpus
58
- - Tokenizer experiments (character-level, GPT-2 BPE, `cl100k_base`)
59
- - Small-scale German text-generation demos and overfitting studies
60
- - A drop-in replacement for `tiny_shakespeare` in lecture material
61
-
62
- **Fine-tuning and domain adaptation**
63
-
64
- - Continued pre-training or domain adaptation target for any fine-tuneable
65
- causal LM (e.g. GPT-2, LLaMA, Mistral, Phi): the corpus is clean,
66
- stylistically consistent, and free of web noise
67
- - Style transfer experiments: the corpus provides a strong, distinctive
68
- register (elevated 19th-century dramatic German) that can be imprinted
69
- on a base model through a short fine-tuning run
70
- - Persona modeling: speaker turns are tagged, so individual characters can
71
- be isolated and used as instruction-tuning or RLHF preference data targets
72
- - Historical-German language adaptation: useful for probing how well a model
73
- generalises to pre-1901-reform orthography after fine-tuning
74
-
75
- **Hugging Face Transformers integration**
76
-
77
- - The corpus loads directly with `datasets.load_dataset` and works with the
78
- Transformers `Trainer` / `SFTTrainer` API for causal LM fine-tuning with
79
- no preprocessing beyond tokenization
80
-
81
- **Evaluation**
82
-
83
- - Held-out perplexity reference for German literary prose and drama: the
84
- `train_test` split provides a small but stylistically coherent test set
85
- that is complementary to modern German benchmarks (GermanQuAD, MLQA, etc.)
86
-
87
- ### Out-of-Scope
88
-
89
- - Production language modeling (size and coverage are deliberately small;
90
- fine-tuning a base model on this corpus alone will not produce a
91
- general-purpose German assistant)
92
- - Stylometry or authorship attribution (single author, single source edition)
93
- - Modern German NLP evaluation (orthography is 19th-century; perplexity
94
- scores are not comparable to contemporary German benchmarks)
95
- - Critical / scholarly use (no annotations, no critical apparatus)
96
- - Representative German prose: the corpus is overwhelmingly dramatic dialog;
97
- it is not a substitute for a balanced German text corpus
98
-
99
- ## Languages
100
-
101
- German (`de`). The text reflects the orthographic conventions of the
102
- 19th-century print editions used as source material — pre-1901 spelling
103
- reform conventions, German chevron quotation marks (»…«), and editorial
104
- punctuation that does not match contemporary Duden norms.
105
-
106
- ## Dataset Structure
107
-
108
- ### Data Instances
109
-
110
- A single `text` field containing the concatenated corpus.
111
-
112
- ```python
113
- FeaturesDict({
114
- 'text': Text(shape=(), dtype=string),
115
- })
116
- ```
117
-
118
- ### Data Fields
119
-
120
- - `text` *(string)*: full concatenated text of all included works.
121
-
122
- ### Splits
123
-
124
- The default release ships a single split. Two configurations are provided:
125
-
126
- | Config | Split | Bytes (UTF-8) |
127
- |----------------|---------|------------------|
128
- | `default` | `train` | 2,216,450 bytes |
129
- | `train_test` | `train` | ~90% of total |
130
- | `train_test` | `test` | ~10% of total |
131
-
132
- The 90/10 split is contiguous-tail (last 10% of the concatenated stream is
133
- held out), matching `tiny_shakespeare` convention; it is **not** a per-work
134
- split and therefore leaks within-work distribution between train and test.
135
- Treat it as a sanity-check held-out, not a benchmark split.
136
-
137
- ### Line Organization
138
-
139
- After Phase 1b cleaning, the file follows the Karpathy `tiny_shakespeare`
140
- convention: each speaker turn is preceded by a SPEAKER tag on its own line,
141
- followed by the spoken text. Stage directions appear inline in parentheses
142
- or on their own lines, as in the source editions. Act and scene markers
143
- are preserved as headings.
144
-
145
- ### Token Counts
146
-
147
- | Tokenizer | Token count | chars/token |
148
- |-----------------|---------------|-------------|
149
- | character-level | 2,168,278 | 1.00 |
150
- | GPT-2 BPE | 913,675 | 2.37 |
151
- | `cl100k_base` | 681,548 | 3.18 |
152
-
153
- ### Tokenizer Choice
154
-
155
- **Character-level** is the right default for tutorial use. The 97-character
156
- vocabulary is small enough that an embedding table and output projection add
157
- negligible parameters to a teaching-scale model. Every codepoint is
158
- unambiguous — no out-of-vocabulary tokens, no merging surprises — and the
159
- prepare script is a single `np.frombuffer`. This is what `tiny_shakespeare`
160
- uses and why this corpus was designed to be a drop-in replacement.
161
-
162
- **GPT-2 BPE** (`gpt2` via tiktoken) is the right choice when you want to
163
- reuse a pre-trained tokenizer from Karpathy's nanoGPT tutorials without
164
- modification. The 50,257-token vocabulary encodes German with 2.37
165
- chars/token — noticeably worse than cl100k because GPT-2's merge table was
166
- learned on English text. Umlauts (ä, ö, ü, Ä, Ö, Ü) and ß appear
167
- frequently in Schiller and they fall outside the most common ASCII merges,
168
- so many compound words are split more aggressively than necessary. Token ids
169
- fit in `uint16` (max id 50,256), so `train.bin` / `val.bin` are compact.
170
- Ready-to-use files are in `schiller_bpe/`.
171
-
172
- **`cl100k_base`** (GPT-4 / Claude-era tokenizer) is the best choice when
173
- sequence length matters — 682k tokens versus 914k for GPT-2 on the same
174
- text means 25% more context per fixed-length window. The merge table was
175
- trained on multilingual data and handles German compounds and umlauts much
176
- more cleanly (3.18 chars/token). The trade-off: the vocabulary is ~100k
177
- tokens, so ids require `uint32` rather than `uint16`, and the output
178
- projection over 100k classes may be disproportionately large for a
179
- tutorial-scale model. Ready-to-use files are in `schiller_cl100k/`.
180
-
181
- **When to choose which:**
182
-
183
- | Goal | Tokenizer |
184
- |------|-----------|
185
- | Drop-in for nanoGPT / makemore tutorials | character-level |
186
- | Follow Karpathy's nanoGPT BPE tutorial exactly | GPT-2 BPE |
187
- | Minimise sequence length / maximise context | `cl100k_base` |
188
- | Cross-lingual transfer from a GPT-4-style model | `cl100k_base` |
189
- | Explore tokenizer design for German | compare all three |
190
-
191
- ## Data Sources
192
-
193
- All texts are sourced from [Projekt Gutenberg-DE](https://www.projekt-gutenberg.org/autoren/namen/schiller.html)
194
- (projekt-gutenberg.org). Note: this is the German Projekt Gutenberg-DE,
195
- operated by Hille & Partner / *Der Spiegel*, and is **distinct** from the
196
- US-based Project Gutenberg at gutenberg.org. The two have different reuse
197
- terms; see *Licensing Information* below.
198
-
199
- Per-work source URLs are recorded in `scripts/sources.yaml`. Note: SHA-256 hashes of the original HTML are unavailable — the Projekt Gutenberg-DE site restructured in early 2026 and original chapter HTML files are no longer publicly accessible for re-verification.
200
-
201
- Included works:
202
-
203
- - Briefe über Don Carlos
204
- - Aus dem Szenar zum »Demetrius«
205
- - Demetrius
206
- - Die Huldigung der Künste
207
- - Die Jungfrau von Orleans
208
- - Die Räuber
209
- - Die Verschwörung des Fiesco zu Genua
210
- - Don Carlos, Infant von Spanien
211
- - Kabale und Liebe
212
- - Maria Stuart
213
- - Wallenstein (trilogy as published)
214
- - Wilhelm Tell
215
- - Die Braut von Messina
216
-
217
- ## Curation Rationale
218
-
219
- `tiny_shakespeare` is a teaching staple because it is small, homogeneous,
220
- and rich in dialog structure. There is no equally convenient German
221
- counterpart. Schiller is a natural choice: a single canonical author,
222
- multiple long dramas with explicit speaker turns, and a body of work
223
- entirely in the public domain. The goal was a single plain-text artifact
224
- that drops into existing tutorial pipelines with minimal friction, plus
225
- a reproducible audit trail (sources, hashes, cleaning script).
226
-
227
- ## Considerations for Using the Data
228
-
229
- The corpus is a single 19th-century male author writing about idealised
230
- historical and political subjects; it encodes the worldview and
231
- historiographic assumptions of late-Enlightenment German drama. Models
232
- trained on it will reflect that distribution and should not be used to
233
- generate text presented as contemporary or neutral.
234
-
235
- - **Orthography:** pre-1901-reform German; downstream evaluation against
236
- modern German benchmarks is unfair.
237
- - **Quotation marks:** German chevrons »…« are preserved; tokenizers may
238
- treat them as rare characters.
239
- - **Dialog-heavy:** overwhelmingly dramatic dialog with speaker tags;
240
- not a representative sample of German prose.
241
- - **Editorial layer:** old non-critical print editions; spelling and
242
- punctuation reflect the digitiser's editorial choices, not Schiller's
243
- manuscripts.
244
- - **Size:** ~2 MB / 11 works is a teaching toy. Schiller's poetry,
245
- philosophical essays, and historical writing are excluded in v1.
246
- - **Encoding artifacts:** the cleaning pipeline normalises common HTML
247
- boilerplate and mojibake; residual artifacts are tracked in the audit
248
- log.
249
-
250
- ## Licensing Information
251
-
252
- This dataset has **two distinct licenses**, one for the source content
253
- and one for the pipeline that produces it.
254
-
255
- ### Source content — public domain
256
-
257
- Friedrich Schiller died on 9 May 1805. Under the EU `Schutzdauerrichtlinie`
258
- (life + 70 years) and equivalent rules in the United States and the
259
- United Kingdom, all of Schiller's works passed into the public domain
260
- no later than 1 January 1876, and copyright in the original works has
261
- not been recoverable since. The texts themselves are therefore free of
262
- authorial copyright.
263
-
264
- The print editions used as the source for the Projekt Gutenberg-DE
265
- digitisations are old non-critical editions; they do not carry separate
266
- editorial / critical-apparatus copyright that would survive in the body
267
- text. (Modern critical / annotated editions — e.g. the *Nationalausgabe*
268
- or Hanser editions — are **not** used here, and their annotations would
269
- remain in copyright.)
270
-
271
- ### Pipeline code — MIT
272
-
273
- The scripts, configuration, and documentation in this repository are
274
- licensed under the MIT License (see `LICENSE`). MIT covers only the
275
- code, not the textual content.
276
-
277
- ### Source-platform terms — Projekt Gutenberg-DE
278
-
279
- Projekt Gutenberg-DE (projekt-gutenberg.org) is an independent compilation
280
- operated by Hille & Partner / *Der Spiegel*, and applies its own terms
281
- to redistribution of *its own digitisations* — independent of the
282
- underlying public-domain status of the works. In paraphrase: the texts
283
- are made available for **personal, private, non-commercial use**;
284
- **redistribution of the digitised text in unaltered form requires the
285
- permission of the editor** (Editor: Gunter Hille). Schools and individuals
286
- may use the texts for personal, classroom, and research purposes.
287
-
288
- This dataset takes the conservative position that:
289
-
290
- 1. The underlying works are public domain and may be re-derived from
291
- any source edition, and
292
- 2. As a courtesy and to honour the source-platform terms, attribution
293
- to Projekt Gutenberg-DE is preserved at the per-work level
294
- (`scripts/sources.yaml`), and the corpus is released for research
295
- and educational use.
296
-
297
- For full details, exact wording, and the redistribution edge cases,
298
- see [`LICENSING.md`](LICENSING.md).
299
-
300
- ## Citation
301
-
302
- ```bibtex
303
- @misc{schutera2023tinyschiller,
304
- author = {Schutera, Mark},
305
- title = {tiny\_schiller: a small German Schiller corpus for tiny language models},
306
- year = {2023},
307
- howpublished = {\url{https://github.com/schutera/tiny_schiller}},
308
- note = {Source texts: Projekt Gutenberg-DE, public domain.}
309
- }
310
- ```
311
-
312
- If you use the underlying texts, please also acknowledge Projekt
313
- Gutenberg-DE (<https://www.projekt-gutenberg.org/>).
314
-
315
- ## Limitations
316
-
317
- - No critical apparatus, no editorial notes, no philological annotations.
318
- - No part-of-speech, lemma, or syntactic annotations.
319
- - Eleven works only at v1; Schiller's poetry, ballads, philosophical
320
- essays, and historical writing are not included.
321
- - Encoding artifacts from the source HTML may remain after cleaning.
322
- - The 90/10 split is a contiguous-tail split; not suitable as a
323
- benchmark.
324
- - Not intended for production language modeling, modern-German
325
- evaluation, or stylometric work.
326
-
327
- ## References
328
-
329
- - Projekt Gutenberg-DE — Schiller author page:
330
- <https://www.projekt-gutenberg.org/autoren/namen/schiller.html>
331
- - Projekt Gutenberg-DE — Impressum:
332
- <https://www.projekt-gutenberg.org/info/impressum/impressum.html>
333
- - `tiny_shakespeare` (structural template):
334
- <https://huggingface.co/datasets/tiny_shakespeare>
335
- - EU Directive 2006/116/EC (term of protection of copyright):
336
- <https://eur-lex.europa.eu/eli/dir/2006/116/oj>