Explorar el Código

Add jsonl support (#212)

Handled by default with same "json" type, the lib auto detects the precise type.
Angainor Development hace 3 años
padre
commit
c59d5672b0
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      finetune.py

+ 1 - 1
finetune.py

@@ -163,7 +163,7 @@ def train(
     )
     model = get_peft_model(model, config)
 
-    if data_path.endswith(".json"):  # todo: support jsonl
+    if data_path.endswith(".json") or data_path.endswith(".jsonl"):
         data = load_dataset("json", data_files=data_path)
     else:
         data = load_dataset(data_path)