StreamDiffusion: A Pipeline-level Solution for Real-time Interactive Generation

StreamDiffusion: A Pipeline-level Solution for Real-time Interactive Generation

Due to its vast potential and commercialization opportunities, particularly in gaming, broadcasting, and video streaming, the Metaverse is currently one of the fastest-growing technologies. Modern Metaverse applications utilize AI frameworks, including computer vision and diffusion models, to enhance their realism. A significant challenge for Metaverse applications is integrating various diffusion pipelines that provide low latency and high throughput, ensuring effective interaction between humans and these applications.

Today's diffusion-based AI frameworks excel in creating images from textual or image prompts but fall short in real-time interactions. This limitation is particularly evident in tasks that require continuous input and high throughput, such as video game graphics, Metaverse applications, broadcasting, and live video streaming.

In this article, we will discuss StreamDiffusion, a real-time diffusion pipeline developed to generate interactive and realistic images, addressing the current limitations of diffusion-based frameworks in tasks involving continuous input. StreamDiffusion is an innovative approach that transforms the sequential noising of the original image into batch denoising, aiming to enable high throughput and fluid streams. This approach moves away from the traditional wait-and-interact method used by existing diffusion-based frameworks. In the upcoming sections, we will delve into the StreamDiffusion framework in detail, exploring its working, architecture, and comparative results against current state-of-the-art frameworks. Let's get started.

StreamDiffusion : An Introduction to Real-Time Interactive Generation

Metaverse are performance intensive applications as they process a large amount of data including texts, animations, videos, and images in real-time to provide its users with its trademark interactive interfaces and experience. Modern Metaverse applications rely on AI-based frameworks including computer vision, image processing, and diffusion models to attain low latency and a high throughput to ensure a seamless user experience. Currently, a majority of Metaverse applications rely on reducing the occurrence of denoising iterations to ensure high throughput and enhance the application’s interactive capabilities in real-time. These frameworks opt for a common strategy that either involves re-framing the diffusion process with neural ODEs (Ordinary Differential Equations) or reducing multi-step diffusion models into a few steps or even a single step. Although the approach delivers satisfactory results, it has certain limitations including limited flexibility, and high computational costs.

On the other hand, the StreamDiffusion is a pipeline level solution that starts from an orthogonal direction and enhances the framework’s capabilities to generate interactive images in real-time while ensuring a high throughput. StreamDiffusion uses a simple strategy in which instead of denoising the original input, the framework batches the denoising step. The strategy takes inspiration from asynchronous processing as the framework does not have to wait for the first denoising stage to complete before it can move on to the second stage, as demonstrated in the following image. To tackle the issue of U-Net processing frequency and input frequency synchronously, the StreamDiffusion framework implements a queue strategy to cache the input and the outputs.

Although the StreamDiffusion pipeline seeks inspiration from asynchronous processing, it is unique in its own way as it implements GPU parallelism that allows the framework to utilize a single UNet component to denoise a batched noise latent feature. Furthermore, existing diffusion-based pipelines emphasize on the given prompts in the generated images by incorporating classifier-free guidance, as a result of which the current pipelines are rigged with redundant and excessive computational overheads. To ensure the StreamDiffusion pipeline don’t encounter the same issues, it implements an innovative RCFG or Residual Classifier-Free Guidance approach that uses a virtual residual noise to approximate the negative conditions, thus allowing the framework to calculate the negative noise conditions in the initial stages of the process itself. Additionally, the StreamDiffusion pipeline also reduces the computational requirements of a traditional diffusion-pipeline by implementing a stochastic similarity filtering strategy that determines whether the pipeline should process the input images by computing the similarities between continuous inputs.

The StreamDiffusion framework is built on the learnings of diffusion models, and acceleration diffusion models.

Diffusion models are known for their exceptional image generation capabilities and the amount of control they offer. Owing to their capabilities, diffusion models have found their applications in image editing, text to image generation, and video generation. Furthermore, development of consistent models have demonstrated the potential to enhance the sample processing efficiency without compromising on the quality of the images generated by the model that has opened new doors to expand the applicability and efficiency of diffusion models by reducing the number of sampling steps. Although extremely capable, diffusion models tend to have a major limitation: slow image generation. To tackle this limitation, developers introduced accelerated diffusion models, diffusion-based frameworks that do not require additional training steps or implement predictor-corrector strategies and adaptive step-size solvers to increase the output speeds.

The distinguishing factor between StreamDiffusion and traditional diffusion-based frameworks is that while the latter focuses primarily on low latency of individual models, the former introduces a pipeline-level approach designed for achieving high throughputs enabling efficient interactive diffusion.

StreamDiffusion : Working and Architecture

The StreamDiffusion pipeline is a real-time diffusion pipeline developed for generating interactive and realistic images, and it employs 6 key components namely: RCFG or Residual Classifier Free Guidance, Stream Batch strategy, Stochastic Similarity Filter, an input-output queue, model acceleration tools with autoencoder, and a pre-computation procedure. Let’s talk about these components in detail.

Stream Batch Strategy

Traditionally, the denoising steps in a diffusion model are performed sequentially, resulting in a significant increase in the U-Net processing time to the number of processing steps. However, it is essential to increase the number of processing steps to generate high-fidelity images, and the StreamDiffusion framework introduces the Stream Batch strategy to overcome high-latency resolution in interactive diffusion frameworks.

