{"categories":[{"label":"Artificial Intelligence","url":"https://skillfed.io/packages/category/scientific-engineering-artificial-intelligence/4"}],"enrichment":{"capability":"Implements rotary positional embeddings for transformer attention layers in PyTorch, enabling efficient encoding of absolute and relative position information along any tensor axis.","skillfed_tags":["transformers","positional-encoding","attention-mechanism"],"use_cases":["Adding rotary positional encoding to standard transformer attention layers during training and inference.","Extending transformer context length beyond training sequence length using XPos or interpolation techniques.","Implementing multi-dimensional positional embeddings for video or image transformers using axial rotary embeddings.","Optimizing attention computation with fused Flash Attention kernels that incorporate rotary embeddings.","Fine-tuning pretrained models to handle longer sequences via position interpolation."],"what_it_does":"Rotary Embedding Torch is a standalone library that adds rotary positional embeddings (RoPE) to transformer attention mechanisms in PyTorch. It provides efficient methods to encode position information by rotating query and key tensors, supporting both fixed and learned positional encodings along any tensor axis. The library implements several variants including standard rotary embeddings, axial embeddings for multi-dimensional data like video, length-extrapolatable embeddings (XPos) for handling sequences longer than training length, and fused Flash Attention kernels that compute attention with rotary embeddings in a single pass.\n\nThe package depends on torch and einops for tensor operations and is designed to integrate directly into transformer implementations at the attention layer level. It supports inference optimizations like key-value cache handling and includes options for sequence position interpolation to extend context windows. The library is actively maintained and carries no known security vulnerabilities.","worth_installing":"Yes. The package is actively maintained, has low install friction, carries no known vulnerabilities, and provides a well-documented implementation of a proven positional encoding technique. It is suitable for production transformer projects that need rotary embeddings or their variants, particularly when extending context length or working with multi-dimensional data."},"id":"rotary-embedding-torch","links":{"html":"https://skillfed.io/packages/rotary-embedding-torch","md":"https://skillfed.io/packages/rotary-embedding-torch.md","pypi":"https://pypi.org/project/rotary-embedding-torch/"},"maintenance":{"status":"active"},"meta":{"latest_release":"2026-06-20","license_spdx":null,"license_treatment":"permissive","name":"rotary-embedding-torch","python_support":"supports_current","summary":"Rotary Embedding - Pytorch"},"popularity":{"monthly_downloads":714094,"position":5249,"tier":"top_15000"},"security":{"n_vulnerabilities":0},"version":"0.9.1"}
