mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #1219] [CLOSED] setup: a Spanish draft subset (--draft-vocab es); Spanish answers dra… #3315
Labels
No labels
needs-format
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Niko1221/Strata#3315
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Niko1221/Strata/pull/1219
Author: @elanonimo832
Created: 10/6/2026
Status: ❌ Closed
Base:
main← Head:feat/draft-vocab-es📝 Commits (1)
f0148e4setup: a Spanish draft subset (--draft-vocab es); Spanish answers draft 12% more📊 Changes
4 files changed (+42 additions, -6 deletions)
View changed files
➕
data/draft_vocab_es.bin(+0 -0)📝
docs/DETAILS.md(+6 -0)📝
setup.py(+8 -5)📝
tools/test_setup_draft_vocab.py(+28 -1)📄 Description
…ft 12% more
The project ships four draft subsets (cjk, en, cyrillic, fr) and none for Spanish, so a Spanish answer drafts against English and code tokens only. The French one, added in #597, is the model to follow: as tools/draft_vocab.py puts it, a language written in a script the base already holds (French, Spanish, German... in Latin letters) needs specific words and word pieces, not a whole script - and it names Spanish as the next one. This adds that file.
data/draft_vocab_es.bin (52,026 ids) is data/draft_vocab_en.bin plus the 11,501 tokens that cover 99% of a Spanish corpus:
25 public-domain books of 1837-1921 from Project Gutenberg, ids
15725 17340 17013 16961 17223 18005 58059 29506 14944 24127 31013 35407 10909 57781 30122 12848
59852 46182 42440 52894 57982 60675 40066 30535 63509
(Galdos, Valera, Pardo Bazan, Alarcon, Blasco Ibanez, Pereda, Palacio Valdes, Becquer, Hartzenbusch,
Baroja, Unamuno, Valle-Inclan, Ruben Dario, Ortega y Gasset, Ramon y Cajal, ...; novel, theatre,
poetry, history and memoirs)
200 Spanish Wikipedia articles (wikimedia/wikipedia, config 20231101.es), sampled with 5 requests at
offsets 0, 368231, 736462, 1104693, 1472924 (100 rows each), for the modern register
tools/draft_vocab.py --gguf -00001-of-00002.gguf --base data/draft_vocab_en.bin --corpus <the 25 texts> <the 200 articles> --coverage 0.99 --out data/draft_vocab_es.bin
Measured (IQ3_XXS, RTX 5080 Laptop), on text left out of the corpus:
tools/test_setup_draft_vocab.py gains the two checks the French subset has (a shipped subset is replaced and back, a hand-made one is kept; the file holds the en base first, unchanged, with the added ids sorted). test_sizes_follow_the_shipped_subsets now covers it too: DRAFT_VOCAB_MIB["es"] = 170, the map's own scaling (348 MiB at 106,299 ids).
sha256 of data/draft_vocab_es.bin: 9c445b6b75badb0d46d349c2feffa210b8117a35435c11e76d9f163670fa2388
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.