UsernameJustAnother commited on
Commit
169890c
1 Parent(s): 239aa09

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +70 -0
README.md CHANGED
@@ -9,6 +9,10 @@ tags:
9
  - unsloth
10
  - mistral
11
  - trl
 
 
 
 
12
  ---
13
 
14
  # Uploaded model
@@ -17,6 +21,72 @@ tags:
17
  - **License:** apache-2.0
18
  - **Finetuned from model :** unsloth/Mistral-Nemo-Base-2407
19
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
20
  This mistral model was trained 2x faster with [Unsloth](https://github.com/unslothai/unsloth) and Huggingface's TRL library.
21
 
22
  [<img src="https://raw.githubusercontent.com/unslothai/unsloth/main/images/unsloth%20made%20with%20love.png" width="200"/>](https://github.com/unslothai/unsloth)
 
9
  - unsloth
10
  - mistral
11
  - trl
12
+ - rp
13
+ - writing
14
+ - experimental
15
+ - long-context
16
  ---
17
 
18
  # Uploaded model
 
21
  - **License:** apache-2.0
22
  - **Finetuned from model :** unsloth/Mistral-Nemo-Base-2407
23
 
24
+ Standard disclaimer: This is me teaching myself the basics of fine-tuning, with notes extensively borrowed from https://huggingface.co/nothingiisreal/MN-12B-Celeste-V1.9
25
+
26
+ New for v8:
27
+ - Fine-tuned on Nemo Base instead of Instruct, because why not?
28
+ - **FULL BORE MODE: ACTIVATE!** 10K-ish records of mostly-human convos and stories, curated by me, trained in ChatML, up from 8K in v6. Specifically:
29
+ - 4K records from Reddit Writing Prompts (equal split of highest-rated sfw & nfsw)
30
+ - 2K of Claude instruct, lightly curated & de-clauded.
31
+ - 2K of curated Fallen Skies
32
+ - 2K of curated/lightly de-ministrated C2 chat
33
+ - Trained on a single 80GB A100 from runpod.io, with batch size of 8 (up from 2 on A100 40G), so far less steps involved.
34
+
35
+ I pulled v7 because I honestly don't think it's as good as v6, and don't want folks to get the wrong idea that it's better just because the version number is higher.
36
+
37
+ Props again to Unsloth.ai for letting me train this on a single A100 with variable (wildly variable) context length.
38
+
39
+ Here's what the train/eval loss looked like:
40
+
41
+ ![image/png](https://cdn-uploads.huggingface.co/production/uploads/662c17b252e194d5d436c708/hUKuy7ht_qObuFNDTVEe9.png)
42
+
43
+ I still don't know what makes training loss drop at the end of epoch 1, or why eval loss doesn't drop down to match (it continues to decrease, but slowly).
44
+
45
+ It was trained with the following settings:
46
+
47
+ ```
48
+
49
+ model = FastLanguageModel.get_peft_model(
50
+ model,
51
+ r = 256,
52
+ target_modules = ["q_proj", "k_proj", "v_proj", "o_proj",
53
+ "gate_proj", "up_proj", "down_proj",],
54
+ lora_alpha = 128, # 128 / sqrt(256) gives a scaling factor of 8
55
+ lora_dropout = 0.1, # Supports any, but = 0 is optimized
56
+ bias = "none", # Supports any, but = "none" is optimized
57
+ # [NEW] "unsloth" uses 30% less VRAM, fits 2x larger batch sizes!
58
+ use_gradient_checkpointing = "unsloth", # True or "unsloth" for very long context
59
+ random_state = 3407,
60
+ use_rslora = True, # setting the adapter scaling factor to lora_alpha/math.sqrt(r) instead of lora_alpha/r
61
+ loftq_config = None, # And LoftQ
62
+ )
63
+
64
+ lr_scheduler_kwargs = {
65
+ 'min_lr': 0.0000024 # Adjust this value as needed
66
+ }
67
+
68
+ per_device_train_batch_size = 8,
69
+ per_device_eval_batch_size = 8,
70
+ gradient_accumulation_steps = 4,
71
+ eval_accumulation_steps = 4,
72
+ prediction_loss_only = True, # When performing evaluation and generating predictions, only returns the loss.
73
+ warmup_steps = 50,
74
+ num_train_epochs = 2, # For longer training runs! 12 hrs/epoch?
75
+ learning_rate = 5e-5,
76
+ fp16 = not is_bfloat16_supported(),
77
+ bf16 = is_bfloat16_supported(),
78
+ fp16_full_eval = True, # stops eval from trying to use fp32
79
+ eval_strategy = "steps", # 'no', 'steps', 'epoch'. Don't use this without an eval dataset etc
80
+ eval_steps = 50, # is eval_strat is set to 'steps', do every N steps.
81
+ logging_steps = 5, # so eval and logging happen on the same schedule
82
+ optim = "adamw_8bit", #
83
+ weight_decay = 0, # up from 0
84
+ lr_scheduler_type = "cosine_with_min_lr", # linear, cosine, cosine_with_min_lr, default linear
85
+ lr_scheduler_kwargs = lr_scheduler_kwargs, # needed for cosine_with_min_lr
86
+ seed = 3407,
87
+
88
+ ```
89
+
90
  This mistral model was trained 2x faster with [Unsloth](https://github.com/unslothai/unsloth) and Huggingface's TRL library.
91
 
92
  [<img src="https://raw.githubusercontent.com/unslothai/unsloth/main/images/unsloth%20made%20with%20love.png" width="200"/>](https://github.com/unslothai/unsloth)