In the Stream Batch strategy, the sequential denoising operations are restructured into batched processes with each batch corresponding to a predetermined number of denoising steps, and the number of these denoising steps is determined by the size of each batch. Thanks to the approach, each element in the batch can proceed one step further using the single passthrough UNet in the denoising sequence. By implementing the stream batch strategy iteratively, the input images encoded at timestep “t” can be transformed into their respective image to image results at timestep “t+n”, thus streamlining the denoising process.

Residual Classifier Free Guidance

CFG or Classifier Free Guidance is an AI algorithm that performs a host of vector calculations between the original conditioning term and a negative conditioning or unconditioning term to enhance the effect of original conditioning. The algorithm strengthens the effect of the prompt even though to compute the negative conditioning residual noise, it is necessary to pair individual input latent variables with negative conditioning embedding followed up by passing the embeddings through the UNet at reference time.

To tackle this issue posed by Classifier Free Guidance algorithm, the StreamDiffusion framework introduces Residual Classifier Free Guidance algorithm with the aim to reduce computational costs for additional UNet interference for negative conditioning embedding. First, the encoded latent input is transferred to the noise distribution by using values determined by the noise scheduler. Once the latent consistency model has been implemented, the algorithm can predict data distribution, and use the CFG residual noise to generate the next step noise distribution.

Input Output Queue

The major issue with high-speed image generation frameworks is their neural network modules including the UNet and VAE components. To maximize the efficiency and overall output speed, image generation frameworks move processes like pre and post processing images that do not require additional handling by the neural network modules outside of the pipeline, post which they are processed in parallel. Furthermore, in terms of handling the input image, specific operations including conversion of tensor format, resizing input images, and normalization are executed by the pipeline meticulously.

To tackle the disparity in processing frequencies between the model throughput and the human input, the pipeline integrates an input-output queuing system that enables efficient parallelization as demonstrated in the following image.

The processed input tensors are first queued methodically for Diffusion models, and during each frame, the model retrieves the most recent tensor from the input queue, and forwards the tensor to the VAE encoder, thus initiating the image generation process. At the same time, the tensor output from the VAE decoder is fed into the output queue. Finally, the processed image data is transmitted to the rendering client.

Stochastic Similarity Filter

In scenarios where the images either remain unchanged or show minimal changes without a static environment or without active user interaction, input images resembling each other are fed repeatedly into UNet and VAE components. The repeated feeding leads to generation of near identical images and additional consumption of GPU resources. Furthermore, in scenarios involving continuous inputs, unmodified input images might surface occasionally. To overcome this issue and prevent unnecessary utilization of resources, the StreamDiffusion pipeline employs a Stochastic Similarity Filter component in its pipeline. The Stochastic Similarity Filter first calculates the cosine similarity between the reference image and the input image, and uses the cosine similarity score to calculate the probability of skipping the subsequent UNet and VAE processes.

On the basis of the probability score, the pipeline decides whether subsequent processes like VAE Encoding, VAE Decoding, and U-Net should be skipped or not. If these processes are not skipped, the pipeline saves the input image at that time, and simultaneously updates the reference image to be used in the future. This probability-based skipping mechanism allows the StreamDiffusion pipeline to fully operate in dynamic scenarios with low inter-frame similarity whereas in static scenarios, the pipeline operates with higher inter-frame similarity. The approach helps in conserving the computational resources and also ensures optimal GPU utilization based on the similarity of the input images.

Pre-Computation

The UNet architecture needs both conditioning embeddings as well as input latent variables. Traditionally, the conditioning embeddings are derived from prompt embeddings that remain constant across frames. To optimize the derivation from prompt embeddings, the StreamDiffusion pipeline pre-computed these prompt embeddings and stores them in a cache, which are then called in streaming or interactive mode. Within the UNet framework, the Key-Value pair is computed on the basis of each frame’s pre-computed prompt embedding, and with slight modifications in the U-Net, these Key-Value pairs can be reused.

Model Acceleration and Tiny AutoEncoder

The StreamDiffusion pipeline employs TensorRT, an optimization toolkit from Nvidia for deep learning interfaces, to construct the VAE and UNet engines, to accelerate the inference speed. To achieve this, the TensorRT component performs numerous optimizations on neural networks that are designed to boost efficiency and enhance throughput for deep learning frameworks and applications.

To optimize speed, the StreamDiffusion configures the framework to use fixed input dimensions and static batch sizes to ensure optimal memory allocation and computational graphs for a specific input size in an attempt to achieve faster processing times.

The above figure provides an overview of the inference pipeline. The core diffusion pipeline houses the UNet and VAE components. The pipeline incorporates a denoising batch, sampled noise cache, pre-computed prompt embedding cache, and scheduler values cache to enhance the speed, and the ability of the pipeline to generate images in real-time. The Stochastic Similarity Filter or SSF is deployed to optimize GPU usage, and also to gate the pass of the diffusion model dynamically.

StreamDiffusion : Experiments and Results

