初始化项目,由ModelHub XC社区提供模型

Model: Aratako/Swallow-MoE-2x13B-v0.1
Source: Original Platform
This commit is contained in:
ModelHub XC
2026-08-28 16:16:14 +08:00
commit dd21bb0db6
16 changed files with 295 additions and 0 deletions

55
.gitattributes vendored Normal file
View File

@@ -0,0 +1,55 @@
*.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
*.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
*.ckpt filter=lfs diff=lfs merge=lfs -text
*.gguf* filter=lfs diff=lfs merge=lfs -text
*.ggml filter=lfs diff=lfs merge=lfs -text
*.llamafile* filter=lfs diff=lfs merge=lfs -text
*.pt2 filter=lfs diff=lfs merge=lfs -text
*.mlmodel filter=lfs diff=lfs merge=lfs -text
*.npy filter=lfs diff=lfs merge=lfs -text
*.npz filter=lfs diff=lfs merge=lfs -text
*.pickle filter=lfs diff=lfs merge=lfs -text
*.pkl filter=lfs diff=lfs merge=lfs -text
*.tar filter=lfs diff=lfs merge=lfs -text
*.wasm filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text
*tfevents* filter=lfs diff=lfs merge=lfs -text
tokenizer.model filter=lfs diff=lfs merge=lfs -text
model-00003-of-00005.safetensors filter=lfs diff=lfs merge=lfs -text
model-00002-of-00005.safetensors filter=lfs diff=lfs merge=lfs -text
model-00001-of-00005.safetensors filter=lfs diff=lfs merge=lfs -text
tokenizer.json filter=lfs diff=lfs merge=lfs -text
model-00004-of-00005.safetensors filter=lfs diff=lfs merge=lfs -text
model-00005-of-00005.safetensors filter=lfs diff=lfs merge=lfs -text

107
README.md Normal file
View File

