Long Context
Extend transformer context windows with RoPE, YaRN, ALiBi, and position interpolation techniques.
- CCM score
- 59 of 100
- skills.sh installs
- 1.1K
- GitHub stars
- 14.9K
- last updated
- Aug 21, 2026
Own this skill? Claim it
What it does
- Covers rotary embeddings, attention biases, interpolation methods, and extrapolation strategies for long-document LLM processing
- Includes runnable PyTorch sketches for
RotaryEmbedding,apply_rotary_pos_emb,get_alibi_slopes, andcreate_alibi_bias - Shows a LLaMA position-interpolation setup via
rope_scalingwith linear and dynamic factors, plus a method comparison table - Designed for extending pre-trained models beyond original context limits, or for training models with length extrapolation
Install
$ npx -y skills add orchestra-research/ai-research-skills --skill long-context -yInstalls into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.
Files
Long Context: Extending Transformer Context Windows
When to Use This Skill
Use Long Context techniques when you need to:
- Process long documents (32k, 64k, 128k+ tokens) with transformer models
- Extend context windows of pre-trained models (LLaMA, Mistral, etc.)
- Implement efficient positional encodings (RoPE, ALiBi)
- Train models with length extrapolation capabilities
- Deploy models that handle variable-length inputs efficiently
- Fine-tune existing models for longer contexts with minimal compute
Key Techniques: RoPE (Rotary Position Embeddings), YaRN, ALiBi (Attention with Linear Biases), Position Interpolation
Papers: RoFormer (arXiv 2104.09864), YaRN (arXiv 2309.00071), ALiBi (arXiv 2108.12409), Position Interpolation (arXiv 2306.15595)
Installation
# HuggingFace Transformers (includes RoPE, YaRN support)
pip install transformers torch
# For custom implementations
pip install einops # Tensor operations
pip install rotary-embedding-torch # Standalone RoPE
# Optional: FlashAttention for efficiency
pip install flash-attn --no-build-isolation
Quick Start
RoPE (Rotary Position Embeddings)
Details
- Repository
- github.com/orchestra-research/ai-research-skills
- Categories
- AI Agents & LLM Apps, Data Science & Analytics
- First seen
- Jun 3, 2026
Questions
What is long-context?
long-context is an agent skill listed on Claude Marketplaces in the AI Agents & LLM Apps category. The listing describes long-context like this: Extend context windows of transformer models using RoPE, YaRN, ALiBi, and position interpolation techniques.
How do I install long-context?
Run npx -y skills add orchestra-research/ai-research-skills --skill long-context -y in a project to install long-context. After that, the agent can use long-context in that project.
Which category is long-context in?
long-context is in the AI Agents & LLM Apps category on Claude Marketplaces. Other listings in that category next to long-context include microsoft-foundry, azure-ai and google-agents-cli-adk-code.
Where is the source code of long-context?
The source code of long-context is on GitHub at https://github.com/orchestra-research/ai-research-skills. The orchestra-research account on GitHub publishes long-context.
More from orchestra-research/ai-research-skills
All 92- Presenting Conference Talks1.1K
- Speculative Decoding1.1K
- Hqq Quantization1.1K
- Model Merging1.1K
- Moe Training1.1K
- Sglang1.1K
- Chroma1.1K
- Nemo Curator1.1K
- Llama Factory1.1K
- Pyvene Interventions1.1K
- Gptq1.1K
- Model Pruning1.1K
- Sentencepiece1.1K
- Evaluating Code Models1.1K
- Distributed Llm Pretraining Torchtitan1.1K
- Mamba Architecture1.1K
- Openrlhf Training1.1K
- Sparse Autoencoder Training1.1K
- Llamaindex1.1K
- Ml Training Recipes1.1K
- Outlines1.1K
- Simpo Training1.1K
- Slime Rl Training1.1K
- Training Llms Megatron1.1K
Similar to Long Context
More AI Agents & LLM Appssparse-autoencoder-trainingorchestra-research/ai-research-skills1.1K installsTraining and analyzing sparse autoencoders with SAELens to find interpretable features in language model activations.
model-mergingorchestra-research/ai-research-skills1.1K installsMerge fine-tuned LLMs with mergekit (SLERP, TIES, DARE, task arithmetic) to combine capabilities without retraining.
context-window-managementdavila7/claude-code-templates590 installsStrategies for managing LLM context windows through summarization, trimming, routing, and avoiding context rot.
llm-app-patternsdavila7/claude-code-templates326 installsProduction-ready LLM app patterns covering RAG pipelines, agent architectures, and LLMOps observability.
embedding-strategieswshobson/agents12.1K installsGuide for choosing and tuning embedding models and chunking strategies in semantic search and RAG pipelines.
llm-fine-tuning-guideqodex-ai/ai-agent-skills198 installsPractical guide to fine-tuning LLMs covering full tuning, LoRA, QLoRA, and domain-specific data preparation.