To evaluate its capabilities, the StreamDiffusion pipeline is implemented on LCM and SD-turbo frameworks. The TensorRT by NVIDIA is used as the model accelerator, and to enable lightweight efficiency VAE, the pipeline employs the TAESD component. Let’s now have a look at how the StreamDiffusion pipeline performs when compared against current state of the art frameworks.

Quantitative Evaluation

The following figure demonstrates the efficiency comparison between the original sequential UNet and the denoising batch components in the pipeline, and as it can be seen, implementing the denoising batch approach helps in reducing the processing time significantly by almost 50% when compared to the traditional UNet loops at sequential denoising steps.

Furthermore, the average inference time at different denoising steps also witnesses a substantial boost with different speedup factors when compared against current state of the art pipelines, and the results are demonstrated in the following image.

Moving along, the StreamDiffusion pipeline with the RCFG component demonstrates less inference time when compared against pipelines including the traditional CFG component.

Furthermore, the impact of using the RCFG component its evident in the following images when compared to using the CFG component.

As it can be seen, the use of CFG intesifies the impact of the textual prompt in image generation, and the image resembles the input prompts a lot more when compared to the images generated by the pipeline without using the CFG component. The results improve further with the use of the RCFG component as the influence of the prompts on the generated images is quite significant when compared to the original CFG component.

Final Thoughts

In this article, we have talked about StreamDiffusion, a real-time diffusion pipeline developed for generating interactive and realistic images, and tackle the current limitations posed by diffusion-based frameworks on tasks involving continuous input. StreamDiffusion is a simple and novel approach that aims to transform the sequential noising of the original image into batch denoising. StreamDiffusion aims to enable high throughput and fluid streams by eliminating the traditional wait and interact approach opted by current diffusion-based frameworks. The potential efficiency gains highlights the potential of StreamDiffusion pipeline for commercial applications offering high-performance computing and compelling solutions for generative AI.

Andrew Ng Releases New Course on Advanced Retrieval Techniques for AI Applications

Andrew Ng’s DeepLearning.AI, in collaboration with Chroma, an open-source embedding database company focused on AI-native solutions, has introduced a free one-hour course designed to teach participants advanced retrieval techniques specifically tailored for AI applications.

Called “Advanced Retrieval for AI with Chroma”, this short course is ideal for individuals with intermediate Python skills and a keen interest in mastering advanced retrieval techniques for extracting data from vector databases.

Led by Chroma cofounder Anton Troynikov, the primary focus is on refining information retrieval processes to ensure that the output from a database query is not only semantically similar but also highly relevant to the query and its intended application. Leveraging an LLM enhances the effectiveness of this traditional technique, and the course explores another form of expansion where the LLM suggests a potential answer to the query, subsequently included in the query itself.

Additionally, participants will also learn about cross-encoder reranking, a method to reorder retrieval results and prioritise those most relevant to the query, thereby improving overall results. Furthermore, the course covers the training and application of embedding adapters, introducing an adapter layer to reshape embeddings and improve elements pertinent to the specific application, leading to better retrieval outcomes.

Ng, who has democratised AI education for all through his free courses had earlier released courses on various topics like generative AI for all, LLM quality and security, vector database for LLMs and more. He has participated with several companies like Microsoft, Lamini, AWS, OpenAI for these training materials.

The post Andrew Ng Releases New Course on Advanced Retrieval Techniques for AI Applications appeared first on Analytics India Magazine.

Stanford Introduces Mobile ALOHA, Teaching Robots How To Cook

If you have ever wanted a robot to cook food for you, the day is not far away. Stanford University has introduced Mobile ALOHA, an innovative system for learning bimanual mobile manipulation through low-cost whole-body teleoperation. This robotics technology addresses the limitations of traditional imitation learning from human demonstrations, which often focus on tabletop manipulation without the necessary mobility and dexterity for real-world applications.

Introducing 𝐌𝐨𝐛𝐢𝐥𝐞 𝐀𝐋𝐎𝐇𝐀🏄 — Hardware!
A low-cost, open-source, mobile manipulator.
One of the most high-effort projects in my past 5yrs! Not possible without co-lead @zipengfu and @chelseabfinn.
At the end, what's better than cooking yourself a meal with the 🤖🧑‍🍳 pic.twitter.com/iNBIY1tkcB

— Tony Z. Zhao (@tonyzzhao) January 3, 2024

Provided by Google Deepmind, Mobile ALOHA expands upon the existing ALOHA system by incorporating a mobile base and a whole-body teleoperation interface, making it capable of imitating complex mobile manipulation tasks.

The system’s primary purpose is data collection, allowing it to learn and replicate various bimanual activities. This includes sautéing and serving a piece of shrimp, opening a two-door wall cabinet to store heavy cooking pots, calling and entering an elevator, and lightly rinsing a used pan using a kitchen faucet.

Its ability to co-train with existing static ALOHA datasets sets Mobile ALOHA apart, significantly enhancing its performance on mobile manipulation tasks.

The research team also found that with just 50 demonstrations for each task, co-training can boost success rates by up to 90%.

This remarkable improvement allows Mobile ALOHA to handle complex and dynamic scenarios, showcasing its potential for real-world applications beyond traditional robotics limitations. From enhancing efficiency in kitchen tasks to navigating complex environments such as elevators, this breakthrough opens doors for a new era in robotics, where machines can perform a wide range of mobile manipulation tasks with precision and adaptability.

