Update README.md
Browse files
README.md
CHANGED
@@ -1,13 +1,16 @@
|
|
1 |
---
|
2 |
base_model: meta-llama/Llama-2-7b-hf
|
3 |
library_name: peft
|
|
|
|
|
|
|
4 |
---
|
5 |
|
6 |
-
# Model
|
7 |
-
|
8 |
-
<!-- Provide a quick summary of what the model is/does. -->
|
9 |
-
|
10 |
|
|
|
|
|
|
|
11 |
|
12 |
## Model Details
|
13 |
|
@@ -15,188 +18,92 @@ library_name: peft
|
|
15 |
|
16 |
<!-- Provide a longer summary of what this model is. -->
|
17 |
|
18 |
-
|
19 |
-
|
20 |
-
- **
|
21 |
-
- **
|
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 |
### Model Sources [optional]
|
29 |
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
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]
|
200 |
-
### Framework versions
|
201 |
-
|
202 |
-
- PEFT 0.11.1
|
|
|
1 |
---
|
2 |
base_model: meta-llama/Llama-2-7b-hf
|
3 |
library_name: peft
|
4 |
+
license: apache-2.0
|
5 |
+
language:
|
6 |
+
- en
|
7 |
---
|
8 |
|
9 |
+
# Model Info
|
|
|
|
|
|
|
10 |
|
11 |
+
This is a model that applies LLM2Vec to Llama-2. Only the PEFT Adapter is distributed.
|
12 |
+
LLM2Vec is fine-tuned on two tasks: MNTP and SimCSE, and this repository contains the results of applying SimCSE after MNTP.
|
13 |
+
For the MNTP Adapter, please refer to [this link](https://huggingface.co/uzabase/LLM2Vec-Llama-2-7b-hf-wikipedia-jp-mntp).
|
14 |
|
15 |
## Model Details
|
16 |
|
|
|
18 |
|
19 |
<!-- Provide a longer summary of what this model is. -->
|
20 |
|
21 |
+
- **Model type:** PEFT
|
22 |
+
- **Language(s) (NLP):** English
|
23 |
+
- **License:** Apache2.0
|
24 |
+
- **Finetuned from model:** [Llama-2-7b-hf](https://huggingface.co/meta-llama/Llama-2-7b-hf)
|
|
|
|
|
|
|
|
|
|
|
25 |
|
26 |
### Model Sources [optional]
|
27 |
|
28 |
+
- **Repository:** https://github.com/McGill-NLP/llm2vec
|
29 |
+
- **Paper:** https://arxiv.org/abs/2404.05961
|
30 |
+
|
31 |
+
# Usage
|
32 |
+
|
33 |
+
- Please see [original LLM2Vec repo](https://huggingface.co/McGill-NLP/LLM2Vec-Llama-2-7b-chat-hf-mntp-unsup-simcse#usage)
|
34 |
+
|
35 |
+
# BenchMark
|
36 |
+
- Followings are summaries. Details are [here]()
|
37 |
+
## MTEB(Japansese)
|
38 |
+
|
39 |
+
| | Classification | Clustering | PairClassification | Reranking | BitextMining | Retrieval | Sts | AVG |
|
40 |
+
| --- | ---| ---| ---| ---| ---| ---| ---| ---| ---| ---| ---| ---| ---| ---|
|
41 |
+
| |Llama2-Llm2vec-eng (This repo) | 0.527 | 0.258 | 0.501 | 0.217 | 0.275 | 0.296 | 0.765 | 0.408 |
|
42 |
+
| Llama2-Llm2vec-jpn | 0.570 | 0.365 | 0.510 | 0.349 | 0.470 | 0.417 | 0.795 | 0.498 |
|
43 |
+
| Swallow-Llm2vec-jpn | 0.621 | 0.391 | 0.510 | 0.475 | 0.475 | 0.491 | 0.832 | 0.523 |
|
44 |
+
|
45 |
+
## MTEB(English)
|
46 |
+
|
47 |
+
|
48 |
+
# Training Details
|
49 |
+
|
50 |
+
## Training Data
|
51 |
+
|
52 |
+
- [Corpus for SimCSE from Wikipedia](https://github.com/McGill-NLP/llm2vec?tab=readme-ov-file#unsupervised-contrastive-training-simcse)
|
53 |
+
|
54 |
+
|
55 |
+
## Training Hyperparameter
|
56 |
+
- simcse_dropout: 0.3
|
57 |
+
- bidirectional: true
|
58 |
+
- pooling_mode: "mean"
|
59 |
+
- remove_unused_columns: false
|
60 |
+
- learning_rate: 3e-5
|
61 |
+
- loss_scale: 20
|
62 |
+
- batch_size: 256
|
63 |
+
- gradient_accumulation_steps: 1
|
64 |
+
- max_seq_length: 128
|
65 |
+
- lora_r: 16
|
66 |
+
- torch_dtype: "bfloat16"
|
67 |
+
- attn_implementation: "flash_attention_2"
|
68 |
+
- seed: 42
|
69 |
+
- bf16: true
|
70 |
+
- gradient_checkpointing: true
|
71 |
+
|
72 |
+
|
73 |
+
## Accelerator Settings
|
74 |
+
- deepspeed_config:
|
75 |
+
- gradient_accumulation_steps: 1
|
76 |
+
- gradient_clipping: 1.0
|
77 |
+
- offload_optimizer_device: nvme
|
78 |
+
- offload_optimizer_nvme_path: /nvme
|
79 |
+
- zero3_save_16bit_model: true
|
80 |
+
- zero_stage: 2
|
81 |
+
- distributed_type: DEEPSPEED
|
82 |
+
- downcast_bf16: 'no'
|
83 |
+
- dynamo_config:
|
84 |
+
- dynamo_backend: INDUCTOR
|
85 |
+
- dynamo_mode: default
|
86 |
+
- dynamo_use_dynamic: true
|
87 |
+
- dynamo_use_fullgraph: true
|
88 |
+
- enable_cpu_affinity: false
|
89 |
+
- machine_rank: 0
|
90 |
+
- main_training_function: main
|
91 |
+
- mixed_precision: bf16
|
92 |
+
- num_machines: 1
|
93 |
+
- num_processes: 2
|
94 |
+
- rdzv_backend: static
|
95 |
+
- same_network: true
|
96 |
+
- quse_cpu: false
|
97 |
+
|
98 |
+
|
99 |
+
## Framework versions
|
100 |
+
|
101 |
+
- Python: 3.12.3
|
102 |
+
- PEFT 0.11.1
|
103 |
+
- Sentence Transformers: 3.0.1
|
104 |
+
- Transformers: 4.41.0
|
105 |
+
- PyTorch: 2.3.0
|
106 |
+
- Accelerate: 0.30.1
|
107 |
+
- Datasets: 2.20.0
|
108 |
+
- Tokenizers: 0.19.1
|
109 |
+
- MTEB: 1.13.0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|