Experimenting with hypersurface-constrained dynamic weight updating [P]
![Experimenting with hypersurface-constrained dynamic weight updating [P]](/_next/image?url=https%3A%2F%2Fpreview.redd.it%2F7mc0xz50jiqh1.png%3Fwidth%3D140%26height%3D88%26auto%3Dwebp%26s%3D2cc1034dfbe80d0c44538f76dc04c14bed8cfdad&w=3840&q=75)
| Hey everyone! I want to share the results of a small language model architecture experiment I’ve been running as a side project. The ultimate goal is to test an approach to reduce the number of the model's training parameters, since the main bottleneck in training is VRAM. The core idea is very similar to Universal Transformer. Let's take just a single decoder block and iteratively pass the input through it How is it implemented? The model uses a set of learned hypersurfaces to generate weight deltas ( The hypersurfaces are defined by a series of periodic functions. The best results I've got so far are from using a triangular wave. The model learns the amplitudes, frequencies, and phases of these waves across the coordinate dimensions. Given the size of this set Initially, I tried generating the full weights purely from hypersurfaces, but it was too restrictive and failed to converge. Thus, I moved to my current approach where the model has a base decoder layer that is being updated. I also added a state vector that is calculated from the input sequence using Gated Linear Attention. It is used to modulate the hypersurface geometry during the forward pass, making the generated weight deltas Pre-training results I ran the pre-training experiments on a 10B-token sample from the FineWeb-Edu dataset. I wanted to keep the training parameter count minimal, so I used a pre-trained, frozen embedding layer from GPT-2. I also do not use any positional encoding, following the NoPE approach. The sequence length was 1024 tokens, the batch size was 16, and I ran the training for 10,000 steps. I used 3 baselines:
The experimental models:
Here's a training loss chart: Model parameter count A standard 24-layer decoder-only transformer: 169,906,944 3 loop blocks + triangular wave + context modulation: 27,162,624 (~16% of the baseline model's size) Key Takeaways: While the classic decoder-only architecture still produces the best absolute loss, the Triangular Surface + Context model shows a real performance boost over a standard unrolled baseline. This model introduces a whole new set of parameters and hyperparameters. I am currently experimenting with the size of the triangular wave function set and the size of the context vector. I am also trying different initialization strategies for the hypersurface parameters. The (very vague) goal isn't necessarily to beat a full-parameter model, but to find a configuration that is "good enough" in terms of loss while remaining drastically lighter on hardware resources. Another possibility is that hypersurface representations have different convergence dynamics and require more steps and more tokens to converge. So my next step is to train a model with 3 loop blocks and a larger context vector, and an expanded functional basis on the whole 10B-token sample from the FineWeb-Edu dataset. GitHub repo: https://github.com/morgengramlich/LoopSLM [link] [comments] |
Want to read more?
Check out the full article on the original site