One of the key features of Mobile ALOHA is its cost-effectiveness, making it an accessible and practical solution for advancing robotics research. The system leverages supervised behaviour cloning, using data collected during teleoperation to train the robot to perform tasks autonomously.

2023 witnessed notable advancements in the field of robotics. For instance, Boston Dynamics upgraded Atlas for intricate construction tasks, and Microsoft empowered ChatGPT to command a robotic arm and drone.

Elon Musk’s Tesla is working on developments for its humanoid robot, Optimus. Demonstrations in September about performing Yoga and in December 2023 handling sensitive objects such as eggs showcased Optimus’ evolving capabilities.

Built Robotics introduced the RPD 35 solar piling robot, and robotics ventures received a $1.63 billion influx in April. Viam software became generally available, supporting robotic developers, while a collaboration produced a ChatGPT-driven tomato-picking robot.

The post Stanford Introduces Mobile ALOHA, Teaching Robots How To Cook appeared first on Analytics India Magazine.

Using Lightning AI Studio For Free

XXXXX
Image by Author

In this post, we will be learning about a new Cloud IDE that is both free and user-friendly. It is an upgraded version of Google Colab that allows you to save your projects, use essential plugins, and run generative models on GPU for free.

What is Lightning AI Studio?

Lightning AI Studio is a cloud-based AI development platform (similar to Google Colab) that aims to eliminate the hassle of setting up local environments for machine learning projects.

Here are the key features of Lightning AI Studio:

  1. It integrates popular machine learning tools into a single interface, so you don't have to context switch between different tools. This allows for building scalable AI apps and endpoints more easily.
  2. There is no environment setup required. You can code in the browser or connect your local IDE (VSCode or PyCharm). You can also easily switch between CPU and GPU with no environment changes.
  3. It allows hosting and sharing AI apps built with Streamlit, Gradio, React JS, etc. It also enables multi-user collaboration by coding together.
  4. It provides unlimited storage and the ability to upload and share files as well as connect S3 buckets.
  5. It enables training models at a massive scale using thousands of GPUs (Paid option). You can run hyperparameter sweeps, data preprocessing, and model deployment massively in parallel.
  6. It delivers a local development experience while leveraging the power of cloud infrastructure.
  7. Discover community templates (Studios) for deploying, fine-tuning, and training models quickly on your cloud with your data in minutes, requiring no setup.

Your Jupyter Notebook / VSCode on the cloud provides scalable hardware for training large language models and running fast inference.

Getting Started

You can create a free account at lightning.ai/sign-up. To get instant verification, make sure to use an official company or .edu email. I have signed up with @kdnuggets.com email, and I got instant access.

Once you have created your account, follow a few simple steps to customize your Studio experience. To get 7 hours of free GPU, you will need to verify your phone number.

XXXXX

Once you complete the initial steps, you will be directed to a sample project that includes a basic Python file. In just a few minutes, your Studio will be ready to process images and fine-tune the Renest model. To get started, simply write your code and execute the file.

XXXXX

The user interface (UI) is quite similar to that of VSCode but with additional options available on the right panel.

Lightning AI Studios

The Lighting AI platform offers Studios that are project templates designed by users. These templates include code, environment settings, and data to help you commence your project. You can find various Studios on the platforms such as training, fine-tuning, preprocessing, inference, and hyperparameters sweep templates. You can easily search and scroll through these templates to find the one that suits your requirements.

XXXXX

For example, accessing Mistral 7B API. You click on the “Get” and wait for it to complete.

XXXXX

Click on the `run.ipynb` file and run the first cell.

XXXXX

After accessing the Mistral 7B API, the code returns the result. To review the client code, go to the server folder and open the `client.py` file.

XXXXX

I use VSCode regularly and found it easy to get started with Lightning AI Studio.

Lightning AI Studio Plugins

If you are comfortable with the Jupyter Notebook UI, you can switch the IDE by clicking on the Jupyter Notebook button on the right panel. The right panel is the place where you will find all kinds of Lightning AI Studio plugins.

XXXXX

To add a new plugin, click the “+” button and choose from IDE, AI Agents, Training, Serving, and Webapps plugins.

XXXXX

It's that simple. You can now enjoy Studio plugins with VSCode and Jupyter Notebook extensions.

Conclusion

Lightning AI Studio provides a complete platform for your machine learning needs — from experimenting with model architectures to deploying applications. This user-friendly platform comes equipped with all the necessary features, eliminating the need to piece together various tools.

You can leverage the power and scale of the cloud without learning the intricacies of cloud computing or infrastructure management. The developers have abstracted away the complexity, allowing even data scientists with no cloud expertise to develop and deploy solutions independently.

Whether you're looking to prototype an idea or build a production-grade application, Lightning AI Studio has you covered. The free tier grants access to all the core functionality, including Studio GPUs, to accelerate training. This makes Lightning AI Studio a no-brainer for both learning and creating impactful machine learning applications.

Abid Ali Awan (@1abidaliawan) is a certified data scientist professional who loves building machine learning models. Currently, he is focusing on content creation and writing technical blogs on machine learning and data science technologies. Abid holds a Master's degree in Technology Management and a bachelor's degree in Telecommunication Engineering. His vision is to build an AI product using a graph neural network for students struggling with mental illness.

