Join our upcoming webinar “Deriving Business Value from LLMs and RAGs.”
Register now

CTO's guide to SFT and RLHF projects

Thank you for subscribing to our newsletter!
Oops! Something went wrong while submitting the form.

Since the advent of ChatGPT in late 2022, interest in developing and deploying effective large language models (LLMs) has intensified, with enterprises and startups eager to use them. A significant challenge is aligning LLMs with human and business expectations, tailoring these models to behave in ways that users find most beneficial and intuitive. Methods such as supervised fine-tuning (SFT) and reinforcement learning from human feedback (RLHF) are heavily dependent on large, high-quality, human-generated datasets. The creation of such datasets poses significant challenges regarding data volume, quality, diversity, and ethical implications.

Role of style guides in LLM development

Anyone interacting with an LLM quickly realizes that different models behave differently. Some are more chatty, while others are more assistant-like. The behavior suitable for a language model intended for character role-play might differ significantly from what is appropriate in an enterprise environment. As a model creator, well-developed ideas about how you want your model to behave are essential. However, relying on crowdsourcing platforms for data might lead to disappointment as trainers interpret instructions differently, affecting the quality of the data.

When engaging with clients, one of the first steps we take is to create a comprehensive style guide. This style guide outlines the intended model style and behavior in excruciating detail, from how the model refers to itself to what type of paragraph breaks and bullet lists to use to detailing the outline and style of responses. Our style guides can often reach 30-40 pages in length and continue to grow throughout an engagement.

A comprehensive style guide is crucial for directing the training process. It is intended to ensure that everyone involved in the project interprets the intended style and behavior similarly. Creating a style guide is a collaborative effort between the data collection project experts and the large language model team. It often requires input from linguists, domain experts, and sometimes lawyers to ensure it covers every possible nuance.

Finding experts and managing workforce

Managing a large-scale data collection and model evaluation project becomes challenging as it scales up. Ensuring maintenance of quality and consistency across a vast workforce generating large volumes of data items relies heavily on adherence to a detailed style guide.

expert workforce

For SFT and RLHF for LLMs, outsourcing is often necessary due to the scope of work involved. It's crucial to choose a reliable workforce provider as making the wrong choice could lead to significant financial losses and project delays. Key factors in the selection process include domain expertise, project and QA management, collaboration, and scalability.

The challenges of crowdsourcing

Crowdsourcing offers a rapid expansion solution but comes with significant challenges, particularly in managing quality and protecting intellectual property. Our experience has shown that relying solely on crowdsourced labor leads to inconsistent quality. We now prefer employing data trainers directly to ensure a more controlled and efficient environment, allowing us to manage the workforce effectively, enforce non-disclosure agreements, and implement sophisticated project setups alongside rigorous QA processes.

The three C's of data quality

  • Clarity: Adopting an in-house or fully managed trainer model enables more in-depth project analytics. It allows for nuanced performance tracking, training needs identification, and monitoring of quality assurance trends. This clarity around project status elevates the overall quality of the data collected.
  • Communication: Moving away from the impersonal and often restrictive communication channels of crowdsourcing platforms has allowed us to have a more direct dialogue within our teams. This approach enables us to quickly address questions, provide feedback, and adjust requirements, ensuring every team member is aligned with the project’s goals.
  • Commitment: Non-crowd-sourced trainers are more committed and driven by a clear understanding of their role in the larger objective and the opportunity for professional growth within the organization. A dedicated team is more likely to go above and beyond, ensuring that the data meets the required standards and exceeds them wherever possible.

Adopting an in-house or fully managed trainer model enables detailed project analytics, allowing for nuanced performance tracking and quality assurance trends. Moving away from impersonal crowdsourcing platforms to more direct communication within teams enhances clarity, responsiveness, and alignment with project goals. Committed trainers are driven by a clear understanding of their roles and the potential for professional growth, ensuring high standards of data quality.

Evaluating models

Evaluating large language models typically involves comparative metrics like win rates or ELO scores, derived from user-ranked responses. While this provides a high-level comparison, it lacks the granularity needed for detailed improvements.

Red-teaming

