mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
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#2752
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/664
Author: @gputier
Created: 10/3/2026
Status: ❌ Closed
Base:
main← Head:pr/draft-vocab-fr📝 Commits (1)
a1f30cfsetup, tools: a draft vocabulary for French, and draft_vocab.py builds one from a text (#597)📊 Changes
6 files changed (+109 additions, -13 deletions)
View changed files
➕
data/draft_vocab_fr.bin(+0 -0)📝
docs/DETAILS.md(+8 -0)📝
setup.py(+13 -9)📝
tools/draft_vocab.py(+38 -0)➕
tools/test_draft_vocab.py(+30 -0)📝
tools/test_setup_draft_vocab.py(+20 -4)📄 Description
The PR you asked for in #597, in its two parts.
1.
tools/draft_vocab.py --cover-text <text> [--cover 0.99]French shares its script with English, so
--addhas no range for it. The new mode takes a UTF-8 text in the language and adds its most frequent tokens: the ones that make--coverof the text's token occurrences, less those the base already has. Most frequent first (the first seen first, among equals), added in id order after what--addbrought, so the same text gives the same subset. It prints the share of the text's tokens outside the base and outside the new subset.2.
data/draft_vocab_fr.binand--draft-vocab frfris inDRAFT_VOCABSandDRAFT_VOCAB_MIB(153 MiB, by the token count like the others), in--draft-vocab's help, inrefresh_draft_vocaband in the small-card note. DETAILS.md has the paragraph.The file is the output of this command, on the IQ3_S pack's first shard:
Its sha256 is
f236f21584a1483ad5f61f261dfb0239216028821baf045d11df25f851e9dcd0, the same bytes as the list measured in #597.The corpus is not in the PR (1 MB of CC BY-SA text). It is the plain-text extract (
action=query&prop=extracts&explaintext=1) of 8 French Wikipedia articles, joined by a blank line in this order, fetched on 2026-10-03 at 06:04 UTC. The revisions at that time:I can attach the file if you want to regenerate the bytes.
Tests
tools/test_draft_vocab.py(new, 2 tests):covering()on small counts, the share and the order among equal counts.tools/test_setup_draft_vocab.py(6 tests):frstarts with the English/code subset in its order,refresh_draft_vocabcopies it, its MiB follows its token count, the small-card note stays silent whenfrwas chosen.Not in this PR
The engine's hint when the draft head does not fit (
src/core/mtp.cpp, thesmaller[]table) and the server'sDRAFT_HEAD_HINTstill namecyrillicandenonly.fr(46,587 ids) would sit between them. I left the engine out of a setup and tools PR; say so if you want it here.The measurement behind the 11% is in #597: 12 French prompts, 300 tokens each, IQ3_S on an RTX 5090, acceptance 0.52 to 0.64, 141 to 158 tokens/s.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.