More On This Topic

  • Advanced PyTorch Lightning with TorchMetrics and Lightning Flash
  • Jurassic-1 Language Models and AI21 Studio
  • Adventures in MLOps with Github Actions, Iterative.ai, Label Studio…
  • Run an LLM Locally with LM Studio
  • A Lightning Fast Look at Single Line Exploratory Data Analysis
  • Introduction to PyTorch Lightning

After 30 Years, Windows Keyboard Gets a Copilot Upgrade

Microsoft is set to introduce the Copilot key to Windows 11 PCs, a move hailed as the most significant change to the Windows PC keyboard in nearly three decades. The Copilot key joins the Windows keyboard as a core component of PC keyboard. When pressed, it will invoke Copilot in Windows, making it seamless to engage with Copilot in your day-to-day use.

“Nearly 30 years ago, we introduced the Windows key to the PC keyboard that enabled people all over the world to interact with Windows. We see this as another transformative moment in our journey with Windows where Copilot will be the entry point into the world of AI on the PC, ”said Yusuf Mehdi, executive vice president & consumer chief marketing officer.

The Copilot key is expected to debut on new Windows 11 PCs from ecosystem partners, including devices from AMD, Intel, and Qualcomm, with availability starting from late February through Spring. Surface devices featuring the Copilot key are also anticipated in the upcoming release.

Microsoft wants 2024 to be “the year of the AI PC and said the Copilot key will not only simplify people’s computing experience but also amplify it. The tech giant said that the collaboration with silicon partners such as AMD, Intel, and Qualcomm has played a crucial role in Microsoft’s efforts to introduce new system architectures that power AI experiences on Windows PCs. This collaborative approach involves leveraging GPU, CPU, NPU, and cloud technologies to drive innovation.

In the lead-up to and during CES, the Copilot key will be prominently featured on various Windows 11 PCs, showcasing Microsoft’s commitment to driving AI transformation and making it accessible to users.

The post After 30 Years, Windows Keyboard Gets a Copilot Upgrade appeared first on Analytics India Magazine.

Theory Venture’s Tomasz Tunguz unveils 2024 predictions: AI dominance, resurging Web3, and the new normal of tech investments

Theory Venture’s Tomasz Tunguz unveils 2024 predictions: AI dominance, resurging Web3, and the new normal of tech investments Tomasz Tunguz 8 hours

At the end of 2022, like many, I made some predictions about what 2023 would bring to the technology investing ecosystem. Namely, the Fed would tame inflation, and the fundraising market would thaw, but overall, claiming that 2023 would be the first year of a “new normal” era for the markets and that machine learning would permeate most of the workflow software operators use today.

Fast forward a year later, and we’re entering our second year of the post-pandemic economy. The state of venture capital investing and technology battle several factors, some of which are 2023 repeats and some brand new, including but not limited to higher interest rates, a more challenging market that demands better product-market fit, and, of course, the rapidly evolving state of AI.

Will we end 2024 in the same market we started 2023 in? Through exploring the sluggish first half of 2023 to how AI exploded in the second half, I have several predictions about what we can expect to see in the year ahead:

The IPO market remains closed through the first six months of the year, but a few significant issuances in the middle part of the year reopen it for others, with 7 venture-backed software IPOs completed.
It was widely speculated that Klaviyo’s exit would open the public markets and cause a ripple effect for others, but that wasn’t the case. The 2024 market will imitate 2023’s in some ways as the higher rates environment and geopolitical tensions continue to weigh on valuations and defer IPOs, resulting in a quiet landscape. Despite this, there will likely be a few outlier companies that spur momentum for others, primarily in core software, with companies that demonstrate spectacular unit economics and cash flow.

M&A picks up throughout the year as either the anticipation or the reality of a rate change accelerates it for the feared increase in valuations. In the last two years, on average, M&A has totaled about $49 billion. It will surge to above $60 billion, primarily driven by AI acquisitions. Private Equity becomes an essential buyer of companies growing 10-25%, just as it did in 2023.
M&A acquisition value plummeted in Q4 2022, rivaling the dotcom bust and Global Financial Crisis for its lack of activity. We’ll see a slight change in the market and, subsequently, increased M&A activity as the public technology markets begin to demonstrate strength and valuations creep back up. Take-privates totaled $50.2b in 2023, with Qualtrics and Coupa topping the list.

AI and data continue to dominate the funding landscape.
Much like mobile technology became a de facto part of every startup, AI is no longer a category but the core or a component of every product. It’s still early days with LLMs, and there’s a lot of work to do; however, LLMs have already wholly transformed data in many ways, and innovations with data will continue to command VC investment. Likewise, venture dollars will still funnel into startups in the space. LLMs have driven an increased demand for data, caused a complete architecture change inside companies, and changed how data is manipulated. As the technology evolves, we’ll continue to see an increase in new data products and data teams.

The Bitcoin ETF drives a resurged interest in web3 financing. The crypto winter has forced many companies to become revenue-generating and we will see the first broadly successful tokens with dividends (likely outside the U.S.) We also see more ARR-based web3 businesses achieving scale.
Last year, I predicted 2023 would see a continued hangover from the high level of 2022 activity in web3. This year, we’ll see a resurgence following the industry’s setbacks as U.S. regulators decide to move forward with Bitcoin ETFs. This would remove the industry from recovery, mark a significant shift for web3, and cement the digital assets space as part of traditional finance.

