Update README.md
Browse files
README.md
CHANGED
@@ -27,7 +27,73 @@ language:
|
|
27 |
library_name: transformers
|
28 |
---
|
29 |
|
30 |
-
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
31 |
from transformers import (
|
32 |
AutoModelForCausalLM,
|
33 |
AutoTokenizer,
|
@@ -99,4 +165,4 @@ generation_config = GenerationConfig(
|
|
99 |
outputs = model.generate(generation_config=generation_config,
|
100 |
input_ids=inputs,)
|
101 |
tokenizer.decode(outputs[0], skip_special_tokens=False) #True
|
102 |
-
```
|
|
|
27 |
library_name: transformers
|
28 |
---
|
29 |
|
30 |
+
```
|
31 |
+
reference-data-model:
|
32 |
+
|
33 |
+
datasets:
|
34 |
+
- OpenAssistant/oasst_top1_2023-08-25:
|
35 |
+
lang: "bg,ca,cs,da,de,en,es,fr,hr,hu,it,nl,pl,pt,ro,ru,sl,sr,sv,uk"
|
36 |
+
link: https://huggingface.co/datasets/OpenAssistant/oasst_top1_2023-08-25
|
37 |
+
|
38 |
+
model:
|
39 |
+
- Open-Orca/Mistral-7B-OpenOrca
|
40 |
+
Link:
|
41 |
+
https://huggingface.co/Open-Orca/Mistral-7B-OpenOrca
|
42 |
+
|
43 |
+
100 examples of generating:
|
44 |
+
- Link:
|
45 |
+
https://huggingface.co/NickyNicky/Mistral-7B-OpenOrca-oasst_top1_2023-08-25-v3/blob/main/output.xlsx
|
46 |
+
|
47 |
+
Activated training with:
|
48 |
+
- Link:
|
49 |
+
https://huggingface.co/blog/tomaarsen/attention-sinks
|
50 |
+
https://github.com/tomaarsen/attention_sinks
|
51 |
+
https://arxiv.org/abs/2309.17453
|
52 |
+
|
53 |
+
TRL:
|
54 |
+
- Link:
|
55 |
+
https://huggingface.co/docs/trl/index
|
56 |
+
https://huggingface.co/docs/trl/sft_trainer
|
57 |
+
|
58 |
+
flash-attention:
|
59 |
+
- Link:
|
60 |
+
https://github.com/Dao-AILab/flash-attention
|
61 |
+
https://arxiv.org/abs/2205.14135
|
62 |
+
|
63 |
+
Version:
|
64 |
+
- Link:
|
65 |
+
https://huggingface.co/NickyNicky/Mistral-7B-OpenOrca-oasst_top1_2023-08-25-v1
|
66 |
+
https://huggingface.co/NickyNicky/Mistral-7B-OpenOrca-oasst_top1_2023-08-25-v2
|
67 |
+
https://huggingface.co/NickyNicky/Mistral-7B-OpenOrca-oasst_top1_2023-08-25-v3
|
68 |
+
|
69 |
+
|
70 |
+
```
|
71 |
+
|
72 |
+
|
73 |
+
##
|
74 |
+
|
75 |
+
|
76 |
+
```py
|
77 |
+
# attention-sinks
|
78 |
+
pip install attention_sinks
|
79 |
+
|
80 |
+
# flash-attn
|
81 |
+
!export CUDA_HOME=/usr/local/cuda-11.8
|
82 |
+
!MAX_JOBS=4 pip install flash-attn --no-build-isolation -qqq
|
83 |
+
!pip install git+"https://github.com/HazyResearch/flash-attention.git#subdirectory=csrc/rotary" -qqq
|
84 |
+
```
|
85 |
+
|
86 |
+
|
87 |
+
## Version
|
88 |
+
```py
|
89 |
+
import torch, transformers,torchvision
|
90 |
+
torch.__version__,transformers.__version__, torchvision.__version__
|
91 |
+
#OUTPUTS: ('2.0.1+cu118', '4.34.0', '0.15.2+cu118')
|
92 |
+
```
|
93 |
+
|
94 |
+
## How to use
|
95 |
+
```py
|
96 |
+
|
97 |
from transformers import (
|
98 |
AutoModelForCausalLM,
|
99 |
AutoTokenizer,
|
|
|
165 |
outputs = model.generate(generation_config=generation_config,
|
166 |
input_ids=inputs,)
|
167 |
tokenizer.decode(outputs[0], skip_special_tokens=False) #True
|
168 |
+
```
|