dtumkaya commited on
Commit
6fa453f
1 Parent(s): acc3eb5

Upload folder using huggingface_hub

Browse files
README.md ADDED
@@ -0,0 +1,47 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ tags:
3
+ - autotrain
4
+ - text-generation-inference
5
+ - text-generation
6
+ library_name: transformers
7
+ base_model: facebook/opt-350m
8
+ widget:
9
+ - messages:
10
+ - role: user
11
+ content: What is your favorite condiment?
12
+ license: other
13
+ datasets:
14
+ - borakaragul/wikitext2-raw-MIA
15
+ ---
16
+
17
+ # Model Trained Using AutoTrain
18
+
19
+ This model was trained using AutoTrain. For more information, please visit [AutoTrain](https://hf.co/docs/autotrain).
20
+
21
+ # Usage
22
+
23
+ ```python
24
+
25
+ from transformers import AutoModelForCausalLM, AutoTokenizer
26
+
27
+ model_path = "PATH_TO_THIS_REPO"
28
+
29
+ tokenizer = AutoTokenizer.from_pretrained(model_path)
30
+ model = AutoModelForCausalLM.from_pretrained(
31
+ model_path,
32
+ device_map="auto",
33
+ torch_dtype='auto'
34
+ ).eval()
35
+
36
+ # Prompt content: "hi"
37
+ messages = [
38
+ {"role": "user", "content": "hi"}
39
+ ]
40
+
41
+ input_ids = tokenizer.apply_chat_template(conversation=messages, tokenize=True, add_generation_prompt=True, return_tensors='pt')
42
+ output_ids = model.generate(input_ids.to('cuda'))
43
+ response = tokenizer.decode(output_ids[0][input_ids.shape[1]:], skip_special_tokens=True)
44
+
45
+ # Model response: "Hello! How can I assist you today?"
46
+ print(response)
47
+ ```
config.json ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "facebook/opt-350m",
3
+ "_remove_final_layer_norm": false,
4
+ "activation_dropout": 0.0,
5
+ "activation_function": "relu",
6
+ "architectures": [
7
+ "OPTForCausalLM"
8
+ ],
9
+ "attention_dropout": 0.0,
10
+ "bos_token_id": 2,
11
+ "do_layer_norm_before": false,
12
+ "dropout": 0.1,
13
+ "enable_bias": true,
14
+ "eos_token_id": 2,
15
+ "ffn_dim": 4096,
16
+ "hidden_size": 1024,
17
+ "init_std": 0.02,
18
+ "layer_norm_elementwise_affine": true,
19
+ "layerdrop": 0.0,
20
+ "max_position_embeddings": 2048,
21
+ "model_type": "opt",
22
+ "num_attention_heads": 16,
23
+ "num_hidden_layers": 24,
24
+ "pad_token_id": 1,
25
+ "prefix": "</s>",
26
+ "torch_dtype": "float32",
27
+ "transformers_version": "4.44.1",
28
+ "use_cache": true,
29
+ "vocab_size": 50265,
30
+ "word_embed_proj_dim": 512
31
+ }
generation_config.json ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ {
2
+ "_from_model_config": true,
3
+ "bos_token_id": 2,
4
+ "eos_token_id": 2,
5
+ "pad_token_id": 1,
6
+ "transformers_version": "4.44.1"
7
+ }
merges.txt ADDED
The diff for this file is too large to render. See raw diff
 
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6e53b4775893fa8687a9ab6da8e0c542131b399920a7a5575e3fcbade619c60d
3
+ size 1324816544
runs/Aug27_11-56-00_r-dtumkaya-autotrain-advanced-slm-2hhdal5q-bf3fa-prsik/events.out.tfevents.1724759767.r-dtumkaya-autotrain-advanced-slm-2hhdal5q-bf3fa-prsik.166.0 CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:2f1594cacb7b87112a26a5a6599933847d0ad822fd0340b860329e7e72fbacf0
3
- size 5362
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:bd9a7b75bcf5a072649f234095d232760775deea701268fc23a1ce7f79460fc7
3
+ size 7806
special_tokens_map.json ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "bos_token": {
3
+ "content": "</s>",
4
+ "lstrip": false,
5
+ "normalized": true,
6
+ "rstrip": false,
7
+ "single_word": false
8
+ },
9
+ "eos_token": {
10
+ "content": "</s>",
11
+ "lstrip": false,
12
+ "normalized": true,
13
+ "rstrip": false,
14
+ "single_word": false
15
+ },
16
+ "pad_token": {
17
+ "content": "<pad>",
18
+ "lstrip": false,
19
+ "normalized": true,
20
+ "rstrip": false,
21
+ "single_word": false
22
+ },
23
+ "unk_token": {
24
+ "content": "</s>",
25
+ "lstrip": false,
26
+ "normalized": true,
27
+ "rstrip": false,
28
+ "single_word": false
29
+ }
30
+ }
tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
tokenizer_config.json ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "add_bos_token": true,
3
+ "add_prefix_space": false,
4
+ "added_tokens_decoder": {
5
+ "1": {
6
+ "content": "<pad>",
7
+ "lstrip": false,
8
+ "normalized": true,
9
+ "rstrip": false,
10
+ "single_word": false,
11
+ "special": true
12
+ },
13
+ "2": {
14
+ "content": "</s>",
15
+ "lstrip": false,
16
+ "normalized": true,
17
+ "rstrip": false,
18
+ "single_word": false,
19
+ "special": true
20
+ }
21
+ },
22
+ "bos_token": "</s>",
23
+ "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 %}",
24
+ "clean_up_tokenization_spaces": true,
25
+ "eos_token": "</s>",
26
+ "errors": "replace",
27
+ "model_max_length": 2048,
28
+ "pad_token": "<pad>",
29
+ "tokenizer_class": "GPT2Tokenizer",
30
+ "unk_token": "</s>"
31
+ }
training_args.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9754798f00241d669009e3f6a92a3d97f24ef3f65aac40fba5ff2f53d3691835
3
+ size 5496
training_params.json ADDED
@@ -0,0 +1,48 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "model": "facebook/opt-350m",
3
+ "project_name": "autotrain-opt350-slm",
4
+ "data_path": "borakaragul/wikitext2-raw-MIA",
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": "sft",
12
+ "use_flash_attention_2": false,
13
+ "log": "tensorboard",
14
+ "disable_gradient_checkpointing": false,
15
+ "logging_steps": -1,
16
+ "eval_strategy": "epoch",
17
+ "save_total_limit": 1,
18
+ "auto_find_batch_size": false,
19
+ "mixed_precision": "fp16",
20
+ "lr": 0.0001,
21
+ "epochs": 2,
22
+ "batch_size": 2,
23
+ "warmup_ratio": 0.1,
24
+ "gradient_accumulation": 4,
25
+ "optimizer": "adamw_torch",
26
+ "scheduler": "linear",
27
+ "weight_decay": 0.0,
28
+ "max_grad_norm": 1.0,
29
+ "seed": 42,
30
+ "chat_template": "none",
31
+ "quantization": "int4",
32
+ "target_modules": "all-linear",
33
+ "merge_adapter": false,
34
+ "peft": false,
35
+ "lora_r": 16,
36
+ "lora_alpha": 32,
37
+ "lora_dropout": 0.05,
38
+ "model_ref": null,
39
+ "dpo_beta": 0.1,
40
+ "max_prompt_length": 128,
41
+ "max_completion_length": null,
42
+ "prompt_text_column": "prompt",
43
+ "text_column": "text",
44
+ "rejected_text_column": "rejected_text",
45
+ "push_to_hub": true,
46
+ "username": "dtumkaya",
47
+ "unsloth": false
48
+ }
vocab.json ADDED
The diff for this file is too large to render. See raw diff