In developmentMoroLM-56M is a research base model, not a chatbot. Things here change often.See what changed
MoroLM
Home / Docs / Architecture

Architecture

The 56.6M Llama-like model architecture and the planned local inference stack.

Work in progress: this page describes MoroLM-56M v0.6 and will change as the project moves.

Model architecture#

ComponentValue
ArchitectureLlama-compatible decoder-only Transformer
Parameters56,607,232
Vocabulary24,000
Hidden size512
Intermediate size1,376
Layers16
Attention heads8
KV heads2 (GQA)
Maximum positions4,096
Position encodingRoPE, θ = 10,000
NormalizationRMSNorm, ε = 1e-5
MLPSwiGLU / SiLU
EmbeddingsTied input/output embeddings
Dropout0.0

Attention path#

The implementation uses grouped-query attention: eight query heads and two key/value heads, with KV repetition across query groups. PyTorch scaled dot-product attention runs with causal masking enabled.

End-to-end system map#

Browser UIchat + tools
Go backendAPI + memory
llama.cpplocal server
GGUFquantized model
MoroLMlocal inference
SQLiteapp memory
Browserstreamed output

Training loss alignment#

def forward(self, input_ids, labels=None):
    logits = self.lm_head(self.model(input_ids))
    if labels is not None:
        loss = F.cross_entropy(
            logits[:, :-1].reshape(-1, logits.size(-1)),
            labels[:, 1:].reshape(-1),
            ignore_index=-100,
        )

The model performs the causal shift internally. Therefore base-training datasets must return labels aligned to the same token positions as the input.

↑ ↓ to move · Enter to open · Esc to close