Views
No views yet
0.4.11base_model: arcee-ai/Llama-3.1-SuperNova-Lite
2
3load_in_8bit: false
4load_in_4bit: false
5strict: false
6
7datasets:
8 - path: SE6446/MAGllama_Sharegpt
9 type: sharegpt
10 conversation: chatml
11
12dataset_prepared_path: /workspace/data/last_run_prepared
13val_set_size: 0.05
14output_dir: /workspace/data/outputs/out
15
16sequence_len: 4096
17sample_packing: true
18pad_to_sequence_len: true
19eval_sample_packing: false
20
21
22hub_model_id: SE6446/Llama-3.1-SuperNova-Lite-Reflections-3
23hub_strategy: every_save
24use_auth_token: true
25
26wandb_project: Bojangles
27wandb_entity:
28wandb_watch:
29wandb_name: run-6
30wandb_log_model: checkpoint
31
32gradient_accumulation_steps: 2
33micro_batch_size: 1
34num_epochs: 2
35optimizer: paged_adamw_8bit
36lr_scheduler: cosine
37learning_rate: 0.00015
38
39adapter: lora
40lora_model_dir:
41lora_r: 32
42lora_alpha: 16
43lora_dropout: 0.05
44lora_target_linear: true
45lora_fan_in_fan_out:
46lora_modules_to_save:
47 - embed_tokens
48 - lm_head
49
50train_on_inputs: false
51group_by_length: false
52bf16: auto
53fp16:
54tf32: false
55
56gradient_checkpointing: true
57gradient_checkpointing_kwargs:
58 use_reentrant: false
59early_stopping_patience:
60resume_from_checkpoint:
61logging_steps: 1
62xformers_attention:
63flash_attention: false
64
65warmup_steps: 10
66evals_per_epoch: 2
67eval_table_size:
68saves_per_epoch: 1
69debug:
70deepspeed:
71weight_decay: 0.0
72fsdp:
73fsdp_config:
74special_tokens:
75 pad_token: <|end_of_text|>
76tokens:
77 - <thinking>
78 - </thinking>
79 - <reflection>
80 - </reflection>
81 - <output>
82 - </output>1from transformers import pipeline
2
3pipe = pipeline("text-generation", "SE6446/Llama-3.1-SuperNova-Lite-Reflection-V1.0", device_map="auto",trust_remote_code=True)
4
5sys_prompt = "You are an AI assistant who reflects before answering the user." #If you put 'reflect' it will typically do so. If you want to vary the character just append it under this.
6user_prompt = "Explain the difference between Newtonian and Keplerian orbits for a five year old." #Classic
7
8messages = [
9 {
10 "role": "system",
11 "content": sys_prompt,
12 },
13 {"role": "user", "content": user_prompt}
14]
15
16prompt = pipe.tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
17prompt = prompt + "<thinking>" #Though not necessary, putting <thinking> under the new line does ensure it reflects. Testing revealed not doing this could cause it to rarely disobey the tokens. Which is bad.
18# prompt = "<|im_start|>assistant\n[sys prompt]<|im_end|><|im_start|>user\n[user input]<|im_end|><|im_start|>assistant\n<thinking>" should do the trick if you like it old school.
19
20text = pipe(prompt, max_new_tokens=1000) #max_new_tokens needs to be decently high so it may adequatley perform it's reflection AND output a concise answer.
21print(text[0]['generated_text'])| Training Loss | Epoch | Step | Validation Loss |
|---|---|---|---|
| 2.7211 | 0.0049 | 1 | 1.4048 |
| 0.6381 | 0.5 | 103 | 0.6583 |
| 0.4985 | 1.0049 | 206 | 0.6320 |
| 0.4992 | 1.5049 | 309 | 0.6365 |