初始化项目,由ModelHub XC社区提供模型
Model: tclf90/Qwen1.5-32B-Chat-GPTQ-Int4-Repair Source: Original Platform
This commit is contained in:
34
.gitattributes
vendored
Normal file
34
.gitattributes
vendored
Normal file
@@ -0,0 +1,34 @@
|
||||
*.7z filter=lfs diff=lfs merge=lfs -text
|
||||
*.arrow filter=lfs diff=lfs merge=lfs -text
|
||||
*.bin filter=lfs diff=lfs merge=lfs -text
|
||||
*.bin.* filter=lfs diff=lfs merge=lfs -text
|
||||
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.ftz filter=lfs diff=lfs merge=lfs -text
|
||||
*.gz filter=lfs diff=lfs merge=lfs -text
|
||||
*.h5 filter=lfs diff=lfs merge=lfs -text
|
||||
*.joblib filter=lfs diff=lfs merge=lfs -text
|
||||
*.lfs.* filter=lfs diff=lfs merge=lfs -text
|
||||
*.model filter=lfs diff=lfs merge=lfs -text
|
||||
*.msgpack filter=lfs diff=lfs merge=lfs -text
|
||||
*.onnx filter=lfs diff=lfs merge=lfs -text
|
||||
*.ot filter=lfs diff=lfs merge=lfs -text
|
||||
*.parquet filter=lfs diff=lfs merge=lfs -text
|
||||
*.pb filter=lfs diff=lfs merge=lfs -text
|
||||
*.pt filter=lfs diff=lfs merge=lfs -text
|
||||
*.pth filter=lfs diff=lfs merge=lfs -text
|
||||
*.rar filter=lfs diff=lfs merge=lfs -text
|
||||
saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
||||
*.tar.* filter=lfs diff=lfs merge=lfs -text
|
||||
*.tflite filter=lfs diff=lfs merge=lfs -text
|
||||
*.tgz filter=lfs diff=lfs merge=lfs -text
|
||||
*.xz filter=lfs diff=lfs merge=lfs -text
|
||||
*.zip filter=lfs diff=lfs merge=lfs -text
|
||||
*.zstandard filter=lfs diff=lfs merge=lfs -text
|
||||
*.tfevents* filter=lfs diff=lfs merge=lfs -text
|
||||
*.db* filter=lfs diff=lfs merge=lfs -text
|
||||
*.ark* filter=lfs diff=lfs merge=lfs -text
|
||||
**/*ckpt*data* filter=lfs diff=lfs merge=lfs -text
|
||||
**/*ckpt*.meta filter=lfs diff=lfs merge=lfs -text
|
||||
**/*ckpt*.index filter=lfs diff=lfs merge=lfs -text
|
||||
*.safetensors filter=lfs diff=lfs merge=lfs -text
|
||||
*.ckpt filter=lfs diff=lfs merge=lfs -text
|
||||
53
LICENSE
Normal file
53
LICENSE
Normal file
@@ -0,0 +1,53 @@
|
||||
Tongyi Qianwen LICENSE AGREEMENT
|
||||
|
||||
Tongyi Qianwen Release Date: August 3, 2023
|
||||
|
||||
By clicking to agree or by using or distributing any portion or element of the Tongyi Qianwen Materials, you will be deemed to have recognized and accepted the content of this Agreement, which is effective immediately.
|
||||
|
||||
1. Definitions
|
||||
a. This Tongyi Qianwen LICENSE AGREEMENT (this "Agreement") shall mean the terms and conditions for use, reproduction, distribution and modification of the Materials as defined by this Agreement.
|
||||
b. "We"(or "Us") shall mean Alibaba Cloud.
|
||||
c. "You" (or "Your") shall mean a natural person or legal entity exercising the rights granted by this Agreement and/or using the Materials for any purpose and in any field of use.
|
||||
d. "Third Parties" shall mean individuals or legal entities that are not under common control with Us or You.
|
||||
e. "Tongyi Qianwen" shall mean the large language models (including Qwen model and Qwen-Chat model), and software and algorithms, consisting of trained model weights, parameters (including optimizer states), machine-learning model code, inference-enabling code, training-enabling code, fine-tuning enabling code and other elements of the foregoing distributed by Us.
|
||||
f. "Materials" shall mean, collectively, Alibaba Cloud's proprietary Tongyi Qianwen and Documentation (and any portion thereof) made available under this Agreement.
|
||||
g. "Source" form shall mean the preferred form for making modifications, including but not limited to model source code, documentation source, and configuration files.
|
||||
h. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
2. Grant of Rights
|
||||
You are granted a non-exclusive, worldwide, non-transferable and royalty-free limited license under Alibaba Cloud's intellectual property or other rights owned by Us embodied in the Materials to use, reproduce, distribute, copy, create derivative works of, and make modifications to the Materials.
|
||||
|
||||
3. Redistribution
|
||||
You may reproduce and distribute copies of the Materials or derivative works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
|
||||
a. You shall give any other recipients of the Materials or derivative works a copy of this Agreement;
|
||||
b. You shall cause any modified files to carry prominent notices stating that You changed the files;
|
||||
c. You shall retain in all copies of the Materials that You distribute the following attribution notices within a "Notice" text file distributed as a part of such copies: "Tongyi Qianwen is licensed under the Tongyi Qianwen LICENSE AGREEMENT, Copyright (c) Alibaba Cloud. All Rights Reserved."; and
|
||||
d. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such derivative works as a whole, provided Your use, reproduction, and distribution of the work otherwise complies with the terms and conditions of this Agreement.
|
||||
|
||||
4. Restrictions
|
||||
If you are commercially using the Materials, and your product or service has more than 100 million monthly active users, You shall request a license from Us. You cannot exercise your rights under this Agreement without our express authorization.
|
||||
|
||||
5. Rules of use
|
||||
a. The Materials may be subject to export controls or restrictions in China, the United States or other countries or regions. You shall comply with applicable laws and regulations in your use of the Materials.
|
||||
b. You can not use the Materials or any output therefrom to improve any other large language model (excluding Tongyi Qianwen or derivative works thereof).
|
||||
|
||||
6. Intellectual Property
|
||||
a. We retain ownership of all intellectual property rights in and to the Materials and derivatives made by or for Us. Conditioned upon compliance with the terms and conditions of this Agreement, with respect to any derivative works and modifications of the Materials that are made by you, you are and will be the owner of such derivative works and modifications.
|
||||
b. No trademark license is granted to use the trade names, trademarks, service marks, or product names of Us, except as required to fulfill notice requirements under this Agreement or as required for reasonable and customary use in describing and redistributing the Materials.
|
||||
c. If you commence a lawsuit or other proceedings (including a cross-claim or counterclaim in a lawsuit) against Us or any entity alleging that the Materials or any output therefrom, or any part of the foregoing, infringe any intellectual property or other right owned or licensable by you, then all licences granted to you under this Agreement shall terminate as of the date such lawsuit or other proceeding is commenced or brought.
|
||||
|
||||
7. Disclaimer of Warranty and Limitation of Liability
|
||||
|
||||
a. We are not obligated to support, update, provide training for, or develop any further version of the Tongyi Qianwen Materials or to grant any license thereto.
|
||||
b. THE MATERIALS ARE PROVIDED "AS IS" WITHOUT ANY EXPRESS OR IMPLIED WARRANTY OF ANY KIND INCLUDING WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT, OR FITNESS FOR A PARTICULAR PURPOSE. WE MAKE NO WARRANTY AND ASSUME NO RESPONSIBILITY FOR THE SAFETY OR STABILITY OF THE MATERIALS AND ANY OUTPUT THEREFROM.
|
||||
c. IN NO EVENT SHALL WE BE LIABLE TO YOU FOR ANY DAMAGES, INCLUDING, BUT NOT LIMITED TO ANY DIRECT, OR INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES ARISING FROM YOUR USE OR INABILITY TO USE THE MATERIALS OR ANY OUTPUT OF IT, NO MATTER HOW IT’S CAUSED.
|
||||
d. You will defend, indemnify and hold harmless Us from and against any claim by any third party arising out of or related to your use or distribution of the Materials.
|
||||
|
||||
8. Survival and Termination.
|
||||
a. The term of this Agreement shall commence upon your acceptance of this Agreement or access to the Materials and will continue in full force and effect until terminated in accordance with the terms and conditions herein.
|
||||
b. We may terminate this Agreement if you breach any of the terms or conditions of this Agreement. Upon termination of this Agreement, you must delete and cease use of the Materials. Sections 7 and 9 shall survive the termination of this Agreement.
|
||||
|
||||
9. Governing Law and Jurisdiction.
|
||||
a. This Agreement and any dispute arising out of or relating to it will be governed by the laws of China, without regard to conflict of law principles, and the UN Convention on Contracts for the International Sale of Goods does not apply to this Agreement.
|
||||
b. The People's Courts in Hangzhou City shall have exclusive jurisdiction over any dispute arising out of this Agreement.
|
||||
41
README.md
Normal file
41
README.md
Normal file
@@ -0,0 +1,41 @@
|
||||
---
|
||||
license: other
|
||||
license_name: tongyi-qianwen
|
||||
license_link: >-
|
||||
https://huggingface.co/Qwen/Qwen1.5-32B-Chat/blob/main/LICENSE
|
||||
pipeline_tag: text-generation
|
||||
tags:
|
||||
- qwen
|
||||
- 32b
|
||||
- gptq
|
||||
- int4
|
||||
- chat
|
||||
---
|
||||
|
||||
# Qwen1.5-32B-Chat-GPTQ Int4 模型量化
|
||||
|
||||
### 【模型更新日期】
|
||||
``` 2024-05-30 ```
|
||||
|
||||
重制并补全generation_config.json文件
|
||||
|
||||
### 【介绍】
|
||||
千问官方`Qwen1.5-32B-Chat`量化模型存在一定程度的量化损失,并导致例如无限`!!!!!!`感叹号等问题。这里集中做一次修复。
|
||||
|
||||
| 模型名 | 量化类型 | 量化比特 | 其余量化参数 | 评价 |
|
||||
|-----------------------------------------------------------------------------------------------------------------------|------|------|----------|-------------------------------------------------------------------------------|
|
||||
| [tclf90/Qwen1.5-32B-Chat-GPTQ-Int4-Repair](https://www.modelscope.cn/models/tclf90/Qwen1.5-32B-Chat-GPTQ-Int4-Repair) | GPTQ | int4 | group128 | <b>测试基线</b><br/>无明显的、量化造成的对话失真 |
|
||||
| [tclf90/Qwen1.5-32B-Chat-GPTQ-Int3](https://www.modelscope.cn/models/tclf90/Qwen1.5-32B-Chat-GPTQ-Int3) | GPTQ | int3 | group128 | <b>非常推荐</b><br/>对话、指令能力与其余量化版本,没有明显差别,但模型体积最小、占用显存最少,可以吞吐更长上下文,推理速度也比int4快10% |
|
||||
| [tclf90/Qwen1.5-32B-Chat-AWQ-G32](https://www.modelscope.cn/models/tclf90/Qwen1.5-32B-Chat-AWQ-G32) | AWQ | int4 | group32 | <b>没有特别亮点</b><br/>尝试用更小的group尺寸来减少量化损失,但在`Qwen1.5-32B-Chat`这个模型上没有表现出区别 |
|
||||
|
||||
<i>注:经测试,`Qwen1.5-32B-Chat` 的Int2量化,会胡言乱语,完全失去模型能力。</i>
|
||||
|
||||
|
||||
### 【引用】
|
||||
|
||||
原模型 [Qwen1.5-32B-Chat](https://www.modelscope.cn/models/qwen/Qwen1.5-32B-Chat)
|
||||
|
||||
官方量化模型 [Qwen1.5-32B-Chat-GPTQ-Int4
|
||||
](https://www.modelscope.cn/models/qwen/Qwen1.5-32B-Chat-GPTQ-Int4)
|
||||
|
||||
量化工具 [AutoGPTQ](https://github.com/AutoGPTQ/AutoGPTQ)
|
||||
5
added_tokens.json
Normal file
5
added_tokens.json
Normal file
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"<|endoftext|>": 151643,
|
||||
"<|im_end|>": 151645,
|
||||
"<|im_start|>": 151644
|
||||
}
|
||||
52
config.json
Normal file
52
config.json
Normal file
@@ -0,0 +1,52 @@
|
||||
{
|
||||
"_name_or_path": "tclf90/Qwen1.5-32B-Chat-GPTQ-Int4",
|
||||
"architectures": [
|
||||
"Qwen2ForCausalLM"
|
||||
],
|
||||
"attention_dropout": 0.0,
|
||||
"bos_token_id": 151643,
|
||||
"eos_token_id": 151645,
|
||||
"hidden_act": "silu",
|
||||
"hidden_size": 5120,
|
||||
"initializer_range": 0.02,
|
||||
"intermediate_size": 27392,
|
||||
"max_position_embeddings": 32768,
|
||||
"max_window_layers": 35,
|
||||
"model_type": "qwen2",
|
||||
"num_attention_heads": 40,
|
||||
"num_hidden_layers": 64,
|
||||
"num_key_value_heads": 8,
|
||||
"quantization_config": {
|
||||
"batch_size": 1,
|
||||
"bits": 4,
|
||||
"block_name_to_quantize": null,
|
||||
"cache_block_outputs": true,
|
||||
"damp_percent": 0.1,
|
||||
"dataset": null,
|
||||
"desc_act": false,
|
||||
"exllama_config": {
|
||||
"version": 1
|
||||
},
|
||||
"group_size": 128,
|
||||
"max_input_length": null,
|
||||
"model_seqlen": null,
|
||||
"module_name_preceding_first_block": null,
|
||||
"modules_in_block_to_quantize": null,
|
||||
"pad_token_id": null,
|
||||
"quant_method": "gptq",
|
||||
"sym": true,
|
||||
"tokenizer": null,
|
||||
"true_sequential": true,
|
||||
"use_cuda_fp16": true,
|
||||
"use_exllama": true
|
||||
},
|
||||
"rms_norm_eps": 1e-06,
|
||||
"rope_theta": 1000000.0,
|
||||
"sliding_window": 32768,
|
||||
"tie_word_embeddings": false,
|
||||
"torch_dtype": "float16",
|
||||
"transformers_version": "4.40.2",
|
||||
"use_cache": true,
|
||||
"use_sliding_window": false,
|
||||
"vocab_size": 152064
|
||||
}
|
||||
4
configuration.json
Normal file
4
configuration.json
Normal file
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"framework": "Pytorch",
|
||||
"task": "text-generation"
|
||||
}
|
||||
14
generation_config.json
Normal file
14
generation_config.json
Normal file
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"bos_token_id": 151643,
|
||||
"do_sample": true,
|
||||
"eos_token_id": [
|
||||
151645,
|
||||
151643
|
||||
],
|
||||
"pad_token_id": 151643,
|
||||
"repetition_penalty": 1.05,
|
||||
"temperature": 0.7,
|
||||
"top_k": 20,
|
||||
"top_p": 0.8,
|
||||
"transformers_version": "4.40.2"
|
||||
}
|
||||
151388
merges.txt
Normal file
151388
merges.txt
Normal file
File diff suppressed because it is too large
Load Diff
3
model-00001-of-00004.safetensors
Normal file
3
model-00001-of-00004.safetensors
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:5018f776fec7ce77011bd3ccf6e37db2fea2a2a5821e5b7e8075e3869fff5db9
|
||||
size 4934697096
|
||||
3
model-00002-of-00004.safetensors
Normal file
3
model-00002-of-00004.safetensors
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:67d7cf88c6ffb780b7d92aed4b16e2acf19080ffcaeac741a344a3142c4a11fa
|
||||
size 4960530968
|
||||
3
model-00003-of-00004.safetensors
Normal file
3
model-00003-of-00004.safetensors
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:adf15efa71c64a1f5edd6dbdaca5763575f76656b42ce7242f203d61f9db52a9
|
||||
size 4998431552
|
||||
3
model-00004-of-00004.safetensors
Normal file
3
model-00004-of-00004.safetensors
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:8bbad1c4818de27fe4f909ee118c2eacc0448f7831dcbd11fb05f44ce12700c4
|
||||
size 4327866080
|
||||
2378
model.safetensors.index.json
Normal file
2378
model.safetensors.index.json
Normal file
File diff suppressed because it is too large
Load Diff
20
special_tokens_map.json
Normal file
20
special_tokens_map.json
Normal file
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"additional_special_tokens": [
|
||||
"<|im_start|>",
|
||||
"<|im_end|>"
|
||||
],
|
||||
"eos_token": {
|
||||
"content": "<|im_end|>",
|
||||
"lstrip": false,
|
||||
"normalized": false,
|
||||
"rstrip": false,
|
||||
"single_word": false
|
||||
},
|
||||
"pad_token": {
|
||||
"content": "<|endoftext|>",
|
||||
"lstrip": false,
|
||||
"normalized": false,
|
||||
"rstrip": false,
|
||||
"single_word": false
|
||||
}
|
||||
}
|
||||
43
tokenizer_config.json
Normal file
43
tokenizer_config.json
Normal file
@@ -0,0 +1,43 @@
|
||||
{
|
||||
"add_prefix_space": false,
|
||||
"added_tokens_decoder": {
|
||||
"151643": {
|
||||
"content": "<|endoftext|>",
|
||||
"lstrip": false,
|
||||
"normalized": false,
|
||||
"rstrip": false,
|
||||
"single_word": false,
|
||||
"special": true
|
||||
},
|
||||
"151644": {
|
||||
"content": "<|im_start|>",
|
||||
"lstrip": false,
|
||||
"normalized": false,
|
||||
"rstrip": false,
|
||||
"single_word": false,
|
||||
"special": true
|
||||
},
|
||||
"151645": {
|
||||
"content": "<|im_end|>",
|
||||
"lstrip": false,
|
||||
"normalized": false,
|
||||
"rstrip": false,
|
||||
"single_word": false,
|
||||
"special": true
|
||||
}
|
||||
},
|
||||
"additional_special_tokens": [
|
||||
"<|im_start|>",
|
||||
"<|im_end|>"
|
||||
],
|
||||
"bos_token": null,
|
||||
"chat_template": "{% for message in messages %}{% if loop.first and messages[0]['role'] != 'system' %}{{ '<|im_start|>system\nYou are a helpful assistant.<|im_end|>\n' }}{% endif %}{{'<|im_start|>' + message['role'] + '\n' + message['content'] + '<|im_end|>' + '\n'}}{% endfor %}{% if add_generation_prompt %}{{ '<|im_start|>assistant\n' }}{% endif %}",
|
||||
"clean_up_tokenization_spaces": false,
|
||||
"eos_token": "<|im_end|>",
|
||||
"errors": "replace",
|
||||
"model_max_length": 32768,
|
||||
"pad_token": "<|endoftext|>",
|
||||
"split_special_tokens": false,
|
||||
"tokenizer_class": "Qwen2Tokenizer",
|
||||
"unk_token": null
|
||||
}
|
||||
151645
vocab.json
Normal file
151645
vocab.json
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user