MzModelV2
An experimental language model with modern architecture
2 min readupdated
MzModelV2 is a compact 110-million-parameter language model built from scratch using PyTorch and Hugging Face Transformers. It is designed to explore modern architectural improvements (such as RoPE and SwiGLU) and training on consumer hardware. The model targets researchers, developers, and enthusiasts studying how language models work.
Key features
- Modern architecture: Uses RoPE (rotary positional embeddings), RMSNorm, and SwiGLU activation.
- Efficiency: Trained on a single NVIDIA RTX 5060 Ti graphics card with 16 GB VRAM.
- Training from scratch: Pretraining was conducted on a structured Wikipedia dataset containing about 7.6 million articles.
- Optimization: Utilizes Scaled Dot Product Attention (SDPA) to speed up attention mechanisms.
What you can do
- Code study: Explore the implementation of modern Transformer improvements in a custom architecture.
- Experiments: Test text generation and the behavior of a compact model in a local laboratory setting.
- Comparison: Compare results with the first version of the model thanks to using the same tokenizer.
Example
The model is loaded via a custom architecture implementation for inference and text generation experiments within a 512-token context limit.
Read more
DetailsParameters: ~110M
Context: 512 tokens
Architecture: Decoder-only Transformer, hidden size 768, 12 layers and 12 attention heads
Hardware: NVIDIA RTX 5060 Ti (16 GB VRAM)
Limitations: The model is experimental in nature, with limited reasoning and generation capabilities compared to large LLMs.










Comments