batch inference
DRQA: Dynamic Reasoning Quota Allocation for Controlling Overthinking in Reasoning Large Language Models
Yan, Kaiwen, Shi, Xuanqing, Guo, Hongcheng, Wang, Wenxuan, Zhang, Zhuosheng, Qin, Chengwei
Reasoning large language models (RLLMs), such as OpenAI-O3 and DeepSeek-R1, have recently demonstrated remarkable capabilities by performing structured and multi-step reasoning. However, recent studies reveal that RLLMs often suffer from overthinking, i.e., producing unnecessarily lengthy reasoning chains even for simple questions, leading to excessive token consumption and computational inefficiency. Interestingly, we observe that when processing multiple questions in batch mode, RLLMs exhibit more resource-efficient behavior by dynamically compressing reasoning steps for easier problems, due to implicit resource competition. Inspired by this, we propose Dynamic Reasoning Quota Allocation (DRQA), a novel method that transfers the benefits of resource competition from batch processing to single-question inference. Specifically, DRQA leverages batch-generated preference data and reinforcement learning to train the model to allocate reasoning resources adaptively. By encouraging the model to internalize a preference for responses that are both accurate and concise, DRQA enables it to generate concise answers for simple questions while retaining sufficient reasoning depth for more challenging ones. Extensive experiments on a wide range of mathematical and scientific reasoning benchmarks demonstrate that DRQA significantly reduces token usage while maintaining, and in many cases improving, answer accuracy. By effectively mitigating the overthinking problem, DRQA offers a promising direction for more efficient and scalable deployment of RLLMs, and we hope it inspires further exploration into fine-grained control of reasoning behaviors.
DVAGen: Dynamic Vocabulary Augmented Generation
Du, Wei, Liu, Nuowei, Wang, Jie, Kuang, Jiahao, Ji, Tao, Wang, Xiaoling, Wu, Yuanbin
Language models trained with a fixed vocabulary struggle to generalize to novel or out-of-vocabulary words, limiting their flexibility in handling diverse token combinations. Existing dynamic vocabulary approaches attempt to address this limitation but face challenges such as fragmented codebases, lack of support for modern LLMs, and limited inference scalability. To overcome these issues, we introduce DVAGen, a fully open-source, unified framework designed for training, evaluation, and visualization of dynamic vocabulary-augmented language models. Our framework modularizes the pipeline for ease of customization, integrates seamlessly with open-source LLMs, and is the first to provide both CLI and WebUI tools for real-time result inspection. We validate the effectiveness of dynamic vocabulary methods on modern LLMs and demonstrate support for batch inference, significantly improving inference throughput.
AntBatchInfer: Elastic Batch Inference in the Kubernetes Cluster
Li, Siyuan, Xiao, Youshao, Meng, Fanzhuang, Ju, Lin, Liang, Lei, Wang, Lin, Zhou, Jun
Offline batch inference is a common task in the industry for deep learning applications, but it can be challenging to ensure stability and performance when dealing with large amounts of data and complicated inference pipelines. This paper demonstrated AntBatchInfer, an elastic batch inference framework, which is specially optimized for the non-dedicated cluster. AntBatchInfer addresses these challenges by providing multi-level fault-tolerant capabilities, enabling the stable execution of versatile and long-running inference tasks. It also improves inference efficiency by pipelining, intra-node, and inter-node scaling. It further optimizes the performance in complicated multiple-model batch inference scenarios. Through extensive experiments and real-world statistics, we demonstrate the superiority of our framework in terms of stability and efficiency. In the experiment, it outperforms the baseline by at least $2\times$ and $6\times$ in the single-model or multiple-model batch inference. Also, it is widely used at Ant Group, with thousands of daily jobs from various scenarios, including DLRM, CV, and NLP, which proves its practicability in the industry.
Embodied Self-Supervised Learning (EMSSL) with Sampling and Training Coordination for Robot Arm Inverse Kinematics Model Learning
Weiming, Qu, Tianlin, Liu, Xihong, Wu, Dingsheng, Luo
Forward and inverse kinematics models are fundamental to robot arms, serving as the basis for the robot arm's operational tasks. However, in model learning of robot arms, especially in the presence of redundant degrees of freedom, inverse model learning is more challenging than forward model learning due to the non-convex problem caused by multiple solutions. In this paper, we propose a framework for autonomous learning of the robot arm inverse model based on embodied self-supervised learning (EMSSL) with sampling and training coordination. We investigate batch inference and parallel computation strategies for data sampling in order to accelerate model learning and propose two approaches for fast adaptation of the robot arm model. A series of experiments demonstrate the effectiveness of the method we proposed. The related code will be available soon.
Databricks End-To-End Machine Learning - Create An Ingest-To-Serving MLOps Pipeline
Create a Python notebook in your Databricks workspace and attach it to a suitable Databricks ML cluster. I'm only using Scala in the following steps because it appeared to be the easiest way to get the data from the public CDC URL into a Spark dataframe without having to download files locally. This can be done in a Databricks Python notebook by using the Scala magic command %scala at the top of each cell with Scala code. All the actual Machine Learning code later on will be written in Python. I am going to use Databricks AutoML in the next step which does its own training/evaluation/test split so the above is mainly to have some data for testing (holdout) the best AutoML model after it has been created on data that the AutoML process has not seen at all yet.
Best practices in the deployment of AI models
AI model deployment is very important in the life cycle of an AI project. Though AI model is at the core of any AI project, only after the proper deployment the AI model will make true sense. The process of taking a trained ML/AI model and making it's predictions available to the users and other systems is known as "deployment". Let's start from the initiation of an AI project till deployment and look at the best practices in AI model deployment. If a data scientist wants to use scikit-learn models, he just needs to subclass the Model class and implement the necessary methods.
Machine Learning with Docker and Kubernetes: Batch Inference
You can find all the files used in this chapter on GitHub. Compared to our previous Dockerfile, we just added inference.py Here, we will download our previously trained models (Linear discriminant analysis and a multi-layer perceptron neural network) stored in a specified directory (/home/xavi/output) from a remote server (192.168.1.11) Once the image is successfully uploaded to the registry, we go to our project directory (connect to kubmaster) and create a configuration file, inference.yaml, We are finally ready to get our application running on Kubernetes.
Scaling a Massive State-of-the-art Deep Learning Model in Production - KDnuggets
Last week, at Hugging Face, we launched a new groundbreaking text editor app. It's different from traditional text editors in that an NLP model can complete your sentences if you ask it to, bringing a new dimension to "writing with a machine." It's based on GPT-2, OpenAI's language model that can generate syntactically accurate sentences and coherent paragraphs of text. Write with transformer is to writing what calculators are to calculus. This model is part of the latest trends in NLP, which revolve around creating very large language models that obtain excellent results on a variety of tasks when fine-tuned on those specific tasks.
Part II -- Artificial Intelligence: Successfully Navigating from Experimentation to Business Value
This is the second of a three-part series on structured experimentation in Artificial Intelligence (AI). In this article I will explain why and how we use two tools in our R&D Data Science team. Please see the first article for an introduction to the subject. Having set our vision and goals, we looked for methodologies and tools that could help us achieve them. We quickly realised that choosing just one solution that does everything wasn't going to work.