Can Custom Models Learn In-Context? An Exploration of Hybrid Architecture Performance on In-Context Learning Tasks
On the map: State-space sequence models (S4, Mamba) → Core SSM architectures for language
Abstract (arXiv)
In-Context Learning (ICL) is a phenomenon where task learning occurs through a prompt sequence without the necessity of parameter updates. ICL in Multi-Headed Attention (MHA) with absolute positional embedding has been the focus of more study than other sequence model varieties. We examine implications of architectural differences between GPT-2 and LLaMa as well as LlaMa and Mamba. We extend work done by Garg et al. (2022) and Park et al. (2024) to GPT-2/LLaMa hybrid and LLaMa/Mamba hybrid models - examining the interplay between sequence transformation blocks and regressive performance in-context. We note that certain architectural changes cause degraded training efficiency/ICL accuracy by converging to suboptimal predictors or converging slower. We also find certain hybrids showing optimistic performance improvements, informing potential future ICL-focused architecture modifications. Additionally, we propose the "ICL regression score", a scalar metric describing a model's whole performance on a specific task. Compute limitations impose restrictions on our architecture-space, training duration, number of training runs, function class complexity, and benchmark complexity. To foster reproducible and extensible research, we provide a typed, modular, and extensible Python package on which we run all experiments.
Key facts. No citing papers in the map yet (data through 14 Oct 2026). Placed in Core SSM architectures for language, one of 10 directions in State-space sequence models (S4, Mamba). Builds on 25 of its 34 references that are in the map. First posted on arXiv 6 Nov 2024.
Builds on
25 of 34 references.
Closest ancestors · 1
Same direction, newest first
Other references · 24
- 2017Attention Is All You Needcited by 60,361
- 2020Language Models are Few-Shot Learnerscited by 32,419
- 2022Training language models to follow instructions with human feedbackcited by 15,971
- 2021RoFormer: Enhanced Transformer with Rotary Position Embeddingcited by 4,703
- 2023FlashAttention-2: Faster Attention with Better Parallelism and Work Partitioningcited by 2,598
- 2021Decision Transformer: Reinforcement Learning via Sequence Modelingcited by 1,546
- 2019Root Mean Square Layer Normalizationcited by 1,480
- 2022Rethinking the Role of Demonstrations: What Makes In-Context Learning Work?cited by 1,434
- 2021What Makes Good In-Context Examples for GPT-3?cited by 1,195
- 2022In-context Learning and Induction Headscited by 964
- 2021An Explanation of In-context Learning as Implicit Bayesian Inferencecited by 938
- 2022What Can Transformers Learn In-Context? A Case Study of Simple Function Classescited by 715
12 more
- 2022What learning algorithm is in-context learning? Investigations with linear modelscited by 684
- 2023Larger language models do in-context learning differentlycited by 394
- 2023Function Vectors in Large Language Modelscited by 308
- 2023Transformers as Statisticians: Provable In-Context Learning with In-Context Algorithm Selectioncited by 298
- 2023The Learnability of In-Context Learningcited by 127
- 2024In-Context Language Learning: Architectures and Algorithmscited by 89
- 2023The Transient Nature of Emergent In-Context Learning in Transformerscited by 76
- 2023Exposing Attention Glitches with Flip-Flop Language Modelingcited by 75
- 2023How Do Transformers Learn In-Context Beyond Simple Functions? A Case Study on Learning with Representationscited by 75
- 2023A Closer Look at In-Context Learning under Distribution Shiftscited by 25
- 2023Is attention required for ICL? Exploring the Relationship Between Model Architecture and In-Context Learning Abilitycited by 17
- 2023The ICL Consistency Testcited by 6
Built on by
Not cited yet.
Similar, not cited
Close in wording, no citation either way
- 2025Probing In-Context Learning: Impact of Task Complexity and Model Architecture on Generalization and Efficiency
- 2025Understanding In-Context Learning Beyond Transformers: An Investigation of State Space and Hybrid Architectures
- 2025From Compression to Expression: A Layerwise Analysis of In-Context Learning
- 2025Is In-Context Learning Learning?
- 2024Benchmarking General-Purpose In-Context Learning
- 2024Context-Scaling versus Task-Scaling in In-Context Learning
- 2024Does In-Context Learning Really Learn? Rethinking How Large Language Models Respond and Solve Tasks via In-Context Learning
- 2025What do vision-language models see in the context? Investigating multimodal in-context learning