Improving LLM pretraining with better data organization

“Best-fit packing” adapts bin-packing to avoid unnecessary truncation of training documents, improving LLM performance across a wide range of tasks and reducing hallucination.

The documents used to train a large language model (LLM) are typically concatenated to form a single “superdocument”, which is then divided into sequences that match the model's context length. This improves training efficiency but often results in unnecessary truncations, where individual documents are broken up across successive sequences.

Related content
Contiguous parameter management and prefetched activation offloading expand the MiCS tool kit.

In paper we’re presenting at this year’s International Conference on Machine Learning (ICML 2024), titled “Fewer truncations improve language modeling”, we report an in-depth study of this common concatenation-chunking document-processing method. We found that it severely impairs the model's ability to understand contextual coherence and factual consistency. This not only affects the model's performance on downstream tasks but also increases the risk of hallucinations.

To address this issue, we propose best-fit packing, an innovative document-processing strategy that optimizes document combinations to eliminate unnecessary text truncations. In experiments, we compared a model trained using best-fit packing to one trained in the ordinary way on six downstream tasks: reading comprehension, natural-language inference, context following, summarization, commonsense and closed-book question answering, and program synthesis. We found that best-fit packing monotonically improves performance on an array of 22 sub-tasks, by as much as 15% (program synthesis) to 17% (context following). Importantly, best-fit packing also reduces closed-domain hallucination effectively by up to 58.3%.

Best-fit packing.png
A comparison of best-fit packing (left), which seeks to minimize document truncation, with the standard approach to large-language-model training, which concatenates training documents and then divides them into fixed-length sequences.

Consequences of truncation

In the analysis reported in our paper, we identified several problems caused by document truncation, including undefined names, ungrounded content, and missing knowledge.

Related content
Prompt engineering enables researchers to generate customized training examples for lightweight “student” models.

Undefined names: In programming languages like Python, truncation may separate definitions of variables from their invocations, introducing syntax errors and causing some variables to be undefined. As a consequence, the model may learn misleading patterns and possibly hallucinate on downstream tasks.

Ungrounded content: Truncation damages data integrity. In the example below, for instance, a reference (“the earthquake on Monday morning”) is separated from its antecedent, resulting in unfaithful generation.

Missing knowledge: Truncation hinders knowledge acquisition. In the example below, the model cannot learn the location of the ICML conference because the conference name and location occur in different training sequences.

Truncation errors.png
Examples of three common truncation errors: (a) undefined names, (b) ungrounded content, and (c) missing knowledge.

Best-fit packing

To address this issue, we propose optimizing the assignment of documents to training sequences so as to eliminate unnecessary truncations, while minimally increasing the number of sequences relative to concatenation. This is a variation of the well-known bin-packing problem, which is NP-hard in general, but we use a heuristic called the best-fit-decreasing (BFD) algorithm that tends to work well in practice. We thus call our method best-fit packing.

The normal implementation of BFD has quasi-linear time complexity, which is not efficient enough for LLM pretraining, which typically involves millions of documents. By taking advantage of the unique nature of pretraining data, however, we were able to optimize BFD so that it scales linearly with data size, ensuring its applicability to large-scale pretraining datasets. Further, we show that in practical applications, best-fit packing generates approximately the same number of training sequences as the traditional method, while significantly reducing data loss caused by truncation.

Truncations per document.png
Truncations per document as a function of document length, for both best-fit packing (pack) and concatenation (concat), for natural-language data (top) and programming-language data (bottom). The natural-language data is evaluated with context lengths of both 2,000 and 8,000.

Curious to know how we achieve it? Let’s dive deep!

Best-fit packing — an example

Following the standard bin-packing nomenclature, we call each training sequence a “bin”, and each bin has a capacity equal to the LLM’s context size. The goal is to assign a combination of whole documents to each bin so as to minimize the wasted bin capacity.

