Release Fast Code Pruner
Browse filesPublish the retained 82.48% F1 model, tokenizer, native vLLM package, model card, and benchmark results.
- .gitattributes +1 -0
- README.md +114 -0
- added_tokens.json +24 -0
- benchmark_results.json +80 -0
- chat_template.jinja +54 -0
- config.json +53 -0
- export_manifest.json +16 -0
- merges.txt +0 -0
- model.safetensors +3 -0
- package/fast_code_pruner-0.1.0-py3-none-any.whl +0 -0
- special_tokens_map.json +31 -0
- tokenizer.json +3 -0
- tokenizer_config.json +207 -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,114 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: mit
|
| 3 |
+
library_name: vllm
|
| 4 |
+
base_model: Qwen/Qwen2.5-Coder-0.5B
|
| 5 |
+
pipeline_tag: token-classification
|
| 6 |
+
tags:
|
| 7 |
+
- code
|
| 8 |
+
- code-pruning
|
| 9 |
+
- context-pruning
|
| 10 |
+
- vllm
|
| 11 |
+
- qwen2
|
| 12 |
+
datasets:
|
| 13 |
+
- nick007x/github-code-2025
|
| 14 |
+
metrics:
|
| 15 |
+
- f1
|
| 16 |
+
---
|
| 17 |
+
|
| 18 |
+
# Fast Code Pruner
|
| 19 |
+
|
| 20 |
+
Task-aware context pruning for coding agents with a 17-layer
|
| 21 |
+
Qwen2.5-Coder-0.5B backbone and a native vLLM serving path.
|
| 22 |
+
|
| 23 |
+
[GitHub repository](https://github.com/rotem154154/fast-code-pruner) ·
|
| 24 |
+
[Original SWE-Pruner](https://github.com/Ayanami1314/swe-pruner)
|
| 25 |
+
|
| 26 |
+
## Validation quality
|
| 27 |
+
|
| 28 |
+
Evaluation uses the fixed 6,119-example seed-43 validation split.
|
| 29 |
+
|
| 30 |
+
| Model | Accuracy ↑ | Precision ↑ | Recall ↑ | F1 ↑ |
|
| 31 |
+
|---|---:|---:|---:|---:|
|
| 32 |
+
| **fast-code-pruner** | **85.94%** | **81.49%** | **83.49%** | **82.48%** |
|
| 33 |
+
| code-pruner | 84.07% | 80.02% | 80.91% | 80.46% |
|
| 34 |
+
|
| 35 |
+
## Architecture
|
| 36 |
+
|
| 37 |
+
```text
|
| 38 |
+
Original Code-Pruner Fast Code Pruner
|
| 39 |
+
|
| 40 |
+
Qwen3 layers 1–28 Qwen2.5-Coder layers 1–17
|
| 41 |
+
frozen backbone frozen weights + rank-8 LoRA
|
| 42 |
+
│ │
|
| 43 |
+
hidden layers 7 + 14 + 28 normalized hidden layer 17
|
| 44 |
+
3 × 1024 → concatenate 3072 896 → gated PolyNorm → 2432
|
| 45 |
+
│ │
|
| 46 |
+
1× bidirectional full attention 1× bidirectional full attention
|
| 47 |
+
8 heads, width 3072 16 heads, width 2432
|
| 48 |
+
│ │
|
| 49 |
+
CRF emissions: 3072 → 256 → 2 CRF emissions: 2432 → 128 → 2
|
| 50 |
+
```
|
| 51 |
+
|
| 52 |
+
Fast Code Pruner uses only the normalized final-layer representation and
|
| 53 |
+
physically skips the three removed attention branches. Rank-8 LoRA updates are
|
| 54 |
+
merged into dense weights during export. Prefix caching is disabled because
|
| 55 |
+
the bidirectional fusion head requires the complete input.
|
| 56 |
+
|
| 57 |
+
## Serving
|
| 58 |
+
|
| 59 |
+
Install the native vLLM package directly from this model repository:
|
| 60 |
+
|
| 61 |
+
```bash
|
| 62 |
+
pip install \
|
| 63 |
+
"fast-code-pruner[vllm] @ https://huggingface.co/irotem98/fast-code-pruner/resolve/main/package/fast_code_pruner-0.1.0-py3-none-any.whl"
|
| 64 |
+
fast-code-pruner serve
|
| 65 |
+
```
|
| 66 |
+
|
| 67 |
+
Inputs longer than 8,192 tokens are split with overlap and merged
|
| 68 |
+
automatically.
|
| 69 |
+
|
| 70 |
+
### Serving performance
|
| 71 |
+
|
| 72 |
+
| Model | Backend | Concurrency 1 ↑ | Concurrency 16 ↑ |
|
| 73 |
+
|---|---|---:|---:|
|
| 74 |
+
| **fast-code-pruner** | vLLM 0.13.0 | **79.0 req/s** | **143.4 req/s** |
|
| 75 |
+
| fast-code-pruner | Hugging Face | 16.01 req/s | 16.03 req/s |
|
| 76 |
+
| code-pruner | Hugging Face | 9.83 req/s | 10.03 req/s |
|
| 77 |
+
|
| 78 |
+
The vLLM results are medians of three 1,000-request end-to-end HTTP runs over
|
| 79 |
+
the same 100 validation examples on one NVIDIA RTX PRO 6000 Blackwell Server
|
| 80 |
+
Edition. Prefix caching was disabled. Median model-input throughput was 56.1k
|
| 81 |
+
tokens/s at concurrency 1 and 101.8k tokens/s at concurrency 16.
|
| 82 |
+
`fast-code-pruner` Hugging Face results are medians of three 100-request runs
|
| 83 |
+
with an 8,192-token model length, matching the serialized legacy endpoint. The
|
| 84 |
+
original `code-pruner` row uses its Hugging Face backend benchmark.
|
| 85 |
+
|
| 86 |
+
## Training
|
| 87 |
+
|
| 88 |
+
The public repository includes a lightweight, hard-label launcher matching the
|
| 89 |
+
released architecture:
|
| 90 |
+
|
| 91 |
+
```bash
|
| 92 |
+
bash train/train_fast_code_pruner.sh
|
| 93 |
+
```
|
| 94 |
+
|
| 95 |
+
It contains no teacher-target generation or knowledge-distillation stage.
|
| 96 |
+
|
| 97 |
+
## Attribution
|
| 98 |
+
|
| 99 |
+
This model builds on
|
| 100 |
+
[SWE-Pruner](https://github.com/Ayanami1314/swe-pruner) and
|
| 101 |
+
[Qwen2.5-Coder-0.5B](https://huggingface.co/Qwen/Qwen2.5-Coder-0.5B).
|
| 102 |
+
|
| 103 |
+
```bibtex
|
| 104 |
+
@misc{wang2026sweprunerselfadaptivecontextpruning,
|
| 105 |
+
title={SWE-Pruner: Self-Adaptive Context Pruning for Coding Agents},
|
| 106 |
+
author={Yuhang Wang and Yuling Shi and Mo Yang and Rongrui Zhang and
|
| 107 |
+
Shilin He and Heng Lian and Yuting Chen and Siyu Ye and Kai Cai and
|
| 108 |
+
Xiaodong Gu},
|
| 109 |
+
year={2026},
|
| 110 |
+
eprint={2601.16746},
|
| 111 |
+
archivePrefix={arXiv},
|
| 112 |
+
primaryClass={cs.SE}
|
| 113 |
+
}
|
| 114 |
+
```
|
added_tokens.json
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"</tool_call>": 151658,
|
| 3 |
+
"<tool_call>": 151657,
|
| 4 |
+
"<|box_end|>": 151649,
|
| 5 |
+
"<|box_start|>": 151648,
|
| 6 |
+
"<|endoftext|>": 151643,
|
| 7 |
+
"<|file_sep|>": 151664,
|
| 8 |
+
"<|fim_middle|>": 151660,
|
| 9 |
+
"<|fim_pad|>": 151662,
|
| 10 |
+
"<|fim_prefix|>": 151659,
|
| 11 |
+
"<|fim_suffix|>": 151661,
|
| 12 |
+
"<|im_end|>": 151645,
|
| 13 |
+
"<|im_start|>": 151644,
|
| 14 |
+
"<|image_pad|>": 151655,
|
| 15 |
+
"<|object_ref_end|>": 151647,
|
| 16 |
+
"<|object_ref_start|>": 151646,
|
| 17 |
+
"<|quad_end|>": 151651,
|
| 18 |
+
"<|quad_start|>": 151650,
|
| 19 |
+
"<|repo_name|>": 151663,
|
| 20 |
+
"<|video_pad|>": 151656,
|
| 21 |
+
"<|vision_end|>": 151653,
|
| 22 |
+
"<|vision_pad|>": 151654,
|
| 23 |
+
"<|vision_start|>": 151652
|
| 24 |
+
}
|
benchmark_results.json
ADDED
|
@@ -0,0 +1,80 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"hardware": "NVIDIA RTX PRO 6000 Blackwell Server Edition",
|
| 3 |
+
"validation_samples": 6119,
|
| 4 |
+
"validation_seed": 43,
|
| 5 |
+
"validation": {
|
| 6 |
+
"fast-code-pruner": {
|
| 7 |
+
"loss": 0.2731010076982715,
|
| 8 |
+
"compression_loss": 0.2731010076982715,
|
| 9 |
+
"accuracy": 0.859388530254364,
|
| 10 |
+
"precision": 0.8149362802505493,
|
| 11 |
+
"recall": 0.8348633646965027,
|
| 12 |
+
"f1": 0.8247794508934021
|
| 13 |
+
}
|
| 14 |
+
},
|
| 15 |
+
"serving": {
|
| 16 |
+
"date_utc": "2026-07-28",
|
| 17 |
+
"backend": "vLLM 0.13.0",
|
| 18 |
+
"checkpoint": "001-kd-search-weight-0.4-ac3262",
|
| 19 |
+
"requests_per_repeat": 1000,
|
| 20 |
+
"unique_validation_examples": 100,
|
| 21 |
+
"repeats": 3,
|
| 22 |
+
"prefix_caching": false,
|
| 23 |
+
"hugging_face": {
|
| 24 |
+
"requests_per_repeat": 100,
|
| 25 |
+
"warmup_requests": 10,
|
| 26 |
+
"repeats": 3,
|
| 27 |
+
"max_model_length": 8192,
|
| 28 |
+
"serialized_requests": true,
|
| 29 |
+
"concurrency_1": {
|
| 30 |
+
"requests_per_second_runs": [
|
| 31 |
+
15.635215615008196,
|
| 32 |
+
16.014152944551167,
|
| 33 |
+
16.04293924256032
|
| 34 |
+
],
|
| 35 |
+
"requests_per_second_median": 16.014152944551167
|
| 36 |
+
},
|
| 37 |
+
"concurrency_16": {
|
| 38 |
+
"requests_per_second_runs": [
|
| 39 |
+
15.961968793509204,
|
| 40 |
+
16.049117711074377,
|
| 41 |
+
16.03105236128065
|
| 42 |
+
],
|
| 43 |
+
"requests_per_second_median": 16.03105236128065
|
| 44 |
+
}
|
| 45 |
+
},
|
| 46 |
+
"concurrency_1": {
|
| 47 |
+
"requests_per_second_runs": [
|
| 48 |
+
77.85959605324707,
|
| 49 |
+
79.01445520339735,
|
| 50 |
+
79.55801844550992
|
| 51 |
+
],
|
| 52 |
+
"requests_per_second_median": 79.01445520339735,
|
| 53 |
+
"model_input_tokens_per_second_median": 56078.92929150719,
|
| 54 |
+
"latency_p50_ms_median": 11.922281002625823,
|
| 55 |
+
"latency_p95_ms_median": 16.762261977419257
|
| 56 |
+
},
|
| 57 |
+
"concurrency_16": {
|
| 58 |
+
"requests_per_second_runs": [
|
| 59 |
+
139.21897948711825,
|
| 60 |
+
143.42106837168544,
|
| 61 |
+
143.6922866973871
|
| 62 |
+
],
|
| 63 |
+
"requests_per_second_median": 143.42106837168544,
|
| 64 |
+
"model_input_tokens_per_second_median": 101790.2348554363,
|
| 65 |
+
"latency_p50_ms_median": 108.39256300823763,
|
| 66 |
+
"latency_p95_ms_median": 160.10672401171178
|
| 67 |
+
},
|
| 68 |
+
"concurrency_64": {
|
| 69 |
+
"requests_per_second_runs": [
|
| 70 |
+
172.7439921722694,
|
| 71 |
+
174.6905065239383,
|
| 72 |
+
172.40774004660466
|
| 73 |
+
],
|
| 74 |
+
"requests_per_second_median": 172.7439921722694,
|
| 75 |
+
"model_input_tokens_per_second_median": 122601.59356442477,
|
| 76 |
+
"latency_p50_ms_median": 369.8863319878001,
|
| 77 |
+
"latency_p95_ms_median": 497.7567640016787
|
| 78 |
+
}
|
| 79 |
+
}
|
| 80 |
+
}
|
chat_template.jinja
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{%- if tools %}
|
| 2 |
+
{{- '<|im_start|>system\n' }}
|
| 3 |
+
{%- if messages[0]['role'] == 'system' %}
|
| 4 |
+
{{- messages[0]['content'] }}
|
| 5 |
+
{%- else %}
|
| 6 |
+
{{- 'You are a helpful assistant.' }}
|
| 7 |
+
{%- endif %}
|
| 8 |
+
{{- "\n\n# Tools\n\nYou may call one or more functions to assist with the user query.\n\nYou are provided with function signatures within <tools></tools> XML tags:\n<tools>" }}
|
| 9 |
+
{%- for tool in tools %}
|
| 10 |
+
{{- "\n" }}
|
| 11 |
+
{{- tool | tojson }}
|
| 12 |
+
{%- endfor %}
|
| 13 |
+
{{- "\n</tools>\n\nFor each function call, return a json object with function name and arguments within <tool_call></tool_call> XML tags:\n<tool_call>\n{\"name\": <function-name>, \"arguments\": <args-json-object>}\n</tool_call><|im_end|>\n" }}
|
| 14 |
+
{%- else %}
|
| 15 |
+
{%- if messages[0]['role'] == 'system' %}
|
| 16 |
+
{{- '<|im_start|>system\n' + messages[0]['content'] + '<|im_end|>\n' }}
|
| 17 |
+
{%- else %}
|
| 18 |
+
{{- '<|im_start|>system\nYou are a helpful assistant.<|im_end|>\n' }}
|
| 19 |
+
{%- endif %}
|
| 20 |
+
{%- endif %}
|
| 21 |
+
{%- for message in messages %}
|
| 22 |
+
{%- if (message.role == "user") or (message.role == "system" and not loop.first) or (message.role == "assistant" and not message.tool_calls) %}
|
| 23 |
+
{{- '<|im_start|>' + message.role + '\n' + message.content + '<|im_end|>' + '\n' }}
|
| 24 |
+
{%- elif message.role == "assistant" %}
|
| 25 |
+
{{- '<|im_start|>' + message.role }}
|
| 26 |
+
{%- if message.content %}
|
| 27 |
+
{{- '\n' + message.content }}
|
| 28 |
+
{%- endif %}
|
| 29 |
+
{%- for tool_call in message.tool_calls %}
|
| 30 |
+
{%- if tool_call.function is defined %}
|
| 31 |
+
{%- set tool_call = tool_call.function %}
|
| 32 |
+
{%- endif %}
|
| 33 |
+
{{- '\n<tool_call>\n{"name": "' }}
|
| 34 |
+
{{- tool_call.name }}
|
| 35 |
+
{{- '", "arguments": ' }}
|
| 36 |
+
{{- tool_call.arguments | tojson }}
|
| 37 |
+
{{- '}\n</tool_call>' }}
|
| 38 |
+
{%- endfor %}
|
| 39 |
+
{{- '<|im_end|>\n' }}
|
| 40 |
+
{%- elif message.role == "tool" %}
|
| 41 |
+
{%- if (loop.index0 == 0) or (messages[loop.index0 - 1].role != "tool") %}
|
| 42 |
+
{{- '<|im_start|>user' }}
|
| 43 |
+
{%- endif %}
|
| 44 |
+
{{- '\n<tool_response>\n' }}
|
| 45 |
+
{{- message.content }}
|
| 46 |
+
{{- '\n</tool_response>' }}
|
| 47 |
+
{%- if loop.last or (messages[loop.index0 + 1].role != "tool") %}
|
| 48 |
+
{{- '<|im_end|>\n' }}
|
| 49 |
+
{%- endif %}
|
| 50 |
+
{%- endif %}
|
| 51 |
+
{%- endfor %}
|
| 52 |
+
{%- if add_generation_prompt %}
|
| 53 |
+
{{- '<|im_start|>assistant\n' }}
|
| 54 |
+
{%- endif %}
|
config.json
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"architectures": [
|
| 3 |
+
"SwePrunerVllmForTokenClassification"
|
| 4 |
+
],
|
| 5 |
+
"attention_dropout": 0.0,
|
| 6 |
+
"bos_token_id": 151643,
|
| 7 |
+
"eos_token_id": 151643,
|
| 8 |
+
"hidden_act": "silu",
|
| 9 |
+
"hidden_size": 896,
|
| 10 |
+
"initializer_range": 0.02,
|
| 11 |
+
"intermediate_size": 4864,
|
| 12 |
+
"max_position_embeddings": 32768,
|
| 13 |
+
"max_window_layers": 17,
|
| 14 |
+
"model_type": "qwen2",
|
| 15 |
+
"num_attention_heads": 14,
|
| 16 |
+
"num_hidden_layers": 17,
|
| 17 |
+
"num_key_value_heads": 2,
|
| 18 |
+
"rms_norm_eps": 1e-06,
|
| 19 |
+
"rope_theta": 1000000.0,
|
| 20 |
+
"sliding_window": 32768,
|
| 21 |
+
"tie_word_embeddings": true,
|
| 22 |
+
"torch_dtype": "float16",
|
| 23 |
+
"transformers_version": "4.43.1",
|
| 24 |
+
"use_cache": true,
|
| 25 |
+
"use_sliding_window": false,
|
| 26 |
+
"vocab_size": 151936,
|
| 27 |
+
"num_labels": 3,
|
| 28 |
+
"problem_type": "regression",
|
| 29 |
+
"io_processor_plugin": "swe_pruner",
|
| 30 |
+
"swe_pruner": {
|
| 31 |
+
"bottleneck": 128,
|
| 32 |
+
"dropout": 0.1,
|
| 33 |
+
"num_fusion_layers": 1,
|
| 34 |
+
"num_heads": 16,
|
| 35 |
+
"last_layer_expansion_size": 2432,
|
| 36 |
+
"last_layer_adapter_type": "gated",
|
| 37 |
+
"last_layer_activation": "polynorm",
|
| 38 |
+
"backbone_stop_layer": 17,
|
| 39 |
+
"pruned_attention_layers": [
|
| 40 |
+
6,
|
| 41 |
+
16,
|
| 42 |
+
17
|
| 43 |
+
],
|
| 44 |
+
"attention_type": "full",
|
| 45 |
+
"input_format": "plain_pruner",
|
| 46 |
+
"lora_merged": true,
|
| 47 |
+
"output_columns": [
|
| 48 |
+
"prune_emission",
|
| 49 |
+
"keep_emission",
|
| 50 |
+
"document_log_probability"
|
| 51 |
+
]
|
| 52 |
+
}
|
| 53 |
+
}
|
export_manifest.json
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"source_checkpoint": "fast-code-pruner retained seed-43 checkpoint",
|
| 3 |
+
"base_model": "Qwen/Qwen2.5-Coder-0.5B",
|
| 4 |
+
"architecture": "SwePrunerVllmForTokenClassification",
|
| 5 |
+
"merged_lora_modules": 107,
|
| 6 |
+
"pruned_attention_layers": [
|
| 7 |
+
6,
|
| 8 |
+
16,
|
| 9 |
+
17
|
| 10 |
+
],
|
| 11 |
+
"input_format": "plain_pruner",
|
| 12 |
+
"output_contract": {
|
| 13 |
+
"token_keep_probability": "softmax(columns[0:2])[1]",
|
| 14 |
+
"document_score": "exp(last_token_column_2)"
|
| 15 |
+
}
|
| 16 |
+
}
|
merges.txt
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:4cabcea8a8cd8ae6f55482240664e9aee9ad37ae015ec6d07463a54a98ff9ebc
|
| 3 |
+
size 881711624
|
package/fast_code_pruner-0.1.0-py3-none-any.whl
ADDED
|
Binary file (30.8 kB). View file
|
|
|
special_tokens_map.json
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"additional_special_tokens": [
|
| 3 |
+
"<|im_start|>",
|
| 4 |
+
"<|im_end|>",
|
| 5 |
+
"<|object_ref_start|>",
|
| 6 |
+
"<|object_ref_end|>",
|
| 7 |
+
"<|box_start|>",
|
| 8 |
+
"<|box_end|>",
|
| 9 |
+
"<|quad_start|>",
|
| 10 |
+
"<|quad_end|>",
|
| 11 |
+
"<|vision_start|>",
|
| 12 |
+
"<|vision_end|>",
|
| 13 |
+
"<|vision_pad|>",
|
| 14 |
+
"<|image_pad|>",
|
| 15 |
+
"<|video_pad|>"
|
| 16 |
+
],
|
| 17 |
+
"eos_token": {
|
| 18 |
+
"content": "<|endoftext|>",
|
| 19 |
+
"lstrip": false,
|
| 20 |
+
"normalized": false,
|
| 21 |
+
"rstrip": false,
|
| 22 |
+
"single_word": false
|
| 23 |
+
},
|
| 24 |
+
"pad_token": {
|
| 25 |
+
"content": "<|endoftext|>",
|
| 26 |
+
"lstrip": false,
|
| 27 |
+
"normalized": false,
|
| 28 |
+
"rstrip": false,
|
| 29 |
+
"single_word": false
|
| 30 |
+
}
|
| 31 |
+
}
|
tokenizer.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:9c5ae00e602b8860cbd784ba82a8aa14e8feecec692e7076590d014d7b7fdafa
|
| 3 |
+
size 11421896
|
tokenizer_config.json
ADDED
|
@@ -0,0 +1,207 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"add_bos_token": false,
|
| 3 |
+
"add_prefix_space": false,
|
| 4 |
+
"added_tokens_decoder": {
|
| 5 |
+
"151643": {
|
| 6 |
+
"content": "<|endoftext|>",
|
| 7 |
+
"lstrip": false,
|
| 8 |
+
"normalized": false,
|
| 9 |
+
"rstrip": false,
|
| 10 |
+
"single_word": false,
|
| 11 |
+
"special": true
|
| 12 |
+
},
|
| 13 |
+
"151644": {
|
| 14 |
+
"content": "<|im_start|>",
|
| 15 |
+
"lstrip": false,
|
| 16 |
+
"normalized": false,
|
| 17 |
+
"rstrip": false,
|
| 18 |
+
"single_word": false,
|
| 19 |
+
"special": true
|
| 20 |
+
},
|
| 21 |
+
"151645": {
|
| 22 |
+
"content": "<|im_end|>",
|
| 23 |
+
"lstrip": false,
|
| 24 |
+
"normalized": false,
|
| 25 |
+
"rstrip": false,
|
| 26 |
+
"single_word": false,
|
| 27 |
+
"special": true
|
| 28 |
+
},
|
| 29 |
+
"151646": {
|
| 30 |
+
"content": "<|object_ref_start|>",
|
| 31 |
+
"lstrip": false,
|
| 32 |
+
"normalized": false,
|
| 33 |
+
"rstrip": false,
|
| 34 |
+
"single_word": false,
|
| 35 |
+
"special": true
|
| 36 |
+
},
|
| 37 |
+
"151647": {
|
| 38 |
+
"content": "<|object_ref_end|>",
|
| 39 |
+
"lstrip": false,
|
| 40 |
+
"normalized": false,
|
| 41 |
+
"rstrip": false,
|
| 42 |
+
"single_word": false,
|
| 43 |
+
"special": true
|
| 44 |
+
},
|
| 45 |
+
"151648": {
|
| 46 |
+
"content": "<|box_start|>",
|
| 47 |
+
"lstrip": false,
|
| 48 |
+
"normalized": false,
|
| 49 |
+
"rstrip": false,
|
| 50 |
+
"single_word": false,
|
| 51 |
+
"special": true
|
| 52 |
+
},
|
| 53 |
+
"151649": {
|
| 54 |
+
"content": "<|box_end|>",
|
| 55 |
+
"lstrip": false,
|
| 56 |
+
"normalized": false,
|
| 57 |
+
"rstrip": false,
|
| 58 |
+
"single_word": false,
|
| 59 |
+
"special": true
|
| 60 |
+
},
|
| 61 |
+
"151650": {
|
| 62 |
+
"content": "<|quad_start|>",
|
| 63 |
+
"lstrip": false,
|
| 64 |
+
"normalized": false,
|
| 65 |
+
"rstrip": false,
|
| 66 |
+
"single_word": false,
|
| 67 |
+
"special": true
|
| 68 |
+
},
|
| 69 |
+
"151651": {
|
| 70 |
+
"content": "<|quad_end|>",
|
| 71 |
+
"lstrip": false,
|
| 72 |
+
"normalized": false,
|
| 73 |
+
"rstrip": false,
|
| 74 |
+
"single_word": false,
|
| 75 |
+
"special": true
|
| 76 |
+
},
|
| 77 |
+
"151652": {
|
| 78 |
+
"content": "<|vision_start|>",
|
| 79 |
+
"lstrip": false,
|
| 80 |
+
"normalized": false,
|
| 81 |
+
"rstrip": false,
|
| 82 |
+
"single_word": false,
|
| 83 |
+
"special": true
|
| 84 |
+
},
|
| 85 |
+
"151653": {
|
| 86 |
+
"content": "<|vision_end|>",
|
| 87 |
+
"lstrip": false,
|
| 88 |
+
"normalized": false,
|
| 89 |
+
"rstrip": false,
|
| 90 |
+
"single_word": false,
|
| 91 |
+
"special": true
|
| 92 |
+
},
|
| 93 |
+
"151654": {
|
| 94 |
+
"content": "<|vision_pad|>",
|
| 95 |
+
"lstrip": false,
|
| 96 |
+
"normalized": false,
|
| 97 |
+
"rstrip": false,
|
| 98 |
+
"single_word": false,
|
| 99 |
+
"special": true
|
| 100 |
+
},
|
| 101 |
+
"151655": {
|
| 102 |
+
"content": "<|image_pad|>",
|
| 103 |
+
"lstrip": false,
|
| 104 |
+
"normalized": false,
|
| 105 |
+
"rstrip": false,
|
| 106 |
+
"single_word": false,
|
| 107 |
+
"special": true
|
| 108 |
+
},
|
| 109 |
+
"151656": {
|
| 110 |
+
"content": "<|video_pad|>",
|
| 111 |
+
"lstrip": false,
|
| 112 |
+
"normalized": false,
|
| 113 |
+
"rstrip": false,
|
| 114 |
+
"single_word": false,
|
| 115 |
+
"special": true
|
| 116 |
+
},
|
| 117 |
+
"151657": {
|
| 118 |
+
"content": "<tool_call>",
|
| 119 |
+
"lstrip": false,
|
| 120 |
+
"normalized": false,
|
| 121 |
+
"rstrip": false,
|
| 122 |
+
"single_word": false,
|
| 123 |
+
"special": false
|
| 124 |
+
},
|
| 125 |
+
"151658": {
|
| 126 |
+
"content": "</tool_call>",
|
| 127 |
+
"lstrip": false,
|
| 128 |
+
"normalized": false,
|
| 129 |
+
"rstrip": false,
|
| 130 |
+
"single_word": false,
|
| 131 |
+
"special": false
|
| 132 |
+
},
|
| 133 |
+
"151659": {
|
| 134 |
+
"content": "<|fim_prefix|>",
|
| 135 |
+
"lstrip": false,
|
| 136 |
+
"normalized": false,
|
| 137 |
+
"rstrip": false,
|
| 138 |
+
"single_word": false,
|
| 139 |
+
"special": false
|
| 140 |
+
},
|
| 141 |
+
"151660": {
|
| 142 |
+
"content": "<|fim_middle|>",
|
| 143 |
+
"lstrip": false,
|
| 144 |
+
"normalized": false,
|
| 145 |
+
"rstrip": false,
|
| 146 |
+
"single_word": false,
|
| 147 |
+
"special": false
|
| 148 |
+
},
|
| 149 |
+
"151661": {
|
| 150 |
+
"content": "<|fim_suffix|>",
|
| 151 |
+
"lstrip": false,
|
| 152 |
+
"normalized": false,
|
| 153 |
+
"rstrip": false,
|
| 154 |
+
"single_word": false,
|
| 155 |
+
"special": false
|
| 156 |
+
},
|
| 157 |
+
"151662": {
|
| 158 |
+
"content": "<|fim_pad|>",
|
| 159 |
+
"lstrip": false,
|
| 160 |
+
"normalized": false,
|
| 161 |
+
"rstrip": false,
|
| 162 |
+
"single_word": false,
|
| 163 |
+
"special": false
|
| 164 |
+
},
|
| 165 |
+
"151663": {
|
| 166 |
+
"content": "<|repo_name|>",
|
| 167 |
+
"lstrip": false,
|
| 168 |
+
"normalized": false,
|
| 169 |
+
"rstrip": false,
|
| 170 |
+
"single_word": false,
|
| 171 |
+
"special": false
|
| 172 |
+
},
|
| 173 |
+
"151664": {
|
| 174 |
+
"content": "<|file_sep|>",
|
| 175 |
+
"lstrip": false,
|
| 176 |
+
"normalized": false,
|
| 177 |
+
"rstrip": false,
|
| 178 |
+
"single_word": false,
|
| 179 |
+
"special": false
|
| 180 |
+
}
|
| 181 |
+
},
|
| 182 |
+
"additional_special_tokens": [
|
| 183 |
+
"<|im_start|>",
|
| 184 |
+
"<|im_end|>",
|
| 185 |
+
"<|object_ref_start|>",
|
| 186 |
+
"<|object_ref_end|>",
|
| 187 |
+
"<|box_start|>",
|
| 188 |
+
"<|box_end|>",
|
| 189 |
+
"<|quad_start|>",
|
| 190 |
+
"<|quad_end|>",
|
| 191 |
+
"<|vision_start|>",
|
| 192 |
+
"<|vision_end|>",
|
| 193 |
+
"<|vision_pad|>",
|
| 194 |
+
"<|image_pad|>",
|
| 195 |
+
"<|video_pad|>"
|
| 196 |
+
],
|
| 197 |
+
"bos_token": null,
|
| 198 |
+
"clean_up_tokenization_spaces": false,
|
| 199 |
+
"eos_token": "<|endoftext|>",
|
| 200 |
+
"errors": "replace",
|
| 201 |
+
"extra_special_tokens": {},
|
| 202 |
+
"model_max_length": 32768,
|
| 203 |
+
"pad_token": "<|endoftext|>",
|
| 204 |
+
"split_special_tokens": false,
|
| 205 |
+
"tokenizer_class": "Qwen2Tokenizer",
|
| 206 |
+
"unk_token": null
|
| 207 |
+
}
|
vocab.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|