GPT-2

  • Adaptive Compute for Test-Time Training with PonderTTT


    I implemented Adaptive Compute for TTT (Test-Time Training) - PonderTTT (Paper & Code)PonderTTT introduces an adaptive compute strategy for Test-Time Training (TTT) in language models, where the computational effort is adjusted based on task complexity. By using the TTT layer's self-supervised reconstruction loss, the model decides whether to update its weights—high loss indicates difficulty and prompts an update, while low loss suggests confidence and skips the update. This method, tested on GPT-2 models ranging from 124M to 1.5B parameters, requires no additional training beyond setting a threshold and using Exponential Moving Average (EMA). Although current testing focuses on perplexity, future work aims to expand to generation benchmarks, with ongoing efforts to scale up experiments using TPU. This approach matters as it aims to optimize computational resources, making language models more efficient and potentially more effective at handling diverse tasks.

    Read Full Article: Adaptive Compute for Test-Time Training with PonderTTT

  • Temporal LoRA: Dynamic Adapter Router for GPT-2


    [Experimental] "Temporal LoRA": A dynamic adapter router that switches context (Code vs. Lit) with 100% accuracy. Proof of concept on GPT-2.Temporal LoRA introduces a dynamic adapter router that allows models to switch between different contexts, such as coding and literature, with 100% accuracy. By training distinct LoRA adapters for different styles and implementing a "Time Mixer" network, the system can dynamically activate the appropriate adapter based on input context, maintaining model stability while allowing for flexible task switching. This approach provides a promising method for integrating Mixture of Experts (MoE) in larger models without the need for extensive retraining, enabling seamless "hot-swapping" of skills and enhancing multi-tasking capabilities. This matters because it offers a scalable solution for improving AI model adaptability and efficiency in handling diverse tasks.

    Read Full Article: Temporal LoRA: Dynamic Adapter Router for GPT-2

  • Evaluating Perplexity on Language Models


    Evaluating Perplexity on Language ModelsPerplexity is a crucial metric for evaluating language models, as it measures how well a model predicts a sequence of text by assessing its uncertainty about the next token. Defined mathematically as the inverse of the geometric mean of the token probabilities, perplexity provides insight into a model's predictive accuracy, with lower values indicating better performance. The metric is sensitive to vocabulary size, meaning it can vary significantly between models with different architectures. Using the HellaSwag dataset, which includes context and multiple possible endings for each sample, models like GPT-2 and Llama can be evaluated based on their ability to select the correct ending with the lowest perplexity. Larger models generally achieve higher accuracy, as demonstrated by the comparison between the smallest GPT-2 model and Llama 3.2 1B. This matters because understanding perplexity helps in developing more accurate language models that can better mimic human language use.

    Read Full Article: Evaluating Perplexity on Language Models