What problem does it solve? Identifying which parts of a large language model encode language-specific versus shared linguistic knowledge requires manual hook instrumentation and ad-hoc analysis, which is slow and error-prone. ## Core Features & Use Cases - Core Region Extraction: Register forward/backward hooks on attention and MLP projections to compute activation-based importance scores and select top-percent core linguistic regions shared across languages. - Monolingual Region Detection: Compare per-language activation patterns against a reference language using Jaccard similarity to isolate language-specific dimensions. - Multilingual Data Preprocessing: Tokenize JSONL corpora with language-aware handling (Chinese, English, Arabic, Vietnamese) into binary training files with attention masks. - Use Case: A researcher studying multilingual LLaMA-2 runs the extractor on English, Chinese, and Arabic samples to find that Chinese has thousands of unique attention dimensions with low similarity to English, then validates region importance via perplexity perturbation. ## Quick Start Extract the core and monolingual linguistic regions from my multilingual text samples using the linguistic region analysis scripts.