Jamesb1974 commited on
Commit
faea07a
1 Parent(s): 80372cf

Upload folder using huggingface_hub

Browse files
README.md ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ tags:
3
+ - autotrain
4
+ - text-generation-inference
5
+ - text-generation
6
+ - peft
7
+ library_name: transformers
8
+ widget:
9
+ - messages:
10
+ - role: user
11
+ content: What is your favorite condiment?
12
+ license: other
13
+ ---
14
+
15
+ # Model Trained Using AutoTrain
16
+
17
+ This model was trained using AutoTrain. For more information, please visit [AutoTrain](https://hf.co/docs/autotrain).
18
+
19
+ # Usage
20
+
21
+ ```python
22
+
23
+ from transformers import AutoModelForCausalLM, AutoTokenizer
24
+
25
+ model_path = "PATH_TO_THIS_REPO"
26
+
27
+ tokenizer = AutoTokenizer.from_pretrained(model_path)
28
+ model = AutoModelForCausalLM.from_pretrained(
29
+ model_path,
30
+ device_map="auto",
31
+ torch_dtype='auto'
32
+ ).eval()
33
+
34
+ # Prompt content: "hi"
35
+ messages = [
36
+ {"role": "user", "content": "hi"}
37
+ ]
38
+
39
+ input_ids = tokenizer.apply_chat_template(conversation=messages, tokenize=True, add_generation_prompt=True, return_tensors='pt')
40
+ output_ids = model.generate(input_ids.to('cuda'))
41
+ response = tokenizer.decode(output_ids[0][input_ids.shape[1]:], skip_special_tokens=True)
42
+
43
+ # Model response: "Hello! How can I assist you today?"
44
+ print(response)
45
+ ```
adapter_config.json ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "alpha_pattern": {},
3
+ "auto_mapping": null,
4
+ "base_model_name_or_path": "openai-community/gpt2-large",
5
+ "bias": "none",
6
+ "fan_in_fan_out": false,
7
+ "inference_mode": true,
8
+ "init_lora_weights": true,
9
+ "layer_replication": null,
10
+ "layers_pattern": null,
11
+ "layers_to_transform": null,
12
+ "loftq_config": {},
13
+ "lora_alpha": 32,
14
+ "lora_dropout": 0.05,
15
+ "megatron_config": null,
16
+ "megatron_core": "megatron.core",
17
+ "modules_to_save": null,
18
+ "peft_type": "LORA",
19
+ "r": 16,
20
+ "rank_pattern": {},
21
+ "revision": null,
22
+ "target_modules": [
23
+ "c_attn",
24
+ "c_fc",
25
+ "c_proj"
26
+ ],
27
+ "task_type": "CAUSAL_LM",
28
+ "use_dora": false,
29
+ "use_rslora": false
30
+ }
adapter_model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ea97145783145e5242ff2ddee2d99f31953d4d056d2a5025ddfcad543f7dd9fd
3
+ size 561927472
merges.txt ADDED
The diff for this file is too large to render. See raw diff
 
runs/Apr08_14-55-44_r-jamesb1974-mar29090-sjolugq9-54e08-ovbu6/events.out.tfevents.1712588182.r-jamesb1974-mar29090-sjolugq9-54e08-ovbu6.116.0 CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:f59676473b29a5ffd38f361e64b5d60cb7ba9eb4e8c5e9dd79a7dbb96d369a6d
3
- size 9189
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5daf603d6c00739ee676630bd7747d0d909775c943ab25243ed3fe0121a915cc
3
+ size 9754
special_tokens_map.json ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ {
2
+ "bos_token": "<|endoftext|>",
3
+ "eos_token": "<|endoftext|>",
4
+ "pad_token": "<|endoftext|>",
5
+ "unk_token": "<|endoftext|>"
6
+ }
tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
tokenizer_config.json ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "add_prefix_space": false,
3
+ "added_tokens_decoder": {
4
+ "50256": {
5
+ "content": "<|endoftext|>",
6
+ "lstrip": false,
7
+ "normalized": true,
8
+ "rstrip": false,
9
+ "single_word": false,
10
+ "special": true
11
+ }
12
+ },
13
+ "bos_token": "<|endoftext|>",
14
+ "chat_template": "{% if not add_generation_prompt is defined %}{% set add_generation_prompt = false %}{% endif %}{% for message in messages %}{{'<|im_start|>' + message['role'] + '\n' + message['content'] + '<|im_end|>' + '\n'}}{% endfor %}{% if add_generation_prompt %}{{ '<|im_start|>assistant\n' }}{% endif %}",
15
+ "clean_up_tokenization_spaces": true,
16
+ "eos_token": "<|endoftext|>",
17
+ "model_max_length": 1024,
18
+ "pad_token": "<|endoftext|>",
19
+ "tokenizer_class": "GPT2Tokenizer",
20
+ "unk_token": "<|endoftext|>"
21
+ }
training_args.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:27bfd80c5609ea73e80777050f13a95f8d5c5ece2cbdf44455eaff2ad13faae2
3
+ size 4984
training_params.json ADDED
@@ -0,0 +1,47 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "model": "openai-community/gpt2-large",
3
+ "project_name": "autotrain-gpt2l-peft-test",
4
+ "data_path": "autotrain-gpt2l-peft-test/autotrain-data",
5
+ "train_split": "train",
6
+ "valid_split": null,
7
+ "add_eos_token": true,
8
+ "block_size": 1024,
9
+ "model_max_length": 2048,
10
+ "padding": "right",
11
+ "trainer": "default",
12
+ "use_flash_attention_2": false,
13
+ "log": "tensorboard",
14
+ "disable_gradient_checkpointing": false,
15
+ "logging_steps": -1,
16
+ "evaluation_strategy": "epoch",
17
+ "save_total_limit": 1,
18
+ "save_strategy": "no",
19
+ "auto_find_batch_size": false,
20
+ "mixed_precision": "fp16",
21
+ "lr": 3e-05,
22
+ "epochs": 1,
23
+ "batch_size": 1,
24
+ "warmup_ratio": 0.1,
25
+ "gradient_accumulation": 12,
26
+ "optimizer": "adamw_torch",
27
+ "scheduler": "linear",
28
+ "weight_decay": 0.0,
29
+ "max_grad_norm": 1.0,
30
+ "seed": 42,
31
+ "chat_template": "none",
32
+ "quantization": "int4",
33
+ "target_modules": "all-linear",
34
+ "merge_adapter": false,
35
+ "peft": true,
36
+ "lora_r": 16,
37
+ "lora_alpha": 32,
38
+ "lora_dropout": 0.05,
39
+ "model_ref": null,
40
+ "dpo_beta": 0.1,
41
+ "prompt_text_column": "autotrain_prompt",
42
+ "text_column": "autotrain_text",
43
+ "rejected_text_column": "autotrain_rejected_text",
44
+ "push_to_hub": true,
45
+ "repo_id": "Jamesb1974/autotrain-gpt2l-peft-test",
46
+ "username": "Jamesb1974"
47
+ }
vocab.json ADDED
The diff for this file is too large to render. See raw diff