long-context

Extend transformer context windows using RoPE-based positional encoding scaling.

Updated Feb 15, 2026
One-click install
npx skills add https://github.com/ricable/mcai --skill long-context-ricable
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: long-context
Source: https://github.com/ricable/mcai/tree/main/.agents/skills/long-context
Command: npx skills add https://github.com/ricable/mcai --skill long-context-ricable

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps you extend transformer models beyond their original context limits so they can process long documents, long conversations, and other large inputs without losing positional coherence.

Core Features & Use Cases

  • RoPE Scaling: Apply rotary embedding extensions and scaling strategies to increase usable sequence length.
  • Context Extension Methods: Compare and implement YaRN, ALiBi, linear scaling, and position interpolation for different model families.
  • Fine-Tuning Guidance: Prepare long-document training data, configure efficient training runs, and evaluate long-context performance.
  • Use Case: Use this Skill when adapting a pretrained LLM from 2k tokens to 32k or more for research, retrieval, or production inference.

Quick Start

Ask the skill to extend a transformer’s context window using RoPE, YaRN, ALiBi, or position interpolation and to provide the matching fine-tuning and evaluation steps.

Frequently Asked Questions about long-context

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I extend a transformer model to a 128k context window?

To extend a transformer model to a 128k context window, apply positional encoding scaling techniques like YaRN, RoPE, or position interpolation. This requires configuring fine-tuning parameters and evaluating long-context performance to ensure positional coherence.

What is the difference between YaRN, ALiBi, and position interpolation for long-context adaptation?

YaRN, ALiBi, and position interpolation are distinct methods for scaling positional encodings in transformer models. Comparing these context extension methods helps determine the optimal strategy for adapting different model families to handle long-document inputs.

How do I prepare fine-tuning data for long-context model adaptation?

Preparing fine-tuning data for long-context model adaptation involves gathering long-document training inputs that exceed original token limits. You must configure efficient training runs to process these extended sequences while maintaining positional coherence.

Can I use RoPE scaling to increase usable sequence length without losing positional coherence?

Yes, RoPE scaling applies rotary embedding extensions and scaling strategies to increase usable sequence length. It enables transformer models to process long conversations and large inputs while maintaining positional coherence across extended token limits.

Does long-context model adaptation require specific positional encoding scaling for RoPE-based architectures?

Yes, long-context model adaptation for RoPE-based architectures explicitly requires positional encoding scaling. Methods like linear scaling and YaRN are necessary to achieve sequence-length extrapolation and adapt pretrained models to larger token limits.