X-CoSD: Communication-Efficient Cross-Vocabulary Collaborative Speculative Decoding
This paper proposes X-CoSD, a communication-efficient and lossless collaborative speculative decoding framework that enables distributed LLM inference between devices and servers with heterogeneous vocabularies by introducing hybrid resampling and a server-resampling-with-device-verification variant to significantly accelerate token generation without compromising output quality.
Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer
In the world of modern artificial intelligence, the most powerful tools are large language models, vast digital brains capable of writing code, composing stories, and solving complex problems. However, these models are heavy and slow to run, often requiring massive servers far away from the user. To make them faster, researchers have developed a technique called speculative decoding. Imagine a team where a quick, lightweight assistant drafts a few sentences, and a senior expert checks them instantly. If the assistant is right, the team moves forward quickly; if the assistant is wrong, the expert corrects the mistake. This collaboration allows the system to generate text much faster than the expert could work alone. Yet, for this teamwork to happen between a phone and a distant server, they must speak the exact same language, down to the specific list of words and symbols they recognize. In the real world, different devices often use different dictionaries, creating a barrier that has previously stopped this fast collaboration from working smoothly.
A team of researchers at Seoul National University has solved this barrier with a new framework they call X-CoSD. Their work addresses a specific bottleneck: when the phone and the server do not share the same vocabulary, the server must send a massive amount of data back to the phone every time a mistake is made, slowing the entire process to a crawl. The researchers designed a system that allows the phone and server to collaborate even when their dictionaries do not match, without sacrificing the quality of the writing or the speed of the response. They proved that their method preserves the exact intelligence of the powerful server model while drastically cutting down the data that needs to travel over the internet.
The core of the problem lies in how these models handle errors. When the server checks the phone's draft and rejects a token, it must provide a new, correct option. In previous attempts to fix the vocabulary mismatch, the server would send its entire probability map—a list of every possible word it could choose next—back to the phone. This is like a teacher sending a student the entire textbook every time the student gets a single spelling wrong. It is incredibly inefficient, especially on wireless networks where sending large amounts of data takes time and power. The researchers realized that the phone only needs to see the words that both it and the server agree on, plus a tiny bit of extra information to handle the words only the server knows.
To solve this, the team introduced a method called hybrid resampling. Instead of sending the full dictionary of possibilities, the server sends only the probabilities for the words that appear in both the phone's and the server's vocabularies. It also sends a single number representing how much weight the server's unique words carry. With this limited information, the phone can mathematically decide whether to pick a word from the shared list or ask the server to pick a word from its unique list. If the phone picks a word from the shared list, it happens instantly. If the server needs to pick a unique word, it sends just that one word back, rather than the entire list of options. This approach ensures that the final output remains perfectly accurate, matching what the powerful server would have produced on its own, but it avoids the heavy data transfer that used to bog down the system.
The researchers went a step further with an enhanced version called X-CoSD-E, which adds another layer of efficiency. In this setup, when a mistake occurs, the server first sends a small handful of replacement candidates to the phone. The phone checks these few options immediately. If one of them is good enough, the process stops there, and no further data is sent. The server only sends the larger list of probabilities if the phone rejects every single one of the initial candidates. This "try a few first" strategy means that in most cases, the system avoids the heavy data transfer entirely. The team tested this on various tasks, including machine translation, summarizing news articles, and solving math problems, using different models for the phone and the server.
The results showed that this new method works as well as the powerful server model working alone, maintaining the same high quality of text generation. At the same time, it significantly reduced the amount of data sent back and forth. In their experiments, the new system generated tokens much faster than previous methods that tried to handle different vocabularies, particularly when the internet connection was slow or the data transfer was limited. The researchers found that by carefully managing what information is sent and when, they could keep the collaboration seamless. This work demonstrates that high-speed, collaborative artificial intelligence is possible even when the devices involved do not speak the exact same language, opening the door for more efficient and accessible AI tools on everyday devices.
Drowning in papers in your field?
Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.