Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mix all the user's generated skills instead of 30 per leaf node #421

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 7 additions & 9 deletions src/instructlab/sdg/datamixing.py
Original file line number Diff line number Diff line change
Expand Up @@ -587,14 +587,12 @@ def _convert_to_leaf_node_messages(sample: dict, sys_prompt: str):
class DataMixer:
# pylint: disable=too-many-instance-attributes

# This determines how many samples to pick from each skill when mixing
# skill datasets. It's only used for skills, as knowledge may require
# a variable number of samples depending on the length of the
# knowledge documents in question. The expectation is that this is
# enough samples to sufficiently learn a new skill while also ensuring
# a balance of overall mixed data when learning multiple skills at
# once.
NUM_SYNTH_SKILLS = 30
# This determines how many samples to pick from each skill when
# mixing skill datasets. A value of "1.0" means to mix all
# generated skills, while an integer value would be a fixed
# upscaling or downscaling to the number of skills mixed per leaf
# node by default.
DEFAULT_SKILLS_SAMPLING_SIZE = 1.0

def __init__(
self,
Expand Down Expand Up @@ -723,7 +721,7 @@ def collect(
messages,
self.skills_recipe,
output_file_leaf,
sampling_size=self.NUM_SYNTH_SKILLS,
sampling_size=self.DEFAULT_SKILLS_SAMPLING_SIZE,
)

def _gen_mixed_data(self, recipe, output_file_recipe, output_file_data):
Expand Down
Loading