Channel Gated ODE Transformer Model

I’ve been experimenting with a small Transformer architecture that adds a channel-gated ODE refinement block after the discrete Transformer stack.

The model is intentionally tiny, not meant to compete with frontier systems. The goal was to test whether a continuous refinement step could let a shallower Transformer compete with a deeper baseline.

Current setup:

  • Byte/BPE tokenizer
  • 7-layer Transformer backbone
  • RK4 ODE refinement block
  • Per-channel learned gate
  • Compared against an 8-layer Transformer baseline
  • Trained on a Wikipedia-style corpus

Across three seeds, the 7L Transformer + channel-gated ODE block beat the 8L Transformer baseline on validation loss, while using one fewer discrete Transformer layer. It was slower, about 1.4x runtime, but the result was consistent enough to be interesting.

What stood out was that the ODE path did not behave like a tiny residual. The channel gate learned selective corrections, and the applied ODE update stayed active throughout training. A learned metric-constrained variant was also tested, but in these runs it tended to suppress the ODE update too much.

The project is still very early. The model is only around small-model scale, and the generated text is still rough, but it is now producing recognizable Wikipedia-like structure after continued training.

I would like to scale this model and See how well it performs. The test show it performs better then a slandered Trasformer model but at the cost of speed. I am looking for anyone interested in helping me scale the model and see how it performs.

I’d be interested in feedback from anyone working on continuous-depth Transformers, Neural ODEs, or efficient small-model architectures.
Thank you

Hi, If you are going to scale this to a much larger model, the memory cost is going to be your biggest hurdle; you should really look into the “adjoint method” to calculate your backward passes without blowing up your RAM, and maybe switch to an adaptive solver that can dynamically skip steps to win back some of that speed. Thanks for sharing.

Thank you for the response, I tried the adaptive solver and it hurt the loss and under performed a standard transformer model. My current set up the adjustment are really touchy, any little movements and it under performs. I have been training it at a little 12M parraniter model and the performance is really good.
Epoch 84690 | Train: 2.0193 | Val: 1.9512 | GradNorm: 0.716 | gate=0.599 | delta=120.603 | applied=94.902
Epoch 84720 | Train: 2.1456 | Val: 2.0634 | GradNorm: 0.711 | gate=0.608 | delta=113.799 | applied=88.999
Epoch 84750 | Train: 1.9189 | Val: 2.0710 | GradNorm: 0.703 | gate=0.605 | delta=121.837 | applied=95.815
Epoch 84780 | Train: 1.8876 | Val: 2.0539 | GradNorm: 0.672 | gate=0.594 | delta=120.476 | applied=94.241
Epoch 84810 | Train: 2.0559 | Val: 2.0200 | GradNorm: 0.670 | gate=0.610 | delta=116.217 | applied=91.915
Epoch 84840 | Train: 2.0494 | Val: 2.0440 | GradNorm: 0.677 | gate=0.594 | delta=117.708 | applied=91.836
Epoch 84870 | Train: 2.2166 | Val: 2.0581 | GradNorm: 0.738 | gate=0.604 | delta=116.889 | applied=91.186
Epoch 84900 | Train: 2.1167 | Val: 2.1423 | GradNorm: 0.707 | gate=0.602 | delta=115.345 | applied=90.159
Epoch 84930 | Train: 2.1150 | Val: 2.0062 | GradNorm: 0.716 | gate=0.600 | delta=116.980 | applied=91.283
Epoch 84960 | Train: 2.3949 | Val: 2.0610 | GradNorm: 0.724 | gate=0.598 | delta=118.040 | applied=91.680
Epoch 84990 | Train: 2.3369 | Val: 2.0381 | GradNorm: 0.716 | gate=0.612 | delta=118.094 | applied=93.087
saved periodic checkpoint: checkpoints/Transformer_7L_ODE_channel_rk4_epoch85000.pt
Epoch 84999 | Train: 2.1751 | Val: 2.0168 | GradNorm: 0.711 | gate=0.594 | delta=119.098 | applied=92.614
Finished Transformer_7L_ODE_channel_rk4 | Train Loss: 2.1751 | Val Loss: 2.0570 | Time: 837.9s

=== SUMMARY ===
Transformer_7L_ODE_channel_rk4 | Train: 2.1751 | Val: 2.0570 | Best Val: 1.9512 | Time: 837.9s

Best model: Transformer_7L_ODE_channel_rk4
Best checkpoint: checkpoints/Transformer_7L_ODE_channel_rk4_best.pt

=== SAMPLE ===
<|system|>
You are a helpful, concise assistant.
<|user|>
What are you?
<|assistant|>
Five examples of the following elements: “human is like a star in the sky” and “human”.
<|end|>

<|system|>
You are a helpful, concise assistant.
<|user|>
Generate a sentence that uses the words “cat”.
<|assistant|>
The cat has a frown on its long fur.
<|end|>

Thank You

Justin

Hi everyone,

I am developing a novel, highly efficient neural backbone architecture designed to drastically reduce inference and training compute costs.

Using a proprietary recurrent, routed-node paradigm that decouples gradient-trained embeddings from non-gradient tracking controllers, the system achieves standard dense-network accuracy on benchmarks while activating only a fraction of the parameter pathway per token step. Recent V4 test runs have successfully verified zero structural regression, perfect state-separation stability, and highly controlled routing convergence.

I am looking for a co-founder or equity-based lead engineer with deep PyTorch fluency (e.g., custom buffer manipulation, advanced tensor routing) to help scale this from prototype to a commercialized enterprise wrapper or SaaS optimizer.

Next milestones include finalizing our V5 temporal gating mechanism and expanding to large-scale task-conditioned routing benchmarks.

If you have strong experience optimizing sparse models, custom attention, or mixture-of-experts (MoE) architectures and want to build something highly proprietary from the ground up, let’s connect. PM me with your background, and we can set up a call under a mutual NDA.