First, we divide any document that’s larger than the LLM context into context-length chunks, plus a remainder. Then we sort the documents (and document fragments) from largest to smallest. Finally, we work our way down the sorted list, assigning each document to the bin whose available space is as close to the document size as possible.

Related content
Novel “checkpointing” scheme that uses CPU memory reduces the time wasted on failure recovery by more than 92%.

To maximize efficiency, we use three data structures to manage the assignment of documents to bins: a binary tree and two tables. We can use this design because (1) the maximum bin size is the model’s context size, so the tree won’t be too deep, and (2) we do not need to distinguish bins with the same remaining capacity, which simplifies the the tree. Instead, we use the tables to map bin capacities to bins.

Consider a simple example, in which the context size (the bin size) is eight. The binary tree has eight leaves, corresponding to the eight possibilities for available space in any given bin. (In a real LLM, the context size is on the order of thousands of tokens, so the tree would have thousands of leaves.)

Each parent node of the tree has an associated number, indicating the size of the largest available bin slot among its descendants. The number associated with the parent’s right child is always greater than or equal to the number associated with the left child.

Initially, the value of the rightmost node in each layer of the tree is eight, and all the other nodes have values of zero. This means that all the available bin slots have a capacity of eight.

Best-fit initialization.png
The initial states of the three data structures we use to implement best-fit packing. The rightmost node of each layer of the tree has a value of eight, and all other nodes have values of zero, indicating that all the bins are empty (i.e., are at maximum capacity).

Now consider a later state, when four documents of size eight, six, six, and four have been packed. The two bins containing documents of size six have available slots of size two (8 – 6), and the bin containing a document of size four has an available slot of size four (8 – 4). These sizes are represented by the numbers two and four at leaves two and four of the tree. Multiple bins remain empty, so leaf eight has a value of eight, too.

Note that the value two at leaf two indicates only that at least one bin slot of size two is available; it doesn’t indicate how many such slots there are or where they can be found. That information is contained in the tables.

Tree after packing.png
The state of the data structures after four documents of sizes six, six, four, and eight have been packed.

Now consider a document of size three, which we wish to assign to a bin. To find the best available bin slot, simply go left at each node of the tree, unless going left leads to a node whose value is less than the document size, in which case, go right.

Document packing.png
Tree traversal identifies the available bin slot that best fits the new document.

The best fit for a document of size three is a slot of size four, and in the “space-to-bins” table, we see that there is one bin — bin three — with a slot of that size. So there we place the document.

Finally, we update all three data structures to reflect the new placement:

Data structure update.png
Data structure updates after the document (item four) of size three has been packed. The tree leaf corresponding to slot sizes of four is reset to zero, and the tree leaf corresponding to slot sizes of one is set to one. The tables are updated accordingly.

Results

To evaluate the effect of bin-packing on downstream tasks, we pretrained models of 7 billion and 13 billion parameters with context lengths of 2,000 and 8,000 on text and code using both best-fit packing and concatenation. We then tested both sets of models on our six downstream tasks. On average, across multiple datasets, context lengths, and metrics, best-fit packing offered better performance on all six tasks. The biggest gains came in reading comprehension (+4.7%), natural-language inference (+9.3%), context following (+16.8%), and program synthesis (+15.0%).

Related content
In a series of papers, Amazon researchers performed a theoretical analysis of a simplified problem that led to a learnable learning-rate scheduler, applied that scheduler to a more complex neural model, and distilled the results into a practical algorithm.

We also found that best-fit packing helped prevent closed-domain hallucination, particularly in program synthesis tasks, where it reduced "undefined name" errors by up to 58.3%, indicating a more complete understanding of program structure and logic.

Additionally, models trained with best-fit packing were better at following instructions, such as adhering to length constraints. And best-fit packing helped the model acquire “tail knowledge” that is truncation sensitive due to scarcity in training data. Indeed, this result suggests a possible reason for why LLMs struggle to learn long-tail knowledge.

