janakhpon commited on
Commit
8fd15e7
·
1 Parent(s): 954bd9d

chore: keep internal engineering docs off the Hub

Browse files

- remove AUDIT-2026-08-08.md; it is an internal document with severities
and ratings, and this repo is a published artifact surface
- move it to mon_tokenizer/docs/AUDIT-2026-08-08-hf-artifact.md, beside the
package audit it belongs with
- ignore AUDIT-*, FINDINGS-*, LESSONS*, RETROSPECTIVE* so the next one
cannot land here by habit

Files changed (2) hide show
  1. .gitignore +8 -0
  2. AUDIT-2026-08-08.md +0 -134
.gitignore CHANGED
@@ -22,6 +22,14 @@ upload_to_hub.py
22
  sample_usage.py
23
  test_tokenizer.py
24
 
 
 
 
 
 
 
 
 
25
  # Stale metadata
26
  *.meta.json
27
 
 
22
  sample_usage.py
23
  test_tokenizer.py
24
 
25
+ # Internal engineering documents (local only).
26
+ # Audits, findings and retrospectives belong with the code they describe, in
27
+ # mon_tokenizer/docs/. What lands here is the card, the artifact, and its config.
28
+ AUDIT-*.md
29
+ FINDINGS-*.md
30
+ LESSONS*.md
31
+ RETROSPECTIVE*.md
32
+
33
  # Stale metadata
34
  *.meta.json
35
 
