Skip to content

Commit 68ad889

Browse files
authored
Merge pull request #47 from kiersten-stokes/add-custom-details
Update lm-eval page with details on new custom resource behavior
2 parents 792d1c5 + 6e4d1b2 commit 68ad889

File tree

1 file changed

+31
-6
lines changed

1 file changed

+31
-6
lines changed

docs/modules/ROOT/pages/lm-eval-tutorial.adoc

Lines changed: 31 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -181,14 +181,16 @@ A list of paired name and value arguments for the model type. Each model type or
181181
|
182182
Specify the task using the Unitxt recipe format:
183183

184-
* `card`: Use the `name` to specify a Unitxt card or `custom` for a custom card
184+
* `card`: Use the `name` to specify a Unitxt card or `ref` to refer to a custom card:
185185
** `name`: Specify a Unitxt card from the link:++https://www.unitxt.ai/en/latest/catalog/catalog.cards.__dir__.html++[Unitxt catalog]. Use the card's ID as the value.
186186
For example: The ID of link:https://www.unitxt.ai/en/latest/catalog/catalog.cards.wnli.html[Wnli card] is `cards.wnli`.
187-
** `custom`: Define a custom card and use it. The value is a JSON string for a custom Unitxt card which contains the custom dataset.
188-
Use the documentation link:https://www.unitxt.ai/en/latest/docs/adding_dataset.html#adding-to-the-catalog[here] to compose a custom card, store it as a JSON file, and use the JSON content as the value here.
189-
If the dataset used by the custom card needs an API key from an environment variable or a persistent volume, you have to
190-
set up corresponding resources under the `pod` field. Check the `pod` field below.
191-
* `template`: Specify a Unitxt template from the link:++https://www.unitxt.ai/en/latest/catalog/catalog.templates.__dir__.html++[Unitxt catalog]. Use the template's ID as the value.
187+
** `ref`: Specify the reference name of a custom card as defined in the `custom` section below
188+
* `template`: Use `name` to specify a Unitxt catalog template or `ref` to refer to a custom template:
189+
** `name`: Specify a Unitxt template from the link:++https://www.unitxt.ai/en/latest/catalog/catalog.templates.__dir__.html++[Unitxt catalog]. Use the template's ID as the value.
190+
** `ref`: Specify the reference name of a custom template as defined in the `custom` section below
191+
* `systemPrompt`: Use `name` to specify a Unitxt catalog system prompt or `ref` to refer to a custom prompt:
192+
** `name`: Specify a Unitxt system prompt from the link:++https://www.unitxt.ai/en/latest/catalog/catalog.system_prompts.__dir__.html++[Unitxt catalog]. Use the system prompt's ID as the value.
193+
** `ref`: Specify the reference name of a custom system prompt as defined in the `custom` section below
192194
* `task` (optional): Specify a Unitxt task from the link:++https://www.unitxt.ai/en/latest/catalog/catalog.cards.__dir__.html++[Unitxt catalog]. Use the task's ID as the value.
193195
A Unitxt card has a pre-defined task. Only specify a value for this if you want to run different task.
194196
* `metrics` (optional): Specify a list of Unitx metrics from the link:++https://www.unitxt.ai/en/latest/catalog/catalog.metrics.__dir__.html++[Unitxt catalog]. Use the metric's ID as the value.
@@ -198,6 +200,29 @@ Specify the task using the Unitxt recipe format:
198200
* `numDemos` (optional): Number of fewshot to be used.
199201
* `demosPoolSize` (optional): Size of the fewshot pool.
200202

203+
|`taskList.custom`
204+
| Define one or more custom resources that will be referenced in a task recipe. Custom cards, custom templates, and
205+
custom system prompts are currently supported:
206+
207+
* `cards`: Define custom cards to use, each with a `name` and `value` field:
208+
** `name`: The name of this custom card that will be referenced in the `card.ref` field of a task recipe.
209+
** `value`: A JSON string for a custom Unitxt card which contains the custom dataset.
210+
Use the documentation link:https://www.unitxt.ai/en/latest/docs/adding_dataset.html#adding-to-the-catalog[here]
211+
to compose a custom card, store it as a JSON file, and use the JSON content as the value here. If the dataset
212+
used by the custom card needs an API key from an environment variable or a persistent volume, you have to
213+
set up corresponding resources under the `pod` field. Check the `pod` field below.
214+
* `templates`: Define custom templates to use, each with a `name` and `value` field:
215+
** `name`: The name of this custom template that will be referenced in the `template.ref` field of a task recipe.
216+
** `value`: A JSON string for a custom Unitxt template.
217+
Use the documentation link:https://www.unitxt.ai/en/latest/docs/adding_template.html#adding-a-new-template[here]
218+
to compose a custom template, then use the documentation link:https://www.unitxt.ai/en/latest/docs/saving_and_loading_from_catalog.html[here] to store it as a JSON file and use the JSON content as the value of this field.
219+
* `systemPrompts`: Define custom system prompts to use, each with a `name` and `value` field:
220+
** `name`: The name of this custom system prompt that will be referenced in the `systemPrompt.ref` field of a task recipe.
221+
** `value`: A string for a custom Unitxt system prompt.
222+
The documentation link:https://www.unitxt.ai/en/latest/docs/adding_format.html#formats[here]
223+
provides an overview of the different components that make up a prompt format, including the system prompt.
224+
225+
201226
|`numFewShot`
202227
|Sets the number of few-shot examples to place in context. If you are using a task from Unitxt, don't use this field. Use `numDemos` under the `taskRecipes` instead.
203228

0 commit comments

Comments
 (0)