Instructions to use Graph-COM/KVEraser with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use Graph-COM/KVEraser with PEFT:
from peft import PeftModel from transformers import AutoModel base_model = AutoModel.from_pretrained("Qwen/Qwen3-8B") model = PeftModel.from_pretrained(base_model, "Graph-COM/KVEraser") - Notebooks
- Google Colab
- Kaggle
Add Qwen3-8B LoRA KVEraser adapter
Browse files- LICENSE +173 -0
- README.md +58 -0
- adapter_config.json +46 -0
- adapter_model.safetensors +3 -0
- evaluation.json +237 -0
- training_config.json +17 -0
LICENSE
ADDED
|
@@ -0,0 +1,173 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Apache License
|
| 2 |
+
Version 2.0, January 2004
|
| 3 |
+
http://www.apache.org/licenses/
|
| 4 |
+
|
| 5 |
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
| 6 |
+
|
| 7 |
+
1. Definitions.
|
| 8 |
+
|
| 9 |
+
"License" shall mean the terms and conditions for use, reproduction,
|
| 10 |
+
and distribution as defined by Sections 1 through 9 of this document.
|
| 11 |
+
|
| 12 |
+
"Licensor" shall mean the copyright owner or entity authorized by
|
| 13 |
+
the copyright owner that is granting the License.
|
| 14 |
+
|
| 15 |
+
"Legal Entity" shall mean the union of the acting entity and all
|
| 16 |
+
other entities that control, are controlled by, or are under common
|
| 17 |
+
control with that entity. For the purposes of this definition,
|
| 18 |
+
"control" means (i) the power, direct or indirect, to cause the
|
| 19 |
+
direction or management of such entity, whether by contract or
|
| 20 |
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
| 21 |
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
| 22 |
+
|
| 23 |
+
"You" (or "Your") shall mean an individual or Legal Entity
|
| 24 |
+
exercising permissions granted by this License.
|
| 25 |
+
|
| 26 |
+
"Source" form shall mean the preferred form for making modifications,
|
| 27 |
+
including but not limited to software source code, documentation
|
| 28 |
+
source, and configuration files.
|
| 29 |
+
|
| 30 |
+
"Object" form shall mean any form resulting from mechanical
|
| 31 |
+
transformation or translation of a Source form, including but
|
| 32 |
+
not limited to compiled object code, generated documentation,
|
| 33 |
+
and conversions to other media types.
|
| 34 |
+
|
| 35 |
+
"Work" shall mean the work of authorship, whether in Source or
|
| 36 |
+
Object form, made available under the License, as indicated by a
|
| 37 |
+
copyright notice that is included in or attached to the work.
|
| 38 |
+
|
| 39 |
+
"Derivative Works" shall mean any work, whether in Source or Object
|
| 40 |
+
form, that is based on (or derived from) the Work and for which the
|
| 41 |
+
editorial revisions, annotations, elaborations, or other modifications
|
| 42 |
+
represent, as a whole, an original work of authorship. For the purposes
|
| 43 |
+
of this License, Derivative Works shall not include works that remain
|
| 44 |
+
separable from, or merely link (or bind by name) to the interfaces of,
|
| 45 |
+
the Work and Derivative Works thereof.
|
| 46 |
+
|
| 47 |
+
"Contribution" shall mean any work of authorship, including
|
| 48 |
+
the original version of the Work and any modifications or additions
|
| 49 |
+
to that Work or Derivative Works thereof, that is intentionally
|
| 50 |
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
| 51 |
+
or by an individual or Legal Entity authorized to submit on behalf of
|
| 52 |
+
the copyright owner. For the purposes of this definition, "submitted"
|
| 53 |
+
means any form of electronic, verbal, or written communication sent
|
| 54 |
+
to the Licensor or its representatives, including but not limited to
|
| 55 |
+
communication on electronic mailing lists, source code control systems,
|
| 56 |
+
and issue tracking systems managed by, or on behalf of, the Licensor
|
| 57 |
+
for the purpose of discussing and improving the Work, but excluding
|
| 58 |
+
communication that is conspicuously marked or otherwise designated in
|
| 59 |
+
writing by the copyright owner as "Not a Contribution."
|
| 60 |
+
|
| 61 |
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
| 62 |
+
on behalf of whom a Contribution has been received by Licensor and
|
| 63 |
+
subsequently incorporated within the Work.
|
| 64 |
+
|
| 65 |
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
| 66 |
+
this License, each Contributor hereby grants to You a perpetual,
|
| 67 |
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
| 68 |
+
copyright license to reproduce, prepare Derivative Works of,
|
| 69 |
+
publicly display, publicly perform, sublicense, and distribute the
|
| 70 |
+
Work and such Derivative Works in Source or Object form.
|
| 71 |
+
|
| 72 |
+
3. Grant of Patent License. Subject to the terms and conditions of
|
| 73 |
+
this License, each Contributor hereby grants to You a perpetual,
|
| 74 |
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
| 75 |
+
patent license to make, have made, use, offer to sell, sell, import,
|
| 76 |
+
and otherwise transfer the Work, where such license applies only to
|
| 77 |
+
those patent claims licensable by such Contributor that are necessarily
|
| 78 |
+
infringed by their Contribution(s) alone or by combination of their
|
| 79 |
+
Contribution(s) with the Work to which such Contribution(s) was
|
| 80 |
+
submitted. If You institute patent litigation against any entity
|
| 81 |
+
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
| 82 |
+
the Work or a Contribution incorporated within the Work constitutes
|
| 83 |
+
direct or contributory patent infringement, then any patent licenses
|
| 84 |
+
granted to You under this License for that Work shall terminate as of
|
| 85 |
+
the date such litigation is filed.
|
| 86 |
+
|
| 87 |
+
4. Redistribution. You may reproduce and distribute copies of the
|
| 88 |
+
Work or Derivative Works thereof in any medium, with or without
|
| 89 |
+
modifications, and in Source or Object form, provided that You
|
| 90 |
+
meet the following conditions:
|
| 91 |
+
|
| 92 |
+
(a) You must give any other recipients of the Work or
|
| 93 |
+
Derivative Works a copy of this License; and
|
| 94 |
+
|
| 95 |
+
(b) You must cause any modified files to carry prominent notices
|
| 96 |
+
stating that You changed the files; and
|
| 97 |
+
|
| 98 |
+
(c) You must retain, in the Source form of any Derivative Works
|
| 99 |
+
that You distribute, all copyright, patent, trademark, and
|
| 100 |
+
attribution notices from the Source form of the Work,
|
| 101 |
+
excluding those notices that do not pertain to any part of
|
| 102 |
+
the Derivative Works; and
|
| 103 |
+
|
| 104 |
+
(d) If the Work includes a "NOTICE" text file as part of its
|
| 105 |
+
distribution, then any Derivative Works that You distribute must
|
| 106 |
+
include a readable copy of the attribution notices contained
|
| 107 |
+
within such NOTICE file, excluding those notices that do not
|
| 108 |
+
pertain to any part of the Derivative Works, in at least one
|
| 109 |
+
of the following places: within a NOTICE text file distributed
|
| 110 |
+
as part of the Derivative Works; within the Source form or
|
| 111 |
+
documentation, if provided along with the Derivative Works; or,
|
| 112 |
+
within a display generated by the Derivative Works, if and
|
| 113 |
+
wherever such third-party notices normally appear. The contents
|
| 114 |
+
of the NOTICE file are for informational purposes only and
|
| 115 |
+
do not modify the License. You may add Your own attribution
|
| 116 |
+
notices within Derivative Works that You distribute, alongside
|
| 117 |
+
or as an addendum to the NOTICE text from the Work, provided
|
| 118 |
+
that such additional attribution notices cannot be construed
|
| 119 |
+
as modifying the License.
|
| 120 |
+
|
| 121 |
+
You may add Your own copyright statement to Your modifications and
|
| 122 |
+
may provide additional or different license terms and conditions
|
| 123 |
+
for use, reproduction, or distribution of Your modifications, or
|
| 124 |
+
for any such Derivative Works as a whole, provided Your use,
|
| 125 |
+
reproduction, and distribution of the Work otherwise complies with
|
| 126 |
+
the conditions stated in this License.
|
| 127 |
+
|
| 128 |
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
| 129 |
+
any Contribution intentionally submitted for inclusion in the Work
|
| 130 |
+
by You to the Licensor shall be under the terms and conditions of
|
| 131 |
+
this License, without any additional terms or conditions.
|
| 132 |
+
Notwithstanding the above, nothing herein shall supersede or modify
|
| 133 |
+
the terms of any separate license agreement you may have executed
|
| 134 |
+
with Licensor regarding such Contributions.
|
| 135 |
+
|
| 136 |
+
6. Trademarks. This License does not grant permission to use the trade
|
| 137 |
+
names, trademarks, service marks, or product names of the Licensor,
|
| 138 |
+
except as required for reasonable and customary use in describing the
|
| 139 |
+
origin of the Work and reproducing the content of the NOTICE file.
|
| 140 |
+
|
| 141 |
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
| 142 |
+
agreed to in writing, Licensor provides the Work on an "AS IS" BASIS,
|
| 143 |
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
| 144 |
+
implied, including, without limitation, any warranties or conditions
|
| 145 |
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
| 146 |
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
| 147 |
+
appropriateness of using or redistributing the Work and assume any
|
| 148 |
+
risks associated with Your exercise of permissions under this License.
|
| 149 |
+
|
| 150 |
+
8. Limitation of Liability. In no event and under no legal theory,
|
| 151 |
+
whether in tort (including negligence), contract, or otherwise,
|
| 152 |
+
unless required by applicable law (such as deliberate and grossly
|
| 153 |
+
negligent acts) or agreed to in writing, shall any Contributor be
|
| 154 |
+
liable to You for damages, including any direct, indirect, special,
|
| 155 |
+
incidental, or consequential damages of any character arising as a
|
| 156 |
+
result of this License or out of the use or inability to use the
|
| 157 |
+
Work (including but not limited to damages for loss of goodwill,
|
| 158 |
+
work stoppage, computer failure or malfunction, or any and all
|
| 159 |
+
other commercial damages or losses), even if such Contributor
|
| 160 |
+
has been advised of the possibility of such damages.
|
| 161 |
+
|
| 162 |
+
9. Accepting Warranty or Additional Liability. While redistributing
|
| 163 |
+
the Work or Derivative Works thereof, You may choose to offer,
|
| 164 |
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
| 165 |
+
or other liability obligations and/or rights consistent with this
|
| 166 |
+
License. However, in accepting such obligations, You may act only
|
| 167 |
+
on Your own behalf and on Your sole responsibility, not on behalf
|
| 168 |
+
of any other Contributor, and only if You agree to indemnify,
|
| 169 |
+
defend, and hold each Contributor harmless for any liability
|
| 170 |
+
incurred by, or claims asserted against, such Contributor by reason
|
| 171 |
+
of your accepting any such warranty or additional liability.
|
| 172 |
+
|
| 173 |
+
END OF TERMS AND CONDITIONS
|
README.md
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
library_name: peft
|
| 4 |
+
base_model: Qwen/Qwen3-8B
|
| 5 |
+
base_model_relation: adapter
|
| 6 |
+
datasets:
|
| 7 |
+
- Graph-COM/KVEraser
|
| 8 |
+
tags:
|
| 9 |
+
- lora
|
| 10 |
+
- kv-cache
|
| 11 |
+
---
|
| 12 |
+
|
| 13 |
+
# KVEraser Qwen3-8B
|
| 14 |
+
|
| 15 |
+
LoRA adapter for [KVEraser: Learning to Steer KV Cache for Efficient Localized Context Erasing](https://arxiv.org/abs/2606.17034), after pre-training and joint task-specific fine-tuning.
|
| 16 |
+
|
| 17 |
+
The adapter acts on the Qwen3 transformer during KV erasing. Generation uses the unchanged backbone; use the KVEraser evaluation code to route both operations through one shared backbone.
|
| 18 |
+
|
| 19 |
+
## Usage
|
| 20 |
+
|
| 21 |
+
From the [KVEraser code repository](https://github.com/Graph-COM/KVEraser), install its requirements and run on a CUDA GPU:
|
| 22 |
+
|
| 23 |
+
```bash
|
| 24 |
+
CUDA_VISIBLE_DEVICES=0 python evaluate.py \
|
| 25 |
+
--checkpoint Graph-COM/KVEraser \
|
| 26 |
+
--measure_performance --output_dir outputs/pretrained
|
| 27 |
+
```
|
| 28 |
+
|
| 29 |
+
The adapter, backbone, and [evaluation data](https://huggingface.co/datasets/Graph-COM/KVEraser) download automatically. Use `--checkpoint_revision` to select a model revision. The code README also provides pre-training and fine-tuning commands.
|
| 30 |
+
|
| 31 |
+
## Configuration
|
| 32 |
+
|
| 33 |
+
Base model: [Qwen/Qwen3-8B](https://huggingface.co/Qwen/Qwen3-8B), revision `b968826d9c46dd6066d109eabc6255188de91218`. LoRA rank 16, alpha 32, dropout 0; targets: `q_proj`, `k_proj`, `v_proj`, `o_proj`, `gate_proj`, `up_proj`, `down_proj`. Adapter parameters: 43,646,976.
|
| 34 |
+
|
| 35 |
+
Both training phases use seed 42, one epoch, AdamW, LR `1e-5`, weight decay `0.01`, and gradient clipping `1.0`; gradient accumulation is 8 for pre-training and 1 for fine-tuning. See [training_config.json](training_config.json). Inference uses BF16 and SDPA.
|
| 36 |
+
|
| 37 |
+
## Evaluation
|
| 38 |
+
|
| 39 |
+
Results for this adapter on 1,522 test samples using one RTX 6000 Ada 48GB GPU; EM and F1 are percentages. Evaluation uses greedy decoding with up to 32 new tokens. The paper reports results on A100 GPUs.
|
| 40 |
+
|
| 41 |
+
| Task | Samples | EM | F1 |
|
| 42 |
+
|---|---:|---:|---:|
|
| 43 |
+
| NIAH 1K | 100 | 100.00 | — |
|
| 44 |
+
| NIAH 2K | 100 | 100.00 | — |
|
| 45 |
+
| NIAH 4K | 100 | 100.00 | — |
|
| 46 |
+
| NIAH 8K | 100 | 100.00 | — |
|
| 47 |
+
| NIAH 16K | 100 | 100.00 | — |
|
| 48 |
+
| NIAH 32K | 100 | 99.00 | — |
|
| 49 |
+
| 2Wiki | 344 | 90.70 | 91.63 |
|
| 50 |
+
| MuSiQue | 300 | 84.67 | 86.67 |
|
| 51 |
+
| IIRC | 178 | 91.57 | 92.46 |
|
| 52 |
+
| BFCL | 100 | 85.00 | — |
|
| 53 |
+
|
| 54 |
+
On one RTX 6000 Ada 48GB, 32K NIAH online latency averages 514.22 ms and peak allocated memory is 22.91 GiB. Timing includes erasing, query replay, and generation; it excludes loading and initial prefill, with three warmup samples excluded per dataset. Memory includes the backbone and initial prefill. Full metrics and environment are in [evaluation.json](evaluation.json).
|
| 55 |
+
|
| 56 |
+
## License
|
| 57 |
+
|
| 58 |
+
Apache 2.0; see [LICENSE](LICENSE). The base model is separately available under [Apache 2.0](https://huggingface.co/Qwen/Qwen3-8B/blob/main/LICENSE).
|
adapter_config.json
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"alora_invocation_tokens": null,
|
| 3 |
+
"alpha_pattern": {},
|
| 4 |
+
"arrow_config": null,
|
| 5 |
+
"auto_mapping": null,
|
| 6 |
+
"base_model_name_or_path": "Qwen/Qwen3-8B",
|
| 7 |
+
"bias": "none",
|
| 8 |
+
"corda_config": null,
|
| 9 |
+
"ensure_weight_tying": false,
|
| 10 |
+
"eva_config": null,
|
| 11 |
+
"exclude_modules": null,
|
| 12 |
+
"fan_in_fan_out": false,
|
| 13 |
+
"inference_mode": true,
|
| 14 |
+
"init_lora_weights": true,
|
| 15 |
+
"layer_replication": null,
|
| 16 |
+
"layers_pattern": null,
|
| 17 |
+
"layers_to_transform": null,
|
| 18 |
+
"loftq_config": {},
|
| 19 |
+
"lora_alpha": 32,
|
| 20 |
+
"lora_bias": false,
|
| 21 |
+
"lora_dropout": 0.0,
|
| 22 |
+
"megatron_config": null,
|
| 23 |
+
"megatron_core": "megatron.core",
|
| 24 |
+
"modules_to_save": null,
|
| 25 |
+
"peft_type": "LORA",
|
| 26 |
+
"peft_version": "0.18.0",
|
| 27 |
+
"qalora_group_size": 16,
|
| 28 |
+
"r": 16,
|
| 29 |
+
"rank_pattern": {},
|
| 30 |
+
"revision": "b968826d9c46dd6066d109eabc6255188de91218",
|
| 31 |
+
"target_modules": [
|
| 32 |
+
"gate_proj",
|
| 33 |
+
"down_proj",
|
| 34 |
+
"v_proj",
|
| 35 |
+
"up_proj",
|
| 36 |
+
"o_proj",
|
| 37 |
+
"q_proj",
|
| 38 |
+
"k_proj"
|
| 39 |
+
],
|
| 40 |
+
"target_parameters": null,
|
| 41 |
+
"task_type": "FEATURE_EXTRACTION",
|
| 42 |
+
"trainable_token_indices": null,
|
| 43 |
+
"use_dora": false,
|
| 44 |
+
"use_qalora": false,
|
| 45 |
+
"use_rslora": false
|
| 46 |
+
}
|
adapter_model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:c11034fea2a42e6b3a0e8ca1252cafa5e9e7419b2b750bd8308952e22bc36fbc
|
| 3 |
+
size 174652512
|
evaluation.json
ADDED
|
@@ -0,0 +1,237 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"base_model": "Qwen/Qwen3-8B",
|
| 3 |
+
"base_revision": "b968826d9c46dd6066d109eabc6255188de91218",
|
| 4 |
+
"checkpoint_sha256": "c11034fea2a42e6b3a0e8ca1252cafa5e9e7419b2b750bd8308952e22bc36fbc",
|
| 5 |
+
"method": "kveraser",
|
| 6 |
+
"seed": 42,
|
| 7 |
+
"dtype": "bf16",
|
| 8 |
+
"attn_backend": "sdpa",
|
| 9 |
+
"placement": "single_gpu",
|
| 10 |
+
"warmup_samples": 3,
|
| 11 |
+
"online_timing": "Erasing, query replay, and generation; excludes loading and initial prefill.",
|
| 12 |
+
"environment": {
|
| 13 |
+
"cuda": "12.4",
|
| 14 |
+
"devices": {
|
| 15 |
+
"0": {
|
| 16 |
+
"name": "NVIDIA RTX 6000 Ada Generation",
|
| 17 |
+
"total_bytes": 50951487488
|
| 18 |
+
}
|
| 19 |
+
},
|
| 20 |
+
"peft": "0.18.0",
|
| 21 |
+
"python": "3.10.20",
|
| 22 |
+
"torch": "2.6.0+cu124",
|
| 23 |
+
"transformers": "4.57.6"
|
| 24 |
+
},
|
| 25 |
+
"results": {
|
| 26 |
+
"eval/niah/ctx32000": {
|
| 27 |
+
"em": 0.99,
|
| 28 |
+
"f1": null,
|
| 29 |
+
"gpu_memory": {
|
| 30 |
+
"0": {
|
| 31 |
+
"additional_peak_bytes": 546727936,
|
| 32 |
+
"allocated_before_bytes": 21184952320,
|
| 33 |
+
"online_peak_allocated_bytes": 21731680256,
|
| 34 |
+
"sample_peak_allocated_bytes": 24601723904
|
| 35 |
+
}
|
| 36 |
+
},
|
| 37 |
+
"mean_generated_tokens": 8.03,
|
| 38 |
+
"online_time_s": {
|
| 39 |
+
"mean": 0.5142248917417601,
|
| 40 |
+
"p50": 0.5102429335238412,
|
| 41 |
+
"p95": 0.5300618196662981,
|
| 42 |
+
"total": 51.42248917417601
|
| 43 |
+
},
|
| 44 |
+
"samples": 100,
|
| 45 |
+
"tokens_to_generate": 32
|
| 46 |
+
},
|
| 47 |
+
"eval/2wiki/default": {
|
| 48 |
+
"em": 0.9069767441860465,
|
| 49 |
+
"f1": 0.9163482834994462,
|
| 50 |
+
"gpu_memory": {
|
| 51 |
+
"0": {
|
| 52 |
+
"additional_peak_bytes": 268969472,
|
| 53 |
+
"allocated_before_bytes": 18794143232,
|
| 54 |
+
"online_peak_allocated_bytes": 19063112704,
|
| 55 |
+
"sample_peak_allocated_bytes": 20474419712
|
| 56 |
+
}
|
| 57 |
+
},
|
| 58 |
+
"mean_generated_tokens": 7.531976744186046,
|
| 59 |
+
"online_time_s": {
|
| 60 |
+
"mean": 0.3682723147667698,
|
| 61 |
+
"p50": 0.4042185049620457,
|
| 62 |
+
"p95": 0.49807005331385873,
|
| 63 |
+
"total": 126.68567627976881
|
| 64 |
+
},
|
| 65 |
+
"samples": 344,
|
| 66 |
+
"tokens_to_generate": 32
|
| 67 |
+
},
|
| 68 |
+
"eval/musique/default": {
|
| 69 |
+
"em": 0.8466666666666667,
|
| 70 |
+
"f1": 0.8667089947089949,
|
| 71 |
+
"gpu_memory": {
|
| 72 |
+
"0": {
|
| 73 |
+
"additional_peak_bytes": 272650752,
|
| 74 |
+
"allocated_before_bytes": 18801221120,
|
| 75 |
+
"online_peak_allocated_bytes": 19072865280,
|
| 76 |
+
"sample_peak_allocated_bytes": 20484922880
|
| 77 |
+
}
|
| 78 |
+
},
|
| 79 |
+
"mean_generated_tokens": 5.156666666666666,
|
| 80 |
+
"online_time_s": {
|
| 81 |
+
"mean": 0.2802521892004491,
|
| 82 |
+
"p50": 0.26830165553838015,
|
| 83 |
+
"p95": 0.3870559116388904,
|
| 84 |
+
"total": 84.07565676013473
|
| 85 |
+
},
|
| 86 |
+
"samples": 300,
|
| 87 |
+
"tokens_to_generate": 32
|
| 88 |
+
},
|
| 89 |
+
"eval/niah/ctx16000": {
|
| 90 |
+
"em": 1.0,
|
| 91 |
+
"f1": null,
|
| 92 |
+
"gpu_memory": {
|
| 93 |
+
"0": {
|
| 94 |
+
"additional_peak_bytes": 281001984,
|
| 95 |
+
"allocated_before_bytes": 18824815616,
|
| 96 |
+
"online_peak_allocated_bytes": 19105817600,
|
| 97 |
+
"sample_peak_allocated_bytes": 20527882752
|
| 98 |
+
}
|
| 99 |
+
},
|
| 100 |
+
"mean_generated_tokens": 8.0,
|
| 101 |
+
"online_time_s": {
|
| 102 |
+
"mean": 0.4066749042732408,
|
| 103 |
+
"p50": 0.40496365050785244,
|
| 104 |
+
"p95": 0.4213551172724692,
|
| 105 |
+
"total": 40.66749042732408
|
| 106 |
+
},
|
| 107 |
+
"samples": 100,
|
| 108 |
+
"tokens_to_generate": 32
|
| 109 |
+
},
|
| 110 |
+
"eval/bfcl/default": {
|
| 111 |
+
"em": 0.85,
|
| 112 |
+
"f1": null,
|
| 113 |
+
"gpu_memory": {
|
| 114 |
+
"0": {
|
| 115 |
+
"additional_peak_bytes": 515848704,
|
| 116 |
+
"allocated_before_bytes": 21069217792,
|
| 117 |
+
"online_peak_allocated_bytes": 21585066496,
|
| 118 |
+
"sample_peak_allocated_bytes": 24401938432
|
| 119 |
+
}
|
| 120 |
+
},
|
| 121 |
+
"mean_generated_tokens": 3.7,
|
| 122 |
+
"online_time_s": {
|
| 123 |
+
"mean": 0.2751596597000025,
|
| 124 |
+
"p50": 0.26906770549248904,
|
| 125 |
+
"p95": 0.35671693200129084,
|
| 126 |
+
"total": 27.515965970000252
|
| 127 |
+
},
|
| 128 |
+
"samples": 100,
|
| 129 |
+
"tokens_to_generate": 32
|
| 130 |
+
},
|
| 131 |
+
"eval/iirc/default": {
|
| 132 |
+
"em": 0.9157303370786517,
|
| 133 |
+
"f1": 0.9245585874799357,
|
| 134 |
+
"gpu_memory": {
|
| 135 |
+
"0": {
|
| 136 |
+
"additional_peak_bytes": 270984192,
|
| 137 |
+
"allocated_before_bytes": 18805350400,
|
| 138 |
+
"online_peak_allocated_bytes": 19076334592,
|
| 139 |
+
"sample_peak_allocated_bytes": 20494448640
|
| 140 |
+
}
|
| 141 |
+
},
|
| 142 |
+
"mean_generated_tokens": 4.617977528089888,
|
| 143 |
+
"online_time_s": {
|
| 144 |
+
"mean": 0.2729848635430694,
|
| 145 |
+
"p50": 0.24699980198056437,
|
| 146 |
+
"p95": 0.46759864510095217,
|
| 147 |
+
"total": 48.59130571066635
|
| 148 |
+
},
|
| 149 |
+
"samples": 178,
|
| 150 |
+
"tokens_to_generate": 32
|
| 151 |
+
},
|
| 152 |
+
"eval/niah/ctx8000": {
|
| 153 |
+
"em": 1.0,
|
| 154 |
+
"f1": null,
|
| 155 |
+
"gpu_memory": {
|
| 156 |
+
"0": {
|
| 157 |
+
"additional_peak_bytes": 147274240,
|
| 158 |
+
"allocated_before_bytes": 17649986048,
|
| 159 |
+
"online_peak_allocated_bytes": 17793384960,
|
| 160 |
+
"sample_peak_allocated_bytes": 18499313152
|
| 161 |
+
}
|
| 162 |
+
},
|
| 163 |
+
"mean_generated_tokens": 8.0,
|
| 164 |
+
"online_time_s": {
|
| 165 |
+
"mean": 0.3958572719770018,
|
| 166 |
+
"p50": 0.39497024498996325,
|
| 167 |
+
"p95": 0.40763832080410795,
|
| 168 |
+
"total": 39.58572719770018
|
| 169 |
+
},
|
| 170 |
+
"samples": 100,
|
| 171 |
+
"tokens_to_generate": 32
|
| 172 |
+
},
|
| 173 |
+
"eval/niah/ctx4000": {
|
| 174 |
+
"em": 1.0,
|
| 175 |
+
"f1": null,
|
| 176 |
+
"gpu_memory": {
|
| 177 |
+
"0": {
|
| 178 |
+
"additional_peak_bytes": 78681600,
|
| 179 |
+
"allocated_before_bytes": 17059311104,
|
| 180 |
+
"online_peak_allocated_bytes": 17135731200,
|
| 181 |
+
"sample_peak_allocated_bytes": 17479739904
|
| 182 |
+
}
|
| 183 |
+
},
|
| 184 |
+
"mean_generated_tokens": 8.0,
|
| 185 |
+
"online_time_s": {
|
| 186 |
+
"mean": 0.3570333040604601,
|
| 187 |
+
"p50": 0.35512368800118566,
|
| 188 |
+
"p95": 0.3695398859825218,
|
| 189 |
+
"total": 35.70333040604601
|
| 190 |
+
},
|
| 191 |
+
"samples": 100,
|
| 192 |
+
"tokens_to_generate": 32
|
| 193 |
+
},
|
| 194 |
+
"eval/niah/ctx2000": {
|
| 195 |
+
"em": 1.0,
|
| 196 |
+
"f1": null,
|
| 197 |
+
"gpu_memory": {
|
| 198 |
+
"0": {
|
| 199 |
+
"additional_peak_bytes": 47998464,
|
| 200 |
+
"allocated_before_bytes": 16761558528,
|
| 201 |
+
"online_peak_allocated_bytes": 16809556992,
|
| 202 |
+
"sample_peak_allocated_bytes": 16965440000
|
| 203 |
+
}
|
| 204 |
+
},
|
| 205 |
+
"mean_generated_tokens": 8.0,
|
| 206 |
+
"online_time_s": {
|
| 207 |
+
"mean": 0.35657244847039693,
|
| 208 |
+
"p50": 0.3525064610003028,
|
| 209 |
+
"p95": 0.3720976054901257,
|
| 210 |
+
"total": 35.65724484703969
|
| 211 |
+
},
|
| 212 |
+
"samples": 100,
|
| 213 |
+
"tokens_to_generate": 32
|
| 214 |
+
},
|
| 215 |
+
"eval/niah/ctx1000": {
|
| 216 |
+
"em": 1.0,
|
| 217 |
+
"f1": null,
|
| 218 |
+
"gpu_memory": {
|
| 219 |
+
"0": {
|
| 220 |
+
"additional_peak_bytes": 29080064,
|
| 221 |
+
"allocated_before_bytes": 16616574976,
|
| 222 |
+
"online_peak_allocated_bytes": 16643975168,
|
| 223 |
+
"sample_peak_allocated_bytes": 16717585408
|
| 224 |
+
}
|
| 225 |
+
},
|
| 226 |
+
"mean_generated_tokens": 8.0,
|
| 227 |
+
"online_time_s": {
|
| 228 |
+
"mean": 0.3563199064537184,
|
| 229 |
+
"p50": 0.3537737209990155,
|
| 230 |
+
"p95": 0.3704430579848122,
|
| 231 |
+
"total": 35.63199064537184
|
| 232 |
+
},
|
| 233 |
+
"samples": 100,
|
| 234 |
+
"tokens_to_generate": 32
|
| 235 |
+
}
|
| 236 |
+
}
|
| 237 |
+
}
|
training_config.json
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"base_model": "Qwen/Qwen3-8B",
|
| 3 |
+
"base_revision": "b968826d9c46dd6066d109eabc6255188de91218",
|
| 4 |
+
"data_format": "qwen3_8b/v1",
|
| 5 |
+
"optimizer": "AdamW",
|
| 6 |
+
"seed": 42,
|
| 7 |
+
"epochs": 1,
|
| 8 |
+
"lr": 1e-05,
|
| 9 |
+
"weight_decay": 0.01,
|
| 10 |
+
"max_grad_norm": 1.0,
|
| 11 |
+
"pretrain_train_samples": 72000,
|
| 12 |
+
"pretrain_validation_samples": 8000,
|
| 13 |
+
"pretrain_grad_accum_steps": 8,
|
| 14 |
+
"finetune_train_samples": 11491,
|
| 15 |
+
"finetune_validation_samples": 1642,
|
| 16 |
+
"finetune_grad_accum_steps": 1
|
| 17 |
+
}
|