AUDIT-2026-08-08.md DELETED
@@ -1,134 +0,0 @@
1
- # Audit — 2026-08-08
2
-
3
- Cross-repo engineering audit of the Mon toolchain, recorded per repo. This repo has no `docs/`
4
- directory and nine tracked files; creating one for a single document would be disproportionate, so
5
- this sits at the root.
6
-
7
- Audited state: **working tree**, not `HEAD`. 7 modified, 3 deleted, 1 untracked — an uncommitted
8
- SentencePiece to `tokenizers`-JSON migration.
9
-
10
- This is a HuggingFace Hub artifact repository, not a code repository. It is judged as one: the
11
- product is the model card and the artifact, and most engineering dimensions do not apply.
12
-
13
- ---
14
-
15
- ## Retracted
16
-
17
- ### M1 — "The 4.6 MB artifact is not covered by Git LFS" — **withdrawn 2026-08-08**
18
-
19
- This was reported as Medium and is wrong. Acting on it would have fought the platform convention for
20
- no benefit. Retained here rather than deleted, because a retracted finding is more useful than a
21
- silently disappeared one.
22
-
23
- Why it does not stand:
24
-
25
- - **4.6 MB is under the Hub's 10 MB threshold.** LFS is required above that, not at this size.
26
- - **HF's own default `.gitattributes` template does not LFS-track `*.json`.** This repo's patterns
27
- (`*.model`, `*.bin`, `*.safetensors`, `*.vocab`) are exactly that template. Large published models
28
- ship `tokenizer.json` as a plain blob.
29
- - **LFS would make things worse for consumers.** A plain `git clone` without git-lfs installed yields
30
- a pointer file instead of a tokenizer. `from_pretrained()` resolves either way, so the change would
31
- add a failure mode and remove none.
32
- - **The cost is smaller than stated.** `mon_tokenizer/docs/how_to_contribute.md` makes a retrain a
33
- major version bump, so this is a few MB on an occasional release, not per commit.
34
-
35
- The original reasoning confused "large file" with "file that must be LFS-tracked". The threshold, and
36
- the platform's own convention, are what decide it.
37
-
38
- <details>
39
- <summary>Original finding as written</summary>
40
-
41
- ### The 4.6 MB artifact is not covered by Git LFS
42
-
43
- **Location:** `.gitattributes`
44
-
45
- ```
46
- *.model filter=lfs diff=lfs merge=lfs -text
47
- *.bin filter=lfs diff=lfs merge=lfs -text
48
- *.safetensors filter=lfs diff=lfs merge=lfs -text
49
- *.vocab filter=lfs diff=lfs merge=lfs -text
50
- ```
51
-
52
- Verified:
53
-
54
- ```
55
- tokenizer.json 4744KB git check-attr filter -> NO lfs
56
- ```
57
-
58
- **Reasoning.** The LFS patterns were written for the SentencePiece era, when the artifact was
59
- `.model` and `.vocab`. The uncommitted migration replaces those with `tokenizer.json`, which no
60
- pattern matches, so the new artifact is stored as a plain git blob.
61
-
62
- **Impact.** 4.6 MB is under the Hub's hard limit and works today. The cost is permanent and
63
- compounding: every future retrain adds another full copy to history, and history cannot be pruned
64
- without a force-push that breaks every clone.
65
-
66
- **Fix.** Add `*.json filter=lfs` scoped to the artifact, or `tokenizer.json` explicitly, before the
67
- migration is committed. Doing it after means the plain blob is already in history.
68
-
69
- </details>
70
-
71
- ---
72
-
73
- ## Low
74
-
75
- ### L1 — No `LICENSE` file
76
-
77
- There is no `LICENSE` at the repository root. The licence *is* declared — `README.md:2` carries
78
- `license: mit` in the model card frontmatter, and there is a `## License` section at `:148`.
79
-
80
- The Hub reads the frontmatter, so this is cosmetic rather than a licensing gap. Recorded because an
81
- initial read of this repo flagged it as a High finding on the assumption that no licence was declared
82
- anywhere; that was wrong, and the correction is worth keeping.
83
-
84
- ---
85
-
86
- ## What is good, specifically
87
-
88
- - **The `.gitignore` inverts the usual rule deliberately and correctly.** It ignores
89
- `pyproject.toml`, `uv.lock`, `.python-version`, `convert_to_hf.py`, `upload_to_hub.py` and
90
- `test_tokenizer.py` so that only artifacts reach the Hub. That is the right call for a model repo
91
- and it is not the obvious one.
92
- - **The model card frontmatter is complete and valid**: `license`, `language` (`mnw`, `my`, `en`),
93
- `library_name`, and meaningful tags. A card that the Hub can index properly.
94
- - **`model_card.json` carries `artifact_version` and `vocab_size`** as machine-readable facts rather
95
- than only prose, so the parity check in `mon_tokenizer`'s preflight can assert against them.
96
-
97
- ---
98
-
99
- ## Ratings
100
-
101
- Most dimensions do not apply to an artifact repository. Marked `n/a` rather than given an invented
102
- number.
103
-
104
- | Dimension | Score | Why |
105
- | :--- | ---: | :--- |
106
- | Correctness | 7 | Card frontmatter valid; artifact and declared vocab size agree. |
107
- | Reliability | 7 | Works as intended; no defect found once M1 was withdrawn. |
108
- | Maintainability | 6 | Nine files, flat layout, clear purpose. |
109
- | Security | n/a | No code, no execution surface. |
110
- | Architecture | n/a | Not a meaningful axis for an artifact repo. |
111
- | Performance | n/a | No runtime. |
112
- | Testing | n/a | Tested from `mon_tokenizer`'s preflight, which is the right place. |
113
- | Observability | n/a | Nothing to observe. |
114
- | Readability | 7 | The card explains what the tokenizer is and how to load it. |
115
- | Developer experience | 6 | Loading instructions are present and correct. |
116
- | Production readiness | 6 | Published and usable; the migration is uncommitted. |
117
- | Technical debt | 7 | Little to carry. The `.gitattributes` patterns match HF's own template. |
118
-
119
- ---
120
-
121
- ## Roadmap
122
-
123
- **Immediate.** Commit the migration alongside `mon_tokenizer`'s 1.0.0 release so the package and the Hub
124
- artifact stay in step. They are a matched pair: landing one without the other breaks the parity
125
- check that `mon_tokenizer`'s preflight runs against this repo.
126
-
127
- **Next.** Nothing outstanding.
128
-
129
- ## Deliberately not recommended
130
-
131
- - **No CI, no tests, no packaging.** The artifact is validated by `mon_tokenizer`'s preflight against
132
- a clean wheel install, which is where that check belongs. Duplicating it here would add a second
133
- thing to keep in sync.
134
- - **No `docs/` directory.** Nine files do not need one.