Traditional evaluation is excellent for understanding how well a large language model performs under the intended uses, but it is not always enough to catch unintended behaviors. Several different model behaviors can be unintentional, the most prominent of which relates to how the model handles controversial or unsafe topics. Some models mistook safe queries for unsafe ones, refusing to answer questions about how to kill a car engine. Most recently, Google's Gemini model said that the issue of who was the worst of a well-known American businessman and a German dictator was nuanced and complex, and mechanisms intended to reduce bias resulted in the generation of inaccurate historical images.

Red teaming attempts to address and uncover a vast array of issues, and it can, as illustrated by the examples above, make it easy for unwanted aspects to slip through the cracks and into the released product. It is, therefore, essential to take care of this when designing and executing the red-teaming process.

Here are the five key factors that make or break red-teaming efforts.

red-teaming factors

Why software is important

Choosing the right software is crucial in LLM development. Here’s why:

Integrated workflow and QA tools

LLM dataset creation projects require extensive QA, routing of items between several people, and efficient communication. Without software that offers comprehensive workflow management functionalities and QA communication and enables efficient routing of task among annotators, reviewers, and experts, this quickly becomes unmanageable.

Comprehensive visibility and reporting

Without detailed visibility into project workflows, including the ability to query actions, track progress, and generate reports, it is impossible to monitor work distribution, assess productivity, and identify areas needing attention or improvement.

reporting

Customizable interfaces

LLM Dataset Creation compromises tasks such as SFT, RLHF, evaluations, and red-teaming exercises. Furthermore, you may introduce new tasks or change requirements as new research is released. Software that allows for the customization of interfaces and support for multimodal data, including text, images, videos, and web content, removes the need to have system-developing staff constantly work on annotation tooling to keep up with project changes.

Ability to connect APIs

Integrating models directly in the training or evaluation pipeline can improve efficiency. However, this integration is only possible with software that supports functionalities like prompt submission, response collection, and performance analysis. Additionally, enhancing the feedback process through improved data quality and annotator guidance is difficult without integrating with external tools like grammar checkers or AI evaluation systems.

Integration with data storage solutions

Ability to integrate efficiently with data storage solutions streamlines data management, ensuring seamless access to and from centralized data repositories, facilitating more accessible updates, and enhancing overall project scalability.

Choosing the right partner

Developing and fine-tuning a large language model is challenging, and the complexities involved in high-quality dataset creation and model evaluation are hard to understate. From crafting detailed style guides to managing extensive workflows for SFT and RLHF, each step requires meticulous attention to detail, deep expertise, and significant time and resource investment.

choosing the right partner

Choosing a partner with experience, a purpose-built platform, and dedicated management for an LLM-specific workforce offers a streamlined solution to several of the challenging aspects of LLM data collection projects.

By consolidating data creation and evaluation expertise, resources, and management under a single umbrella, teams can focus on their core objective of building LLMs while minimizing the operational burdens associated with complex project execution. This partnership not only accelerates the development timeline but also enhances the quality and effectiveness of the final model, ensuring that the LLM meets the high expectations of its intended users.

Experience

Leveraging the partner's expertise in navigating the nuances of LLM dataset creation and evaluations can save considerable time and help you avoid common pitfalls.

Purpose-built platform

Accessing a platform specifically designed for the purpose and equipped with the tools for data management, workflow automation, and quality control removes the need to build and maintain your own platform and provides tools to make the work more efficient, which might not have been feasible to build for an internal platform.

Managed workforce

Benefiting from a dedicated, skilled workforce managed by the partner, eliminating the need for extensive in-house recruitment, training, and quality management efforts.

Wrapping up

In conclusion, building and refining large language models is a challenging but essential task. It requires careful planning, deep expertise, and considerable resources. By focusing on creating high-quality datasets and rigorously evaluating these models, we can develop AI systems that genuinely meet the needs of users and businesses. As we push forward, keeping high standards throughout the development process is crucial for harnessing the full potential of AI in practical applications.

Recommended for you

Stay connected

Subscribe to receive new blog posts and latest discoveries in the industry from SuperAnnotate
Thank you for subscribing to our newsletter!
Oops! Something went wrong while submitting the form.