Upload folder using huggingface_hub
Browse files- README.md +46 -0
- adapter_config.json +29 -0
- adapter_model.safetensors +3 -0
- special_tokens_map.json +29 -0
- tokenizer.json +0 -0
- tokenizer.model +3 -0
- tokenizer_config.json +47 -0
- training_args.bin +3 -0
- training_params.json +47 -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: alexsherstinsky/Mistral-7B-v0.1-sharded
|
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,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"alpha_pattern": {},
|
3 |
+
"auto_mapping": null,
|
4 |
+
"base_model_name_or_path": "alexsherstinsky/Mistral-7B-v0.1-sharded",
|
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 |
+
"v_proj",
|
24 |
+
"q_proj"
|
25 |
+
],
|
26 |
+
"task_type": "CAUSAL_LM",
|
27 |
+
"use_dora": false,
|
28 |
+
"use_rslora": false
|
29 |
+
}
|
adapter_model.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:3877546eac27da7cd1ccafb329dbfa15dfb5c70792ae70ee68f7ec7d3681cd3e
|
3 |
+
size 27280152
|
special_tokens_map.json
ADDED
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"additional_special_tokens": [
|
3 |
+
"<unk>",
|
4 |
+
"<s>",
|
5 |
+
"</s>"
|
6 |
+
],
|
7 |
+
"bos_token": {
|
8 |
+
"content": "<s>",
|
9 |
+
"lstrip": false,
|
10 |
+
"normalized": false,
|
11 |
+
"rstrip": false,
|
12 |
+
"single_word": false
|
13 |
+
},
|
14 |
+
"eos_token": {
|
15 |
+
"content": "</s>",
|
16 |
+
"lstrip": false,
|
17 |
+
"normalized": false,
|
18 |
+
"rstrip": false,
|
19 |
+
"single_word": false
|
20 |
+
},
|
21 |
+
"pad_token": "</s>",
|
22 |
+
"unk_token": {
|
23 |
+
"content": "<unk>",
|
24 |
+
"lstrip": false,
|
25 |
+
"normalized": false,
|
26 |
+
"rstrip": false,
|
27 |
+
"single_word": false
|
28 |
+
}
|
29 |
+
}
|
tokenizer.json
ADDED
The diff for this file is too large to render.
See raw diff
|
|
tokenizer.model
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:dadfd56d766715c61d2ef780a525ab43b8e6da4de6865bda3d95fdef5e134055
|
3 |
+
size 493443
|
tokenizer_config.json
ADDED
@@ -0,0 +1,47 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"add_bos_token": true,
|
3 |
+
"add_eos_token": false,
|
4 |
+
"added_tokens_decoder": {
|
5 |
+
"0": {
|
6 |
+
"content": "<unk>",
|
7 |
+
"lstrip": false,
|
8 |
+
"normalized": false,
|
9 |
+
"rstrip": false,
|
10 |
+
"single_word": false,
|
11 |
+
"special": true
|
12 |
+
},
|
13 |
+
"1": {
|
14 |
+
"content": "<s>",
|
15 |
+
"lstrip": false,
|
16 |
+
"normalized": false,
|
17 |
+
"rstrip": false,
|
18 |
+
"single_word": false,
|
19 |
+
"special": true
|
20 |
+
},
|
21 |
+
"2": {
|
22 |
+
"content": "</s>",
|
23 |
+
"lstrip": false,
|
24 |
+
"normalized": false,
|
25 |
+
"rstrip": false,
|
26 |
+
"single_word": false,
|
27 |
+
"special": true
|
28 |
+
}
|
29 |
+
},
|
30 |
+
"additional_special_tokens": [
|
31 |
+
"<unk>",
|
32 |
+
"<s>",
|
33 |
+
"</s>"
|
34 |
+
],
|
35 |
+
"bos_token": "<s>",
|
36 |
+
"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 %}",
|
37 |
+
"clean_up_tokenization_spaces": false,
|
38 |
+
"eos_token": "</s>",
|
39 |
+
"model_max_length": 1024,
|
40 |
+
"pad_token": "</s>",
|
41 |
+
"padding_side": "left",
|
42 |
+
"sp_model_kwargs": {},
|
43 |
+
"spaces_between_special_tokens": false,
|
44 |
+
"tokenizer_class": "LlamaTokenizer",
|
45 |
+
"unk_token": "<unk>",
|
46 |
+
"use_default_system_prompt": true
|
47 |
+
}
|
training_args.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:69d30c29b8bac4e0e13a7ada7f2269c176dd8b6d76bd9c5c360c088bcdf3e8ad
|
3 |
+
size 5112
|
training_params.json
ADDED
@@ -0,0 +1,47 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"model": "alexsherstinsky/Mistral-7B-v0.1-sharded",
|
3 |
+
"project_name": "mistral-7b-mj-finetuned",
|
4 |
+
"data_path": "mistral-7b-mj-finetuned/autotrain-data",
|
5 |
+
"train_split": "train",
|
6 |
+
"valid_split": null,
|
7 |
+
"add_eos_token": false,
|
8 |
+
"block_size": -1,
|
9 |
+
"model_max_length": 1024,
|
10 |
+
"padding": null,
|
11 |
+
"trainer": "sft",
|
12 |
+
"use_flash_attention_2": false,
|
13 |
+
"log": "none",
|
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": null,
|
20 |
+
"lr": 0.0002,
|
21 |
+
"epochs": 3,
|
22 |
+
"batch_size": 2,
|
23 |
+
"warmup_ratio": 0.1,
|
24 |
+
"gradient_accumulation": 1,
|
25 |
+
"optimizer": "adamw_torch",
|
26 |
+
"scheduler": "linear",
|
27 |
+
"weight_decay": 0.0,
|
28 |
+
"max_grad_norm": 1.0,
|
29 |
+
"seed": 42,
|
30 |
+
"chat_template": null,
|
31 |
+
"quantization": "int4",
|
32 |
+
"target_modules": "q_proj,v_proj",
|
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": "YasiruDEX"
|
47 |
+
}
|