gb-lab/mixtral-32Mx2-chat-squad-v1
Browse files- .X0-lock +1 -0
- .X1-lock +1 -0
- .X1024-lock +1 -0
- .X1025-lock +1 -0
- README.md +40 -180
- adapter_config.json +3 -3
- adapter_model.safetensors +1 -1
- added_tokens.json +4 -0
- pyright-1320309-hSWhr4hdGKMC/builtins-1320309-YoNNJ4FwUuZ2-.py +0 -0
- special_tokens_map.json +30 -0
- tmp22s3hf5p/__pycache__/_remote_module_non_scriptable.cpython-312.pyc +0 -0
- tmp22s3hf5p/_remote_module_non_scriptable.py +81 -0
- tmpfa_g02fc/__pycache__/_remote_module_non_scriptable.cpython-312.pyc +0 -0
- tmpfa_g02fc/_remote_module_non_scriptable.py +81 -0
- tokenizer.json +0 -0
- tokenizer.model +3 -0
- tokenizer_config.json +60 -0
- training_args.bin +3 -0
.X0-lock
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
2669
|
.X1-lock
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
2669
|
.X1024-lock
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
1946
|
.X1025-lock
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
1946
|
README.md
CHANGED
@@ -1,199 +1,59 @@
|
|
1 |
---
|
2 |
-
|
3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
---
|
5 |
|
6 |
-
|
|
|
7 |
|
8 |
-
|
9 |
|
|
|
10 |
|
|
|
11 |
|
12 |
-
|
13 |
|
14 |
-
|
15 |
|
16 |
-
|
17 |
|
18 |
-
|
19 |
|
20 |
-
|
21 |
-
- **Funded by [optional]:** [More Information Needed]
|
22 |
-
- **Shared by [optional]:** [More Information Needed]
|
23 |
-
- **Model type:** [More Information Needed]
|
24 |
-
- **Language(s) (NLP):** [More Information Needed]
|
25 |
-
- **License:** [More Information Needed]
|
26 |
-
- **Finetuned from model [optional]:** [More Information Needed]
|
27 |
|
28 |
-
|
29 |
|
30 |
-
|
31 |
|
32 |
-
|
33 |
-
-
|
34 |
-
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
35 |
|
36 |
-
|
37 |
|
38 |
-
<!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
|
39 |
|
40 |
-
### Direct Use
|
41 |
|
42 |
-
|
43 |
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
[More Information Needed]
|
51 |
-
|
52 |
-
### Out-of-Scope Use
|
53 |
-
|
54 |
-
<!-- This section addresses misuse, malicious use, and uses that the model will not work well for. -->
|
55 |
-
|
56 |
-
[More Information Needed]
|
57 |
-
|
58 |
-
## Bias, Risks, and Limitations
|
59 |
-
|
60 |
-
<!-- This section is meant to convey both technical and sociotechnical limitations. -->
|
61 |
-
|
62 |
-
[More Information Needed]
|
63 |
-
|
64 |
-
### Recommendations
|
65 |
-
|
66 |
-
<!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. -->
|
67 |
-
|
68 |
-
Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.
|
69 |
-
|
70 |
-
## How to Get Started with the Model
|
71 |
-
|
72 |
-
Use the code below to get started with the model.
|
73 |
-
|
74 |
-
[More Information Needed]
|
75 |
-
|
76 |
-
## Training Details
|
77 |
-
|
78 |
-
### Training Data
|
79 |
-
|
80 |
-
<!-- This should link to a Dataset Card, perhaps with a short stub of information on what the training data is all about as well as documentation related to data pre-processing or additional filtering. -->
|
81 |
-
|
82 |
-
[More Information Needed]
|
83 |
-
|
84 |
-
### Training Procedure
|
85 |
-
|
86 |
-
<!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. -->
|
87 |
-
|
88 |
-
#### Preprocessing [optional]
|
89 |
-
|
90 |
-
[More Information Needed]
|
91 |
-
|
92 |
-
|
93 |
-
#### Training Hyperparameters
|
94 |
-
|
95 |
-
- **Training regime:** [More Information Needed] <!--fp32, fp16 mixed precision, bf16 mixed precision, bf16 non-mixed precision, fp16 non-mixed precision, fp8 mixed precision -->
|
96 |
-
|
97 |
-
#### Speeds, Sizes, Times [optional]
|
98 |
-
|
99 |
-
<!-- This section provides information about throughput, start/end time, checkpoint size if relevant, etc. -->
|
100 |
-
|
101 |
-
[More Information Needed]
|
102 |
-
|
103 |
-
## Evaluation
|
104 |
-
|
105 |
-
<!-- This section describes the evaluation protocols and provides the results. -->
|
106 |
-
|
107 |
-
### Testing Data, Factors & Metrics
|
108 |
-
|
109 |
-
#### Testing Data
|
110 |
-
|
111 |
-
<!-- This should link to a Dataset Card if possible. -->
|
112 |
-
|
113 |
-
[More Information Needed]
|
114 |
-
|
115 |
-
#### Factors
|
116 |
-
|
117 |
-
<!-- These are the things the evaluation is disaggregating by, e.g., subpopulations or domains. -->
|
118 |
-
|
119 |
-
[More Information Needed]
|
120 |
-
|
121 |
-
#### Metrics
|
122 |
-
|
123 |
-
<!-- These are the evaluation metrics being used, ideally with a description of why. -->
|
124 |
-
|
125 |
-
[More Information Needed]
|
126 |
-
|
127 |
-
### Results
|
128 |
-
|
129 |
-
[More Information Needed]
|
130 |
-
|
131 |
-
#### Summary
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
## Model Examination [optional]
|
136 |
-
|
137 |
-
<!-- Relevant interpretability work for the model goes here -->
|
138 |
-
|
139 |
-
[More Information Needed]
|
140 |
-
|
141 |
-
## Environmental Impact
|
142 |
-
|
143 |
-
<!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly -->
|
144 |
-
|
145 |
-
Carbon emissions can be estimated using the [Machine Learning Impact calculator](https://mlco2.github.io/impact#compute) presented in [Lacoste et al. (2019)](https://arxiv.org/abs/1910.09700).
|
146 |
-
|
147 |
-
- **Hardware Type:** [More Information Needed]
|
148 |
-
- **Hours used:** [More Information Needed]
|
149 |
-
- **Cloud Provider:** [More Information Needed]
|
150 |
-
- **Compute Region:** [More Information Needed]
|
151 |
-
- **Carbon Emitted:** [More Information Needed]
|
152 |
-
|
153 |
-
## Technical Specifications [optional]
|
154 |
-
|
155 |
-
### Model Architecture and Objective
|
156 |
-
|
157 |
-
[More Information Needed]
|
158 |
-
|
159 |
-
### Compute Infrastructure
|
160 |
-
|
161 |
-
[More Information Needed]
|
162 |
-
|
163 |
-
#### Hardware
|
164 |
-
|
165 |
-
[More Information Needed]
|
166 |
-
|
167 |
-
#### Software
|
168 |
-
|
169 |
-
[More Information Needed]
|
170 |
-
|
171 |
-
## Citation [optional]
|
172 |
-
|
173 |
-
<!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. -->
|
174 |
-
|
175 |
-
**BibTeX:**
|
176 |
-
|
177 |
-
[More Information Needed]
|
178 |
-
|
179 |
-
**APA:**
|
180 |
-
|
181 |
-
[More Information Needed]
|
182 |
-
|
183 |
-
## Glossary [optional]
|
184 |
-
|
185 |
-
<!-- If relevant, include terms and calculations in this section that can help readers understand the model or model card. -->
|
186 |
-
|
187 |
-
[More Information Needed]
|
188 |
-
|
189 |
-
## More Information [optional]
|
190 |
-
|
191 |
-
[More Information Needed]
|
192 |
-
|
193 |
-
## Model Card Authors [optional]
|
194 |
-
|
195 |
-
[More Information Needed]
|
196 |
-
|
197 |
-
## Model Card Contact
|
198 |
-
|
199 |
-
[More Information Needed]
|
|
|
1 |
---
|
2 |
+
base_model: Felladrin/Minueza-32Mx2-Chat
|
3 |
+
library_name: peft
|
4 |
+
license: apache-2.0
|
5 |
+
tags:
|
6 |
+
- trl
|
7 |
+
- sft
|
8 |
+
- generated_from_trainer
|
9 |
+
model-index:
|
10 |
+
- name: tmp
|
11 |
+
results: []
|
12 |
---
|
13 |
|
14 |
+
<!-- This model card has been generated automatically according to the information the Trainer had access to. You
|
15 |
+
should probably proofread and complete it, then remove this comment. -->
|
16 |
|
17 |
+
# tmp
|
18 |
|
19 |
+
This model is a fine-tuned version of [Felladrin/Minueza-32Mx2-Chat](https://huggingface.co/Felladrin/Minueza-32Mx2-Chat) on the None dataset.
|
20 |
|
21 |
+
## Model description
|
22 |
|
23 |
+
More information needed
|
24 |
|
25 |
+
## Intended uses & limitations
|
26 |
|
27 |
+
More information needed
|
28 |
|
29 |
+
## Training and evaluation data
|
30 |
|
31 |
+
More information needed
|
|
|
|
|
|
|
|
|
|
|
|
|
32 |
|
33 |
+
## Training procedure
|
34 |
|
35 |
+
### Training hyperparameters
|
36 |
|
37 |
+
The following hyperparameters were used during training:
|
38 |
+
- learning_rate: 0.0008
|
39 |
+
- train_batch_size: 2
|
40 |
+
- eval_batch_size: 8
|
41 |
+
- seed: 42
|
42 |
+
- gradient_accumulation_steps: 2
|
43 |
+
- total_train_batch_size: 4
|
44 |
+
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
|
45 |
+
- lr_scheduler_type: cosine
|
46 |
+
- lr_scheduler_warmup_ratio: 0.05
|
47 |
+
- num_epochs: 1
|
48 |
|
49 |
+
### Training results
|
50 |
|
|
|
51 |
|
|
|
52 |
|
53 |
+
### Framework versions
|
54 |
|
55 |
+
- PEFT 0.10.0
|
56 |
+
- Transformers 4.44.0
|
57 |
+
- Pytorch 2.2.1+cu121
|
58 |
+
- Datasets 2.17.1
|
59 |
+
- Tokenizers 0.19.1
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
adapter_config.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
{
|
2 |
"alpha_pattern": {},
|
3 |
"auto_mapping": null,
|
4 |
-
"base_model_name_or_path": "Felladrin/Minueza-
|
5 |
"bias": "none",
|
6 |
"fan_in_fan_out": false,
|
7 |
"inference_mode": true,
|
@@ -21,9 +21,9 @@
|
|
21 |
"revision": null,
|
22 |
"target_modules": [
|
23 |
"o_proj",
|
24 |
-
"
|
25 |
"v_proj",
|
26 |
-
"
|
27 |
],
|
28 |
"task_type": "CAUSAL_LM",
|
29 |
"use_dora": false,
|
|
|
1 |
{
|
2 |
"alpha_pattern": {},
|
3 |
"auto_mapping": null,
|
4 |
+
"base_model_name_or_path": "Felladrin/Minueza-32Mx2-Chat",
|
5 |
"bias": "none",
|
6 |
"fan_in_fan_out": false,
|
7 |
"inference_mode": true,
|
|
|
21 |
"revision": null,
|
22 |
"target_modules": [
|
23 |
"o_proj",
|
24 |
+
"q_proj",
|
25 |
"v_proj",
|
26 |
+
"k_proj"
|
27 |
],
|
28 |
"task_type": "CAUSAL_LM",
|
29 |
"use_dora": false,
|
adapter_model.safetensors
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
size 1341584
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:df2a56489aa59b6d61a97b82131ec14e5753432221776a516b19eb2c92fb7283
|
3 |
size 1341584
|
added_tokens.json
ADDED
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"<|im_end|>": 32000,
|
3 |
+
"<|im_start|>": 32001
|
4 |
+
}
|
pyright-1320309-hSWhr4hdGKMC/builtins-1320309-YoNNJ4FwUuZ2-.py
ADDED
The diff for this file is too large to render.
See raw diff
|
|
special_tokens_map.json
ADDED
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"bos_token": {
|
3 |
+
"content": "<s>",
|
4 |
+
"lstrip": false,
|
5 |
+
"normalized": false,
|
6 |
+
"rstrip": false,
|
7 |
+
"single_word": false
|
8 |
+
},
|
9 |
+
"eos_token": {
|
10 |
+
"content": "<|im_end|>",
|
11 |
+
"lstrip": false,
|
12 |
+
"normalized": false,
|
13 |
+
"rstrip": false,
|
14 |
+
"single_word": false
|
15 |
+
},
|
16 |
+
"pad_token": {
|
17 |
+
"content": "<s>",
|
18 |
+
"lstrip": false,
|
19 |
+
"normalized": false,
|
20 |
+
"rstrip": false,
|
21 |
+
"single_word": false
|
22 |
+
},
|
23 |
+
"unk_token": {
|
24 |
+
"content": "<unk>",
|
25 |
+
"lstrip": false,
|
26 |
+
"normalized": false,
|
27 |
+
"rstrip": false,
|
28 |
+
"single_word": false
|
29 |
+
}
|
30 |
+
}
|
tmp22s3hf5p/__pycache__/_remote_module_non_scriptable.cpython-312.pyc
ADDED
Binary file (2.61 kB). View file
|
|
tmp22s3hf5p/_remote_module_non_scriptable.py
ADDED
@@ -0,0 +1,81 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
from typing import *
|
2 |
+
|
3 |
+
import torch
|
4 |
+
import torch.distributed.rpc as rpc
|
5 |
+
from torch import Tensor
|
6 |
+
from torch._jit_internal import Future
|
7 |
+
from torch.distributed.rpc import RRef
|
8 |
+
from typing import Tuple # pyre-ignore: unused import
|
9 |
+
|
10 |
+
|
11 |
+
module_interface_cls = None
|
12 |
+
|
13 |
+
|
14 |
+
def forward_async(self, *args, **kwargs):
|
15 |
+
args = (self.module_rref, self.device, self.is_device_map_set, *args)
|
16 |
+
kwargs = {**kwargs}
|
17 |
+
return rpc.rpc_async(
|
18 |
+
self.module_rref.owner(),
|
19 |
+
_remote_forward,
|
20 |
+
args,
|
21 |
+
kwargs,
|
22 |
+
)
|
23 |
+
|
24 |
+
|
25 |
+
def forward(self, *args, **kwargs):
|
26 |
+
args = (self.module_rref, self.device, self.is_device_map_set, *args)
|
27 |
+
kwargs = {**kwargs}
|
28 |
+
ret_fut = rpc.rpc_async(
|
29 |
+
self.module_rref.owner(),
|
30 |
+
_remote_forward,
|
31 |
+
args,
|
32 |
+
kwargs,
|
33 |
+
)
|
34 |
+
return ret_fut.wait()
|
35 |
+
|
36 |
+
|
37 |
+
_generated_methods = [
|
38 |
+
forward_async,
|
39 |
+
forward,
|
40 |
+
]
|
41 |
+
|
42 |
+
|
43 |
+
|
44 |
+
|
45 |
+
def _remote_forward(
|
46 |
+
module_rref: RRef[module_interface_cls], device: str, is_device_map_set: bool, *args, **kwargs):
|
47 |
+
module = module_rref.local_value()
|
48 |
+
device = torch.device(device)
|
49 |
+
|
50 |
+
if device.type != "cuda":
|
51 |
+
return module.forward(*args, **kwargs)
|
52 |
+
|
53 |
+
# If the module is on a cuda device,
|
54 |
+
# move any CPU tensor in args or kwargs to the same cuda device.
|
55 |
+
# Since torch script does not support generator expression,
|
56 |
+
# have to use concatenation instead of
|
57 |
+
# ``tuple(i.to(device) if isinstance(i, Tensor) else i for i in *args)``.
|
58 |
+
args = (*args,)
|
59 |
+
out_args: Tuple[()] = ()
|
60 |
+
for arg in args:
|
61 |
+
arg = (arg.to(device),) if isinstance(arg, Tensor) else (arg,)
|
62 |
+
out_args = out_args + arg
|
63 |
+
|
64 |
+
kwargs = {**kwargs}
|
65 |
+
for k, v in kwargs.items():
|
66 |
+
if isinstance(v, Tensor):
|
67 |
+
kwargs[k] = kwargs[k].to(device)
|
68 |
+
|
69 |
+
if is_device_map_set:
|
70 |
+
return module.forward(*out_args, **kwargs)
|
71 |
+
|
72 |
+
# If the device map is empty, then only CPU tensors are allowed to send over wire,
|
73 |
+
# so have to move any GPU tensor to CPU in the output.
|
74 |
+
# Since torch script does not support generator expression,
|
75 |
+
# have to use concatenation instead of
|
76 |
+
# ``tuple(i.cpu() if isinstance(i, Tensor) else i for i in module.forward(*out_args, **kwargs))``.
|
77 |
+
ret: Tuple[()] = ()
|
78 |
+
for i in module.forward(*out_args, **kwargs):
|
79 |
+
i = (i.cpu(),) if isinstance(i, Tensor) else (i,)
|
80 |
+
ret = ret + i
|
81 |
+
return ret
|
tmpfa_g02fc/__pycache__/_remote_module_non_scriptable.cpython-312.pyc
ADDED
Binary file (2.61 kB). View file
|
|
tmpfa_g02fc/_remote_module_non_scriptable.py
ADDED
@@ -0,0 +1,81 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
from typing import *
|
2 |
+
|
3 |
+
import torch
|
4 |
+
import torch.distributed.rpc as rpc
|
5 |
+
from torch import Tensor
|
6 |
+
from torch._jit_internal import Future
|
7 |
+
from torch.distributed.rpc import RRef
|
8 |
+
from typing import Tuple # pyre-ignore: unused import
|
9 |
+
|
10 |
+
|
11 |
+
module_interface_cls = None
|
12 |
+
|
13 |
+
|
14 |
+
def forward_async(self, *args, **kwargs):
|
15 |
+
args = (self.module_rref, self.device, self.is_device_map_set, *args)
|
16 |
+
kwargs = {**kwargs}
|
17 |
+
return rpc.rpc_async(
|
18 |
+
self.module_rref.owner(),
|
19 |
+
_remote_forward,
|
20 |
+
args,
|
21 |
+
kwargs,
|
22 |
+
)
|
23 |
+
|
24 |
+
|
25 |
+
def forward(self, *args, **kwargs):
|
26 |
+
args = (self.module_rref, self.device, self.is_device_map_set, *args)
|
27 |
+
kwargs = {**kwargs}
|
28 |
+
ret_fut = rpc.rpc_async(
|
29 |
+
self.module_rref.owner(),
|
30 |
+
_remote_forward,
|
31 |
+
args,
|
32 |
+
kwargs,
|
33 |
+
)
|
34 |
+
return ret_fut.wait()
|
35 |
+
|
36 |
+
|
37 |
+
_generated_methods = [
|
38 |
+
forward_async,
|
39 |
+
forward,
|
40 |
+
]
|
41 |
+
|
42 |
+
|
43 |
+
|
44 |
+
|
45 |
+
def _remote_forward(
|
46 |
+
module_rref: RRef[module_interface_cls], device: str, is_device_map_set: bool, *args, **kwargs):
|
47 |
+
module = module_rref.local_value()
|
48 |
+
device = torch.device(device)
|
49 |
+
|
50 |
+
if device.type != "cuda":
|
51 |
+
return module.forward(*args, **kwargs)
|
52 |
+
|
53 |
+
# If the module is on a cuda device,
|
54 |
+
# move any CPU tensor in args or kwargs to the same cuda device.
|
55 |
+
# Since torch script does not support generator expression,
|
56 |
+
# have to use concatenation instead of
|
57 |
+
# ``tuple(i.to(device) if isinstance(i, Tensor) else i for i in *args)``.
|
58 |
+
args = (*args,)
|
59 |
+
out_args: Tuple[()] = ()
|
60 |
+
for arg in args:
|
61 |
+
arg = (arg.to(device),) if isinstance(arg, Tensor) else (arg,)
|
62 |
+
out_args = out_args + arg
|
63 |
+
|
64 |
+
kwargs = {**kwargs}
|
65 |
+
for k, v in kwargs.items():
|
66 |
+
if isinstance(v, Tensor):
|
67 |
+
kwargs[k] = kwargs[k].to(device)
|
68 |
+
|
69 |
+
if is_device_map_set:
|
70 |
+
return module.forward(*out_args, **kwargs)
|
71 |
+
|
72 |
+
# If the device map is empty, then only CPU tensors are allowed to send over wire,
|
73 |
+
# so have to move any GPU tensor to CPU in the output.
|
74 |
+
# Since torch script does not support generator expression,
|
75 |
+
# have to use concatenation instead of
|
76 |
+
# ``tuple(i.cpu() if isinstance(i, Tensor) else i for i in module.forward(*out_args, **kwargs))``.
|
77 |
+
ret: Tuple[()] = ()
|
78 |
+
for i in module.forward(*out_args, **kwargs):
|
79 |
+
i = (i.cpu(),) if isinstance(i, Tensor) else (i,)
|
80 |
+
ret = ret + i
|
81 |
+
return ret
|
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,60 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"add_bos_token": false,
|
3 |
+
"add_eos_token": false,
|
4 |
+
"add_prefix_space": null,
|
5 |
+
"added_tokens_decoder": {
|
6 |
+
"0": {
|
7 |
+
"content": "<unk>",
|
8 |
+
"lstrip": false,
|
9 |
+
"normalized": false,
|
10 |
+
"rstrip": false,
|
11 |
+
"single_word": false,
|
12 |
+
"special": true
|
13 |
+
},
|
14 |
+
"1": {
|
15 |
+
"content": "<s>",
|
16 |
+
"lstrip": false,
|
17 |
+
"normalized": false,
|
18 |
+
"rstrip": false,
|
19 |
+
"single_word": false,
|
20 |
+
"special": true
|
21 |
+
},
|
22 |
+
"2": {
|
23 |
+
"content": "</s>",
|
24 |
+
"lstrip": false,
|
25 |
+
"normalized": false,
|
26 |
+
"rstrip": false,
|
27 |
+
"single_word": false,
|
28 |
+
"special": true
|
29 |
+
},
|
30 |
+
"32000": {
|
31 |
+
"content": "<|im_end|>",
|
32 |
+
"lstrip": false,
|
33 |
+
"normalized": false,
|
34 |
+
"rstrip": false,
|
35 |
+
"single_word": false,
|
36 |
+
"special": true
|
37 |
+
},
|
38 |
+
"32001": {
|
39 |
+
"content": "<|im_start|>",
|
40 |
+
"lstrip": false,
|
41 |
+
"normalized": false,
|
42 |
+
"rstrip": false,
|
43 |
+
"single_word": false,
|
44 |
+
"special": true
|
45 |
+
}
|
46 |
+
},
|
47 |
+
"additional_special_tokens": [],
|
48 |
+
"bos_token": "<s>",
|
49 |
+
"chat_template": "{% for message in messages %}{{'<|im_start|>' + message['role'] + '\n' + message['content'] + '<|im_end|>' + '\n'}}{% endfor %}{% if add_generation_prompt %}{{ '<|im_start|>assistant\n' }}{% endif %}",
|
50 |
+
"clean_up_tokenization_spaces": false,
|
51 |
+
"eos_token": "<|im_end|>",
|
52 |
+
"legacy": true,
|
53 |
+
"model_max_length": 2048,
|
54 |
+
"pad_token": "<s>",
|
55 |
+
"sp_model_kwargs": {},
|
56 |
+
"spaces_between_special_tokens": false,
|
57 |
+
"tokenizer_class": "LlamaTokenizer",
|
58 |
+
"unk_token": "<unk>",
|
59 |
+
"use_default_system_prompt": false
|
60 |
+
}
|
training_args.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:f1e17e74d9a216c737a22f63f7858d80f3275b8d6051421cc24eaf4df0cc1d0a
|
3 |
+
size 5368
|