U.S. VC deals fall from $275 billion in 2022 to $200 billion in 2023, and sustain at about $200-$220 billion next year. Valuations will remain relatively steady, except for AI businesses, which will command a premium of about 10-15% to the market.
While VC deals fell dramatically between 2022 and 2023, 2024 won’t see as sharp of a decline. LP reallocation to other asset classes continues, still smarting from the precipitous collapse in valuations in 2023 and the need for liquidity.

The discussion around AI regulation has become a critical topic in the U.S. due to the rapid European regulation. It becomes a vital part of the election conversation, particularly as deepfakes and machine-generated content sow increasing distrust of media.
The EU AI Act will have trickling effects on U.S. businesses and on the U.S. AI conversation writ large as the administration rushes to develop operational processes and frameworks. Biden’s executive order on AI will be hotly contested during the presidential election debates and will likely serve as a point of more divisiveness among parties as it asks to what extent privately held companies can, or should, be regulated.

The share of AI-enabled searches approaches 40% of all consumer searches as consumer behavior patterns, especially on mobile, drive innovation in this direction.
AI made significant waves this year for its use cases on the consumer side through chatbots, personalized content, AI-enabled search, and more. Consumer behavior patterns, specifically around ecommerce, will continue to drive the rise in AI-enabled searches as consumers leverage the technology for more personalized experiences.

Companies and startups, in particular, report meaningful productivity improvements from AI, reducing their headcount growth but growing revenue just as much as projected. ARR per employee increases by 10%, twice the decade-long average.
In 2013, these companies’ average revenue per employee totaled $200,000. Today, that number is $470,000 for a group of successfully publicly traded software and infrastructure companies — a 135% improvement. While most companies do not grow revenue-per-employee per year linearly, AI will drive this growth to happen more steadily and with greater rigor as adoption and applications of AI drive efficiencies within companies.

Study Shows that LLMs are Gender Bias 

Recently, the University of Michigan researchers did a study, showcasing the gender bias in LLMs, where male roles and gender-neutral terms performed better than female roles.

By analyzing the three models’ answers (namely Flan-T5, LLaMA 2 and OPT- instruct) to a wide range of 2457 queries, the research investigates how they react to various roles. The impact of each role on models’ performance was measured by the researchers, who included 162 distinct social roles, covering a range of social relationships and occupations.

A crucial discovery was the newsworthy influence of interpersonal roles such as “friend” and gender neutral roles on model effectiveness. It is clear that there is potential for more complex and useful AI interaction when models are provided with particular social settings because these roles consistently resulted in improved performance across models and datasets.

AI language model, chatbot, partner and mentor were the highest performing jobs. Surprisingly, for Flan-T5, it was the police. The helpful assistant job that OpenAI employs isn’t among the best performing ones but the researcher didn’t test with OpenAI models.

Overall model performance when prompted with different social roles (e.g., “You are a lawyer.”) for FLAN-T5-XXL and LLAMA2-7B chat, tested on 2457 MMLU questions. The best-performing roles are highlighted in red. The researchers also highlighted “helpful assistant” as it is commonly used in commercial AI systems such as ChatGPT. | Image: Zheng et al.

In addition, the research discovered that role prompts and audience-specific prompts (such as “You are talking to a firefighter”) produce the best results. This research holds significance because it implies that LLMs’ efficacy can be enhanced by carefully examining the social context in which they are employed, this is significant to both developers and users of AI systems.

Gender-Neutral and masculine positions are where AI systems excel.

Comparison of the accuracy of responses by gender role. Source: arXiv

All in all, a gender bias in LLMs was found in a study on AI systems, male roles and gender-neutral terms are performed better than female roles.

The data above collected many reinforce societal biases, raising concerns concerning the programing and training of these models. Larger models with more precautions to reduce bias will be taken into consideration as the recent research serves as an overview for future investigation into gender roles in AI.

The post Study Shows that LLMs are Gender Bias appeared first on Analytics India Magazine.

How Multimodality Makes LLM Alignment More Challenging

How Multimodality Makes LLM Alignment More Challenging
Image by Gerd Altmann from Pixabay

About a month ago OpenAI announced that ChatGPT can now see, hear, and speak. This means the model can help you with more everyday tasks. For example, you can upload a picture of the contents of your fridge and ask for meal ideas to prepare with the ingredients you have. Or you can photograph your living room and ask ChatGPT for art and decoration tips.

This is possible because ChatGPT uses multimodal GPT-4 as an underlying model that can accept both images and text inputs. However, the new capabilities bring new challenges for the model alignment teams that we will discuss in this article.

Alignment in LLMs

The term “aligning LLMs” refers to training the model to behave according to human expectations. This often means understanding human instructions and producing responses that are useful, accurate, safe, and unbiased. To teach the model the right behavior, we provide examples using two steps: supervised fine-tuning (SFT) and reinforcement learning with human feedback (RLHF).

Supervised fine-tuning (SFT) teaches the model to follow specific instructions. In the case of ChatGPT, this means providing examples of conversations. The underlying base model GPT-4 is not able to do that yet because it was trained to predict the next word in a sequence, not to answer chatbot-like questions.

