UCLA's LightBeam Runs Brain-to-Text AI 32x Leaner on a Single GPU
A new open-source CTC decoder cuts memory needs from 320 GB to 10 GB while setting fresh state-of-the-art on speech brain-computer interface benchmarks.
ProTakeaways
- UCLA researchers released LightBeam, a CTC decoder that needs ~10 GB RAM instead of ~320 GB.
- Sets new state-of-the-art on Brain-to-Text '25 at 2.08% public WER with generative error correction.
- Integrates Llama 3.2 1B into first-pass beam search via delayed fusion, replacing the huge 5-gram LM.
- Uses a GPU-vectorized lexicon and homophone-aware nested beams for real-time decoding (RTF under 1).
- Open-source Python implementation, adapted from the FlexCTC decoder; modular enough to swap in newer LLMs.
- Enables local, on-device speech neuroprosthesis decoding without cloud servers or hundreds of gigabytes of RAM.
A team from UCLA has released LightBeam, a decoder for speech brain-computer interfaces that shrinks the memory footprint of the standard pipeline by roughly 32x while pushing accuracy past the previous published state-of-the-art. It targets the exact bottleneck that has been keeping cutting-edge speech neuroprostheses tethered to servers with hundreds of gigabytes of RAM.
Why the old pipeline needed a supercomputer
Speech neuroprostheses attempt to restore communication to people with dysarthria or anarthria by decoding intended speech directly from motor cortex activity. The reference pipeline from the Brain-to-Text benchmarks uses a recurrent network trained with CTC loss to map neural activity to phoneme logits, followed by a two-stage language model decoder: a 5-gram hypothesis generation stage, then an LLM rescoring stage.
That first stage is where the memory blows up. The 5-gram LM is baked into a weighted finite-state transducer (WFST) graph together with the lexicon and token mapping, and the graph is held in RAM during beam search. The 5-gram LM used by the Brain-to-Text '24 and '25 benchmarks is built from the OpenWebText2 corpus and covers roughly 634 million sentences with 99 billion words, which is why the compiled decoder ends up needing around 320 GB. For any lab or clinician who wants to run this locally on a patient's device instead of shipping neural data to the cloud, that is a hard stop.
Putting the LLM inside the beam search
LightBeam's core idea is to stop treating the LLM as a final rescorer and instead let it participate in the beam search itself. Every one second or so of audio, an LLM (Llama 3.2 1B, fine-tuned for next-word prediction on the participant's text distribution) is called to rescore the surviving beam hypotheses. Because the model is doing the heavy contextual lifting during decoding, the giant 5-gram LM can be swapped for a much smaller 4-gram, and the WFST graph can go away entirely.
The decoder is adapted from the GPU-accelerated FlexCTC decoder and rewritten in Python. A few implementation choices make it fast enough to be practical:
- Vectorized lexicon. Instead of walking a prefix trie on CPU per beam, the lexicon is flattened into a dense transition table stored on GPU, so masking valid next tokens for every beam becomes a single gather operation.
- Homophone-aware nested beams. Each acoustic beam maintains its own top orthographic sub-beams, so phoneme sequences that map to multiple spellings (like "there" vs. "they're") stay in contention until context resolves them.
- Delayed fusion at fixed intervals. The LLM scores unique orthographic sub-beams in batches on GPU roughly once per second, and its score replaces the N-gram score inside the running beam total.
- Hash-based recombination. Duplicate hypotheses are detected via rolling hashes in O(K) rather than O(K²) string comparisons.
The numbers
Evaluated on both the Brain-to-Text '24 benchmark (participant T12, 128 electrodes) and the Brain-to-Text '25 Kaggle competition (participant T15, 256 electrodes), LightBeam beats the WFST baseline on both accuracy and resources when paired with the baseline GRU encoder.
| Metric | WFST baseline | LightBeam |
|---|---|---|
| B2T '24 WER | 9.71% | 9.37% |
| B2T '25 private WER | 6.72% | 6.47% |
| Peak RAM | ~320 GB | ~10 GB |
| Peak VRAM (B2T '25) | 18.1 GB | 5.8 GB |
| Real-time factor | 0.01 - 0.05 | 0.06 - 0.14 |
The real-time factor is higher than the WFST baseline because LightBeam calls an LLM more frequently, but it stays well under 1 across every test trial on a single RTX 5090, which is the threshold for real-time decoding. When combined with a time-masked Transformer encoder and generative error correction using Llama 3.1 8B, the system reaches 5.01% WER on B2T '24 and 2.08% on B2T '25 public, which the authors report as a new state-of-the-art against published results from Zhang et al. that leaned on GPT-3.5/GPT-4 and 367 hours of pretraining data.
What the ablations reveal
The paper cleanly isolates where the gains come from. Removing the periodic LLM rescoring and reverting to end-of-trial rescoring degrades WER from 14.17% to 17.17% on B2T '24 validation, confirming that the LLM's real value sits inside the beam search rather than after it. Skipping next-word-prediction fine-tuning of the LLM on the participant's text distribution also hurts, jumping WER to 15.89%. Allowing multiple pronunciation variants per word did not help, so the default CMU pronunciation is sufficient.
The catch
The authors are candid about three limitations. Latency is higher than the WFST decoder even though it stays real-time. Because LLM scores are only injected at fixed intervals, the decoded output can exhibit a bit of "jitter" when the LLM and N-gram LM disagree strongly between rescoring events. And the next-word-prediction fine-tuning means each new participant needs a calibration phase to adapt the LLM to their linguistic style.
Model size is another knob worth knowing about: swapping in Llama 3.2 3B for the 1B improved B2T '24 validation WER modestly but at meaningfully higher VRAM and RTF, and did not help B2T '25. The delayed-fusion architecture is modular, so any open-source LLM can slot in as the community produces better ones.
Off the server, onto the bedside
The practical implication is that the top of the Brain-to-Text leaderboard no longer requires a 320 GB server. A researcher can now run a state-of-the-art speech BCI decoder on a workstation with a single high-end GPU and ordinary system memory. That opens the door to a bedside device that keeps neural data local and avoids the latency and privacy costs of streaming cortical signals to a cloud endpoint.
The code is open-source and implemented in Python, so extending the decoder, swapping the LLM, or adapting it to a new participant should be a much shorter path than modifying a compiled WFST graph. For anyone working on brain-to-text pipelines, the encoder and decoder are now cleanly separable research directions again, and the memory bill for playing in this space has dropped by more than an order of magnitude.