-
Notifications
You must be signed in to change notification settings - Fork 104
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into switch_to_crossfit
- Loading branch information
Showing
18 changed files
with
583 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
input_field: text | ||
filters: | ||
- name: nemo_curator.filters.classifier_filter.FastTextLangId | ||
log_score: True | ||
params: | ||
model_path: <Path to the FasText language id model (e.g., lid.176.bin)> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
DEFAULT_LANGUAGE = "en" | ||
|
||
SUPPORTED_ENTITIES = [ | ||
"ADDRESS", | ||
"CREDIT_CARD", | ||
"EMAIL_ADDRESS", | ||
"DATE_TIME", | ||
"IP_ADDRESS", | ||
"LOCATION", | ||
"PERSON", | ||
"URL", | ||
"US_SSN", | ||
"US_PASSPORT", | ||
"US_DRIVER_LICENSE", | ||
"PHONE_NUMBER", | ||
] | ||
|
||
DEFAULT_MAX_DOC_SIZE = 2000000 | ||
|
||
__all__ = ["DEFAULT_LANGUAGE", "SUPPORTED_ENTITIES", "DEFAULT_MAX_DOC_SIZE"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# Curating Datasets for Parameter Efficient Fine-tuning | ||
|
||
This tutorial demonstrates the usage of NeMo Curator's Python API to curate a dataset for | ||
parameter-efficient fine-tuning (PEFT). | ||
|
||
In this tutorial, we use the [Enron Emails dataset](https://huggingface.co/datasets/neelblabla/enron_labeled_emails_with_subjects-llama2-7b_finetuning), | ||
which is a dataset of emails with corresponding classification labels for each email. Each email has | ||
a subject, a body and a category (class label). We demonstrate various filtering and processing | ||
operations that can be applied to each record. | ||
|
||
## Usage | ||
After installing the NeMo Curator package, you can simply run the following command: | ||
``` | ||
python tutorials/peft-curation/main.py | ||
``` | ||
|
||
By default, this tutorial will use at most 8 workers to run the curation pipeline. If you face any | ||
out of memory issues, you can reduce the number of workers by supplying the `--n-workers=N` argument, | ||
where `N` is the number of workers to spawn. |
Oops, something went wrong.