farrison-hord
commited on
Commit
•
7e5a680
1
Parent(s):
1141d32
Upload folder using huggingface_hub
Browse files- README.md +45 -0
- added_tokens.json +5 -0
- config.json +28 -0
- generation_config.json +14 -0
- merges.txt +0 -0
- model.safetensors +3 -0
- runs/Jul09_20-55-09_2b5c0f6ed49e/events.out.tfevents.1720558516.2b5c0f6ed49e.56013.0 +2 -2
- special_tokens_map.json +20 -0
- tokenizer.json +0 -0
- tokenizer_config.json +43 -0
- training_args.bin +3 -0
- training_params.json +48 -0
- vocab.json +0 -0
README.md
ADDED
@@ -0,0 +1,45 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
tags:
|
3 |
+
- autotrain
|
4 |
+
- text-generation-inference
|
5 |
+
- text-generation
|
6 |
+
library_name: transformers
|
7 |
+
base_model: Qwen/Qwen2-0.5B-Instruct
|
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 |
+
```
|
added_tokens.json
ADDED
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"<|endoftext|>": 151643,
|
3 |
+
"<|im_end|>": 151645,
|
4 |
+
"<|im_start|>": 151644
|
5 |
+
}
|
config.json
ADDED
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"_name_or_path": "Qwen/Qwen2-0.5B-Instruct",
|
3 |
+
"architectures": [
|
4 |
+
"Qwen2ForCausalLM"
|
5 |
+
],
|
6 |
+
"attention_dropout": 0.0,
|
7 |
+
"bos_token_id": 151643,
|
8 |
+
"eos_token_id": 151645,
|
9 |
+
"hidden_act": "silu",
|
10 |
+
"hidden_size": 896,
|
11 |
+
"initializer_range": 0.02,
|
12 |
+
"intermediate_size": 4864,
|
13 |
+
"max_position_embeddings": 32768,
|
14 |
+
"max_window_layers": 24,
|
15 |
+
"model_type": "qwen2",
|
16 |
+
"num_attention_heads": 14,
|
17 |
+
"num_hidden_layers": 24,
|
18 |
+
"num_key_value_heads": 2,
|
19 |
+
"rms_norm_eps": 1e-06,
|
20 |
+
"rope_theta": 1000000.0,
|
21 |
+
"sliding_window": 32768,
|
22 |
+
"tie_word_embeddings": true,
|
23 |
+
"torch_dtype": "float32",
|
24 |
+
"transformers_version": "4.42.2",
|
25 |
+
"use_cache": true,
|
26 |
+
"use_sliding_window": false,
|
27 |
+
"vocab_size": 151646
|
28 |
+
}
|
generation_config.json
ADDED
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"bos_token_id": 151643,
|
3 |
+
"do_sample": true,
|
4 |
+
"eos_token_id": [
|
5 |
+
151645,
|
6 |
+
151643
|
7 |
+
],
|
8 |
+
"pad_token_id": 151643,
|
9 |
+
"repetition_penalty": 1.1,
|
10 |
+
"temperature": 0.7,
|
11 |
+
"top_k": 20,
|
12 |
+
"top_p": 0.8,
|
13 |
+
"transformers_version": "4.42.2"
|
14 |
+
}
|
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:f18f2efac545c4b16b96e6aabb202887db0446e0288a4b84c2b726436ea0a8ce
|
3 |
+
size 1975124112
|
runs/Jul09_20-55-09_2b5c0f6ed49e/events.out.tfevents.1720558516.2b5c0f6ed49e.56013.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:134b00ca42540ea6a5a88f3d5fd10e70f8b40336e7abca5d3b7b2ccd130c0573
|
3 |
+
size 6596
|
special_tokens_map.json
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"additional_special_tokens": [
|
3 |
+
"<|im_start|>",
|
4 |
+
"<|im_end|>"
|
5 |
+
],
|
6 |
+
"eos_token": {
|
7 |
+
"content": "<|im_end|>",
|
8 |
+
"lstrip": false,
|
9 |
+
"normalized": false,
|
10 |
+
"rstrip": false,
|
11 |
+
"single_word": false
|
12 |
+
},
|
13 |
+
"pad_token": {
|
14 |
+
"content": "<|endoftext|>",
|
15 |
+
"lstrip": false,
|
16 |
+
"normalized": false,
|
17 |
+
"rstrip": false,
|
18 |
+
"single_word": false
|
19 |
+
}
|
20 |
+
}
|
tokenizer.json
ADDED
The diff for this file is too large to render.
See raw diff
|
|
tokenizer_config.json
ADDED
@@ -0,0 +1,43 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"add_prefix_space": false,
|
3 |
+
"added_tokens_decoder": {
|
4 |
+
"151643": {
|
5 |
+
"content": "<|endoftext|>",
|
6 |
+
"lstrip": false,
|
7 |
+
"normalized": false,
|
8 |
+
"rstrip": false,
|
9 |
+
"single_word": false,
|
10 |
+
"special": true
|
11 |
+
},
|
12 |
+
"151644": {
|
13 |
+
"content": "<|im_start|>",
|
14 |
+
"lstrip": false,
|
15 |
+
"normalized": false,
|
16 |
+
"rstrip": false,
|
17 |
+
"single_word": false,
|
18 |
+
"special": true
|
19 |
+
},
|
20 |
+
"151645": {
|
21 |
+
"content": "<|im_end|>",
|
22 |
+
"lstrip": false,
|
23 |
+
"normalized": false,
|
24 |
+
"rstrip": false,
|
25 |
+
"single_word": false,
|
26 |
+
"special": true
|
27 |
+
}
|
28 |
+
},
|
29 |
+
"additional_special_tokens": [
|
30 |
+
"<|im_start|>",
|
31 |
+
"<|im_end|>"
|
32 |
+
],
|
33 |
+
"bos_token": null,
|
34 |
+
"chat_template": "{% for message in messages %}{% if loop.first and messages[0]['role'] != 'system' %}{{ '<|im_start|>system\nYou are a helpful assistant.<|im_end|>\n' }}{% endif %}{{'<|im_start|>' + message['role'] + '\n' + message['content'] + '<|im_end|>' + '\n'}}{% endfor %}{% if add_generation_prompt %}{{ '<|im_start|>assistant\n' }}{% endif %}",
|
35 |
+
"clean_up_tokenization_spaces": false,
|
36 |
+
"eos_token": "<|im_end|>",
|
37 |
+
"errors": "replace",
|
38 |
+
"model_max_length": 2048,
|
39 |
+
"pad_token": "<|endoftext|>",
|
40 |
+
"split_special_tokens": false,
|
41 |
+
"tokenizer_class": "Qwen2Tokenizer",
|
42 |
+
"unk_token": null
|
43 |
+
}
|
training_args.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:c46ae89e2b2bd291f66c77eac04c939921dd042225134911240354c4dba80807
|
3 |
+
size 5432
|
training_params.json
ADDED
@@ -0,0 +1,48 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"model": "Qwen/Qwen2-0.5B-Instruct",
|
3 |
+
"project_name": "qwen-05-nietzsche",
|
4 |
+
"data_path": "qwen-05-nietzsche/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": "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": 3e-05,
|
21 |
+
"epochs": 3,
|
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": "autotrain_prompt",
|
43 |
+
"text_column": "autotrain_text",
|
44 |
+
"rejected_text_column": "autotrain_rejected_text",
|
45 |
+
"push_to_hub": true,
|
46 |
+
"username": "farrison-hord",
|
47 |
+
"unsloth": false
|
48 |
+
}
|
vocab.json
ADDED
The diff for this file is too large to render.
See raw diff
|
|