While the experiments conducted in our paper primarily focused on LLM pretraining, best-fit packing is broadly applicable to fine tuning as well. Determining the benefits it can offer during fine tuning is an intriguing topic for future study.

Research areas

Related content

US, NY, New York
Are you passionate about solving big problems from ground-up? Do you enjoy building new state-of-the-art products at internet scale? Come lead the innovation in this startup team, vertical ad products. This is a green field problem without a known answer or a pattern to follow. We have ambitious vision to simplify full funnel advertising solutions, at scale, with specialized agentic AI-powered models and diversify the demand to strategic verticals including finserv, autos, locals.. etc. We are seeking an experienced Applied Scientist to drive innovation in our Ads Foundational Model. In this individual contributor role, you will apply advanced machine learning techniques to improve advertiser performance and customer experience. Key job responsibilities As an Applied Scientist on this team, you will: 1. Develop and drive the science strategy for Ads Foundational Model (Ads-FM), aligning it with the program's objectives and overall business goals. 2. Identify high-impact opportunities within Ads-FM program and lead the ideation, planning, and execution of science initiatives to address them. 3. Build and deploy machine learning models using computer vision, natural language processing, and deep learning to evaluate and enhance ad effectiveness. 4. Develop algorithms that extract meaningful signals from image, video, and audio content to predict and improve customer engagement 5. Leverage Amazon's extensive data repository to create predictive models that generate actionable recommendations for more compelling ad creative 6. Collaborate with business leaders and cross-functional teams to implement ML-powered solutions 7. Contribute to the ML roadmap for the Ads-FM program through innovation and research.
IN, KA, Bangalore
Amazon’s Last Mile Team is looking for a passionate individual with strong optimization and analytical skills to join its Last Mile Science team in the endeavor of designing and improving the most complex planning of delivery network in the world. Last Mile builds global solutions that enable Amazon to attract an elastic supply of drivers, companies, and assets needed to deliver Amazon's and other shippers' volumes at the lowest cost and with the best customer delivery experience. Last Mile Science team owns the core decision models in the space of jurisdiction planning, delivery channel and modes network design, capacity planning for on the road and at delivery stations, routing inputs estimation and optimization. Our research has direct impact on customer experience, driver and station associate experience, Delivery Service Partner (DSP)’s success and the sustainable growth of Amazon. Optimizing the last mile delivery requires deep understanding of transportation, supply chain management, pricing strategies and forecasting. Only through innovative and strategic thinking, we will make the right capital investments in technology, assets and infrastructures that allows for long-term success. Our team members have an opportunity to be on the forefront of supply chain thought leadership by working on some of the most difficult problems in the industry with some of the best product managers, scientists, and software engineers in the industry. Key job responsibilities Candidates will be responsible for developing solutions to better manage and optimize delivery capacity in the last mile network. The successful candidate should have solid research experience in one or more technical areas of Operations Research or Machine Learning. These positions will focus on identifying and analyzing opportunities to improve existing algorithms and also on optimizing the system policies across the management of external delivery service providers and internal planning strategies. They require superior logical thinkers who are able to quickly approach large ambiguous problems, turn high-level business requirements into mathematical models, identify the right solution approach, and contribute to the software development for production systems. To support their proposals, candidates should be able to independently mine and analyze data, and be able to use any necessary programming and statistical analysis software to do so. Successful candidates must thrive in fast-paced environments, which encourage collaborative and creative problem solving, be able to measure and estimate risks, constructively critique peer research, and align research focuses with the Amazon's strategic needs. As a senior scientist, you will also help coach/mentor junior scientists in the team.
US, WA, Seattle
This role will contribute to developing the Economics and Science products and services in the Fee domain, with specialization in supply chain systems and fees. Through the lens of economics, you will develop causal links for how Amazon, Sellers and Customers interact. You will be a key and senior scientist, advising Amazon leaders how to price our services. You will work on developing frameworks and scaleable, repeatable models supporting optimal pricing and policy in the two-sided marketplace that is central to Amazon's business. The pricing for Amazon services is complex. You will partner with science and technology teams across Amazon including Advertising, Supply Chain, Operations, Prime, Consumer Pricing, and Finance. We are looking for an experienced Principal Economist to improve our understanding of seller Economics, enhance our ability to estimate the causal impact of fees, and work with partner teams to design pricing policy changes. In this role, you will provide guidance to scientists to develop econometric models to influence our fee pricing worldwide. You will lead the development of causal models to help isolate the impact of fee and policy changes from other business actions, using experiments when possible, or observational data when not. Key job responsibilities The ideal candidate will have extensive Economics knowledge, demonstrated strength in practical and policy relevant structural econometrics, strong collaboration skills, proven ability to lead highly ambiguous and large projects, and a drive to deliver results. They will work closely with Economists, Data / Applied Scientists, Strategy Analysts, Data Engineers, and Product leads to integrate economic insights into policy and systems production. Familiarity with systems and services that constitute seller supply chains is a plus but not required. About the team The Stores Economics and Sciences team is a central science team that supports Amazon's Retail and Supply Chain leadership. We tackle some of Amazon's most challenging economics and machine learning problems, where our mandate is to impact the business on massive scale.
US, CA, Pasadena
The Amazon Center for Quantum Computing in Pasadena, CA, is looking to hire an Applied Scientist specializing in the design of microwave components for use in cryogenic environments. Working alongside other scientists and engineers, you will design and validate hardware performing microwave signal conditioning at cryogenic temperatures for Amazon quantum processors. Working effectively within a cross-functional team environment is critical. The ideal candidate will have a proven track record of hardware development from requirements development to validation. Diverse Experiences Amazon values diverse experiences. Even if you do not meet all of the preferred qualifications and skills listed in the job description, we encourage candidates to apply. If your career is just starting, hasn’t followed a traditional path, or includes alternative experiences, don’t let it stop you from applying. Work/Life Balance We value work-life harmony. Achieving success at work should never come at the expense of sacrifices at home, which is why we strive for flexibility as part of our working culture. When we feel supported in the workplace and at home, there’s nothing we can’t achieve in the cloud. Inclusive Team Culture Here at AWS, it’s in our nature to learn and be curious. Our employee-led affinity groups foster a culture of inclusion that empower us to be proud of our differences. Ongoing events and learning experiences, including our Conversations on Race and Ethnicity (CORE) and AmazeCon (gender diversity) conferences, inspire us to never stop embracing our uniqueness. Mentorship and Career Growth We’re continuously raising our performance bar as we strive to become Earth’s Best Employer. That’s why you’ll find endless knowledge-sharing, mentorship and other career-advancing resources here to help you develop into a better-rounded professional. Key job responsibilities Our scientists and engineers collaborate across diverse teams and projects to offer state of the art, cost effective solutions for the signal conditioning of Amazon quantum processor systems at cryogenic temperatures. You’ll bring a passion for innovation, collaboration, and mentoring to: Solve layered technical problems across our cryogenic signal chain. Develop requirements with key system stakeholders, including quantum device, test and measurement, hardware, and theory teams. Design, implement, test, deploy, and maintain innovative solutions that meet both performance and cost metrics. Research enabling technologies necessary for Amazon reach commercial viability in quantum computing . A day in the life As you research, design, and implement cryogenic microwave signal conditioning solutions, you will also: Participate in requirements, design, and test reviews. Work cross-functionally to help drive decisions using your unique technical background and skill set. Define and maintain standards for operational excellence. Work in a high-paced, startup-like environment where you are provided the resources to innovate quickly.
US, CA, Pasadena
The Amazon Center for Quantum Computing (CQC) team is looking for a passionate, talented, and inventive Research Engineer specializing in hardware design for cryogenic environments. The ideal candidate should have expertise in 3D CAD (SolidWorks), thermal and structural FEA (Ansys/COMSOL), hardware design for cryogenic applications, design for manufacturing, and mechanical engineering principles. The candidate must have demonstrated experience driving designs through full product development cycles (requirements, conceptual design, detailed design, manufacturing, integration, and testing). Candidates must also have a strong background in both cryogenic mechanical engineering theory and implementation. Working effectively within a cross-functional team environment is critical. Key job responsibilities The CQC collaborates across teams and projects to offer state-of-the-art, cost-effective solutions for scaling the signal delivery to quantum processor systems at cryogenic temperatures. Equally important is the ability to scale the thermal performance and improve EMI mitigation of the cryogenic environment. You will work on the following: - High density novel packaging solutions for quantum processor units - Cryogenic mechanical design for novel cryogenic signal conditioning sub-assemblies - Cryogenic mechanical design for signal delivery systems - Simulation-driven designs (shielding, filtering, etc.) to reduce sources of EMI within the qubit environment. - Own end-to-end product development through requirements, design reports, design reviews, assembly/testing documentation, and final delivery A day in the life As you design and implement cryogenic hardware solutions, from requirements definition to deployment, you will also: - Participate in requirements, design, and test reviews and communicate with internal stakeholders - Work cross-functionally to help drive decisions using your unique technical background and skill set - Refine and define standards and processes for operational excellence - Work in a high-paced, startup-like environment where you are provided the resources to innovate quickly About the team The Amazon Center for Quantum Computing (CQC) is a multi-disciplinary team of scientists, engineers, and technicians, on a mission to develop a fault-tolerant quantum computer. Inclusive Team Culture Here at Amazon, it’s in our nature to learn and be curious. Our employee-led affinity groups foster a culture of inclusion that empower us to be proud of our differences. Ongoing events and learning experiences, including our Conversations on Race and Ethnicity (CORE) and AmazeCon conferences, inspire us to never stop embracing our uniqueness. Diverse Experiences Amazon values diverse experiences. Even if you do not meet all of the preferred qualifications and skills listed in the job description, we encourage candidates to apply. If your career is just starting, hasn’t followed a traditional path, or includes alternative experiences, don’t let it stop you from applying. Mentorship & Career Growth We’re continuously raising our performance bar as we strive to become Earth’s Best Employer. That’s why you’ll find endless knowledge-sharing, mentorship and other career-advancing resources here to help you develop into a better-rounded professional. Work/Life Balance We value work-life harmony. Achieving success at work should never come at the expense of sacrifices at home, which is why we strive for flexibility as part of our working culture. When we feel supported in the workplace and at home, there’s nothing we can’t achieve in the cloud. Export Control Requirement Due to applicable export control laws and regulations, candidates must be either a U.S. citizen or national, U.S. permanent resident (i.e., current Green Card holder), or lawfully admitted into the U.S. as a refugee or granted asylum, or be able to obtain a US export license. If you are unsure if you meet these requirements, please apply and Amazon will review your application for eligibility.
IT, Turin
As an Applied Scientist in the Alexa AI team, you will spearhead the advancement and deployment of state-of-the-art ML/RAG systems that revolutionize how millions of customers interact with Alexa. You'll leverage your expertise in machine learning, natural language processing, and large language models to create reliable, scalable, high-performance products that set new standards in operational excellence. Working at the intersection of research and production, you'll translate latest AI innovations into customer-facing features that delight users daily. Your work will span the full ML lifecycle—from analyzing customer behavior patterns and building novel metrics for personal digital assistants, to deploying automated training pipelines and conducting rigorous A/B testing across diverse devices and endpoints. Collaborating closely with business, engineering, and science teams across Amazon, you'll lead high-visibility programs that automate workflows and deliver measurable customer impact. This role offers the unique opportunity to publish at top-tier conferences while seeing your innovations scale to one of the world's most popular voice assistants, serving millions of customers globally. Key job responsibilities As an Applied Scientist in the Alexa AI team: - You'll analyze and model customer behavior at scale, building novel metrics for personal digital assistants across diverse devices and endpoints. Your work will involve creating deep learning, policy-based learning, and machine learning algorithms that directly impact customer experiences, translating complex data patterns into actionable insights that drive product innovation. - Your technical leadership will extend to building and deploying automated model training and evaluation pipelines, implementing complex machine learning and deep learning algorithms, and conducting rigorous model and data analysis through online A/B testing. You'll research and implement novel approaches that push the boundaries of what's possible in conversational AI. - Beyond model development, you'll ensure operational excellence by taking ownership of production systems, including on-call responsibilities during peak and non-peak hours. Working alongside Software Development Engineers, you'll deploy fixes and handle high-severity issues, ensuring our ML systems maintain the reliability and performance that millions of Alexa customers depend on daily. A day in the life As an Applied Scientist in the Alexa AI team, your day will involve collaborating with talented engineers and scientists to build scalable solutions for our conversational assistant. You'll dive into data analysis, experiment with novel algorithms, and iterate on models based on real-time user feedback. Working in a fast-paced, ambiguous environment, you'll tackle complex technical challenges—from debugging production issues to presenting research findings to stakeholders. Your self-motivated approach will drive you to swiftly deliver impactful solutions while maintaining the high standards that define our mission to revolutionize user experiences for millions of customers. About the team The Alexa AI team develops the intelligence behind one of the world's most popular voice assistants, serving millions of customers globally. We're a diverse group of scientists, engineers, and researchers united by our mission to make Alexa more natural, helpful, and delightful. Our culture thrives on innovation, collaboration, and customer obsession. We tackle some of the most challenging problems in conversational AI—from natural language understanding to personalization at scale. Here, you'll work alongside world-class talent, publish at top-tier conferences, and see your innovations impact customers daily. We move fast, think big, and celebrate both successes and learnings.
IT, Turin
As an Applied Scientist in the Alexa AI team, you will spearhead the advancement and deployment of state-of-the-art ML/RAG systems that revolutionize how millions of customers interact with Alexa. You'll leverage your expertise in machine learning, natural language processing, and large language models to create reliable, scalable, high-performance products that set new standards in operational excellence. Working at the intersection of research and production, you'll translate latest AI innovations into customer-facing features that delight users daily. Your work will span the full ML lifecycle—from analyzing customer behavior patterns and building novel metrics for personal digital assistants, to deploying automated training pipelines and conducting rigorous A/B testing across diverse devices and endpoints. Collaborating closely with business, engineering, and science teams across Amazon, you'll lead high-visibility programs that automate workflows and deliver measurable customer impact. This role offers the unique opportunity to publish at top-tier conferences while seeing your innovations scale to one of the world's most popular voice assistants, serving millions of customers globally. Key job responsibilities As an Applied Scientist in the Alexa AI team: - You'll analyze and model customer behavior at scale, building novel metrics for personal digital assistants across diverse devices and endpoints. Your work will involve creating deep learning, policy-based learning, and machine learning algorithms that directly impact customer experiences, translating complex data patterns into actionable insights that drive product innovation. - Your technical leadership will extend to building and deploying automated model training and evaluation pipelines, implementing complex machine learning and deep learning algorithms, and conducting rigorous model and data analysis through online A/B testing. You'll research and implement novel approaches that push the boundaries of what's possible in conversational AI. - Beyond model development, you'll ensure operational excellence by taking ownership of production systems, including on-call responsibilities during peak and non-peak hours. Working alongside Software Development Engineers, you'll deploy fixes and handle high-severity issues, ensuring our ML systems maintain the reliability and performance that millions of Alexa customers depend on daily. A day in the life As an Applied Scientist in the Alexa AI team, your day will involve collaborating with talented engineers and scientists to build scalable solutions for our conversational assistant. You'll dive into data analysis, experiment with novel algorithms, and iterate on models based on real-time user feedback. Working in a fast-paced, ambiguous environment, you'll tackle complex technical challenges—from debugging production issues to presenting research findings to stakeholders. Your self-motivated approach will drive you to swiftly deliver impactful solutions while maintaining the high standards that define our mission to revolutionize user experiences for millions of customers. About the team The Alexa AI team develops the intelligence behind one of the world's most popular voice assistants, serving millions of customers globally. We're a diverse group of scientists, engineers, and researchers united by our mission to make Alexa more natural, helpful, and delightful. Our culture thrives on innovation, collaboration, and customer obsession. We tackle some of the most challenging problems in conversational AI—from natural language understanding to personalization at scale. Here, you'll work alongside world-class talent, publish at top-tier conferences, and see your innovations impact customers daily. We move fast, think big, and celebrate both successes and learnings.
IT, Turin
As an Applied Scientist in the Alexa AI team, you will spearhead the advancement and deployment of state-of-the-art ML/RAG systems that revolutionize how millions of customers interact with Alexa. You'll leverage your expertise in machine learning, natural language processing, and large language models to create reliable, scalable, high-performance products that set new standards in operational excellence. Working at the intersection of research and production, you'll translate latest AI innovations into customer-facing features that delight users daily. Your work will span the full ML lifecycle—from analyzing customer behavior patterns and building novel metrics for personal digital assistants, to deploying automated training pipelines and conducting rigorous A/B testing across diverse devices and endpoints. Collaborating closely with business, engineering, and science teams across Amazon, you'll lead high-visibility programs that automate workflows and deliver measurable customer impact. This role offers the unique opportunity to publish at top-tier conferences while seeing your innovations scale to one of the world's most popular voice assistants, serving millions of customers globally. Key job responsibilities As an Applied Scientist in the Alexa AI team: - You'll analyze and model customer behavior at scale, building novel metrics for personal digital assistants across diverse devices and endpoints. Your work will involve creating deep learning, policy-based learning, and machine learning algorithms that directly impact customer experiences, translating complex data patterns into actionable insights that drive product innovation. - Your technical leadership will extend to building and deploying automated model training and evaluation pipelines, implementing complex machine learning and deep learning algorithms, and conducting rigorous model and data analysis through online A/B testing. You'll research and implement novel approaches that push the boundaries of what's possible in conversational AI. - Beyond model development, you'll ensure operational excellence by taking ownership of production systems, including on-call responsibilities during peak and non-peak hours. Working alongside Software Development Engineers, you'll deploy fixes and handle high-severity issues, ensuring our ML systems maintain the reliability and performance that millions of Alexa customers depend on daily. A day in the life As an Applied Scientist in the Alexa AI team, your day will involve collaborating with talented engineers and scientists to build scalable solutions for our conversational assistant. You'll dive into data analysis, experiment with novel algorithms, and iterate on models based on real-time user feedback. Working in a fast-paced, ambiguous environment, you'll tackle complex technical challenges—from debugging production issues to presenting research findings to stakeholders. Your self-motivated approach will drive you to swiftly deliver impactful solutions while maintaining the high standards that define our mission to revolutionize user experiences for millions of customers. About the team The Alexa AI team develops the intelligence behind one of the world's most popular voice assistants, serving millions of customers globally. We're a diverse group of scientists, engineers, and researchers united by our mission to make Alexa more natural, helpful, and delightful. Our culture thrives on innovation, collaboration, and customer obsession. We tackle some of the most challenging problems in conversational AI—from natural language understanding to personalization at scale. Here, you'll work alongside world-class talent, publish at top-tier conferences, and see your innovations impact customers daily. We move fast, think big, and celebrate both successes and learnings.
IT, Turin
As an Applied Scientist in the Alexa AI team, you will spearhead the advancement and deployment of state-of-the-art ML/RAG systems that revolutionize how millions of customers interact with Alexa. You'll leverage your expertise in machine learning, natural language processing, and large language models to create reliable, scalable, high-performance products that set new standards in operational excellence. Working at the intersection of research and production, you'll translate latest AI innovations into customer-facing features that delight users daily. Your work will span the full ML lifecycle—from analyzing customer behavior patterns and building novel metrics for personal digital assistants, to deploying automated training pipelines and conducting rigorous A/B testing across diverse devices and endpoints. Collaborating closely with business, engineering, and science teams across Amazon, you'll lead high-visibility programs that automate workflows and deliver measurable customer impact. This role offers the unique opportunity to publish at top-tier conferences while seeing your innovations scale to one of the world's most popular voice assistants, serving millions of customers globally. Key job responsibilities As an Applied Scientist in the Alexa AI team: - You'll analyze and model customer behavior at scale, building novel metrics for personal digital assistants across diverse devices and endpoints. Your work will involve creating deep learning, policy-based learning, and machine learning algorithms that directly impact customer experiences, translating complex data patterns into actionable insights that drive product innovation. - Your technical leadership will extend to building and deploying automated model training and evaluation pipelines, implementing complex machine learning and deep learning algorithms, and conducting rigorous model and data analysis through online A/B testing. You'll research and implement novel approaches that push the boundaries of what's possible in conversational AI. - Beyond model development, you'll ensure operational excellence by taking ownership of production systems, including on-call responsibilities during peak and non-peak hours. Working alongside Software Development Engineers, you'll deploy fixes and handle high-severity issues, ensuring our ML systems maintain the reliability and performance that millions of Alexa customers depend on daily. A day in the life As an Applied Scientist in the Alexa AI team, your day will involve collaborating with talented engineers and scientists to build scalable solutions for our conversational assistant. You'll dive into data analysis, experiment with novel algorithms, and iterate on models based on real-time user feedback. Working in a fast-paced, ambiguous environment, you'll tackle complex technical challenges—from debugging production issues to presenting research findings to stakeholders. Your self-motivated approach will drive you to swiftly deliver impactful solutions while maintaining the high standards that define our mission to revolutionize user experiences for millions of customers. About the team The Alexa AI team develops the intelligence behind one of the world's most popular voice assistants, serving millions of customers globally. We're a diverse group of scientists, engineers, and researchers united by our mission to make Alexa more natural, helpful, and delightful. Our culture thrives on innovation, collaboration, and customer obsession. We tackle some of the most challenging problems in conversational AI—from natural language understanding to personalization at scale. Here, you'll work alongside world-class talent, publish at top-tier conferences, and see your innovations impact customers daily. We move fast, think big, and celebrate both successes and learnings.
US, NY, New York
We are seeking a Human-Robot Interaction (HRI) Applied Scientist to develop cutting-edge interactions that make robots feel alive, personal, and fun. In this role, you will focus on verbal and non-verbal conversational systems, social dynamics, memory, and long-term relationship formation between robots, their environments, and the people they interact with. Your contributions will be essential in advancing robotics by enabling expressive, socially intelligent, and trustworthy interactions between robots and humans. Key job responsibilities - Develop interactive systems that leverage large language models, multimodal inputs and outputs, reinforcement learning from human feedback, or other advanced techniques to achieve fluid, engaging, and socially appropriate robot behavior - Design and implement intelligent conversational systems that handle turn-taking, grounding, interruption, and incorporates context drawn from a robot's physical environment and shared history with a user - Integrate perceptual sensor streams including gaze, facial expression, gesture, posture, and more to understand social context and produce coherent, lifelike interactions. - Develop memory and personalization systems that allow robots to form lasting relationships with individual users, learn their environments, and adapt their behavior over weeks and months - Stay updated on advancements in HRI, NLP, multimodal AI, and cognitive and social science to apply cutting-edge techniques to robot interaction challenges - Lead technical projects from conception through production deployment - Mentor junior scientists and engineers - Bridge research initiatives with practical engineering implementation