You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/sdg/sdg-api-interface.md
+22-10Lines changed: 22 additions & 10 deletions
Original file line number
Diff line number
Diff line change
@@ -25,7 +25,7 @@ We propose the following structure for the SDG library. There will be config fil
25
25
26
26
## CLI
27
27
28
-
The CLI client uses the instructlab SDG library and provides it a run configuration with input parameters.
28
+
The CLI client uses the instructlab SDG library and provides it a run configuration with input parameters. The following represents a sample of what Library usage could look like.
29
29
30
30
```python
31
31
# cli_driver.py
@@ -40,14 +40,27 @@ cli_sdg = SDG(run_config, client) # run config has all the variables like num_s
40
40
generated_samples = cli_sdg.generate()
41
41
```
42
42
43
-
The run configuration contains the parameters needed to run the SDG code library as well as points to the templates needed to run the SDG code as well as the prompt template and the default model system prompt template.
43
+
As an initial integration milestone, we will modify the `generate_data` function in `instructlab.sdg.generate_data` to make use of the updated SDG API. This is the function the `ilab` CLI already uses, so modifying this implementation will allow us to get the updated SDG API in place without disrupting the CLI integration.
44
+
45
+
CLI integration will require additional changes later to allow passing in customizations to the SDG pipeline, but we will treat that as a follow-up implementation milestone.
46
+
47
+
The run configuration includes the necessary parameters for executing the SDG code library. It specifies the templates required for running the SDG code, the prompt template, and the default model system prompt template.
44
48
45
49
*`num_samples` is the number of synthetic samples that you wish to generate per seed example.
50
+
*`num_procs` is the number of parallel processes that you want to run
46
51
*`max_retry` is the maximum number of non-greedy retries you want to make if the `num_samples` is not reached. The number of samples in the generated output will be the samples achieved until `max_retry` is reached.
47
52
* Pipeline steps contains the steps that you want to invoke in the SDG pipeline and the prompt configurations per step. The variable names of the blocks can be anything and the prompt configurations must be compatible with the teacher model.
48
53
*`max_new_tokens` is the maximum number of tokens we want to generate. In other words, the size of the output sequence, not including the tokens in the prompt.
49
-
*`model_name` is the teacher model we would want to use to generate the synthetic data.
50
-
*`model_template` and `stop_token` are the parameters for generation template.
54
+
*`model` is the name of the served up teacher model we would want to use to generate the synthetic data.
55
+
*`model_prompt`: the default model prompt for the model.
56
+
*`client` points to an OpenAI client used to interface with the model. Example of a client:
0 commit comments