MEDUSA AI: Makes ChatGPT Super Fast! + STABLE AUDIO: The Future of AI Audio

Stable Audio generates sound from text using 800k licensed tracks, while Medusa speeds up language models through parallel decoding. Stable Audio works at 44.1 kHz and requires attribution; Medusa shows multiple times faster generation on Vicuna models with the right settings.
Chapters
Stability AI, the creators of the Stable diffusion model, which produces realistic images from text descriptions, have now introduced another product that can produce audio from text. It's named Stable Audio. Later in the video, I'll also discuss a new framework named Medusa that can speed up language model generation like never before. So keep watching until the end of the video because Medusa is a fascinating new concept. But first, let's discuss Stable Audio. It's truly one of the most impressive advancements I've seen in AI music generation, and here's why. First of all, let's talk about how traditional music generation techniques work. Most of them use what's called symbolic generation, which means they work with MIDI files. MIDI files are basically a set of instructions that tell a computer or a synthesizer how to play a sequence of notes. Think of it like this. A MIDI file can tell a machine to play certain notes for specific durations. But there's a catch. MIDI files don't describe the quality or character of the instrument's sound. They only indicate which notes to play, not the exact sound of those notes. This means when you play a MIDI file on different synthesizers or sound libraries, it can sound very different each time. Some versions might sound great, others not so much, or even completely off from what you expected. Another problem with MIDI files is that they tend to be very repetitive and boring. While they can manage notes and durations, they can't capture the subtle qualities that make music expressive, such as dynamics, articulation, vibrato, reverb, and distortion. They also struggle with aspects like chords, harmony, melody, rhythm, and structure. Essentially, they provide a sequence of notes without much context or depth. Now, unlike others, Stable Audio doesn't rely on MIDI files. Instead, it uses raw audio samples, the real waveforms that create sound. This approach lets Stable Audio produce any sound, be it musical instruments, human voices, sound effects, or background noises. Because it uses a sampling rate of 44.1 kilohertz, the sound quality matches that of CDs. But how does Stable Audio decide the sound based on a text prompt? This is the exciting part. It employs a method named Contrastive Language Audio pre training, or CLAP for short. Now, CLAP's goal is to link language with audio. It uses two encoders and a special learning target to pair audio and its textual description, learning to match words with their corresponding sounds. For training, Clap Stability AI utilized a vast dataset from the Audio Sparks Library, which has over 800,000 licensed music tracks. This library is a hub for musicians and their fans. The collection spans various genres, like classical, rock, hip hop, and Electronic. Each music track includes detailed information such as title, artist, genre, mood, tempo, instruments and lyrics. Clap leverages these details as text cues for the audio. By using this data set and this technique, Stable Audio can generate audio clips that match the text prompts very well. But here's the thing. Stable Audio is not trying to mimic or copy any existing music or sounds. It's not trying to be the Beatles or Mozart or Hans Zimmer or anything like that. It's trying to create something new and original from scratch based on your input. It's trying to empower you to express your own musical ideas and preferences using natural language. That's why Stability AI decided not to release any pre trained models or code. For this model, they want you to use their web interface where you can type in any text prompt you want and get an audio clip back in seconds. You can also download the audio clip for free and use it for any personal or commercial project you want. As long as you credit Stability AI and Audio Sparks. You can also share your creations with other users and and explore what they have made. Stable Audio is honestly one of the most exciting and innovative products I've ever seen in AI music generation. It opens up a whole new world of possibilities for creating and discovering music and sounds using natural language. If you're interested in trying this model, you can go to their website and start typing in your text prompts. They have a guide that offers advice and examples for creating good text prompts for various audio types. To understand the technical aspects of Stable Audio, read their paper. The link is in this video's description. Now we'll turn our attention to Medusa. It's incredibly interesting and I'll explain the reasons. You know how language models are getting bigger and bigger these days, right? We have GPT4, Claude 2, Llama 2 and many more. These models are amazing, but they also have a downside. They are slow. Generating text with them can take a lot of time and resources. Especially if you want to use sampling methods that produce more diverse and creative outputs. And in an age of real time responses, even a split second counts. So how can we improve the speed without losing quality? That's where Medusa comes into play. Medusa is a framework that speeds up LLM generation using multiple decoding heads. What does that mean? Let me clarify. The basic idea of Medusa is to make predictions for multiple future tokens at the same time instead of just the next one. This way you can generate more text in parallel parallel and reduce the number of iterations needed to complete a sequence. This technique is inspired by blockwise parallel decoding, which is a method used to speed up autoregressive models in general. But Medusa is not just a simple implementation of blockwise parallel decoding. It also has some innovative features that make it even more powerful and flexible. One of these features is Tree attention. This feature blends the various word options produced during the decoding process into one final series of words. It employs a tree structure to handle these word options at the same time, giving each one a weight based on its likelihood and position. This ensures that the most fitting words are picked for each part. Another feature is Typical acceptance. This determines when to stop creating words and accept the text as done. It compares the created text to the model's expected word choices and checks if it's within a set range of normalcy. This helps prevent the creation of text that doesn't make sense or is highly unlikely. These two features work together to make Medusa more efficient and effective than standard decoding methods. They also allow Medusa to adapt to different sampling temperatures, which control how diverse and creative the outputs are. You can choose between Greedy Top K, Top P or Nucleus sampling, depending on your preferences and needs. Now, you might be curious about how fast Medusa is. I've seen a recent study that checked its speed on Vicuna models. These Vicuna models are chat assistants made by adjusting llama2 with conversations from shared GPS. They can produce really interesting and original texts. This study looked at how Medusa did compared to the usual greedy decoding for various Vicuna model sizes from 7B to 33B parameters. The findings Medusa was up to two times faster than greedy decoding without dropping in quality. It could even go up to seven times faster if a small drop in performance was okay. When looking at actual time, the quickest models using Medusa were four times faster than with greedy decoding. That's impressive, but how did they achieve these results? Well, they did some ablation studies to find the optimal configurations and thresholds for Medusa. They found that using four decoding heads with tree attention was the best choice for most cases. A typicality threshold of 0.5 was also a good middle ground for speed and quality. However, these results might not apply to every situation. They can vary based on things like model size, input length, sampling temperature and hardware details. But what's clear is that Medusa is a great tool that can boost the efficiency and performance of LLM generation. So what do you think? Are you excited about Medusa? Do you want to try it out for yourself? If so, you can Check out their GitHub repository where they provide code and instructions for using medusa on different LLMs. I hope you found this informative. If you enjoyed it, please like the video and subscribe for more AI updates. And don't forget to leave a comment below with your thoughts and questions about Medusa. Thanks for watching and I'll see you in the next one.










