Skip to content

qooba/bielik-anatomy-triton

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Bielik Anatomy - Building a Polish LLM from Scratch with Triton GPU Kernels

A hands-on video series where we implement the Polish language model Bielik 1.5B from scratch using custom GPU kernels written in Triton. Every component - from matrix multiplication to text generation - is built step by step, optimized, and benchmarked against PyTorch.

Model: Bielik-1.5B-v3.0-Instruct (1.6B parameters, Polish)


Series Overview

# Episode Key Result Doc
01 Introduction - Bielik Architecture and Triton Architecture overview, GQA, SwiGLU, why Triton link
02 Matmul - Heart of the Transformer Tiled matmul with Tensor Cores, matching PyTorch perf link
03 Fused kernels - RMSNorm & Softmax Fused single-pass RMSNorm and Softmax with causal mask link
04 RoPE RoPE - Rotary Position Embedding link
05 Flash Attention v2 Flash Attention link
06 SwiGLU FFN SwiGLU Feed Forward Network link

What You Will Learn

  • How transformers work at the GPU instruction level
  • Writing high-performance Triton kernels from scratch
  • Tiling, Tensor Cores, kernel fusion, auto-tuning

Prerequisites

  • Python and basic ML/neural network knowledge
  • General idea of how transformers work (helpful but not required)
  • An NVIDIA GPU with CUDA support

Project Structure

embers/
├── kernels/                 # Triton GPU kernels
│   ├── matmul/              #   Matrix multiplication variants
├── benchmarks/              # Performance benchmarks
│   ├── matmul/              #   Bechmarks for matmul kernels
└── docs/                    # Episodes docs

Getting Started

# Clone the repository
git clone https://github.com/qooba/bielik-anatomy-triton
cd bielik-anatomy-triton

# Install dependencies
pip install -r requirements.txt

About

No description, website, or topics provided.

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors