Add files using upload-large-folder tool
Browse files- .gitattributes +1 -0
- README.md +226 -0
- added_tokens.json +12 -0
- config.json +167 -0
- generation_config.json +10 -0
- merges.txt +0 -0
- special_tokens_map.json +30 -0
- tokenizer.json +3 -0
- tokenizer_config.json +111 -0
- vocab.json +0 -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 |
+
tokenizer.json filter=lfs diff=lfs merge=lfs -text
|
README.md
ADDED
|
@@ -0,0 +1,226 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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vfp4
|
| 12 |
+
- checkpoint
|
| 13 |
+
---
|
| 14 |
+
|
| 15 |
+
# Phi-4-mini-instruct TensorRT-LLM Checkpoint (NVFP4)
|
| 16 |
+
|
| 17 |
+
This repository contains a community-converted TensorRT-LLM checkpoint for [`microsoft/Phi-4-mini-instruct`](https://huggingface.co/microsoft/Phi-4-mini-instruct).
|
| 18 |
+
|
| 19 |
+
It is a TensorRT-LLM **checkpoint-format** repository, not a prebuilt engine. The intent is to let you download the checkpoint from Hugging Face and build an engine locally for your own GPU and TensorRT-LLM version.
|
| 20 |
+
|
| 21 |
+
## Who This Repo Is For
|
| 22 |
+
|
| 23 |
+
This repository is for users who already work with TensorRT-LLM and want a ready-made **TensorRT-LLM checkpoint** that they can turn into a local engine for their own GPU.
|
| 24 |
+
|
| 25 |
+
It is **not**:
|
| 26 |
+
- a prebuilt TensorRT engine
|
| 27 |
+
- a plain Transformers checkpoint
|
| 28 |
+
- an Ollama model
|
| 29 |
+
- a one-click chat model that can be run directly after download
|
| 30 |
+
|
| 31 |
+
## How to Use
|
| 32 |
+
|
| 33 |
+
1. Download this repository from Hugging Face.
|
| 34 |
+
2. Build a local engine with `trtllm-build` for your own GPU and TensorRT-LLM version.
|
| 35 |
+
3. Run inference with the engine you built.
|
| 36 |
+
|
| 37 |
+
The `Build Example` section below shows the validated local command used for the benchmark snapshot in this README.
|
| 38 |
+
|
| 39 |
+
## Model Characteristics
|
| 40 |
+
|
| 41 |
+
- Base model: `microsoft/Phi-4-mini-instruct`
|
| 42 |
+
- License: `mit`
|
| 43 |
+
- Architecture: `Phi3ForCausalLM`
|
| 44 |
+
- Upstream maximum context length (`max_position_embeddings`): `131072`
|
| 45 |
+
- Hidden size: `3072`
|
| 46 |
+
- Intermediate size: `8192`
|
| 47 |
+
- Layers: `32`
|
| 48 |
+
- Attention heads: `24`
|
| 49 |
+
- KV heads: `8`
|
| 50 |
+
- Vocabulary size: `200064`
|
| 51 |
+
|
| 52 |
+
These values come from the upstream model/checkpoint configuration. They describe the model family itself, not a specific locally built TensorRT engine.
|
| 53 |
+
|
| 54 |
+
## Checkpoint Details
|
| 55 |
+
|
| 56 |
+
- TensorRT-LLM version used for conversion: `1.2.0rc6`
|
| 57 |
+
- Checkpoint dtype: `bfloat16`
|
| 58 |
+
- Quantization: `NVFP4`
|
| 59 |
+
- KV cache quantization: `FP8`
|
| 60 |
+
- Tensor parallel size: `1`
|
| 61 |
+
- Checkpoint files:
|
| 62 |
+
- `config.json`
|
| 63 |
+
- `rank0.safetensors`
|
| 64 |
+
- tokenizer and generation files copied from the upstream Hugging Face model
|
| 65 |
+
|
| 66 |
+
## Files
|
| 67 |
+
|
| 68 |
+
- `config.json`: TensorRT-LLM checkpoint config
|
| 69 |
+
- `rank0.safetensors`: TensorRT-LLM checkpoint weights
|
| 70 |
+
- `generation_config.json`: upstream generation config
|
| 71 |
+
- `tokenizer.json`: upstream tokenizer
|
| 72 |
+
- `tokenizer_config.json`: upstream tokenizer config
|
| 73 |
+
- `merges.txt`: upstream merges file
|
| 74 |
+
- `vocab.json`: upstream vocabulary
|
| 75 |
+
- `added_tokens.json`: upstream added tokens
|
| 76 |
+
- `special_tokens_map.json`: upstream special tokens map
|
| 77 |
+
|
| 78 |
+
## Build Example
|
| 79 |
+
|
| 80 |
+
The following command is the **validated local engine build** used for the benchmarks in this README. These values are build-time/runtime settings for one local engine, not limits of the checkpoint itself.
|
| 81 |
+
|
| 82 |
+
Build an engine locally with TensorRT-LLM:
|
| 83 |
+
|
| 84 |
+
```bash
|
| 85 |
+
huggingface-cli download Shoolife/Phi-4-mini-instruct-TensorRT-LLM-Checkpoint-NVFP4 --local-dir ./checkpoint
|
| 86 |
+
|
| 87 |
+
trtllm-build \
|
| 88 |
+
--checkpoint_dir ./checkpoint \
|
| 89 |
+
--output_dir ./engine \
|
| 90 |
+
--gemm_plugin auto \
|
| 91 |
+
--gpt_attention_plugin auto \
|
| 92 |
+
--max_batch_size 1 \
|
| 93 |
+
--max_input_len 256 \
|
| 94 |
+
--max_seq_len 512 \
|
| 95 |
+
--max_num_tokens 128 \
|
| 96 |
+
--workers 1 \
|
| 97 |
+
--monitor_memory
|
| 98 |
+
```
|
| 99 |
+
|
| 100 |
+
If you rebuild the engine with different limits, memory usage and supported request shapes will change accordingly.
|
| 101 |
+
|
| 102 |
+
## Conversion
|
| 103 |
+
|
| 104 |
+
This checkpoint was produced from the upstream model with TensorRT-LLM NVFP4 quantization tooling:
|
| 105 |
+
|
| 106 |
+
```bash
|
| 107 |
+
python /app/tensorrt_llm/examples/quantization/quantize.py \
|
| 108 |
+
--model_dir ./Phi-4-mini-instruct \
|
| 109 |
+
--output_dir ./checkpoint_nvfp4 \
|
| 110 |
+
--dtype bfloat16 \
|
| 111 |
+
--qformat nvfp4 \
|
| 112 |
+
--kv_cache_dtype fp8 \
|
| 113 |
+
--calib_dataset cnn_dailymail \
|
| 114 |
+
--calib_size 64 \
|
| 115 |
+
--batch_size 1 \
|
| 116 |
+
--calib_max_seq_length 256 \
|
| 117 |
+
--tokenizer_max_seq_length 2048 \
|
| 118 |
+
--device cpu \
|
| 119 |
+
--device_map cpu
|
| 120 |
+
```
|
| 121 |
+
|
| 122 |
+
Then build the engine:
|
| 123 |
+
|
| 124 |
+
```bash
|
| 125 |
+
trtllm-build \
|
| 126 |
+
--checkpoint_dir ./checkpoint_nvfp4 \
|
| 127 |
+
--output_dir ./engine_nvfp4 \
|
| 128 |
+
--gemm_plugin auto \
|
| 129 |
+
--gpt_attention_plugin auto \
|
| 130 |
+
--max_batch_size 1 \
|
| 131 |
+
--max_input_len 256 \
|
| 132 |
+
--max_seq_len 512 \
|
| 133 |
+
--max_num_tokens 128 \
|
| 134 |
+
--workers 1 \
|
| 135 |
+
--monitor_memory
|
| 136 |
+
```
|
| 137 |
+
|
| 138 |
+
## Validation
|
| 139 |
+
|
| 140 |
+
The checkpoint was validated by building a local engine and running inference on:
|
| 141 |
+
|
| 142 |
+
- GPU: `NVIDIA GeForce RTX 5070 Laptop GPU`
|
| 143 |
+
- Runtime: `TensorRT-LLM 1.2.0rc6`
|
| 144 |
+
|
| 145 |
+
Smoke-test prompt:
|
| 146 |
+
|
| 147 |
+
```text
|
| 148 |
+
Explain the four basic arithmetic operations in one short sentence each.
|
| 149 |
+
```
|
| 150 |
+
|
| 151 |
+
Observed response excerpt (`max_tokens=32`):
|
| 152 |
+
|
| 153 |
+
```text
|
| 154 |
+
Addition combines numbers to find a total. Subtraction removes a quantity from another. Multiplication calculates the product of numbers. Division divides a number by another to find
|
| 155 |
+
```
|
| 156 |
+
|
| 157 |
+
## Validated Local Engine Characteristics
|
| 158 |
+
|
| 159 |
+
Local build and runtime characteristics from the validated engine used for the benchmark snapshot below:
|
| 160 |
+
|
| 161 |
+
| Property | Value |
|
| 162 |
+
|---|---|
|
| 163 |
+
| Checkpoint size | `4.0 GB` |
|
| 164 |
+
| Built engine size | `3.0 GB` |
|
| 165 |
+
| Tested GPU | `NVIDIA GeForce RTX 5070 Laptop GPU` |
|
| 166 |
+
| GPU memory reported by benchmark host | `7.53 GiB` |
|
| 167 |
+
| Engine build `max_batch_size` | `1` |
|
| 168 |
+
| Engine build `max_input_len` | `256` |
|
| 169 |
+
| Engine build `max_seq_len` | `512` |
|
| 170 |
+
| Engine build `max_num_tokens` | `128` |
|
| 171 |
+
| Runtime effective max input length | `128` |
|
| 172 |
+
| Engine load footprint | `~3.0 GiB` |
|
| 173 |
+
| Paged KV cache allocation | `~3.58 GiB` |
|
| 174 |
+
| Practical total GPU footprint on this setup | `~6.6 GiB` |
|
| 175 |
+
|
| 176 |
+
Important: the `256` / `512` / `128` limits above belong only to this particular local engine build. They are not the intrinsic maximum context or generation limits of `Phi-4-mini-instruct` itself.
|
| 177 |
+
|
| 178 |
+
The runtime effective input length became `128` on this build because TensorRT-LLM enabled packed input and context FMHA and clamped the usable prompt budget to the engine token budget.
|
| 179 |
+
|
| 180 |
+
These values are specific to the local engine build used for validation and will change if you rebuild with different TensorRT-LLM settings and memory budgets.
|
| 181 |
+
|
| 182 |
+
## Benchmark Snapshot
|
| 183 |
+
|
| 184 |
+
Local single-GPU measurements from the validated local engine on `RTX 5070 Laptop GPU`, using TensorRT-LLM synthetic fixed-length requests, `20` requests per profile, `2` warmup requests, and `concurrency=1`.
|
| 185 |
+
|
| 186 |
+
| Profile | Input | Output | TTFT | TPOT | Output tok/s | Avg latency |
|
| 187 |
+
|---|---:|---:|---:|---:|---:|---:|
|
| 188 |
+
| `tiny_16_32` | 16 | 32 | `12.53 ms` | `10.17 ms` | `97.59` | `327.88 ms` |
|
| 189 |
+
| `short_chat_42_64` | 42 | 64 | `15.57 ms` | `12.72 ms` | `78.33` | `817.03 ms` |
|
| 190 |
+
| `balanced_64_64` | 64 | 64 | `15.66 ms` | `12.74 ms` | `78.24` | `818.01 ms` |
|
| 191 |
+
| `long_prompt_96_32` | 96 | 32 | `15.58 ms` | `12.48 ms` | `79.50` | `402.50 ms` |
|
| 192 |
+
| `long_generation_32_96` | 32 | 96 | `14.90 ms` | `12.13 ms` | `82.27` | `1166.89 ms` |
|
| 193 |
+
|
| 194 |
+
These numbers are local measurements from one machine and should be treated as reference values, not portability guarantees.
|
| 195 |
+
|
| 196 |
+
## Quick Parity Check
|
| 197 |
+
|
| 198 |
+
A small public sanity-check was run against the upstream Hugging Face baseline on `20` validation examples from `ARC-Challenge` and `20` validation examples from `OpenBookQA`.
|
| 199 |
+
|
| 200 |
+
| Benchmark | HF baseline | TRT NVFP4 | Agreement |
|
| 201 |
+
|---|---:|---:|---:|
|
| 202 |
+
| `ARC-Challenge` | `0.90` | `0.80` | `0.85` |
|
| 203 |
+
| `OpenBookQA` | `0.80` | `0.75` | `0.85` |
|
| 204 |
+
| `Overall` | `0.85` | `0.775` | `0.85` |
|
| 205 |
+
|
| 206 |
+
This is only a quick local parity check, not a full benchmark suite. It is intended to show the practical tradeoff of this conversion on a small public subset.
|
| 207 |
+
|
| 208 |
+
## FP8 vs NVFP4
|
| 209 |
+
|
| 210 |
+
The table below compares two locally validated TensorRT-LLM variants built for the same GPU family and the same local engine limits (`max_batch_size=1`, `max_seq_len=512`, `max_num_tokens=128`).
|
| 211 |
+
|
| 212 |
+
| Variant | Checkpoint | Engine | `short_chat_42_64` | `balanced_64_64` | `long_generation_32_96` | Quick-check overall | Quick-check change vs FP8 | Practical reading |
|
| 213 |
+
|---|---:|---:|---:|---:|---:|---:|---|---|
|
| 214 |
+
| `FP8` | `5.3 GB` | `5.4 GB` | `54.88 tok/s` | `56.68 tok/s` | `55.68 tok/s` | `0.85` | `baseline` | Best balance in these local tests |
|
| 215 |
+
| `NVFP4` | `4.0 GB` | `3.0 GB` | `78.33 tok/s` | `78.24 tok/s` | `82.27 tok/s` | `0.775` | `-7.5 pts on this quick-check` | Faster and smaller, but with a visible quality drop |
|
| 216 |
+
|
| 217 |
+
This comparison is intentionally local and narrow. It should not be treated as a universal benchmark across all prompts, datasets, GPUs, or TensorRT-LLM versions.
|
| 218 |
+
|
| 219 |
+
On that same `40`-question subset, the upstream Hugging Face baseline scored `0.85`, while the local TensorRT-LLM FP8 engine also scored `0.85`.
|
| 220 |
+
|
| 221 |
+
## Notes
|
| 222 |
+
|
| 223 |
+
- This is not an official Microsoft or NVIDIA release.
|
| 224 |
+
- This repository does not include a prebuilt TensorRT engine.
|
| 225 |
+
- Engine compatibility and performance depend on your GPU, driver, CUDA, TensorRT, and TensorRT-LLM versions.
|
| 226 |
+
- `NVFP4` is attractive for speed and engine size on Blackwell GPUs, but this local quick-check showed a meaningful quality drop relative to `FP8`.
|
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 |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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"producer": {
|
| 3 |
+
"name": "modelopt",
|
| 4 |
+
"version": "0.37.0"
|
| 5 |
+
},
|
| 6 |
+
"architecture": "Phi3ForCausalLM",
|
| 7 |
+
"dtype": "bfloat16",
|
| 8 |
+
"logits_dtype": "float16",
|
| 9 |
+
"num_hidden_layers": 32,
|
| 10 |
+
"num_attention_heads": 24,
|
| 11 |
+
"num_key_value_heads": 8,
|
| 12 |
+
"hidden_size": 3072,
|
| 13 |
+
"norm_epsilon": 1e-05,
|
| 14 |
+
"vocab_size": 200064,
|
| 15 |
+
"max_position_embeddings": 131072,
|
| 16 |
+
"hidden_act": "swiglu",
|
| 17 |
+
"use_parallel_embedding": true,
|
| 18 |
+
"embedding_sharding_dim": 0,
|
| 19 |
+
"head_size": 128,
|
| 20 |
+
"intermediate_size": 8192,
|
| 21 |
+
"position_embedding_type": "long_rope",
|
| 22 |
+
"share_embedding_table": false,
|
| 23 |
+
"residual_mlp": false,
|
| 24 |
+
"bias": false,
|
| 25 |
+
"rotary_pct": 0.75,
|
| 26 |
+
"rank": 0,
|
| 27 |
+
"decoder": "phi3",
|
| 28 |
+
"rmsnorm": true,
|
| 29 |
+
"lm_head_bias": false,
|
| 30 |
+
"rotary_base": 10000.0,
|
| 31 |
+
"rotary_scaling": null,
|
| 32 |
+
"runtime_defaults": null,
|
| 33 |
+
"mapping": {
|
| 34 |
+
"world_size": 1,
|
| 35 |
+
"gpus_per_node": 8,
|
| 36 |
+
"cp_size": 1,
|
| 37 |
+
"tp_size": 1,
|
| 38 |
+
"pp_size": 1,
|
| 39 |
+
"moe_tp_size": 1,
|
| 40 |
+
"moe_cluster_size": 1,
|
| 41 |
+
"moe_ep_size": 1,
|
| 42 |
+
"attn_tp_size": 1,
|
| 43 |
+
"attn_cp_size": 1,
|
| 44 |
+
"cp_config": {},
|
| 45 |
+
"enable_attention_dp": false,
|
| 46 |
+
"enable_lm_head_tp_in_adp": false
|
| 47 |
+
},
|
| 48 |
+
"quantization": {
|
| 49 |
+
"quant_algo": "NVFP4",
|
| 50 |
+
"kv_cache_quant_algo": "FP8",
|
| 51 |
+
"group_size": 16,
|
| 52 |
+
"smoothquant_val": 0.5,
|
| 53 |
+
"clamp_val": null,
|
| 54 |
+
"use_meta_recipe": false,
|
| 55 |
+
"has_zero_point": false,
|
| 56 |
+
"pre_quant_scale": false,
|
| 57 |
+
"exclude_modules": [
|
| 58 |
+
"lm_head"
|
| 59 |
+
],
|
| 60 |
+
"mamba_ssm_cache_dtype": null
|
| 61 |
+
},
|
| 62 |
+
"qk_layernorm": false,
|
| 63 |
+
"rotary_embedding_dim": 96,
|
| 64 |
+
"tie_word_embeddings": true,
|
| 65 |
+
"original_max_position_embeddings": 4096,
|
| 66 |
+
"longrope_scaling_short_factors": [
|
| 67 |
+
1.0,
|
| 68 |
+
1.0,
|
| 69 |
+
1.0,
|
| 70 |
+
1.0,
|
| 71 |
+
1.0,
|
| 72 |
+
1.0,
|
| 73 |
+
1.0,
|
| 74 |
+
1.0,
|
| 75 |
+
1.0,
|
| 76 |
+
1.0,
|
| 77 |
+
1.0,
|
| 78 |
+
1.0,
|
| 79 |
+
1.0,
|
| 80 |
+
1.0,
|
| 81 |
+
1.0,
|
| 82 |
+
1.0,
|
| 83 |
+
1.0,
|
| 84 |
+
1.0,
|
| 85 |
+
1.0,
|
| 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 |
+
],
|
| 116 |
+
"longrope_scaling_long_factors": [
|
| 117 |
+
1,
|
| 118 |
+
1.118320672,
|
| 119 |
+
1.250641126,
|
| 120 |
+
1.398617824,
|
| 121 |
+
1.564103225,
|
| 122 |
+
1.74916897,
|
| 123 |
+
1.956131817,
|
| 124 |
+
2.187582649,
|
| 125 |
+
2.446418898,
|
| 126 |
+
2.735880826,
|
| 127 |
+
3.059592084,
|
| 128 |
+
3.421605075,
|
| 129 |
+
3.826451687,
|
| 130 |
+
4.279200023,
|
| 131 |
+
4.785517845,
|
| 132 |
+
5.351743533,
|
| 133 |
+
5.984965424,
|
| 134 |
+
6.693110555,
|
| 135 |
+
7.485043894,
|
| 136 |
+
8.370679318,
|
| 137 |
+
9.36110372,
|
| 138 |
+
10.4687158,
|
| 139 |
+
11.70738129,
|
| 140 |
+
13.09260651,
|
| 141 |
+
14.64173252,
|
| 142 |
+
16.37415215,
|
| 143 |
+
18.31155283,
|
| 144 |
+
20.47818807,
|
| 145 |
+
22.90118105,
|
| 146 |
+
25.61086418,
|
| 147 |
+
28.64115884,
|
| 148 |
+
32.03,
|
| 149 |
+
32.1,
|
| 150 |
+
32.13,
|
| 151 |
+
32.23,
|
| 152 |
+
32.6,
|
| 153 |
+
32.61,
|
| 154 |
+
32.64,
|
| 155 |
+
32.66,
|
| 156 |
+
32.7,
|
| 157 |
+
32.71,
|
| 158 |
+
32.93,
|
| 159 |
+
32.97,
|
| 160 |
+
33.28,
|
| 161 |
+
33.49,
|
| 162 |
+
33.5,
|
| 163 |
+
44.16,
|
| 164 |
+
47.77
|
| 165 |
+
],
|
| 166 |
+
"model_type": "phi3"
|
| 167 |
+
}
|
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 |
+
}
|
merges.txt
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
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 |
+
}
|
tokenizer.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:382cc235b56c725945e149cc25f191da667c836655efd0857b004320e90e91ea
|
| 3 |
+
size 15524095
|
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 |
+
}
|
vocab.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|