Large Language Model
SwiftKV: Fast Prefill-Optimized Inference with Knowledge-Preserving Model Transformation
Qiao, Aurick, Yao, Zhewei, Rajbhandari, Samyam, He, Yuxiong
LLM inference for popular enterprise use cases, such as summarization, RAG, and code-generation, typically observes orders of magnitude longer prompt lengths than generation lengths. This characteristic leads to high cost of prefill and increased response latency. In this paper, we present SwiftKV, a novel model transformation and distillation procedure specifically designed to reduce the time and cost of processing prompt tokens while preserving high quality of generated tokens. SwiftKV combines three key mechanisms: i) SingleInputKV, which prefills later layers' KV cache using a much earlier layer's output, allowing prompt tokens to skip much of the model computation, ii) AcrossKV, which merges the KV caches of neighboring layers to reduce the memory footprint and support larger batch size for higher throughput, and iii) a knowledge-preserving distillation procedure that can adapt existing LLMs for SwiftKV with minimal accuracy impact and low compute and data requirement. For Llama-3.1-8B and 70B, SwiftKV reduces the compute requirement of prefill by 50% and the memory requirement of the KV cache by 62.5% while incurring minimum quality degradation across a wide range of tasks. In the end-to-end inference serving using an optimized vLLM implementation, SwiftKV realizes up to 2 higher aggregate throughput and 60% lower time per output token. It can achieve a staggering 560 TFlops/GPU of normalized inference throughput, which translates to 16K tokens/s for Llama-3.1-70B in 16-bit precision on 4 H100 GPUs. While it is clear that LLMs can add value to these applications, the cost and speed of inference determine their practicality. Therefore, improving the aggregate throughput and reducing latency of LLM inference has become an increasingly important topic of interest, with various efforts (Sec. In this paper, we take a unique approach to improving LLM inference for enterprise applications based on the key observation that typical enterprise workloads process many more input tokens than output tokens. For example, tasks like code completion, text-to-SQL, summarization and RAG each submit long prompts but produce a small number of generated tokens, and a majority of enterprise LLM use cases in Snowflake incur a 10:1 ratio between prompt and generated tokens. After distillation, the KV cache of layers 5-8 can all be populated using the hidden state outputs of layer 4. For prefill tokens, the query, attention, and MLP operations of layers 5-8 may be skipped altogether, while decode tokens complete all layers. Existing models may be efficiently adapted for SwiftKV by distilling from the original unmodified model using a small dataset.
A Little Goes a Long Way: Efficient Long Context Training and Inference with Partial Contexts
Ge, Suyu, Lin, Xihui, Zhang, Yunan, Han, Jiawei, Peng, Hao
Training and serving long-context large language models (LLMs) incurs substantial overhead. To address this, two critical steps are often required: a pretrained LLM typically undergoes a separate stage for context length extension by training on long-context data, followed by architectural modifications to reduce the overhead of KV cache during serving. This paper argues that integrating length extension with a GPU-friendly KV cache reduction architecture not only reduces training overhead during length extension, but also achieves better long-context performance. This leads to our proposed LongGen, which finetunes a pretrained LLM into an efficient architecture during length extension. LongGen builds on three key insights: (1) Sparse attention patterns, such as window attention (attending to recent tokens), attention sink (initial ones), and blockwise sparse attention (strided token blocks) are well-suited for building efficient long-context models, primarily due to their GPU-friendly memory access patterns, enabling efficiency gains not just theoretically but in practice as well. (2) It is essential for the model to have direct access to all tokens. A hybrid architecture with 1/3 full attention layers and 2/3 efficient ones achieves a balanced trade-off between efficiency and long-context performance. (3) Lightweight training on 5B long-context data is sufficient to extend the hybrid model's context length from 4K to 128K. We evaluate LongGen on both Llama-2 7B and Llama-2 70B, demonstrating its effectiveness across different scales. During training with 128K-long contexts, LongGen achieves 1.55x training speedup and reduces wall-clock time by 36%, compared to a full-attention baseline. During inference, LongGen reduces KV cache memory by 62%, achieving 1.67x prefilling speedup and 1.41x decoding speedup.
Molmo and PixMo: Open Weights and Open Data for State-of-the-Art Vision-Language Models
Deitke, Matt, Clark, Christopher, Lee, Sangho, Tripathi, Rohun, Yang, Yue, Park, Jae Sung, Salehi, Mohammadreza, Muennighoff, Niklas, Lo, Kyle, Soldaini, Luca, Lu, Jiasen, Anderson, Taira, Bransom, Erin, Ehsani, Kiana, Ngo, Huong, Chen, YenSung, Patel, Ajay, Yatskar, Mark, Callison-Burch, Chris, Head, Andrew, Hendrix, Rose, Bastani, Favyen, VanderBilt, Eli, Lambert, Nathan, Chou, Yvonne, Chheda, Arnavi, Sparks, Jenna, Skjonsberg, Sam, Schmitz, Michael, Sarnat, Aaron, Bischoff, Byron, Walsh, Pete, Newell, Chris, Wolters, Piper, Gupta, Tanmay, Zeng, Kuo-Hao, Borchardt, Jon, Groeneveld, Dirk, Nam, Crystal, Lebrecht, Sophie, Wittlif, Caitlin, Schoenick, Carissa, Michel, Oscar, Krishna, Ranjay, Weihs, Luca, Smith, Noah A., Hajishirzi, Hannaneh, Girshick, Ross, Farhadi, Ali, Kembhavi, Aniruddha
Today's most advanced vision-language models (VLMs) remain proprietary. The strongest open-weight models rely heavily on synthetic data from proprietary VLMs to achieve good performance, effectively distilling these closed VLMs into open ones. As a result, the community has been missing foundational knowledge about how to build performant VLMs from scratch. We present Molmo, a new family of VLMs that are state-of-the-art in their class of openness. Our key contribution is a collection of new datasets called PixMo, including a dataset of highly detailed image captions for pre-training, a free-form image Q&A dataset for fine-tuning, and an innovative 2D pointing dataset, all collected without the use of external VLMs. The success of our approach relies on careful modeling choices, a well-tuned training pipeline, and, most critically, the quality of our newly collected datasets. Our best-in-class 72B model not only outperforms others in the class of open weight and data models, but also outperforms larger proprietary models including Claude 3.5 Sonnet, and Gemini 1.5 Pro and Flash, second only to GPT-4o based on both academic benchmarks and on a large human evaluation. Our model weights, new datasets, and source code are available at https://molmo.allenai.org/blog.
Introducing the Large Medical Model: State of the art healthcare cost and risk prediction with transformers trained on patient event sequences
Sahu, Ricky, Marriott, Eric, Siegel, Ethan, Wagner, David, Uzan, Flore, Yang, Troy, Javed, Asim
With U.S. healthcare spending approaching $5T (NHE Fact Sheet 2024), and 25% of it estimated to be wasteful (Waste in the US the health care system: estimated costs and potential for savings, n.d.), the need to better predict risk and optimal patient care is evermore important. This paper introduces the Large Medical Model (LMM), a generative pre-trained transformer (GPT) designed to guide and predict the broad facets of patient care and healthcare administration. The model is trained on medical event sequences from over 140M longitudinal patient claims records with a specialized vocabulary built from medical terminology systems and demonstrates a superior capability to forecast healthcare costs and identify potential risk factors. Through experimentation and validation, we showcase the LMM's proficiency in not only in cost and risk predictions, but also in discerning intricate patterns within complex medical conditions and an ability to identify novel relationships in patient care. The LMM is able to improve both cost prediction by 14.1% over the best commercial models and chronic conditions prediction by 1.9% over the best transformer models in research predicting a broad set of conditions. The LMM is a substantial advancement in healthcare analytics, offering the potential to significantly enhance risk assessment, cost management, and personalized medicine.
OpenAI signs deal with Palmer Luckey's Anduril to develop military AI
OpenAI has partnered with defense startup Anduril Industries to develop AI for the Pentagon. The companies said on Wednesday that they'll combine OpenAI's models, including GPT-4o and OpenAI o1, with Anduril's systems and software to improve the US military's defenses against unpiloted aerial attacks. The deal comes less than a year after OpenAI softened its stance on using its models for military purposes. Although the ChatGPT maker's policies still prohibit its models from developing or using weapons, it deleted a line in January that explicitly banned integrating its tech into "military and warfare" use. The company said at the time it was already working with DARPA on cybersecurity tools.
On Program Synthesis and Large Language Models
Much has been made of the abilities of the new developments in machine intelligence and in particular of what chatbots such as ChatGPT that are based on large language models (LLMs) are capable of. While these new pieces of software are impressive when it comes to generating text, some people in the computing community take this observation much further and, in my opinion, much too far. They claim programming will be a thing of the past. In a January 2023 Communications column, Matt Welsh put forward this opinion: "Programming will be obsolete. I believe the conventional idea of'writing a program' is headed for extinction, and indeed, for all but very specialized applications, most software, as we know it, will be replaced by AI systems that are trained rather than programmed. In situations where one needs a'simple' program (after all, not everything should require a model of hundreds of billions of parameters running on a cluster of GPUs), those programs will, themselves, be generated by an AI rather than coded by hand."14
OpenAI Is Working With Anduril to Supply the US Military With AI
OpenAI, maker of ChatGPT and one of the most prominent artificial intelligence companies in the world, said today that it has entered a partnership with Anduril, a defense startup that makes missiles, drones, and software for the United States military. It marks the latest in a series of similar announcements made recently by major tech companies in Silicon Valley, which has warmed to forming closer ties with the defense industry. "OpenAI builds AI to benefit as many people as possible, and supports US-led efforts to ensure the technology upholds democratic values," Sam Altman, OpenAI's CEO, said in a statement Wednesday. OpenAI's AI models will be used to improve systems used for air defense, Brian Schimpf, co-founder and CEO of Anduril, said in the statement. "Together, we are committed to developing responsible solutions that enable military and intelligence operators to make faster, more accurate decisions in high-pressure situations," he said.
OpenAI's new defense contract completes its military pivot
Today, OpenAI is announcing that its technology will be deployed directly on the battlefield. The company says it will partner with the defense-tech company Anduril, a maker of AI-powered drones, radar systems, and missiles, to help US and allied forces defend against drone attacks. OpenAI will help build AI models that "rapidly synthesize time-sensitive data, reduce the burden on human operators, and improve situational awareness" to take down enemy drones, according to the announcement. Specifics have not been released, but the program will be narrowly focused on defending US personnel and facilities from unmanned aerial threats, according to Liz Bourgeois, an OpenAI spokesperson. "This partnership is consistent with our policies and does not involve leveraging our technology to develop systems designed to harm others," she said.
DeepMind's GenCast AI is really good at forecasting the weather
When Helene made landfall in Florida earlier this year, 234 people lost their lives to the worst hurricane to strike the US mainland since Katarina in 2005. It's natural disasters like that, and their growing intensity due to climate change, that have pushed scientists to develop more accurate weather forecasting systems. On Wednesday, Google's DeepMind division announced what may go down as the most significant advancement in the field in nearly eight decades of work. According to DeepMind, GenCast is not only better at providing daily and extreme weather forecasts than its previous AI weather program, but it also outperforms the best forecasting system in use right now, one that's maintained by the European Center for Medium-Range Weather Forecasts (ECMWF). In tests comparing the 15-day forecasts the two systems generated for weather in 2019, GenCast was, on average, more accurate than ECMWF's ENS system 97.2 percent of the time.
OpenAI may launch Sora, its text-to-video model, very soon
OpenAI will start announcing new features and demos tomorrow for 12 days through livestreams. Sources familiar with the matter told The Verge that these new products will allegedly include OpenAI's long-awaited text-to-video tool, Sora, and a new reasoning model. The announcement for "12 Days of OpenAI", as the company puts it, was made public on X yesterday. The first livestream will broadcast tomorrow, but the announcements themselves remain unconfirmed That said, in addition to the sources that spoke more recently with The Verge, the Wall Street Journal previously reported Sora was likely to come out before the end of 2024. Sora was revealed early this year, and shared with a small group of testers. But 20 or so of those artists leaked the model to the public in protest of "unpaid labor," The Washington Post reported.