Upload folder using huggingface_hub
Browse files- README.md +46 -0
- adapter_config.json +33 -0
- adapter_model.safetensors +3 -0
- autotrain-data/dataset_dict.json +1 -0
- autotrain-data/train/cache-55437dce45baf967.arrow +3 -0
- autotrain-data/train/data-00000-of-00001.arrow +3 -0
- autotrain-data/train/dataset_info.json +56 -0
- autotrain-data/train/state.json +13 -0
- autotrain-data/validation/data-00000-of-00001.arrow +3 -0
- autotrain-data/validation/dataset_info.json +56 -0
- autotrain-data/validation/state.json +13 -0
- merges.txt +0 -0
- runs/Jun11_05-20-52_DESKTOP-5GSHRJ7/events.out.tfevents.1718054457.DESKTOP-5GSHRJ7.5384.0 +2 -2
- special_tokens_map.json +7 -0
- tokenizer_config.json +45 -0
- training_args.bin +3 -0
- training_params.json +47 -0
- vocab.json +0 -0
README.md
ADDED
@@ -0,0 +1,46 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
tags:
|
3 |
+
- autotrain
|
4 |
+
- text-generation-inference
|
5 |
+
- text-generation
|
6 |
+
- peft
|
7 |
+
library_name: transformers
|
8 |
+
base_model: microsoft/biogpt
|
9 |
+
widget:
|
10 |
+
- messages:
|
11 |
+
- role: user
|
12 |
+
content: What is your favorite condiment?
|
13 |
+
license: other
|
14 |
+
---
|
15 |
+
|
16 |
+
# Model Trained Using AutoTrain
|
17 |
+
|
18 |
+
This model was trained using AutoTrain. For more information, please visit [AutoTrain](https://hf.co/docs/autotrain).
|
19 |
+
|
20 |
+
# Usage
|
21 |
+
|
22 |
+
```python
|
23 |
+
|
24 |
+
from transformers import AutoModelForCausalLM, AutoTokenizer
|
25 |
+
|
26 |
+
model_path = "PATH_TO_THIS_REPO"
|
27 |
+
|
28 |
+
tokenizer = AutoTokenizer.from_pretrained(model_path)
|
29 |
+
model = AutoModelForCausalLM.from_pretrained(
|
30 |
+
model_path,
|
31 |
+
device_map="auto",
|
32 |
+
torch_dtype='auto'
|
33 |
+
).eval()
|
34 |
+
|
35 |
+
# Prompt content: "hi"
|
36 |
+
messages = [
|
37 |
+
{"role": "user", "content": "hi"}
|
38 |
+
]
|
39 |
+
|
40 |
+
input_ids = tokenizer.apply_chat_template(conversation=messages, tokenize=True, add_generation_prompt=True, return_tensors='pt')
|
41 |
+
output_ids = model.generate(input_ids.to('cuda'))
|
42 |
+
response = tokenizer.decode(output_ids[0][input_ids.shape[1]:], skip_special_tokens=True)
|
43 |
+
|
44 |
+
# Model response: "Hello! How can I assist you today?"
|
45 |
+
print(response)
|
46 |
+
```
|
adapter_config.json
ADDED
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"alpha_pattern": {},
|
3 |
+
"auto_mapping": null,
|
4 |
+
"base_model_name_or_path": "microsoft/biogpt",
|
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 |
+
"k_proj",
|
24 |
+
"fc2",
|
25 |
+
"fc1",
|
26 |
+
"v_proj",
|
27 |
+
"q_proj",
|
28 |
+
"out_proj"
|
29 |
+
],
|
30 |
+
"task_type": "CAUSAL_LM",
|
31 |
+
"use_dora": false,
|
32 |
+
"use_rslora": false
|
33 |
+
}
|
adapter_model.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:a3b290344303f2e9a724feef84d639df3d0ec13bac1f4788711e41b21cdc13ba
|
3 |
+
size 28349272
|
autotrain-data/dataset_dict.json
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
{"splits": ["train", "validation"]}
|
autotrain-data/train/cache-55437dce45baf967.arrow
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:e96e495b96565754aed14c9376b65e955876fe3ddbf85a6e147bbb3fb7f2ed58
|
3 |
+
size 610032
|
autotrain-data/train/data-00000-of-00001.arrow
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:ad7326a56f21da6969d01fb2c9f15286a477dc5f0adee72d9c06dbf87eb0dd87
|
3 |
+
size 141512
|
autotrain-data/train/dataset_info.json
ADDED
@@ -0,0 +1,56 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"citation": "",
|
3 |
+
"description": "",
|
4 |
+
"features": {
|
5 |
+
"Unnamed: 0": {
|
6 |
+
"dtype": "string",
|
7 |
+
"_type": "Value"
|
8 |
+
},
|
9 |
+
"Unnamed: 1": {
|
10 |
+
"dtype": "string",
|
11 |
+
"_type": "Value"
|
12 |
+
},
|
13 |
+
"Unnamed: 2": {
|
14 |
+
"dtype": "string",
|
15 |
+
"_type": "Value"
|
16 |
+
},
|
17 |
+
"Unnamed: 5": {
|
18 |
+
"dtype": "string",
|
19 |
+
"_type": "Value"
|
20 |
+
},
|
21 |
+
"Unnamed: 6": {
|
22 |
+
"dtype": "string",
|
23 |
+
"_type": "Value"
|
24 |
+
},
|
25 |
+
"Unnamed: 7": {
|
26 |
+
"dtype": "float64",
|
27 |
+
"_type": "Value"
|
28 |
+
},
|
29 |
+
"Unnamed: 8": {
|
30 |
+
"dtype": "float64",
|
31 |
+
"_type": "Value"
|
32 |
+
},
|
33 |
+
"Unnamed: 9": {
|
34 |
+
"dtype": "float64",
|
35 |
+
"_type": "Value"
|
36 |
+
},
|
37 |
+
"Unnamed: 10": {
|
38 |
+
"dtype": "float64",
|
39 |
+
"_type": "Value"
|
40 |
+
},
|
41 |
+
"autotrain_text": {
|
42 |
+
"dtype": "string",
|
43 |
+
"_type": "Value"
|
44 |
+
},
|
45 |
+
"autotrain_prompt": {
|
46 |
+
"dtype": "string",
|
47 |
+
"_type": "Value"
|
48 |
+
},
|
49 |
+
"autotrain_rejected_text": {
|
50 |
+
"dtype": "string",
|
51 |
+
"_type": "Value"
|
52 |
+
}
|
53 |
+
},
|
54 |
+
"homepage": "",
|
55 |
+
"license": ""
|
56 |
+
}
|
autotrain-data/train/state.json
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"_data_files": [
|
3 |
+
{
|
4 |
+
"filename": "data-00000-of-00001.arrow"
|
5 |
+
}
|
6 |
+
],
|
7 |
+
"_fingerprint": "bdd2d6b467aaafb5",
|
8 |
+
"_format_columns": null,
|
9 |
+
"_format_kwargs": {},
|
10 |
+
"_format_type": null,
|
11 |
+
"_output_all_columns": false,
|
12 |
+
"_split": null
|
13 |
+
}
|
autotrain-data/validation/data-00000-of-00001.arrow
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:ad7326a56f21da6969d01fb2c9f15286a477dc5f0adee72d9c06dbf87eb0dd87
|
3 |
+
size 141512
|
autotrain-data/validation/dataset_info.json
ADDED
@@ -0,0 +1,56 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"citation": "",
|
3 |
+
"description": "",
|
4 |
+
"features": {
|
5 |
+
"Unnamed: 0": {
|
6 |
+
"dtype": "string",
|
7 |
+
"_type": "Value"
|
8 |
+
},
|
9 |
+
"Unnamed: 1": {
|
10 |
+
"dtype": "string",
|
11 |
+
"_type": "Value"
|
12 |
+
},
|
13 |
+
"Unnamed: 2": {
|
14 |
+
"dtype": "string",
|
15 |
+
"_type": "Value"
|
16 |
+
},
|
17 |
+
"Unnamed: 5": {
|
18 |
+
"dtype": "string",
|
19 |
+
"_type": "Value"
|
20 |
+
},
|
21 |
+
"Unnamed: 6": {
|
22 |
+
"dtype": "string",
|
23 |
+
"_type": "Value"
|
24 |
+
},
|
25 |
+
"Unnamed: 7": {
|
26 |
+
"dtype": "float64",
|
27 |
+
"_type": "Value"
|
28 |
+
},
|
29 |
+
"Unnamed: 8": {
|
30 |
+
"dtype": "float64",
|
31 |
+
"_type": "Value"
|
32 |
+
},
|
33 |
+
"Unnamed: 9": {
|
34 |
+
"dtype": "float64",
|
35 |
+
"_type": "Value"
|
36 |
+
},
|
37 |
+
"Unnamed: 10": {
|
38 |
+
"dtype": "float64",
|
39 |
+
"_type": "Value"
|
40 |
+
},
|
41 |
+
"autotrain_text": {
|
42 |
+
"dtype": "string",
|
43 |
+
"_type": "Value"
|
44 |
+
},
|
45 |
+
"autotrain_prompt": {
|
46 |
+
"dtype": "string",
|
47 |
+
"_type": "Value"
|
48 |
+
},
|
49 |
+
"autotrain_rejected_text": {
|
50 |
+
"dtype": "string",
|
51 |
+
"_type": "Value"
|
52 |
+
}
|
53 |
+
},
|
54 |
+
"homepage": "",
|
55 |
+
"license": ""
|
56 |
+
}
|
autotrain-data/validation/state.json
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"_data_files": [
|
3 |
+
{
|
4 |
+
"filename": "data-00000-of-00001.arrow"
|
5 |
+
}
|
6 |
+
],
|
7 |
+
"_fingerprint": "bdd2d6b467aaafb5",
|
8 |
+
"_format_columns": null,
|
9 |
+
"_format_kwargs": {},
|
10 |
+
"_format_type": null,
|
11 |
+
"_output_all_columns": false,
|
12 |
+
"_split": null
|
13 |
+
}
|
merges.txt
ADDED
The diff for this file is too large to render.
See raw diff
|
|
runs/Jun11_05-20-52_DESKTOP-5GSHRJ7/events.out.tfevents.1718054457.DESKTOP-5GSHRJ7.5384.0
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:446d38faa6f62da6ac7d5a868126bbc68b9a6c2416739ff572d4048f2d1a6476
|
3 |
+
size 8315
|
special_tokens_map.json
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"bos_token": "<s>",
|
3 |
+
"eos_token": "</s>",
|
4 |
+
"pad_token": "<pad>",
|
5 |
+
"sep_token": "</s>",
|
6 |
+
"unk_token": "<unk>"
|
7 |
+
}
|
tokenizer_config.json
ADDED
@@ -0,0 +1,45 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"added_tokens_decoder": {
|
3 |
+
"0": {
|
4 |
+
"content": "<s>",
|
5 |
+
"lstrip": false,
|
6 |
+
"normalized": false,
|
7 |
+
"rstrip": false,
|
8 |
+
"single_word": false,
|
9 |
+
"special": true
|
10 |
+
},
|
11 |
+
"1": {
|
12 |
+
"content": "<pad>",
|
13 |
+
"lstrip": false,
|
14 |
+
"normalized": false,
|
15 |
+
"rstrip": false,
|
16 |
+
"single_word": false,
|
17 |
+
"special": true
|
18 |
+
},
|
19 |
+
"2": {
|
20 |
+
"content": "</s>",
|
21 |
+
"lstrip": false,
|
22 |
+
"normalized": false,
|
23 |
+
"rstrip": false,
|
24 |
+
"single_word": false,
|
25 |
+
"special": true
|
26 |
+
},
|
27 |
+
"3": {
|
28 |
+
"content": "<unk>",
|
29 |
+
"lstrip": false,
|
30 |
+
"normalized": false,
|
31 |
+
"rstrip": false,
|
32 |
+
"single_word": false,
|
33 |
+
"special": true
|
34 |
+
}
|
35 |
+
},
|
36 |
+
"bos_token": "<s>",
|
37 |
+
"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 %}",
|
38 |
+
"clean_up_tokenization_spaces": true,
|
39 |
+
"eos_token": "</s>",
|
40 |
+
"model_max_length": 2048,
|
41 |
+
"pad_token": "<pad>",
|
42 |
+
"sep_token": "</s>",
|
43 |
+
"tokenizer_class": "BioGptTokenizer",
|
44 |
+
"unk_token": "<unk>"
|
45 |
+
}
|
training_args.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:441189a406de460b4a47c4e9d293f7a3d857d4765ff2424e7926e9010c4ca0a0
|
3 |
+
size 5112
|
training_params.json
ADDED
@@ -0,0 +1,47 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"model": "microsoft/biogpt",
|
3 |
+
"project_name": "TEST20",
|
4 |
+
"data_path": "TEST20/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": "dpo",
|
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 |
+
"auto_find_batch_size": false,
|
19 |
+
"mixed_precision": "fp16",
|
20 |
+
"lr": 3e-05,
|
21 |
+
"epochs": 3,
|
22 |
+
"batch_size": 8,
|
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": true,
|
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": "autotrain_prompt",
|
43 |
+
"text_column": "autotrain_text",
|
44 |
+
"rejected_text_column": "autotrain_rejected_text",
|
45 |
+
"push_to_hub": true,
|
46 |
+
"username": "James520"
|
47 |
+
}
|
vocab.json
ADDED
The diff for this file is too large to render.
See raw diff
|
|