// momentum

tracking since W48

// why it's here

  • Active: last commit today
  • Built almost entirely by one person
  • Health 92/100 with only 6 stars

// how to help

// readme

PrimeAttention.jl

A sparse, number-theoretic attention mechanism library for Lux.

Julia 1.11 required, 1.12 or higher recommended.

Overview

PrimeAttention.jl provides sparse attention layers that leverage number-theoretic sequences to define connectivity patterns. By using mathematical sequences instead of dense matrices or random sparsity, these layers achieve long-range dependencies with significantly lower computational complexity than standard $O(N^2)$ Transformers.

Inspired by architectures like BigBird, this package implements a hybrid mechanism that combines three strategies:

  1. Global Tokens: For sequence-wide context summaries.
  2. Sliding Window: For local syntax and immediate context.
  3. Theoretic Intervals: Sparse long-range connections based on Primes, Squares, or the Mian-Chowla sequence.

Usage

The package provides factory functions that return a SparseIndexAttention layer. Because this library is built on Lux.jl, it utilizes explicit parameter and state management.

Here is a simple example:

Read the full README on GitHub โ†—

Health score

Is the project alive and maintained right now? A 0โ€“100 pulse recomputed nightly from commit recency, rhythm, how fast issues close, and how quickly PRs get merged.

How it's calculated

Undervalued score

Activity relative to attention (stars + watchers). Above 50 means a lot of activity for a project its size. Recomputed nightly from commit velocity, contributor effort, issue resolution, fork utility, release cadence, and project maturity โ€” divided by a logarithmic reach factor.

How it's calculated

Tags

Tags are independent behavioral signals computed nightly. A project can hold multiple at once. They drive the home page sections.

How it's calculated