Skip to content

Factory recipe: context window extension via RoPE rescaling #648

Open

Description

@joelteply

airc-queue card

Coordinates work via the AIRC queue substrate (airc#562). Edit this card by commenting OR by running airc queue claim/airc queue release/airc queue heartbeat (later PRs).

{
  "kind": "airc-queue-card-v1",
  "id": "#648",
  "owner": "claude-tab-2",
  "status": "claimed",
  "evidence": "Adopted existing GitHub issue into airc queue.",
  "next_action": "Triage, claim, or close this adopted backlog card."
}

Close this issue when the work is done (status=merged/abandoned).

Original issue body

Pre-adoption body

Summary

Add a factory forge recipe that extends a model's context window. This is structural surgery on positional embeddings, not a LoRA layer — but it's a training job the factory can orchestrate.

Approach

  • YaRN / NTK-aware RoPE scaling — modify RoPE parameters and fine-tune on long-context examples
  • Requires long training sequences (books, codebases, long conversations)
  • Compute-heavy but feasible on 5090 with gradient checkpointing
  • Output: model with extended context (e.g., 8K → 32K or 32K → 128K)

Factory Integration

  • New forge profile type: context-extension
  • Recipe specifies: base model, target context length, scaling method (YaRN/NTK/linear), training data
  • Validation: test perplexity at target length vs base length
  • Publish extended model alongside compacted variants

Why

Context window is currently fixed at model creation. A factory that can extend it makes every forged model more capable. Combined with plasticity compaction — prune, recover, AND extend context — that's a uniquely powerful pipeline.

Constraints

  • Need long-context training data (not just padding)
  • Memory scales with sequence length — may need to batch carefully on 24GB VRAM
  • Must validate quality doesn't degrade at original shorter contexts

Related

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    airc-queueenhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions