Pipeline Overview#
The tokenizer_extension category is a typed-artifact pipeline.
Each step declares in its step.toml the artifact type it consumes and the artifact type it produces, and the output directory of one step is the input path of the next.
Steps and Artifacts#
flowchart LR
A[checkpoint_hf: base] --> B[extend]
B --> C[tokenizer]
C --> D[init_embeddings]
A --> D
D --> E[checkpoint_hf: resized]
E --> F[pretrain/megatron_bridge]
C --> G[evaluate]
G --> H[eval_results: fertility]
E --> I[eval_init]
I --> J[eval_results: BPB]
Step |
Consumes |
Produces |
Compute |
|---|---|---|---|
|
|
|
CPU |
|
|
|
GPU |
|
|
|
CPU |
|
one or more resized |
|
GPU |
The extend step trains one byte-pair encoding (BPE) on the corpus and splices the resulting tokens into the base tokenizer using the arm selected by method.
An arm is one of the three construction methods, add, replace, or expand, and a job builds exactly one arm.
See Add, Replace, and Expand.
The init_embeddings step attaches the extended tokenizer to the base model, resizes the input embedding and language-model head, initializes the new rows with the engine selected by method, and saves the result as a Hugging Face checkpoint.
See Embedding Initialization.
The two evaluation steps are independent of each other.
evaluate scores a tokenizer alone; eval_init scores a model and therefore needs a GPU.
See Evaluation Metrics.
Hand-Off to Continued Pretraining#
The init_embeddings output directory is the hf_model_path value for the pretrain/megatron_bridge step.
Post-CPT model evaluation and downstream benchmarks are not part of this category; use the eval step catalog described in About Model Evaluation.
Design Choices#
Each step is self-contained.
step.pyis the executor and its supporting modules live beside it. The only shared modules arelanguages.pyandscript_ranges.pyat the category root.The execution backend (Slurm, Lepton, or DGX Cloud) is chosen at run time by the environment profile that you pass with
--runor--batch, not by the step. See Run on a Cluster.languageis the single key that selects the corpus normalizer, the prune script for Replace, the auxiliary encoder, and the fastText vectors. Every one of those remains individually overridable, but an explicit override takes precedence over the profile. See Add a Language.Missing optional dependencies are errors, not fallbacks. When
indic-nlp-libraryorfasttext-wheelis required and absent, the step raises with the install command rather than training or initializing with a different procedure.
Where to Read More#
Topic |
Repository document |
|---|---|
Category overview and quickstart |
|
Measured results and decision rules |
|
Datasets and hyperparameters behind the guidebook |
|