@@ -0,0 +1,107 @@
---
base_model:
- tokyotech-llm/Swallow-13b-instruct-hf
- nitky/Superswallow-13b-v0.2
license: llama2
language:
- ja
tags:
- mergekit
- merge
- MoE
---
# Swallow-MoE-2x13B-v0.1
[**English description here**](#description)
## 概要
Llama-2ベースの学習済み日本語モデルである[tokyotech-llm/Swallow-13b-instruct-hf](https://huggingface.co/tokyotech-llm/Swallow-13b-instruct-hf)と、それを利用したマージモデルである[nitky/Superswallow-13b-v0.2](https://huggingface.co/nitky/Superswallow-13b-v0.2)
を、[mergekit](https://github.com/cg123/mergekit)を使ってMoEを行い作成したモデルです。
[GGUF版はこちら](https://huggingface.co/Aratako/Swallow-MoE-2x13B-v0.1-GGUF)
以下2モデルを利用しています。
- [tokyotech-llm/Swallow-13b-instruct-hf](https://huggingface.co/tokyotech-llm/Swallow-13b-instruct-hf)
- [nitky/Superswallow-13b-v0.2](https://huggingface.co/nitky/Superswallow-13b-v0.2)
## ライセンス
Llama2ライセンスを継承しますが、それ以外にもこのマージモデルはLlama2ライセンス以外のライセンスの影響を受けます。
- [nitky/Superswallow-13b-v0.2](https://huggingface.co/nitky/Superswallow-13b-v0.2)の利用により、[AI2 ImpACT license](https://allenai.org/impact-license)を継承している可能性があります。詳細は元モデルの概要をご確認ください。
## ベンチマーク
ベースとしたSwallow-13b-instruct-hf、Superswallow-13b-v0.2と本モデルの[japanese-mt-bench](https://github.com/Stability-AI/FastChat/tree/jp-stable/fastchat/llm_judge)の結果は以下の通りです。
(シングルターン)
|Model|Size|Coding|Extraction|Humanities|Math|Reasoning|Roleplay|STEM|Writing|avg_score|
|---|---|---|---|---|---|---|---|---|---|---|
| Swallow-13b-instruct-hf | 13B | 2.1 | 5.0 | 6.1 | 1.9 | 4.5 | 5.0 | 4.9 | 5.6 | 4.3875 |
| Superswallow-13b-v0.2 | 13B | **2.7** | **6.3** | **8.4** | 2.2 | **5.9** | 6.8 | 7.2 | 6.8 | 5.7875 |
| This model | 2x13B | 2.6 | 6.2 | **8.4** | **2.3** | 5.3 | **7.4** | **7.7** | **8.4** | **6.0375** |
![レーダーチャート](./japanese_mt_bench.png)
**ベンチマークに使用したプロンプト**
- Swallow-13b-instruct-hf, Superswallow-13b-v0.2
```
以下に、あるタスクを説明する指示があり、それに付随する入力が更なる文脈を提供しています。リクエストを適切に完了するための回答を記述してください。
### 指示:
{instruction}
### 応答:
```
- Swallow-MoE-2x13B-v0.1
```
### 指示:
{instruction}
### 応答:
```
## Description
This model is created using MoE (Mixture of Experts) through mergekit based on [tokyotech-llm/Swallow-13b-instruct-hf](https://huggingface.co/tokyotech-llm/Swallow-13b-instruct-hf) and [nitky/Superswallow-13b-v0.2](https://huggingface.co/nitky/Superswallow-13b-v0.2).
[Click here for the GGUF version](https://huggingface.co/Aratako/Swallow-MoE-2x13B-v0.1-GGUF)
It utilizes the following two models:
- [tokyotech-llm/Swallow-13b-instruct-hf](https://huggingface.co/tokyotech-llm/Swallow-13b-instruct-hf)
- [nitky/Superswallow-13b-v0.2](https://huggingface.co/nitky/Superswallow-13b-v0.2)
## License
While inheriting the Llama2 license, this merged model is also subject to other licenses due to its use of models beyond Llama2.
- Due to the use of [nitky/Superswallow-13b-v0.2](https://huggingface.co/nitky/Superswallow-13b-v0.2), it may inherit the [AI2 ImpACT license](https://allenai.org/impact-license). Please refer to the original model's overview for details.
## Benchmark
The results of this model and the base Swallow-13b-instruct-hf, Superswallow-13b-v0.2 on japanese-mt-bench are as follows.
(Single turn)
|Model|Size|Coding|Extraction|Humanities|Math|Reasoning|Roleplay|STEM|Writing|avg_score|
|---|---|---|---|---|---|---|---|---|---|---|
| Swallow-13b-instruct-hf | 13B | 2.1 | 5.0 | 6.1 | 1.9 | 4.5 | 5.0 | 4.9 | 5.6 | 4.3875 |
| Superswallow-13b-v0.2 | 13B | **2.7** | **6.3** | **8.4** | 2.2 | **5.9** | 6.8 | 7.2 | 6.8 | 5.7875 |
| This model | 2x13B | 2.6 | 6.2 | **8.4** | **2.3** | 5.3 | **7.4** | **7.7** | **8.4** | **6.0375** |
![レーダーチャート](./japanese_mt_bench.png)
**Prompt used for benchmark**
- Swallow-13b-instruct-hf, Superswallow-13b-v0.2
```
以下に、あるタスクを説明する指示があり、それに付随する入力が更なる文脈を提供しています。リクエストを適切に完了するための回答を記述してください。
### 指示:
{instruction}
### 応答:
```
- Swallow-MoE-2x13B-v0.1
```
### 指示:
{instruction}
### 応答:
```
## Merge config
[mergekit_config.yml](./mergekit_moe_config.yml)
```yaml
base_model: ./Superswallow-13b-v0.2
gate_mode: random
dtype: bfloat16
experts:
- source_model: ./Superswallow-13b-v0.2
positive_prompts: []
- source_model: ./Swallow-13b-instruct-hf
positive_prompts: []
tokenizer_source: union
```

35
config.json Normal file
View File

@@ -0,0 +1,35 @@
{
"_name_or_path": "./Superswallow-13b-v0.2",
"architectures": [
"MixtralForCausalLM"
],
"attention_bias": false,
"attention_dropout": 0.0,
"bos_token_id": 1,
"eos_token_id": 2,
"hidden_act": "silu",
"hidden_size": 5120,
"initializer_range": 0.02,
"intermediate_size": 13824,
"max_position_embeddings": 4096,
"max_sequence_length": 4096,
"model_type": "mixtral",
"num_attention_heads": 40,
"num_experts_per_tok": 2,
"num_hidden_layers": 40,
"num_key_value_heads": 40,
"num_local_experts": 2,
"output_router_logits": false,
"pad_token_id": 0,
"pretraining_tp": 1,
"rms_norm_eps": 1e-05,
"rope_scaling": null,
"rope_theta": 10000.0,
"router_aux_loss_coef": 0.001,
"sliding_window": null,
"tie_word_embeddings": false,
"torch_dtype": "bfloat16",
"transformers_version": "4.38.1",
"use_cache": true,
"vocab_size": 43176
}

1
configuration.json Normal file
View File

@@ -0,0 +1 @@
{"framework": "pytorch", "task": "text-generation", "allow_remote": true}

BIN
japanese_mt_bench.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 79 KiB

9
mergekit_moe_config.yml Normal file
View File

@@ -0,0 +1,9 @@
base_model: ./Superswallow-13b-v0.2
gate_mode: random
dtype: bfloat16
experts:
- source_model: ./Superswallow-13b-v0.2
positive_prompts: []
- source_model: ./Swallow-13b-instruct-hf
positive_prompts: []
tokenizer_source: union

View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:bc3c24fc3a99c8974bd1d88ad12fb6022afb18e1dd3094c98dd9aa19eea820aa
size 9991334896

View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:a0bd653ece20d530310f0950ada6d33e85dad461cf04ae8d20141709aac1d2ac
size 9956437664

View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:854eb969bf7977fad5fc61ed25b614705d161e4f72106205e3bf4bb5a7996dd6
size 9883037576

View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:85fecf01dd7bb57c0460b37c35440e6d3d279f12079782a305736206ef9e5851
size 9956427328

View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:3f6e39701ba25425dad8c105f94883e9197d58089acd93e68a2b145c8c29122c
size 3461190752

File diff suppressed because one or more lines are too long

24
special_tokens_map.json Normal file
View File

@@ -0,0 +1,24 @@
{
"bos_token": {
"content": "<s>",
"lstrip": false,
"normalized": true,
"rstrip": false,
"single_word": false
},
"eos_token": {
"content": "</s>",
"lstrip": false,
"normalized": true,
"rstrip": false,
"single_word": false
},
"pad_token": "<s>",
"unk_token": {
"content": "<unk>",
"lstrip": false,
"normalized": true,
"rstrip": false,
"single_word": false
}
}

3
tokenizer.json Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:37120ff77f62176cb54e53d2c31ed4498c6afee484eae53bd74f509c923f6351
size 2304163

3
tokenizer.model Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:c877c5ca885bad5c19d1b1706a2703f8b30de90f03c1f834f8bdb9faf79821e8
size 914000

42
tokenizer_config.json Normal file
View File

@@ -0,0 +1,42 @@
{
"add_bos_token": true,
"add_eos_token": false,
"added_tokens_decoder": {
"0": {
"content": "<unk>",
"lstrip": false,
"normalized": true,
"rstrip": false,
"single_word": false,
"special": true
},
"1": {
"content": "<s>",
"lstrip": false,
"normalized": true,
"rstrip": false,
"single_word": false,
"special": true
},
"2": {
"content": "</s>",
"lstrip": false,
"normalized": true,
"rstrip": false,
"single_word": false,
"special": true
}
},
"bos_token": "<s>",
"clean_up_tokenization_spaces": false,
"eos_token": "</s>",
"legacy": false,
"model_max_length": 1000000000000000019884624838656,
"pad_token": "<s>",
"padding_side": "left",
"sp_model_kwargs": {},
"spaces_between_special_tokens": false,
"tokenizer_class": "LlamaTokenizer",
"unk_token": "<unk>",
"use_default_system_prompt": false
}