mirekphd commited on
Commit
987800c
·
1 Parent(s): 5dda80d

Added gte-Qwen2-7B-instruct-F32 GGUF model files.

Browse files
.gitattributes CHANGED
@@ -33,3 +33,11 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
 
 
 
 
 
 
 
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ gte-Qwen2-7B-instruct-F32-00001-of-00008.gguf filter=lfs diff=lfs merge=lfs -text
37
+ gte-Qwen2-7B-instruct-F32-00002-of-00008.gguf filter=lfs diff=lfs merge=lfs -text
38
+ gte-Qwen2-7B-instruct-F32-00003-of-00008.gguf filter=lfs diff=lfs merge=lfs -text
39
+ gte-Qwen2-7B-instruct-F32-00004-of-00008.gguf filter=lfs diff=lfs merge=lfs -text
40
+ gte-Qwen2-7B-instruct-F32-00005-of-00008.gguf filter=lfs diff=lfs merge=lfs -text
41
+ gte-Qwen2-7B-instruct-F32-00006-of-00008.gguf filter=lfs diff=lfs merge=lfs -text
42
+ gte-Qwen2-7B-instruct-F32-00007-of-00008.gguf filter=lfs diff=lfs merge=lfs -text
43
+ gte-Qwen2-7B-instruct-F32-00008-of-00008.gguf filter=lfs diff=lfs merge=lfs -text
README.md ADDED
@@ -0,0 +1,209 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ tags:
3
+ - mteb
4
+ - sentence-transformers
5
+ - transformers
6
+ - Qwen2
7
+ - sentence-similarity
8
+ - llama-cpp
9
+ license: apache-2.0
10
+ ---
11
+ ## This version
12
+
13
+ This model was converted from the 32-bit original safetensors format to a (lossless in this case) **32-bit GGUF format (`f32`)** from **[`Alibaba-NLP/gte-Qwen2-7B-instruct`](https://huggingface.co/Alibaba-NLP/gte-Qwen2-7B-instruct)** using `llama-quantize` built from [`llama.cpp`](https://github.com/ggerganov/llama.cpp).
14
+
15
+ Custom conversion script settings:
16
+ ```json
17
+ "gte-Qwen2-7B-instruct": {
18
+ "model_name": "gte-Qwen2-7B-instruct",
19
+ "hq_quant_type": "f32",
20
+ "final_quant_type": "",
21
+ "produce_final_quant": false,
22
+ "parts_num": 4,
23
+ "max_shard_size_gb": 4,
24
+ "numexpr_max_thread": 8
25
+ }
26
+ ```
27
+ Please refer to the [original model card](https://huggingface.co/Alibaba-NLP/gte-Qwen2-7B-instruct) for more details on the unquantized model, including its metrics, which may be different (typically slightly worse) for this quantized version.
28
+
29
+
30
+ ## gte-Qwen2-7B-instruct
31
+
32
+ **gte-Qwen2-7B-instruct** is the latest model in the gte (General Text Embedding) model family that ranks **No.1** in both English and Chinese evaluations on the Massive Text Embedding Benchmark [MTEB benchmark](https://huggingface.co/spaces/mteb/leaderboard) (as of June 16, 2024).
33
+
34
+ Recently, the [**Qwen team**](https://huggingface.co/Qwen) released the Qwen2 series models, and we have trained the **gte-Qwen2-7B-instruct** model based on the [Qwen2-7B](https://huggingface.co/Qwen/Qwen2-7B) LLM model. Compared to the [gte-Qwen1.5-7B-instruct](https://huggingface.co/Alibaba-NLP/gte-Qwen1.5-7B-instruct) model, the **gte-Qwen2-7B-instruct** model uses the same training data and training strategies during the finetuning stage, with the only difference being the upgraded base model to Qwen2-7B. Considering the improvements in the Qwen2 series models compared to the Qwen1.5 series, we can also expect consistent performance enhancements in the embedding models.
35
+
36
+ The model incorporates several key advancements:
37
+
38
+ - Integration of bidirectional attention mechanisms, enriching its contextual understanding.
39
+ - Instruction tuning, applied solely on the query side for streamlined efficiency
40
+ - Comprehensive training across a vast, multilingual text corpus spanning diverse domains and scenarios. This training leverages both weakly supervised and supervised data, ensuring the model's applicability across numerous languages and a wide array of downstream tasks.
41
+
42
+
43
+ ## Model Information
44
+
45
+ ### Overview
46
+ - Model Type: GTE (General Text Embeddings)
47
+ - Model Size: 7B
48
+ - Embedding Dimension: 3584
49
+ - Context Window: 131072
50
+ ### Supported languages
51
+ - North America: English
52
+ - Western Europe: German, French, Spanish, Portuguese, Italian, Dutch
53
+ - Eastern & Central Europe: Russian, Czech, Polish
54
+ - Middle East: Arabic, Persian, Hebrew, Turkish
55
+ - Eastern Asia: Chinese, Japanese, Korean
56
+ - South-Eastern Asia: Vietnamese, Thai, Indonesian, Malay, Lao, Burmese, Cebuano, Khmer, Tagalog
57
+ - Southern Asia: Hindi, Bengali, Urdu
58
+ - [[source](https://qwenlm.github.io/blog/qwen2/)]
59
+ ### Details
60
+ ```
61
+ llama_model_loader: - kv 0: general.architecture str = qwen2
62
+ llama_model_loader: - kv 1: general.type str = model
63
+ llama_model_loader: - kv 2: general.name str = gte-Qwen2-7B-instruct
64
+ llama_model_loader: - kv 3: general.finetune str = instruct
65
+ llama_model_loader: - kv 4: general.basename str = gte-Qwen2
66
+ llama_model_loader: - kv 5: general.size_label str = 7B
67
+ llama_model_loader: - kv 6: general.license str = apache-2.0
68
+ llama_model_loader: - kv 7: general.tags arr[str,5] = ["mteb", "sentence-transformers", "tr...
69
+ llama_model_loader: - kv 8: qwen2.block_count u32 = 28
70
+ llama_model_loader: - kv 9: qwen2.context_length u32 = 131072
71
+ llama_model_loader: - kv 10: qwen2.embedding_length u32 = 3584
72
+ llama_model_loader: - kv 11: qwen2.feed_forward_length u32 = 18944
73
+ llama_model_loader: - kv 12: qwen2.attention.head_count u32 = 28
74
+ llama_model_loader: - kv 13: qwen2.attention.head_count_kv u32 = 4
75
+ llama_model_loader: - kv 14: qwen2.rope.freq_base f32 = 1000000.000000
76
+ llama_model_loader: - kv 15: qwen2.attention.layer_norm_rms_epsilon f32 = 0.000001
77
+ llama_model_loader: - kv 16: general.file_type u32 = 0
78
+ llama_model_loader: - kv 17: tokenizer.ggml.model str = gpt2
79
+ llama_model_loader: - kv 18: tokenizer.ggml.pre str = qwen2
80
+ llama_model_loader: - kv 19: tokenizer.ggml.tokens arr[str,151646] = ["!", "\"", "#", "$", "%", "&", "'", ...
81
+ llama_model_loader: - kv 20: tokenizer.ggml.token_type arr[i32,151646] = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, ...
82
+ llama_model_loader: - kv 21: tokenizer.ggml.merges arr[str,151387] = ["Ġ Ġ", "ĠĠ ĠĠ", "i n", "Ġ t",...
83
+ llama_model_loader: - kv 22: tokenizer.ggml.eos_token_id u32 = 151643
84
+ llama_model_loader: - kv 23: tokenizer.ggml.padding_token_id u32 = 151643
85
+ llama_model_loader: - kv 24: tokenizer.ggml.bos_token_id u32 = 151643
86
+ llama_model_loader: - kv 25: tokenizer.ggml.add_eos_token bool = true
87
+ llama_model_loader: - kv 26: tokenizer.chat_template str = {% for message in messages %}{{'<|im_...
88
+ llama_model_loader: - kv 27: general.quantization_version u32 = 2
89
+ llama_model_loader: - kv 28: split.no u16 = 0
90
+ llama_model_loader: - kv 29: split.count u16 = 8
91
+ llama_model_loader: - kv 30: split.tensors.count i32 = 339
92
+ llama_model_loader: - type f32: 339 tensors
93
+ llm_load_vocab: special tokens cache size = 3
94
+ llm_load_vocab: token to piece cache size = 0.9308 MB
95
+ llm_load_print_meta: format = GGUF V3 (latest)
96
+ llm_load_print_meta: arch = qwen2
97
+ llm_load_print_meta: vocab type = BPE
98
+ llm_load_print_meta: n_vocab = 151646
99
+ llm_load_print_meta: n_merges = 151387
100
+ llm_load_print_meta: vocab_only = 0
101
+ llm_load_print_meta: n_ctx_train = 131072
102
+ llm_load_print_meta: n_embd = 3584
103
+ llm_load_print_meta: n_layer = 28
104
+ llm_load_print_meta: n_head = 28
105
+ llm_load_print_meta: n_head_kv = 4
106
+ llm_load_print_meta: n_rot = 128
107
+ llm_load_print_meta: n_swa = 0
108
+ llm_load_print_meta: n_embd_head_k = 128
109
+ llm_load_print_meta: n_embd_head_v = 128
110
+ llm_load_print_meta: n_gqa = 7
111
+ llm_load_print_meta: n_embd_k_gqa = 512
112
+ llm_load_print_meta: n_embd_v_gqa = 512
113
+ llm_load_print_meta: f_norm_eps = 0.0e+00
114
+ llm_load_print_meta: f_norm_rms_eps = 1.0e-06
115
+ llm_load_print_meta: f_clamp_kqv = 0.0e+00
116
+ llm_load_print_meta: f_max_alibi_bias = 0.0e+00
117
+ llm_load_print_meta: f_logit_scale = 0.0e+00
118
+ llm_load_print_meta: n_ff = 18944
119
+ llm_load_print_meta: n_expert = 0
120
+ llm_load_print_meta: n_expert_used = 0
121
+ llm_load_print_meta: causal attn = 1
122
+ llm_load_print_meta: pooling type = 0
123
+ llm_load_print_meta: rope type = 2
124
+ llm_load_print_meta: rope scaling = linear
125
+ llm_load_print_meta: freq_base_train = 1000000.0
126
+ llm_load_print_meta: freq_scale_train = 1
127
+ llm_load_print_meta: n_ctx_orig_yarn = 131072
128
+ llm_load_print_meta: rope_finetuned = unknown
129
+ llm_load_print_meta: ssm_d_conv = 0
130
+ llm_load_print_meta: ssm_d_inner = 0
131
+ llm_load_print_meta: ssm_d_state = 0
132
+ llm_load_print_meta: ssm_dt_rank = 0
133
+ llm_load_print_meta: ssm_dt_b_c_rms = 0
134
+ llm_load_print_meta: model type = 7B
135
+ llm_load_print_meta: model ftype = all F32
136
+ llm_load_print_meta: model params = 7.61 B
137
+ llm_load_print_meta: model size = 28.36 GiB (32.00 BPW)
138
+ llm_load_print_meta: general.name = gte-Qwen2-7B-instruct
139
+ llm_load_print_meta: BOS token = 151643 '<|endoftext|>'
140
+ llm_load_print_meta: EOS token = 151643 '<|endoftext|>'
141
+ llm_load_print_meta: EOT token = 151645 '<|im_end|>'
142
+ llm_load_print_meta: PAD token = 151643 '<|endoftext|>'
143
+ llm_load_print_meta: LF token = 148848 'ÄĬ'
144
+ llm_load_print_meta: EOG token = 151643 '<|endoftext|>'
145
+ llm_load_print_meta: EOG token = 151645 '<|im_end|>'
146
+ llm_load_print_meta: max token length = 256
147
+ llm_load_tensors: CPU_Mapped model buffer size = 3795.37 MiB
148
+ llm_load_tensors: CPU_Mapped model buffer size = 3612.20 MiB
149
+ llm_load_tensors: CPU_Mapped model buffer size = 3668.20 MiB
150
+ llm_load_tensors: CPU_Mapped model buffer size = 3703.16 MiB
151
+ llm_load_tensors: CPU_Mapped model buffer size = 3556.17 MiB
152
+ llm_load_tensors: CPU_Mapped model buffer size = 3556.19 MiB
153
+ llm_load_tensors: CPU_Mapped model buffer size = 3556.18 MiB
154
+ llm_load_tensors: CPU_Mapped model buffer size = 3592.38 MiB
155
+ ........................................................................................
156
+ llama_new_context_with_model: n_seq_max = 1
157
+ llama_new_context_with_model: n_ctx = 131072
158
+ llama_new_context_with_model: n_ctx_per_seq = 131072
159
+ llama_new_context_with_model: n_batch = 2048
160
+ llama_new_context_with_model: n_ubatch = 512
161
+ llama_new_context_with_model: flash_attn = 0
162
+ llama_new_context_with_model: freq_base = 1000000.0
163
+ llama_new_context_with_model: freq_scale = 1
164
+ llama_kv_cache_init: CPU KV buffer size = 7168.00 MiB
165
+ llama_new_context_with_model: KV self size = 7168.00 MiB, K (f16): 3584.00 MiB, V (f16): 3584.00 MiB
166
+ llama_new_context_with_model: CPU output buffer size = 0.01 MiB
167
+ llama_new_context_with_model: CPU compute buffer size = 7452.01 MiB
168
+ llama_new_context_with_model: graph nodes = 986
169
+ llama_new_context_with_model: graph splits = 1
170
+ ```
171
+
172
+ ## Usage
173
+
174
+ ### Sentence Transformers
175
+
176
+ ### Transformers
177
+
178
+ ## Inference
179
+
180
+ ### Using `llama.cpp` to get embeddings in CPU and/or GPU
181
+ First [build](https://github.com/ggerganov/llama.cpp/blob/master/docs/build.md) or [install](https://github.com/ggerganov/llama.cpp/blob/master/docs/install.md) **`llama-server`** binary from [`llama.cpp`](https://github.com/ggerganov/llama.cpp), preferably with GPU support.
182
+ ### CLI
183
+ ### Server
184
+ ```bash
185
+ # using remote HF repo address (with model file(s) to be downloaded and cached locally)
186
+ $ llama-server --hf-repo mirekphd/gte-Qwen2-7B-instruct-F32 --hf-file gte-Qwen2-7B-instruct-F32-00001-of-00008.gguf --n-gpu-layers 0 --ctx-size 131072 --embeddings
187
+
188
+ # using a previously downloaded local model file(s)
189
+ $ llama-server --model <path-to-hf-models>/mirekphd/gte-Qwen2-7B-instruct-F32/gte-Qwen2-7B-instruct-F32-00001-of-00008.gguf --n-gpu-layers 0 --ctx-size 131072 --embeddings
190
+
191
+ ```
192
+
193
+ ## Evaluation
194
+
195
+ ### MTEB & C-MTEB
196
+
197
+ ## Cloud API Services
198
+
199
+ ## Citation
200
+ If you find our paper or models helpful, please consider cite:
201
+
202
+ ```
203
+ @article{li2023towards,
204
+ title={Towards general text embeddings with multi-stage contrastive learning},
205
+ author={Li, Zehan and Zhang, Xin and Zhang, Yanzhao and Long, Dingkun and Xie, Pengjun and Zhang, Meishan},
206
+ journal={arXiv preprint arXiv:2308.03281},
207
+ year={2023}
208
+ }
209
+ ```
gte-Qwen2-7B-instruct-F32-00001-of-00008.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:594e7299af9e09a4224fa2c56952b7b679e1cd7762a257e6d2567742f597e455
3
+ size 3985660768
gte-Qwen2-7B-instruct-F32-00002-of-00008.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e153e7d72d1b43c6c38e533f9f0fc281e7b13b5f07c73834d227d9a7aa6d26a8
3
+ size 3787664352
gte-Qwen2-7B-instruct-F32-00003-of-00008.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:831a4ccb6aa6c0476c5e7db6ee159bcb1b37eb72683978961b85be8f749f3bbe
3
+ size 3846386848
gte-Qwen2-7B-instruct-F32-00004-of-00008.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:fdda875b246994903f58bdfc012da3b2dafc7eaea27f3d06079aa470e3081ca8
3
+ size 3883049440
gte-Qwen2-7B-instruct-F32-00005-of-00008.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6e1a3f07b1cc6c9300672f1b0028d0773376e2261e629aa17a3403b3ab271f3e
3
+ size 3728913152
gte-Qwen2-7B-instruct-F32-00006-of-00008.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ddf30ef62a599b690323cd90dee336cf0f7a723a96c5247183539bb9d5daee7a
3
+ size 3728941952
gte-Qwen2-7B-instruct-F32-00007-of-00008.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a5bbb3c6f9770030b48b85b9e5eb9569397b4cb1ca63ac91199bad5feb1ce6a6
3
+ size 3728927552
gte-Qwen2-7B-instruct-F32-00008-of-00008.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c239a7b7c582d45df01911ae761e604fa1fbbd2294e90731a2d925ee66586ca5
3
+ size 3766879680