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, WA, Seattle
This role sits within Amazon's Automated Reasoning and Formal Verification research horizon. Shape the Future of Cloud Computing. Are you a graduate student passionate about Automated Reasoning and its real-world applications? Join our team of innovators and embark on a journey to revolutionize cloud computing through innovative automated reasoning techniques. Our tools are called billions of times daily, powering the backbone of Amazon's products and services. We are changing the way computer systems are developed and operated, raising the bar for security, durability, availability, and quality. Applied Scientists in Automated Reasoning develop and apply formal methods, automated reasoning techniques, and neurosymbolic approaches to ensure the security, reliability, and correctness of Amazon and AWS services and customer applications. Application areas span cloud infrastructure verification, cryptographic assurance, AI safety, and formal guarantees for generative AI systems. Methods range from interactive theorem proving and constraint solving to neuro-inspired proof search. As an Applied Science Intern, you will have the opportunity to work alongside our scientists and contribute to projects. From distributed proof search and SAT/SMT solvers to program analysis, synthesis, and verification, you will tackle complex challenges at the intersection of theory and practice. Amazon has positions available for Automated Reasoning Applied Science Internships in, but not limited to, Arlington, VA; Boston, MA; New York, NY; Portland, OR; Santa Clara, CA; Seattle, WA. Key job responsibilities We are particularly interested in candidates with expertise in: Theorem Proving, Boolean Satisfiability Solvers, Bounded Model Checking, Deductive Verification, Programming/Scripting Languages, Abstract Interpretation, Automated Reasoning, Static/Program Analysis, Program Synthesis. Contribute to the design and implementation of algorithms and formal methods for automated reasoning, including constraint solving, model checking, static analysis, theorem proving, and program synthesis, within a guided research framework. Explore and apply generative AI and machine learning techniques to enhance automated reasoning, including learning-based heuristics for search, neural approaches to symbolic reasoning, and methods for verifying the correctness of AI-generated code. Contribute to automated reasoning techniques for generative AI and agentic coding systems, including methods that apply formal guarantees to large language model outputs. Contribute to the scientific community through publications at peer-reviewed conferences and journals. Leverage AI-powered tools where applicable to accelerate research, experimentation, and prototyping. Critically review and validate outputs from AI tools and automated systems. The ideal intern must have the ability to communicate research findings clearly to diverse audiences.
US, WA, Seattle
We are looking for a talented, organized, and customer-focused applied researcher to join our Pricing Optimization science group, with a charter to measure, refine, and launch customer-obsessed improvements to our algorithmic pricing and promotion models across all products listed on Amazon. This role requires an individual with exceptional machine learning modeling and architecture expertise — particularly in deep learning, neural networks, and transformer-based architectures applied to price prediction and forecasting problems. Equally important is deep expertise in causal machine learning — including causal inference, treatment-effect estimation, and experimentation methods (e.g., uplift modeling, double/debiased machine learning, instrumental variables, and A/B and quasi-experimental design) — to isolate the true impact of pricing and promotion decisions on customer behavior and business outcomes. The ideal candidate brings a strong foundation in applied statistics and probabilistic modeling, excellent cross-functional collaboration skills, business acumen, and an entrepreneurial spirit. We are looking for an experienced innovator who is a self-starter, comfortable with ambiguity, demonstrates strong attention to detail, and has the ability to work in a fast-paced and ever-changing environment. Key job responsibilities See the big picture. Understand and influence the long-term vision for Amazon's science-based competitive, perception-preserving pricing techniques. Develop and advance price prediction models leveraging deep learning frameworks, transformer architectures, and advanced statistical methods to drive pricing accuracy at scale. Build strong collaborations. Partner with product, engineering, and science teams within Pricing & Promotions to deploy machine learning price estimation and error correction solutions at Amazon scale. Design and implement neural network-based architectures — including sequence models and transformers — for large-scale price prediction and optimization. Stay informed. Establish mechanisms to stay up to date on the latest scientific advancements in deep learning, transformer architectures, applied statistics, neural network design, probabilistic forecasting, and multi-objective optimization techniques. Identify opportunities to apply them to relevant Pricing & Promotions business problems. Keep innovating for our customers. Foster an environment that promotes rapid experimentation, continuous learning, and incremental value delivery. Leverage statistical rigor and modern deep learning approaches to validate hypotheses and drive measurable pricing improvements. Successfully execute & deliver. Apply your exceptional technical machine learning expertise — including deep neural networks, attention-based models, and applied statistical analysis — to incrementally move the needle on some of our hardest pricing problems. A day in the life We are hiring a Sr. Applied Scientist to drive our pricing optimization initiatives. We drive cross-domain and cross-system improvements through: * shape and extend our RL optimization platform - a pricing centric tool that automates the optimization of various system parameters and price inputs. * Error detection and price quality guardrails at scale. * Identifying opportunities to optimally price across systems and contexts (marketplaces, request types, event periods) Price is a highly relevant input into Stores architectures; this role creates the opportunity to drive extremely large impact (measured in Bs not Ms), but demands careful thought and clear communication. About the team The Pricing Optimization science group builds and refines Amazon's algorithmic pricing and promotion models at scale. Our team combines expertise in deep learning, transformer architectures, applied statistics, and probabilistic forecasting to develop price prediction systems that directly impact the customer experience. The team also brings hands-on experience with causal modeling and inference — including uplift modeling and treatment effect estimation — to rigorously measure the impact of pricing decisions on customer behavior and business outcomes. We partner closely with product, engineering, and business teams to take solutions from research through production deployment.
US, NY, New York
We are seeking an Applied Scientist to lead the development of evaluation frameworks and data collection protocols for robotic capabilities. In this role, you will focus on designing how we measure, stress-test, and improve robot behavior across a wide range of real-world tasks. Your work will play a critical role in shaping how policies are validated and how high-quality datasets are generated to accelerate system performance. You will operate at the intersection of robotics, machine learning, and human-in-the-loop systems, building the infrastructure and methodologies that connect teleoperation, evaluation, and learning. This includes developing evaluation policies, defining task structures, and contributing to operator-facing interfaces that enable scalable and reliable data collection. The ideal candidate is highly experimental, systems-oriented, and comfortable working across software, robotics, and data pipelines, with a strong focus on turning ambiguous capability goals into measurable and actionable evaluation systems. Key job responsibilities - Design and implement evaluation frameworks to measure robot capabilities across structured tasks, edge cases, and real-world scenarios - Develop task definitions, success criteria, and benchmarking methodologies that enable consistent and reproducible evaluation of policies - Create and refine data collection protocols that generate high-quality, task-relevant datasets aligned with model development needs - Build and iterate on teleoperation workflows and operator interfaces to support efficient, reliable, and scalable data collection - Analyze evaluation results and collected data to identify performance gaps, failure modes, and opportunities for targeted data collection - Collaborate with engineering teams to integrate evaluation tooling, logging systems, and data pipelines into the broader robotics stack - Stay current with advances in robotics, evaluation methodologies, and human-in-the-loop learning to continuously improve internal approaches - Lead technical projects from conception through production deployment - Mentor junior scientists and engineers About the team Fauna Robotics, an Amazon company, is building capable, safe, and genuinely delightful robots for everyday life. Our goal is simple: make robots people actually want to live and interact with in everyday human spaces. We believe that future won’t arrive until building for robotics becomes far more accessible. Today, too much effort is spent reinventing the fundamentals. We’re changing that by developing tightly integrated hardware and software systems that make it faster, safer, and more intuitive to create real-world robotic products. Our work spans the full stack: mechanical design, control systems, dynamic modeling, and intelligent software. The focus is not just functionality, but experience. We’re building robots that feel responsive, expressive, and genuinely useful. At Fauna, you’ll work at the frontier of this space, helping define how robots move, manipulate, and interact with people in natural environments. It’s an opportunity to solve hard problems across hardware and software with a team focused on making robotics accessible and joyful to build. If you care about making robotics real for everyone and building systems that are as delightful as they are capable, we’re interested in hearing from you.
IN, KA, Bangalore
Have you ever ordered a product on Amazon and when that box with the smile arrived you wondered how it got to you so fast? Have you wondered where it came from and how much it cost Amazon to deliver it to you? If so, the WW Amazon Logistics, Business Analytics team is for you. We manage the delivery of tens of millions of products every week to Amazon’s customers, achieving on-time delivery in a cost-effective manner. We are looking for an enthusiastic, customer obsessed, Sr. Applied Scientist with good analytical skills to help manage projects and operations, implement scheduling solutions, improve metrics, and develop scalable processes and tools. The primary role of an Operations Research Scientist within Amazon is to address business challenges through building a compelling case, and using data to influence change across the organization. This individual will be given responsibility on their first day to own those business challenges and the autonomy to think strategically and make data driven decisions. Decisions and tools made in this role will have significant impact to the customer experience, as it will have a major impact on how the final phase of delivery is done at Amazon. Ideal candidates will be a high potential, strategic and analytic graduate with a PhD in (Operations Research, Statistics, Engineering, and Supply Chain) ready for challenging opportunities in the core of our world class operations space. Great candidates have a history of operations research, and the ability to use data and research to make changes. This role requires robust program management skills and research science skills in order to act on research outcomes. This individual will need to be able to work with a team, but also be comfortable making decisions independently, in what is often times an ambiguous environment. Responsibilities may include: - Develop input and assumptions based preexisting models to estimate the costs and savings opportunities associated with varying levels of network growth and operations - Creating metrics to measure business performance, identify root causes and trends, and prescribe action plans - Managing multiple projects simultaneously - Working with technology teams and product managers to develop new tools and systems to support the growth of the business - Communicating with and supporting various internal stakeholders and external audiences
US, CA, Palo Alto
About Sponsored Products and Brands The Sponsored Products and Brands team at Amazon Ads is re-imagining the advertising landscape through generative AI technologies, revolutionizing how millions of customers discover products and engage with brands across Amazon.com and beyond. We are at the forefront of re-inventing advertising experiences, bridging human creativity with artificial intelligence to transform every aspect of the advertising lifecycle from ad creation and optimization to performance analysis and customer insights. We are a passionate group of innovators dedicated to developing responsible and intelligent AI technologies that balance the needs of advertisers, enhance the shopping experience, and strengthen the marketplace. If you're energized by solving complex challenges and pushing the boundaries of what's possible with AI, join us in shaping the future of advertising. Key job responsibilities As a Machine Learning Applied Scientist, you will: * Conduct deep data analysis to derive insights to the business, and identify gaps and new opportunities * Develop scalable and effective machine-learning models and optimization strategies to solve business problems * Run regular A/B experiments, gather data, and perform statistical analysis * Work closely with software engineers to deliver end-to-end solutions into production * Improve the scalability, efficiency and automation of large-scale data analytics, model training, deployment and serving * Conduct research on new machine-learning modeling and Generative AI solutions to optimize all aspects of Sponsored Products and Brands business About the team The Ad Response Prediction team within Sponsored Products and Brands (SPB) drives personalized shopping experiences for SPB Ads across placements, pages, and devices worldwide. We achieve this through ML and GenAI solutions that include customized shopper response prediction and session-level understanding to optimize every stage of the ad-serving process, from sourcing and bidding to widget discovery and auctions. Our responsibilities include advancing response prediction through model and feature innovations and extending prediction beyond the auction stage to areas such as targeting, sourcing, and bidding.
US, NY, New York
We are seeking a Measurement and Attribution Analytics scientist to further the development and application of analytics methods to examine the complex data flows of measurement, attribution and shopper analytics and to translate deep-dives into actionable insights for our product teams. In this role you will develop new tools to analyze our advertising data to help improve the performance of our bidding algorithms, targeting and relevance systems, help advance our supply strategy, and evaluate the adoption and impact of feature releases. Key job responsibilities - Analyze data trends regarding supply, optimization, ad load, and advertising mix effects that affect advertiser performance and contribute to achieving advertiser goals. - Present papers to senior leaders on issues like feature development impact on identity recognition rates, and changes of ad selection systems to improve fill rate highlighting insights that will inform our business development and engineering roadmaps. - Identify, standardize, and operationalize KPIs to effectively measure the performance of all systems involved in ad serving, and use trend insights to inform business priorities. - Partner with engineering teams to define data logging requirements and getting these prioritized in engineering roadmaps. - Validate financial models through analysis - Develop and own ad revenue and supply intelligence analytics decks that provide ongoing deep-dives A day in the life The Measurement and Attribution Scientist will work closely with business leaders and engineers on developing common data architecture that will optimize our data logging at different grains, and will allow data interoperability from bid flow to optimization to campaign delivery. There will be an emphasis on understanding the impact of shopper journeys to and from Amazon properties and their implication on product development. The candidate will then analyze the data and present papers and ongoing reports on actionable insights. About the team The Ads Science Product Team's Mission: Work alongside those who need product data to apply objective perspective and business logic to uncover insights, advise strategic decisions, and adjust to industry changes.
IN, KA, Bangalore
Does the thought of improving one of the world’s most complex logistic systems inspire you? Is your passion to sift through hundreds of systems, processes, and data sources to solve the puzzle and identify the next big opportunity? Are you a creative big thinker who is passionate about using data to direct decision making and solve complex and large-scale challenges? Are you fascinated by the interactions between operations and strategy? Do you feel like your skills uniquely qualify you to bridge communication between teams with competing priorities? If so, then this position is for you! Come help Amazon create state-of-the-art science-driven technologies for delivering packages to the doorstep of our customers! The Last Mile Routing & Planning organization builds the software, algorithms and tools that make the “magic” of home delivery happen: our flow, sort, dispatch and routing intelligence systems are responsible for the billions of daily decisions needed to plan and execute safe, efficient and frustration-free routes for drivers around the world. Our team supports deliveries (and pickups!) for Amazon Logistics, Same Day, Amazon Grocery, Lockers, and other new initiatives across the world. Key job responsibilities In this role, your main focus will be to apply algorithms, synthesize information, identify business opportunities, provide data-driven insights and communicate business and technical requirements within the team and across stakeholder groups. You will partner closely with other scientists and engineers in a collegial environment with a clear path to business impact. We have an exciting portfolio of research areas including vehicle routing, planning for electric and autonomous vehicles, district and stops planning, ultra-fast deliveries, fleet planning, and forecasting solutions for different delivery programs leveraging the latest OR, ML, and Generative AI methods, at a global scale. Successful candidates will have a deep knowledge of Operations Research and/or Machine/Deep Learning methods, experience in applying these methods to large-scale business problems, the ability to map models into production-worthy code in Python or Java, the communication skills necessary to explain complex technical approaches to a variety of stakeholders and customers, and the excitement to take iterative approaches to tackle big research challenges.
US, VA, Arlington
Amazon Web Services (AWS) is the world leader in providing a highly reliable, scalable, low-cost infrastructure platform in the cloud that powers hundreds of thousands of businesses in 190 countries around the world! Passionate about building, owning and operating massively scalable systems? Want to make a billion-dollar impact? If so, we have an exciting opportunity for you. The AWS Managed Operations (MO) organization was founded in April 2023, with the objective to reduce operational load and toil through long-term engineering projects. MO is building the best-in-class engineering and operations team that will own the day-to-day operations for AWS Regions, improving the availability, reliability, latency, performance and efficiency to operate AWS regions. The AWS Managed Operations Intelligence (MOI) Team is looking for a Data Scientist to lead the research and thought leadership to drive our data and insight strategy for AWS. You will be expected to serve as a Full Stack Data Scientist. You will be responsible for driving data-driven transformation across the organization. In this role, you will be responsible for the end-to-end data science lifecycle, from data exploration, ETL, model development and data visualization. You will leverage a broad set of tools and technologies, including general analytical frameworks (Spark, Airflow, etc.), AI frameworks (Hugging Face, etc.) and various machine learning frameworks, to tackle complex business problems. Your analytics research will provide direction on the technology strategy of the Managed Operations organization. Your Decision Science artifacts will provide insights that inform AWS' Operations and Site Reliability Engineering teams. You will work on ambiguous and complex business and research science problems at scale, and you are comfortable working with cross-functional teams and systems. By working together on behalf of our customers, we are building the future one innovative product, service, and idea at a time. Are you ready to embrace the challenge? Come build the future with us. Key job responsibilities - Work with large and complex data sets to solve a wide array of challenging problems using different analytical approaches - Develop ML/AI models. Partner with software teams to productionalize these models. - Data Pipeline and Infrastructure: design and implementation of data pipelines - Metric Development and Monitoring: Define and develop advanced, customized metrics and key performance indicators (KPIs) that capture the nuances of the organization's strategic objectives and operational complexities. Continuously monitor and evaluate the performance of metrics A day in the life Why AWS? Our team is dedicated to supporting new members. We have a broad mix of experience levels and tenures, and we're building an environment that celebrates knowledge-sharing and mentorship. Our senior members enjoy one-on-one mentoring and thorough, but kind, code reviews. We care about your career growth and strive to assign projects that help our team members develop your engineering expertise so you feel empowered to take on more complex tasks in the future. Diverse Experiences AWS 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. About AWS Amazon Web Services (AWS) is the world's most comprehensive and broadly adopted cloud platform. We pioneered cloud computing and never stopped innovating — that's why customers from the most successful startups to Global 500 companies trust our robust suite of products and services to power their businesses. AWS Infrastructure Services (AIS) AWS Infrastructure Services owns the design, planning, delivery, and operation of all AWS global infrastructure. In other words, we're the people who keep the cloud running. We support all AWS data centers and all of the servers, storage, networking, power, and cooling equipment that ensure our customers have continual access to the innovation they rely on. We work on the most challenging problems, with thousands of variables impacting the supply chain — and we're looking for talented people who want to help. Inclusive Team Culture AWS values curiosity and connection. Our employee-led and company-sponsored affinity groups promote inclusion and empower our people to take pride in what makes us unique. Our inclusion events create stronger, more collaborative teams. Our continual innovation is fueled by the bold ideas, fresh perspectives, and passionate voices our teams bring to everything we do. 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. About the team The Managed Operations Intelligence (MOI) Team helps AWS operate its services across the world. We help monitor AWS operations by providing insights and recommendations on AWS operations.
US, WA, Bellevue
As an Applied Scientist in Amazon Fullfilment Technology, you will lead the development of agentic systems to assist with operational decision making and orchestration. You will work building full agentic systems leveraging multi-agent orchestration, tool use, memory, and action execution. You will train LLMs using a combination of rejection sampling approaches, SFT, continual post-training, and Reinforcement Learning (RL). These systems are deployed to Amazon buildings, and you will also work on rigorous offline and online evaluations. Your work will leverage the latest LLMs to develop capabilities for agentic reasoning, coding and analytics. You will also lead research projects to tackle unsolved problems, mentor interns, and author academic papers to summarize your findings for external publication. Key job responsibilities - Generating training and preference data for specific use cases (reasoning trajectories, tool traces) - Reward modeling and policy optimization for LLMs: DPO, IPO, RLHF/RLAIF with PPO/GRPO, rejection sampling. - Supervised fine-tuning on step-by-step trajectories and tool-use traces - Verbal Reinforcement Learning and Continual Learning - RL for LLMs, Offline RL and off-policy evaluation - Agentic memory/state management; episodic and semantic memory; vector search; grounding with RAG. - Evaluation: developing decision quality metrics, scaling LLM-based evaluations. About the team Amazon Fulfillment Technologies (AFT) powers Amazon's global fulfillment network. We invent and deliver software, hardware, and data science solutions that orchestrate processes, robots, machines, and people. We harmonize the physical and virtual world so Amazon customers can get what they want, when they want it. Learn more about AFT: https://tinyurl.com/AFTOverview
US, WA, Bellevue
As an Applied Scientist in Amazon Fullfilment Technology, you will lead the development of agentic systems to assist with operational decision making and orchestration. You will work building full agentic systems leveraging multi-agent orchestration, tool use, memory, and action execution. You will train LLMs using a combination of rejection sampling approaches, SFT, continual post-training, and Reinforcement Learning (RL). These systems are deployed to Amazon buildings, and you will also work on rigorous offline and online evaluations. Your work will leverage the latest LLMs to develop capabilities for agentic reasoning, coding and analytics. You will also lead research projects to tackle unsolved problems, mentor interns, and author academic papers to summarize your findings for external publication. Key job responsibilities - Generating training and preference data for specific use cases (reasoning trajectories, tool traces) - Reward modeling and policy optimization for LLMs: DPO, IPO, RLHF/RLAIF with PPO/GRPO, rejection sampling. - Supervised fine-tuning on step-by-step trajectories and tool-use traces - Verbal Reinforcement Learning and Continual Learning - RL for LLMs, Offline RL and off-policy evaluation - Agentic memory/state management; episodic and semantic memory; vector search; grounding with RAG. - Evaluation: developing decision quality metrics, scaling LLM-based evaluations. About the team Amazon Fulfillment Technologies (AFT) powers Amazon's global fulfillment network. We invent and deliver software, hardware, and data science solutions that orchestrate processes, robots, machines, and people. We harmonize the physical and virtual world so Amazon customers can get what they want, when they want it. Learn more about AFT: https://tinyurl.com/AFTOverview