While SFT gives ChatGPT its ‘chatbot’ nature, its answers are still far from perfect. Therefore, Reinforcement Learning from Human Feedback (RLHF) is applied to improve the truthfulness, harmlessness, and helpfulness of the answers. Essentially, the instruction-tuned algorithm is asked to produce several answers which are then ranked by humans using the criteria mentioned above. This allows the reward algorithm to learn human preferences and is used to retrain the SFT model.

After this step, a model is aligned with human values, or at least we hope so. But why does multimodality make this process a step harder?

Multimodal Data and New Challenges

When we talk about the alignment for multimodal LLMs we should focus on images and text. It does not cover all the new ChatGPT capabilities to ¨see, hear, and speak¨ because the latest two use speech-to-text and text-to-speech models and are not directly connected to the LLM model.

So this is when things get a bit more complicated. Images and text together are harder to interpret in comparison to just textual input. As a result, ChatGPT-4 hallucinates quite frequently about objects and people it can or can't see in the images.

Gary Marcus wrote an excellent article on multimodal hallucinations which exposes different cases. One of the examples showcases ChatGPT reading the time incorrectly from an image. It also struggled with counting chairs in a picture of a kitchen and was not able to recognize a person wearing a watch in a photo.

How Multimodality Makes LLM Alignment More Challenging
Image from https://twitter.com/anh_ng8

Images as inputs also open a window for adversarial attacks. They can become part of prompt injection attacks or used to pass instructions to jailbreak the model into producing harmful content.

Simon Willison documented several image injection attacks in this post. One of the basic examples involves uploading an image to ChatGPT that contains new instructions you want it to follow. See example below:

How Multimodality Makes LLM Alignment More Challenging
Image from https://twitter.com/mn_google/status/1709639072858436064

Similarly, text in the photo could be replaced by instructions for the model to produce hate speech or harmful content.

Improving Alignment for Multimodal Data

So why is multimodal data harder to align? Multimodal models are still in their early stages of development in comparison to unimodal language models. OpenAI did not reveal details of how multimodality is achieved in GPT-4 but it is clear that they have supplied it with a large amount of text-annotated images.

Text-image pairs are harder to source than purely textual data, there are fewer curated datasets of this type, and natural examples are harder to find on the internet than simple text.

The quality of image-text pairs presents an additional challenge. An image with a one-sentence text tag is not nearly as valuable as an image with a detailed description. In order to have the latter we often need human annotators who follow a carefully designed set of instructions to provide the text annotations.

On top of it, training the model to follow the instructions requires a sufficient number of real user prompts using both images and text. Organic examples are again hard to come by due to the novelty of the approach and training examples often need to be created on demand by humans.

Aligning multimodal models introduces ethical questions that previously did not even need to be considered. Should the model be able to comment on people's looks, genders, and races, or recognize who they are? Should it attempt to guess the photo locations? There are so many more aspects to align compared to text data only.

Summary

Multimodality brings new possibilities for how the model can be used, but it also brings new challenges for model developers who need to ensure the harmlessness, truthfulness, and usefulness of the answers. With multimodality, an increased number of aspects need aligning, and sourcing good training data for SFT and RLHF is more challenging. Those wishing to build or fine-tune multimodal models need to be prepared for those new challenges with development flows that incorporate high-quality human feedback.

Magdalena Konkiewicz is a Data Evangelist at Toloka, a global company supporting fast and scalable AI development. She holds a Master's degree in Artificial Intelligence from Edinburgh University and has worked as an NLP Engineer, Developer, and Data Scientist for businesses in Europe and America. She has also been involved in teaching and mentoring Data Scientists and regularly contributes to Data Science and Machine Learning publications.

More On This Topic

  • 12 Most Challenging Data Science Interview Questions
  • Web LLM: Bring LLM Chatbots to the Browser
  • What Makes AI Trustworthy?
  • What makes a song popular? Analyzing Top Songs on Spotify
  • What makes a winning entry in a Machine Learning competition?
  • What Makes Python An Ideal Programming Language For Startups

Perplexity AI Secures $70 Mn, Reaches $520 Mn Valuation

Perplexity AI revealed today that it has successfully raised $70 million in a recent funding round, marking a pivotal moment in its journey to reshape the landscape of generative AI.

Leading the funding charge was IVP, with additional backing from NEA, Databricks Ventures, and notable figures such as former Twitter VP Elad Gil, Shopify CEO Tobi Lutke, ex-GitHub CEO Nat Friedman, Vercel founder Guillermo Rauch, NVIDIA, and tech luminary Jeff Bezos.

Sources close to the matter disclosed that the funding has propelled Perplexity’s post-money valuation to an impressive $520 million, a noteworthy achievement given the relatively brief period since the company’s establishment in August 2022.

Founded by a skilled team of engineers—Aravind Srinivas, Denis Yarats, Johnny Ho, and Andy Konwinski—each specialising in AI, distributed systems, search engines, and databases, Perplexity has rapidly gained recognition for its innovative approach.

Highlighting the platform’s unique value proposition, CEO Aravind Srinivas stated, “With Perplexity, users can get instant answers to any question with full sources and citations included. Perplexity is for anyone and everyone who uses technology to search for information.”

