YAML Metadata Warning:empty or missing yaml metadata in repo card

Check out the documentation for more information.

🧠 Athena Modern Hopfield Network SLM

Athena MHN SLM is an experimental small language model built using a Modern Hopfield Network-inspired attention mechanism combined with a recurrent Transformer-style architecture.

This project explores how associative memory (Hopfield networks) can be used to improve reasoning and pattern retrieval in language models.


βš™οΈ Architecture Overview

The model is a hybrid of:

  • πŸ”· Modern Hopfield Network-style attention
  • πŸ”· Transformer embedding + positional encoding
  • πŸ”· Recurrent layer execution (multi-loop depth)
  • πŸ”· Adaptive computation halting

Key Components

  • Embedding size: 512
  • Layers: 4 MHN blocks
  • Attention type: Hopfield-style energy-based retrieval (softmax attention form)
  • Recurrent loops per layer: up to 3
  • Context length: 1024 tokens
  • Adaptive halting mechanism for dynamic computation depth

🧠 Modern Hopfield Mechanism

Each layer performs associative memory retrieval:

  • Queries represent current token states
  • Keys/Values are derived from the same hidden states
  • Attention is computed as energy-based similarity
  • Output is retrieved memory patterns from the state space

This makes the model behave like a continuous associative memory system.


πŸ“š Training Setup

  • Dataset: tatsu-lab/alpaca
  • Training samples: 15,000 instruction-response pairs
  • Format:
    • Instruction
    • Input (if any)
    • Output response

πŸ”„ Recurrent Depth Mechanism

Instead of stacking many layers, each MHN block is executed multiple times:

  • Improves reasoning depth
  • Enables iterative refinement of representations
  • Reduces need for very deep architectures

⏱️ Adaptive Halting

The model includes a halting head that dynamically stops computation when:

  • Confidence threshold is reached (> 0.96)
  • Reduces unnecessary computation
  • Improves efficiency during inference

πŸ§ͺ Status

⚠️ Experimental Research Model

  • Architecture is actively evolving
  • Not yet optimized for production use
  • Intended for research and prototyping only

πŸš€ Intended Use Cases

  • Research on Modern Hopfield Networks
  • Associative memory-based language modeling
  • Recurrent depth transformer experiments
  • Instruction-following prototype systems

πŸ“¦ Version History

v2

  • Introduced True Modern Hopfield-style attention block
  • Improved associative memory behavior
  • Stabilized recurrent loop architecture
  • Added adaptive halting mechanism

πŸ”— Model Repository

https://huggingface.co/sasindumalhara/Athena


license: apache-2.0

Downloads last month
59
Safetensors
Model size
0.2B params
Tensor type
F32
Β·
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support