Views
No views yet
0.4.01# use google/gemma-7b if you have access
2#base_model: mhenrichsen/gemma-7b
3base_model: google/gemma-7b
4model_type: AutoModelForCausalLM
5tokenizer_type: AutoTokenizer
6
7hub_model_id: MaziyarPanahi/gemma-7b-Open-Hermes-v0.1
8hf_use_auth_token: true
9
10load_in_8bit: false
11load_in_4bit: true
12strict: false
13
14# huggingface repo
15datasets:
16 - path: teknium/openhermes
17 type: alpaca
18val_set_size: 0.1
19output_dir: ./qlora-gemma-7b-openhermes
20
21adapter: qlora
22lora_r: 32
23lora_alpha: 16
24lora_dropout: 0.05
25lora_target_linear: true
26
27
28sequence_len: 4096
29sample_packing: false
30pad_to_sequence_len: false
31
32wandb_project:
33wandb_entity:
34wandb_watch:
35wandb_name:
36wandb_log_model:
37
38
39gradient_accumulation_steps: 3
40micro_batch_size: 2
41num_epochs: 1
42optimizer: adamw_bnb_8bit
43lr_scheduler: cosine
44learning_rate: 0.0002
45
46train_on_inputs: false
47group_by_length: false
48bf16: auto
49fp16:
50tf32: false
51
52gradient_checkpointing: true
53early_stopping_patience:
54resume_from_checkpoint:
55local_rank:
56logging_steps: 1
57xformers_attention:
58flash_attention: true
59
60warmup_ratio: 0.1
61evals_per_epoch: 4
62eval_table_size:
63eval_max_new_tokens: 128
64saves_per_epoch: 1
65debug:
66deepspeed:
67weight_decay: 0.0
68fsdp:
69fsdp_config:
70special_tokens:1from peft import PeftModel, PeftConfig
2from transformers import AutoModelForCausalLM
3
4model_id = "MaziyarPanahi/gemma-7b-Open-Hermes-v0.1"
5
6config = PeftConfig.from_pretrained(model_id)
7model = AutoModelForCausalLM.from_pretrained("google/gemma-7b")
8model = PeftModel.from_pretrained(model, model_id)1# Use a pipeline as a high-level helper
2from transformers import pipeline
3
4model_id = "MaziyarPanahi/gemma-7b-Open-Hermes-v0.1"
5
6pipe = pipeline("text-generation", model=model_id)
7
8# Load model directly
9from transformers import AutoTokenizer, AutoModelForCausalLM
10
11tokenizer = AutoTokenizer.from_pretrained(model_id)
12model = AutoModelForCausalLM.from_pretrained(model_id)| Training Loss | Epoch | Step | Validation Loss |
|---|---|---|---|
| 1.3258 | 0.0 | 1 | 1.9697 |
| 0.63 | 0.25 | 2277 | 1.5227 |
| 0.642 | 0.5 | 4554 | 1.4835 |
| 0.7721 | 0.75 | 6831 | 1.4456 |