liger-autopatch

Official

Automate Liger Kernel patching for HuggingFace models

Authorlinkedin
Version1.0.0
Installs0

System Documentation

What problem does it solve?

This Skill streamlines the complex, error-prone work of adding or updating Liger Kernel support for HuggingFace Transformers models by analyzing model code, generating lce_forward implementations and monkey-patch functions, updating tests and README entries, and validating changes with test runs and human checkpoints.

Core Features & Use Cases

  • Model Analysis: Reads modeling_*.py and produces a detailed model profile guided by a 12-question decision matrix to determine norms, MLP types, RoPE variant, MoE structure, and other architecture details.
  • Code Generation: Produces or modifies lce_forward files, monkey_patch registrations, init exports, output classes, convergence test entries, revert helpers, and README patching table entries using templates and reference implementations.
  • Validation Pipeline: Runs instance patching tests, convergence tests, lint/checkstyle, and retry logic with mandatory human checkpoints between Analyze → Generate → Validate stages, supporting both create and modify workflows.
  • Use Cases: Add a new model to Liger Kernel, extend existing kernel mappings, fix instance-level patching bugs, update patches for upstream HF changes, or add new kernels/activations/norm variants.

Quick Start

Run the liger-autopatch pipeline to analyze the target HuggingFace model, generate or modify the lce_forward and monkey-patch code, and validate the changes with instance and convergence tests while reviewing the human checkpoints.

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: liger-autopatch
Download link: https://github.com/linkedin/Liger-Kernel/archive/main.zip#liger-autopatch

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.