catninja123 commited on
Commit
d2ffb58
·
1 Parent(s): c20de65

Add training data (9750 AI-Human pairs) and updated app.py

Browse files
Files changed (3) hide show
  1. .gitattributes +1 -0
  2. app.py +9 -1
  3. training_pairs.jsonl +3 -0
.gitattributes CHANGED
@@ -33,3 +33,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ *.jsonl filter=lfs diff=lfs merge=lfs -text
app.py CHANGED
@@ -20,9 +20,17 @@ from peft import LoraConfig, get_peft_model, TaskType, PeftModel
20
  MODEL_NAME = "SamSJackson/paraphrase-dipper-no-ctx"
21
  DATA_DIR = "/data" if os.path.exists("/data") else "."
22
  OUTPUT_DIR = os.path.join(DATA_DIR, "dipper-humanizer-lora")
23
- DATA_FILE = os.path.join(DATA_DIR, "training_pairs.jsonl")
24
  FINAL_MODEL_DIR = os.path.join(OUTPUT_DIR, "final")
25
 
 
 
 
 
 
 
 
 
 
26
  LORA_R = 16
27
  LORA_ALPHA = 32
28
  LORA_DROPOUT = 0.05
 
20
  MODEL_NAME = "SamSJackson/paraphrase-dipper-no-ctx"
21
  DATA_DIR = "/data" if os.path.exists("/data") else "."
22
  OUTPUT_DIR = os.path.join(DATA_DIR, "dipper-humanizer-lora")
 
23
  FINAL_MODEL_DIR = os.path.join(OUTPUT_DIR, "final")
24
 
25
+ # Copy training data from repo to persistent storage if needed
26
+ REPO_DATA = os.path.join(os.path.dirname(os.path.abspath(__file__)), "training_pairs.jsonl")
27
+ DATA_FILE = os.path.join(DATA_DIR, "training_pairs.jsonl")
28
+ if os.path.exists(REPO_DATA) and not os.path.exists(DATA_FILE):
29
+ import shutil
30
+ os.makedirs(DATA_DIR, exist_ok=True)
31
+ shutil.copy2(REPO_DATA, DATA_FILE)
32
+ print(f"Copied training data to {DATA_FILE}")
33
+
34
  LORA_R = 16
35
  LORA_ALPHA = 32
36
  LORA_DROPOUT = 0.05
training_pairs.jsonl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:94edc7e8afd4c607226b7b3caab2233f99f1b23a489dd2bd7e89b8a3e6fc54b6
3
+ size 45452356