Upload folder using ModelScope SDK

This commit is contained in:
Cherrytest
2025-09-04 01:51:25 +00:00
parent b999d2f739
commit ab50be93f3
16 changed files with 488 additions and 44 deletions

197
README.md
View File

@@ -1,47 +1,158 @@
---
license: Apache License 2.0
#model-type:
##如 gpt、phi、llama、chatglm、baichuan 等
#- gpt
#domain:
##如 nlp、cv、audio、multi-modal
#- nlp
#language:
##语言代码列表 https://help.aliyun.com/document_detail/215387.html?spm=a2c4g.11186623.0.0.9f8d7467kni6Aa
#- cn
#metrics:
##如 CIDEr、Blue、ROUGE 等
#- CIDEr
#tags:
##各种自定义,包括 pretrained、fine-tuned、instruction-tuned、RL-tuned 等训练方法和其他
#- pretrained
#tools:
##如 vllm、fastchat、llamacpp、AdaSeq 等
#- vllm
base_model:
- mergekit-community/Qwen2.5-7B-della
- mergekit-community/Qwen2.5-7B-ties
- Qwen/Qwen2.5-7B-Instruct
- Qwen/Qwen2.5-7B-Instruct-1M
- mergekit-community/Qwen2.5-7B-ties-1M
- Qwen/Qwen2.5-7B
- mergekit-community/Qwen2.5-7B-della-1M
library_name: transformers
tags:
- mergekit
- merge
license: apache-2.0
language:
- en
- zh
pipeline_tag: text-generation
---
### 当前模型的贡献者未提供更加详细的模型介绍。模型文件和权重,可浏览“模型文件”页面获取。
#### 您可以通过如下git clone命令或者ModelScope SDK来下载模型
# Achieve the Optimal Merged Model by Using One Basic Model and Two Fine-tuned Models!
SDK下载
```bash
#安装ModelScope
pip install modelscope
```
```python
#SDK模型下载
from modelscope import snapshot_download
model_dir = snapshot_download('YOYO-AI/Qwen2.5-7B-YOYO-super')
```
Git下载
```
#Git模型下载
git clone https://www.modelscope.cn/YOYO-AI/Qwen2.5-7B-YOYO-super.git
```
*What is the best way to merge **one base model** and **two fine-tuned models**?*
<p style="color: lightgrey;">如果您是本模型的贡献者,我们邀请您根据<a href="https://modelscope.cn/docs/ModelScope%E6%A8%A1%E5%9E%8B%E6%8E%A5%E5%85%A5%E6%B5%81%E7%A8%8B%E6%A6%82%E8%A7%88" style="color: lightgrey; text-decoration: underline;">模型贡献文档</a>,及时完善模型卡片内容。</p>
## This might be the best answer at the present stage!
[Qwen2.5-7B-YOYO-super](https://huggingface.co/YOYO-AI/Qwen2.5-7B-YOYO-super)
[Qwen2.5-14B-YOYO-super](https://huggingface.co/YOYO-AI/Qwen2.5-14B-YOYO-super)
*This is not a whim release, but the optimal result of countless merging experiments!*
*Here is the formula for the **previous generation**:*
```yaml
models:
- model: Qwen/Qwen2.5-7B-Instruct
parameters:
density: 1
weight: 1
lambda: 0.9
- model: Qwen/Qwen2.5-7B-Instruct-1M
parameters:
density: 1
weight: 1
lambda: 0.9
merge_method: della
base_model: Qwen/Qwen2.5-7B
parameters:
density: 1
weight: 1
lambda: 0.9
normalize: true
int8_mask: true
dtype: bfloat16
tokenizer_source: base
```
*It was widely used in the merging process of the **previous generation of models***.
*However, there are some **deficiencies***:
*1.There is relatively little retention of knowledge of the basic model.*
*2.The mathematical and coding abilities have declined.*
## And here is the formula for this generation:
```yaml
models:
- model: Qwen/Qwen2.5-7B-instruct
parameters:
density: 1
weight: 1
lambda: 0.9
merge_method: della
base_model: Qwen/Qwen2.5-7B
parameters:
density: 1
weight: 1
lambda: 0.9
normalize: true
int8_mask: true
dtype: float16
tokenizer_source: base
name: Qwen2.5-7B-della
```
```yaml
models:
- model: Qwen/Qwen2.5-7B-instruct-1M
parameters:
density: 1
weight: 1
lambda: 0.9
merge_method: della
base_model: Qwen/Qwen2.5-7B
parameters:
density: 1
weight: 1
lambda: 0.9
normalize: true
int8_mask: true
dtype: float16
tokenizer_source: base
name: Qwen2.5-7B-della-1M
```
```yaml
models:
- model: Qwen/Qwen2.5-7B-instruct
parameters:
density: 1
weight: 1
merge_method: ties
base_model: Qwen/Qwen2.5-7B
parameters:
density: 1
weight: 1
normalize: true
int8_mask: true
dtype: float16
tokenizer_source: base
name: Qwen2.5-7B-ties
```
```yaml
models:
- model: Qwen/Qwen2.5-7B-instruct-1M
parameters:
density: 1
weight: 1
merge_method: ties
base_model: Qwen/Qwen2.5-7B
parameters:
density: 1
weight: 1
normalize: true
int8_mask: true
dtype: float16
tokenizer_source: base
name: Qwen2.5-7B-ties-1M
```
```yaml
merge_method: model_stock
base_model: Qwen/Qwen2.5-7B
models:
- model: mergekit-community/Qwen2.5-7B-della
- model: mergekit-community/Qwen2.5-7B-della-1M
- model: mergekit-community/Qwen2.5-7B-ties
- model: mergekit-community/Qwen2.5-7B-ties-1M
- model: Qwen/Qwen2.5-7B-instruct-1M
- model: Qwen/Qwen2.5-7B-instruct
tokenizer_source: base
int8_mask: true
normalize: true
dtype: float16
```
*Except for a slight decrease in instruction following, **significant improvements** have been achieved in all other aspects.*
*This formula will also be used in the development of **the next generation of YOYO models**.*
***YOYO-AI** not only releases merged models with excellent performance but also publishes a **complete and high-quality model merging formula**, hoping to promote the progress of model merging technology in the open-source community with this!*
### If you can use this formula when merging models, it will be the greatest support for YOYO-AI!