IBM releases CoFrNets code to test leaner language-model architectures
IBM claims a feedforward-layer design uses 30–50% fewer parameters with competitive performance. The release also tackles training problems that have limited deeper networks.
Loading page…
IBM claims a feedforward-layer design uses 30–50% fewer parameters with competitive performance. The release also tackles training problems that have limited deeper networks.
Listen to this story
IBM’s CoFrNets release gives researchers code to test continued-fraction networks as alternatives to standard language-model layers, including versions that replace feedforward or attention blocks. The research addresses training and hardware constraints through a logarithm-and-exponential rewrite and a later reparameterization that avoids tuning epsilon. IBM reports 30–50% fewer parameters for one gated feedforward design, but broader validation is still ahead: the company’s next step is to integrate the designs into more models and test whether the savings hold.
A November paper tested the approach with GPT-2, Llama-3, Mamba-2 and nano Llama-MoE, reporting higher throughput and similar or better performance than earlier continued-fraction designs—not all standard architectures.
Earlier CoFrGeNet experiments used GPT-2 XL at 1.5 billion parameters and Llama 3 at 3.2 billion, with different training datasets for each.
IBM says its spectral-condition reparameterization removes the need to sweep epsilon values and enabled training diffusion models for image generation.
IBM open-sourced CoFrNets on December 4, 2026, releasing code for exploring neural networks inspired by continued fractions. Researchers can test alternatives to language-model layers, including a design IBM says performs competitively or better with 30–50% fewer parameters.
The repository brings together several versions of the architecture, from simple function-fitting examples to language and image-generation experiments. Its release follows work on two practical obstacles: divisions that run inefficiently on modern hardware, and training instability when those divisions produce very large internal values.
Continued fractions have a ladder-like structure built from repeated divisions. IBM says networks inspired by that structure can represent complicated functions compactly. But small denominators can send activations—the intermediate values produced inside a network—soaring, making deeper ladders difficult to train.
Earlier this year, IBM reduced the computation to one division regardless of ladder depth, using matrix additions and multiplications for the remaining operations. The company says that made efficient training of multibillion-parameter language models possible. Yet deeper ladders still needed incremental, layer-by-layer training, adding complexity to standard pretraining procedures.
A July publication on CoFrGeNet, the language-generation branch of the work, described components that could replace attention and feedforward blocks in transformers. Researchers tested GPT-2 XL and Llama 3 variants and reported competitive, sometimes better, results with fewer parameters. Those experiments preceded this week's open-source announcement.
The July experiments used GPT-2 XL at 1.5 billion parameters and Llama 3 at 3.2 billion. Training data differed: GPT-2 XL used OpenWebText and GneissWeb, while Llama 3 used a nine-dataset Docling mix. The authors assessed classification, question answering, reasoning and text understanding. They also developed custom gradient calculations—the calculations that guide training updates—which they described as more accurate and efficient than standard PyTorch-based gradients.
IBM attributes competitive or better performance to its gated, non-expanding design for replacing multilayer perceptrons in language models.
The next change rewrites division using logarithms and exponentials. In their November paper, the authors report that this reformulation stabilizes deeper networks without incremental training. It addresses how the architecture is trained, not just how many parameters it needs.
That paper tests GPT-2, Llama-3, Mamba-2 and nano Llama-MoE architectures. Its authors report similar or significantly better performance, plus higher throughput, compared with the earlier continued-fraction architecture. That comparison is specifically against prior work in the same family, rather than a claim of superiority over every standard language-model design.
A remaining nuisance was epsilon, a setting used to prevent division by zero. IBM says the preceding approaches require tuning it and make optimization non-smooth, potentially affecting final performance. Its latest approach changes how the network is mathematically expressed using a spectral condition, avoiding the need to sweep through epsilon values. IBM says this also enabled successful training of diffusion models for image generation.
The release gives researchers several entry points rather than one fixed model configuration. IBM describes examples that move from basic mathematical tasks to replacing components inside language models:
IBM also identifies optimization as unfinished work. It proposes exploring gradient-free methods and other heuristics, rather than treating larger scale alone as the route to better models. Scientific modeling is another proposed direction: the company suggests CoFrNets could serve as substitutes for systems described by partial differential equations. These are research possibilities, not announced applications.
IBM is inviting contributions and experiments beyond those examples. Its stated engineering next step is to integrate the designs into more open and proprietary language models and test whether the parameter savings hold. The repository also includes work scheduled to appear at NeurIPS 2026 the following week.
Loading discussion...
Join the conversation
Explain what open code adds—and what it cannot prove.
Be the first to share a perspective or an experience.
Reader comments
Newest comments first. Replies stay oldest first.