Commit
·
d2854aa
verified
·
0
Parent(s):
Super-squash branch 'main' using huggingface_hub
Browse filesCo-authored-by: sapiosaturn <sapiosaturn@users.noreply.huggingface.co>
Co-authored-by: lckr <lckr@users.noreply.huggingface.co>
- .gitattributes +36 -0
- README.md +148 -0
- chat_template.jinja +1 -0
- config.json +108 -0
- configuration_afmoe.py +129 -0
- model-00001-of-00031.safetensors +3 -0
- model-00002-of-00031.safetensors +3 -0
- model-00003-of-00031.safetensors +3 -0
- model-00004-of-00031.safetensors +3 -0
- model-00005-of-00031.safetensors +3 -0
- model-00006-of-00031.safetensors +3 -0
- model-00007-of-00031.safetensors +3 -0
- model-00008-of-00031.safetensors +3 -0
- model-00009-of-00031.safetensors +3 -0
- model-00010-of-00031.safetensors +3 -0
- model-00011-of-00031.safetensors +3 -0
- model-00012-of-00031.safetensors +3 -0
- model-00013-of-00031.safetensors +3 -0
- model-00014-of-00031.safetensors +3 -0
- model-00015-of-00031.safetensors +3 -0
- model-00016-of-00031.safetensors +3 -0
- model-00017-of-00031.safetensors +3 -0
- model-00018-of-00031.safetensors +3 -0
- model-00019-of-00031.safetensors +3 -0
- model-00020-of-00031.safetensors +3 -0
- model-00021-of-00031.safetensors +3 -0
- model-00022-of-00031.safetensors +3 -0
- model-00023-of-00031.safetensors +3 -0
- model-00024-of-00031.safetensors +3 -0
- model-00025-of-00031.safetensors +3 -0
- model-00026-of-00031.safetensors +3 -0
- model-00027-of-00031.safetensors +3 -0
- model-00028-of-00031.safetensors +3 -0
- model-00029-of-00031.safetensors +3 -0
- model-00030-of-00031.safetensors +3 -0
- model-00031-of-00031.safetensors +3 -0
- model.safetensors.index.json +0 -0
- tokenizer.json +3 -0
- tokenizer_config.json +271 -0
.gitattributes
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
*.7z filter=lfs diff=lfs merge=lfs -text
|
| 2 |
+
*.arrow filter=lfs diff=lfs merge=lfs -text
|
| 3 |
+
*.bin filter=lfs diff=lfs merge=lfs -text
|
| 4 |
+
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
| 5 |
+
*.ckpt filter=lfs diff=lfs merge=lfs -text
|
| 6 |
+
*.ftz filter=lfs diff=lfs merge=lfs -text
|
| 7 |
+
*.gz filter=lfs diff=lfs merge=lfs -text
|
| 8 |
+
*.h5 filter=lfs diff=lfs merge=lfs -text
|
| 9 |
+
*.joblib filter=lfs diff=lfs merge=lfs -text
|
| 10 |
+
*.lfs.* filter=lfs diff=lfs merge=lfs -text
|
| 11 |
+
*.mlmodel filter=lfs diff=lfs merge=lfs -text
|
| 12 |
+
*.model filter=lfs diff=lfs merge=lfs -text
|
| 13 |
+
*.msgpack filter=lfs diff=lfs merge=lfs -text
|
| 14 |
+
*.npy filter=lfs diff=lfs merge=lfs -text
|
| 15 |
+
*.npz filter=lfs diff=lfs merge=lfs -text
|
| 16 |
+
*.onnx filter=lfs diff=lfs merge=lfs -text
|
| 17 |
+
*.ot filter=lfs diff=lfs merge=lfs -text
|
| 18 |
+
*.parquet filter=lfs diff=lfs merge=lfs -text
|
| 19 |
+
*.pb filter=lfs diff=lfs merge=lfs -text
|
| 20 |
+
*.pickle filter=lfs diff=lfs merge=lfs -text
|
| 21 |
+
*.pkl filter=lfs diff=lfs merge=lfs -text
|
| 22 |
+
*.pt filter=lfs diff=lfs merge=lfs -text
|
| 23 |
+
*.pth filter=lfs diff=lfs merge=lfs -text
|
| 24 |
+
*.rar filter=lfs diff=lfs merge=lfs -text
|
| 25 |
+
*.safetensors filter=lfs diff=lfs merge=lfs -text
|
| 26 |
+
saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
| 27 |
+
*.tar.* filter=lfs diff=lfs merge=lfs -text
|
| 28 |
+
*.tar filter=lfs diff=lfs merge=lfs -text
|
| 29 |
+
*.tflite filter=lfs diff=lfs merge=lfs -text
|
| 30 |
+
*.tgz filter=lfs diff=lfs merge=lfs -text
|
| 31 |
+
*.wasm filter=lfs diff=lfs merge=lfs -text
|
| 32 |
+
*.xz 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 |
+
tokenizer.json filter=lfs diff=lfs merge=lfs -text
|
README.md
ADDED
|
@@ -0,0 +1,148 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
language:
|
| 4 |
+
- en
|
| 5 |
+
- es
|
| 6 |
+
- fr
|
| 7 |
+
- de
|
| 8 |
+
- it
|
| 9 |
+
- pt
|
| 10 |
+
- ru
|
| 11 |
+
- ar
|
| 12 |
+
- hi
|
| 13 |
+
- ko
|
| 14 |
+
- zh
|
| 15 |
+
library_name: transformers
|
| 16 |
+
base_model:
|
| 17 |
+
- arcee-ai/Trinity-Large-TrueBase
|
| 18 |
+
---
|
| 19 |
+
<!-- markdownlint-disable first-line-h1 -->
|
| 20 |
+
<!-- markdownlint-disable html -->
|
| 21 |
+
<!-- markdownlint-disable no-duplicate-header -->
|
| 22 |
+
|
| 23 |
+
<div align="center">
|
| 24 |
+
<picture>
|
| 25 |
+
<img
|
| 26 |
+
src="https://cdn-uploads.huggingface.co/production/uploads/6435718aaaef013d1aec3b8b/i-v1KyAMOW_mgVGeic9WJ.png"
|
| 27 |
+
alt="Arcee Trinity Large"
|
| 28 |
+
style="max-width: 100%; height: auto;"
|
| 29 |
+
>
|
| 30 |
+
</picture>
|
| 31 |
+
</div>
|
| 32 |
+
<hr>
|
| 33 |
+
|
| 34 |
+
|
| 35 |
+
# Trinity-Large-Base
|
| 36 |
+
|
| 37 |
+
## Introduction
|
| 38 |
+
|
| 39 |
+
Trinity-Large-Base is a pretrained foundation model from Arcee AI's Trinity Large training run. It is a 398B-parameter sparse Mixture-of-Experts (MoE) model with approximately 13B active parameters per token. The checkpoint was captured after 17 trillion tokens of pretraining, including mid-training learning-rate anneals and context extension, but prior to any instruction tuning or reinforcement learning.
|
| 40 |
+
|
| 41 |
+
This checkpoint represents the completed pretraining phase and serves as a foundation for research and downstream fine-tuning.
|
| 42 |
+
|
| 43 |
+
More details on the training of Trinity Large are available in the [technical report](https://github.com/arcee-ai/trinity-large-tech-report/).
|
| 44 |
+
|
| 45 |
+
|
| 46 |
+
## Model Variants
|
| 47 |
+
|
| 48 |
+
The Trinity Large family consists of three checkpoints from the same training run:
|
| 49 |
+
|
| 50 |
+
- **Trinity-Large-Base** (this release): Full 17T-token pretrained foundation model with mid-training anneals
|
| 51 |
+
- **[Trinity-Large-TrueBase](https://huggingface.co/arcee-ai/Trinity-Large-TrueBase)**: 10T-token pre-anneal checkpoint with no instruction data
|
| 52 |
+
- **[Trinity-Large-Preview](https://huggingface.co/arcee-ai/Trinity-Large-Preview)**: Lightly post-trained, chat-ready model undergoing active RL
|
| 53 |
+
|
| 54 |
+
## Architecture
|
| 55 |
+
|
| 56 |
+
Trinity-Large-Base uses a sparse MoE configuration designed to maximize efficiency while maintaining large-scale capacity.
|
| 57 |
+
|
| 58 |
+
| Hyperparameter | Value |
|
| 59 |
+
|:---|:---:|
|
| 60 |
+
| Total parameters | ~398B |
|
| 61 |
+
| Active parameters per token | ~13B |
|
| 62 |
+
| Experts | 256 |
|
| 63 |
+
| Active experts | 4 |
|
| 64 |
+
| Routing strategy | 4-of-256 (1.56% sparsity) |
|
| 65 |
+
| Dense layers | 6 |
|
| 66 |
+
| Pretraining context length | 8,192 |
|
| 67 |
+
| Context length after extention | 512k |
|
| 68 |
+
| Architecture | Sparse MoE (AfmoeForCausalLM) |
|
| 69 |
+
|
| 70 |
+
|
| 71 |
+
## Benchmark Results
|
| 72 |
+
|
| 73 |
+
| Benchmark | N-shot | Metric | Score | Stderr |
|
| 74 |
+
|------------------------|--------|-------------------------------|--------|---------|
|
| 75 |
+
| mbpp_plus | 3 | pass_at_1,none | 0.8862 | ±0.0164 |
|
| 76 |
+
| minerva_math500 | 4 | math_verify,none | 0.6520 | ±0.0213 |
|
| 77 |
+
| hellaswag_5shot | 5 | acc_norm,none | 0.9011 | ±0.0030 |
|
| 78 |
+
| winogrande_5shot | 5 | acc,none | 0.8082 | ±0.0111 |
|
| 79 |
+
| mmlu_5shot | 5 | acc,none | 0.8258 | ±0.0031 |
|
| 80 |
+
| mmlu_generative_5shot | 5 | exact_match,get_response | 0.8260 | ±0.0031 |
|
| 81 |
+
| mmlu_pro | 5 | exact_match,custom-extract | 0.6602 | ±0.0042 |
|
| 82 |
+
| triviaqa_5shot | 5 | exact_match,remove_whitespace | 0.8330 | ±0.0028 |
|
| 83 |
+
| arc_challenge_0shot | 0 | acc_norm,none | 0.6544 | ±0.0139 |
|
| 84 |
+
| bbh_fewshot | 3 | exact_match,remove_whitespace | 0.6570 | ±0.0051 |
|
| 85 |
+
| gpqa_diamond_5shot | 5 | acc_norm,none | 0.4394 | ±0.0354 |
|
| 86 |
+
| gsm8k_cot | 8 | exact_match,flexible-extract | 0.9136 | ±0.0077 |
|
| 87 |
+
|
| 88 |
+
## Training Configuration
|
| 89 |
+
|
| 90 |
+
### Pretraining
|
| 91 |
+
|
| 92 |
+
- Training tokens: 17 trillion
|
| 93 |
+
- Checkpoint type: Post-anneal (foundation)
|
| 94 |
+
- Instruction data: None
|
| 95 |
+
- RLHF or post-training: None
|
| 96 |
+
|
| 97 |
+
This checkpoint represents the final pretrained state after completion of the pretraining phase, including mid-training learning-rate anneals, but before instruction tuning or reinforcement learning.
|
| 98 |
+
|
| 99 |
+
### Optimizers
|
| 100 |
+
|
| 101 |
+
Optimizer learning rates during WSD stable phase:
|
| 102 |
+
|
| 103 |
+
- Adam learning rate: 2e-4
|
| 104 |
+
- Muon learning rate: 8e-4
|
| 105 |
+
|
| 106 |
+
Muon was used to support larger critical batch sizes in a highly sparse MoE regime.
|
| 107 |
+
|
| 108 |
+
### Infrastructure
|
| 109 |
+
|
| 110 |
+
- Hardware: 2,048 NVIDIA B300 GPUs
|
| 111 |
+
- Parallelism: HSDP + Expert Parallelism
|
| 112 |
+
- Compute partner: [Prime Intellect](https://www.primeintellect.ai/)
|
| 113 |
+
- Data partner: [Datology](https://www.datologyai.com/)
|
| 114 |
+
|
| 115 |
+
<div align="center">
|
| 116 |
+
<picture>
|
| 117 |
+
<img src="https://cdn-uploads.huggingface.co/production/uploads/6435718aaaef013d1aec3b8b/sSVjGNHfrJKmQ6w8I18ek.png" style="background-color:ghostwhite;padding:5px;" width="17%" alt="Powered by Datology">
|
| 118 |
+
</picture>
|
| 119 |
+
</div>
|
| 120 |
+
|
| 121 |
+
<div align="center">
|
| 122 |
+
<picture>
|
| 123 |
+
<img src="https://cdn-avatars.huggingface.co/v1/production/uploads/61e020e4a343274bb132e138/H2mcdPRWtl4iKLd-OYYBc.jpeg" style="background-color:ghostwhite;padding:5px;" width="17%" alt="Powered by Datology">
|
| 124 |
+
</picture>
|
| 125 |
+
</div>
|
| 126 |
+
|
| 127 |
+
## Intended Use
|
| 128 |
+
|
| 129 |
+
- Studying emergent behavior from large-scale pretraining
|
| 130 |
+
- Sparse MoE routing and load-balancing research
|
| 131 |
+
- Interpretability, probing, and ablation studies
|
| 132 |
+
- Domain-specific fine-tuning from a pretrained foundation
|
| 133 |
+
- Academic and industrial foundation model research
|
| 134 |
+
|
| 135 |
+
## Comparison with TrueBase
|
| 136 |
+
|
| 137 |
+
Trinity-Large-Base includes an additional 7 trillion training tokens compared to Trinity-Large-TrueBase, along with mid-training learning-rate anneals. These anneals stabilize training dynamics and typically improve downstream fine-tuning performance compared to the pre-anneal checkpoint. Researchers studying raw pretraining dynamics may prefer TrueBase, while those seeking a foundation for fine-tuning may prefer this checkpoint.
|
| 138 |
+
|
| 139 |
+
## Known Limitations
|
| 140 |
+
|
| 141 |
+
- Not aligned for safety, helpfulness, or conversational tone
|
| 142 |
+
- Requires substantial compute and expertise to fine-tune
|
| 143 |
+
- May exhibit raw or unstable behaviors typical of unaligned models
|
| 144 |
+
- No extended-context tuning beyond the 8K pretraining window
|
| 145 |
+
|
| 146 |
+
## License
|
| 147 |
+
|
| 148 |
+
Trinity-Large-Base is released under the Apache License, Version 2.0.
|
chat_template.jinja
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{{ bos_token }}{% for message in messages %}{{ message['content'] }}{% endfor %}
|
config.json
ADDED
|
@@ -0,0 +1,108 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"architectures": [
|
| 3 |
+
"AfmoeForCausalLM"
|
| 4 |
+
],
|
| 5 |
+
"attention_dropout": 0.0,
|
| 6 |
+
"auto_map": {
|
| 7 |
+
"AutoConfig": "configuration_afmoe.AfmoeConfig",
|
| 8 |
+
"AutoModel": "modeling_afmoe.AfmoeModel",
|
| 9 |
+
"AutoModelForCausalLM": "modeling_afmoe.AfmoeForCausalLM"
|
| 10 |
+
},
|
| 11 |
+
"dtype": "bfloat16",
|
| 12 |
+
"global_attn_every_n_layers": 4,
|
| 13 |
+
"head_dim": 128,
|
| 14 |
+
"hidden_act": "silu",
|
| 15 |
+
"hidden_size": 3072,
|
| 16 |
+
"initializer_range": 0.02,
|
| 17 |
+
"intermediate_size": 12288,
|
| 18 |
+
"layer_types": [
|
| 19 |
+
"sliding_attention",
|
| 20 |
+
"sliding_attention",
|
| 21 |
+
"sliding_attention",
|
| 22 |
+
"full_attention",
|
| 23 |
+
"sliding_attention",
|
| 24 |
+
"sliding_attention",
|
| 25 |
+
"sliding_attention",
|
| 26 |
+
"full_attention",
|
| 27 |
+
"sliding_attention",
|
| 28 |
+
"sliding_attention",
|
| 29 |
+
"sliding_attention",
|
| 30 |
+
"full_attention",
|
| 31 |
+
"sliding_attention",
|
| 32 |
+
"sliding_attention",
|
| 33 |
+
"sliding_attention",
|
| 34 |
+
"full_attention",
|
| 35 |
+
"sliding_attention",
|
| 36 |
+
"sliding_attention",
|
| 37 |
+
"sliding_attention",
|
| 38 |
+
"full_attention",
|
| 39 |
+
"sliding_attention",
|
| 40 |
+
"sliding_attention",
|
| 41 |
+
"sliding_attention",
|
| 42 |
+
"full_attention",
|
| 43 |
+
"sliding_attention",
|
| 44 |
+
"sliding_attention",
|
| 45 |
+
"sliding_attention",
|
| 46 |
+
"full_attention",
|
| 47 |
+
"sliding_attention",
|
| 48 |
+
"sliding_attention",
|
| 49 |
+
"sliding_attention",
|
| 50 |
+
"full_attention",
|
| 51 |
+
"sliding_attention",
|
| 52 |
+
"sliding_attention",
|
| 53 |
+
"sliding_attention",
|
| 54 |
+
"full_attention",
|
| 55 |
+
"sliding_attention",
|
| 56 |
+
"sliding_attention",
|
| 57 |
+
"sliding_attention",
|
| 58 |
+
"full_attention",
|
| 59 |
+
"sliding_attention",
|
| 60 |
+
"sliding_attention",
|
| 61 |
+
"sliding_attention",
|
| 62 |
+
"full_attention",
|
| 63 |
+
"sliding_attention",
|
| 64 |
+
"sliding_attention",
|
| 65 |
+
"sliding_attention",
|
| 66 |
+
"full_attention",
|
| 67 |
+
"sliding_attention",
|
| 68 |
+
"sliding_attention",
|
| 69 |
+
"sliding_attention",
|
| 70 |
+
"full_attention",
|
| 71 |
+
"sliding_attention",
|
| 72 |
+
"sliding_attention",
|
| 73 |
+
"sliding_attention",
|
| 74 |
+
"full_attention",
|
| 75 |
+
"sliding_attention",
|
| 76 |
+
"sliding_attention",
|
| 77 |
+
"sliding_attention",
|
| 78 |
+
"full_attention"
|
| 79 |
+
],
|
| 80 |
+
"load_balance_coeff": 0.00005,
|
| 81 |
+
"max_position_embeddings": 262144,
|
| 82 |
+
"model_type": "afmoe",
|
| 83 |
+
"moe_intermediate_size": 3072,
|
| 84 |
+
"mup_enabled": true,
|
| 85 |
+
"n_group": 1,
|
| 86 |
+
"num_attention_heads": 48,
|
| 87 |
+
"num_dense_layers": 6,
|
| 88 |
+
"num_expert_groups": 1,
|
| 89 |
+
"num_experts": 256,
|
| 90 |
+
"num_experts_per_tok": 4,
|
| 91 |
+
"num_hidden_layers": 60,
|
| 92 |
+
"num_key_value_heads": 8,
|
| 93 |
+
"num_limited_groups": 1,
|
| 94 |
+
"num_shared_experts": 1,
|
| 95 |
+
"rms_norm_eps": 1e-05,
|
| 96 |
+
"rope_scaling": null,
|
| 97 |
+
"rope_theta": 10000,
|
| 98 |
+
"route_norm": true,
|
| 99 |
+
"route_scale": 2.448,
|
| 100 |
+
"score_func": "sigmoid",
|
| 101 |
+
"sliding_window": 4096,
|
| 102 |
+
"tie_word_embeddings": false,
|
| 103 |
+
"topk_group": 1,
|
| 104 |
+
"transformers_version": "4.57.1",
|
| 105 |
+
"use_cache": true,
|
| 106 |
+
"use_grouped_mm": true,
|
| 107 |
+
"vocab_size": 200192
|
| 108 |
+
}
|
configuration_afmoe.py
ADDED
|
@@ -0,0 +1,129 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# coding=utf-8
|
| 2 |
+
# Copyright 2022 EleutherAI and the HuggingFace Inc. team. All rights reserved.
|
| 3 |
+
#
|
| 4 |
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
| 5 |
+
# you may not use this file except in compliance with the License.
|
| 6 |
+
# You may obtain a copy of the License at
|
| 7 |
+
#
|
| 8 |
+
# http://www.apache.org/licenses/LICENSE-2.0
|
| 9 |
+
#
|
| 10 |
+
# Unless required by applicable law or agreed to in writing, software
|
| 11 |
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
| 12 |
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 13 |
+
# See the License for the specific language governing permissions and
|
| 14 |
+
# limitations under the License.
|
| 15 |
+
from transformers.configuration_utils import PretrainedConfig
|
| 16 |
+
from transformers.utils import logging
|
| 17 |
+
|
| 18 |
+
logger = logging.get_logger(__name__)
|
| 19 |
+
|
| 20 |
+
class AfmoeConfig(PretrainedConfig):
|
| 21 |
+
"""
|
| 22 |
+
n_group (`int`, *optional*, defaults to 1):
|
| 23 |
+
Number of groups for routed experts.
|
| 24 |
+
topk_group (`int`, *optional*, defaults to 1):
|
| 25 |
+
Number of selected groups for each token(for each token, ensuring the selected experts is only within `topk_group` groups).
|
| 26 |
+
"""
|
| 27 |
+
model_type = "afmoe"
|
| 28 |
+
base_model_pp_plan = {
|
| 29 |
+
"embed_tokens": (["input_ids"], ["inputs_embeds"]),
|
| 30 |
+
"layers": (["hidden_states", "attention_mask"], ["hidden_states"]),
|
| 31 |
+
"norm": (["hidden_states"], ["hidden_states"]),
|
| 32 |
+
}
|
| 33 |
+
|
| 34 |
+
def __init__(
|
| 35 |
+
self,
|
| 36 |
+
num_hidden_layers: int = 32,
|
| 37 |
+
vocab_size: int = 200192,
|
| 38 |
+
hidden_size: int = 2048,
|
| 39 |
+
intermediate_size: int = 6144,
|
| 40 |
+
moe_intermediate_size=1408,
|
| 41 |
+
num_dense_layers=1,
|
| 42 |
+
num_attention_heads=16,
|
| 43 |
+
num_key_value_heads=None,
|
| 44 |
+
head_dim=128,
|
| 45 |
+
hidden_act="silu",
|
| 46 |
+
max_position_embeddings=16384,
|
| 47 |
+
initializer_range=0.02,
|
| 48 |
+
rms_norm_eps=1e-5,
|
| 49 |
+
use_cache=True,
|
| 50 |
+
tie_word_embeddings=False,
|
| 51 |
+
rope_theta=10000.0,
|
| 52 |
+
rope_scaling=None,
|
| 53 |
+
num_experts=64,
|
| 54 |
+
num_experts_per_tok=6,
|
| 55 |
+
num_shared_experts=2,
|
| 56 |
+
num_expert_groups=1,
|
| 57 |
+
num_limited_groups=1,
|
| 58 |
+
score_func="sigmoid",
|
| 59 |
+
route_norm=True,
|
| 60 |
+
route_scale=1.0,
|
| 61 |
+
global_attn_every_n_layers=4,
|
| 62 |
+
sliding_window=1024,
|
| 63 |
+
mup_enabled=False,
|
| 64 |
+
layer_types=None,
|
| 65 |
+
attention_dropout: float = 0.0,
|
| 66 |
+
n_group: int = 1,
|
| 67 |
+
topk_group: int = 1,
|
| 68 |
+
**kwargs,
|
| 69 |
+
):
|
| 70 |
+
self.vocab_size = vocab_size
|
| 71 |
+
self.max_position_embeddings = max_position_embeddings
|
| 72 |
+
self.hidden_size = hidden_size
|
| 73 |
+
self.intermediate_size = intermediate_size
|
| 74 |
+
self.num_hidden_layers = num_hidden_layers
|
| 75 |
+
self.num_dense_layers = num_dense_layers
|
| 76 |
+
self.num_attention_heads = num_attention_heads
|
| 77 |
+
self.head_dim = head_dim
|
| 78 |
+
self.hidden_act = hidden_act
|
| 79 |
+
self.initializer_range = initializer_range
|
| 80 |
+
self.rms_norm_eps = rms_norm_eps
|
| 81 |
+
self.use_cache = use_cache
|
| 82 |
+
self.rope_theta = rope_theta
|
| 83 |
+
self.rope_scaling = rope_scaling
|
| 84 |
+
|
| 85 |
+
|
| 86 |
+
# MoE specific
|
| 87 |
+
self.moe_intermediate_size = moe_intermediate_size
|
| 88 |
+
self.num_experts_per_tok = num_experts_per_tok
|
| 89 |
+
self.n_group = n_group
|
| 90 |
+
self.topk_group = topk_group
|
| 91 |
+
self.num_experts = num_experts
|
| 92 |
+
self.num_shared_experts = num_shared_experts
|
| 93 |
+
self.num_expert_groups = num_expert_groups
|
| 94 |
+
self.num_limited_groups = num_limited_groups
|
| 95 |
+
self.score_func = score_func
|
| 96 |
+
self.route_norm = route_norm
|
| 97 |
+
self.route_scale = route_scale
|
| 98 |
+
|
| 99 |
+
|
| 100 |
+
# Attention specific
|
| 101 |
+
self.attention_dropout = attention_dropout
|
| 102 |
+
self.global_attn_every_n_layers = global_attn_every_n_layers
|
| 103 |
+
self.sliding_window = sliding_window
|
| 104 |
+
self.layer_types = layer_types
|
| 105 |
+
if self.layer_types is None:
|
| 106 |
+
self.layer_types = [
|
| 107 |
+
"sliding_attention" if bool((i + 1) % global_attn_every_n_layers) else "full_attention" for i in range(self.num_hidden_layers)
|
| 108 |
+
]
|
| 109 |
+
|
| 110 |
+
# muP specific
|
| 111 |
+
self.mup_enabled = mup_enabled
|
| 112 |
+
|
| 113 |
+
if num_key_value_heads is None:
|
| 114 |
+
num_key_value_heads = num_attention_heads
|
| 115 |
+
|
| 116 |
+
self.num_key_value_heads = num_key_value_heads
|
| 117 |
+
|
| 118 |
+
|
| 119 |
+
# Validate rope configs
|
| 120 |
+
if self.rope_scaling is not None and "type" in self.rope_scaling:
|
| 121 |
+
self.rope_scaling["rope_type"] = self.rope_scaling["type"]
|
| 122 |
+
|
| 123 |
+
super().__init__(
|
| 124 |
+
tie_word_embeddings=tie_word_embeddings,
|
| 125 |
+
**kwargs,
|
| 126 |
+
)
|
| 127 |
+
|
| 128 |
+
|
| 129 |
+
__all__ = ["AfmoeConfig"]
|
model-00001-of-00031.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:14f6ebcf4d3b99e503f885424ceadb8456a06bdbb61295250aaf115d71046820
|
| 3 |
+
size 2459965736
|
model-00002-of-00031.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:7b5b287720ec8140ca3ee418c14699d4cac8c5d159f7bc7a8e662d5fa095018e
|
| 3 |
+
size 704696408
|
model-00003-of-00031.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:bbceccf5a891b76c80bdb0bc3d4668fc93fca545552649a15fd4243e7774e4f3
|
| 3 |
+
size 704696408
|
model-00004-of-00031.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:8a2a2c1f868e5da51fbb3244e50a154977b252187d81a884cbeb9c46e8029458
|
| 3 |
+
size 704696408
|
model-00005-of-00031.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:43a317907942243292be0ea3fd6cfe4fac0d8bdd551f18f65338fb7855e284b6
|
| 3 |
+
size 29359328160
|
model-00006-of-00031.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:f85524d1232c7fb9cabf4a71d25b8c209e63312d43b820114f6bc32c5be1c0a5
|
| 3 |
+
size 29359328160
|
model-00007-of-00031.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:8e599ab3ab16cd910fee015fc14d0cbcf09f661081b048c935f431c99359ca79
|
| 3 |
+
size 29359329728
|
model-00008-of-00031.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:30954ce9fee52d0a45edd06576e069c86b07dac8325fba642b502e0ef0830ba6
|
| 3 |
+
size 29359329728
|
model-00009-of-00031.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:972f090952841379c273d8c64247e54db28c43c65d5bf89e7374ba16b84b7474
|
| 3 |
+
size 29359329728
|
model-00010-of-00031.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ba834224b0276bb57cb09bd0f6cdb27da63989f3bab5893f75de665d4a3bf752
|
| 3 |
+
size 29359329728
|
model-00011-of-00031.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:3b5928decfd4fd09df0e6a86c102d0b8214174644c945011be0de48a4bc6476f
|
| 3 |
+
size 29359329728
|
model-00012-of-00031.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:13d336ca136ddbb64ae7ac1ee6df31353f018d2f4c99b072970d836e2bd1d338
|
| 3 |
+
size 29359329728
|
model-00013-of-00031.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a214fc4dcad56e0919f1179ce611255ada1edb274c2896002fbd858f44eaf507
|
| 3 |
+
size 29359329728
|
model-00014-of-00031.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:e00223e2a4b19b29897422d9b0ab9c48b5d4d570628660ed69a88f9872c6bcce
|
| 3 |
+
size 29359329728
|
model-00015-of-00031.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:8dce6206abe6a7bdb2b9780ecbfe3e1107a2e86898bf791961d1cc507b99c741
|
| 3 |
+
size 29359329728
|
model-00016-of-00031.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:8372454b53fcd0a91c45df8ee640eb23a9a8b41a9d115c7f8d8968d2c0ebf0c0
|
| 3 |
+
size 29359329728
|
model-00017-of-00031.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:717b2bdebebf309dcd1831636a3125bd763dafd299197f8aaf489cab781ba936
|
| 3 |
+
size 29359329728
|
model-00018-of-00031.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:c50b24ff2affcf391e741e1773ddcf7233277a8c842573df3d7eef60522bf515
|
| 3 |
+
size 29359329728
|
model-00019-of-00031.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a787e22b6a7f3b33975bdc187ceb98bf2ed10ca25273cf62974868607b4b4ea2
|
| 3 |
+
size 29359329728
|
model-00020-of-00031.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:fdc23de978c98df827ebf8e81576cdfd42a497775372dabc29562ce63bd42667
|
| 3 |
+
size 29359329728
|
model-00021-of-00031.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:df944307afb01a9d5cf20335847d2175bf5071e75cec4eb967c328453a352625
|
| 3 |
+
size 29359329728
|
model-00022-of-00031.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:59405ee4b0d7378af6f9fe0d5405fc38d1e41652c12ad5dee89792db9860de7c
|
| 3 |
+
size 29359329728
|
model-00023-of-00031.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:efc9476baaa1c46437116c8f71e4cfc0f04dc7a233542423db505f710add2472
|
| 3 |
+
size 29359329728
|
model-00024-of-00031.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:abb52f5e47ddba7e14b1db2f06fb7836597d9e58e7cd53aa38d1aa9f7e6a32d1
|
| 3 |
+
size 29359329728
|
model-00025-of-00031.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:64b4674f6359863933eb0050f007c4e23afe11889b9454d7d1c91d8d4a92bfe7
|
| 3 |
+
size 29359329728
|
model-00026-of-00031.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:5947d632bfbece800a86efd3e39e4b1ae827c944f5073038f7e78e53d63c482f
|
| 3 |
+
size 29359329728
|
model-00027-of-00031.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:0be245d0562b861a6a3aa3fad28932a22f2f0e8cc6c18d308616236947d07974
|
| 3 |
+
size 29359329728
|
model-00028-of-00031.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:fc5e8b2e8020a60565f305007090e7e581405f376e9124a89f5f3a11b7ccd370
|
| 3 |
+
size 29359329728
|
model-00029-of-00031.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:bcbe0794a6b61116a8a9be10627c2d3f3ccff3c93d3fd7b12aa6305961239a77
|
| 3 |
+
size 29359329728
|
model-00030-of-00031.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:19fe385ef91981e8286009d52bbdc966f30ebb7bbf0eba45864615941ad218ed
|
| 3 |
+
size 29359329728
|
model-00031-of-00031.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:35a79ba198379f616c11d2e6451fb80a3db002f0656ae669e1d0eba65652e9a4
|
| 3 |
+
size 29359329728
|
model.safetensors.index.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
tokenizer.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:4d864fe0d9c300d44c54006f5960548946d507d8ec05a082a3bff3e49de58208
|
| 3 |
+
size 14614721
|
tokenizer_config.json
ADDED
|
@@ -0,0 +1,271 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"add_bos_token": true,
|
| 3 |
+
"add_eos_token": false,
|
| 4 |
+
"add_prefix_space": null,
|
| 5 |
+
"added_tokens_decoder": {
|
| 6 |
+
"0": {
|
| 7 |
+
"content": "<|begin_of_text|>",
|
| 8 |
+
"lstrip": false,
|
| 9 |
+
"normalized": false,
|
| 10 |
+
"rstrip": false,
|
| 11 |
+
"single_word": false,
|
| 12 |
+
"special": true
|
| 13 |
+
},
|
| 14 |
+
"1": {
|
| 15 |
+
"content": "<|end_of_text|>",
|
| 16 |
+
"lstrip": false,
|
| 17 |
+
"normalized": false,
|
| 18 |
+
"rstrip": false,
|
| 19 |
+
"single_word": false,
|
| 20 |
+
"special": true
|
| 21 |
+
},
|
| 22 |
+
"2": {
|
| 23 |
+
"content": "<|im_start|>",
|
| 24 |
+
"lstrip": false,
|
| 25 |
+
"normalized": false,
|
| 26 |
+
"rstrip": false,
|
| 27 |
+
"single_word": false,
|
| 28 |
+
"special": true
|
| 29 |
+
},
|
| 30 |
+
"3": {
|
| 31 |
+
"content": "<|im_end|>",
|
| 32 |
+
"lstrip": false,
|
| 33 |
+
"normalized": false,
|
| 34 |
+
"rstrip": false,
|
| 35 |
+
"single_word": false,
|
| 36 |
+
"special": true
|
| 37 |
+
},
|
| 38 |
+
"4": {
|
| 39 |
+
"content": "<|eot_id|>",
|
| 40 |
+
"lstrip": false,
|
| 41 |
+
"normalized": false,
|
| 42 |
+
"rstrip": false,
|
| 43 |
+
"single_word": false,
|
| 44 |
+
"special": true
|
| 45 |
+
},
|
| 46 |
+
"5": {
|
| 47 |
+
"content": "<|start|>",
|
| 48 |
+
"lstrip": false,
|
| 49 |
+
"normalized": false,
|
| 50 |
+
"rstrip": false,
|
| 51 |
+
"single_word": false,
|
| 52 |
+
"special": true
|
| 53 |
+
},
|
| 54 |
+
"6": {
|
| 55 |
+
"content": "<|channel|>",
|
| 56 |
+
"lstrip": false,
|
| 57 |
+
"normalized": false,
|
| 58 |
+
"rstrip": false,
|
| 59 |
+
"single_word": false,
|
| 60 |
+
"special": true
|
| 61 |
+
},
|
| 62 |
+
"7": {
|
| 63 |
+
"content": "<|message|>",
|
| 64 |
+
"lstrip": false,
|
| 65 |
+
"normalized": false,
|
| 66 |
+
"rstrip": false,
|
| 67 |
+
"single_word": false,
|
| 68 |
+
"special": true
|
| 69 |
+
},
|
| 70 |
+
"8": {
|
| 71 |
+
"content": "<|end|>",
|
| 72 |
+
"lstrip": false,
|
| 73 |
+
"normalized": false,
|
| 74 |
+
"rstrip": false,
|
| 75 |
+
"single_word": false,
|
| 76 |
+
"special": true
|
| 77 |
+
},
|
| 78 |
+
"9": {
|
| 79 |
+
"content": "<|fitm_start|>",
|
| 80 |
+
"lstrip": false,
|
| 81 |
+
"normalized": false,
|
| 82 |
+
"rstrip": false,
|
| 83 |
+
"single_word": false,
|
| 84 |
+
"special": true
|
| 85 |
+
},
|
| 86 |
+
"10": {
|
| 87 |
+
"content": "<|fitm_end|>",
|
| 88 |
+
"lstrip": false,
|
| 89 |
+
"normalized": false,
|
| 90 |
+
"rstrip": false,
|
| 91 |
+
"single_word": false,
|
| 92 |
+
"special": true
|
| 93 |
+
},
|
| 94 |
+
"11": {
|
| 95 |
+
"content": "<|fitm_hole|>",
|
| 96 |
+
"lstrip": false,
|
| 97 |
+
"normalized": false,
|
| 98 |
+
"rstrip": false,
|
| 99 |
+
"single_word": false,
|
| 100 |
+
"special": true
|
| 101 |
+
},
|
| 102 |
+
"12": {
|
| 103 |
+
"content": "<|pad|>",
|
| 104 |
+
"lstrip": false,
|
| 105 |
+
"normalized": false,
|
| 106 |
+
"rstrip": false,
|
| 107 |
+
"single_word": false,
|
| 108 |
+
"special": true
|
| 109 |
+
},
|
| 110 |
+
"13": {
|
| 111 |
+
"content": "<think>",
|
| 112 |
+
"lstrip": false,
|
| 113 |
+
"normalized": false,
|
| 114 |
+
"rstrip": false,
|
| 115 |
+
"single_word": false,
|
| 116 |
+
"special": false
|
| 117 |
+
},
|
| 118 |
+
"14": {
|
| 119 |
+
"content": "</think>",
|
| 120 |
+
"lstrip": false,
|
| 121 |
+
"normalized": false,
|
| 122 |
+
"rstrip": false,
|
| 123 |
+
"single_word": false,
|
| 124 |
+
"special": false
|
| 125 |
+
},
|
| 126 |
+
"15": {
|
| 127 |
+
"content": "<tools>",
|
| 128 |
+
"lstrip": false,
|
| 129 |
+
"normalized": false,
|
| 130 |
+
"rstrip": false,
|
| 131 |
+
"single_word": false,
|
| 132 |
+
"special": false
|
| 133 |
+
},
|
| 134 |
+
"16": {
|
| 135 |
+
"content": "</tools>",
|
| 136 |
+
"lstrip": false,
|
| 137 |
+
"normalized": false,
|
| 138 |
+
"rstrip": false,
|
| 139 |
+
"single_word": false,
|
| 140 |
+
"special": false
|
| 141 |
+
},
|
| 142 |
+
"17": {
|
| 143 |
+
"content": "<tool_call>",
|
| 144 |
+
"lstrip": false,
|
| 145 |
+
"normalized": false,
|
| 146 |
+
"rstrip": false,
|
| 147 |
+
"single_word": false,
|
| 148 |
+
"special": false
|
| 149 |
+
},
|
| 150 |
+
"18": {
|
| 151 |
+
"content": "</tool_call>",
|
| 152 |
+
"lstrip": false,
|
| 153 |
+
"normalized": false,
|
| 154 |
+
"rstrip": false,
|
| 155 |
+
"single_word": false,
|
| 156 |
+
"special": false
|
| 157 |
+
},
|
| 158 |
+
"19": {
|
| 159 |
+
"content": "<tool_response>",
|
| 160 |
+
"lstrip": false,
|
| 161 |
+
"normalized": false,
|
| 162 |
+
"rstrip": false,
|
| 163 |
+
"single_word": false,
|
| 164 |
+
"special": false
|
| 165 |
+
},
|
| 166 |
+
"20": {
|
| 167 |
+
"content": "</tool_response>",
|
| 168 |
+
"lstrip": false,
|
| 169 |
+
"normalized": false,
|
| 170 |
+
"rstrip": false,
|
| 171 |
+
"single_word": false,
|
| 172 |
+
"special": false
|
| 173 |
+
},
|
| 174 |
+
"21": {
|
| 175 |
+
"content": "<|reserved_special_8|>",
|
| 176 |
+
"lstrip": false,
|
| 177 |
+
"normalized": false,
|
| 178 |
+
"rstrip": false,
|
| 179 |
+
"single_word": false,
|
| 180 |
+
"special": true
|
| 181 |
+
},
|
| 182 |
+
"22": {
|
| 183 |
+
"content": "<|reserved_special_9|>",
|
| 184 |
+
"lstrip": false,
|
| 185 |
+
"normalized": false,
|
| 186 |
+
"rstrip": false,
|
| 187 |
+
"single_word": false,
|
| 188 |
+
"special": true
|
| 189 |
+
},
|
| 190 |
+
"23": {
|
| 191 |
+
"content": "<|reserved_special_10|>",
|
| 192 |
+
"lstrip": false,
|
| 193 |
+
"normalized": false,
|
| 194 |
+
"rstrip": false,
|
| 195 |
+
"single_word": false,
|
| 196 |
+
"special": true
|
| 197 |
+
},
|
| 198 |
+
"24": {
|
| 199 |
+
"content": "<|reserved_special_11|>",
|
| 200 |
+
"lstrip": false,
|
| 201 |
+
"normalized": false,
|
| 202 |
+
"rstrip": false,
|
| 203 |
+
"single_word": false,
|
| 204 |
+
"special": true
|
| 205 |
+
},
|
| 206 |
+
"25": {
|
| 207 |
+
"content": "<|reserved_special_12|>",
|
| 208 |
+
"lstrip": false,
|
| 209 |
+
"normalized": false,
|
| 210 |
+
"rstrip": false,
|
| 211 |
+
"single_word": false,
|
| 212 |
+
"special": true
|
| 213 |
+
},
|
| 214 |
+
"26": {
|
| 215 |
+
"content": "<|reserved_special_13|>",
|
| 216 |
+
"lstrip": false,
|
| 217 |
+
"normalized": false,
|
| 218 |
+
"rstrip": false,
|
| 219 |
+
"single_word": false,
|
| 220 |
+
"special": true
|
| 221 |
+
},
|
| 222 |
+
"27": {
|
| 223 |
+
"content": "<|reserved_special_14|>",
|
| 224 |
+
"lstrip": false,
|
| 225 |
+
"normalized": false,
|
| 226 |
+
"rstrip": false,
|
| 227 |
+
"single_word": false,
|
| 228 |
+
"special": true
|
| 229 |
+
},
|
| 230 |
+
"28": {
|
| 231 |
+
"content": "<|reserved_special_15|>",
|
| 232 |
+
"lstrip": false,
|
| 233 |
+
"normalized": false,
|
| 234 |
+
"rstrip": false,
|
| 235 |
+
"single_word": false,
|
| 236 |
+
"special": true
|
| 237 |
+
},
|
| 238 |
+
"29": {
|
| 239 |
+
"content": "<|reserved_special_16|>",
|
| 240 |
+
"lstrip": false,
|
| 241 |
+
"normalized": false,
|
| 242 |
+
"rstrip": false,
|
| 243 |
+
"single_word": false,
|
| 244 |
+
"special": true
|
| 245 |
+
},
|
| 246 |
+
"30": {
|
| 247 |
+
"content": "<|reserved_special_17|>",
|
| 248 |
+
"lstrip": false,
|
| 249 |
+
"normalized": false,
|
| 250 |
+
"rstrip": false,
|
| 251 |
+
"single_word": false,
|
| 252 |
+
"special": true
|
| 253 |
+
},
|
| 254 |
+
"31": {
|
| 255 |
+
"content": "<|reserved_special_18|>",
|
| 256 |
+
"lstrip": false,
|
| 257 |
+
"normalized": false,
|
| 258 |
+
"rstrip": false,
|
| 259 |
+
"single_word": false,
|
| 260 |
+
"special": true
|
| 261 |
+
}
|
| 262 |
+
},
|
| 263 |
+
"bos_token": "<|begin_of_text|>",
|
| 264 |
+
"clean_up_tokenization_spaces": false,
|
| 265 |
+
"eos_token": "<|im_end|>",
|
| 266 |
+
"extra_special_tokens": {},
|
| 267 |
+
"model_max_length": 65536,
|
| 268 |
+
"pad_token": "<|pad|>",
|
| 269 |
+
"tokenizer_class": "PreTrainedTokenizerFast",
|
| 270 |
+
"use_default_system_prompt": false
|
| 271 |
+
}
|