What Perplexity is, today, is what Larry Page wanted Google to be, 23 years ago. But the timing wasn't right back then. There were no chat LLMs. But the man was a visionary. The ultimate search engine is an AI-powered answer engine, like Perplexity. pic.twitter.com/gz12V3apYR

— Aravind Srinivas (@AravSrinivas) January 3, 2024

Distinguishing itself from traditional search engines, Perplexity boasts a chatbot-like interface, allowing users to pose queries in natural language. Users can then engage in follow-up questions for a deeper exploration of specific subjects. It also gives citations of the sources.

At the heart of the Perplexity platform lies a collection of in-house and third-party general AI models. Subscribers to Perplexity’s Pro plan, priced at $20 per month, gain access to a variety of models, including Google’s Gemini, Mistra 7B, Anthropic’s Claude 2.1, and OpenAI’s GPT-4.

These models offer features such as image generation, unlimited usage of Perplexity’s Copilot (considering personal preferences during searches), and file uploads. The latter feature allows users to upload documents, including images, for models to analyse and formulate detailed responses.

While drawing comparisons to popular general AI tools like Google’s Bard, Microsoft’s Copilot, and ChatGPT, Perplexity stands out with its distinctive chat-forward UI. Notably, it faces competition from the likes of You.com, another search engine startup offering similar AI-powered summarising and source-citing tools, optionally powered by GPT-4.

The post Perplexity AI Secures $70 Mn, Reaches $520 Mn Valuation appeared first on Analytics India Magazine.

Conversational AI Startup Coqui Shuts Down 

Coqui, a conversational AI startup, on Wednesday (January 3, 2023), announced that it is shutting down its operation, most likely due to funding crunch and monetisation challenges.

Founded in 2021 by Eren Gölge, Josh Meyer, Kelly Davis, Reuben Morais, the company specialises in building open source models and applications in the area of quick voice cloning, text-to-voice, etc. The former employees of Mozilla, left the company after it stopped developing their own Speech-to-text engine, DeepSpeech to begin Coqui.

The shutting down of the company comes as a surprise as it had raised a funding of $3.3M in March last year. Morais announced the end of the company to their subscribers through e-mail in early December saying, “We have made the difficult decision to discontinue our paid SaaS web application and REST API services. This means that our servers will be going offline in 14 days, on December 11th, 2023.”

The company had also announced the launch of XTTS on September 14th last year, open sourcing the Text-to-speech (TTS) foundation model. It is capable of generating speech in 13 languages and features voice cloning, including cross-language voice cloning. Coqui, in collaboration with Heather Meeker, introduced the Coqui Public Model License (CPML) with this release, marking a new approach in model licensing.

According to Gölge, its open source foundation models would still be available on GitHub and HuggingFace for developers to use.

Tough year for start-ups?

The founders gave no specific reason as to why it decided to shut down the company but Gölge responded to a user on GitHub, saying they wanted to focus on “open-source and model development.”

Coqui operated primarily as an open-source project, focusing on developing and providing tools and resources for automatic speech recognition (ASR) and Text-to-Speech (TTS) technologies.

The company democratised access to speech technology by offering free and open-source ASR models, datasets, and training pipelines. This open-source model allowed for wide accessibility and encouraged innovation, as users could modify and distribute the technology freely.

Eventually, Coqui provided commercial services alongside their open-source offerings. These services include consulting, custom model development, and training services to assist businesses in integrating speech technology into their products or operations. This dual approach of open-source and commercial services allowed Coqui to cater to a broad range of users – from individual developers and researchers to large corporations seeking custom solutions.

🔊 Huuuuge News! 🔊
XTTS 1-year Commercial License for $365!
For businesses under $1M in revenue and funding, you can now get state of the art text-to-speech and voice cloning for just a dollar a day.
👇https://t.co/IvEfskyrop
🧵/ pic.twitter.com/T4RQ5T80ml

— coqui (@coqui_ai) December 1, 2023

Its fair pricing which made them popular among users, could be one of the reasons why it was hard to sustain as a business. Christopher Manning, the Director of Stanford tweeted in response to the news, “The lesson is probably that it’s just really hard to succeed as a standalone TTS (or similar lang tech) company.”

It has been a difficult year for AI startups in the past year. “The most difficult year for startups in at least a decade,” Peter Walker, head of insights at Carta, a company that provides financial services for many Silicon Valley, wrote on LinkedIn.

The venture capital industry is currently facing a challenging time. At the forefront of these challenges are the notable shifts in leadership at prominent venture capital firms, coupled with a slowdown in the pace of deal-making.

In response to this, seed stage startups receive smaller funds, while the venture capital sector is taking a more cautious approach adopted by limited partners in their investment strategies.

There is a lot of pressure on new startups to quickly build a business model and be profitable. Sridhar Ramaswamy, Senior VP of AI and the former founder of Neeva told AIM, “Some companies are raising a lot of money, but I think they have to quickly show the business value of what they are doing.” His own company, Neeva, which began as an ambitious endeavour in the search engine space was quickly acquired by Snowflake after it got shut down abruptly.

The post Conversational AI Startup Coqui Shuts Down appeared first on Analytics India Magazine.