Skip to content

SauersML/rustformer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🦀 Rustformer

Rust

A minimalist implementation of a transformer model in pure Rust, built from scratch without external dependencies.

🌟 Features

  • 🧠 Transformer architecture implementation
  • 🔤 Custom tokenizer
  • 📊 Matrix operations
  • 🔢 Embedding layer
  • 🎭 Multi-head attention mechanism
  • 🔀 Feed-forward networks
  • 📏 Layer normalization
  • 🌡️ Temperature-controlled text generation

🚀 Getting Started

  1. Clone the repository
  2. Place your training text in the project root
  3. Run the project:
cargo run --release

🛠️ Implementation Details

Rustformer includes:

  • Basic matrix operations
  • Tokenization of input text
  • Embedding layer
  • Positional encoding
  • Multi-head attention mechanism
  • Feed-forward networks
  • Layer normalization
  • Training loop
  • Text generation with temperature sampling

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors