Training in progress, step 5
Browse files- README.md +38 -46
- chat_template.jinja +15 -0
- config.json +2 -2
- model-00001-of-00003.safetensors +1 -1
- model-00002-of-00003.safetensors +1 -1
- model-00003-of-00003.safetensors +1 -1
- model.safetensors.index.json +1 -0
- special_tokens_map.json +0 -1
- tokenizer.json +0 -0
- tokenizer.model +3 -0
- tokenizer_config.json +5 -4
- training_args.bin +2 -2
README.md
CHANGED
@@ -1,66 +1,58 @@
|
|
1 |
---
|
2 |
-
license: apache-2.0
|
3 |
base_model: mistralai/Mistral-7B-v0.1
|
|
|
|
|
4 |
tags:
|
5 |
-
- trl
|
6 |
-
- sft
|
7 |
- generated_from_trainer
|
8 |
-
|
9 |
-
-
|
10 |
-
|
11 |
-
- name: zephyr-7b-sft-full
|
12 |
-
results: []
|
13 |
---
|
14 |
|
15 |
-
|
16 |
-
should probably proofread and complete it, then remove this comment. -->
|
17 |
-
|
18 |
-
# zephyr-7b-sft-full
|
19 |
|
20 |
-
This model is a fine-tuned version of [mistralai/Mistral-7B-v0.1](https://huggingface.co/mistralai/Mistral-7B-v0.1)
|
21 |
-
It
|
22 |
-
- Loss: 0.9355
|
23 |
|
24 |
-
##
|
25 |
|
26 |
-
|
|
|
27 |
|
28 |
-
|
|
|
|
|
|
|
|
|
29 |
|
30 |
-
|
31 |
-
|
32 |
-
## Training and evaluation data
|
33 |
|
34 |
-
|
35 |
|
36 |
-
## Training procedure
|
37 |
|
38 |
-
|
39 |
|
40 |
-
|
41 |
-
- learning_rate: 2e-05
|
42 |
-
- train_batch_size: 16
|
43 |
-
- eval_batch_size: 8
|
44 |
-
- seed: 42
|
45 |
-
- distributed_type: multi-GPU
|
46 |
-
- num_devices: 8
|
47 |
-
- total_train_batch_size: 128
|
48 |
-
- total_eval_batch_size: 64
|
49 |
-
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
|
50 |
-
- lr_scheduler_type: cosine
|
51 |
-
- lr_scheduler_warmup_ratio: 0.1
|
52 |
-
- num_epochs: 1
|
53 |
|
54 |
-
|
|
|
|
|
|
|
|
|
55 |
|
56 |
-
|
57 |
-
|:-------------:|:-----:|:----:|:---------------:|
|
58 |
-
| 0.9077 | 1.0 | 1090 | 0.9355 |
|
59 |
|
60 |
|
61 |
-
### Framework versions
|
62 |
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
---
|
|
|
2 |
base_model: mistralai/Mistral-7B-v0.1
|
3 |
+
library_name: transformers
|
4 |
+
model_name: zephyr-7b-sft-full
|
5 |
tags:
|
|
|
|
|
6 |
- generated_from_trainer
|
7 |
+
- sft
|
8 |
+
- trl
|
9 |
+
licence: license
|
|
|
|
|
10 |
---
|
11 |
|
12 |
+
# Model Card for zephyr-7b-sft-full
|
|
|
|
|
|
|
13 |
|
14 |
+
This model is a fine-tuned version of [mistralai/Mistral-7B-v0.1](https://huggingface.co/mistralai/Mistral-7B-v0.1).
|
15 |
+
It has been trained using [TRL](https://github.com/huggingface/trl).
|
|
|
16 |
|
17 |
+
## Quick start
|
18 |
|
19 |
+
```python
|
20 |
+
from transformers import pipeline
|
21 |
|
22 |
+
question = "If you had a time machine, but could only go to the past or the future once and never return, which would you choose and why?"
|
23 |
+
generator = pipeline("text-generation", model="lewtun/zephyr-7b-sft-full", device="cuda")
|
24 |
+
output = generator([{"role": "user", "content": question}], max_new_tokens=128, return_full_text=False)[0]
|
25 |
+
print(output["generated_text"])
|
26 |
+
```
|
27 |
|
28 |
+
## Training procedure
|
|
|
|
|
29 |
|
30 |
+
[<img src="https://raw.githubusercontent.com/wandb/assets/main/wandb-github-badge-28.svg" alt="Visualize in Weights & Biases" width="150" height="24"/>](https://wandb.ai/huggingface/huggingface/runs/d8v70tik)
|
31 |
|
|
|
32 |
|
33 |
+
This model was trained with SFT.
|
34 |
|
35 |
+
### Framework versions
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
36 |
|
37 |
+
- TRL: 0.19.1
|
38 |
+
- Transformers: 4.53.3
|
39 |
+
- Pytorch: 2.6.0+cu126
|
40 |
+
- Datasets: 4.0.0
|
41 |
+
- Tokenizers: 0.21.2
|
42 |
|
43 |
+
## Citations
|
|
|
|
|
44 |
|
45 |
|
|
|
46 |
|
47 |
+
Cite TRL as:
|
48 |
+
|
49 |
+
```bibtex
|
50 |
+
@misc{vonwerra2022trl,
|
51 |
+
title = {{TRL: Transformer Reinforcement Learning}},
|
52 |
+
author = {Leandro von Werra and Younes Belkada and Lewis Tunstall and Edward Beeching and Tristan Thrush and Nathan Lambert and Shengyi Huang and Kashif Rasul and Quentin Gallou{\'e}dec},
|
53 |
+
year = 2020,
|
54 |
+
journal = {GitHub repository},
|
55 |
+
publisher = {GitHub},
|
56 |
+
howpublished = {\url{https://github.com/huggingface/trl}}
|
57 |
+
}
|
58 |
+
```
|
chat_template.jinja
ADDED
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{% for message in messages %}
|
2 |
+
{% if message['role'] == 'user' %}
|
3 |
+
{{ '<|user|>
|
4 |
+
' + message['content'] + eos_token }}
|
5 |
+
{% elif message['role'] == 'system' %}
|
6 |
+
{{ '<|system|>
|
7 |
+
' + message['content'] + eos_token }}
|
8 |
+
{% elif message['role'] == 'assistant' %}
|
9 |
+
{{ '<|assistant|>
|
10 |
+
' + message['content'] + eos_token }}
|
11 |
+
{% endif %}
|
12 |
+
{% if loop.last and add_generation_prompt %}
|
13 |
+
{{ '<|assistant|>' }}
|
14 |
+
{% endif %}
|
15 |
+
{% endfor %}
|
config.json
CHANGED
@@ -1,11 +1,11 @@
|
|
1 |
{
|
2 |
-
"_name_or_path": "mistralai/Mistral-7B-v0.1",
|
3 |
"architectures": [
|
4 |
"MistralForCausalLM"
|
5 |
],
|
6 |
"attention_dropout": 0.0,
|
7 |
"bos_token_id": 1,
|
8 |
"eos_token_id": 2,
|
|
|
9 |
"hidden_act": "silu",
|
10 |
"hidden_size": 4096,
|
11 |
"initializer_range": 0.02,
|
@@ -20,7 +20,7 @@
|
|
20 |
"sliding_window": 4096,
|
21 |
"tie_word_embeddings": false,
|
22 |
"torch_dtype": "bfloat16",
|
23 |
-
"transformers_version": "4.
|
24 |
"use_cache": false,
|
25 |
"vocab_size": 32000
|
26 |
}
|
|
|
1 |
{
|
|
|
2 |
"architectures": [
|
3 |
"MistralForCausalLM"
|
4 |
],
|
5 |
"attention_dropout": 0.0,
|
6 |
"bos_token_id": 1,
|
7 |
"eos_token_id": 2,
|
8 |
+
"head_dim": null,
|
9 |
"hidden_act": "silu",
|
10 |
"hidden_size": 4096,
|
11 |
"initializer_range": 0.02,
|
|
|
20 |
"sliding_window": 4096,
|
21 |
"tie_word_embeddings": false,
|
22 |
"torch_dtype": "bfloat16",
|
23 |
+
"transformers_version": "4.53.3",
|
24 |
"use_cache": false,
|
25 |
"vocab_size": 32000
|
26 |
}
|
model-00001-of-00003.safetensors
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
size 4943162336
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:a8d58599fd5d0edb702a2ba82fe09fb1be424c399b16e73feebb1e4e11c1f4d7
|
3 |
size 4943162336
|
model-00002-of-00003.safetensors
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
size 4999819336
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:5bdbf7f31b6c91c068004862bd65bf222ae69c7335489e175b62fd4cdb83d4b5
|
3 |
size 4999819336
|
model-00003-of-00003.safetensors
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
size 4540516344
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:94bfb83b27bd81cfc354ec878d21e7d232a091036bd6328c7a57f9331eef22bb
|
3 |
size 4540516344
|
model.safetensors.index.json
CHANGED
@@ -1,5 +1,6 @@
|
|
1 |
{
|
2 |
"metadata": {
|
|
|
3 |
"total_size": 14483464192
|
4 |
},
|
5 |
"weight_map": {
|
|
|
1 |
{
|
2 |
"metadata": {
|
3 |
+
"total_parameters": 266240,
|
4 |
"total_size": 14483464192
|
5 |
},
|
6 |
"weight_map": {
|
special_tokens_map.json
CHANGED
@@ -13,7 +13,6 @@
|
|
13 |
"rstrip": false,
|
14 |
"single_word": false
|
15 |
},
|
16 |
-
"pad_token": "</s>",
|
17 |
"unk_token": {
|
18 |
"content": "<unk>",
|
19 |
"lstrip": false,
|
|
|
13 |
"rstrip": false,
|
14 |
"single_word": false
|
15 |
},
|
|
|
16 |
"unk_token": {
|
17 |
"content": "<unk>",
|
18 |
"lstrip": false,
|
tokenizer.json
CHANGED
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
CHANGED
@@ -1,6 +1,7 @@
|
|
1 |
{
|
2 |
"add_bos_token": true,
|
3 |
"add_eos_token": false,
|
|
|
4 |
"added_tokens_decoder": {
|
5 |
"0": {
|
6 |
"content": "<unk>",
|
@@ -29,12 +30,12 @@
|
|
29 |
},
|
30 |
"additional_special_tokens": [],
|
31 |
"bos_token": "<s>",
|
32 |
-
"chat_template": "{% for message in messages %}\n{% if message['role'] == 'user' %}\n{{ '<|user|>\n' + message['content'] + eos_token }}\n{% elif message['role'] == 'system' %}\n{{ '<|system|>\n' + message['content'] + eos_token }}\n{% elif message['role'] == 'assistant' %}\n{{ '<|assistant|>\n' + message['content'] + eos_token }}\n{% endif %}\n{% if loop.last and add_generation_prompt %}\n{{ '<|assistant|>' }}\n{% endif %}\n{% endfor %}",
|
33 |
"clean_up_tokenization_spaces": false,
|
34 |
"eos_token": "</s>",
|
35 |
-
"
|
36 |
-
"
|
37 |
-
"
|
|
|
38 |
"sp_model_kwargs": {},
|
39 |
"spaces_between_special_tokens": false,
|
40 |
"tokenizer_class": "LlamaTokenizer",
|
|
|
1 |
{
|
2 |
"add_bos_token": true,
|
3 |
"add_eos_token": false,
|
4 |
+
"add_prefix_space": null,
|
5 |
"added_tokens_decoder": {
|
6 |
"0": {
|
7 |
"content": "<unk>",
|
|
|
30 |
},
|
31 |
"additional_special_tokens": [],
|
32 |
"bos_token": "<s>",
|
|
|
33 |
"clean_up_tokenization_spaces": false,
|
34 |
"eos_token": "</s>",
|
35 |
+
"extra_special_tokens": {},
|
36 |
+
"legacy": false,
|
37 |
+
"model_max_length": 1000000000000000019884624838656,
|
38 |
+
"pad_token": null,
|
39 |
"sp_model_kwargs": {},
|
40 |
"spaces_between_special_tokens": false,
|
41 |
"tokenizer_class": "LlamaTokenizer",
|
training_args.bin
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:f28060f67c621b864c3400cab84d5b8524c780da12984991f79740ad5ce94023
|
3 |
+
size 7544
|