Tried depth-upscaling Cosmo-1b by duplicating 6 layers, then LISA-training on a dataset reasonably similar to the original one in an attempt to 'self-repair'.
Not sure if it worked out exactly how I pictured but the nous eval's not overall much worse than the original at least.
(Took I think about 8 hours for, I want to say, ~80 million tokens on one RTX 3090?)
Thought about doing LORA first but I couldn't get peft_layers_to_transform working on axolotl and decided to go straight to LISA.
It's probably good(?) for (random selection of layers) to get experience trying to work around (random thick doubled layers) in some kind of brain-exercise sense anyway.
Capabilities assessment vs original and upscaled version:
| Model | AGIEval | GPT4All | TruthfulQA | Bigbench | Average |
|---|
| cosmo-1b | 22.97 | 52.01 | 38.02 | 28.73 | 35.43 |
| Model | AGIEval | GPT4All | TruthfulQA | Bigbench | Average |
|---|
| cosmo-upscale | 22.23 | 48.35 | 42.01 | 28.36 | 35.24 |
I'm not sure this helped.
See axolotl config
axolotl version: 0.4.0
1base_model: Lambent/cosmo-upscale
2model_type: LlamaForCausalLM
3tokenizer_type: LlamaTokenizer
4
5load_in_8bit: false
6load_in_4bit: false
7strict: false
8
9datasets:
10 - path: HuggingFaceTB/cosmopedia-100k
11 type: completion
12 - path: Vezora/Tested-22k-Python-Alpaca
13 type: alpaca
14dataset_prepared_path:
15val_set_size: 0.05
16output_dir: ./lisa-out
17
18sequence_len: 2048
19sample_packing: true
20pad_to_sequence_len: true
21
22adapter:
23lora_model_dir:
24lora_r:
25lora_alpha:
26lora_dropout:
27lora_target_linear:
28lora_fan_in_fan_out:
29
30lisa_n_layers: 4
31lisa_step_interval: 10
32lisa_layers_attribute: model.layers
33
34wandb_project: cosmouplisa
35wandb_entity:
36wandb_watch:
37wandb_name:
38wandb_log_model:
39
40gradient_accumulation_steps: 4
41micro_batch_size: 2
42num_epochs: 1
43optimizer: adamw_bnb_8bit
44lr_scheduler: cosine
45learning_rate: 0.0002
46
47train_on_inputs: false
48group_by_length: false
49bf16: auto
50fp16:
51tf32: false
52
53gradient_checkpointing: true
54early_stopping_patience:
55resume_from_checkpoint:
56local_rank:
57logging_steps: 1
58xformers_attention:
59flash_attention: true
60
61warmup_steps: 10
62evals_per_epoch: 4
63saves_per_epoch: 1
64debug:
65deepspeed:
66weight_decay: 0.0
67fsdp:
68fsdp_config:
69special_tokens:
70
lisa-out
This model is a fine-tuned version of
Lambent/cosmo-upscale on the None dataset.
It achieves the following results on the evaluation set:
Model description
More information needed
Intended uses & limitations
More information needed
Training and evaluation data
More information needed
Training procedure
Training hyperparameters
The following hyperparameters were used during training:
- learning_rate: 0.0002
- train_batch_size: 2
- eval_batch_size: 2
- seed: 42
- gradient_accumulation_steps: 4
- total_train_batch_size: 8
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
- lr_scheduler_type: cosine
- lr_scheduler_warmup_steps: 10
- num_epochs: 1
Training results
| Training Loss | Epoch | Step | Validation Loss |
|---|
| 1.4298 | 0.0 | 1 | 1.4591 |
| 1.1229 | 0.25 | 1480 | 1.0594 |
| 1.0711 | 0.5 | 2960 | 1.0418 |
| 1.0511 | 0.75 | 4440 | 1.0353 |
Framework versions
- Transformers 4.40.0.dev0
- Pytorch 2.1.2+cu118
- Datasets 2.18.0
- Tokenizers 0.15.0