mirror of
https://github.com/nomic-ai/gpt4all
synced 2024-11-02 09:40:42 +00:00
Update data.py
This commit is contained in:
parent
c5f5882d46
commit
7e468f2199
4
data.py
4
data.py
@ -70,14 +70,10 @@ def load_data(config, tokenizer):
|
|||||||
else:
|
else:
|
||||||
dataset = load_dataset(dataset_path)
|
dataset = load_dataset(dataset_path)
|
||||||
|
|
||||||
uuids = load_dataset("json", data_files="watermark.jsonl", split="train")
|
|
||||||
dataset = dataset.train_test_split(test_size=.05, seed=config["seed"])
|
dataset = dataset.train_test_split(test_size=.05, seed=config["seed"])
|
||||||
|
|
||||||
train_dataset, val_dataset = dataset["train"], dataset["test"]
|
train_dataset, val_dataset = dataset["train"], dataset["test"]
|
||||||
|
|
||||||
train_dataset = concatenate_datasets([train_dataset, uuids])
|
|
||||||
train_dataset = train_dataset.shuffle(seed=config["seed"])
|
|
||||||
|
|
||||||
if config["streaming"] is False:
|
if config["streaming"] is False:
|
||||||
kwargs = {"num_proc": config["num_proc"]}
|
kwargs = {"num_proc": config["num_proc"]}
|
||||||
else:
|
else:
|
||||||
|
Loading…
Reference in New Issue
Block a user