Downloads · 30 days
12
60% of all-time downloads
onlyaady/SSA-Llama-3.1-8B-Instruct
SSA-Llama-3.1-8B-Instruct is a text generation model from onlyaady. Use it when you need the model to write or continue text. It is set up for peft. The card lists the license as apache-2.0.
Llama 3.1 8B Instruct with content-adaptive sparse attention for efficient long-context inference.
Downloads · 30 days
12
60% of all-time downloads
All-time downloads
20
Public
Repo size
59.3 MB
Likes
1
Public
Click a slice to open those files.
.safetensors59.3 MB · 100%
From the Hugging Face model README
Llama 3.1 8B Instruct with content-adaptive sparse attention for efficient long-context inference.
SSA dynamically selects relevant regions of long context instead of requiring selected attention layers to attend densely across the entire sequence.
The goal is simple:
Preserve long-context capability while making attention increasingly efficient as context grows.
This repository contains the primary SSA-Llama-3.1-8B-Instruct checkpoint trained in the SSA research.
Using the current SSA sparse-attention backend:
| Context | Single-Fact NLL | Multi-Fact NLL |
|---|---|---|
| 16K | 0.00001 | 0.00006 |
| 32K | 0.00005 | 0.00114 |
| 48K | 0.00026 | 0.00237 |
| 64K | 0.00015 | 0.06979 |
First-answer-token Top-1 remained 100% across all of these diagnostic cases.
Single-fact retrieval remained extremely strong through 64K. Multi-fact retrieval was also strong through 48K, with increased difficulty appearing at 64K.
These numbers are controlled teacher-forced retrieval diagnostics. Autoregressive Needle-in-a-Haystack results will be added separately after evaluation is complete.
Standard dense causal attention becomes increasingly expensive as context grows.
SSA limits the amount of historical context processed by its sparse attention layers while still selecting information based on content.
Conceptually:
Long Context
↓
Find Relevant Historical Regions
↓
Local Context + Selected Context
↓
Sparse Attention
↓
Generation
For the currently evaluated configuration, the nominal semantic attention support is approximately 8,196 keys per query.
The ideal semantic QK/PV arithmetic reduction grows rapidly with context length:
| Context | Dense causal avg. keys/query | SSA fanout cap | Attention arithmetic reduction | QK/PV work saved |
|---|---|---|---|---|
| 32K | 16,384 | 8,196 | 2.00× | 50.0% |
| 64K | 32,768 | 8,196 | 4.00× | 75.0% |
| 128K | 65,536 | 8,196 | 8.00× | 87.5% |
| 256K | 131,072 | 8,196 | 15.99× | 93.75% |
| 512K | 262,144 | 8,196 | 31.98× | 96.87% |
| 1M | ~500,000 | 8,196 | 61.01× | 98.36% |
These numbers represent semantic attention arithmetic, not total model FLOPs or end-to-end speedup.
The custom SSA attention operator shows increasing benefit as context grows:
| Context | Relative operator speed |
|---|---|
| 64K | ~1.0× |
| 128K | ~1.9× |
| 256K | ~3.7× |
| 512K | ~7.3× |
| 1M | ~14.2× |
The important distinction is that these are attention-operator measurements, not end-to-end LLM speedups.
The results show the central systems motivation behind SSA: sparse attention becomes increasingly valuable as context length grows.
onlyaady/SSA-Llama-3.1-8B-Instructmeta-llama/Llama-3.1-8B-InstructThis repository currently contains the trained PEFT checkpoint.
SSA also relies on a custom sparse-attention runtime. Loading this adapter through a standard Transformers pipeline alone will not reproduce the sparse-attention behavior or performance measurements above.
A reproducible inference/runtime package will be released separately.
This checkpoint is currently intended for research in:
SSA is in active research.
A few important limitations remain:
This checkpoint should currently be treated as a research release rather than a production replacement for standard Llama 3.1 inference.
This model is part of my research project.
Manuscript in preparation.
@misc{jallu2026ssa,
title = {Sub-Quadratic Sparse Attention (SSA) for Long-Context LLMs},
author = {Jallu, Hrudayaditya},
year = {2026},
note = {Manuscript in preparation}
}
Mail - [email protected]