# JIA-Lab-research/LongLoRA

Code and documents of LongLoRA and LongAlpaca (ICLR 2024 Oral)

Repository: https://github.com/JIA-Lab-research/LongLoRA
Canonical: https://ross.abutalabs.com/products/longlora
Homepage: http://arxiv.org/abs/2309.12307
Language: Python
License: Apache-2.0
License Family: permissive
Topics: fine-tuning-llm, large-language-models, long-context, llm, lora
Last push: 2024-08-14T12:48:54+00:00

## Health v2 (maintenance only)
Score: 27/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 0, release rhythm 35, longevity 76
- inputs: {"age_days": 1077, "days_push": 749, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 2686, forks 281 (observed 2026-08-28T04:07:10.282999+00:00)

## What it is
LongLoRA is an efficient fine-tuning approach and codebase that extends the context length of pre-trained LLMs (Llama2 7B/13B/70B) using shifted sparse attention and an improved LoRA method. It also ships LongAlpaca, a set of long-context instruction-following models and the LongAlpaca-12k training dataset.

## Use cases
- extend llama2 context length beyond 8k tokens
- fine-tune an llm on long documents cheaply
- train a long-context chat model with lora
- reduce gpu memory when fine-tuning long-context models
- get a model that answers questions about long pdfs
- evaluate long-context models on LongBench and L-Eval

## When to choose
- you need to extend an open LLM's context window with limited GPU budget
- you want LoRA/QLoRA fine-tuning for long-context instruction data
- you want ready-made long-context models and datasets as a starting point

## When to avoid
- you need production long-context inference rather than training
- your model is not a Llama-family architecture
- you need actively maintained tooling - the repo's last release was mid-2024

## Facets
- artifact type: library
- maturity: maintenance
- function: llm-training, machine-learning, deep-learning
- domain: large-language-models, machine-learning, deep-learning
- platform: python
- tags: lora, fine-tuning, long-context, shifted-sparse-attention, llama2, qlora, iclr-2024, gpu, linux

## Member repositories
- JIA-Lab-research/LongLoRA (main) score 27

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:07:10.282999+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T02:17:46.908411+00:00, confidence not recorded.
  - readme: https://github.com/JIA-Lab-research/LongLoRA (fetched 2026-08-28T04:07:10.282999+00:00, sha 7de968886fe2)
  - homepage: http://arxiv.org/abs/2309.12307 (fetched 2026-08-29T09:59:53.869336+00:00, sha 4e26ca6fcfed)
  - site_page: https://info.arxiv.org/about/donate.html (fetched 2026-08-29T09:59:53.887844+00:00, sha cca9c3a11c56)
  - site_page: https://info.arxiv.org/about/ourmembers.html (fetched 2026-08-29T09:59:53.891635+00:00, sha 47cbc55ff1de)
  - site_page: https://info.arxiv.org/about (fetched 2026-08-29T09:59:53.893476+00:00, sha a1f16f915a9a)
  - site_page: https://info.arxiv.org/labs/index.html (fetched 2026-08-29T09:59:53.889763+00:00, sha b14a8d05a0ec)
- Data as of 2026-08-30T08:39:29.467469+00:00.
