How rfls-emyton/ninmeni works
NINMENI is the reproducible Generation 1 Indonesian character-level language-model framework, not the unpublished Veyra architecture. The main workflow turns JSONL corpus records into NMU ID shards, then trains the reference model with a unified pretraining/SFT loop and saves resumable checkpoints. The codec and fixed registry are also independently usable for encode/decode experiments. Training and shard-builder relationships follow the README and indexed imports; unsampled implementation details are not inferred.
Main entry points: train_unified_native.py Unified trainer · codec.py NMU codec · build_shards.py Shard builder · sft_native.py SFT data and loss
Components 12
NMU representation
- NMU registry
registry/nmu_v1.json - NMU codec
nmu/codec.py - Codec errors
nmu/errors.py
Corpus preparation
- Shard builder
pipeline/build_shards.py - ID shards
Model training
- Unified trainer
training/train_unified_native.py - SFT data and loss
training/sft_native.py - Sampling and checkpoints
training/native_utils.py
Reference model
- Reference decoder
model/reference_model.py
Other components
- JSONL corpus
- SFT turn data
- Training checkpoints
Connections 14
- JSONL corpus → Shard builder: ingests JSONL
README.md - Shard builder → NMU codec: encodes records
pipeline/build_shards.py - Shard builder → ID shards: writes shards
pipeline/build_shards.py - NMU codec → NMU registry: loads registry
nmu/codec.py - NMU codec → Codec errors: raises errors
nmu/codec.py - Unified trainer → NMU registry: loads registry
training/train_unified_native.py - Unified trainer → ID shards: samples pretraining
README.md - Unified trainer → SFT turn data: loads SFT data
README.md - Unified trainer → SFT data and loss: uses SFT routines
training/train_unified_native.py - Unified trainer → Sampling and checkpoints: uses sampler and saves
training/train_unified_native.py - Unified trainer → Reference decoder: trains model
training/train_unified_native.py - Sampling and checkpoints → Training checkpoints: writes checkpoints
training/native_utils.py - SFT data and loss → NMU codec: encodes turns
training/sft_native.py - SFT data and loss → Reference decoder: computes SFT loss
training/sft_native.py