Schema Reference
Schema Field Reference
Cross-references: Architecture · Attention Mixers · Optimizers · CLI Reference · Training Safety · SBERT Workflows · Deployment
Strict Validation Policy
The schema (src/schema.yaml) enforces ``additionalProperties: false`` at all levels — top-level and every nested object. Unknown keys fail fast instead of being silently ignored. The training.optimizer.parameters object is additionally constrained by optimizer-specific prefix rules through allOf + if/then pattern checks.
Top-Level Sections
Section |
Required |
Description |
|---|---|---|
|
No (optional when |
Architecture variant: |
|
No (optional when |
FrankensteinModelConfig model parameters |
|
Yes |
Training hyperparameters and runtime configuration |
|
No |
HuggingFace model identifier for continual pretraining |
|
No |
Tokenizer config when |
Model Fields
Field |
Type |
Required |
Range/Enum |
Default |
Description |
|---|---|---|---|---|---|
|
int |
Yes |
≥ 1 |
— |
Vocabulary size |
|
int |
Yes |
≥ 1, divisible by |
— |
Hidden dimension |
|
int |
Yes |
≥ 1 |
— |
Physical layer count |
|
int |
Yes |
≥ 1 |
— |
Logical loop count |
|
int |
Yes |
≥ 1, divides |
— |
Attention heads |
|
int |
Yes |
≥ 1 |
— |
Retention heads for RetNet |
|
int |
Yes |
≥ 1 |
— |
MoE expert count |
|
int |
Yes |
≥ 1, ≤ |
— |
Top-k expert routing |
|
float |
Yes |
[0, 1] |
— |
Global dropout rate |
|
array[enum] |
Yes |
20 valid mixer codes |
— |
Ordered block list |
|
enum |
Yes |
|
— |
ODE integration method |
|
int |
Yes |
≥ 1 |
— |
ODE integration steps |
|
bool |
Yes |
— |
— |
Enable BitLinear path |
|
bool |
Yes |
— |
|
Also quantize routing/scoring projections |
|
bool |
Yes |
— |
|
Also quantize the embedding Conv1d (opt-in) |
|
enum |
Yes |
|
— |
Normalization strategy |
|
bool |
Yes |
— |
— |
Enable factorized embeddings |
|
int |
Yes |
≥ 1 |
— |
Reduced embedding dimension |
|
bool |
Yes |
— |
— |
Enable Conv1d over embeddings |
|
int |
Yes |
≥ 1 |
— |
Conv1d kernel size |
|
bool |
Yes |
— |
— |
Deprecated legacy HoPE flag |
|
bool |
Yes |
— |
— |
Enable MoE FFN routing |
|
int |
Yes |
≥ 1 |
— |
FFN intermediate width |
|
enum |
Yes |
|
— |
FFN non-linearity |
|
enum |
No |
|
— |
Attention masking mode |
|
enum |
No |
|
— |
Positional encoding for |
|
number |
No |
≥ 0 |
— |
HoPE base frequency |
|
number |
No |
≥ 0 |
— |
HoPE damping coefficient |
|
number |
No |
≥ 0 |
— |
RoPE base frequency |
|
number |
No |
≥ 0 |
— |
RoPE scaling factor |
|
bool |
No |
— |
— |
Enable MoD token routing |
|
number |
No |
(0, 1] |
— |
MoD token update fraction |
|
number |
No |
≥ 0 |
— |
MoD router aux loss weight |
|
int |
No |
≥ 2 |
— |
Max N-gram order for Engram |
|
int |
No |
≥ 1 |
— |
Hash heads per N-gram |
|
int |
No |
≥ 1 |
— |
Embed dim per hash head |
|
int |
No |
≥ 1 |
— |
ShortConv kernel width |
|
int |
No |
— |
— |
Hash seed |
Layer Pattern Valid Values
retnet, retnet_attn, mamba, ode, titan_attn, standard_attn, sigmoid_attn, sparse_transformer_attn, longformer_attn, bigbird_attn, sparsek_attn, nsa_attn, sparge_attn, fasa_attn, gla_attn, deltanet_attn, gated_deltanet_attn, hgrn2_attn, fox_attn, gated_softmax_attn, engram_attn
Normalization Valid Values
layer_norm, dynamic_tanh, derf, rms_norm, prms_norm
Training Fields
Field |
Type |
Required |
Range/Enum |
Default |
Description |
|---|---|---|---|---|---|
|
enum |
Yes |
|
— |
Training objective |
|
int |
No |
≥ 1 |
— |
Training epochs (MLM only) |
|
int |
No |
≥ 1 |
— |
Loader batch size |
|
int |
No |
≥ 0 |
— |
PyTorch dataloader workers |
|
int |
No |
≥ 1 |
— |
Sequence length cap |
|
float |
No |
[0, 1] |
— |
MLM masking probability |
|
int |
No |
≥ 1 |
— |
Maximum streamed samples |
|
int |
No |
≥ 1 |
— |
Internal streaming chunk size |
|
int |
No |
≥ 0 |
— |
Streaming dataset workers |
|
string |
No |
— |
— |
Dataset cache directory |
|
string |
No |
— |
— |
Local parquet path |
|
bool |
No |
— |
— |
Prefer local cache |
|
bool |
No |
— |
— |
Stream from local parquet |
|
int |
No |
≥ 0 |
— |
Join cached chunks to this length |
|
int |
No |
≥ 0 |
— |
Min tokens in last partial window |
|
bool |
No |
— |
— |
Mixed precision toggle |
|
int |
No |
≥ 1 |
— |
Effective batch multiplier |
|
int |
No |
≥ 1 |
— |
Scheduler horizon |
|
float |
No |
[0, 1] |
— |
Warmup ratio |
|
enum |
No |
|
— |
LR schedule type |
|
float |
No |
≥ 0 |
— |
Global norm clipping threshold |
|
float |
No |
≥ 0 |
— |
Post-clip explosion guard |
|
int |
No |
≥ 0 |
— |
NaN/Inf retry budget |
|
int |
No |
≥ 1 |
— |
Rolling checkpoint frequency |
|
int |
No |
≥ 1 |
— |
Rolling checkpoints to keep |
|
int |
No |
≥ 1 |
— |
Best checkpoints tracked |
|
int |
No |
≥ 1 |
— |
NaN/Inf check cadence |
|
bool |
No |
— |
— |
Enable gradient stats logging |
|
int |
No |
≥ 1 |
— |
Gradient logging cadence |
|
string |
No |
— |
— |
Step-level CSV output path |
|
bool |
No |
— |
— |
Rotate CSV on schema change |
|
enum |
No |
|
— |
GPU telemetry backend |
|
int |
No |
≥ 0 |
— |
NVML device index |
|
bool |
No |
— |
— |
Per-block gradient norm telemetry |
|
int |
No |
≥ 1 |
— |
Heavy telemetry interval |
|
bool |
No |
— |
— |
Enable GaLore strategy |
|
int |
No |
≥ 1 |
— |
GaLore low-rank projection dim |
|
int |
No |
≥ 1 |
— |
Projection refresh interval |
|
float |
No |
≥ 0 |
— |
Gradient scaling in projected space |
|
int |
No |
≥ 1 |
— |
Max tensor dim for GaLore projection |
Optimizer Fields
Field |
Type |
Required |
Description |
|---|---|---|---|
|
enum |
Yes |
One of 23 optimizer codes |
|
object |
Yes |
Prefixed hyperparameter groups |
Valid optimizer_class Values
sgd_momentum, adamw, adafactor, galore_adamw, prodigy, lion, sophia, muon, turbo_muon, radam, adan, adopt, ademamix, mars_adamw, cautious_adamw, lamb, schedulefree_adamw, shampoo, soap, anon, apollo, apollo_mini, q_apollo
Scheduler Types
Type |
Behavior |
|---|---|
|
Cosine decay from initial LR to near-zero over |
|
Fixed LR throughout training |
|
Linear warmup over |
GPU Metrics Backends
Backend |
Description |
|---|---|
|
NVIDIA Management Library — GPU temperature, utilization, memory |
|
Disable GPU telemetry |
SBERT Dataset Types
Type |
Description |
|---|---|
|
Sentence pairs with similarity scores (cosine regression) |
|
Anchor-positive-negative triplets for contrastive learning |
|
Question-answer pairs for semantic search training |
Critical Gotchas
``hidden_size`` must be divisible by ``num_heads`` — per-head dimension =
hidden_size / num_headsshould be ≥ 64.``norm_type`` accepts
layer_norm,dynamic_tanh,derf,rms_norm,prms_norm. When usingprms_norm, setprms_partial_ratio(default0.0625, range(0, 1]).``fasa_attn`` and ``sparge_attn`` are eval-only blocks. Training with either raises a runtime error.
Optimizer parameters use prefixed keys:
<optimizer_class>-<group>_<param>.``training.task`` is required (
mlmorsbert). Legacy top-level optimizer keys are not accepted.``model_class: frankensteindecoder`` forces
mode: decoderat runtime.``layer_pattern`` length must equal ``num_layers``.