For rotary positional embeddings, the first results are naklecha/llama3-from-scratch (This repository provides a manual implementation of transformer architecture components from scratch in PyTorch, featuring built-in rotary positional embeddings and multi-head attention mechanisms as part of its educational codebase), skyzh/tiny-llm (This repository provides a transformer model and inference engine implementation that includes rotary positional embeddings and multi-head attention mechanisms, though it is primarily designed as a complete serving runtime rather than a standalone library) and lucidrains/x-transformers (This PyTorch library provides a modular toolkit for building transformer architectures and includes an implementation of rotary positional embedding among its various advanced attention mechanisms). pageman/sutskever-30-implementations and jingyaogong/minimind round out the shortlist. Compare the match explanations and check the project documentation against your requirements.
Explore top open-source rotary positional embeddings libraries for LLMs, ranked by GitHub stars and activity, and find the right fit.
This project is a manual reconstruction of the Llama 3 transformer architecture implemented as a PyTorch neural network. It serves as a reference for the internal mathematical structure and tensor flow of a transformer-based language model designed for next token prediction. The implementation focuses on building the model from scratch using basic matrix operations and tensor manipulations. It demonstrates the manual construction of core components, including rotary positional embeddings, multi-head self-attention, and root mean square normalization. The codebase covers the full inference pi
This repository provides a manual implementation of transformer architecture components from scratch in PyTorch, featuring built-in rotary positional embeddings and multi-head attention mechanisms as part of its educational codebase.
tiny-llm is a large language model inference engine and transformer model implementation. It serves as a quantized model runtime and paged key-value cache manager, providing a specialized inference stack optimized for Apple Silicon. The system distinguishes itself through high-throughput execution techniques, including continuous batching and paged attention. It utilizes a paged memory system to eliminate fragmentation during token generation and employs on-the-fly dequantization of compressed weights to reduce the memory footprint during matrix multiplication. The project covers a broad ran
This repository provides a transformer model and inference engine implementation that includes rotary positional embeddings and multi-head attention mechanisms, though it is primarily designed as a complete serving runtime rather than a standalone library.
x-transformers is a PyTorch library and research toolkit for building transformer architectures. It provides a modular framework for implementing experimental transformer research, including a suite of advanced attention mechanisms, long-sequence modeling tools, and a framework for vision transformers. The project is distinguished by its focus on memory-efficient and high-performance components, such as Flash Attention with tiled kernels and multi-query attention. It also implements specialized methods for extending context windows, including sequence recurrence and rotary positional embeddin
This PyTorch library provides a modular toolkit for building transformer architectures and includes an implementation of rotary positional embedding among its various advanced attention mechanisms.
This project is a collection of deep learning research implementations and a reproduction kit designed to translate theoretical AI papers into working code. It provides a library of neural network architectures and reference implementations for reproducing seminal research concepts through interactive notebooks. The repository distinguishes itself through the implementation of AI theory and scaling laws, covering complexity dynamics, information theory, and the simulation of universal AI agents. It also includes a benchmarking suite for synthetic reasoning, allowing for the evaluation of mode
This repository provides a collection of deep learning research implementations in PyTorch, which can serve as a reference for constructing transformer components like positional embeddings, though it is a broader reproduction kit rather than a dedicated library solely for rotary position embedding.
This project is a comprehensive framework for the entire lifecycle of transformer-based language models, supporting everything from foundational pretraining to specialized deployment. It provides a modular toolkit for defining neural network architectures, managing data preparation pipelines, and executing training routines across various scales. The framework is designed to handle the full model development process, including supervised fine-tuning, behavioral alignment, and the integration of agentic capabilities. What distinguishes this framework is its focus on efficient training and adva
This repository provides a modular framework for building and training language models, which includes implementations of positional embedding techniques like Rotary Position Embedding as part of its model architecture definitions.
This project is a PyTorch implementation of an attention-based neural network designed for sequence-to-sequence deep learning tasks. It serves as a library for constructing deep learning sequence models that utilize encoder and decoder structures to process natural language and sequential data. The implementation centers on a multi-head attention mechanism to capture diverse relationships between tokens without using recurrence. It includes sinusoidal positional encoding to maintain sequence order and point-wise feed-forward networks to transform token positions independently. The architectu
This repository implements a transformer using traditional sinusoidal positional encodings rather than the requested Rotary Position Embedding mechanism.
This is a PyTorch deep learning implementation for training transformer-based language models. It functions as a distributed GPU trainer and framework designed to optimize text prediction models for increased speed and sample efficiency. The project is distinguished by its use of the Newton-Schulz weight optimizer. This method applies an iterative process to maintain semi-orthogonal parameter updates and weight matrices, which improves sample efficiency and reduces memory overhead during the training process. The framework covers broad capabilities in distributed GPU computing, including dat
This repository is a transformer training framework rather than a dedicated Rotary Position Embedding implementation library, meaning it includes general language model training utilities rather than the specific positional encoding module requested.
This project is a PyTorch-based computer vision library and deep learning image processing framework. It provides a collection of neural network architectures designed for visual analysis tasks, specifically focusing on image classification, object detection, and semantic segmentation. The toolset implements diverse methodologies for visual recognition, including anchor-free object detection, regional proposal networks, and heatmap-based keypoint estimation. It utilizes both convolutional neural networks for spatial feature extraction and transformer-based self-attention mechanisms to compute
This project is a computer vision and deep learning library that includes generic self-attention mechanisms, but it does not provide specific implementations or utilities for Rotary Position Embedding (RoPE) as requested.
This project is a generative AI educational resource and natural language processing course. It serves as a technical implementation guide for building, pre-training, and fine-tuning a large language model from scratch using PyTorch. The curriculum provides a step-by-step tutorial on large language model development, focusing specifically on the design of transformer-based text generation models. It includes dedicated instruction on parameter-efficient fine-tuning to optimize training by updating only a small subset of model weights. The material covers the end-to-end generative AI training
This educational repository provides tutorials and guides for building transformer models from scratch using PyTorch, but it does not specifically supply a dedicated implementation or library for Rotary Position Embedding (RoPE).
LeetCUDA is a collection of high-performance GPU kernel libraries focusing on memory optimization, activation functions, and attention mechanisms. It serves as a reference library for CUDA kernel implementations, ranging from basic element-wise operations to complex neural network components, and provides Python bindings to integrate these kernels into deep learning workflows. The project is distinguished by its focus on low-level hardware optimizations. This includes the use of tensor cores for half-precision matrix multiplication, asynchronous data pipelining with double buffering, and shar
LeetCUDA provides high-performance GPU kernel libraries and attention mechanisms, but it does not implement Rotary Position Embedding (RoPE) specifically.
The Annotated Transformer is an educational resource that provides annotated code implementations of the Transformer architecture for sequence-to-sequence tasks, built with PyTorch. It serves as a learning tool for understanding attention mechanisms, multi-head parallel attention, and scaled dot-product attention through executable examples that walk through each component of the model. The project covers the full Transformer pipeline, including stacked encoder-decoder layers with residual connections and layer normalization, sinusoidal positional encoding for order-aware representation, and
The repository provides an educational PyTorch implementation of the classic Transformer architecture with standard sinusoidal positional encodings, but it does not implement Rotary Position Embedding (RoPE) or its optimized variants.
| Repository | Stars | Language | License | Last push |
|---|---|---|---|---|
| naklecha/llama3-from-scratch | 15.2K | Jupyter Notebook | MIT | |
| skyzh/tiny-llm | 4.3K | Python | Apache-2.0 | |
| lucidrains/x-transformers | 5.9K | Python | MIT | |
| pageman/sutskever-30-implementations | 3.1K | Jupyter Notebook | — | |
| jingyaogong/minimind | 51.8K | Python | Apache-2.0 | |
| hyunwoongko/transformer | 4.6K | Python | — | |
| kellerjordan/modded-nanogpt | 5.4K | Python | MIT | |
| wzmiaomiao/deep-learning-for-image-processing | 26.3K | Python | GPL-3.0 | |
| skindhu/build-a-large-language-model-cn | 3.2K | HTML | other | |
| xlite-dev/leetcuda | 9.7K | Cuda | gpl-3.0 |