Skip to content

Commit 144b6db

Browse files
committed
Fixes typos in fine-tuning contrib README
1 parent 4fa02a1 commit 144b6db

File tree

1 file changed

+5
-4
lines changed
  • contrib/hamilton/contrib/user/skrawcz/fine_tuning

1 file changed

+5
-4
lines changed

contrib/hamilton/contrib/user/skrawcz/fine_tuning/README.md

+5-4
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ more responses that are more contextually relevant to your use case.
2020
## FLAN LLM
2121
This example is based on using [Google's Fine-tuned LAnguage Net (FLAN) models hosted on HuggingFace](https://huggingface.co/docs/transformers/model_doc/flan-t5).
2222
The larger the model, the longer it will take to fine-tune, and the more memory you'll need for it. The code
23-
here by default (which you can easily change) is set up to run on docker using the smallest FLAN model.
23+
here was validated to run on docker using the smallest FLAN model ("model_id": "google/flan-t5-small") on a Mac that's a few years old.
2424

2525
## What type of functionality is in this module?
2626

@@ -59,22 +59,23 @@ e.g. you should be able to do `json.load(f)` and it would return a list of dicti
5959
]
6060
```
6161

62-
You would then pass in as _inputs_ to execution `"data_path"=PATH_TO_THIS_FILE` as well as `"input_text_key"="question"` and `"output_text_key"="reply"`.
62+
You would then pass in as _inputs_ to execution `"data_path":PATH_TO_THIS_FILE` as well as `"input_text_key":"question"` and `"output_text_key":"reply"`.
6363
- Instantiate the driver. Use `{"start": "base"}` as configuration to run with to use a raw base LLM to finetune.
64-
- Pick your LLM. `model_id_tokenizer="google/mt5-small"` is the default, but you can change it to any of the models
64+
- Pick your LLM. `"model_id":"google/mt5-small"` is what we recommend to start, but you can change it to any of the models
6565
that the transformers library supports for `AutoModelForSeq2SeqLM` models.
6666
- Run the code.
6767

6868
```python
6969
# instantiate the driver with this module however you want
7070
result = dr.execute(
71-
[ # some suggested outputs
71+
[ # some suggested outputs -- see the visualization/code to understand what these are
7272
"save_best_models",
7373
"hold_out_set_predictions",
7474
"training_and_validation_set_metrics",
7575
"finetuned_model_on_validation_set",
7676
],
7777
inputs={
78+
"model_id": "google/flan-t5-small", # the base model you want to fine-tune
7879
"data_path": "example-support-dataset.json", # the path to your dataset
7980
"input_text_key": "question", # the key in the json object that has the input text
8081
"output_text_key": "gpt4_replies_target", # the key in the json object that has the target output text

0 commit comments

Comments
 (0)