Phi-4-mini int4 shards (1 stage, ov-runtime, export v5_canonical_inputs)
Browse files- .gitattributes +1 -0
- README.md +69 -0
- cascadia.json +27 -0
- int4/stages-1/pipeline_config.json +14 -0
- int4/stages-1/stage_0/openvino_model.bin +3 -0
- int4/stages-1/stage_0/openvino_model.xml +0 -0
- int4/stages-1/stage_0/stage_config.json +23 -0
- int4/stages-1/tokenizer/added_tokens.json +12 -0
- int4/stages-1/tokenizer/config.json +144 -0
- int4/stages-1/tokenizer/generation_config.json +10 -0
- int4/stages-1/tokenizer/special_tokens_map.json +30 -0
- int4/stages-1/tokenizer/tokenizer.json +3 -0
- int4/stages-1/tokenizer/tokenizer_config.json +111 -0
.gitattributes
CHANGED
|
@@ -33,3 +33,4 @@ 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 |
+
int4/stages-1/tokenizer/tokenizer.json filter=lfs diff=lfs merge=lfs -text
|
README.md
ADDED
|
@@ -0,0 +1,69 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: mit
|
| 3 |
+
base_model: microsoft/Phi-4-mini-instruct
|
| 4 |
+
tags:
|
| 5 |
+
- cascadia
|
| 6 |
+
- openvino
|
| 7 |
+
- int4
|
| 8 |
+
- pipeline-parallel
|
| 9 |
+
library_name: cascadia
|
| 10 |
+
---
|
| 11 |
+
|
| 12 |
+
# Phi-4-mini Instruct — Cascadia int4 shards
|
| 13 |
+
|
| 14 |
+
Pre-exported [Cascadia](https://github.com/labscommunity/cascadia) inference shards for
|
| 15 |
+
`microsoft/Phi-4-mini-instruct`, so operators can deploy without running an export themselves.
|
| 16 |
+
|
| 17 |
+
These are **OpenVINO IR** artifacts for Cascadia's `ov-runtime` engine. They are not
|
| 18 |
+
loadable by `transformers` — see *Using these* below.
|
| 19 |
+
|
| 20 |
+
## Contents
|
| 21 |
+
|
| 22 |
+
| Preset | Path | Stages | Quant | Size |
|
| 23 |
+
|---|---|---|---|---|
|
| 24 |
+
| `1` | `int4/stages-1` | 1 | int4 | 1.9 GB |
|
| 25 |
+
|
| 26 |
+
```
|
| 27 |
+
int4/stages-1/
|
| 28 |
+
pipeline_config.json # model geometry: layers, heads, rope, arch tag
|
| 29 |
+
stage_0/
|
| 30 |
+
openvino_model.xml # IR graph
|
| 31 |
+
openvino_model.bin # int4 weights
|
| 32 |
+
stage_config.json # layer_start, layer_end, has_embed, has_head
|
| 33 |
+
tokenizer/ # tokenizer.json + configs
|
| 34 |
+
```
|
| 35 |
+
|
| 36 |
+
`cascadia.json` at the repo root is the machine-readable index (sizes, checksums,
|
| 37 |
+
export version) that Cascadia's model registry reads.
|
| 38 |
+
|
| 39 |
+
## Using these
|
| 40 |
+
|
| 41 |
+
```bash
|
| 42 |
+
hf download communitylabs/cascadia-phi-4-mini-int4 --local-dir ./phi-4-mini
|
| 43 |
+
cascadia worker --model ./phi-4-mini/int4/stages-1 --engine ov-runtime
|
| 44 |
+
```
|
| 45 |
+
|
| 46 |
+
The worker takes a **local path**, never a HuggingFace id — Cascadia workers never
|
| 47 |
+
download or convert models at serve time.
|
| 48 |
+
|
| 49 |
+
## Provenance
|
| 50 |
+
|
| 51 |
+
Exported with Cascadia's `tools/export_shards.py`, `export_version: v5_canonical_inputs`.
|
| 52 |
+
|
| 53 |
+
| | |
|
| 54 |
+
|---|---|
|
| 55 |
+
| Source | `microsoft/Phi-4-mini-instruct` |
|
| 56 |
+
| Layers | 32 |
|
| 57 |
+
| Hidden size | 3072 |
|
| 58 |
+
| Attention heads | 24 (8 KV) |
|
| 59 |
+
| Vocab | 200064 |
|
| 60 |
+
| RoPE theta | 10000.0 (partial rotary factor 0.75) |
|
| 61 |
+
| Quantization | int4 (NNCF, group size 128) |
|
| 62 |
+
|
| 63 |
+
Quantization is lossy. For anything quality-sensitive, benchmark against the source
|
| 64 |
+
model rather than assuming parity.
|
| 65 |
+
|
| 66 |
+
## License
|
| 67 |
+
|
| 68 |
+
MIT, inherited from [`microsoft/Phi-4-mini-instruct`](https://huggingface.co/microsoft/Phi-4-mini-instruct).
|
| 69 |
+
These shards are a derivative work; the upstream license and its terms apply.
|
cascadia.json
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"schema": "cascadia-shards-v1",
|
| 3 |
+
"model": {
|
| 4 |
+
"id": "phi-4-mini",
|
| 5 |
+
"name": "Phi-4-mini Instruct",
|
| 6 |
+
"paramsB": 3.8,
|
| 7 |
+
"source": "microsoft/Phi-4-mini-instruct",
|
| 8 |
+
"arch": "phi"
|
| 9 |
+
},
|
| 10 |
+
"license": {
|
| 11 |
+
"spdx": "MIT",
|
| 12 |
+
"url": "https://huggingface.co/microsoft/Phi-4-mini-instruct",
|
| 13 |
+
"gatedUpstream": false
|
| 14 |
+
},
|
| 15 |
+
"engine": "ov-runtime",
|
| 16 |
+
"splitMode": "per-export",
|
| 17 |
+
"artifacts": {
|
| 18 |
+
"1": {
|
| 19 |
+
"path": "int4/stages-1",
|
| 20 |
+
"quant": "int4",
|
| 21 |
+
"stages": 1,
|
| 22 |
+
"sizeBytes": 1996385342,
|
| 23 |
+
"sha256Bin": "22d658ed8bb601d56f3d6ee2bb488d664c0a60755a82f44229a263a549c40a22",
|
| 24 |
+
"exportVersion": "v5_canonical_inputs"
|
| 25 |
+
}
|
| 26 |
+
}
|
| 27 |
+
}
|
int4/stages-1/pipeline_config.json
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"model_id": "microsoft/Phi-4-mini-instruct",
|
| 3 |
+
"num_stages": 1,
|
| 4 |
+
"num_layers": 32,
|
| 5 |
+
"hidden_size": 3072,
|
| 6 |
+
"num_attention_heads": 24,
|
| 7 |
+
"num_key_value_heads": 8,
|
| 8 |
+
"vocab_size": 200064,
|
| 9 |
+
"rope_theta": 10000.0,
|
| 10 |
+
"partial_rotary_factor": 0.75,
|
| 11 |
+
"arch_tag": "phi",
|
| 12 |
+
"quantization": "int4",
|
| 13 |
+
"export_version": "v5_canonical_inputs"
|
| 14 |
+
}
|
int4/stages-1/stage_0/openvino_model.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:22d658ed8bb601d56f3d6ee2bb488d664c0a60755a82f44229a263a549c40a22
|
| 3 |
+
size 1978245642
|
int4/stages-1/stage_0/openvino_model.xml
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
int4/stages-1/stage_0/stage_config.json
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"stage": 0,
|
| 3 |
+
"layer_start": 0,
|
| 4 |
+
"layer_end": 32,
|
| 5 |
+
"has_embed": true,
|
| 6 |
+
"has_head": true,
|
| 7 |
+
"quantization": "int4",
|
| 8 |
+
"hidden_size": 3072,
|
| 9 |
+
"vocab_size": 200064,
|
| 10 |
+
"num_layers_total": 32,
|
| 11 |
+
"num_kv_heads": 8,
|
| 12 |
+
"head_dim": 128,
|
| 13 |
+
"stateful": true,
|
| 14 |
+
"rope_theta": 10000.0,
|
| 15 |
+
"partial_rotary_factor": 0.75,
|
| 16 |
+
"arch_tag": "phi",
|
| 17 |
+
"target": "cpu-gpu",
|
| 18 |
+
"static_seq": null,
|
| 19 |
+
"static_context": null,
|
| 20 |
+
"inputs": "input_ids/hidden_states, attention_mask, position_ids, beam_idx (KV cache is internal state)",
|
| 21 |
+
"cache_reorder": true,
|
| 22 |
+
"export_version": "v5_canonical_inputs"
|
| 23 |
+
}
|
int4/stages-1/tokenizer/added_tokens.json
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"<|/tool_call|>": 200026,
|
| 3 |
+
"<|/tool|>": 200024,
|
| 4 |
+
"<|assistant|>": 200019,
|
| 5 |
+
"<|end|>": 200020,
|
| 6 |
+
"<|system|>": 200022,
|
| 7 |
+
"<|tag|>": 200028,
|
| 8 |
+
"<|tool_call|>": 200025,
|
| 9 |
+
"<|tool_response|>": 200027,
|
| 10 |
+
"<|tool|>": 200023,
|
| 11 |
+
"<|user|>": 200021
|
| 12 |
+
}
|
int4/stages-1/tokenizer/config.json
ADDED
|
@@ -0,0 +1,144 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_name_or_path": "Phi-4-mini-instruct",
|
| 3 |
+
"architectures": [
|
| 4 |
+
"Phi3ForCausalLM"
|
| 5 |
+
],
|
| 6 |
+
"attention_bias": false,
|
| 7 |
+
"attention_dropout": 0.0,
|
| 8 |
+
"auto_map": {
|
| 9 |
+
"AutoConfig": "configuration_phi3.Phi3Config",
|
| 10 |
+
"AutoModelForCausalLM": "modeling_phi3.Phi3ForCausalLM",
|
| 11 |
+
"AutoTokenizer": "Xenova/gpt-4o"
|
| 12 |
+
},
|
| 13 |
+
"bos_token_id": 199999,
|
| 14 |
+
"embd_pdrop": 0.0,
|
| 15 |
+
"eos_token_id": 199999,
|
| 16 |
+
"full_attn_mod": 1,
|
| 17 |
+
"hidden_act": "silu",
|
| 18 |
+
"hidden_size": 3072,
|
| 19 |
+
"initializer_range": 0.02,
|
| 20 |
+
"intermediate_size": 8192,
|
| 21 |
+
"interpolate_factor": 1,
|
| 22 |
+
"lm_head_bias": false,
|
| 23 |
+
"max_position_embeddings": 131072,
|
| 24 |
+
"mlp_bias": false,
|
| 25 |
+
"model_type": "phi3",
|
| 26 |
+
"num_attention_heads": 24,
|
| 27 |
+
"num_hidden_layers": 32,
|
| 28 |
+
"num_key_value_heads": 8,
|
| 29 |
+
"original_max_position_embeddings": 4096,
|
| 30 |
+
"pad_token_id": 199999,
|
| 31 |
+
"partial_rotary_factor": 0.75,
|
| 32 |
+
"resid_pdrop": 0.0,
|
| 33 |
+
"rms_norm_eps": 1e-05,
|
| 34 |
+
"rope_scaling": {
|
| 35 |
+
"long_factor": [
|
| 36 |
+
1,
|
| 37 |
+
1.118320672,
|
| 38 |
+
1.250641126,
|
| 39 |
+
1.398617824,
|
| 40 |
+
1.564103225,
|
| 41 |
+
1.74916897,
|
| 42 |
+
1.956131817,
|
| 43 |
+
2.187582649,
|
| 44 |
+
2.446418898,
|
| 45 |
+
2.735880826,
|
| 46 |
+
3.059592084,
|
| 47 |
+
3.421605075,
|
| 48 |
+
3.826451687,
|
| 49 |
+
4.279200023,
|
| 50 |
+
4.785517845,
|
| 51 |
+
5.351743533,
|
| 52 |
+
5.984965424,
|
| 53 |
+
6.693110555,
|
| 54 |
+
7.485043894,
|
| 55 |
+
8.370679318,
|
| 56 |
+
9.36110372,
|
| 57 |
+
10.4687158,
|
| 58 |
+
11.70738129,
|
| 59 |
+
13.09260651,
|
| 60 |
+
14.64173252,
|
| 61 |
+
16.37415215,
|
| 62 |
+
18.31155283,
|
| 63 |
+
20.47818807,
|
| 64 |
+
22.90118105,
|
| 65 |
+
25.61086418,
|
| 66 |
+
28.64115884,
|
| 67 |
+
32.03,
|
| 68 |
+
32.1,
|
| 69 |
+
32.13,
|
| 70 |
+
32.23,
|
| 71 |
+
32.6,
|
| 72 |
+
32.61,
|
| 73 |
+
32.64,
|
| 74 |
+
32.66,
|
| 75 |
+
32.7,
|
| 76 |
+
32.71,
|
| 77 |
+
32.93,
|
| 78 |
+
32.97,
|
| 79 |
+
33.28,
|
| 80 |
+
33.49,
|
| 81 |
+
33.5,
|
| 82 |
+
44.16,
|
| 83 |
+
47.77
|
| 84 |
+
],
|
| 85 |
+
"short_factor": [
|
| 86 |
+
1.0,
|
| 87 |
+
1.0,
|
| 88 |
+
1.0,
|
| 89 |
+
1.0,
|
| 90 |
+
1.0,
|
| 91 |
+
1.0,
|
| 92 |
+
1.0,
|
| 93 |
+
1.0,
|
| 94 |
+
1.0,
|
| 95 |
+
1.0,
|
| 96 |
+
1.0,
|
| 97 |
+
1.0,
|
| 98 |
+
1.0,
|
| 99 |
+
1.0,
|
| 100 |
+
1.0,
|
| 101 |
+
1.0,
|
| 102 |
+
1.0,
|
| 103 |
+
1.0,
|
| 104 |
+
1.0,
|
| 105 |
+
1.0,
|
| 106 |
+
1.0,
|
| 107 |
+
1.0,
|
| 108 |
+
1.0,
|
| 109 |
+
1.0,
|
| 110 |
+
1.0,
|
| 111 |
+
1.0,
|
| 112 |
+
1.0,
|
| 113 |
+
1.0,
|
| 114 |
+
1.0,
|
| 115 |
+
1.0,
|
| 116 |
+
1.0,
|
| 117 |
+
1.0,
|
| 118 |
+
1.0,
|
| 119 |
+
1.0,
|
| 120 |
+
1.0,
|
| 121 |
+
1.0,
|
| 122 |
+
1.0,
|
| 123 |
+
1.0,
|
| 124 |
+
1.0,
|
| 125 |
+
1.0,
|
| 126 |
+
1.0,
|
| 127 |
+
1.0,
|
| 128 |
+
1.0,
|
| 129 |
+
1.0,
|
| 130 |
+
1.0,
|
| 131 |
+
1.0,
|
| 132 |
+
1.0,
|
| 133 |
+
1.0
|
| 134 |
+
],
|
| 135 |
+
"type": "longrope"
|
| 136 |
+
},
|
| 137 |
+
"rope_theta": 10000.0,
|
| 138 |
+
"sliding_window": 262144,
|
| 139 |
+
"tie_word_embeddings": true,
|
| 140 |
+
"torch_dtype": "bfloat16",
|
| 141 |
+
"transformers_version": "4.45.0",
|
| 142 |
+
"use_cache": true,
|
| 143 |
+
"vocab_size": 200064
|
| 144 |
+
}
|
int4/stages-1/tokenizer/generation_config.json
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_from_model_config": true,
|
| 3 |
+
"bos_token_id": 199999,
|
| 4 |
+
"eos_token_id": [
|
| 5 |
+
200020,
|
| 6 |
+
199999
|
| 7 |
+
],
|
| 8 |
+
"pad_token_id": 199999,
|
| 9 |
+
"transformers_version": "4.45.0"
|
| 10 |
+
}
|
int4/stages-1/tokenizer/special_tokens_map.json
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"bos_token": {
|
| 3 |
+
"content": "<|endoftext|>",
|
| 4 |
+
"lstrip": false,
|
| 5 |
+
"normalized": false,
|
| 6 |
+
"rstrip": false,
|
| 7 |
+
"single_word": false
|
| 8 |
+
},
|
| 9 |
+
"eos_token": {
|
| 10 |
+
"content": "<|endoftext|>",
|
| 11 |
+
"lstrip": false,
|
| 12 |
+
"normalized": false,
|
| 13 |
+
"rstrip": false,
|
| 14 |
+
"single_word": false
|
| 15 |
+
},
|
| 16 |
+
"pad_token": {
|
| 17 |
+
"content": "<|endoftext|>",
|
| 18 |
+
"lstrip": false,
|
| 19 |
+
"normalized": false,
|
| 20 |
+
"rstrip": false,
|
| 21 |
+
"single_word": false
|
| 22 |
+
},
|
| 23 |
+
"unk_token": {
|
| 24 |
+
"content": "<|endoftext|>",
|
| 25 |
+
"lstrip": false,
|
| 26 |
+
"normalized": false,
|
| 27 |
+
"rstrip": false,
|
| 28 |
+
"single_word": false
|
| 29 |
+
}
|
| 30 |
+
}
|
int4/stages-1/tokenizer/tokenizer.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:382cc235b56c725945e149cc25f191da667c836655efd0857b004320e90e91ea
|
| 3 |
+
size 15524095
|
int4/stages-1/tokenizer/tokenizer_config.json
ADDED
|
@@ -0,0 +1,111 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"add_bos_token": false,
|
| 3 |
+
"add_eos_token": false,
|
| 4 |
+
"add_prefix_space": false,
|
| 5 |
+
"added_tokens_decoder": {
|
| 6 |
+
"199999": {
|
| 7 |
+
"content": "<|endoftext|>",
|
| 8 |
+
"lstrip": false,
|
| 9 |
+
"normalized": false,
|
| 10 |
+
"rstrip": false,
|
| 11 |
+
"single_word": false,
|
| 12 |
+
"special": true
|
| 13 |
+
},
|
| 14 |
+
"200018": {
|
| 15 |
+
"content": "<|endofprompt|>",
|
| 16 |
+
"lstrip": false,
|
| 17 |
+
"normalized": false,
|
| 18 |
+
"rstrip": false,
|
| 19 |
+
"single_word": false,
|
| 20 |
+
"special": true
|
| 21 |
+
},
|
| 22 |
+
"200019": {
|
| 23 |
+
"content": "<|assistant|>",
|
| 24 |
+
"lstrip": false,
|
| 25 |
+
"normalized": false,
|
| 26 |
+
"rstrip": true,
|
| 27 |
+
"single_word": false,
|
| 28 |
+
"special": true
|
| 29 |
+
},
|
| 30 |
+
"200020": {
|
| 31 |
+
"content": "<|end|>",
|
| 32 |
+
"lstrip": false,
|
| 33 |
+
"normalized": false,
|
| 34 |
+
"rstrip": true,
|
| 35 |
+
"single_word": false,
|
| 36 |
+
"special": true
|
| 37 |
+
},
|
| 38 |
+
"200021": {
|
| 39 |
+
"content": "<|user|>",
|
| 40 |
+
"lstrip": false,
|
| 41 |
+
"normalized": false,
|
| 42 |
+
"rstrip": true,
|
| 43 |
+
"single_word": false,
|
| 44 |
+
"special": true
|
| 45 |
+
},
|
| 46 |
+
"200022": {
|
| 47 |
+
"content": "<|system|>",
|
| 48 |
+
"lstrip": false,
|
| 49 |
+
"normalized": false,
|
| 50 |
+
"rstrip": true,
|
| 51 |
+
"single_word": false,
|
| 52 |
+
"special": true
|
| 53 |
+
},
|
| 54 |
+
"200023": {
|
| 55 |
+
"content": "<|tool|>",
|
| 56 |
+
"lstrip": false,
|
| 57 |
+
"normalized": false,
|
| 58 |
+
"rstrip": true,
|
| 59 |
+
"single_word": false,
|
| 60 |
+
"special": false
|
| 61 |
+
},
|
| 62 |
+
"200024": {
|
| 63 |
+
"content": "<|/tool|>",
|
| 64 |
+
"lstrip": false,
|
| 65 |
+
"normalized": false,
|
| 66 |
+
"rstrip": true,
|
| 67 |
+
"single_word": false,
|
| 68 |
+
"special": false
|
| 69 |
+
},
|
| 70 |
+
"200025": {
|
| 71 |
+
"content": "<|tool_call|>",
|
| 72 |
+
"lstrip": false,
|
| 73 |
+
"normalized": false,
|
| 74 |
+
"rstrip": true,
|
| 75 |
+
"single_word": false,
|
| 76 |
+
"special": false
|
| 77 |
+
},
|
| 78 |
+
"200026": {
|
| 79 |
+
"content": "<|/tool_call|>",
|
| 80 |
+
"lstrip": false,
|
| 81 |
+
"normalized": false,
|
| 82 |
+
"rstrip": true,
|
| 83 |
+
"single_word": false,
|
| 84 |
+
"special": false
|
| 85 |
+
},
|
| 86 |
+
"200027": {
|
| 87 |
+
"content": "<|tool_response|>",
|
| 88 |
+
"lstrip": false,
|
| 89 |
+
"normalized": false,
|
| 90 |
+
"rstrip": true,
|
| 91 |
+
"single_word": false,
|
| 92 |
+
"special": false
|
| 93 |
+
},
|
| 94 |
+
"200028": {
|
| 95 |
+
"content": "<|tag|>",
|
| 96 |
+
"lstrip": false,
|
| 97 |
+
"normalized": false,
|
| 98 |
+
"rstrip": true,
|
| 99 |
+
"single_word": false,
|
| 100 |
+
"special": true
|
| 101 |
+
}
|
| 102 |
+
},
|
| 103 |
+
"bos_token": "<|endoftext|>",
|
| 104 |
+
"chat_template": "{% for message in messages %}{% if message['role'] == 'system' and 'tools' in message and message['tools'] is not none %}{{ '<|' + message['role'] + '|>' + message['content'] + '<|tool|>' + message['tools'] + '<|/tool|>' + '<|end|>' }}{% else %}{{ '<|' + message['role'] + '|>' + message['content'] + '<|end|>' }}{% endif %}{% endfor %}{% if add_generation_prompt %}{{ '<|assistant|>' }}{% else %}{{ eos_token }}{% endif %}",
|
| 105 |
+
"clean_up_tokenization_spaces": false,
|
| 106 |
+
"eos_token": "<|endoftext|>",
|
| 107 |
+
"model_max_length": 131072,
|
| 108 |
+
"pad_token": "<|endoftext|>",
|
| 109 |
+
"tokenizer_class": "GPT2Tokenizer",
|
| 110 |
+
"unk_token": "<|endoftext|>"
|
| 111 |
+
}
|